From 836e57e76558b4a97189c4ccf65c751807db7655 Mon Sep 17 00:00:00 2001 From: Kyle Buzby Date: Fri, 1 Sep 2017 13:54:42 -0500 Subject: [PATCH 0001/1327] Update dts-gen example with proper command line option --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4b16884273..5631d78375 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ Your package should have this structure: | tsconfig.json | This allows you to run `tsc` within the package. | | tslint.json | Enables linting. | -Generate these by running `npm install -g dts-gen` and `dts-gen --dt --name my-package-name --template module`. +Generate these by running `npm install -g dts-gen` and `dts-gen --dt --name my-package-name --module module`. See all options at [dts-gen](https://github.com/Microsoft/dts-gen). You may edit the `tsconfig.json` to add new files, to add `"target": "es6"` (needed for async functions), to add to `"lib"`, or to add the `"jsx"` compiler option. From 57c70f83b8604b7eabc2c69a4cf5f1bcd56b1369 Mon Sep 17 00:00:00 2001 From: Jovica Zoric Date: Tue, 26 Sep 2017 13:29:50 +0200 Subject: [PATCH 0002/1327] fix(react-sortable-tree): Add missing prop Add missing dndType prop. --- types/react-sortable-tree/index.d.ts | 2 ++ types/react-sortable-tree/react-sortable-tree-tests.tsx | 1 + 2 files changed, 3 insertions(+) diff --git a/types/react-sortable-tree/index.d.ts b/types/react-sortable-tree/index.d.ts index a6a04f4968..dfed930e2f 100644 --- a/types/react-sortable-tree/index.d.ts +++ b/types/react-sortable-tree/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for react-sortable-tree 0.1 // Project: https://fritz-c.github.io/react-sortable-tree // Definitions by: Wouter Hardeman +// Jovica Zoric // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -111,6 +112,7 @@ export interface ReactSortableTreeProps { scaffoldBlockPxWidth?: number; isVirtualized?: boolean; nodeContentRenderer?: NodeRenderer; + dndType?: string; } declare const SortableTree: React.ComponentClass; diff --git a/types/react-sortable-tree/react-sortable-tree-tests.tsx b/types/react-sortable-tree/react-sortable-tree-tests.tsx index 1a5e2dfcd0..106415744b 100644 --- a/types/react-sortable-tree/react-sortable-tree-tests.tsx +++ b/types/react-sortable-tree/react-sortable-tree-tests.tsx @@ -54,6 +54,7 @@ class Test extends React.Component { scaffoldBlockPxWidth={44} isVirtualized={true} nodeContentRenderer={nodeRenderer} + dndType="testNodeType" /> Date: Sat, 9 Dec 2017 18:19:19 +0100 Subject: [PATCH 0003/1327] Prettier test --- types/jsonwebtoken/jsonwebtoken-tests.ts | 76 +++++++++++++----------- 1 file changed, 42 insertions(+), 34 deletions(-) diff --git a/types/jsonwebtoken/jsonwebtoken-tests.ts b/types/jsonwebtoken/jsonwebtoken-tests.ts index 9e495d31cb..3ced0ccfb5 100644 --- a/types/jsonwebtoken/jsonwebtoken-tests.ts +++ b/types/jsonwebtoken/jsonwebtoken-tests.ts @@ -11,39 +11,44 @@ var token: string; var cert: Buffer; interface ITestObject { - 'foo': string + foo: string; } -const testObject = { foo: 'bar' } +const testObject = { foo: "bar" }; /** * jwt.sign * https://github.com/auth0/node-jsonwebtoken#usage */ // sign with default (HMAC SHA256) -token = jwt.sign(testObject, 'shhhhh'); +token = jwt.sign(testObject, "shhhhh"); // sign with default (HMAC SHA256) and single audience -token = jwt.sign(testObject, 'shhhhh', { audience: "theAudience"}); +token = jwt.sign(testObject, "shhhhh", { audience: "theAudience" }); // sign with default (HMAC SHA256) and multiple audiences -token = jwt.sign(testObject, 'shhhhh', { audience: ["audience1", "audience2"]}); +token = jwt.sign(testObject, "shhhhh", { + audience: ["audience1", "audience2"], +}); // sign with default (HMAC SHA256) and a keyid -token = jwt.sign(testObject, 'shhhhh', { keyid: "theKeyId"}); +token = jwt.sign(testObject, "shhhhh", { keyid: "theKeyId" }); // sign with RSA SHA256 -cert = fs.readFileSync('private.key'); // get private key -token = jwt.sign(testObject, cert, { algorithm: 'RS256'}); +cert = fs.readFileSync("private.key"); // get private key +token = jwt.sign(testObject, cert, { algorithm: "RS256" }); // sign with encrypted RSA SHA256 private key (only PEM encoding is supported) -const privKey: Buffer = fs.readFileSync('encrypted_private.key'); // get private key -const secret = {key: privKey.toString(), passphrase: 'keypwd'} -token = jwt.sign(testObject, secret, { algorithm: 'RS256' }); // the algorithm option is mandatory in this case +const privKey: Buffer = fs.readFileSync("encrypted_private.key"); // get private key +const secret = { key: privKey.toString(), passphrase: "keypwd" }; +token = jwt.sign(testObject, secret, { algorithm: "RS256" }); // the algorithm option is mandatory in this case // sign asynchronously -jwt.sign(testObject, cert, { algorithm: 'RS256' }, function(err: Error, token: string) { - console.log(token); +jwt.sign(testObject, cert, { algorithm: "RS256" }, function( + err: Error, + token: string, +) { + console.log(token); }); /** @@ -51,48 +56,51 @@ jwt.sign(testObject, cert, { algorithm: 'RS256' }, function(err: Error, token: s * https://github.com/auth0/node-jsonwebtoken#jwtverifytoken-secretorpublickey-options-callback */ // verify a token symmetric -jwt.verify(token, 'shhhhh', function(err, decoded) { - const result = decoded as ITestObject +jwt.verify(token, "shhhhh", function(err, decoded) { + const result = decoded as ITestObject; - console.log(result.foo) // bar + console.log(result.foo); // bar }); // invalid token -jwt.verify(token, 'wrong-secret', function(err, decoded) { - // err - // decoded undefined +jwt.verify(token, "wrong-secret", function(err, decoded) { + // err + // decoded undefined }); // verify a token asymmetric -cert = fs.readFileSync('public.pem'); // get public key -jwt.verify(token, cert, function (err, decoded) { - const result = decoded as ITestObject +cert = fs.readFileSync("public.pem"); // get public key +jwt.verify(token, cert, function(err, decoded) { + const result = decoded as ITestObject; - console.log(result.foo) // bar + console.log(result.foo); // bar }); // verify audience -cert = fs.readFileSync('public.pem'); // get public key -jwt.verify(token, cert, { audience: 'urn:foo' }, function(err, decoded) { - // if audience mismatch, err == invalid audience +cert = fs.readFileSync("public.pem"); // get public key +jwt.verify(token, cert, { audience: "urn:foo" }, function(err, decoded) { + // if audience mismatch, err == invalid audience }); // verify issuer -cert = fs.readFileSync('public.pem'); // get public key -jwt.verify(token, cert, { audience: 'urn:foo', issuer: 'urn:issuer' }, function(err, decoded) { - // if issuer mismatch, err == invalid issuer +cert = fs.readFileSync("public.pem"); // get public key +jwt.verify(token, cert, { audience: "urn:foo", issuer: "urn:issuer" }, function( + err, + decoded, +) { + // if issuer mismatch, err == invalid issuer }); // verify algorithm -cert = fs.readFileSync('public.pem'); // get public key -jwt.verify(token, cert, { algorithms: ['RS256'] }, function(err, decoded) { - // if algorithm mismatch, err == invalid algorithm +cert = fs.readFileSync("public.pem"); // get public key +jwt.verify(token, cert, { algorithms: ["RS256"] }, function(err, decoded) { + // if algorithm mismatch, err == invalid algorithm }); // verify without expiration check -cert = fs.readFileSync('public.pem'); // get public key +cert = fs.readFileSync("public.pem"); // get public key jwt.verify(token, cert, { ignoreExpiration: true }, function(err, decoded) { - // if ignoreExpration == false and token is expired, err == expired token + // if ignoreExpration == false and token is expired, err == expired token }); /** From ed28cd0b50ea04fb5d458710b403e1bfc371c8db Mon Sep 17 00:00:00 2001 From: Brice BERNARD Date: Sat, 9 Dec 2017 18:22:02 +0100 Subject: [PATCH 0004/1327] Add test and related fix --- types/jsonwebtoken/index.d.ts | 2 +- types/jsonwebtoken/jsonwebtoken-tests.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/types/jsonwebtoken/index.d.ts b/types/jsonwebtoken/index.d.ts index 766042e627..6455eeb1ba 100644 --- a/types/jsonwebtoken/index.d.ts +++ b/types/jsonwebtoken/index.d.ts @@ -166,4 +166,4 @@ declare function verify( declare function decode( token: string, options?: DecodeOptions, -): null | object | string; +): null | { [key: string]: any } | string; diff --git a/types/jsonwebtoken/jsonwebtoken-tests.ts b/types/jsonwebtoken/jsonwebtoken-tests.ts index 3ced0ccfb5..87e3a56390 100644 --- a/types/jsonwebtoken/jsonwebtoken-tests.ts +++ b/types/jsonwebtoken/jsonwebtoken-tests.ts @@ -111,6 +111,10 @@ var decoded = jwt.decode(token); decoded = jwt.decode(token, { complete: false }); +if (decoded !== null && typeof decoded === "object") { + console.log(decoded.foo); +} + decoded = jwt.decode(token, { json: false }); decoded = jwt.decode(token, { complete: false, json: false }); From 8a94d4a3d434602d3fbc7d6b768bb9d535410d3b Mon Sep 17 00:00:00 2001 From: Brice BERNARD Date: Sat, 9 Dec 2017 18:32:00 +0100 Subject: [PATCH 0005/1327] Bump version --- types/jsonwebtoken/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/jsonwebtoken/index.d.ts b/types/jsonwebtoken/index.d.ts index 6455eeb1ba..cd05b54d69 100644 --- a/types/jsonwebtoken/index.d.ts +++ b/types/jsonwebtoken/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for jsonwebtoken 7.2.1 +// Type definitions for jsonwebtoken 7.2.2 // Project: https://github.com/auth0/node-jsonwebtoken // Definitions by: Maxime LUCE , // Daniel Heim , From 34b42dbf696847ce0dd1282f5dc3d872cb0f79a0 Mon Sep 17 00:00:00 2001 From: Craig Kovatch Date: Fri, 29 Dec 2017 17:44:19 -0800 Subject: [PATCH 0006/1327] Add WAI-ARIA 1.1 attributes to React typings --- types/react/index.d.ts | 136 +++++++++++++++++++++++++++++++++++++ types/react/v15/index.d.ts | 136 +++++++++++++++++++++++++++++++++++++ 2 files changed, 272 insertions(+) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index c5c1c76d17..a4784caa41 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -2498,6 +2498,142 @@ declare namespace React { unselectable?: boolean; } + // All the WAI-ARIA 1.1 attributes + // https://www.w3.org/TR/wai-aria-1.1/ + interface HTMLAttributes extends DOMAttributes { + /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */ + 'aria-activedescendant'?: string; + /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change + * notifications defined by the aria-relevant attribute. */ + 'aria-atomic'?: boolean; + /** Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for + * an input and specifies how predictions would be presented if they are made. */ + 'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both'; + /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are + * complete before exposing them to the user. */ + 'aria-busy'?: boolean; + /** Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. + * @see aria-pressed @see aria-selected. */ + 'aria-checked'?: boolean | 'false' | 'mixed' | 'true'; + /** Defines the total number of columns in a table, grid, or treegrid. + * @see aria-colindex. */ + 'aria-colcount'?: number; + /** Defines an element's column index or position with respect to the total number of columns within a table, grid, or + * treegrid. + * @see aria-colcount @see aria-colspan. */ + 'aria-colindex'?: number; + /** Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. + * @see aria-colindex @see aria-rowspan. */ + 'aria-colspan'?: number; + /** Indicates the element that represents the current item within a container or set of related elements. */ + 'aria-current'?: boolean | 'false' | 'true' | 'page' | 'step' | 'location' | 'date' | 'time'; + /** Identifies the element (or elements) that describes the object. + * @see aria-labelledby */ + 'aria-describedby'?: string; + /** Identifies the element that provides a detailed, extended description for the object. + * @see aria-describedby. */ + 'aria-details'?: string; + /** Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. + * @see aria-hidden @see aria-readonly. */ + 'aria-disabled'?: boolean; + /** Indicates what functions can be performed when a dragged object is released on the drop target. + * @deprecated in ARIA 1.1 */ + 'aria-dropeffect'?: 'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup'; + /** Identifies the element that provides an error message for the object. + * @see aria-invalid @see aria-describedby. */ + 'aria-errormessage'?: string; + /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */ + 'aria-expanded'?: boolean; + /** Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, + * allows assistive technology to override the general default of reading in document source order. */ + 'aria-flowto'?: string; + /** Indicates an element's "grabbed" state in a drag-and-drop operation. + * @deprecated in ARIA 1.1 */ + 'aria-grabbed'?: boolean; + /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an + * element. */ + 'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'; + /** Indicates whether the element is exposed to an accessibility API. + * @see aria-disabled. */ + 'aria-hidden'?: boolean; + /** Indicates the entered value does not conform to the format expected by the application. + * @see aria-errormessage. */ + 'aria-invalid'?: boolean | 'false' | 'true' | 'grammar' | 'spelling'; + /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */ + 'aria-keyshortcuts'?: string; + /** Defines a string value that labels the current element. + * @see aria-labelledby. */ + 'aria-label'?: string; + /** Identifies the element (or elements) that labels the current element. + * @see aria-describedby. */ + 'aria-labelledby'?: string; + /** Defines the hierarchical level of an element within a structure. */ + 'aria-level'?: number; + /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, + * and user can expect from the live region. */ + 'aria-live'?: 'off' | 'assertive' | 'polite'; + /** Indicates whether an element is modal when displayed. */ + 'aria-modal'?: boolean; + /** Indicates whether a text box accepts multiple lines of input or only a single line. */ + 'aria-multiline'?: boolean; + /** Indicates that the user may select more than one item from the current selectable descendants. */ + 'aria-multiselectable'?: boolean; + /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */ + 'aria-orientation'?: 'undefined' | 'horizontal' | 'vertical'; + /** Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship + * between DOM + * elements where the DOM hierarchy cannot be used to represent the relationship. + * @see aria-controls. */ + 'aria-owns'?: string; + /** Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. + * A hint could be a sample value or a brief description of the expected format. */ + 'aria-placeholder'?: string; + /** Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in + * the set are present in the DOM. + * @see aria-setsize. */ + 'aria-posinset'?: number; + /** Indicates the current "pressed" state of toggle buttons. + * @see aria-checked @see aria-selected. */ + 'aria-pressed'?: boolean | 'undefined' | 'false' | 'mixed' | 'true'; + /** Indicates that the element is not editable, but is otherwise operable. + * @see aria-disabled. */ + 'aria-readonly'?: boolean; + /** Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. + * @see aria-atomic. */ + 'aria-relevant'?: 'additions' | 'additions text' | 'all' | 'removals' | 'text'; + /** Indicates that user input is required on the element before a form may be submitted. */ + 'aria-required'?: boolean; + /** Defines a human-readable, author-localized description for the role of an element. */ + 'aria-roledescription'?: string; + /** Defines the total number of rows in a table, grid, or treegrid. + * @see aria-rowindex. */ + 'aria-rowcount'?: number; + /** Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. + * @see aria-rowcount @see aria-rowspan. */ + 'aria-rowindex'?: number; + /** Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. + * @see aria-rowindex @see aria-colspan. */ + 'aria-rowspan'?: number; + /** Indicates the current "selected" state of various widgets. + * @see aria-checked @see aria-pressed. */ + 'aria-selected'?: boolean | 'undefined' | 'false' | 'true'; + /** Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are + * present in the DOM. + * @see aria-posinset. */ + 'aria-setsize'?: number; + /** Indicates if items in a table or grid are sorted in ascending or descending order. */ + 'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other'; + /** Defines the maximum allowed value for a range widget. */ + 'aria-valuemax'?: number; + /** Defines the minimum allowed value for a range widget. */ + 'aria-valuemin'?: number; + /** Defines the current value for a range widget. + * @see aria-valuetext. */ + 'aria-valuenow'?: number; + /** Defines the human readable text alternative of aria-valuenow for a range widget. */ + 'aria-valuetext'?: string; + } + interface AllHTMLAttributes extends HTMLAttributes { // Standard HTML Attributes accept?: string; diff --git a/types/react/v15/index.d.ts b/types/react/v15/index.d.ts index 12b25439aa..72a14d9abb 100644 --- a/types/react/v15/index.d.ts +++ b/types/react/v15/index.d.ts @@ -2428,6 +2428,142 @@ declare namespace React { unselectable?: boolean; } + // All the WAI-ARIA 1.1 attributes + // https://www.w3.org/TR/wai-aria-1.1/ + interface HTMLAttributes extends DOMAttributes { + /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */ + 'aria-activedescendant'?: string; + /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change + * notifications defined by the aria-relevant attribute. */ + 'aria-atomic'?: boolean; + /** Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for + * an input and specifies how predictions would be presented if they are made. */ + 'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both'; + /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are + * complete before exposing them to the user. */ + 'aria-busy'?: boolean; + /** Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. + * @see aria-pressed @see aria-selected. */ + 'aria-checked'?: boolean | 'false' | 'mixed' | 'true'; + /** Defines the total number of columns in a table, grid, or treegrid. + * @see aria-colindex. */ + 'aria-colcount'?: number; + /** Defines an element's column index or position with respect to the total number of columns within a table, grid, or + * treegrid. + * @see aria-colcount @see aria-colspan. */ + 'aria-colindex'?: number; + /** Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. + * @see aria-colindex @see aria-rowspan. */ + 'aria-colspan'?: number; + /** Indicates the element that represents the current item within a container or set of related elements. */ + 'aria-current'?: boolean | 'false' | 'true' | 'page' | 'step' | 'location' | 'date' | 'time'; + /** Identifies the element (or elements) that describes the object. + * @see aria-labelledby */ + 'aria-describedby'?: string; + /** Identifies the element that provides a detailed, extended description for the object. + * @see aria-describedby. */ + 'aria-details'?: string; + /** Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. + * @see aria-hidden @see aria-readonly. */ + 'aria-disabled'?: boolean; + /** Indicates what functions can be performed when a dragged object is released on the drop target. + * @deprecated in ARIA 1.1 */ + 'aria-dropeffect'?: 'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup'; + /** Identifies the element that provides an error message for the object. + * @see aria-invalid @see aria-describedby. */ + 'aria-errormessage'?: string; + /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */ + 'aria-expanded'?: boolean; + /** Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, + * allows assistive technology to override the general default of reading in document source order. */ + 'aria-flowto'?: string; + /** Indicates an element's "grabbed" state in a drag-and-drop operation. + * @deprecated in ARIA 1.1 */ + 'aria-grabbed'?: boolean; + /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an + * element. */ + 'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'; + /** Indicates whether the element is exposed to an accessibility API. + * @see aria-disabled. */ + 'aria-hidden'?: boolean; + /** Indicates the entered value does not conform to the format expected by the application. + * @see aria-errormessage. */ + 'aria-invalid'?: boolean | 'false' | 'true' | 'grammar' | 'spelling'; + /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */ + 'aria-keyshortcuts'?: string; + /** Defines a string value that labels the current element. + * @see aria-labelledby. */ + 'aria-label'?: string; + /** Identifies the element (or elements) that labels the current element. + * @see aria-describedby. */ + 'aria-labelledby'?: string; + /** Defines the hierarchical level of an element within a structure. */ + 'aria-level'?: number; + /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, + * and user can expect from the live region. */ + 'aria-live'?: 'off' | 'assertive' | 'polite'; + /** Indicates whether an element is modal when displayed. */ + 'aria-modal'?: boolean; + /** Indicates whether a text box accepts multiple lines of input or only a single line. */ + 'aria-multiline'?: boolean; + /** Indicates that the user may select more than one item from the current selectable descendants. */ + 'aria-multiselectable'?: boolean; + /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */ + 'aria-orientation'?: 'undefined' | 'horizontal' | 'vertical'; + /** Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship + * between DOM + * elements where the DOM hierarchy cannot be used to represent the relationship. + * @see aria-controls. */ + 'aria-owns'?: string; + /** Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. + * A hint could be a sample value or a brief description of the expected format. */ + 'aria-placeholder'?: string; + /** Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in + * the set are present in the DOM. + * @see aria-setsize. */ + 'aria-posinset'?: number; + /** Indicates the current "pressed" state of toggle buttons. + * @see aria-checked @see aria-selected. */ + 'aria-pressed'?: boolean | 'undefined' | 'false' | 'mixed' | 'true'; + /** Indicates that the element is not editable, but is otherwise operable. + * @see aria-disabled. */ + 'aria-readonly'?: boolean; + /** Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. + * @see aria-atomic. */ + 'aria-relevant'?: 'additions' | 'additions text' | 'all' | 'removals' | 'text'; + /** Indicates that user input is required on the element before a form may be submitted. */ + 'aria-required'?: boolean; + /** Defines a human-readable, author-localized description for the role of an element. */ + 'aria-roledescription'?: string; + /** Defines the total number of rows in a table, grid, or treegrid. + * @see aria-rowindex. */ + 'aria-rowcount'?: number; + /** Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. + * @see aria-rowcount @see aria-rowspan. */ + 'aria-rowindex'?: number; + /** Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. + * @see aria-rowindex @see aria-colspan. */ + 'aria-rowspan'?: number; + /** Indicates the current "selected" state of various widgets. + * @see aria-checked @see aria-pressed. */ + 'aria-selected'?: boolean | 'undefined' | 'false' | 'true'; + /** Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are + * present in the DOM. + * @see aria-posinset. */ + 'aria-setsize'?: number; + /** Indicates if items in a table or grid are sorted in ascending or descending order. */ + 'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other'; + /** Defines the maximum allowed value for a range widget. */ + 'aria-valuemax'?: number; + /** Defines the minimum allowed value for a range widget. */ + 'aria-valuemin'?: number; + /** Defines the current value for a range widget. + * @see aria-valuetext. */ + 'aria-valuenow'?: number; + /** Defines the human readable text alternative of aria-valuenow for a range widget. */ + 'aria-valuetext'?: string; + } + interface AllHTMLAttributes extends HTMLAttributes { // Standard HTML Attributes accept?: string; From 8ffe91a4d8eb3f647c6548a7c91ed0f180f37225 Mon Sep 17 00:00:00 2001 From: Craig Kovatch Date: Fri, 29 Dec 2017 18:05:53 -0800 Subject: [PATCH 0007/1327] Fix linting errors --- types/react/index.d.ts | 191 +++++++++++++--------- types/react/v15/index.d.ts | 313 +++++++++++++++++++++---------------- 2 files changed, 299 insertions(+), 205 deletions(-) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index a4784caa41..e3c3f53bb8 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -2498,79 +2498,105 @@ declare namespace React { unselectable?: boolean; } - // All the WAI-ARIA 1.1 attributes - // https://www.w3.org/TR/wai-aria-1.1/ + // All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/ interface HTMLAttributes extends DOMAttributes { - /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */ + /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */ 'aria-activedescendant'?: string; - /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change - * notifications defined by the aria-relevant attribute. */ + /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */ 'aria-atomic'?: boolean; - /** Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for - * an input and specifies how predictions would be presented if they are made. */ + /** + * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be + * presented if they are made. + */ 'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both'; - /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are - * complete before exposing them to the user. */ + /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */ 'aria-busy'?: boolean; - /** Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. - * @see aria-pressed @see aria-selected. */ + /** + * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. + * @see aria-pressed @see aria-selected. + */ 'aria-checked'?: boolean | 'false' | 'mixed' | 'true'; - /** Defines the total number of columns in a table, grid, or treegrid. - * @see aria-colindex. */ + /** + * Defines the total number of columns in a table, grid, or treegrid. + * @see aria-colindex. + */ 'aria-colcount'?: number; - /** Defines an element's column index or position with respect to the total number of columns within a table, grid, or - * treegrid. - * @see aria-colcount @see aria-colspan. */ + /** + * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. + * @see aria-colcount @see aria-colspan. + */ 'aria-colindex'?: number; - /** Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. - * @see aria-colindex @see aria-rowspan. */ + /** + * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. + * @see aria-colindex @see aria-rowspan. + */ 'aria-colspan'?: number; /** Indicates the element that represents the current item within a container or set of related elements. */ 'aria-current'?: boolean | 'false' | 'true' | 'page' | 'step' | 'location' | 'date' | 'time'; - /** Identifies the element (or elements) that describes the object. - * @see aria-labelledby */ + /** + * Identifies the element (or elements) that describes the object. + * @see aria-labelledby + */ 'aria-describedby'?: string; - /** Identifies the element that provides a detailed, extended description for the object. - * @see aria-describedby. */ + /** + * Identifies the element that provides a detailed, extended description for the object. + * @see aria-describedby. + */ 'aria-details'?: string; - /** Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. - * @see aria-hidden @see aria-readonly. */ + /** + * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. + * @see aria-hidden @see aria-readonly. + */ 'aria-disabled'?: boolean; - /** Indicates what functions can be performed when a dragged object is released on the drop target. - * @deprecated in ARIA 1.1 */ + /** + * Indicates what functions can be performed when a dragged object is released on the drop target. + * @deprecated in ARIA 1.1 + */ 'aria-dropeffect'?: 'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup'; - /** Identifies the element that provides an error message for the object. - * @see aria-invalid @see aria-describedby. */ + /** + * Identifies the element that provides an error message for the object. + * @see aria-invalid @see aria-describedby. + */ 'aria-errormessage'?: string; /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */ 'aria-expanded'?: boolean; - /** Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, - * allows assistive technology to override the general default of reading in document source order. */ + /** + * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, + * allows assistive technology to override the general default of reading in document source order. + */ 'aria-flowto'?: string; - /** Indicates an element's "grabbed" state in a drag-and-drop operation. - * @deprecated in ARIA 1.1 */ + /** + * Indicates an element's "grabbed" state in a drag-and-drop operation. + * @deprecated in ARIA 1.1 + */ 'aria-grabbed'?: boolean; - /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an - * element. */ + /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */ 'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'; - /** Indicates whether the element is exposed to an accessibility API. - * @see aria-disabled. */ + /** + * Indicates whether the element is exposed to an accessibility API. + * @see aria-disabled. + */ 'aria-hidden'?: boolean; - /** Indicates the entered value does not conform to the format expected by the application. - * @see aria-errormessage. */ + /** + * Indicates the entered value does not conform to the format expected by the application. + * @see aria-errormessage. + */ 'aria-invalid'?: boolean | 'false' | 'true' | 'grammar' | 'spelling'; /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */ 'aria-keyshortcuts'?: string; - /** Defines a string value that labels the current element. - * @see aria-labelledby. */ + /** + * Defines a string value that labels the current element. + * @see aria-labelledby. + */ 'aria-label'?: string; - /** Identifies the element (or elements) that labels the current element. - * @see aria-describedby. */ + /** + * Identifies the element (or elements) that labels the current element. + * @see aria-describedby. + */ 'aria-labelledby'?: string; /** Defines the hierarchical level of an element within a structure. */ 'aria-level'?: number; - /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, - * and user can expect from the live region. */ + /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */ 'aria-live'?: 'off' | 'assertive' | 'polite'; /** Indicates whether an element is modal when displayed. */ 'aria-modal'?: boolean; @@ -2580,46 +2606,65 @@ declare namespace React { 'aria-multiselectable'?: boolean; /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */ 'aria-orientation'?: 'undefined' | 'horizontal' | 'vertical'; - /** Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship - * between DOM - * elements where the DOM hierarchy cannot be used to represent the relationship. - * @see aria-controls. */ + /** + * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship + * between DOM elements where the DOM hierarchy cannot be used to represent the relationship. + * @see aria-controls. + */ 'aria-owns'?: string; - /** Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. - * A hint could be a sample value or a brief description of the expected format. */ + /** + * Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. + * A hint could be a sample value or a brief description of the expected format. + */ 'aria-placeholder'?: string; - /** Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in - * the set are present in the DOM. - * @see aria-setsize. */ + /** + * Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. + * @see aria-setsize. + */ 'aria-posinset'?: number; - /** Indicates the current "pressed" state of toggle buttons. - * @see aria-checked @see aria-selected. */ + /** + * Indicates the current "pressed" state of toggle buttons. + * @see aria-checked @see aria-selected. + */ 'aria-pressed'?: boolean | 'undefined' | 'false' | 'mixed' | 'true'; - /** Indicates that the element is not editable, but is otherwise operable. - * @see aria-disabled. */ + /** + * Indicates that the element is not editable, but is otherwise operable. + * @see aria-disabled. + */ 'aria-readonly'?: boolean; - /** Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. - * @see aria-atomic. */ + /** + * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. + * @see aria-atomic. + */ 'aria-relevant'?: 'additions' | 'additions text' | 'all' | 'removals' | 'text'; /** Indicates that user input is required on the element before a form may be submitted. */ 'aria-required'?: boolean; /** Defines a human-readable, author-localized description for the role of an element. */ 'aria-roledescription'?: string; - /** Defines the total number of rows in a table, grid, or treegrid. - * @see aria-rowindex. */ + /** + * Defines the total number of rows in a table, grid, or treegrid. + * @see aria-rowindex. + */ 'aria-rowcount'?: number; - /** Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. - * @see aria-rowcount @see aria-rowspan. */ + /** + * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. + * @see aria-rowcount @see aria-rowspan. + */ 'aria-rowindex'?: number; - /** Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. - * @see aria-rowindex @see aria-colspan. */ + /** + * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. + * @see aria-rowindex @see aria-colspan. + */ 'aria-rowspan'?: number; - /** Indicates the current "selected" state of various widgets. - * @see aria-checked @see aria-pressed. */ + /** + * Indicates the current "selected" state of various widgets. + * @see aria-checked @see aria-pressed. + */ 'aria-selected'?: boolean | 'undefined' | 'false' | 'true'; - /** Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are - * present in the DOM. - * @see aria-posinset. */ + /** + * Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. + * @see aria-posinset. + */ 'aria-setsize'?: number; /** Indicates if items in a table or grid are sorted in ascending or descending order. */ 'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other'; @@ -2627,8 +2672,10 @@ declare namespace React { 'aria-valuemax'?: number; /** Defines the minimum allowed value for a range widget. */ 'aria-valuemin'?: number; - /** Defines the current value for a range widget. - * @see aria-valuetext. */ + /** + * Defines the current value for a range widget. + * @see aria-valuetext. + */ 'aria-valuenow'?: number; /** Defines the human readable text alternative of aria-valuenow for a range widget. */ 'aria-valuetext'?: string; diff --git a/types/react/v15/index.d.ts b/types/react/v15/index.d.ts index 72a14d9abb..5169c8d2e8 100644 --- a/types/react/v15/index.d.ts +++ b/types/react/v15/index.d.ts @@ -2428,141 +2428,188 @@ declare namespace React { unselectable?: boolean; } - // All the WAI-ARIA 1.1 attributes - // https://www.w3.org/TR/wai-aria-1.1/ + // All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/ interface HTMLAttributes extends DOMAttributes { /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */ - 'aria-activedescendant'?: string; - /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change - * notifications defined by the aria-relevant attribute. */ - 'aria-atomic'?: boolean; - /** Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for - * an input and specifies how predictions would be presented if they are made. */ - 'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both'; - /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are - * complete before exposing them to the user. */ - 'aria-busy'?: boolean; - /** Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. - * @see aria-pressed @see aria-selected. */ - 'aria-checked'?: boolean | 'false' | 'mixed' | 'true'; - /** Defines the total number of columns in a table, grid, or treegrid. - * @see aria-colindex. */ - 'aria-colcount'?: number; - /** Defines an element's column index or position with respect to the total number of columns within a table, grid, or - * treegrid. - * @see aria-colcount @see aria-colspan. */ - 'aria-colindex'?: number; - /** Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. - * @see aria-colindex @see aria-rowspan. */ - 'aria-colspan'?: number; - /** Indicates the element that represents the current item within a container or set of related elements. */ - 'aria-current'?: boolean | 'false' | 'true' | 'page' | 'step' | 'location' | 'date' | 'time'; - /** Identifies the element (or elements) that describes the object. - * @see aria-labelledby */ - 'aria-describedby'?: string; - /** Identifies the element that provides a detailed, extended description for the object. - * @see aria-describedby. */ - 'aria-details'?: string; - /** Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. - * @see aria-hidden @see aria-readonly. */ - 'aria-disabled'?: boolean; - /** Indicates what functions can be performed when a dragged object is released on the drop target. - * @deprecated in ARIA 1.1 */ - 'aria-dropeffect'?: 'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup'; - /** Identifies the element that provides an error message for the object. - * @see aria-invalid @see aria-describedby. */ - 'aria-errormessage'?: string; - /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */ - 'aria-expanded'?: boolean; - /** Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, - * allows assistive technology to override the general default of reading in document source order. */ - 'aria-flowto'?: string; - /** Indicates an element's "grabbed" state in a drag-and-drop operation. - * @deprecated in ARIA 1.1 */ - 'aria-grabbed'?: boolean; - /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an - * element. */ - 'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'; - /** Indicates whether the element is exposed to an accessibility API. - * @see aria-disabled. */ - 'aria-hidden'?: boolean; - /** Indicates the entered value does not conform to the format expected by the application. - * @see aria-errormessage. */ - 'aria-invalid'?: boolean | 'false' | 'true' | 'grammar' | 'spelling'; - /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */ - 'aria-keyshortcuts'?: string; - /** Defines a string value that labels the current element. - * @see aria-labelledby. */ - 'aria-label'?: string; - /** Identifies the element (or elements) that labels the current element. - * @see aria-describedby. */ - 'aria-labelledby'?: string; - /** Defines the hierarchical level of an element within a structure. */ - 'aria-level'?: number; - /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, - * and user can expect from the live region. */ - 'aria-live'?: 'off' | 'assertive' | 'polite'; - /** Indicates whether an element is modal when displayed. */ - 'aria-modal'?: boolean; - /** Indicates whether a text box accepts multiple lines of input or only a single line. */ - 'aria-multiline'?: boolean; - /** Indicates that the user may select more than one item from the current selectable descendants. */ - 'aria-multiselectable'?: boolean; - /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */ - 'aria-orientation'?: 'undefined' | 'horizontal' | 'vertical'; - /** Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship - * between DOM - * elements where the DOM hierarchy cannot be used to represent the relationship. - * @see aria-controls. */ - 'aria-owns'?: string; - /** Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. - * A hint could be a sample value or a brief description of the expected format. */ - 'aria-placeholder'?: string; - /** Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in - * the set are present in the DOM. - * @see aria-setsize. */ - 'aria-posinset'?: number; - /** Indicates the current "pressed" state of toggle buttons. - * @see aria-checked @see aria-selected. */ - 'aria-pressed'?: boolean | 'undefined' | 'false' | 'mixed' | 'true'; - /** Indicates that the element is not editable, but is otherwise operable. - * @see aria-disabled. */ - 'aria-readonly'?: boolean; - /** Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. - * @see aria-atomic. */ - 'aria-relevant'?: 'additions' | 'additions text' | 'all' | 'removals' | 'text'; - /** Indicates that user input is required on the element before a form may be submitted. */ - 'aria-required'?: boolean; - /** Defines a human-readable, author-localized description for the role of an element. */ - 'aria-roledescription'?: string; - /** Defines the total number of rows in a table, grid, or treegrid. - * @see aria-rowindex. */ - 'aria-rowcount'?: number; - /** Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. - * @see aria-rowcount @see aria-rowspan. */ - 'aria-rowindex'?: number; - /** Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. - * @see aria-rowindex @see aria-colspan. */ - 'aria-rowspan'?: number; - /** Indicates the current "selected" state of various widgets. - * @see aria-checked @see aria-pressed. */ - 'aria-selected'?: boolean | 'undefined' | 'false' | 'true'; - /** Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are - * present in the DOM. - * @see aria-posinset. */ - 'aria-setsize'?: number; - /** Indicates if items in a table or grid are sorted in ascending or descending order. */ - 'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other'; - /** Defines the maximum allowed value for a range widget. */ - 'aria-valuemax'?: number; - /** Defines the minimum allowed value for a range widget. */ - 'aria-valuemin'?: number; - /** Defines the current value for a range widget. - * @see aria-valuetext. */ - 'aria-valuenow'?: number; - /** Defines the human readable text alternative of aria-valuenow for a range widget. */ - 'aria-valuetext'?: string; - } + 'aria-activedescendant'?: string; + /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */ + 'aria-atomic'?: boolean; + /** + * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be + * presented if they are made. + */ + 'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both'; + /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */ + 'aria-busy'?: boolean; + /** + * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. + * @see aria-pressed @see aria-selected. + */ + 'aria-checked'?: boolean | 'false' | 'mixed' | 'true'; + /** + * Defines the total number of columns in a table, grid, or treegrid. + * @see aria-colindex. + */ + 'aria-colcount'?: number; + /** + * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. + * @see aria-colcount @see aria-colspan. + */ + 'aria-colindex'?: number; + /** + * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. + * @see aria-colindex @see aria-rowspan. + */ + 'aria-colspan'?: number; + /** Indicates the element that represents the current item within a container or set of related elements. */ + 'aria-current'?: boolean | 'false' | 'true' | 'page' | 'step' | 'location' | 'date' | 'time'; + /** + * Identifies the element (or elements) that describes the object. + * @see aria-labelledby + */ + 'aria-describedby'?: string; + /** + * Identifies the element that provides a detailed, extended description for the object. + * @see aria-describedby. + */ + 'aria-details'?: string; + /** + * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. + * @see aria-hidden @see aria-readonly. + */ + 'aria-disabled'?: boolean; + /** + * Indicates what functions can be performed when a dragged object is released on the drop target. + * @deprecated in ARIA 1.1 + */ + 'aria-dropeffect'?: 'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup'; + /** + * Identifies the element that provides an error message for the object. + * @see aria-invalid @see aria-describedby. + */ + 'aria-errormessage'?: string; + /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */ + 'aria-expanded'?: boolean; + /** + * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, + * allows assistive technology to override the general default of reading in document source order. + */ + 'aria-flowto'?: string; + /** + * Indicates an element's "grabbed" state in a drag-and-drop operation. + * @deprecated in ARIA 1.1 + */ + 'aria-grabbed'?: boolean; + /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */ + 'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'; + /** + * Indicates whether the element is exposed to an accessibility API. + * @see aria-disabled. + */ + 'aria-hidden'?: boolean; + /** + * Indicates the entered value does not conform to the format expected by the application. + * @see aria-errormessage. + */ + 'aria-invalid'?: boolean | 'false' | 'true' | 'grammar' | 'spelling'; + /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */ + 'aria-keyshortcuts'?: string; + /** + * Defines a string value that labels the current element. + * @see aria-labelledby. + */ + 'aria-label'?: string; + /** + * Identifies the element (or elements) that labels the current element. + * @see aria-describedby. + */ + 'aria-labelledby'?: string; + /** Defines the hierarchical level of an element within a structure. */ + 'aria-level'?: number; + /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */ + 'aria-live'?: 'off' | 'assertive' | 'polite'; + /** Indicates whether an element is modal when displayed. */ + 'aria-modal'?: boolean; + /** Indicates whether a text box accepts multiple lines of input or only a single line. */ + 'aria-multiline'?: boolean; + /** Indicates that the user may select more than one item from the current selectable descendants. */ + 'aria-multiselectable'?: boolean; + /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */ + 'aria-orientation'?: 'undefined' | 'horizontal' | 'vertical'; + /** + * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship + * between DOM elements where the DOM hierarchy cannot be used to represent the relationship. + * @see aria-controls. + */ + 'aria-owns'?: string; + /** + * Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. + * A hint could be a sample value or a brief description of the expected format. + */ + 'aria-placeholder'?: string; + /** + * Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. + * @see aria-setsize. + */ + 'aria-posinset'?: number; + /** + * Indicates the current "pressed" state of toggle buttons. + * @see aria-checked @see aria-selected. + */ + 'aria-pressed'?: boolean | 'undefined' | 'false' | 'mixed' | 'true'; + /** + * Indicates that the element is not editable, but is otherwise operable. + * @see aria-disabled. + */ + 'aria-readonly'?: boolean; + /** + * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. + * @see aria-atomic. + */ + 'aria-relevant'?: 'additions' | 'additions text' | 'all' | 'removals' | 'text'; + /** Indicates that user input is required on the element before a form may be submitted. */ + 'aria-required'?: boolean; + /** Defines a human-readable, author-localized description for the role of an element. */ + 'aria-roledescription'?: string; + /** + * Defines the total number of rows in a table, grid, or treegrid. + * @see aria-rowindex. + */ + 'aria-rowcount'?: number; + /** + * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. + * @see aria-rowcount @see aria-rowspan. + */ + 'aria-rowindex'?: number; + /** + * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. + * @see aria-rowindex @see aria-colspan. + */ + 'aria-rowspan'?: number; + /** + * Indicates the current "selected" state of various widgets. + * @see aria-checked @see aria-pressed. + */ + 'aria-selected'?: boolean | 'undefined' | 'false' | 'true'; + /** + * Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. + * @see aria-posinset. + */ + 'aria-setsize'?: number; + /** Indicates if items in a table or grid are sorted in ascending or descending order. */ + 'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other'; + /** Defines the maximum allowed value for a range widget. */ + 'aria-valuemax'?: number; + /** Defines the minimum allowed value for a range widget. */ + 'aria-valuemin'?: number; + /** + * Defines the current value for a range widget. + * @see aria-valuetext. + */ + 'aria-valuenow'?: number; + /** Defines the human readable text alternative of aria-valuenow for a range widget. */ + 'aria-valuetext'?: string; + } interface AllHTMLAttributes extends HTMLAttributes { // Standard HTML Attributes From eebfcef80eec96a3c823b0e73e32f297050241bf Mon Sep 17 00:00:00 2001 From: Craig Kovatch Date: Thu, 4 Jan 2018 14:23:28 -0800 Subject: [PATCH 0008/1327] Add 'true' and 'false' options to boolean attributes, remove incorrect 'undefined' options --- types/react/index.d.ts | 28 ++++++++++++++-------------- types/react/v15/index.d.ts | 28 ++++++++++++++-------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index e3c3f53bb8..9277ed2986 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -2503,14 +2503,14 @@ declare namespace React { /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */ 'aria-activedescendant'?: string; /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */ - 'aria-atomic'?: boolean; + 'aria-atomic'?: boolean | 'false' | 'true'; /** * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be * presented if they are made. */ 'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both'; /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */ - 'aria-busy'?: boolean; + 'aria-busy'?: boolean | 'false' | 'true'; /** * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. * @see aria-pressed @see aria-selected. @@ -2547,7 +2547,7 @@ declare namespace React { * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. * @see aria-hidden @see aria-readonly. */ - 'aria-disabled'?: boolean; + 'aria-disabled'?: boolean | 'false' | 'true'; /** * Indicates what functions can be performed when a dragged object is released on the drop target. * @deprecated in ARIA 1.1 @@ -2559,7 +2559,7 @@ declare namespace React { */ 'aria-errormessage'?: string; /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */ - 'aria-expanded'?: boolean; + 'aria-expanded'?: boolean | 'false' | 'true'; /** * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, * allows assistive technology to override the general default of reading in document source order. @@ -2569,14 +2569,14 @@ declare namespace React { * Indicates an element's "grabbed" state in a drag-and-drop operation. * @deprecated in ARIA 1.1 */ - 'aria-grabbed'?: boolean; + 'aria-grabbed'?: boolean | 'false' | 'true'; /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */ 'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'; /** * Indicates whether the element is exposed to an accessibility API. * @see aria-disabled. */ - 'aria-hidden'?: boolean; + 'aria-hidden'?: boolean | 'false' | 'true'; /** * Indicates the entered value does not conform to the format expected by the application. * @see aria-errormessage. @@ -2599,13 +2599,13 @@ declare namespace React { /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */ 'aria-live'?: 'off' | 'assertive' | 'polite'; /** Indicates whether an element is modal when displayed. */ - 'aria-modal'?: boolean; + 'aria-modal'?: boolean | 'false' | 'true'; /** Indicates whether a text box accepts multiple lines of input or only a single line. */ - 'aria-multiline'?: boolean; + 'aria-multiline'?: boolean | 'false' | 'true'; /** Indicates that the user may select more than one item from the current selectable descendants. */ - 'aria-multiselectable'?: boolean; + 'aria-multiselectable'?: boolean | 'false' | 'true'; /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */ - 'aria-orientation'?: 'undefined' | 'horizontal' | 'vertical'; + 'aria-orientation'?: 'horizontal' | 'vertical'; /** * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship * between DOM elements where the DOM hierarchy cannot be used to represent the relationship. @@ -2626,19 +2626,19 @@ declare namespace React { * Indicates the current "pressed" state of toggle buttons. * @see aria-checked @see aria-selected. */ - 'aria-pressed'?: boolean | 'undefined' | 'false' | 'mixed' | 'true'; + 'aria-pressed'?: boolean | 'false' | 'mixed' | 'true'; /** * Indicates that the element is not editable, but is otherwise operable. * @see aria-disabled. */ - 'aria-readonly'?: boolean; + 'aria-readonly'?: boolean | 'false' | 'true'; /** * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. * @see aria-atomic. */ 'aria-relevant'?: 'additions' | 'additions text' | 'all' | 'removals' | 'text'; /** Indicates that user input is required on the element before a form may be submitted. */ - 'aria-required'?: boolean; + 'aria-required'?: boolean | 'false' | 'true'; /** Defines a human-readable, author-localized description for the role of an element. */ 'aria-roledescription'?: string; /** @@ -2660,7 +2660,7 @@ declare namespace React { * Indicates the current "selected" state of various widgets. * @see aria-checked @see aria-pressed. */ - 'aria-selected'?: boolean | 'undefined' | 'false' | 'true'; + 'aria-selected'?: boolean | 'false' | 'true'; /** * Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. * @see aria-posinset. diff --git a/types/react/v15/index.d.ts b/types/react/v15/index.d.ts index 5169c8d2e8..797d21f0d8 100644 --- a/types/react/v15/index.d.ts +++ b/types/react/v15/index.d.ts @@ -2433,14 +2433,14 @@ declare namespace React { /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */ 'aria-activedescendant'?: string; /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */ - 'aria-atomic'?: boolean; + 'aria-atomic'?: boolean | 'false' | 'true'; /** * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be * presented if they are made. */ 'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both'; /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */ - 'aria-busy'?: boolean; + 'aria-busy'?: boolean | 'false' | 'true'; /** * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. * @see aria-pressed @see aria-selected. @@ -2477,7 +2477,7 @@ declare namespace React { * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. * @see aria-hidden @see aria-readonly. */ - 'aria-disabled'?: boolean; + 'aria-disabled'?: boolean | 'false' | 'true'; /** * Indicates what functions can be performed when a dragged object is released on the drop target. * @deprecated in ARIA 1.1 @@ -2489,7 +2489,7 @@ declare namespace React { */ 'aria-errormessage'?: string; /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */ - 'aria-expanded'?: boolean; + 'aria-expanded'?: boolean | 'false' | 'true'; /** * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, * allows assistive technology to override the general default of reading in document source order. @@ -2499,14 +2499,14 @@ declare namespace React { * Indicates an element's "grabbed" state in a drag-and-drop operation. * @deprecated in ARIA 1.1 */ - 'aria-grabbed'?: boolean; + 'aria-grabbed'?: boolean | 'false' | 'true'; /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */ 'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'; /** * Indicates whether the element is exposed to an accessibility API. * @see aria-disabled. */ - 'aria-hidden'?: boolean; + 'aria-hidden'?: boolean | 'false' | 'true'; /** * Indicates the entered value does not conform to the format expected by the application. * @see aria-errormessage. @@ -2529,13 +2529,13 @@ declare namespace React { /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */ 'aria-live'?: 'off' | 'assertive' | 'polite'; /** Indicates whether an element is modal when displayed. */ - 'aria-modal'?: boolean; + 'aria-modal'?: boolean | 'false' | 'true'; /** Indicates whether a text box accepts multiple lines of input or only a single line. */ - 'aria-multiline'?: boolean; + 'aria-multiline'?: boolean | 'false' | 'true'; /** Indicates that the user may select more than one item from the current selectable descendants. */ - 'aria-multiselectable'?: boolean; + 'aria-multiselectable'?: boolean | 'false' | 'true'; /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */ - 'aria-orientation'?: 'undefined' | 'horizontal' | 'vertical'; + 'aria-orientation'?: 'horizontal' | 'vertical'; /** * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship * between DOM elements where the DOM hierarchy cannot be used to represent the relationship. @@ -2556,19 +2556,19 @@ declare namespace React { * Indicates the current "pressed" state of toggle buttons. * @see aria-checked @see aria-selected. */ - 'aria-pressed'?: boolean | 'undefined' | 'false' | 'mixed' | 'true'; + 'aria-pressed'?: boolean | 'false' | 'mixed' | 'true'; /** * Indicates that the element is not editable, but is otherwise operable. * @see aria-disabled. */ - 'aria-readonly'?: boolean; + 'aria-readonly'?: boolean | 'false' | 'true'; /** * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. * @see aria-atomic. */ 'aria-relevant'?: 'additions' | 'additions text' | 'all' | 'removals' | 'text'; /** Indicates that user input is required on the element before a form may be submitted. */ - 'aria-required'?: boolean; + 'aria-required'?: boolean | 'false' | 'true'; /** Defines a human-readable, author-localized description for the role of an element. */ 'aria-roledescription'?: string; /** @@ -2590,7 +2590,7 @@ declare namespace React { * Indicates the current "selected" state of various widgets. * @see aria-checked @see aria-pressed. */ - 'aria-selected'?: boolean | 'undefined' | 'false' | 'true'; + 'aria-selected'?: boolean | 'false' | 'true'; /** * Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. * @see aria-posinset. From 0565f573b66721dd76b625ed3696ecc561d8b95d Mon Sep 17 00:00:00 2001 From: Craig Kovatch Date: Sat, 6 Jan 2018 11:11:44 -0800 Subject: [PATCH 0009/1327] Add tests --- types/react/test/index.ts | 6 +++++- types/react/test/tsx.tsx | 11 +++++++++++ types/react/v15/test/index.ts | 6 +++++- types/react/v15/test/tsx.tsx | 11 +++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/types/react/test/index.ts b/types/react/test/index.ts index e8aabfa35c..06a72c2bcb 100644 --- a/types/react/test/index.ts +++ b/types/react/test/index.ts @@ -307,7 +307,11 @@ const htmlAttr: React.HTMLProps = { }, dangerouslySetInnerHTML: { __html: "STRONG" - } + }, + 'aria-atomic': false, + 'aria-checked': 'true', + 'aria-colcount': 7, + 'aria-label': 'test' }; DOM.div(htmlAttr); DOM.span(htmlAttr); diff --git a/types/react/test/tsx.tsx b/types/react/test/tsx.tsx index 38d902c387..26c2ff9d41 100644 --- a/types/react/test/tsx.tsx +++ b/types/react/test/tsx.tsx @@ -41,6 +41,17 @@ StatelessComponent2.defaultProps = { foo ; +// WAI-ARIA 1.1 Attributes +
+ bar +
; + interface Props { hello: string; } diff --git a/types/react/v15/test/index.ts b/types/react/v15/test/index.ts index 340ea94ec2..e4b324916d 100644 --- a/types/react/v15/test/index.ts +++ b/types/react/v15/test/index.ts @@ -346,7 +346,11 @@ const htmlAttr: React.HTMLProps = { }, dangerouslySetInnerHTML: { __html: "STRONG" - } + }, + 'aria-atomic': false, + 'aria-checked': 'true', + 'aria-colcount': 7, + 'aria-label': 'test' }; React.DOM.div(htmlAttr); React.DOM.span(htmlAttr); diff --git a/types/react/v15/test/tsx.tsx b/types/react/v15/test/tsx.tsx index 8afb75d9a8..7f781cb8fc 100644 --- a/types/react/v15/test/tsx.tsx +++ b/types/react/v15/test/tsx.tsx @@ -41,6 +41,17 @@ StatelessComponent2.defaultProps = { foo ; +// WAI-ARIA 1.1 Attributes +
+ bar +
; + interface Props { hello: string; } From b540b2e9e0f95ebb59798bbf4dff5d8c36dd5041 Mon Sep 17 00:00:00 2001 From: Craig Kovatch Date: Sat, 6 Jan 2018 11:13:19 -0800 Subject: [PATCH 0010/1327] Revert incorrect use of $ExpectError --- types/react/test/tsx.tsx | 1 - types/react/v15/test/tsx.tsx | 1 - 2 files changed, 2 deletions(-) diff --git a/types/react/test/tsx.tsx b/types/react/test/tsx.tsx index 26c2ff9d41..bc48add9a4 100644 --- a/types/react/test/tsx.tsx +++ b/types/react/test/tsx.tsx @@ -47,7 +47,6 @@ StatelessComponent2.defaultProps = { aria-checked='true' aria-colcount={7} aria-label='test' - ariaExpanded='false' // $ExpectError > bar ; diff --git a/types/react/v15/test/tsx.tsx b/types/react/v15/test/tsx.tsx index 7f781cb8fc..289a912a3f 100644 --- a/types/react/v15/test/tsx.tsx +++ b/types/react/v15/test/tsx.tsx @@ -47,7 +47,6 @@ StatelessComponent2.defaultProps = { aria-checked='true' aria-colcount={7} aria-label='test' - ariaExpanded='false' // $ExpectError > bar ; From 3cda7bec3b72d0fb0b2d1ca554939856c620c512 Mon Sep 17 00:00:00 2001 From: Jovica Zoric Date: Thu, 11 Jan 2018 15:14:01 +0100 Subject: [PATCH 0011/1327] Add missing placeholderRenderer prop --- types/react-sortable-tree/index.d.ts | 9 +++++++++ .../react-sortable-tree/react-sortable-tree-tests.tsx | 11 ++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/types/react-sortable-tree/index.d.ts b/types/react-sortable-tree/index.d.ts index dfed930e2f..2b9d1d1a6c 100644 --- a/types/react-sortable-tree/index.d.ts +++ b/types/react-sortable-tree/index.d.ts @@ -87,6 +87,14 @@ export interface NodeRendererProps { canDrop?: boolean; } +export type PlaceholderRenderer = React.ComponentClass; + +export interface PlaceholderRendererProps { + isOver: boolean; + canDrop: boolean; + draggedNode: {[index: string]: any}; +} + type NumberArrayOrStringArray = string[] | number[]; export interface ReactSortableTreeProps { @@ -113,6 +121,7 @@ export interface ReactSortableTreeProps { isVirtualized?: boolean; nodeContentRenderer?: NodeRenderer; dndType?: string; + placeholderRenderer?: PlaceholderRenderer; } declare const SortableTree: React.ComponentClass; diff --git a/types/react-sortable-tree/react-sortable-tree-tests.tsx b/types/react-sortable-tree/react-sortable-tree-tests.tsx index 106415744b..154a7284c6 100644 --- a/types/react-sortable-tree/react-sortable-tree-tests.tsx +++ b/types/react-sortable-tree/react-sortable-tree-tests.tsx @@ -11,10 +11,18 @@ import SortableTree, ExtendedNodeData, FullTree, OnVisibilityToggleData, - PreviousAnNextLocation + PreviousAnNextLocation, + PlaceholderRendererProps } from "react-sortable-tree"; import { ListProps, ListRowRenderer } from "react-virtualized"; +class PlaceholderRenderer extends React.Component { + render() { + const backgroundColor = this.props.isOver ? 'green' : 'red'; + return
Custom Placeholder class
; + } +} + class Test extends React.Component { render() { const treeData = [ @@ -55,6 +63,7 @@ class Test extends React.Component { isVirtualized={true} nodeContentRenderer={nodeRenderer} dndType="testNodeType" + placeholderRenderer={PlaceholderRenderer} /> Date: Wed, 17 Jan 2018 16:39:49 +0900 Subject: [PATCH 0012/1327] Adding definition for Database#configure --- types/sqlite3/index.d.ts | 2 ++ types/sqlite3/sqlite3-tests.ts | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/types/sqlite3/index.d.ts b/types/sqlite3/index.d.ts index 921845e5a0..26f69d526d 100644 --- a/types/sqlite3/index.d.ts +++ b/types/sqlite3/index.d.ts @@ -83,6 +83,8 @@ export class Database extends events.EventEmitter { on(event: "error", listener: (err: Error) => void): this; on(event: "open" | "close", listener: () => void): this; on(event: string, listener: (...args: any[]) => void): this; + + configure(option: "busyTimeout", value: number): void; } export function verbose(): void; diff --git a/types/sqlite3/sqlite3-tests.ts b/types/sqlite3/sqlite3-tests.ts index 4ddfa0a502..ee5e4b17d7 100644 --- a/types/sqlite3/sqlite3-tests.ts +++ b/types/sqlite3/sqlite3-tests.ts @@ -5,7 +5,8 @@ let db: sqlite3.Database = new sqlite3.Database('chain.sqlite3', () => {}); function createDb() { console.log("createDb chain"); - db = new sqlite3.Database('chain.sqlite3', createTable); + db = new sqlite3.Database('chain.sqlite3', createTable); + db.configure("busyTimeout", 1000); } function createTable() { From 7ae2eba53391edc454d0f75a2f04ad7db5475434 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sun, 21 Jan 2018 19:29:28 -0800 Subject: [PATCH 0013/1327] Allowed functions in jest's describe As of 22.0.5, jest allows classes for describe blocks. --- types/jest/index.d.ts | 2 +- types/jest/jest-tests.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/types/jest/index.d.ts b/types/jest/index.d.ts index 0ba1762485..669a96fa23 100644 --- a/types/jest/index.d.ts +++ b/types/jest/index.d.ts @@ -220,7 +220,7 @@ declare namespace jest { } interface Describe { - (name: string, fn: EmptyFunction): void; + (name: string | Function, fn: EmptyFunction): void; only: Describe; skip: Describe; } diff --git a/types/jest/jest-tests.ts b/types/jest/jest-tests.ts index 4d8ae05e1c..146c848a72 100644 --- a/types/jest/jest-tests.ts +++ b/types/jest/jest-tests.ts @@ -10,6 +10,10 @@ declare const $: any; // Tests based on the Jest website jest.unmock('../sum'); +class TestClass { } + +describe(TestClass, () => { }); + describe('sum', () => { it('adds 1 + 2 to equal 3', () => { const sum: (a: number, b: number) => number = require('../sum'); From 983acb16764911e46947688579d0e5129c737a11 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sun, 21 Jan 2018 19:33:28 -0800 Subject: [PATCH 0014/1327] Bumped jest version in types to 22.0.5 --- types/jest/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/jest/index.d.ts b/types/jest/index.d.ts index 669a96fa23..218eef8457 100644 --- a/types/jest/index.d.ts +++ b/types/jest/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Jest 22.0 +// Type definitions for Jest 22.0.5 // Project: http://facebook.github.io/jest/ // Definitions by: Asana // Ivo Stratev From 4b3b60fd821a294f33abf5095a4dca0b68b54c4e Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sun, 21 Jan 2018 22:05:01 -0800 Subject: [PATCH 0015/1327] Used a ClassLike interface because of ban-types --- types/jest/index.d.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/types/jest/index.d.ts b/types/jest/index.d.ts index 218eef8457..ba36a036d6 100644 --- a/types/jest/index.d.ts +++ b/types/jest/index.d.ts @@ -199,6 +199,10 @@ declare namespace jest { type Lifecycle = (fn: ProvidesCallback, timeout?: number) => any; + interface IClassLike { + readonly name: string; + } + /** * Creates a test closure */ @@ -220,7 +224,7 @@ declare namespace jest { } interface Describe { - (name: string | Function, fn: EmptyFunction): void; + (name: number | string | IClassLike, fn: EmptyFunction): void; only: Describe; skip: Describe; } From 1621caf0dfdceac25e5ecc5748184c9edcefb079 Mon Sep 17 00:00:00 2001 From: Mathieu Masy Date: Mon, 5 Feb 2018 16:57:56 -0500 Subject: [PATCH 0016/1327] [react-form] Updated typings --- types/react-form/index.d.ts | 9 ++++-- types/react-form/react-form-tests.tsx | 44 +++++++++++++++++++++++++++ types/react-form/tsconfig.json | 2 +- 3 files changed, 52 insertions(+), 3 deletions(-) diff --git a/types/react-form/index.d.ts b/types/react-form/index.d.ts index 965f55e7e7..debc89488c 100644 --- a/types/react-form/index.d.ts +++ b/types/react-form/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for react-form 2.12 +// Type definitions for react-form 2.16 // Project: https://github.com/tannerlinsley/react-form#readme // Definitions by: Cameron McAteer +// Mathieu Masy // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -18,7 +19,7 @@ export interface FormErrors { [key: string]: FormError; } export type NestedErrors = Nested; -export type RenderReturn = JSX.Element | false | null; +export type RenderReturn = JSX.Element | false | null | never[]; export interface FormState { values: FormValues; @@ -29,7 +30,10 @@ export interface FormState { } export interface FormProps { + component?: React.ReactType<{ formApi: FormApi }>; + render?: (formApi: FormApi) => RenderReturn; dontValidateOnMount?: boolean; + validateOnSubmit?: boolean; defaultValues?: FormValues; onSubmit?(values: FormValues, submissionEvent: React.SyntheticEvent, formApi: FormApi): void; preSubmit?(values: FormValues, formApi: FormApi): FormValues; @@ -43,6 +47,7 @@ export interface FormProps { [field: string]: (value: FormValue) => Promise }; dontPreventDefault?: boolean; + getApi?: (formApi: FormApi) => void; } export interface FormApi { diff --git a/types/react-form/react-form-tests.tsx b/types/react-form/react-form-tests.tsx index 2d08cc4b8a..36aa86db94 100644 --- a/types/react-form/react-form-tests.tsx +++ b/types/react-form/react-form-tests.tsx @@ -21,6 +21,50 @@ import { FormApi } from 'react-form'; +// Form Api +class FormApiMethods extends React.Component { + constructor(props: {}) { + super(props); + this.state = {}; + } + + render() { + const FormContent = (props: { formApi?: FormApi }) => ( +
{}}> + + + + ); + + return ( +
+
+ { formApi => ( + + + + + )} + + +
( + + + + + )}> + + +
+ + + +
+
+ ); + } +} + // Basic Form Example const statusOptions = [ { diff --git a/types/react-form/tsconfig.json b/types/react-form/tsconfig.json index cc5dcb26ba..43d05d6dc6 100644 --- a/types/react-form/tsconfig.json +++ b/types/react-form/tsconfig.json @@ -23,4 +23,4 @@ "index.d.ts", "react-form-tests.tsx" ] -} \ No newline at end of file +} From 3eb8d0c31adb111d48011296ae2ddaec327143fa Mon Sep 17 00:00:00 2001 From: Mathieu Masy Date: Wed, 7 Feb 2018 14:20:16 -0500 Subject: [PATCH 0017/1327] [react-form] Added placeholder prop on Select component --- types/react-form/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/react-form/index.d.ts b/types/react-form/index.d.ts index debc89488c..4dc7e4b1b2 100644 --- a/types/react-form/index.d.ts +++ b/types/react-form/index.d.ts @@ -142,6 +142,7 @@ export type SelectOptions = Array<{ export interface SelectProps extends FieldProps, React.SelectHTMLAttributes { options: SelectOptions; + placeholder: string; } export const Select: React.StatelessComponent; From b47fc25da9455080fd29806247a38b8b27fb9cfe Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Wed, 7 Feb 2018 16:36:08 -0800 Subject: [PATCH 0018/1327] Renamed to FunctionLike; allowed Function --- types/jest/index.d.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/types/jest/index.d.ts b/types/jest/index.d.ts index ba36a036d6..2d67c8fa97 100644 --- a/types/jest/index.d.ts +++ b/types/jest/index.d.ts @@ -199,7 +199,7 @@ declare namespace jest { type Lifecycle = (fn: ProvidesCallback, timeout?: number) => any; - interface IClassLike { + interface FunctionLike { readonly name: string; } @@ -224,7 +224,8 @@ declare namespace jest { } interface Describe { - (name: number | string | IClassLike, fn: EmptyFunction): void; + // tslint:disable-next-line ban-types + (name: number | string | Function | FunctionLike, fn: EmptyFunction): void; only: Describe; skip: Describe; } From 4e7c1db217790ca5aacf9851c64663b85aaf3a7f Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Wed, 7 Feb 2018 16:36:59 -0800 Subject: [PATCH 0019/1327] Added my name there too; why not? --- types/jest/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/jest/index.d.ts b/types/jest/index.d.ts index 2d67c8fa97..f58540fbe2 100644 --- a/types/jest/index.d.ts +++ b/types/jest/index.d.ts @@ -10,6 +10,7 @@ // Waseem Dahman // Jamie Mason // Douglas Duteil +// Josh Goldberg // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 From 4c8fb4edcb6567474e00564e0431cbffa8e93b1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B8is=C3=A6ther=20Rasch?= Date: Tue, 13 Feb 2018 22:03:10 +0100 Subject: [PATCH 0020/1327] add new chrome.devtools.inspectedWindow.eval overload Additional Overload accepts the new optional options parameter. fixes https://github.com/DefinitelyTyped/DefinitelyTyped/issues/23597 --- types/chrome/index.d.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/types/chrome/index.d.ts b/types/chrome/index.d.ts index cd12179213..8d3a8a80ab 100644 --- a/types/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -1678,6 +1678,17 @@ declare namespace chrome.devtools.inspectedWindow { * Parameter exceptionInfo: An object providing details if an exception occurred while evaluating the expression. */ export function eval(expression: string, callback?: (result: T, exceptionInfo: EvaluationExceptionInfo) => void): void; + /** + * Evaluates a JavaScript expression in the context of the main frame of the inspected page. The expression must evaluate to a JSON-compliant object, otherwise an exception is thrown. The eval function can report either a DevTools-side error or a JavaScript exception that occurs during evaluation. In either case, the result parameter of the callback is undefined. In the case of a DevTools-side error, the isException parameter is non-null and has isError set to true and code set to an error code. In the case of a JavaScript error, isException is set to true and value is set to the string value of thrown object. + * @param expression An expression to evaluate. + * @param options The options parameter can contain one or more options. + * @param callback A function called when evaluation completes. + * If you specify the callback parameter, it should be a function that looks like this: + * function(object result, object exceptionInfo) {...}; + * Parameter result: The result of evaluation. + * Parameter exceptionInfo: An object providing details if an exception occurred while evaluating the expression. + */ + export function eval(expression: string, options: EvalOptions, callback?: (result: T, exceptionInfo: EvaluationExceptionInfo) => void): void; /** * Retrieves the list of resources from the inspected page. * @param callback A function that receives the list of resources when the request completes. @@ -1690,6 +1701,15 @@ declare namespace chrome.devtools.inspectedWindow { export var onResourceAdded: ResourceAddedEvent; /** Fired when a new revision of the resource is committed (e.g. user saves an edited version of the resource in the Developer Tools). */ export var onResourceContentCommitted: ResourceContentCommittedEvent; + + export interface EvalOptions { + /** If specified, the expression is evaluated on the iframe whose URL matches the one specified. By default, the expression is evaluated in the top frame of the inspected page. */ + frameURL?: string; + /** Evaluate the expression in the context of the content script of the calling extension, provided that the content script is already injected into the inspected page. If not, the expression is not evaluated and the callback is invoked with the exception parameter set to an object that has the isError field set to true and the code field set to E_NOTFOUND. */ + useContentScriptContext?: boolean; + /** Evaluate the expression in the context of a content script of an extension that matches the specified origin. If given, contextSecurityOrigin overrides the 'true' setting on userContentScriptContext. */ + contextSecurityOrigin?: string; + } } //////////////////// From 866f915fbe5d3cfb4e05b2a2f9ed7c3bb0f44c14 Mon Sep 17 00:00:00 2001 From: Andrew Shepherd Date: Wed, 14 Feb 2018 08:14:06 +1000 Subject: [PATCH 0021/1327] TS7006 error on showNativeTouchCallibration Compiling with `noImplicitAny` set to `true` created the following warning: > node_modules/@types/chrome/chrome-app.d.ts(1192,71): error TS7006: Parameter 'success' implicitly has an 'any' type. The method `showNativeTouchCalibration` is documented here: https://developer.chrome.com/apps/system_display#method-showNativeTouchCalibration It describes callback as such: > If you specify the callback parameter, it should be a function that looks like this: > > `function(boolean success) {...};` --- types/chrome/chrome-app.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/chrome/chrome-app.d.ts b/types/chrome/chrome-app.d.ts index 4ecf1d344a..65d80f3290 100644 --- a/types/chrome/chrome-app.d.ts +++ b/types/chrome/chrome-app.d.ts @@ -1189,7 +1189,7 @@ declare namespace chrome.system.display { * @param {string} id The display's unique identifier. * @param {(success) => void} callback Optional callback to inform the caller that the touch calibration has ended. The argument of the callback informs if the calibration was a success or not. */ - export function showNativeTouchCalibration(id: string, callback: (success) => void): void; + export function showNativeTouchCalibration(id: string, callback: (success: boolean) => void): void; /** * @description Starts custom touch calibration for a display. This should be called when using a custom UX for collecting calibration data. If another touch calibration is already in progress this will throw an error. From 722a3b0a0a4e04766cca4487c16b8b386a11ad62 Mon Sep 17 00:00:00 2001 From: Kyle Buzby Date: Wed, 14 Feb 2018 18:30:27 -0600 Subject: [PATCH 0022/1327] add dts-gen files --- types/postman-collection/index.d.ts | 5877 +++++++++++++++++ .../postman-collection-tests.ts | 0 types/postman-collection/tsconfig.json | 22 + types/postman-collection/tslint.json | 1 + 4 files changed, 5900 insertions(+) create mode 100644 types/postman-collection/index.d.ts create mode 100644 types/postman-collection/postman-collection-tests.ts create mode 100644 types/postman-collection/tsconfig.json create mode 100644 types/postman-collection/tslint.json diff --git a/types/postman-collection/index.d.ts b/types/postman-collection/index.d.ts new file mode 100644 index 0000000000..92e39e82d2 --- /dev/null +++ b/types/postman-collection/index.d.ts @@ -0,0 +1,5877 @@ +// Type definitions for postman-collection 3.0 +// Project: https://github.com/postmanlabs/postman-collection#readme +// Definitions by: My Self +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export class Certificate { + constructor(options: any, ...args: any[]); + + canApplyTo(url: any): any; + + toJSON(): any; + + update(options: any): void; + + static isCertificate(obj: any): any; + +} + +export class CertificateList { + constructor(parent: any, list: any); + + resolveOne(url: any): any; + + static isCertificateList(obj: any): any; + +} + +export class Collection { + constructor(definition: any, environments: any); + + syncVariablesFrom(obj: any, track: any): any; + + syncVariablesTo(obj: any): any; + + toJSON(): any; + + static isCollection(obj: any): any; + +} + +export class Cookie { + constructor(options: any); + + update(options: any): void; + + valueOf(): any; + + static isCookie(obj: any): any; + + static parse(str: any): any; + + static splitParam(param: any): any; + +} + +export class Description { + constructor(definition: any); + + toJSON(): any; + + toString(): any; + + update(content: any, type: any): void; + + static isDescription(obj: any): any; + +} + +export class Event { + constructor(definition: any); + + update(definition: any): void; + +} + +export class EventList { + constructor(parent: any, populate: any); + + listeners(name: any): any; + + listenersOwn(name: any): any; + + static isEventList(obj: any): any; + +} + +export class FormParam { + constructor(options: any, ...args: any[]); + + toString(): any; + + valueOf(): any; + + static parse(): void; + +} + +export class Header { + constructor(options: any, name: any, ...args: any[]); + + toString(): any; + + update(options: any): void; + + valueOf(): any; + + static create(...args: any[]): any; + + static isHeader(obj: any): any; + + static parse(headerString: any): any; + + static parseSingle(header: any): any; + + static unparse(headers: any, separator: any): any; + + static unparseSingle(header: any): any; + +} + +export class HeaderList { + constructor(parent: any, headers: any); + + contentSize(): any; + + static isHeaderList(obj: any): any; + +} + +export class Item { + constructor(definition: any, ...args: any[]); + + authorizeRequestUsing(type: any, options: any): any; + + getAuth(): any; + + getEvents(name: any): any; + + static isItem(obj: any): any; + +} + +export class ItemGroup { + constructor(definition: any, ...args: any[]); + + authorizeRequestsUsing(type: any, options: any): void; + + forEachItem(callback: any): any; + + forEachItemGroup(callback: any): void; + + oneDeep(idOrName: any): any; + + static isItemGroup(obj: any): any; + +} + +export class Property { + constructor(definition: any, ...args: any[]); + + describe(content: any, type: any): void; + + toObjectResolved(scope: any, overrides: any, options: any): any; + + static replaceSubstitutions(str: any, variables: any, ...args: any[]): any; + + static replaceSubstitutionsIn(obj: any, variables: any, mutate: any): any; + +} + +export class PropertyBase { + constructor(definition: any); + + findInParents(property: any, customizer: any): any; + + findParentContaining(property: any, customizer: any): any; + + forEachParent(options: any, iterator: any): void; + + meta(...args: any[]): any; + + parent(): any; + + setParent(parent: any): void; + + toJSON(): any; + + static propertyIsMeta(value: any, key: any): any; + + static propertyUnprefixMeta(value: any, key: any): any; + + static toJSON(obj: any): any; + +} + +export class PropertyList { + constructor(type: any, parent: any, populate: any); + + add(item: any, ...args: any[]): void; + + all(): any; + + append(item: any): any; + + assimilate(source: any, prune: any): void; + + clear(): void; + + count(): any; + + each(iterator: any, context: any): void; + + eachParent(iterator: any, context: any): void; + + filter(rule: any, context: any): any; + + find(rule: any, context: any): any; + + get(key: any): any; + + has(item: any, value: any, ...args: any[]): any; + + idx(index: any): any; + + indexOf(item: any): any; + + insert(item: any, before: any): void; + + insertAfter(item: any, after: any): any; + + map(iterator: any, context: any): any; + + one(id: any): any; + + populate(items: any): void; + + prepend(item: any): any; + + remove(predicate: any, context: any, ...args: any[]): any; + + repopulate(items: any): void; + + toJSON(): any; + + toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; + + toString(): any; + + upsert(item: any): any; + + static isPropertyList(obj: any): any; + +} + +export class ProxyConfig { + constructor(options: any); + + getProtocols(): any; + + getProxyUrl(): any; + + test(urlStr: any): any; + + update(options: any): void; + + updateProtocols(protocols: any): void; + + static isProxyConfig(obj: any): any; + +} + +export class ProxyConfigList { + constructor(parent: any, populate: any); + + resolve(url: any): any; + + static isProxyConfigList(obj: any): any; + +} + +export class QueryParam { + constructor(options: any, ...args: any[]); + + toString(): any; + + update(param: any): void; + + valueOf(): any; + + static parse(query: any): any; + + static parseSingle(param: any, idx: any, all: any): any; + + static unparse(params: any, options: any): any; + + static unparseSingle(obj: any, encode: any): any; + +} + +export class Request { + constructor(options: any, ...args: any[]); + + addHeader(header: any): void; + + addQueryParams(params: any): void; + + authorize(): void; + + authorizeUsing(type: any, options: any): void; + + clone(): any; + + forEachHeader(callback: any): any; + + getHeaders(options: any): any; + + removeHeader(toRemove: any, options: any): any; + + removeQueryParams(params: any): void; + + toJSON(): any; + + update(options: any): void; + + upsertHeader(header: any): any; + + static isRequest(obj: any): any; + +} + +export class RequestAuth { + constructor(options: any, parent: any); + + clear(type: any): void; + + current(): any; + + parameters(): any; + + update(options: any, type: any): void; + + use(type: any, options: any): void; + + static isValidType(type: any): any; + +} + +export class RequestBody { + constructor(options: any, ...args: any[]); + + isEmpty(): any; + + toString(): any; + + update(options: any): void; + + static MODES: { + file: string; + formdata: string; + raw: string; + urlencoded: string; + }; + +} + +export class Response { + constructor(options: any, ...args: any[]); + + dataURI(): any; + + details(): any; + + encoding(): any; + + json(reviver: any, strict: any): any; + + mime(contentType: any, contentDisposition: any): any; + + reason(): any; + + size(): any; + + text(): any; + + toJSON(): any; + + update(options: any): void; + + static createFromNode(response: any, cookies: any): any; + + static isResponse(obj: any): any; + + static mimeInfo(type: any, disposition: any): any; + +} + +export class Script { + constructor(options: any, ...args: any[]); + + toSource(): any; + + update(options: any): void; + + static isScript(obj: any): any; + +} + +export class Url { + constructor(options: any, ...args: any[]); + + addQueryParams(params: any): void; + + getHost(): any; + + getOAuth1BaseUrl(): any; + + getPath(options: any): any; + + getPathWithQuery(): any; + + getQueryString(options: any): any; + + getRaw(): any; + + getRemote(options: any): any; + + removeQueryParams(params: any): any; + + toString(forceProtocol: any): any; + + update(url: any): any; + + static isUrl(obj: any): any; + + static parse(url: any): any; + +} + +export class UrlMatchPattern { + constructor(options: any, ...args: any[]); + + createMatchPattern(): any; + + getProtocols(): any; + + globPatternToRegexp(pattern: any): any; + + matchAbsoluteHostPattern(matchRegexObject: any, remote: any): any; + + matchAnyHost(matchRegexObject: any): any; + + matchSuffixHostPattern(matchRegexObject: any, remote: any): any; + + test(urlStr: any): any; + + testHost(host: any): any; + + testPath(path: any): any; + + testProtocol(protocol: any): any; + + toJSON(): any; + + toString(): any; + + update(options: any): void; + + static MATCH_ALL_URLS: string; + + static PROTOCOL_DELIMITER: string; + +} + +export class UrlMatchPatternList { + constructor(parent: any, list: any); + + test(urlStr: any): any; + +} + +export class Variable { + constructor(definition: any, ...args: any[]); + + cast(value: any): any; + + castIn(value: any): any; + + castOut(value: any): any; + + get(): any; + + set(value: any): void; + + toString(): any; + + update(options: any): void; + + valueOf(value: any, ...args: any[]): any; + + valueType(typeName: any, _noCast: any): any; + + static isVariable(obj: any): any; + +} + +export class VariableList { + constructor(parent: any, populate: any); + + replace(str: any, overrides: any): any; + + substitute(obj: any, overrides: any, mutate: any): any; + + syncFromObject(obj: any, track: any, prune: any): any; + + syncToObject(obj: any): any; + + static isVariableList(obj: any): any; + +} + +export class VariableScope { + constructor(definition: any, layers: any); + + addLayer(list: any): void; + + clear(): void; + + get(key: any): any; + + has(variableName: any): any; + + set(key: any, value: any, type: any): any; + + syncVariablesFrom(obj: any, track: any): any; + + syncVariablesTo(obj: any): any; + + toJSON(): any; + + toObject(excludeDisabled: any, caseSensitive: any): any; + + unset(key: any): void; + + variables(): any; + + static isVariableScope(obj: any): any; + +} + +export class Version { + constructor(options: any); + + set(value: any): void; + + toString(): any; + +} + +export function CookieList(parent: any, cookies: any): void; + +export namespace Certificate { + namespace isCertificate { + const prototype: { + }; + + } + + namespace prototype { + function canApplyTo(url: any): any; + + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function update(options: any): void; + + namespace canApplyTo { + const prototype: { + }; + + } + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + } + +} + +export namespace CertificateList { + namespace isCertificateList { + const prototype: { + }; + + } + + namespace prototype { + function add(item: any, ...args: any[]): void; + + function all(): any; + + function append(item: any): any; + + function assimilate(source: any, prune: any): void; + + function clear(): void; + + function count(): any; + + function each(iterator: any, context: any): void; + + function eachParent(iterator: any, context: any): void; + + function filter(rule: any, context: any): any; + + function find(rule: any, context: any): any; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function get(key: any): any; + + function has(item: any, value: any, ...args: any[]): any; + + function idx(index: any): any; + + function indexOf(item: any): any; + + function insert(item: any, before: any): void; + + function insertAfter(item: any, after: any): any; + + function map(iterator: any, context: any): any; + + function meta(...args: any[]): any; + + function one(id: any): any; + + function parent(): any; + + function populate(items: any): void; + + function prepend(item: any): any; + + function remove(predicate: any, context: any, ...args: any[]): any; + + function repopulate(items: any): void; + + function resolveOne(url: any): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; + + function toString(): any; + + function upsert(item: any): any; + + namespace add { + const prototype: { + }; + + } + + namespace all { + const prototype: { + }; + + } + + namespace append { + const prototype: { + }; + + } + + namespace assimilate { + const prototype: { + }; + + } + + namespace clear { + const prototype: { + }; + + } + + namespace count { + const prototype: { + }; + + } + + namespace each { + const prototype: { + }; + + } + + namespace eachParent { + const prototype: { + }; + + } + + namespace filter { + const prototype: { + }; + + } + + namespace find { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace get { + const prototype: { + }; + + } + + namespace has { + const prototype: { + }; + + } + + namespace idx { + const prototype: { + }; + + } + + namespace indexOf { + const prototype: { + }; + + } + + namespace insert { + const prototype: { + }; + + } + + namespace insertAfter { + const prototype: { + }; + + } + + namespace map { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace one { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace populate { + const prototype: { + }; + + } + + namespace prepend { + const prototype: { + }; + + } + + namespace remove { + const prototype: { + }; + + } + + namespace repopulate { + const prototype: { + }; + + } + + namespace resolveOne { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObject { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace upsert { + const prototype: { + }; + + } + + } + +} + +export namespace Collection { + namespace isCollection { + const prototype: { + }; + + } + + namespace prototype { + function authorizeRequestsUsing(type: any, options: any): void; + + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachItem(callback: any): any; + + function forEachItemGroup(callback: any): void; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function oneDeep(idOrName: any): any; + + function parent(): any; + + function setParent(parent: any): void; + + function syncVariablesFrom(obj: any, track: any): any; + + function syncVariablesTo(obj: any): any; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + namespace authorizeRequestsUsing { + const prototype: { + }; + + } + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachItem { + const prototype: { + }; + + } + + namespace forEachItemGroup { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace oneDeep { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace syncVariablesFrom { + const prototype: { + }; + + } + + namespace syncVariablesTo { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + } + +} + +export namespace Cookie { + namespace isCookie { + const prototype: { + }; + + } + + namespace parse { + const prototype: { + }; + + } + + namespace prototype { + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function update(options: any): void; + + function valueOf(): any; + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + namespace valueOf { + const prototype: { + }; + + } + + } + + namespace splitParam { + const prototype: { + }; + + } + +} + +export namespace CookieList { + function isCookieList(obj: any): any; + + namespace isCookieList { + const prototype: { + }; + + } + + namespace prototype { + function add(item: any, ...args: any[]): void; + + function all(): any; + + function append(item: any): any; + + function assimilate(source: any, prune: any): void; + + function clear(): void; + + function count(): any; + + function each(iterator: any, context: any): void; + + function eachParent(iterator: any, context: any): void; + + function filter(rule: any, context: any): any; + + function find(rule: any, context: any): any; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function get(key: any): any; + + function has(item: any, value: any, ...args: any[]): any; + + function idx(index: any): any; + + function indexOf(item: any): any; + + function insert(item: any, before: any): void; + + function insertAfter(item: any, after: any): any; + + function map(iterator: any, context: any): any; + + function meta(...args: any[]): any; + + function one(id: any): any; + + function parent(): any; + + function populate(items: any): void; + + function prepend(item: any): any; + + function remove(predicate: any, context: any, ...args: any[]): any; + + function repopulate(items: any): void; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; + + function toString(): any; + + function upsert(item: any): any; + + namespace add { + const prototype: { + }; + + } + + namespace all { + const prototype: { + }; + + } + + namespace append { + const prototype: { + }; + + } + + namespace assimilate { + const prototype: { + }; + + } + + namespace clear { + const prototype: { + }; + + } + + namespace count { + const prototype: { + }; + + } + + namespace each { + const prototype: { + }; + + } + + namespace eachParent { + const prototype: { + }; + + } + + namespace filter { + const prototype: { + }; + + } + + namespace find { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace get { + const prototype: { + }; + + } + + namespace has { + const prototype: { + }; + + } + + namespace idx { + const prototype: { + }; + + } + + namespace indexOf { + const prototype: { + }; + + } + + namespace insert { + const prototype: { + }; + + } + + namespace insertAfter { + const prototype: { + }; + + } + + namespace map { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace one { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace populate { + const prototype: { + }; + + } + + namespace prepend { + const prototype: { + }; + + } + + namespace remove { + const prototype: { + }; + + } + + namespace repopulate { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObject { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace upsert { + const prototype: { + }; + + } + + } + +} + +export namespace Description { + namespace format { + } + + namespace isDescription { + const prototype: { + }; + + } + + namespace prototype { + function toJSON(): any; + + function toString(): any; + + function update(content: any, type: any): void; + + namespace toJSON { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + } + +} + +export namespace Event { + namespace prototype { + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function update(definition: any): void; + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + } + +} + +export namespace EventList { + namespace isEventList { + const prototype: { + }; + + } + + namespace prototype { + function add(item: any, ...args: any[]): void; + + function all(): any; + + function append(item: any): any; + + function assimilate(source: any, prune: any): void; + + function clear(): void; + + function count(): any; + + function each(iterator: any, context: any): void; + + function eachParent(iterator: any, context: any): void; + + function filter(rule: any, context: any): any; + + function find(rule: any, context: any): any; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function get(key: any): any; + + function has(item: any, value: any, ...args: any[]): any; + + function idx(index: any): any; + + function indexOf(item: any): any; + + function insert(item: any, before: any): void; + + function insertAfter(item: any, after: any): any; + + function listeners(name: any): any; + + function listenersOwn(name: any): any; + + function map(iterator: any, context: any): any; + + function meta(...args: any[]): any; + + function one(id: any): any; + + function parent(): any; + + function populate(items: any): void; + + function prepend(item: any): any; + + function remove(predicate: any, context: any, ...args: any[]): any; + + function repopulate(items: any): void; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; + + function toString(): any; + + function upsert(item: any): any; + + namespace add { + const prototype: { + }; + + } + + namespace all { + const prototype: { + }; + + } + + namespace append { + const prototype: { + }; + + } + + namespace assimilate { + const prototype: { + }; + + } + + namespace clear { + const prototype: { + }; + + } + + namespace count { + const prototype: { + }; + + } + + namespace each { + const prototype: { + }; + + } + + namespace eachParent { + const prototype: { + }; + + } + + namespace filter { + const prototype: { + }; + + } + + namespace find { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace get { + const prototype: { + }; + + } + + namespace has { + const prototype: { + }; + + } + + namespace idx { + const prototype: { + }; + + } + + namespace indexOf { + const prototype: { + }; + + } + + namespace insert { + const prototype: { + }; + + } + + namespace insertAfter { + const prototype: { + }; + + } + + namespace listeners { + const prototype: { + }; + + } + + namespace listenersOwn { + const prototype: { + }; + + } + + namespace map { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace one { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace populate { + const prototype: { + }; + + } + + namespace prepend { + const prototype: { + }; + + } + + namespace remove { + const prototype: { + }; + + } + + namespace repopulate { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObject { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace upsert { + const prototype: { + }; + + } + + } + +} + +export namespace FormParam { + namespace parse { + const prototype: { + }; + + } + + namespace prototype { + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function toString(): any; + + function valueOf(): any; + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace valueOf { + const prototype: { + }; + + } + + } + +} + +export namespace Header { + namespace create { + const prototype: { + }; + + } + + namespace isHeader { + const prototype: { + }; + + } + + namespace parse { + const prototype: { + }; + + } + + namespace parseSingle { + const prototype: { + }; + + } + + namespace prototype { + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function toString(): any; + + function update(options: any): void; + + function valueOf(): any; + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + namespace valueOf { + const prototype: { + }; + + } + + } + + namespace unparse { + const prototype: { + }; + + } + + namespace unparseSingle { + const prototype: { + }; + + } + +} + +export namespace HeaderList { + namespace isHeaderList { + const prototype: { + }; + + } + + namespace prototype { + function add(item: any, ...args: any[]): void; + + function all(): any; + + function append(item: any): any; + + function assimilate(source: any, prune: any): void; + + function clear(): void; + + function contentSize(): any; + + function count(): any; + + function each(iterator: any, context: any): void; + + function eachParent(iterator: any, context: any): void; + + function filter(rule: any, context: any): any; + + function find(rule: any, context: any): any; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function get(key: any): any; + + function has(item: any, value: any, ...args: any[]): any; + + function idx(index: any): any; + + function indexOf(item: any): any; + + function insert(item: any, before: any): void; + + function insertAfter(item: any, after: any): any; + + function map(iterator: any, context: any): any; + + function meta(...args: any[]): any; + + function one(id: any): any; + + function parent(): any; + + function populate(items: any): void; + + function prepend(item: any): any; + + function remove(predicate: any, context: any, ...args: any[]): any; + + function repopulate(items: any): void; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; + + function toString(): any; + + function upsert(item: any): any; + + namespace add { + const prototype: { + }; + + } + + namespace all { + const prototype: { + }; + + } + + namespace append { + const prototype: { + }; + + } + + namespace assimilate { + const prototype: { + }; + + } + + namespace clear { + const prototype: { + }; + + } + + namespace contentSize { + const prototype: { + }; + + } + + namespace count { + const prototype: { + }; + + } + + namespace each { + const prototype: { + }; + + } + + namespace eachParent { + const prototype: { + }; + + } + + namespace filter { + const prototype: { + }; + + } + + namespace find { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace get { + const prototype: { + }; + + } + + namespace has { + const prototype: { + }; + + } + + namespace idx { + const prototype: { + }; + + } + + namespace indexOf { + const prototype: { + }; + + } + + namespace insert { + const prototype: { + }; + + } + + namespace insertAfter { + const prototype: { + }; + + } + + namespace map { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace one { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace populate { + const prototype: { + }; + + } + + namespace prepend { + const prototype: { + }; + + } + + namespace remove { + const prototype: { + }; + + } + + namespace repopulate { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObject { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace upsert { + const prototype: { + }; + + } + + } + +} + +export namespace Item { + namespace isItem { + const prototype: { + }; + + } + + namespace prototype { + function authorizeRequestUsing(type: any, options: any): any; + + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function getAuth(): any; + + function getEvents(name: any): any; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + namespace authorizeRequestUsing { + const prototype: { + }; + + } + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace getAuth { + const prototype: { + }; + + } + + namespace getEvents { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + } + +} + +export namespace ItemGroup { + namespace isItemGroup { + const prototype: { + }; + + } + + namespace prototype { + function authorizeRequestsUsing(type: any, options: any): void; + + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachItem(callback: any): any; + + function forEachItemGroup(callback: any): void; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function oneDeep(idOrName: any): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + namespace authorizeRequestsUsing { + const prototype: { + }; + + } + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachItem { + const prototype: { + }; + + } + + namespace forEachItemGroup { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace oneDeep { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + } + +} + +export namespace Property { + namespace prototype { + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + } + + namespace replaceSubstitutions { + const prototype: { + }; + + } + + namespace replaceSubstitutionsIn { + const prototype: { + }; + + } + +} + +export namespace PropertyBase { + namespace propertyIsMeta { + const prototype: { + }; + + } + + namespace propertyUnprefixMeta { + const prototype: { + }; + + } + + namespace prototype { + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + } + + namespace toJSON { + const prototype: { + }; + + } + +} + +export namespace PropertyList { + namespace isPropertyList { + const prototype: { + }; + + } + + namespace prototype { + function add(item: any, ...args: any[]): void; + + function all(): any; + + function append(item: any): any; + + function assimilate(source: any, prune: any): void; + + function clear(): void; + + function count(): any; + + function each(iterator: any, context: any): void; + + function eachParent(iterator: any, context: any): void; + + function filter(rule: any, context: any): any; + + function find(rule: any, context: any): any; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function get(key: any): any; + + function has(item: any, value: any, ...args: any[]): any; + + function idx(index: any): any; + + function indexOf(item: any): any; + + function insert(item: any, before: any): void; + + function insertAfter(item: any, after: any): any; + + function map(iterator: any, context: any): any; + + function meta(...args: any[]): any; + + function one(id: any): any; + + function parent(): any; + + function populate(items: any): void; + + function prepend(item: any): any; + + function remove(predicate: any, context: any, ...args: any[]): any; + + function repopulate(items: any): void; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; + + function toString(): any; + + function upsert(item: any): any; + + namespace add { + const prototype: { + }; + + } + + namespace all { + const prototype: { + }; + + } + + namespace append { + const prototype: { + }; + + } + + namespace assimilate { + const prototype: { + }; + + } + + namespace clear { + const prototype: { + }; + + } + + namespace count { + const prototype: { + }; + + } + + namespace each { + const prototype: { + }; + + } + + namespace eachParent { + const prototype: { + }; + + } + + namespace filter { + const prototype: { + }; + + } + + namespace find { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace get { + const prototype: { + }; + + } + + namespace has { + const prototype: { + }; + + } + + namespace idx { + const prototype: { + }; + + } + + namespace indexOf { + const prototype: { + }; + + } + + namespace insert { + const prototype: { + }; + + } + + namespace insertAfter { + const prototype: { + }; + + } + + namespace map { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace one { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace populate { + const prototype: { + }; + + } + + namespace prepend { + const prototype: { + }; + + } + + namespace remove { + const prototype: { + }; + + } + + namespace repopulate { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObject { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace upsert { + const prototype: { + }; + + } + + } + +} + +export namespace ProxyConfig { + namespace isProxyConfig { + const prototype: { + }; + + } + + namespace prototype { + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function getProtocols(): any; + + function getProxyUrl(): any; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function test(urlStr: any): any; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function update(options: any): void; + + function updateProtocols(protocols: any): void; + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace getProtocols { + const prototype: { + }; + + } + + namespace getProxyUrl { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace test { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + namespace updateProtocols { + const prototype: { + }; + + } + + } + +} + +export namespace ProxyConfigList { + namespace isProxyConfigList { + const prototype: { + }; + + } + + namespace prototype { + function add(item: any, ...args: any[]): void; + + function all(): any; + + function append(item: any): any; + + function assimilate(source: any, prune: any): void; + + function clear(): void; + + function count(): any; + + function each(iterator: any, context: any): void; + + function eachParent(iterator: any, context: any): void; + + function filter(rule: any, context: any): any; + + function find(rule: any, context: any): any; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function get(key: any): any; + + function has(item: any, value: any, ...args: any[]): any; + + function idx(index: any): any; + + function indexOf(item: any): any; + + function insert(item: any, before: any): void; + + function insertAfter(item: any, after: any): any; + + function map(iterator: any, context: any): any; + + function meta(...args: any[]): any; + + function one(id: any): any; + + function parent(): any; + + function populate(items: any): void; + + function prepend(item: any): any; + + function remove(predicate: any, context: any, ...args: any[]): any; + + function repopulate(items: any): void; + + function resolve(url: any): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; + + function toString(): any; + + function upsert(item: any): any; + + namespace add { + const prototype: { + }; + + } + + namespace all { + const prototype: { + }; + + } + + namespace append { + const prototype: { + }; + + } + + namespace assimilate { + const prototype: { + }; + + } + + namespace clear { + const prototype: { + }; + + } + + namespace count { + const prototype: { + }; + + } + + namespace each { + const prototype: { + }; + + } + + namespace eachParent { + const prototype: { + }; + + } + + namespace filter { + const prototype: { + }; + + } + + namespace find { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace get { + const prototype: { + }; + + } + + namespace has { + const prototype: { + }; + + } + + namespace idx { + const prototype: { + }; + + } + + namespace indexOf { + const prototype: { + }; + + } + + namespace insert { + const prototype: { + }; + + } + + namespace insertAfter { + const prototype: { + }; + + } + + namespace map { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace one { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace populate { + const prototype: { + }; + + } + + namespace prepend { + const prototype: { + }; + + } + + namespace remove { + const prototype: { + }; + + } + + namespace repopulate { + const prototype: { + }; + + } + + namespace resolve { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObject { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace upsert { + const prototype: { + }; + + } + + } + +} + +export namespace QueryParam { + namespace parse { + const prototype: { + }; + + } + + namespace parseSingle { + const prototype: { + }; + + } + + namespace prototype { + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function toString(): any; + + function update(param: any): void; + + function valueOf(): any; + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + namespace valueOf { + const prototype: { + }; + + } + + } + + namespace unparse { + const prototype: { + }; + + } + + namespace unparseSingle { + const prototype: { + }; + + } + +} + +export namespace Request { + namespace isRequest { + const prototype: { + }; + + } + + namespace prototype { + function addHeader(header: any): void; + + function addQueryParams(params: any): void; + + function authorize(): void; + + function authorizeUsing(type: any, options: any): void; + + function clone(): any; + + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachHeader(callback: any): any; + + function forEachParent(options: any, iterator: any): void; + + function getHeaders(options: any): any; + + function meta(...args: any[]): any; + + function parent(): any; + + function removeHeader(toRemove: any, options: any): any; + + function removeQueryParams(params: any): void; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function update(options: any): void; + + function upsertHeader(header: any): any; + + namespace addHeader { + const prototype: { + }; + + } + + namespace addQueryParams { + const prototype: { + }; + + } + + namespace authorize { + const prototype: { + }; + + } + + namespace authorizeUsing { + const prototype: { + }; + + } + + namespace clone { + const prototype: { + }; + + } + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachHeader { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace getHeaders { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace removeHeader { + const prototype: { + }; + + } + + namespace removeQueryParams { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + namespace upsertHeader { + const prototype: { + }; + + } + + } + +} + +export namespace RequestAuth { + namespace isValidType { + const prototype: { + }; + + } + + namespace prototype { + function clear(type: any): void; + + function current(): any; + + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parameters(): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function update(options: any, type: any): void; + + function use(type: any, options: any): void; + + namespace clear { + const prototype: { + }; + + } + + namespace current { + const prototype: { + }; + + } + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parameters { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + namespace use { + const prototype: { + }; + + } + + } + +} + +export namespace RequestBody { + namespace prototype { + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function isEmpty(): any; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toString(): any; + + function update(options: any): void; + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace isEmpty { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + } + +} + +export namespace Response { + namespace createFromNode { + const prototype: { + }; + + } + + namespace isResponse { + const prototype: { + }; + + } + + namespace mimeInfo { + const prototype: { + }; + + } + + namespace prototype { + function dataURI(): any; + + function describe(content: any, type: any): void; + + function details(): any; + + function encoding(): any; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function json(reviver: any, strict: any): any; + + function meta(...args: any[]): any; + + function mime(contentType: any, contentDisposition: any): any; + + function parent(): any; + + function reason(): any; + + function setParent(parent: any): void; + + function size(): any; + + function text(): any; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function update(options: any): void; + + namespace dataURI { + const prototype: { + }; + + } + + namespace describe { + const prototype: { + }; + + } + + namespace details { + const prototype: { + }; + + } + + namespace encoding { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace json { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace mime { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace reason { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace size { + const prototype: { + }; + + } + + namespace text { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + } + +} + +export namespace Script { + namespace isScript { + const prototype: { + }; + + } + + namespace prototype { + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function toSource(): any; + + function update(options: any): void; + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace toSource { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + } + +} + +export namespace Url { + namespace isUrl { + const prototype: { + }; + + } + + namespace parse { + const prototype: { + }; + + } + + namespace prototype { + function addQueryParams(params: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function getHost(): any; + + function getOAuth1BaseUrl(): any; + + function getPath(options: any): any; + + function getPathWithQuery(): any; + + function getQueryString(options: any): any; + + function getRaw(): any; + + function getRemote(options: any): any; + + function meta(...args: any[]): any; + + function parent(): any; + + function removeQueryParams(params: any): any; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toString(forceProtocol: any): any; + + function update(url: any): any; + + namespace addQueryParams { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace getHost { + const prototype: { + }; + + } + + namespace getOAuth1BaseUrl { + const prototype: { + }; + + } + + namespace getPath { + const prototype: { + }; + + } + + namespace getPathWithQuery { + const prototype: { + }; + + } + + namespace getQueryString { + const prototype: { + }; + + } + + namespace getRaw { + const prototype: { + }; + + } + + namespace getRemote { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace removeQueryParams { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + } + +} + +export namespace UrlMatchPattern { + namespace prototype { + function createMatchPattern(): any; + + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function getProtocols(): any; + + function globPatternToRegexp(pattern: any): any; + + function matchAbsoluteHostPattern(matchRegexObject: any, remote: any): any; + + function matchAnyHost(matchRegexObject: any): any; + + function matchSuffixHostPattern(matchRegexObject: any, remote: any): any; + + function meta(...args: any[]): any; + + function parent(): any; + + function setParent(parent: any): void; + + function test(urlStr: any): any; + + function testHost(host: any): any; + + function testPath(path: any): any; + + function testProtocol(protocol: any): any; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function toString(): any; + + function update(options: any): void; + + namespace createMatchPattern { + const prototype: { + }; + + } + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace getProtocols { + const prototype: { + }; + + } + + namespace globPatternToRegexp { + const prototype: { + }; + + } + + namespace matchAbsoluteHostPattern { + const prototype: { + }; + + } + + namespace matchAnyHost { + const prototype: { + }; + + } + + namespace matchSuffixHostPattern { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace test { + const prototype: { + }; + + } + + namespace testHost { + const prototype: { + }; + + } + + namespace testPath { + const prototype: { + }; + + } + + namespace testProtocol { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + } + +} + +export namespace UrlMatchPatternList { + namespace prototype { + function add(item: any, ...args: any[]): void; + + function all(): any; + + function append(item: any): any; + + function assimilate(source: any, prune: any): void; + + function clear(): void; + + function count(): any; + + function each(iterator: any, context: any): void; + + function eachParent(iterator: any, context: any): void; + + function filter(rule: any, context: any): any; + + function find(rule: any, context: any): any; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function get(key: any): any; + + function has(item: any, value: any, ...args: any[]): any; + + function idx(index: any): any; + + function indexOf(item: any): any; + + function insert(item: any, before: any): void; + + function insertAfter(item: any, after: any): any; + + function map(iterator: any, context: any): any; + + function meta(...args: any[]): any; + + function one(id: any): any; + + function parent(): any; + + function populate(items: any): void; + + function prepend(item: any): any; + + function remove(predicate: any, context: any, ...args: any[]): any; + + function repopulate(items: any): void; + + function setParent(parent: any): void; + + function test(urlStr: any): any; + + function toJSON(): any; + + function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; + + function toString(): any; + + function upsert(item: any): any; + + namespace add { + const prototype: { + }; + + } + + namespace all { + const prototype: { + }; + + } + + namespace append { + const prototype: { + }; + + } + + namespace assimilate { + const prototype: { + }; + + } + + namespace clear { + const prototype: { + }; + + } + + namespace count { + const prototype: { + }; + + } + + namespace each { + const prototype: { + }; + + } + + namespace eachParent { + const prototype: { + }; + + } + + namespace filter { + const prototype: { + }; + + } + + namespace find { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace get { + const prototype: { + }; + + } + + namespace has { + const prototype: { + }; + + } + + namespace idx { + const prototype: { + }; + + } + + namespace indexOf { + const prototype: { + }; + + } + + namespace insert { + const prototype: { + }; + + } + + namespace insertAfter { + const prototype: { + }; + + } + + namespace map { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace one { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace populate { + const prototype: { + }; + + } + + namespace prepend { + const prototype: { + }; + + } + + namespace remove { + const prototype: { + }; + + } + + namespace repopulate { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace test { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObject { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace upsert { + const prototype: { + }; + + } + + } + +} + +export namespace Variable { + namespace isVariable { + const prototype: { + }; + + } + + namespace prototype { + function cast(value: any): any; + + function castIn(value: any): any; + + function castOut(value: any): any; + + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function get(): any; + + function meta(...args: any[]): any; + + function parent(): any; + + function set(value: any): void; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function toString(): any; + + function update(options: any): void; + + function valueOf(value: any, ...args: any[]): any; + + function valueType(typeName: any, _noCast: any): any; + + namespace cast { + const prototype: { + }; + + } + + namespace castIn { + const prototype: { + }; + + } + + namespace castOut { + const prototype: { + }; + + } + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace get { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace set { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace update { + const prototype: { + }; + + } + + namespace valueOf { + const prototype: { + }; + + } + + namespace valueType { + const prototype: { + }; + + } + + } + + namespace types { + class number { + constructor(p0: any); + + // Native method; no parameter or return type inference available + toExponential(p0: any): any; + + // Native method; no parameter or return type inference available + toFixed(p0: any): any; + + // Native method; no parameter or return type inference available + toLocaleString(): any; + + // Native method; no parameter or return type inference available + toPrecision(p0: any): any; + + // Native method; no parameter or return type inference available + toString(p0: any): any; + + // Native method; no parameter or return type inference available + valueOf(): any; + + static EPSILON: number; + + static MAX_SAFE_INTEGER: number; + + static MAX_VALUE: number; + + static MIN_SAFE_INTEGER: number; + + static MIN_VALUE: number; + + static NEGATIVE_INFINITY: number; + + static NaN: number; + + static POSITIVE_INFINITY: number; + + static isFinite(p0: any): any; + + static isInteger(p0: any): any; + + static isNaN(p0: any): any; + + static isSafeInteger(p0: any): any; + + static parseFloat(p0: any): any; + + static parseInt(p0: any, p1: any): any; + + } + + class string { + constructor(p0: any); + + // Native method; no parameter or return type inference available + anchor(p0: any): any; + + // Native method; no parameter or return type inference available + big(): any; + + // Native method; no parameter or return type inference available + blink(): any; + + // Native method; no parameter or return type inference available + bold(): any; + + // Native method; no parameter or return type inference available + charAt(p0: any): any; + + // Native method; no parameter or return type inference available + charCodeAt(p0: any): any; + + // Native method; no parameter or return type inference available + codePointAt(p0: any): any; + + // Native method; no parameter or return type inference available + concat(p0: any): any; + + // Native method; no parameter or return type inference available + endsWith(p0: any): any; + + // Native method; no parameter or return type inference available + fixed(): any; + + // Native method; no parameter or return type inference available + fontcolor(p0: any): any; + + // Native method; no parameter or return type inference available + fontsize(p0: any): any; + + // Native method; no parameter or return type inference available + includes(p0: any): any; + + // Native method; no parameter or return type inference available + indexOf(p0: any): any; + + // Native method; no parameter or return type inference available + italics(): any; + + // Native method; no parameter or return type inference available + lastIndexOf(p0: any): any; + + // Native method; no parameter or return type inference available + link(p0: any): any; + + // Native method; no parameter or return type inference available + localeCompare(p0: any): any; + + // Native method; no parameter or return type inference available + match(p0: any): any; + + // Native method; no parameter or return type inference available + normalize(): any; + + // Native method; no parameter or return type inference available + padEnd(p0: any): any; + + // Native method; no parameter or return type inference available + padStart(p0: any): any; + + // Native method; no parameter or return type inference available + repeat(p0: any): any; + + // Native method; no parameter or return type inference available + replace(p0: any, p1: any): any; + + // Native method; no parameter or return type inference available + search(p0: any): any; + + // Native method; no parameter or return type inference available + slice(p0: any, p1: any): any; + + // Native method; no parameter or return type inference available + small(): any; + + // Native method; no parameter or return type inference available + split(p0: any, p1: any): any; + + // Native method; no parameter or return type inference available + startsWith(p0: any): any; + + // Native method; no parameter or return type inference available + strike(): any; + + // Native method; no parameter or return type inference available + sub(): any; + + // Native method; no parameter or return type inference available + substr(p0: any, p1: any): any; + + // Native method; no parameter or return type inference available + substring(p0: any, p1: any): any; + + // Native method; no parameter or return type inference available + sup(): any; + + // Native method; no parameter or return type inference available + toLocaleLowerCase(): any; + + // Native method; no parameter or return type inference available + toLocaleUpperCase(): any; + + // Native method; no parameter or return type inference available + toLowerCase(): any; + + // Native method; no parameter or return type inference available + toString(): any; + + // Native method; no parameter or return type inference available + toUpperCase(): any; + + // Native method; no parameter or return type inference available + trim(): any; + + // Native method; no parameter or return type inference available + trimLeft(): any; + + // Native method; no parameter or return type inference available + trimRight(): any; + + // Native method; no parameter or return type inference available + valueOf(): any; + + static fromCharCode(p0: any): any; + + static fromCodePoint(p0: any): any; + + static raw(p0: any): any; + + } + + namespace any { + function out(val: any): any; + + namespace out { + // Too-deep object hierarchy from postman_collection.Variable.types.any.out + const prototype: any; + + } + + } + + namespace json { + function out(val: any): any; + + namespace out { + // Too-deep object hierarchy from postman_collection.Variable.types.json.out + const prototype: any; + + } + + } + + namespace number { + namespace prototype { + // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype + const toExponential: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype + const toFixed: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype + const toLocaleString: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype + const toPrecision: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype + const toString: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype + const valueOf: any; + + } + + } + + namespace string { + namespace prototype { + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const anchor: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const big: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const blink: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const bold: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const charAt: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const charCodeAt: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const codePointAt: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const concat: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const endsWith: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const fixed: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const fontcolor: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const fontsize: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const includes: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const indexOf: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const italics: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const lastIndexOf: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const length: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const link: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const localeCompare: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const match: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const normalize: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const padEnd: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const padStart: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const repeat: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const replace: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const search: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const slice: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const small: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const split: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const startsWith: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const strike: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const sub: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const substr: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const substring: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const sup: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const toLocaleLowerCase: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const toLocaleUpperCase: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const toLowerCase: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const toString: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const toUpperCase: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const trim: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const trimLeft: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const trimRight: any; + + // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype + const valueOf: any; + + } + + } + + } + +} + +export namespace VariableList { + namespace isVariableList { + const prototype: { + }; + + } + + namespace prototype { + function add(item: any, ...args: any[]): void; + + function all(): any; + + function append(item: any): any; + + function assimilate(source: any, prune: any): void; + + function clear(): void; + + function count(): any; + + function each(iterator: any, context: any): void; + + function eachParent(iterator: any, context: any): void; + + function filter(rule: any, context: any): any; + + function find(rule: any, context: any): any; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function get(key: any): any; + + function has(item: any, value: any, ...args: any[]): any; + + function idx(index: any): any; + + function indexOf(item: any): any; + + function insert(item: any, before: any): void; + + function insertAfter(item: any, after: any): any; + + function map(iterator: any, context: any): any; + + function meta(...args: any[]): any; + + function one(id: any): any; + + function parent(): any; + + function populate(items: any): void; + + function prepend(item: any): any; + + function remove(predicate: any, context: any, ...args: any[]): any; + + function replace(str: any, overrides: any): any; + + function repopulate(items: any): void; + + function setParent(parent: any): void; + + function substitute(obj: any, overrides: any, mutate: any): any; + + function syncFromObject(obj: any, track: any, prune: any): any; + + function syncToObject(obj: any): any; + + function toJSON(): any; + + function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; + + function toString(): any; + + function upsert(item: any): any; + + namespace add { + const prototype: { + }; + + } + + namespace all { + const prototype: { + }; + + } + + namespace append { + const prototype: { + }; + + } + + namespace assimilate { + const prototype: { + }; + + } + + namespace clear { + const prototype: { + }; + + } + + namespace count { + const prototype: { + }; + + } + + namespace each { + const prototype: { + }; + + } + + namespace eachParent { + const prototype: { + }; + + } + + namespace filter { + const prototype: { + }; + + } + + namespace find { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace get { + const prototype: { + }; + + } + + namespace has { + const prototype: { + }; + + } + + namespace idx { + const prototype: { + }; + + } + + namespace indexOf { + const prototype: { + }; + + } + + namespace insert { + const prototype: { + }; + + } + + namespace insertAfter { + const prototype: { + }; + + } + + namespace map { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace one { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace populate { + const prototype: { + }; + + } + + namespace prepend { + const prototype: { + }; + + } + + namespace remove { + const prototype: { + }; + + } + + namespace replace { + const prototype: { + }; + + } + + namespace repopulate { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace substitute { + const prototype: { + }; + + } + + namespace syncFromObject { + const prototype: { + }; + + } + + namespace syncToObject { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObject { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + namespace upsert { + const prototype: { + }; + + } + + } + +} + +export namespace VariableScope { + namespace isVariableScope { + const prototype: { + }; + + } + + namespace prototype { + function addLayer(list: any): void; + + function clear(): void; + + function describe(content: any, type: any): void; + + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function get(key: any): any; + + function has(variableName: any): any; + + function meta(...args: any[]): any; + + function parent(): any; + + function set(key: any, value: any, type: any): any; + + function setParent(parent: any): void; + + function syncVariablesFrom(obj: any, track: any): any; + + function syncVariablesTo(obj: any): any; + + function toJSON(): any; + + function toObject(excludeDisabled: any, caseSensitive: any): any; + + function toObjectResolved(scope: any, overrides: any, options: any): any; + + function unset(key: any): void; + + function variables(): any; + + namespace addLayer { + const prototype: { + }; + + } + + namespace clear { + const prototype: { + }; + + } + + namespace describe { + const prototype: { + }; + + } + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace get { + const prototype: { + }; + + } + + namespace has { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace set { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace syncVariablesFrom { + const prototype: { + }; + + } + + namespace syncVariablesTo { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toObject { + const prototype: { + }; + + } + + namespace toObjectResolved { + const prototype: { + }; + + } + + namespace unset { + const prototype: { + }; + + } + + namespace variables { + const prototype: { + }; + + } + + } + +} + +export namespace Version { + namespace prototype { + function findInParents(property: any, customizer: any): any; + + function findParentContaining(property: any, customizer: any): any; + + function forEachParent(options: any, iterator: any): void; + + function meta(...args: any[]): any; + + function parent(): any; + + function set(value: any): void; + + function setParent(parent: any): void; + + function toJSON(): any; + + function toString(): any; + + namespace findInParents { + const prototype: { + }; + + } + + namespace findParentContaining { + const prototype: { + }; + + } + + namespace forEachParent { + const prototype: { + }; + + } + + namespace meta { + const prototype: { + }; + + } + + namespace parent { + const prototype: { + }; + + } + + namespace set { + const prototype: { + }; + + } + + namespace setParent { + const prototype: { + }; + + } + + namespace toJSON { + const prototype: { + }; + + } + + namespace toString { + const prototype: { + }; + + } + + } + +} + diff --git a/types/postman-collection/postman-collection-tests.ts b/types/postman-collection/postman-collection-tests.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/types/postman-collection/tsconfig.json b/types/postman-collection/tsconfig.json new file mode 100644 index 0000000000..3f176970e4 --- /dev/null +++ b/types/postman-collection/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "postman-collection-tests.ts" + ] +} diff --git a/types/postman-collection/tslint.json b/types/postman-collection/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/postman-collection/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From b044535ed9892ca463096a46a8d11b5bf10bb272 Mon Sep 17 00:00:00 2001 From: Kyle Buzby Date: Thu, 15 Feb 2018 09:55:50 -0600 Subject: [PATCH 0023/1327] add example tests --- types/postman-collection/postman-collection-tests.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/types/postman-collection/postman-collection-tests.ts b/types/postman-collection/postman-collection-tests.ts index e69de29bb2..fd65e5e3d9 100644 --- a/types/postman-collection/postman-collection-tests.ts +++ b/types/postman-collection/postman-collection-tests.ts @@ -0,0 +1,7 @@ +import * as pmCollection from 'postman-collection'; + +/* Example https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/base64-js/base64-js-tests.ts +base64js.byteLength(""); // $ExpectType number +base64js.toByteArray(""); // $ExpectType Uint8Array +base64js.fromByteArray(new Uint8Array(0)); // $ExpectType string +*/ From 009e85b173cfa589189096fbdf4449d29db400e9 Mon Sep 17 00:00:00 2001 From: Kyle Buzby Date: Thu, 15 Feb 2018 09:56:05 -0600 Subject: [PATCH 0024/1327] remove unnecessary namespaces pt 1 --- types/postman-collection/index.d.ts | 4692 ++++----------------------- 1 file changed, 558 insertions(+), 4134 deletions(-) diff --git a/types/postman-collection/index.d.ts b/types/postman-collection/index.d.ts index 92e39e82d2..1247493c85 100644 --- a/types/postman-collection/index.d.ts +++ b/types/postman-collection/index.d.ts @@ -1,563 +1,566 @@ // Type definitions for postman-collection 3.0 -// Project: https://github.com/postmanlabs/postman-collection#readme -// Definitions by: My Self +// Project: https://github.com/postmanlabs/postman-collection +// Definitions by: Kyle Buzby // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export class Certificate { - constructor(options: any, ...args: any[]); - - canApplyTo(url: any): any; - - toJSON(): any; - - update(options: any): void; - - static isCertificate(obj: any): any; - +declare module PostmanCollection { + export class Certificate { + constructor(options: any, ...args: any[]); + + canApplyTo(url: any): any; + + toJSON(): any; + + update(options: any): void; + + static isCertificate(obj: any): any; + + } + + export class CertificateList { + constructor(parent: any, list: any); + + resolveOne(url: any): any; + + static isCertificateList(obj: any): any; + + } + + export class Collection { + constructor(definition: any, environments: any); + + syncVariablesFrom(obj: any, track: any): any; + + syncVariablesTo(obj: any): any; + + toJSON(): any; + + static isCollection(obj: any): any; + + } + + export class Cookie { + constructor(options: any); + + update(options: any): void; + + valueOf(): any; + + static isCookie(obj: any): any; + + static parse(str: any): any; + + static splitParam(param: any): any; + + } + + export class Description { + constructor(definition: any); + + toJSON(): any; + + toString(): any; + + update(content: any, type: any): void; + + static isDescription(obj: any): any; + + } + + export class Event { + constructor(definition: any); + + update(definition: any): void; + + } + + export class EventList { + constructor(parent: any, populate: any); + + listeners(name: any): any; + + listenersOwn(name: any): any; + + static isEventList(obj: any): any; + + } + + export class FormParam { + constructor(options: any, ...args: any[]); + + toString(): any; + + valueOf(): any; + + static parse(): void; + + } + + export class Header { + constructor(options: any, name: any, ...args: any[]); + + toString(): any; + + update(options: any): void; + + valueOf(): any; + + static create(...args: any[]): any; + + static isHeader(obj: any): any; + + static parse(headerString: any): any; + + static parseSingle(header: any): any; + + static unparse(headers: any, separator: any): any; + + static unparseSingle(header: any): any; + + } + + export class HeaderList { + constructor(parent: any, headers: any); + + contentSize(): any; + + static isHeaderList(obj: any): any; + + } + + export class Item { + constructor(definition: any, ...args: any[]); + + authorizeRequestUsing(type: any, options: any): any; + + getAuth(): any; + + getEvents(name: any): any; + + static isItem(obj: any): any; + + } + + export class ItemGroup { + constructor(definition: any, ...args: any[]); + + authorizeRequestsUsing(type: any, options: any): void; + + forEachItem(callback: any): any; + + forEachItemGroup(callback: any): void; + + oneDeep(idOrName: any): any; + + static isItemGroup(obj: any): any; + + } + + export class Property { + constructor(definition: any, ...args: any[]); + + describe(content: any, type: any): void; + + toObjectResolved(scope: any, overrides: any, options: any): any; + + static replaceSubstitutions(str: any, variables: any, ...args: any[]): any; + + static replaceSubstitutionsIn(obj: any, variables: any, mutate: any): any; + + } + + export class PropertyBase { + constructor(definition: any); + + findInParents(property: any, customizer: any): any; + + findParentContaining(property: any, customizer: any): any; + + forEachParent(options: any, iterator: any): void; + + meta(...args: any[]): any; + + parent(): any; + + setParent(parent: any): void; + + toJSON(): any; + + static propertyIsMeta(value: any, key: any): any; + + static propertyUnprefixMeta(value: any, key: any): any; + + static toJSON(obj: any): any; + + } + + export class PropertyList { + constructor(type: any, parent: any, populate: any); + + add(item: any, ...args: any[]): void; + + all(): any; + + append(item: any): any; + + assimilate(source: any, prune: any): void; + + clear(): void; + + count(): any; + + each(iterator: any, context: any): void; + + eachParent(iterator: any, context: any): void; + + filter(rule: any, context: any): any; + + find(rule: any, context: any): any; + + get(key: any): any; + + has(item: any, value: any, ...args: any[]): any; + + idx(index: any): any; + + indexOf(item: any): any; + + insert(item: any, before: any): void; + + insertAfter(item: any, after: any): any; + + map(iterator: any, context: any): any; + + one(id: any): any; + + populate(items: any): void; + + prepend(item: any): any; + + remove(predicate: any, context: any, ...args: any[]): any; + + repopulate(items: any): void; + + toJSON(): any; + + toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; + + toString(): any; + + upsert(item: any): any; + + static isPropertyList(obj: any): any; + + } + + export class ProxyConfig { + constructor(options: any); + + getProtocols(): any; + + getProxyUrl(): any; + + test(urlStr: any): any; + + update(options: any): void; + + updateProtocols(protocols: any): void; + + static isProxyConfig(obj: any): any; + + } + + export class ProxyConfigList { + constructor(parent: any, populate: any); + + resolve(url: any): any; + + static isProxyConfigList(obj: any): any; + + } + + export class QueryParam { + constructor(options: any, ...args: any[]); + + toString(): any; + + update(param: any): void; + + valueOf(): any; + + static parse(query: any): any; + + static parseSingle(param: any, idx: any, all: any): any; + + static unparse(params: any, options: any): any; + + static unparseSingle(obj: any, encode: any): any; + + } + + export class Request { + constructor(options: any, ...args: any[]); + + addHeader(header: any): void; + + addQueryParams(params: any): void; + + authorize(): void; + + authorizeUsing(type: any, options: any): void; + + clone(): any; + + forEachHeader(callback: any): any; + + getHeaders(options: any): any; + + removeHeader(toRemove: any, options: any): any; + + removeQueryParams(params: any): void; + + toJSON(): any; + + update(options: any): void; + + upsertHeader(header: any): any; + + static isRequest(obj: any): any; + + } + + export class RequestAuth { + constructor(options: any, parent: any); + + clear(type: any): void; + + current(): any; + + parameters(): any; + + update(options: any, type: any): void; + + use(type: any, options: any): void; + + static isValidType(type: any): any; + + } + + export class RequestBody { + constructor(options: any, ...args: any[]); + + isEmpty(): any; + + toString(): any; + + update(options: any): void; + + static MODES: { + file: string; + formdata: string; + raw: string; + urlencoded: string; + }; + + } + + export class Response { + constructor(options: any, ...args: any[]); + + dataURI(): any; + + details(): any; + + encoding(): any; + + json(reviver: any, strict: any): any; + + mime(contentType: any, contentDisposition: any): any; + + reason(): any; + + size(): any; + + text(): any; + + toJSON(): any; + + update(options: any): void; + + static createFromNode(response: any, cookies: any): any; + + static isResponse(obj: any): any; + + static mimeInfo(type: any, disposition: any): any; + + } + + export class Script { + constructor(options: any, ...args: any[]); + + toSource(): any; + + update(options: any): void; + + static isScript(obj: any): any; + + } + + export class Url { + constructor(options: any, ...args: any[]); + + addQueryParams(params: any): void; + + getHost(): any; + + getOAuth1BaseUrl(): any; + + getPath(options: any): any; + + getPathWithQuery(): any; + + getQueryString(options: any): any; + + getRaw(): any; + + getRemote(options: any): any; + + removeQueryParams(params: any): any; + + toString(forceProtocol: any): any; + + update(url: any): any; + + static isUrl(obj: any): any; + + static parse(url: any): any; + + } + + export class UrlMatchPattern { + constructor(options: any, ...args: any[]); + + createMatchPattern(): any; + + getProtocols(): any; + + globPatternToRegexp(pattern: any): any; + + matchAbsoluteHostPattern(matchRegexObject: any, remote: any): any; + + matchAnyHost(matchRegexObject: any): any; + + matchSuffixHostPattern(matchRegexObject: any, remote: any): any; + + test(urlStr: any): any; + + testHost(host: any): any; + + testPath(path: any): any; + + testProtocol(protocol: any): any; + + toJSON(): any; + + toString(): any; + + update(options: any): void; + + static MATCH_ALL_URLS: string; + + static PROTOCOL_DELIMITER: string; + + } + + export class UrlMatchPatternList { + constructor(parent: any, list: any); + + test(urlStr: any): any; + + } + + export class Variable { + constructor(definition: any, ...args: any[]); + + cast(value: any): any; + + castIn(value: any): any; + + castOut(value: any): any; + + get(): any; + + set(value: any): void; + + toString(): any; + + update(options: any): void; + + valueOf(value: any, ...args: any[]): any; + + valueType(typeName: any, _noCast: any): any; + + static isVariable(obj: any): any; + + } + + export class VariableList { + constructor(parent: any, populate: any); + + replace(str: any, overrides: any): any; + + substitute(obj: any, overrides: any, mutate: any): any; + + syncFromObject(obj: any, track: any, prune: any): any; + + syncToObject(obj: any): any; + + static isVariableList(obj: any): any; + + } + + export class VariableScope { + constructor(definition: any, layers: any); + + addLayer(list: any): void; + + clear(): void; + + get(key: any): any; + + has(variableName: any): any; + + set(key: any, value: any, type: any): any; + + syncVariablesFrom(obj: any, track: any): any; + + syncVariablesTo(obj: any): any; + + toJSON(): any; + + toObject(excludeDisabled: any, caseSensitive: any): any; + + unset(key: any): void; + + variables(): any; + + static isVariableScope(obj: any): any; + + } + + export class Version { + constructor(options: any); + + set(value: any): void; + + toString(): any; + + } + + export function CookieList(parent: any, cookies: any): void; + } -export class CertificateList { - constructor(parent: any, list: any); - - resolveOne(url: any): any; - - static isCertificateList(obj: any): any; - -} - -export class Collection { - constructor(definition: any, environments: any); - - syncVariablesFrom(obj: any, track: any): any; - - syncVariablesTo(obj: any): any; - - toJSON(): any; - - static isCollection(obj: any): any; - -} - -export class Cookie { - constructor(options: any); - - update(options: any): void; - - valueOf(): any; - - static isCookie(obj: any): any; - - static parse(str: any): any; - - static splitParam(param: any): any; - -} - -export class Description { - constructor(definition: any); - - toJSON(): any; - - toString(): any; - - update(content: any, type: any): void; - - static isDescription(obj: any): any; - -} - -export class Event { - constructor(definition: any); - - update(definition: any): void; - -} - -export class EventList { - constructor(parent: any, populate: any); - - listeners(name: any): any; - - listenersOwn(name: any): any; - - static isEventList(obj: any): any; - -} - -export class FormParam { - constructor(options: any, ...args: any[]); - - toString(): any; - - valueOf(): any; - - static parse(): void; - -} - -export class Header { - constructor(options: any, name: any, ...args: any[]); - - toString(): any; - - update(options: any): void; - - valueOf(): any; - - static create(...args: any[]): any; - - static isHeader(obj: any): any; - - static parse(headerString: any): any; - - static parseSingle(header: any): any; - - static unparse(headers: any, separator: any): any; - - static unparseSingle(header: any): any; - -} - -export class HeaderList { - constructor(parent: any, headers: any); - - contentSize(): any; - - static isHeaderList(obj: any): any; - -} - -export class Item { - constructor(definition: any, ...args: any[]); - - authorizeRequestUsing(type: any, options: any): any; - - getAuth(): any; - - getEvents(name: any): any; - - static isItem(obj: any): any; - -} - -export class ItemGroup { - constructor(definition: any, ...args: any[]); - - authorizeRequestsUsing(type: any, options: any): void; - - forEachItem(callback: any): any; - - forEachItemGroup(callback: any): void; - - oneDeep(idOrName: any): any; - - static isItemGroup(obj: any): any; - -} - -export class Property { - constructor(definition: any, ...args: any[]); - - describe(content: any, type: any): void; - - toObjectResolved(scope: any, overrides: any, options: any): any; - - static replaceSubstitutions(str: any, variables: any, ...args: any[]): any; - - static replaceSubstitutionsIn(obj: any, variables: any, mutate: any): any; - -} - -export class PropertyBase { - constructor(definition: any); - - findInParents(property: any, customizer: any): any; - - findParentContaining(property: any, customizer: any): any; - - forEachParent(options: any, iterator: any): void; - - meta(...args: any[]): any; - - parent(): any; - - setParent(parent: any): void; - - toJSON(): any; - - static propertyIsMeta(value: any, key: any): any; - - static propertyUnprefixMeta(value: any, key: any): any; - - static toJSON(obj: any): any; - -} - -export class PropertyList { - constructor(type: any, parent: any, populate: any); - - add(item: any, ...args: any[]): void; - - all(): any; - - append(item: any): any; - - assimilate(source: any, prune: any): void; - - clear(): void; - - count(): any; - - each(iterator: any, context: any): void; - - eachParent(iterator: any, context: any): void; - - filter(rule: any, context: any): any; - - find(rule: any, context: any): any; - - get(key: any): any; - - has(item: any, value: any, ...args: any[]): any; - - idx(index: any): any; - - indexOf(item: any): any; - - insert(item: any, before: any): void; - - insertAfter(item: any, after: any): any; - - map(iterator: any, context: any): any; - - one(id: any): any; - - populate(items: any): void; - - prepend(item: any): any; - - remove(predicate: any, context: any, ...args: any[]): any; - - repopulate(items: any): void; - - toJSON(): any; - - toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; - - toString(): any; - - upsert(item: any): any; - - static isPropertyList(obj: any): any; - -} - -export class ProxyConfig { - constructor(options: any); - - getProtocols(): any; - - getProxyUrl(): any; - - test(urlStr: any): any; - - update(options: any): void; - - updateProtocols(protocols: any): void; - - static isProxyConfig(obj: any): any; - -} - -export class ProxyConfigList { - constructor(parent: any, populate: any); - - resolve(url: any): any; - - static isProxyConfigList(obj: any): any; - -} - -export class QueryParam { - constructor(options: any, ...args: any[]); - - toString(): any; - - update(param: any): void; - - valueOf(): any; - - static parse(query: any): any; - - static parseSingle(param: any, idx: any, all: any): any; - - static unparse(params: any, options: any): any; - - static unparseSingle(obj: any, encode: any): any; - -} - -export class Request { - constructor(options: any, ...args: any[]); - - addHeader(header: any): void; - - addQueryParams(params: any): void; - - authorize(): void; - - authorizeUsing(type: any, options: any): void; - - clone(): any; - - forEachHeader(callback: any): any; - - getHeaders(options: any): any; - - removeHeader(toRemove: any, options: any): any; - - removeQueryParams(params: any): void; - - toJSON(): any; - - update(options: any): void; - - upsertHeader(header: any): any; - - static isRequest(obj: any): any; - -} - -export class RequestAuth { - constructor(options: any, parent: any); - - clear(type: any): void; - - current(): any; - - parameters(): any; - - update(options: any, type: any): void; - - use(type: any, options: any): void; - - static isValidType(type: any): any; - -} - -export class RequestBody { - constructor(options: any, ...args: any[]); - - isEmpty(): any; - - toString(): any; - - update(options: any): void; - - static MODES: { - file: string; - formdata: string; - raw: string; - urlencoded: string; - }; - -} - -export class Response { - constructor(options: any, ...args: any[]); - - dataURI(): any; - - details(): any; - - encoding(): any; - - json(reviver: any, strict: any): any; - - mime(contentType: any, contentDisposition: any): any; - - reason(): any; - - size(): any; - - text(): any; - - toJSON(): any; - - update(options: any): void; - - static createFromNode(response: any, cookies: any): any; - - static isResponse(obj: any): any; - - static mimeInfo(type: any, disposition: any): any; - -} - -export class Script { - constructor(options: any, ...args: any[]); - - toSource(): any; - - update(options: any): void; - - static isScript(obj: any): any; - -} - -export class Url { - constructor(options: any, ...args: any[]); - - addQueryParams(params: any): void; - - getHost(): any; - - getOAuth1BaseUrl(): any; - - getPath(options: any): any; - - getPathWithQuery(): any; - - getQueryString(options: any): any; - - getRaw(): any; - - getRemote(options: any): any; - - removeQueryParams(params: any): any; - - toString(forceProtocol: any): any; - - update(url: any): any; - - static isUrl(obj: any): any; - - static parse(url: any): any; - -} - -export class UrlMatchPattern { - constructor(options: any, ...args: any[]); - - createMatchPattern(): any; - - getProtocols(): any; - - globPatternToRegexp(pattern: any): any; - - matchAbsoluteHostPattern(matchRegexObject: any, remote: any): any; - - matchAnyHost(matchRegexObject: any): any; - - matchSuffixHostPattern(matchRegexObject: any, remote: any): any; - - test(urlStr: any): any; - - testHost(host: any): any; - - testPath(path: any): any; - - testProtocol(protocol: any): any; - - toJSON(): any; - - toString(): any; - - update(options: any): void; - - static MATCH_ALL_URLS: string; - - static PROTOCOL_DELIMITER: string; - -} - -export class UrlMatchPatternList { - constructor(parent: any, list: any); - - test(urlStr: any): any; - -} - -export class Variable { - constructor(definition: any, ...args: any[]); - - cast(value: any): any; - - castIn(value: any): any; - - castOut(value: any): any; - - get(): any; - - set(value: any): void; - - toString(): any; - - update(options: any): void; - - valueOf(value: any, ...args: any[]): any; - - valueType(typeName: any, _noCast: any): any; - - static isVariable(obj: any): any; - -} - -export class VariableList { - constructor(parent: any, populate: any); - - replace(str: any, overrides: any): any; - - substitute(obj: any, overrides: any, mutate: any): any; - - syncFromObject(obj: any, track: any, prune: any): any; - - syncToObject(obj: any): any; - - static isVariableList(obj: any): any; - -} - -export class VariableScope { - constructor(definition: any, layers: any); - - addLayer(list: any): void; - - clear(): void; - - get(key: any): any; - - has(variableName: any): any; - - set(key: any, value: any, type: any): any; - - syncVariablesFrom(obj: any, track: any): any; - - syncVariablesTo(obj: any): any; - - toJSON(): any; - - toObject(excludeDisabled: any, caseSensitive: any): any; - - unset(key: any): void; - - variables(): any; - - static isVariableScope(obj: any): any; - -} - -export class Version { - constructor(options: any); - - set(value: any): void; - - toString(): any; - -} - -export function CookieList(parent: any, cookies: any): void; - export namespace Certificate { namespace isCertificate { const prototype: { @@ -587,73 +590,6 @@ export namespace Certificate { function toObjectResolved(scope: any, overrides: any, options: any): any; function update(options: any): void; - - namespace canApplyTo { - const prototype: { - }; - - } - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - } } @@ -732,204 +668,6 @@ export namespace CertificateList { function upsert(item: any): any; - namespace add { - const prototype: { - }; - - } - - namespace all { - const prototype: { - }; - - } - - namespace append { - const prototype: { - }; - - } - - namespace assimilate { - const prototype: { - }; - - } - - namespace clear { - const prototype: { - }; - - } - - namespace count { - const prototype: { - }; - - } - - namespace each { - const prototype: { - }; - - } - - namespace eachParent { - const prototype: { - }; - - } - - namespace filter { - const prototype: { - }; - - } - - namespace find { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace get { - const prototype: { - }; - - } - - namespace has { - const prototype: { - }; - - } - - namespace idx { - const prototype: { - }; - - } - - namespace indexOf { - const prototype: { - }; - - } - - namespace insert { - const prototype: { - }; - - } - - namespace insertAfter { - const prototype: { - }; - - } - - namespace map { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace one { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace populate { - const prototype: { - }; - - } - - namespace prepend { - const prototype: { - }; - - } - - namespace remove { - const prototype: { - }; - - } - - namespace repopulate { - const prototype: { - }; - - } - - namespace resolveOne { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObject { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace upsert { - const prototype: { - }; - - } - } } @@ -971,97 +709,6 @@ export namespace Collection { function toJSON(): any; function toObjectResolved(scope: any, overrides: any, options: any): any; - - namespace authorizeRequestsUsing { - const prototype: { - }; - - } - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachItem { - const prototype: { - }; - - } - - namespace forEachItemGroup { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace oneDeep { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace syncVariablesFrom { - const prototype: { - }; - - } - - namespace syncVariablesTo { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - } } @@ -1098,60 +745,6 @@ export namespace Cookie { function valueOf(): any; - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - - namespace valueOf { - const prototype: { - }; - - } - } namespace splitParam { @@ -1236,197 +829,6 @@ export namespace CookieList { function upsert(item: any): any; - namespace add { - const prototype: { - }; - - } - - namespace all { - const prototype: { - }; - - } - - namespace append { - const prototype: { - }; - - } - - namespace assimilate { - const prototype: { - }; - - } - - namespace clear { - const prototype: { - }; - - } - - namespace count { - const prototype: { - }; - - } - - namespace each { - const prototype: { - }; - - } - - namespace eachParent { - const prototype: { - }; - - } - - namespace filter { - const prototype: { - }; - - } - - namespace find { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace get { - const prototype: { - }; - - } - - namespace has { - const prototype: { - }; - - } - - namespace idx { - const prototype: { - }; - - } - - namespace indexOf { - const prototype: { - }; - - } - - namespace insert { - const prototype: { - }; - - } - - namespace insertAfter { - const prototype: { - }; - - } - - namespace map { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace one { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace populate { - const prototype: { - }; - - } - - namespace prepend { - const prototype: { - }; - - } - - namespace remove { - const prototype: { - }; - - } - - namespace repopulate { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObject { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace upsert { - const prototype: { - }; - - } } @@ -1449,24 +851,6 @@ export namespace Description { function update(content: any, type: any): void; - namespace toJSON { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - } } @@ -1492,67 +876,6 @@ export namespace Event { function toObjectResolved(scope: any, overrides: any, options: any): any; function update(definition: any): void; - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - } } @@ -1632,211 +955,6 @@ export namespace EventList { function toString(): any; function upsert(item: any): any; - - namespace add { - const prototype: { - }; - - } - - namespace all { - const prototype: { - }; - - } - - namespace append { - const prototype: { - }; - - } - - namespace assimilate { - const prototype: { - }; - - } - - namespace clear { - const prototype: { - }; - - } - - namespace count { - const prototype: { - }; - - } - - namespace each { - const prototype: { - }; - - } - - namespace eachParent { - const prototype: { - }; - - } - - namespace filter { - const prototype: { - }; - - } - - namespace find { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace get { - const prototype: { - }; - - } - - namespace has { - const prototype: { - }; - - } - - namespace idx { - const prototype: { - }; - - } - - namespace indexOf { - const prototype: { - }; - - } - - namespace insert { - const prototype: { - }; - - } - - namespace insertAfter { - const prototype: { - }; - - } - - namespace listeners { - const prototype: { - }; - - } - - namespace listenersOwn { - const prototype: { - }; - - } - - namespace map { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace one { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace populate { - const prototype: { - }; - - } - - namespace prepend { - const prototype: { - }; - - } - - namespace remove { - const prototype: { - }; - - } - - namespace repopulate { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObject { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace upsert { - const prototype: { - }; - - } - } } @@ -1870,73 +988,6 @@ export namespace FormParam { function toString(): any; function valueOf(): any; - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace valueOf { - const prototype: { - }; - - } - } } @@ -1990,79 +1041,6 @@ export namespace Header { function update(options: any): void; function valueOf(): any; - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - - namespace valueOf { - const prototype: { - }; - - } - } namespace unparse { @@ -2152,205 +1130,6 @@ export namespace HeaderList { function toString(): any; function upsert(item: any): any; - - namespace add { - const prototype: { - }; - - } - - namespace all { - const prototype: { - }; - - } - - namespace append { - const prototype: { - }; - - } - - namespace assimilate { - const prototype: { - }; - - } - - namespace clear { - const prototype: { - }; - - } - - namespace contentSize { - const prototype: { - }; - - } - - namespace count { - const prototype: { - }; - - } - - namespace each { - const prototype: { - }; - - } - - namespace eachParent { - const prototype: { - }; - - } - - namespace filter { - const prototype: { - }; - - } - - namespace find { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace get { - const prototype: { - }; - - } - - namespace has { - const prototype: { - }; - - } - - namespace idx { - const prototype: { - }; - - } - - namespace indexOf { - const prototype: { - }; - - } - - namespace insert { - const prototype: { - }; - - } - - namespace insertAfter { - const prototype: { - }; - - } - - namespace map { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace one { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace populate { - const prototype: { - }; - - } - - namespace prepend { - const prototype: { - }; - - } - - namespace remove { - const prototype: { - }; - - } - - namespace repopulate { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObject { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace upsert { - const prototype: { - }; - - } - } } @@ -2386,79 +1165,6 @@ export namespace Item { function toJSON(): any; function toObjectResolved(scope: any, overrides: any, options: any): any; - - namespace authorizeRequestUsing { - const prototype: { - }; - - } - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace getAuth { - const prototype: { - }; - - } - - namespace getEvents { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - } } @@ -2497,84 +1203,6 @@ export namespace ItemGroup { function toObjectResolved(scope: any, overrides: any, options: any): any; - namespace authorizeRequestsUsing { - const prototype: { - }; - - } - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachItem { - const prototype: { - }; - - } - - namespace forEachItemGroup { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace oneDeep { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - } } @@ -2599,60 +1227,6 @@ export namespace Property { function toObjectResolved(scope: any, overrides: any, options: any): any; - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - } namespace replaceSubstitutions { @@ -2696,57 +1270,7 @@ export namespace PropertyBase { function setParent(parent: any): void; function toJSON(): any; - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - } - - namespace toJSON { - const prototype: { - }; - - } - } export namespace PropertyList { @@ -2820,201 +1344,7 @@ export namespace PropertyList { function toString(): any; function upsert(item: any): any; - - namespace add { - const prototype: { - }; - - } - - namespace all { - const prototype: { - }; - - } - - namespace append { - const prototype: { - }; - - } - - namespace assimilate { - const prototype: { - }; - - } - - namespace clear { - const prototype: { - }; - - } - - namespace count { - const prototype: { - }; - - } - - namespace each { - const prototype: { - }; - - } - - namespace eachParent { - const prototype: { - }; - - } - - namespace filter { - const prototype: { - }; - - } - - namespace find { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace get { - const prototype: { - }; - - } - - namespace has { - const prototype: { - }; - - } - - namespace idx { - const prototype: { - }; - - } - - namespace indexOf { - const prototype: { - }; - - } - - namespace insert { - const prototype: { - }; - - } - - namespace insertAfter { - const prototype: { - }; - - } - - namespace map { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace one { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace populate { - const prototype: { - }; - - } - - namespace prepend { - const prototype: { - }; - - } - - namespace remove { - const prototype: { - }; - - } - - namespace repopulate { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObject { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace upsert { - const prototype: { - }; - - } - } - } export namespace ProxyConfig { @@ -3052,93 +1382,7 @@ export namespace ProxyConfig { function update(options: any): void; function updateProtocols(protocols: any): void; - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace getProtocols { - const prototype: { - }; - - } - - namespace getProxyUrl { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace test { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - - namespace updateProtocols { - const prototype: { - }; - - } - } - } export namespace ProxyConfigList { @@ -3214,207 +1458,7 @@ export namespace ProxyConfigList { function toString(): any; function upsert(item: any): any; - - namespace add { - const prototype: { - }; - - } - - namespace all { - const prototype: { - }; - - } - - namespace append { - const prototype: { - }; - - } - - namespace assimilate { - const prototype: { - }; - - } - - namespace clear { - const prototype: { - }; - - } - - namespace count { - const prototype: { - }; - - } - - namespace each { - const prototype: { - }; - - } - - namespace eachParent { - const prototype: { - }; - - } - - namespace filter { - const prototype: { - }; - - } - - namespace find { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace get { - const prototype: { - }; - - } - - namespace has { - const prototype: { - }; - - } - - namespace idx { - const prototype: { - }; - - } - - namespace indexOf { - const prototype: { - }; - - } - - namespace insert { - const prototype: { - }; - - } - - namespace insertAfter { - const prototype: { - }; - - } - - namespace map { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace one { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace populate { - const prototype: { - }; - - } - - namespace prepend { - const prototype: { - }; - - } - - namespace remove { - const prototype: { - }; - - } - - namespace repopulate { - const prototype: { - }; - - } - - namespace resolve { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObject { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace upsert { - const prototype: { - }; - - } - } - } export namespace QueryParam { @@ -3454,79 +1498,6 @@ export namespace QueryParam { function update(param: any): void; function valueOf(): any; - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - - namespace valueOf { - const prototype: { - }; - - } - } namespace unparse { @@ -3540,7 +1511,6 @@ export namespace QueryParam { }; } - } export namespace Request { @@ -3590,129 +1560,7 @@ export namespace Request { function update(options: any): void; function upsertHeader(header: any): any; - - namespace addHeader { - const prototype: { - }; - - } - - namespace addQueryParams { - const prototype: { - }; - - } - - namespace authorize { - const prototype: { - }; - - } - - namespace authorizeUsing { - const prototype: { - }; - - } - - namespace clone { - const prototype: { - }; - - } - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachHeader { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace getHeaders { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace removeHeader { - const prototype: { - }; - - } - - namespace removeQueryParams { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - - namespace upsertHeader { - const prototype: { - }; - - } - } - } export namespace RequestAuth { @@ -3750,93 +1598,7 @@ export namespace RequestAuth { function update(options: any, type: any): void; function use(type: any, options: any): void; - - namespace clear { - const prototype: { - }; - - } - - namespace current { - const prototype: { - }; - - } - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parameters { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - - namespace use { - const prototype: { - }; - - } - } - } export namespace RequestBody { @@ -3860,69 +1622,7 @@ export namespace RequestBody { function toString(): any; function update(options: any): void; - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace isEmpty { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - } - } export namespace Response { @@ -3980,117 +1680,7 @@ export namespace Response { function toObjectResolved(scope: any, overrides: any, options: any): any; function update(options: any): void; - - namespace dataURI { - const prototype: { - }; - - } - - namespace describe { - const prototype: { - }; - - } - - namespace details { - const prototype: { - }; - - } - - namespace encoding { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace json { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace mime { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace reason { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace size { - const prototype: { - }; - - } - - namespace text { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - } - } export namespace Script { @@ -4122,75 +1712,7 @@ export namespace Script { function toSource(): any; function update(options: any): void; - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace toSource { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - } - } export namespace Url { @@ -4242,117 +1764,7 @@ export namespace Url { function toString(forceProtocol: any): any; function update(url: any): any; - - namespace addQueryParams { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace getHost { - const prototype: { - }; - - } - - namespace getOAuth1BaseUrl { - const prototype: { - }; - - } - - namespace getPath { - const prototype: { - }; - - } - - namespace getPathWithQuery { - const prototype: { - }; - - } - - namespace getQueryString { - const prototype: { - }; - - } - - namespace getRaw { - const prototype: { - }; - - } - - namespace getRemote { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace removeQueryParams { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - } - } export namespace UrlMatchPattern { @@ -4398,135 +1810,7 @@ export namespace UrlMatchPattern { function toString(): any; function update(options: any): void; - - namespace createMatchPattern { - const prototype: { - }; - - } - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace getProtocols { - const prototype: { - }; - - } - - namespace globPatternToRegexp { - const prototype: { - }; - - } - - namespace matchAbsoluteHostPattern { - const prototype: { - }; - - } - - namespace matchAnyHost { - const prototype: { - }; - - } - - namespace matchSuffixHostPattern { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace test { - const prototype: { - }; - - } - - namespace testHost { - const prototype: { - }; - - } - - namespace testPath { - const prototype: { - }; - - } - - namespace testProtocol { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - } - } export namespace UrlMatchPatternList { @@ -4596,207 +1880,7 @@ export namespace UrlMatchPatternList { function toString(): any; function upsert(item: any): any; - - namespace add { - const prototype: { - }; - - } - - namespace all { - const prototype: { - }; - - } - - namespace append { - const prototype: { - }; - - } - - namespace assimilate { - const prototype: { - }; - - } - - namespace clear { - const prototype: { - }; - - } - - namespace count { - const prototype: { - }; - - } - - namespace each { - const prototype: { - }; - - } - - namespace eachParent { - const prototype: { - }; - - } - - namespace filter { - const prototype: { - }; - - } - - namespace find { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace get { - const prototype: { - }; - - } - - namespace has { - const prototype: { - }; - - } - - namespace idx { - const prototype: { - }; - - } - - namespace indexOf { - const prototype: { - }; - - } - - namespace insert { - const prototype: { - }; - - } - - namespace insertAfter { - const prototype: { - }; - - } - - namespace map { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace one { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace populate { - const prototype: { - }; - - } - - namespace prepend { - const prototype: { - }; - - } - - namespace remove { - const prototype: { - }; - - } - - namespace repopulate { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace test { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObject { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace upsert { - const prototype: { - }; - - } - } - } export namespace Variable { @@ -4843,114 +1927,6 @@ export namespace Variable { function valueType(typeName: any, _noCast: any): any; - namespace cast { - const prototype: { - }; - - } - - namespace castIn { - const prototype: { - }; - - } - - namespace castOut { - const prototype: { - }; - - } - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace get { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace set { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace update { - const prototype: { - }; - - } - - namespace valueOf { - const prototype: { - }; - - } - - namespace valueType { - const prototype: { - }; - - } - } namespace types { @@ -5166,169 +2142,6 @@ export namespace Variable { } } - - namespace number { - namespace prototype { - // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype - const toExponential: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype - const toFixed: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype - const toLocaleString: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype - const toPrecision: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype - const toString: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.number.prototype - const valueOf: any; - - } - - } - - namespace string { - namespace prototype { - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const anchor: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const big: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const blink: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const bold: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const charAt: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const charCodeAt: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const codePointAt: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const concat: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const endsWith: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const fixed: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const fontcolor: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const fontsize: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const includes: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const indexOf: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const italics: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const lastIndexOf: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const length: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const link: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const localeCompare: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const match: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const normalize: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const padEnd: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const padStart: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const repeat: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const replace: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const search: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const slice: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const small: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const split: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const startsWith: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const strike: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const sub: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const substr: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const substring: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const sup: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const toLocaleLowerCase: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const toLocaleUpperCase: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const toLowerCase: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const toString: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const toUpperCase: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const trim: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const trimLeft: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const trimRight: any; - - // Too-deep object hierarchy from postman_collection.Variable.types.string.prototype - const valueOf: any; - - } - - } - } } @@ -5412,223 +2225,6 @@ export namespace VariableList { function toString(): any; function upsert(item: any): any; - - namespace add { - const prototype: { - }; - - } - - namespace all { - const prototype: { - }; - - } - - namespace append { - const prototype: { - }; - - } - - namespace assimilate { - const prototype: { - }; - - } - - namespace clear { - const prototype: { - }; - - } - - namespace count { - const prototype: { - }; - - } - - namespace each { - const prototype: { - }; - - } - - namespace eachParent { - const prototype: { - }; - - } - - namespace filter { - const prototype: { - }; - - } - - namespace find { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace get { - const prototype: { - }; - - } - - namespace has { - const prototype: { - }; - - } - - namespace idx { - const prototype: { - }; - - } - - namespace indexOf { - const prototype: { - }; - - } - - namespace insert { - const prototype: { - }; - - } - - namespace insertAfter { - const prototype: { - }; - - } - - namespace map { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace one { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace populate { - const prototype: { - }; - - } - - namespace prepend { - const prototype: { - }; - - } - - namespace remove { - const prototype: { - }; - - } - - namespace replace { - const prototype: { - }; - - } - - namespace repopulate { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace substitute { - const prototype: { - }; - - } - - namespace syncFromObject { - const prototype: { - }; - - } - - namespace syncToObject { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObject { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - - namespace upsert { - const prototype: { - }; - - } - } } @@ -5678,123 +2274,7 @@ export namespace VariableScope { function unset(key: any): void; function variables(): any; - - namespace addLayer { - const prototype: { - }; - - } - - namespace clear { - const prototype: { - }; - - } - - namespace describe { - const prototype: { - }; - - } - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace get { - const prototype: { - }; - - } - - namespace has { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace set { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace syncVariablesFrom { - const prototype: { - }; - - } - - namespace syncVariablesTo { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toObject { - const prototype: { - }; - - } - - namespace toObjectResolved { - const prototype: { - }; - - } - - namespace unset { - const prototype: { - }; - - } - - namespace variables { - const prototype: { - }; - - } - } - } export namespace Version { @@ -5816,62 +2296,6 @@ export namespace Version { function toJSON(): any; function toString(): any; - - namespace findInParents { - const prototype: { - }; - - } - - namespace findParentContaining { - const prototype: { - }; - - } - - namespace forEachParent { - const prototype: { - }; - - } - - namespace meta { - const prototype: { - }; - - } - - namespace parent { - const prototype: { - }; - - } - - namespace set { - const prototype: { - }; - - } - - namespace setParent { - const prototype: { - }; - - } - - namespace toJSON { - const prototype: { - }; - - } - - namespace toString { - const prototype: { - }; - - } - } - } From 27e5506ee39a823938aeaf9acd3b579e8716e2a6 Mon Sep 17 00:00:00 2001 From: Kristofer Sommestad Date: Fri, 16 Feb 2018 09:23:24 +0100 Subject: [PATCH 0025/1327] fix(sinon): update typing for `useFakeTimers` The parameters for `useFakeTimers()` changed in Sinon 3.0.0. It now expects a `config` property instead. See http://sinonjs.org/releases/v4.3.0/fake-timers/ for more details. --- types/sinon/index.d.ts | 4 ++-- types/sinon/sinon-tests.ts | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/types/sinon/index.d.ts b/types/sinon/index.d.ts index f0433a694e..24c809a71f 100644 --- a/types/sinon/index.d.ts +++ b/types/sinon/index.d.ts @@ -234,8 +234,8 @@ declare namespace Sinon { interface SinonFakeTimersStatic { (): SinonFakeTimers; - (...timers: string[]): SinonFakeTimers; - (now: number, ...timers: string[]): SinonFakeTimers; + (now?: number | Date): SinonFakeTimers; + (config: { now?: number | Date, toFake?: string[], shouldAdvanceTime?: boolean }): SinonFakeTimers; } interface SinonStatic { diff --git a/types/sinon/sinon-tests.ts b/types/sinon/sinon-tests.ts index 2e2286e538..838972798f 100644 --- a/types/sinon/sinon-tests.ts +++ b/types/sinon/sinon-tests.ts @@ -121,6 +121,10 @@ function testSandbox() { sandbox.mock(objectUnderTest).expects("process").once(); } sandbox.useFakeTimers(); + sandbox.useFakeTimers({ + now: 1, + toFake: ['Date'] + }); sandbox.useFakeXMLHttpRequest(); sandbox.useFakeServer(); sandbox.restore(); From 7b5682c2412e626dad088fa6917ee42a5e18ff86 Mon Sep 17 00:00:00 2001 From: hisorange Date: Fri, 16 Feb 2018 21:10:24 +0100 Subject: [PATCH 0026/1327] Add missing limit option --- types/bull/index.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/types/bull/index.d.ts b/types/bull/index.d.ts index 8a12db0fd7..97cb7a23df 100644 --- a/types/bull/index.d.ts +++ b/types/bull/index.d.ts @@ -164,6 +164,11 @@ declare namespace Bull { * End date when the repeat job should stop repeating */ endDate?: Date | string | number; + + /** + * Number of times the job should repeat at max. + */ + limit?: number; } interface JobOptions { From f61e27785edad81321b2f3c020809dae9220dfaa Mon Sep 17 00:00:00 2001 From: Trung Dang Date: Mon, 19 Feb 2018 00:23:33 +0700 Subject: [PATCH 0027/1327] update missing ioredis/onPossiblyUnhandledRejection --- types/ioredis/index.d.ts | 1 + types/ioredis/ioredis-tests.ts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/types/ioredis/index.d.ts b/types/ioredis/index.d.ts index de71a9f083..6834121851 100644 --- a/types/ioredis/index.d.ts +++ b/types/ioredis/index.d.ts @@ -48,6 +48,7 @@ declare namespace IORedis { } interface Redis extends NodeJS.EventEmitter, Commander { + Promise: typeof Promise; status: string; connect(callback?: () => void): Promise; disconnect(): void; diff --git a/types/ioredis/ioredis-tests.ts b/types/ioredis/ioredis-tests.ts index d8106ecdea..e8e32062dc 100644 --- a/types/ioredis/ioredis-tests.ts +++ b/types/ioredis/ioredis-tests.ts @@ -105,7 +105,10 @@ redis.multi([ // results = [[null, 'OK'], [null, 'bar']] }); -const keys = [ 'foo', 'bar' ]; +redis.Promise.onPossiblyUnhandledRejection((error) => { +}); + +const keys = ['foo', 'bar']; redis.mget(...keys); new Redis.Cluster([ From 480c8a8ba81b38b71c7cf57b800ea0c6cdefa44d Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Tue, 20 Feb 2018 15:30:53 -0500 Subject: [PATCH 0028/1327] Removed "dom" from React types tsconfig.json --- types/react/global.d.ts | 5 ++++- types/react/index.d.ts | 1 + types/react/test/index.ts | 16 +++++++++------- types/react/tsconfig.json | 3 +-- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/types/react/global.d.ts b/types/react/global.d.ts index 23af6dc7a3..c647e7239b 100644 --- a/types/react/global.d.ts +++ b/types/react/global.d.ts @@ -1,5 +1,5 @@ /* -React projects that don't include the DOM library need these interfaces to compile. +React projects that don't include the DOM library these interfaces need to compile. React Native applications use React, but there is no DOM available. The JavaScript runtime is ES6/ES2015 only. These definitions allow such projects to compile with only `--lib ES6`. */ @@ -33,6 +33,7 @@ interface HTMLBodyElement extends HTMLElement { } interface HTMLBRElement extends HTMLElement { } interface HTMLButtonElement extends HTMLElement { } interface HTMLCanvasElement extends HTMLElement { } +interface HTMLDialogElement extends HTMLElement { } interface HTMLDivElement extends HTMLElement { } interface HTMLDListElement extends HTMLElement { } interface HTMLEmbedElement extends HTMLElement { } @@ -175,3 +176,5 @@ interface SVGTextPathElement extends SVGElement { } interface SVGTSpanElement extends SVGElement { } interface SVGUseElement extends SVGElement { } interface SVGViewElement extends SVGElement { } + +interface TouchList { } diff --git a/types/react/index.d.ts b/types/react/index.d.ts index c39e5eeb6c..24884576ff 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -14,6 +14,7 @@ // Stéphane Goetz // Rich Seviora // Josh Rutherford +// Josh Goldberg // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 diff --git a/types/react/test/index.ts b/types/react/test/index.ts index 757a1da669..e0e4a09065 100644 --- a/types/react/test/index.ts +++ b/types/react/test/index.ts @@ -44,7 +44,7 @@ const props: Props & React.ClassAttributes<{}> = { foo: 42 }; -const container: Element = document.createElement("div"); +declare const container: Element; // // Top-Level API @@ -226,9 +226,9 @@ const clonedSvgElement: React.ReactSVGElement = const component: ModernComponent = ReactDOM.render(element, container); const componentNullContainer: ModernComponent = ReactDOM.render(element, null); -const componentElementOrNull: ModernComponent = ReactDOM.render(element, document.getElementById("anelement")); +const componentElementOrNull: ModernComponent = ReactDOM.render(element, container); const componentNoState: ModernComponentNoState = ReactDOM.render(elementNoState, container); -const componentNoStateElementOrNull: ModernComponentNoState = ReactDOM.render(elementNoState, document.getElementById("anelement")); +const componentNoStateElementOrNull: ModernComponentNoState = ReactDOM.render(elementNoState, container); const domComponent: Element = ReactDOM.render(domElement, container); // Other Top-Level API @@ -313,7 +313,7 @@ const htmlAttr: React.HTMLProps = { event.stopPropagation(); }, onAnimationStart: event => { - console.log(event.currentTarget.className); + const currentTarget: EventTarget & HTMLElement = event.currentTarget; }, dangerouslySetInnerHTML: { __html: "STRONG" @@ -624,7 +624,7 @@ if (TestUtils.isElementOfType(emptyElement2, StatelessComponent)) { } if (TestUtils.isDOMComponent(container)) { - container.getAttribute("className"); + const reassignedContainer: Element = container; } else if (TestUtils.isCompositeComponent(new ModernComponent({ hello: 'hi', foo: 3 }))) { new ModernComponent({ hello: 'hi', foo: 3 }).props; } @@ -670,7 +670,9 @@ class SyntheticEventTargetValue extends React.Component<{}, { value: string }> { render() { return DOM.textarea({ value: this.state.value, - onChange: e => this.setState({ value: e.target.value }) + onChange: e => { + const target: HTMLTextAreaElement = e.target; + } }); } } @@ -678,7 +680,7 @@ class SyntheticEventTargetValue extends React.Component<{}, { value: string }> { DOM.input({ onChange: event => { // `event.target` is guaranteed to be HTMLInputElement - event.target.value; + const target: HTMLInputElement = event.target; } }); diff --git a/types/react/tsconfig.json b/types/react/tsconfig.json index 1b79768acc..b999a338b3 100644 --- a/types/react/tsconfig.json +++ b/types/react/tsconfig.json @@ -8,8 +8,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6", - "dom" + "es6" ], "noImplicitAny": true, "noImplicitThis": false, From 2cd2bd872694741753a201574a8168a4a913cdb2 Mon Sep 17 00:00:00 2001 From: Alex Regan Date: Tue, 20 Feb 2018 15:09:07 -0700 Subject: [PATCH 0029/1327] fix(bull): adds `Queue.process` overloads --- types/bull/index.d.ts | 59 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/types/bull/index.d.ts b/types/bull/index.d.ts index a7a9ea350b..a77552cb9a 100644 --- a/types/bull/index.d.ts +++ b/types/bull/index.d.ts @@ -265,6 +265,24 @@ declare namespace Bull { */ process(callback: (job: Job, done: DoneCallback) => void): void; + /** + * Defines a processing function for the jobs placed into a given Queue. + * + * The handlerPath defines the path to the job callback. + * Using a handlerPath has several advantages: + * - The process is sandboxed so if it crashes it does not affect the worker. + * - You can run blocking code without affecting the queue (jobs will not stall). + * - Much better utilization of multi-core CPUs. + * - Less connections to redis. + * + * It is passed an instance of the job as first argument. + * + * A promise must be returned to signal job completion. + * If the promise is rejected, the error will be passed as a second argument to the "failed" event. + * If it is resolved, its value will be the "completed" event's second argument. + */ + process(handlerPath: string): void; + /** * Defines a processing function for the jobs placed into a given Queue. * @@ -291,6 +309,26 @@ declare namespace Bull { */ process(concurrency: number, callback: (job: Job) => void): Promise; + /** + * Defines a processing function for the jobs placed into a given Queue. + * + * The handlerPath defines the path to the job callback. + * Using a handlerPath has several advantages: + * - The process is sandboxed so if it crashes it does not affect the worker. + * - You can run blocking code without affecting the queue (jobs will not stall). + * - Much better utilization of multi-core CPUs. + * - Less connections to redis. + * + * It is passed an instance of the job as first argument. + * + * A promise must be returned to signal job completion. + * If the promise is rejected, the error will be passed as a second argument to the "failed" event. + * If it is resolved, its value will be the "completed" event's second argument. + * + * @param concurrency Bull will then call you handler in parallel respecting this max number. + */ + process(concurrency: number, handlerPath: string): void; + /** * Defines a processing function for the jobs placed into a given Queue. * @@ -337,6 +375,27 @@ declare namespace Bull { // tslint:disable-next-line:unified-signatures process(name: string, callback: (job: Job, done: DoneCallback) => void): void; + /** + * Defines a processing function for the jobs placed into a given Queue. + * + * The handlerPath defines the path to the job callback. + * Using a handlerPath has several advantages: + * - The process is sandboxed so if it crashes it does not affect the worker. + * - You can run blocking code without affecting the queue (jobs will not stall). + * - Much better utilization of multi-core CPUs. + * - Less connections to redis. + * + * It is passed an instance of the job as first argument. + * + * A promise must be returned to signal job completion. + * If the promise is rejected, the error will be passed as a second argument to the "failed" event. + * If it is resolved, its value will be the "completed" event's second argument. + * + * @param name Bull will only call the handler if the job name matches + * @param concurrency Bull will then call you handler in parallel respecting this max number. + */ + process(name: string, concurrency: number, handlerPath: string): void; + /** * Defines a named processing function for the jobs placed into a given Queue. * From ebcbc212b7da009de20e1802c05b8f66ec7c2be5 Mon Sep 17 00:00:00 2001 From: Alex Regan Date: Tue, 20 Feb 2018 15:20:04 -0700 Subject: [PATCH 0030/1327] fix(bull): merge overload decls with same arity --- types/bull/index.d.ts | 87 +++++++++++++------------------------------ 1 file changed, 26 insertions(+), 61 deletions(-) diff --git a/types/bull/index.d.ts b/types/bull/index.d.ts index a77552cb9a..77317c44ff 100644 --- a/types/bull/index.d.ts +++ b/types/bull/index.d.ts @@ -257,31 +257,19 @@ declare namespace Bull { * * The callback is called everytime a job is placed in the queue. * It is passed an instance of the job as first argument. + * The callback can also be defined as the string path to a module + * exporting the callback function. Using a path has several advantages: + * - The process is sandboxed so if it crashes it does not affect the worker. + * - You can run blocking code without affecting the queue (jobs will not stall). + * - Much better utilization of multi-core CPUs. + * - Less connections to redis. * * The done callback can be called with an Error instance, to signal that the job did not complete successfully, * or with a result as second argument as second argument (e.g.: done(null, result);) when the job is successful. * Errors will be passed as a second argument to the "failed" event; * results, as a second argument to the "completed" event. */ - process(callback: (job: Job, done: DoneCallback) => void): void; - - /** - * Defines a processing function for the jobs placed into a given Queue. - * - * The handlerPath defines the path to the job callback. - * Using a handlerPath has several advantages: - * - The process is sandboxed so if it crashes it does not affect the worker. - * - You can run blocking code without affecting the queue (jobs will not stall). - * - Much better utilization of multi-core CPUs. - * - Less connections to redis. - * - * It is passed an instance of the job as first argument. - * - * A promise must be returned to signal job completion. - * If the promise is rejected, the error will be passed as a second argument to the "failed" event. - * If it is resolved, its value will be the "completed" event's second argument. - */ - process(handlerPath: string): void; + process(callback: (job: Job, done: DoneCallback) => void | string): void; /** * Defines a processing function for the jobs placed into a given Queue. @@ -312,29 +300,15 @@ declare namespace Bull { /** * Defines a processing function for the jobs placed into a given Queue. * - * The handlerPath defines the path to the job callback. - * Using a handlerPath has several advantages: + * The callback is called everytime a job is placed in the queue. + * It is passed an instance of the job as first argument. + * The callback can also be defined as the string path to a module + * exporting the callback function. Using a path has several advantages: * - The process is sandboxed so if it crashes it does not affect the worker. * - You can run blocking code without affecting the queue (jobs will not stall). * - Much better utilization of multi-core CPUs. * - Less connections to redis. * - * It is passed an instance of the job as first argument. - * - * A promise must be returned to signal job completion. - * If the promise is rejected, the error will be passed as a second argument to the "failed" event. - * If it is resolved, its value will be the "completed" event's second argument. - * - * @param concurrency Bull will then call you handler in parallel respecting this max number. - */ - process(concurrency: number, handlerPath: string): void; - - /** - * Defines a processing function for the jobs placed into a given Queue. - * - * The callback is called everytime a job is placed in the queue. - * It is passed an instance of the job as first argument. - * * The done callback can be called with an Error instance, to signal that the job did not complete successfully, * or with a result as second argument as second argument (e.g.: done(null, result);) when the job is successful. * Errors will be passed as a second argument to the "failed" event; @@ -342,7 +316,7 @@ declare namespace Bull { * * @param concurrency Bull will then call you handler in parallel respecting this max number. */ - process(concurrency: number, callback: (job: Job, done: DoneCallback) => void): void; + process(concurrency: number, callback: (job: Job, done: DoneCallback) => void | string): void; /** * Defines a named processing function for the jobs placed into a given Queue. @@ -364,6 +338,12 @@ declare namespace Bull { * * The callback is called everytime a job is placed in the queue. * It is passed an instance of the job as first argument. + * The callback can also be defined as the string path to a module + * exporting the callback function. Using a path has several advantages: + * - The process is sandboxed so if it crashes it does not affect the worker. + * - You can run blocking code without affecting the queue (jobs will not stall). + * - Much better utilization of multi-core CPUs. + * - Less connections to redis. * * The done callback can be called with an Error instance, to signal that the job did not complete successfully, * or with a result as second argument as second argument (e.g.: done(null, result);) when the job is successful. @@ -373,28 +353,7 @@ declare namespace Bull { * @param name Bull will only call the handler if the job name matches */ // tslint:disable-next-line:unified-signatures - process(name: string, callback: (job: Job, done: DoneCallback) => void): void; - - /** - * Defines a processing function for the jobs placed into a given Queue. - * - * The handlerPath defines the path to the job callback. - * Using a handlerPath has several advantages: - * - The process is sandboxed so if it crashes it does not affect the worker. - * - You can run blocking code without affecting the queue (jobs will not stall). - * - Much better utilization of multi-core CPUs. - * - Less connections to redis. - * - * It is passed an instance of the job as first argument. - * - * A promise must be returned to signal job completion. - * If the promise is rejected, the error will be passed as a second argument to the "failed" event. - * If it is resolved, its value will be the "completed" event's second argument. - * - * @param name Bull will only call the handler if the job name matches - * @param concurrency Bull will then call you handler in parallel respecting this max number. - */ - process(name: string, concurrency: number, handlerPath: string): void; + process(name: string, callback: (job: Job, done: DoneCallback) => void | string): void; /** * Defines a named processing function for the jobs placed into a given Queue. @@ -416,6 +375,12 @@ declare namespace Bull { * * The callback is called everytime a job is placed in the queue. * It is passed an instance of the job as first argument. + * The callback can also be defined as the string path to a module + * exporting the callback function. Using a path has several advantages: + * - The process is sandboxed so if it crashes it does not affect the worker. + * - You can run blocking code without affecting the queue (jobs will not stall). + * - Much better utilization of multi-core CPUs. + * - Less connections to redis. * * The done callback can be called with an Error instance, to signal that the job did not complete successfully, * or with a result as second argument as second argument (e.g.: done(null, result);) when the job is successful. @@ -425,7 +390,7 @@ declare namespace Bull { * @param name Bull will only call the handler if the job name matches * @param concurrency Bull will then call you handler in parallel respecting this max number. */ - process(name: string, concurrency: number, callback: (job: Job, done: DoneCallback) => void): void; + process(name: string, concurrency: number, callback: (job: Job, done: DoneCallback) => void | string): void; /** * Creates a new job and adds it to the queue. From bf9864b51f6d7d0b9fa3410cbe00d7cad47aa337 Mon Sep 17 00:00:00 2001 From: Kyle Buzby Date: Wed, 21 Feb 2018 17:26:28 -0600 Subject: [PATCH 0031/1327] roughly complete documented types from the web site TODO: update function signatures for parameters that are functions --- types/postman-collection/index.d.ts | 2733 ++++++--------------------- 1 file changed, 617 insertions(+), 2116 deletions(-) diff --git a/types/postman-collection/index.d.ts b/types/postman-collection/index.d.ts index 1247493c85..5365b9cfaf 100644 --- a/types/postman-collection/index.d.ts +++ b/types/postman-collection/index.d.ts @@ -2,2300 +2,801 @@ // Project: https://github.com/postmanlabs/postman-collection // Definitions by: Kyle Buzby // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// + +export class PropertyBase { + constructor(definition: any); -declare module PostmanCollection { - export class Certificate { - constructor(options: any, ...args: any[]); - - canApplyTo(url: any): any; - - toJSON(): any; - - update(options: any): void; - - static isCertificate(obj: any): any; - - } - - export class CertificateList { - constructor(parent: any, list: any); - - resolveOne(url: any): any; - - static isCertificateList(obj: any): any; - - } - - export class Collection { - constructor(definition: any, environments: any); - - syncVariablesFrom(obj: any, track: any): any; - - syncVariablesTo(obj: any): any; - - toJSON(): any; - - static isCollection(obj: any): any; - - } - - export class Cookie { - constructor(options: any); - - update(options: any): void; - - valueOf(): any; - - static isCookie(obj: any): any; - - static parse(str: any): any; - - static splitParam(param: any): any; - - } - - export class Description { - constructor(definition: any); - - toJSON(): any; - - toString(): any; - - update(content: any, type: any): void; - - static isDescription(obj: any): any; - - } - - export class Event { - constructor(definition: any); - - update(definition: any): void; - - } - - export class EventList { - constructor(parent: any, populate: any); - - listeners(name: any): any; - - listenersOwn(name: any): any; - - static isEventList(obj: any): any; - - } - - export class FormParam { - constructor(options: any, ...args: any[]); - - toString(): any; - - valueOf(): any; - - static parse(): void; - - } - - export class Header { - constructor(options: any, name: any, ...args: any[]); - - toString(): any; - - update(options: any): void; - - valueOf(): any; - - static create(...args: any[]): any; - - static isHeader(obj: any): any; - - static parse(headerString: any): any; - - static parseSingle(header: any): any; - - static unparse(headers: any, separator: any): any; - - static unparseSingle(header: any): any; - - } - - export class HeaderList { - constructor(parent: any, headers: any); - - contentSize(): any; - - static isHeaderList(obj: any): any; - - } - - export class Item { - constructor(definition: any, ...args: any[]); - - authorizeRequestUsing(type: any, options: any): any; - - getAuth(): any; - - getEvents(name: any): any; - - static isItem(obj: any): any; - - } - - export class ItemGroup { - constructor(definition: any, ...args: any[]); - - authorizeRequestsUsing(type: any, options: any): void; - - forEachItem(callback: any): any; - - forEachItemGroup(callback: any): void; - - oneDeep(idOrName: any): any; - - static isItemGroup(obj: any): any; - - } - - export class Property { - constructor(definition: any, ...args: any[]); - - describe(content: any, type: any): void; - - toObjectResolved(scope: any, overrides: any, options: any): any; - - static replaceSubstitutions(str: any, variables: any, ...args: any[]): any; - - static replaceSubstitutionsIn(obj: any, variables: any, mutate: any): any; - - } - - export class PropertyBase { - constructor(definition: any); - - findInParents(property: any, customizer: any): any; - - findParentContaining(property: any, customizer: any): any; - - forEachParent(options: any, iterator: any): void; - - meta(...args: any[]): any; - - parent(): any; - - setParent(parent: any): void; - - toJSON(): any; - - static propertyIsMeta(value: any, key: any): any; - - static propertyUnprefixMeta(value: any, key: any): any; - - static toJSON(obj: any): any; - - } - - export class PropertyList { - constructor(type: any, parent: any, populate: any); - - add(item: any, ...args: any[]): void; - - all(): any; - - append(item: any): any; - - assimilate(source: any, prune: any): void; - - clear(): void; - - count(): any; - - each(iterator: any, context: any): void; - - eachParent(iterator: any, context: any): void; - - filter(rule: any, context: any): any; - - find(rule: any, context: any): any; - - get(key: any): any; - - has(item: any, value: any, ...args: any[]): any; - - idx(index: any): any; - - indexOf(item: any): any; - - insert(item: any, before: any): void; - - insertAfter(item: any, after: any): any; - - map(iterator: any, context: any): any; - - one(id: any): any; - - populate(items: any): void; - - prepend(item: any): any; - - remove(predicate: any, context: any, ...args: any[]): any; - - repopulate(items: any): void; - - toJSON(): any; - - toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; - - toString(): any; - - upsert(item: any): any; - - static isPropertyList(obj: any): any; - - } - - export class ProxyConfig { - constructor(options: any); - - getProtocols(): any; - - getProxyUrl(): any; - - test(urlStr: any): any; - - update(options: any): void; - - updateProtocols(protocols: any): void; - - static isProxyConfig(obj: any): any; - - } - - export class ProxyConfigList { - constructor(parent: any, populate: any); - - resolve(url: any): any; - - static isProxyConfigList(obj: any): any; - - } - - export class QueryParam { - constructor(options: any, ...args: any[]); - - toString(): any; - - update(param: any): void; - - valueOf(): any; - - static parse(query: any): any; - - static parseSingle(param: any, idx: any, all: any): any; - - static unparse(params: any, options: any): any; - - static unparseSingle(obj: any, encode: any): any; - - } - - export class Request { - constructor(options: any, ...args: any[]); - - addHeader(header: any): void; - - addQueryParams(params: any): void; - - authorize(): void; - - authorizeUsing(type: any, options: any): void; - - clone(): any; - - forEachHeader(callback: any): any; - - getHeaders(options: any): any; - - removeHeader(toRemove: any, options: any): any; - - removeQueryParams(params: any): void; - - toJSON(): any; - - update(options: any): void; - - upsertHeader(header: any): any; - - static isRequest(obj: any): any; - - } - - export class RequestAuth { - constructor(options: any, parent: any); - - clear(type: any): void; - - current(): any; - - parameters(): any; - - update(options: any, type: any): void; - - use(type: any, options: any): void; - - static isValidType(type: any): any; - - } - - export class RequestBody { - constructor(options: any, ...args: any[]); - - isEmpty(): any; - - toString(): any; - - update(options: any): void; - - static MODES: { - file: string; - formdata: string; - raw: string; - urlencoded: string; - }; - - } - - export class Response { - constructor(options: any, ...args: any[]); - - dataURI(): any; - - details(): any; - - encoding(): any; - - json(reviver: any, strict: any): any; - - mime(contentType: any, contentDisposition: any): any; - - reason(): any; - - size(): any; - - text(): any; - - toJSON(): any; - - update(options: any): void; - - static createFromNode(response: any, cookies: any): any; - - static isResponse(obj: any): any; - - static mimeInfo(type: any, disposition: any): any; - - } - - export class Script { - constructor(options: any, ...args: any[]); - - toSource(): any; - - update(options: any): void; - - static isScript(obj: any): any; - - } - - export class Url { - constructor(options: any, ...args: any[]); - - addQueryParams(params: any): void; - - getHost(): any; - - getOAuth1BaseUrl(): any; - - getPath(options: any): any; - - getPathWithQuery(): any; - - getQueryString(options: any): any; - - getRaw(): any; - - getRemote(options: any): any; - - removeQueryParams(params: any): any; - - toString(forceProtocol: any): any; - - update(url: any): any; - - static isUrl(obj: any): any; - - static parse(url: any): any; - - } - - export class UrlMatchPattern { - constructor(options: any, ...args: any[]); - - createMatchPattern(): any; - - getProtocols(): any; - - globPatternToRegexp(pattern: any): any; - - matchAbsoluteHostPattern(matchRegexObject: any, remote: any): any; - - matchAnyHost(matchRegexObject: any): any; - - matchSuffixHostPattern(matchRegexObject: any, remote: any): any; - - test(urlStr: any): any; - - testHost(host: any): any; - - testPath(path: any): any; - - testProtocol(protocol: any): any; - - toJSON(): any; - - toString(): any; - - update(options: any): void; - - static MATCH_ALL_URLS: string; - - static PROTOCOL_DELIMITER: string; - - } - - export class UrlMatchPatternList { - constructor(parent: any, list: any); - - test(urlStr: any): any; - - } - - export class Variable { - constructor(definition: any, ...args: any[]); - - cast(value: any): any; - - castIn(value: any): any; - - castOut(value: any): any; - - get(): any; - - set(value: any): void; - - toString(): any; - - update(options: any): void; - - valueOf(value: any, ...args: any[]): any; - - valueType(typeName: any, _noCast: any): any; - - static isVariable(obj: any): any; - - } - - export class VariableList { - constructor(parent: any, populate: any); - - replace(str: any, overrides: any): any; - - substitute(obj: any, overrides: any, mutate: any): any; - - syncFromObject(obj: any, track: any, prune: any): any; - - syncToObject(obj: any): any; - - static isVariableList(obj: any): any; - - } - - export class VariableScope { - constructor(definition: any, layers: any); - - addLayer(list: any): void; - - clear(): void; - - get(key: any): any; - - has(variableName: any): any; - - set(key: any, value: any, type: any): any; - - syncVariablesFrom(obj: any, track: any): any; - - syncVariablesTo(obj: any): any; - - toJSON(): any; - - toObject(excludeDisabled: any, caseSensitive: any): any; - - unset(key: any): void; - - variables(): any; - - static isVariableScope(obj: any): any; - - } - - export class Version { - constructor(options: any); - - set(value: any): void; - - toString(): any; - - } - - export function CookieList(parent: any, cookies: any): void; - -} + findInParents(property: string, customizer?: any): any | undefined; // TODO Update customizer function def -export namespace Certificate { - namespace isCertificate { - const prototype: { - }; + findParentContaining(property: any, customizer: any): any; // TODO Update customizer function def - } + forEachParent(iterator: any): void; // TODO Update iterator function def + forEachParent(options: any | boolean, iterator: any): void; // TODO Update iterator function def - namespace prototype { - function canApplyTo(url: any): any; + meta(): any; - function describe(content: any, type: any): void; + parent(): any | undefined; - function findInParents(property: any, customizer: any): any; + setParent(parent: any): void; - function findParentContaining(property: any, customizer: any): any; + toJSON(): any; - function forEachParent(options: any, iterator: any): void; + static propertyIsMeta(value: any, key: any): any; - function meta(...args: any[]): any; + static propertyUnprefixMeta(value: any, key: any): any; - function parent(): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function update(options: any): void; - } + static toJSON(obj: any): any; } -export namespace CertificateList { - namespace isCertificateList { - const prototype: { - }; +export interface PropertyDefinition { + id?: string; + name?: string; + disabled?: boolean; +} - } +export class Property extends PropertyBase implements PropertyDefinition { + auth: RequestAuth; + disabled: boolean; + id: string; + name: string; - namespace prototype { - function add(item: any, ...args: any[]): void; + constructor(definition?: PropertyDefinition); - function all(): any; + describe(content: string, type?: string): void; - function append(item: any): any; + toObjectResolved(scope: any, overrides: any, options: any): any; - function assimilate(source: any, prune: any): void; + static replaceSubstitutions(str: string, variables: VariableList | any | (VariableList | any)[]): string; - function clear(): void; - - function count(): any; - - function each(iterator: any, context: any): void; - - function eachParent(iterator: any, context: any): void; - - function filter(rule: any, context: any): any; - - function find(rule: any, context: any): any; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function get(key: any): any; - - function has(item: any, value: any, ...args: any[]): any; - - function idx(index: any): any; - - function indexOf(item: any): any; - - function insert(item: any, before: any): void; - - function insertAfter(item: any, after: any): any; - - function map(iterator: any, context: any): any; - - function meta(...args: any[]): any; - - function one(id: any): any; - - function parent(): any; - - function populate(items: any): void; - - function prepend(item: any): any; - - function remove(predicate: any, context: any, ...args: any[]): any; - - function repopulate(items: any): void; - - function resolveOne(url: any): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; - - function toString(): any; - - function upsert(item: any): any; - - } + static replaceSubstitutionsIn(obj: any, variables: (VariableList | any)[], mutate: boolean): any; } -export namespace Collection { - namespace isCollection { - const prototype: { - }; +export interface CertificateDefinition extends PropertyDefinition { + name?: string; + matches?: any[]; + key?: any; + cert?: any; + passphrase?: string; +} - } +export class Certificate extends Property { + cert: any; + id: string; + key: any; + matches: any; // TODO update to UrlMatchPatternList? + name: string; + passphrase: any; - namespace prototype { - function authorizeRequestsUsing(type: any, options: any): void; + constructor(options: any); - function describe(content: any, type: any): void; + canApplyTo(url: string | Url): any; - function findInParents(property: any, customizer: any): any; + toJSON(): CertificateDefinition; - function findParentContaining(property: any, customizer: any): any; + update(options: CertificateDefinition): void; - function forEachItem(callback: any): any; - - function forEachItemGroup(callback: any): void; - - function forEachParent(options: any, iterator: any): void; - - function meta(...args: any[]): any; - - function oneDeep(idOrName: any): any; - - function parent(): any; - - function setParent(parent: any): void; - - function syncVariablesFrom(obj: any, track: any): any; - - function syncVariablesTo(obj: any): any; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - } + static isCertificate(obj: any): boolean; } -export namespace Cookie { - namespace isCookie { - const prototype: { - }; - } +export class PropertyList { + constructor(type: any, parent: any, populate: any); - namespace parse { - const prototype: { - }; + add(item: any | TElement): void; - } + all(): any; - namespace prototype { - function findInParents(property: any, customizer: any): any; + append(item: TElement): any; - function findParentContaining(property: any, customizer: any): any; + assimilate(source: PropertyList | any[], prune: boolean): void; - function forEachParent(options: any, iterator: any): void; + clear(): void; - function meta(...args: any[]): any; + count(): number; - function parent(): any; + each(iterator: any, context: any): void; - function setParent(parent: any): void; + eachParent(iterator: any, context?: any): void; - function toJSON(): any; + filter(rule: any, context: any): any; - function update(options: any): void; + find(rule: any, context?: any): Item | ItemGroup; - function valueOf(): any; + get(key: string | any): TElement; - } + has(item: string | TElement, value?: any): boolean; - namespace splitParam { - const prototype: { - }; + idx(index: number): TElement; - } + indexOf(item: string | any): number; + + insert(item: TElement, before: TElement | string): void; + + insertAfter(item: TElement, after: TElement | string): any; + + map(iterator: any, context: any): any; + + one(id: string): TElement; + + populate(items: any | any[]): void; + + prepend(item: TElement): any; + + remove(predicate: any | string | TElement, context: any): any; + + repopulate(items: any | any[]): void; + + toJSON(): any; + + toObject(excludeDisabled?: any | null, caseSensitive?: any | null, multiValue?: any | null, sanitizeKeys?: any): any; + + toString(): string; + + upsert(item: TElement): boolean | null; + + static isPropertyList(obj: any): any; } -export namespace CookieList { - function isCookieList(obj: any): any; +export class CertificateList extends PropertyList { + constructor(parent: any, list: CertificateDefinition[]); - namespace isCookieList { - const prototype: { - }; + resolveOne(url: string): CertificateDefinition; - } - - namespace prototype { - function add(item: any, ...args: any[]): void; - - function all(): any; - - function append(item: any): any; - - function assimilate(source: any, prune: any): void; - - function clear(): void; - - function count(): any; - - function each(iterator: any, context: any): void; - - function eachParent(iterator: any, context: any): void; - - function filter(rule: any, context: any): any; - - function find(rule: any, context: any): any; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function get(key: any): any; - - function has(item: any, value: any, ...args: any[]): any; - - function idx(index: any): any; - - function indexOf(item: any): any; - - function insert(item: any, before: any): void; - - function insertAfter(item: any, after: any): any; - - function map(iterator: any, context: any): any; - - function meta(...args: any[]): any; - - function one(id: any): any; - - function parent(): any; - - function populate(items: any): void; - - function prepend(item: any): any; - - function remove(predicate: any, context: any, ...args: any[]): any; - - function repopulate(items: any): void; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; - - function toString(): any; - - function upsert(item: any): any; - - - } + static isCertificateList(obj: any): boolean; } -export namespace Description { - namespace format { - } +export interface ItemGroupDefinition extends PropertyDefinition { + item?: (ItemDefinition | ItemGroupDefinition)[]; + auth?: RequestAuthDefinition; + event?: EventDefinition[]; +} + +export class ItemGroup extends Property { + auth: RequestAuth; + items: PropertyList; - namespace isDescription { - const prototype: { - }; + constructor(definition?: ItemGroupDefinition); - } + authorizeRequestsUsing(type: any, options: any): void; // TODO add better types for parameters - namespace prototype { - function toJSON(): any; + forEachItem(callback: any): any; - function toString(): any; + forEachItemGroup(callback: any): void; - function update(content: any, type: any): void; + oneDeep(idOrName: string): TItem; - } + static isItemGroup(obj: any): boolean; } -export namespace Event { - namespace prototype { - function describe(content: any, type: any): void; +export interface CollectionDefinition extends ItemGroupDefinition { + info?: { + id?: string; + name?: string; + version?: string; + }; + item?: (ItemDefinition | ItemGroupDefinition)[]; + variable?: VariableDefinition; + auth?: RequestAuthDefinition; + event?: EventDefinition[]; + version?: string | Version; +} - function findInParents(property: any, customizer: any): any; +export class Collection extends ItemGroup implements CollectionDefinition { + events: EventList; + variables: VariableList; + version: Version; - function findParentContaining(property: any, customizer: any): any; + constructor(definition?: CollectionDefinition, environments?: any[]); - function forEachParent(options: any, iterator: any): void; + syncVariablesFrom(obj: any, track?: boolean): any; - function meta(...args: any[]): any; + syncVariablesTo(obj?: any): any; - function parent(): any; + toJSON(): any; - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function update(definition: any): void; - } + static isCollection(obj: any): boolean; } -export namespace EventList { - namespace isEventList { - const prototype: { - }; - - } - - namespace prototype { - function add(item: any, ...args: any[]): void; - - function all(): any; - - function append(item: any): any; - - function assimilate(source: any, prune: any): void; - - function clear(): void; - - function count(): any; - - function each(iterator: any, context: any): void; - - function eachParent(iterator: any, context: any): void; - - function filter(rule: any, context: any): any; - - function find(rule: any, context: any): any; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function get(key: any): any; - - function has(item: any, value: any, ...args: any[]): any; - - function idx(index: any): any; - - function indexOf(item: any): any; - - function insert(item: any, before: any): void; - - function insertAfter(item: any, after: any): any; - - function listeners(name: any): any; - - function listenersOwn(name: any): any; - - function map(iterator: any, context: any): any; - - function meta(...args: any[]): any; - - function one(id: any): any; - - function parent(): any; - - function populate(items: any): void; - - function prepend(item: any): any; - - function remove(predicate: any, context: any, ...args: any[]): any; - - function repopulate(items: any): void; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; - - function toString(): any; - - function upsert(item: any): any; - } +export interface CookieDefinition { + key?: string; + value?: string; + expires?: string | Date; + maxAge?: number; + domain?: string; + path?: string; + secure?: boolean; + httpOnly?: boolean; + hostOnly?: boolean; + session?: boolean; + extensions?: {key: string; value: string}[]; } -export namespace FormParam { - namespace parse { - const prototype: { - }; +export class Cookie extends PropertyBase implements CookieDefinition { + domain: string; + expires: Date | string; + extensions: {key: string; value: string}[]; + hostOnly: any; + httpOnly: any; + maxAge: number; + name: string; + path: string; + secure: any; + session: any; + value: string; - } + constructor(options?: CookieDefinition); - namespace prototype { - function describe(content: any, type: any): void; + update(options: any): void; - function findInParents(property: any, customizer: any): any; + valueOf(): string; - function findParentContaining(property: any, customizer: any): any; + static isCookie(obj: any): boolean; - function forEachParent(options: any, iterator: any): void; + static parse(str: string): any; - function meta(...args: any[]): any; - - function parent(): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function toString(): any; - - function valueOf(): any; - } + static splitParam(param: any): any; } -export namespace Header { - namespace create { - const prototype: { - }; +export class CookieList extends PropertyList { + constructor(parent: any, cookies: any[]); - } + static isCookieList(obj: any): boolean; +} - namespace isHeader { - const prototype: { - }; +export interface DescriptionDefinition { + content: string; + format: string; +} - } +export class Description implements DescriptionDefinition { + format: string; // TODO huh? + content: string; + type: string; - namespace parse { - const prototype: { - }; + constructor(definition?: DescriptionDefinition); - } + toJSON(): any; - namespace parseSingle { - const prototype: { - }; + toString(): string; - } + update(content: string | DescriptionDefinition, type?: string): void; - namespace prototype { - function describe(content: any, type: any): void; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function meta(...args: any[]): any; - - function parent(): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function toString(): any; - - function update(options: any): void; - - function valueOf(): any; - } - - namespace unparse { - const prototype: { - }; - - } - - namespace unparseSingle { - const prototype: { - }; - - } + static isDescription(obj: any): boolean; } -export namespace HeaderList { - namespace isHeaderList { - const prototype: { - }; +export interface EventDefinition extends PropertyDefinition { + listen: string; + script: string | Script; +} - } +export class Event extends Property implements EventDefinition { + listen: string; + script: string; - namespace prototype { - function add(item: any, ...args: any[]): void; + constructor(definition: EventDefinition); - function all(): any; + update(definition: EventDefinition): void; +} - function append(item: any): any; +export class EventList extends PropertyList { + constructor(parent: any, populate: any[]); - function assimilate(source: any, prune: any): void; + listeners(name: string): Event[]; - function clear(): void; + listenersOwn(name: string): Event[]; - function contentSize(): any; - - function count(): any; - - function each(iterator: any, context: any): void; - - function eachParent(iterator: any, context: any): void; - - function filter(rule: any, context: any): any; - - function find(rule: any, context: any): any; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function get(key: any): any; - - function has(item: any, value: any, ...args: any[]): any; - - function idx(index: any): any; - - function indexOf(item: any): any; - - function insert(item: any, before: any): void; - - function insertAfter(item: any, after: any): any; - - function map(iterator: any, context: any): any; - - function meta(...args: any[]): any; - - function one(id: any): any; - - function parent(): any; - - function populate(items: any): void; - - function prepend(item: any): any; - - function remove(predicate: any, context: any, ...args: any[]): any; - - function repopulate(items: any): void; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; - - function toString(): any; - - function upsert(item: any): any; - } + static isEventList(obj: any): boolean; } -export namespace Item { - namespace isItem { - const prototype: { - }; +export interface FormParamDefinition extends PropertyDefinition { + key: string; + value: string; +} - } +export class FormParam extends Property implements FormParamDefinition{ + key: string; + value: string; - namespace prototype { - function authorizeRequestUsing(type: any, options: any): any; + static _postman_propertyAllowsMultipleValues: boolean; + static _postman_propertyIndex: string; - function describe(content: any, type: any): void; + constructor(options: FormParamDefinition); - function findInParents(property: any, customizer: any): any; + toString(): string; - function findParentContaining(property: any, customizer: any): any; + valueOf(): any | string; - function forEachParent(options: any, iterator: any): void; + // static parse(): void; // TODO not implemented yet +} - function getAuth(): any; +export interface HeaderDefinition extends PropertyDefinition { + key: string; + value: string; +} - function getEvents(name: any): any; +export class Header extends Property implements HeaderDefinition { + key: string; + value: string; - function meta(...args: any[]): any; + constructor(options: HeaderDefinition | string, name?: string); - function parent(): any; + toString(): string; - function setParent(parent: any): void; + update(options: any): void; - function toJSON(): any; + valueOf(): string; - function toObjectResolved(scope: any, overrides: any, options: any): any; - } + static create(value?: HeaderDefinition | string, name?: string): Header; + + static isHeader(obj: any): boolean; + + static parse(headerString: string): HeaderDefinition[]; + + static parseSingle(header: string): HeaderDefinition; + + static unparse(headers: HeaderList | any[], separator?: string): string; + + static unparseSingle(header: Header): string; +} + +export class HeaderList extends PropertyList
{ + constructor(parent: any, headers: Header[]); + + contentSize(): number; + + static isHeaderList(obj: any): boolean; +} + +export interface ItemDefinition extends PropertyDefinition { + request?: RequestDefinition; + responses?: ResponseDefinition[]; + events?: EventDefinition[]; +} + +export class Item extends Property implements ItemDefinition { + events: EventDefinition[]; + request: Request; + responses: ResponseDefinition[]; + + constructor(definition?: ItemDefinition); + + authorizeRequestUsing(type: string | RequestAuthDefinition, options?: VariableList): any; + + getAuth(): RequestAuth; + + getEvents(name: string): Event[]; + + static isItem(obj: any): boolean; } -export namespace ItemGroup { - namespace isItemGroup { - const prototype: { - }; +export interface ProxyConfigDefinition extends PropertyDefinition { + match?: string; + host?: string; + port?: number; + tunnel?: boolean; + disabled?: boolean; +} - } +export class ProxyConfig extends Property implements ProxyConfigDefinition { + static host: string; + static match: string; + static port: number; + static tunnel: boolean; - namespace prototype { - function authorizeRequestsUsing(type: any, options: any): void; + constructor(options?: ProxyConfigDefinition); - function describe(content: any, type: any): void; + getProtocols(): string[]; - function findInParents(property: any, customizer: any): any; + getProxyUrl(): string; - function findParentContaining(property: any, customizer: any): any; + test(urlStr?: string): any; - function forEachItem(callback: any): any; + update(options: ProxyConfigDefinition): void; - function forEachItemGroup(callback: any): void; + updateProtocols(protocols: string[]): void; - function forEachParent(options: any, iterator: any): void; - - function meta(...args: any[]): any; - - function oneDeep(idOrName: any): any; - - function parent(): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - } + static isProxyConfig(obj: any): boolean; } -export namespace Property { - namespace prototype { - function describe(content: any, type: any): void; +export class ProxyConfigList extends PropertyList { + constructor(parent: any, populate: ProxyConfig[]); - function findInParents(property: any, customizer: any): any; + resolve(url?: Url): ProxyConfigDefinition; - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function meta(...args: any[]): any; - - function parent(): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - } - - namespace replaceSubstitutions { - const prototype: { - }; - - } - - namespace replaceSubstitutionsIn { - const prototype: { - }; - - } + static isProxyConfigList(obj: any): boolean; } -export namespace PropertyBase { - namespace propertyIsMeta { - const prototype: { - }; - - } - - namespace propertyUnprefixMeta { - const prototype: { - }; - - } - - namespace prototype { - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function meta(...args: any[]): any; - - function parent(): any; - - function setParent(parent: any): void; - - function toJSON(): any; - } +export interface QueryParamDefinition extends PropertyDefinition { + key: string; + value: string; } -export namespace PropertyList { - namespace isPropertyList { - const prototype: { - }; +export class QueryParam extends Property implements QueryParamDefinition { + static _postman_propertyAllowsMultipleValues: boolean; + static _postman_propertyIndexKey: string; - } + key: string; + value: string; - namespace prototype { - function add(item: any, ...args: any[]): void; + constructor(options: QueryParamDefinition | string); - function all(): any; + toString(): string; - function append(item: any): any; + update(param: string | {key: string, value?: string}): void; - function assimilate(source: any, prune: any): void; + valueOf(): any; - function clear(): void; + static parse(query: string): any[]; - function count(): any; + static parseSingle(param: string, idx: number, all: string[]): any; - function each(iterator: any, context: any): void; + static unparse(params: any | any[], options?: {encode?: boolean | null, ignoreDisabled?: boolean | null}): string; - function eachParent(iterator: any, context: any): void; - - function filter(rule: any, context: any): any; - - function find(rule: any, context: any): any; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function get(key: any): any; - - function has(item: any, value: any, ...args: any[]): any; - - function idx(index: any): any; - - function indexOf(item: any): any; - - function insert(item: any, before: any): void; - - function insertAfter(item: any, after: any): any; - - function map(iterator: any, context: any): any; - - function meta(...args: any[]): any; - - function one(id: any): any; - - function parent(): any; - - function populate(items: any): void; - - function prepend(item: any): any; - - function remove(predicate: any, context: any, ...args: any[]): any; - - function repopulate(items: any): void; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; - - function toString(): any; - - function upsert(item: any): any; - } -} - -export namespace ProxyConfig { - namespace isProxyConfig { - const prototype: { - }; - - } - - namespace prototype { - function describe(content: any, type: any): void; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function getProtocols(): any; - - function getProxyUrl(): any; - - function meta(...args: any[]): any; - - function parent(): any; - - function setParent(parent: any): void; - - function test(urlStr: any): any; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function update(options: any): void; - - function updateProtocols(protocols: any): void; - } -} - -export namespace ProxyConfigList { - namespace isProxyConfigList { - const prototype: { - }; - - } - - namespace prototype { - function add(item: any, ...args: any[]): void; - - function all(): any; - - function append(item: any): any; - - function assimilate(source: any, prune: any): void; - - function clear(): void; - - function count(): any; - - function each(iterator: any, context: any): void; - - function eachParent(iterator: any, context: any): void; - - function filter(rule: any, context: any): any; - - function find(rule: any, context: any): any; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function get(key: any): any; - - function has(item: any, value: any, ...args: any[]): any; - - function idx(index: any): any; - - function indexOf(item: any): any; - - function insert(item: any, before: any): void; - - function insertAfter(item: any, after: any): any; - - function map(iterator: any, context: any): any; - - function meta(...args: any[]): any; - - function one(id: any): any; - - function parent(): any; - - function populate(items: any): void; - - function prepend(item: any): any; - - function remove(predicate: any, context: any, ...args: any[]): any; - - function repopulate(items: any): void; - - function resolve(url: any): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; - - function toString(): any; - - function upsert(item: any): any; - } -} - -export namespace QueryParam { - namespace parse { - const prototype: { - }; - - } - - namespace parseSingle { - const prototype: { - }; - - } - - namespace prototype { - function describe(content: any, type: any): void; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function meta(...args: any[]): any; - - function parent(): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function toString(): any; - - function update(param: any): void; - - function valueOf(): any; - } - - namespace unparse { - const prototype: { - }; - - } - - namespace unparseSingle { - const prototype: { - }; - - } -} - -export namespace Request { - namespace isRequest { - const prototype: { - }; - - } - - namespace prototype { - function addHeader(header: any): void; - - function addQueryParams(params: any): void; - - function authorize(): void; - - function authorizeUsing(type: any, options: any): void; - - function clone(): any; - - function describe(content: any, type: any): void; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachHeader(callback: any): any; - - function forEachParent(options: any, iterator: any): void; - - function getHeaders(options: any): any; - - function meta(...args: any[]): any; - - function parent(): any; - - function removeHeader(toRemove: any, options: any): any; - - function removeQueryParams(params: any): void; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function update(options: any): void; - - function upsertHeader(header: any): any; - } -} - -export namespace RequestAuth { - namespace isValidType { - const prototype: { - }; - - } - - namespace prototype { - function clear(type: any): void; - - function current(): any; - - function describe(content: any, type: any): void; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function meta(...args: any[]): any; - - function parameters(): any; - - function parent(): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function update(options: any, type: any): void; - - function use(type: any, options: any): void; - } -} - -export namespace RequestBody { - namespace prototype { - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function isEmpty(): any; - - function meta(...args: any[]): any; - - function parent(): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toString(): any; - - function update(options: any): void; - } -} - -export namespace Response { - namespace createFromNode { - const prototype: { - }; - - } - - namespace isResponse { - const prototype: { - }; - - } - - namespace mimeInfo { - const prototype: { - }; - - } - - namespace prototype { - function dataURI(): any; - - function describe(content: any, type: any): void; - - function details(): any; - - function encoding(): any; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function json(reviver: any, strict: any): any; - - function meta(...args: any[]): any; - - function mime(contentType: any, contentDisposition: any): any; - - function parent(): any; - - function reason(): any; - - function setParent(parent: any): void; - - function size(): any; - - function text(): any; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function update(options: any): void; - } -} - -export namespace Script { - namespace isScript { - const prototype: { - }; - - } - - namespace prototype { - function describe(content: any, type: any): void; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function meta(...args: any[]): any; - - function parent(): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function toSource(): any; - - function update(options: any): void; - } -} - -export namespace Url { - namespace isUrl { - const prototype: { - }; - - } - - namespace parse { - const prototype: { - }; - - } - - namespace prototype { - function addQueryParams(params: any): void; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function getHost(): any; - - function getOAuth1BaseUrl(): any; - - function getPath(options: any): any; - - function getPathWithQuery(): any; - - function getQueryString(options: any): any; - - function getRaw(): any; - - function getRemote(options: any): any; - - function meta(...args: any[]): any; - - function parent(): any; - - function removeQueryParams(params: any): any; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toString(forceProtocol: any): any; - - function update(url: any): any; - } -} - -export namespace UrlMatchPattern { - namespace prototype { - function createMatchPattern(): any; - - function describe(content: any, type: any): void; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function getProtocols(): any; - - function globPatternToRegexp(pattern: any): any; - - function matchAbsoluteHostPattern(matchRegexObject: any, remote: any): any; - - function matchAnyHost(matchRegexObject: any): any; - - function matchSuffixHostPattern(matchRegexObject: any, remote: any): any; - - function meta(...args: any[]): any; - - function parent(): any; - - function setParent(parent: any): void; - - function test(urlStr: any): any; - - function testHost(host: any): any; - - function testPath(path: any): any; - - function testProtocol(protocol: any): any; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function toString(): any; - - function update(options: any): void; - } -} - -export namespace UrlMatchPatternList { - namespace prototype { - function add(item: any, ...args: any[]): void; - - function all(): any; - - function append(item: any): any; - - function assimilate(source: any, prune: any): void; - - function clear(): void; - - function count(): any; - - function each(iterator: any, context: any): void; - - function eachParent(iterator: any, context: any): void; - - function filter(rule: any, context: any): any; - - function find(rule: any, context: any): any; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function get(key: any): any; - - function has(item: any, value: any, ...args: any[]): any; - - function idx(index: any): any; - - function indexOf(item: any): any; - - function insert(item: any, before: any): void; - - function insertAfter(item: any, after: any): any; - - function map(iterator: any, context: any): any; - - function meta(...args: any[]): any; - - function one(id: any): any; - - function parent(): any; - - function populate(items: any): void; - - function prepend(item: any): any; - - function remove(predicate: any, context: any, ...args: any[]): any; - - function repopulate(items: any): void; - - function setParent(parent: any): void; - - function test(urlStr: any): any; - - function toJSON(): any; - - function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; - - function toString(): any; - - function upsert(item: any): any; - } -} - -export namespace Variable { - namespace isVariable { - const prototype: { - }; - - } - - namespace prototype { - function cast(value: any): any; - - function castIn(value: any): any; - - function castOut(value: any): any; - - function describe(content: any, type: any): void; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function get(): any; - - function meta(...args: any[]): any; - - function parent(): any; - - function set(value: any): void; - - function setParent(parent: any): void; - - function toJSON(): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function toString(): any; - - function update(options: any): void; - - function valueOf(value: any, ...args: any[]): any; - - function valueType(typeName: any, _noCast: any): any; - - } - - namespace types { - class number { - constructor(p0: any); - - // Native method; no parameter or return type inference available - toExponential(p0: any): any; - - // Native method; no parameter or return type inference available - toFixed(p0: any): any; - - // Native method; no parameter or return type inference available - toLocaleString(): any; - - // Native method; no parameter or return type inference available - toPrecision(p0: any): any; - - // Native method; no parameter or return type inference available - toString(p0: any): any; - - // Native method; no parameter or return type inference available - valueOf(): any; - - static EPSILON: number; - - static MAX_SAFE_INTEGER: number; - - static MAX_VALUE: number; - - static MIN_SAFE_INTEGER: number; - - static MIN_VALUE: number; - - static NEGATIVE_INFINITY: number; - - static NaN: number; - - static POSITIVE_INFINITY: number; - - static isFinite(p0: any): any; - - static isInteger(p0: any): any; - - static isNaN(p0: any): any; - - static isSafeInteger(p0: any): any; - - static parseFloat(p0: any): any; - - static parseInt(p0: any, p1: any): any; - - } - - class string { - constructor(p0: any); - - // Native method; no parameter or return type inference available - anchor(p0: any): any; - - // Native method; no parameter or return type inference available - big(): any; - - // Native method; no parameter or return type inference available - blink(): any; - - // Native method; no parameter or return type inference available - bold(): any; - - // Native method; no parameter or return type inference available - charAt(p0: any): any; - - // Native method; no parameter or return type inference available - charCodeAt(p0: any): any; - - // Native method; no parameter or return type inference available - codePointAt(p0: any): any; - - // Native method; no parameter or return type inference available - concat(p0: any): any; - - // Native method; no parameter or return type inference available - endsWith(p0: any): any; - - // Native method; no parameter or return type inference available - fixed(): any; - - // Native method; no parameter or return type inference available - fontcolor(p0: any): any; - - // Native method; no parameter or return type inference available - fontsize(p0: any): any; - - // Native method; no parameter or return type inference available - includes(p0: any): any; - - // Native method; no parameter or return type inference available - indexOf(p0: any): any; - - // Native method; no parameter or return type inference available - italics(): any; - - // Native method; no parameter or return type inference available - lastIndexOf(p0: any): any; - - // Native method; no parameter or return type inference available - link(p0: any): any; - - // Native method; no parameter or return type inference available - localeCompare(p0: any): any; - - // Native method; no parameter or return type inference available - match(p0: any): any; - - // Native method; no parameter or return type inference available - normalize(): any; - - // Native method; no parameter or return type inference available - padEnd(p0: any): any; - - // Native method; no parameter or return type inference available - padStart(p0: any): any; - - // Native method; no parameter or return type inference available - repeat(p0: any): any; - - // Native method; no parameter or return type inference available - replace(p0: any, p1: any): any; - - // Native method; no parameter or return type inference available - search(p0: any): any; - - // Native method; no parameter or return type inference available - slice(p0: any, p1: any): any; - - // Native method; no parameter or return type inference available - small(): any; - - // Native method; no parameter or return type inference available - split(p0: any, p1: any): any; - - // Native method; no parameter or return type inference available - startsWith(p0: any): any; - - // Native method; no parameter or return type inference available - strike(): any; - - // Native method; no parameter or return type inference available - sub(): any; - - // Native method; no parameter or return type inference available - substr(p0: any, p1: any): any; - - // Native method; no parameter or return type inference available - substring(p0: any, p1: any): any; - - // Native method; no parameter or return type inference available - sup(): any; - - // Native method; no parameter or return type inference available - toLocaleLowerCase(): any; - - // Native method; no parameter or return type inference available - toLocaleUpperCase(): any; - - // Native method; no parameter or return type inference available - toLowerCase(): any; - - // Native method; no parameter or return type inference available - toString(): any; - - // Native method; no parameter or return type inference available - toUpperCase(): any; - - // Native method; no parameter or return type inference available - trim(): any; - - // Native method; no parameter or return type inference available - trimLeft(): any; - - // Native method; no parameter or return type inference available - trimRight(): any; - - // Native method; no parameter or return type inference available - valueOf(): any; - - static fromCharCode(p0: any): any; - - static fromCodePoint(p0: any): any; - - static raw(p0: any): any; - - } - - namespace any { - function out(val: any): any; - - namespace out { - // Too-deep object hierarchy from postman_collection.Variable.types.any.out - const prototype: any; - - } - - } - - namespace json { - function out(val: any): any; - - namespace out { - // Too-deep object hierarchy from postman_collection.Variable.types.json.out - const prototype: any; - - } - - } - } + static unparseSingle(obj: any, encode: boolean): string; } -export namespace VariableList { - namespace isVariableList { - const prototype: { - }; +export interface RequestDefinition extends PropertyDefinition { + url: string | Url; + method: string; + header?: HeaderDefinition; + body?: RequestBody; + auth: RequestAuthDefinition; + proxy: ProxyConfigDefinition; + certificate?: CertificateDefinition; +} - } +export class Request extends Property implements RequestDefinition { + auth: RequestAuth; + body?: RequestBody; + certificate?: Certificate; + headers: HeaderList; + method: string; + proxy: ProxyConfig; + url: Url; - namespace prototype { - function add(item: any, ...args: any[]): void; + constructor(options: RequestDefinition); - function all(): any; + addHeader(header: Header | HeaderDefinition): void; - function append(item: any): any; + addQueryParams(params: string | QueryParam[]): void; - function assimilate(source: any, prune: any): void; + authorize(): Request; - function clear(): void; + authorizeUsing(type: string | RequestAuthDefinition, options?: VariableList): void; - function count(): any; + clone(): Request; - function each(iterator: any, context: any): void; + forEachHeader(callback: any): void; - function eachParent(iterator: any, context: any): void; + getHeaders(options?: {ignoreCase?: boolean, enabled?: boolean}): any; - function filter(rule: any, context: any): any; + removeHeader(toRemove: string | Header, options: {ignoreCase: boolean}): any; - function find(rule: any, context: any): any; + removeQueryParams(params: string | string[]): void; - function findInParents(property: any, customizer: any): any; + toJSON(): any; - function findParentContaining(property: any, customizer: any): any; + update(options: RequestDefinition): void; - function forEachParent(options: any, iterator: any): void; + upsertHeader(header: any): void; - function get(key: any): any; - - function has(item: any, value: any, ...args: any[]): any; - - function idx(index: any): any; - - function indexOf(item: any): any; - - function insert(item: any, before: any): void; - - function insertAfter(item: any, after: any): any; - - function map(iterator: any, context: any): any; - - function meta(...args: any[]): any; - - function one(id: any): any; - - function parent(): any; - - function populate(items: any): void; - - function prepend(item: any): any; - - function remove(predicate: any, context: any, ...args: any[]): any; - - function replace(str: any, overrides: any): any; - - function repopulate(items: any): void; - - function setParent(parent: any): void; - - function substitute(obj: any, overrides: any, mutate: any): any; - - function syncFromObject(obj: any, track: any, prune: any): any; - - function syncToObject(obj: any): any; - - function toJSON(): any; - - function toObject(excludeDisabled: any, caseSensitive: any, multiValue: any, sanitizeKeys: any): any; - - function toString(): any; - - function upsert(item: any): any; - } + static isRequest(obj: any): boolean; } -export namespace VariableScope { - namespace isVariableScope { - const prototype: { - }; - - } - - namespace prototype { - function addLayer(list: any): void; - - function clear(): void; - - function describe(content: any, type: any): void; - - function findInParents(property: any, customizer: any): any; - - function findParentContaining(property: any, customizer: any): any; - - function forEachParent(options: any, iterator: any): void; - - function get(key: any): any; - - function has(variableName: any): any; - - function meta(...args: any[]): any; - - function parent(): any; - - function set(key: any, value: any, type: any): any; - - function setParent(parent: any): void; - - function syncVariablesFrom(obj: any, track: any): any; - - function syncVariablesTo(obj: any): any; - - function toJSON(): any; - - function toObject(excludeDisabled: any, caseSensitive: any): any; - - function toObjectResolved(scope: any, overrides: any, options: any): any; - - function unset(key: any): void; - - function variables(): any; - } +export interface RequestAuthDefinition extends PropertyDefinition { + type?: string; } -export namespace Version { - namespace prototype { - function findInParents(property: any, customizer: any): any; +export class RequestAuth extends Property implements RequestAuthDefinition { + type: string; - function findParentContaining(property: any, customizer: any): any; + constructor(options: RequestAuthDefinition, parent?: Property | PropertyList); - function forEachParent(options: any, iterator: any): void; + clear(type: string): void; - function meta(...args: any[]): any; + current(): any | undefined; - function parent(): any; + parameters(): VariableList; - function set(value: any): void; + update(options: VariableList | any[] | any, type?: string): void; - function setParent(parent: any): void; + use(type: string, options: VariableList): void; - function toJSON(): any; + static isValidType(type: any): boolean; - function toString(): any; - } } + +export class RequestBody extends PropertyBase { + static MODES: { + raw: string; + formadata: string; + urlencoded: string; + file: string; + }; + + file: string; + formdata: PropertyList; + mode: string; + raw: string; + urlencoded: PropertyList; + + constructor(options: any); + + isEmpty(): boolean; + + toString(): string; + + update(options: any): void; +} + +export interface ResponseDefinition extends PropertyDefinition { + code: number; + reason?: string; + header?: HeaderDefinition[]; + cookie?: CookieDefinition[]; + body?: string; + stream?: Buffer | Uint8Array; + responseTime: number; +} + +export class Response extends Property implements ResponseDefinition { + body: string; + code: number; + cookies: CookieList; + headers: HeaderList; + originalRequest: Request; + responseTime: number; + status: string; + reason?: string; + + constructor(options: ResponseDefinition); + + dataURI(): string; + + details(): any; + + encoding(): any; + + json(reviver?: any, strict?: boolean): any; + + mime(contentType: any, contentDisposition: any): any; //TODO ?? + + size(): number; + + text(): string | undefined; + + toJSON(): any; + + update(options: any): void; + + static createFromNode(response: any, cookies: any): any; + + static isResponse(obj: any): boolean; + + static mimeInfo(type: any, disposition: any): any; // TODO ?? + +} + +export class Script extends Property { + exec: string[]; + src: Url; + type: string; + + constructor(options: any); + + toSource(): string; + + update(options?: {type?: string, src?: string, exec?: string | string[]}): void; + + static isScript(obj: any): boolean; +} + +export class Url extends PropertyBase { + auth: string; + hash: string; + host: string[]; + path: string[]; + port: string; + protocol: string; + query: PropertyList; + variables: VariableList; + + constructor(options: any | string); + + addQueryParams(params: any | string): void; + + getHost(): string; + + getOAuth1BaseUrl(): any; + + getPath(options?: {unresolved: boolean}): string; + + getPathWithQuery(): any | string; + + getQueryString(options?: {encode: boolean | null, ignoredDisabled: boolean | null} | null): string; + + getRaw(): string; + + getRemote(options: {forcePort: boolean}): string; + + removeQueryParams(params: QueryParam[] | string[] | string): void; + + toString(forceProtocol?: boolean): string; + + update(url: string | any): void; + + static isUrl(obj: any): boolean; + + static parse(url: string): any; + +} + +/* No documentation for this right now? +export class UrlMatchPattern { + constructor(options: any, ...args: any[]); + + createMatchPattern(): any; + + getProtocols(): any; + + globPatternToRegexp(pattern: any): any; + + matchAbsoluteHostPattern(matchRegexObject: any, remote: any): any; + + matchAnyHost(matchRegexObject: any): any; + + matchSuffixHostPattern(matchRegexObject: any, remote: any): any; + + test(urlStr: any): any; + + testHost(host: any): any; + + testPath(path: any): any; + + testProtocol(protocol: any): any; + + toJSON(): any; + + toString(): any; + + update(options: any): void; + + static MATCH_ALL_URLS: string; + + static PROTOCOL_DELIMITER: string; + +} + +export class UrlMatchPatternList extends PropertyList { + constructor(parent: any, list: any); + + test(urlStr: any): any; + +}*/ + +export interface VariableDefinition extends PropertyDefinition { + value?: any; + type?: VariableTypes; +} + +export enum VariableTypes { + string = 'string', + boolean = 'boolean', + number = 'number', + json = 'json', + any = 'any' +} + +export class Variable extends Property implements VariableDefinition { + key: string; + type: VariableTypes; + value: any; + + constructor(definition?: VariableDefinition); + + cast(value: any): any; + + castIn(value: any): any; + + castOut(value: any): any; + + get(): any; + + set(value: any): void; + + toString(): string; + + update(options: VariableDefinition): void; + + valueOf(value?: any): any; + + valueType(typeName: string, _noCast: boolean): string; + + static isVariable(obj: any): boolean; + +} + +export class VariableList extends PropertyList { + constructor(parent: Property, populate: any); + + replace(str: string, overrides?: any): string; + + substitute(obj: any | any[], overrides?: any[] | null, mutate?: boolean): any; + + syncFromObject(obj: any, track?: boolean, prune?: boolean): any; + + syncToObject(obj?: any): any; + + static isVariableList(obj: any): boolean; + +} + +export interface VariableScopeDefinition extends PropertyDefinition { + id?: string; + name?: string; + values?: VariableDefinition[] +} + +export class VariableScope extends Property implements VariableScopeDefinition { + values?: VariableDefinition[]; + + constructor(definition: VariableScopeDefinition, layers?: VariableList[]); + + addLayer(list: any): void; + + clear(): void; + + get(key: string): any; + + has(variableName: string): boolean; + + set(key: string, value: any, type: VariableTypes): void; + + syncVariablesFrom(obj: any, track: any): any; + + syncVariablesTo(obj: any): any; + + toJSON(): any; + + toObject(excludeDisabled: boolean, caseSensitive: boolean): any; + + unset(key: string): void; + + variables(): any; + + static isVariableScope(obj: any): boolean; +} + +export class Version extends PropertyBase { + build: string; + major: string; + minor: string; + patch: string; + prerelease: string; + raw: string; + string: string; + + constructor(options: any | string); + + set(value: any | string): void; + + toString(): string; +} From 30a2c6bb27c92c5ced9261e7519fd76e820d9012 Mon Sep 17 00:00:00 2001 From: Denis Augsburger Date: Fri, 23 Feb 2018 10:43:32 +0100 Subject: [PATCH 0032/1327] Expand jss typings to represent SheetsRegistry --- types/jss/index.d.ts | 15 ++++++++++- types/jss/jss-tests.ts | 58 +++++++++++++++++++++++++++++++++--------- 2 files changed, 60 insertions(+), 13 deletions(-) diff --git a/types/jss/index.d.ts b/types/jss/index.d.ts index d0136216ed..dfd705710f 100644 --- a/types/jss/index.d.ts +++ b/types/jss/index.d.ts @@ -5,6 +5,10 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 +export interface toCSSOptions { + indent?: number; +} + export interface Rule { className: string; selector: string; @@ -62,7 +66,7 @@ export interface StyleSheet { /** * Convert rules to a CSS string. */ - toString(options?: { indent?: number }): string; + toString(options?: toCSSOptions): string; } export type GenerateClassName = (rule: Rule, sheet?: StyleSheet) => string; export interface Style { @@ -96,6 +100,15 @@ export interface RuleOptions { index: number; className: string; } +export declare class SheetsRegistry { + constructor(); + registry: ReadonlyArray>; + index(): number; + add(sheet: StyleSheet): void; + reset(): void; + remove(sheet: StyleSheet): void; + toString(options?: toCSSOptions): string; +} declare class JSS { constructor(options?: Partial); createStyleSheet( diff --git a/types/jss/jss-tests.ts b/types/jss/jss-tests.ts index 0cf3f51350..948dca39a2 100644 --- a/types/jss/jss-tests.ts +++ b/types/jss/jss-tests.ts @@ -2,7 +2,8 @@ import { create as createJSS, - default as sharedInstance + SheetsRegistry, + default as sharedInstance, } from 'jss'; const jss = createJSS().setup({}); @@ -21,28 +22,30 @@ const styleSheet = jss.createStyleSheet( { link: true, } -).attach(); +); -styleSheet.classes.container; // $ExpectType string -styleSheet.classes.ruleWithMockObservable; // $ExpectType string +const attachedStyleSheet = styleSheet.attach(); -const rule = styleSheet.addRule('dynamicRule', { color: 'indigo' }); +attachedStyleSheet.classes.container; // $ExpectType string +attachedStyleSheet.classes.ruleWithMockObservable; // $ExpectType string + +const rule = attachedStyleSheet.addRule('dynamicRule', { color: 'indigo' }); rule.prop('border-radius', 5).prop('color'); // $ExpectType string -styleSheet.classes.dynamicRule; // $ExpectType string +attachedStyleSheet.classes.dynamicRule; // $ExpectType string -styleSheet.deleteRule('dynamicRule'); +attachedStyleSheet.deleteRule('dynamicRule'); // test that `addRule` supports the shorthand signature -const dynamicRule = styleSheet.addRule({ color: 'red' }); +const dynamicRule = attachedStyleSheet.addRule({ color: 'red' }); const div = document.createElement('div'); dynamicRule.applyTo(div); -const containerRule = styleSheet.getRule('container'); +const containerRule = attachedStyleSheet.getRule('container'); const containerJSON = containerRule.toJSON(); -const css = styleSheet.toString(); +const css = attachedStyleSheet.toString(); -styleSheet.addRules({ +attachedStyleSheet.addRules({ rule1: { fontFamily: 'Roboto', color: '#FFFFFF', @@ -53,10 +56,41 @@ styleSheet.addRules({ }, }); -styleSheet.detach(); +attachedStyleSheet.detach(); sharedInstance.createStyleSheet({ container: { background: '#000099', } }); + +/* SheetsRegistry test */ +const sheetsRegistry = new SheetsRegistry(); +sheetsRegistry.add(styleSheet); + +const secondStyleSheet = jss.createStyleSheet( + { + ruleWithMockObservable: { + subscribe() {} + }, + container2: { + display: 'flex', + width: 150, + opacity: .8, + }, + }, + { + link: true, + } +); + +sheetsRegistry.add(secondStyleSheet); +sheetsRegistry.registry.length; // $ExpectType number +sheetsRegistry.remove(secondStyleSheet); + +sheetsRegistry.index(); // $ExpectType number +sheetsRegistry.toString(); // $ExpectType string +// With css options +sheetsRegistry.toString({indent: 5}); // $ExpectType string + +sheetsRegistry.reset(); From e327a3e895003b3ab3dd2cc055261b1094bd9724 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 26 Feb 2018 12:12:31 -0800 Subject: [PATCH 0033/1327] Sentence fragment --- types/react/global.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react/global.d.ts b/types/react/global.d.ts index c647e7239b..8d6062b4bc 100644 --- a/types/react/global.d.ts +++ b/types/react/global.d.ts @@ -1,5 +1,5 @@ /* -React projects that don't include the DOM library these interfaces need to compile. +React projects that don't include the DOM library need these interfaces to compile. React Native applications use React, but there is no DOM available. The JavaScript runtime is ES6/ES2015 only. These definitions allow such projects to compile with only `--lib ES6`. */ From f3e5f751b71b523783671302a3f838a26f7f143f Mon Sep 17 00:00:00 2001 From: Denis Augsburger Date: Tue, 27 Feb 2018 09:58:21 +0100 Subject: [PATCH 0034/1327] Rename interface --- types/jss/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/jss/index.d.ts b/types/jss/index.d.ts index dfd705710f..e106a70c74 100644 --- a/types/jss/index.d.ts +++ b/types/jss/index.d.ts @@ -5,7 +5,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 -export interface toCSSOptions { +export interface ToCssOptions { indent?: number; } @@ -66,7 +66,7 @@ export interface StyleSheet { /** * Convert rules to a CSS string. */ - toString(options?: toCSSOptions): string; + toString(options?: ToCssOptions): string; } export type GenerateClassName = (rule: Rule, sheet?: StyleSheet) => string; export interface Style { @@ -107,7 +107,7 @@ export declare class SheetsRegistry { add(sheet: StyleSheet): void; reset(): void; remove(sheet: StyleSheet): void; - toString(options?: toCSSOptions): string; + toString(options?: ToCssOptions): string; } declare class JSS { constructor(options?: Partial); From 6b53e1fbde3df53a8c2b2feae2188e25e7e970ee Mon Sep 17 00:00:00 2001 From: Denis Augsburger Date: Tue, 27 Feb 2018 10:10:56 +0100 Subject: [PATCH 0035/1327] Index as a function which returns a number --- types/jss/jss-tests.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/jss/jss-tests.ts b/types/jss/jss-tests.ts index 948dca39a2..80f4c1e94f 100644 --- a/types/jss/jss-tests.ts +++ b/types/jss/jss-tests.ts @@ -89,6 +89,7 @@ sheetsRegistry.registry.length; // $ExpectType number sheetsRegistry.remove(secondStyleSheet); sheetsRegistry.index(); // $ExpectType number +sheetsRegistry.index; // $ExpectType () => number sheetsRegistry.toString(); // $ExpectType string // With css options sheetsRegistry.toString({indent: 5}); // $ExpectType string From d70bcc668aff1d50607e94bdc73672728b7afab8 Mon Sep 17 00:00:00 2001 From: Denis Augsburger Date: Tue, 27 Feb 2018 10:48:05 +0100 Subject: [PATCH 0036/1327] Change to represent get index --- types/jss/index.d.ts | 2 +- types/jss/jss-tests.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/jss/index.d.ts b/types/jss/index.d.ts index e106a70c74..0f77605b2c 100644 --- a/types/jss/index.d.ts +++ b/types/jss/index.d.ts @@ -103,7 +103,7 @@ export interface RuleOptions { export declare class SheetsRegistry { constructor(); registry: ReadonlyArray>; - index(): number; + readonly index: number; add(sheet: StyleSheet): void; reset(): void; remove(sheet: StyleSheet): void; diff --git a/types/jss/jss-tests.ts b/types/jss/jss-tests.ts index 80f4c1e94f..a5c6f34126 100644 --- a/types/jss/jss-tests.ts +++ b/types/jss/jss-tests.ts @@ -88,8 +88,8 @@ sheetsRegistry.add(secondStyleSheet); sheetsRegistry.registry.length; // $ExpectType number sheetsRegistry.remove(secondStyleSheet); -sheetsRegistry.index(); // $ExpectType number -sheetsRegistry.index; // $ExpectType () => number +sheetsRegistry.index; // $ExpectType number +sheetsRegistry.index = 5; // $ExpectError sheetsRegistry.toString(); // $ExpectType string // With css options sheetsRegistry.toString({indent: 5}); // $ExpectType string From 1426182dcd3721e627298302f2862030626b806a Mon Sep 17 00:00:00 2001 From: Alex Regan Date: Tue, 27 Feb 2018 08:19:14 -0700 Subject: [PATCH 0037/1327] fix(bull): union callback param, not return val --- types/bull/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/bull/index.d.ts b/types/bull/index.d.ts index 77317c44ff..289c05d149 100644 --- a/types/bull/index.d.ts +++ b/types/bull/index.d.ts @@ -269,7 +269,7 @@ declare namespace Bull { * Errors will be passed as a second argument to the "failed" event; * results, as a second argument to the "completed" event. */ - process(callback: (job: Job, done: DoneCallback) => void | string): void; + process(callback: ((job: Job, done: DoneCallback) => void) | string): void; /** * Defines a processing function for the jobs placed into a given Queue. @@ -316,7 +316,7 @@ declare namespace Bull { * * @param concurrency Bull will then call you handler in parallel respecting this max number. */ - process(concurrency: number, callback: (job: Job, done: DoneCallback) => void | string): void; + process(concurrency: number, callback: ((job: Job, done: DoneCallback) => void) | string): void; /** * Defines a named processing function for the jobs placed into a given Queue. @@ -353,7 +353,7 @@ declare namespace Bull { * @param name Bull will only call the handler if the job name matches */ // tslint:disable-next-line:unified-signatures - process(name: string, callback: (job: Job, done: DoneCallback) => void | string): void; + process(name: string, callback: ((job: Job, done: DoneCallback) => void) | string): void; /** * Defines a named processing function for the jobs placed into a given Queue. @@ -390,7 +390,7 @@ declare namespace Bull { * @param name Bull will only call the handler if the job name matches * @param concurrency Bull will then call you handler in parallel respecting this max number. */ - process(name: string, concurrency: number, callback: (job: Job, done: DoneCallback) => void | string): void; + process(name: string, concurrency: number, callback: ((job: Job, done: DoneCallback) => void) | string): void; /** * Creates a new job and adds it to the queue. From 58296325aa33d943a1caed60b8c5438b5d4bd2d9 Mon Sep 17 00:00:00 2001 From: Ragg Date: Wed, 28 Feb 2018 01:26:21 +0900 Subject: [PATCH 0038/1327] Add `dispatchr` typing --- types/dispatchr/addons/BaseStore.d.ts | 17 +++++++ types/dispatchr/addons/createStore.d.ts | 15 ++++++ types/dispatchr/dispatchr-test.ts | 28 +++++++++++ types/dispatchr/index.d.ts | 62 +++++++++++++++++++++++++ types/dispatchr/tsconfig.json | 25 ++++++++++ types/dispatchr/tslint.json | 1 + 6 files changed, 148 insertions(+) create mode 100644 types/dispatchr/addons/BaseStore.d.ts create mode 100644 types/dispatchr/addons/createStore.d.ts create mode 100644 types/dispatchr/dispatchr-test.ts create mode 100644 types/dispatchr/index.d.ts create mode 100644 types/dispatchr/tsconfig.json create mode 100644 types/dispatchr/tslint.json diff --git a/types/dispatchr/addons/BaseStore.d.ts b/types/dispatchr/addons/BaseStore.d.ts new file mode 100644 index 0000000000..9e5e4888c3 --- /dev/null +++ b/types/dispatchr/addons/BaseStore.d.ts @@ -0,0 +1,17 @@ +// TypeScript Version: 2.3 +/// + +import { Dispatcher, DispatcherInterface, DispatcherContext, Store } from 'dispatchr'; +import { EventEmitter } from 'events'; + +declare class BaseStore extends EventEmitter implements Store { + constructor(dispatcher: DispatcherInterface); + initialize?: () => void; + getContext(): DispatcherContext; + addChangeListener(callback: () => void): void; + removeChangeListener(callback: () => void): void; + shouldDehydrate(): boolean; + emitChange(): void; +} + +export = BaseStore; diff --git a/types/dispatchr/addons/createStore.d.ts b/types/dispatchr/addons/createStore.d.ts new file mode 100644 index 0000000000..11fe076a8f --- /dev/null +++ b/types/dispatchr/addons/createStore.d.ts @@ -0,0 +1,15 @@ +// TypeScript Version: 2.3 +import { StoreClass, Store } from 'dispatchr'; + +interface StoreOptions { + initialize?(): void; + storeName: string; + handlers: { [event: string]: string }; +} + +type CreateStoreOption = ThisType & StoreOptions & { [key: string]: any }; + +type CreateStore = (options: CreateStoreOption) => StoreClass; + +declare const _: CreateStore; +export = _; diff --git a/types/dispatchr/dispatchr-test.ts b/types/dispatchr/dispatchr-test.ts new file mode 100644 index 0000000000..816e6fb3bd --- /dev/null +++ b/types/dispatchr/dispatchr-test.ts @@ -0,0 +1,28 @@ +import { createDispatcher, Store } from 'dispatchr'; +import * as createStore from 'dispatchr/addons/createStore'; + +const TestStore = createStore({ + storeName: 'TestStore', + + handlers: { + ACTION_NAME: 'actionHandler' + }, + + initialize() { }, + + actionHandler() { + this.emitChange(); + } +}); + +const dispatcher = createDispatcher({ + errorHandler(e, context) { + e.meta; + e.type; + e.message; + }, + stores: [TestStore] +}); + +const context = dispatcher.createContext({}); +context.dispatch('ACTION_NAME', {}); diff --git a/types/dispatchr/index.d.ts b/types/dispatchr/index.d.ts new file mode 100644 index 0000000000..f245c5f728 --- /dev/null +++ b/types/dispatchr/index.d.ts @@ -0,0 +1,62 @@ +// TypeScript Version: 2.3 +/// +import { EventEmitter } from 'events'; + +export interface DispatcherState { + stores: { [storeName: string]: any }; +} + +export interface DispatcherOption { + stores?: StoreClass[]; + errorHandler?: (e: DispatcherError, context: DispatcherContext) => void; +} + +export interface StoreClass { + storeName: string; + new(): Store; +} + +export interface Store extends EventEmitter { + dehydrate?(): S; + rehydrate?(state: S): void; + shouldDehydrate?(): boolean; + emitChange(): void; +} + +export interface Dispatcher { + createContext(context: {}): DispatcherContext; + registerStore(store: StoreClass): void; + isRegistered(store: StoreClass | string): boolean; + getStoreName(store: StoreClass | string): string; +} + +export interface DispatcherInterface { + getContext(): DispatcherContext; + getStore: DispatcherContext['getStore']; + waitFor: DispatcherContext['waitFor']; +} + +export interface DispatcherContext { + getStore(name: string): Store; + getStore(name: T): T; + + dispatch(actionName: string, payload: any): void; + + dehydrate(): DispatcherState; + rehydrate(dispatcherState: DispatcherState): void; + + waitFor(stores: Array, callback: () => void): void; + dispatcherInterface: DispatcherInterface; +} + +export interface DispatcherError { + message: string; + type: string; + meta: { + actionName?: string, + payload?: any, + error: Error + }; +} + +export function createDispatcher(options: DispatcherOption): Dispatcher; diff --git a/types/dispatchr/tsconfig.json b/types/dispatchr/tsconfig.json new file mode 100644 index 0000000000..3a2ad998e2 --- /dev/null +++ b/types/dispatchr/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "addons/BaseStore.d.ts", + "addons/createStore.d.ts", + "dispatchr-test.ts" + ] + } diff --git a/types/dispatchr/tslint.json b/types/dispatchr/tslint.json new file mode 100644 index 0000000000..c17ac4dd6d --- /dev/null +++ b/types/dispatchr/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dtslint.json" } From 0b1f1c3e872fd8feb516867248e53831d756f2b8 Mon Sep 17 00:00:00 2001 From: Ragg Date: Wed, 28 Feb 2018 02:07:03 +0900 Subject: [PATCH 0039/1327] Improve createStore() type --- types/dispatchr/addons/createStore.d.ts | 5 ++--- types/dispatchr/dispatchr-test.ts | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/types/dispatchr/addons/createStore.d.ts b/types/dispatchr/addons/createStore.d.ts index 11fe076a8f..a62425f9ae 100644 --- a/types/dispatchr/addons/createStore.d.ts +++ b/types/dispatchr/addons/createStore.d.ts @@ -5,11 +5,10 @@ interface StoreOptions { initialize?(): void; storeName: string; handlers: { [event: string]: string }; + [prop: string]: any; } -type CreateStoreOption = ThisType & StoreOptions & { [key: string]: any }; - -type CreateStore = (options: CreateStoreOption) => StoreClass; +type CreateStore = (options: This & ThisType) => StoreClass; declare const _: CreateStore; export = _; diff --git a/types/dispatchr/dispatchr-test.ts b/types/dispatchr/dispatchr-test.ts index 816e6fb3bd..3c26c50c9b 100644 --- a/types/dispatchr/dispatchr-test.ts +++ b/types/dispatchr/dispatchr-test.ts @@ -12,7 +12,10 @@ const TestStore = createStore({ actionHandler() { this.emitChange(); - } + this.additionalMethod(); + }, + + additionalMethod() {} }); const dispatcher = createDispatcher({ From d08933b8f62b5afd7fd1a23a5bde65054ae56c35 Mon Sep 17 00:00:00 2001 From: Ragg Date: Wed, 28 Feb 2018 02:15:17 +0900 Subject: [PATCH 0040/1327] Regenerate by dts-gen --- types/dispatchr/{dispatchr-test.ts => dispatchr-tests.ts} | 0 types/dispatchr/index.d.ts | 4 ++++ types/dispatchr/tsconfig.json | 6 +++--- types/dispatchr/tslint.json | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) rename types/dispatchr/{dispatchr-test.ts => dispatchr-tests.ts} (100%) diff --git a/types/dispatchr/dispatchr-test.ts b/types/dispatchr/dispatchr-tests.ts similarity index 100% rename from types/dispatchr/dispatchr-test.ts rename to types/dispatchr/dispatchr-tests.ts diff --git a/types/dispatchr/index.d.ts b/types/dispatchr/index.d.ts index f245c5f728..f9f31739fd 100644 --- a/types/dispatchr/index.d.ts +++ b/types/dispatchr/index.d.ts @@ -1,3 +1,7 @@ +// Type definitions for dispatchr 1.2 +// Project: https://github.com/yahoo/fluxible#readme +// Definitions by: Ragg +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 /// import { EventEmitter } from 'events'; diff --git a/types/dispatchr/tsconfig.json b/types/dispatchr/tsconfig.json index 3a2ad998e2..47109880da 100644 --- a/types/dispatchr/tsconfig.json +++ b/types/dispatchr/tsconfig.json @@ -18,8 +18,8 @@ }, "files": [ "index.d.ts", - "addons/BaseStore.d.ts", "addons/createStore.d.ts", - "dispatchr-test.ts" + "addons/BaseStore.d.ts", + "dispatchr-tests.ts" ] - } +} diff --git a/types/dispatchr/tslint.json b/types/dispatchr/tslint.json index c17ac4dd6d..3db14f85ea 100644 --- a/types/dispatchr/tslint.json +++ b/types/dispatchr/tslint.json @@ -1 +1 @@ -{ "extends": "dtslint/dtslint.json" } +{ "extends": "dtslint/dt.json" } From e85eb95d786b6d333c94ec952f8f0ed1bf230645 Mon Sep 17 00:00:00 2001 From: Ragg Date: Wed, 28 Feb 2018 02:29:55 +0900 Subject: [PATCH 0041/1327] Fix for test --- types/dispatchr/addons/BaseStore.d.ts | 3 +-- types/dispatchr/addons/createStore.d.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/types/dispatchr/addons/BaseStore.d.ts b/types/dispatchr/addons/BaseStore.d.ts index 9e5e4888c3..0c1c577a3f 100644 --- a/types/dispatchr/addons/BaseStore.d.ts +++ b/types/dispatchr/addons/BaseStore.d.ts @@ -1,7 +1,6 @@ -// TypeScript Version: 2.3 /// -import { Dispatcher, DispatcherInterface, DispatcherContext, Store } from 'dispatchr'; +import { Dispatcher, DispatcherInterface, DispatcherContext, Store } from '../index'; import { EventEmitter } from 'events'; declare class BaseStore extends EventEmitter implements Store { diff --git a/types/dispatchr/addons/createStore.d.ts b/types/dispatchr/addons/createStore.d.ts index a62425f9ae..0c6388d1ae 100644 --- a/types/dispatchr/addons/createStore.d.ts +++ b/types/dispatchr/addons/createStore.d.ts @@ -1,5 +1,4 @@ -// TypeScript Version: 2.3 -import { StoreClass, Store } from 'dispatchr'; +import { StoreClass, Store } from '../index'; interface StoreOptions { initialize?(): void; From 99a18f011384596248ea2d5a8cebf4c26d1e6cba Mon Sep 17 00:00:00 2001 From: Ragg Date: Wed, 28 Feb 2018 02:32:08 +0900 Subject: [PATCH 0042/1327] to ReadonlyArray --- types/dispatchr/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/dispatchr/index.d.ts b/types/dispatchr/index.d.ts index f9f31739fd..3fa0118729 100644 --- a/types/dispatchr/index.d.ts +++ b/types/dispatchr/index.d.ts @@ -49,7 +49,7 @@ export interface DispatcherContext { dehydrate(): DispatcherState; rehydrate(dispatcherState: DispatcherState): void; - waitFor(stores: Array, callback: () => void): void; + waitFor(stores: ReadonlyArray, callback: () => void): void; dispatcherInterface: DispatcherInterface; } From c8e95cf22664e2894120a8b47a3e37d4f6e53455 Mon Sep 17 00:00:00 2001 From: Alex Regan Date: Tue, 27 Feb 2018 19:32:33 -0700 Subject: [PATCH 0043/1327] fix(bull): switch overload to Promise return --- types/bull/index.d.ts | 116 +++++++++++++++++++++--------------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/types/bull/index.d.ts b/types/bull/index.d.ts index 289c05d149..608460b63b 100644 --- a/types/bull/index.d.ts +++ b/types/bull/index.d.ts @@ -257,45 +257,13 @@ declare namespace Bull { * * The callback is called everytime a job is placed in the queue. * It is passed an instance of the job as first argument. - * The callback can also be defined as the string path to a module - * exporting the callback function. Using a path has several advantages: - * - The process is sandboxed so if it crashes it does not affect the worker. - * - You can run blocking code without affecting the queue (jobs will not stall). - * - Much better utilization of multi-core CPUs. - * - Less connections to redis. * * The done callback can be called with an Error instance, to signal that the job did not complete successfully, * or with a result as second argument as second argument (e.g.: done(null, result);) when the job is successful. * Errors will be passed as a second argument to the "failed" event; * results, as a second argument to the "completed" event. */ - process(callback: ((job: Job, done: DoneCallback) => void) | string): void; - - /** - * Defines a processing function for the jobs placed into a given Queue. - * - * The callback is called everytime a job is placed in the queue. - * It is passed an instance of the job as first argument. - * - * A promise must be returned to signal job completion. - * If the promise is rejected, the error will be passed as a second argument to the "failed" event. - * If it is resolved, its value will be the "completed" event's second argument. - */ - process(callback: (job: Job) => void): Promise; - - /** - * Defines a processing function for the jobs placed into a given Queue. - * - * The callback is called everytime a job is placed in the queue. - * It is passed an instance of the job as first argument. - * - * A promise must be returned to signal job completion. - * If the promise is rejected, the error will be passed as a second argument to the "failed" event. - * If it is resolved, its value will be the "completed" event's second argument. - * - * @param concurrency Bull will then call you handler in parallel respecting this max number. - */ - process(concurrency: number, callback: (job: Job) => void): Promise; + process(callback: (job: Job, done: DoneCallback) => void): void; /** * Defines a processing function for the jobs placed into a given Queue. @@ -309,6 +277,38 @@ declare namespace Bull { * - Much better utilization of multi-core CPUs. * - Less connections to redis. * + * A promise must be returned to signal job completion. + * If the promise is rejected, the error will be passed as a second argument to the "failed" event. + * If it is resolved, its value will be the "completed" event's second argument. + */ + process(callback: ((job: Job) => void) | string): Promise; + + /** + * Defines a processing function for the jobs placed into a given Queue. + * + * The callback is called everytime a job is placed in the queue. + * It is passed an instance of the job as first argument. + * The callback can also be defined as the string path to a module + * exporting the callback function. Using a path has several advantages: + * - The process is sandboxed so if it crashes it does not affect the worker. + * - You can run blocking code without affecting the queue (jobs will not stall). + * - Much better utilization of multi-core CPUs. + * - Less connections to redis. + * + * A promise must be returned to signal job completion. + * If the promise is rejected, the error will be passed as a second argument to the "failed" event. + * If it is resolved, its value will be the "completed" event's second argument. + * + * @param concurrency Bull will then call you handler in parallel respecting this max number. + */ + process(concurrency: number, callback: ((job: Job) => void) | string): Promise; + + /** + * Defines a processing function for the jobs placed into a given Queue. + * + * The callback is called everytime a job is placed in the queue. + * It is passed an instance of the job as first argument. + * * The done callback can be called with an Error instance, to signal that the job did not complete successfully, * or with a result as second argument as second argument (e.g.: done(null, result);) when the job is successful. * Errors will be passed as a second argument to the "failed" event; @@ -316,13 +316,19 @@ declare namespace Bull { * * @param concurrency Bull will then call you handler in parallel respecting this max number. */ - process(concurrency: number, callback: ((job: Job, done: DoneCallback) => void) | string): void; + process(concurrency: number, callback: (job: Job, done: DoneCallback) => void): void; /** * Defines a named processing function for the jobs placed into a given Queue. * * The callback is called everytime a job is placed in the queue. * It is passed an instance of the job as first argument. + * The callback can also be defined as the string path to a module + * exporting the callback function. Using a path has several advantages: + * - The process is sandboxed so if it crashes it does not affect the worker. + * - You can run blocking code without affecting the queue (jobs will not stall). + * - Much better utilization of multi-core CPUs. + * - Less connections to redis. * * A promise must be returned to signal job completion. * If the promise is rejected, the error will be passed as a second argument to the "failed" event. @@ -331,19 +337,13 @@ declare namespace Bull { * @param name Bull will only call the handler if the job name matches */ // tslint:disable-next-line:unified-signatures - process(name: string, callback: (job: Job) => void): Promise; + process(name: string, callback: ((job: Job) => void) | string): Promise; /** * Defines a processing function for the jobs placed into a given Queue. * * The callback is called everytime a job is placed in the queue. * It is passed an instance of the job as first argument. - * The callback can also be defined as the string path to a module - * exporting the callback function. Using a path has several advantages: - * - The process is sandboxed so if it crashes it does not affect the worker. - * - You can run blocking code without affecting the queue (jobs will not stall). - * - Much better utilization of multi-core CPUs. - * - Less connections to redis. * * The done callback can be called with an Error instance, to signal that the job did not complete successfully, * or with a result as second argument as second argument (e.g.: done(null, result);) when the job is successful. @@ -353,28 +353,13 @@ declare namespace Bull { * @param name Bull will only call the handler if the job name matches */ // tslint:disable-next-line:unified-signatures - process(name: string, callback: ((job: Job, done: DoneCallback) => void) | string): void; + process(name: string, callback: (job: Job, done: DoneCallback) => void): void; /** * Defines a named processing function for the jobs placed into a given Queue. * * The callback is called everytime a job is placed in the queue. * It is passed an instance of the job as first argument. - * - * A promise must be returned to signal job completion. - * If the promise is rejected, the error will be passed as a second argument to the "failed" event. - * If it is resolved, its value will be the "completed" event's second argument. - * - * @param name Bull will only call the handler if the job name matches - * @param concurrency Bull will then call you handler in parallel respecting this max number. - */ - process(name: string, concurrency: number, callback: (job: Job) => void): Promise; - - /** - * Defines a processing function for the jobs placed into a given Queue. - * - * The callback is called everytime a job is placed in the queue. - * It is passed an instance of the job as first argument. * The callback can also be defined as the string path to a module * exporting the callback function. Using a path has several advantages: * - The process is sandboxed so if it crashes it does not affect the worker. @@ -382,6 +367,21 @@ declare namespace Bull { * - Much better utilization of multi-core CPUs. * - Less connections to redis. * + * A promise must be returned to signal job completion. + * If the promise is rejected, the error will be passed as a second argument to the "failed" event. + * If it is resolved, its value will be the "completed" event's second argument. + * + * @param name Bull will only call the handler if the job name matches + * @param concurrency Bull will then call you handler in parallel respecting this max number. + */ + process(name: string, concurrency: number, callback: ((job: Job) => void) | string): Promise; + + /** + * Defines a processing function for the jobs placed into a given Queue. + * + * The callback is called everytime a job is placed in the queue. + * It is passed an instance of the job as first argument. + * * The done callback can be called with an Error instance, to signal that the job did not complete successfully, * or with a result as second argument as second argument (e.g.: done(null, result);) when the job is successful. * Errors will be passed as a second argument to the "failed" event; @@ -390,7 +390,7 @@ declare namespace Bull { * @param name Bull will only call the handler if the job name matches * @param concurrency Bull will then call you handler in parallel respecting this max number. */ - process(name: string, concurrency: number, callback: ((job: Job, done: DoneCallback) => void) | string): void; + process(name: string, concurrency: number, callback: (job: Job, done: DoneCallback) => void): void; /** * Creates a new job and adds it to the queue. From 5ad783bf51bfe9dabc59fb508858032f9defc509 Mon Sep 17 00:00:00 2001 From: Kyle Buzby Date: Tue, 27 Feb 2018 22:14:05 -0600 Subject: [PATCH 0044/1327] add strictFunctionTypes for dtslint --- types/postman-collection/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/types/postman-collection/tsconfig.json b/types/postman-collection/tsconfig.json index 3f176970e4..9b0b244020 100644 --- a/types/postman-collection/tsconfig.json +++ b/types/postman-collection/tsconfig.json @@ -7,6 +7,7 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, + "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ "../" From a07b4e7d1d9b361ef739c3402deb86a7a870e60b Mon Sep 17 00:00:00 2001 From: Kyle Buzby Date: Tue, 27 Feb 2018 22:14:24 -0600 Subject: [PATCH 0045/1327] fix tslint errors --- types/postman-collection/index.d.ts | 113 +++++++++++----------------- 1 file changed, 45 insertions(+), 68 deletions(-) diff --git a/types/postman-collection/index.d.ts b/types/postman-collection/index.d.ts index 5365b9cfaf..8ed90d8827 100644 --- a/types/postman-collection/index.d.ts +++ b/types/postman-collection/index.d.ts @@ -2,21 +2,21 @@ // Project: https://github.com/postmanlabs/postman-collection // Definitions by: Kyle Buzby // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - +/// + export class PropertyBase { constructor(definition: any); - findInParents(property: string, customizer?: any): any | undefined; // TODO Update customizer function def + findInParents(property: string, customizer?: any): any ; // TODO Update customizer function def findParentContaining(property: any, customizer: any): any; // TODO Update customizer function def - forEachParent(iterator: any): void; // TODO Update iterator function def - forEachParent(options: any | boolean, iterator: any): void; // TODO Update iterator function def + forEachParent(iterator: (item: any) => void): void; + forEachParent(options: any /* TODO | boolean*/, iterator: (item: any) => void): void; meta(): any; - parent(): any | undefined; + parent(): any; setParent(parent: any): void; @@ -27,7 +27,6 @@ export class PropertyBase { static propertyUnprefixMeta(value: any, key: any): any; static toJSON(obj: any): any; - } export interface PropertyDefinition { @@ -48,10 +47,9 @@ export class Property extends PropertyBase implements PropertyDefinition { toObjectResolved(scope: any, overrides: any, options: any): any; - static replaceSubstitutions(str: string, variables: VariableList | any | (VariableList | any)[]): string; - - static replaceSubstitutionsIn(obj: any, variables: (VariableList | any)[], mutate: boolean): any; + static replaceSubstitutions(str: string, variables: VariableList | VariableList[]): string; + static replaceSubstitutionsIn(obj: any, variables: VariableList[], mutate: boolean): any; } export interface CertificateDefinition extends PropertyDefinition { @@ -62,13 +60,13 @@ export interface CertificateDefinition extends PropertyDefinition { passphrase?: string; } -export class Certificate extends Property { +export class Certificate extends Property implements CertificateDefinition { cert: any; id: string; key: any; - matches: any; // TODO update to UrlMatchPatternList? + matches: any[]; name: string; - passphrase: any; + passphrase: string; constructor(options: any); @@ -79,14 +77,12 @@ export class Certificate extends Property { update(options: CertificateDefinition): void; static isCertificate(obj: any): boolean; - } - export class PropertyList { constructor(type: any, parent: any, populate: any); - add(item: any | TElement): void; + add(item: TElement): void; all(): any; @@ -106,13 +102,13 @@ export class PropertyList { find(rule: any, context?: any): Item | ItemGroup; - get(key: string | any): TElement; + get(key: /*TODO string |*/ any): TElement; has(item: string | TElement, value?: any): boolean; idx(index: number): TElement; - indexOf(item: string | any): number; + indexOf(item: /*TODO string |*/ any): number; insert(item: TElement, before: TElement | string): void; @@ -122,24 +118,23 @@ export class PropertyList { one(id: string): TElement; - populate(items: any | any[]): void; + populate(items: any): void; prepend(item: TElement): any; - remove(predicate: any | string | TElement, context: any): any; + remove(predicate: any /*TODO | string | TElement*/, context: any): any; - repopulate(items: any | any[]): void; + repopulate(items: any): void; toJSON(): any; - toObject(excludeDisabled?: any | null, caseSensitive?: any | null, multiValue?: any | null, sanitizeKeys?: any): any; + toObject(excludeDisabled?: any, caseSensitive?: any, multiValue?: any, sanitizeKeys?: any): any; toString(): string; upsert(item: TElement): boolean | null; static isPropertyList(obj: any): any; - } export class CertificateList extends PropertyList { @@ -148,15 +143,14 @@ export class CertificateList extends PropertyList { resolveOne(url: string): CertificateDefinition; static isCertificateList(obj: any): boolean; - } export interface ItemGroupDefinition extends PropertyDefinition { - item?: (ItemDefinition | ItemGroupDefinition)[]; + item?: Array; auth?: RequestAuthDefinition; event?: EventDefinition[]; } - + export class ItemGroup extends Property { auth: RequestAuth; items: PropertyList; @@ -172,7 +166,6 @@ export class ItemGroup extends Property { oneDeep(idOrName: string): TItem; static isItemGroup(obj: any): boolean; - } export interface CollectionDefinition extends ItemGroupDefinition { @@ -181,7 +174,7 @@ export interface CollectionDefinition extends ItemGroupDefinition { name?: string; version?: string; }; - item?: (ItemDefinition | ItemGroupDefinition)[]; + item?: Array; variable?: VariableDefinition; auth?: RequestAuthDefinition; event?: EventDefinition[]; @@ -202,7 +195,6 @@ export class Collection extends ItemGroup implements CollectionDefiniti toJSON(): any; static isCollection(obj: any): boolean; - } export interface CookieDefinition { @@ -216,14 +208,13 @@ export interface CookieDefinition { httpOnly?: boolean; hostOnly?: boolean; session?: boolean; - extensions?: {key: string; value: string}[]; - + extensions?: Array<{key: string; value: string}>; } export class Cookie extends PropertyBase implements CookieDefinition { domain: string; expires: Date | string; - extensions: {key: string; value: string}[]; + extensions: Array<{key: string; value: string}>; hostOnly: any; httpOnly: any; maxAge: number; @@ -244,7 +235,6 @@ export class Cookie extends PropertyBase implements CookieDefinition { static parse(str: string): any; static splitParam(param: any): any; - } export class CookieList extends PropertyList { @@ -272,7 +262,6 @@ export class Description implements DescriptionDefinition { update(content: string | DescriptionDefinition, type?: string): void; static isDescription(obj: any): boolean; - } export interface EventDefinition extends PropertyDefinition { @@ -286,7 +275,7 @@ export class Event extends Property implements EventDefinition { constructor(definition: EventDefinition); - update(definition: EventDefinition): void; + update(definition: EventDefinition): void; } export class EventList extends PropertyList { @@ -297,7 +286,6 @@ export class EventList extends PropertyList { listenersOwn(name: string): Event[]; static isEventList(obj: any): boolean; - } export interface FormParamDefinition extends PropertyDefinition { @@ -305,7 +293,7 @@ export interface FormParamDefinition extends PropertyDefinition { value: string; } -export class FormParam extends Property implements FormParamDefinition{ +export class FormParam extends Property implements FormParamDefinition { key: string; value: string; @@ -316,7 +304,7 @@ export class FormParam extends Property implements FormParamDefinition{ toString(): string; - valueOf(): any | string; + valueOf(): any; // static parse(): void; // TODO not implemented yet } @@ -348,7 +336,7 @@ export class Header extends Property implements HeaderDefinition { static unparse(headers: HeaderList | any[], separator?: string): string; - static unparseSingle(header: Header): string; + static unparseSingle(header: Header): string; } export class HeaderList extends PropertyList
{ @@ -356,7 +344,7 @@ export class HeaderList extends PropertyList
{ contentSize(): number; - static isHeaderList(obj: any): boolean; + static isHeaderList(obj: any): boolean; } export interface ItemDefinition extends PropertyDefinition { @@ -379,7 +367,6 @@ export class Item extends Property implements ItemDefinition { getEvents(name: string): Event[]; static isItem(obj: any): boolean; - } export interface ProxyConfigDefinition extends PropertyDefinition { @@ -409,7 +396,6 @@ export class ProxyConfig extends Property implements ProxyConfigDefinition { updateProtocols(protocols: string[]): void; static isProxyConfig(obj: any): boolean; - } export class ProxyConfigList extends PropertyList { @@ -418,7 +404,6 @@ export class ProxyConfigList extends PropertyList { resolve(url?: Url): ProxyConfigDefinition; static isProxyConfigList(obj: any): boolean; - } export interface QueryParamDefinition extends PropertyDefinition { @@ -445,10 +430,9 @@ export class QueryParam extends Property implements QueryParamDefinition { static parseSingle(param: string, idx: number, all: string[]): any; - static unparse(params: any | any[], options?: {encode?: boolean | null, ignoreDisabled?: boolean | null}): string; + static unparse(params: any, options?: {encode?: boolean | null, ignoreDisabled?: boolean | null}): string; static unparseSingle(obj: any, encode: boolean): string; - } export interface RequestDefinition extends PropertyDefinition { @@ -497,7 +481,6 @@ export class Request extends Property implements RequestDefinition { upsertHeader(header: any): void; static isRequest(obj: any): boolean; - } export interface RequestAuthDefinition extends PropertyDefinition { @@ -511,19 +494,17 @@ export class RequestAuth extends Property implements RequestAuthDefinition { clear(type: string): void; - current(): any | undefined; + current(): any; parameters(): VariableList; - update(options: VariableList | any[] | any, type?: string): void; + update(options: /*TODO VariableList | any[] |*/ any, type?: string): void; use(type: string, options: VariableList): void; static isValidType(type: any): boolean; - } - export class RequestBody extends PropertyBase { static MODES: { raw: string; @@ -544,7 +525,7 @@ export class RequestBody extends PropertyBase { toString(): string; - update(options: any): void; + update(options: any): void; } export interface ResponseDefinition extends PropertyDefinition { @@ -577,7 +558,7 @@ export class Response extends Property implements ResponseDefinition { json(reviver?: any, strict?: boolean): any; - mime(contentType: any, contentDisposition: any): any; //TODO ?? + mime(contentType: any, contentDisposition: any): any; // TODO ?? size(): number; @@ -592,7 +573,6 @@ export class Response extends Property implements ResponseDefinition { static isResponse(obj: any): boolean; static mimeInfo(type: any, disposition: any): any; // TODO ?? - } export class Script extends Property { @@ -606,7 +586,7 @@ export class Script extends Property { update(options?: {type?: string, src?: string, exec?: string | string[]}): void; - static isScript(obj: any): boolean; + static isScript(obj: any): boolean; } export class Url extends PropertyBase { @@ -619,9 +599,9 @@ export class Url extends PropertyBase { query: PropertyList; variables: VariableList; - constructor(options: any | string); + constructor(options: any /*TODO| string*/); - addQueryParams(params: any | string): void; + addQueryParams(params: any /*TODO | string*/): void; getHost(): string; @@ -629,7 +609,7 @@ export class Url extends PropertyBase { getPath(options?: {unresolved: boolean}): string; - getPathWithQuery(): any | string; + getPathWithQuery(): any /*TODO | string*/; getQueryString(options?: {encode: boolean | null, ignoredDisabled: boolean | null} | null): string; @@ -641,12 +621,11 @@ export class Url extends PropertyBase { toString(forceProtocol?: boolean): string; - update(url: string | any): void; + update(url: /*TODO string |*/ any): void; static isUrl(obj: any): boolean; static parse(url: string): any; - } /* No documentation for this right now? @@ -731,7 +710,6 @@ export class Variable extends Property implements VariableDefinition { valueType(typeName: string, _noCast: boolean): string; static isVariable(obj: any): boolean; - } export class VariableList extends PropertyList { @@ -739,20 +717,19 @@ export class VariableList extends PropertyList { replace(str: string, overrides?: any): string; - substitute(obj: any | any[], overrides?: any[] | null, mutate?: boolean): any; + substitute(obj: any, overrides?: any[] | null, mutate?: boolean): any; syncFromObject(obj: any, track?: boolean, prune?: boolean): any; syncToObject(obj?: any): any; static isVariableList(obj: any): boolean; - } export interface VariableScopeDefinition extends PropertyDefinition { id?: string; name?: string; - values?: VariableDefinition[] + values?: VariableDefinition[]; } export class VariableScope extends Property implements VariableScopeDefinition { @@ -782,7 +759,7 @@ export class VariableScope extends Property implements VariableScopeDefinition { variables(): any; - static isVariableScope(obj: any): boolean; + static isVariableScope(obj: any): boolean; } export class Version extends PropertyBase { @@ -794,9 +771,9 @@ export class Version extends PropertyBase { raw: string; string: string; - constructor(options: any | string); + constructor(options: any /*TODO | string*/); - set(value: any | string): void; + set(value: any /*TODO | string*/): void; - toString(): string; -} + toString(): string; +} From d7629ffffac1ff973c581d2c166a229a6bc2af8b Mon Sep 17 00:00:00 2001 From: Kyle Buzby Date: Tue, 27 Feb 2018 22:26:21 -0600 Subject: [PATCH 0046/1327] add some function types --- types/postman-collection/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/postman-collection/index.d.ts b/types/postman-collection/index.d.ts index 8ed90d8827..e0025d9bda 100644 --- a/types/postman-collection/index.d.ts +++ b/types/postman-collection/index.d.ts @@ -7,9 +7,9 @@ export class PropertyBase { constructor(definition: any); - findInParents(property: string, customizer?: any): any ; // TODO Update customizer function def + findInParents(property: string, customizer?: (item: any) => boolean): PropertyBase ; - findParentContaining(property: any, customizer: any): any; // TODO Update customizer function def + findParentContaining(property: any, customizer: (item: any) => boolean): PropertyBase; forEachParent(iterator: (item: any) => void): void; forEachParent(options: any /* TODO | boolean*/, iterator: (item: any) => void): void; From 63ca62a96bbc16ac3bd46b6dc6f46506a20483d7 Mon Sep 17 00:00:00 2001 From: Kyle Buzby Date: Tue, 27 Feb 2018 22:26:30 -0600 Subject: [PATCH 0047/1327] add start of tests --- .../postman-collection-tests.ts | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/types/postman-collection/postman-collection-tests.ts b/types/postman-collection/postman-collection-tests.ts index fd65e5e3d9..9f98e7d689 100644 --- a/types/postman-collection/postman-collection-tests.ts +++ b/types/postman-collection/postman-collection-tests.ts @@ -1,7 +1,26 @@ import * as pmCollection from 'postman-collection'; -/* Example https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/base64-js/base64-js-tests.ts -base64js.byteLength(""); // $ExpectType number -base64js.toByteArray(""); // $ExpectType Uint8Array -base64js.fromByteArray(new Uint8Array(0)); // $ExpectType string -*/ +const certificate = new pmCollection.Certificate({}); +certificate.cert; // $ExpectType any +certificate.id; // $ExpectType string +certificate.key; // $ExpectType any +certificate.matches; // $ExpectType any[] +certificate.name; // $ExpectType string +certificate.passphrase; // $ExpectType string +certificate.auth; // $ExpectType RequestAuth +certificate.disabled; // $ExpectType boolean + +certificate.canApplyTo("string"); // $ExpectType any +certificate.canApplyTo(new pmCollection.Url({})); // $ExpectType any + +certificate.toJSON(); // $ExpectType CertificateDefinition +certificate.update({}); // $ExpectType void + +certificate as pmCollection.Property; // $ExpectType Property + +pmCollection.Certificate.isCertificate(certificate); // $ExpectType boolean + +let collection: pmCollection.Collection; +collection = new pmCollection.Collection(); +collection = new pmCollection.Collection({}); +collection = new pmCollection.Collection({}, []); From 01aa7a6ff452e42e90be95d47e5a116e7249a831 Mon Sep 17 00:00:00 2001 From: Ragg Date: Thu, 1 Mar 2018 00:23:53 +0900 Subject: [PATCH 0048/1327] Improve typing for createStore (review fixes) --- types/dispatchr/addons/createStore.d.ts | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/types/dispatchr/addons/createStore.d.ts b/types/dispatchr/addons/createStore.d.ts index 0c6388d1ae..df8e12cf03 100644 --- a/types/dispatchr/addons/createStore.d.ts +++ b/types/dispatchr/addons/createStore.d.ts @@ -1,13 +1,20 @@ import { StoreClass, Store } from '../index'; +type Diff = ({ [P in T]: P } & { [P in U]: never } & { [x: string]: never })[T]; +type Omit = Pick>; + interface StoreOptions { - initialize?(): void; storeName: string; handlers: { [event: string]: string }; - [prop: string]: any; + statics?: { [prop: string]: any }; + mixins?: object[]; + initialize?(): void; + dehydrate?(): any; + rehydrate?(state: any): void; } -type CreateStore = (options: This & ThisType) => StoreClass; +// see: https://github.com/yahoo/fluxible/blob/dispatchr-v1.2.0/packages/dispatchr/addons/createStore.js#L9 +type StoreThis = Omit & Store -declare const _: CreateStore; -export = _; +declare function createStore(options: T & ThisType>): StoreClass; +export = createStore; From 088f244955d98cbe794fcdaa4c4473ee830379a3 Mon Sep 17 00:00:00 2001 From: Ragg Date: Thu, 1 Mar 2018 00:24:38 +0900 Subject: [PATCH 0049/1327] Arrow function type to method type --- types/dispatchr/addons/BaseStore.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/dispatchr/addons/BaseStore.d.ts b/types/dispatchr/addons/BaseStore.d.ts index 0c1c577a3f..6507a7fcf4 100644 --- a/types/dispatchr/addons/BaseStore.d.ts +++ b/types/dispatchr/addons/BaseStore.d.ts @@ -5,7 +5,7 @@ import { EventEmitter } from 'events'; declare class BaseStore extends EventEmitter implements Store { constructor(dispatcher: DispatcherInterface); - initialize?: () => void; + initialize?(): void; getContext(): DispatcherContext; addChangeListener(callback: () => void): void; removeChangeListener(callback: () => void): void; From 06f37f7a26f27c94f9199e301741991550494706 Mon Sep 17 00:00:00 2001 From: Ragg Date: Thu, 1 Mar 2018 00:25:07 +0900 Subject: [PATCH 0050/1327] Add BaseStore test --- types/dispatchr/dispatchr-tests.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/types/dispatchr/dispatchr-tests.ts b/types/dispatchr/dispatchr-tests.ts index 3c26c50c9b..4097b14af3 100644 --- a/types/dispatchr/dispatchr-tests.ts +++ b/types/dispatchr/dispatchr-tests.ts @@ -1,5 +1,6 @@ import { createDispatcher, Store } from 'dispatchr'; import * as createStore from 'dispatchr/addons/createStore'; +import * as BaseStore from 'dispatchr/addons/BaseStore'; const TestStore = createStore({ storeName: 'TestStore', @@ -18,6 +19,16 @@ const TestStore = createStore({ additionalMethod() {} }); +class ExtendedStore extends BaseStore<{}> { + static handlers = { + ACTION_NAME: 'actionHandler' + }; + + actionHandler() { + this.emitChange(); + } +} + const dispatcher = createDispatcher({ errorHandler(e, context) { e.meta; From 020a99332b38d167262312f6f264a64f936732ad Mon Sep 17 00:00:00 2001 From: Ragg Date: Thu, 1 Mar 2018 00:32:20 +0900 Subject: [PATCH 0051/1327] Add createStore `statics` test --- types/dispatchr/dispatchr-tests.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/dispatchr/dispatchr-tests.ts b/types/dispatchr/dispatchr-tests.ts index 4097b14af3..4c66c47b65 100644 --- a/types/dispatchr/dispatchr-tests.ts +++ b/types/dispatchr/dispatchr-tests.ts @@ -9,6 +9,10 @@ const TestStore = createStore({ ACTION_NAME: 'actionHandler' }, + statics: { + staticMethod() {} + }, + initialize() { }, actionHandler() { From faf8f5f20700d214f56427063dfccc16416ad55f Mon Sep 17 00:00:00 2001 From: Ragg Date: Thu, 1 Mar 2018 00:35:03 +0900 Subject: [PATCH 0052/1327] lint --- types/dispatchr/addons/createStore.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/dispatchr/addons/createStore.d.ts b/types/dispatchr/addons/createStore.d.ts index df8e12cf03..86a1f24fbb 100644 --- a/types/dispatchr/addons/createStore.d.ts +++ b/types/dispatchr/addons/createStore.d.ts @@ -14,7 +14,7 @@ interface StoreOptions { } // see: https://github.com/yahoo/fluxible/blob/dispatchr-v1.2.0/packages/dispatchr/addons/createStore.js#L9 -type StoreThis = Omit & Store +type StoreThis = Omit & Store; declare function createStore(options: T & ThisType>): StoreClass; export = createStore; From 528492dd9314556edd310c924310078164ca2cda Mon Sep 17 00:00:00 2001 From: Ragg Date: Thu, 1 Mar 2018 00:35:48 +0900 Subject: [PATCH 0053/1327] Fix import syntax --- types/dispatchr/dispatchr-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/dispatchr/dispatchr-tests.ts b/types/dispatchr/dispatchr-tests.ts index 4c66c47b65..797cb9fb0a 100644 --- a/types/dispatchr/dispatchr-tests.ts +++ b/types/dispatchr/dispatchr-tests.ts @@ -1,6 +1,6 @@ import { createDispatcher, Store } from 'dispatchr'; -import * as createStore from 'dispatchr/addons/createStore'; -import * as BaseStore from 'dispatchr/addons/BaseStore'; +import createStore = require('dispatchr/addons/createStore'); +import BaseStore = require('dispatchr/addons/BaseStore'); const TestStore = createStore({ storeName: 'TestStore', From c85dafb61e5629bc3a280f952fe44c684e4cf7d5 Mon Sep 17 00:00:00 2001 From: Ragg Date: Thu, 1 Mar 2018 00:36:30 +0900 Subject: [PATCH 0054/1327] empty {} -> object --- types/dispatchr/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/dispatchr/index.d.ts b/types/dispatchr/index.d.ts index 3fa0118729..3b4dab9ec1 100644 --- a/types/dispatchr/index.d.ts +++ b/types/dispatchr/index.d.ts @@ -28,7 +28,7 @@ export interface Store extends EventEmitter { } export interface Dispatcher { - createContext(context: {}): DispatcherContext; + createContext(context: object): DispatcherContext; registerStore(store: StoreClass): void; isRegistered(store: StoreClass | string): boolean; getStoreName(store: StoreClass | string): string; From 6b42020bf237e2422cd6b42a374ebc61ddbc533b Mon Sep 17 00:00:00 2001 From: Ragg Date: Thu, 1 Mar 2018 00:44:46 +0900 Subject: [PATCH 0055/1327] lint --- types/dispatchr/dispatchr-tests.ts | 2 +- types/dispatchr/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/dispatchr/dispatchr-tests.ts b/types/dispatchr/dispatchr-tests.ts index 797cb9fb0a..fcf0490f44 100644 --- a/types/dispatchr/dispatchr-tests.ts +++ b/types/dispatchr/dispatchr-tests.ts @@ -23,7 +23,7 @@ const TestStore = createStore({ additionalMethod() {} }); -class ExtendedStore extends BaseStore<{}> { +class ExtendedStore extends BaseStore { static handlers = { ACTION_NAME: 'actionHandler' }; diff --git a/types/dispatchr/index.d.ts b/types/dispatchr/index.d.ts index 3b4dab9ec1..b5cf63009d 100644 --- a/types/dispatchr/index.d.ts +++ b/types/dispatchr/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/yahoo/fluxible#readme // Definitions by: Ragg // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.5 /// import { EventEmitter } from 'events'; From fa04697ee1fc62a8cbfe1c5f3998fe903812b399 Mon Sep 17 00:00:00 2001 From: ArmandoAssuncao Date: Fri, 2 Mar 2018 23:07:22 -0300 Subject: [PATCH 0056/1327] [react-navigation]: added types in navigate params --- types/react-navigation/index.d.ts | 5 +++-- types/react-navigation/react-navigation-tests.tsx | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/types/react-navigation/index.d.ts b/types/react-navigation/index.d.ts index c4e396783f..b6897b11c8 100644 --- a/types/react-navigation/index.d.ts +++ b/types/react-navigation/index.d.ts @@ -14,6 +14,7 @@ // Veit Lehmann: // Roberto Huertas: // Steven Miller +// Armando Assuncao // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 @@ -396,13 +397,13 @@ export interface NavigationEventSubscription { remove: () => void; } -export interface NavigationScreenProp { +export interface NavigationScreenProp { state: S; dispatch: NavigationDispatch; goBack: (routeKey?: (string | null)) => boolean; navigate: ( routeName: string, - params?: NavigationParams, + params?: P, action?: NavigationAction ) => boolean; setParams: (newParams: NavigationParams) => boolean; diff --git a/types/react-navigation/react-navigation-tests.tsx b/types/react-navigation/react-navigation-tests.tsx index 017a9b9153..54489ba722 100644 --- a/types/react-navigation/react-navigation-tests.tsx +++ b/types/react-navigation/react-navigation-tests.tsx @@ -250,7 +250,7 @@ function renderBasicDrawerNavigator(): JSX.Element { } interface CustomTransitionerProps { - navigation: NavigationScreenProp; + navigation: NavigationScreenProp; } /** * @desc Custom transitioner component. Follows react-navigation/src/views/CardStackTransitioner.js. From 9d5ace7819b8ffaaa2f426ef1336ec19973c48c6 Mon Sep 17 00:00:00 2001 From: Nicolas Even Date: Sun, 4 Mar 2018 18:58:21 +0100 Subject: [PATCH 0057/1327] Fix: node: util/promisify: Allow null as the first argument for the callback --- types/node/index.d.ts | 25 +++++++++++++------------ types/node/v8/index.d.ts | 25 +++++++++++++------------ 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/types/node/index.d.ts b/types/node/index.d.ts index 717b906b28..41831a6a73 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -19,6 +19,7 @@ // Alberto Schiabel // Klaus Meinhardt // Huw +// Nicolas Even // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /** inspector module types */ @@ -5562,18 +5563,18 @@ declare module "util" { export function callbackify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; export function promisify(fn: CustomPromisify): TCustom; - export function promisify(fn: (callback: (err: Error, result: TResult) => void) => void): () => Promise; - export function promisify(fn: (callback: (err: Error) => void) => void): () => Promise; - export function promisify(fn: (arg1: T1, callback: (err: Error, result: TResult) => void) => void): (arg1: T1) => Promise; - export function promisify(fn: (arg1: T1, callback: (err: Error) => void) => void): (arg1: T1) => Promise; - export function promisify(fn: (arg1: T1, arg2: T2, callback: (err: Error, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise; - export function promisify(fn: (arg1: T1, arg2: T2, callback: (err: Error) => void) => void): (arg1: T1, arg2: T2) => Promise; - export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; - export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; - export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; - export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; - export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; - export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + export function promisify(fn: (callback: (err: Error | null, result: TResult) => void) => void): () => Promise; + export function promisify(fn: (callback: (err: Error | null) => void) => void): () => Promise; + export function promisify(fn: (arg1: T1, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1) => Promise; + export function promisify(fn: (arg1: T1, callback: (err: Error | null) => void) => void): (arg1: T1) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, callback: (err: Error | null) => void) => void): (arg1: T1, arg2: T2) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; export function promisify(fn: Function): Function; export namespace promisify { const custom: symbol; diff --git a/types/node/v8/index.d.ts b/types/node/v8/index.d.ts index 5d672296f2..7ee216c569 100644 --- a/types/node/v8/index.d.ts +++ b/types/node/v8/index.d.ts @@ -18,6 +18,7 @@ // Hannes Magnusson // Alberto Schiabel // Huw +// Nicolas Even // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 @@ -5532,18 +5533,18 @@ declare module "util" { export function callbackify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; export function promisify(fn: CustomPromisify): TCustom; - export function promisify(fn: (callback: (err: Error, result: TResult) => void) => void): () => Promise; - export function promisify(fn: (callback: (err: Error) => void) => void): () => Promise; - export function promisify(fn: (arg1: T1, callback: (err: Error, result: TResult) => void) => void): (arg1: T1) => Promise; - export function promisify(fn: (arg1: T1, callback: (err: Error) => void) => void): (arg1: T1) => Promise; - export function promisify(fn: (arg1: T1, arg2: T2, callback: (err: Error, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise; - export function promisify(fn: (arg1: T1, arg2: T2, callback: (err: Error) => void) => void): (arg1: T1, arg2: T2) => Promise; - export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; - export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; - export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; - export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; - export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; - export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + export function promisify(fn: (callback: (err: Error | null, result: TResult) => void) => void): () => Promise; + export function promisify(fn: (callback: (err: Error | null) => void) => void): () => Promise; + export function promisify(fn: (arg1: T1, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1) => Promise; + export function promisify(fn: (arg1: T1, callback: (err: Error | null) => void) => void): (arg1: T1) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, callback: (err: Error | null) => void) => void): (arg1: T1, arg2: T2) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; export function promisify(fn: Function): Function; export namespace promisify { const custom: symbol; From 8434f97c667c7486181b2cdb8b11594943e2b688 Mon Sep 17 00:00:00 2001 From: Tom Crockett Date: Mon, 22 Jan 2018 22:22:44 -0800 Subject: [PATCH 0058/1327] Make JSS use a Name type parameter consistently, more accurate Style type --- types/jss/index.d.ts | 255 ++++++++++++++++++++++++++++++++++------- types/jss/jss-tests.ts | 9 +- 2 files changed, 221 insertions(+), 43 deletions(-) diff --git a/types/jss/index.d.ts b/types/jss/index.d.ts index d0136216ed..89c38d5223 100644 --- a/types/jss/index.d.ts +++ b/types/jss/index.d.ts @@ -3,7 +3,187 @@ // Definitions by: Brenton Simpson // Oleg Slobodskoi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 + +import { CSSProperties } from 'react'; + +export type PseudoCssKey = + | ':active' + | ':any' + | ':checked' + | ':default' + | ':disabled' + | ':empty' + | ':enabled' + | ':first' + | ':first-child' + | ':first-of-type' + | ':fullscreen' + | ':focus' + | ':hover' + | ':indeterminate' + | ':in-range' + | ':invalid' + | ':last-child' + | ':last-of-type' + | ':left' + | ':link' + | ':only-child' + | ':only-of-type' + | ':optional' + | ':out-of-range' + | ':read-only' + | ':read-write' + | ':required' + | ':right' + | ':root' + | ':scope' + | ':target' + | ':valid' + | ':visited' + // TODO + // | ':dir()' + // | ':lang()' + // | ':not()' + // | ':nth-child()' + // | ':nth-last-child()' + // | ':nth-last-of-type()' + // | ':nth-of-type()' + | '::after' + | '::before' + | '::cue' + | '::first-letter' + | '::first-line' + | '::selection' + | '::backdrop ' + | '::placeholder ' + | '::marker ' + | '::spelling-error ' + | '::grammar-error '; + +export type PseudoCss = Partial>; + +export interface JssProps { + '@global'?: React.CSSProperties & PseudoCss; + extend?: string; + composes?: string | string[]; +} + +export type css = React.CSSProperties; + +export interface JssExpand { + animation: + | { + delay: css['animationDelay']; + direction: css['animationDirection']; + duration: css['animationDuration']; + iterationCount: css['animationIterationCount']; + name: css['animationName']; + playState: css['animationPlayState']; + timingFunction: any; + } + | css['animation']; + background: + | { + attachment: css['backgroundAttachment']; + color: css['backgroundColor']; + image: css['backgroundImage']; + position: css['backgroundPosition'] | number[]; // Can be written using array e.g. `[0 0]` + repeat: css['backgroundRepeat']; + size: Array; // Can be written using array e.g. `['center' 'center']` + } + | css['background']; + border: + | { + color: css['borderColor']; + style: css['borderStyle']; + width: css['borderWidth']; + } + | css['border']; + boxShadow: + | { + x: any; + y: any; + blur: any; + spread: any; + color: css['color']; + inset?: 'inset'; // If you want to add inset you need to write "inset: 'inset'" + } + | css['boxShadow']; + flex: + | { + basis: css['flexBasis']; + direction: css['flexDirection']; + flow: css['flexFlow']; + grow: css['flexGrow']; + shrink: css['flexShrink']; + wrap: css['flexWrap']; + } + | css['flex']; + font: + | { + family: css['fontFamily']; + size: css['fontSize']; + stretch: css['fontStretch']; + style: css['fontStyle']; + variant: css['fontVariant']; + weight: css['fontWeight']; + } + | css['font']; + listStyle: + | { + image: css['listStyleImage']; + position: css['listStylePosition']; + type: css['listStyleType']; + } + | css['listStyle']; + margin: + | { + bottom: css['marginBottom']; + left: css['marginLeft']; + right: css['marginRight']; + top: css['marginTop']; + } + | css['margin']; + padding: + | { + bottom: css['paddingBottom']; + left: css['paddingLeft']; + right: css['paddingRight']; + top: css['paddingTop']; + } + | css['padding']; + outline: + | { + color: css['outlineColor']; + style: 'none' | 'hidden' | 'dotted' | 'dashed' | 'solid' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset'; + width: any; + } + | css['outline']; + textShadow: + | { + x: any; + y: any; + blur: any; + color: css['color']; + } + | css['textShadow']; + transition: + | { + delay: css['transitionDelay']; + duration: css['transitionDuration']; + property: css['transitionProperty']; + timingFunction: css['transitionTimingFunction']; + } + | css['transition']; +} + +export type JssExpandArr = { [k in keyof JssExpand]?: JssExpand[k] | Array }; + +export type Style = React.CSSProperties & PseudoCss & JssProps & JssExpandArr; + +export type Styles = Record; +export type Classes = Record; export interface Rule { className: string; @@ -13,13 +193,12 @@ export interface Rule { prop(key: string, value: any): this; toJSON(): string; } -export interface StyleSheet { + +export interface StyleSheet { // Gives auto-completion on the rules declared in `createStyleSheet` without // causing errors for rules added dynamically after creation. - classes: { - [K in keyof T]: string; - } & { [key: string]: string }; - options: any; + classes: Classes; + options: RuleOptions; linked: boolean; attached: boolean; /** @@ -35,21 +214,21 @@ export interface StyleSheet { * Will insert a rule also after the stylesheet has been rendered first time. */ addRule(style: Style, options?: Partial): Rule; - addRule(name: string, style: Style, options?: Partial): Rule; + addRule(name: Name, style: Style, options?: Partial): Rule; /** * Create and add rules. * Will render also after Style Sheet was rendered the first time. */ - addRules(styles: { [key: string]: Style }, options?: Partial): Rule[]; + addRules(styles: Partial>, options?: Partial): Rule[]; /** * Get a rule by name. */ - getRule(name: string): Rule; + getRule(name: Name): Rule; /** * Delete a rule by name. * Returns `true`: if rule has been deleted from the DOM. */ - deleteRule(name: string): boolean; + deleteRule(name: Name): boolean; /** * Get index of a rule. */ @@ -58,39 +237,37 @@ export interface StyleSheet { * Update the function values with a new data. */ update(data?: {}): this; - update(name: string, data: {}): this; + update(name: Name, data: {}): this; /** * Convert rules to a CSS string. */ toString(options?: { indent?: number }): string; } -export type GenerateClassName = (rule: Rule, sheet?: StyleSheet) => string; -export interface Style { - [key: string]: any; -} +export type GenerateClassName = (rule: Rule, sheet?: StyleSheet) => string; + export interface JSSPlugin { [key: string]: () => Partial<{ - onCreateRule(name: string, style: Style, options: RuleOptions): Rule, - onProcessRule(rule: Rule, sheet: StyleSheet): void, - onProcessStyle(style: Style, rule: Rule, sheet: StyleSheet): Style, - onProcessSheet(sheet: StyleSheet): void, - onChangeValue(value: any, prop: string, rule: Rule): any, - onUpdate(data: {}, rule: Rule, sheet: StyleSheet): void, + onCreateRule(name: string, style: Style, options: RuleOptions): Rule; + onProcessRule(rule: Rule, sheet: StyleSheet): void; + onProcessStyle(style: Style, rule: Rule, sheet: StyleSheet): Style; + onProcessSheet(sheet: StyleSheet): void; + onChangeValue(value: any, prop: string, rule: Rule): any; + onUpdate(data: {}, rule: Rule, sheet: StyleSheet): void; }>; } export interface JSSOptions { - createGenerateClassName(): GenerateClassName; + createGenerateClassName(): GenerateClassName; plugins: ReadonlyArray; virtual: boolean; insertionPoint: string | HTMLElement; } -export interface RuleFactoryOptions { +export interface RuleFactoryOptions { selector: string; - classes: { [key: string]: string }; - sheet: StyleSheet; + classes: Classes; + sheet: StyleSheet; index: number; jss: JSS; - generateClassName: GenerateClassName; + generateClassName: GenerateClassName; } export interface RuleOptions { index: number; @@ -98,23 +275,23 @@ export interface RuleOptions { } declare class JSS { constructor(options?: Partial); - createStyleSheet( - styles: T, + createStyleSheet( + styles: Partial>, options?: Partial<{ - media: string, - meta: string, - link: boolean, - element: HTMLStyleElement, - index: number, - generateClassName: GenerateClassName, - classNamePrefix: string, + media: string; + meta: string; + link: boolean; + element: HTMLStyleElement; + index: number; + generateClassName: GenerateClassName; + classNamePrefix: string; }>, - ): StyleSheet; - removeStyleSheet(sheet: StyleSheet): this; + ): StyleSheet; + removeStyleSheet(sheet: StyleSheet): this; setup(options?: Partial): this; use(plugin: JSSPlugin): this; - createRule(style: Style, options?: Partial): Rule; - createRule(name: string, style: Style, options?: Partial): Rule; + createRule(style: Style, options?: RuleFactoryOptions): Rule; + createRule(name: Name, style: Style, options?: RuleFactoryOptions): Rule; } /** * Creates a new instance of JSS. diff --git a/types/jss/jss-tests.ts b/types/jss/jss-tests.ts index 0cf3f51350..cd9387492c 100644 --- a/types/jss/jss-tests.ts +++ b/types/jss/jss-tests.ts @@ -7,10 +7,11 @@ import { const jss = createJSS().setup({}); -const styleSheet = jss.createStyleSheet( +// use because we will be dynamically augmenting +const styleSheet = jss.createStyleSheet( { - ruleWithMockObservable: { - subscribe() {} + root: { + backgroundColor: 'red', }, container: { display: 'flex', @@ -23,8 +24,8 @@ const styleSheet = jss.createStyleSheet( } ).attach(); +styleSheet.classes.root; // $ExpectType string styleSheet.classes.container; // $ExpectType string -styleSheet.classes.ruleWithMockObservable; // $ExpectType string const rule = styleSheet.addRule('dynamicRule', { color: 'indigo' }); rule.prop('border-radius', 5).prop('color'); // $ExpectType string From 5c8383cb8cfb9565c99ba935e1b8104d60bd95a8 Mon Sep 17 00:00:00 2001 From: Tom Crockett Date: Mon, 22 Jan 2018 23:47:53 -0800 Subject: [PATCH 0059/1327] Allow Style to be an Observable --- types/jss/index.d.ts | 4 +++- types/jss/jss-tests.ts | 8 ++++---- types/jss/package.json | 6 ++++++ 3 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 types/jss/package.json diff --git a/types/jss/index.d.ts b/types/jss/index.d.ts index 89c38d5223..40af88ea8b 100644 --- a/types/jss/index.d.ts +++ b/types/jss/index.d.ts @@ -6,6 +6,7 @@ // TypeScript Version: 2.3 import { CSSProperties } from 'react'; +import { Observable } from 'rxjs'; export type PseudoCssKey = | ':active' @@ -180,7 +181,8 @@ export interface JssExpand { export type JssExpandArr = { [k in keyof JssExpand]?: JssExpand[k] | Array }; -export type Style = React.CSSProperties & PseudoCss & JssProps & JssExpandArr; +export type SimpleStyle = React.CSSProperties & PseudoCss & JssProps & JssExpandArr; +export type Style = Observable | SimpleStyle export type Styles = Record; export type Classes = Record; diff --git a/types/jss/jss-tests.ts b/types/jss/jss-tests.ts index cd9387492c..c40d024040 100644 --- a/types/jss/jss-tests.ts +++ b/types/jss/jss-tests.ts @@ -4,15 +4,15 @@ import { create as createJSS, default as sharedInstance } from 'jss'; +import { Observable } from 'rxjs'; const jss = createJSS().setup({}); -// use because we will be dynamically augmenting const styleSheet = jss.createStyleSheet( { - root: { + ruleWithMockObservable: Observable.of({ backgroundColor: 'red', - }, + }), container: { display: 'flex', width: 100, @@ -24,8 +24,8 @@ const styleSheet = jss.createStyleSheet( } ).attach(); -styleSheet.classes.root; // $ExpectType string styleSheet.classes.container; // $ExpectType string +styleSheet.classes.ruleWithMockObservable; // $ExpectType string const rule = styleSheet.addRule('dynamicRule', { color: 'indigo' }); rule.prop('border-radius', 5).prop('color'); // $ExpectType string diff --git a/types/jss/package.json b/types/jss/package.json new file mode 100644 index 0000000000..33ba8bf22b --- /dev/null +++ b/types/jss/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "rxjs": "*" + } +} From 255cd1aa0c806eb1ec6f6a3fb7d5626954996caa Mon Sep 17 00:00:00 2001 From: Tom Crockett Date: Tue, 23 Jan 2018 00:00:12 -0800 Subject: [PATCH 0060/1327] Use TypeStyle's CSSProperties --- types/jss/index.d.ts | 10 +++++----- types/jss/package.json | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/types/jss/index.d.ts b/types/jss/index.d.ts index 40af88ea8b..f923ab0976 100644 --- a/types/jss/index.d.ts +++ b/types/jss/index.d.ts @@ -5,7 +5,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import { CSSProperties } from 'react'; +import { types } from 'typestyle'; import { Observable } from 'rxjs'; export type PseudoCssKey = @@ -62,15 +62,15 @@ export type PseudoCssKey = | '::spelling-error ' | '::grammar-error '; -export type PseudoCss = Partial>; +export type PseudoCss = Partial>; export interface JssProps { - '@global'?: React.CSSProperties & PseudoCss; + '@global'?: types.CSSProperties & PseudoCss; extend?: string; composes?: string | string[]; } -export type css = React.CSSProperties; +export type css = types.CSSProperties; export interface JssExpand { animation: @@ -181,7 +181,7 @@ export interface JssExpand { export type JssExpandArr = { [k in keyof JssExpand]?: JssExpand[k] | Array }; -export type SimpleStyle = React.CSSProperties & PseudoCss & JssProps & JssExpandArr; +export type SimpleStyle = types.CSSProperties & PseudoCss & JssProps & JssExpandArr; export type Style = Observable | SimpleStyle export type Styles = Record; diff --git a/types/jss/package.json b/types/jss/package.json index 33ba8bf22b..2605ce6189 100644 --- a/types/jss/package.json +++ b/types/jss/package.json @@ -1,6 +1,7 @@ { "private": true, "dependencies": { - "rxjs": "*" + "rxjs": "*", + "typestyle": "*" } } From c0928c641784b74d98034084d0fa8c1caf772834 Mon Sep 17 00:00:00 2001 From: Tom Crockett Date: Tue, 23 Jan 2018 00:11:13 -0800 Subject: [PATCH 0061/1327] Remove rxjs dependency, use observable defn from flow --- types/jss/index.d.ts | 4 ++-- types/jss/jss-tests.ts | 9 +++++---- types/jss/observable.d.ts | 17 +++++++++++++++++ types/jss/package.json | 1 - 4 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 types/jss/observable.d.ts diff --git a/types/jss/index.d.ts b/types/jss/index.d.ts index f923ab0976..8054d7f6a6 100644 --- a/types/jss/index.d.ts +++ b/types/jss/index.d.ts @@ -6,7 +6,7 @@ // TypeScript Version: 2.3 import { types } from 'typestyle'; -import { Observable } from 'rxjs'; +import { Observable } from './observable'; export type PseudoCssKey = | ':active' @@ -182,7 +182,7 @@ export interface JssExpand { export type JssExpandArr = { [k in keyof JssExpand]?: JssExpand[k] | Array }; export type SimpleStyle = types.CSSProperties & PseudoCss & JssProps & JssExpandArr; -export type Style = Observable | SimpleStyle +export type Style = Observable | SimpleStyle; export type Styles = Record; export type Classes = Record; diff --git a/types/jss/jss-tests.ts b/types/jss/jss-tests.ts index c40d024040..fab2665bed 100644 --- a/types/jss/jss-tests.ts +++ b/types/jss/jss-tests.ts @@ -4,15 +4,16 @@ import { create as createJSS, default as sharedInstance } from 'jss'; -import { Observable } from 'rxjs'; const jss = createJSS().setup({}); const styleSheet = jss.createStyleSheet( { - ruleWithMockObservable: Observable.of({ - backgroundColor: 'red', - }), + ruleWithMockObservable: { + subscribe: () => ({ + unsubscribe() {} + }) + }, container: { display: 'flex', width: 100, diff --git a/types/jss/observable.d.ts b/types/jss/observable.d.ts new file mode 100644 index 0000000000..ff6a5f0219 --- /dev/null +++ b/types/jss/observable.d.ts @@ -0,0 +1,17 @@ +// Copied from https://github.com/cssinjs/jss/blob/6ed7963786d5ef899075e95f81efc9530342154f/src/types.js + +export type Observable = { + subscribe(observerOrNext: ObserverOrNext): Subscription +} + +export type Observer = { + next: NextChannel +} + +export type NextChannel = (value: T) => void +export type ObserverOrNext = Observer | NextChannel + +export type Unsubscribe = () => void +export type Subscription = { + unsubscribe: Unsubscribe +} diff --git a/types/jss/package.json b/types/jss/package.json index 2605ce6189..a85944f70e 100644 --- a/types/jss/package.json +++ b/types/jss/package.json @@ -1,7 +1,6 @@ { "private": true, "dependencies": { - "rxjs": "*", "typestyle": "*" } } From d265ffc5449e970d732763336d96c24158ee86f3 Mon Sep 17 00:00:00 2001 From: Tom Crockett Date: Tue, 23 Jan 2018 00:25:00 -0800 Subject: [PATCH 0062/1327] Adapt TypeStyle's CSS typings to JSS --- types/jss/css.d.ts | 2880 ++++++++++++++++++++++++++++++++++++++++ types/jss/index.d.ts | 179 +-- types/jss/package.json | 6 - 3 files changed, 2881 insertions(+), 184 deletions(-) create mode 100644 types/jss/css.d.ts delete mode 100644 types/jss/package.json diff --git a/types/jss/css.d.ts b/types/jss/css.d.ts new file mode 100644 index 0000000000..348948f814 --- /dev/null +++ b/types/jss/css.d.ts @@ -0,0 +1,2880 @@ +// These CSS typings adapted from TypeStyle: https://github.com/typestyle/typestyle + +import { Observable } from './observable' + +/** + * Value of a CSS Property. Could be a single value or a list of fallbacks + * NOTE: array is for fallbacks + */ +export type CSSValue = T | Observable; + +/** + * For general purpose CSS values + **/ +export type CSSValueGeneral = CSSValue; + +/** + * When you are sure that the value must be a string + **/ +export type CSSValueString = CSSValue; + +/** + * CSS properties that cascade also support these + * @see https://drafts.csswg.org/css-cascade/#defaulting-keywords + */ +export type CSSGlobalValues + = 'initial' + | 'inherit' + | /** combination of `initial` and `inherit` */ 'unset' + | 'revert'; + +export interface FontFace { + fontFamily?: string; + + /** + * Location of a font-face. Used with the @font-face at rule + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src + */ + src?: CSSValueString; + unicodeRange?: any; + fontVariant?: 'common-ligatures' | 'small-caps' | CSSGlobalValues; + fontFeatureSettings?: string; + fontWeight?: CSSFontWeight; + fontStyle?: 'normal' | 'italic' | 'oblique' | CSSGlobalValues; +} + +/** + * Absolute size keywords + * @see https://drafts.csswg.org/css-fonts-3/#absolute-size-value + */ +export type CSSAbsoluteSize = 'xx-small' | 'x-small' | 'small' | 'medium' | 'large' + | 'x-large' | 'xx-large'; + +/** + * an angle; 0' | '0deg' | '0grad' | '0rad' | '0turn' | 'etc. + * @see https://drafts.csswg.org/css-values-3/#angles + */ +export type CSSAngle = CSSGlobalValues | string | 0; + +/** + * initial state of an animation. + * @see https://drafts.csswg.org/css-animations/#animation-play-state + */ +export type CSSAnimationPlayState = CSSGlobalValues | string | 'paused' | 'running'; + +/** + * blend mode + * @see https://drafts.fxtf.org/compositing-1/#ltblendmodegt + */ +export type CSSBlendMode = 'normal' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'color-dodge' | 'color-burn' + | 'hard-light' | 'soft-light' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity'; + +/** + * border shorthand for style color and width + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-left + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-right + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top + */ +export type CSSBorderShorthand = CSSGlobalValues | CSSColor | CSSLength | CSSLineStyleSet | string; + +/** + * Determines the area within which the background is painted. + * @see https://drafts.csswg.org/css-backgrounds/#box + */ +export type CSSBox = CSSGlobalValues | string | 'border-box' | 'padding-box' | 'content-box'; + +/** + * Color can be a named color, transparent, or a color function + * @see https://drafts.csswg.org/css-color-3/#valuea-def-color + */ +export type CSSColor = CSSNamedColor | CSSGlobalValues | 'currentColor' | string; + +export type CSSNamedColor = + 'aliceblue' | 'antiquewhite' | 'aqua' | 'aquamarine' | 'azure' | 'beige' | 'bisque' | 'black' | 'blanchedalmond' | 'blue' + | 'blueviolet' | 'brown' | 'burlywood' | 'cadetblue' | 'chartreuse' | 'chocolate' | 'coral' | 'cornflowerblue' | 'cornsilk' + | 'crimson' | 'cyan' | 'darkblue' | 'darkcyan' | 'darkgoldenrod' | 'darkgray' | 'darkgreen' | 'darkgrey' | 'darkkhaki' + | 'darkmagenta' | 'darkolivegreen' | 'darkorange' | 'darkorchid' | 'darkred' | 'darksalmon' | 'darkseagreen' + | 'darkslateblue' | 'darkslategray' | 'darkslategrey' | 'darkturquoise' | 'darkviolet' | 'deeppink' | 'deepskyblue' + | 'dimgray' | 'dimgrey' | 'dodgerblue' | 'firebrick' | 'floralwhite' | 'forestgreen' | 'fuchsia' | 'gainsboro' + | 'ghostwhite' | 'gold' | 'goldenrod' | 'gray' | 'green' | 'greenyellow' | 'grey' | 'honeydew' | 'hotpink' | 'indianred' + | 'indigo' | 'ivory' | 'khaki' | 'lavender' | 'lavenderblush' | 'lawngreen' | 'lemonchiffon' | 'lightblue' | 'lightcoral' + | 'lightcyan' | 'lightgoldenrodyellow' | 'lightgray' | 'lightgreen' | 'lightgrey' | 'lightpink' | 'lightsalmon' + | 'lightseagreen' | 'lightskyblue' | 'lightslategray' | 'lightslategrey' | 'lightsteelblue' | 'lightyellow' | 'lime' + | 'limegreen' | 'linen' | 'maroon' | 'mediumaquamarine' | 'mediumblue' | 'mediumorchid' | 'mediumpurple' | 'mediumseagreen' + | 'mediumslateblue' | 'mediumspringgreen' | 'mediumturquoise' | 'mediumvioletred' | 'midnightblue' | 'mintcream' + | 'mistyrose' | 'moccasin' | 'navajowhite' | 'navy' | 'oldlace' | 'olive' | 'olivedrab' | 'orange' | 'purple' + | 'rebeccapurple' | 'red' | 'silver' | 'teal' | 'transparent' | 'white' | 'yellow'; + +/** + * Special type for border-color which can use 1 or 4 colors + * @see https://drafts.csswg.org/css-backgrounds-3/#border-color + */ +export type CSSColorSet = string | CSSColor; + +/** + * This property specifies the type of rendering box used for an element. It is a shorthand property for many other display properties. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/display + */ +export type CSSDisplay = + /* values */ + 'block' | 'inline' | 'run-in' + /* values */ + | 'flow' | 'flow-root' | 'table' | 'flex' | 'grid' | 'ruby' | 'subgrid' + /* plus values */ + | 'block flow' | 'inline table' | 'flex run-in' + /* values */ + | 'list-item' | 'list-item block' | 'list-item inline' | 'list-item flow' | 'list-item flow-root' + | 'list-item block flow' | 'list-item block flow-root' | 'flow list-item block' + /* values */ + | 'table-row-group' | 'table-header-group' | 'table-footer-group' | 'table-row' | 'table-cell' + | 'table-column-group' | 'table-column' | 'table-caption' | 'ruby-base' | 'ruby-text' + | 'ruby-base-container' | 'ruby-text-container' + /* values */ + | 'contents' | 'none' + /* values */ + | 'inline-block' | 'inline-list-item' | 'inline-table' | 'inline-flex' | 'inline-grid'; + +/** + * CSS Type of Box Alignment + * @see https://www.w3.org/TR/css-align-3/#typedef-baseline-position + */ +export type CSSBoxAlignmentBaselinePosition = 'baseline' | 'first baseline' | 'last baseline'; + +/** + * CSS Type of Box Alignment + * @see https://www.w3.org/TR/css-align-3/#typedef-content-distribution + */ +export type CSSBoxAlignmentContentDistribution = 'space-between' | 'space-around' | 'space-evenly' | 'stretch'; + +export type CSSBoxAlignmentContentPositionWithOverflow = + | 'center' | 'start' | 'end' | 'flex-start' | 'flex-end' + | 'unsafe center' | 'unsafe start' | 'unsafe end' | 'unsafe flex-start' | 'unsafe flex-end' + | 'safe center' | 'safe start' | 'safe end' | 'safe flex-start' | 'safe flex-end'; + +export type CSSBoxAlignmentSelfPositionWithOverflow = + | 'center' | 'start' | 'end' | 'self-start' | 'self-end' | 'flex-start' | 'flex-end' + | 'unsafe center' | 'unsafe start' | 'unsafe end' | 'unsafe self-start' | 'unsafe self-end' | 'unsafe flex-start' | 'unsafe flex-end' + | 'safe center' | 'safe start' | 'safe end' | 'safe self-start' | 'safe self-end' | 'safe flex-start' | 'safe flex-end'; + +export type CSSBoxAlignmentLeftRightWithOverflow = 'left' | 'right' | 'unsafe left' | 'unsafe right' | 'safe left' | 'safe right'; + +/** + * Type for justify-content in flex or grid + * @see https://www.w3.org/TR/css-align-3/#propdef-justify-content + */ +export type JustifyContent = + | 'normal' + | CSSBoxAlignmentContentDistribution + | CSSBoxAlignmentContentPositionWithOverflow + | 'left' + | 'right'; + +/** + * Type for align-content in flex or grid + * @see https://www.w3.org/TR/css-align-3/#propdef-align-content + */ +export type AlignContent = + | 'normal' + | CSSBoxAlignmentBaselinePosition + | CSSBoxAlignmentContentDistribution + | CSSBoxAlignmentContentPositionWithOverflow; + +/** + * Type for justify-items in flex or grid + * @see https://www.w3.org/TR/css-align-3/#propdef-justify-items + */ +export type JustifyItems = + | 'normal' + | 'stretch' + | CSSBoxAlignmentBaselinePosition + | CSSBoxAlignmentSelfPositionWithOverflow + | 'left' + | 'right' + | 'center' + | 'legacy left' + | 'legacy right' + | 'legacy center'; + +/** + * Type for align-items in flex or grid + * @see https://www.w3.org/TR/css-align-3/#propdef-align-items + */ +export type AlignItems = + | 'normal' + | 'stretch' + | CSSBoxAlignmentBaselinePosition + | CSSBoxAlignmentSelfPositionWithOverflow; + +/** + * Type for justify-self in flex or grid + * @see https://www.w3.org/TR/css-align-3/#propdef-justify-self + */ +export type JustifySelf = + | 'auto' + | 'normal' + | 'stretch' + | CSSBoxAlignmentBaselinePosition + | CSSBoxAlignmentSelfPositionWithOverflow + | CSSBoxAlignmentLeftRightWithOverflow; + +/** + * Type for align-self in flex or grid + * @see https://www.w3.org/TR/css-align-3/#propdef-align-self + */ +export type AlignSelf = + | 'auto' + | 'normal' + | 'stretch' + | CSSBoxAlignmentBaselinePosition + | CSSBoxAlignmentSelfPositionWithOverflow; + +/** + * a gradient function like linear-gradient + * @see https://drafts.csswg.org/css-images-3/#gradients + */ +export type CSSGradient = CSSGlobalValues | string; + +/** + * complex type that describes the size of fonts + * @see https://drafts.csswg.org/css-fonts-3/#propdef-font-size + */ +export type CSSFontSize = CSSGlobalValues | CSSLength | CSSPercentage | CSSAbsoluteSize | CSSRelativeSize; + +/** + * a value that serves as an image + * @see https://drafts.csswg.org/css-images-3/#typedef-image + */ +export type CSSImage = CSSGlobalValues | string | CSSGradient | CSSUrl; + +/** + * an length; 0 | '0px' | '0em' etc. + * @see https://drafts.csswg.org/css-values-3/#lengths + */ +export type CSSLength = CSSGlobalValues | string | number; + +/** + * Style of a line (e.g. border-style) + * @see https://drafts.csswg.org/css-backgrounds-3/#line-style + */ +export type CSSLineStyle = string | 'none' | 'hidden' | 'dotted' + | 'dashed' | 'solid' | 'double' | 'groove' | 'ridge' | 'inset' + | 'outset'; + +/** + * Special type for border-style which can use 1 or 4 line-style + * @see https://drafts.csswg.org/css-backgrounds-3/#border-style + */ +export type CSSLineStyleSet = string | CSSLineStyle; + +/** + * Specifies how the contents of a replaced element should be fitted to the box established by its used height and width. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit + */ +export type CSSObjectFit = "fill" | "contain" | "cover" | "none" | "scale-down" | CSSGlobalValues; + +/** + * Overflow modes + * @see https://drafts.csswg.org/css-overflow-3/#propdef-overflow + */ +export type CSSOverflow = 'visible' | 'hidden' | 'scroll' | 'clip' | 'auto'; + +/** + * a percentage; 0 | '0%' etc. + * @see https://drafts.csswg.org/css-values-3/#percentage + */ +export type CSSPercentage = CSSGlobalValues | string | 0; + +/** + * Defines a position (e.g. background-position) + * @see https://drafts.csswg.org/css-backgrounds-3/#position + */ +export type CSSPosition = CSSAngle | string; + +/** + * Relative size keywords + * @see https://drafts.csswg.org/css-fonts-3/#relative-size-value + */ +export type CSSRelativeSize = 'larger' | 'smaller'; + +/** + * Specifies how background images are tiled after they have been sized and positioned + * @see https://drafts.csswg.org/css-backgrounds/#repeat-style + */ +export type CSSRepeatStyle = 'repeat-x' + | 'repeat-y' + | 'repeat' + | 'space' + | 'round' + | 'no-repeat' + | 'repeat repeat' + | 'repeat space' + | 'repeat round' + | 'repeat no-repeat' + | 'space repeat' + | 'space space' + | 'space round' + | 'space no-repeat' + | 'round repeat' + | 'round space' + | 'round round' + | 'round no-repeat' + | 'no-repeat repeat' + | 'no-repeat space' + | 'no-repeat round' + | 'no-repeat no-repeat'; + +/** + * Tranform list for the element. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function + */ +export type CSSTransformFunction = string | 'none'; + +/** + * Starting position for many gradients + * @see https://drafts.csswg.org/css-images-3/#typedef-side-or-corner + */ +export type CSSSideOrCorner = CSSAngle + | 'left' | 'right' | 'top' | 'bottom' + | 'to left' | 'to right' | 'to top' | 'to bottom' + | 'left top' | 'right top' | 'left bottom' | 'right bottom' + | 'top left' | 'top right' | 'bottom left' | 'bottom right' + | 'to left top' | 'to right top' | 'to left bottom' | 'to right bottom' + | 'to top left' | 'to top right' | 'to bottom left' | 'to bottom right'; + +export type CSSRadialGradientEndingShape = 'circle' | 'ellipse'; + +/** + * Radial Gradient Size. + * @see https://drafts.csswg.org/css-images-3/#ending-shape + */ +export type CSSRadialGradientSize = CSSLength | Array + | 'closest-side' | 'farthest-side' + | 'closest-corner' | 'closest-side' + ; + +/** Supporting by `-timing-function` properties */ +export type CSSTimingFunction + = /** e.g. steps(int,start|end)|cubic-bezier(n,n,n,n) */ string + | CSSGlobalValues + | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear' | 'step-start' | 'step-end'; + +/** + * Expressed as url('protocol://') + * @see https://drafts.csswg.org/css-values-3/#urls + */ +export type CSSUrl = string; + +/** + * Font weights + */ +export type CSSFontWeight = 'normal' | 'bold' | 'bolder' | 'lighter' | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | number | CSSGlobalValues; + +/** + * This interface documents key CSS properties for autocomplete + */ +export interface CSSProperties { + /** + * Typestyle configuration options + **/ + /** + * The generated CSS selector gets its own unique location in the generated CSS (disables deduping). + * So instead of `.classA,.classB{same properties}` + * you get `.classA {same properties} .classB {same properties}` + * This is needed for certain browser edge cases like placeholder styling + **/ + $unique?: boolean; + + /** + * Smooth scrolling on an iPhone. Specifies whether to use native-style scrolling in an element. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-overflow-scrolling + */ + '-webkit-overflow-scrolling'?: 'auto' | 'touch'; + + /** + * Aligns a flex container's lines within the flex container when there is extra space in the cross-axis, similar to how justify-content aligns individual items within the main-axis. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/align-content + */ + alignContent?: AlignContent; + + /** + * Sets the default alignment in the cross axis for all of the flex container's items, including anonymous flex items, similarly to how justify-content aligns items along the main axis. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/align-items + */ + alignItems?: CSSValue; + '-ms-align-items'?: CSSValue; + '-webkit-align-items'?: CSSValue; + + /** + * Allows the default alignment to be overridden for individual flex items. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/align-self + */ + alignSelf?: CSSValue; + '-webkit-align-self'?: CSSValue; + '-ms-flex-item-align'?: string; + + /** + * This property allows precise alignment of elements, such as graphics, that do not have a baseline-table or lack the desired baseline in their baseline-table. With the alignment-adjust property, the position of the baseline identified by the alignment-baseline can be explicitly determined. It also determines precisely the alignment point for each glyph within a textual element. + */ + alignmentAdjust?: any; + + /** + * The alignment-baseline attribute specifies how an object is aligned with respect to its parent. + * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/alignment-baseline + */ + alignmentBaseline?: 'auto' | 'baseline' | 'before-edge' | 'text-before-edge' | 'middle' | 'central' | 'after-edge' | 'text-after-edge' | 'ideographic' | 'alphabetic' | 'hanging' | 'mathematical' | 'inherit'; + + /** + * Shorthand property for animation-name, animation-duration, animation-timing-function, animation-delay, + * animation-iteration-count, animation-direction, animation-fill-mode, and animation-play-state. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation + */ + animation?: CSSValueString; + + /** + * Defines a length of time to elapse before an animation starts, allowing an animation to begin execution some time after it is applied. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-delay + */ + animationDelay?: any; + + /** + * Defines whether an animation should run in reverse on some or all cycles. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-direction + */ + animationDirection?: CSSGlobalValues | 'normal' | 'alternate' | 'reverse' | 'alternate-reverse'; + + /** + * The animation-duration CSS property specifies the length of time that an animation should take to complete one cycle. + * A value of '0s', which is the default value, indicates that no animation should occur. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-duration + */ + animationDuration?: CSSValue; + + /** + * Specifies how a CSS animation should apply styles to its target before and after it is executing. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-fill-mode + */ + animationFillMode?: 'none' | 'forwards' | 'backwards' | 'both'; + + /** + * Specifies how many times an animation cycle should play. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-iteration-count + */ + animationIterationCount?: CSSValue; + + /** + * Defines the list of animations that apply to the element. + * Note: You probably want animationDuration as well + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-name + */ + animationName?: CSSValue; + + /** + * Defines whether an animation is running or paused. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-play-state + */ + animationPlayState?: CSSValue; + + /** + * Sets the pace of an animation + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-function + */ + animationTimingFunction?: CSSValue; + + /** + * Allows changing the style of any element to platform-based interface elements or vice versa. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/appearance + */ + appearance?: CSSValue<'auto' | 'none'>; + + /** + * Determines whether or not the “back” side of a transformed element is visible when facing the viewer. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/backface-visibility + */ + backfaceVisibility?: CSSGlobalValues | 'visible' | 'hidden'; + + /** + * Shorthand property to set the values for one or more of: + * background-clip, background-color, background-image, + * background-origin, background-position, background-repeat, + * background-size, and background-attachment. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background + */ + background?: any; + + /** + * If a background-image is specified, this property determines + * whether that image's position is fixed within the viewport, + * or scrolls along with its containing block. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-attachment + */ + backgroundAttachment?: 'scroll' | 'fixed' | 'local'; + + /** + * This property describes how the element's background images should blend with each other and the element's background color. + * The value is a list of blend modes that corresponds to each background image. Each element in the list will apply to the corresponding element of background-image. If a property doesn’t have enough comma-separated values to match the number of layers, the UA must calculate its used value by repeating the list of values until there are enough. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-blend-mode + */ + backgroundBlendMode?: CSSValue; + + /** + * Specifies whether an element's background, either the color or image, extends underneath its border. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-clip + */ + backgroundClip?: CSSValue; + + /** + * Sets the background color of an element. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-color + */ + backgroundColor?: CSSValue; + + /** + * Sets a compositing style for background images and colors. + */ + backgroundComposite?: any; + + /** + * Applies one or more background images to an element. These can be any valid CSS image, including url() paths to image files or CSS gradients. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-image + */ + backgroundImage?: CSSValue; + + /** + * Specifies what the background-position property is relative to. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-origin + */ + backgroundOrigin?: CSSValue; + + /** + * Sets the position of a background image. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-position + */ + backgroundPosition?: CSSValue; + + /** + * Background-repeat defines if and how background images will be repeated after they have been sized and positioned + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat + */ + backgroundRepeat?: CSSValue; + + /** + * Background-size specifies the size of a background image + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-size + */ + backgroundSize?: 'auto' | 'cover' | 'contain' | CSSLength | CSSPercentage | CSSGlobalValues; + + /** + * Obsolete - spec retired, not implemented. + * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/baseline-shift + */ + baselineShift?: any; + + /** + * Non standard. Sets or retrieves the location of the Dynamic HTML (DHTML) behavior. + * @see https://msdn.microsoft.com/en-us/library/ms530723(v=vs.85).aspx + */ + behavior?: any; + + /** + * Shorthand property that defines the different properties of all four sides of an element's border in a single declaration. It can be used to set border-width, border-style and border-color, or a subset of these. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border + */ + border?: any; + + /** + * Shorthand that sets the values of border-bottom-color, + * border-bottom-style, and border-bottom-width. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom + */ + borderBottom?: CSSBorderShorthand; + + /** + * Sets the color of the bottom border of an element. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-color + */ + borderBottomColor?: CSSValue; + + /** + * Defines the shape of the border of the bottom-left corner. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-left-radius + */ + borderBottomLeftRadius?: any; + + /** + * Defines the shape of the border of the bottom-right corner. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius + */ + borderBottomRightRadius?: any; + + /** + * Sets the line style of the bottom border of a box. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-style + */ + borderBottomStyle?: CSSValue; + + /** + * Sets the width of an element's bottom border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-width + */ + borderBottomWidth?: CSSValue; + + /** + * Border-collapse can be used for collapsing the borders between table cells + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-collapse + */ + borderCollapse?: any; + + /** + * The CSS border-color property sets the color of an element's four borders. This property can have from one to four values, made up of the elementary properties: + * • border-top-color + * • border-right-color + * • border-bottom-color + * • border-left-color The default color is the currentColor of each of these values. + * If you provide one value, it sets the color for the element. Two values set the horizontal and vertical values, respectively. Providing three values sets the top, vertical, and bottom values, in that order. Four values set all for sides: top, right, bottom, and left, in that order. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-color + */ + borderColor?: CSSValue; + + /** + * Specifies different corner clipping effects, such as scoop (inner curves), bevel (straight cuts) or notch (cut-off rectangles). Works along with border-radius to specify the size of each corner effect. + */ + borderCornerShape?: any; + + /** + * The property border-image-source is used to set the image to be used instead of the border style. If this is set to none the border-style is used instead. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-image-source + */ + borderImageSource?: CSSValue; + + /** + * The border-image-width CSS property defines the offset to use for dividing the border image in nine parts, the top-left corner, central top edge, top-right-corner, central right edge, bottom-right corner, central bottom edge, bottom-left corner, and central right edge. They represent inward distance from the top, right, bottom, and left edges. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-image-width + */ + borderImageWidth?: CSSValue; + + /** + * Shorthand property that defines the border-width, border-style and border-color of an element's left border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the left border — border-left-width, border-left-style and border-left-color. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-left + */ + borderLeft?: CSSBorderShorthand; + + /** + * The CSS border-left-color property sets the color of an element's left border. This page explains the border-left-color value, but often you will find it more convenient to fix the border's left color as part of a shorthand set, either border-left or border-color. + * Colors can be defined several ways. For more information, see Usage. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-color + */ + borderLeftColor?: CSSValue; + + /** + * Sets the style of an element's left border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-style + */ + borderLeftStyle?: CSSValue; + + /** + * Sets the width of an element's left border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-width + */ + borderLeftWidth?: CSSValue; + + /** + * Allows Web authors to define how rounded border corners are + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius + */ + borderRadius?: CSSValue; + + /** + * Shorthand property that defines the border-width, border-style and border-color of an element's right border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the right border — border-right-width, border-right-style and border-right-color. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-right + */ + borderRight?: CSSBorderShorthand; + + /** + * Sets the color of an element's right border. This page explains the border-right-color value, but often you will find it more convenient to fix the border's right color as part of a shorthand set, either border-right or border-color. + * Colors can be defined several ways. For more information, see Usage. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-right-color + */ + borderRightColor?: CSSValue; + + /** + * Sets the style of an element's right border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-right-style + */ + borderRightStyle?: CSSValue; + + /** + * Sets the width of an element's right border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-right-width + */ + borderRightWidth?: CSSValue; + + /** + * Specifies the distance between the borders of adjacent cells. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-spacing + */ + borderSpacing?: CSSLength | string | 'inherit'; + + /** + * Sets the style of an element's four borders. This property can have from one to four values. With only one value, the value will be applied to all four borders; otherwise, this works as a shorthand property for each of border-top-style, border-right-style, border-bottom-style, border-left-style, where each border style may be assigned a separate value. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-style + */ + borderStyle?: CSSValue; + + /** + * Shorthand property that defines the border-width, border-style and border-color of an element's top border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the top border — border-top-width, border-top-style and border-top-color. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top + */ + borderTop?: CSSBorderShorthand; + + /** + * Sets the color of an element's top border. This page explains the border-top-color value, but often you will find it more convenient to fix the border's top color as part of a shorthand set, either border-top or border-color. + * Colors can be defined several ways. For more information, see Usage. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-color + */ + borderTopColor?: CSSValue; + + /** + * Sets the rounding of the top-left corner of the element. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-left-radius + */ + borderTopLeftRadius?: any; + + /** + * Sets the rounding of the top-right corner of the element. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-right-radius + */ + borderTopRightRadius?: any; + + /** + * Sets the style of an element's top border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-style + */ + borderTopStyle?: CSSValue; + + /** + * Sets the width of an element's top border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-width + */ + borderTopWidth?: CSSValue; + + /** + * Sets the width of an element's four borders. This property can have from one to four values. This is a shorthand property for setting values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-width + */ + borderWidth?: CSSValue; + + /** + * This property specifies how far an absolutely positioned box's bottom margin edge is offset above the bottom edge of the box's containing block. For relatively positioned boxes, the offset is with respect to the bottom edges of the box itself (i.e., the box is given a position in the normal flow, then offset from that position according to these properties). + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/bottom + */ + bottom?: CSSValue<'auto' | CSSLength | CSSPercentage | CSSGlobalValues>; + + /** + * Obsolete. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/box-align + */ + boxAlign?: any; + + /** + * Breaks a box into fragments creating new borders, padding and repeating backgrounds or lets it stay as a continuous box on a page break, column break, or, for inline elements, at a line break. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/box-decoration-break + */ + boxDecorationBreak?: any; + + /** + * Deprecated + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/box-direction + */ + boxDirection?: any; + + /** + * Do not use. This property has been replaced by the flex-wrap property. + * Gets or sets a value that specifies the direction to add successive rows or columns when the value of box-lines is set to multiple. + */ + boxLineProgression?: any; + + /** + * Do not use. This property has been replaced by the flex-wrap property. + * Gets or sets a value that specifies whether child elements wrap onto multiple lines or columns based on the space available in the object. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/box-lines + */ + boxLines?: any; + + /** + * Do not use. This property has been replaced by flex-order. + * Specifies the ordinal group that a child element of the object belongs to. This ordinal value identifies the display order (along the axis defined by the box-orient property) for the group. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/box-ordinal-group + */ + boxOrdinalGroup?: any; + + /** + * Deprecated. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/box-flex + */ + boxFlex?: number; + + /** + * box sizing + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing + */ + boxSizing?: CSSGlobalValues | 'content-box' | 'border-box'; + '-moz-box-sizing'?: CSSGlobalValues | 'content-box' | 'border-box'; + '-webkit-box-sizing'?: CSSGlobalValues | 'content-box' | 'border-box'; + + /** + * Box shadow + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow + */ + boxShadow?: CSSValueGeneral; + + /** + * Deprecated. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/box-flex-group + */ + boxFlexGroup?: number; + + /** + * The CSS break-after property allows you to force a break on multi-column layouts. More specifically, it allows you to force a break after an element. It allows you to determine if a break should occur, and what type of break it should be. The break-after CSS property describes how the page, column or region break behaves after the generated box. If there is no generated box, the property is ignored. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/break-after + */ + breakAfter?: 'auto' | 'avoid' | 'avoid-page' | 'page' | 'left' | 'right' | 'recto' | 'verso' | 'avoid-column' | 'column' | 'avoid-region' | 'region'; + + /** + * Control page/column/region breaks that fall above a block of content + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/break-before + */ + breakBefore?: 'auto' | 'avoid' | 'avoid-page' | 'page' | 'left' | 'right' | 'recto' | 'verso' | 'avoid-column' | 'column' | 'avoid-region' | 'region'; + + /** + * Control page/column/region breaks that fall within a block of content + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/break-inside + */ + breakInside?: 'auto' | 'avoid' | 'avoid-page' | 'avoid-column' | 'avoid-region'; + + /** + * The caption-side CSS property positions the content of a table's on the specified side. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/caption-side + */ + captionSide?: CSSGlobalValues | 'top' | 'bottom' | 'block-start' | 'block-end' | 'inline-start' | 'inline-end'; + + /** + * The clear CSS property specifies if an element can be positioned next to or must be positioned below the floating elements that precede it in the markup. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/clear + */ + clear?: CSSGlobalValues | 'none' | 'left' | 'right' | 'both'; + + /** + * Deprecated; see clip-path. + * Lets you specify the dimensions of an absolutely positioned element that should be visible, and the element is clipped into this shape, and displayed. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/clip + */ + clip?: any; + + /** + * Clipping crops an graphic, so that only a portion of the graphic is rendered, or filled. This clip-rule property, when used with the clip-path property, defines which clip rule, or algorithm, to use when filling the different parts of a graphics. + * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/clip-rule + */ + clipRule?: any; + + /** + * The color property sets the color of an element's foreground content (usually text), accepting any standard CSS color from keywords and hex values to RGB(a) and HSL(a). + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/color + */ + color?: CSSValue; + + /** + * Describes the number of columns of the element. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/column-count + */ + columnCount?: number; + + /** + * Specifies how to fill columns (balanced or sequential). + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/column-fill + */ + columnFill?: any; + + /** + * The column-gap property controls the width of the gap between columns in multi-column elements. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/column-gap + */ + columnGap?: any; + + /** + * Sets the width, style, and color of the rule between columns. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/column-rule + */ + columnRule?: any; + + /** + * Specifies the color of the rule between columns. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/column-rule-color + */ + columnRuleColor?: CSSValue; + + /** + * Specifies the width of the rule between columns. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/column-rule-width + */ + columnRuleWidth?: CSSValue; + + /** + * The column-span CSS property makes it possible for an element to span across all columns when its value is set to all. An element that spans more than one column is called a spanning element. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/column-span + */ + columnSpan?: any; + + /** + * Specifies the width of columns in multi-column elements. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/column-width + */ + columnWidth?: CSSValue; + + /** + * This property is a shorthand property for setting column-width and/or column-count. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/columns + */ + columns?: any; + + /** + * The content property is used with the :before and :after pseudo-elements, to insert generated content. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/content + */ + content?: CSSValueString; + + /** + * The counter-increment property accepts one or more names of counters (identifiers), each one optionally followed by an integer which specifies the value by which the counter should be incremented (e.g. if the value is 2, the counter increases by 2 each time it is invoked). + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/counter-increment + */ + counterIncrement?: any; + + /** + * The counter-reset property contains a list of one or more names of counters, each one optionally followed by an integer (otherwise, the integer defaults to 0.) Each time the given element is invoked, the counters specified by the property are set to the given integer. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/counter-reset + */ + counterReset?: any; + + /** + * The cue property specifies sound files (known as an "auditory icon") to be played by speech media agents before and after presenting an element's content; if only one file is specified, it is played both before and after. The volume at which the file(s) should be played, relative to the volume of the main element, may also be specified. The icon files may also be set separately with the cue-before and cue-after properties. + */ + cue?: any; + + /** + * The cue-after property specifies a sound file (known as an "auditory icon") to be played by speech media agents after presenting an element's content; the volume at which the file should be played may also be specified. The shorthand property cue sets cue sounds for both before and after the element is presented. + */ + cueAfter?: any; + + /** + * Specifies the mouse cursor displayed when the mouse pointer is over an element. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/cursor + */ + cursor?: CSSValue; + + /** + * The direction CSS property specifies the text direction/writing direction. The rtl is used for Hebrew or Arabic text, the ltr is for other languages. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/direction + */ + direction?: CSSGlobalValues | 'ltr' | 'rtl'; + + /** + * This property specifies the type of rendering box used for an element. It is a shorthand property for many other display properties. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/display + */ + display?: CSSValue; + + /** + * SVG: Used to determine or re-determine a scaled-baseline-table. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/dominant-baseline + */ + dominantBaseline?: 'auto' | 'use-script' | 'no-change' | 'reset-size' | 'ideographic' | 'alphabetic' | 'hanging' | 'mathematical' | 'central' | 'middle' | 'text-after-edge' | 'text-before-edge' | 'inherit'; + + /** + * The ‘empty-cells’ CSS property specifies how the user agent should render borders and backgrounds around cells that have no visible content. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/empty-cells + */ + emptyCells?: CSSGlobalValues | 'show' | 'hide'; + + /** + * The ‘fill’ property paints the interior of the given graphical element. The area to be painted consists of any areas inside the outline of the shape. To determine the inside of the shape, all subpaths are considered, and the interior is determined according to the rules associated with the current value of the ‘fill-rule’ property. The zero-width geometric outline of a shape is included in the area to be painted. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/fill + */ + fill?: CSSColor | 'context-stroke' | 'context-fill'; + + /** + * SVG: Specifies the opacity of the color or the content the current object is filled with. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/fill-opacity + */ + fillOpacity?: number; + + /** + * The ‘fill-rule’ property indicates the algorithm which is to be used to determine what parts of the canvas are included inside the shape. For a simple, non-intersecting path, it is intuitively clear what region lies "inside"; however, for a more complex path, such as a path that intersects itself or where one subpath encloses another, the interpretation of "inside" is not so obvious. + * The ‘fill-rule’ property provides two options for how the inside of a shape is determined: + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/fill-rule + */ + fillRule?: 'nonzero' | 'evenodd'; + + /** + * Applies various image processing effects. This property is largely unsupported. See Compatibility section for more information. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/filter + */ + filter?: string; + + /** + * Shorthand for `flex-grow`, `flex-shrink`, and `flex-basis`. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex + */ + flex?: number | string; + '-webkit-flex'?: number | string; + '-ms-flex'?: number | string; + + /** + * Obsolete, do not use. This property has been renamed to align-items. + * Specifies the alignment (perpendicular to the layout axis defined by the flex-direction property) of child elements of the object. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-align + */ + flexAlign?: any; + '-ms-flex-align'?: any; + '-webkit-flex-align'?: any; + + /** + * The flex-basis CSS property describes the initial main size of the flex item before any free space is distributed according to the flex factors described in the flex property (flex-grow and flex-shrink). + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis + */ + flexBasis?: any; + + /** + * The flex-direction CSS property describes how flex items are placed in the flex container, by setting the direction of the flex container's main axis. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction + */ + flexDirection?: any; + '-ms-flex-direction'?: any; + '-webkit-flex-direction'?: any; + + /** + * The flex-flow CSS property defines the flex container's main and cross axis. It is a shorthand property for the flex-direction and flex-wrap properties. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-flow + */ + flexFlow?: any; + + /** + * Specifies the flex grow factor of a flex item. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow + */ + flexGrow?: number; + '-ms-flex-grow'?: number; + '-webkit-flex-grow'?: number; + + /** + * Do not use. This property has been renamed to align-self + * Specifies the alignment (perpendicular to the layout axis defined by flex-direction) of child elements of the object. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-item-align + */ + flexItemAlign?: any; + + /** + * Do not use. This property has been renamed to align-content. + * Specifies how a flexbox's lines align within the flexbox when there is extra space along the axis that is perpendicular to the axis defined by the flex-direction property. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-line-pack + */ + flexLinePack?: any; + + flexPositive?: any; + '-ms-flex-positive'?: any; + '-webkit-flex-positive'?: any; + + flexNegative?: any; + '-ms-flex-negative'?: any; + '-webkit-flex-negative'?: any; + + /** + * Gets or sets a value that specifies the ordinal group that a flexbox element belongs to. This ordinal value identifies the display order for the group. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-order + */ + flexOrder?: any; + + /** + * Specifies the flex shrink factor of a flex item. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-shrink + */ + flexShrink?: number; + '-ms-flex-shrink'?: number; + '-webkit-flex-shrink'?: number; + + /** + * Specifies whether flex items are forced into a single line or can be wrapped onto multiple lines. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap + */ + flexWrap?: CSSGlobalValues | 'nowrap' | 'wrap' | 'wrap-reverse'; + '-ms-flex-wrap'?: CSSGlobalValues | 'nowrap' | 'wrap' | 'wrap-reverse'; + '-webkit-flex-wrap'?: CSSGlobalValues | 'nowrap' | 'wrap' | 'wrap-reverse'; + + /** + * Elements which have the style float are floated horizontally. These elements can move as far to the left or right of the containing element. All elements after the floating element will flow around it, but elements before the floating element are not impacted. If several floating elements are placed after each other, they will float next to each other as long as there is room. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/float + */ + float?: CSSGlobalValues | 'left' | 'right' | 'none' | 'inline-start' | 'inline-end'; + + /** + * Flows content from a named flow (specified by a corresponding flow-into) through selected elements to form a dynamic chain of layout regions. + */ + flowFrom?: any; + + /** + * The font property is shorthand that allows you to do one of two things: you can either set up six of the most mature font properties in one line, or you can set one of a choice of keywords to adopt a system font setting. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font + */ + font?: any; + + /** + * The font-family property allows one or more font family names and/or generic family names to be specified for usage on the selected element(s)' text. The browser then goes through the list; for each character in the selection it applies the first font family that has an available glyph for that character. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family + */ + fontFamily?: any; + + /** + * The font-kerning property allows contextual adjustment of inter-glyph spacing, i.e. the spaces between the characters in text. This property controls metric kerning - that utilizes adjustment data contained in the font. Optical Kerning is not supported as yet. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-kerning + */ + fontKerning?: CSSGlobalValues | 'auto' | 'normal' | 'none'; + + /** + * Specifies the size of the font. Used to compute em and ex units. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-size + */ + fontSize?: CSSValue; + + /** + * The font-size-adjust property adjusts the font-size of the fallback fonts defined with font-family, so that the x-height is the same no matter what font is used. This preserves the readability of the text when fallback happens. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-size-adjust + */ + fontSizeAdjust?: any; + + /** + * Allows you to expand or condense the widths for a normal, condensed, or expanded font face. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-stretch + */ + fontStretch?: CSSGlobalValues | 'normal' | 'ultra-condensed' | 'extra-condensed' | 'condensed' | 'semi-condensed' | 'semi-expanded' | 'expanded' | 'extra-expanded' | 'ultra-expanded'; + + /** + * The font-style property allows normal, italic, or oblique faces to be selected. Italic forms are generally cursive in nature while oblique faces are typically sloped versions of the regular face. Oblique faces can be simulated by artificially sloping the glyphs of the regular face. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-style + */ + fontStyle?: CSSGlobalValues | 'normal' | 'italic' | 'oblique'; + + /** + * This value specifies whether the user agent is allowed to synthesize bold or oblique font faces when a font family lacks bold or italic faces. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-synthesis + */ + fontSynthesis?: any; + + /** + * The font-variant property enables you to select the small-caps font within a font family. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant + */ + fontVariant?: any; + + /** + * Fonts can provide alternate glyphs in addition to default glyph for a character. This property provides control over the selection of these alternate glyphs. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-alternates + */ + fontVariantAlternates?: any; + + /** + * Specifies the weight or boldness of the font. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight + */ + fontWeight?: CSSFontWeight; + + /** + * Lays out one or more grid items bound by 4 grid lines. Shorthand for setting grid-column-start, grid-column-end, grid-row-start, and grid-row-end in a single declaration. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area + */ + gridArea?: any; + + /** + * Specifies the size of an implicitly-created grid column track. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-columns + */ + gridAutoColumns?: any; + + /** + * Controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-flow + */ + gridAutoFlow?: any; + + /** + * Specifies the size of an implicitly-created grid row track. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-rows + */ + gridAutoRows?: any; + + /** + * Controls a grid item's placement in a grid area, particularly grid position and a grid span. Shorthand for setting grid-column-start and grid-column-end in a single declaration. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column + */ + gridColumn?: any; + + /** + * Specifies the gutter between grid columns. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-gap + */ + gridColumnGap?: any; + + /** + * Controls a grid item's placement in a grid area as well as grid position and a grid span. The grid-column-end property (with grid-row-start, grid-row-end, and grid-column-start) determines a grid item's placement by specifying the grid lines of a grid item's grid area. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-end + */ + gridColumnEnd?: any; + + /** + * Determines a grid item's placement by specifying the starting grid lines of a grid item's grid area . A grid item's placement in a grid area consists of a grid position and a grid span. See also ( grid-row-start, grid-row-end, and grid-column-end) + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-start + */ + gridColumnStart?: any; + + /** + * Specifies the gutters between grid rows and columns, Shorthand for for grid-row-gap and grid-column-gap in a single declaration. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-gap + */ + gridGap?: any; + + /** + * Gets or sets a value that indicates which row an element within a Grid should appear in. Shorthand for setting grid-row-start and grid-row-end in a single declaration. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row + */ + gridRow?: any; + + /** + * Determines a grid item’s placement by specifying the block-end. A grid item's placement in a grid area consists of a grid position and a grid span. The grid-row-end property (with grid-row-start, grid-column-start, and grid-column-end) determines a grid item's placement by specifying the grid lines of a grid item's grid area. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-end + */ + gridRowEnd?: any; + + /** + * Specifies the gutter between grid rows. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-gap + */ + gridRowGap?: any; + + /** + * Determines a grid item’s start position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start edge of its grid area. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-start + */ + gridRowStart?: any; + + /** + * Specifies a row position based upon an integer location, string value, or desired row size. + * css/properties/grid-row is used as short-hand for grid-row-position and grid-row-position + */ + gridRowPosition?: any; + + gridRowSpan?: any; + + /** + * Is a shorthand property for defining grid columns, rows, and areas. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas + */ + gridTemplate?: any; + + /** + * Specifies named grid areas which are not associated with any particular grid item, but can be referenced from the grid-placement properties. The syntax of the grid-template-areas property also provides a visualization of the structure of the grid, making the overall layout of the grid container easier to understand. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas + */ + gridTemplateAreas?: any; + + /** + * Specifies (with grid-template-rows) the line names and track sizing functions of the grid. Each sizing function can be specified as a length, a percentage of the grid container’s size, a measurement of the contents occupying the column or row, or a fraction of the free space in the grid. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns + */ + gridTemplateColumns?: any; + + /** + * Specifies (with grid-template-columns) the line names and track sizing functions of the grid. Each sizing function can be specified as a length, a percentage of the grid container’s size, a measurement of the contents occupying the column or row, or a fraction of the free space in the grid. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-rows + */ + gridTemplateRows?: any; + + /** + * Sets the height of an element. The content area of the element height does not include the padding, border, and margin of the element. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/height + */ + height?: CSSValue<'auto' | CSSLength | CSSPercentage | CSSGlobalValues>; + + /** + * Specifies the minimum number of characters in a hyphenated word + * @see https://msdn.microsoft.com/en-us/library/hh771865(v=vs.85).aspx + */ + hyphenateLimitChars?: any; + + /** + * Indicates the maximum number of successive hyphenated lines in an element. The ‘no-limit’ value means that there is no limit. + * @see https://msdn.microsoft.com/en-us/library/hh771867(v=vs.85).aspx + */ + hyphenateLimitLines?: any; + + /** + * Specifies the maximum amount of trailing whitespace (before justification) that may be left in a line before hyphenation is triggered to pull part of a word from the next line back up into the current one. + * @see https://msdn.microsoft.com/en-us/library/hh771869(v=vs.85).aspx + */ + hyphenateLimitZone?: any; + + /** + * Specifies whether or not words in a sentence can be split by the use of a manual or automatic hyphenation mechanism. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/hyphens + */ + hyphens?: CSSGlobalValues | string | 'none' | 'manual' | 'auto'; + + /** + * Controls the state of the input method editor for text fields. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/ime-mode + */ + imeMode?: CSSGlobalValues | 'auto' | 'normal' | 'active' | 'inactive' | 'disabled'; + + /** + * Defines how the browser distributes space between and around flex items + * along the main-axis of their container. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content + */ + justifyContent?: JustifyContent; + '-webkit-justify-content'?: JustifyContent; + '-ms-flex-pack'?: string; + + /** + * Defines the default justify-self for all items of the box, given them the + * default way of justifying each box along the appropriate axis + */ + justifyItems?: JustifyItems; + + /** + * Defines the way of justifying a box inside its container along the appropriate axis. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/justify-self + */ + justifySelf?: JustifySelf; + + layoutGrid?: any; + + layoutGridChar?: any; + + layoutGridLine?: any; + + layoutGridMode?: any; + + layoutGridType?: any; + + /** + * Sets the left edge of an element + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/left + */ + left?: CSSValue<'auto' | CSSLength | CSSPercentage | CSSGlobalValues>; + + /** + * The letter-spacing CSS property specifies the spacing behavior between text characters. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing + */ + letterSpacing?: any; + + /** + * Deprecated. Gets or sets line-breaking rules for text in selected languages such as Japanese, Chinese, and Korean. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-break + */ + lineBreak?: any; + + lineClamp?: number; + + /** + * Specifies the height of an inline block level element. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height + */ + lineHeight?: CSSValue; + + /** + * Shorthand property that sets the list-style-type, list-style-position and list-style-image properties in one declaration. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/list-style + */ + listStyle?: any; + + /** + * This property sets the image that will be used as the list item marker. When the image is available, it will replace the marker set with the 'list-style-type' marker. That also means that if the image is not available, it will show the style specified by list-style-property + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-image + */ + listStyleImage?: any; + + /** + * Specifies if the list-item markers should appear inside or outside the content flow. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-position + */ + listStylePosition?: CSSGlobalValues | 'inside' | 'outside'; + + /** + * Specifies the type of list-item marker in a list. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type + */ + listStyleType?: any; + + /** + * The margin property is shorthand to allow you to set all four margins of an element at once. Its equivalent longhand properties are margin-top, margin-right, margin-bottom and margin-left. Negative values are also allowed. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin + */ + margin?: any; + + /** + * margin-bottom sets the bottom margin of an element. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom + */ + marginBottom?: any; + + /** + * margin-left sets the left margin of an element. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left + */ + marginLeft?: any; + + /** + * margin-right sets the right margin of an element. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right + */ + marginRight?: any; + + /** + * margin-top sets the top margin of an element. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top + */ + marginTop?: CSSValueGeneral; + + /** + * The marquee-direction determines the initial direction in which the marquee content moves. + */ + marqueeDirection?: any; + + /** + * The 'marquee-style' property determines a marquee's scrolling behavior. + */ + marqueeStyle?: any; + + /** + * This property is shorthand for setting mask-image, mask-mode, mask-repeat, mask-position, mask-clip, mask-origin, mask-composite and mask-size. Omitted values are set to their original properties' initial values. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/mask + */ + mask?: any; + + /** + * This property is shorthand for setting mask-border-source, mask-border-slice, mask-border-width, mask-border-outset, and mask-border-repeat. Omitted values are set to their original properties' initial values. + */ + maskBorder?: any; + + /** + * This property specifies how the images for the sides and the middle part of the mask image are scaled and tiled. The first keyword applies to the horizontal sides, the second one applies to the vertical ones. If the second keyword is absent, it is assumed to be the same as the first, similar to the CSS border-image-repeat property. + */ + maskBorderRepeat?: any; + + /** + * This property specifies inward offsets from the top, right, bottom, and left edges of the mask image, dividing it into nine regions: four corners, four edges, and a middle. The middle image part is discarded and treated as fully transparent black unless the fill keyword is present. The four values set the top, right, bottom and left offsets in that order, similar to the CSS border-image-slice property. + */ + maskBorderSlice?: any; + + /** + * Specifies an image to be used as a mask. An image that is empty, fails to download, is non-existent, or cannot be displayed is ignored and does not mask the element. + */ + maskBorderSource?: any; + + /** + * This property sets the width of the mask box image, similar to the CSS border-image-width property. + */ + maskBorderWidth?: CSSValue; + + /** + * Determines the mask painting area, which defines the area that is affected by the mask. The painted content of an element may be restricted to this area. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/mask-clip + */ + maskClip?: any; + + /** + * For elements rendered as a single box, specifies the mask positioning area. For elements rendered as multiple boxes (e.g., inline boxes on several lines, boxes on several pages) specifies which boxes box-decoration-break operates on to determine the mask positioning area(s). + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/mask-origin + */ + maskOrigin?: any; + + /** + * This property must not be used. It is no longer included in any standard or standard track specification, nor is it implemented in any browser. It is only used when the text-align-last property is set to size. It controls allowed adjustments of font-size to fit line content. + */ + maxFontSize?: any; + + /** + * Sets the maximum height for an element. It prevents the height of the element to exceed the specified value. If min-height is specified and is greater than max-height, max-height is overridden. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/max-height + */ + maxHeight?: CSSValue; + + /** + * Sets the maximum width for an element. It limits the width property to be larger than the value specified in max-width. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/max-width + */ + maxWidth?: CSSValue; + + /** + * Sets the minimum height for an element. It prevents the height of the element to be smaller than the specified value. The value of min-height overrides both max-height and height. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/min-height + */ + minHeight?: CSSValue; + + /** + * Sets the minimum width of an element. It limits the width property to be not smaller than the value specified in min-width. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/min-width + */ + minWidth?: CSSValue; + + /** + * The blend mode defines the formula that must be used to mix the colors with the backdrop + * @see https://drafts.fxtf.org/compositing-1/#mix-blend-mode + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode + */ + mixBlendMode?: CSSValue; + + /** + * Specifies how the contents of a replaced element should be fitted to the box established by its used height and width. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit + */ + objectFit?: CSSObjectFit; + + /** + * Determines the alignment of the element inside its box. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/object-position + */ + objectPosition?: string | CSSGlobalValues; + + /** + * Specifies the transparency of an element. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/opacity + */ + opacity?: number | CSSGlobalValues; + + /** + * Specifies the order used to lay out flex items in their flex container. + * Elements are laid out in the ascending order of the order value. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/order + */ + order?: number; + + /** + * In paged media, this property defines the minimum number of lines in + * a block container that must be left at the bottom of the page. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/orphans + */ + orphans?: number; + + /** + * The CSS outline property is a shorthand property for setting one or more of the individual outline properties outline-style, outline-width and outline-color in a single rule. In most cases the use of this shortcut is preferable and more convenient. + * Outlines differ from borders in the following ways: • Outlines do not take up space, they are drawn above the content. + * • Outlines may be non-rectangular. They are rectangular in Gecko/Firefox. Internet Explorer attempts to place the smallest contiguous outline around all elements or shapes that are indicated to have an outline. Opera draws a non-rectangular shape around a construct. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/outline + */ + outline?: any; + + /** + * The outline-color property sets the color of the outline of an element. An outline is a line that is drawn around elements, outside the border edge, to make the element stand out. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/outline-color + */ + outlineColor?: CSSValue; + + /** + * The outline-style property sets the style of the outline of an element. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/outline-style + */ + outlineStyle?: CSSGlobalValues | 'auto' | 'none' | 'dotted' | 'dashed' | 'solid' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset'; + + /** + * The outline-offset property offsets the outline and draw it beyond the border edge. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/outline-offset + */ + outlineOffset?: any; + + /** + * The outline-width CSS property is used to set the width of the outline of an element. An outline is a line that is drawn around elements, outside the border edge, to make the element stand out + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/outline-width + */ + outlineWidth?: CSSGlobalValues | 'thin' | 'medium' | 'thick' | CSSLength; + + /** + * The overflow property controls how extra content exceeding the bounding box of an element is rendered. It can be used in conjunction with an element that has a fixed width and height, to eliminate text-induced page distortion. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/overflow + */ + overflow?: CSSValue; + + /** + * Specifies the preferred scrolling methods for elements that overflow. + */ + overflowStyle?: any; + + /** + * The overflow-wrap CSS property specifies whether or not the browser should insert line breaks within words to prevent + * text from overflowing its content box. In contrast to word-break, overflow-wrap will only create a break if an entire + * word cannot be placed on its own line without overflowing. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap + */ + overflowWrap?: CSSGlobalValues | 'normal' | 'break-word'; + + /** + * Controls how extra content exceeding the x-axis of the bounding box of an element is rendered. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-x + */ + overflowX?: CSSValue; + + /** + * Controls how extra content exceeding the y-axis of the bounding box of an element is rendered. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-y + */ + overflowY?: CSSValue; + + /** + * The padding optional CSS property sets the required padding space on one to four sides of an element. The padding area is the space between an element and its border. Negative values are not allowed but decimal values are permitted. The element size is treated as fixed, and the content of the element shifts toward the center as padding is increased. + * The padding property is a shorthand to avoid setting each side separately (padding-top, padding-right, padding-bottom, padding-left). + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding + */ + padding?: any; + + /** + * The padding-bottom CSS property of an element sets the padding space required on the bottom of an element. The padding area is the space between the content of the element and its border. Contrary to margin-bottom values, negative values of padding-bottom are invalid. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom + */ + paddingBottom?: CSSValue; + + /** + * The padding-left CSS property of an element sets the padding space required on the left side of an element. The padding area is the space between the content of the element and its border. Contrary to margin-left values, negative values of padding-left are invalid. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left + */ + paddingLeft?: CSSValue; + + /** + * The padding-right CSS property of an element sets the padding space required on the right side of an element. The padding area is the space between the content of the element and its border. Contrary to margin-right values, negative values of padding-right are invalid. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right + */ + paddingRight?: CSSValue; + + /** + * The padding-top CSS property of an element sets the padding space required on the top of an element. The padding area is the space between the content of the element and its border. Contrary to margin-top values, negative values of padding-top are invalid. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top + */ + paddingTop?: CSSValue; + + /** + * The page-break-after property is supported in all major browsers. With CSS3, page-break-* properties are only aliases of the break-* properties. The CSS3 Fragmentation spec defines breaks for all CSS box fragmentation. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-after + */ + pageBreakAfter?: CSSGlobalValues | 'auto' | 'always' | 'avoid' | 'left' | 'right' | 'recto' | 'verso'; + + /** + * The page-break-before property sets the page-breaking behavior before an element. With CSS3, page-break-* properties are only aliases of the break-* properties. The CSS3 Fragmentation spec defines breaks for all CSS box fragmentation. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-before + */ + pageBreakBefore?: CSSGlobalValues | 'auto' | 'always' | 'avoid' | 'left' | 'right' | 'recto' | 'verso'; + + /** + * Sets the page-breaking behavior inside an element. With CSS3, page-break-* properties are only aliases of the break-* properties. The CSS3 Fragmentation spec defines breaks for all CSS box fragmentation. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-inside + */ + pageBreakInside?: CSSGlobalValues | 'auto' | 'avoid'; + + /** + * The pause property determines how long a speech media agent should pause before and after presenting an element. It is a shorthand for the pause-before and pause-after properties. + */ + pause?: any; + + /** + * The pause-after property determines how long a speech media agent should pause after presenting an element. It may be replaced by the shorthand property pause, which sets pause time before and after. + */ + pauseAfter?: any; + + /** + * The pause-before property determines how long a speech media agent should pause before presenting an element. It may be replaced by the shorthand property pause, which sets pause time before and after. + */ + pauseBefore?: any; + + /** + * The perspective property defines how far an element is placed from the view on the z-axis, from the screen to the viewer. + * Perspective defines how an object is viewed. In graphic arts, perspective is the representation on a flat surface of what the viewer's eye would see in a 3D space. (See Wikipedia for more information about graphical perspective and for related illustrations.) + * The illusion of perspective on a flat surface, such as a computer screen, is created by projecting points on the flat surface as they would appear if the flat surface were a window through which the viewer was looking at the object. In discussion of virtual environments, this flat surface is called a projection plane. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/perspective + */ + perspective?: any; + + /** + * The perspective-origin property establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element. + * When used with perspective, perspective-origin changes the appearance of an object, as if a viewer were looking at it from a different origin. An object appears differently if a viewer is looking directly at it versus looking at it from below, above, or from the side. Thus, the perspective-origin is like a vanishing point. + * The default value of perspective-origin is 50% 50%. This displays an object as if the viewer's eye were positioned directly at the center of the screen, both top-to-bottom and left-to-right. A value of 0% 0% changes the object as if the viewer was looking toward the top left angle. A value of 100% 100% changes the appearance as if viewed toward the bottom right angle. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/perspective-origin + */ + perspectiveOrigin?: any; + + /** + * The pointer-events property allows you to control whether an element can be the target for the pointing device (e.g, mouse, pen) events. + * @see https://developer.mozilla.org/en/docs/Web/CSS/pointer-events + */ + pointerEvents?: CSSGlobalValues | 'auto' | 'none' | 'visiblePainted' | 'visibleFill' | 'visibleStroke' | 'visible' | 'painted' | 'fill' | 'stroke' | 'all'; + + /** + * The position property controls the type of positioning used by an element within its parent elements. The effect of the position property depends on a lot of factors, for example the position property of parent elements. + * @see https://developer.mozilla.org/en/docs/Web/CSS/position + */ + position?: CSSValue; + + /** + * Obsolete: unsupported. + * This property determines whether or not a full-width punctuation mark character should be trimmed if it appears at the beginning of a line, so that its "ink" lines up with the first glyph in the line above and below. + */ + punctuationTrim?: any; + + /** + * Sets the type of quotation marks for embedded quotations. + * @see https://developer.mozilla.org/en/docs/Web/CSS/quotes + */ + quotes?: any; + + /** + * Controls whether the last region in a chain displays additional 'overset' content according its default overflow property, or if it displays a fragment of content as if it were flowing into a subsequent region. + */ + regionFragment?: any; + + /** + * The resize CSS property lets you control the resizability of an element. + * @see https://developer.mozilla.org/en/docs/Web/CSS/resize + */ + resize?: CSSGlobalValues | 'none' | 'both ' | 'horizontal' | 'vertical'; + + /** + * The rest-after property determines how long a speech media agent should pause after presenting an element's main content, before presenting that element's exit cue sound. It may be replaced by the shorthand property rest, which sets rest time before and after. + */ + restAfter?: any; + + /** + * The rest-before property determines how long a speech media agent should pause after presenting an intro cue sound for an element, before presenting that element's main content. It may be replaced by the shorthand property rest, which sets rest time before and after. + */ + restBefore?: any; + + /** + * Specifies the position an element in relation to the right side of the containing element. + * @see https://developer.mozilla.org/en/docs/Web/CSS/right + */ + right?: CSSValue<'auto' | CSSLength | CSSPercentage | CSSGlobalValues>; + + /** + * Specifies the distribution of the different ruby elements over the base. + * @see https://developer.mozilla.org/en/docs/Web/CSS/ruby-align + */ + rubyAlign?: CSSGlobalValues | 'start' | 'center' | 'space-between' | 'space-around'; + + /** + * Specifies the position of a ruby element relatives to its base element. It can be position over the element (over), under it (under), or between the characters, on their right side (inter-character). + * @see https://developer.mozilla.org/en/docs/Web/CSS/ruby-position + */ + rubyPosition?: CSSGlobalValues | 'over' | 'under' | 'inter-character'; + + /** + * SVG: For the element, this attribute defines the x-radius of the element. A value of zero disables rendering of the element. + * https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/rx + */ + rx?: number; + + /** + * SVG: For the element, this attribute defines the y-radius of the element. A value of zero disables rendering of the element. + * https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/ry + */ + ry?: number; + + /** + * Defines the alpha channel threshold used to extract a shape from an image. Can be thought of as a "minimum opacity" threshold; that is, a value of 0.5 means that the shape will enclose all the pixels that are more than 50% opaque. + * @see https://developer.mozilla.org/en/docs/Web/CSS/shape-image-threshold + */ + shapeImageThreshold?: any; + + /** + * A future level of CSS Shapes will define a shape-inside property, which will define a shape to wrap content within the element. See Editor's Draft and CSSWG wiki page on next-level plans + */ + shapeInside?: any; + + /** + * Adds a margin to a shape-outside. In effect, defines a new shape that is the smallest contour around all the points that are the shape-margin distance outward perpendicular to each point on the underlying shape. For points where a perpendicular direction is not defined (e.g., a triangle corner), takes all points on a circle centered at the point and with a radius of the shape-margin distance. This property accepts only non-negative values. + * @see https://developer.mozilla.org/en/docs/Web/CSS/shape-margin + */ + shapeMargin?: any; + + /** + * Declares a shape around which text should be wrapped, with possible modifications from the shape-margin property. The shape defined by shape-outside and shape-margin changes the geometry of a float element's float area. + * @see https://developer.mozilla.org/en/docs/Web/CSS/shape-outside + */ + shapeOutside?: any; + + /** + * The speak property determines whether or not a speech synthesizer will read aloud the contents of an element. + */ + speak?: any; + + /** + * The speak-as property determines how the speech synthesizer interprets the content: words as whole words or as a sequence of letters, numbers as a numerical value or a sequence of digits, punctuation as pauses in speech or named punctuation characters. + */ + speakAs?: any; + + /** + * Location of a font-face. Used with the @font-face at rule + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src + */ + src?: CSSValueString; + + /** + * SVG: Defines the color of the outline on a given graphical element. + * @see https://developer.mozilla.org/en/docs/Web/CSS/stroke + */ + stroke?: string; + + /** + * SVG: Controls the pattern of dashes and gaps used to stroke paths. + * @see https://developer.mozilla.org/en/docs/Web/CSS/stroke-dasharray + */ + strokeDasharray?: number[]; + + /** + * SVG: Specifies the distance into the dash pattern to start the dash + * @see https://developer.mozilla.org/en/docs/Web/SVG/Attribute/stroke-dashoffset + */ + strokeDashoffset?: CSSValue; + + /** + * SVG: Specifies the shape to be used at the end of open subpaths when they are stroked. + * @see https://developer.mozilla.org/en/docs/Web/SVG/Attribute/stroke-linecap + */ + strokeLinecap?: CSSGlobalValues | 'butt' | 'round' | 'square'; + + /** + * SVG: Specifies the opacity of the outline on the current object. + * @see https://developer.mozilla.org/en/docs/Web/CSS/stroke-opacity + */ + strokeOpacity?: number; + + /** + * SVG: Specifies the width of the outline on the current object. + * @see https://developer.mozilla.org/en/docs/Web/CSS/stroke-width + */ + strokeWidth?: CSSValue; + + /** + * The tab-size CSS property is used to customise the width of a tab (U+0009) character. + * @see https://developer.mozilla.org/en/docs/Web/CSS/tab-size + */ + tabSize?: any; + + /** + * The 'table-layout' property controls the algorithm used to lay out the table cells, rows, and columns. + * @see https://developer.mozilla.org/en/docs/Web/CSS/table-layout + */ + tableLayout?: any; + + /** + * SVG: The text-anchor attribute is used to align (start-, middle- or end-alignment) a string of text relative to a given point. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/text-anchor + */ + textAnchor?: 'start' | 'middle' | 'end' | 'inherit'; + + /** + * The text-align CSS property describes how inline content like text is aligned in its parent block element. text-align does not control the alignment of block elements itself, only their inline content. + * @see https://developer.mozilla.org/en/docs/Web/CSS/text-align + */ + textAlign?: CSSGlobalValues | 'start' | 'end' | 'left' | 'right' | 'center' | 'justify' | 'justify-all' | 'match-parent'; + + /** + * The text-align-last CSS property describes how the last line of a block element or a line before line break is aligned in its parent block element. + * @see https://developer.mozilla.org/en/docs/Web/CSS/text-align-last + */ + textAlignLast?: CSSGlobalValues | 'auto' | 'start' | 'end' | 'left' | 'right' | 'center' | 'justify'; + + /** + * The text-decoration CSS property is used to set the text formatting to underline, overline, line-through or blink. + * underline and overline decorations are positioned under the text, line-through over it. + * @see https://developer.mozilla.org/en/docs/Web/CSS/text-decoration + */ + textDecoration?: any; + + /** + * Sets the color of any text decoration, such as underlines, overlines, and strike throughs. + * @see https://developer.mozilla.org/en/docs/Web/CSS/text-decoration-color + */ + textDecorationColor?: CSSValue; + + /** + * Sets what kind of line decorations are added to an element, such as underlines, overlines, etc. + * @see https://developer.mozilla.org/en/docs/Web/CSS/text-decoration-line + */ + textDecorationLine?: any; + + textDecorationLineThrough?: any; + + textDecorationNone?: any; + + textDecorationOverline?: any; + + /** + * Specifies what parts of an element’s content are skipped over when applying any text decoration. + * @see https://developer.mozilla.org/en/docs/Web/CSS/text-decoration-skip + */ + textDecorationSkip?: any; + + /** + * This property specifies the style of the text decoration line drawn on the specified element. The intended meaning for the values are the same as those of the border-style-properties. + * @see https://developer.mozilla.org/en/docs/Web/CSS/text-decoration-style + */ + textDecorationStyle?: CSSGlobalValues | 'solid' | 'double' | 'dotted' | 'dashed' | 'wavy'; + + textDecorationUnderline?: any; + + /** + * The text-emphasis property will apply special emphasis marks to the elements text. Slightly similar to the text-decoration property only that this property can have affect on the line-height. It also is noted that this is shorthand for text-emphasis-style and for text-emphasis-color. + * @see https://developer.mozilla.org/en/docs/Web/CSS/text-emphasis + */ + textEmphasis?: any; + + /** + * The text-emphasis-color property specifies the foreground color of the emphasis marks. + * @see https://developer.mozilla.org/en/docs/Web/CSS/text-emphasis-color + */ + textEmphasisColor?: CSSValue; + + /** + * The text-emphasis-style property applies special emphasis marks to an element's text. + * @see https://developer.mozilla.org/en/docs/Web/CSS/text-emphasis-style + */ + textEmphasisStyle?: any; + + /** + * This property helps determine an inline box's block-progression dimension, derived from the text-height and font-size properties for non-replaced elements, the height or the width for replaced elements, and the stacked block-progression dimension for inline-block elements. The block-progression dimension determines the position of the padding, border and margin for the element. + */ + textHeight?: CSSValue; + + /** + * Specifies the amount of space horizontally that should be left on the first line of the text of an element. This horizontal spacing is at the beginning of the first line and is in respect to the left edge of the containing block box. + * @see https://developer.mozilla.org/en/docs/Web/CSS/text-indent + */ + textIndent?: any; + + textJustifyTrim?: any; + + textKashidaSpace?: any; + + /** + * The text-line-through property is a shorthand property for text-line-through-style, text-line-through-color and text-line-through-mode. (Considered obsolete; use text-decoration instead.) + */ + textLineThrough?: any; + + /** + * Specifies the line colors for the line-through text decoration. + * (Considered obsolete; use text-decoration-color instead.) + */ + textLineThroughColor?: CSSValue; + + /** + * Sets the mode for the line-through text decoration, determining whether the text decoration affects the space characters or not. + * (Considered obsolete; use text-decoration-skip instead.) + */ + textLineThroughMode?: any; + + /** + * Specifies the line style for line-through text decoration. + * (Considered obsolete; use text-decoration-style instead.) + */ + textLineThroughStyle?: any; + + /** + * Specifies the line width for the line-through text decoration. + */ + textLineThroughWidth?: CSSValue; + + /** + * The text-overflow shorthand CSS property determines how overflowed content that is not displayed is signaled to the users. It can be clipped, display an ellipsis ('…', U+2026 HORIZONTAL ELLIPSIS) or a Web author-defined string. It covers the two long-hand properties text-overflow-mode and text-overflow-ellipsis + * @see https://developer.mozilla.org/en/docs/Web/CSS/text-overflow + */ + textOverflow?: CSSGlobalValues | 'clip' | 'ellipsis' | string; + + /** + * The text-overline property is the shorthand for the text-overline-style, text-overline-width, text-overline-color, and text-overline-mode properties. + */ + textOverline?: any; + + /** + * Specifies the line color for the overline text decoration. + */ + textOverlineColor?: CSSValue; + + /** + * Sets the mode for the overline text decoration, determining whether the text decoration affects the space characters or not. + */ + textOverlineMode?: any; + + /** + * Specifies the line style for overline text decoration. + */ + textOverlineStyle?: any; + + /** + * Specifies the line width for the overline text decoration. + */ + textOverlineWidth?: CSSValue; + + /** + * The text-rendering CSS property provides information to the browser about how to optimize when rendering text. Options are: legibility, speed or geometric precision. + * @see https://developer.mozilla.org/en/docs/Web/CSS/text-rendering + */ + textRendering?: CSSGlobalValues | 'auto' | 'optimizeSpeed' | 'optimizeLegibility' | 'geometricPrecision'; + + /** + * Obsolete: unsupported. + */ + textScript?: any; + + /** + * The CSS text-shadow property applies one or more drop shadows to the text and of an element. Each shadow is specified as an offset from the text, along with optional color and blur radius values. + * @see https://developer.mozilla.org/en/docs/Web/CSS/text-shadow + */ + textShadow?: any; + + /** + * This property transforms text for styling purposes. (It has no effect on the underlying content.) + * @see https://developer.mozilla.org/en/docs/Web/CSS/text-transform + */ + textTransform?: CSSGlobalValues | 'none' | 'capitalize' | 'uppercase' | 'lowercase' | 'full-width'; + + /** + * Unsupported. + * This property will add a underline position value to the element that has an underline defined. + */ + textUnderlinePosition?: any; + + /** + * After review this should be replaced by text-decoration should it not? + * This property will set the underline style for text with a line value for underline, overline, and line-through. + */ + textUnderlineStyle?: any; + + /** + * This property specifies how far an absolutely positioned box's top margin edge is offset below the top edge of the box's containing block. For relatively positioned boxes, the offset is with respect to the top edges of the box itself (i.e., the box is given a position in the normal flow, then offset from that position according to these properties). + * @see https://developer.mozilla.org/en/docs/Web/CSS/top + */ + top?: CSSValue<'auto' | CSSLength | CSSPercentage | CSSGlobalValues>; + + /** + * Determines whether touch input may trigger default behavior supplied by the user agent, such as panning or zooming. + * @see https://developer.mozilla.org/en/docs/Web/CSS/touch-action + */ + touchAction?: CSSGlobalValues | 'auto' | 'none' | 'pan-x' | 'pan-left' | 'pan-right' | 'pan-y' | 'pan-up' | 'pan-down' | 'manipulation'; + + /** + * CSS transforms allow elements styled with CSS to be transformed in two-dimensional or three-dimensional space. Using this property, elements can be translated, rotated, scaled, and skewed. The value list may consist of 2D and/or 3D transform values. + * @see https://developer.mozilla.org/en/docs/Web/CSS/transform + */ + transform?: CSSTransformFunction; + + /** + * This property defines the origin of the transformation axes relative to the element to which the transformation is applied. + * @see https://developer.mozilla.org/en/docs/Web/CSS/transform-origin + */ + transformOrigin?: any; + + /** + * This property allows you to define the relative position of the origin of the transformation grid along the z-axis. + */ + transformOriginZ?: any; + + /** + * This property specifies how nested elements are rendered in 3D space relative to their parent. + * @see https://developer.mozilla.org/en/docs/Web/CSS/transform-style + */ + transformStyle?: CSSGlobalValues | 'flat' | 'preserve-3d'; + + /** + * The transition CSS property is a shorthand property for transition-property, transition-duration, transition-timing-function, and transition-delay. It allows to define the transition between two states of an element. + * @see https://developer.mozilla.org/en/docs/Web/CSS/transition + */ + transition?: any; + + /** + * Defines when the transition will start. A value of ‘0s’ means the transition will execute as soon as the property is changed. Otherwise, the value specifies an offset from the moment the property is changed, and the transition will delay execution by that offset. + * @see https://developer.mozilla.org/en/docs/Web/CSS/transition-delay + */ + transitionDelay?: any; + + /** + * The 'transition-duration' property specifies the length of time a transition animation takes to complete. + * @see https://developer.mozilla.org/en/docs/Web/CSS/transition-duration + */ + transitionDuration?: any; + + /** + * The 'transition-property' property specifies the name of the CSS property to which the transition is applied. + * @see https://developer.mozilla.org/en/docs/Web/CSS/transition-property + */ + transitionProperty?: CSSValueString; + + /** + * Sets the pace of action within a transition + * @see https://developer.mozilla.org/en/docs/Web/CSS/transition-timing-function + */ + transitionTimingFunction?: CSSTimingFunction; + + /** + * The unicode-bidi CSS property specifies the level of embedding with respect to the bidirectional algorithm. + * @see https://developer.mozilla.org/en/docs/Web/CSS/unicode-bidi + */ + unicodeBidi?: any; + + /** + * unicode-range allows you to set a specific range of characters to be downloaded from a font (embedded using @font-face) and made available for use on the current page. + * @see https://developer.mozilla.org/en/docs/Web/CSS/unicode-range + */ + unicodeRange?: any; + + /** + * This is for all the high level UX stuff. + */ + userFocus?: any; + + /** + * For inputing user content + */ + userInput?: any; + + /** + * User select + * @see https://developer.mozilla.org/en/docs/Web/CSS/user-select + */ + userSelect?: 'auto' | 'text' | 'none' | 'contain' | 'all'; + '-moz-user-select'?: 'auto' | 'text' | 'none' | 'contain' | 'all'; + '-webkit-user-select'?: 'auto' | 'text' | 'none' | 'contain' | 'all'; + '-ms-user-select'?: 'auto' | 'text' | 'none' | 'contain' | 'all'; + + /** + * The vertical-align property controls how inline elements or text are vertically aligned compared to the baseline. If this property is used on table-cells it controls the vertical alignment of content of the table cell. + * @see https://developer.mozilla.org/en/docs/Web/CSS/vertical-align + */ + verticalAlign?: CSSGlobalValues | 'baseline' | 'sub' | 'super' | 'text-top' | 'text-bottom' | 'middle' | 'top' | 'bottom' | CSSLength | CSSPercentage; + + /** + * The visibility property specifies whether the boxes generated by an element are rendered. + * @see https://developer.mozilla.org/en/docs/Web/CSS/visibility + */ + visibility?: CSSGlobalValues | 'visible' | 'hidden' | 'collapse'; + + /** + * The voice-balance property sets the apparent position (in stereo sound) of the synthesized voice for spoken media. + */ + voiceBalance?: any; + + /** + * The voice-duration property allows the author to explicitly set the amount of time it should take a speech synthesizer to read an element's content, for example to allow the speech to be synchronized with other media. With a value of auto (the default) the length of time it takes to read the content is determined by the content itself and the voice-rate property. + */ + voiceDuration?: any; + + /** + * The voice-family property sets the speaker's voice used by a speech media agent to read an element. The speaker may be specified as a named character (to match a voice option in the speech reading software) or as a generic description of the age and gender of the voice. Similar to the font-family property for visual media, a comma-separated list of fallback options may be given in case the speech reader does not recognize the character name or cannot synthesize the requested combination of generic properties. + */ + voiceFamily?: any; + + /** + * The voice-pitch property sets pitch or tone (high or low) for the synthesized speech when reading an element; the pitch may be specified absolutely or relative to the normal pitch for the voice-family used to read the text. + */ + voicePitch?: any; + + /** + * The voice-range property determines how much variation in pitch or tone will be created by the speech synthesize when reading an element. Emphasized text, grammatical structures and punctuation may all be rendered as changes in pitch, this property determines how strong or obvious those changes are; large ranges are associated with enthusiastic or emotional speech, while small ranges are associated with flat or mechanical speech. + */ + voiceRange?: any; + + /** + * The voice-rate property sets the speed at which the voice synthesized by a speech media agent will read content. + */ + voiceRate?: any; + + /** + * The voice-stress property sets the level of vocal emphasis to be used for synthesized speech reading the element. + */ + voiceStress?: any; + + /** + * The voice-volume property sets the volume for spoken content in speech media. It replaces the deprecated volume property. + */ + voiceVolume?: any; + + /** + * The white-space property controls whether and how white space inside the element is collapsed, and whether lines may wrap at unforced "soft wrap" opportunities. + * @see https://developer.mozilla.org/en/docs/Web/CSS/white-space + */ + whiteSpace?: CSSGlobalValues | 'normal' | 'nowrap' | 'pre' | 'pre-line' | 'pre-wrap'; + + /** + * Obsolete: unsupported. + */ + whiteSpaceTreatment?: any; + + /** + * In paged media, this property defines the mimimum number of lines + * that must be left at the top of the second page. + * @see https://developer.mozilla.org/en/docs/Web/CSS/widows + */ + widows?: number; + + /** + * Specifies the width of the content area of an element. The content area of the element width does not include the padding, border, and margin of the element. + * @see https://developer.mozilla.org/en/docs/Web/CSS/width + */ + width?: CSSValue<'auto' | CSSLength | CSSPercentage | CSSGlobalValues>; + + /** + * The ‘will-change’ CSS property provides a way for authors to hint browsers about the kind of changes to be expected on an element, so that the browser can set up appropriate optimizations ahead of time before the element is actually changed. These kind of optimizations can increase the responsiveness of a page by doing potentially expensive work ahead of time before they are actually required. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/will-change + */ + willChange?: CSSValue<'auto' | 'scroll-position' | 'contents' | CSSValueString>; + + /** + * The word-break property is often used when there is long generated content that is strung together without and spaces or hyphens to beak apart. A common case of this is when there is a long URL that does not have any hyphens. This case could potentially cause the breaking of the layout as it could extend past the parent element. + * @see https://developer.mozilla.org/en/docs/Web/CSS/word-break + */ + wordBreak?: CSSGlobalValues | 'normal' | 'break-all' | 'keep-all'; + + /** + * The word-spacing CSS property specifies the spacing behavior between "words". + * @see https://developer.mozilla.org/en/docs/Web/CSS/word-spacing + */ + wordSpacing?: CSSGlobalValues | 'normal' | CSSLength | CSSPercentage; + + /** + * An alias of css/properties/overflow-wrap, word-wrap defines whether to break words when the content exceeds the boundaries of its container. + * @see https://developer.mozilla.org/en/docs/Web/CSS/word-wrap + */ + wordWrap?: CSSGlobalValues | 'normal' | 'break-word'; + + /** + * Specifies how exclusions affect inline content within block-level elements. Elements lay out their inline content in their content area but wrap around exclusion areas. + */ + wrapFlow?: any; + + /** + * Set the value that is used to offset the inner wrap shape from other shapes. Inline content that intersects a shape with this property will be pushed by this shape's margin. + */ + wrapMargin?: any; + + /** + * Obsolete and unsupported. Do not use. + * This CSS property controls the text when it reaches the end of the block in which it is enclosed. + */ + wrapOption?: any; + + /** + * writing-mode specifies if lines of text are laid out horizontally or vertically, and the direction which lines of text and blocks progress. + * @see https://developer.mozilla.org/en/docs/Web/CSS/writing-mode + */ + writingMode?: CSSGlobalValues | 'horizontal-tb' | 'vertical-rl' | 'vertical-lr' | 'sideways-rl' | 'sideways-lr'; + + /** + * The z-index property specifies the z-order of an element and its descendants. + * When elements overlap, z-order determines which one covers the other. + * @see https://developer.mozilla.org/en/docs/Web/CSS/z-index + */ + zIndex?: CSSGlobalValues | 'auto' | number; + + /** + * Sets the initial zoom factor of a document defined by @viewport. + * @see https://developer.mozilla.org/en/docs/Web/CSS/zoom + */ + zoom?: 'auto' | number; + + // VENDOR prefixes + // non-authoritative source: http://peter.sh/experiments/vendor-prefixed-css-property-overview/ + '-apple-trailing-word'?: CSSValueGeneral; + '-epub-caption-side'?: CSSValueGeneral; + '-epub-hyphens'?: CSSValueGeneral; + '-epub-text-combine'?: CSSValueGeneral; + '-epub-text-emphasis'?: CSSValueGeneral; + '-epub-text-emphasis-color'?: CSSValueGeneral; + '-epub-text-emphasis-style'?: CSSValueGeneral; + '-epub-text-orientation'?: CSSValueGeneral; + '-epub-text-transform'?: CSSValueGeneral; + '-epub-word-break'?: CSSValueGeneral; + '-epub-writing-mode'?: CSSValueGeneral; + '-internal-marquee-direction'?: CSSValueGeneral; + '-internal-marquee-increment'?: CSSValueGeneral; + '-internal-marquee-repetition'?: CSSValueGeneral; + '-internal-marquee-speed'?: CSSValueGeneral; + '-internal-marquee-style'?: CSSValueGeneral; + '-moz-appearance'?: CSSValueGeneral; + '-moz-binding'?: CSSValueGeneral; + '-moz-border-bottom-colors'?: CSSValueGeneral; + '-moz-border-end'?: CSSValueGeneral; + '-moz-border-end-color'?: CSSValueGeneral; + '-moz-border-end-style'?: CSSValueGeneral; + '-moz-border-end-width'?: CSSValueGeneral; + '-moz-border-left-colors'?: CSSValueGeneral; + '-moz-border-right-colors'?: CSSValueGeneral; + '-moz-border-start'?: CSSValueGeneral; + '-moz-border-start-color'?: CSSValueGeneral; + '-moz-border-start-style'?: CSSValueGeneral; + '-moz-border-start-width'?: CSSValueGeneral; + '-moz-border-top-colors'?: CSSValueGeneral; + '-moz-box-align'?: CSSValueGeneral; + '-moz-box-direction'?: CSSValueGeneral; + '-moz-box-flex'?: CSSValueGeneral; + '-moz-box-ordinal-group'?: CSSValueGeneral; + '-moz-box-orient'?: CSSValueGeneral; + '-moz-box-pack'?: CSSValueGeneral; + '-moz-column-count'?: CSSValueGeneral; + '-moz-column-fill'?: CSSValueGeneral; + '-moz-column-gap'?: CSSValueGeneral; + '-moz-column-rule'?: CSSValueGeneral; + '-moz-column-rule-color'?: CSSValueGeneral; + '-moz-column-rule-style'?: CSSValueGeneral; + '-moz-column-rule-width'?: CSSValueGeneral; + '-moz-column-width'?: CSSValueGeneral; + '-moz-columns'?: CSSValueGeneral; + '-moz-control-character-visibility'?: CSSValueGeneral; + '-moz-float-edge'?: CSSValueGeneral; + '-moz-force-broken-image-icon'?: CSSValueGeneral; + '-moz-hyphens'?: CSSValueGeneral; + '-moz-image-region'?: CSSValueGeneral; + '-moz-margin-end'?: CSSValueGeneral; + '-moz-margin-start'?: CSSValueGeneral; + '-moz-math-display'?: CSSValueGeneral; + '-moz-math-variant'?: CSSValueGeneral; + '-moz-min-font-size-ratio'?: CSSValueGeneral; + '-moz-orient'?: CSSValueGeneral; + '-moz-osx-font-smoothing'?: CSSValueGeneral; + '-moz-outline-radius'?: CSSValueGeneral; + '-moz-outline-radius-bottomleft'?: CSSValueGeneral; + '-moz-outline-radius-bottomright'?: CSSValueGeneral; + '-moz-outline-radius-topleft'?: CSSValueGeneral; + '-moz-outline-radius-topright'?: CSSValueGeneral; + '-moz-padding-end'?: CSSValueGeneral; + '-moz-padding-start'?: CSSValueGeneral; + '-moz-script-level'?: CSSValueGeneral; + '-moz-script-min-size'?: CSSValueGeneral; + '-moz-script-size-multiplier'?: CSSValueGeneral; + '-moz-stack-sizing'?: CSSValueGeneral; + '-moz-tab-size'?: CSSValueGeneral; + '-moz-text-align-last'?: CSSValueGeneral; + '-moz-text-decoration-color'?: CSSValueGeneral; + '-moz-text-decoration-line'?: CSSValueGeneral; + '-moz-text-decoration-style'?: CSSValueGeneral; + '-moz-text-size-adjust'?: CSSValueGeneral; + '-moz-top-layer'?: CSSValueGeneral; + '-moz-transform'?: CSSValueGeneral; + '-moz-user-focus'?: CSSValueGeneral; + '-moz-user-input'?: CSSValueGeneral; + '-moz-user-modify'?: CSSValueGeneral; + '-moz-window-dragging'?: CSSValueGeneral; + '-moz-window-shadow'?: CSSValueGeneral; + '-ms-accelerator'?: CSSValueGeneral; + '-ms-animation'?: CSSValueGeneral; + '-ms-animation-delay'?: CSSValueGeneral; + '-ms-animation-direction'?: CSSValueGeneral; + '-ms-animation-duration'?: CSSValueGeneral; + '-ms-animation-fill-mode'?: CSSValueGeneral; + '-ms-animation-iteration-count'?: CSSValueGeneral; + '-ms-animation-name'?: CSSValueGeneral; + '-ms-animation-play-state'?: CSSValueGeneral; + '-ms-animation-timing-function'?: CSSValueGeneral; + '-ms-backface-visibility'?: CSSValueGeneral; + '-ms-background-position-x'?: CSSValueGeneral; + '-ms-background-position-y'?: CSSValueGeneral; + '-ms-behavior'?: CSSValueGeneral; + '-ms-block-progression'?: CSSValueGeneral; + '-ms-content-zoom-chaining'?: CSSValueGeneral; + '-ms-content-zoom-limit'?: CSSValueGeneral; + '-ms-content-zoom-limit-max'?: CSSValueGeneral; + '-ms-content-zoom-limit-min'?: CSSValueGeneral; + '-ms-content-zoom-snap'?: CSSValueGeneral; + '-ms-content-zoom-snap-points'?: CSSValueGeneral; + '-ms-content-zoom-snap-type'?: CSSValueGeneral; + '-ms-content-zooming'?: CSSValueGeneral; + '-ms-filter'?: CSSValueGeneral; + '-ms-flex-flow'?: CSSValueGeneral; + '-ms-flex-line-pack'?: CSSValueGeneral; + '-ms-flex-order'?: CSSValueGeneral; + '-ms-flex-preferred-size'?: CSSValueGeneral; + '-ms-flow-from'?: CSSValueGeneral; + '-ms-flow-into'?: CSSValueGeneral; + '-ms-font-feature-settings'?: CSSValueGeneral; + '-ms-grid-column'?: CSSValueGeneral; + '-ms-grid-column-align'?: CSSValueGeneral; + '-ms-grid-column-span'?: CSSValueGeneral; + '-ms-grid-columns'?: CSSValueGeneral; + '-ms-grid-row'?: CSSValueGeneral; + '-ms-grid-row-align'?: CSSValueGeneral; + '-ms-grid-row-span'?: CSSValueGeneral; + '-ms-grid-rows'?: CSSValueGeneral; + '-ms-high-contrast-adjust'?: CSSValueGeneral; + '-ms-hyphenate-limit-chars'?: CSSValueGeneral; + '-ms-hyphenate-limit-lines'?: CSSValueGeneral; + '-ms-hyphenate-limit-zone'?: CSSValueGeneral; + '-ms-hyphens'?: CSSValueGeneral; + '-ms-ime-align'?: CSSValueGeneral; + '-ms-ime-mode'?: CSSValueGeneral; + '-ms-interpolation-mode'?: CSSValueGeneral; + '-ms-layout-flow'?: CSSValueGeneral; + '-ms-layout-grid'?: CSSValueGeneral; + '-ms-layout-grid-char'?: CSSValueGeneral; + '-ms-layout-grid-line'?: CSSValueGeneral; + '-ms-layout-grid-mode'?: CSSValueGeneral; + '-ms-layout-grid-type'?: CSSValueGeneral; + '-ms-line-break'?: CSSValueGeneral; + '-ms-overflow-style'?: CSSValueGeneral; + '-ms-overflow-x'?: CSSValueGeneral; + '-ms-overflow-y'?: CSSValueGeneral; + '-ms-perspective'?: CSSValueGeneral; + '-ms-perspective-origin'?: CSSValueGeneral; + '-ms-perspective-origin-x'?: CSSValueGeneral; + '-ms-perspective-origin-y'?: CSSValueGeneral; + '-ms-scroll-chaining'?: CSSValueGeneral; + '-ms-scroll-limit'?: CSSValueGeneral; + '-ms-scroll-limit-x-max'?: CSSValueGeneral; + '-ms-scroll-limit-x-min'?: CSSValueGeneral; + '-ms-scroll-limit-y-max'?: CSSValueGeneral; + '-ms-scroll-limit-y-min'?: CSSValueGeneral; + '-ms-scroll-rails'?: CSSValueGeneral; + '-ms-scroll-snap-points-x'?: CSSValueGeneral; + '-ms-scroll-snap-points-y'?: CSSValueGeneral; + '-ms-scroll-snap-type'?: CSSValueGeneral; + '-ms-scroll-snap-x'?: CSSValueGeneral; + '-ms-scroll-snap-y'?: CSSValueGeneral; + '-ms-scroll-translation'?: CSSValueGeneral; + '-ms-scrollbar-3dlight-color'?: CSSValueGeneral; + '-ms-scrollbar-arrow-color'?: CSSValueGeneral; + '-ms-scrollbar-base-color'?: CSSValueGeneral; + '-ms-scrollbar-darkshadow-color'?: CSSValueGeneral; + '-ms-scrollbar-face-color'?: CSSValueGeneral; + '-ms-scrollbar-highlight-color'?: CSSValueGeneral; + '-ms-scrollbar-shadow-color'?: CSSValueGeneral; + '-ms-scrollbar-track-color'?: CSSValueGeneral; + '-ms-text-align-last'?: CSSValueGeneral; + '-ms-text-autospace'?: CSSValueGeneral; + '-ms-text-combine-horizontal'?: CSSValueGeneral; + '-ms-text-justify'?: CSSValueGeneral; + '-ms-text-kashida-space'?: CSSValueGeneral; + '-ms-text-overflow'?: CSSValueGeneral; + '-ms-text-size-adjust'?: CSSValueGeneral; + '-ms-text-underline-position'?: CSSValueGeneral; + '-ms-touch-action'?: CSSValueGeneral; + '-ms-touch-select'?: CSSValueGeneral; + '-ms-transform'?: CSSValueGeneral; + '-ms-transform-origin'?: CSSValueGeneral; + '-ms-transform-origin-x'?: CSSValueGeneral; + '-ms-transform-origin-y'?: CSSValueGeneral; + '-ms-transform-origin-z'?: CSSValueGeneral; + '-ms-transform-style'?: CSSValueGeneral; + '-ms-transition'?: CSSValueGeneral; + '-ms-transition-delay'?: CSSValueGeneral; + '-ms-transition-duration'?: CSSValueGeneral; + '-ms-transition-property'?: CSSValueGeneral; + '-ms-transition-timing-function'?: CSSValueGeneral; + '-ms-word-break'?: CSSValueGeneral; + '-ms-word-wrap'?: CSSValueGeneral; + '-ms-wrap-flow'?: CSSValueGeneral; + '-ms-wrap-margin'?: CSSValueGeneral; + '-ms-wrap-through'?: CSSValueGeneral; + '-ms-writing-mode'?: CSSValueGeneral; + '-ms-zoom'?: CSSValueGeneral; + '-webkit-align-content'?: CSSValueGeneral; + '-webkit-alt'?: CSSValueGeneral; + '-webkit-animation'?: CSSValueGeneral; + '-webkit-animation-delay'?: CSSValueGeneral; + '-webkit-animation-direction'?: CSSValueGeneral; + '-webkit-animation-duration'?: CSSValueGeneral; + '-webkit-animation-fill-mode'?: CSSValueGeneral; + '-webkit-animation-iteration-count'?: CSSValueGeneral; + '-webkit-animation-name'?: CSSValueGeneral; + '-webkit-animation-play-state'?: CSSValueGeneral; + '-webkit-animation-timing-function'?: CSSValueGeneral; + '-webkit-animation-trigger'?: CSSValueGeneral; + '-webkit-app-region'?: CSSValueGeneral; + '-webkit-appearance'?: CSSValueGeneral; + '-webkit-aspect-ratio'?: CSSValueGeneral; + '-webkit-backdrop-filter'?: CSSValueGeneral; + '-webkit-backface-visibility'?: CSSValueGeneral; + '-webkit-background-clip'?: CSSValueGeneral; + '-webkit-background-composite'?: CSSValueGeneral; + '-webkit-background-origin'?: CSSValueGeneral; + '-webkit-background-size'?: CSSValueGeneral; + '-webkit-border-after'?: CSSValueGeneral; + '-webkit-border-after-color'?: CSSValueGeneral; + '-webkit-border-after-style'?: CSSValueGeneral; + '-webkit-border-after-width'?: CSSValueGeneral; + '-webkit-border-before'?: CSSValueGeneral; + '-webkit-border-before-color'?: CSSValueGeneral; + '-webkit-border-before-style'?: CSSValueGeneral; + '-webkit-border-before-width'?: CSSValueGeneral; + '-webkit-border-bottom-left-radius'?: CSSValueGeneral; + '-webkit-border-bottom-right-radius'?: CSSValueGeneral; + '-webkit-border-end'?: CSSValueGeneral; + '-webkit-border-end-color'?: CSSValueGeneral; + '-webkit-border-end-style'?: CSSValueGeneral; + '-webkit-border-end-width'?: CSSValueGeneral; + '-webkit-border-fit'?: CSSValueGeneral; + '-webkit-border-horizontal-spacing'?: CSSValueGeneral; + '-webkit-border-image'?: CSSValueGeneral; + '-webkit-border-radius'?: CSSValueGeneral; + '-webkit-border-start'?: CSSValueGeneral; + '-webkit-border-start-color'?: CSSValueGeneral; + '-webkit-border-start-style'?: CSSValueGeneral; + '-webkit-border-start-width'?: CSSValueGeneral; + '-webkit-border-top-left-radius'?: CSSValueGeneral; + '-webkit-border-top-right-radius'?: CSSValueGeneral; + '-webkit-border-vertical-spacing'?: CSSValueGeneral; + '-webkit-box-align'?: CSSValueGeneral; + '-webkit-box-decoration-break'?: CSSValueGeneral; + '-webkit-box-direction'?: CSSValueGeneral; + '-webkit-box-flex'?: CSSValueGeneral; + '-webkit-box-flex-group'?: CSSValueGeneral; + '-webkit-box-lines'?: CSSValueGeneral; + '-webkit-box-ordinal-group'?: CSSValueGeneral; + '-webkit-box-orient'?: CSSValueGeneral; + '-webkit-box-pack'?: CSSValueGeneral; + '-webkit-box-reflect'?: CSSValueGeneral; + '-webkit-box-shadow'?: CSSValueGeneral; + '-webkit-clip-path'?: CSSValueGeneral; + '-webkit-color-correction'?: CSSValueGeneral; + '-webkit-column-axis'?: CSSValueGeneral; + '-webkit-column-break-after'?: CSSValueGeneral; + '-webkit-column-break-before'?: CSSValueGeneral; + '-webkit-column-break-inside'?: CSSValueGeneral; + '-webkit-column-count'?: CSSValueGeneral; + '-webkit-column-fill'?: CSSValueGeneral; + '-webkit-column-gap'?: CSSValueGeneral; + '-webkit-column-progression'?: CSSValueGeneral; + '-webkit-column-rule'?: CSSValueGeneral; + '-webkit-column-rule-color'?: CSSValueGeneral; + '-webkit-column-rule-style'?: CSSValueGeneral; + '-webkit-column-rule-width'?: CSSValueGeneral; + '-webkit-column-span'?: CSSValueGeneral; + '-webkit-column-width'?: CSSValueGeneral; + '-webkit-columns'?: CSSValueGeneral; + '-webkit-cursor-visibility'?: CSSValueGeneral; + '-webkit-dashboard-region'?: CSSValueGeneral; + '-webkit-filter'?: CSSValueGeneral; + '-webkit-flex-basis'?: CSSValueGeneral; + '-webkit-flex-flow'?: CSSValueGeneral; + '-webkit-flow-from'?: CSSValueGeneral; + '-webkit-flow-into'?: CSSValueGeneral; + '-webkit-font-feature-settings'?: CSSValueGeneral; + '-webkit-font-kerning'?: CSSValueGeneral; + '-webkit-font-size-delta'?: CSSValueGeneral; + '-webkit-font-smoothing'?: CSSValueGeneral; + '-webkit-font-variant-ligatures'?: CSSValueGeneral; + '-webkit-grid'?: CSSValueGeneral; + '-webkit-grid-area'?: CSSValueGeneral; + '-webkit-grid-auto-columns'?: CSSValueGeneral; + '-webkit-grid-auto-flow'?: CSSValueGeneral; + '-webkit-grid-auto-rows'?: CSSValueGeneral; + '-webkit-grid-column'?: CSSValueGeneral; + '-webkit-grid-column-end'?: CSSValueGeneral; + '-webkit-grid-column-gap'?: CSSValueGeneral; + '-webkit-grid-column-start'?: CSSValueGeneral; + '-webkit-grid-gap'?: CSSValueGeneral; + '-webkit-grid-row'?: CSSValueGeneral; + '-webkit-grid-row-end'?: CSSValueGeneral; + '-webkit-grid-row-gap'?: CSSValueGeneral; + '-webkit-grid-row-start'?: CSSValueGeneral; + '-webkit-grid-template'?: CSSValueGeneral; + '-webkit-grid-template-areas'?: CSSValueGeneral; + '-webkit-grid-template-columns'?: CSSValueGeneral; + '-webkit-grid-template-rows'?: CSSValueGeneral; + '-webkit-highlight'?: CSSValueGeneral; + '-webkit-hyphenate-character'?: CSSValueGeneral; + '-webkit-hyphenate-limit-after'?: CSSValueGeneral; + '-webkit-hyphenate-limit-before'?: CSSValueGeneral; + '-webkit-hyphenate-limit-lines'?: CSSValueGeneral; + '-webkit-hyphens'?: CSSValueGeneral; + '-webkit-initial-letter'?: CSSValueGeneral; + '-webkit-justify-items'?: CSSValueGeneral; + '-webkit-justify-self'?: CSSValueGeneral; + '-webkit-line-align'?: CSSValueGeneral; + '-webkit-line-box-contain'?: CSSValueGeneral; + '-webkit-line-break'?: CSSValueGeneral; + '-webkit-line-clamp'?: CSSValueGeneral; + '-webkit-line-grid'?: CSSValueGeneral; + '-webkit-line-snap'?: CSSValueGeneral; + '-webkit-locale'?: CSSValueGeneral; + '-webkit-logical-height'?: CSSValueGeneral; + '-webkit-logical-width'?: CSSValueGeneral; + '-webkit-margin-after'?: CSSValueGeneral; + '-webkit-margin-after-collapse'?: CSSValueGeneral; + '-webkit-margin-before'?: CSSValueGeneral; + '-webkit-margin-before-collapse'?: CSSValueGeneral; + '-webkit-margin-bottom-collapse'?: CSSValueGeneral; + '-webkit-margin-collapse'?: CSSValueGeneral; + '-webkit-margin-end'?: CSSValueGeneral; + '-webkit-margin-start'?: CSSValueGeneral; + '-webkit-margin-top-collapse'?: CSSValueGeneral; + '-webkit-marquee'?: CSSValueGeneral; + '-webkit-marquee-direction'?: CSSValueGeneral; + '-webkit-marquee-increment'?: CSSValueGeneral; + '-webkit-marquee-repetition'?: CSSValueGeneral; + '-webkit-marquee-speed'?: CSSValueGeneral; + '-webkit-marquee-style'?: CSSValueGeneral; + '-webkit-mask'?: CSSValueGeneral; + '-webkit-mask-box-image'?: CSSValueGeneral; + '-webkit-mask-box-image-outset'?: CSSValueGeneral; + '-webkit-mask-box-image-repeat'?: CSSValueGeneral; + '-webkit-mask-box-image-slice'?: CSSValueGeneral; + '-webkit-mask-box-image-source'?: CSSValueGeneral; + '-webkit-mask-box-image-width'?: CSSValueGeneral; + '-webkit-mask-clip'?: CSSValueGeneral; + '-webkit-mask-composite'?: CSSValueGeneral; + '-webkit-mask-image'?: CSSValueGeneral; + '-webkit-mask-origin'?: CSSValueGeneral; + '-webkit-mask-position'?: CSSValueGeneral; + '-webkit-mask-position-x'?: CSSValueGeneral; + '-webkit-mask-position-y'?: CSSValueGeneral; + '-webkit-mask-repeat'?: CSSValueGeneral; + '-webkit-mask-repeat-x'?: CSSValueGeneral; + '-webkit-mask-repeat-y'?: CSSValueGeneral; + '-webkit-mask-size'?: CSSValueGeneral; + '-webkit-mask-source-type'?: CSSValueGeneral; + '-webkit-max-logical-height'?: CSSValueGeneral; + '-webkit-max-logical-width'?: CSSValueGeneral; + '-webkit-min-logical-height'?: CSSValueGeneral; + '-webkit-min-logical-width'?: CSSValueGeneral; + '-webkit-nbsp-mode'?: CSSValueGeneral; + '-webkit-opacity'?: CSSValueGeneral; + '-webkit-order'?: CSSValueGeneral; + '-webkit-padding-after'?: CSSValueGeneral; + '-webkit-padding-before'?: CSSValueGeneral; + '-webkit-padding-end'?: CSSValueGeneral; + '-webkit-padding-start'?: CSSValueGeneral; + '-webkit-perspective'?: CSSValueGeneral; + '-webkit-perspective-origin'?: CSSValueGeneral; + '-webkit-perspective-origin-x'?: CSSValueGeneral; + '-webkit-perspective-origin-y'?: CSSValueGeneral; + '-webkit-print-color-adjust'?: CSSValueGeneral; + '-webkit-region-break-after'?: CSSValueGeneral; + '-webkit-region-break-before'?: CSSValueGeneral; + '-webkit-region-break-inside'?: CSSValueGeneral; + '-webkit-region-fragment'?: CSSValueGeneral; + '-webkit-rtl-ordering'?: CSSValueGeneral; + '-webkit-ruby-position'?: CSSValueGeneral; + '-webkit-scroll-snap-coordinate'?: CSSValueGeneral; + '-webkit-scroll-snap-destination'?: CSSValueGeneral; + '-webkit-scroll-snap-points-x'?: CSSValueGeneral; + '-webkit-scroll-snap-points-y'?: CSSValueGeneral; + '-webkit-scroll-snap-type'?: CSSValueGeneral; + '-webkit-shape-image-threshold'?: CSSValueGeneral; + '-webkit-shape-margin'?: CSSValueGeneral; + '-webkit-shape-outside'?: CSSValueGeneral; + '-webkit-svg-shadow'?: CSSValueGeneral; + '-webkit-tap-highlight-color'?: CSSValueGeneral; + '-webkit-text-align-last'?: CSSValueGeneral; + '-webkit-text-combine'?: CSSValueGeneral; + '-webkit-text-decoration'?: CSSValueGeneral; + '-webkit-text-decoration-color'?: CSSValueGeneral; + '-webkit-text-decoration-line'?: CSSValueGeneral; + '-webkit-text-decoration-skip'?: CSSValueGeneral; + '-webkit-text-decoration-style'?: CSSValueGeneral; + '-webkit-text-decorations-in-effect'?: CSSValueGeneral; + '-webkit-text-emphasis'?: CSSValueGeneral; + '-webkit-text-emphasis-color'?: CSSValueGeneral; + '-webkit-text-emphasis-position'?: CSSValueGeneral; + '-webkit-text-emphasis-style'?: CSSValueGeneral; + '-webkit-text-fill-color'?: CSSValueGeneral; + '-webkit-text-justify'?: CSSValueGeneral; + '-webkit-text-orientation'?: CSSValueGeneral; + '-webkit-text-security'?: CSSValueGeneral; + '-webkit-text-size-adjust'?: CSSValueGeneral; + '-webkit-text-stroke'?: CSSValueGeneral; + '-webkit-text-stroke-color'?: CSSValueGeneral; + '-webkit-text-stroke-width'?: CSSValueGeneral; + '-webkit-text-underline-position'?: CSSValueGeneral; + '-webkit-text-zoom'?: CSSValueGeneral; + '-webkit-touch-callout'?: CSSValueGeneral; + '-webkit-transform'?: CSSValueGeneral; + '-webkit-transform-origin'?: CSSValueGeneral; + '-webkit-transform-origin-x'?: CSSValueGeneral; + '-webkit-transform-origin-y'?: CSSValueGeneral; + '-webkit-transform-origin-z'?: CSSValueGeneral; + '-webkit-transform-style'?: CSSValueGeneral; + '-webkit-transition'?: CSSValueGeneral; + '-webkit-transition-delay'?: CSSValueGeneral; + '-webkit-transition-duration'?: CSSValueGeneral; + '-webkit-transition-property'?: CSSValueGeneral; + '-webkit-transition-timing-function'?: CSSValueGeneral; + '-webkit-user-drag'?: CSSValueGeneral; + '-webkit-user-modify'?: CSSValueGeneral; + '-webkit-writing-mode'?: CSSValueGeneral; +} + + +export type PseudoCssKey = + | ':active' + | ':any' + | ':checked' + | ':default' + | ':disabled' + | ':empty' + | ':enabled' + | ':first' + | ':first-child' + | ':first-of-type' + | ':fullscreen' + | ':focus' + | ':hover' + | ':indeterminate' + | ':in-range' + | ':invalid' + | ':last-child' + | ':last-of-type' + | ':left' + | ':link' + | ':only-child' + | ':only-of-type' + | ':optional' + | ':out-of-range' + | ':read-only' + | ':read-write' + | ':required' + | ':right' + | ':root' + | ':scope' + | ':target' + | ':valid' + | ':visited' + // TODO + // | ':dir()' + // | ':lang()' + // | ':not()' + // | ':nth-child()' + // | ':nth-last-child()' + // | ':nth-last-of-type()' + // | ':nth-of-type()' + | '::after' + | '::before' + | '::cue' + | '::first-letter' + | '::first-line' + | '::selection' + | '::backdrop ' + | '::placeholder ' + | '::marker ' + | '::spelling-error ' + | '::grammar-error '; + +export type PseudoCss = Partial>; + +export interface JssProps { + '@global'?: CSSProperties & PseudoCss; + extend?: string; + composes?: string | string[]; +} + +export interface JssExpand { + animation: + | { + delay: CSSProperties['animationDelay']; + direction: CSSProperties['animationDirection']; + duration: CSSProperties['animationDuration']; + iterationCount: CSSProperties['animationIterationCount']; + name: CSSProperties['animationName']; + playState: CSSProperties['animationPlayState']; + timingFunction: any; + } + | CSSProperties['animation']; + background: + | { + attachment: CSSProperties['backgroundAttachment']; + color: CSSProperties['backgroundColor']; + image: CSSProperties['backgroundImage']; + position: CSSProperties['backgroundPosition'] | number[]; // Can be written using array e.g. `[0 0]` + repeat: CSSProperties['backgroundRepeat']; + size: Array; // Can be written using array e.g. `['center' 'center']` + } + | CSSProperties['background']; + border: + | { + color: CSSProperties['borderColor']; + style: CSSProperties['borderStyle']; + width: CSSProperties['borderWidth']; + } + | CSSProperties['border']; + boxShadow: + | { + x: any; + y: any; + blur: any; + spread: any; + color: CSSProperties['color']; + inset?: 'inset'; // If you want to add inset you need to write "inset: 'inset'" + } + | CSSProperties['boxShadow']; + flex: + | { + basis: CSSProperties['flexBasis']; + direction: CSSProperties['flexDirection']; + flow: CSSProperties['flexFlow']; + grow: CSSProperties['flexGrow']; + shrink: CSSProperties['flexShrink']; + wrap: CSSProperties['flexWrap']; + } + | CSSProperties['flex']; + font: + | { + family: CSSProperties['fontFamily']; + size: CSSProperties['fontSize']; + stretch: CSSProperties['fontStretch']; + style: CSSProperties['fontStyle']; + variant: CSSProperties['fontVariant']; + weight: CSSProperties['fontWeight']; + } + | CSSProperties['font']; + listStyle: + | { + image: CSSProperties['listStyleImage']; + position: CSSProperties['listStylePosition']; + type: CSSProperties['listStyleType']; + } + | CSSProperties['listStyle']; + margin: + | { + bottom: CSSProperties['marginBottom']; + left: CSSProperties['marginLeft']; + right: CSSProperties['marginRight']; + top: CSSProperties['marginTop']; + } + | CSSProperties['margin']; + padding: + | { + bottom: CSSProperties['paddingBottom']; + left: CSSProperties['paddingLeft']; + right: CSSProperties['paddingRight']; + top: CSSProperties['paddingTop']; + } + | CSSProperties['padding']; + outline: + | { + color: CSSProperties['outlineColor']; + style: 'none' | 'hidden' | 'dotted' | 'dashed' | 'solid' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset'; + width: any; + } + | CSSProperties['outline']; + textShadow: + | { + x: any; + y: any; + blur: any; + color: CSSProperties['color']; + } + | CSSProperties['textShadow']; + transition: + | { + delay: CSSProperties['transitionDelay']; + duration: CSSProperties['transitionDuration']; + property: CSSProperties['transitionProperty']; + timingFunction: CSSProperties['transitionTimingFunction']; + } + | CSSProperties['transition']; +} + +export type JssExpandArr = { [k in keyof JssExpand]?: JssExpand[k] | Array }; + +export type SimpleStyle = CSSProperties & PseudoCss & JssProps & JssExpandArr; +export type Style = Observable | SimpleStyle; diff --git a/types/jss/index.d.ts b/types/jss/index.d.ts index 8054d7f6a6..f6ce6999d8 100644 --- a/types/jss/index.d.ts +++ b/types/jss/index.d.ts @@ -5,184 +5,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import { types } from 'typestyle'; -import { Observable } from './observable'; - -export type PseudoCssKey = - | ':active' - | ':any' - | ':checked' - | ':default' - | ':disabled' - | ':empty' - | ':enabled' - | ':first' - | ':first-child' - | ':first-of-type' - | ':fullscreen' - | ':focus' - | ':hover' - | ':indeterminate' - | ':in-range' - | ':invalid' - | ':last-child' - | ':last-of-type' - | ':left' - | ':link' - | ':only-child' - | ':only-of-type' - | ':optional' - | ':out-of-range' - | ':read-only' - | ':read-write' - | ':required' - | ':right' - | ':root' - | ':scope' - | ':target' - | ':valid' - | ':visited' - // TODO - // | ':dir()' - // | ':lang()' - // | ':not()' - // | ':nth-child()' - // | ':nth-last-child()' - // | ':nth-last-of-type()' - // | ':nth-of-type()' - | '::after' - | '::before' - | '::cue' - | '::first-letter' - | '::first-line' - | '::selection' - | '::backdrop ' - | '::placeholder ' - | '::marker ' - | '::spelling-error ' - | '::grammar-error '; - -export type PseudoCss = Partial>; - -export interface JssProps { - '@global'?: types.CSSProperties & PseudoCss; - extend?: string; - composes?: string | string[]; -} - -export type css = types.CSSProperties; - -export interface JssExpand { - animation: - | { - delay: css['animationDelay']; - direction: css['animationDirection']; - duration: css['animationDuration']; - iterationCount: css['animationIterationCount']; - name: css['animationName']; - playState: css['animationPlayState']; - timingFunction: any; - } - | css['animation']; - background: - | { - attachment: css['backgroundAttachment']; - color: css['backgroundColor']; - image: css['backgroundImage']; - position: css['backgroundPosition'] | number[]; // Can be written using array e.g. `[0 0]` - repeat: css['backgroundRepeat']; - size: Array; // Can be written using array e.g. `['center' 'center']` - } - | css['background']; - border: - | { - color: css['borderColor']; - style: css['borderStyle']; - width: css['borderWidth']; - } - | css['border']; - boxShadow: - | { - x: any; - y: any; - blur: any; - spread: any; - color: css['color']; - inset?: 'inset'; // If you want to add inset you need to write "inset: 'inset'" - } - | css['boxShadow']; - flex: - | { - basis: css['flexBasis']; - direction: css['flexDirection']; - flow: css['flexFlow']; - grow: css['flexGrow']; - shrink: css['flexShrink']; - wrap: css['flexWrap']; - } - | css['flex']; - font: - | { - family: css['fontFamily']; - size: css['fontSize']; - stretch: css['fontStretch']; - style: css['fontStyle']; - variant: css['fontVariant']; - weight: css['fontWeight']; - } - | css['font']; - listStyle: - | { - image: css['listStyleImage']; - position: css['listStylePosition']; - type: css['listStyleType']; - } - | css['listStyle']; - margin: - | { - bottom: css['marginBottom']; - left: css['marginLeft']; - right: css['marginRight']; - top: css['marginTop']; - } - | css['margin']; - padding: - | { - bottom: css['paddingBottom']; - left: css['paddingLeft']; - right: css['paddingRight']; - top: css['paddingTop']; - } - | css['padding']; - outline: - | { - color: css['outlineColor']; - style: 'none' | 'hidden' | 'dotted' | 'dashed' | 'solid' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset'; - width: any; - } - | css['outline']; - textShadow: - | { - x: any; - y: any; - blur: any; - color: css['color']; - } - | css['textShadow']; - transition: - | { - delay: css['transitionDelay']; - duration: css['transitionDuration']; - property: css['transitionProperty']; - timingFunction: css['transitionTimingFunction']; - } - | css['transition']; -} - -export type JssExpandArr = { [k in keyof JssExpand]?: JssExpand[k] | Array }; - -export type SimpleStyle = types.CSSProperties & PseudoCss & JssProps & JssExpandArr; -export type Style = Observable | SimpleStyle; +import { Style } from './css'; export type Styles = Record; export type Classes = Record; diff --git a/types/jss/package.json b/types/jss/package.json deleted file mode 100644 index a85944f70e..0000000000 --- a/types/jss/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "private": true, - "dependencies": { - "typestyle": "*" - } -} From 5acc5ac6154e9e21f62d23b9cc0b06c9ea47583d Mon Sep 17 00:00:00 2001 From: Tom Crockett Date: Tue, 23 Jan 2018 00:33:24 -0800 Subject: [PATCH 0063/1327] Add some type error expectations --- types/jss/jss-tests.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/types/jss/jss-tests.ts b/types/jss/jss-tests.ts index fab2665bed..0b100ddc5f 100644 --- a/types/jss/jss-tests.ts +++ b/types/jss/jss-tests.ts @@ -55,6 +55,14 @@ styleSheet.addRules({ }, }); +styleSheet.addRule('badProperty', { + thisIsNotAValidProperty: 'blah', // $ExpectError +}); + +styleSheet.addRule('badValue', { // $ExpectError + display: 'thisIsNotAValidDisplayValue', +}); + styleSheet.detach(); sharedInstance.createStyleSheet({ From 542a94c964f1d4f899fae54bfe7001310ffcc5fe Mon Sep 17 00:00:00 2001 From: Tom Crockett Date: Tue, 23 Jan 2018 00:36:55 -0800 Subject: [PATCH 0064/1327] Add some more type assertions to the test --- types/jss/jss-tests.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/types/jss/jss-tests.ts b/types/jss/jss-tests.ts index 0b100ddc5f..72974aeaca 100644 --- a/types/jss/jss-tests.ts +++ b/types/jss/jss-tests.ts @@ -70,3 +70,19 @@ sharedInstance.createStyleSheet({ background: '#000099', } }); + +const styleSheet2 = jss.createStyleSheet( + { + foo: { + display: 'flex', + width: 100, + opacity: .5, + }, + }, + { + link: true, + } +); + +styleSheet2.classes.foo; // $ExpectType string +styleSheet2.classes.bar; // $ExpectError From 00b79ed03b32fe60225a7312e74dc88950658574 Mon Sep 17 00:00:00 2001 From: Tom Crockett Date: Tue, 23 Jan 2018 00:39:49 -0800 Subject: [PATCH 0065/1327] Tweak --- types/jss/jss-tests.ts | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/types/jss/jss-tests.ts b/types/jss/jss-tests.ts index 72974aeaca..0ba36b2cfb 100644 --- a/types/jss/jss-tests.ts +++ b/types/jss/jss-tests.ts @@ -65,24 +65,11 @@ styleSheet.addRule('badValue', { // $ExpectError styleSheet.detach(); -sharedInstance.createStyleSheet({ +const styleSheet2 = sharedInstance.createStyleSheet({ container: { background: '#000099', } }); -const styleSheet2 = jss.createStyleSheet( - { - foo: { - display: 'flex', - width: 100, - opacity: .5, - }, - }, - { - link: true, - } -); - -styleSheet2.classes.foo; // $ExpectType string -styleSheet2.classes.bar; // $ExpectError +styleSheet2.classes.container; // $ExpectType string +styleSheet2.classes.notAValidKey; // $ExpectError From 3310f73f729ce2dff583be9c85dfeb6c9dc3ea76 Mon Sep 17 00:00:00 2001 From: Tom Crockett Date: Tue, 23 Jan 2018 08:56:53 -0800 Subject: [PATCH 0066/1327] Bump version number, add author --- types/jss/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/jss/index.d.ts b/types/jss/index.d.ts index f6ce6999d8..767c777bb3 100644 --- a/types/jss/index.d.ts +++ b/types/jss/index.d.ts @@ -1,7 +1,8 @@ -// Type definitions for jss 9.3 +// Type definitions for jss 9.5 // Project: https://github.com/cssinjs/jss#readme // Definitions by: Brenton Simpson // Oleg Slobodskoi +// Thomas Crockett // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 From b4b5d78ea1aa9aa6681703c6ae3482f3b2d27e9f Mon Sep 17 00:00:00 2001 From: Tom Crockett Date: Tue, 23 Jan 2018 13:00:24 -0800 Subject: [PATCH 0067/1327] Elaborate on observable testing --- types/jss/jss-tests.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/types/jss/jss-tests.ts b/types/jss/jss-tests.ts index 0ba36b2cfb..06e4ab2eb6 100644 --- a/types/jss/jss-tests.ts +++ b/types/jss/jss-tests.ts @@ -10,9 +10,14 @@ const jss = createJSS().setup({}); const styleSheet = jss.createStyleSheet( { ruleWithMockObservable: { - subscribe: () => ({ - unsubscribe() {} - }) + subscribe: observer => { + const next = typeof observer === 'function' ? observer : observer.next; + next({ background: 'blue', display: 'flex' }); + next({ invalidKey: 'blueish' }); // $ExpectError + return { + unsubscribe() {} + }; + } }, container: { display: 'flex', From 3573402a499f161bc5fd4f7f32650619a11a2fbe Mon Sep 17 00:00:00 2001 From: Tom Crockett Date: Sun, 11 Feb 2018 16:24:17 -0800 Subject: [PATCH 0068/1327] Use csstype --- types/jss/css.d.ts | 2779 +--------------------------------------- types/jss/package.json | 6 + 2 files changed, 38 insertions(+), 2747 deletions(-) create mode 100644 types/jss/package.json diff --git a/types/jss/css.d.ts b/types/jss/css.d.ts index 348948f814..fb886a6a61 100644 --- a/types/jss/css.d.ts +++ b/types/jss/css.d.ts @@ -1,6 +1,7 @@ // These CSS typings adapted from TypeStyle: https://github.com/typestyle/typestyle import { Observable } from './observable' +import * as csstype from 'csstype' /** * Value of a CSS Property. Could be a single value or a list of fallbacks @@ -9,2760 +10,44 @@ import { Observable } from './observable' export type CSSValue = T | Observable; /** - * For general purpose CSS values - **/ -export type CSSValueGeneral = CSSValue; - -/** - * When you are sure that the value must be a string - **/ -export type CSSValueString = CSSValue; - -/** - * CSS properties that cascade also support these - * @see https://drafts.csswg.org/css-cascade/#defaulting-keywords + * Remove the variants of the second union of string literals from + * the first. */ -export type CSSGlobalValues - = 'initial' - | 'inherit' - | /** combination of `initial` and `inherit` */ 'unset' - | 'revert'; +export type Diff = ( + & { [P in T]: P } + & { [P in U]: never } + & { [x: string]: never } +)[T]; -export interface FontFace { - fontFamily?: string; +/** + * Drop keys `K` from `T`. + */ +export type Omit = Pick>; - /** - * Location of a font-face. Used with the @font-face at rule - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src - */ - src?: CSSValueString; - unicodeRange?: any; - fontVariant?: 'common-ligatures' | 'small-caps' | CSSGlobalValues; - fontFeatureSettings?: string; - fontWeight?: CSSFontWeight; - fontStyle?: 'normal' | 'italic' | 'oblique' | CSSGlobalValues; +export interface SimpleProperties extends Omit< + csstype.Properties, + 'display' | 'width' | 'height' +> { + // https://github.com/frenic/csstype/issues/7 + width: number | string; + height: number | string; + // https://github.com/frenic/csstype/issues/8 + display: + | csstype.All + | csstype.DisplayOutside + | csstype.DisplayInside + | csstype.DisplayInternal + | csstype.DisplayBox + | csstype.DisplayLegacy + ; } -/** - * Absolute size keywords - * @see https://drafts.csswg.org/css-fonts-3/#absolute-size-value - */ -export type CSSAbsoluteSize = 'xx-small' | 'x-small' | 'small' | 'medium' | 'large' - | 'x-large' | 'xx-large'; - -/** - * an angle; 0' | '0deg' | '0grad' | '0rad' | '0turn' | 'etc. - * @see https://drafts.csswg.org/css-values-3/#angles - */ -export type CSSAngle = CSSGlobalValues | string | 0; - -/** - * initial state of an animation. - * @see https://drafts.csswg.org/css-animations/#animation-play-state - */ -export type CSSAnimationPlayState = CSSGlobalValues | string | 'paused' | 'running'; - -/** - * blend mode - * @see https://drafts.fxtf.org/compositing-1/#ltblendmodegt - */ -export type CSSBlendMode = 'normal' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'color-dodge' | 'color-burn' - | 'hard-light' | 'soft-light' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity'; - -/** - * border shorthand for style color and width - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-left - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-right - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top - */ -export type CSSBorderShorthand = CSSGlobalValues | CSSColor | CSSLength | CSSLineStyleSet | string; - -/** - * Determines the area within which the background is painted. - * @see https://drafts.csswg.org/css-backgrounds/#box - */ -export type CSSBox = CSSGlobalValues | string | 'border-box' | 'padding-box' | 'content-box'; - -/** - * Color can be a named color, transparent, or a color function - * @see https://drafts.csswg.org/css-color-3/#valuea-def-color - */ -export type CSSColor = CSSNamedColor | CSSGlobalValues | 'currentColor' | string; - -export type CSSNamedColor = - 'aliceblue' | 'antiquewhite' | 'aqua' | 'aquamarine' | 'azure' | 'beige' | 'bisque' | 'black' | 'blanchedalmond' | 'blue' - | 'blueviolet' | 'brown' | 'burlywood' | 'cadetblue' | 'chartreuse' | 'chocolate' | 'coral' | 'cornflowerblue' | 'cornsilk' - | 'crimson' | 'cyan' | 'darkblue' | 'darkcyan' | 'darkgoldenrod' | 'darkgray' | 'darkgreen' | 'darkgrey' | 'darkkhaki' - | 'darkmagenta' | 'darkolivegreen' | 'darkorange' | 'darkorchid' | 'darkred' | 'darksalmon' | 'darkseagreen' - | 'darkslateblue' | 'darkslategray' | 'darkslategrey' | 'darkturquoise' | 'darkviolet' | 'deeppink' | 'deepskyblue' - | 'dimgray' | 'dimgrey' | 'dodgerblue' | 'firebrick' | 'floralwhite' | 'forestgreen' | 'fuchsia' | 'gainsboro' - | 'ghostwhite' | 'gold' | 'goldenrod' | 'gray' | 'green' | 'greenyellow' | 'grey' | 'honeydew' | 'hotpink' | 'indianred' - | 'indigo' | 'ivory' | 'khaki' | 'lavender' | 'lavenderblush' | 'lawngreen' | 'lemonchiffon' | 'lightblue' | 'lightcoral' - | 'lightcyan' | 'lightgoldenrodyellow' | 'lightgray' | 'lightgreen' | 'lightgrey' | 'lightpink' | 'lightsalmon' - | 'lightseagreen' | 'lightskyblue' | 'lightslategray' | 'lightslategrey' | 'lightsteelblue' | 'lightyellow' | 'lime' - | 'limegreen' | 'linen' | 'maroon' | 'mediumaquamarine' | 'mediumblue' | 'mediumorchid' | 'mediumpurple' | 'mediumseagreen' - | 'mediumslateblue' | 'mediumspringgreen' | 'mediumturquoise' | 'mediumvioletred' | 'midnightblue' | 'mintcream' - | 'mistyrose' | 'moccasin' | 'navajowhite' | 'navy' | 'oldlace' | 'olive' | 'olivedrab' | 'orange' | 'purple' - | 'rebeccapurple' | 'red' | 'silver' | 'teal' | 'transparent' | 'white' | 'yellow'; - -/** - * Special type for border-color which can use 1 or 4 colors - * @see https://drafts.csswg.org/css-backgrounds-3/#border-color - */ -export type CSSColorSet = string | CSSColor; - -/** - * This property specifies the type of rendering box used for an element. It is a shorthand property for many other display properties. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/display - */ -export type CSSDisplay = - /* values */ - 'block' | 'inline' | 'run-in' - /* values */ - | 'flow' | 'flow-root' | 'table' | 'flex' | 'grid' | 'ruby' | 'subgrid' - /* plus values */ - | 'block flow' | 'inline table' | 'flex run-in' - /* values */ - | 'list-item' | 'list-item block' | 'list-item inline' | 'list-item flow' | 'list-item flow-root' - | 'list-item block flow' | 'list-item block flow-root' | 'flow list-item block' - /* values */ - | 'table-row-group' | 'table-header-group' | 'table-footer-group' | 'table-row' | 'table-cell' - | 'table-column-group' | 'table-column' | 'table-caption' | 'ruby-base' | 'ruby-text' - | 'ruby-base-container' | 'ruby-text-container' - /* values */ - | 'contents' | 'none' - /* values */ - | 'inline-block' | 'inline-list-item' | 'inline-table' | 'inline-flex' | 'inline-grid'; - -/** - * CSS Type of Box Alignment - * @see https://www.w3.org/TR/css-align-3/#typedef-baseline-position - */ -export type CSSBoxAlignmentBaselinePosition = 'baseline' | 'first baseline' | 'last baseline'; - -/** - * CSS Type of Box Alignment - * @see https://www.w3.org/TR/css-align-3/#typedef-content-distribution - */ -export type CSSBoxAlignmentContentDistribution = 'space-between' | 'space-around' | 'space-evenly' | 'stretch'; - -export type CSSBoxAlignmentContentPositionWithOverflow = - | 'center' | 'start' | 'end' | 'flex-start' | 'flex-end' - | 'unsafe center' | 'unsafe start' | 'unsafe end' | 'unsafe flex-start' | 'unsafe flex-end' - | 'safe center' | 'safe start' | 'safe end' | 'safe flex-start' | 'safe flex-end'; - -export type CSSBoxAlignmentSelfPositionWithOverflow = - | 'center' | 'start' | 'end' | 'self-start' | 'self-end' | 'flex-start' | 'flex-end' - | 'unsafe center' | 'unsafe start' | 'unsafe end' | 'unsafe self-start' | 'unsafe self-end' | 'unsafe flex-start' | 'unsafe flex-end' - | 'safe center' | 'safe start' | 'safe end' | 'safe self-start' | 'safe self-end' | 'safe flex-start' | 'safe flex-end'; - -export type CSSBoxAlignmentLeftRightWithOverflow = 'left' | 'right' | 'unsafe left' | 'unsafe right' | 'safe left' | 'safe right'; - -/** - * Type for justify-content in flex or grid - * @see https://www.w3.org/TR/css-align-3/#propdef-justify-content - */ -export type JustifyContent = - | 'normal' - | CSSBoxAlignmentContentDistribution - | CSSBoxAlignmentContentPositionWithOverflow - | 'left' - | 'right'; - -/** - * Type for align-content in flex or grid - * @see https://www.w3.org/TR/css-align-3/#propdef-align-content - */ -export type AlignContent = - | 'normal' - | CSSBoxAlignmentBaselinePosition - | CSSBoxAlignmentContentDistribution - | CSSBoxAlignmentContentPositionWithOverflow; - -/** - * Type for justify-items in flex or grid - * @see https://www.w3.org/TR/css-align-3/#propdef-justify-items - */ -export type JustifyItems = - | 'normal' - | 'stretch' - | CSSBoxAlignmentBaselinePosition - | CSSBoxAlignmentSelfPositionWithOverflow - | 'left' - | 'right' - | 'center' - | 'legacy left' - | 'legacy right' - | 'legacy center'; - -/** - * Type for align-items in flex or grid - * @see https://www.w3.org/TR/css-align-3/#propdef-align-items - */ -export type AlignItems = - | 'normal' - | 'stretch' - | CSSBoxAlignmentBaselinePosition - | CSSBoxAlignmentSelfPositionWithOverflow; - -/** - * Type for justify-self in flex or grid - * @see https://www.w3.org/TR/css-align-3/#propdef-justify-self - */ -export type JustifySelf = - | 'auto' - | 'normal' - | 'stretch' - | CSSBoxAlignmentBaselinePosition - | CSSBoxAlignmentSelfPositionWithOverflow - | CSSBoxAlignmentLeftRightWithOverflow; - -/** - * Type for align-self in flex or grid - * @see https://www.w3.org/TR/css-align-3/#propdef-align-self - */ -export type AlignSelf = - | 'auto' - | 'normal' - | 'stretch' - | CSSBoxAlignmentBaselinePosition - | CSSBoxAlignmentSelfPositionWithOverflow; - -/** - * a gradient function like linear-gradient - * @see https://drafts.csswg.org/css-images-3/#gradients - */ -export type CSSGradient = CSSGlobalValues | string; - -/** - * complex type that describes the size of fonts - * @see https://drafts.csswg.org/css-fonts-3/#propdef-font-size - */ -export type CSSFontSize = CSSGlobalValues | CSSLength | CSSPercentage | CSSAbsoluteSize | CSSRelativeSize; - -/** - * a value that serves as an image - * @see https://drafts.csswg.org/css-images-3/#typedef-image - */ -export type CSSImage = CSSGlobalValues | string | CSSGradient | CSSUrl; - -/** - * an length; 0 | '0px' | '0em' etc. - * @see https://drafts.csswg.org/css-values-3/#lengths - */ -export type CSSLength = CSSGlobalValues | string | number; - -/** - * Style of a line (e.g. border-style) - * @see https://drafts.csswg.org/css-backgrounds-3/#line-style - */ -export type CSSLineStyle = string | 'none' | 'hidden' | 'dotted' - | 'dashed' | 'solid' | 'double' | 'groove' | 'ridge' | 'inset' - | 'outset'; - -/** - * Special type for border-style which can use 1 or 4 line-style - * @see https://drafts.csswg.org/css-backgrounds-3/#border-style - */ -export type CSSLineStyleSet = string | CSSLineStyle; - -/** - * Specifies how the contents of a replaced element should be fitted to the box established by its used height and width. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit - */ -export type CSSObjectFit = "fill" | "contain" | "cover" | "none" | "scale-down" | CSSGlobalValues; - -/** - * Overflow modes - * @see https://drafts.csswg.org/css-overflow-3/#propdef-overflow - */ -export type CSSOverflow = 'visible' | 'hidden' | 'scroll' | 'clip' | 'auto'; - -/** - * a percentage; 0 | '0%' etc. - * @see https://drafts.csswg.org/css-values-3/#percentage - */ -export type CSSPercentage = CSSGlobalValues | string | 0; - -/** - * Defines a position (e.g. background-position) - * @see https://drafts.csswg.org/css-backgrounds-3/#position - */ -export type CSSPosition = CSSAngle | string; - -/** - * Relative size keywords - * @see https://drafts.csswg.org/css-fonts-3/#relative-size-value - */ -export type CSSRelativeSize = 'larger' | 'smaller'; - -/** - * Specifies how background images are tiled after they have been sized and positioned - * @see https://drafts.csswg.org/css-backgrounds/#repeat-style - */ -export type CSSRepeatStyle = 'repeat-x' - | 'repeat-y' - | 'repeat' - | 'space' - | 'round' - | 'no-repeat' - | 'repeat repeat' - | 'repeat space' - | 'repeat round' - | 'repeat no-repeat' - | 'space repeat' - | 'space space' - | 'space round' - | 'space no-repeat' - | 'round repeat' - | 'round space' - | 'round round' - | 'round no-repeat' - | 'no-repeat repeat' - | 'no-repeat space' - | 'no-repeat round' - | 'no-repeat no-repeat'; - -/** - * Tranform list for the element. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function - */ -export type CSSTransformFunction = string | 'none'; - -/** - * Starting position for many gradients - * @see https://drafts.csswg.org/css-images-3/#typedef-side-or-corner - */ -export type CSSSideOrCorner = CSSAngle - | 'left' | 'right' | 'top' | 'bottom' - | 'to left' | 'to right' | 'to top' | 'to bottom' - | 'left top' | 'right top' | 'left bottom' | 'right bottom' - | 'top left' | 'top right' | 'bottom left' | 'bottom right' - | 'to left top' | 'to right top' | 'to left bottom' | 'to right bottom' - | 'to top left' | 'to top right' | 'to bottom left' | 'to bottom right'; - -export type CSSRadialGradientEndingShape = 'circle' | 'ellipse'; - -/** - * Radial Gradient Size. - * @see https://drafts.csswg.org/css-images-3/#ending-shape - */ -export type CSSRadialGradientSize = CSSLength | Array - | 'closest-side' | 'farthest-side' - | 'closest-corner' | 'closest-side' - ; - -/** Supporting by `-timing-function` properties */ -export type CSSTimingFunction - = /** e.g. steps(int,start|end)|cubic-bezier(n,n,n,n) */ string - | CSSGlobalValues - | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear' | 'step-start' | 'step-end'; - -/** - * Expressed as url('protocol://') - * @see https://drafts.csswg.org/css-values-3/#urls - */ -export type CSSUrl = string; - -/** - * Font weights - */ -export type CSSFontWeight = 'normal' | 'bold' | 'bolder' | 'lighter' | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | number | CSSGlobalValues; - -/** - * This interface documents key CSS properties for autocomplete - */ -export interface CSSProperties { - /** - * Typestyle configuration options - **/ - /** - * The generated CSS selector gets its own unique location in the generated CSS (disables deduping). - * So instead of `.classA,.classB{same properties}` - * you get `.classA {same properties} .classB {same properties}` - * This is needed for certain browser edge cases like placeholder styling - **/ - $unique?: boolean; - - /** - * Smooth scrolling on an iPhone. Specifies whether to use native-style scrolling in an element. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-overflow-scrolling - */ - '-webkit-overflow-scrolling'?: 'auto' | 'touch'; - - /** - * Aligns a flex container's lines within the flex container when there is extra space in the cross-axis, similar to how justify-content aligns individual items within the main-axis. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/align-content - */ - alignContent?: AlignContent; - - /** - * Sets the default alignment in the cross axis for all of the flex container's items, including anonymous flex items, similarly to how justify-content aligns items along the main axis. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/align-items - */ - alignItems?: CSSValue; - '-ms-align-items'?: CSSValue; - '-webkit-align-items'?: CSSValue; - - /** - * Allows the default alignment to be overridden for individual flex items. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/align-self - */ - alignSelf?: CSSValue; - '-webkit-align-self'?: CSSValue; - '-ms-flex-item-align'?: string; - - /** - * This property allows precise alignment of elements, such as graphics, that do not have a baseline-table or lack the desired baseline in their baseline-table. With the alignment-adjust property, the position of the baseline identified by the alignment-baseline can be explicitly determined. It also determines precisely the alignment point for each glyph within a textual element. - */ - alignmentAdjust?: any; - - /** - * The alignment-baseline attribute specifies how an object is aligned with respect to its parent. - * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/alignment-baseline - */ - alignmentBaseline?: 'auto' | 'baseline' | 'before-edge' | 'text-before-edge' | 'middle' | 'central' | 'after-edge' | 'text-after-edge' | 'ideographic' | 'alphabetic' | 'hanging' | 'mathematical' | 'inherit'; - - /** - * Shorthand property for animation-name, animation-duration, animation-timing-function, animation-delay, - * animation-iteration-count, animation-direction, animation-fill-mode, and animation-play-state. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation - */ - animation?: CSSValueString; - - /** - * Defines a length of time to elapse before an animation starts, allowing an animation to begin execution some time after it is applied. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-delay - */ - animationDelay?: any; - - /** - * Defines whether an animation should run in reverse on some or all cycles. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-direction - */ - animationDirection?: CSSGlobalValues | 'normal' | 'alternate' | 'reverse' | 'alternate-reverse'; - - /** - * The animation-duration CSS property specifies the length of time that an animation should take to complete one cycle. - * A value of '0s', which is the default value, indicates that no animation should occur. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-duration - */ - animationDuration?: CSSValue; - - /** - * Specifies how a CSS animation should apply styles to its target before and after it is executing. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-fill-mode - */ - animationFillMode?: 'none' | 'forwards' | 'backwards' | 'both'; - - /** - * Specifies how many times an animation cycle should play. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-iteration-count - */ - animationIterationCount?: CSSValue; - - /** - * Defines the list of animations that apply to the element. - * Note: You probably want animationDuration as well - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-name - */ - animationName?: CSSValue; - - /** - * Defines whether an animation is running or paused. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-play-state - */ - animationPlayState?: CSSValue; - - /** - * Sets the pace of an animation - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-function - */ - animationTimingFunction?: CSSValue; - - /** - * Allows changing the style of any element to platform-based interface elements or vice versa. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/appearance - */ - appearance?: CSSValue<'auto' | 'none'>; - - /** - * Determines whether or not the “back” side of a transformed element is visible when facing the viewer. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/backface-visibility - */ - backfaceVisibility?: CSSGlobalValues | 'visible' | 'hidden'; - - /** - * Shorthand property to set the values for one or more of: - * background-clip, background-color, background-image, - * background-origin, background-position, background-repeat, - * background-size, and background-attachment. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background - */ - background?: any; - - /** - * If a background-image is specified, this property determines - * whether that image's position is fixed within the viewport, - * or scrolls along with its containing block. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-attachment - */ - backgroundAttachment?: 'scroll' | 'fixed' | 'local'; - - /** - * This property describes how the element's background images should blend with each other and the element's background color. - * The value is a list of blend modes that corresponds to each background image. Each element in the list will apply to the corresponding element of background-image. If a property doesn’t have enough comma-separated values to match the number of layers, the UA must calculate its used value by repeating the list of values until there are enough. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-blend-mode - */ - backgroundBlendMode?: CSSValue; - - /** - * Specifies whether an element's background, either the color or image, extends underneath its border. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-clip - */ - backgroundClip?: CSSValue; - - /** - * Sets the background color of an element. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-color - */ - backgroundColor?: CSSValue; - - /** - * Sets a compositing style for background images and colors. - */ - backgroundComposite?: any; - - /** - * Applies one or more background images to an element. These can be any valid CSS image, including url() paths to image files or CSS gradients. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-image - */ - backgroundImage?: CSSValue; - - /** - * Specifies what the background-position property is relative to. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-origin - */ - backgroundOrigin?: CSSValue; - - /** - * Sets the position of a background image. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-position - */ - backgroundPosition?: CSSValue; - - /** - * Background-repeat defines if and how background images will be repeated after they have been sized and positioned - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat - */ - backgroundRepeat?: CSSValue; - - /** - * Background-size specifies the size of a background image - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-size - */ - backgroundSize?: 'auto' | 'cover' | 'contain' | CSSLength | CSSPercentage | CSSGlobalValues; - - /** - * Obsolete - spec retired, not implemented. - * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/baseline-shift - */ - baselineShift?: any; - - /** - * Non standard. Sets or retrieves the location of the Dynamic HTML (DHTML) behavior. - * @see https://msdn.microsoft.com/en-us/library/ms530723(v=vs.85).aspx - */ - behavior?: any; - - /** - * Shorthand property that defines the different properties of all four sides of an element's border in a single declaration. It can be used to set border-width, border-style and border-color, or a subset of these. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border - */ - border?: any; - - /** - * Shorthand that sets the values of border-bottom-color, - * border-bottom-style, and border-bottom-width. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom - */ - borderBottom?: CSSBorderShorthand; - - /** - * Sets the color of the bottom border of an element. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-color - */ - borderBottomColor?: CSSValue; - - /** - * Defines the shape of the border of the bottom-left corner. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-left-radius - */ - borderBottomLeftRadius?: any; - - /** - * Defines the shape of the border of the bottom-right corner. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius - */ - borderBottomRightRadius?: any; - - /** - * Sets the line style of the bottom border of a box. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-style - */ - borderBottomStyle?: CSSValue; - - /** - * Sets the width of an element's bottom border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-width - */ - borderBottomWidth?: CSSValue; - - /** - * Border-collapse can be used for collapsing the borders between table cells - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-collapse - */ - borderCollapse?: any; - - /** - * The CSS border-color property sets the color of an element's four borders. This property can have from one to four values, made up of the elementary properties: - * • border-top-color - * • border-right-color - * • border-bottom-color - * • border-left-color The default color is the currentColor of each of these values. - * If you provide one value, it sets the color for the element. Two values set the horizontal and vertical values, respectively. Providing three values sets the top, vertical, and bottom values, in that order. Four values set all for sides: top, right, bottom, and left, in that order. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-color - */ - borderColor?: CSSValue; - - /** - * Specifies different corner clipping effects, such as scoop (inner curves), bevel (straight cuts) or notch (cut-off rectangles). Works along with border-radius to specify the size of each corner effect. - */ - borderCornerShape?: any; - - /** - * The property border-image-source is used to set the image to be used instead of the border style. If this is set to none the border-style is used instead. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-image-source - */ - borderImageSource?: CSSValue; - - /** - * The border-image-width CSS property defines the offset to use for dividing the border image in nine parts, the top-left corner, central top edge, top-right-corner, central right edge, bottom-right corner, central bottom edge, bottom-left corner, and central right edge. They represent inward distance from the top, right, bottom, and left edges. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-image-width - */ - borderImageWidth?: CSSValue; - - /** - * Shorthand property that defines the border-width, border-style and border-color of an element's left border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the left border — border-left-width, border-left-style and border-left-color. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-left - */ - borderLeft?: CSSBorderShorthand; - - /** - * The CSS border-left-color property sets the color of an element's left border. This page explains the border-left-color value, but often you will find it more convenient to fix the border's left color as part of a shorthand set, either border-left or border-color. - * Colors can be defined several ways. For more information, see Usage. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-color - */ - borderLeftColor?: CSSValue; - - /** - * Sets the style of an element's left border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-style - */ - borderLeftStyle?: CSSValue; - - /** - * Sets the width of an element's left border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-width - */ - borderLeftWidth?: CSSValue; - - /** - * Allows Web authors to define how rounded border corners are - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius - */ - borderRadius?: CSSValue; - - /** - * Shorthand property that defines the border-width, border-style and border-color of an element's right border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the right border — border-right-width, border-right-style and border-right-color. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-right - */ - borderRight?: CSSBorderShorthand; - - /** - * Sets the color of an element's right border. This page explains the border-right-color value, but often you will find it more convenient to fix the border's right color as part of a shorthand set, either border-right or border-color. - * Colors can be defined several ways. For more information, see Usage. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-right-color - */ - borderRightColor?: CSSValue; - - /** - * Sets the style of an element's right border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-right-style - */ - borderRightStyle?: CSSValue; - - /** - * Sets the width of an element's right border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-right-width - */ - borderRightWidth?: CSSValue; - - /** - * Specifies the distance between the borders of adjacent cells. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-spacing - */ - borderSpacing?: CSSLength | string | 'inherit'; - - /** - * Sets the style of an element's four borders. This property can have from one to four values. With only one value, the value will be applied to all four borders; otherwise, this works as a shorthand property for each of border-top-style, border-right-style, border-bottom-style, border-left-style, where each border style may be assigned a separate value. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-style - */ - borderStyle?: CSSValue; - - /** - * Shorthand property that defines the border-width, border-style and border-color of an element's top border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the top border — border-top-width, border-top-style and border-top-color. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top - */ - borderTop?: CSSBorderShorthand; - - /** - * Sets the color of an element's top border. This page explains the border-top-color value, but often you will find it more convenient to fix the border's top color as part of a shorthand set, either border-top or border-color. - * Colors can be defined several ways. For more information, see Usage. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-color - */ - borderTopColor?: CSSValue; - - /** - * Sets the rounding of the top-left corner of the element. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-left-radius - */ - borderTopLeftRadius?: any; - - /** - * Sets the rounding of the top-right corner of the element. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-right-radius - */ - borderTopRightRadius?: any; - - /** - * Sets the style of an element's top border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-style - */ - borderTopStyle?: CSSValue; - - /** - * Sets the width of an element's top border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-width - */ - borderTopWidth?: CSSValue; - - /** - * Sets the width of an element's four borders. This property can have from one to four values. This is a shorthand property for setting values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-width - */ - borderWidth?: CSSValue; - - /** - * This property specifies how far an absolutely positioned box's bottom margin edge is offset above the bottom edge of the box's containing block. For relatively positioned boxes, the offset is with respect to the bottom edges of the box itself (i.e., the box is given a position in the normal flow, then offset from that position according to these properties). - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/bottom - */ - bottom?: CSSValue<'auto' | CSSLength | CSSPercentage | CSSGlobalValues>; - - /** - * Obsolete. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/box-align - */ - boxAlign?: any; - - /** - * Breaks a box into fragments creating new borders, padding and repeating backgrounds or lets it stay as a continuous box on a page break, column break, or, for inline elements, at a line break. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/box-decoration-break - */ - boxDecorationBreak?: any; - - /** - * Deprecated - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/box-direction - */ - boxDirection?: any; - - /** - * Do not use. This property has been replaced by the flex-wrap property. - * Gets or sets a value that specifies the direction to add successive rows or columns when the value of box-lines is set to multiple. - */ - boxLineProgression?: any; - - /** - * Do not use. This property has been replaced by the flex-wrap property. - * Gets or sets a value that specifies whether child elements wrap onto multiple lines or columns based on the space available in the object. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/box-lines - */ - boxLines?: any; - - /** - * Do not use. This property has been replaced by flex-order. - * Specifies the ordinal group that a child element of the object belongs to. This ordinal value identifies the display order (along the axis defined by the box-orient property) for the group. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/box-ordinal-group - */ - boxOrdinalGroup?: any; - - /** - * Deprecated. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/box-flex - */ - boxFlex?: number; - - /** - * box sizing - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing - */ - boxSizing?: CSSGlobalValues | 'content-box' | 'border-box'; - '-moz-box-sizing'?: CSSGlobalValues | 'content-box' | 'border-box'; - '-webkit-box-sizing'?: CSSGlobalValues | 'content-box' | 'border-box'; - - /** - * Box shadow - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow - */ - boxShadow?: CSSValueGeneral; - - /** - * Deprecated. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/box-flex-group - */ - boxFlexGroup?: number; - - /** - * The CSS break-after property allows you to force a break on multi-column layouts. More specifically, it allows you to force a break after an element. It allows you to determine if a break should occur, and what type of break it should be. The break-after CSS property describes how the page, column or region break behaves after the generated box. If there is no generated box, the property is ignored. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/break-after - */ - breakAfter?: 'auto' | 'avoid' | 'avoid-page' | 'page' | 'left' | 'right' | 'recto' | 'verso' | 'avoid-column' | 'column' | 'avoid-region' | 'region'; - - /** - * Control page/column/region breaks that fall above a block of content - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/break-before - */ - breakBefore?: 'auto' | 'avoid' | 'avoid-page' | 'page' | 'left' | 'right' | 'recto' | 'verso' | 'avoid-column' | 'column' | 'avoid-region' | 'region'; - - /** - * Control page/column/region breaks that fall within a block of content - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/break-inside - */ - breakInside?: 'auto' | 'avoid' | 'avoid-page' | 'avoid-column' | 'avoid-region'; - - /** - * The caption-side CSS property positions the content of a table's
on the specified side. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/caption-side - */ - captionSide?: CSSGlobalValues | 'top' | 'bottom' | 'block-start' | 'block-end' | 'inline-start' | 'inline-end'; - - /** - * The clear CSS property specifies if an element can be positioned next to or must be positioned below the floating elements that precede it in the markup. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/clear - */ - clear?: CSSGlobalValues | 'none' | 'left' | 'right' | 'both'; - - /** - * Deprecated; see clip-path. - * Lets you specify the dimensions of an absolutely positioned element that should be visible, and the element is clipped into this shape, and displayed. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/clip - */ - clip?: any; - - /** - * Clipping crops an graphic, so that only a portion of the graphic is rendered, or filled. This clip-rule property, when used with the clip-path property, defines which clip rule, or algorithm, to use when filling the different parts of a graphics. - * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/clip-rule - */ - clipRule?: any; - - /** - * The color property sets the color of an element's foreground content (usually text), accepting any standard CSS color from keywords and hex values to RGB(a) and HSL(a). - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/color - */ - color?: CSSValue; - - /** - * Describes the number of columns of the element. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/column-count - */ - columnCount?: number; - - /** - * Specifies how to fill columns (balanced or sequential). - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/column-fill - */ - columnFill?: any; - - /** - * The column-gap property controls the width of the gap between columns in multi-column elements. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/column-gap - */ - columnGap?: any; - - /** - * Sets the width, style, and color of the rule between columns. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/column-rule - */ - columnRule?: any; - - /** - * Specifies the color of the rule between columns. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/column-rule-color - */ - columnRuleColor?: CSSValue; - - /** - * Specifies the width of the rule between columns. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/column-rule-width - */ - columnRuleWidth?: CSSValue; - - /** - * The column-span CSS property makes it possible for an element to span across all columns when its value is set to all. An element that spans more than one column is called a spanning element. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/column-span - */ - columnSpan?: any; - - /** - * Specifies the width of columns in multi-column elements. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/column-width - */ - columnWidth?: CSSValue; - - /** - * This property is a shorthand property for setting column-width and/or column-count. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/columns - */ - columns?: any; - - /** - * The content property is used with the :before and :after pseudo-elements, to insert generated content. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/content - */ - content?: CSSValueString; - - /** - * The counter-increment property accepts one or more names of counters (identifiers), each one optionally followed by an integer which specifies the value by which the counter should be incremented (e.g. if the value is 2, the counter increases by 2 each time it is invoked). - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/counter-increment - */ - counterIncrement?: any; - - /** - * The counter-reset property contains a list of one or more names of counters, each one optionally followed by an integer (otherwise, the integer defaults to 0.) Each time the given element is invoked, the counters specified by the property are set to the given integer. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/counter-reset - */ - counterReset?: any; - - /** - * The cue property specifies sound files (known as an "auditory icon") to be played by speech media agents before and after presenting an element's content; if only one file is specified, it is played both before and after. The volume at which the file(s) should be played, relative to the volume of the main element, may also be specified. The icon files may also be set separately with the cue-before and cue-after properties. - */ - cue?: any; - - /** - * The cue-after property specifies a sound file (known as an "auditory icon") to be played by speech media agents after presenting an element's content; the volume at which the file should be played may also be specified. The shorthand property cue sets cue sounds for both before and after the element is presented. - */ - cueAfter?: any; - - /** - * Specifies the mouse cursor displayed when the mouse pointer is over an element. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/cursor - */ - cursor?: CSSValue; - - /** - * The direction CSS property specifies the text direction/writing direction. The rtl is used for Hebrew or Arabic text, the ltr is for other languages. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/direction - */ - direction?: CSSGlobalValues | 'ltr' | 'rtl'; - - /** - * This property specifies the type of rendering box used for an element. It is a shorthand property for many other display properties. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/display - */ - display?: CSSValue; - - /** - * SVG: Used to determine or re-determine a scaled-baseline-table. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/dominant-baseline - */ - dominantBaseline?: 'auto' | 'use-script' | 'no-change' | 'reset-size' | 'ideographic' | 'alphabetic' | 'hanging' | 'mathematical' | 'central' | 'middle' | 'text-after-edge' | 'text-before-edge' | 'inherit'; - - /** - * The ‘empty-cells’ CSS property specifies how the user agent should render borders and backgrounds around cells that have no visible content. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/empty-cells - */ - emptyCells?: CSSGlobalValues | 'show' | 'hide'; - - /** - * The ‘fill’ property paints the interior of the given graphical element. The area to be painted consists of any areas inside the outline of the shape. To determine the inside of the shape, all subpaths are considered, and the interior is determined according to the rules associated with the current value of the ‘fill-rule’ property. The zero-width geometric outline of a shape is included in the area to be painted. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/fill - */ - fill?: CSSColor | 'context-stroke' | 'context-fill'; - - /** - * SVG: Specifies the opacity of the color or the content the current object is filled with. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/fill-opacity - */ - fillOpacity?: number; - - /** - * The ‘fill-rule’ property indicates the algorithm which is to be used to determine what parts of the canvas are included inside the shape. For a simple, non-intersecting path, it is intuitively clear what region lies "inside"; however, for a more complex path, such as a path that intersects itself or where one subpath encloses another, the interpretation of "inside" is not so obvious. - * The ‘fill-rule’ property provides two options for how the inside of a shape is determined: - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/fill-rule - */ - fillRule?: 'nonzero' | 'evenodd'; - - /** - * Applies various image processing effects. This property is largely unsupported. See Compatibility section for more information. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/filter - */ - filter?: string; - - /** - * Shorthand for `flex-grow`, `flex-shrink`, and `flex-basis`. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex - */ - flex?: number | string; - '-webkit-flex'?: number | string; - '-ms-flex'?: number | string; - - /** - * Obsolete, do not use. This property has been renamed to align-items. - * Specifies the alignment (perpendicular to the layout axis defined by the flex-direction property) of child elements of the object. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-align - */ - flexAlign?: any; - '-ms-flex-align'?: any; - '-webkit-flex-align'?: any; - - /** - * The flex-basis CSS property describes the initial main size of the flex item before any free space is distributed according to the flex factors described in the flex property (flex-grow and flex-shrink). - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis - */ - flexBasis?: any; - - /** - * The flex-direction CSS property describes how flex items are placed in the flex container, by setting the direction of the flex container's main axis. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction - */ - flexDirection?: any; - '-ms-flex-direction'?: any; - '-webkit-flex-direction'?: any; - - /** - * The flex-flow CSS property defines the flex container's main and cross axis. It is a shorthand property for the flex-direction and flex-wrap properties. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-flow - */ - flexFlow?: any; - - /** - * Specifies the flex grow factor of a flex item. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow - */ - flexGrow?: number; - '-ms-flex-grow'?: number; - '-webkit-flex-grow'?: number; - - /** - * Do not use. This property has been renamed to align-self - * Specifies the alignment (perpendicular to the layout axis defined by flex-direction) of child elements of the object. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-item-align - */ - flexItemAlign?: any; - - /** - * Do not use. This property has been renamed to align-content. - * Specifies how a flexbox's lines align within the flexbox when there is extra space along the axis that is perpendicular to the axis defined by the flex-direction property. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-line-pack - */ - flexLinePack?: any; - - flexPositive?: any; - '-ms-flex-positive'?: any; - '-webkit-flex-positive'?: any; - - flexNegative?: any; - '-ms-flex-negative'?: any; - '-webkit-flex-negative'?: any; - - /** - * Gets or sets a value that specifies the ordinal group that a flexbox element belongs to. This ordinal value identifies the display order for the group. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-order - */ - flexOrder?: any; - - /** - * Specifies the flex shrink factor of a flex item. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-shrink - */ - flexShrink?: number; - '-ms-flex-shrink'?: number; - '-webkit-flex-shrink'?: number; - - /** - * Specifies whether flex items are forced into a single line or can be wrapped onto multiple lines. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap - */ - flexWrap?: CSSGlobalValues | 'nowrap' | 'wrap' | 'wrap-reverse'; - '-ms-flex-wrap'?: CSSGlobalValues | 'nowrap' | 'wrap' | 'wrap-reverse'; - '-webkit-flex-wrap'?: CSSGlobalValues | 'nowrap' | 'wrap' | 'wrap-reverse'; - - /** - * Elements which have the style float are floated horizontally. These elements can move as far to the left or right of the containing element. All elements after the floating element will flow around it, but elements before the floating element are not impacted. If several floating elements are placed after each other, they will float next to each other as long as there is room. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/float - */ - float?: CSSGlobalValues | 'left' | 'right' | 'none' | 'inline-start' | 'inline-end'; - - /** - * Flows content from a named flow (specified by a corresponding flow-into) through selected elements to form a dynamic chain of layout regions. - */ - flowFrom?: any; - - /** - * The font property is shorthand that allows you to do one of two things: you can either set up six of the most mature font properties in one line, or you can set one of a choice of keywords to adopt a system font setting. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font - */ - font?: any; - - /** - * The font-family property allows one or more font family names and/or generic family names to be specified for usage on the selected element(s)' text. The browser then goes through the list; for each character in the selection it applies the first font family that has an available glyph for that character. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family - */ - fontFamily?: any; - - /** - * The font-kerning property allows contextual adjustment of inter-glyph spacing, i.e. the spaces between the characters in text. This property controls metric kerning - that utilizes adjustment data contained in the font. Optical Kerning is not supported as yet. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-kerning - */ - fontKerning?: CSSGlobalValues | 'auto' | 'normal' | 'none'; - - /** - * Specifies the size of the font. Used to compute em and ex units. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-size - */ - fontSize?: CSSValue; - - /** - * The font-size-adjust property adjusts the font-size of the fallback fonts defined with font-family, so that the x-height is the same no matter what font is used. This preserves the readability of the text when fallback happens. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-size-adjust - */ - fontSizeAdjust?: any; - - /** - * Allows you to expand or condense the widths for a normal, condensed, or expanded font face. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-stretch - */ - fontStretch?: CSSGlobalValues | 'normal' | 'ultra-condensed' | 'extra-condensed' | 'condensed' | 'semi-condensed' | 'semi-expanded' | 'expanded' | 'extra-expanded' | 'ultra-expanded'; - - /** - * The font-style property allows normal, italic, or oblique faces to be selected. Italic forms are generally cursive in nature while oblique faces are typically sloped versions of the regular face. Oblique faces can be simulated by artificially sloping the glyphs of the regular face. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-style - */ - fontStyle?: CSSGlobalValues | 'normal' | 'italic' | 'oblique'; - - /** - * This value specifies whether the user agent is allowed to synthesize bold or oblique font faces when a font family lacks bold or italic faces. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-synthesis - */ - fontSynthesis?: any; - - /** - * The font-variant property enables you to select the small-caps font within a font family. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant - */ - fontVariant?: any; - - /** - * Fonts can provide alternate glyphs in addition to default glyph for a character. This property provides control over the selection of these alternate glyphs. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-alternates - */ - fontVariantAlternates?: any; - - /** - * Specifies the weight or boldness of the font. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight - */ - fontWeight?: CSSFontWeight; - - /** - * Lays out one or more grid items bound by 4 grid lines. Shorthand for setting grid-column-start, grid-column-end, grid-row-start, and grid-row-end in a single declaration. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area - */ - gridArea?: any; - - /** - * Specifies the size of an implicitly-created grid column track. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-columns - */ - gridAutoColumns?: any; - - /** - * Controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-flow - */ - gridAutoFlow?: any; - - /** - * Specifies the size of an implicitly-created grid row track. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-rows - */ - gridAutoRows?: any; - - /** - * Controls a grid item's placement in a grid area, particularly grid position and a grid span. Shorthand for setting grid-column-start and grid-column-end in a single declaration. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column - */ - gridColumn?: any; - - /** - * Specifies the gutter between grid columns. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-gap - */ - gridColumnGap?: any; - - /** - * Controls a grid item's placement in a grid area as well as grid position and a grid span. The grid-column-end property (with grid-row-start, grid-row-end, and grid-column-start) determines a grid item's placement by specifying the grid lines of a grid item's grid area. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-end - */ - gridColumnEnd?: any; - - /** - * Determines a grid item's placement by specifying the starting grid lines of a grid item's grid area . A grid item's placement in a grid area consists of a grid position and a grid span. See also ( grid-row-start, grid-row-end, and grid-column-end) - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-start - */ - gridColumnStart?: any; - - /** - * Specifies the gutters between grid rows and columns, Shorthand for for grid-row-gap and grid-column-gap in a single declaration. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-gap - */ - gridGap?: any; - - /** - * Gets or sets a value that indicates which row an element within a Grid should appear in. Shorthand for setting grid-row-start and grid-row-end in a single declaration. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row - */ - gridRow?: any; - - /** - * Determines a grid item’s placement by specifying the block-end. A grid item's placement in a grid area consists of a grid position and a grid span. The grid-row-end property (with grid-row-start, grid-column-start, and grid-column-end) determines a grid item's placement by specifying the grid lines of a grid item's grid area. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-end - */ - gridRowEnd?: any; - - /** - * Specifies the gutter between grid rows. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-gap - */ - gridRowGap?: any; - - /** - * Determines a grid item’s start position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start edge of its grid area. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-start - */ - gridRowStart?: any; - - /** - * Specifies a row position based upon an integer location, string value, or desired row size. - * css/properties/grid-row is used as short-hand for grid-row-position and grid-row-position - */ - gridRowPosition?: any; - - gridRowSpan?: any; - - /** - * Is a shorthand property for defining grid columns, rows, and areas. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas - */ - gridTemplate?: any; - - /** - * Specifies named grid areas which are not associated with any particular grid item, but can be referenced from the grid-placement properties. The syntax of the grid-template-areas property also provides a visualization of the structure of the grid, making the overall layout of the grid container easier to understand. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas - */ - gridTemplateAreas?: any; - - /** - * Specifies (with grid-template-rows) the line names and track sizing functions of the grid. Each sizing function can be specified as a length, a percentage of the grid container’s size, a measurement of the contents occupying the column or row, or a fraction of the free space in the grid. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns - */ - gridTemplateColumns?: any; - - /** - * Specifies (with grid-template-columns) the line names and track sizing functions of the grid. Each sizing function can be specified as a length, a percentage of the grid container’s size, a measurement of the contents occupying the column or row, or a fraction of the free space in the grid. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-rows - */ - gridTemplateRows?: any; - - /** - * Sets the height of an element. The content area of the element height does not include the padding, border, and margin of the element. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/height - */ - height?: CSSValue<'auto' | CSSLength | CSSPercentage | CSSGlobalValues>; - - /** - * Specifies the minimum number of characters in a hyphenated word - * @see https://msdn.microsoft.com/en-us/library/hh771865(v=vs.85).aspx - */ - hyphenateLimitChars?: any; - - /** - * Indicates the maximum number of successive hyphenated lines in an element. The ‘no-limit’ value means that there is no limit. - * @see https://msdn.microsoft.com/en-us/library/hh771867(v=vs.85).aspx - */ - hyphenateLimitLines?: any; - - /** - * Specifies the maximum amount of trailing whitespace (before justification) that may be left in a line before hyphenation is triggered to pull part of a word from the next line back up into the current one. - * @see https://msdn.microsoft.com/en-us/library/hh771869(v=vs.85).aspx - */ - hyphenateLimitZone?: any; - - /** - * Specifies whether or not words in a sentence can be split by the use of a manual or automatic hyphenation mechanism. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/hyphens - */ - hyphens?: CSSGlobalValues | string | 'none' | 'manual' | 'auto'; - - /** - * Controls the state of the input method editor for text fields. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/ime-mode - */ - imeMode?: CSSGlobalValues | 'auto' | 'normal' | 'active' | 'inactive' | 'disabled'; - - /** - * Defines how the browser distributes space between and around flex items - * along the main-axis of their container. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content - */ - justifyContent?: JustifyContent; - '-webkit-justify-content'?: JustifyContent; - '-ms-flex-pack'?: string; - - /** - * Defines the default justify-self for all items of the box, given them the - * default way of justifying each box along the appropriate axis - */ - justifyItems?: JustifyItems; - - /** - * Defines the way of justifying a box inside its container along the appropriate axis. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/justify-self - */ - justifySelf?: JustifySelf; - - layoutGrid?: any; - - layoutGridChar?: any; - - layoutGridLine?: any; - - layoutGridMode?: any; - - layoutGridType?: any; - - /** - * Sets the left edge of an element - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/left - */ - left?: CSSValue<'auto' | CSSLength | CSSPercentage | CSSGlobalValues>; - - /** - * The letter-spacing CSS property specifies the spacing behavior between text characters. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing - */ - letterSpacing?: any; - - /** - * Deprecated. Gets or sets line-breaking rules for text in selected languages such as Japanese, Chinese, and Korean. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-break - */ - lineBreak?: any; - - lineClamp?: number; - - /** - * Specifies the height of an inline block level element. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height - */ - lineHeight?: CSSValue; - - /** - * Shorthand property that sets the list-style-type, list-style-position and list-style-image properties in one declaration. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/list-style - */ - listStyle?: any; - - /** - * This property sets the image that will be used as the list item marker. When the image is available, it will replace the marker set with the 'list-style-type' marker. That also means that if the image is not available, it will show the style specified by list-style-property - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-image - */ - listStyleImage?: any; - - /** - * Specifies if the list-item markers should appear inside or outside the content flow. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-position - */ - listStylePosition?: CSSGlobalValues | 'inside' | 'outside'; - - /** - * Specifies the type of list-item marker in a list. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type - */ - listStyleType?: any; - - /** - * The margin property is shorthand to allow you to set all four margins of an element at once. Its equivalent longhand properties are margin-top, margin-right, margin-bottom and margin-left. Negative values are also allowed. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin - */ - margin?: any; - - /** - * margin-bottom sets the bottom margin of an element. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom - */ - marginBottom?: any; - - /** - * margin-left sets the left margin of an element. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left - */ - marginLeft?: any; - - /** - * margin-right sets the right margin of an element. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right - */ - marginRight?: any; - - /** - * margin-top sets the top margin of an element. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top - */ - marginTop?: CSSValueGeneral; - - /** - * The marquee-direction determines the initial direction in which the marquee content moves. - */ - marqueeDirection?: any; - - /** - * The 'marquee-style' property determines a marquee's scrolling behavior. - */ - marqueeStyle?: any; - - /** - * This property is shorthand for setting mask-image, mask-mode, mask-repeat, mask-position, mask-clip, mask-origin, mask-composite and mask-size. Omitted values are set to their original properties' initial values. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/mask - */ - mask?: any; - - /** - * This property is shorthand for setting mask-border-source, mask-border-slice, mask-border-width, mask-border-outset, and mask-border-repeat. Omitted values are set to their original properties' initial values. - */ - maskBorder?: any; - - /** - * This property specifies how the images for the sides and the middle part of the mask image are scaled and tiled. The first keyword applies to the horizontal sides, the second one applies to the vertical ones. If the second keyword is absent, it is assumed to be the same as the first, similar to the CSS border-image-repeat property. - */ - maskBorderRepeat?: any; - - /** - * This property specifies inward offsets from the top, right, bottom, and left edges of the mask image, dividing it into nine regions: four corners, four edges, and a middle. The middle image part is discarded and treated as fully transparent black unless the fill keyword is present. The four values set the top, right, bottom and left offsets in that order, similar to the CSS border-image-slice property. - */ - maskBorderSlice?: any; - - /** - * Specifies an image to be used as a mask. An image that is empty, fails to download, is non-existent, or cannot be displayed is ignored and does not mask the element. - */ - maskBorderSource?: any; - - /** - * This property sets the width of the mask box image, similar to the CSS border-image-width property. - */ - maskBorderWidth?: CSSValue; - - /** - * Determines the mask painting area, which defines the area that is affected by the mask. The painted content of an element may be restricted to this area. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/mask-clip - */ - maskClip?: any; - - /** - * For elements rendered as a single box, specifies the mask positioning area. For elements rendered as multiple boxes (e.g., inline boxes on several lines, boxes on several pages) specifies which boxes box-decoration-break operates on to determine the mask positioning area(s). - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/mask-origin - */ - maskOrigin?: any; - - /** - * This property must not be used. It is no longer included in any standard or standard track specification, nor is it implemented in any browser. It is only used when the text-align-last property is set to size. It controls allowed adjustments of font-size to fit line content. - */ - maxFontSize?: any; - - /** - * Sets the maximum height for an element. It prevents the height of the element to exceed the specified value. If min-height is specified and is greater than max-height, max-height is overridden. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/max-height - */ - maxHeight?: CSSValue; - - /** - * Sets the maximum width for an element. It limits the width property to be larger than the value specified in max-width. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/max-width - */ - maxWidth?: CSSValue; - - /** - * Sets the minimum height for an element. It prevents the height of the element to be smaller than the specified value. The value of min-height overrides both max-height and height. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/min-height - */ - minHeight?: CSSValue; - - /** - * Sets the minimum width of an element. It limits the width property to be not smaller than the value specified in min-width. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/min-width - */ - minWidth?: CSSValue; - - /** - * The blend mode defines the formula that must be used to mix the colors with the backdrop - * @see https://drafts.fxtf.org/compositing-1/#mix-blend-mode - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode - */ - mixBlendMode?: CSSValue; - - /** - * Specifies how the contents of a replaced element should be fitted to the box established by its used height and width. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit - */ - objectFit?: CSSObjectFit; - - /** - * Determines the alignment of the element inside its box. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/object-position - */ - objectPosition?: string | CSSGlobalValues; - - /** - * Specifies the transparency of an element. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/opacity - */ - opacity?: number | CSSGlobalValues; - - /** - * Specifies the order used to lay out flex items in their flex container. - * Elements are laid out in the ascending order of the order value. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/order - */ - order?: number; - - /** - * In paged media, this property defines the minimum number of lines in - * a block container that must be left at the bottom of the page. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/orphans - */ - orphans?: number; - - /** - * The CSS outline property is a shorthand property for setting one or more of the individual outline properties outline-style, outline-width and outline-color in a single rule. In most cases the use of this shortcut is preferable and more convenient. - * Outlines differ from borders in the following ways: • Outlines do not take up space, they are drawn above the content. - * • Outlines may be non-rectangular. They are rectangular in Gecko/Firefox. Internet Explorer attempts to place the smallest contiguous outline around all elements or shapes that are indicated to have an outline. Opera draws a non-rectangular shape around a construct. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/outline - */ - outline?: any; - - /** - * The outline-color property sets the color of the outline of an element. An outline is a line that is drawn around elements, outside the border edge, to make the element stand out. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/outline-color - */ - outlineColor?: CSSValue; - - /** - * The outline-style property sets the style of the outline of an element. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/outline-style - */ - outlineStyle?: CSSGlobalValues | 'auto' | 'none' | 'dotted' | 'dashed' | 'solid' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset'; - - /** - * The outline-offset property offsets the outline and draw it beyond the border edge. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/outline-offset - */ - outlineOffset?: any; - - /** - * The outline-width CSS property is used to set the width of the outline of an element. An outline is a line that is drawn around elements, outside the border edge, to make the element stand out - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/outline-width - */ - outlineWidth?: CSSGlobalValues | 'thin' | 'medium' | 'thick' | CSSLength; - - /** - * The overflow property controls how extra content exceeding the bounding box of an element is rendered. It can be used in conjunction with an element that has a fixed width and height, to eliminate text-induced page distortion. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/overflow - */ - overflow?: CSSValue; - - /** - * Specifies the preferred scrolling methods for elements that overflow. - */ - overflowStyle?: any; - - /** - * The overflow-wrap CSS property specifies whether or not the browser should insert line breaks within words to prevent - * text from overflowing its content box. In contrast to word-break, overflow-wrap will only create a break if an entire - * word cannot be placed on its own line without overflowing. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap - */ - overflowWrap?: CSSGlobalValues | 'normal' | 'break-word'; - - /** - * Controls how extra content exceeding the x-axis of the bounding box of an element is rendered. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-x - */ - overflowX?: CSSValue; - - /** - * Controls how extra content exceeding the y-axis of the bounding box of an element is rendered. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-y - */ - overflowY?: CSSValue; - - /** - * The padding optional CSS property sets the required padding space on one to four sides of an element. The padding area is the space between an element and its border. Negative values are not allowed but decimal values are permitted. The element size is treated as fixed, and the content of the element shifts toward the center as padding is increased. - * The padding property is a shorthand to avoid setting each side separately (padding-top, padding-right, padding-bottom, padding-left). - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding - */ - padding?: any; - - /** - * The padding-bottom CSS property of an element sets the padding space required on the bottom of an element. The padding area is the space between the content of the element and its border. Contrary to margin-bottom values, negative values of padding-bottom are invalid. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom - */ - paddingBottom?: CSSValue; - - /** - * The padding-left CSS property of an element sets the padding space required on the left side of an element. The padding area is the space between the content of the element and its border. Contrary to margin-left values, negative values of padding-left are invalid. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left - */ - paddingLeft?: CSSValue; - - /** - * The padding-right CSS property of an element sets the padding space required on the right side of an element. The padding area is the space between the content of the element and its border. Contrary to margin-right values, negative values of padding-right are invalid. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right - */ - paddingRight?: CSSValue; - - /** - * The padding-top CSS property of an element sets the padding space required on the top of an element. The padding area is the space between the content of the element and its border. Contrary to margin-top values, negative values of padding-top are invalid. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top - */ - paddingTop?: CSSValue; - - /** - * The page-break-after property is supported in all major browsers. With CSS3, page-break-* properties are only aliases of the break-* properties. The CSS3 Fragmentation spec defines breaks for all CSS box fragmentation. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-after - */ - pageBreakAfter?: CSSGlobalValues | 'auto' | 'always' | 'avoid' | 'left' | 'right' | 'recto' | 'verso'; - - /** - * The page-break-before property sets the page-breaking behavior before an element. With CSS3, page-break-* properties are only aliases of the break-* properties. The CSS3 Fragmentation spec defines breaks for all CSS box fragmentation. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-before - */ - pageBreakBefore?: CSSGlobalValues | 'auto' | 'always' | 'avoid' | 'left' | 'right' | 'recto' | 'verso'; - - /** - * Sets the page-breaking behavior inside an element. With CSS3, page-break-* properties are only aliases of the break-* properties. The CSS3 Fragmentation spec defines breaks for all CSS box fragmentation. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-inside - */ - pageBreakInside?: CSSGlobalValues | 'auto' | 'avoid'; - - /** - * The pause property determines how long a speech media agent should pause before and after presenting an element. It is a shorthand for the pause-before and pause-after properties. - */ - pause?: any; - - /** - * The pause-after property determines how long a speech media agent should pause after presenting an element. It may be replaced by the shorthand property pause, which sets pause time before and after. - */ - pauseAfter?: any; - - /** - * The pause-before property determines how long a speech media agent should pause before presenting an element. It may be replaced by the shorthand property pause, which sets pause time before and after. - */ - pauseBefore?: any; - - /** - * The perspective property defines how far an element is placed from the view on the z-axis, from the screen to the viewer. - * Perspective defines how an object is viewed. In graphic arts, perspective is the representation on a flat surface of what the viewer's eye would see in a 3D space. (See Wikipedia for more information about graphical perspective and for related illustrations.) - * The illusion of perspective on a flat surface, such as a computer screen, is created by projecting points on the flat surface as they would appear if the flat surface were a window through which the viewer was looking at the object. In discussion of virtual environments, this flat surface is called a projection plane. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/perspective - */ - perspective?: any; - - /** - * The perspective-origin property establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element. - * When used with perspective, perspective-origin changes the appearance of an object, as if a viewer were looking at it from a different origin. An object appears differently if a viewer is looking directly at it versus looking at it from below, above, or from the side. Thus, the perspective-origin is like a vanishing point. - * The default value of perspective-origin is 50% 50%. This displays an object as if the viewer's eye were positioned directly at the center of the screen, both top-to-bottom and left-to-right. A value of 0% 0% changes the object as if the viewer was looking toward the top left angle. A value of 100% 100% changes the appearance as if viewed toward the bottom right angle. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/perspective-origin - */ - perspectiveOrigin?: any; - - /** - * The pointer-events property allows you to control whether an element can be the target for the pointing device (e.g, mouse, pen) events. - * @see https://developer.mozilla.org/en/docs/Web/CSS/pointer-events - */ - pointerEvents?: CSSGlobalValues | 'auto' | 'none' | 'visiblePainted' | 'visibleFill' | 'visibleStroke' | 'visible' | 'painted' | 'fill' | 'stroke' | 'all'; - - /** - * The position property controls the type of positioning used by an element within its parent elements. The effect of the position property depends on a lot of factors, for example the position property of parent elements. - * @see https://developer.mozilla.org/en/docs/Web/CSS/position - */ - position?: CSSValue; - - /** - * Obsolete: unsupported. - * This property determines whether or not a full-width punctuation mark character should be trimmed if it appears at the beginning of a line, so that its "ink" lines up with the first glyph in the line above and below. - */ - punctuationTrim?: any; - - /** - * Sets the type of quotation marks for embedded quotations. - * @see https://developer.mozilla.org/en/docs/Web/CSS/quotes - */ - quotes?: any; - - /** - * Controls whether the last region in a chain displays additional 'overset' content according its default overflow property, or if it displays a fragment of content as if it were flowing into a subsequent region. - */ - regionFragment?: any; - - /** - * The resize CSS property lets you control the resizability of an element. - * @see https://developer.mozilla.org/en/docs/Web/CSS/resize - */ - resize?: CSSGlobalValues | 'none' | 'both ' | 'horizontal' | 'vertical'; - - /** - * The rest-after property determines how long a speech media agent should pause after presenting an element's main content, before presenting that element's exit cue sound. It may be replaced by the shorthand property rest, which sets rest time before and after. - */ - restAfter?: any; - - /** - * The rest-before property determines how long a speech media agent should pause after presenting an intro cue sound for an element, before presenting that element's main content. It may be replaced by the shorthand property rest, which sets rest time before and after. - */ - restBefore?: any; - - /** - * Specifies the position an element in relation to the right side of the containing element. - * @see https://developer.mozilla.org/en/docs/Web/CSS/right - */ - right?: CSSValue<'auto' | CSSLength | CSSPercentage | CSSGlobalValues>; - - /** - * Specifies the distribution of the different ruby elements over the base. - * @see https://developer.mozilla.org/en/docs/Web/CSS/ruby-align - */ - rubyAlign?: CSSGlobalValues | 'start' | 'center' | 'space-between' | 'space-around'; - - /** - * Specifies the position of a ruby element relatives to its base element. It can be position over the element (over), under it (under), or between the characters, on their right side (inter-character). - * @see https://developer.mozilla.org/en/docs/Web/CSS/ruby-position - */ - rubyPosition?: CSSGlobalValues | 'over' | 'under' | 'inter-character'; - - /** - * SVG: For the element, this attribute defines the x-radius of the element. A value of zero disables rendering of the element. - * https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/rx - */ - rx?: number; - - /** - * SVG: For the element, this attribute defines the y-radius of the element. A value of zero disables rendering of the element. - * https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/ry - */ - ry?: number; - - /** - * Defines the alpha channel threshold used to extract a shape from an image. Can be thought of as a "minimum opacity" threshold; that is, a value of 0.5 means that the shape will enclose all the pixels that are more than 50% opaque. - * @see https://developer.mozilla.org/en/docs/Web/CSS/shape-image-threshold - */ - shapeImageThreshold?: any; - - /** - * A future level of CSS Shapes will define a shape-inside property, which will define a shape to wrap content within the element. See Editor's Draft and CSSWG wiki page on next-level plans - */ - shapeInside?: any; - - /** - * Adds a margin to a shape-outside. In effect, defines a new shape that is the smallest contour around all the points that are the shape-margin distance outward perpendicular to each point on the underlying shape. For points where a perpendicular direction is not defined (e.g., a triangle corner), takes all points on a circle centered at the point and with a radius of the shape-margin distance. This property accepts only non-negative values. - * @see https://developer.mozilla.org/en/docs/Web/CSS/shape-margin - */ - shapeMargin?: any; - - /** - * Declares a shape around which text should be wrapped, with possible modifications from the shape-margin property. The shape defined by shape-outside and shape-margin changes the geometry of a float element's float area. - * @see https://developer.mozilla.org/en/docs/Web/CSS/shape-outside - */ - shapeOutside?: any; - - /** - * The speak property determines whether or not a speech synthesizer will read aloud the contents of an element. - */ - speak?: any; - - /** - * The speak-as property determines how the speech synthesizer interprets the content: words as whole words or as a sequence of letters, numbers as a numerical value or a sequence of digits, punctuation as pauses in speech or named punctuation characters. - */ - speakAs?: any; - - /** - * Location of a font-face. Used with the @font-face at rule - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src - */ - src?: CSSValueString; - - /** - * SVG: Defines the color of the outline on a given graphical element. - * @see https://developer.mozilla.org/en/docs/Web/CSS/stroke - */ - stroke?: string; - - /** - * SVG: Controls the pattern of dashes and gaps used to stroke paths. - * @see https://developer.mozilla.org/en/docs/Web/CSS/stroke-dasharray - */ - strokeDasharray?: number[]; - - /** - * SVG: Specifies the distance into the dash pattern to start the dash - * @see https://developer.mozilla.org/en/docs/Web/SVG/Attribute/stroke-dashoffset - */ - strokeDashoffset?: CSSValue; - - /** - * SVG: Specifies the shape to be used at the end of open subpaths when they are stroked. - * @see https://developer.mozilla.org/en/docs/Web/SVG/Attribute/stroke-linecap - */ - strokeLinecap?: CSSGlobalValues | 'butt' | 'round' | 'square'; - - /** - * SVG: Specifies the opacity of the outline on the current object. - * @see https://developer.mozilla.org/en/docs/Web/CSS/stroke-opacity - */ - strokeOpacity?: number; - - /** - * SVG: Specifies the width of the outline on the current object. - * @see https://developer.mozilla.org/en/docs/Web/CSS/stroke-width - */ - strokeWidth?: CSSValue; - - /** - * The tab-size CSS property is used to customise the width of a tab (U+0009) character. - * @see https://developer.mozilla.org/en/docs/Web/CSS/tab-size - */ - tabSize?: any; - - /** - * The 'table-layout' property controls the algorithm used to lay out the table cells, rows, and columns. - * @see https://developer.mozilla.org/en/docs/Web/CSS/table-layout - */ - tableLayout?: any; - - /** - * SVG: The text-anchor attribute is used to align (start-, middle- or end-alignment) a string of text relative to a given point. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/text-anchor - */ - textAnchor?: 'start' | 'middle' | 'end' | 'inherit'; - - /** - * The text-align CSS property describes how inline content like text is aligned in its parent block element. text-align does not control the alignment of block elements itself, only their inline content. - * @see https://developer.mozilla.org/en/docs/Web/CSS/text-align - */ - textAlign?: CSSGlobalValues | 'start' | 'end' | 'left' | 'right' | 'center' | 'justify' | 'justify-all' | 'match-parent'; - - /** - * The text-align-last CSS property describes how the last line of a block element or a line before line break is aligned in its parent block element. - * @see https://developer.mozilla.org/en/docs/Web/CSS/text-align-last - */ - textAlignLast?: CSSGlobalValues | 'auto' | 'start' | 'end' | 'left' | 'right' | 'center' | 'justify'; - - /** - * The text-decoration CSS property is used to set the text formatting to underline, overline, line-through or blink. - * underline and overline decorations are positioned under the text, line-through over it. - * @see https://developer.mozilla.org/en/docs/Web/CSS/text-decoration - */ - textDecoration?: any; - - /** - * Sets the color of any text decoration, such as underlines, overlines, and strike throughs. - * @see https://developer.mozilla.org/en/docs/Web/CSS/text-decoration-color - */ - textDecorationColor?: CSSValue; - - /** - * Sets what kind of line decorations are added to an element, such as underlines, overlines, etc. - * @see https://developer.mozilla.org/en/docs/Web/CSS/text-decoration-line - */ - textDecorationLine?: any; - - textDecorationLineThrough?: any; - - textDecorationNone?: any; - - textDecorationOverline?: any; - - /** - * Specifies what parts of an element’s content are skipped over when applying any text decoration. - * @see https://developer.mozilla.org/en/docs/Web/CSS/text-decoration-skip - */ - textDecorationSkip?: any; - - /** - * This property specifies the style of the text decoration line drawn on the specified element. The intended meaning for the values are the same as those of the border-style-properties. - * @see https://developer.mozilla.org/en/docs/Web/CSS/text-decoration-style - */ - textDecorationStyle?: CSSGlobalValues | 'solid' | 'double' | 'dotted' | 'dashed' | 'wavy'; - - textDecorationUnderline?: any; - - /** - * The text-emphasis property will apply special emphasis marks to the elements text. Slightly similar to the text-decoration property only that this property can have affect on the line-height. It also is noted that this is shorthand for text-emphasis-style and for text-emphasis-color. - * @see https://developer.mozilla.org/en/docs/Web/CSS/text-emphasis - */ - textEmphasis?: any; - - /** - * The text-emphasis-color property specifies the foreground color of the emphasis marks. - * @see https://developer.mozilla.org/en/docs/Web/CSS/text-emphasis-color - */ - textEmphasisColor?: CSSValue; - - /** - * The text-emphasis-style property applies special emphasis marks to an element's text. - * @see https://developer.mozilla.org/en/docs/Web/CSS/text-emphasis-style - */ - textEmphasisStyle?: any; - - /** - * This property helps determine an inline box's block-progression dimension, derived from the text-height and font-size properties for non-replaced elements, the height or the width for replaced elements, and the stacked block-progression dimension for inline-block elements. The block-progression dimension determines the position of the padding, border and margin for the element. - */ - textHeight?: CSSValue; - - /** - * Specifies the amount of space horizontally that should be left on the first line of the text of an element. This horizontal spacing is at the beginning of the first line and is in respect to the left edge of the containing block box. - * @see https://developer.mozilla.org/en/docs/Web/CSS/text-indent - */ - textIndent?: any; - - textJustifyTrim?: any; - - textKashidaSpace?: any; - - /** - * The text-line-through property is a shorthand property for text-line-through-style, text-line-through-color and text-line-through-mode. (Considered obsolete; use text-decoration instead.) - */ - textLineThrough?: any; - - /** - * Specifies the line colors for the line-through text decoration. - * (Considered obsolete; use text-decoration-color instead.) - */ - textLineThroughColor?: CSSValue; - - /** - * Sets the mode for the line-through text decoration, determining whether the text decoration affects the space characters or not. - * (Considered obsolete; use text-decoration-skip instead.) - */ - textLineThroughMode?: any; - - /** - * Specifies the line style for line-through text decoration. - * (Considered obsolete; use text-decoration-style instead.) - */ - textLineThroughStyle?: any; - - /** - * Specifies the line width for the line-through text decoration. - */ - textLineThroughWidth?: CSSValue; - - /** - * The text-overflow shorthand CSS property determines how overflowed content that is not displayed is signaled to the users. It can be clipped, display an ellipsis ('…', U+2026 HORIZONTAL ELLIPSIS) or a Web author-defined string. It covers the two long-hand properties text-overflow-mode and text-overflow-ellipsis - * @see https://developer.mozilla.org/en/docs/Web/CSS/text-overflow - */ - textOverflow?: CSSGlobalValues | 'clip' | 'ellipsis' | string; - - /** - * The text-overline property is the shorthand for the text-overline-style, text-overline-width, text-overline-color, and text-overline-mode properties. - */ - textOverline?: any; - - /** - * Specifies the line color for the overline text decoration. - */ - textOverlineColor?: CSSValue; - - /** - * Sets the mode for the overline text decoration, determining whether the text decoration affects the space characters or not. - */ - textOverlineMode?: any; - - /** - * Specifies the line style for overline text decoration. - */ - textOverlineStyle?: any; - - /** - * Specifies the line width for the overline text decoration. - */ - textOverlineWidth?: CSSValue; - - /** - * The text-rendering CSS property provides information to the browser about how to optimize when rendering text. Options are: legibility, speed or geometric precision. - * @see https://developer.mozilla.org/en/docs/Web/CSS/text-rendering - */ - textRendering?: CSSGlobalValues | 'auto' | 'optimizeSpeed' | 'optimizeLegibility' | 'geometricPrecision'; - - /** - * Obsolete: unsupported. - */ - textScript?: any; - - /** - * The CSS text-shadow property applies one or more drop shadows to the text and of an element. Each shadow is specified as an offset from the text, along with optional color and blur radius values. - * @see https://developer.mozilla.org/en/docs/Web/CSS/text-shadow - */ - textShadow?: any; - - /** - * This property transforms text for styling purposes. (It has no effect on the underlying content.) - * @see https://developer.mozilla.org/en/docs/Web/CSS/text-transform - */ - textTransform?: CSSGlobalValues | 'none' | 'capitalize' | 'uppercase' | 'lowercase' | 'full-width'; - - /** - * Unsupported. - * This property will add a underline position value to the element that has an underline defined. - */ - textUnderlinePosition?: any; - - /** - * After review this should be replaced by text-decoration should it not? - * This property will set the underline style for text with a line value for underline, overline, and line-through. - */ - textUnderlineStyle?: any; - - /** - * This property specifies how far an absolutely positioned box's top margin edge is offset below the top edge of the box's containing block. For relatively positioned boxes, the offset is with respect to the top edges of the box itself (i.e., the box is given a position in the normal flow, then offset from that position according to these properties). - * @see https://developer.mozilla.org/en/docs/Web/CSS/top - */ - top?: CSSValue<'auto' | CSSLength | CSSPercentage | CSSGlobalValues>; - - /** - * Determines whether touch input may trigger default behavior supplied by the user agent, such as panning or zooming. - * @see https://developer.mozilla.org/en/docs/Web/CSS/touch-action - */ - touchAction?: CSSGlobalValues | 'auto' | 'none' | 'pan-x' | 'pan-left' | 'pan-right' | 'pan-y' | 'pan-up' | 'pan-down' | 'manipulation'; - - /** - * CSS transforms allow elements styled with CSS to be transformed in two-dimensional or three-dimensional space. Using this property, elements can be translated, rotated, scaled, and skewed. The value list may consist of 2D and/or 3D transform values. - * @see https://developer.mozilla.org/en/docs/Web/CSS/transform - */ - transform?: CSSTransformFunction; - - /** - * This property defines the origin of the transformation axes relative to the element to which the transformation is applied. - * @see https://developer.mozilla.org/en/docs/Web/CSS/transform-origin - */ - transformOrigin?: any; - - /** - * This property allows you to define the relative position of the origin of the transformation grid along the z-axis. - */ - transformOriginZ?: any; - - /** - * This property specifies how nested elements are rendered in 3D space relative to their parent. - * @see https://developer.mozilla.org/en/docs/Web/CSS/transform-style - */ - transformStyle?: CSSGlobalValues | 'flat' | 'preserve-3d'; - - /** - * The transition CSS property is a shorthand property for transition-property, transition-duration, transition-timing-function, and transition-delay. It allows to define the transition between two states of an element. - * @see https://developer.mozilla.org/en/docs/Web/CSS/transition - */ - transition?: any; - - /** - * Defines when the transition will start. A value of ‘0s’ means the transition will execute as soon as the property is changed. Otherwise, the value specifies an offset from the moment the property is changed, and the transition will delay execution by that offset. - * @see https://developer.mozilla.org/en/docs/Web/CSS/transition-delay - */ - transitionDelay?: any; - - /** - * The 'transition-duration' property specifies the length of time a transition animation takes to complete. - * @see https://developer.mozilla.org/en/docs/Web/CSS/transition-duration - */ - transitionDuration?: any; - - /** - * The 'transition-property' property specifies the name of the CSS property to which the transition is applied. - * @see https://developer.mozilla.org/en/docs/Web/CSS/transition-property - */ - transitionProperty?: CSSValueString; - - /** - * Sets the pace of action within a transition - * @see https://developer.mozilla.org/en/docs/Web/CSS/transition-timing-function - */ - transitionTimingFunction?: CSSTimingFunction; - - /** - * The unicode-bidi CSS property specifies the level of embedding with respect to the bidirectional algorithm. - * @see https://developer.mozilla.org/en/docs/Web/CSS/unicode-bidi - */ - unicodeBidi?: any; - - /** - * unicode-range allows you to set a specific range of characters to be downloaded from a font (embedded using @font-face) and made available for use on the current page. - * @see https://developer.mozilla.org/en/docs/Web/CSS/unicode-range - */ - unicodeRange?: any; - - /** - * This is for all the high level UX stuff. - */ - userFocus?: any; - - /** - * For inputing user content - */ - userInput?: any; - - /** - * User select - * @see https://developer.mozilla.org/en/docs/Web/CSS/user-select - */ - userSelect?: 'auto' | 'text' | 'none' | 'contain' | 'all'; - '-moz-user-select'?: 'auto' | 'text' | 'none' | 'contain' | 'all'; - '-webkit-user-select'?: 'auto' | 'text' | 'none' | 'contain' | 'all'; - '-ms-user-select'?: 'auto' | 'text' | 'none' | 'contain' | 'all'; - - /** - * The vertical-align property controls how inline elements or text are vertically aligned compared to the baseline. If this property is used on table-cells it controls the vertical alignment of content of the table cell. - * @see https://developer.mozilla.org/en/docs/Web/CSS/vertical-align - */ - verticalAlign?: CSSGlobalValues | 'baseline' | 'sub' | 'super' | 'text-top' | 'text-bottom' | 'middle' | 'top' | 'bottom' | CSSLength | CSSPercentage; - - /** - * The visibility property specifies whether the boxes generated by an element are rendered. - * @see https://developer.mozilla.org/en/docs/Web/CSS/visibility - */ - visibility?: CSSGlobalValues | 'visible' | 'hidden' | 'collapse'; - - /** - * The voice-balance property sets the apparent position (in stereo sound) of the synthesized voice for spoken media. - */ - voiceBalance?: any; - - /** - * The voice-duration property allows the author to explicitly set the amount of time it should take a speech synthesizer to read an element's content, for example to allow the speech to be synchronized with other media. With a value of auto (the default) the length of time it takes to read the content is determined by the content itself and the voice-rate property. - */ - voiceDuration?: any; - - /** - * The voice-family property sets the speaker's voice used by a speech media agent to read an element. The speaker may be specified as a named character (to match a voice option in the speech reading software) or as a generic description of the age and gender of the voice. Similar to the font-family property for visual media, a comma-separated list of fallback options may be given in case the speech reader does not recognize the character name or cannot synthesize the requested combination of generic properties. - */ - voiceFamily?: any; - - /** - * The voice-pitch property sets pitch or tone (high or low) for the synthesized speech when reading an element; the pitch may be specified absolutely or relative to the normal pitch for the voice-family used to read the text. - */ - voicePitch?: any; - - /** - * The voice-range property determines how much variation in pitch or tone will be created by the speech synthesize when reading an element. Emphasized text, grammatical structures and punctuation may all be rendered as changes in pitch, this property determines how strong or obvious those changes are; large ranges are associated with enthusiastic or emotional speech, while small ranges are associated with flat or mechanical speech. - */ - voiceRange?: any; - - /** - * The voice-rate property sets the speed at which the voice synthesized by a speech media agent will read content. - */ - voiceRate?: any; - - /** - * The voice-stress property sets the level of vocal emphasis to be used for synthesized speech reading the element. - */ - voiceStress?: any; - - /** - * The voice-volume property sets the volume for spoken content in speech media. It replaces the deprecated volume property. - */ - voiceVolume?: any; - - /** - * The white-space property controls whether and how white space inside the element is collapsed, and whether lines may wrap at unforced "soft wrap" opportunities. - * @see https://developer.mozilla.org/en/docs/Web/CSS/white-space - */ - whiteSpace?: CSSGlobalValues | 'normal' | 'nowrap' | 'pre' | 'pre-line' | 'pre-wrap'; - - /** - * Obsolete: unsupported. - */ - whiteSpaceTreatment?: any; - - /** - * In paged media, this property defines the mimimum number of lines - * that must be left at the top of the second page. - * @see https://developer.mozilla.org/en/docs/Web/CSS/widows - */ - widows?: number; - - /** - * Specifies the width of the content area of an element. The content area of the element width does not include the padding, border, and margin of the element. - * @see https://developer.mozilla.org/en/docs/Web/CSS/width - */ - width?: CSSValue<'auto' | CSSLength | CSSPercentage | CSSGlobalValues>; - - /** - * The ‘will-change’ CSS property provides a way for authors to hint browsers about the kind of changes to be expected on an element, so that the browser can set up appropriate optimizations ahead of time before the element is actually changed. These kind of optimizations can increase the responsiveness of a page by doing potentially expensive work ahead of time before they are actually required. - * @see https://developer.mozilla.org/en-US/docs/Web/CSS/will-change - */ - willChange?: CSSValue<'auto' | 'scroll-position' | 'contents' | CSSValueString>; - - /** - * The word-break property is often used when there is long generated content that is strung together without and spaces or hyphens to beak apart. A common case of this is when there is a long URL that does not have any hyphens. This case could potentially cause the breaking of the layout as it could extend past the parent element. - * @see https://developer.mozilla.org/en/docs/Web/CSS/word-break - */ - wordBreak?: CSSGlobalValues | 'normal' | 'break-all' | 'keep-all'; - - /** - * The word-spacing CSS property specifies the spacing behavior between "words". - * @see https://developer.mozilla.org/en/docs/Web/CSS/word-spacing - */ - wordSpacing?: CSSGlobalValues | 'normal' | CSSLength | CSSPercentage; - - /** - * An alias of css/properties/overflow-wrap, word-wrap defines whether to break words when the content exceeds the boundaries of its container. - * @see https://developer.mozilla.org/en/docs/Web/CSS/word-wrap - */ - wordWrap?: CSSGlobalValues | 'normal' | 'break-word'; - - /** - * Specifies how exclusions affect inline content within block-level elements. Elements lay out their inline content in their content area but wrap around exclusion areas. - */ - wrapFlow?: any; - - /** - * Set the value that is used to offset the inner wrap shape from other shapes. Inline content that intersects a shape with this property will be pushed by this shape's margin. - */ - wrapMargin?: any; - - /** - * Obsolete and unsupported. Do not use. - * This CSS property controls the text when it reaches the end of the block in which it is enclosed. - */ - wrapOption?: any; - - /** - * writing-mode specifies if lines of text are laid out horizontally or vertically, and the direction which lines of text and blocks progress. - * @see https://developer.mozilla.org/en/docs/Web/CSS/writing-mode - */ - writingMode?: CSSGlobalValues | 'horizontal-tb' | 'vertical-rl' | 'vertical-lr' | 'sideways-rl' | 'sideways-lr'; - - /** - * The z-index property specifies the z-order of an element and its descendants. - * When elements overlap, z-order determines which one covers the other. - * @see https://developer.mozilla.org/en/docs/Web/CSS/z-index - */ - zIndex?: CSSGlobalValues | 'auto' | number; - - /** - * Sets the initial zoom factor of a document defined by @viewport. - * @see https://developer.mozilla.org/en/docs/Web/CSS/zoom - */ - zoom?: 'auto' | number; - - // VENDOR prefixes - // non-authoritative source: http://peter.sh/experiments/vendor-prefixed-css-property-overview/ - '-apple-trailing-word'?: CSSValueGeneral; - '-epub-caption-side'?: CSSValueGeneral; - '-epub-hyphens'?: CSSValueGeneral; - '-epub-text-combine'?: CSSValueGeneral; - '-epub-text-emphasis'?: CSSValueGeneral; - '-epub-text-emphasis-color'?: CSSValueGeneral; - '-epub-text-emphasis-style'?: CSSValueGeneral; - '-epub-text-orientation'?: CSSValueGeneral; - '-epub-text-transform'?: CSSValueGeneral; - '-epub-word-break'?: CSSValueGeneral; - '-epub-writing-mode'?: CSSValueGeneral; - '-internal-marquee-direction'?: CSSValueGeneral; - '-internal-marquee-increment'?: CSSValueGeneral; - '-internal-marquee-repetition'?: CSSValueGeneral; - '-internal-marquee-speed'?: CSSValueGeneral; - '-internal-marquee-style'?: CSSValueGeneral; - '-moz-appearance'?: CSSValueGeneral; - '-moz-binding'?: CSSValueGeneral; - '-moz-border-bottom-colors'?: CSSValueGeneral; - '-moz-border-end'?: CSSValueGeneral; - '-moz-border-end-color'?: CSSValueGeneral; - '-moz-border-end-style'?: CSSValueGeneral; - '-moz-border-end-width'?: CSSValueGeneral; - '-moz-border-left-colors'?: CSSValueGeneral; - '-moz-border-right-colors'?: CSSValueGeneral; - '-moz-border-start'?: CSSValueGeneral; - '-moz-border-start-color'?: CSSValueGeneral; - '-moz-border-start-style'?: CSSValueGeneral; - '-moz-border-start-width'?: CSSValueGeneral; - '-moz-border-top-colors'?: CSSValueGeneral; - '-moz-box-align'?: CSSValueGeneral; - '-moz-box-direction'?: CSSValueGeneral; - '-moz-box-flex'?: CSSValueGeneral; - '-moz-box-ordinal-group'?: CSSValueGeneral; - '-moz-box-orient'?: CSSValueGeneral; - '-moz-box-pack'?: CSSValueGeneral; - '-moz-column-count'?: CSSValueGeneral; - '-moz-column-fill'?: CSSValueGeneral; - '-moz-column-gap'?: CSSValueGeneral; - '-moz-column-rule'?: CSSValueGeneral; - '-moz-column-rule-color'?: CSSValueGeneral; - '-moz-column-rule-style'?: CSSValueGeneral; - '-moz-column-rule-width'?: CSSValueGeneral; - '-moz-column-width'?: CSSValueGeneral; - '-moz-columns'?: CSSValueGeneral; - '-moz-control-character-visibility'?: CSSValueGeneral; - '-moz-float-edge'?: CSSValueGeneral; - '-moz-force-broken-image-icon'?: CSSValueGeneral; - '-moz-hyphens'?: CSSValueGeneral; - '-moz-image-region'?: CSSValueGeneral; - '-moz-margin-end'?: CSSValueGeneral; - '-moz-margin-start'?: CSSValueGeneral; - '-moz-math-display'?: CSSValueGeneral; - '-moz-math-variant'?: CSSValueGeneral; - '-moz-min-font-size-ratio'?: CSSValueGeneral; - '-moz-orient'?: CSSValueGeneral; - '-moz-osx-font-smoothing'?: CSSValueGeneral; - '-moz-outline-radius'?: CSSValueGeneral; - '-moz-outline-radius-bottomleft'?: CSSValueGeneral; - '-moz-outline-radius-bottomright'?: CSSValueGeneral; - '-moz-outline-radius-topleft'?: CSSValueGeneral; - '-moz-outline-radius-topright'?: CSSValueGeneral; - '-moz-padding-end'?: CSSValueGeneral; - '-moz-padding-start'?: CSSValueGeneral; - '-moz-script-level'?: CSSValueGeneral; - '-moz-script-min-size'?: CSSValueGeneral; - '-moz-script-size-multiplier'?: CSSValueGeneral; - '-moz-stack-sizing'?: CSSValueGeneral; - '-moz-tab-size'?: CSSValueGeneral; - '-moz-text-align-last'?: CSSValueGeneral; - '-moz-text-decoration-color'?: CSSValueGeneral; - '-moz-text-decoration-line'?: CSSValueGeneral; - '-moz-text-decoration-style'?: CSSValueGeneral; - '-moz-text-size-adjust'?: CSSValueGeneral; - '-moz-top-layer'?: CSSValueGeneral; - '-moz-transform'?: CSSValueGeneral; - '-moz-user-focus'?: CSSValueGeneral; - '-moz-user-input'?: CSSValueGeneral; - '-moz-user-modify'?: CSSValueGeneral; - '-moz-window-dragging'?: CSSValueGeneral; - '-moz-window-shadow'?: CSSValueGeneral; - '-ms-accelerator'?: CSSValueGeneral; - '-ms-animation'?: CSSValueGeneral; - '-ms-animation-delay'?: CSSValueGeneral; - '-ms-animation-direction'?: CSSValueGeneral; - '-ms-animation-duration'?: CSSValueGeneral; - '-ms-animation-fill-mode'?: CSSValueGeneral; - '-ms-animation-iteration-count'?: CSSValueGeneral; - '-ms-animation-name'?: CSSValueGeneral; - '-ms-animation-play-state'?: CSSValueGeneral; - '-ms-animation-timing-function'?: CSSValueGeneral; - '-ms-backface-visibility'?: CSSValueGeneral; - '-ms-background-position-x'?: CSSValueGeneral; - '-ms-background-position-y'?: CSSValueGeneral; - '-ms-behavior'?: CSSValueGeneral; - '-ms-block-progression'?: CSSValueGeneral; - '-ms-content-zoom-chaining'?: CSSValueGeneral; - '-ms-content-zoom-limit'?: CSSValueGeneral; - '-ms-content-zoom-limit-max'?: CSSValueGeneral; - '-ms-content-zoom-limit-min'?: CSSValueGeneral; - '-ms-content-zoom-snap'?: CSSValueGeneral; - '-ms-content-zoom-snap-points'?: CSSValueGeneral; - '-ms-content-zoom-snap-type'?: CSSValueGeneral; - '-ms-content-zooming'?: CSSValueGeneral; - '-ms-filter'?: CSSValueGeneral; - '-ms-flex-flow'?: CSSValueGeneral; - '-ms-flex-line-pack'?: CSSValueGeneral; - '-ms-flex-order'?: CSSValueGeneral; - '-ms-flex-preferred-size'?: CSSValueGeneral; - '-ms-flow-from'?: CSSValueGeneral; - '-ms-flow-into'?: CSSValueGeneral; - '-ms-font-feature-settings'?: CSSValueGeneral; - '-ms-grid-column'?: CSSValueGeneral; - '-ms-grid-column-align'?: CSSValueGeneral; - '-ms-grid-column-span'?: CSSValueGeneral; - '-ms-grid-columns'?: CSSValueGeneral; - '-ms-grid-row'?: CSSValueGeneral; - '-ms-grid-row-align'?: CSSValueGeneral; - '-ms-grid-row-span'?: CSSValueGeneral; - '-ms-grid-rows'?: CSSValueGeneral; - '-ms-high-contrast-adjust'?: CSSValueGeneral; - '-ms-hyphenate-limit-chars'?: CSSValueGeneral; - '-ms-hyphenate-limit-lines'?: CSSValueGeneral; - '-ms-hyphenate-limit-zone'?: CSSValueGeneral; - '-ms-hyphens'?: CSSValueGeneral; - '-ms-ime-align'?: CSSValueGeneral; - '-ms-ime-mode'?: CSSValueGeneral; - '-ms-interpolation-mode'?: CSSValueGeneral; - '-ms-layout-flow'?: CSSValueGeneral; - '-ms-layout-grid'?: CSSValueGeneral; - '-ms-layout-grid-char'?: CSSValueGeneral; - '-ms-layout-grid-line'?: CSSValueGeneral; - '-ms-layout-grid-mode'?: CSSValueGeneral; - '-ms-layout-grid-type'?: CSSValueGeneral; - '-ms-line-break'?: CSSValueGeneral; - '-ms-overflow-style'?: CSSValueGeneral; - '-ms-overflow-x'?: CSSValueGeneral; - '-ms-overflow-y'?: CSSValueGeneral; - '-ms-perspective'?: CSSValueGeneral; - '-ms-perspective-origin'?: CSSValueGeneral; - '-ms-perspective-origin-x'?: CSSValueGeneral; - '-ms-perspective-origin-y'?: CSSValueGeneral; - '-ms-scroll-chaining'?: CSSValueGeneral; - '-ms-scroll-limit'?: CSSValueGeneral; - '-ms-scroll-limit-x-max'?: CSSValueGeneral; - '-ms-scroll-limit-x-min'?: CSSValueGeneral; - '-ms-scroll-limit-y-max'?: CSSValueGeneral; - '-ms-scroll-limit-y-min'?: CSSValueGeneral; - '-ms-scroll-rails'?: CSSValueGeneral; - '-ms-scroll-snap-points-x'?: CSSValueGeneral; - '-ms-scroll-snap-points-y'?: CSSValueGeneral; - '-ms-scroll-snap-type'?: CSSValueGeneral; - '-ms-scroll-snap-x'?: CSSValueGeneral; - '-ms-scroll-snap-y'?: CSSValueGeneral; - '-ms-scroll-translation'?: CSSValueGeneral; - '-ms-scrollbar-3dlight-color'?: CSSValueGeneral; - '-ms-scrollbar-arrow-color'?: CSSValueGeneral; - '-ms-scrollbar-base-color'?: CSSValueGeneral; - '-ms-scrollbar-darkshadow-color'?: CSSValueGeneral; - '-ms-scrollbar-face-color'?: CSSValueGeneral; - '-ms-scrollbar-highlight-color'?: CSSValueGeneral; - '-ms-scrollbar-shadow-color'?: CSSValueGeneral; - '-ms-scrollbar-track-color'?: CSSValueGeneral; - '-ms-text-align-last'?: CSSValueGeneral; - '-ms-text-autospace'?: CSSValueGeneral; - '-ms-text-combine-horizontal'?: CSSValueGeneral; - '-ms-text-justify'?: CSSValueGeneral; - '-ms-text-kashida-space'?: CSSValueGeneral; - '-ms-text-overflow'?: CSSValueGeneral; - '-ms-text-size-adjust'?: CSSValueGeneral; - '-ms-text-underline-position'?: CSSValueGeneral; - '-ms-touch-action'?: CSSValueGeneral; - '-ms-touch-select'?: CSSValueGeneral; - '-ms-transform'?: CSSValueGeneral; - '-ms-transform-origin'?: CSSValueGeneral; - '-ms-transform-origin-x'?: CSSValueGeneral; - '-ms-transform-origin-y'?: CSSValueGeneral; - '-ms-transform-origin-z'?: CSSValueGeneral; - '-ms-transform-style'?: CSSValueGeneral; - '-ms-transition'?: CSSValueGeneral; - '-ms-transition-delay'?: CSSValueGeneral; - '-ms-transition-duration'?: CSSValueGeneral; - '-ms-transition-property'?: CSSValueGeneral; - '-ms-transition-timing-function'?: CSSValueGeneral; - '-ms-word-break'?: CSSValueGeneral; - '-ms-word-wrap'?: CSSValueGeneral; - '-ms-wrap-flow'?: CSSValueGeneral; - '-ms-wrap-margin'?: CSSValueGeneral; - '-ms-wrap-through'?: CSSValueGeneral; - '-ms-writing-mode'?: CSSValueGeneral; - '-ms-zoom'?: CSSValueGeneral; - '-webkit-align-content'?: CSSValueGeneral; - '-webkit-alt'?: CSSValueGeneral; - '-webkit-animation'?: CSSValueGeneral; - '-webkit-animation-delay'?: CSSValueGeneral; - '-webkit-animation-direction'?: CSSValueGeneral; - '-webkit-animation-duration'?: CSSValueGeneral; - '-webkit-animation-fill-mode'?: CSSValueGeneral; - '-webkit-animation-iteration-count'?: CSSValueGeneral; - '-webkit-animation-name'?: CSSValueGeneral; - '-webkit-animation-play-state'?: CSSValueGeneral; - '-webkit-animation-timing-function'?: CSSValueGeneral; - '-webkit-animation-trigger'?: CSSValueGeneral; - '-webkit-app-region'?: CSSValueGeneral; - '-webkit-appearance'?: CSSValueGeneral; - '-webkit-aspect-ratio'?: CSSValueGeneral; - '-webkit-backdrop-filter'?: CSSValueGeneral; - '-webkit-backface-visibility'?: CSSValueGeneral; - '-webkit-background-clip'?: CSSValueGeneral; - '-webkit-background-composite'?: CSSValueGeneral; - '-webkit-background-origin'?: CSSValueGeneral; - '-webkit-background-size'?: CSSValueGeneral; - '-webkit-border-after'?: CSSValueGeneral; - '-webkit-border-after-color'?: CSSValueGeneral; - '-webkit-border-after-style'?: CSSValueGeneral; - '-webkit-border-after-width'?: CSSValueGeneral; - '-webkit-border-before'?: CSSValueGeneral; - '-webkit-border-before-color'?: CSSValueGeneral; - '-webkit-border-before-style'?: CSSValueGeneral; - '-webkit-border-before-width'?: CSSValueGeneral; - '-webkit-border-bottom-left-radius'?: CSSValueGeneral; - '-webkit-border-bottom-right-radius'?: CSSValueGeneral; - '-webkit-border-end'?: CSSValueGeneral; - '-webkit-border-end-color'?: CSSValueGeneral; - '-webkit-border-end-style'?: CSSValueGeneral; - '-webkit-border-end-width'?: CSSValueGeneral; - '-webkit-border-fit'?: CSSValueGeneral; - '-webkit-border-horizontal-spacing'?: CSSValueGeneral; - '-webkit-border-image'?: CSSValueGeneral; - '-webkit-border-radius'?: CSSValueGeneral; - '-webkit-border-start'?: CSSValueGeneral; - '-webkit-border-start-color'?: CSSValueGeneral; - '-webkit-border-start-style'?: CSSValueGeneral; - '-webkit-border-start-width'?: CSSValueGeneral; - '-webkit-border-top-left-radius'?: CSSValueGeneral; - '-webkit-border-top-right-radius'?: CSSValueGeneral; - '-webkit-border-vertical-spacing'?: CSSValueGeneral; - '-webkit-box-align'?: CSSValueGeneral; - '-webkit-box-decoration-break'?: CSSValueGeneral; - '-webkit-box-direction'?: CSSValueGeneral; - '-webkit-box-flex'?: CSSValueGeneral; - '-webkit-box-flex-group'?: CSSValueGeneral; - '-webkit-box-lines'?: CSSValueGeneral; - '-webkit-box-ordinal-group'?: CSSValueGeneral; - '-webkit-box-orient'?: CSSValueGeneral; - '-webkit-box-pack'?: CSSValueGeneral; - '-webkit-box-reflect'?: CSSValueGeneral; - '-webkit-box-shadow'?: CSSValueGeneral; - '-webkit-clip-path'?: CSSValueGeneral; - '-webkit-color-correction'?: CSSValueGeneral; - '-webkit-column-axis'?: CSSValueGeneral; - '-webkit-column-break-after'?: CSSValueGeneral; - '-webkit-column-break-before'?: CSSValueGeneral; - '-webkit-column-break-inside'?: CSSValueGeneral; - '-webkit-column-count'?: CSSValueGeneral; - '-webkit-column-fill'?: CSSValueGeneral; - '-webkit-column-gap'?: CSSValueGeneral; - '-webkit-column-progression'?: CSSValueGeneral; - '-webkit-column-rule'?: CSSValueGeneral; - '-webkit-column-rule-color'?: CSSValueGeneral; - '-webkit-column-rule-style'?: CSSValueGeneral; - '-webkit-column-rule-width'?: CSSValueGeneral; - '-webkit-column-span'?: CSSValueGeneral; - '-webkit-column-width'?: CSSValueGeneral; - '-webkit-columns'?: CSSValueGeneral; - '-webkit-cursor-visibility'?: CSSValueGeneral; - '-webkit-dashboard-region'?: CSSValueGeneral; - '-webkit-filter'?: CSSValueGeneral; - '-webkit-flex-basis'?: CSSValueGeneral; - '-webkit-flex-flow'?: CSSValueGeneral; - '-webkit-flow-from'?: CSSValueGeneral; - '-webkit-flow-into'?: CSSValueGeneral; - '-webkit-font-feature-settings'?: CSSValueGeneral; - '-webkit-font-kerning'?: CSSValueGeneral; - '-webkit-font-size-delta'?: CSSValueGeneral; - '-webkit-font-smoothing'?: CSSValueGeneral; - '-webkit-font-variant-ligatures'?: CSSValueGeneral; - '-webkit-grid'?: CSSValueGeneral; - '-webkit-grid-area'?: CSSValueGeneral; - '-webkit-grid-auto-columns'?: CSSValueGeneral; - '-webkit-grid-auto-flow'?: CSSValueGeneral; - '-webkit-grid-auto-rows'?: CSSValueGeneral; - '-webkit-grid-column'?: CSSValueGeneral; - '-webkit-grid-column-end'?: CSSValueGeneral; - '-webkit-grid-column-gap'?: CSSValueGeneral; - '-webkit-grid-column-start'?: CSSValueGeneral; - '-webkit-grid-gap'?: CSSValueGeneral; - '-webkit-grid-row'?: CSSValueGeneral; - '-webkit-grid-row-end'?: CSSValueGeneral; - '-webkit-grid-row-gap'?: CSSValueGeneral; - '-webkit-grid-row-start'?: CSSValueGeneral; - '-webkit-grid-template'?: CSSValueGeneral; - '-webkit-grid-template-areas'?: CSSValueGeneral; - '-webkit-grid-template-columns'?: CSSValueGeneral; - '-webkit-grid-template-rows'?: CSSValueGeneral; - '-webkit-highlight'?: CSSValueGeneral; - '-webkit-hyphenate-character'?: CSSValueGeneral; - '-webkit-hyphenate-limit-after'?: CSSValueGeneral; - '-webkit-hyphenate-limit-before'?: CSSValueGeneral; - '-webkit-hyphenate-limit-lines'?: CSSValueGeneral; - '-webkit-hyphens'?: CSSValueGeneral; - '-webkit-initial-letter'?: CSSValueGeneral; - '-webkit-justify-items'?: CSSValueGeneral; - '-webkit-justify-self'?: CSSValueGeneral; - '-webkit-line-align'?: CSSValueGeneral; - '-webkit-line-box-contain'?: CSSValueGeneral; - '-webkit-line-break'?: CSSValueGeneral; - '-webkit-line-clamp'?: CSSValueGeneral; - '-webkit-line-grid'?: CSSValueGeneral; - '-webkit-line-snap'?: CSSValueGeneral; - '-webkit-locale'?: CSSValueGeneral; - '-webkit-logical-height'?: CSSValueGeneral; - '-webkit-logical-width'?: CSSValueGeneral; - '-webkit-margin-after'?: CSSValueGeneral; - '-webkit-margin-after-collapse'?: CSSValueGeneral; - '-webkit-margin-before'?: CSSValueGeneral; - '-webkit-margin-before-collapse'?: CSSValueGeneral; - '-webkit-margin-bottom-collapse'?: CSSValueGeneral; - '-webkit-margin-collapse'?: CSSValueGeneral; - '-webkit-margin-end'?: CSSValueGeneral; - '-webkit-margin-start'?: CSSValueGeneral; - '-webkit-margin-top-collapse'?: CSSValueGeneral; - '-webkit-marquee'?: CSSValueGeneral; - '-webkit-marquee-direction'?: CSSValueGeneral; - '-webkit-marquee-increment'?: CSSValueGeneral; - '-webkit-marquee-repetition'?: CSSValueGeneral; - '-webkit-marquee-speed'?: CSSValueGeneral; - '-webkit-marquee-style'?: CSSValueGeneral; - '-webkit-mask'?: CSSValueGeneral; - '-webkit-mask-box-image'?: CSSValueGeneral; - '-webkit-mask-box-image-outset'?: CSSValueGeneral; - '-webkit-mask-box-image-repeat'?: CSSValueGeneral; - '-webkit-mask-box-image-slice'?: CSSValueGeneral; - '-webkit-mask-box-image-source'?: CSSValueGeneral; - '-webkit-mask-box-image-width'?: CSSValueGeneral; - '-webkit-mask-clip'?: CSSValueGeneral; - '-webkit-mask-composite'?: CSSValueGeneral; - '-webkit-mask-image'?: CSSValueGeneral; - '-webkit-mask-origin'?: CSSValueGeneral; - '-webkit-mask-position'?: CSSValueGeneral; - '-webkit-mask-position-x'?: CSSValueGeneral; - '-webkit-mask-position-y'?: CSSValueGeneral; - '-webkit-mask-repeat'?: CSSValueGeneral; - '-webkit-mask-repeat-x'?: CSSValueGeneral; - '-webkit-mask-repeat-y'?: CSSValueGeneral; - '-webkit-mask-size'?: CSSValueGeneral; - '-webkit-mask-source-type'?: CSSValueGeneral; - '-webkit-max-logical-height'?: CSSValueGeneral; - '-webkit-max-logical-width'?: CSSValueGeneral; - '-webkit-min-logical-height'?: CSSValueGeneral; - '-webkit-min-logical-width'?: CSSValueGeneral; - '-webkit-nbsp-mode'?: CSSValueGeneral; - '-webkit-opacity'?: CSSValueGeneral; - '-webkit-order'?: CSSValueGeneral; - '-webkit-padding-after'?: CSSValueGeneral; - '-webkit-padding-before'?: CSSValueGeneral; - '-webkit-padding-end'?: CSSValueGeneral; - '-webkit-padding-start'?: CSSValueGeneral; - '-webkit-perspective'?: CSSValueGeneral; - '-webkit-perspective-origin'?: CSSValueGeneral; - '-webkit-perspective-origin-x'?: CSSValueGeneral; - '-webkit-perspective-origin-y'?: CSSValueGeneral; - '-webkit-print-color-adjust'?: CSSValueGeneral; - '-webkit-region-break-after'?: CSSValueGeneral; - '-webkit-region-break-before'?: CSSValueGeneral; - '-webkit-region-break-inside'?: CSSValueGeneral; - '-webkit-region-fragment'?: CSSValueGeneral; - '-webkit-rtl-ordering'?: CSSValueGeneral; - '-webkit-ruby-position'?: CSSValueGeneral; - '-webkit-scroll-snap-coordinate'?: CSSValueGeneral; - '-webkit-scroll-snap-destination'?: CSSValueGeneral; - '-webkit-scroll-snap-points-x'?: CSSValueGeneral; - '-webkit-scroll-snap-points-y'?: CSSValueGeneral; - '-webkit-scroll-snap-type'?: CSSValueGeneral; - '-webkit-shape-image-threshold'?: CSSValueGeneral; - '-webkit-shape-margin'?: CSSValueGeneral; - '-webkit-shape-outside'?: CSSValueGeneral; - '-webkit-svg-shadow'?: CSSValueGeneral; - '-webkit-tap-highlight-color'?: CSSValueGeneral; - '-webkit-text-align-last'?: CSSValueGeneral; - '-webkit-text-combine'?: CSSValueGeneral; - '-webkit-text-decoration'?: CSSValueGeneral; - '-webkit-text-decoration-color'?: CSSValueGeneral; - '-webkit-text-decoration-line'?: CSSValueGeneral; - '-webkit-text-decoration-skip'?: CSSValueGeneral; - '-webkit-text-decoration-style'?: CSSValueGeneral; - '-webkit-text-decorations-in-effect'?: CSSValueGeneral; - '-webkit-text-emphasis'?: CSSValueGeneral; - '-webkit-text-emphasis-color'?: CSSValueGeneral; - '-webkit-text-emphasis-position'?: CSSValueGeneral; - '-webkit-text-emphasis-style'?: CSSValueGeneral; - '-webkit-text-fill-color'?: CSSValueGeneral; - '-webkit-text-justify'?: CSSValueGeneral; - '-webkit-text-orientation'?: CSSValueGeneral; - '-webkit-text-security'?: CSSValueGeneral; - '-webkit-text-size-adjust'?: CSSValueGeneral; - '-webkit-text-stroke'?: CSSValueGeneral; - '-webkit-text-stroke-color'?: CSSValueGeneral; - '-webkit-text-stroke-width'?: CSSValueGeneral; - '-webkit-text-underline-position'?: CSSValueGeneral; - '-webkit-text-zoom'?: CSSValueGeneral; - '-webkit-touch-callout'?: CSSValueGeneral; - '-webkit-transform'?: CSSValueGeneral; - '-webkit-transform-origin'?: CSSValueGeneral; - '-webkit-transform-origin-x'?: CSSValueGeneral; - '-webkit-transform-origin-y'?: CSSValueGeneral; - '-webkit-transform-origin-z'?: CSSValueGeneral; - '-webkit-transform-style'?: CSSValueGeneral; - '-webkit-transition'?: CSSValueGeneral; - '-webkit-transition-delay'?: CSSValueGeneral; - '-webkit-transition-duration'?: CSSValueGeneral; - '-webkit-transition-property'?: CSSValueGeneral; - '-webkit-transition-timing-function'?: CSSValueGeneral; - '-webkit-user-drag'?: CSSValueGeneral; - '-webkit-user-modify'?: CSSValueGeneral; - '-webkit-writing-mode'?: CSSValueGeneral; +export type CSSProperties = { + [K in keyof csstype.Properties]: CSSValue } - -export type PseudoCssKey = - | ':active' - | ':any' - | ':checked' - | ':default' - | ':disabled' - | ':empty' - | ':enabled' - | ':first' - | ':first-child' - | ':first-of-type' - | ':fullscreen' - | ':focus' - | ':hover' - | ':indeterminate' - | ':in-range' - | ':invalid' - | ':last-child' - | ':last-of-type' - | ':left' - | ':link' - | ':only-child' - | ':only-of-type' - | ':optional' - | ':out-of-range' - | ':read-only' - | ':read-write' - | ':required' - | ':right' - | ':root' - | ':scope' - | ':target' - | ':valid' - | ':visited' - // TODO - // | ':dir()' - // | ':lang()' - // | ':not()' - // | ':nth-child()' - // | ':nth-last-child()' - // | ':nth-last-of-type()' - // | ':nth-of-type()' - | '::after' - | '::before' - | '::cue' - | '::first-letter' - | '::first-line' - | '::selection' - | '::backdrop ' - | '::placeholder ' - | '::marker ' - | '::spelling-error ' - | '::grammar-error '; - -export type PseudoCss = Partial>; - export interface JssProps { - '@global'?: CSSProperties & PseudoCss; + '@global'?: CSSProperties; extend?: string; composes?: string | string[]; } @@ -2876,5 +161,5 @@ export interface JssExpand { export type JssExpandArr = { [k in keyof JssExpand]?: JssExpand[k] | Array }; -export type SimpleStyle = CSSProperties & PseudoCss & JssProps & JssExpandArr; +export type SimpleStyle = CSSProperties & JssProps & JssExpandArr; export type Style = Observable | SimpleStyle; diff --git a/types/jss/package.json b/types/jss/package.json new file mode 100644 index 0000000000..448ec0ab3f --- /dev/null +++ b/types/jss/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "csstype": "^1.5.0" + } +} From 53952c7f36ad40bc38bd4ef35bc58b70e0c89820 Mon Sep 17 00:00:00 2001 From: Tom Crockett Date: Mon, 12 Feb 2018 09:24:31 -0800 Subject: [PATCH 0069/1327] Upgrade csstype, remove hacks --- types/jss/css.d.ts | 41 +---------------------------------------- types/jss/jss-tests.ts | 2 +- 2 files changed, 2 insertions(+), 41 deletions(-) diff --git a/types/jss/css.d.ts b/types/jss/css.d.ts index fb886a6a61..125571309d 100644 --- a/types/jss/css.d.ts +++ b/types/jss/css.d.ts @@ -3,47 +3,8 @@ import { Observable } from './observable' import * as csstype from 'csstype' -/** - * Value of a CSS Property. Could be a single value or a list of fallbacks - * NOTE: array is for fallbacks - */ -export type CSSValue = T | Observable; - -/** - * Remove the variants of the second union of string literals from - * the first. - */ -export type Diff = ( - & { [P in T]: P } - & { [P in U]: never } - & { [x: string]: never } -)[T]; - -/** - * Drop keys `K` from `T`. - */ -export type Omit = Pick>; - -export interface SimpleProperties extends Omit< - csstype.Properties, - 'display' | 'width' | 'height' -> { - // https://github.com/frenic/csstype/issues/7 - width: number | string; - height: number | string; - // https://github.com/frenic/csstype/issues/8 - display: - | csstype.All - | csstype.DisplayOutside - | csstype.DisplayInside - | csstype.DisplayInternal - | csstype.DisplayBox - | csstype.DisplayLegacy - ; -} - export type CSSProperties = { - [K in keyof csstype.Properties]: CSSValue + [K in keyof csstype.Properties]: csstype.Properties[K] | Observable } export interface JssProps { diff --git a/types/jss/jss-tests.ts b/types/jss/jss-tests.ts index 06e4ab2eb6..28db02b91b 100644 --- a/types/jss/jss-tests.ts +++ b/types/jss/jss-tests.ts @@ -65,7 +65,7 @@ styleSheet.addRule('badProperty', { }); styleSheet.addRule('badValue', { // $ExpectError - display: 'thisIsNotAValidDisplayValue', + alignItems: 'thisIsNotAValidValue', }); styleSheet.detach(); From 310a20441b46d9405113cf2e6499f9fe86b64478 Mon Sep 17 00:00:00 2001 From: Tom Crockett Date: Mon, 12 Feb 2018 09:41:26 -0800 Subject: [PATCH 0070/1327] Allow kebab case anywhere, and allow only kebab case in observables --- types/jss/css.d.ts | 10 +++++++--- types/jss/jss-tests.ts | 7 ++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/types/jss/css.d.ts b/types/jss/css.d.ts index 125571309d..06a9c620cf 100644 --- a/types/jss/css.d.ts +++ b/types/jss/css.d.ts @@ -3,10 +3,14 @@ import { Observable } from './observable' import * as csstype from 'csstype' -export type CSSProperties = { - [K in keyof csstype.Properties]: csstype.Properties[K] | Observable +export type ObservableProperties

= { + [K in keyof P]: P[K] | Observable } +export type CSSProperties = + & ObservableProperties + & ObservableProperties; + export interface JssProps { '@global'?: CSSProperties; extend?: string; @@ -123,4 +127,4 @@ export interface JssExpand { export type JssExpandArr = { [k in keyof JssExpand]?: JssExpand[k] | Array }; export type SimpleStyle = CSSProperties & JssProps & JssExpandArr; -export type Style = Observable | SimpleStyle; +export type Style = SimpleStyle | Observable; diff --git a/types/jss/jss-tests.ts b/types/jss/jss-tests.ts index 28db02b91b..8e53780988 100644 --- a/types/jss/jss-tests.ts +++ b/types/jss/jss-tests.ts @@ -14,6 +14,10 @@ const styleSheet = jss.createStyleSheet( const next = typeof observer === 'function' ? observer : observer.next; next({ background: 'blue', display: 'flex' }); next({ invalidKey: 'blueish' }); // $ExpectError + + // only kebab case allowed in observables + next({ 'align-items': 'center' }); + next({ alignItems: 'center' }); // $ExpectError return { unsubscribe() {} }; @@ -21,6 +25,7 @@ const styleSheet = jss.createStyleSheet( }, container: { display: 'flex', + 'align-items': 'center', width: 100, opacity: .5, }, @@ -65,7 +70,7 @@ styleSheet.addRule('badProperty', { }); styleSheet.addRule('badValue', { // $ExpectError - alignItems: 'thisIsNotAValidValue', + 'align-items': 'thisIsNotAValidValue', }); styleSheet.detach(); From 3d625ea5b689b29092fc9cb35ac52132b2a1a8b3 Mon Sep 17 00:00:00 2001 From: Tom Crockett Date: Mon, 12 Feb 2018 09:44:36 -0800 Subject: [PATCH 0071/1327] Require at least csstype 1.6 --- types/jss/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/jss/package.json b/types/jss/package.json index 448ec0ab3f..201f7e2d14 100644 --- a/types/jss/package.json +++ b/types/jss/package.json @@ -1,6 +1,6 @@ { "private": true, "dependencies": { - "csstype": "^1.5.0" + "csstype": "^1.6.0" } } From 858289bfccaed5dedb9d6025805eb8e398b82e4a Mon Sep 17 00:00:00 2001 From: Fredrik Nicol Date: Mon, 5 Mar 2018 08:40:11 +0100 Subject: [PATCH 0072/1327] Add generic argument to csstype interfaces --- types/jss/css.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/jss/css.d.ts b/types/jss/css.d.ts index 06a9c620cf..3f01be6a62 100644 --- a/types/jss/css.d.ts +++ b/types/jss/css.d.ts @@ -8,8 +8,8 @@ export type ObservableProperties

= { } export type CSSProperties = - & ObservableProperties - & ObservableProperties; + & ObservableProperties> + & ObservableProperties>; export interface JssProps { '@global'?: CSSProperties; @@ -127,4 +127,4 @@ export interface JssExpand { export type JssExpandArr = { [k in keyof JssExpand]?: JssExpand[k] | Array }; export type SimpleStyle = CSSProperties & JssProps & JssExpandArr; -export type Style = SimpleStyle | Observable; +export type Style = SimpleStyle | Observable>; From 8a4095b718955698a17d473eb95fc4aa31244042 Mon Sep 17 00:00:00 2001 From: Anthony Rosequist Date: Mon, 5 Mar 2018 13:00:50 -0600 Subject: [PATCH 0073/1327] Add Node.value to yallist types --- types/yallist/index.d.ts | 1 + types/yallist/yallist-tests.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/types/yallist/index.d.ts b/types/yallist/index.d.ts index 8a89697d82..11e2462a74 100644 --- a/types/yallist/index.d.ts +++ b/types/yallist/index.d.ts @@ -58,6 +58,7 @@ declare namespace Yallist { interface Node { prev: Node | null; next: Node | null; + value: T; list?: Yallist; } } diff --git a/types/yallist/yallist-tests.ts b/types/yallist/yallist-tests.ts index 69099c0da9..ffdef9ad79 100644 --- a/types/yallist/yallist-tests.ts +++ b/types/yallist/yallist-tests.ts @@ -115,3 +115,4 @@ new Yallist.Node('foo', node, node, myList); node.list; // $ExpectType Yallist | undefined node.next; // $ExpectType Node | null node.prev; // $ExpectType Node | null +node.value; // $ExpectType string From 1277b7b0b5b0b57d2c83c25d600c317f5d8ec7ee Mon Sep 17 00:00:00 2001 From: denis Date: Mon, 5 Mar 2018 21:34:42 +0100 Subject: [PATCH 0074/1327] Add collapse, tab and scrollspy definitions Add more definitions and use popper.js definition for offset and behavor --- types/bootstrap/bootstrap-tests.ts | 97 +++++++++++++++++++++++++++--- types/bootstrap/index.d.ts | 78 +++++++++++++++++++----- types/bootstrap/package.json | 6 ++ 3 files changed, 159 insertions(+), 22 deletions(-) create mode 100644 types/bootstrap/package.json diff --git a/types/bootstrap/bootstrap-tests.ts b/types/bootstrap/bootstrap-tests.ts index 17d6e088cf..9ab7654373 100755 --- a/types/bootstrap/bootstrap-tests.ts +++ b/types/bootstrap/bootstrap-tests.ts @@ -2,8 +2,10 @@ // Alert // -------------------------------------------------------------------------------------- +// $ExpectType JQuery $("#alert").alert(); +// $ExpectType JQuery $("#alert").alert("close"); $("#alert").on("close.bs.alert", () => {}); @@ -12,20 +14,32 @@ $("#alert").on("close.bs.alert", () => {}); // Button // -------------------------------------------------------------------------------------- -// $("#button").button(); // must fail +// $ExpectError +$("#button").button(); +// $ExpectType JQuery $("#button").button("toggle"); // -------------------------------------------------------------------------------------- // Carousel // -------------------------------------------------------------------------------------- +// $ExpectType JQuery $("#carousel").carousel(); +// $ExpectType JQuery $("#carousel").carousel("pause"); $("#carousel").carousel(100); +$("#carousel").on("slide.bs.carousel", function(ev) { + const that: HTMLElement = this; + const from: number = ev.from; + const to: number = ev.to; + const direction: string = ev.direction; + const data: undefined = ev.data; +}); + $("#carousel").carousel({ interval: 5000, keyboard: true, @@ -37,20 +51,43 @@ $("#carousel").carousel({ pause: false, }); -$("#carousel").on("slide.bs.carousel", function(ev) { - const that: HTMLElement = this; - const from: number = ev.from; - const to: number = ev.to; - const direction: string = ev.direction; - const data: undefined = ev.data; +// -------------------------------------------------------------------------------------- +// Collapse +// -------------------------------------------------------------------------------------- + +// $ExpectType JQuery +$("#collapse").collapse(); + +// $ExpectType JQuery +$("#collapse").collapse("toggle"); + +$("#collapse").on("show.bs.collapse", () => {}); + +$("#collapse").collapse({ + parent: "#parent", + toggle: true, +}); + +$("#collapse").collapse({ + parent: document.body, +}); + +$("#collapse").collapse({ + parent: $("#parent"), +}); + +$("#collapse").collapse({ + toggle: false, }); // -------------------------------------------------------------------------------------- // Dropdown // -------------------------------------------------------------------------------------- +// $ExpectType JQuery $("#dropdown").dropdown(); +// $ExpectType JQuery $("#dropdown").dropdown("update"); $("#dropdown").on("hide.bs.dropdown", () => {}); @@ -81,8 +118,10 @@ $("#dropdown").dropdown({ // Modal // -------------------------------------------------------------------------------------- +// $ExpectType JQuery $("#modal").modal(); +// $ExpectType JQuery $("#modal").modal("show"); $("#modal").on("hide.bs.modal", () => {}); @@ -98,12 +137,56 @@ $("#modal").modal({ backdrop: "static", }); +// -------------------------------------------------------------------------------------- +// Popover +// -------------------------------------------------------------------------------------- + +// $ExpectType JQuery +$("#scrollspy").popover(); + +// $ExpectType JQuery +$("#scrollspy").popover("toggle"); + +$("#scrollspy").on("activate.bs.scrollspy", () => {}); + +// TODO: test popover with options + +// -------------------------------------------------------------------------------------- +// Scrollspy +// -------------------------------------------------------------------------------------- + +// $ExpectType JQuery +$("#scrollspy").scrollspy(); + +// $ExpectType JQuery +$("#scrollspy").scrollspy("refresh"); + +$("#scrollspy").on("activate.bs.scrollspy", () => {}); + +$("#scrollspy").scrollspy({ + offset: 100, +}); + +// -------------------------------------------------------------------------------------- +// Tab +// -------------------------------------------------------------------------------------- + +// $ExpectType JQuery +$("#someListItem").tab("show"); + +$("a[data-toggle=\"list\"]").on("shown.bs.tab", (e) => { + e.target; // newly activated tab + e.relatedTarget; // previous active tab +}); + // -------------------------------------------------------------------------------------- // Tooltip // -------------------------------------------------------------------------------------- +// $ExpectType JQuery $("#tooltip").tooltip(); +// $ExpectType JQuery $("#tooltip").tooltip("show"); $("#tooltip").on("hide.bs.tooltip", () => {}); diff --git a/types/bootstrap/index.d.ts b/types/bootstrap/index.d.ts index c158bbd807..5e7fea80f7 100755 --- a/types/bootstrap/index.d.ts +++ b/types/bootstrap/index.d.ts @@ -4,16 +4,16 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -// TODO: collapse, tab (list-group, navs), popovers, scrollspy +// TODO: popovers options /// +/// // -------------------------------------------------------------------------- // Some Types and Interfaces // -------------------------------------------------------------------------- type BootstrapPlacement = "auto" | "top" | "bottom" | "left" | "right"; -type PopperBehavior = "flip" | "clockwise" | "counterclockwise"; interface BootstrapDelay { show: number; @@ -26,16 +26,9 @@ interface BootstrapTooltipInstance { tip: HTMLElement; } -interface BootstrapOffsetExtend { - top?: number; - left?: number; - width?: number; - height?: number; -} - interface BootstrapOffsetsExtend { - popper?: BootstrapOffsetExtend; - reference?: BootstrapOffsetExtend; + popper?: Partial; + reference?: Partial; } // -------------------------------------------------------------------------------------- @@ -75,6 +68,24 @@ interface BootstrapCarouselOption { wrap?: boolean; } +interface BootstrapCollapseOption { + /** + * If parent is provided, then all collapsible elements under the specified parent will be closed when + * this collapsible item is shown. (similar to traditional accordion behavior - this is dependent on the card class). + * The attribute has to be set on the target collapsible area. + * + * @default "" + */ + parent?: string | JQuery | Element; + + /** + * Toggles the collapsible element on invocation. + * + * @default true + */ + toggle?: boolean; +} + interface BootstrapDropdownOption { /** * Offset of the dropdown relative to its target. @@ -99,7 +110,7 @@ interface BootstrapDropdownOption { * * @default "scrollParent" */ - boundary?: "viewport" | "window" | "scrollParent" | HTMLElement; + boundary?: Popper.Boundary | HTMLElement; } interface BootstrapModalOption { @@ -133,6 +144,26 @@ interface BootstrapModalOption { show?: boolean; } +interface BootstrapPoppoverOption { + /** + * Apply a CSS fade transition to the popover. + * + * @default true + */ + animation: boolean; + + // TODO +} + +interface BootstrapScrollspyOption { + /** + * Pixels to offset from top when calculating position of scroll. + * + * @default 10 + */ + offset?: number; +} + interface BootstrapTooltipOption { /** * Apply a CSS fade transition to the tooltip. @@ -232,7 +263,7 @@ interface BootstrapTooltipOption { * * @default "flip" */ - fallbackPlacement?: PopperBehavior | PopperBehavior[]; + fallbackPlacement?: Popper.Behavior | ReadonlyArray; /** * Overflow constraint boundary of the tooltip. @@ -242,7 +273,7 @@ interface BootstrapTooltipOption { * * @default "scrollParent" */ - boundary?: "viewport" | "window" | "scrollParent" | HTMLElement; + boundary?: Popper.Boundary | HTMLElement; } // -------------------------------------------------------------------------------------- @@ -268,8 +299,12 @@ interface BootstrapCarouselEventHandler extends JQuery.Event extends Iterable carousel(action: "cycle" | "pause" | number | "prev" | "next" | "dispose"): this; carousel(options?: BootstrapCarouselOption): this; + collapse(action: "toggle" | "show" | "hide" | "dispose"): this; + collapse(options?: BootstrapCollapseOption): this; + dropdown(action: "toggle" | "update" | "dispose"): this; dropdown(options?: BootstrapDropdownOption): this; modal(action: "toggle" | "show" | "hide" | "handleUpdate" | "dispose"): this; modal(options?: BootstrapModalOption): this; + popover(action: "show" | "hide" | "toggle" | "dispose" | "enable" | "disable" | "toggleEnabled" | "update"): this; + popover(options?: BootstrapPoppoverOption): this; + + scrollspy(action: "refresh" | "dispose"): this; + scrollspy(options?: BootstrapScrollspyOption): this; + + tab(action: "show" | "dispose"): this; + tooltip(action: "show" | "hide" | "toggle" | "dispose" | "enable" | "disable" | "toggleEnabled" | "update"): this; tooltip(options?: BootstrapTooltipOption): this; on(events: BootstrapCarouselEvent, handler: JQuery.EventHandlerBase>): this; - on(events: BootstrapAlertEvent | BootstrapDropdownEvent | BootstrapModalEvent | BootstrapTooltipEvent, + on(events: + BootstrapAlertEvent | BootstrapCollapseEvent | BootstrapDropdownEvent | BootstrapModalEvent | + BootstrapPopoverEvent | BootstrapScrollspyEvent | BootstrapTapEvent | BootstrapTooltipEvent, handler: JQuery.EventHandler): this; } diff --git a/types/bootstrap/package.json b/types/bootstrap/package.json new file mode 100644 index 0000000000..7f11c30706 --- /dev/null +++ b/types/bootstrap/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "popper.js": "^1.12.9" + } +} \ No newline at end of file From a72347d6542716442681e302ba8d47b0e886ccd3 Mon Sep 17 00:00:00 2001 From: denis Date: Mon, 5 Mar 2018 22:55:57 +0100 Subject: [PATCH 0075/1327] Use Bootstrap namespace Use a Bootstrap namespace instead of prefixing names. --- types/bootstrap/bootstrap-tests.ts | 2 +- types/bootstrap/index.d.ts | 102 +++++++++++++++-------------- 2 files changed, 54 insertions(+), 50 deletions(-) diff --git a/types/bootstrap/bootstrap-tests.ts b/types/bootstrap/bootstrap-tests.ts index 9ab7654373..f8934ebbfc 100755 --- a/types/bootstrap/bootstrap-tests.ts +++ b/types/bootstrap/bootstrap-tests.ts @@ -103,7 +103,7 @@ $("#dropdown").dropdown({ }); $("#dropdown").dropdown({ - offset(offsets: BootstrapOffsetsExtend) { + offset(offsets: Bootstrap.OffsetsExtend) { if (!this.flip) return { popper: { left: 100 } }; return {}; diff --git a/types/bootstrap/index.d.ts b/types/bootstrap/index.d.ts index 5e7fea80f7..01089126fb 100755 --- a/types/bootstrap/index.d.ts +++ b/types/bootstrap/index.d.ts @@ -6,27 +6,29 @@ // TODO: popovers options -/// /// +/// + +export as namespace Bootstrap; // -------------------------------------------------------------------------- // Some Types and Interfaces // -------------------------------------------------------------------------- -type BootstrapPlacement = "auto" | "top" | "bottom" | "left" | "right"; +export type Placement = "auto" | "top" | "bottom" | "left" | "right"; -interface BootstrapDelay { +export interface Delay { show: number; hide: number; } -interface BootstrapTooltipInstance { - config: BootstrapTooltipOption; +export interface TooltipInstance { + config: TooltipOption; element: Element; tip: HTMLElement; } -interface BootstrapOffsetsExtend { +export interface OffsetsExtend { popper?: Partial; reference?: Partial; } @@ -35,7 +37,7 @@ interface BootstrapOffsetsExtend { // Options Interfaces // -------------------------------------------------------------------------------------- -interface BootstrapCarouselOption { +export interface CarouselOption { /** * The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle. * @@ -68,7 +70,7 @@ interface BootstrapCarouselOption { wrap?: boolean; } -interface BootstrapCollapseOption { +export interface CollapseOption { /** * If parent is provided, then all collapsible elements under the specified parent will be closed when * this collapsible item is shown. (similar to traditional accordion behavior - this is dependent on the card class). @@ -86,14 +88,14 @@ interface BootstrapCollapseOption { toggle?: boolean; } -interface BootstrapDropdownOption { +export interface DropdownOption { /** * Offset of the dropdown relative to its target. * For more information refer to Popper.js's offset docs. * * @default 0 */ - offset?: number | string | ((this: BootstrapDropdownOption, offset: BootstrapOffsetsExtend) => BootstrapOffsetsExtend); + offset?: number | string | ((this: DropdownOption, offset: OffsetsExtend) => OffsetsExtend); /** * Allow Dropdown to flip in case of an overlapping on the reference element. @@ -113,7 +115,7 @@ interface BootstrapDropdownOption { boundary?: Popper.Boundary | HTMLElement; } -interface BootstrapModalOption { +export interface ModalOption { /** * Includes a modal-backdrop element. * Alternatively, specify static for a backdrop which doesn't close the modal on click. @@ -144,7 +146,7 @@ interface BootstrapModalOption { show?: boolean; } -interface BootstrapPoppoverOption { +export interface PoppoverOption { /** * Apply a CSS fade transition to the popover. * @@ -155,7 +157,7 @@ interface BootstrapPoppoverOption { // TODO } -interface BootstrapScrollspyOption { +export interface ScrollspyOption { /** * Pixels to offset from top when calculating position of scroll. * @@ -164,7 +166,7 @@ interface BootstrapScrollspyOption { offset?: number; } -interface BootstrapTooltipOption { +export interface TooltipOption { /** * Apply a CSS fade transition to the tooltip. * @@ -189,7 +191,7 @@ interface BootstrapTooltipOption { * * @default 0 */ - delay?: number | BootstrapDelay; + delay?: number | Delay; /** * Allow HTML in the tooltip. @@ -210,7 +212,7 @@ interface BootstrapTooltipOption { * * @default "top" */ - placement?: BootstrapPlacement | ((this: BootstrapTooltipInstance, tooltip: HTMLElement, trigger: Element) => BootstrapPlacement); + placement?: Placement | ((this: TooltipInstance, tooltip: HTMLElement, trigger: Element) => Placement); /** * If a selector is provided, tooltip objects will be delegated to the specified targets. @@ -280,7 +282,7 @@ interface BootstrapTooltipOption { // Events // -------------------------------------------------------------------------------------- -interface BootstrapCarouselEventHandler extends JQuery.Event { +export interface CarouselEventHandler extends JQuery.Event { /** * The direction in which the carousel is sliding. */ @@ -297,51 +299,53 @@ interface BootstrapCarouselEventHandler extends JQuery.Event extends Iterable { - alert(action?: "close" | "dispose"): this; +declare global { + interface JQuery extends Iterable { + alert(action?: "close" | "dispose"): this; - button(action: "toggle" | "dispose"): this; + button(action: "toggle" | "dispose"): this; - carousel(action: "cycle" | "pause" | number | "prev" | "next" | "dispose"): this; - carousel(options?: BootstrapCarouselOption): this; + carousel(action: "cycle" | "pause" | number | "prev" | "next" | "dispose"): this; + carousel(options?: CarouselOption): this; - collapse(action: "toggle" | "show" | "hide" | "dispose"): this; - collapse(options?: BootstrapCollapseOption): this; + collapse(action: "toggle" | "show" | "hide" | "dispose"): this; + collapse(options?: CollapseOption): this; - dropdown(action: "toggle" | "update" | "dispose"): this; - dropdown(options?: BootstrapDropdownOption): this; + dropdown(action: "toggle" | "update" | "dispose"): this; + dropdown(options?: DropdownOption): this; - modal(action: "toggle" | "show" | "hide" | "handleUpdate" | "dispose"): this; - modal(options?: BootstrapModalOption): this; + modal(action: "toggle" | "show" | "hide" | "handleUpdate" | "dispose"): this; + modal(options?: ModalOption): this; - popover(action: "show" | "hide" | "toggle" | "dispose" | "enable" | "disable" | "toggleEnabled" | "update"): this; - popover(options?: BootstrapPoppoverOption): this; + popover(action: "show" | "hide" | "toggle" | "dispose" | "enable" | "disable" | "toggleEnabled" | "update"): this; + popover(options?: PoppoverOption): this; - scrollspy(action: "refresh" | "dispose"): this; - scrollspy(options?: BootstrapScrollspyOption): this; + scrollspy(action: "refresh" | "dispose"): this; + scrollspy(options?: ScrollspyOption): this; - tab(action: "show" | "dispose"): this; + tab(action: "show" | "dispose"): this; - tooltip(action: "show" | "hide" | "toggle" | "dispose" | "enable" | "disable" | "toggleEnabled" | "update"): this; - tooltip(options?: BootstrapTooltipOption): this; + tooltip(action: "show" | "hide" | "toggle" | "dispose" | "enable" | "disable" | "toggleEnabled" | "update"): this; + tooltip(options?: TooltipOption): this; - on(events: BootstrapCarouselEvent, handler: JQuery.EventHandlerBase>): this; - on(events: - BootstrapAlertEvent | BootstrapCollapseEvent | BootstrapDropdownEvent | BootstrapModalEvent | - BootstrapPopoverEvent | BootstrapScrollspyEvent | BootstrapTapEvent | BootstrapTooltipEvent, - handler: JQuery.EventHandler): this; + on(events: CarouselEvent, handler: JQuery.EventHandlerBase>): this; + on(events: + AlertEvent | CollapseEvent | DropdownEvent | ModalEvent | + PopoverEvent | ScrollspyEvent | TapEvent | TooltipEvent, + handler: JQuery.EventHandler): this; + } } From 8d7f6a54bcdd1c4835a3e3019cc88e1c1e73bcfa Mon Sep 17 00:00:00 2001 From: Jason Dreyzehner Date: Mon, 5 Mar 2018 23:12:18 -0500 Subject: [PATCH 0076/1327] inquirer: array params are not required to be mutable --- types/inquirer/index.d.ts | 22 ++++++++++++++++------ types/inquirer/inquirer-tests.ts | 21 +++++++++++++++++++++ 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/types/inquirer/index.d.ts b/types/inquirer/index.d.ts index 32c54fa99e..22157ecce0 100644 --- a/types/inquirer/index.d.ts +++ b/types/inquirer/index.d.ts @@ -3,7 +3,9 @@ // Definitions by: Qubo // Parvez // Jouderian +// Jason Dreyzehner // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 /// @@ -12,7 +14,10 @@ import through = require('through'); declare namespace inquirer { type Prompts = { [name: string]: PromptModule }; type ChoiceType = string | objects.ChoiceOption | objects.Separator; - type Questions = Question | Question[] | Rx.Observable; + type Questions = + | Question + | ReadonlyArray + | Rx.Observable; interface Inquirer { restoreDefaultPrompts(): void; @@ -39,7 +44,7 @@ declare namespace inquirer { ui: { BottomBar: ui.BottomBar; Prompt: ui.Prompt; - } + }; } interface PromptModule { @@ -91,7 +96,9 @@ declare namespace inquirer { * Array values can be simple strings, or objects containing a name (to display) and a value properties * (to save in the answers hash). Values can also be a Separator. */ - choices?: ChoiceType[] | ((answers: Answers) => ChoiceType[]); + choices?: + | ReadonlyArray + | ((answers: Answers) => ReadonlyArray); /** * Receive the user input and should return true if the value is valid, and an error message (String) * otherwise. If false is returned, a default error message is provided. @@ -247,9 +254,12 @@ declare namespace inquirer { * @param choices All `choice` to keep in the collection */ interface Choices { - new (choices: (string | Separator | ChoiceOption)[], answers?: Answers): Choices; - choices: Choice[]; - realChoices: Choice[]; + new ( + choices: ReadonlyArray, + answers?: Answers + ): Choices; + choices: ReadonlyArray; + realChoices: ReadonlyArray; length: number; realLength: number; /** diff --git a/types/inquirer/inquirer-tests.ts b/types/inquirer/inquirer-tests.ts index 4a43dcc98e..1afce2e378 100644 --- a/types/inquirer/inquirer-tests.ts +++ b/types/inquirer/inquirer-tests.ts @@ -525,3 +525,24 @@ function likesFood ( aFood: string ) { inquirer.prompt(questions, function (answers) { console.log( JSON.stringify(answers, null, " ") ); }); + +// immutable usage +const immutableChoices: ReadonlyArray = [ + 'Order a pizza', + 'Make a reservation', + 'Ask opening hours', + 'Talk to the receptionist' +]; +inquirer.prompt( + [ + { + type: 'rawlist', + name: 'theme', + message: 'What do you want to do?', + choices: immutableChoices + } + ], + function(answers: inquirer.Answers) { + console.log(JSON.stringify(answers, null, ' ')); + } +); From 3c476312ab09e22932eb95f95dc132612bf865c3 Mon Sep 17 00:00:00 2001 From: dekster Date: Tue, 6 Mar 2018 16:46:32 +0300 Subject: [PATCH 0077/1327] Duplcate line --- types/react-truncate/index.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/types/react-truncate/index.d.ts b/types/react-truncate/index.d.ts index 3c21c15150..15c72616c0 100644 --- a/types/react-truncate/index.d.ts +++ b/types/react-truncate/index.d.ts @@ -11,7 +11,6 @@ export interface TruncateProps extends React.HTMLProps { ellipsis?: React.ReactNode; trimWhitespace?: boolean; onTruncate?(isTruncated: boolean): void; - trimWhitespace?: boolean; } declare class Truncate extends React.Component { } From 8ae9759111e8343b38156660ccb1aeb75b58c439 Mon Sep 17 00:00:00 2001 From: Lance Ivy Date: Tue, 6 Mar 2018 12:56:45 -0800 Subject: [PATCH 0078/1327] update pusher-js to 4.2.2 --- types/pusher-js/index.d.ts | 87 +++++++++++--------- types/pusher-js/pusher-js-tests.ts | 122 ++++++++++++++++++----------- 2 files changed, 125 insertions(+), 84 deletions(-) diff --git a/types/pusher-js/index.d.ts b/types/pusher-js/index.d.ts index 383277f121..9ea0b96268 100644 --- a/types/pusher-js/index.d.ts +++ b/types/pusher-js/index.d.ts @@ -1,24 +1,23 @@ -// Type definitions for pusher-js 3.0.0 +// Type definitions for pusher-js 4.2.2 // Project: https://github.com/pusher/pusher-js // Definitions by: Qubo +// Lance Ivy // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - declare namespace pusher { interface PusherStatic { new (apiKey: string, config?: Config): Pusher; } - interface Pusher { + interface Pusher extends EventsDispatcher { + channel(name: string): Channel; + allChannels(): Channel[]; + connect(): void; + disconnect(): void; subscribe(name: string): Channel; subscribeAll(): void; unsubscribe(name: string): void; - channel(name: string): Channel; - allChannels(): Channel[]; - bind(eventName: string, callback: Function): Pusher; - bind_all(callback: Function): Pusher; - disconnect(): void; + isEncrypted(): boolean; key: string; config: Config; //TODO: add GlobalConfig typings channels: any; //TODO: Type this @@ -43,7 +42,7 @@ declare namespace pusher { * Defines how the authentication endpoint, defined using authEndpoint, will be called. * There are two options available: ajax and jsonp. */ - authTransport?: string; + authTransport?: 'ajax' | 'jsonp'; /** * Allows passing additional data to authorizers. Supports query string params and headers (AJAX only). @@ -51,15 +50,19 @@ declare namespace pusher { */ auth?: AuthConfig; + /** + * If you need custom authorization behavior you can provide your own authorizer function as follows: + */ + authorizer?: Authorizer; /** * Allows connecting to a different datacenter by setting up correct hostnames and ports for the connection. */ cluster?: string; - /** - * Disables stats collection, so that connection metrics are not submitted to Pusher’s servers. + * Disables stats collection, so that connection metrics are not submitted to Pusher’s servers. These stats + * are used for internal monitoring only and they do not affect the account stats. */ disableStats?: boolean; @@ -69,8 +72,7 @@ declare namespace pusher { * Available transports: ws, wss, xhr_streaming, xhr_polling, sockjs. * Additional transports may be added in the future and without adding them to this list, they will be disabled. */ - enabledTransports?: string[]; - + enabledTransports?: Transport[]; /** * Specified which transports must not be used by Pusher to establish a connection. @@ -78,7 +80,7 @@ declare namespace pusher { * Available transports: ws, wss, xhr_streaming, xhr_polling, sockjs. * Additional transports may be added in the future and without adding them to this list, they will be enabled. */ - disabledTransports?: string[]; + disabledTransports?: Transport[]; /** * Ignores null origin checks for HTTP fallbacks. Use with care, it should be disabled only if necessary (i.e. PhoneGap). @@ -99,6 +101,7 @@ declare namespace pusher { pongTimeout?: number; wsHost?: string; + wsPath?: string; wsPort?: number; wssPort?: number; httpHost?: string; @@ -106,20 +109,34 @@ declare namespace pusher { httpsPort?: number; } + type Transport = 'ws' | 'wss' | 'xhr_streaming' | 'xhr_polling' | 'sockjs'; + interface AuthConfig { params?: { [key: string]: any }; headers?: { [key: string]: any }; } - interface GenericEventsDispatcher extends EventsDispatcher { - bind(eventName: string, callback: Function, context?: any): Self; - bind_all(callback: Function): Self; - unbind(eventName?: string, callback?: Function, context?: any): Self; - unbind_all(eventName?: string, callback?: Function): Self; - emit(eventName: string, data?: any): Self; + interface AuthInfo { + auth: string; + channel_data?: string; } - interface Channel extends GenericEventsDispatcher { + type Authorizer = (channel: Channel, options: Config) => { + authorize: (socketId: string, callback: (errored: boolean, authInfo?: AuthInfo) => void) => void + } + + type EventCallback = (context: any, data: any) => void; + + interface EventsDispatcher { + bind(eventName: string, callback: EventCallback, context?: any): this; + bind_global(callback: EventCallback): this; + unbind(eventName?: string | null, callback?: EventCallback | null, context?: any): this; + unbind_global(callback?: EventCallback): this; + unbind_all(): this; + emit(eventName: string, data?: any): this; + } + + interface Channel extends EventsDispatcher { /** Triggers an event */ trigger(eventName: string, data?: any): boolean; pusher: Pusher; @@ -133,15 +150,7 @@ declare namespace pusher { authorize(socketId: string, callback: (data: any) => void): void; } - interface EventsDispatcher { - bind(eventName: string, callback: Function, context?: any): EventsDispatcher; - bind_all(callback: Function): EventsDispatcher; - unbind(eventName?: string, callback?: Function, context?: any): EventsDispatcher; - unbind_all(eventName?: string, callback?: Function): EventsDispatcher; - emit(eventName: string, data?: any): EventsDispatcher; - } - - interface ConnectionManager extends GenericEventsDispatcher { + interface ConnectionManager extends EventsDispatcher { key: string; options: any; //TODO: Timeline.js state: string; @@ -204,24 +213,24 @@ declare namespace pusher { * * Resulting object containts two fields - id and info. * - * @param {Number} id + * @param {String} id * @return {Object} member's info or null */ - get(id: number): T; + get(id: string): null | T; /** * Calls back for each member in unspecified order. * * @param {Function} callback */ - each(callback: (member: any) => void): void; - members: { [id: number]: UserInfo }; + each(callback: (member: Member) => void): void; + members: { [id: string]: Member }; count: number; - myID: number; - me: UserInfo; + myID: string; + me: Member; } - interface UserInfo { - id: number; + interface Member { + id: string; info: T; } } diff --git a/types/pusher-js/pusher-js-tests.ts b/types/pusher-js/pusher-js-tests.ts index b393d6cb75..1eec5ef200 100644 --- a/types/pusher-js/pusher-js-tests.ts +++ b/types/pusher-js/pusher-js-tests.ts @@ -2,39 +2,50 @@ import Pusher = require('pusher-js'); import { PresenceChannel } from "pusher-js"; -var API_KEY: string; +var APP_KEY: string; var pusher: Pusher.Pusher; // // Configuration // -pusher = new Pusher(API_KEY, { +pusher = new Pusher(APP_KEY, { authEndpoint: "http://example.com/pusher/auth" }); -pusher = new Pusher(API_KEY, { +pusher = new Pusher(APP_KEY, { auth: { params: { foo: "bar" }, headers: { baz: "boo" } } }); -pusher = new Pusher(API_KEY, { +pusher = new Pusher(APP_KEY, { auth: { params: { foo: "bar" }, headers: { "X-CSRF-Token": "SOME_CSRF_TOKEN" } } }); -pusher = new Pusher(API_KEY, { cluster: "eu" }); +pusher = new Pusher(APP_KEY, { + authorizer: function (channel, options) { + return { + authorize: function (socketId, callback) { + // Do some ajax to get the auth information + var authInformation = {"auth": "hash"}; + callback(false, authInformation); + } + }; + } +}) +pusher = new Pusher(APP_KEY, { cluster: "eu" }); -pusher = new Pusher(API_KEY, { enabledTransports: ["ws"] }); +pusher = new Pusher(APP_KEY, { enabledTransports: ["ws"] }); -pusher = new Pusher(API_KEY, { disabledTransports: ["sockjs"] }); +pusher = new Pusher(APP_KEY, { disabledTransports: ["sockjs"] }); // will only use WebSockets -pusher = new Pusher(API_KEY, { +pusher = new Pusher(APP_KEY, { enabledTransports: ["ws", "xhr_streaming"], disabledTransports: ["xhr_streaming"] }); @@ -44,47 +55,68 @@ pusher = new Pusher(API_KEY, { // var socket: Pusher.Pusher; -var my_channel: Pusher.Channel; -var channels: Pusher.Channel[]; +var channel: Pusher.Channel; + +socket = new Pusher(APP_KEY); + +socket.disconnect(); -socket = new Pusher(API_KEY); // // Subscribing to channels // -my_channel = socket.subscribe('my-channel'); +channel = socket.subscribe('my-channel'); -my_channel = socket.subscribe('private-my-channel'); +channel = socket.subscribe('private-my-channel'); -channels = socket.allChannels(); -console.group('Pusher - subscribed to:'); -for (var i = 0; i < channels.length; i++) { - var channel = channels[i]; - console.log(channel.name); -} -console.groupEnd(); +socket.allChannels().forEach(channel => console.log(channel.name)); -my_channel = socket.subscribe('my-channel'); -socket.bind('new-comment', - function(data: any) { - // add comment into page - } -); +// +// Unsubscribing from channels +// -var channel: Pusher.Channel; +socket.unsubscribe('my-channel'); -var context = { title: 'Pusher' }; -var handler = function(){ - console.log('My name is ' + this.title); -}; -channel.bind('new-comment', handler, context); +socket.unsubscribe('private-my-channel'); -channel.unbind('new-comment', handler); // removes just `handler` for the `new-comment` event -channel.unbind('new-comment'); // removes all handlers for the `new-comment` event -channel.unbind(null, handler); // removes `handler` for all events -channel.unbind(null, null, context); // removes all handlers for `context` -channel.unbind(); // removes all handlers on `channel` +// +// Binding to events +// + +channel.bind('new-message', function (data) { + console.log(data.message); +}); + +channel.bind('my-event', function () { + console.log(`hi ${this.name}`); +}, { name: 'Pusher' }); + +channel.unbind('new-comment', console.log); + +channel.unbind('new-comment'); + +channel.unbind(null, console.log); + +channel.unbind(null, null, context); + +channel.unbind(); + +channel.bind_global(function (event, data) { + console.log(`The event ${event} was triggered with data ${data}`); +}); + +channel.unbind_global(console.log); + +channel.unbind_global(); + +channel.unbind_all(); + +// +// Connection Events +// + +socket.connection.bind('connected', console.log); // @@ -110,11 +142,11 @@ var options: Pusher.Config; var channelName: string; var privateChannelName: string; var presenceChannelName: string; -var add_member: Function; -var remove_member: Function; -var update_member_count: Function; +var add_member: (ctx: any, data?: any) => void; +var remove_member: (ctx: any, data?: any) => void; +var update_member_count: (ctx: any, data?: any) => void; var eventName: string; -var callback: Function; +var callback: (ctx: any, data?: any) => void; var applicationKey: string; var log: Function; var $: any; @@ -209,12 +241,12 @@ var presenceChannel: PresenceChannel = pusher.subscribe(presenceChanne var count: number = presenceChannel.members.count; -presenceChannel.members.each(function(member: Pusher.UserInfo) { +presenceChannel.members.each(function(member) { var userId = member.id; var userInfo = member.info; }); -var some_user_id: number; +var some_user_id: string; var user = presenceChannel.members.get(some_user_id); var me = presenceChannel.members.me; @@ -239,12 +271,12 @@ channel.bind('pusher:subscription_succeeded', function(members: Pusher.Members) { +channel.bind('pusher:member_added', function(member: Pusher.Member) { // for example: add_member(member.id, member.info); }); -channel.bind('pusher:member_removed', function(member: Pusher.UserInfo) { +channel.bind('pusher:member_removed', function(member: Pusher.Member) { // for example: remove_member(member.id, member.info); }); From 143f327125a8ac208ba31727a78876c11596e448 Mon Sep 17 00:00:00 2001 From: denis Date: Tue, 6 Mar 2018 22:12:08 +0100 Subject: [PATCH 0079/1327] Add popover options --- types/bootstrap/bootstrap-tests.ts | 42 ++++++++++++++-- types/bootstrap/index.d.ts | 79 +++++++++++++++--------------- 2 files changed, 76 insertions(+), 45 deletions(-) diff --git a/types/bootstrap/bootstrap-tests.ts b/types/bootstrap/bootstrap-tests.ts index f8934ebbfc..f6b6246724 100755 --- a/types/bootstrap/bootstrap-tests.ts +++ b/types/bootstrap/bootstrap-tests.ts @@ -142,14 +142,38 @@ $("#modal").modal({ // -------------------------------------------------------------------------------------- // $ExpectType JQuery -$("#scrollspy").popover(); +$("#popover").popover(); // $ExpectType JQuery -$("#scrollspy").popover("toggle"); +$("#popover").popover("toggle"); -$("#scrollspy").on("activate.bs.scrollspy", () => {}); +$("#popover").on("show.bs.popover", () => {}); -// TODO: test popover with options +$("#popover").popover({}); + +$("#popover").popover({ + animation: false, + container: "#container", + delay: {show: 500, hide: 100}, + html: true, + placement: "auto", + selector: "[rel=\"popover\"]", + template: '

', + title: "Hello world", + trigger: "hover focus", + offset: 10, + fallbackPlacement: ["flip", "clockwise"], + boundary: "scrollParent", +}); + +$("#popover").popover({ + placement(this, popover, trigger) { + console.log(this.tip === popover); + console.log(this.element === trigger); + console.log(this.config.content); + return "left"; + }, +}); // -------------------------------------------------------------------------------------- // Scrollspy @@ -232,6 +256,14 @@ $("#tooltip").tooltip({ }, }); +$("#tooltip").tooltip({ + placement(this, tooltip, trigger) { + // $ExpectError + console.log(this.config.content); // only for PopoverOption, not TooltipOption + return "left"; + }, +}); + $("#tooltip").tooltip({ selector: "[rel=\"tooltip\"]", }); @@ -259,7 +291,7 @@ $("#tooltip").tooltip({ }); $("#tooltip").tooltip({ - trigger: "focus hover", + trigger: "hover focus", }); $("#tooltip").tooltip({ diff --git a/types/bootstrap/index.d.ts b/types/bootstrap/index.d.ts index 01089126fb..15ef7a5f12 100755 --- a/types/bootstrap/index.d.ts +++ b/types/bootstrap/index.d.ts @@ -4,8 +4,6 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -// TODO: popovers options - /// /// @@ -17,13 +15,17 @@ export as namespace Bootstrap; export type Placement = "auto" | "top" | "bottom" | "left" | "right"; +export type Trigger = "click" | "hover" | "focus" | "manual" | + "click hover" | "click focus" | "hover focus" | + "click hover focus"; + export interface Delay { show: number; hide: number; } -export interface TooltipInstance { - config: TooltipOption; +export interface TooltipInstance { + config: T; element: Element; tip: HTMLElement; } @@ -146,15 +148,13 @@ export interface ModalOption { show?: boolean; } -export interface PoppoverOption { +export interface PopoverOption extends TooltipOption { /** - * Apply a CSS fade transition to the popover. - * - * @default true + * Default content value if data-content attribute isn't present. + * If a function is given, it will be called with its this reference + * set to the element that the popover is attached to. */ - animation: boolean; - - // TODO + content?: string | Element | ((this: Element) => string | Element); } export interface ScrollspyOption { @@ -168,24 +168,24 @@ export interface ScrollspyOption { export interface TooltipOption { /** - * Apply a CSS fade transition to the tooltip. + * Apply a CSS fade transition to the tooltip or popover. * * @default true */ animation?: boolean; /** - * Appends the tooltip to a specific element. Example: `container: 'body'`. - * This option is particularly useful in that it allows you to position the tooltip + * Appends the tooltip or popover to a specific element. Example: `container: 'body'`. + * This option is particularly useful in that it allows you to position the tooltip or popover * in the flow of the document near the triggering element - which will prevent - * the tooltip from floating away from the triggering element during a window resize. + * it from floating away from the triggering element during a window resize. * * @default false */ container?: string | Element | false; /** - * Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type. + * Delay showing and hiding the tooltip or popover (ms) - does not apply to manual trigger type. * If a number is supplied, delay is applied to both hide/show. * Object structure is: `delay: { "show": 500, "hide": 100 }`. * @@ -194,8 +194,8 @@ export interface TooltipOption { delay?: number | Delay; /** - * Allow HTML in the tooltip. - * If true, HTML tags in the tooltip's title will be rendered in the tooltip. + * Allow HTML in the tooltip or popover. + * If true, HTML tags will be rendered in the tooltip or popover. * If false, jQuery's text method will be used to insert content into the DOM. * Use text if you're worried about XSS attacks. * @@ -204,18 +204,18 @@ export interface TooltipOption { html?: boolean; /** - * How to position the tooltip - auto | top | bottom | left | right. - * When auto is specified, it will dynamically reorient the tooltip. + * How to position the tooltip or popover - auto | top | bottom | left | right. + * When auto is specified, it will dynamically reorient the tooltip or popover. * When a function is used to determine the placement, it is called with - * the tooltip DOM node as its first argument and the triggering element DOM node as its second. - * The this context is set to the tooltip instance. + * the tooltip or popover DOM node as its first argument and the triggering element DOM node as its second. + * The this context is set to the tooltip or popover instance. * * @default "top" */ - placement?: Placement | ((this: TooltipInstance, tooltip: HTMLElement, trigger: Element) => Placement); + placement?: Placement | ((this: TooltipInstance, node: HTMLElement, trigger: Element) => Placement); /** - * If a selector is provided, tooltip objects will be delegated to the specified targets. + * If a selector is provided, tooltip or popover objects will be delegated to the specified targets. * In practice, this is used to enable dynamic HTML content to have popovers added. * * @default false @@ -223,41 +223,40 @@ export interface TooltipOption { selector?: string | false; /** - * Base HTML to use when creating the tooltip. The tooltip's title will be injected into - * the `.tooltip-inner`. The `.arrow` will become the tooltip's arrow. - * The outermost wrapper element should have the `.tooltip` class and `role="tooltip"`. + * Base HTML to use when creating the tooltip or popover. The tooltip's (resp., popover's) title will be injected into + * the `.tooltip-inner` (resp., `.popover-header`). The `.arrow` will become the tooltip's (resp., popover's) arrow. + * The outermost wrapper element should have the `.tooltip` (resp., .popover) class and `role="tooltip"`. * * @default '' + * @default '' */ template?: string; /** * Default title value if title attribute isn't present. * If a function is given, it will be called with its this reference set to the element - * that the tooltip is attached to. + * that the tooltip or popover is attached to. * * @default "" */ - title?: string | Element | ((this: Element) => string); + title?: string | Element | ((this: Element) => string | Element); /** - * How tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space. - * 'manual' indicates that the tooltip will be triggered programmatically via the .tooltip('show'), .tooltip('hide') and - * .tooltip('toggle') methods; this value cannot be combined with any other trigger. - * 'hover' on its own will result in tooltips that cannot be triggered via the keyboard, and should only be used if - * alternative methods for conveying the same information for keyboard users is present. + * How tooltip or popover is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space. + * 'manual' indicates that the tooltip will be triggered programmatically; this value cannot be combined with any other trigger. + * 'hover' should only be used if alternative methods for conveying the same information for keyboard users is present. * - * @default "hover focus" + * @default tooltip: "hover focus", popover: "click" */ - trigger?: string; + trigger?: Trigger; /** - * Offset of the tooltip relative to its target. + * Offset of the tooltip or popover relative to its target. * For more information refer to Popper.js's offset docs. * * @default 0 */ - offset?: number | string; + offset?: number | string; /** * Allow to specify which position Popper will use on fallback. @@ -268,7 +267,7 @@ export interface TooltipOption { fallbackPlacement?: Popper.Behavior | ReadonlyArray; /** - * Overflow constraint boundary of the tooltip. + * Overflow constraint boundary of the tooltip or popover. * Accepts the values of 'viewport', 'window', 'scrollParent', * or an HTMLElement reference (JavaScript only). * For more information refer to Popper.js's preventOverflow docs. @@ -332,7 +331,7 @@ declare global { modal(options?: ModalOption): this; popover(action: "show" | "hide" | "toggle" | "dispose" | "enable" | "disable" | "toggleEnabled" | "update"): this; - popover(options?: PoppoverOption): this; + popover(options?: PopoverOption): this; scrollspy(action: "refresh" | "dispose"): this; scrollspy(options?: ScrollspyOption): this; From 42f71113be2d1e05b208ed258e850e02f83c0b3d Mon Sep 17 00:00:00 2001 From: rob Date: Tue, 6 Mar 2018 11:15:17 -0700 Subject: [PATCH 0080/1327] make connection config relay spec compliant: https://facebook.github.io/relay/graphql/connections.htm#sec-Node --- types/graphql-relay/index.d.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/types/graphql-relay/index.d.ts b/types/graphql-relay/index.d.ts index 50ed0c3b7d..fc1eb3aa1e 100644 --- a/types/graphql-relay/index.d.ts +++ b/types/graphql-relay/index.d.ts @@ -21,6 +21,9 @@ import { GraphQLOutputType, GraphQLFieldResolver, GraphQLTypeResolver, + GraphQLUnionType, + GraphQLEnumType, + GraphQLScalarType, Thunk } from "graphql"; @@ -58,9 +61,20 @@ export const backwardConnectionArgs: GraphQLFieldConfigArgumentMap & { */ export const connectionArgs: GraphQLFieldConfigArgumentMap & ForwardConnectionArgs & BackwardConnectionArgs; +export type ConnectionConfigNodeTypeNullable = + | GraphQLScalarType + | GraphQLObjectType + | GraphQLInterfaceType + | GraphQLUnionType + | GraphQLEnumType; + +export type ConnectionConfigNodeType = + | ConnectionConfigNodeTypeNullable + | GraphQLNonNull; + export interface ConnectionConfig { name?: string | null; - nodeType: GraphQLObjectType; + nodeType: ConnectionConfigNodeType; resolveNode?: GraphQLFieldResolver | null; resolveCursor?: GraphQLFieldResolver | null; edgeFields?: Thunk> | null; From c48ba02bfab614861a5a0a8abb6610b62b3d08d4 Mon Sep 17 00:00:00 2001 From: Lance Ivy Date: Tue, 6 Mar 2018 13:25:48 -0800 Subject: [PATCH 0081/1327] fix many lint rules not all lint rules have been fixed because these tests are copied from documentation and should remain recognizable. --- types/pusher-js/index.d.ts | 36 +++++---------- types/pusher-js/pusher-js-tests.ts | 47 ++++++++++---------- types/pusher-js/tslint.json | 70 +----------------------------- 3 files changed, 35 insertions(+), 118 deletions(-) diff --git a/types/pusher-js/index.d.ts b/types/pusher-js/index.d.ts index 9ea0b96268..a81170d09c 100644 --- a/types/pusher-js/index.d.ts +++ b/types/pusher-js/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for pusher-js 4.2.2 +// Type definitions for pusher-js 4.2 // Project: https://github.com/pusher/pusher-js // Definitions by: Qubo // Lance Ivy @@ -19,11 +19,11 @@ declare namespace pusher { unsubscribe(name: string): void; isEncrypted(): boolean; key: string; - config: Config; //TODO: add GlobalConfig typings - channels: any; //TODO: Type this + config: Config; // TODO: add GlobalConfig typings + channels: any; // TODO: Type this global_emitter: EventsDispatcher; sessionID: number; - timeline: any; //TODO: Type this + timeline: any; // TODO: Type this connection: ConnectionManager; } @@ -122,8 +122,8 @@ declare namespace pusher { } type Authorizer = (channel: Channel, options: Config) => { - authorize: (socketId: string, callback: (errored: boolean, authInfo?: AuthInfo) => void) => void - } + authorize: (socketId: string, callback: (errored: boolean, authInfo?: AuthInfo) => void) => void; + }; type EventCallback = (context: any, data: any) => void; @@ -144,20 +144,18 @@ declare namespace pusher { subscribed: boolean; /** * Authenticates the connection as a member of the channel. - * @param {String} socketId - * @param {Function} callback */ authorize(socketId: string, callback: (data: any) => void): void; } interface ConnectionManager extends EventsDispatcher { key: string; - options: any; //TODO: Timeline.js + options: any; // TODO: Timeline.js state: string; socket_id: string; - connection: any; //TODO: Type this + connection: any; // TODO: Type this encrypted: boolean; - timeline: any; //TODO: Type this + timeline: any; // TODO: Type this connectionCallbacks: { message: (message: string) => void; ping: () => void; @@ -176,7 +174,7 @@ declare namespace pusher { refused: () => void; backoff: () => void; retry: () => void; - connected: (handshake: any) => void; //TODO: Type this + connected: (handshake: any) => void; // TODO: Type this }; /** * Establishes a connection to Pusher. @@ -187,15 +185,10 @@ declare namespace pusher { connect(): void; /** * Sends raw data. - * @param {String} data */ send(data: string): boolean; - /** Sends an event. - * - * @param {String} name - * @param {String} data - * @param {String} [channel] - * @returns {Boolean} whether message was sent or not + /** + * Sends an event. */ send_event(name: string, data: string, channel: string): boolean; /** Closes the connection. */ @@ -212,15 +205,10 @@ declare namespace pusher { * Returns member's info for given id. * * Resulting object containts two fields - id and info. - * - * @param {String} id - * @return {Object} member's info or null */ get(id: string): null | T; /** * Calls back for each member in unspecified order. - * - * @param {Function} callback */ each(callback: (member: Member) => void): void; members: { [id: string]: Member }; diff --git a/types/pusher-js/pusher-js-tests.ts b/types/pusher-js/pusher-js-tests.ts index 1eec5ef200..dc6a9eedd7 100644 --- a/types/pusher-js/pusher-js-tests.ts +++ b/types/pusher-js/pusher-js-tests.ts @@ -1,4 +1,3 @@ - import Pusher = require('pusher-js'); import { PresenceChannel } from "pusher-js"; @@ -28,16 +27,17 @@ pusher = new Pusher(APP_KEY, { }); pusher = new Pusher(APP_KEY, { - authorizer: function (channel, options) { + authorizer: function(channel, options) { return { - authorize: function (socketId, callback) { + authorize: function(socketId, callback) { // Do some ajax to get the auth information - var authInformation = {"auth": "hash"}; + var authInformation = {auth: "hash"}; callback(false, authInformation); } }; } -}) +}); + pusher = new Pusher(APP_KEY, { cluster: "eu" }); pusher = new Pusher(APP_KEY, { enabledTransports: ["ws"] }); @@ -61,7 +61,6 @@ socket = new Pusher(APP_KEY); socket.disconnect(); - // // Subscribing to channels // @@ -84,11 +83,11 @@ socket.unsubscribe('private-my-channel'); // Binding to events // -channel.bind('new-message', function (data) { +channel.bind('new-message', function(data) { console.log(data.message); }); -channel.bind('my-event', function () { +channel.bind('my-event', function() { console.log(`hi ${this.name}`); }, { name: 'Pusher' }); @@ -102,7 +101,7 @@ channel.unbind(null, null, context); channel.unbind(); -channel.bind_global(function (event, data) { +channel.bind_global(function(event, data) { console.log(`The event ${event} was triggered with data ${data}`); }); @@ -118,7 +117,6 @@ channel.unbind_all(); socket.connection.bind('connected', console.log); - // // // Samples from Pusher Documentation @@ -148,7 +146,7 @@ var update_member_count: (ctx: any, data?: any) => void; var eventName: string; var callback: (ctx: any, data?: any) => void; var applicationKey: string; -var log: Function; +var log: (msg: string) => void; var $: any; var data: any; @@ -188,11 +186,11 @@ pusher = new Pusher('app_key', { pusher = new Pusher('app_key', { cluster: 'eu' }); -pusher = new Pusher('app_key', { encrypted: true } ); +pusher = new Pusher('app_key', { encrypted: true }); pusher = new Pusher('app_key'); -pusher.connection.bind( 'error', function( err: any ) { - if( err.data.code === 4004 ) { +pusher.connection.bind('error', function(err: any) { + if (err.data.code === 4004) { log('>>> detected limit error'); } }); @@ -211,7 +209,7 @@ pusher.connection.bind('connected', function() { pusher.connection.bind('connecting_in', function(delay: any) { alert("I haven't been able to establish a connection for this feature. " + - "I will try again in " + delay + " seconds.") + "I will try again in " + delay + " seconds."); }); pusher.connection.bind('state_change', function(states: any) { @@ -237,7 +235,7 @@ var privateChannel = pusher.subscribe(privateChannelName); // Presence channels -var presenceChannel: PresenceChannel = pusher.subscribe(presenceChannelName); +var presenceChannel = pusher.subscribe(presenceChannelName) as Pusher.PresenceChannel; var count: number = presenceChannel.members.count; @@ -252,7 +250,7 @@ var user = presenceChannel.members.get(some_user_id); var me = presenceChannel.members.me; pusher = new Pusher('app_key'); -presenceChannel = pusher.subscribe('presence-example'); +presenceChannel = pusher.subscribe('presence-example') as Pusher.PresenceChannel; presenceChannel.bind('pusher:subscription_succeeded', function() { var me = presenceChannel.members.me; var userId = me.id; @@ -294,7 +292,7 @@ channel.bind('new-price', ); var context = { title: 'Pusher' }; -var handler = function(){ +var handler = function() { console.log('My name is ' + this.title); }; channel.bind('new-comment', handler, context); @@ -333,7 +331,7 @@ channel.bind('pusher:subscription_succeeded', function() { pusher = new Pusher('APP_KEY'); channel = pusher.subscribe('private-channel'); channel.bind('pusher:subscription_error', function(status: number) { - if(status == 408 || status == 503){ + if (status === 408 || status === 503) { // retry? } }); @@ -362,23 +360,22 @@ channel = pusher.subscribe("private-mousemoves"); // this method should be bound as a 'mousemove' event listener document.body.addEventListener('mousemove', onMouseMove, false); -function onMouseMove(ev: any){ +function onMouseMove(ev: any) { ev = ev || window.event; state.currentX = ev.pageX || ev.clientX; state.currentY = ev.pageY || ev.clientY; } -setInterval(function(){ - if(state.currentX !== state.lastX || state.currentY !== state.lastY){ +setInterval(function() { + if (state.currentX !== state.lastX || state.currentY !== state.lastY) { state.lastX = state.currentX; state.lastY = state.currentY; var text = document.createTextNode( 'Triggering event due to state change: x: ' + state.currentX + ', y: ' + state.currentY ); - outputEl.replaceChild( text, outputEl.firstChild ); + outputEl.replaceChild(text, outputEl.firstChild); - channel.trigger("client-mouse-moved", {x:state.currentX, y: state.currentY}); + channel.trigger("client-mouse-moved", {x: state.currentX, y: state.currentY}); } }, 300); // send every 300 milliseconds if position has changed - diff --git a/types/pusher-js/tslint.json b/types/pusher-js/tslint.json index a41bf5d19a..2cf1b5c31e 100644 --- a/types/pusher-js/tslint.json +++ b/types/pusher-js/tslint.json @@ -1,79 +1,11 @@ { "extends": "dtslint/dt.json", "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, "only-arrow-functions": false, - "prefer-conditional-expression": false, "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false + "prefer-template": false } } From 79610aca3c393f13867fc108d731121294660d50 Mon Sep 17 00:00:00 2001 From: Aluan Haddad Date: Wed, 7 Mar 2018 04:19:52 -0500 Subject: [PATCH 0082/1327] add Ora.prototype.frameIndex Adds the `Ora.prototype.frameIndex` member. https://github.com/sindresorhus/ora/blob/master/index.js#L37 add Ora.prototype.frameIndex --- types/ora/index.d.ts | 2 ++ types/ora/tsconfig.json | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/types/ora/index.d.ts b/types/ora/index.d.ts index f5dd605073..d43a01c7cf 100644 --- a/types/ora/index.d.ts +++ b/types/ora/index.d.ts @@ -119,6 +119,8 @@ declare class Ora { text: string; color: Color; + + frameIndex: number; } interface oraFactory { diff --git a/types/ora/tsconfig.json b/types/ora/tsconfig.json index 4092876efe..d283fa111a 100644 --- a/types/ora/tsconfig.json +++ b/types/ora/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "ora-tests.ts" ] -} \ No newline at end of file +} From f81c6064cabfd50cdf9c7acf10d0e4af49440e5e Mon Sep 17 00:00:00 2001 From: Dado Date: Wed, 7 Mar 2018 13:00:33 +0100 Subject: [PATCH 0083/1327] Select2 options selectionAdapter and resultsAdapter --- types/select2/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/select2/index.d.ts b/types/select2/index.d.ts index e7a974f92d..51e297a9a8 100644 --- a/types/select2/index.d.ts +++ b/types/select2/index.d.ts @@ -92,6 +92,8 @@ interface Select2Options { dropdownParent?: JQuery; debug?: boolean; dropdownAdapter?: any; + selectionAdapter?: any; + resultsAdapter?: any; } interface Select2JQueryEventObject extends JQueryEventObject { From 9b0cdc63e624b9e15b38a3184506b207fee6948a Mon Sep 17 00:00:00 2001 From: Artem Nechunaev Date: Wed, 7 Mar 2018 15:31:20 +0300 Subject: [PATCH 0084/1327] Add inputRef prop definition --- types/react-input-mask/index.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/react-input-mask/index.d.ts b/types/react-input-mask/index.d.ts index 6ed7660196..2bc3bda94f 100644 --- a/types/react-input-mask/index.d.ts +++ b/types/react-input-mask/index.d.ts @@ -36,6 +36,10 @@ declare namespace reactInputMask { * Show mask even in empty input without focus. */ alwaysShowMask?: boolean; + /** + * Use inputRef instead of ref if you need input node to manage focus, selection, etc. + */ + inputRef?: React.Ref } class ReactInputMask extends React.Component { } From edf2bd560299c4033cf2e3ff19f75fd0e082655b Mon Sep 17 00:00:00 2001 From: Artem Nechunaev Date: Wed, 7 Mar 2018 15:47:14 +0300 Subject: [PATCH 0085/1327] Add test for inputRef prop --- types/react-input-mask/react-input-mask-tests.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/react-input-mask/react-input-mask-tests.tsx b/types/react-input-mask/react-input-mask-tests.tsx index d116b2b27a..a34b15ac99 100644 --- a/types/react-input-mask/react-input-mask-tests.tsx +++ b/types/react-input-mask/react-input-mask-tests.tsx @@ -1,10 +1,13 @@ import ReactInputMask from 'react-input-mask'; import * as React from 'react'; +let ref: HTMLInputElement | null = null; +
+ ref = node} />
; From 38998ea10a52e176d72b5055cf81647c167b682d Mon Sep 17 00:00:00 2001 From: Artem Nechunaev Date: Wed, 7 Mar 2018 15:53:35 +0300 Subject: [PATCH 0086/1327] Fix lint errors --- types/react-input-mask/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-input-mask/index.d.ts b/types/react-input-mask/index.d.ts index 2bc3bda94f..de3853642f 100644 --- a/types/react-input-mask/index.d.ts +++ b/types/react-input-mask/index.d.ts @@ -39,7 +39,7 @@ declare namespace reactInputMask { /** * Use inputRef instead of ref if you need input node to manage focus, selection, etc. */ - inputRef?: React.Ref + inputRef?: React.Ref; } class ReactInputMask extends React.Component { } From 3f2825672b7f9ae401ad0a32577dafe007cf4c9b Mon Sep 17 00:00:00 2001 From: Artem Nechunaev Date: Wed, 7 Mar 2018 16:07:06 +0300 Subject: [PATCH 0087/1327] Fix package version --- types/react-input-mask/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-input-mask/index.d.ts b/types/react-input-mask/index.d.ts index de3853642f..034c3b4f9d 100644 --- a/types/react-input-mask/index.d.ts +++ b/types/react-input-mask/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-input-mask 0.7 +// Type definitions for react-input-mask 1.2.2 // Project: https://github.com/sanniassin/react-input-mask // Definitions by: Alexandre Paré // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From bc1e2d97212935217194003ef5cc0c4ac8d5732e Mon Sep 17 00:00:00 2001 From: Artem Nechunaev Date: Wed, 7 Mar 2018 16:50:17 +0300 Subject: [PATCH 0088/1327] Fix package version --- types/react-input-mask/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-input-mask/index.d.ts b/types/react-input-mask/index.d.ts index 034c3b4f9d..8716cda0e6 100644 --- a/types/react-input-mask/index.d.ts +++ b/types/react-input-mask/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-input-mask 1.2.2 +// Type definitions for react-input-mask 1.2 // Project: https://github.com/sanniassin/react-input-mask // Definitions by: Alexandre Paré // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 091f2f42713c6da7da0ebad60fbaecc5bb95ef05 Mon Sep 17 00:00:00 2001 From: Stephan Schneider Date: Wed, 7 Mar 2018 15:23:58 +0100 Subject: [PATCH 0089/1327] fix: allow for synchronous Hapi plugin register fn --- types/hapi/index.d.ts | 2 +- types/hapi/test/server/server-plugins.ts | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/types/hapi/index.d.ts b/types/hapi/index.d.ts index de1542f33f..8ad9b6f4c4 100644 --- a/types/hapi/index.d.ts +++ b/types/hapi/index.d.ts @@ -120,7 +120,7 @@ export interface PluginBase { * * server - the server object with a plugin-specific server.realm. * * options - any options passed to the plugin during registration via server.register(). */ - register: (server: Server, options: T) => Promise; + register: (server: Server, options: T) => void | Promise; /** (optional) if true, allows the plugin to be registered multiple times with the same server. Defaults to false. */ multiple?: boolean; diff --git a/types/hapi/test/server/server-plugins.ts b/types/hapi/test/server/server-plugins.ts index 7f3d194f84..8de3fdc24f 100644 --- a/types/hapi/test/server/server-plugins.ts +++ b/types/hapi/test/server/server-plugins.ts @@ -13,6 +13,10 @@ interface Plugin3 { three: 3; } +interface Plugin4 { + four: 4; +} + declare module 'hapi' { interface PluginProperties { example: { @@ -42,6 +46,11 @@ const plugin3: Plugin = { register: async (server: Server, options: Plugin3) => {} }; +const plugin4: Plugin = { + name: 'plugin4', + register: (server: Server, options: Plugin4) => {} +}; + const server = new Server({ port: 8000, }); @@ -90,5 +99,9 @@ server.register([ { plugin: plugin1, options: {one: 1} + }, + { + plugin: plugin4, + options: {four: 4} } ]); From 7277381533f80f40bf11a191187ef4348063351c Mon Sep 17 00:00:00 2001 From: Ricardo De Pena Date: Wed, 7 Mar 2018 23:23:25 -0500 Subject: [PATCH 0090/1327] OpenFin Application namespace in line with .30 release. --- types/openfin/v30/index.d.ts | 1756 ++++++++++++++++++++++++++++ types/openfin/v30/openfin-tests.ts | 728 ++++++++++++ types/openfin/v30/tsconfig.json | 24 + types/openfin/v30/tslint.json | 6 + types/openfin/v30/v30 | 1736 +++++++++++++++++++++++++++ 5 files changed, 4250 insertions(+) create mode 100644 types/openfin/v30/index.d.ts create mode 100644 types/openfin/v30/openfin-tests.ts create mode 100644 types/openfin/v30/tsconfig.json create mode 100644 types/openfin/v30/tslint.json create mode 100644 types/openfin/v30/v30 diff --git a/types/openfin/v30/index.d.ts b/types/openfin/v30/index.d.ts new file mode 100644 index 0000000000..1e69b3b713 --- /dev/null +++ b/types/openfin/v30/index.d.ts @@ -0,0 +1,1756 @@ +// Type definitions for OpenFin API 17.0 +// Project: https://openfin.co/ +// Definitions by: Chris Barker +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// based on v6.49.17.14 +// see https://openfin.co/support/technical-faq/#what-do-the-numbers-in-the-runtime-version-mean + +/** + * JavaScript API + * The JavaScript API allows you to create an HTML/JavaScript application that has access to the native windowing environment, + * can communicate with other applications and has access to sandboxed system-level features. + * + * API Ready + * When using the OpenFin API, it is important to ensure that it has been fully loaded before making any API calls. To verify + * that the API is in fact ready, be sure to make any API calls either from within the fin.desktop.main() method or explicitly + * after it has returned. This avoids the situation of trying to access methods that are not yet fully injected. + * + * Overview + * When running within the OpenFin Runtime your web applications have access to the "fin" namespace and all the modules within the API + * without the need to include additional source files. You can treat the "fin" namespace as you would the "window", "navigator" or "document" objects. + */ +declare namespace fin { + const desktop: OpenFinDesktop; + + interface OpenFinDesktop { + main(f: () => any): void; + Application: OpenFinApplicationStatic; + ExternalApp: OpenFinExternalApplicationStatic; + InterApplicationBus: OpenFinInterApplicationBus; + Notification: OpenFinNotificationStatic; + System: OpenFinSystem; + Window: OpenFinWindowStatic; + } + + interface OpenFinApplicationStatic { + /** + * Creates a new Application. + * An object representing an application. Allows the developer to create, execute, show/close an application as well as listen to application events. + */ + new ( + options: ApplicationOptions, + callback?: (successObj: { httpResponseCode: number }) => void, + errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): OpenFinApplication; + /** + * Launches the given Application manifest. + */ + createFromManifest(manifestUrl: string, callback?: (app: OpenFinApplication) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Returns an Application object that represents an existing application. + */ + getCurrent(): OpenFinApplication; + /** + * Returns an Application object that represents an existing application. + */ + wrap(uuid: string): OpenFinApplication; + } + + /** + * Application + * An object representing an application.Allows the developer to create, execute, show / close an application as well as listen to application events. + */ + interface OpenFinApplication { + /** + * Returns an instance of the main Window of the application + */ + getWindow(): OpenFinWindow; + /** + * Registers an event listener on the specified event. + */ + addEventListener( + type: OpenFinApplicationEventType, + listener: (event: ApplicationBaseEvent + | TrayIconClickedEvent + | WindowEvent + | WindowAlertRequestedEvent + | WindowAuthRequested + | WindowNavigationRejectedEvent + | WindowEndLoadEvent) => void, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + /** + * Closes the application and any child windows created by the application. + */ + close(force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of wrapped fin.desktop.Windows for each of the application's child windows. + */ + getChildWindows(callback?: (children: OpenFinWindow[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of active window groups for all of the application's windows. Each group is represented as an array of wrapped fin.desktop.Windows. + */ + getGroups(callback?: (groups: OpenFinWindow[][]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the JSON manifest that was used to create the application. Invokes the error callback if the application was not created from a manifest. + */ + getManifest(callback?: (manifest: any) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves UUID of the application that launches this application. Invokes the error callback if the application was created from a manifest. + */ + getParentUuid(callback?: (uuid: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves current configuration of application's shortcuts. + */ + getShortcuts(callback?: (config: ShortCutConfig) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves information about the application. + */ + getInfo(callback?: (info: LaunchInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves information about the system tray. + */ + getTrayIconInfo(callback?: (trayInfo: TrayIconInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Determines if the application is currently running. + */ + isRunning(callback?: (running: boolean) => void, errorCallback?: (reason: string) => void): void; + /** + * Registers a username and an app name for licensing purposes. + */ + registerUser(userName: string, appName: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Removes a previously registered event listener from the specified event. + */ + removeEventListener( + type: OpenFinApplicationEventType, + previouslyRegisteredListener: (event: ApplicationBaseEvent + | TrayIconClickedEvent + | WindowEvent + | WindowAlertRequestedEvent + | WindowAuthRequested + | WindowNavigationRejectedEvent + | WindowEndLoadEvent) => any, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + /** + * Removes the application's icon from the tray. + */ + removeTrayIcon(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Restarts the application. + */ + restart(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Runs the application. When the application is created, run must be called. + */ + run(callback?: (successObj: SuccessObj) => void, errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): void; + /** + * Tells the rvm to relaunch the main application once upon a complete shutdown + */ + scheduleRestart(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Sets new shortcut configuration for current application. + * Application has to be launched with a manifest and has to have shortcut configuration (icon url, name, etc.) in its manifest to + * be able to change shortcut states. + */ + setShortcuts(config: ShortCutConfig, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Adds a customizable icon in the system tray and notifies the application when clicked. + */ + setTrayIcon(iconUrl: string, listener: (clickInfo: TrayIconClickedEvent) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Closes the application by terminating its process. + */ + terminate(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Waits for a hanging application. This method can be called in response to an application "not-responding" to allow the application + * to continue and to generate another "not-responding" message after a certain period of time. + */ + wait(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * The Application's uuid + */ + uuid: string; + } + + interface ShortCutConfig { + /** + * application has a shortcut on the desktop + */ + desktop?: boolean; + /** + * application has no shortcut in the start menu + */ + startMenu?: boolean; + /** + * application will be launched on system startup + */ + systemStartup?: boolean; + } + + interface SuccessObj { + httpResponseCode: number; + } + + interface NetworkErrorInfo extends ErrorInfo { + networkErrorCode: number; + } + + interface ErrorInfo { + stack: string; + message: string; + } + + interface ApplicationOptions { + /** + * The name of the application. + */ + name?: string; + /** + * The url to the application. + */ + url?: string; + /** + * The UUID of the application, unique within the set of all other applications running in the OpenFin Runtime. name and uuid must match. + */ + uuid?: string; + /** + * Enable Flash at the application level. Default: false. + */ + plugins?: boolean; + /** + * The options of the main window of the application. + */ + mainWindowOptions?: WindowOptions; + } + + interface WindowOptions { + /** + * Enable keyboard shortcuts for devtools and zoom. Default: false for both. + */ + accelerator?: { + devtools?: boolean, + zoom?: boolean, + reload?: boolean, + reloadIgnoreCache?: boolean, + }; + /** + * A flag to always position the window at the top of the window stack. Default: false. + * Updatable + */ + alwaysOnTop?: boolean; + /** + * A flag to automatically show the Window when it is created. Default: false. + */ + autoShow?: boolean; + /** + * A flag to show the context menu when right-clicking on a window. Gives access to the Developer Console for the Window. Default: true + * Updatable + */ + contextMenu?: boolean; + /** + * This defines and applies rounded corners for a frameless window. Default for both width and height: 0. + * Updatable + */ + cornerRounding?: { + width?: number; + height?: number; + }; + /** + * A field that the user can attach serializable data to to be ferried around with the window options. Default: ''. + */ + customData?: any; + /** + * Specifies that the window will be positioned in the center of the primary monitor when loaded for the first time on a machine. + * When the window corresponding to that id is loaded again, the position from before the window was closed is used. + * This option overrides defaultLeft and defaultTop. Default: false. + */ + defaultCentered?: boolean; + /** + * The default height of the window. Specifies the height of the window when loaded for the first time on a machine. + * When the window corresponding to that id is loaded again, the height is taken to be the last height of the window before it was closed. Default: 500. + */ + defaultHeight?: number; + /** + * The default left position of the window. Specifies the position of the left of the window when loaded for the first time on a machine. + * When the window corresponding to that id is loaded again, the value of left is taken to be the last value before the window was closed. Default: 100. + */ + defaultWidth?: number; + /** + * The default top position of the window. Specifies the position of the top of the window when loaded for the first time on a machine. + * When the window corresponding to that id is loaded again, the value of top is taken to be the last value before the window was closed. Default: 100. + */ + defaultTop?: number; + /** + * The default width of the window. Specifies the width of the window when loaded for the first time on a machine. + * When the window corresponding to that id is loaded again, the width is taken to be the last width of the window before it was closed. Default: 800. + */ + defaultLeft?: number; + /** + * A flag to show the frame. Default: true. + * Updatable + */ + frame?: boolean; + /** + * A flag to allow a window to be hidden when the close button is clicked.Default: false. + * Updatable + */ + hideOnClose?: boolean; + /** + * A URL for the icon to be shown in the window title bar and the taskbar.Default: The parent application's applicationIcon. + * Updatable + */ + icon?: string; + /** + * The maximum height of a window.Will default to the OS defined value if set to - 1. Default: -1. + * Updatable + */ + maxHeight?: number; + /** + * A flag that lets the window be maximized.Default: true. + * Updatable + */ + maximizable?: boolean; + /** + * The maximum width of a window.Will default to the OS defined value if set to - 1. Default: -1. + * Updatable + */ + maxWidth?: number; + /** + * The minimum height of a window.Default: 0. + * Updatable + */ + minHeight?: number; + /** + * A flag that lets the window be minimized.Default: true. + */ + minimizable?: boolean; + /** + * The minimum width of a window.Default: 0. + */ + minWidth?: number; + /** + * The name for the window which must be unique within the context of the invoking Application. + */ + name?: string; + /** + * A flag that specifies how transparent the window will be.This value is clamped between 0.0 and 1.0.Default: 1.0. + * Updatable + */ + opacity?: number; + /** + * A flag to drop to allow the user to resize the window.Default: true. + * Updatable + */ + resizable?: boolean; + /** + * Defines a region in pixels that will respond to user mouse interaction for resizing a frameless window. + * Updatable + */ + resizeRegion?: { + /** + * The size in pixels (Default: 2), + */ + size?: number; + /** + * The size in pixels of an additional + * square resizable region located at the + * bottom right corner of a + * frameless window. (Default: 4) + */ + bottomRightCorner?: number; + }; + /** + * A flag to show the Window's icon in the taskbar. Default: true. + */ + showTaskbarIcon?: boolean; + /** + * A flag to cache the location of the window or not. Default: true. + */ + saveWindowState?: boolean; + /** + * Specify a taskbar group for the window. Default: app's uuid. + */ + taskbarIconGroup?: string; + /** + * A string that sets the window to be "minimized", "maximized", or "normal" on creation. Default: "normal". + */ + state?: string; + /** + * The URL of the window. Default: "about:blank". + */ + url?: string; + /** + * When set to false, the window will render before the "load" event is fired on the content's window. + * Caution, when false you will see an initial empty white window. Default: true. + */ + waitForPageLoad?: boolean; + } + + /** + * Clipboard + * Clipboard API allows reading and writting to the clipboard in multiple formats. + */ + interface OpenFinClipboard { + /** + * Reads available formats for the clipboard type + */ + availableFormats(type: string | null, callback?: (formats: string[]) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Reads available formats for the clipboard type + */ + readHtml(type: string | null, callback?: (html: string) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Read the content of the clipboard as Rtf + */ + readRtf(type: string | null, callback?: (rtf: string) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Read the content of the clipboard as plain text + */ + readText(type: string | null, callback?: (text: string) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Writes data into the clipboard + */ + write(data: any, type: string | null, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Writes data into the clipboard as Html + */ + writeHtml(data: string, type: string | null, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Writes data into the clipboard as Rtf + */ + writeRtf(data: string, type: string | null, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Writes data into the clipboard as plain text + */ + writeText(data: string, type: string | null, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + } + + interface OpenFinExternalApplicationStatic { + /** + * Returns an External Application object that represents an existing external application. + */ + wrap(uuid: string): OpenFinExternalApplication; + } + /** + * ExternalApplication + * An object representing an application. Allows the developer to create, execute, show and close an application, as well as listen to application events. + */ + interface OpenFinExternalApplication { + /** + * Registers an event listener on the specified event. + */ + addEventListener( + type: OpenFinExternalApplicationEventType, + listener: () => void, + callback?: () => void, + errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Removes a previously registered event listener from the specified event. + */ + removeEventListener( + type: OpenFinExternalApplicationEventType, + listener: () => void, + callback?: () => void, + errorCallback?: (reason: string, error: ErrorInfo) => void): void; + } + + /** + * InterApplicationBus + * A messaging bus that allows for pub/sub messaging between different applications. + */ + interface OpenFinInterApplicationBus { + /** + * Adds a listener that gets called when applications subscribe to the current application's messages. + */ + addSubscribeListener(listener: (uuid: string, topic: string, name: string) => void): void; + /** + * Adds a listener that gets called when applications unsubscribe to the current application's messages. + */ + addUnsubscribeListener(listener: (uuid: string, topic: string, name: string) => void): void; + /** + * Removes a previously registered subscribe listener. + */ + removeSubscribeListener(listener: (uuid: string, topic: string, name: string) => void): void; + /** + * Removes a previously registered unsubscribe listener. + */ + removeUnsubscribeListener(listener: (uuid: string, topic: string, name: string) => void): void; + /** + * Publishes a message to all applications running on OpenFin Runtime that are subscribed to the specified topic. + */ + publish(topic: string, message: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Sends a message to a specific application on a specific topic. + */ + send(destinationUuid: string, name: string, topic: string, message: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + send(destinationUuid: string, topic: string, message: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Subscribes to messages from the specified application on the specified topic. If the subscription is for a uuid, [name], + * topic combination that has already been published to upon subscription you will receive the last 20 missed messages in the order they were published. + */ + subscribe( + senderUuid: string, + name: string, + topic: string, + listener: (message: any, uuid: string, name: string) => void, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + subscribe( + senderUuid: string, + topic: string, + listener: (message: any, uuid: string, name: string) => void, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + /** + * Unsubscribes to messages from the specified application on the specified topic. + */ + unsubscribe( + senderUuid: string, + name: string, + topic: string, + listener: (message: any, uuid: string, name: string) => void, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + unsubscribe( + senderUuid: string, + topic: string, + listener: (message: any, uuid: string, name: string) => void, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + } + + interface OpenFinNotificationStatic { + /** + * ctor + */ + new (options: NotificationOptions, callback?: () => void, errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): OpenFinNotification; + /** + * Gets an instance of the current notification. For use within a notification window to close the window or send a message back to its parent application. + */ + getCurrent(): OpenFinNotification; + } + + /** + * Notification + * Notification represents a window on OpenFin Runtime which is shown briefly to the user on the bottom-right corner of the primary monitor. + * A notification is typically used to alert the user of some important event which requires his or her attention. + * Notifications are a child or your application that are controlled by the runtime. + */ + interface OpenFinNotification { + /** + * Closes the notification. + */ + close(callback?: () => void): void; + /** + * Sends a message to the notification. + */ + sendMessage(message: any, callback?: () => void): void; + /** + * Sends a message from the notification to the application that created the notification. The message is handled by the notification's onMessage callback. + */ + sendMessageToApplication(message: any, callback?: () => void): void; + } + + interface NotificationOptions { + /** + * A boolean that will force dismissal even if the mouse is hovering over the notification + */ + ignoreMouseOver?: boolean; + /** + * A message of any primitive or composite-primitive type to be passed to the notification upon creation. + */ + message?: any; + /** + * The timeout for displaying a notification.Can be in milliseconds or "never". + */ + duration?: number | "never"; + /** + * The url of the notification + */ + url?: string; + /** + * A function that is called when a notification is clicked. + */ + onClick?(callback: () => void): void; + /** + * Invoked when the notification is closed via .close() method on the created notification instance + * or the by the notification itself via fin.desktop.Notification.getCurrent().close(). + * NOTE: this is not invoked when the notification is dismissed via a swipe. For the swipe dismissal callback see onDismiss + */ + onClose?(callback: () => void): void; + /** + * Invoked when a the notification is dismissed by swiping it off the screen to the right. NOTE: this is no fired on a programmatic close. + */ + onDismiss?(callback: () => void): void; + /** + * A function that is called when an error occurs.The reason for the error is passed as an argument. + */ + onError?(errorCallback: (reason: string, errorObj: NetworkErrorInfo) => void): void; + /** + * The onMessage function will respond to messages sent from notification.sendMessageToApplication. + * The function is passed the message, which can be of any primitive or composite-primitive type. + */ + onMessage?(callback: (message: any) => void): void; + /** + * A function that is called when a notification is shown. + */ + onShow?(callback: (successObj: SuccessObj) => void): void; + } + + /** + * System + * An object representing the core of OpenFin Runtime. + * Allows the developer to perform system-level actions, such as accessing logs, viewing processes, clearing the cache and exiting the runtime. + */ + interface OpenFinSystem { + Clipboard: OpenFinClipboard; + /** + * Registers an event listener on the specified event. + */ + addEventListener( + type: OpenFinSystemEventType, + listener: (event: SystemBaseEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent) => void, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + /** + * Clears cached data containing window state/positions, + * application resource files (images, HTML, JavaScript files), cookies, and items stored in the Local Storage. + */ + clearCache(options: CacheOptions, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Clears all cached data when OpenFin Runtime exits. + */ + deleteCacheOnExit(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Downloads the given application asset + */ + downloadAsset( + assetObj: AppAssetInfo, + progressListener?: (progress: { downloadedBytes: number, totalBytes: number }) => void, + callback?: (successObj: { path: string }) => void, + errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): void; + /** + * Exits the Runtime. + */ + exit(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of data for all applications. + */ + getAllApplications(callback?: (applicationInfoList: ApplicationInfo[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of data for all external applications. + */ + getAllExternalApplications(callback?: (applicationInfoList: ApplicationInfo[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of data (name, ids, bounds) for all application windows. + */ + getAllWindows(callback?: (windowInfoList: WindowDetails[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the command line argument string that started OpenFin Runtime. + */ + getCommandLineArguments(callback?: (args: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the configuration object that started the OpenFin Runtime. + */ + getDeviceId(callback?: (uuid: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Gets the value of a given environment variable on the computer on which the runtime is installed. + */ + getEnvironmentVariable(envVar: string, callback?: (variable: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves system information. + */ + getHostSpecs(callback?: (info: HostSpecInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the contents of the log with the specified filename. + */ + getLog(logFileName: string, callback?: (variable: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array containing information for each log file. + */ + getLogList(callback?: (logInfoList: LogInfo[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an object that contains data about the about the monitor setup of the computer that the runtime is running on. + */ + getMonitorInfo(callback?: (monitorInfo: MonitorInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Returns the mouse in virtual screen coordinates (left, top). + */ + getMousePosition(callback?: (mousePosition: VirtualScreenCoordinates) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of all of the runtime processes that are currently running. + * Each element in the array is an object containing the uuid and the name of the application to which the process belongs. + */ + getProcessList(callback?: (processInfoList: ProcessInfo[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the Proxy settings. + */ + getProxySettings(callback?: (proxy: ProxyInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Returns information about the running RVM in an object. + */ + getRvmInfo(callback?: (rvmInfo: RvmInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Returns the version of the runtime. The version contains the major, minor, build and revision numbers. + */ + getVersion(callback?: (version: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Runs an executable or batch file. + */ + launchExternalProcess(options: ExternalProcessLaunchInfo, callback?: (payload: { uuid: string }) => void, errorCallback?: (reason: string) => void): void; + /** + * Writes the passed message into both the log file and the console. + */ + log(level: "debug" | "info" | "warn" | "error", message: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Monitors a running process. + */ + monitorExternalProcess(options: ExternalProcessInfo, callback?: (payload: { uuid: string }) => void, errorCallback?: (reason: string) => void): void; + /** + * Opens the passed URL in the default web browser. + */ + openUrlWithBrowser(url: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * This function call will register a unique id and produce a token. The token can be used to broker an external connection. + */ + registerExternalConnection( + uuid: string, + callback?: (detail: { + /** + * this will be unique each time + */ + token: string; + /** + * "remote-connection-uuid" + */ + uuid: string; + }) => void, + errorCallback?: (reason: string) => void): void; + /** + * Removes the process entry for the passed UUID obtained from a prior call of fin.desktop.System.launchExternalProcess(). + */ + releaseExternalProcess(processUuid: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Removes a previously registered event listener from the specified event. + */ + removeEventListener( + type: OpenFinSystemEventType, + listener: (event: SystemBaseEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent) => void, + callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Shows the Chrome Developer Tools for the specified window. + */ + showDeveloperTools(uuid: string, name: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Attempt to close an external process. The process will be terminated if it has not closed after the elapsed timeout in milliseconds. + */ + terminateExternalProcess( + processUuid: string, + timeout: number, + killTree: boolean, + callback?: (info: { result: "clean" | "terminated" | "failed" }) => void, + errorCallback?: (reason: string) => void): void; + terminateExternalProcess( + processUuid: string, + timeout: number, + callback?: (info: { result: "clean" | "terminated" | "failed" }) => void, + errorCallback?: (reason: string) => void): void; + /** + * Update the OpenFin Runtime Proxy settings. + */ + updateProxySettings(type: string, address: string, port: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + } + + interface CacheOptions { + cache?: boolean; + cookies?: boolean; + localStorage?: boolean; + appcache?: boolean; + userData?: boolean; + } + + interface AppAssetInfo { + src?: string; + alias?: string; + version?: string; + target?: string; + args?: string; + } + + interface ApplicationInfo { + /** + * true when the application is running. + */ + isRunning?: boolean; + /** + * uuid of the application. + */ + uuid?: string; + /** + * uuid of the application that launches this application. + */ + parentUuid?: string; + } + + interface WindowDetails { + uuid?: string; + mainWindow?: WindowInfo; + childWindows?: WindowInfo[]; + } + + interface WindowInfo { + /** + * name of the child window + */ + name?: string; + /** + * top-most coordinate of the child window + */ + top?: number; + /** + * right-most coordinate of the child window + */ + right?: number; + /** + * bottom-most coordinate of the child window + */ + bottom?: number; + /** + * left-most coordinate of the child window + */ + left?: number; + } + + interface HostSpecInfo { + /** + * "x86" for 32-bit or "x86_64" for 64-bit + */ + arch: string; + /** + * Same payload as Node's os.cpus() + */ + cpus: NodeCpuInfo[]; + gpu: { + /** + * Graphics card name + */ + name: string; + }; + /** + * Same payload as Node's os.totalmem() + */ + memory: number; + /** + * OS name and version/edition + */ + name: string; + } + + interface NodeCpuInfo { + model: string; + /** + * in MHz + */ + speed: number; + times: { + /** + * The number of milliseconds the CPU has spent in user mode. + */ + user: number; + /** + * The number of milliseconds the CPU has spent in nice mode. + */ + nice: number; + /** + * The number of milliseconds the CPU has spent in sys mode. + */ + sys: number; + /** + * The number of milliseconds the CPU has spent in idle mode. + */ + idle: number; + /** + * The number of milliseconds the CPU has spent in irq mode. + */ + irq: number; + }; + } + + interface LogInfo { + /** + * the filename of the log + */ + name?: string; + /** + * the size of the log in bytes + */ + size?: number; + /** + * the unix time at which the log was created "Thu Jan 08 2015 14:40:30 GMT-0500 (Eastern Standard Time)" + */ + date?: string; + } + + interface ProcessInfo { + /** + * the percentage of total CPU usage + */ + cpuUsage?: number; + /** + * the application name + */ + name?: string; + /** + * the current nonpaged pool usage in bytes + */ + nonPagedPoolUsage?: number; + /** + * the number of page faults + */ + pageFaultCount?: number; + /** + * the current paged pool usage in bytes + */ + pagedPoolUsage?: number; + /** + * the total amount of memory in bytes that the memory manager has committed + */ + pagefileUsage?: number; + /** + * the peak nonpaged pool usage in bytes + */ + peakNonPagedPoolUsage?: number; + /** + * the peak paged pool usage in bytes + */ + peakPagedPoolUsage?: number; + /** + * the peak value in bytes of pagefileUsage during the lifetime of this process + */ + peakPagefileUsage?: number; + /** + * the peak working set size in bytes + */ + peakWorkingSetSize?: number; + /** + * the native process identifier + */ + processId?: number; + /** + * the application UUID + */ + uuid?: string; + /** + * the current working set size (both shared and private data) in bytes + */ + workingSetSize?: number; + } + + interface ProxyInfo { + /** + * the configured Proxy Address + */ + proxyAddress?: string; + /** + * the configured Proxy port + */ + proxyPort?: number; + /** + * Proxy Type + */ + type?: string; + } + + interface RvmInfo { + version?: string; + "start-time"?: string; + } + + interface ExternalProcessLaunchInfo { + path?: string; + /** + * Additionally note that the executable found in the zip file specified in appAssets + * will default to the one mentioned by appAssets.target + * If the the path below refers to a specific path it will override this default + */ + alias?: string; + /** + * When using alias; if no arguments are passed then the arguments (if any) + * are taken from the 'app.json' file, from the 'args' parameter + * of the 'appAssets' Object with the relevant 'alias'. + * If 'arguments' is passed as a parameter it takes precedence + * over any 'args' set in the 'app.json'. + */ + arguments?: string; + listener?(result: { + /** + * "Exited" Or "released" on a call to releaseExternalProcess + */ + topic?: string; + /** + * The mapped UUID which identifies the launched process + */ + uuid?: string; + /* + * Process exit code + */ + exitCode?: number; + }): void; + certificate?: CertificationInfo; + } + + interface CertificationInfo { + /** + * A hex string with or without spaces + */ + serial?: string; + /** + * An internally tokenized and comma delimited string allowing partial or full checks of the subject fields + */ + subject?: string; + /** + * A hex string with or without spaces + */ + publickey?: string; + /** + * A hex string with or without spaces + */ + thumbprint?: string; + /** + * A boolean indicating that the certificate is trusted and not revoked + */ + trusted?: boolean; + } + + interface ExternalProcessInfo { + pid?: number; + listener?(result: { + /** + * "Exited" Or "released" on a call to releaseExternalProcess + */ + topic?: string; + /** + * The mapped UUID which identifies the launched process + */ + uuid?: string; + /* + * Process exit code + */ + exitCode?: number; + }): void; + } + + interface OpenFinWindowStatic { + /** + * Class: Window + * + * new Window(options, callbackopt, errorCallbackopt) + * + * Creates a new OpenFin Window + * + * A basic window that wraps a native HTML window. Provides more fine-grained control over the window state such as the ability to minimize, + * maximize, restore, etc. By default a window does not show upon instantiation; instead the window's show() method must be invoked manually. + * The new window appears in the same process as the parent window. + * @param options - The options of the window + * @param [callback] - Called if the window creation was successful + * @param [callback.successObj] - httpResponseCode + */ + new ( + options: WindowOptions, + callback?: (successObj: { httpResponseCode: number }) => void, + errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): OpenFinWindow; + /** + * Returns an instance of the current window. + * @returns Current window + */ + getCurrent(): OpenFinWindow; + /** + * Returns a Window object that wraps an existing window. + */ + wrap(appUuid: string, windowName: string): OpenFinWindow; + } + + /** + * Window + * A basic window that wraps a native HTML window. Provides more fine-grained control over the window state such as the ability to minimize, + * maximize, restore, etc. By default a window does not show upon instantiation; instead the window's show() method must be invoked manually. + * The new window appears in the same process as the parent window. + */ + interface OpenFinWindow { + /** + * Name of window + */ + name: string; + /** + * Returns the native JavaScript "window" object for the window. This method can only be used by the parent application or the window itself, + * otherwise it will return undefined. The same Single-Origin-Policy (SOP) rules apply for child windows created by window.open(url) in that the + * contents of the window object are only accessible if the URL has the same origin as the invoking window. See example below. + * Also, will not work with fin.desktop.Window objects created with fin.desktop.Window.wrap(). + * @returns Native window + */ + getNativeWindow(): Window; + /** + * Gets the parent application. + * @returns Parent application + */ + getParentApplication(): OpenFinApplication; + /** + * Gets the parent window. + */ + getParentWindow(): OpenFinWindow; + /** + * Registers an event listener on the specified event. + */ + addEventListener( + type: OpenFinWindowEventType, + listener: (event: WindowBaseEvent + | WindowAuthRequestedEvent + | WindowBoundsEvent + | WindowExternalProcessStartedEvent + | WindowExternalProcessExited + | WindowGroupChangedEvent + | WindowHiddenEvent + | Window_NavigationRejectedEvent) => void, + callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Performs the specified window transitions + */ + animate(transitions: AnimationTransition, options: AnimationOptions, callback?: (event: any) => void, errorCallback?: (reason: string) => void): void; + /** + * Provides credentials to authentication requests + */ + authenticate(userName: string, password: string, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Removes focus from the window. + */ + blur(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Brings the window to the front of the OpenFin window stack. + */ + bringToFront(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Closes the window. + * @param Close will be prevented from closing when force is false and 'close-requested' has been subscribed to for application's main window. + */ + close(force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Prevents a user from changing a window's size/position when using the window's frame. + * 'disabled-frame-bounds-changing' is generated at the start of and during a user move/size operation. + * 'disabled-frame-bounds-changed' is generated after a user move/size operation. + * The events provide the bounds that would have been applied if the frame was enabled. + * 'frame-disabled' is generated when an enabled frame becomes disabled. + */ + disableFrame(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Re-enables user changes to a window's size/position when using the window's frame. + * 'disabled-frame-bounds-changing' is generated at the start of and during a user move/size operation. + * 'disabled-frame-bounds-changed' is generated after a user move/size operation. + * The events provide the bounds that would have been applied if the frame was enabled. + * 'frame-enabled' is generated when a disabled frame has becomes enabled. + */ + enableFrame(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Flashes the window's frame and taskbar icon until the window is activated. + */ + flash(options?: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Gives focus to the window. + */ + focus(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Gets the current bounds (top, left, width, height) of the window. + */ + getBounds(callback?: (bounds: WindowBounds) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array containing wrapped fin.desktop.Windows that are grouped with this window. If a window is not in a group an empty array is returned. + * Please note that calling window is included in the result array. + */ + getGroup(callback?: (group: OpenFinWindow[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Gets the current settings of the window. + */ + getOptions(callback?: (options: WindowOptions) => void, errorCallback?: (reason: string) => void): void; + /** + * Gets a base64 encoded PNG snapshot of the window. + */ + getSnapshot(callback?: (base64Snapshot: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Gets the current state ("minimized", "maximized", or "restored") of the window. + */ + getState(callback?: (state: "minimized" | "maximized" | "restored") => void, errorCallback?: (reason: string) => void): void; + /** + * Returns the zoom level of the window. + */ + getZoomLevel(callback?: (level: number) => void, errorCallback?: (reason: string) => void): void; + /** + * Hides the window. + */ + hide(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Determines if the window is currently showing. + */ + isShowing(callback?: (showing: boolean) => void, errorCallback?: (reason: string) => void): void; + /** + * Joins the same window group as the specified window. + */ + joinGroup(target: OpenFinWindow, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Leaves the current window group so that the window can be move independently of those in the group. + */ + leaveGroup(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Maximizes the window. + */ + maximize(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Merges the instance's window group with the same window group as the specified window + */ + mergeGroups(target: OpenFinWindow, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Minimizes the window. + */ + minimize(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Moves the window by a specified amount. + */ + moveBy(deltaLeft: number, deltaTop: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Moves the window to a specified location. + */ + moveTo(left: number, top: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Removes a previously registered event listener from the specified event. + */ + removeEventListener( + type: OpenFinWindowEventType, + listener: (event: WindowBaseEvent + | WindowAuthRequestedEvent + | WindowBoundsEvent + | WindowExternalProcessStartedEvent + | WindowExternalProcessExited + | WindowGroupChangedEvent + | WindowHiddenEvent + | Window_NavigationRejectedEvent) => void, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + /** + * Resizes the window by a specified amount. + */ + resizeBy(deltaWidth: number, deltaHeight: number, anchor: OpenFinAnchor, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Resizes the window by a specified amount. + */ + resizeTo(width: number, height: number, anchor: OpenFinAnchor, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Restores the window to its normal state (i.e., unminimized, unmaximized). + */ + restore(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Will bring the window to the front of the entire stack and give it focus. + */ + setAsForeground(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Sets the window's size and position + */ + setBounds(left: number, top: number, width: number, height: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Sets the zoom level of the window. + */ + setZoomLevel(level: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Shows the window if it is hidden. + * @param Show will be prevented from closing when force is false and 'show-requested' has been subscribed to for application's main window. + */ + show(force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Shows the window if it is hidden at the specified location. If the toggle parameter is set to true, the window will alternate between showing and hiding. + */ + showAt(left: number, top: number, force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Stops the taskbar icon from flashing. + */ + stopFlashing(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Updates the window using the passed options + */ + updateOptions(options: WindowOptions, callback?: () => void, errorCallback?: (reason: string) => void): void; + } + + interface ApplicationBaseEvent { + topic: string; + type: OpenFinApplicationEventType; + uuid: string; + } + + interface TrayIconClickedEvent extends ApplicationBaseEvent { + button: number; // 0 for left, 1 for middle, 2 for right + monitorInfo: MonitorInfo; + x: number; // the cursor x coordinate + y: number; // the cursor y coordinate + } + + interface WindowEvent extends ApplicationBaseEvent { + name: string; + } + + interface WindowAlertRequestedEvent extends WindowEvent { + message: string; + url: string; + } + + interface WindowAuthRequested extends WindowEvent { + authInfo: { + host: string; + isProxy: boolean; + port: number; + realm: string; + scheme: string; + }; + } + + interface WindowNavigationRejectedEvent extends WindowEvent { + sourceName: string; + url: string; + } + + interface WindowEndLoadEvent extends WindowEvent { + documentName: string; + isMain: boolean; + } + + interface MonitorInfoChangedEvent extends MonitorInfo { + topic: "system"; + type: "monitor-info-changed"; + } + + interface MonitorInfo { + nonPrimaryMonitors: MonitorInfoDetail[]; + primaryMonitor: MonitorInfoDetail; + reason: string; + taskbar: { + edge: "left" | "right" | "top" | "bottom", + rect: MontiorCoordinates + }; + topic: "system"; + type: "monitor-info-changed"; + virtualScreen: MontiorCoordinates; + } + + interface TrayIconInfo { + x: number; + y: number; + bounds: { + x: number; + y: number; + width: number; + height: number; + } + monitorInfo: MonitorInfo + } + + interface MonitorInfoDetail { + availableRect: MontiorCoordinates; + deviceId: string; + displayDeviceActive: boolean; + monitorRect: MontiorCoordinates; + name: string; + } + + interface MontiorCoordinates { + bottom: number; + left: number; + right: number; + top: number; + } + + interface VirtualScreenCoordinates { + left: number; + top: number; + } + + interface SystemBaseEvent { + topic: string; + type: OpenFinSystemEventType; + uuid: string; + } + + interface DesktopIconClickedEvent { + mouse: { + /** + * the left virtual screen coordinate of the mouse + */ + left: number, + /** + * the top virtual screen coordinate of the mouse + */ + top: number + }; + /** + * the number of milliseconds that have elapsed since the system was started, + */ + tickCount: number; + topic: "system"; + type: "desktop-icon-clicked"; + } + + interface IdleStateChangedEvent { + /** + * How long in milliseconds since the user has been idle. + */ + elapsedTime: number; + /** + * true when the user is idle,false when the user has returned; + */ + isIdle: boolean; + topic: "system"; + type: "idle-state-changed"; + } + + interface WindowBaseEvent { + /** + * the name of the window + */ + name: string; + /** + * always window + */ + topic: "window"; + /** + * window event type + */ + type: OpenFinWindowEventType; + /** + * the UUID of the application the window belongs to + */ + uuid: string; + } + + interface WindowAuthRequestedEvent extends WindowBaseEvent { + authInfo: { + host: string; + isProxy: boolean; + port: number; + realm: string; + scheme: string; + }; + } + + interface WindowBoundsEvent extends WindowBaseEvent { + /** + * describes what kind of change occurred. + * 0 means a change in position. + * 1 means a change in size. + * 2 means a change in position and size. + */ + changeType: number; + /** + * true when pending changes have been applied to the window. + */ + deferred: boolean; + /** + * the new height of the window. + */ + height: number; + /** + * the left-most coordinate of the window. + */ + left: number; + /** + * the top-most coordinate of the window. + */ + top: number; + + type: "bounds-changed" | "bounds-changing" | "disabled-frame-bounds-changed" | "disabled-frame-bounds-changing"; + /** + * the new width of the window. + */ + width: number; + } + + interface WindowExternalProcessStartedEvent extends WindowBaseEvent { + /** + * the process handle uuid + */ + processUuid: string; + type: "external-process-started"; + } + + interface WindowExternalProcessExited extends WindowBaseEvent { + /** + * the process exit code + */ + exitCode: number; + /** + * the process handle uuid + */ + processUuid: string; + type: "external-process-exited"; + } + + interface WindowGroupChangedEvent extends WindowBaseEvent { + /** + * Which group array the window that the event listener was registered on is included in: + * 'source' The window is included in sourceGroup. + * 'target' The window is included in targetGroup. + * 'nothing' The window is not included in sourceGroup nor targetGroup. + */ + memberOf: "source" | "target" | "nothing"; + /** + * The reason this event was triggered. + * 'leave' A window has left the group due to a leave or merge with group. + * 'join' A window has joined the group. + * 'merge' Two groups have been merged together. + * 'disband' There are no other windows in the group. + */ + reason: "leave" | "join" | "merge" | "disband"; + /** + * All the windows in the group the sourceWindow originated from. + */ + sourceGroup: WindowOfGroupInfo[]; + /** + * The UUID of the application the sourceWindow belongs to The source window is the window in which (merge/join/leave)group(s) was called. + */ + sourceWindowAppUuid: string; + /** + * the name of the sourcewindow.The source window is the window in which(merge / join / leave) group(s) was called. + */ + sourceWindowName: string; + /** + * All the windows in the group the targetWindow orginated from + */ + targetGroup: WindowOfGroupInfo[]; + /** + * The UUID of the application the targetWindow belongs to. The target window is the window that was passed into (merge/join) group(s). + */ + targetWindowAppUuid: string; + /** + * The name of the targetWindow. The target window is the window that was passed into (merge/join) group(s). + */ + targetWindowName: string; + type: "group-changed"; + } + + interface WindowOfGroupInfo { + /** + * The UUID of the application this window entry belongs to. + */ + appUuid: string; + /** + * The name of this window entry. + */ + windowName: string; + } + + interface WindowHiddenEvent extends WindowBaseEvent { + /** + * What action prompted the close. + * The reasons are: "hide", "hide-on-close" + */ + reason: "hide" | "hide-on-close"; + type: "hidden"; + } + + interface Window_NavigationRejectedEvent { + name: string; + /** + * source of navigation window name + */ + sourceName: string; + topic: "navigation-rejected"; + /** + * Url that was not reached "http://blocked-content.url" + */ + url: string; + /** + * the UUID of the application the window belongs to. + */ + uuid: string; + } + + interface AnimationTransition { + opacity?: { + /** + * This value is clamped from 0.0 to 1.0 + */ + opacity?: number; + /** + * The total time in milliseconds this transition should take. + */ + duration?: number; + /** + * Treat 'opacity' as absolute or as a delta. Defaults to false. + */ + relative?: boolean; + }; + position?: { + /** + * Defaults to the window's current left position in virtual screen coordinates. + */ + left?: number; + /** + * Defaults to the window's current top position in virtual screen coordinates. + */ + top?: number; + /** + * The total time in milliseconds this transition should take. + */ + duration?: number; + /** + * Treat 'left' and 'top' as absolute or as deltas. Defaults to false. + */ + relative?: boolean; + }; + size?: { + /** + * Optional if height is present. Defaults to the window's current width. + */ + width?: number; + /** + * Optional if width is present. Defaults to the window's current height. + */ + height?: number; + /** + * The total time in milliseconds this transition should take. + */ + duration?: number; + /** + * Treat 'width' and 'height' as absolute or as deltas. Defaults to false. + */ + relative?: boolean; + }; + } + + interface AnimationOptions { + /** + * This option interrupts the current animation. When false it pushes this animation onto the end of the animation queue. + */ + interrupt?: boolean; + /** + * Transition effect. Defaults to 'ease-in-out'. + */ + tween?: OpenFinTweenType; + } + + interface WindowBounds { + /** + * the height of the window. + */ + height?: number; + /** + * left-most coordinate of the window. + */ + left?: number; + /** + * top-most coordinate of the window. + */ + top?: number; + /** + * the width of the window. + */ + width?: number; + } + + interface SessionChangedEvent { + /** + * the action that triggered this event: + */ + reason: "lock" + | "unlock" + | "remote-connect" + | "remote-disconnect" + | "unknown"; + topic: "system"; + type: "session-changed"; + } + + interface LaunchInfo { + launchMode: "fin-protocol" + | "fins-protocol" + | "shortcut" + | "command-line" + | "adapter" + | "other" + | string; + } + + type OpenFinTweenType = "linear" + | "ease-in" + | "ease-out" + | "ease-in-out" + | "ease-in-quad" + | "ease-out-quad" + | "ease-in-out-quad" + | "ease-in-cubic" + | "ease-out-cubic" + | "ease-in-out-cubic" + | "ease-out-bounce" + | "ease-in-back" + | "ease-out-back" + | "ease-in-out-back" + | "ease-in-elastic" + | "ease-out-elastic" + | "ease-in-out-elastic"; + + type OpenFinApplicationEventType = "closed" + | "connected" + | "crashed" + | "initialized" + | "manifest-changed" + | "not-responding" + | "out-of-memory" + | "responding" + | "run-requested" + | "started" + | "tray-icon-clicked" + | "window-alert-requested" + | "window-auth-requested" + | "window-closed" + | "window-created" + | "window-end-load" + | "window-navigation-rejected" + | "window-show-requested" + | "window-start-load"; + + type OpenFinExternalApplicationEventType = "connected" + | "disconnected"; + + type OpenFinSystemEventType = "application-closed" + | "application-crashed" + | "application-created" + | "application-started" + | "desktop-icon-clicked" + | "idle-state-changed" + | "monitor-info-changed" + | "session-changed"; + + type OpenFinWindowEventType = "auth-requested" + | "blurred" + | "bounds-changed" + | "bounds-changing" + | "close-requested" + | "closed" + | "disabled-frame-bounds-changed" + | "disabled-frame-bounds-changing" + | "embedded" + | "external-process-exited" + | "external-process-started" + | "focused" + | "frame-disabled" + | "frame-enabled" + | "group-changed" + | "hidden" + | "initialized" + | "maximized" + | "minimized" + | "navigation-rejected" + | "restored" + | "show-requested" + | "shown"; + + type OpenFinAnchor = "top-left" + | "top-right" + | "bottom-left" + | "bottom-right"; +} diff --git a/types/openfin/v30/openfin-tests.ts b/types/openfin/v30/openfin-tests.ts new file mode 100644 index 0000000000..ce49b14f5c --- /dev/null +++ b/types/openfin/v30/openfin-tests.ts @@ -0,0 +1,728 @@ +/// + +function test_application() { + let application: fin.OpenFinApplication; + // constructor + application = new fin.desktop.Application({ + url: "application.html", + uuid: "74BED629-2D8E-4141-8582-73E364BDFA74", + name: "Application Name", + plugins: false, + mainWindowOptions: { + defaultHeight: 600, + defaultWidth: 800, + defaultTop: 300, + defaultLeft: 300, + autoShow: true + } + }, (successObj) => { + console.log("Application successfully created, HTTP response code:", successObj); + application.run(); + }, (error) => { + console.log("Error creating application:", error); + }); + //createFromManifest + fin.desktop.Application.createFromManifest("http://stuf.com/app.json", (app) => { + console.log(app.uuid); + }, err => console.log(err)); + // getCurrent + application = fin.desktop.Application.getCurrent(); + // wrap + application = fin.desktop.Application.wrap("454C7F31-A915-4EA2-83F2-CFA655453C52"); + // getWindow + application.getWindow(); + // addEventListener + application.addEventListener("closed", (event) => { + console.log("The application has closed"); + }, () => { + console.log("The registration was successful"); + }, reason => { + console.log("failure: " + reason); + }); + // close + application.close(); + // getChildWindows + application.getChildWindows(children => { + children.forEach(childWindow => { + console.log("Showing child: " + childWindow.name); + childWindow.show(); + }); + }); + // getGroups + application.getGroups(allGroups => { + console.log(`There are a total of ${allGroups.length} groups.`); + + let groupCounter = 1; + allGroups.forEach(windowGroup => { + console.log(`Group ${groupCounter} contains ${windowGroup.length} windows.`); + ++groupCounter; + }); + }); + // getManifest + application.getManifest(manifest => { + console.log("Application manifest:"); + console.log(manifest); + }); + // getParentUuid + application.getParentUuid(parentUuid => { + console.log("UUID of parent application:"); + console.log(parentUuid); + }); + // getShortcuts + application.getShortcuts(config => { + console.log("Desktop shortcut is enabled: ", config.desktop); + console.log("Start Menu shortcut is enabled: ", config.startMenu); + console.log("System Startup shortcut is enabled: ", config.systemStartup); + }); + // getInfo + application.getInfo(info => { + console.log(`Launch mode: ${info.launchMode}`); + }); + // getTrayIconInfo + application.getTrayIconInfo(info => { + console.log(info.x, info.y, info.bounds.x, info.bounds.y, info.bounds.height, info.bounds.width, + info.monitorInfo.type, info.monitorInfo.reason); + }); + // isRunning + application.isRunning(running => { + console.log("the application is", running ? "running" : "not running"); + }); + // registerCustomData + application.registerUser("a", "b", () => console.log("done"), err => console.log(err)); + // removeEventListener + const previousCallback = (event: fin.WindowEvent) => { }; + application.removeEventListener("closed", previousCallback, () => { + console.log("The unregistration was successful"); + }, err => { + console.log("failure:", err); + }); + // removeTrayIcon + application.removeTrayIcon(() => { + console.log("Removed the tray icon."); + }, err => { + console.log("failure:", err); + }); + // restart + application.restart(() => { + console.log("You will not read this."); + }, err => { + console.log("failure:", err); + }); + // schedule restart + application.scheduleRestart(() => { + console.log("You will not read this."); + }, err => { + console.log("failure:", err); + }); + // setShortcuts + application.setShortcuts({ + desktop: true, + startMenu: false, + systemStartup: true + }, () => { + console.log("Successfully set new shortcut states"); + }, error => { + console.log("Failed to set new shortcut states. Error: ", error); + }); + // setTrayIcon + application.setTrayIcon("https://developer.openf.in/download/openfin.png", clickInfo => { + console.log(`The mouse has clicked at (${clickInfo.x}, ${clickInfo.y})`); + }); + // terminate + application.terminate(); + // wait + application.addEventListener("not-responding", () => { + console.log("waiting for hung application"); + application.wait(); + }); + //uuid + let hasUuid = application.uuid; +} + +function test_external_application() { + let externalApp: fin.OpenFinExternalApplication; + // wrap + externalApp = fin.desktop.ExternalApp.wrap('my-uuid'); + // addEventListener + externalApp.addEventListener('connected', () => { + console.log('external app connected'); + }, () => { + console.log('The registration was successful'); + }, (reason, err) => { + console.log(`Error Message: ${err.message} Error Stack: ${err.stack}`); + }); + // removeEventListener + const previousCallback = () => { }; + externalApp.removeEventListener('connected', previousCallback, () => { + console.log('The unregistration was successful'); + }, (reason, err) => { + console.log(`Error Message: ${err.message} Error Stack: ${err.stack}`); + }); +} + +function test_inter_application_bus() { + // addSubscribeListener + fin.desktop.InterApplicationBus.addSubscribeListener((uuid, topic, name) => { + console.log(`The application ${uuid} has subscribed to ${topic}`); + }); + // addUnsubscribeListener + fin.desktop.InterApplicationBus.addUnsubscribeListener((uuid, topic, name) => { + console.log(`The application ${uuid} has unsubscribed to ${topic}`); + }); + // removeSubscribeListener + const aRegisteredListener = (uuid: string, topic: string, name: string) => { }; + fin.desktop.InterApplicationBus.removeSubscribeListener(aRegisteredListener); + // removeUnsubscribeListener + fin.desktop.InterApplicationBus.removeUnsubscribeListener(aRegisteredListener); + // publish + fin.desktop.InterApplicationBus.publish("a topic", { + field1: "value1", + field2: "value2" + }); + // send + fin.desktop.InterApplicationBus.send("an application's uuid", "a topic", { + field1: "value1", + field2: "value2" + }); + // subscribe + fin.desktop.InterApplicationBus.subscribe("*", "a topic", (message, uuid, name) => { + console.log(`The application ${uuid} sent this message: ${message}`); + }); + // unsubscribe + const aRegisteredMessageListener = (message: any, senderUuid: string) => { + console.log(message, senderUuid); + }; + fin.desktop.InterApplicationBus.unsubscribe("*", "a topic", aRegisteredMessageListener); +} + +function test_notification() { + let notification: fin.OpenFinNotification; + // getCurrent + notification = fin.desktop.Notification.getCurrent(); + // close + notification.close(); + // sendMessage + notification = new fin.desktop.Notification({ + duration: 10, + url: "http://localhost:5000/Account/Register", + message: "Hello", + onShow: () => { }, + // onClose: () => { }, + onDismiss: () => { }, + // onClick: () => { }, + onMessage: () => { }, + onError: () => { } + }); + // sendMessageToApplication + notification.sendMessageToApplication("some message"); +} + +function test_system() { + // addEventListener + fin.desktop.System.addEventListener('monitor-info-changed', event => { + console.log("The monitor information has changed to: ", event); + }, () => { + console.log("The registration was successful"); + }, err => { + console.log("failure: " + err); + }); + // clearCache + fin.desktop.System.clearCache({ + cache: true, + cookies: true, + localStorage: true, + appcache: true, + userData: true + }); + // deleteCacheOnExit + fin.desktop.System.deleteCacheOnExit(() => { + console.log("successful"); + }, err => { + console.log("failure: " + err); + }); + // downloadAsset + const dirAppAsset = { + src: 'http://local:8000/dir.zip', + alias: 'dirApp', + version: '1.23.24', + target: 'dir.bat', + args: '' + }; + fin.desktop.System.downloadAsset(dirAppAsset, progress => { + const downloadedPercent = Math.floor((progress.downloadedBytes / progress.totalBytes) * 100); + console.log(`Downloaded ${downloadedPercent}%`); + }, p => { + console.log(`Downlod complete, can be found on ${p.path}`); + // lets launch our application asset. + // launchDirApp(); + }, (reason, err) => { + console.log(reason, err); + }); + // exit + fin.desktop.System.exit(() => { + console.log("successful"); + }, err => { + console.log("failure: " + err); + }); + // getAllApplications + fin.desktop.System.getAllApplications(applicationInfoList => { + applicationInfoList.forEach(applicationInfo => { + console.log("Showing information for application with uuid: " + + applicationInfo.uuid); + console.log("isRunning: ", applicationInfo.isRunning); + }); + }); + // getAllExternalApplications + fin.desktop.System.getAllExternalApplications(externalAppsInfoList => { + externalAppsInfoList.forEach(appInfo => { + console.log(`External app connected to the runtime with UUID ${appInfo.uuid}`); + }); + }); + // getAllWindows + fin.desktop.System.getAllWindows(windowInfoList => { + windowInfoList.forEach(windowInfo => { + console.log("Showing information for application with uuid: ", windowInfo.uuid); + console.log("Main window: ", windowInfo.mainWindow); + console.log("Child windows: ", windowInfo.childWindows); + }); + }); + // getCommandLineArguments + fin.desktop.System.getCommandLineArguments(args => { + console.log("The command line arguments are " + args); + }); + // getDeviceId + fin.desktop.System.getDeviceId(id => { + console.log("The id of the device is: " + id); + }); + // getEnvironmentVariable + fin.desktop.System.getEnvironmentVariable("APPDATA", variable => { + console.log("this is the APPDATA value", variable); + }); + // getHostSpecs + fin.desktop.System.getHostSpecs(info => { + console.log(info); + }, error => { + console.log('There was an error:', error); + }); + // getLog + fin.desktop.System.getLog('debug-2015-01-08-22-27-53.log', log => { + console.log(log); + }); + // getLogList + fin.desktop.System.getLogList(logList => { + logList.forEach(logInfo => { + console.log(`The filename of the log is ${logInfo.name}, the size is ${logInfo.size}, and the date of creation is ${logInfo.date}`); + }); + }); + // getMonitorInfo + fin.desktop.System.getMonitorInfo(monitorInfo => { + console.log("This object contains information about all monitors: ", monitorInfo); + }); + // getMousePosition + fin.desktop.System.getMousePosition(mousePosition => { + console.log(`The mouse is located at left: ${mousePosition.left}, top: ${mousePosition.top}`); + }); + // getProcessList + fin.desktop.System.getProcessList(list => { + list.forEach(process => { + console.log(`UUID: ${process.uuid}, Application Name: ${process.name}`); + }); + }); + // getProxySettings + fin.desktop.System.getProxySettings(proxy => { + console.log(proxy); + }); + // getRvmInfo + fin.desktop.System.getRvmInfo(rvmInfoObject => { + console.log("RVM version:", rvmInfoObject.version); + console.log("RVM has been running since:", rvmInfoObject["start-time"]); + }, err => { + console.log("Failed to get rvm info, error message:", err); + }); + // getVersion + fin.desktop.System.getVersion(version => { + console.log("The version is " + version); + }); + // launchExternalProcess + fin.desktop.System.launchExternalProcess({ + path: "notepad", + arguments: "", + listener(result) { + console.log('the exit code', result.exitCode); + } + }, payload => { + console.log('Success:', payload.uuid); + }, error => { + console.log('Error:', error); + }); + // + fin.desktop.System.launchExternalProcess({ + // Additionally note that the executable found in the zip file specified in appAssets + // will default to the one mentioned by appAssets.target + // If the the path below refers to a specific path it will override this default + alias: "myApp", + listener(result) { + console.log('the exit code', result.exitCode); + } + }, payload => { + console.log('Success:', payload.uuid); + }, error => { + console.log('Error:', error); + }); + // + fin.desktop.System.launchExternalProcess({ + alias: "myApp", + arguments: "e f g", + listener(result) { + console.log('the exit code', result.exitCode); + } + }, payload => { + console.log('Success:', payload.uuid); + }, error => { + console.log('Error:', error); + }); + // + fin.desktop.System.launchExternalProcess({ + path: "C:\Users\ExampleUser\AppData\Local\OpenFin\OpenFinRVM.exe", + arguments: "--version", + certificate: { + trusted: true, + subject: 'O=OpenFin INC., L=New York, S=NY, C=US', + thumbprint: '3c a5 28 19 83 05 fe 69 88 e6 8f 4b 3a af c5 c5 1b 07 80 5b' + }, + listener(result) { + console.log('the exit code', result.exitCode); + } + }, payload => { + console.log('Success:', payload.uuid); + }, error => { + console.log('Error:', error); + }); + // log + fin.desktop.System.log("info", "An example log message", () => { + console.log("message successfully logged"); + }, err => { + console.log(err); + }); + // monitorExternalProcess + fin.desktop.System.monitorExternalProcess({ + pid: 2508, + listener(result) { + console.log('the exit code', result.exitCode); + } + }, payload => { + console.log("The process is now being monitored: ", payload.uuid); + }, error => { + console.log("Error:", error); + }); + // openUrlWithBrowser + fin.desktop.System.openUrlWithBrowser("https://developer.openf.in/", () => { + console.log("successful"); + }, err => { + console.log("failure: " + err); + }); + // registerExternalConnection + fin.desktop.System.registerExternalConnection("remote-connection-uuid", (...args: any[]) => { + console.log(args); + }); + // releaseExternalProcess + fin.desktop.System.launchExternalProcess({ + path: "notepad", + arguments: "", + listener(result) { + console.log("The exit code", result.exitCode); + } + }, result => { + console.log("Result UUID is " + result.uuid); + + // release it. + fin.desktop.System.releaseExternalProcess(result.uuid, () => { + console.log("Process has been unmapped!"); + }, reason => { + console.log("failure: " + reason); + }); + }); + // removeEventListener + const aRegisteredListener = (event: fin.SystemBaseEvent) => { }; + fin.desktop.System.removeEventListener("monitor-info-changed", aRegisteredListener, () => { + console.log("successful"); + }, err => { + console.log("failure: " + err); + }); + // showDeveloperTools + fin.desktop.System.showDeveloperTools("uuid", "name", () => { + console.log("successful"); + }, err => { + console.log("failure: " + err); + }); + // terminateExternalProcess + fin.desktop.System.launchExternalProcess({ + // notepad is in the system's PATH + path: "notepad", + arguments: "", + listener(result) { + console.log("The exit code", result.exitCode); + } + }, result => { + console.log("Result UUID is " + result.uuid); + + // Attempt to close the process. Terminate after 4 seconds if it + // has not done so. + fin.desktop.System.terminateExternalProcess(result.uuid, 4000, info => { + console.log("Termination result " + info.result); + }, reason => { + console.log("failure: " + reason); + }); + }); + // updateProxySettings + fin.desktop.System.updateProxySettings("type", "proxyAddress", 8080, () => { + console.log('success'); + }, err => { + console.log(err); + }); +} + +function test_system_clipboard() { + // availableFormats + fin.desktop.System.Clipboard.availableFormats(null, formats => { + formats.forEach(format => console.log(`The format ${format} is available to read`)); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // readHtml + fin.desktop.System.Clipboard.readHtml(null, html => { + console.log(`This is the html from the clipboard: ${html}`); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // readRtf + fin.desktop.System.Clipboard.readRtf(null, rtf => { + console.log(`This is the rtf from the clipboard: ${rtf}`); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // readText + fin.desktop.System.Clipboard.readText(null, text => { + console.log(`This is the text from the clipboard: ${text}`); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // write + fin.desktop.System.Clipboard.write({ + text: 'Hello Text!', + html: '

Hello Html

', + rtf: 'Hello Rtf' + }, null, () => { + console.log('Success!!'); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // writeHtml + fin.desktop.System.Clipboard.writeHtml('

Hello World

', null, () => { + console.log('Success!!'); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // writeRtf + fin.desktop.System.Clipboard.writeRtf('Hello World!', null, () => { + console.log('Success!!'); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // writeText + fin.desktop.System.Clipboard.writeText('Hello World', null, () => { + console.log('Success!!'); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); +} + +function test_window() { + let finWindow: fin.OpenFinWindow; + // constructor + finWindow = new fin.desktop.Window({ + name: "childWindow", + url: "child.html", + defaultWidth: 320, + defaultHeight: 320, + defaultTop: 10, + defaultLeft: 300, + frame: false, + resizable: false, + state: "normal" + }, () => { + const _win = finWindow.getNativeWindow(); + _win.addEventListener("DOMContentLoaded", () => { finWindow.show(); }); + }, error => { + console.log("Error creating window:", error); + }); + // getCurrent + finWindow = fin.desktop.Window.getCurrent(); + // getNativeWindow + let nativeWindow: Window; + nativeWindow = finWindow.getNativeWindow(); + // getParentApplication + let parentApp: fin.OpenFinApplication; + parentApp = finWindow.getParentApplication(); + // getParentWindow + let parentFinWindow: fin.OpenFinWindow; + parentFinWindow = finWindow.getParentWindow(); + // wrap + finWindow = fin.desktop.Window.wrap("uuid", "name"); + // addEventListener + finWindow.addEventListener("bounds-changed", event => { + console.log("The window has been moved or resized"); + }, () => { + console.log("The registration was successful"); + }, reason => { + console.log("failure:" + reason); + }); + // animate + finWindow.animate({ + opacity: { + opacity: 0.15, + duration: 1000 + }, + position: { + left: 10, + top: 10, + duration: 3000 + } + }, { + interrupt: false + }, evt => { + // Callback will only fire after both "opacity" and "position" have finished animating. + }); + // authenticate + finWindow.addEventListener('auth-requested', evt => { + finWindow.authenticate('userName', 'P@assw0rd', () => { }, (reason, err) => { + console.log("failure:", err); + }); + }); + // blur + finWindow.blur(); + // bringToFront + finWindow.bringToFront(); + // close + finWindow.close(); + // disableFrame + finWindow.disableFrame(); + // enableFrame + finWindow.enableFrame(); + // flash + finWindow.flash(); + // focus + finWindow.focus(); + // getBounds + finWindow.getBounds(bounds => { + console.log(`top: ${bounds.top} left: ${bounds.left} height: ${bounds.height} width: ${bounds.width}`); + }); + // getOptions + finWindow.getOptions(options => { + console.log(options); + }); + // getSnapshot + finWindow.getSnapshot(base64Snapshot => { + console.log("data:image/png;base64," + base64Snapshot); + }); + // getState + finWindow.getState(state => { + console.log("state: " + state); + }); + // getZoomLevel + finWindow.getZoomLevel(level => { + console.log("zoom level: " + level); + }, error => { + console.log('error:', error); + }); + // hide + finWindow.hide(); + // isShowing + finWindow.isShowing(showing => { + console.log("the window is " + (showing ? "showing" : "hidden")); + }); + // joinGroup + let secondWindow = new fin.desktop.Window({ + url: "http://www.openfin.co", + name: "secondWindow", + autoShow: true + }, () => { + // When mainWindow moves or is moved, secondWindow moves by the same amount + secondWindow.joinGroup(finWindow); + }); + // leaveGroup + secondWindow = new fin.desktop.Window({ + url: "http://www.openfin.co", + name: "secondWindow", + autoShow: true + }, () => { + // When finWindow moves or is moved, secondWindow moves by the same amount + secondWindow.joinGroup(finWindow, () => { + // once we are in the group, lets leave it. + secondWindow.leaveGroup(); + }); + }); + // maximize + finWindow.maximize(); + // mergeGroups + { + const finWindowOne = new fin.desktop.Window({ + url: "http://www.openfin.co", + name: "finWindowOne", + autoShow: true + }); + const finWindowTwo = new fin.desktop.Window({ + url: "http://www.openfin.co", + name: "finWindowTwo", + autoShow: true + }); + const finWindowThree = new fin.desktop.Window({ + url: "http://www.openfin.co", + name: "finWindowThree", + autoShow: true + }); + const finWindowFour = new fin.desktop.Window({ + url: "http://www.openfin.co", + name: "finWindowFour", + autoShow: true + }); + // When finWindowOne moves or is moved, finWindowTwo moves by the same amount + finWindowOne.joinGroup(finWindowTwo); + // When finWindowThree moves or is moved, finWindowFour moves by the same amount + finWindowThree.joinGroup(finWindowFour); + // finWindowOne, finWindowTwo, finWindowThree, and finWindowFour now move together in the same group + finWindowOne.mergeGroups(finWindowThree); + } + // minimize + finWindow.minimize(); + // moveBy + finWindow.moveBy(10, 10); + // moveTo + finWindow.moveTo(100, 200); + // removeEventListener + const aRegisteredListener = (event: fin.WindowBaseEvent) => { }; + finWindow.removeEventListener("bounds-changed", aRegisteredListener); + // resizeBy + finWindow.resizeBy(10, 10, "top-right"); + // resizeTo + finWindow.resizeTo(10, 10, "top-right"); + // restore + finWindow.restore(); + // setAsForeground + finWindow.setAsForeground(); + // setBounds + finWindow.setBounds(100, 200, 400, 400); + // setZoomLevel + finWindow.setZoomLevel(10); + // show + finWindow.show(); + // showAt + finWindow.showAt(10, 10, false); + // stopFlashing + finWindow.stopFlashing(); + // updateOptions + finWindow.updateOptions({ + frame: false, + maxWidth: 500 + }); +} diff --git a/types/openfin/v30/tsconfig.json b/types/openfin/v30/tsconfig.json new file mode 100644 index 0000000000..fd3199ceb7 --- /dev/null +++ b/types/openfin/v30/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "openfin-tests.ts" + ] +} \ No newline at end of file diff --git a/types/openfin/v30/tslint.json b/types/openfin/v30/tslint.json new file mode 100644 index 0000000000..64aace11d6 --- /dev/null +++ b/types/openfin/v30/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "max-line-length": false + } +} diff --git a/types/openfin/v30/v30 b/types/openfin/v30/v30 new file mode 100644 index 0000000000..5c40c47ae0 --- /dev/null +++ b/types/openfin/v30/v30 @@ -0,0 +1,1736 @@ +// Type definitions for OpenFin API 17.0 +// Project: https://openfin.co/ +// Definitions by: Chris Barker +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// based on v6.49.17.14 +// see https://openfin.co/support/technical-faq/#what-do-the-numbers-in-the-runtime-version-mean + +/** + * JavaScript API + * The JavaScript API allows you to create an HTML/JavaScript application that has access to the native windowing environment, + * can communicate with other applications and has access to sandboxed system-level features. + * + * API Ready + * When using the OpenFin API, it is important to ensure that it has been fully loaded before making any API calls. To verify + * that the API is in fact ready, be sure to make any API calls either from within the fin.desktop.main() method or explicitly + * after it has returned. This avoids the situation of trying to access methods that are not yet fully injected. + * + * Overview + * When running within the OpenFin Runtime your web applications have access to the "fin" namespace and all the modules within the API + * without the need to include additional source files. You can treat the "fin" namespace as you would the "window", "navigator" or "document" objects. + */ +declare namespace fin { + const desktop: OpenFinDesktop; + + interface OpenFinDesktop { + main(f: () => any): void; + Application: OpenFinApplicationStatic; + ExternalApp: OpenFinExternalApplicationStatic; + InterApplicationBus: OpenFinInterApplicationBus; + Notification: OpenFinNotificationStatic; + System: OpenFinSystem; + Window: OpenFinWindowStatic; + } + + interface OpenFinApplicationStatic { + /** + * Creates a new Application. + * An object representing an application. Allows the developer to create, execute, show/close an application as well as listen to application events. + */ + new ( + options: ApplicationOptions, + callback?: (successObj: { httpResponseCode: number }) => void, + errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): OpenFinApplication; + /** + * Returns an Application object that represents an existing application. + */ + getCurrent(): OpenFinApplication; + /** + * Returns an Application object that represents an existing application. + */ + wrap(uuid: string): OpenFinApplication; + } + + /** + * Application + * An object representing an application.Allows the developer to create, execute, show / close an application as well as listen to application events. + */ + interface OpenFinApplication { + /** + * Returns an instance of the main Window of the application + */ + getWindow(): OpenFinWindow; + /** + * Registers an event listener on the specified event. + */ + addEventListener( + type: OpenFinApplicationEventType, + listener: (event: ApplicationBaseEvent + | TrayIconClickedEvent + | WindowEvent + | WindowAlertRequestedEvent + | WindowAuthRequested + | WindowNavigationRejectedEvent + | WindowEndLoadEvent) => void, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + /** + * Closes the application and any child windows created by the application. + */ + close(force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of wrapped fin.desktop.Windows for each of the application's child windows. + */ + getChildWindows(callback?: (children: OpenFinWindow[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of active window groups for all of the application's windows. Each group is represented as an array of wrapped fin.desktop.Windows. + */ + getGroups(callback?: (groups: OpenFinWindow[][]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the JSON manifest that was used to create the application. Invokes the error callback if the application was not created from a manifest. + */ + getManifest(callback?: (manifest: any) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves UUID of the application that launches this application. Invokes the error callback if the application was created from a manifest. + */ + getParentUuid(callback?: (uuid: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves current configuration of application's shortcuts. + */ + getShortcuts(callback?: (config: ShortCutConfig) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves information about the application. + */ + getInfo(callback?: (info: LaunchInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Determines if the application is currently running. + */ + isRunning(callback?: (running: boolean) => void, errorCallback?: (reason: string) => void): void; + /** + * Passes in custom data that will be relayed to the RVM + */ + registerCustomData(data: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Removes a previously registered event listener from the specified event. + */ + removeEventListener( + type: OpenFinApplicationEventType, + previouslyRegisteredListener: (event: ApplicationBaseEvent + | TrayIconClickedEvent + | WindowEvent + | WindowAlertRequestedEvent + | WindowAuthRequested + | WindowNavigationRejectedEvent + | WindowEndLoadEvent) => any, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + /** + * Removes the application's icon from the tray. + */ + removeTrayIcon(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Restarts the application. + */ + restart(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Runs the application. When the application is created, run must be called. + */ + run(callback?: (successObj: SuccessObj) => void, errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): void; + /** + * Tells the rvm to relaunch the main application once upon a complete shutdown + */ + scheduleRestart(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Sets new shortcut configuration for current application. + * Application has to be launched with a manifest and has to have shortcut configuration (icon url, name, etc.) in its manifest to + * be able to change shortcut states. + */ + setShortcuts(config: ShortCutConfig, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Adds a customizable icon in the system tray and notifies the application when clicked. + */ + setTrayIcon(iconUrl: string, listener: (clickInfo: TrayIconClickedEvent) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Closes the application by terminating its process. + */ + terminate(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Waits for a hanging application. This method can be called in response to an application "not-responding" to allow the application + * to continue and to generate another "not-responding" message after a certain period of time. + */ + wait(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * The Application's uuid + */ + uuid: string; + } + + interface ShortCutConfig { + /** + * application has a shortcut on the desktop + */ + desktop?: boolean; + /** + * application has no shortcut in the start menu + */ + startMenu?: boolean; + /** + * application will be launched on system startup + */ + systemStartup?: boolean; + } + + interface SuccessObj { + httpResponseCode: number; + } + + interface NetworkErrorInfo extends ErrorInfo { + networkErrorCode: number; + } + + interface ErrorInfo { + stack: string; + message: string; + } + + interface ApplicationOptions { + /** + * The name of the application. + */ + name?: string; + /** + * The url to the application. + */ + url?: string; + /** + * The UUID of the application, unique within the set of all other applications running in the OpenFin Runtime. name and uuid must match. + */ + uuid?: string; + /** + * Enable Flash at the application level. Default: false. + */ + plugins?: boolean; + /** + * The options of the main window of the application. + */ + mainWindowOptions?: WindowOptions; + } + + interface WindowOptions { + /** + * Enable keyboard shortcuts for devtools and zoom. Default: false for both. + */ + accelerator?: { + devtools?: boolean, + zoom?: boolean, + reload?: boolean, + reloadIgnoreCache?: boolean, + }; + /** + * A flag to always position the window at the top of the window stack. Default: false. + * Updatable + */ + alwaysOnTop?: boolean; + /** + * A flag to automatically show the Window when it is created. Default: false. + */ + autoShow?: boolean; + /** + * A flag to show the context menu when right-clicking on a window. Gives access to the Developer Console for the Window. Default: true + * Updatable + */ + contextMenu?: boolean; + /** + * This defines and applies rounded corners for a frameless window. Default for both width and height: 0. + * Updatable + */ + cornerRounding?: { + width?: number; + height?: number; + }; + /** + * A field that the user can attach serializable data to to be ferried around with the window options. Default: ''. + */ + customData?: any; + /** + * Specifies that the window will be positioned in the center of the primary monitor when loaded for the first time on a machine. + * When the window corresponding to that id is loaded again, the position from before the window was closed is used. + * This option overrides defaultLeft and defaultTop. Default: false. + */ + defaultCentered?: boolean; + /** + * The default height of the window. Specifies the height of the window when loaded for the first time on a machine. + * When the window corresponding to that id is loaded again, the height is taken to be the last height of the window before it was closed. Default: 500. + */ + defaultHeight?: number; + /** + * The default left position of the window. Specifies the position of the left of the window when loaded for the first time on a machine. + * When the window corresponding to that id is loaded again, the value of left is taken to be the last value before the window was closed. Default: 100. + */ + defaultWidth?: number; + /** + * The default top position of the window. Specifies the position of the top of the window when loaded for the first time on a machine. + * When the window corresponding to that id is loaded again, the value of top is taken to be the last value before the window was closed. Default: 100. + */ + defaultTop?: number; + /** + * The default width of the window. Specifies the width of the window when loaded for the first time on a machine. + * When the window corresponding to that id is loaded again, the width is taken to be the last width of the window before it was closed. Default: 800. + */ + defaultLeft?: number; + /** + * A flag to show the frame. Default: true. + * Updatable + */ + frame?: boolean; + /** + * A flag to allow a window to be hidden when the close button is clicked.Default: false. + * Updatable + */ + hideOnClose?: boolean; + /** + * A URL for the icon to be shown in the window title bar and the taskbar.Default: The parent application's applicationIcon. + * Updatable + */ + icon?: string; + /** + * The maximum height of a window.Will default to the OS defined value if set to - 1. Default: -1. + * Updatable + */ + maxHeight?: number; + /** + * A flag that lets the window be maximized.Default: true. + * Updatable + */ + maximizable?: boolean; + /** + * The maximum width of a window.Will default to the OS defined value if set to - 1. Default: -1. + * Updatable + */ + maxWidth?: number; + /** + * The minimum height of a window.Default: 0. + * Updatable + */ + minHeight?: number; + /** + * A flag that lets the window be minimized.Default: true. + */ + minimizable?: boolean; + /** + * The minimum width of a window.Default: 0. + */ + minWidth?: number; + /** + * The name for the window which must be unique within the context of the invoking Application. + */ + name?: string; + /** + * A flag that specifies how transparent the window will be.This value is clamped between 0.0 and 1.0.Default: 1.0. + * Updatable + */ + opacity?: number; + /** + * A flag to drop to allow the user to resize the window.Default: true. + * Updatable + */ + resizable?: boolean; + /** + * Defines a region in pixels that will respond to user mouse interaction for resizing a frameless window. + * Updatable + */ + resizeRegion?: { + /** + * The size in pixels (Default: 2), + */ + size?: number; + /** + * The size in pixels of an additional + * square resizable region located at the + * bottom right corner of a + * frameless window. (Default: 4) + */ + bottomRightCorner?: number; + }; + /** + * A flag to show the Window's icon in the taskbar. Default: true. + */ + showTaskbarIcon?: boolean; + /** + * A flag to cache the location of the window or not. Default: true. + */ + saveWindowState?: boolean; + /** + * Specify a taskbar group for the window. Default: app's uuid. + */ + taskbarIconGroup?: string; + /** + * A string that sets the window to be "minimized", "maximized", or "normal" on creation. Default: "normal". + */ + state?: string; + /** + * The URL of the window. Default: "about:blank". + */ + url?: string; + /** + * When set to false, the window will render before the "load" event is fired on the content's window. + * Caution, when false you will see an initial empty white window. Default: true. + */ + waitForPageLoad?: boolean; + } + + /** + * Clipboard + * Clipboard API allows reading and writting to the clipboard in multiple formats. + */ + interface OpenFinClipboard { + /** + * Reads available formats for the clipboard type + */ + availableFormats(type: string | null, callback?: (formats: string[]) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Reads available formats for the clipboard type + */ + readHtml(type: string | null, callback?: (html: string) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Read the content of the clipboard as Rtf + */ + readRtf(type: string | null, callback?: (rtf: string) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Read the content of the clipboard as plain text + */ + readText(type: string | null, callback?: (text: string) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Writes data into the clipboard + */ + write(data: any, type: string | null, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Writes data into the clipboard as Html + */ + writeHtml(data: string, type: string | null, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Writes data into the clipboard as Rtf + */ + writeRtf(data: string, type: string | null, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Writes data into the clipboard as plain text + */ + writeText(data: string, type: string | null, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + } + + interface OpenFinExternalApplicationStatic { + /** + * Returns an External Application object that represents an existing external application. + */ + wrap(uuid: string): OpenFinExternalApplication; + } + /** + * ExternalApplication + * An object representing an application. Allows the developer to create, execute, show and close an application, as well as listen to application events. + */ + interface OpenFinExternalApplication { + /** + * Registers an event listener on the specified event. + */ + addEventListener( + type: OpenFinExternalApplicationEventType, + listener: () => void, + callback?: () => void, + errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Removes a previously registered event listener from the specified event. + */ + removeEventListener( + type: OpenFinExternalApplicationEventType, + listener: () => void, + callback?: () => void, + errorCallback?: (reason: string, error: ErrorInfo) => void): void; + } + + /** + * InterApplicationBus + * A messaging bus that allows for pub/sub messaging between different applications. + */ + interface OpenFinInterApplicationBus { + /** + * Adds a listener that gets called when applications subscribe to the current application's messages. + */ + addSubscribeListener(listener: (uuid: string, topic: string, name: string) => void): void; + /** + * Adds a listener that gets called when applications unsubscribe to the current application's messages. + */ + addUnsubscribeListener(listener: (uuid: string, topic: string, name: string) => void): void; + /** + * Removes a previously registered subscribe listener. + */ + removeSubscribeListener(listener: (uuid: string, topic: string, name: string) => void): void; + /** + * Removes a previously registered unsubscribe listener. + */ + removeUnsubscribeListener(listener: (uuid: string, topic: string, name: string) => void): void; + /** + * Publishes a message to all applications running on OpenFin Runtime that are subscribed to the specified topic. + */ + publish(topic: string, message: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Sends a message to a specific application on a specific topic. + */ + send(destinationUuid: string, name: string, topic: string, message: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + send(destinationUuid: string, topic: string, message: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Subscribes to messages from the specified application on the specified topic. If the subscription is for a uuid, [name], + * topic combination that has already been published to upon subscription you will receive the last 20 missed messages in the order they were published. + */ + subscribe( + senderUuid: string, + name: string, + topic: string, + listener: (message: any, uuid: string, name: string) => void, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + subscribe( + senderUuid: string, + topic: string, + listener: (message: any, uuid: string, name: string) => void, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + /** + * Unsubscribes to messages from the specified application on the specified topic. + */ + unsubscribe( + senderUuid: string, + name: string, + topic: string, + listener: (message: any, uuid: string, name: string) => void, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + unsubscribe( + senderUuid: string, + topic: string, + listener: (message: any, uuid: string, name: string) => void, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + } + + interface OpenFinNotificationStatic { + /** + * ctor + */ + new (options: NotificationOptions, callback?: () => void, errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): OpenFinNotification; + /** + * Gets an instance of the current notification. For use within a notification window to close the window or send a message back to its parent application. + */ + getCurrent(): OpenFinNotification; + } + + /** + * Notification + * Notification represents a window on OpenFin Runtime which is shown briefly to the user on the bottom-right corner of the primary monitor. + * A notification is typically used to alert the user of some important event which requires his or her attention. + * Notifications are a child or your application that are controlled by the runtime. + */ + interface OpenFinNotification { + /** + * Closes the notification. + */ + close(callback?: () => void): void; + /** + * Sends a message to the notification. + */ + sendMessage(message: any, callback?: () => void): void; + /** + * Sends a message from the notification to the application that created the notification. The message is handled by the notification's onMessage callback. + */ + sendMessageToApplication(message: any, callback?: () => void): void; + } + + interface NotificationOptions { + /** + * A boolean that will force dismissal even if the mouse is hovering over the notification + */ + ignoreMouseOver?: boolean; + /** + * A message of any primitive or composite-primitive type to be passed to the notification upon creation. + */ + message?: any; + /** + * The timeout for displaying a notification.Can be in milliseconds or "never". + */ + duration?: number | "never"; + /** + * The url of the notification + */ + url?: string; + /** + * A function that is called when a notification is clicked. + */ + onClick?(callback: () => void): void; + /** + * Invoked when the notification is closed via .close() method on the created notification instance + * or the by the notification itself via fin.desktop.Notification.getCurrent().close(). + * NOTE: this is not invoked when the notification is dismissed via a swipe. For the swipe dismissal callback see onDismiss + */ + onClose?(callback: () => void): void; + /** + * Invoked when a the notification is dismissed by swiping it off the screen to the right. NOTE: this is no fired on a programmatic close. + */ + onDismiss?(callback: () => void): void; + /** + * A function that is called when an error occurs.The reason for the error is passed as an argument. + */ + onError?(errorCallback: (reason: string, errorObj: NetworkErrorInfo) => void): void; + /** + * The onMessage function will respond to messages sent from notification.sendMessageToApplication. + * The function is passed the message, which can be of any primitive or composite-primitive type. + */ + onMessage?(callback: (message: any) => void): void; + /** + * A function that is called when a notification is shown. + */ + onShow?(callback: (successObj: SuccessObj) => void): void; + } + + /** + * System + * An object representing the core of OpenFin Runtime. + * Allows the developer to perform system-level actions, such as accessing logs, viewing processes, clearing the cache and exiting the runtime. + */ + interface OpenFinSystem { + Clipboard: OpenFinClipboard; + /** + * Registers an event listener on the specified event. + */ + addEventListener( + type: OpenFinSystemEventType, + listener: (event: SystemBaseEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent) => void, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + /** + * Clears cached data containing window state/positions, + * application resource files (images, HTML, JavaScript files), cookies, and items stored in the Local Storage. + */ + clearCache(options: CacheOptions, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Clears all cached data when OpenFin Runtime exits. + */ + deleteCacheOnExit(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Downloads the given application asset + */ + downloadAsset( + assetObj: AppAssetInfo, + progressListener?: (progress: { downloadedBytes: number, totalBytes: number }) => void, + callback?: (successObj: { path: string }) => void, + errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): void; + /** + * Exits the Runtime. + */ + exit(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of data for all applications. + */ + getAllApplications(callback?: (applicationInfoList: ApplicationInfo[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of data for all external applications. + */ + getAllExternalApplications(callback?: (applicationInfoList: ApplicationInfo[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of data (name, ids, bounds) for all application windows. + */ + getAllWindows(callback?: (windowInfoList: WindowDetails[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the command line argument string that started OpenFin Runtime. + */ + getCommandLineArguments(callback?: (args: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the configuration object that started the OpenFin Runtime. + */ + getDeviceId(callback?: (uuid: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Gets the value of a given environment variable on the computer on which the runtime is installed. + */ + getEnvironmentVariable(envVar: string, callback?: (variable: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves system information. + */ + getHostSpecs(callback?: (info: HostSpecInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the contents of the log with the specified filename. + */ + getLog(logFileName: string, callback?: (variable: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array containing information for each log file. + */ + getLogList(callback?: (logInfoList: LogInfo[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an object that contains data about the about the monitor setup of the computer that the runtime is running on. + */ + getMonitorInfo(callback?: (monitorInfo: MonitorInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Returns the mouse in virtual screen coordinates (left, top). + */ + getMousePosition(callback?: (mousePosition: VirtualScreenCoordinates) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of all of the runtime processes that are currently running. + * Each element in the array is an object containing the uuid and the name of the application to which the process belongs. + */ + getProcessList(callback?: (processInfoList: ProcessInfo[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the Proxy settings. + */ + getProxySettings(callback?: (proxy: ProxyInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Returns information about the running RVM in an object. + */ + getRvmInfo(callback?: (rvmInfo: RvmInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Returns the version of the runtime. The version contains the major, minor, build and revision numbers. + */ + getVersion(callback?: (version: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Runs an executable or batch file. + */ + launchExternalProcess(options: ExternalProcessLaunchInfo, callback?: (payload: { uuid: string }) => void, errorCallback?: (reason: string) => void): void; + /** + * Writes the passed message into both the log file and the console. + */ + log(level: "debug" | "info" | "warn" | "error", message: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Monitors a running process. + */ + monitorExternalProcess(options: ExternalProcessInfo, callback?: (payload: { uuid: string }) => void, errorCallback?: (reason: string) => void): void; + /** + * Opens the passed URL in the default web browser. + */ + openUrlWithBrowser(url: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * This function call will register a unique id and produce a token. The token can be used to broker an external connection. + */ + registerExternalConnection( + uuid: string, + callback?: (detail: { + /** + * this will be unique each time + */ + token: string; + /** + * "remote-connection-uuid" + */ + uuid: string; + }) => void, + errorCallback?: (reason: string) => void): void; + /** + * Removes the process entry for the passed UUID obtained from a prior call of fin.desktop.System.launchExternalProcess(). + */ + releaseExternalProcess(processUuid: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Removes a previously registered event listener from the specified event. + */ + removeEventListener( + type: OpenFinSystemEventType, + listener: (event: SystemBaseEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent) => void, + callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Shows the Chrome Developer Tools for the specified window. + */ + showDeveloperTools(uuid: string, name: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Attempt to close an external process. The process will be terminated if it has not closed after the elapsed timeout in milliseconds. + */ + terminateExternalProcess( + processUuid: string, + timeout: number, + killTree: boolean, + callback?: (info: { result: "clean" | "terminated" | "failed" }) => void, + errorCallback?: (reason: string) => void): void; + terminateExternalProcess( + processUuid: string, + timeout: number, + callback?: (info: { result: "clean" | "terminated" | "failed" }) => void, + errorCallback?: (reason: string) => void): void; + /** + * Update the OpenFin Runtime Proxy settings. + */ + updateProxySettings(type: string, address: string, port: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + } + + interface CacheOptions { + cache?: boolean; + cookies?: boolean; + localStorage?: boolean; + appcache?: boolean; + userData?: boolean; + } + + interface AppAssetInfo { + src?: string; + alias?: string; + version?: string; + target?: string; + args?: string; + } + + interface ApplicationInfo { + /** + * true when the application is running. + */ + isRunning?: boolean; + /** + * uuid of the application. + */ + uuid?: string; + /** + * uuid of the application that launches this application. + */ + parentUuid?: string; + } + + interface WindowDetails { + uuid?: string; + mainWindow?: WindowInfo; + childWindows?: WindowInfo[]; + } + + interface WindowInfo { + /** + * name of the child window + */ + name?: string; + /** + * top-most coordinate of the child window + */ + top?: number; + /** + * right-most coordinate of the child window + */ + right?: number; + /** + * bottom-most coordinate of the child window + */ + bottom?: number; + /** + * left-most coordinate of the child window + */ + left?: number; + } + + interface HostSpecInfo { + /** + * "x86" for 32-bit or "x86_64" for 64-bit + */ + arch: string; + /** + * Same payload as Node's os.cpus() + */ + cpus: NodeCpuInfo[]; + gpu: { + /** + * Graphics card name + */ + name: string; + }; + /** + * Same payload as Node's os.totalmem() + */ + memory: number; + /** + * OS name and version/edition + */ + name: string; + } + + interface NodeCpuInfo { + model: string; + /** + * in MHz + */ + speed: number; + times: { + /** + * The number of milliseconds the CPU has spent in user mode. + */ + user: number; + /** + * The number of milliseconds the CPU has spent in nice mode. + */ + nice: number; + /** + * The number of milliseconds the CPU has spent in sys mode. + */ + sys: number; + /** + * The number of milliseconds the CPU has spent in idle mode. + */ + idle: number; + /** + * The number of milliseconds the CPU has spent in irq mode. + */ + irq: number; + }; + } + + interface LogInfo { + /** + * the filename of the log + */ + name?: string; + /** + * the size of the log in bytes + */ + size?: number; + /** + * the unix time at which the log was created "Thu Jan 08 2015 14:40:30 GMT-0500 (Eastern Standard Time)" + */ + date?: string; + } + + interface ProcessInfo { + /** + * the percentage of total CPU usage + */ + cpuUsage?: number; + /** + * the application name + */ + name?: string; + /** + * the current nonpaged pool usage in bytes + */ + nonPagedPoolUsage?: number; + /** + * the number of page faults + */ + pageFaultCount?: number; + /** + * the current paged pool usage in bytes + */ + pagedPoolUsage?: number; + /** + * the total amount of memory in bytes that the memory manager has committed + */ + pagefileUsage?: number; + /** + * the peak nonpaged pool usage in bytes + */ + peakNonPagedPoolUsage?: number; + /** + * the peak paged pool usage in bytes + */ + peakPagedPoolUsage?: number; + /** + * the peak value in bytes of pagefileUsage during the lifetime of this process + */ + peakPagefileUsage?: number; + /** + * the peak working set size in bytes + */ + peakWorkingSetSize?: number; + /** + * the native process identifier + */ + processId?: number; + /** + * the application UUID + */ + uuid?: string; + /** + * the current working set size (both shared and private data) in bytes + */ + workingSetSize?: number; + } + + interface ProxyInfo { + /** + * the configured Proxy Address + */ + proxyAddress?: string; + /** + * the configured Proxy port + */ + proxyPort?: number; + /** + * Proxy Type + */ + type?: string; + } + + interface RvmInfo { + version?: string; + "start-time"?: string; + } + + interface ExternalProcessLaunchInfo { + path?: string; + /** + * Additionally note that the executable found in the zip file specified in appAssets + * will default to the one mentioned by appAssets.target + * If the the path below refers to a specific path it will override this default + */ + alias?: string; + /** + * When using alias; if no arguments are passed then the arguments (if any) + * are taken from the 'app.json' file, from the 'args' parameter + * of the 'appAssets' Object with the relevant 'alias'. + * If 'arguments' is passed as a parameter it takes precedence + * over any 'args' set in the 'app.json'. + */ + arguments?: string; + listener?(result: { + /** + * "Exited" Or "released" on a call to releaseExternalProcess + */ + topic?: string; + /** + * The mapped UUID which identifies the launched process + */ + uuid?: string; + /* + * Process exit code + */ + exitCode?: number; + }): void; + certificate?: CertificationInfo; + } + + interface CertificationInfo { + /** + * A hex string with or without spaces + */ + serial?: string; + /** + * An internally tokenized and comma delimited string allowing partial or full checks of the subject fields + */ + subject?: string; + /** + * A hex string with or without spaces + */ + publickey?: string; + /** + * A hex string with or without spaces + */ + thumbprint?: string; + /** + * A boolean indicating that the certificate is trusted and not revoked + */ + trusted?: boolean; + } + + interface ExternalProcessInfo { + pid?: number; + listener?(result: { + /** + * "Exited" Or "released" on a call to releaseExternalProcess + */ + topic?: string; + /** + * The mapped UUID which identifies the launched process + */ + uuid?: string; + /* + * Process exit code + */ + exitCode?: number; + }): void; + } + + interface OpenFinWindowStatic { + /** + * Class: Window + * + * new Window(options, callbackopt, errorCallbackopt) + * + * Creates a new OpenFin Window + * + * A basic window that wraps a native HTML window. Provides more fine-grained control over the window state such as the ability to minimize, + * maximize, restore, etc. By default a window does not show upon instantiation; instead the window's show() method must be invoked manually. + * The new window appears in the same process as the parent window. + * @param options - The options of the window + * @param [callback] - Called if the window creation was successful + * @param [callback.successObj] - httpResponseCode + */ + new ( + options: WindowOptions, + callback?: (successObj: { httpResponseCode: number }) => void, + errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): OpenFinWindow; + /** + * Returns an instance of the current window. + * @returns Current window + */ + getCurrent(): OpenFinWindow; + /** + * Returns a Window object that wraps an existing window. + */ + wrap(appUuid: string, windowName: string): OpenFinWindow; + } + + /** + * Window + * A basic window that wraps a native HTML window. Provides more fine-grained control over the window state such as the ability to minimize, + * maximize, restore, etc. By default a window does not show upon instantiation; instead the window's show() method must be invoked manually. + * The new window appears in the same process as the parent window. + */ + interface OpenFinWindow { + /** + * Name of window + */ + name: string; + /** + * Returns the native JavaScript "window" object for the window. This method can only be used by the parent application or the window itself, + * otherwise it will return undefined. The same Single-Origin-Policy (SOP) rules apply for child windows created by window.open(url) in that the + * contents of the window object are only accessible if the URL has the same origin as the invoking window. See example below. + * Also, will not work with fin.desktop.Window objects created with fin.desktop.Window.wrap(). + * @returns Native window + */ + getNativeWindow(): Window; + /** + * Gets the parent application. + * @returns Parent application + */ + getParentApplication(): OpenFinApplication; + /** + * Gets the parent window. + */ + getParentWindow(): OpenFinWindow; + /** + * Registers an event listener on the specified event. + */ + addEventListener( + type: OpenFinWindowEventType, + listener: (event: WindowBaseEvent + | WindowAuthRequestedEvent + | WindowBoundsEvent + | WindowExternalProcessStartedEvent + | WindowExternalProcessExited + | WindowGroupChangedEvent + | WindowHiddenEvent + | Window_NavigationRejectedEvent) => void, + callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Performs the specified window transitions + */ + animate(transitions: AnimationTransition, options: AnimationOptions, callback?: (event: any) => void, errorCallback?: (reason: string) => void): void; + /** + * Provides credentials to authentication requests + */ + authenticate(userName: string, password: string, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Removes focus from the window. + */ + blur(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Brings the window to the front of the OpenFin window stack. + */ + bringToFront(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Closes the window. + * @param Close will be prevented from closing when force is false and 'close-requested' has been subscribed to for application's main window. + */ + close(force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Prevents a user from changing a window's size/position when using the window's frame. + * 'disabled-frame-bounds-changing' is generated at the start of and during a user move/size operation. + * 'disabled-frame-bounds-changed' is generated after a user move/size operation. + * The events provide the bounds that would have been applied if the frame was enabled. + * 'frame-disabled' is generated when an enabled frame becomes disabled. + */ + disableFrame(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Re-enables user changes to a window's size/position when using the window's frame. + * 'disabled-frame-bounds-changing' is generated at the start of and during a user move/size operation. + * 'disabled-frame-bounds-changed' is generated after a user move/size operation. + * The events provide the bounds that would have been applied if the frame was enabled. + * 'frame-enabled' is generated when a disabled frame has becomes enabled. + */ + enableFrame(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Flashes the window's frame and taskbar icon until the window is activated. + */ + flash(options?: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Gives focus to the window. + */ + focus(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Gets the current bounds (top, left, width, height) of the window. + */ + getBounds(callback?: (bounds: WindowBounds) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array containing wrapped fin.desktop.Windows that are grouped with this window. If a window is not in a group an empty array is returned. + * Please note that calling window is included in the result array. + */ + getGroup(callback?: (group: OpenFinWindow[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Gets the current settings of the window. + */ + getOptions(callback?: (options: WindowOptions) => void, errorCallback?: (reason: string) => void): void; + /** + * Gets a base64 encoded PNG snapshot of the window. + */ + getSnapshot(callback?: (base64Snapshot: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Gets the current state ("minimized", "maximized", or "restored") of the window. + */ + getState(callback?: (state: "minimized" | "maximized" | "restored") => void, errorCallback?: (reason: string) => void): void; + /** + * Returns the zoom level of the window. + */ + getZoomLevel(callback?: (level: number) => void, errorCallback?: (reason: string) => void): void; + /** + * Hides the window. + */ + hide(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Determines if the window is currently showing. + */ + isShowing(callback?: (showing: boolean) => void, errorCallback?: (reason: string) => void): void; + /** + * Joins the same window group as the specified window. + */ + joinGroup(target: OpenFinWindow, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Leaves the current window group so that the window can be move independently of those in the group. + */ + leaveGroup(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Maximizes the window. + */ + maximize(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Merges the instance's window group with the same window group as the specified window + */ + mergeGroups(target: OpenFinWindow, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Minimizes the window. + */ + minimize(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Moves the window by a specified amount. + */ + moveBy(deltaLeft: number, deltaTop: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Moves the window to a specified location. + */ + moveTo(left: number, top: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Removes a previously registered event listener from the specified event. + */ + removeEventListener( + type: OpenFinWindowEventType, + listener: (event: WindowBaseEvent + | WindowAuthRequestedEvent + | WindowBoundsEvent + | WindowExternalProcessStartedEvent + | WindowExternalProcessExited + | WindowGroupChangedEvent + | WindowHiddenEvent + | Window_NavigationRejectedEvent) => void, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + /** + * Resizes the window by a specified amount. + */ + resizeBy(deltaWidth: number, deltaHeight: number, anchor: OpenFinAnchor, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Resizes the window by a specified amount. + */ + resizeTo(width: number, height: number, anchor: OpenFinAnchor, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Restores the window to its normal state (i.e., unminimized, unmaximized). + */ + restore(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Will bring the window to the front of the entire stack and give it focus. + */ + setAsForeground(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Sets the window's size and position + */ + setBounds(left: number, top: number, width: number, height: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Sets the zoom level of the window. + */ + setZoomLevel(level: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Shows the window if it is hidden. + * @param Show will be prevented from closing when force is false and 'show-requested' has been subscribed to for application's main window. + */ + show(force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Shows the window if it is hidden at the specified location. If the toggle parameter is set to true, the window will alternate between showing and hiding. + */ + showAt(left: number, top: number, force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Stops the taskbar icon from flashing. + */ + stopFlashing(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Updates the window using the passed options + */ + updateOptions(options: WindowOptions, callback?: () => void, errorCallback?: (reason: string) => void): void; + } + + interface ApplicationBaseEvent { + topic: string; + type: OpenFinApplicationEventType; + uuid: string; + } + + interface TrayIconClickedEvent extends ApplicationBaseEvent { + button: number; // 0 for left, 1 for middle, 2 for right + monitorInfo: MonitorInfo; + x: number; // the cursor x coordinate + y: number; // the cursor y coordinate + } + + interface WindowEvent extends ApplicationBaseEvent { + name: string; + } + + interface WindowAlertRequestedEvent extends WindowEvent { + message: string; + url: string; + } + + interface WindowAuthRequested extends WindowEvent { + authInfo: { + host: string; + isProxy: boolean; + port: number; + realm: string; + scheme: string; + }; + } + + interface WindowNavigationRejectedEvent extends WindowEvent { + sourceName: string; + url: string; + } + + interface WindowEndLoadEvent extends WindowEvent { + documentName: string; + isMain: boolean; + } + + interface MonitorInfoChangedEvent extends MonitorInfo { + topic: "system"; + type: "monitor-info-changed"; + } + + interface MonitorInfo { + nonPrimaryMonitors: MonitorInfoDetail[]; + primaryMonitor: MonitorInfoDetail; + reason: string; + taskbar: { + edge: "left" | "right" | "top" | "bottom", + rect: MontiorCoordinates + }; + topic: "system"; + type: "monitor-info-changed"; + virtualScreen: MontiorCoordinates; + } + + interface MonitorInfoDetail { + availableRect: MontiorCoordinates; + deviceId: string; + displayDeviceActive: boolean; + monitorRect: MontiorCoordinates; + name: string; + } + + interface MontiorCoordinates { + bottom: number; + left: number; + right: number; + top: number; + } + + interface VirtualScreenCoordinates { + left: number; + top: number; + } + + interface SystemBaseEvent { + topic: string; + type: OpenFinSystemEventType; + uuid: string; + } + + interface DesktopIconClickedEvent { + mouse: { + /** + * the left virtual screen coordinate of the mouse + */ + left: number, + /** + * the top virtual screen coordinate of the mouse + */ + top: number + }; + /** + * the number of milliseconds that have elapsed since the system was started, + */ + tickCount: number; + topic: "system"; + type: "desktop-icon-clicked"; + } + + interface IdleStateChangedEvent { + /** + * How long in milliseconds since the user has been idle. + */ + elapsedTime: number; + /** + * true when the user is idle,false when the user has returned; + */ + isIdle: boolean; + topic: "system"; + type: "idle-state-changed"; + } + + interface WindowBaseEvent { + /** + * the name of the window + */ + name: string; + /** + * always window + */ + topic: "window"; + /** + * window event type + */ + type: OpenFinWindowEventType; + /** + * the UUID of the application the window belongs to + */ + uuid: string; + } + + interface WindowAuthRequestedEvent extends WindowBaseEvent { + authInfo: { + host: string; + isProxy: boolean; + port: number; + realm: string; + scheme: string; + }; + } + + interface WindowBoundsEvent extends WindowBaseEvent { + /** + * describes what kind of change occurred. + * 0 means a change in position. + * 1 means a change in size. + * 2 means a change in position and size. + */ + changeType: number; + /** + * true when pending changes have been applied to the window. + */ + deferred: boolean; + /** + * the new height of the window. + */ + height: number; + /** + * the left-most coordinate of the window. + */ + left: number; + /** + * the top-most coordinate of the window. + */ + top: number; + + type: "bounds-changed" | "bounds-changing" | "disabled-frame-bounds-changed" | "disabled-frame-bounds-changing"; + /** + * the new width of the window. + */ + width: number; + } + + interface WindowExternalProcessStartedEvent extends WindowBaseEvent { + /** + * the process handle uuid + */ + processUuid: string; + type: "external-process-started"; + } + + interface WindowExternalProcessExited extends WindowBaseEvent { + /** + * the process exit code + */ + exitCode: number; + /** + * the process handle uuid + */ + processUuid: string; + type: "external-process-exited"; + } + + interface WindowGroupChangedEvent extends WindowBaseEvent { + /** + * Which group array the window that the event listener was registered on is included in: + * 'source' The window is included in sourceGroup. + * 'target' The window is included in targetGroup. + * 'nothing' The window is not included in sourceGroup nor targetGroup. + */ + memberOf: "source" | "target" | "nothing"; + /** + * The reason this event was triggered. + * 'leave' A window has left the group due to a leave or merge with group. + * 'join' A window has joined the group. + * 'merge' Two groups have been merged together. + * 'disband' There are no other windows in the group. + */ + reason: "leave" | "join" | "merge" | "disband"; + /** + * All the windows in the group the sourceWindow originated from. + */ + sourceGroup: WindowOfGroupInfo[]; + /** + * The UUID of the application the sourceWindow belongs to The source window is the window in which (merge/join/leave)group(s) was called. + */ + sourceWindowAppUuid: string; + /** + * the name of the sourcewindow.The source window is the window in which(merge / join / leave) group(s) was called. + */ + sourceWindowName: string; + /** + * All the windows in the group the targetWindow orginated from + */ + targetGroup: WindowOfGroupInfo[]; + /** + * The UUID of the application the targetWindow belongs to. The target window is the window that was passed into (merge/join) group(s). + */ + targetWindowAppUuid: string; + /** + * The name of the targetWindow. The target window is the window that was passed into (merge/join) group(s). + */ + targetWindowName: string; + type: "group-changed"; + } + + interface WindowOfGroupInfo { + /** + * The UUID of the application this window entry belongs to. + */ + appUuid: string; + /** + * The name of this window entry. + */ + windowName: string; + } + + interface WindowHiddenEvent extends WindowBaseEvent { + /** + * What action prompted the close. + * The reasons are: "hide", "hide-on-close" + */ + reason: "hide" | "hide-on-close"; + type: "hidden"; + } + + interface Window_NavigationRejectedEvent { + name: string; + /** + * source of navigation window name + */ + sourceName: string; + topic: "navigation-rejected"; + /** + * Url that was not reached "http://blocked-content.url" + */ + url: string; + /** + * the UUID of the application the window belongs to. + */ + uuid: string; + } + + interface AnimationTransition { + opacity?: { + /** + * This value is clamped from 0.0 to 1.0 + */ + opacity?: number; + /** + * The total time in milliseconds this transition should take. + */ + duration?: number; + /** + * Treat 'opacity' as absolute or as a delta. Defaults to false. + */ + relative?: boolean; + }; + position?: { + /** + * Defaults to the window's current left position in virtual screen coordinates. + */ + left?: number; + /** + * Defaults to the window's current top position in virtual screen coordinates. + */ + top?: number; + /** + * The total time in milliseconds this transition should take. + */ + duration?: number; + /** + * Treat 'left' and 'top' as absolute or as deltas. Defaults to false. + */ + relative?: boolean; + }; + size?: { + /** + * Optional if height is present. Defaults to the window's current width. + */ + width?: number; + /** + * Optional if width is present. Defaults to the window's current height. + */ + height?: number; + /** + * The total time in milliseconds this transition should take. + */ + duration?: number; + /** + * Treat 'width' and 'height' as absolute or as deltas. Defaults to false. + */ + relative?: boolean; + }; + } + + interface AnimationOptions { + /** + * This option interrupts the current animation. When false it pushes this animation onto the end of the animation queue. + */ + interrupt?: boolean; + /** + * Transition effect. Defaults to 'ease-in-out'. + */ + tween?: OpenFinTweenType; + } + + interface WindowBounds { + /** + * the height of the window. + */ + height?: number; + /** + * left-most coordinate of the window. + */ + left?: number; + /** + * top-most coordinate of the window. + */ + top?: number; + /** + * the width of the window. + */ + width?: number; + } + + interface SessionChangedEvent { + /** + * the action that triggered this event: + */ + reason: "lock" + | "unlock" + | "remote-connect" + | "remote-disconnect" + | "unknown"; + topic: "system"; + type: "session-changed"; + } + + interface LaunchInfo { + launchMode: "fin-protocol" + | "fins-protocol" + | "shortcut" + | "command-line" + | "adapter" + | "other" + | string; + } + + type OpenFinTweenType = "linear" + | "ease-in" + | "ease-out" + | "ease-in-out" + | "ease-in-quad" + | "ease-out-quad" + | "ease-in-out-quad" + | "ease-in-cubic" + | "ease-out-cubic" + | "ease-in-out-cubic" + | "ease-out-bounce" + | "ease-in-back" + | "ease-out-back" + | "ease-in-out-back" + | "ease-in-elastic" + | "ease-out-elastic" + | "ease-in-out-elastic"; + + type OpenFinApplicationEventType = "closed" + | "connected" + | "crashed" + | "initialized" + | "manifest-changed" + | "not-responding" + | "out-of-memory" + | "responding" + | "run-requested" + | "started" + | "tray-icon-clicked" + | "window-alert-requested" + | "window-auth-requested" + | "window-closed" + | "window-created" + | "window-end-load" + | "window-navigation-rejected" + | "window-show-requested" + | "window-start-load"; + + type OpenFinExternalApplicationEventType = "connected" + | "disconnected"; + + type OpenFinSystemEventType = "application-closed" + | "application-crashed" + | "application-created" + | "application-started" + | "desktop-icon-clicked" + | "idle-state-changed" + | "monitor-info-changed" + | "session-changed"; + + type OpenFinWindowEventType = "auth-requested" + | "blurred" + | "bounds-changed" + | "bounds-changing" + | "close-requested" + | "closed" + | "disabled-frame-bounds-changed" + | "disabled-frame-bounds-changing" + | "embedded" + | "external-process-exited" + | "external-process-started" + | "focused" + | "frame-disabled" + | "frame-enabled" + | "group-changed" + | "hidden" + | "initialized" + | "maximized" + | "minimized" + | "navigation-rejected" + | "restored" + | "show-requested" + | "shown"; + + type OpenFinAnchor = "top-left" + | "top-right" + | "bottom-left" + | "bottom-right"; +} From 9077dd95025ef8b49508312b10efe6d82745be29 Mon Sep 17 00:00:00 2001 From: Bram Schulting Date: Thu, 8 Mar 2018 13:07:36 +0100 Subject: [PATCH 0091/1327] Add onFailure prop to react-facebook-login This prop was missing: https://github.com/keppelen/react-facebook-login/blob/master/src/facebook.js#L39 --- types/react-facebook-login/index.d.ts | 10 +++++++++- .../react-facebook-login-tests.tsx | 17 ++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/types/react-facebook-login/index.d.ts b/types/react-facebook-login/index.d.ts index 3cb1c21605..1c81ffc3c8 100644 --- a/types/react-facebook-login/index.d.ts +++ b/types/react-facebook-login/index.d.ts @@ -9,6 +9,7 @@ import * as React from "react"; interface ReactFacebookLoginProps { appId: string; callback(userInfo: ReactFacebookLoginInfo): void; + onFailure?(response: ReactFacebookFailureResponse): void; autoLoad?: boolean; buttonStyle?: React.CSSProperties; @@ -33,6 +34,10 @@ interface ReactFacebookLoginProps { tag?: Node | React.Component; } +export interface ReactFacebookFailureResponse { + status?: string; +} + export interface ReactFacebookLoginInfo { id: string; name: string; @@ -43,6 +48,9 @@ interface ReactFacebookLoginState { isProcessing?: boolean; } -declare class ReactFacebookLogin extends React.Component { } +declare class ReactFacebookLogin extends React.Component< + ReactFacebookLoginProps, + ReactFacebookLoginState +> {} export default ReactFacebookLogin; diff --git a/types/react-facebook-login/react-facebook-login-tests.tsx b/types/react-facebook-login/react-facebook-login-tests.tsx index 6aab1ccd71..d7b2ebcde8 100644 --- a/types/react-facebook-login/react-facebook-login-tests.tsx +++ b/types/react-facebook-login/react-facebook-login-tests.tsx @@ -1,12 +1,16 @@ import * as React from 'react'; import * as ReactDOM from 'react-dom'; -import FacebookLogin, { ReactFacebookLoginInfo } from 'react-facebook-login'; +import FacebookLogin, { ReactFacebookLoginInfo, ReactFacebookFailureResponse } from 'react-facebook-login'; const responseFacebook = (response: ReactFacebookLoginInfo) => { console.log(response); }; +const failureResponseFacebook = (response: ReactFacebookFailureResponse) => { + console.log(response); +}; + const componentClicked = () => { console.log("component clicked"); }; @@ -21,6 +25,17 @@ ReactDOM.render( document.getElementById('demo') ); +ReactDOM.render( + , + document.getElementById('demo') +); + ReactDOM.render( Date: Thu, 8 Mar 2018 15:09:17 +0200 Subject: [PATCH 0092/1327] Add isMergeableObject to options --- types/deepmerge/index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types/deepmerge/index.d.ts b/types/deepmerge/index.d.ts index 05f5c96d2e..04313282b1 100644 --- a/types/deepmerge/index.d.ts +++ b/types/deepmerge/index.d.ts @@ -1,7 +1,8 @@ -// Type definitions for deepmerge 1.3 +// Type definitions for deepmerge 2.1 // Project: https://github.com/KyleAMathews/deepmerge // Definitions by: marvinscharle // syy1125 +// AppLover69 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 @@ -14,6 +15,7 @@ declare namespace deepmerge { interface Options { clone?: boolean; arrayMerge?(destination: any[], source: any[], options?: Options): any[]; + isMergeableObject?(value: object): boolean; } function all(objects: Array>, options?: Options): T; From 2f0902873c07893813df5c99b0259f722d1bdc95 Mon Sep 17 00:00:00 2001 From: AppLover69 <26137752+AppLover69@users.noreply.github.com> Date: Thu, 8 Mar 2018 15:26:57 +0200 Subject: [PATCH 0093/1327] Updated TypeScript version to 2.2 --- types/deepmerge/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/deepmerge/index.d.ts b/types/deepmerge/index.d.ts index 04313282b1..39158354de 100644 --- a/types/deepmerge/index.d.ts +++ b/types/deepmerge/index.d.ts @@ -4,7 +4,7 @@ // syy1125 // AppLover69 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.2 export = deepmerge; From 3ed377df2289b0f7aabfb92dea097fd4bbae9628 Mon Sep 17 00:00:00 2001 From: Ramon de Klein Date: Fri, 9 Mar 2018 00:17:54 +0100 Subject: [PATCH 0094/1327] Fix typing of Model.createTable --- types/dynogels/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/dynogels/index.d.ts b/types/dynogels/index.d.ts index 2e4c5acbf4..4742af5a04 100644 --- a/types/dynogels/index.d.ts +++ b/types/dynogels/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for dynogels 8.0 // Project: https://github.com/clarkie/dynogels#readme // Definitions by: Spartan Labs +// Ramon de Klein // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 @@ -76,7 +77,7 @@ export interface Model { getItems(items: string[] | Array<{ [key: string]: string }>, options: GetItemOptions, callback: (err: Error, items: any[]) => void): void; batchGetItems(items: string[] | Array<{ [key: string]: string }>, callback: (err: Error, items: any[]) => void): void; batchGetItems(items: string[] | Array<{ [key: string]: string }>, options: GetItemOptions, callback: (err: Error, items: any[]) => void): void; - createTable(options: { [key: string]: CreateTablesOptions } | DynogelsGlobalOptions, callback: (err: Error, data: AWS.DynamoDB.CreateTableOutput) => void): void; + createTable(options: CreateTablesOptions, callback: (err: Error, data: AWS.DynamoDB.CreateTableOutput) => void): void; createTable(callback: (err: Error, data: AWS.DynamoDB.CreateTableOutput) => void): void; updateTable(throughput: Throughput, callback: (err: Error, data: AWS.DynamoDB.UpdateTableOutput) => void): void; updateTable(callback: (err: Error, data: AWS.DynamoDB.UpdateTableOutput) => void): void; From 393813902921572fbb99fd1a3f628a64edaf716b Mon Sep 17 00:00:00 2001 From: Nick Whyte Date: Fri, 9 Mar 2018 12:26:09 +1100 Subject: [PATCH 0095/1327] prismic-dom: Add initial typings --- types/prismic-dom/index.d.ts | 8 ++++++++ types/prismic-dom/prismic-dom-tests.ts | 3 +++ types/prismic-dom/tsconfig.json | 22 ++++++++++++++++++++++ types/prismic-dom/tslint.json | 1 + 4 files changed, 34 insertions(+) create mode 100644 types/prismic-dom/index.d.ts create mode 100644 types/prismic-dom/prismic-dom-tests.ts create mode 100644 types/prismic-dom/tsconfig.json create mode 100644 types/prismic-dom/tslint.json diff --git a/types/prismic-dom/index.d.ts b/types/prismic-dom/index.d.ts new file mode 100644 index 0000000000..9588f1e25c --- /dev/null +++ b/types/prismic-dom/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for prismic-dom 2.0 +// Project: https://github.com/prismicio/prismic-dom#readme +// Definitions by: Nick Whyte +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export class RichText { + static asHtml(richText: any, linkResolver?: (doc: any) => string): string; +} diff --git a/types/prismic-dom/prismic-dom-tests.ts b/types/prismic-dom/prismic-dom-tests.ts new file mode 100644 index 0000000000..9e123002f1 --- /dev/null +++ b/types/prismic-dom/prismic-dom-tests.ts @@ -0,0 +1,3 @@ +import prismicDom = require("prismic-dom"); + +let rendered: string = prismicDom.RichText.asHtml({}); diff --git a/types/prismic-dom/tsconfig.json b/types/prismic-dom/tsconfig.json new file mode 100644 index 0000000000..ef0b24f3a7 --- /dev/null +++ b/types/prismic-dom/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "prismic-dom-tests.ts" + ] +} diff --git a/types/prismic-dom/tslint.json b/types/prismic-dom/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/prismic-dom/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 4377692a9b1e3dd06c9e7a9c1ce4d5e7a237d02c Mon Sep 17 00:00:00 2001 From: Nick Whyte Date: Fri, 9 Mar 2018 12:28:40 +1100 Subject: [PATCH 0096/1327] . --- types/prismic-dom/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/types/prismic-dom/tsconfig.json b/types/prismic-dom/tsconfig.json index ef0b24f3a7..0687e7ae0e 100644 --- a/types/prismic-dom/tsconfig.json +++ b/types/prismic-dom/tsconfig.json @@ -7,6 +7,7 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, + "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ "../" From 2f3607131c9716b01fcd7e7f76cb82764fb9b4ac Mon Sep 17 00:00:00 2001 From: Nick Whyte Date: Fri, 9 Mar 2018 12:32:31 +1100 Subject: [PATCH 0097/1327] . --- types/prismic-dom/index.d.ts | 6 +++--- types/prismic-dom/prismic-dom-tests.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/types/prismic-dom/index.d.ts b/types/prismic-dom/index.d.ts index 9588f1e25c..82c766fda6 100644 --- a/types/prismic-dom/index.d.ts +++ b/types/prismic-dom/index.d.ts @@ -1,8 +1,8 @@ // Type definitions for prismic-dom 2.0 // Project: https://github.com/prismicio/prismic-dom#readme -// Definitions by: Nick Whyte +// Definitions by: Nick Whyte // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export class RichText { - static asHtml(richText: any, linkResolver?: (doc: any) => string): string; +export namespace RichText { + function asHtml(richText: any, linkResolver?: (doc: any) => string): string; } diff --git a/types/prismic-dom/prismic-dom-tests.ts b/types/prismic-dom/prismic-dom-tests.ts index 9e123002f1..598573cced 100644 --- a/types/prismic-dom/prismic-dom-tests.ts +++ b/types/prismic-dom/prismic-dom-tests.ts @@ -1,3 +1,3 @@ import prismicDom = require("prismic-dom"); -let rendered: string = prismicDom.RichText.asHtml({}); +const rendered: string = prismicDom.RichText.asHtml({}); From 6a74caff79264a15bbc738e62109ed497e0a45da Mon Sep 17 00:00:00 2001 From: Carl Foster Date: Fri, 9 Mar 2018 11:59:33 +1000 Subject: [PATCH 0098/1327] Add types for stellar-sdk --- types/stellar-sdk/index.d.ts | 862 +++++++++++++++++++++++++ types/stellar-sdk/stellar-sdk-tests.ts | 9 + types/stellar-sdk/tsconfig.json | 23 + types/stellar-sdk/tslint.json | 7 + 4 files changed, 901 insertions(+) create mode 100644 types/stellar-sdk/index.d.ts create mode 100644 types/stellar-sdk/stellar-sdk-tests.ts create mode 100644 types/stellar-sdk/tsconfig.json create mode 100644 types/stellar-sdk/tslint.json diff --git a/types/stellar-sdk/index.d.ts b/types/stellar-sdk/index.d.ts new file mode 100644 index 0000000000..307c6b44af --- /dev/null +++ b/types/stellar-sdk/index.d.ts @@ -0,0 +1,862 @@ +// Type definitions for stellar-sdk 0.8 +// Project: https://github.com/stellar/js-stellar-sdk +// Definitions by: Carl Foster +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// + +export class Account { + constructor(accountId: string, sequence: string | number) + accountId(): string + sequenceNumber(): string + incrementSequenceNumber(): void +} + +export class CallBuilder { + constructor(serverUrl: string) + call(): Promise> + cursor(cursor: string): this + limit(limit: number): this + order(direction: 'asc' | 'desc'): this + stream(options?: { onmessage?: () => void, onerror?: () => void }): () => void +} + +export interface CollectionPage { + records: T[], + next: () => Promise>, + prev: () => Promise>, +} + +export interface Record { + _links: { + [key: string]: RecordLink + } +} + +export interface RecordLink { + href: string + templated?: boolean +} + +/* Due to a bug with the recursive function requests */ +export interface CollectionRecord { + _links: { + next: RecordLink + prev: RecordLink + self: RecordLink + } + _embedded: { + records: T[] + } +} + +export interface CallFunctionTemplateOptions { + cursor?: string | number + limit?: number + order?: 'asc' | 'desc' +} + +export type CallFunction = () => Promise +export type CallCollectionFunction = + (options?: CallFunctionTemplateOptions) => Promise> + +export interface AccountRecord extends Record { + id: string + paging_token: string + account_id: string + sequence: number + subentry_count: number + thresholds: { + low_threshold: number + med_threshold: number + high_threshold: number + } + flags: { + auth_required: boolean + auth_revocable: boolean + } + balances: Array< + { + balance: string + asset_type: 'native' + } | + { + balance: string + limit: string + asset_type: 'credit_alphanum4' | 'credit_alphanum12' + asset_code: string + asset_issuer: string + } + > + signers: Array< + { + _key: string + weight: number + } + > + data: { + [key: string]: string + } + + effects: CallCollectionFunction + offers: CallCollectionFunction + operations: CallCollectionFunction + payments: CallCollectionFunction + trades: CallCollectionFunction +} + +export interface AssetRecord extends Record { + asset_type: 'credit_alphanum4' | 'credit_alphanum12' + asset_code: string + asset_issuer: string + paging_token: string + amount: string + num_accounts: number + flags: { + auth_required: boolean + auth_revocable: boolean + } +} + +export interface EffectRecord extends Record { + account: string + paging_token: string + starting_balance: string + type_i: string + type: string + + operation?: CallFunction + precedes?: CallFunction + succeeds?: CallFunction +} + +export interface LedgerRecord extends Record { + id: string + paging_token: string + hash: string + prev_hash: string + sequence: number + transaction_count: number + operation_count: number + closed_at: string + total_coins: string + fee_pool: string + base_fee: number + base_reserve: string + max_tx_set_size: number + protocol_version: number + header_xdr: string + base_fee_in_stroops: number + base_reserve_in_stroops: number + + effects: CallCollectionFunction + operations: CallCollectionFunction + self: CallFunction + transactions: CallCollectionFunction +} + +export interface OfferRecord extends Record { + id: string + paging_token: string + seller_attr: string + selling: Asset + buying: Asset + amount: string + price_r: { numerator: number, denominator: number } + price: string + + seller?: CallFunction +} + +export interface BaseOperationRecord extends Record { + id: string + paging_token: string + type: string + type_i: number + + self: CallFunction + succeeds: CallFunction + precedes: CallFunction + effects: CallCollectionFunction + transaction: CallFunction +} + +export interface CreateAccountOperationRecord extends BaseOperationRecord { + type: 'create_account' + account: string + funder: string + starting_balance: string +} + +export interface PaymentOperationRecord extends BaseOperationRecord { + type: 'payment' + from: string + to: string + asset_type: string + asset_code?: string + asset_issuer?: string + amount: string + + sender: CallFunction + receiver: CallFunction +} + +export interface PathPaymentOperationRecord extends BaseOperationRecord { + type: 'path_payment' + from: string + to: string + asset_code?: string + asset_issuer?: string + asset_type: string + amount: string + source_asset_code?: string + source_asset_issuer?: string + source_asset_type: string + source_max: string + source_amount: string +} + +export interface ManageOfferOperationRecord extends BaseOperationRecord { + type: 'manage_offer' + offer_id: number + amount: string + buying_asset_code?: string + buying_asset_issuer?: string + buying_asset_type: string + price: string + price_r: { numerator: number, denominator: number } + selling_asset_code?: string + selling_asset_issuer?: string + selling_asset_type: string +} + +export interface PassiveOfferOperationRecord extends BaseOperationRecord { + type: 'create_passive_offer' + offer_id: number + amount: string + buying_asset_code?: string + buying_asset_issuer?: string + buying_asset_type: string + price: string + price_r: { numerator: number, denominator: number } + selling_asset_code?: string + selling_asset_issuer?: string + selling_asset_type: string +} + +export interface SetOptionsOperationRecord extends BaseOperationRecord { + type: 'set_options' + signer_key?: string + signer_weight?: number + master_key_weight?: number + low_threshold?: number + med_threshold?: number + high_threshold?: number + home_domain?: string + set_flags: Array<(1 | 2)> + set_flags_s: Array<('auth_required_flag' | 'auth_revocable_flag')> + clear_flags: Array<(1 | 2)> + clear_flags_s: Array<('auth_required_flag' | 'auth_revocable_flag')> +} + +export interface ChangeTrustOperationRecord extends BaseOperationRecord { + type: 'change_trust' + asset_code: string + asset_issuer: string + asset_type: string + trustee: string + trustor: string + limit: string +} + +export interface AllowTrustOperationRecord extends BaseOperationRecord { + type: 'allow_trust' + asset_code: string + asset_issuer: string + asset_type: string + authorize: boolean + trustee: string + trustor: string +} + +export interface AccountMergeOperationRecord extends BaseOperationRecord { + type: 'account_merge' + into: string +} + +export interface InflationOperationRecord extends BaseOperationRecord { + type: 'inflation' +} + +export interface ManageDataOperationRecord extends BaseOperationRecord { + type: 'manage_data' + name: string + value: string +} + +export type OperationRecord = CreateAccountOperationRecord + | PaymentOperationRecord + | PathPaymentOperationRecord + | ManageOfferOperationRecord + | PassiveOfferOperationRecord + | SetOptionsOperationRecord + | ChangeTrustOperationRecord + | AllowTrustOperationRecord + | AccountMergeOperationRecord + | InflationOperationRecord + | ManageDataOperationRecord + +export interface OrderbookRecord extends Record { + bids: Array<{ price_r: {}, price: number, amount: string }> + asks: Array<{ price_r: {}, price: number, amount: string }> + selling: Asset + buying: Asset +} + +export interface PaymentPathRecord extends Record { + path: Array<{ + asset_code: string + asset_issuer: string + asset_type: string + }> + source_amount: string + source_asset_type: string + source_asset_code: string + source_asset_issuer: string + destination_amount: string + destination_asset_type: string + destination_asset_code: string + destination_asset_issuer: string +} + +export interface TradeRecord extends Record { + id: string + paging_token: string + ledger_close_time: string + base_account: string + base_amount: string + base_asset_type: string + base_asset_code: string + base_asset_issuer: string + counter_account: string + counter_amount: string + counter_asset_type: string + counter_asset_code: string + counter_asset_issuer: string + base_is_seller: boolean + + base: CallFunction + counter: CallFunction + operation: CallFunction +} + +export interface TradeAggregationRecord extends Record { + timestamp: string + trade_count: number + base_volume: string + counter_volume: string + avg: string + high: string + low: string + open: string + close: string +} + +export interface TransactionRecord extends Record { + id: string + paging_token: string + hash: string + ledger_attr: number + created_at: string + max_fee: number + fee_paid: number + operation_count: number + result_code: number + result_code_s: string + source_account: string + source_account_sequence: string + envelope_xdr: string + result_xdr: string + result_meta_xdr: string + memo: string + + account: CallFunction + effects: CallCollectionFunction + ledger: CallFunction + operations: CallCollectionFunction + precedes: CallFunction + self: CallFunction + succeeds: CallFunction +} + +export class AccountCallBuilder extends CallBuilder { + accountId(id: string): this +} +export class AccountResponse implements AccountRecord { + _links: { [key: string]: { href: string } } + id: string + paging_token: string + account_id: string + sequence: number + subentry_count: number + thresholds: { + low_threshold: number + med_threshold: number + high_threshold: number + } + flags: { + auth_required: boolean + auth_revocable: boolean + } + balances: Array< + { + balance: string + asset_type: 'native' + } | + { + balance: string + limit: string + asset_type: 'credit_alphanum4' | 'credit_alphanum12' + asset_code: string + asset_issuer: string + } + > + signers: Array< + { + _key: string + weight: number + } + > + data: { + [key: string]: string + } + + effects: CallCollectionFunction + offers: CallCollectionFunction + operations: CallCollectionFunction + payments: CallCollectionFunction + trades: CallCollectionFunction + constructor(response: AccountRecord) + accountId(): string + sequenceNumber(): string + incrementSequenceNumber(): void +} + +export class Asset { + static native(): Asset + constructor(code: string, issuer: string) + + getCode(): string + getIssuer(): string + getAssetType(): 'native' | 'credit_alphanum4' | 'credit_alphanum12' + isNative(): boolean + equals(other: Asset): boolean + + code: string + issuer: string +} + +export class AssetsCallBuilder extends CallBuilder { + forCode(value: string): this + forIssuer(value: string): this +} + +export namespace Config { + function setAllowHttp(allow: boolean): void + function isAllowHttp(): boolean + function setDefault(): void +} + +export class EffectCallBuilder extends CallBuilder { + forAccount(accountId: string): this + forLedger(sequence: string): this + forOperation(operationId: number): this + forTransaction(transactionId: string): this +} + +export interface FederationRecord { + account_id: string + memo_type?: string + memo?: string +} + +export interface FederationOptions { + allowHttp: boolean +} +export class FederationServer { + static createForDomain(domain: string, options?: FederationOptions): Promise + static resolve(value: string, options?: FederationOptions): Promise + + constructor(serverURL: string, domain: string, options?: FederationOptions) + resolveAccountId(account: string): Promise + resolveAddress(address: string): Promise + resolveTransactionId(transactionId: string): Promise +} + +export class LedgerCallBuilder extends CallBuilder { } + +export class Memo { + static fromXDRObject(memo: xdr.Memo): Memo + static hash(hash: string): Memo + static id(id: string): Memo + static none(): Memo + static return(hash: string): Memo + static text(text: string): Memo + + constructor(type: 'MemoNone') + constructor(type: 'MemoID' | 'MemoText', value: string) + constructor(type: 'MemoHash' | 'MemoReturn', value: Buffer) + + type: 'MemoNone' | 'MemoID' | 'MemoText' | 'MemoHash' | 'MemoReturn' + value: null | string | Buffer + + toXDRObject(): xdr.Memo +} + +export enum Networks { + PUBLIC = 'Public Global Stellar Network ; September 2015', + TESTNET = 'Test SDF Network ; September 2015', +} + +export class Network { + static use(network: Network): void + static usePublicNetwork(): void + static useTestNetwork(): void + static current(): Network + + constructor(passphrase: string) + + networkPassphrase(): string + networkId(): string +} + +export class OfferCallBuilder extends CallBuilder { } + +export type TransactionOperation = + Operation.CreateAccount + | Operation.Payment + | Operation.PathPayment + | Operation.CreatePassiveOffer + | Operation.ManageOffer + | Operation.SetOptions + | Operation.ChangeTrust + | Operation.AllowTrust + | Operation.AccountMerge + | Operation.Inflation + | Operation.ManageData + +export enum OperationType { + createAccount = 'createAccount', + payment = 'payment', + pathPayment = 'pathPayment', + createPassiveOffer = 'createPassiveOffer', + manageOffer = 'manageOffer', + setOptions = 'setOptions', + changeTrust = 'changeTrust', + allowTrust = 'allowTrust', + accountMerge = 'accountMerge', + inflation = 'inflation', + manageData = 'manageData', +} + +export namespace Operation { + interface Operation { + type: OperationType + source: string | null + } + interface AccountMerge extends Operation { + type: OperationType.accountMerge + destination: string + } + interface AccountMergeOptions { + destination: string + source?: string + } + function accountMerge(options: AccountMergeOptions): xdr.Operation + + interface AllowTrust extends Operation { + type: OperationType.allowTrust + trustor: string + assetCode: string + authorize: boolean + } + interface AllowTrustOptions { + trustor: string + assetCode: string + authorize: boolean + source?: string + } + function allowTrust(options: AllowTrustOptions): xdr.Operation + + interface ChangeTrust extends Operation { + type: OperationType.changeTrust + line: Asset + limit: string | number + } + interface ChangeTrustOptions { + asset: Asset + limit: string + source?: string + } + function changeTrust(options: ChangeTrustOptions): xdr.Operation + + interface CreateAccount extends Operation { + type: OperationType.createAccount + source: string + destination: string + startingBalance: string | number + } + interface CreateAccountOptions { + destination: string + startingBalance: string + source?: string + } + function createAccount(options: CreateAccountOptions): xdr.Operation + + interface CreatePassiveOffer extends Operation { + type: OperationType.createPassiveOffer + selling: Asset + buying: Asset + amount: string | number + price: string | number + } + interface CreatePassiveOfferOptions { + selling: Asset + buying: Asset + amount: string + price: number | string | object + source?: string + } + function createPassiveOffer(options: CreatePassiveOfferOptions): xdr.Operation + + interface Inflation extends Operation { + type: OperationType.inflation + } + function inflation(options: { source?: string }): xdr.Operation + + interface ManageData extends Operation { + type: OperationType.manageData + name: string + value: string + } + interface ManageDataOptions { + name: string + value: string | Buffer + source?: string + } + function manageData(options: ManageDataOptions): xdr.Operation + + interface ManageOffer extends Operation { + type: OperationType.manageOffer + selling: Asset + buying: Asset + amount: string | number + price: string | number + offerId: string + } + interface ManageOfferOptions extends CreatePassiveOfferOptions { + offerId: number | string + } + function manageOffer(options: ManageOfferOptions): xdr.Operation + + interface PathPayment extends Operation { + type: OperationType.pathPayment + sendAsset: Asset + sendMax: string | number + destination: string + destAsset: Asset + destAmount: string | number + path: Asset[] + } + interface PathPaymentOptions { + sendAsset: Asset + sendMax: string + destination: string + destAsset: Asset + destAmount: string + path: Asset[] + source?: string + } + function pathPayment(options: PathPaymentOptions): xdr.Operation + + interface Payment extends Operation { + type: OperationType.payment + destination: string + asset: Asset + amount: string | number + } + interface PaymentOptions { + destination: string + asset: Asset + amount: string + source?: string + } + function payment(options: PaymentOptions): xdr.Operation + + /* + * Required = 1 << 0 + * Revocable = 1 << 1 + * Immutable = 1 << 2 + */ + enum AuthFlags { + Required = 1, + Revocable = 2, + Immutable = 4, + } + interface Signer { + ed25519PublicKey?: string + sha256Hash?: Buffer | string + preAuthTx?: Buffer | string + weight?: number | string + } + interface SetOptions extends Operation { + type: OperationType.setOptions + inflationDest?: string + clearFlags?: AuthFlags + setFlags?: AuthFlags + masterWeight?: number | string + lowThreshold?: number | string + medThreshold?: number | string + highThreshold?: number | string + homeDomain?: string + signer?: Signer + } + interface SetOptionsOptions { + inflationDest?: string + clearFlags?: AuthFlags + setFlags?: AuthFlags + masterWeight?: number | string + lowThreshold?: number | string + medThreshold?: number | string + highThreshold?: number | string + signer?: Signer + homeDomain?: string + source?: string + } + function setOptions(options: SetOptionsOptions): xdr.Operation + + function fromXDRObject(xdrOperation: xdr.Operation): T +} + +export class OperationCallBuilder extends CallBuilder { } +export class OrderbookCallBuilder extends CallBuilder { } +export class PathCallBuilder extends CallBuilder { } +export class PaymentCallBuilder extends CallBuilder { } + +export class Server { + constructor(serverURL: string, options?: { allowHttp: boolean }) + accounts(): AccountCallBuilder + assets(): AssetsCallBuilder + effects(): EffectCallBuilder + ledgers(): LedgerCallBuilder + loadAccount(accountId: string): Promise + offers(resource: string, ...parameters: string[]): OfferCallBuilder + operations(): OperationCallBuilder + orderbook(selling: Asset, buying: Asset): OrderbookCallBuilder + paths( + source: string, + destination: string, + destinationAsset: Asset, + destinationAmount: string, + ): PathCallBuilder + payments(): PaymentCallBuilder + submitTransaction(transaction: Transaction): Promise + tradeAggregation( + base: Asset, + counter: Asset, + startTime: Date, + endTime: Date, + resolution: Date, + ): TradeAggregationCallBuilder + trades(): TradesCallBuilder + transactions(): TransactionCallBuilder +} + +export namespace StrKey { + function encodeEd25519PublicKey(data: Buffer): string + function decodeEd25519PublicKey(data: string): Buffer + function isValidEd25519PublicKey(Key: string): boolean + + function encodeEd25519SecretSeed(data: Buffer): string + function decodeEd25519SecretSeed(data: string): Buffer + function isValidEd25519SecretSeed(seed: string): boolean + + function encodePreAuthTx(data: Buffer): string + function decodePreAuthTx(data: string): Buffer + + function encodeSha256Hash(data: Buffer): string + function decodeSha256Hash(data: string): Buffer +} + +export class TradeAggregationCallBuilder extends CallBuilder { } +export class TradesCallBuilder extends CallBuilder { + forAssetPair(base: Asset, counter: Asset): this + forOffer(offerId: string): this +} + +export class Transaction { + constructor(envelope: string | xdr.TransactionEnvelope) + hash(): Buffer + sign(...keypairs: Keypair[]): void + signatureBase(): Buffer + signHashX(preimage: Buffer | string): void + toEnvelope(): xdr.TransactionEnvelope + + operations: TransactionOperation[] + sequence: number + fee: number + source: string + memo: Memo +} + +export class TransactionBuilder { + constructor(sourceAccount: Account, options?: TransactionBuilder.TransactionBuilderOptions) + addOperation(operation: xdr.Operation): this + addMemo(memo: Memo): this + build(): Transaction +} + +export namespace TransactionBuilder { + interface TransactionBuilderOptions { + fee?: number + timebounds?: { + minTime?: number | string + maxTime?: number | string + } + memo?: Memo + } +} + +export class TransactionCallBuilder extends CallBuilder { + transaction(transactionId: string): this + forAccount(accountId: string): this + forLedger(sequence: string | number): this +} + +export class Keypair { + static fromRawEd25519Seed(secretSeed: Buffer): Keypair + static fromSecret(secretKey: string): Keypair + static master(): Keypair + static fromPublicKey(publicKey: string): Keypair + static random(): Keypair + + constructor(keys: { type: 'ed25519', secretKey: string } | { type: 'ed25519', Key: string }) + + publicKey(): string + secret(): string + rawSecretKey(): Buffer + canSign(): boolean + sign(data: Buffer): Buffer + verify(data: Buffer, signature: Buffer): boolean +} + +export namespace xdr { + class XDRStruct { + toXDR(): Buffer + } + class Operation extends XDRStruct { } + class Asset extends XDRStruct { } + class Memo extends XDRStruct { } + class TransactionEnvelope extends XDRStruct { } +} diff --git a/types/stellar-sdk/stellar-sdk-tests.ts b/types/stellar-sdk/stellar-sdk-tests.ts new file mode 100644 index 0000000000..c403b6bc56 --- /dev/null +++ b/types/stellar-sdk/stellar-sdk-tests.ts @@ -0,0 +1,9 @@ +import * as StellarSdk from 'stellar-sdk' + +const sourceKey = StellarSdk.Keypair.random() // $ExpectType Keypair +const destKey = StellarSdk.Keypair.random() +const account = new StellarSdk.Account(sourceKey.publicKey(), 1) +const transaction = new StellarSdk.TransactionBuilder(account) + .addOperation(StellarSdk.Operation.accountMerge({destination: destKey.publicKey()})) + .build() // $ExpectType () => Transaction +transaction // $ExpectType Transaction diff --git a/types/stellar-sdk/tsconfig.json b/types/stellar-sdk/tsconfig.json new file mode 100644 index 0000000000..12dfa57fa0 --- /dev/null +++ b/types/stellar-sdk/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "stellar-sdk-tests.ts" + ] +} diff --git a/types/stellar-sdk/tslint.json b/types/stellar-sdk/tslint.json new file mode 100644 index 0000000000..69ba71b727 --- /dev/null +++ b/types/stellar-sdk/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "quotemark": [true, "single"], + "semicolon": [true, "never"] + } +} From b21ecf8eecd7864233bd6e7c4dcc9c8eae51181f Mon Sep 17 00:00:00 2001 From: Rahul Raina Date: Thu, 8 Mar 2018 23:16:57 -0800 Subject: [PATCH 0099/1327] Updated to pull from H.History --- types/react-router/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/react-router/index.d.ts b/types/react-router/index.d.ts index 47274d71e2..01654c8304 100644 --- a/types/react-router/index.d.ts +++ b/types/react-router/index.d.ts @@ -15,6 +15,7 @@ // Daniel Roth // Egor Shulga // Youen Toupin +// Rahul Raina // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 @@ -76,7 +77,7 @@ export interface RouteProps { export class Route extends React.Component { } export interface RouterProps { - history: any; + history: H.History; } export class Router extends React.Component { } From c96aea88fe331b610471dd436c8de36844f3aecd Mon Sep 17 00:00:00 2001 From: Divyendu Singh Date: Fri, 9 Mar 2018 13:45:28 +0530 Subject: [PATCH 0100/1327] make graphql typing for getDescription conform with graphql-js --- types/graphql/index.d.ts | 4 ++++ types/graphql/utilities/buildASTSchema.d.ts | 13 +++++++++++-- types/graphql/utilities/index.d.ts | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/types/graphql/index.d.ts b/types/graphql/index.d.ts index a8bead58fd..49185e11a1 100644 --- a/types/graphql/index.d.ts +++ b/types/graphql/index.d.ts @@ -12,6 +12,7 @@ // Tim Griesser // Dylan Stewart // Alessio Dionisi +// Divyendu Singh // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -100,6 +101,9 @@ export { // Build a GraphQLSchema from a GraphQL schema language document. buildSchema, + // Get the description of an AST node + getDescription, + // Extends an existing GraphQLSchema from a parsed GraphQL Schema // language AST. extendSchema, diff --git a/types/graphql/utilities/buildASTSchema.d.ts b/types/graphql/utilities/buildASTSchema.d.ts index b20c8fc856..8ba2fcc9e9 100644 --- a/types/graphql/utilities/buildASTSchema.d.ts +++ b/types/graphql/utilities/buildASTSchema.d.ts @@ -1,7 +1,13 @@ -import { DocumentNode, Location } from '../language/ast'; +import { DocumentNode, Location, StringValueNode } from '../language/ast'; import { Source } from '../language/source'; import { GraphQLSchema } from '../type/schema'; +type BuildSchemaOptions = { + assumeValid?: boolean; + allowedLegacyNames?: ReadonlyArray; + commentDescriptions?: boolean; +}; + /** * This takes the ast of a schema document produced by the parse function in * src/language/parser.js. @@ -18,7 +24,10 @@ export function buildASTSchema(ast: DocumentNode): GraphQLSchema; * Given an ast node, returns its string description based on a contiguous * block full-line of comments preceding it. */ -export function getDescription(node: { loc?: Location }): string; +export function getDescription( + node: { description?: StringValueNode; loc?: Location }, + options: BuildSchemaOptions + ): string; /** * A helper function to build a GraphQLSchema directly from a source diff --git a/types/graphql/utilities/index.d.ts b/types/graphql/utilities/index.d.ts index cd0e23948f..c2b2c182ff 100644 --- a/types/graphql/utilities/index.d.ts +++ b/types/graphql/utilities/index.d.ts @@ -27,7 +27,7 @@ export { getOperationAST } from './getOperationAST'; export { buildClientSchema } from './buildClientSchema'; // Build a GraphQLSchema from GraphQL Schema language. -export { buildASTSchema, buildSchema } from './buildASTSchema'; +export { buildASTSchema, buildSchema, getDescription } from './buildASTSchema'; // Extends an existing GraphQLSchema from a parsed GraphQL Schema language AST. export { extendSchema } from './extendSchema'; From 439ab93ba59e1f30bcd157a6417a9f930655ffee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81rni=20Benedikt=20=C3=81rnason?= Date: Fri, 9 Mar 2018 11:46:25 +0100 Subject: [PATCH 0101/1327] Added pop and popToTop NavigationActions for react-navigation --- types/react-navigation/index.d.ts | 27 ++++++++++++++++++- .../react-navigation-tests.tsx | 12 +++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/types/react-navigation/index.d.ts b/types/react-navigation/index.d.ts index c4e396783f..2fdde0448e 100644 --- a/types/react-navigation/index.d.ts +++ b/types/react-navigation/index.d.ts @@ -247,6 +247,25 @@ export interface NavigationUriAction extends NavigationUriActionPayload { type: 'Navigation/URI'; } +export interface NavigationPopActionPayload { + // n: the number of routes to pop of the stack + n?: number; + immediate?: boolean; +} + +export interface NavigationPopAction extends NavigationPopActionPayload { + type: 'Navigation/POP'; +} + +export interface NavigationPopToTopActionPayload { + key?: string; + immediate?: boolean; +} + +export interface NavigationPopToTopAction extends NavigationPopToTopActionPayload { + type: 'Navigation/POP_TO_TOP'; +} + export interface NavigationStackViewConfig { mode?: 'card' | 'modal'; headerMode?: HeaderMode; @@ -287,7 +306,9 @@ export type NavigationStackAction = | NavigationNavigateAction | NavigationBackAction | NavigationSetParamsAction - | NavigationResetAction; + | NavigationResetAction + | NavigationPopAction + | NavigationPopToTopAction; export type NavigationTabAction = NavigationInitAction @@ -718,12 +739,16 @@ export namespace NavigationActions { const RESET: 'Navigation/RESET'; const SET_PARAMS: 'Navigation/SET_PARAMS'; const URI: 'Navigation/URI'; + const POP: 'Navigation/POP'; + const POP_TO_TOP: 'Navigation/POP_TO_TOP'; function init(options?: NavigationInitActionPayload): NavigationInitAction; function navigate(options: NavigationNavigateActionPayload): NavigationNavigateAction; function reset(options: NavigationResetActionPayload): NavigationResetAction; function back(options?: NavigationBackActionPayload): NavigationBackAction; function setParams(options: NavigationSetParamsActionPayload): NavigationSetParamsAction; + function pop(options: NavigationPopActionPayload): NavigationPopAction; + function popToTop(options: NavigationPopToTopActionPayload): NavigationPopToTopAction; } /** diff --git a/types/react-navigation/react-navigation-tests.tsx b/types/react-navigation/react-navigation-tests.tsx index 017a9b9153..49e216a35a 100644 --- a/types/react-navigation/react-navigation-tests.tsx +++ b/types/react-navigation/react-navigation-tests.tsx @@ -32,6 +32,8 @@ import { HeaderBackButton, Header, NavigationParams, + NavigationPopAction, + NavigationPopToTopAction, } from 'react-navigation'; // Constants @@ -337,3 +339,13 @@ const setParamsAction: NavigationSetParamsAction = NavigationActions.setParams({ foo: "bar" } }); + +const popAction: NavigationPopAction = NavigationActions.pop({ + n: 1, + immediate: true +}); + +const popToTopAction: NavigationPopToTopAction = NavigationActions.popToTop({ + key: "foo", + immediate: true +}) \ No newline at end of file From 43ffb4e259323ad45add91a98c70502dd683c1ce Mon Sep 17 00:00:00 2001 From: kenji_imamura Date: Fri, 9 Mar 2018 19:48:42 +0900 Subject: [PATCH 0102/1327] fix: export lory --- types/lory.js/index.d.ts | 2 +- types/lory.js/lory.js-tests.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/lory.js/index.d.ts b/types/lory.js/index.d.ts index 37ff46d4be..dd37fb8efa 100644 --- a/types/lory.js/index.d.ts +++ b/types/lory.js/index.d.ts @@ -4,7 +4,7 @@ // philip bulley // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare var lory: LoryStatic; +export declare var lory: LoryStatic; interface LoryStatic { (element: Element, options?: LoryOptions): LoryStatic; diff --git a/types/lory.js/lory.js-tests.ts b/types/lory.js/lory.js-tests.ts index bad97dadf3..616073f180 100644 --- a/types/lory.js/lory.js-tests.ts +++ b/types/lory.js/lory.js-tests.ts @@ -1,4 +1,4 @@ - +import { lory } from 'lory.js'; (function() { var elm = document.querySelector('.js-foo'); From 7a1603d26fe51ec29158609a1333a9f8ff098a3e Mon Sep 17 00:00:00 2001 From: Arnaud Duforat Date: Fri, 9 Mar 2018 12:00:59 +0100 Subject: [PATCH 0103/1327] [react-table] original property duplicated in RowInfo After the merge https://github.com/DefinitelyTyped/DefinitelyTyped/commit/87d4d9cd52c84c1fc36f7545ff541899b7e6421e#diff-7f4f664c8c5ea0cb3bbb70b9a68ef166 RowInfo has two "original" property definition. This PR delete one of them. I tried using the @types/react-table package and had problems. I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript Mention the authors so they can respond: @royxue @psakalo @Havret --- types/react-table/index.d.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/types/react-table/index.d.ts b/types/react-table/index.d.ts index 20a1c5a1fb..503b5f4e02 100644 --- a/types/react-table/index.d.ts +++ b/types/react-table/index.d.ts @@ -613,9 +613,6 @@ export interface RowInfo { /** Materialized row of data */ row: any; - /** Original row from your data */ - original: any; - /** The post-accessed values from the original row */ rowValues: any; From e5ef9ecef2e6abdf86a6ad9ef53f72136ab11bce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81rni=20Benedikt=20=C3=81rnason?= Date: Fri, 9 Mar 2018 12:01:51 +0100 Subject: [PATCH 0104/1327] Fixed lint errors --- types/react-navigation/react-navigation-tests.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-navigation/react-navigation-tests.tsx b/types/react-navigation/react-navigation-tests.tsx index 49e216a35a..0f68b653b1 100644 --- a/types/react-navigation/react-navigation-tests.tsx +++ b/types/react-navigation/react-navigation-tests.tsx @@ -348,4 +348,4 @@ const popAction: NavigationPopAction = NavigationActions.pop({ const popToTopAction: NavigationPopToTopAction = NavigationActions.popToTop({ key: "foo", immediate: true -}) \ No newline at end of file +}); From d2afa6c8554eedbf5107209474718ca9b1ef7e86 Mon Sep 17 00:00:00 2001 From: Juan Jimenez-Anca Date: Fri, 9 Mar 2018 11:21:11 +0000 Subject: [PATCH 0105/1327] create ethereumjs-util --- .../ethereumjs-util/ethereumjs-util-tests.ts | 4 + types/ethereumjs-util/index.d.ts | 83 +++++++++++++++++++ types/ethereumjs-util/tsconfig.json | 23 +++++ types/ethereumjs-util/tslint.json | 6 ++ 4 files changed, 116 insertions(+) create mode 100644 types/ethereumjs-util/ethereumjs-util-tests.ts create mode 100644 types/ethereumjs-util/index.d.ts create mode 100644 types/ethereumjs-util/tsconfig.json create mode 100644 types/ethereumjs-util/tslint.json diff --git a/types/ethereumjs-util/ethereumjs-util-tests.ts b/types/ethereumjs-util/ethereumjs-util-tests.ts new file mode 100644 index 0000000000..5159dcf758 --- /dev/null +++ b/types/ethereumjs-util/ethereumjs-util-tests.ts @@ -0,0 +1,4 @@ +import * as assert from "assert"; +import * as etherUtil from "ethereumjs-util"; + +assert.ok(etherUtil.isValidAddress("0x0bfe6d9a4d4a73857db6fac276669ba45ee69b48")); diff --git a/types/ethereumjs-util/index.d.ts b/types/ethereumjs-util/index.d.ts new file mode 100644 index 0000000000..7a29b38ff5 --- /dev/null +++ b/types/ethereumjs-util/index.d.ts @@ -0,0 +1,83 @@ +// Type definitions for ethereumjs-util 5.1 +// Project: https://github.com/ethereumjs/ethereumjs-util#readme +// Definitions by: Juan J. Jimenez-Anca +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +// TODO: import types for [`BN`](https://github.com/indutny/bn.js) +// TODO: MAX_INTEGER as type of BN +// TODO: import types for [`rlp`](https://github.com/ethereumjs/rlp) +// TODO: import types for [`secp256k1`](https://github.com/cryptocoinjs/secp256k1-node/) + +export const SHA3_NULL_S: string; + +export const SHA3_RLP_ARRAY_S: string; + +export const SHA3_RLP_S: string; + +export function addHexPrefix(str: string): string; + +export function arrayContainsArray(superset: any, subset: any, some: any): any; + +export function baToJSON(ba: Buffer | string[]): Buffer | string[]; + +export function bufferToHex(buf: Buffer): string; + +export function bufferToInt(buf: Buffer): string; + +export function defineProperties(self: {[k: string]: any}, fields: string[], data: {[k: string]: any}): {[k: string]: any}; + +export function ecrecover(msgHash: Buffer, v: number, r: Buffer, s: Buffer): Buffer; + +export function ecsign(msgHash: Buffer, privateKey: Buffer): {[k: string]: any}; + +export function fromRpcSig(sig: string): {[k: string]: any}; + +export function fromSigned(num: Buffer): any; + +export function generateAddress(from: Buffer, nonce: Buffer): Buffer; + +export function hashPersonalMessage(message: string): Buffer; + +export function importPublic(publicKey: Buffer): Buffer; + +export function isValidAddress(address: string): boolean; + +export function isValidChecksumAddress(address: Buffer): boolean; + +export function isValidPrivate(privateKey: Buffer): boolean; + +export function isValidPublic(publicKey: Buffer, sanitize?: boolean): any; + +export function isValidSignature(v: Buffer, r: Buffer, s: Buffer, homestead?: boolean): boolean; + +export function privateToAddress(privateKey: Buffer): Buffer; + +export function privateToPublic(privateKey: Buffer): Buffer; + +export function pubToAddress(pubKey: Buffer, sanitize: boolean): Buffer; + +export function ripemd160(a: Buffer | any[] | string | number, padded: boolean): Buffer; + +export function rlphash(a: Buffer | any[] | string | number): Buffer; + +export function setLengthLeft(msg: Buffer | any[], length: number, right?: boolean): Buffer | any[]; + +export function setLengthRight(msg: Buffer | any[], length: number): Buffer | any[]; + +export function sha256(a: Buffer | any[] | string | number): Buffer; + +export function sha3(a: Buffer | any[] | string | number, bits?: number): Buffer; + +export function toBuffer(v: any): Buffer; + +export function toChecksumAddress(address: string): string; + +export function toRpcSig(v: number, r: Buffer, s: Buffer): string; + +export function toUnsigned(num: any): Buffer; + +export function unpad(a: T): T; + +export function zeros(bytes: number): Buffer; diff --git a/types/ethereumjs-util/tsconfig.json b/types/ethereumjs-util/tsconfig.json new file mode 100644 index 0000000000..53f8c15b5b --- /dev/null +++ b/types/ethereumjs-util/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "ethereumjs-util-tests.ts" + ] +} \ No newline at end of file diff --git a/types/ethereumjs-util/tslint.json b/types/ethereumjs-util/tslint.json new file mode 100644 index 0000000000..4547f250b4 --- /dev/null +++ b/types/ethereumjs-util/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "no-empty-interface": false + } +} From 93fb187bf1930e131ca710695f3f3246508b5258 Mon Sep 17 00:00:00 2001 From: maksis Date: Fri, 9 Mar 2018 17:17:12 +0200 Subject: [PATCH 0106/1327] react-select: export ReactAsyncCreatableSelectProps, fix incorrect ReactAsyncSelectProps --- types/react-select/index.d.ts | 45 ++++------------------------------- 1 file changed, 4 insertions(+), 41 deletions(-) diff --git a/types/react-select/index.d.ts b/types/react-select/index.d.ts index d256bb437e..7adf0d0750 100644 --- a/types/react-select/index.d.ts +++ b/types/react-select/index.d.ts @@ -22,7 +22,7 @@ export default class ReactSelectClass extends React.Compo // Other components export class Creatable extends React.Component> { } export class Async extends React.Component> { } -export class AsyncCreatable extends React.Component & ReactCreatableSelectProps> { } +export class AsyncCreatable extends React.Component> { } export type HandlerRendererResult = JSX.Element | null | false; @@ -591,21 +591,6 @@ export interface ReactAsyncSelectProps extends ReactSelec */ cache?: { [key: string]: any } | boolean; - /** - * whether to strip diacritics when filtering (shared with Select) - */ - ignoreAccents?: boolean; - - /** - * whether to perform case-insensitive filtering (shared with Select) - */ - ignoreCase?: boolean; - - /** - * overrides the isLoading state when set to true - */ - isLoading?: boolean; - /** * function to call to load options asynchronously */ @@ -614,29 +599,7 @@ export interface ReactAsyncSelectProps extends ReactSelec /** * replaces the placeholder while options are loading */ - loadingPlaceholder?: string; - - /** - * the minimum number of characters that trigger loadOptions - */ - minimumInput?: number; - - /** - * placeholder displayed when there are no matching search results (shared with Select) - */ - noResultsText?: string | JSX.Element; - /** - * field placeholder; displayed when there's no value (shared with Select) - */ - placeholder?: string; - - /** - * label to prompt for search input - */ - searchPromptText?: string; - - /** - * message to display while options are loading - */ - searchingText?: string; + loadingPlaceholder?: string | JSX.Element; } + +export type ReactAsyncCreatableSelectProps = ReactAsyncSelectProps & ReactCreatableSelectProps; From 6325442ec9055c14715742ba5178006d8d392796 Mon Sep 17 00:00:00 2001 From: Jeremy Hon Date: Fri, 9 Mar 2018 23:59:04 +0800 Subject: [PATCH 0107/1327] replace overloaded array and dictionary params with union collection --- types/async/index.d.ts | 60 +++++++++++++----------------------------- 1 file changed, 19 insertions(+), 41 deletions(-) diff --git a/types/async/index.d.ts b/types/async/index.d.ts index 17fecb467b..e2ecb522bc 100644 --- a/types/async/index.d.ts +++ b/types/async/index.d.ts @@ -7,6 +7,7 @@ export as namespace async; export interface Dictionary { [key: string]: T; } +export type IterableCollection = T[] | IterableIterator | Dictionary export interface ErrorCallback { (err?: T): void; } export interface AsyncBooleanResultCallback { (err?: E, truthValue?: boolean): void; } @@ -36,11 +37,9 @@ export interface AsyncQueue { running(): number; idle(): boolean; concurrency: number; - push(task: T, callback?: ErrorCallback): void; + push(task: T | T[], callback?: ErrorCallback): void; push(task: T, callback?: AsyncResultCallback): void; - push(task: T[], callback?: ErrorCallback): void; - unshift(task: T, callback?: ErrorCallback): void; - unshift(task: T[], callback?: ErrorCallback): void; + unshift(task: T | T[], callback?: ErrorCallback): void; saturated: () => any; empty: () => any; drain: () => any; @@ -62,8 +61,7 @@ export interface AsyncPriorityQueue { concurrency: number; started: boolean; paused: boolean; - push(task: T, priority: number, callback?: AsyncResultArrayCallback): void; - push(task: T[], priority: number, callback?: AsyncResultArrayCallback): void; + push(task: T | T[], priority: number, callback?: AsyncResultArrayCallback): void; saturated: () => any; empty: () => any; drain: () => any; @@ -86,7 +84,6 @@ export interface AsyncCargo { length(): number; payload?: number; push(task: any, callback? : Function): void; - push(task: any[], callback? : Function): void; saturated(): void; empty(): void; drain(): void; @@ -97,39 +94,28 @@ export interface AsyncCargo { } // Collections -export function each(arr: T[] | IterableIterator, iterator: AsyncIterator, callback?: ErrorCallback): void; -export function each(arr: Dictionary, iterator: AsyncIterator, callback?: ErrorCallback): void; +export function each(arr: IterableCollection, iterator: AsyncIterator, callback?: ErrorCallback): void; export const eachSeries: typeof each; -export function eachLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncIterator, callback?: ErrorCallback): void; -export function eachLimit(arr: Dictionary, limit: number, iterator: AsyncIterator, callback?: ErrorCallback): void; +export function eachLimit(arr: IterableCollection, limit: number, iterator: AsyncIterator, callback?: ErrorCallback): void; export const forEach: typeof each; export const forEachSeries: typeof each; export const forEachLimit: typeof eachLimit; -export function forEachOf(obj: T[] | IterableIterator, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; -export function forEachOf(obj: Dictionary, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; +export function forEachOf(obj: IterableCollection, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; export const forEachOfSeries: typeof forEachOf; -export function forEachOfLimit(obj: T[] | IterableIterator, limit: number, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; -export function forEachOfLimit(obj: Dictionary, limit: number, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; +export function forEachOfLimit(obj: IterableCollection, limit: number, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; export const eachOf: typeof forEachOf; export const eachOfSeries: typeof forEachOf; export const eachOfLimit: typeof forEachOfLimit; export function map(arr: T[] | IterableIterator, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; export function map(arr: Dictionary, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; export const mapSeries: typeof map; -export function mapLimit( - arr: T[] | Dictionary | IterableIterator, - limit: number, - iterator: AsyncResultIterator, - callback?: AsyncResultArrayCallback -): void; +export function mapLimit(arr: IterableCollection, limit: number, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; export function mapValuesLimit(obj: Dictionary, limit: number, iteratee: (value: T, key: string, callback: AsyncResultCallback) => void, callback: AsyncResultObjectCallback): void; export function mapValues(obj: Dictionary, iteratee: (value: T, key: string, callback: AsyncResultCallback) => void, callback: AsyncResultObjectCallback): void; export const mapValuesSeries: typeof mapValues; -export function filter(arr: T[] | IterableIterator, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; -export function filter(arr: Dictionary, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; +export function filter(arr: IterableCollection, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; export const filterSeries: typeof filter; -export function filterLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; -export function filterLimit(arr: Dictionary, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; +export function filterLimit(arr: IterableCollection, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; export const select: typeof filter; export const selectSeries: typeof filter; export const selectLimit: typeof filterLimit; @@ -141,36 +127,28 @@ export const inject: typeof reduce; export const foldl: typeof reduce; export const reduceRight: typeof reduce; export const foldr: typeof reduce; -export function detect(arr: T[] | IterableIterator, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; -export function detect(arr: Dictionary, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; +export function detect(arr: IterableCollection, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; export const detectSeries: typeof detect; -export function detectLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; -export function detectLimit(arr: Dictionary, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; +export function detectLimit(arr: IterableCollection, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; export const find: typeof detect; export const findSeries: typeof detect; export const findLimit: typeof detectLimit; export function sortBy(arr: T[] | IterableIterator, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; -export function some(arr: T[] | IterableIterator, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; -export function some(arr: Dictionary, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; +export function some(arr: IterableCollection, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; export const someSeries: typeof some; -export function someLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; -export function someLimit(arr: Dictionary, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; +export function someLimit(arr: IterableCollection, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; export const any: typeof some; export const anySeries: typeof someSeries; export const anyLimit: typeof someLimit; -export function every(arr: T[] | IterableIterator, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; -export function every(arr: Dictionary, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; +export function every(arr: IterableCollection, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; export const everySeries: typeof every; -export function everyLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; -export function everyLimit(arr: Dictionary, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; +export function everyLimit(arr: IterableCollection, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; export const all: typeof every; export const allSeries: typeof every; export const allLimit: typeof everyLimit; -export function concat(arr: T[] | IterableIterator, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; -export function concat(arr: Dictionary, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; -export function concatLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; -export function concatLimit(arr: Dictionary, limit: number,iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; +export function concat(arr: IterableCollection, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; +export function concatLimit(arr: IterableCollection, limit: number, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; export const concatSeries: typeof concat; // Control Flow From 94a484cff48cc620df26c5625bf6545361160fce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81rni=20Benedikt=20=C3=81rnason?= Date: Fri, 9 Mar 2018 17:20:33 +0100 Subject: [PATCH 0108/1327] Overloaded navigate method to handle new navigation options parameters --- types/react-navigation/index.d.ts | 16 +++++++++++----- .../react-navigation/react-navigation-tests.tsx | 8 ++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/types/react-navigation/index.d.ts b/types/react-navigation/index.d.ts index 2fdde0448e..50f384c34e 100644 --- a/types/react-navigation/index.d.ts +++ b/types/react-navigation/index.d.ts @@ -420,12 +420,18 @@ export interface NavigationEventSubscription { export interface NavigationScreenProp { state: S; dispatch: NavigationDispatch; - goBack: (routeKey?: (string | null)) => boolean; - navigate: ( - routeName: string, + goBack: (routeKey?: string | null) => boolean; + navigate(options: { + routeName: string; + params?: NavigationParams; + action?: NavigationAction; + key?: string; + }): boolean; + navigate( + routeNameOrOptions: string, params?: NavigationParams, - action?: NavigationAction - ) => boolean; + action?: NavigationAction, + ): boolean; setParams: (newParams: NavigationParams) => boolean; addListener: ( eventName: string, diff --git a/types/react-navigation/react-navigation-tests.tsx b/types/react-navigation/react-navigation-tests.tsx index 0f68b653b1..2fcec1c53c 100644 --- a/types/react-navigation/react-navigation-tests.tsx +++ b/types/react-navigation/react-navigation-tests.tsx @@ -60,6 +60,7 @@ class StartScreen extends React.Component { return ( + ); } @@ -70,6 +71,13 @@ class StartScreen extends React.Component { }; this.props.navigation.navigate(ROUTE_NAME_NEXT_SCREEN, params); } + private readonly navigateDifferentlyToNextScreen = (): void => { + const params = { + id: this.props.navigation.state.params && this.props.navigation.state.params.id, + name: this.props.navigation.state.params && this.props.navigation.state.params.s, + }; + this.props.navigation.navigate({routeName: ROUTE_NAME_NEXT_SCREEN, params}); + } } const ROUTE_NAME_NEXT_SCREEN = "NextScreen"; From 994f2993af4742a8e67ff15f08236b7c1f0ad7cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81rni=20Benedikt=20=C3=81rnason?= Date: Fri, 9 Mar 2018 17:26:15 +0100 Subject: [PATCH 0109/1327] Revert "Overloaded navigate method to handle new navigation options parameters" This reverts commit 94a484cff48cc620df26c5625bf6545361160fce. --- types/react-navigation/index.d.ts | 16 +++++----------- .../react-navigation/react-navigation-tests.tsx | 8 -------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/types/react-navigation/index.d.ts b/types/react-navigation/index.d.ts index 50f384c34e..2fdde0448e 100644 --- a/types/react-navigation/index.d.ts +++ b/types/react-navigation/index.d.ts @@ -420,18 +420,12 @@ export interface NavigationEventSubscription { export interface NavigationScreenProp { state: S; dispatch: NavigationDispatch; - goBack: (routeKey?: string | null) => boolean; - navigate(options: { - routeName: string; - params?: NavigationParams; - action?: NavigationAction; - key?: string; - }): boolean; - navigate( - routeNameOrOptions: string, + goBack: (routeKey?: (string | null)) => boolean; + navigate: ( + routeName: string, params?: NavigationParams, - action?: NavigationAction, - ): boolean; + action?: NavigationAction + ) => boolean; setParams: (newParams: NavigationParams) => boolean; addListener: ( eventName: string, diff --git a/types/react-navigation/react-navigation-tests.tsx b/types/react-navigation/react-navigation-tests.tsx index 2fcec1c53c..0f68b653b1 100644 --- a/types/react-navigation/react-navigation-tests.tsx +++ b/types/react-navigation/react-navigation-tests.tsx @@ -60,7 +60,6 @@ class StartScreen extends React.Component { return ( - ); } @@ -71,13 +70,6 @@ class StartScreen extends React.Component { }; this.props.navigation.navigate(ROUTE_NAME_NEXT_SCREEN, params); } - private readonly navigateDifferentlyToNextScreen = (): void => { - const params = { - id: this.props.navigation.state.params && this.props.navigation.state.params.id, - name: this.props.navigation.state.params && this.props.navigation.state.params.s, - }; - this.props.navigation.navigate({routeName: ROUTE_NAME_NEXT_SCREEN, params}); - } } const ROUTE_NAME_NEXT_SCREEN = "NextScreen"; From 15545cb2981172ae287168ea1b6ab26a9902dbe7 Mon Sep 17 00:00:00 2001 From: Lance Ivy Date: Fri, 9 Mar 2018 08:52:04 -0800 Subject: [PATCH 0110/1327] add PusherStatic members --- types/pusher-js/index.d.ts | 2 ++ types/pusher-js/pusher-js-tests.ts | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/types/pusher-js/index.d.ts b/types/pusher-js/index.d.ts index a81170d09c..f73a84ee52 100644 --- a/types/pusher-js/index.d.ts +++ b/types/pusher-js/index.d.ts @@ -6,6 +6,8 @@ declare namespace pusher { interface PusherStatic { + logToConsole: boolean; + log: (msg: string) => void; new (apiKey: string, config?: Config): Pusher; } diff --git a/types/pusher-js/pusher-js-tests.ts b/types/pusher-js/pusher-js-tests.ts index dc6a9eedd7..7381c48e73 100644 --- a/types/pusher-js/pusher-js-tests.ts +++ b/types/pusher-js/pusher-js-tests.ts @@ -4,6 +4,20 @@ import { PresenceChannel } from "pusher-js"; var APP_KEY: string; var pusher: Pusher.Pusher; +/* + * samples from https://github.com/pusher/pusher-js + */ + +// +// Global Configuration +// + +Pusher.logToConsole = true; + +Pusher.log = (msg) => { + console.log(msg); +}; + // // Configuration // From 09d92860f8d6c27f4c18d6135514bb834b8bbd28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81rni=20Benedikt=20=C3=81rnason?= Date: Fri, 9 Mar 2018 17:20:33 +0100 Subject: [PATCH 0111/1327] Overloaded navigate method to handle new navigation options parameters --- types/react-navigation/index.d.ts | 16 +++++++++++----- .../react-navigation/react-navigation-tests.tsx | 8 ++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/types/react-navigation/index.d.ts b/types/react-navigation/index.d.ts index c4e396783f..52b54819f6 100644 --- a/types/react-navigation/index.d.ts +++ b/types/react-navigation/index.d.ts @@ -399,12 +399,18 @@ export interface NavigationEventSubscription { export interface NavigationScreenProp { state: S; dispatch: NavigationDispatch; - goBack: (routeKey?: (string | null)) => boolean; - navigate: ( - routeName: string, + goBack: (routeKey?: string | null) => boolean; + navigate(options: { + routeName: string; + params?: NavigationParams; + action?: NavigationAction; + key?: string; + }): boolean; + navigate( + routeNameOrOptions: string, params?: NavigationParams, - action?: NavigationAction - ) => boolean; + action?: NavigationAction, + ): boolean; setParams: (newParams: NavigationParams) => boolean; addListener: ( eventName: string, diff --git a/types/react-navigation/react-navigation-tests.tsx b/types/react-navigation/react-navigation-tests.tsx index 017a9b9153..dabf0a95f5 100644 --- a/types/react-navigation/react-navigation-tests.tsx +++ b/types/react-navigation/react-navigation-tests.tsx @@ -58,6 +58,7 @@ class StartScreen extends React.Component { return ( + ); } @@ -68,6 +69,13 @@ class StartScreen extends React.Component { }; this.props.navigation.navigate(ROUTE_NAME_NEXT_SCREEN, params); } + private readonly navigateDifferentlyToNextScreen = (): void => { + const params = { + id: this.props.navigation.state.params && this.props.navigation.state.params.id, + name: this.props.navigation.state.params && this.props.navigation.state.params.s, + }; + this.props.navigation.navigate({routeName: ROUTE_NAME_NEXT_SCREEN, params}); + } } const ROUTE_NAME_NEXT_SCREEN = "NextScreen"; From 55ece10c58c449a6a274194119881a1484258ba6 Mon Sep 17 00:00:00 2001 From: Alexander Wilczewski Date: Fri, 9 Mar 2018 17:47:42 +0000 Subject: [PATCH 0112/1327] Updated otherwise to accept a string --- types/angular-route/angular-route-tests.ts | 3 ++- types/angular-route/index.d.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/types/angular-route/angular-route-tests.ts b/types/angular-route/angular-route-tests.ts index 4d596cdfdf..677c1589ed 100644 --- a/types/angular-route/angular-route-tests.ts +++ b/types/angular-route/angular-route-tests.ts @@ -40,7 +40,8 @@ $routeProvider } }) .otherwise({ redirectTo: '/' }) - .otherwise({ redirectTo: ($routeParams?: ng.route.IRouteParamsService, $locationPath?: string, $locationSearch?: any) => "" }); + .otherwise({ redirectTo: ($routeParams?: ng.route.IRouteParamsService, $locationPath?: string, $locationSearch?: any) => "" }) + .otherwise("/"); var current: ng.route.ICurrentRoute; diff --git a/types/angular-route/index.d.ts b/types/angular-route/index.d.ts index 29c59f955c..56bd3f2263 100644 --- a/types/angular-route/index.d.ts +++ b/types/angular-route/index.d.ts @@ -138,7 +138,7 @@ declare module 'angular' { * * @params Mapping information to be assigned to $route.current. */ - otherwise(params: IRoute): IRouteProvider; + otherwise(params: IRoute | string): IRouteProvider; /** * Adds a new route definition to the $route service. * From 8570f5b439539e02f963db22058325e9ecf63919 Mon Sep 17 00:00:00 2001 From: Blayze Wilhelm Date: Fri, 9 Mar 2018 11:34:13 -0800 Subject: [PATCH 0113/1327] Sync from main repository --- types/paper/index.d.ts | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/types/paper/index.d.ts b/types/paper/index.d.ts index 3f57526a19..73e8d36636 100644 --- a/types/paper/index.d.ts +++ b/types/paper/index.d.ts @@ -1369,7 +1369,7 @@ declare module paper { * Rasterizes the item into a newly created Raster object. The item itself is not removed after rasterization. * @param resolution [optional] - the resolution of the raster in pixels per inch (DPI). If not specified, the value of view.resolution is used. default: view.resolution */ - rasterize(resolution: number): Raster; + rasterize(resolution?: number): Raster; /** * Checks whether the item's geometry contains the given point. @@ -3359,99 +3359,99 @@ declare module paper { * The view that this style belongs to. * Read only. */ - view: View; + view?: View; /** * The color of the stroke. */ - strokeColor: Color | string; + strokeColor?: Color | string; /** * The width of the stroke. */ - strokeWidth: number; + strokeWidth?: number; /** * The shape to be used at the beginning and end of open Path items, when they have a stroke. * String('round', 'square', 'butt' */ - strokeCap: string; + strokeCap?: string; /** * The shape to be used at the segments and corners of Path items when they have a stroke. * String('miter', 'round', 'bevel') */ - strokeJoin: string; + strokeJoin?: string; /** * Specifies whether the stroke is to be drawn taking the current affine transformation into account (the default behavior), or whether it should appear as a non-scaling stroke. */ - strokeScaling: boolean; + strokeScaling?: boolean; /** * The dash offset of the stroke. */ - dashOffset: number; + dashOffset?: number; /** * Specifies an array containing the dash and gap lengths of the stroke. */ - dashArray: number[]; + dashArray?: number[]; /** * The miter limit of the stroke. When two line segments meet at a sharp angle and miter joins have been specified for strokeJoin, it is possible for the miter to extend far beyond the strokeWidth of the path. The miterLimit imposes a limit on the ratio of the miter length to the strokeWidth. */ - miterLimit: number; + miterLimit?: number; /** * The fill color. */ - fillColor: Color | string; + fillColor?: Color | string; /** * The shadow color. */ - shadowColor: Color | string; + shadowColor?: Color | string; /** * The shadow's blur radius. */ - shadowBlur: number; + shadowBlur?: number; /** * The shadow's offset. */ - shadowOffset: Point; + shadowOffset?: Point; /** * The color the item is highlighted with when selected. If the item does not specify its own color, the color defined by its layer is used instead. */ - selectedColor: Color | string; + selectedColor?: Color | string; /** * The font-family to be used in text content. default 'sans-serif' */ - fontFamily: string; + fontFamily?: string; /** * The font-weight to be used in text content. */ - fontWeight: string | number; + fontWeight?: string | number; /** * The font size of text content, as {@Number} in pixels, or as {@String} with optional units 'px', 'pt' and 'em'. */ - fontSize: string | number; + fontSize?: string | number; /** * The text leading of text content. */ - leading: number | string; + leading?: number | string; /** * The justification of text paragraphs. default "left" */ - justification: string; + justification?: string; } export interface IHSBColor { From e712c102ad69f5f49875719e22bc5261cfa68122 Mon Sep 17 00:00:00 2001 From: John Barela Date: Fri, 9 Mar 2018 14:31:21 -0700 Subject: [PATCH 0114/1327] Update signature to enable responses to be used in the middleware. --- types/express-graphql/express-graphql-tests.ts | 4 ++-- types/express-graphql/index.d.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/express-graphql/express-graphql-tests.ts b/types/express-graphql/express-graphql-tests.ts index 482b15c186..6fdfc0d945 100644 --- a/types/express-graphql/express-graphql-tests.ts +++ b/types/express-graphql/express-graphql-tests.ts @@ -14,13 +14,13 @@ const graphqlOption: graphqlHTTP.OptionsObj = { extensions: (args) => { } }; -const graphqlOptionRequest = (request: express.Request): graphqlHTTP.OptionsObj => ({ +const graphqlOptionRequest = (request: express.Request, response: express.Response): graphqlHTTP.OptionsObj => ({ graphiql: true, schema: schema, context: request.session }); -const graphqlOptionRequestAsync = async (request: express.Request): Promise => { +const graphqlOptionRequestAsync = async (request: express.Request, response: express.Response): Promise => { return { graphiql: true, schema: await Promise.resolve(schema), diff --git a/types/express-graphql/index.d.ts b/types/express-graphql/index.d.ts index 166bdae6e7..ade08f1729 100644 --- a/types/express-graphql/index.d.ts +++ b/types/express-graphql/index.d.ts @@ -16,7 +16,7 @@ declare namespace graphqlHTTP { * Used to configure the graphQLHTTP middleware by providing a schema * and other configuration options. */ - export type Options = ((req: Request) => OptionsObj) | ((req: Request) => Promise) | OptionsObj + export type Options = ((req: Request, res: Response) => OptionsObj) | ((req: Request, res: Response) => Promise) | OptionsObj export type OptionsObj = { /** * A GraphQL schema from graphql-js. From 8832145d26522e154185d3af5672e1ba4c9c99b7 Mon Sep 17 00:00:00 2001 From: Jared Szechy Date: Fri, 9 Mar 2018 17:03:48 -0500 Subject: [PATCH 0115/1327] [plotly.js] Add several missing interfaces from latest version --- types/plotly.js/index.d.ts | 422 ++++++++++++++++++++++++++++++------- 1 file changed, 342 insertions(+), 80 deletions(-) diff --git a/types/plotly.js/index.d.ts b/types/plotly.js/index.d.ts index 97d439c504..225afd8c38 100644 --- a/types/plotly.js/index.d.ts +++ b/types/plotly.js/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for plotly.js 1.28 +// Type definitions for plotly.js 1.35 // Project: https://plot.ly/javascript/ // Definitions by: Chris Gervang // Martin Duparc @@ -25,9 +25,14 @@ export interface Point { } export interface PlotScatterDataPoint { - pointNumber: number; - curveNumber: number; - data: ScatterData; + curveNumber: number; + data: ScatterData; + pointIndex: number; + pointNumber: number; + x: number; + xaxis: LayoutAxis; + y: number; + yaxis: LayoutAxis; } export interface PlotMouseEvent { @@ -106,6 +111,7 @@ export function extendTraces(root: Root, update: Data | Data[], indices: number export function prependTraces(root: Root, update: Data | Data[], indices: number | number[]): Promise; export function toImage(root: Root, opts: ToImgopts): Promise; export function downloadImage(root: Root, opts: DownloadImgopts): Promise; +export function react(root: Root, data: Data[], layout?: Partial, config?: Partial): Promise; // Layout export interface Layout { @@ -113,7 +119,7 @@ export interface Layout { titlefont: Partial; autosize: boolean; showlegend: boolean; - paper_bgcolor: Color; + paper_bgcolor: Color; plot_bgcolor: Color; separators: string; hidesources: boolean; @@ -132,7 +138,7 @@ export interface Layout { width: number; hovermode: 'closest' | 'x' | 'y' | false; hoverlabel: Partial
). Tags , , + * are also supported. + */ + text: string; + + /** Sets the angle at which the `text` is drawn with respect to the horizontal. */ + textangle: string; + + /** + * Sets an explicit width for the text box. null (default) lets the + * text set the box width. Wider text will be clipped. + * There is no automatic wrapping; use
to start a new line. + */ + width: number; + + /** + * Sets an explicit height for the text box. null (default) lets the + * text set the box height. Taller text will be clipped. + */ + height: number; + + /** Sets the opacity of the annotation (text + arrow). */ + opacity: number; + + /** + * Sets the horizontal alignment of the `text` within the box. + * Has an effect only if `text` spans more two or more lines + * (i.e. `text` contains one or more
HTML tags) or if an + * explicit width is set to override the text width. + */ + align: 'left' | 'center' | 'right'; + + /** + * Sets the vertical alignment of the `text` within the box. + * Has an effect only if an explicit height is set to override the text height. + */ + valign: 'top' | 'middle' | 'bottom'; + + /** Sets the padding (in px) between the `text` and the enclosing border. */ + borderpad: number; + + /** Sets the width (in px) of the border enclosing the annotation `text`. */ + borderwidth: number; + + /** + * Determines whether or not the annotation is drawn with an arrow. + * If *true*, `text` is placed near the arrow's tail. + * If *false*, `text` lines up with the `x` and `y` provided. + */ + showarrow: boolean; + + /** Sets the color of the annotation arrow. */ + arrowcolor: string; + + /** Sets the end annotation arrow head style. */ + arrowhead: number; + + /** Sets the start annotation arrow head style. */ + startarrowhead: number; + + /** Sets the annotation arrow head position. */ + arrowside: 'end' | 'start'; + + /** + * Sets the size of the end annotation arrow head, relative to `arrowwidth`. + * A value of 1 (default) gives a head about 3x as wide as the line. + */ + arrowsize: number; + + /** + * Sets the size of the start annotation arrow head, relative to `arrowwidth`. + * A value of 1 (default) gives a head about 3x as wide as the line. + */ + startarrowsize: number; + + /** Sets the width (in px) of annotation arrow line. */ + arrowwidth: number; + + /** + * Sets a distance, in pixels, to move the end arrowhead away from the + * position it is pointing at, for example to point at the edge of + * a marker independent of zoom. Note that this shortens the arrow + * from the `ax` / `ay` vector, in contrast to `xshift` / `yshift` + * which moves everything by this amount. + */ + standoff: number; + + /** + * Sets a distance, in pixels, to move the start arrowhead away from the + * position it is pointing at, for example to point at the edge of + * a marker independent of zoom. Note that this shortens the arrow + * from the `ax` / `ay` vector, in contrast to `xshift` / `yshift` + * which moves everything by this amount. + */ + startstandoff: number; + + /** + * Sets the x component of the arrow tail about the arrow head. + * If `axref` is `pixel`, a positive (negative) + * component corresponds to an arrow pointing + * from right to left (left to right). + * If `axref` is an axis, this is an absolute value on that axis, + * like `x`, NOT a relative value. + */ + ax: number; + + /** + * Sets the y component of the arrow tail about the arrow head. + * If `ayref` is `pixel`, a positive (negative) + * component corresponds to an arrow pointing + * from bottom to top (top to bottom). + * If `ayref` is an axis, this is an absolute value on that axis, + * like `y`, NOT a relative value. + */ + ay: number; + + /** + * Indicates in what terms the tail of the annotation (ax,ay) + * is specified. If `pixel`, `ax` is a relative offset in pixels + * from `x`. If set to an x axis id (e.g. *x* or *x2*), `ax` is + * specified in the same terms as that axis. This is useful + * for trendline annotations which should continue to indicate + * the correct trend when zoomed. + */ + axref: 'pixel'; + + /** + * Indicates in what terms the tail of the annotation (ax,ay) + * is specified. If `pixel`, `ay` is a relative offset in pixels + * from `y`. If set to a y axis id (e.g. *y* or *y2*), `ay` is + * specified in the same terms as that axis. This is useful + * for trendline annotations which should continue to indicate + * the correct trend when zoomed. + */ + ayref: 'pixel'; + + /** + * Sets the annotation's x coordinate axis. + * If set to an x axis id (e.g. *x* or *x2*), the `x` position refers to an x coordinate + * If set to *paper*, the `x` position refers to the distance from + * the left side of the plotting area in normalized coordinates + * where 0 (1) corresponds to the left (right) side. + */ + xref: 'paper' | 'x'; + + /** + * Sets the annotation's x position. + * If the axis `type` is *log*, then you must take the log of your desired range. + * If the axis `type` is *date*, it should be date strings, like date data, + * though Date objects and unix milliseconds will be accepted and converted to strings. + * If the axis `type` is *category*, it should be numbers, using the scale where each + * category is assigned a serial number from zero in the order it appears. + */ + x: number | string; + + /** + * Sets the text box's horizontal position anchor + * This anchor binds the `x` position to the *left*, *center* or *right* of the annotation. + * For example, if `x` is set to 1, `xref` to *paper* and `xanchor` to *right* then the + * right-most portion of the annotation lines up with the right-most edge of the plotting area. + * If *auto*, the anchor is equivalent to *center* for data-referenced annotations or if there + * is an arrow, whereas for paper-referenced with no arrow, the anchor picked corresponds to the closest side. + */ + xanchor: 'auto' | 'left' | 'center' | 'right'; + + /** + * Shifts the position of the whole annotation and arrow to the + * right (positive) or left (negative) by this many pixels. + */ + xshift: number; + + /** + * Sets the annotation's y coordinate axis. + * If set to an y axis id (e.g. *y* or *y2*), the `y` position refers to an y coordinate + * If set to *paper*, the `y` position refers to the distance from + * the bottom of the plotting area in normalized coordinates + * where 0 (1) corresponds to the bottom (top). + */ + yref: 'paper' | 'y'; + + /** + * Sets the annotation's y position. + * If the axis `type` is *log*, then you must take the log of your desired range. + * If the axis `type` is *date*, it should be date strings, like date data, + * though Date objects and unix milliseconds will be accepted and converted to strings. + * If the axis `type` is *category*, it should be numbers, using the scale where each + * category is assigned a serial number from zero in the order it appears. + */ + y: number | string; + + /** + * Sets the text box's vertical position anchor + * This anchor binds the `y` position to the *top*, *middle* or *bottom* of the annotation. + * For example, if `y` is set to 1, `yref` to *paper* and `yanchor` to *top* then the + * top-most portion of the annotation lines up with the top-most edge of the plotting area. + * If *auto*, the anchor is equivalent to *middle* for data-referenced annotations or if + * there is an arrow, whereas for paper-referenced with no arrow, the anchor picked + * corresponds to the closest side. + */ + yanchor: 'auto' | 'top' | 'middle' | 'bottom'; + + /** + * Shifts the position of the whole annotation and arrow up + * (positive) or down (negative) by this many pixels. + */ + yshift: number; + + /** + * Makes this annotation respond to clicks on the plot. + * If you click a data point that exactly matches the `x` and `y` values of this annotation, + * and it is hidden (visible: false), it will appear. In *onoff* mode, you must click the same + * point again to make it disappear, so if you click multiple points, you can show multiple + * annotations. In *onout* mode, a click anywhere else in the plot (on another data point or not) + * will hide this annotation. If you need to show/hide this annotation in response to different + * `x` or `y` values, you can set `xclick` and/or `yclick`. This is useful for example to label + * the side of a bar. To label markers though, `standoff` is preferred over `xclick` and `yclick`. + */ + clicktoshow: false | 'onoff' | 'onout'; + + /** + * Toggle this annotation when clicking a data point whose `x` value + * is `xclick` rather than the annotation's `x` value. + */ + xclick: any; + + /** + * Toggle this annotation when clicking a data point whose `y` value + * is `yclick` rather than the annotation's `y` value. + */ + yclick: any; + + /** + * Sets text to appear when hovering over this annotation. + * If omitted or blank, no hover label will appear. + */ + hovertext: string; + + hoverlabel: Partial