Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Alex Jerabek
2018-06-18 13:40:16 -07:00
28 changed files with 393 additions and 133 deletions
+2 -2
View File
@@ -772,7 +772,7 @@ export interface VoidTypeAnnotation extends Node {
export interface JSXAttribute extends Node {
type: "JSXAttribute";
name: JSXIdentifier | JSXNamespacedName;
value: JSXElement | StringLiteral | JSXExpressionContainer;
value: JSXElement | StringLiteral | JSXExpressionContainer | null;
}
export interface JSXClosingElement extends Node {
@@ -1424,7 +1424,7 @@ export function objectTypeProperty(key?: Expression, value?: FlowTypeAnnotation)
export function qualifiedTypeIdentifier(id?: Identifier, qualification?: Identifier | QualifiedTypeIdentifier): QualifiedTypeIdentifier;
export function unionTypeAnnotation(types?: FlowTypeAnnotation[]): UnionTypeAnnotation;
export function voidTypeAnnotation(): VoidTypeAnnotation;
export function jSXAttribute(name?: JSXIdentifier | JSXNamespacedName, value?: JSXElement | StringLiteral | JSXExpressionContainer): JSXAttribute;
export function jSXAttribute(name?: JSXIdentifier | JSXNamespacedName, value?: JSXElement | StringLiteral | JSXExpressionContainer | null): JSXAttribute;
export function jSXClosingElement(name?: JSXIdentifier | JSXMemberExpression): JSXClosingElement;
export function jSXElement(openingElement?: JSXOpeningElement, closingElement?: JSXClosingElement, children?: Array<JSXElement | JSXExpressionContainer | JSXText>, selfClosing?: boolean): JSXElement;
export function jSXEmptyExpression(): JSXEmptyExpression;
+1 -1
View File
@@ -182,7 +182,7 @@ export class ObjectID {
* @param {number} time optional parameter allowing to pass in a second based timestamp.
* @return {string} return the 12 byte id binary string.
*/
generate(time?: number): string;
generate(time?: number): Buffer;
/**
* Returns the generation date (accurate up to the second) that this ID was generated.
* @return {date} the generation date
+13 -11
View File
@@ -21,7 +21,7 @@ declare namespace Intercom_ {
activator?: string;
};
company?: {
id: string|number,
id: string | number,
name: string,
created_at: number,
plan?: string,
@@ -33,16 +33,17 @@ declare namespace Intercom_ {
}
type IntercomCommand = 'boot'
|'shutdown'
|'update'
|'hide'
|'show'
|'showMessages'
|'showNewMessage'
|'onHide'
|'onShow'
|'onActivatorClick'
|'trackEvent';
| 'shutdown'
| 'update'
| 'hide'
| 'show'
| 'showMessages'
| 'showNewMessage'
| 'onHide'
| 'onShow'
| 'onUnreadCountChange'
| 'onActivatorClick'
| 'trackEvent';
interface IntercomStatic {
(command: 'boot', param: IntercomSettings): void;
@@ -51,6 +52,7 @@ declare namespace Intercom_ {
(command: 'showNewMessage', param?: string): void;
(command: 'onHide' | 'onShow' | 'onActivatorClick', param?: () => void): void;
(command: 'trackEvent', tag?: string, metadata?: any): void;
(command: 'onUnreadCountChange', cb: (unreadCount: number) => void): void;
(command: IntercomCommand, param1?: any, param2?: any): void;
}
}
+1
View File
@@ -23,6 +23,7 @@ Intercom('showMessages');
Intercom('showNewMessage');
Intercom('showNewMessage', 'pre-populated content');
Intercom('onHide', () => { /* Do stuff */ });
Intercom('onUnreadCountChange', (unreadCount: number) => { /* Do stuff */ });
Intercom('onActivatorClick', () => { /* Do stuff */ });
Intercom('trackEvent', 'invited-friend');
+2 -3
View File
@@ -16,6 +16,7 @@
/// <reference types="node" />
import Promise = require('bluebird');
import tls = require('tls');
interface RedisStatic {
new(port?: number, host?: string, options?: IORedis.RedisOptions): IORedis.Redis;
@@ -827,9 +828,7 @@ declare namespace IORedis {
*/
autoResendUnfulfilledCommands?: boolean;
lazyConnect?: boolean;
tls?: {
ca: Buffer;
};
tls?: tls.ConnectionOptions;
sentinels?: Array<{ host: string; port: number; }>;
name?: string;
/**
+4 -1
View File
@@ -29,7 +29,10 @@ new Redis({
password: 'auth',
db: 0,
retryStrategy() { return false; },
showFriendlyErrorStack: true
showFriendlyErrorStack: true,
tls: {
servername: 'tlsservername'
}
});
const pub = new Redis();
+10
View File
@@ -209,6 +209,14 @@ declare namespace jest {
readonly name: string;
}
interface Each {
(cases: any[]): (name: string, fn: (...args: any[]) => any) => void;
(strings: TemplateStringsArray, ...placeholders: any[]): (
name: string,
fn: (arg: any) => any
) => void;
}
/**
* Creates a test closure
*/
@@ -227,6 +235,7 @@ declare namespace jest {
only: It;
skip: It;
concurrent: It;
each: Each;
}
interface Describe {
@@ -234,6 +243,7 @@ declare namespace jest {
(name: number | string | Function | FunctionLike, fn: EmptyFunction): void;
only: Describe;
skip: Describe;
each: Each;
}
interface MatcherUtils {
+100
View File
@@ -956,3 +956,103 @@ const testJestConfig = (defaults: jest.DefaultOptions) => {
}
};
};
// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/26368
describe.each([[1, 1, 2], [1, 2, 3], [2, 1, 3]])(
".add(%i, %i)",
(a: number, b: number, expected: number) => {
test(`returns ${expected}`, () => {
expect(a + b).toBe(expected);
});
}
);
interface Case {
a: number;
b: number;
expected: number;
}
describe.each`
a | b | expected
${1} | ${1} | ${2}
${1} | ${2} | ${3}
${2} | ${1} | ${3}
`("$a + $b", ({ a, b, expected }: Case) => {
test(`returns ${expected}`, () => {
expect(a + b).toBe(expected);
});
});
describe.only.each([[1, 1, 2], [1, 2, 3], [2, 1, 3]])(
".add(%i, %i)",
(a, b, expected) => {
test(`returns ${expected}`, () => {
expect(a + b).toBe(expected);
});
}
);
describe.only.each`
a | b | expected
${1} | ${1} | ${2}
${1} | ${2} | ${3}
${2} | ${1} | ${3}
`("$a + $b", ({ a, b, expected }: Case) => {
test(`returns ${expected}`, () => {
expect(a + b).toBe(expected);
});
});
describe.skip.each([[1, 1, 2], [1, 2, 3], [2, 1, 3]])(
".add(%i, %i)",
(a, b, expected) => {
test(`returns ${expected}`, () => {
expect(a + b).toBe(expected);
});
}
);
describe.skip.each`
a | b | expected
${1} | ${1} | ${2}
${1} | ${2} | ${3}
${2} | ${1} | ${3}
`("$a + $b", ({ a, b, expected }: Case) => {
test(`returns ${expected}`, () => {
expect(a + b).toBe(expected);
});
});
test.each([[1, 1, 2], [1, 2, 3], [2, 1, 3]])(
".add(%i, %i)",
(a, b, expected) => {
expect(a + b).toBe(expected);
}
);
test.each`
a | b | expected
${1} | ${1} | ${2}
${1} | ${2} | ${3}
${2} | ${1} | ${3}
`("returns $expected when $a is added $b", ({ a, b, expected }: Case) => {
expect(a + b).toBe(expected);
});
test.only.each([[1, 1, 2], [1, 2, 3], [2, 1, 3]])(
".add(%i, %i)",
(a, b, expected) => {
expect(a + b).toBe(expected);
}
);
test.only.each`
a | b | expected
${1} | ${1} | ${2}
${1} | ${2} | ${3}
${2} | ${1} | ${3}
`("returns $expected when $a is added $b", ({ a, b, expected }: Case) => {
expect(a + b).toBe(expected);
});
+1 -1
View File
@@ -4760,6 +4760,6 @@ declare namespace _ {
zipObjectDeep: LodashZipObjectDeep;
zipWith: LodashZipWith;
__: lodash.__;
placehodler: lodash.__;
placeholder: lodash.__;
}
}
+1 -1
View File
@@ -118,7 +118,7 @@ async function main() {
" interface LoDashFp {",
...interfaceGroups.map(g => ` ${g.functionName}: ${g.interfaces[0].name};`),
" __: lodash.__;",
" placehodler: lodash.__;",
" placeholder: lodash.__;",
" }",
"}",
"",
+2 -1
View File
@@ -1,4 +1,4 @@
// Type definitions for microrouter 2.2
// Type definitions for microrouter 3.1
// Project: https://github.com/pedronauck/micro-router#readme
// Definitions by: Mathieu Dutour <https://github.com/mathieudutour>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -21,6 +21,7 @@ export type AugmentedRequestHandler = (
export type RouteHandler = (path: string, handler: AugmentedRequestHandler) => RequestHandler;
export function router(...routes: RequestHandler[]): RequestHandler;
export function withNamespace(namespace: string): (...routes: RequestHandler[]) => RequestHandler;
export const get: RouteHandler;
export const post: RouteHandler;
+1 -1
View File
@@ -1252,7 +1252,7 @@ export class Cursor<T = Default> extends Readable {
/** http://mongodb.github.io/node-mongodb-native/3.0/api/Cursor.html#limit */
limit(value: number): Cursor<T>;
/** http://mongodb.github.io/node-mongodb-native/3.0/api/Cursor.html#map */
map<U>(transform: (T) => U): Cursor<U>;
map<U>(transform: (document: T) => U): Cursor<U>;
/** http://mongodb.github.io/node-mongodb-native/3.0/api/Cursor.html#max */
max(max: number): Cursor<T>;
/** http://mongodb.github.io/node-mongodb-native/3.0/api/Cursor.html#maxAwaitTimeMS */
+25 -15
View File
@@ -8,12 +8,11 @@ export interface EventChangeOptions {
[key: string]: any;
}
export type PopStateCallback = (state: any) => boolean | undefined;
export type RouterCallback = () => void;
export interface RouterProps {
// router properties
readonly components: {
[key: string]: { Component: React.ComponentType<any>; err: any };
};
// url property fields
readonly pathname: string;
readonly route: string;
readonly asPath?: string;
@@ -27,39 +26,50 @@ export interface RouterProps {
| string[];
};
// router methods
reload(route: string): Promise<void>;
// property fields
readonly components: {
[key: string]: { Component: React.ComponentType<any>; err: any };
};
// core method fields
back(): void;
beforePopState(cb: PopStateCallback): boolean;
prefetch(url: string): Promise<React.ComponentType<any>>;
push(
url: string | UrlLike,
as?: string | UrlLike,
options?: EventChangeOptions,
): Promise<boolean>;
reload(route: string): Promise<void>;
replace(
url: string | UrlLike,
as?: string | UrlLike,
options?: EventChangeOptions,
): Promise<boolean>;
prefetch(url: string): Promise<React.ComponentType<any>>;
// router events
// events
onAppUpdated?(nextRoute: string): void;
onRouteChangeStart?(url: string): void;
onBeforeHistoryChange?(as: string): void;
onHashChangeStart?(url: string): void;
onHashChangeComplete?(url: string): void;
onRouteChangeComplete?(url: string): void;
onRouteChangeError?(error: any, url: string): void;
onRouteChangeStart?(url: string): void;
}
export interface SingletonRouter {
router: RouterProps;
export interface SingletonRouter extends RouterProps {
router: RouterProps | null;
readyCallbacks: RouterCallback[];
ready(cb: RouterCallback): void;
}
export interface WithRouterProps {
router: SingletonRouter;
}
export function withRouter<T extends {}>(
Component: React.ComponentType<T & SingletonRouter>,
Component: React.ComponentType<T & WithRouterProps>,
): React.ComponentType<T>;
export const Singleton: SingletonRouter;
export type ImperativeRouter = RouterProps;
export default Singleton;
declare const Router: SingletonRouter;
export default Router;
+49 -23
View File
@@ -1,4 +1,4 @@
import Router, * as r from "next/router";
import Router, { withRouter, WithRouterProps } from "next/router";
import * as React from "react";
import * as qs from "querystring";
@@ -13,8 +13,8 @@ Router.ready(() => {
// Access readonly properties of the router.
Object.keys(Router.router.components).forEach(key => {
const c = Router.router.components[key];
Object.keys(Router.components).forEach(key => {
const c = Router.components[key];
c.err.isAnAny;
return <c.Component />;
@@ -26,52 +26,78 @@ function split(routeLike: string) {
});
}
if (Router.router.asPath) {
split(Router.router.asPath);
split(Router.router.asPath);
if (Router.asPath) {
split(Router.asPath);
split(Router.asPath);
}
split(Router.router.pathname);
split(Router.pathname);
const query = `?${qs.stringify(Router.router.query)}`;
const query = `?${qs.stringify(Router.query)}`;
// Assign some callback methods.
Router.router.onAppUpdated = (nextRoute: string) => console.log(nextRoute);
Router.router.onRouteChangeStart = (url: string) =>
Router.onAppUpdated = (nextRoute: string) => console.log(nextRoute);
Router.onRouteChangeStart = (url: string) =>
console.log("Route is starting to change.", url);
Router.router.onBeforeHistoryChange = (as: string) =>
Router.onBeforeHistoryChange = (as: string) =>
console.log("History hasn't changed yet.", as);
Router.router.onRouteChangeComplete = (url: string) =>
Router.onRouteChangeComplete = (url: string) =>
console.log("Route chaneg is complete.", url);
Router.router.onRouteChangeError = (err: any, url: string) =>
Router.onRouteChangeError = (err: any, url: string) =>
console.log("Route is starting to change.", url, err);
// Call methods on the router itself.
Router.router.reload("/route").then(() => console.log("route was reloaded"));
Router.router.back();
Router.reload("/route").then(() => console.log("route was reloaded"));
Router.back();
Router.beforePopState(({ url }) => !!url);
Router.router.push("/route").then((success: boolean) =>
Router.push("/route").then((success: boolean) =>
console.log("route push success: ", success),
);
Router.router.push("/route", "/asRoute").then((success: boolean) =>
Router.push("/route", "/asRoute").then((success: boolean) =>
console.log("route push success: ", success),
);
Router.router.push("/route", "/asRoute", { shallow: false }).then((success: boolean) =>
Router.push("/route", "/asRoute", { shallow: false }).then((success: boolean) =>
console.log("route push success: ", success),
);
Router.router.replace("/route").then((success: boolean) =>
Router.replace("/route").then((success: boolean) =>
console.log("route replace success: ", success),
);
Router.router.replace("/route", "/asRoute").then((success: boolean) =>
Router.replace("/route", "/asRoute").then((success: boolean) =>
console.log("route replace success: ", success),
);
Router.router.replace("/route", "/asRoute", {
Router.replace("/route", "/asRoute", {
shallow: false,
}).then((success: boolean) => console.log("route replace success: ", success));
Router.router.prefetch("/route").then(Component => {
Router.prefetch("/route").then(Component => {
const element = <Component />;
});
r.withRouter(props => <div />);
interface TestComponentProps {
testValue: string;
}
class TestComponent extends React.Component<TestComponentProps & WithRouterProps> {
state = { ready: false };
constructor(props: TestComponentProps & WithRouterProps) {
super(props);
props.router.ready(() => {
this.setState({ ready: true });
});
}
render() {
return (
<div>
<h1>{this.state.ready ? 'Ready' : 'Not Ready'}</h1>
<h2>Route: {this.props.router.route}</h2>
<p>Another prop: {this.props.testValue}</p>
</div>
);
}
}
withRouter(TestComponent);
+27 -27
View File
@@ -4874,15 +4874,15 @@ declare namespace Office {
/**
* The attachment is a file
*/
File,
File = "file",
/**
* The attachment is an Exchange item
*/
Item,
Item = "item",
/**
* The attachment is stored in a cloud location, such as OneDrive. The id property of the attachment contains a URL to the file.
*/
Cloud
Cloud = "cloud"
}
/**
* Specifies the day of week or type of day.
@@ -4946,31 +4946,31 @@ declare namespace Office {
/**
* Specifies that the entity is a meeting suggestion.
*/
MeetingSuggestion,
MeetingSuggestion = "meetingSuggestion",
/**
* Specifies that the entity is a task suggestion.
*/
TaskSuggestion,
TaskSuggestion = "taskSuggestion",
/**
* Specifies that the entity is a postal address.
*/
Address,
Address = "address",
/**
* Specifies that the entity is an SMTP email address.
*/
EmailAddress,
EmailAddress = "emailAddress",
/**
* Specifies that the entity is an Internet URL.
*/
Url,
Url = "url",
/**
* Specifies that the entity is a US phone number.
*/
PhoneNumber,
PhoneNumber = "phoneNumber",
/**
* Specifies that the entity is a contact.
*/
Contact
Contact = "contact"
}
/**
* Specifies the notification message type for an appointment or message.
@@ -4984,15 +4984,15 @@ declare namespace Office {
/**
* The notificationMessage is a progress indicator.
*/
ProgressIndicator,
ProgressIndicator = "progressIndicator",
/**
* The notificationMessage is an informational message.
*/
InformationalMessage,
InformationalMessage = "informationalMessage",
/**
* The notificationMessage is an error message.
*/
ErrorMessage
ErrorMessage = "errorMessage"
}
/**
* Specifies an item's type.
@@ -5006,11 +5006,11 @@ declare namespace Office {
/**
* An email, meeting request, meeting response, or meeting cancellation.
*/
Message,
Message = "message",
/**
* An appointment item.
*/
Appointment
Appointment = "appointment"
}
/**
* Specifies the month.
@@ -5082,19 +5082,19 @@ declare namespace Office {
/**
* Specifies that the recipient is a distribution list containing a list of email addresses.
*/
DistributionList,
DistributionList = "distributionList",
/**
* Specifies that the recipient is an SMTP email address that is on the Exchange server.
*/
User,
User = "user",
/**
* Specifies that the recipient is an SMTP email address that is not on the Exchange server.
*/
ExternalUser,
ExternalUser = "externalUser",
/**
* Specifies that the recipient is not one of the other recipient types.
*/
Other
Other = "other"
}
/**
* Specifies the time zone applied to the recurrence.
@@ -5694,23 +5694,23 @@ declare namespace Office {
/**
* There has been no response from the attendee.
*/
None,
None = "none",
/**
* The attendee is the meeting organizer.
*/
Organizer,
Organizer = "organizer",
/**
* The meeting request was tentatively accepted by the attendee.
*/
Tentative,
Tentative = "tentative",
/**
* The meeting request was accepted by the attendee.
*/
Accepted,
Accepted = "accepted",
/**
* The meeting request was declined by the attendee.
*/
Declined
Declined = "declined"
}
/**
* Specifies the version of the REST API that corresponds to a REST-formatted item ID.
@@ -5724,15 +5724,15 @@ declare namespace Office {
/**
* Version 1.0.
*/
v1_0,
v1_0 = "v1.0",
/**
* Version 2.0.
*/
v2_0,
v2_0 = "v2.0",
/**
* Beta.
*/
Beta
Beta = "beta"
}
/**
* Specifies the week of the month.
+3 -1
View File
@@ -1,14 +1,16 @@
// Type definitions for query-string 5.1
// Type definitions for query-string 6.1
// Project: https://github.com/sindresorhus/query-string
// Definitions by: Sam Verschueren <https://github.com/SamVerschueren>
// Tanguy Krotoff <https://github.com/tkrotoff>
// HuHuanming <https://github.com/huhuanming>
// Madara Uchiha <https://github.com/MadaraUchiha>
// Josh Holmer <https://github.com/shssoichiro>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
export interface ParseOptions {
arrayFormat?: 'bracket' | 'index' | 'none';
decode?: boolean;
}
/**
+1
View File
@@ -24,6 +24,7 @@ import * as queryString from 'query-string';
let fooBar: { foo: 'bar' };
fooBar = queryString.parse('?foo=bar');
fooBar = queryString.parse('#foo=bar');
fooBar = queryString.parse('?foo=bar%20baz', { decode: true });
let fooBarBaz: { foo: ['bar', 'baz'] };
fooBarBaz = queryString.parse('&foo=bar&foo=baz');
+1
View File
@@ -12,6 +12,7 @@
// Karol Janyst <https://github.com/LKay>
// Aaron Beall <https://github.com/aaronbeall>
// Johann Rakotoharisoa <https://github.com/jrakotoharisoa>
// Andrew Makarov <https://github.com/r3nya>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
+3 -2
View File
@@ -1,11 +1,12 @@
import * as React from 'react';
import { Button } from 'react-bootstrap';
declare namespace ToggleButton {
export interface ToggleButtonProps extends React.HTMLProps<ToggleButton> {
checked?: boolean;
name?: string;
value: number|string;
value: number | string;
}
}
declare class ToggleButton extends React.Component<ToggleButton.ToggleButtonProps> { }
declare class ToggleButton extends React.Component<ToggleButton.ToggleButtonProps & Button.ButtonProps> { }
export = ToggleButton;
+2 -1
View File
@@ -1,4 +1,5 @@
import * as React from 'react';
import { ButtonGroup } from 'react-bootstrap';
import { Omit } from "../index";
declare namespace ToggleButtonGroup {
@@ -34,5 +35,5 @@ declare namespace ToggleButtonGroup {
& Omit<React.HTMLProps<ToggleButtonGroup>, "defaultValue" | "type" | "value" | "onChange">;
}
declare class ToggleButtonGroup extends React.Component<ToggleButtonGroup.ToggleButtonGroupProps> { }
declare class ToggleButtonGroup extends React.Component<ToggleButtonGroup.ToggleButtonGroupProps & ButtonGroup.ButtonGroupProps> { }
export = ToggleButtonGroup;
@@ -209,8 +209,8 @@ export class ReactBootstrapIndividualComponentsTest extends React.Component {
<Table />
<Tabs />
<Thumbnail />
<ToggleButton value="foo" />
<ToggleButtonGroup type="checkbox" />
<ToggleButton value="foo" bsSize="small" />
<ToggleButtonGroup type="checkbox" bsSize="small" />
<ToggleButtonGroup type="radio" name="foo" />
<Tooltip />
<Well />
@@ -1,18 +1,56 @@
import * as React from 'react';
import { Component, CSSProperties } from 'react';
import {
Button, ButtonToolbar, Modal, Well, ButtonGroup,
DropdownButton, MenuItem, Panel, PanelGroup, ListGroup,
ListGroupItem, Accordion, Tooltip,
OverlayTrigger, Popover, ProgressBar,
Nav, NavItem, Navbar, NavDropdown,
Tabs, Tab, Pager, PageItem,
Pagination, Alert, Carousel, SafeAnchor,
Grid, Row, Col, Thumbnail, Image, ResponsiveEmbed,
Label, Badge, Jumbotron, PageHeader,
Glyphicon, Table, Form, FormGroup,
ControlLabel, FormControl, HelpBlock,
Radio, Checkbox, Media, InputGroup, ToggleButtonGroup,
Button,
ButtonToolbar,
Modal,
Well,
ButtonGroup,
DropdownButton,
MenuItem,
Panel,
PanelGroup,
ListGroup,
ListGroupItem,
Accordion,
Tooltip,
OverlayTrigger,
Popover,
ProgressBar,
Nav,
NavItem,
Navbar,
NavDropdown,
Tabs,
Tab,
Pager,
PageItem,
Pagination,
Alert,
Carousel,
SafeAnchor,
Grid,
Row,
Col,
Thumbnail,
Image,
ResponsiveEmbed,
Label,
Badge,
Jumbotron,
PageHeader,
Glyphicon,
Table,
Form,
FormGroup,
ControlLabel,
FormControl,
HelpBlock,
Radio,
Checkbox,
Media,
InputGroup,
ToggleButtonGroup,
ToggleButton
} from 'react-bootstrap';
@@ -1418,20 +1456,47 @@ export class ReactBootstrapTest extends Component {
<div>
<ButtonToolbar>
<ToggleButtonGroup type="checkbox" defaultValue={[1, 3]}>
<ToggleButton value={1}>Checkbox 1 (pre-checked)</ToggleButton>
<ToggleButton value={2}>Checkbox 2</ToggleButton>
<ToggleButton value={3}>Checkbox 3 (pre-checked)</ToggleButton>
<ToggleButtonGroup
type="checkbox"
defaultValue={[1, 3]}
bsSize="small"
>
<ToggleButton value={1} bsSize="small" active>
Checkbox 1 (pre-checked)
</ToggleButton>
<ToggleButton value={2}>
Checkbox 2
</ToggleButton>
<ToggleButton value={3}>
Checkbox 3 (pre-checked)
</ToggleButton>
</ToggleButtonGroup>
</ButtonToolbar>
<ButtonToolbar>
<ToggleButtonGroup type="radio" name="options" defaultValue={1}>
<ToggleButton value={1}>
<ToggleButtonGroup
type="radio"
name="options"
defaultValue={1}
>
<ToggleButton
value={1}
bsSize="large"
>
Radio 1 (pre-checked)
</ToggleButton>
<ToggleButton value={2}>Radio 2</ToggleButton>
<ToggleButton value={3}>Radio 3</ToggleButton>
<ToggleButton
value={2}
bsSize="small"
>
Radio 2
</ToggleButton>
<ToggleButton
value={3}
bsSize="xsmall"
>
Radio 3
</ToggleButton>
</ToggleButtonGroup>
</ButtonToolbar>
</div>
+2
View File
@@ -7,6 +7,7 @@
// Rich Baird <https://github.com/richbai90>
// Dan Torberg <https://github.com/caspeco-dan>
// Peter Keuter <https://github.com/pkeuter>
// Jamie Saunders <https://github.com/jrsaunde>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
@@ -832,6 +833,7 @@ export class Treemap extends React.Component<TreemapProps> { }
export class Label extends React.Component<LabelProps> { }
export interface LabelProps {
angle?: number;
viewBox?: ViewBox | PolarViewBox;
formatter?: LabelFormatter;
value?: number | string;
+3 -1
View File
@@ -192,7 +192,9 @@ class Component extends React.Component<{}, ComponentState> {
<XAxis dataKey="name">
<Label value="Pages of my website" offset={0} position="insideBottom" />
</XAxis>
<YAxis label='pv of page' />
<YAxis>
<Label value="pv of page" angle={90} />
</YAxis>
<Bar dataKey="pv" fill="#8884d8">
<LabelList dataKey="name" position="insideTop" angle={45} />
</Bar>
+10 -5
View File
@@ -1,6 +1,11 @@
// Type definitions for socket.io 1.4.4
// Type definitions for socket.io 1.4.5
// Project: http://socket.io/
// Definitions by: PROGRE <https://github.com/progre>, Damian Connolly <https://github.com/divillysausages>, Florent Poujol <https://github.com/florentpoujol>, KentarouTakeda <https://github.com/KentarouTakeda>, Alexey Snigirev <https://github.com/gigi>
// Definitions by: PROGRE <https://github.com/progre>
// Damian Connolly <https://github.com/divillysausages>
// Florent Poujol <https://github.com/florentpoujol>
// KentarouTakeda <https://github.com/KentarouTakeda>
// Alexey Snigirev <https://github.com/gigi>
// Ezinwa Okpoechi <https://github.com/BrainMaestro>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
///<reference types="node" />
@@ -127,7 +132,7 @@ declare namespace SocketIO {
* Gets the allowed origins for requests
* @default "*:*"
*/
origins(): string;
origins(): string|string[];
/**
* Sets the allowed origins for requests
@@ -135,7 +140,7 @@ declare namespace SocketIO {
* @default "*:*"
* return This Server
*/
origins( v: string ): Server;
origins( v: string|string[] ): Server;
/**
* Attaches socket.io to a server
@@ -299,7 +304,7 @@ declare namespace SocketIO {
* Accepted origins
* @default '*:*'
*/
origins?: string;
origins?: string|string[];
/**
* How many milliseconds without a pong packed to consider the connection closed (engine.io)
+7 -6
View File
@@ -9,6 +9,7 @@
// Kensuke Hoshikawa <https://github.com/starhoshi>
// Thomas Bruun <https://github.com/bruun>
// Gal Talmor <https://github.com/galtalmor>
// Hunter Tunnicliff <https://github.com/htunnicliff>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
@@ -738,7 +739,7 @@ declare namespace Stripe {
* charge if a partial refund was issued), positive integer or zero.
*/
amount_refunded: number;
/**
* ID of the Connect application that created the charge. [Expandable]
*/
@@ -1994,7 +1995,7 @@ declare namespace Stripe {
/**
* The subscription that this invoice was prepared for, if any.
*/
subscription: string;
subscription: string | subscriptions.ISubscription;
/**
* Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
@@ -2302,7 +2303,7 @@ declare namespace Stripe {
/**
* The subscription that this invoice item has been created for, if any.
*/
subscription: string;
subscription: string | subscriptions.ISubscription;
}
interface InvoiceItemCreationOptions extends IDataOptionsWithMetadata {
@@ -2389,7 +2390,7 @@ declare namespace Stripe {
* currency) representing the total amount for the order.
*/
amount: number;
/**
* A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a 0-decimal
* currency) representing the total amount returned for the order thus far.
@@ -5033,7 +5034,7 @@ declare namespace Stripe {
* String representing the object’s type. Objects of the same type share the same value.
*/
object: "review";
/**
* The charge associated with this review. [Expandable]
*/
@@ -5073,7 +5074,7 @@ declare namespace Stripe {
*/
name: string;
}
}
}
class StripeResource {
constructor(stripe: Stripe, urlData: any);
+4
View File
@@ -1018,6 +1018,10 @@ stripe.invoices.list({ customer: "cus_5rfJKDJkuxzh5Q", limit: 3 }).then(function
// asynchronously called
});
stripe.invoices.retrieve("in_15fvyXEe31JkLCeQH7QbgZZb", { expand: ["subscription"] }).then(function (invoice) {
invoice.subscription
})
//#endregion
//#region Invoice Items tests
+31 -8
View File
@@ -5867,13 +5867,18 @@ export let UniformsLib: {
diffuse: IUniform;
opacity: IUniform;
map: IUniform;
offsetRepeat: IUniform;
specularMap: IUniform;
uvTransform: IUniform;
alphaMap: IUniform;
};
specularmap: {
specularMap: IUniform;
};
envmap: {
envMap: IUniform;
flipEnvMap: IUniform;
reflectivity: IUniform;
refractionRation: IUniform;
refractionRatio: IUniform;
maxMipLevel: IUniform;
};
aomap: {
aoMap: IUniform;
@@ -5883,7 +5888,9 @@ export let UniformsLib: {
lightMap: IUniform;
lightMapIntensity: IUniform;
};
emissivemap: { emissiveMap: IUniform };
emissivemap: {
emissiveMap: IUniform
};
bumpmap: {
bumpMap: IUniform;
bumpScale: IUniform;
@@ -5897,8 +5904,15 @@ export let UniformsLib: {
displacementScale: IUniform;
displacementBias: IUniform;
};
roughnessmap: { roughnessMap: IUniform };
metalnessmap: { metalnessMap: IUniform };
roughnessmap: {
roughnessMap: IUniform
};
metalnessmap: {
metalnessMap: IUniform
};
gradientmap: {
gradientMap: IUniform
};
fog: {
fogDensity: IUniform;
fogNear: IUniform;
@@ -5953,7 +5967,7 @@ export let UniformsLib: {
};
pointShadowMap: IUniform;
pointShadowMatrix: IUniform;
hemisphereLigtts: {
hemisphereLights: {
value: any[];
properties: {
direction: {};
@@ -5961,6 +5975,15 @@ export let UniformsLib: {
groundColor: {};
};
};
rectAreaLights: {
value: any[];
properties: {
color: {};
position: {};
width: {};
height: {};
}
}
};
points: {
diffuse: IUniform;
@@ -5968,7 +5991,7 @@ export let UniformsLib: {
size: IUniform;
scale: IUniform;
map: IUniform;
offsetRepeat: IUniform;
uvTransform: IUniform;
};
};