diff --git a/notNeededPackages.json b/notNeededPackages.json index 010aa98828..f81984b338 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -930,6 +930,12 @@ "sourceRepoURL": "https://github.com/blakeembrey/lower-case-first", "asOfVersion": "1.0.1" }, + { + "libraryName": "mali", + "typingsPackageName": "mali", + "sourceRepoURL": "https://github.com/malijs/mali", + "asOfVersion": "0.9.2" + }, { "libraryName": "maquette", "typingsPackageName": "maquette", @@ -1200,6 +1206,12 @@ "sourceRepoURL": "https://github.com/react-ga/react-ga", "asOfVersion": "2.3.0" }, + { + "libraryName": "react-i18next", + "typingsPackageName": "react-i18next", + "sourceRepoURL": "https://github.com/i18next/react-i18next", + "asOfVersion": "8.1.0" + }, { "libraryName": "react-monaco-editor", "typingsPackageName": "react-monaco-editor", diff --git a/types/algoliasearch/algoliasearch-tests.ts b/types/algoliasearch/algoliasearch-tests.ts index b148e84599..a43a8a3b79 100644 --- a/types/algoliasearch/algoliasearch-tests.ts +++ b/types/algoliasearch/algoliasearch-tests.ts @@ -177,3 +177,31 @@ client.copyIndex('from', 'to', ()=> {}) // with scope client.copyIndex('from', 'to', ['settings']).then(()=>{}) client.copyIndex('from', 'to', ['synonyms', 'rules'], ()=> {}) + +// Browsing +const browser = index.browseAll(); +index.browseAll('query'); +index.browseAll('', { + filters: 'dog', +}); + +let hits: Object[] = []; + +browser.on('result', function onResult(content) { + hits = hits.concat(content.hits); +}); + +browser.on('end', function onEnd() { + const _message = `We got ${hits.length} hits` +}); + +browser.on('error', function onError(err) { + throw err; +}); + +browser.stop() + +index.browse("", { + advancedSyntax: false, + attributesToRetrieve: ['dogs'] +}) diff --git a/types/algoliasearch/index.d.ts b/types/algoliasearch/index.d.ts index a0bb0e0e45..bcf19b9230 100644 --- a/types/algoliasearch/index.d.ts +++ b/types/algoliasearch/index.d.ts @@ -1,11 +1,13 @@ -// Type definitions for algoliasearch-client-js 3.27.0 +// Type definitions for algoliasearch-client-js 3.30.0 // Project: https://github.com/algolia/algoliasearch-client-js // Definitions by: Baptiste Coquelle // Haroen Viaene // Aurélien Hervé // Samuel Vaillant // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.8 + +type Omit = Pick> declare namespace algoliasearch { /** @@ -611,6 +613,11 @@ declare namespace algoliasearch { options: SearchForFacetValues.Parameters, cb: (err: Error, res: SearchForFacetValues.Response) => void ): void; + /** + * Browse an index + * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse + */ + browse(query: string, parameters: BrowseParameters, cb: (err: Error, res: BrowseResponse) => void): void; /** * Browse an index * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse @@ -620,7 +627,7 @@ declare namespace algoliasearch { * Browse an index * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse */ - browse(query: string): Promise; + browse(query: string, parameters?: BrowseParameters): Promise; /** * Browse an index from a cursor * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse @@ -638,7 +645,7 @@ declare namespace algoliasearch { * Browse an entire index * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse */ - browseAll(): Promise; + browseAll(query?: string, parameters?: BrowseParameters): Browser; /** * Clear an index content * https://github.com/algolia/algoliasearch-client-js#clear-index---clearindex @@ -966,6 +973,22 @@ declare namespace algoliasearch { query: string; processingTimeMS: number; } + type BrowseParameters = Omit< + QueryParameters, + | "typoTolerance" + | "distinct" + | "facets" + | "getRankingInfo" + | "attributesToHighlight" + | "attributesToSnippet" + > + interface Browser { + on(type: "error", cb: (err: Error) => void): void + on(type: "end", cb: () => void): void + on(type: "stop", cb: () => void): void + on(type: "result", cb: (content: BrowseResponse) => void): void + stop(): void + } /** * Describes a synonym object */ diff --git a/types/algoliasearch/lite/index.d.ts b/types/algoliasearch/lite/index.d.ts index 4f068d5647..4db3ce12d3 100644 --- a/types/algoliasearch/lite/index.d.ts +++ b/types/algoliasearch/lite/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for algoliasearch-client-js 3.27.0 +// Type definitions for algoliasearch-client-js 3.30.0 // Project: https://github.com/algolia/algoliasearch-client-js // Definitions by: Baptiste Coquelle // Haroen Viaene @@ -6,7 +6,9 @@ // Samuel Vaillant // Claas Brüggemann // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.8 + +type Omit = Pick> declare namespace algoliasearch { /** @@ -130,6 +132,11 @@ declare namespace algoliasearch { options: SearchForFacetValues.Parameters, cb: (err: Error, res: SearchForFacetValues.Response) => void ): void; + /** + * Browse an index + * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse + */ + browse(query: string, parameters: BrowseParameters, cb: (err: Error, res: BrowseResponse) => void): void; /** * Browse an index * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse @@ -139,7 +146,7 @@ declare namespace algoliasearch { * Browse an index * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse */ - browse(query: string): Promise; + browse(query: string, parameters?: BrowseParameters): Promise; /** * Browse an index from a cursor * https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse @@ -194,7 +201,15 @@ declare namespace algoliasearch { query: string; processingTimeMS: number; } - + type BrowseParameters = Omit< + QueryParameters, + | "typoTolerance" + | "distinct" + | "facets" + | "getRankingInfo" + | "attributesToHighlight" + | "attributesToSnippet" + > interface QueryParameters { /** * Query string used to perform the search diff --git a/types/amqplib/index.d.ts b/types/amqplib/index.d.ts index 9ad6d9ceda..2ea088f841 100644 --- a/types/amqplib/index.d.ts +++ b/types/amqplib/index.d.ts @@ -8,7 +8,7 @@ import * as Promise from 'bluebird'; import * as events from 'events'; -import { Replies, Options, Message } from './properties'; +import { Replies, Options, Message, GetMessage, ConsumeMessage } from './properties'; export * from './properties'; export interface Connection extends events.EventEmitter { @@ -40,10 +40,10 @@ export interface Channel extends events.EventEmitter { publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish): boolean; sendToQueue(queue: string, content: Buffer, options?: Options.Publish): boolean; - consume(queue: string, onMessage: (msg: Message | null) => any, options?: Options.Consume): Promise; + consume(queue: string, onMessage: (msg: ConsumeMessage | null) => any, options?: Options.Consume): Promise; cancel(consumerTag: string): Promise; - get(queue: string, options?: Options.Get): Promise; + get(queue: string, options?: Options.Get): Promise; ack(message: Message, allUpTo?: boolean): void; ackAll(): void; diff --git a/types/amqplib/properties.d.ts b/types/amqplib/properties.d.ts index 9f96b14f5c..97dc8ac393 100644 --- a/types/amqplib/properties.d.ts +++ b/types/amqplib/properties.d.ts @@ -145,12 +145,32 @@ export interface Message { properties: MessageProperties; } -export interface MessageFields { +export interface GetMessage extends Message { + fields: GetMessageFields; +} + +export interface ConsumeMessage extends Message { + fields: ConsumeMessageFields; +} + +export interface CommonMessageFields { deliveryTag: number; redelivered: boolean; exchange: string; routingKey: string; - messageCount: string; +} + +export interface MessageFields extends CommonMessageFields { + messageCount?: number; + consumerTag?: string; +} + +export interface GetMessageFields extends CommonMessageFields { + messageCount: number; +} + +export interface ConsumeMessageFields extends CommonMessageFields { + deliveryTag: number; } export interface MessageProperties { diff --git a/types/arangodb/index.d.ts b/types/arangodb/index.d.ts index 76641f5270..5babc4a961 100644 --- a/types/arangodb/index.d.ts +++ b/types/arangodb/index.d.ts @@ -1698,7 +1698,7 @@ declare module "@arangodb/crypto" { key: string | null, token: string, noVerify?: boolean - ): string | null; + ): object | null; function md5(message: string): string; function sha1(message: string): string; function sha224(message: string): string; diff --git a/types/aws-lambda/aws-lambda-tests.ts b/types/aws-lambda/aws-lambda-tests.ts index 5fa225eafd..440f3da7e0 100644 --- a/types/aws-lambda/aws-lambda-tests.ts +++ b/types/aws-lambda/aws-lambda-tests.ts @@ -383,6 +383,8 @@ cognitoUserPoolEvent.triggerSource === "TokenGeneration_Authentication"; cognitoUserPoolEvent.triggerSource === "TokenGeneration_NewPasswordChallenge"; cognitoUserPoolEvent.triggerSource === "TokenGeneration_AuthenticateDevice"; cognitoUserPoolEvent.triggerSource === "TokenGeneration_RefreshTokens"; +cognitoUserPoolEvent.triggerSource === "UserMigration_Authentication"; +cognitoUserPoolEvent.triggerSource === "UserMigration_ForgotPassword"; str = cognitoUserPoolEvent.region; str = cognitoUserPoolEvent.userPoolId; strOrUndefined = cognitoUserPoolEvent.userName; @@ -404,6 +406,7 @@ strOrUndefined = cognitoUserPoolEvent.request.session![0].challengeMetadata; strOrUndefined = cognitoUserPoolEvent.request.challengeName; str = cognitoUserPoolEvent.request.privateChallengeParameters!["answer"]; str = cognitoUserPoolEvent.request.challengeAnswer!; +strOrUndefined = cognitoUserPoolEvent.request.password; boolOrUndefined = cognitoUserPoolEvent.response.answerCorrect; strOrUndefined = cognitoUserPoolEvent.response.smsMessage; strOrUndefined = cognitoUserPoolEvent.response.emailMessage; @@ -415,6 +418,14 @@ str = cognitoUserPoolEvent.response.publicChallengeParameters!["captchaUrl"]; str = cognitoUserPoolEvent.response.privateChallengeParameters!["answer"]; strOrUndefined = cognitoUserPoolEvent.response.challengeMetadata; boolOrUndefined = cognitoUserPoolEvent.response.answerCorrect; +str = cognitoUserPoolEvent.response.userAttributes!["username"]; +cognitoUserPoolEvent.response.finalUserStatus === "CONFIRMED"; +cognitoUserPoolEvent.response.finalUserStatus === "RESET_REQUIRED"; +cognitoUserPoolEvent.response.messageAction === "SUPPRESS"; +cognitoUserPoolEvent.response.desiredDeliveryMediums === ["EMAIL"]; +cognitoUserPoolEvent.response.desiredDeliveryMediums === ["SMS"]; +cognitoUserPoolEvent.response.desiredDeliveryMediums === ["SMS", "EMAIL"]; +boolOrUndefined = cognitoUserPoolEvent.response.forceAliasCreation; // CloudFormation Custom Resource switch (cloudformationCustomResourceEvent.RequestType) { diff --git a/types/aws-lambda/index.d.ts b/types/aws-lambda/index.d.ts index cce721e68c..aa08bf2b03 100644 --- a/types/aws-lambda/index.d.ts +++ b/types/aws-lambda/index.d.ts @@ -22,6 +22,7 @@ // Louis Larry // Daniel Papukchiev // Oliver Hookins +// James Gregory // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -234,7 +235,9 @@ export interface CognitoUserPoolTriggerEvent { | "TokenGeneration_Authentication" | "TokenGeneration_NewPasswordChallenge" | "TokenGeneration_AuthenticateDevice" - | "TokenGeneration_RefreshTokens"; + | "TokenGeneration_RefreshTokens" + | "UserMigration_Authentication" + | "UserMigration_ForgotPassword"; region: string; userPoolId: string; userName?: string; @@ -256,6 +259,7 @@ export interface CognitoUserPoolTriggerEvent { challengeName?: string; privateChallengeParameters?: { [key: string]: string }; challengeAnswer?: string; + password?: string; }; response: { autoConfirmUser?: boolean; @@ -269,6 +273,11 @@ export interface CognitoUserPoolTriggerEvent { privateChallengeParameters?: { [key: string]: string }; challengeMetadata?: string; answerCorrect?: boolean; + userAttributes?: { [key: string]: string }; + finalUserStatus?: "CONFIRMED" | "RESET_REQUIRED"; + messageAction?: "SUPPRESS"; + desiredDeliveryMediums?: Array<"EMAIL" | "SMS">; + forceAliasCreation?: boolean; }; } export type CognitoUserPoolEvent = CognitoUserPoolTriggerEvent; diff --git a/types/better-scroll/index.d.ts b/types/better-scroll/index.d.ts index 326dd2c3a0..91e5710805 100644 --- a/types/better-scroll/index.d.ts +++ b/types/better-scroll/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for better-scroll 1.12 // Project: https://github.com/ustbhuangyi/better-scroll // Definitions by: cloudstone +// jack // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -42,6 +43,24 @@ export interface PullUpOption { threshold: number; } +export interface MouseWheelOption { + speed: number; + invert: boolean; + easeTime: number; +} + +export interface ZoomOption { + start: number; + min: number; + max: number; +} + +export interface InfinityOption { + fetch: (count: number) => void; + render: (item: any, div: Element) => Element; + createTombstone: () => Element; +} + export interface BounceObjectOption { top?: boolean; bottom?: boolean; @@ -49,6 +68,10 @@ export interface BounceObjectOption { right?: boolean; } +export interface DoubleClick { + delay: number; +} + export interface EaseOption { swipe?: { style: string; @@ -73,6 +96,7 @@ export interface BsOption { directionLockThreshold: number; eventPassthrough: string | boolean; click: boolean; + dblclick: boolean | DoubleClick; tap: boolean; bounce: boolean | BounceObjectOption; bounceTime: number; @@ -140,6 +164,23 @@ export interface BsOption { * } */ pullUpLoad: Partial | boolean; + + // mouseWheel: { + // speed: 20, + // invert: false, + // easeTime: 300 + // } + mouseWheel: Partial | boolean; + + // zoom: { + // start: 1, + // min: 1, + // max: 4 + // } + zoom: Partial | boolean; + + // https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/options-advanced.html + infinity: Partial | boolean; } export interface Position { diff --git a/types/bn.js/index.d.ts b/types/bn.js/index.d.ts index 8c0bc8dd5f..db4c9f8b9e 100644 --- a/types/bn.js/index.d.ts +++ b/types/bn.js/index.d.ts @@ -45,7 +45,7 @@ interface ReductionContext { declare class BN { constructor( number: number | string | number[] | Buffer | BN, - base?: number, + base?: number | 'hex', endian?: Endianness ); constructor( diff --git a/types/caniuse-api/caniuse-api-tests.ts b/types/caniuse-api/caniuse-api-tests.ts new file mode 100644 index 0000000000..46b6a1eec4 --- /dev/null +++ b/types/caniuse-api/caniuse-api-tests.ts @@ -0,0 +1,17 @@ +import * as caniuse from "caniuse-api"; + +caniuse.features; // $ExpectType string[] + +caniuse.getSupport(""); // $ExpectType BrowserSupport + +caniuse.isSupported("", ""); // $ExpectType boolean +caniuse.isSupported("", [""]); // $ExpectType boolean + +caniuse.find(""); // $ExpectType string[] + +caniuse.getLatestStableBrowsers(); // $ExpectType string[] + +caniuse.setBrowserScope(""); // $ExpectType void +caniuse.setBrowserScope([""]); // $ExpectType void + +caniuse.getBrowserScope(); // $ExpectType string[] diff --git a/types/caniuse-api/index.d.ts b/types/caniuse-api/index.d.ts new file mode 100644 index 0000000000..ce6dac23ec --- /dev/null +++ b/types/caniuse-api/index.d.ts @@ -0,0 +1,32 @@ +// Type definitions for caniuse-api 3.0 +// Project: https://github.com/nyalab/caniuse-api#readme +// Definitions by: Dave Cardwell +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export const features: string[]; + +export interface BrowserSupport { + [browser: string]: { + y?: number; + n?: number; + a?: number; + x?: number; + }; +} + +export function getSupport(feature: string): BrowserSupport; + +export function isSupported( + feature: string, + browsers: string | ReadonlyArray +): boolean; + +export function find(query: string): string[]; + +export function getLatestStableBrowsers(): string[]; + +export function setBrowserScope( + browserscope: string | ReadonlyArray +): void; + +export function getBrowserScope(): string[]; diff --git a/types/caniuse-api/tsconfig.json b/types/caniuse-api/tsconfig.json new file mode 100644 index 0000000000..2e43754f9e --- /dev/null +++ b/types/caniuse-api/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "caniuse-api-tests.ts"] +} diff --git a/types/react-i18next/tslint.json b/types/caniuse-api/tslint.json similarity index 100% rename from types/react-i18next/tslint.json rename to types/caniuse-api/tslint.json diff --git a/types/chai/chai-tests.ts b/types/chai/chai-tests.ts index ae8a71766e..36002d9bfa 100644 --- a/types/chai/chai-tests.ts +++ b/types/chai/chai-tests.ts @@ -808,6 +808,24 @@ function frozen() { expect(Object.freeze({})).to.be.frozen; ({}).should.be.not.frozen; Object.freeze({}).should.be.frozen; + + expect([1, 2, 3]).to.have.all.members([1, 2, 3]); + expect([1, 2, 3]).to.have.all.members(Object.freeze([1, 2, 3])); + + expect({1: "", 2: "", 3: ""}).to.have.all.keys([1, 2, 3]); + expect({1: "", 2: "", 3: ""}).to.have.all.keys(Object.freeze([1, 2, 3])); + + assert.notDeepInclude([1, 2, 3], 1); + assert.notDeepInclude(Object.freeze([1, 2, 3]), 1); + + assert.include([1, 2, 3], 1); + assert.include(Object.freeze([1, 2, 3]), 1); + + assert.notInclude([1, 2, 3], 1); + assert.notInclude(Object.freeze([1, 2, 3]), 1); + + expect([1, 2, 3]).to.have.oneOf([1, 2, 3]); + expect([1, 2, 3]).to.have.oneOf(Object.freeze([1, 2, 3])); } class PoorlyConstructedError { diff --git a/types/chai/index.d.ts b/types/chai/index.d.ts index 72ebc0191d..5f73803757 100644 --- a/types/chai/index.d.ts +++ b/types/chai/index.d.ts @@ -118,7 +118,7 @@ declare namespace Chai { extensible: Assertion; sealed: Assertion; frozen: Assertion; - oneOf(list: any[], message?: string): Assertion; + oneOf(list: ReadonlyArray, message?: string): Assertion; } interface LanguageChains { @@ -235,7 +235,7 @@ declare namespace Chai { interface Keys { (...keys: string[]): Assertion; - (keys: any[]|Object): Assertion; + (keys: ReadonlyArray|Object): Assertion; } interface Throw { @@ -252,7 +252,7 @@ declare namespace Chai { } interface Members { - (set: any[], message?: string): Assertion; + (set: ReadonlyArray, message?: string): Assertion; } interface PropertyChange { @@ -696,7 +696,7 @@ declare namespace Chai { * @param needle Potential value contained in haystack. * @param message Message to display on error. */ - include(haystack: T[], needle: T, message?: string): void; + include(haystack: ReadonlyArray, needle: T, message?: string): void; /** * Asserts that haystack does not include needle. @@ -705,7 +705,7 @@ declare namespace Chai { * @param needle Potential expected substring of haystack. * @param message Message to display on error. */ - notInclude(haystack: string | any[], needle: any, message?: string): void; + notInclude(haystack: string | ReadonlyArray, needle: any, message?: string): void; /** * Asserts that haystack includes needle. Can be used to assert the inclusion of a value in an array or a subset of properties in an object. Deep equality is used. @@ -732,7 +732,7 @@ declare namespace Chai { * @param needle Potential expected substring of haystack. * @param message Message to display on error. */ - notDeepInclude(haystack: string | any[], needle: any, message?: string): void; + notDeepInclude(haystack: string | ReadonlyArray, needle: any, message?: string): void; /** * Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object. diff --git a/types/chrome-apps/index.d.ts b/types/chrome-apps/index.d.ts index 33b760ce82..567b73f2bb 100644 --- a/types/chrome-apps/index.d.ts +++ b/types/chrome-apps/index.d.ts @@ -612,7 +612,10 @@ declare namespace chrome { * @deprecated Deprecated since Chrome 36. Use innerBounds or outerBounds. */ maxHeight?: integer; - /** Type of window to create */ + /** + * @deprecated Deprecated since Chrome 69. All app windows use the 'shell' window type. + * @description Type of window to create + **/ type?: 'shell'; /** * If true, the window will have its own shelf icon. @@ -919,7 +922,8 @@ declare namespace chrome { level?: integer; } /** - * Device properties by which to filter the list of returned audio devices. If the filter is not set or set to {}, returned device list will contain all available audio devices. + * Device properties by which to filter the list of returned audio devices. + * If the filter is not set or set to {}, returned device list will contain all available audio devices. */ interface Filter { /** @@ -1083,8 +1087,9 @@ declare namespace chrome { function getDevices(callback: (devices: Device[]) => void): void; /** - * Get a list of Bluetooth devices known to the system, including paired and recently discovered devices. - * @param filter Since Chrome 67. Some criteria to filter the list of returned bluetooth devices. If the filter is not set or set to {}, returned device list will contain all bluetooth devices. Right now this is only supported in ChromeOS, for other platforms, a full list is returned. + * @since Chrome 67. + * @description Get a list of Bluetooth devices known to the system, including paired and recently discovered devices. + * @param filter Some criteria to filter the list of returned bluetooth devices. If the filter is not set or set to {}, returned device list will contain all bluetooth devices. Right now this is only supported in ChromeOS, for other platforms, a full list is returned. * @param callback Called when the search is completed. */ function getDevices(filter: DeviceFilter, callback: (devices: Device[]) => void): void; @@ -2082,12 +2087,12 @@ declare namespace chrome { /** * **Dev channel only.** * Sets image data to clipboard - * @param imageData The encoded image data. *Since Chrome 70. Warning: this is the current Beta channel.* - * @param type The type of image being passed. *Since Chrome 70. Warning: this is the current Beta channel.* + * @param imageData The encoded image data. *Since Chrome 71. Warning: this is the current Dev channel.* + * @param type The type of image being passed. *Since Chrome 71. Warning: this is the current Dev channel.* * @param [additionalItems] Additional data items for describing image data. * The callback is called with chrome.runtime.lastError set to error code if there is an error. * Requires clipboard and clipboardWrite permissions. - * *Since Chrome 70. Warning: this is the current Beta channel.* + * *Since Chrome 71. Warning: this is the current Dev channel.* * @param [callback] */ function setImageData(imageData: ArrayBuffer, type: ImageType, additionalItems?: AdditionalItems, callback?: () => void): void; @@ -3078,7 +3083,8 @@ declare namespace chrome { 'document_end' | 'document_idle'; /** - * The origin of injected CSS. + * @since Chrome 66. + * @description The origin of injected CSS. **/ type CSSOrigin = 'author' | @@ -5968,6 +5974,11 @@ declare namespace chrome { SSID?: S; /** The network signal strength. */ SignalStrength?: integer; + /** + * @since Chrome 70 + * @description The tethering state associated with the connection. + */ + TetheringState?: string; } interface WiFiProperties void>; /** - * The user clicked on a link for the app's notification settings. - * @since Chrome 32. + * @deprecated Deprecated since Chrome 65. Custom notification settings button is no longer supported. + * @description The user clicked on a link for the app's notification settings. + * As of Chrome 47, only ChromeOS has UI that dispatches this event. + * As of Chrome 65, that UI has been removed from ChromeOS, too. */ const onShowSettings: chrome.events.Event<() => void>; @@ -9319,7 +9339,10 @@ declare namespace chrome { /** The display mode height in native pixels. */ heightInNativePixels: integer; - /** The display mode UI scale factor. */ + /** + * @deprecated Deprecated since Chrome 70. Use `displayZoomFactor` + * @description The display mode UI scale factor. + **/ uiScale: integer; /** The display mode device scale factor. */ @@ -9380,15 +9403,16 @@ declare namespace chrome { * If set to true, changes the display mode to unified desktop. * If set to false, unified desktop mode will be disabled. * This is only valid for the primary display. - * If provided, mirroringSourceId must not be provided and other properties may not apply. This is has no effect if not provided. - * @see(See enableUnifiedDesktop for details). + * If provided, mirroringSourceId must not be provided and other properties may not apply. + * This is has no effect if not provided. + * @see(See `enableUnifiedDesktop` for details). * @since Chrome 59 * */ isUnified?: boolean; /** * @requires(CrOS) Chrome OS only. - * @deprecated Deprecated since Chrome 68. Use *setMirrorMode* + * @deprecated Deprecated since Chrome 68. Use ´setMirrorMode´ * @see setMirrorMode * @description * If set and not empty, enables mirroring for this display. @@ -9416,7 +9440,7 @@ declare namespace chrome { * If set, updates the display's rotation. * Legal values are [0, 90, 180, 270]. * The rotation is set clockwise, relative to the display's vertical position. - * It's applied after overscan paramter. + * It's applied after overscan parameter. */ rotation?: 0 | 90 | 180 | 270; @@ -9912,10 +9936,10 @@ declare namespace chrome { /** The language that this voice supports, in the form language-region. Examples: 'en', 'en-US', 'en-GB', 'zh-CN'. */ lang?: string; /** - * This voice's gender. - * One of: 'male', or 'female' + * @deprecated Deprecated since Chrome 70. Gender is deprecated and will be ignored. + * @description This voice's gender. */ - gender?: string; + gender?: 'male' | 'female'; /** The name of the voice. */ voiceName?: string; /** The ID of the extension providing this voice. */ @@ -9959,10 +9983,10 @@ declare namespace chrome { /** The extension ID of the speech engine to use, if known. */ extensionId?: string; /** - * Gender of voice for synthesized speech. - * One of: 'male', or 'female' + * @deprecated Deprecated since Chrome 70. Gender is deprecated and will be ignored. + * @description Gender of voice for synthesized speech. */ - gender?: string; + gender?: 'male' | 'female'; /** The TTS event types the voice must support. */ requiredEventTypes?: string[]; /** The TTS event types that you are interested in listening to. If missing, all event types may be sent. */ @@ -10983,7 +11007,7 @@ declare namespace chrome { */ class RequestMatcher { protected readonly typeGuard: 'RequestMatcher'; - constructor (parameters?: RequestMatcherFields); + constructor(parameters?: RequestMatcherFields); public readonly instanceType: string; } @@ -11001,7 +11025,7 @@ declare namespace chrome { /** Declarative event action that redirects a network request. */ class RedirectRequest { protected readonly typeGuard: 'RedirectRequest'; - constructor (parameters: RedirectRequestParams); + constructor(parameters: RedirectRequestParams); public readonly instanceType: string; } @@ -11036,7 +11060,7 @@ declare namespace chrome { */ class RedirectByRegEx { protected readonly typeGuard: 'RedirectByRegEx'; - constructor (parameters: RedirectByRegExParams); + constructor(parameters: RedirectByRegExParams); public readonly instanceType: string; } @@ -11055,7 +11079,7 @@ declare namespace chrome { */ class SetRequestHeader { protected readonly typeGuard: 'SetRequestHeader'; - constructor (parameters: SetRequestHeaderParams); + constructor(parameters: SetRequestHeaderParams); public readonly instanceType: string; } @@ -11072,7 +11096,7 @@ declare namespace chrome { */ class RemoveRequestHeader { protected readonly typeGuard: 'RemoveRequestHeader'; - constructor (parameters: RemoveRequestHeaderParams); + constructor(parameters: RemoveRequestHeaderParams); public readonly instanceType: string; } @@ -11091,7 +11115,7 @@ declare namespace chrome { */ class AddResponseHeader { protected readonly typeGuard: 'AddResponseHeader'; - constructor (parameters: AddResponseHeaderParams); + constructor(parameters: AddResponseHeaderParams); public readonly instanceType: string; } @@ -11107,7 +11131,7 @@ declare namespace chrome { */ class RemoveResponseHeader { protected readonly typeGuard: 'RemoveResponseHeader'; - constructor (parameters: RemoveResponseHeaderParams); + constructor(parameters: RemoveResponseHeaderParams); public readonly instanceType: string; } @@ -11133,7 +11157,7 @@ declare namespace chrome { */ class IgnoreRules { protected readonly typeGuard: 'IgnoreRules'; - constructor (parameters: IgnoreRulesParams); + constructor(parameters: IgnoreRulesParams); public readonly instanceType: string; } @@ -11150,7 +11174,7 @@ declare namespace chrome { */ class SendMessageToExtension { protected readonly typeGuard: 'SendMessageToExtension'; - constructor (parameters: SendMessageParams); + constructor(parameters: SendMessageParams); public readonly instanceType: string; } @@ -11248,7 +11272,7 @@ declare namespace chrome { */ class AddRequestCookie { protected readonly typeGuard: 'AddRequestCookie'; - constructor (parameters: AddCookie); + constructor(parameters: AddCookie); public readonly instanceType: string; } @@ -11259,7 +11283,7 @@ declare namespace chrome { */ class AddResponseCookie { protected readonly typeGuard: 'AddResponseCookie'; - constructor (parameters: AddCookie); + constructor(parameters: AddCookie); public readonly instanceType: string; } @@ -11292,7 +11316,7 @@ declare namespace chrome { * @param modification Attributes that shall be overridden in cookies that machted the filter. * Attributes that are set to an empty string are removed. */ - constructor (parameters: EditCookieParams); + constructor(parameters: EditCookieParams); public readonly instanceType: string; } @@ -11306,7 +11330,7 @@ declare namespace chrome { * @param filter Filter for cookies that will be modified.All empty entries are ignored. * @param modification */ - constructor (parameter: EditCookieParams); + constructor(parameter: EditCookieParams); public readonly instanceType: string; } @@ -11316,7 +11340,7 @@ declare namespace chrome { */ class RemoveRequestCookie { protected readonly typeGuard: 'RemoveRequestCookie'; - constructor (parameters: RemoveCookieParams); + constructor(parameters: RemoveCookieParams); public readonly instanceType: string; } @@ -11340,7 +11364,7 @@ declare namespace chrome { */ class RemoveResponseCookie { protected readonly typeGuard: 'RemoveResponseCookie'; - constructor (parameters: RemoveCookieParams); + constructor(parameters: RemoveCookieParams); public readonly instanceType: string; } @@ -11518,7 +11542,7 @@ declare namespace chrome { */ declare class HTMLAppViewElement extends HTMLElement { /** Create a new AppView tag */ - constructor (); + constructor(); /** * Requests another app to be embedded. * @param app The extension id of the app to be embedded. @@ -11626,7 +11650,7 @@ declare class HTMLWebViewElement extends HTMLElement { src: string; /** Create a new element */ - constructor (); + constructor(); /** * Queries audio state. @@ -11908,6 +11932,21 @@ declare class HTMLWebViewElement extends HTMLElement { */ loadDataWithBaseUrl(dataUrl: string, baseUrl: string, virtualUrl?: string): void; + /** + * @since Chrome 71 + * @description Sets spatial navigation state of the webview. + * @param enabled Spatial navigation state value. + */ + setSpatialNavigationEnabled(enabled: boolean): void; + + /** + * @since Chrome 71 + * @description Queries whether spatial navigation is enabled for the webview. + * @param callback Callback that will provide the value of the spatial navigation state. + */ + isSpatialNavigationEnabled(callback: (enabled: boolean) => void): void; + + /** * Forcibly kills the guest web page's renderer process. * This may affect multiple webview tags in the current app if they share the same process, diff --git a/types/chrome-apps/test/index.ts b/types/chrome-apps/test/index.ts index 93864d107b..499a34bab1 100644 --- a/types/chrome-apps/test/index.ts +++ b/types/chrome-apps/test/index.ts @@ -1114,6 +1114,7 @@ chrome.networking.onc.getNetworks({ 'networkType': 'All' }, (networkList) => { if (networkObj.WiFi) { // WiFi active :) console.log('Wifi BSID: ' + networkObj.WiFi.BSSID); + const state = networkObj.WiFi.TetheringState; } chrome.networking.onc.setProperties(networkObj.GUID || '', { WiFi: { @@ -1124,6 +1125,19 @@ chrome.networking.onc.getNetworks({ 'networkType': 'All' }, (networkList) => { chrome.networking.onc.getProperties(networkObj.GUID || '', (props) => { const WiFiResult = props.WiFi; }); + chrome.networking.onc.getState(networkObj.GUID || '', (state) => { + const wifiState = state.WiFi || {}; + return wifiState.TetheringState; + }); + chrome.networking.onc.getManagedProperties(networkObj.GUID || '', (result) => { + const wifiResult = result.WiFi; + if (wifiResult !== undefined) { + const managed = wifiResult.HexSSID; + if (managed !== undefined) { + return managed.UserPolicy; + } + } + }); } }); diff --git a/types/chrome/index.d.ts b/types/chrome/index.d.ts index 49f079e159..ba074550f8 100644 --- a/types/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -4525,12 +4525,12 @@ declare namespace chrome.pageAction { * Shows the page action. The page action is shown whenever the tab is selected. * @param tabId The id of the tab for which you want to modify the page action. */ - export function hide(tabId: number): void; + export function hide(tabId: number, callback?: () => void): void; /** * Shows the page action. The page action is shown whenever the tab is selected. * @param tabId The id of the tab for which you want to modify the page action. */ - export function show(tabId: number): void; + export function show(tabId: number, callback?: () => void): void; /** Sets the title of the page action. This is displayed in a tooltip over the page action. */ export function setTitle(details: TitleDetails): void; /** Sets the html document to be opened as a popup when the user clicks on the page action's icon. */ diff --git a/types/dom-loaded/dom-loaded-tests.ts b/types/dom-loaded/dom-loaded-tests.ts new file mode 100644 index 0000000000..f8a3e5486d --- /dev/null +++ b/types/dom-loaded/dom-loaded-tests.ts @@ -0,0 +1,3 @@ +import domLoaded = require("dom-loaded"); + +domLoaded.then(() => console.log("DOM is loaded")); diff --git a/types/dom-loaded/index.d.ts b/types/dom-loaded/index.d.ts new file mode 100644 index 0000000000..5d4d5154c4 --- /dev/null +++ b/types/dom-loaded/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for dom-loaded 1.0 +// Project: https://github.com/sindresorhus/dom-loaded#readme +// Definitions by: Lukas Tetzlaf +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare const domLoaded: Promise; +export = domLoaded; diff --git a/types/react-i18next/tsconfig.json b/types/dom-loaded/tsconfig.json similarity index 54% rename from types/react-i18next/tsconfig.json rename to types/dom-loaded/tsconfig.json index f90b5c3ff0..7d17914d86 100644 --- a/types/react-i18next/tsconfig.json +++ b/types/dom-loaded/tsconfig.json @@ -15,19 +15,10 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, - "jsx": "react", - "experimentalDecorators": true + "forceConsistentCasingInFileNames": true }, "files": [ "index.d.ts", - "test/react-i18next-tests.tsx", - "src/context.d.ts", - "src/I18n.d.ts", - "src/I18nextProvider.d.ts", - "src/interpolate.d.ts", - "src/loadNamespaces.d.ts", - "src/trans.d.ts", - "src/translate.d.ts" + "dom-loaded-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/react-i18next/v4/tslint.json b/types/dom-loaded/tslint.json similarity index 100% rename from types/react-i18next/v4/tslint.json rename to types/dom-loaded/tslint.json diff --git a/types/doubleclick-gpt/doubleclick-gpt-tests.ts b/types/doubleclick-gpt/doubleclick-gpt-tests.ts index 9218408268..4d29a46d91 100644 --- a/types/doubleclick-gpt/doubleclick-gpt-tests.ts +++ b/types/doubleclick-gpt/doubleclick-gpt-tests.ts @@ -41,7 +41,7 @@ googletag.openConsole(); googletag.setAdIframeTitle("title"); -googletag.cmd.push(function() { +googletag.cmd.push(() => { googletag.defineSlot("/1234567/sports", [160, 600]). addService(googletag.pubads()); }); @@ -79,8 +79,8 @@ googletag.pubads().definePassback("/1234567/sports", [468, 60]). display(); googletag.pubads().definePassback("/1234567/sports", [160, 600]). - updateTargetingFromMap({"color": "red", - "interests": ["sports", "music", "movies"]}). + updateTargetingFromMap({color: "red", + interests: ["sports", "music", "movies"]}). display(); googletag.pubads().enableLazyLoad(); @@ -262,7 +262,7 @@ googletag.pubads().updateCorrelator(); // The listener will be called only when the pubads service renders a slot. // To listen to companion ads, add a similar listener to // googletag.companionAds(). -googletag.pubads().addEventListener("slotRenderEnded", function(event: googletag.events.SlotRenderEndedEvent) { +googletag.pubads().addEventListener("slotRenderEnded", (event: googletag.events.SlotRenderEndedEvent) => { console.log("Slot has been rendered:"); console.log(event); }); @@ -273,7 +273,7 @@ googletag.pubads().addEventListener("slotRenderEnded", function(event: googletag // however, programmatically filter a listener to respond only to a certain // ad slot, using this pattern: let targetSlot = slot1; -googletag.pubads().addEventListener("slotRenderEnded", function(event: googletag.events.SlotRenderEndedEvent) { +googletag.pubads().addEventListener("slotRenderEnded", (event: googletag.events.SlotRenderEndedEvent) => { if (event.slot === targetSlot) { // Slot specific logic. } @@ -283,7 +283,7 @@ googletag.pubads().addEventListener("slotRenderEnded", function(event: googletag // The listener will be called when the impression is considered viewable. // This event also operates at service level, but, as above, you can filter // to respond only to a certain ad slot by using this pattern: -googletag.pubads().addEventListener("impressionViewable", function(event: googletag.events.ImpressionViewableEvent) { +googletag.pubads().addEventListener("impressionViewable", (event: googletag.events.ImpressionViewableEvent) => { if (event.slot === targetSlot) { // Slot specific logic. } @@ -317,7 +317,6 @@ slot.clearCategoryExclusions(); // Make an ad request. Any ad can be returned for the slot. - slot = googletag.defineSlot("/1234567/sports", [160, 600], "div-1"). setTargeting("allow_expandable", "true"). setTargeting("interests", ["sports", "music", "movies"]). diff --git a/types/doubleclick-gpt/index.d.ts b/types/doubleclick-gpt/index.d.ts index ab71cdc99a..374f410c36 100644 --- a/types/doubleclick-gpt/index.d.ts +++ b/types/doubleclick-gpt/index.d.ts @@ -1,29 +1,30 @@ -// Type definitions for Google Publisher Tag v238 +// Type definitions for Google Publisher Tag 238.0 // Project: https://developers.google.com/doubleclick-gpt/reference // Definitions by: John Wright // Steven Joyce // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 declare namespace googletag { - export type SingleSizeArray = number[]; + type SingleSizeArray = number[]; - export type NamedSize = string | string[]; + type NamedSize = string | string[]; - export type SingleSize = SingleSizeArray | NamedSize; + type SingleSize = SingleSizeArray | NamedSize; - export type MultiSize = SingleSize[]; + type MultiSize = SingleSize[]; - export type GeneralSize = SingleSize | MultiSize; + type GeneralSize = SingleSize | MultiSize; - export type SizeMapping = GeneralSize[]; + type SizeMapping = GeneralSize[]; - export type SizeMappingArray = SizeMapping[]; + type SizeMappingArray = SizeMapping[]; - export interface CommandArray { - push(f: Function): number; + interface CommandArray { + push(f: () => void): number; } - export interface Service { + interface Service { addEventListener( eventType: string, listener: (event: events.ImpressionViewableEvent | events.SlotOnloadEvent | events.SlotRenderEndedEvent | events.slotVisibilityChangedEvent) => void @@ -31,29 +32,29 @@ declare namespace googletag { getSlots(): Slot[]; } - export interface CompanionAdsService extends Service { + interface CompanionAdsService extends Service { enableSyncLoading(): void; setRefreshUnfilledSlots(value: boolean): void; } - export interface ContentService extends Service { - setContent(slot: Slot, content: String): void; + interface ContentService extends Service { + setContent(slot: Slot, content: string): void; } - export interface LazyLoadOptionsConfig { - fetchMarginPercent?: number, - renderMarginPercent?: number, - mobileScaling?: number + interface LazyLoadOptionsConfig { + fetchMarginPercent?: number; + renderMarginPercent?: number; + mobileScaling?: number; } - export interface ResponseInformation { + interface ResponseInformation { advertiserId: string; campaignId: string; creativeId?: number; lineItemId?: number; } - export interface SafeFrameConfig { + interface SafeFrameConfig { allowOverlayExpansion?: boolean; allowPushExpansion?: boolean; sandbox?: boolean; @@ -78,7 +79,7 @@ declare namespace googletag { sizeMapping(): SizeMappingBuilder; } - export interface Slot { + interface Slot { addService(service: Service): Slot; clearCategoryExclusions(): Slot; clearTargeting(opt_key?: string): Slot; @@ -100,7 +101,7 @@ declare namespace googletag { setTargeting(key: string, value: string | string[]): Slot; } - export interface PassbackSlot { + interface PassbackSlot { display(): void; get(key: string): string; set(key: string, value: string): PassbackSlot; @@ -109,10 +110,10 @@ declare namespace googletag { setTagForChildDirectedTreatment(value: number): PassbackSlot; setTagForUnderAgeOfConsent(value: number): PassbackSlot; setTargeting(key: string, value: string | string[]): PassbackSlot; - updateTargetingFromMap(map: Object): PassbackSlot; + updateTargetingFromMap(map: object): PassbackSlot; } - export interface PubAdsService extends Service { + interface PubAdsService extends Service { clear(opt_slots?: Slot[]): boolean; clearCategoryExclusions(): PubAdsService; clearTagForChildDirectedTreatment(): PubAdsService; @@ -148,23 +149,23 @@ declare namespace googletag { updateCorrelator(): PubAdsService; } - export interface SizeMappingBuilder { + interface SizeMappingBuilder { addSize(viewportSize: SingleSizeArray, slotSize: GeneralSize): SizeMappingBuilder; build(): SizeMappingArray; } - export namespace events { - export interface ImpressionViewableEvent { + namespace events { + interface ImpressionViewableEvent { serviceName: string; slot: Slot; } - export interface SlotOnloadEvent { + interface SlotOnloadEvent { serviceName: string; slot: Slot; } - export interface SlotRenderEndedEvent { + interface SlotRenderEndedEvent { advertiserId?: number; creativeId?: number; isEmpty: boolean; @@ -176,7 +177,7 @@ declare namespace googletag { sourceAgnosticLineItemId?: number; } - export interface slotVisibilityChangedEvent { + interface slotVisibilityChangedEvent { inViewPercentage: number; serviceName: string; slot: Slot; diff --git a/types/doubleclick-gpt/tsconfig.json b/types/doubleclick-gpt/tsconfig.json index d240d560ce..7fff409f80 100644 --- a/types/doubleclick-gpt/tsconfig.json +++ b/types/doubleclick-gpt/tsconfig.json @@ -1,5 +1,4 @@ { - "compileOnSave": false, "compilerOptions": { "module": "commonjs", "lib": [ @@ -22,4 +21,4 @@ "index.d.ts", "doubleclick-gpt-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/doubleclick-gpt/tslint.json b/types/doubleclick-gpt/tslint.json index a41bf5d19a..f93cf8562a 100644 --- a/types/doubleclick-gpt/tslint.json +++ b/types/doubleclick-gpt/tslint.json @@ -1,79 +1,3 @@ { - "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 - } + "extends": "dtslint/dt.json" } diff --git a/types/draft-js/index.d.ts b/types/draft-js/index.d.ts index aea132cb3d..4f2c34dd3a 100644 --- a/types/draft-js/index.d.ts +++ b/types/draft-js/index.d.ts @@ -989,6 +989,8 @@ import getVisibleSelectionRect = Draft.Component.Selection.getVisibleSelectionRe import DraftEditorCommand = Draft.Model.Constants.DraftEditorCommand; import DraftDragType = Draft.Model.Constants.DraftDragType; import DraftBlockType = Draft.Model.Constants.DraftBlockType; +import DraftBlockRenderConfig = Draft.Model.ImmutableData.DraftBlockRenderConfig; +import DraftBlockRenderMap = Draft.Component.Base.DraftBlockRenderMap; import DraftInlineStyleType = Draft.Model.Constants.DraftInlineStyleType; import DraftEntityMutability = Draft.Model.Constants.DraftEntityMutability; import DraftEntityType = Draft.Model.Constants.DraftEntityType; @@ -1039,6 +1041,8 @@ export { DraftEditorCommand, DraftDragType, DraftBlockType, + DraftBlockRenderConfig, + DraftBlockRenderMap, DraftInlineStyleType, DraftEntityType, DraftEntityMutability, diff --git a/types/dragula/dragula-tests.ts b/types/dragula/dragula-tests.ts index 5f143406c3..0e6280ae61 100644 --- a/types/dragula/dragula-tests.ts +++ b/types/dragula/dragula-tests.ts @@ -30,3 +30,14 @@ var drake = dragula({ copy: true }); drake.containers.push(document.querySelector('#container')); + +dragula([document.getElementById('left'), document.getElementById('right')]) + .on('drag', function (el: Element) { + el.className = el.className.replace('ex-moved', ''); + }).on('drop', function (el: Element) { + el.className += ' ex-moved'; + }).on('over', function (el: Element, container: Element) { + container.className += ' ex-over'; + }).on('out', function (el: Element, container: Element) { + container.className = container.className.replace('ex-over', ''); + }); diff --git a/types/dragula/index.d.ts b/types/dragula/index.d.ts index 51998fb583..925a586971 100644 --- a/types/dragula/index.d.ts +++ b/types/dragula/index.d.ts @@ -33,7 +33,7 @@ declare namespace dragula { cancel(revert:boolean): void; cancel(): void; remove(): void; - on(events: string, callback: Function): void; + on(events: string, callback: Function): Drake; destroy(): void; } diff --git a/types/ember-data/index.d.ts b/types/ember-data/index.d.ts index dc8edec397..601a45faf3 100644 --- a/types/ember-data/index.d.ts +++ b/types/ember-data/index.d.ts @@ -1132,7 +1132,7 @@ export namespace DS { * This method unloads all records in the store. * It schedules unloading to happen during the next run loop. */ - unloadAll(modelName: K): void; + unloadAll(modelName?: K): void; /** * DEPRECATED: * This method has been deprecated and is an alias for store.hasRecordForId, which should diff --git a/types/ember-data/test/store.ts b/types/ember-data/test/store.ts index d3641a6c68..9c1194c711 100644 --- a/types/ember-data/test/store.ts +++ b/types/ember-data/test/store.ts @@ -205,3 +205,6 @@ declare module 'ember-data/types/registries/serializer' { assertType(store.adapterFor('user')); assertType(store.serializerFor('user')); + +store.unloadAll(); +store.unloadAll('user'); diff --git a/types/ember-data/v2/index.d.ts b/types/ember-data/v2/index.d.ts index dccf63e890..3afd091ffe 100644 --- a/types/ember-data/v2/index.d.ts +++ b/types/ember-data/v2/index.d.ts @@ -1094,7 +1094,7 @@ export namespace DS { * This method unloads all records in the store. * It schedules unloading to happen during the next run loop. */ - unloadAll(modelName: K): void; + unloadAll(modelName?: K): void; /** * DEPRECATED: * This method has been deprecated and is an alias for store.hasRecordForId, which should diff --git a/types/ember-data/v2/test/store.ts b/types/ember-data/v2/test/store.ts index f512afd8a7..2584e7bdf3 100644 --- a/types/ember-data/v2/test/store.ts +++ b/types/ember-data/v2/test/store.ts @@ -203,3 +203,6 @@ declare module 'ember-data' { assertType(store.adapterFor('user')); assertType(store.serializerFor('user')); + +store.unloadAll(); +store.unloadAll('user'); diff --git a/types/ember__object/internals.d.ts b/types/ember__object/internals.d.ts index e920311d45..518d777a46 100644 --- a/types/ember__object/internals.d.ts +++ b/types/ember__object/internals.d.ts @@ -1,4 +1,4 @@ -import { UnwrapComputedPropertyGetter } from '@ember/object/-private/types'; +import { UnwrapComputedPropertyGetter } from "@ember/object/-private/types"; /** * Returns the cached value for a property, if one exists. @@ -13,6 +13,11 @@ export function cacheFor( /** * Creates a shallow copy of the passed object. A deep copy of the object is * returned if the optional `deep` argument is `true`. + * + * @deprecated as of Ember 3.3, to be removed in Ember 4.0. See how to migrate + * [here][deprecation]. + * + * [deprecation]: https://emberjs.com/deprecations/v3.x#toc_ember-runtime-deprecate-copy-copyable */ export function copy(obj: T, deep: true): T; export function copy(obj: any, deep?: boolean): any; diff --git a/types/eslint/eslint-tests.ts b/types/eslint/eslint-tests.ts index b0c3c1966d..c6b8b786fa 100644 --- a/types/eslint/eslint-tests.ts +++ b/types/eslint/eslint-tests.ts @@ -62,7 +62,9 @@ sourceCode.getNodeByRangeIndex(0); sourceCode.isSpaceBetweenTokens(TOKEN, TOKEN); -sourceCode.getLocFromIndex(0); +const loc = sourceCode.getLocFromIndex(0); +loc.line; // $ExpectType number +loc.column; // $ExpectType number sourceCode.getIndexFromLoc({ line: 0, column: 0 }); diff --git a/types/eslint/index.d.ts b/types/eslint/index.d.ts index 031ab984f7..451477af40 100644 --- a/types/eslint/index.d.ts +++ b/types/eslint/index.d.ts @@ -136,7 +136,7 @@ export class SourceCode { isSpaceBetweenTokens(first: AST.Token, second: AST.Token): boolean; - getLocFromIndex(index: number): ESTree.SourceLocation; + getLocFromIndex(index: number): ESTree.Position; getIndexFromLoc(location: ESTree.Position): number; diff --git a/types/gapi.auth2/gapi.auth2-tests.ts b/types/gapi.auth2/gapi.auth2-tests.ts index 16818e414e..1fc03f7f4f 100644 --- a/types/gapi.auth2/gapi.auth2-tests.ts +++ b/types/gapi.auth2/gapi.auth2-tests.ts @@ -55,8 +55,8 @@ function test_render() { const success = (googleUser: gapi.auth2.GoogleUser): void => { console.log(googleUser); }; - const failure = (): void => { - console.log('Failure callback'); + const failure = (reason: { error: string }): void => { + console.log(`Failure callback: ${reason.error}`); }; gapi.signin2.render('testId', { diff --git a/types/gapi.auth2/index.d.ts b/types/gapi.auth2/index.d.ts index fdb4c08cc3..bd40ce9650 100644 --- a/types/gapi.auth2/index.d.ts +++ b/types/gapi.auth2/index.d.ts @@ -349,7 +349,7 @@ declare namespace gapi.signin2 { /** * The callback function to call when sign-in fails (default: none). */ - onfailure?(): void; + onfailure?(reason: { error: string }): void; /** * The package name of the Android app to install over the air. See diff --git a/types/git-rev-sync/git-rev-sync-tests.ts b/types/git-rev-sync/git-rev-sync-tests.ts new file mode 100644 index 0000000000..380a1069ed --- /dev/null +++ b/types/git-rev-sync/git-rev-sync-tests.ts @@ -0,0 +1,13 @@ +import * as gitRevSync from "git-rev-sync"; + +gitRevSync.branch(); +gitRevSync.count(); +gitRevSync.date(); +gitRevSync.isDirty(); +gitRevSync.isTagDirty(); +gitRevSync.long(); +gitRevSync.message(); +gitRevSync.remoteUrl(); +gitRevSync.short(); +gitRevSync.short(); +gitRevSync.tag(); diff --git a/types/git-rev-sync/index.d.ts b/types/git-rev-sync/index.d.ts new file mode 100644 index 0000000000..e982f6b9ff --- /dev/null +++ b/types/git-rev-sync/index.d.ts @@ -0,0 +1,15 @@ +// Type definitions for git-rev-sync 1.12 +// Project: https://github.com/kurttheviking/git-rev-sync-js +// Definitions by: khoi-fish +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function short(filePath?: string, length?: number): string; +export function long(filePath?: string): string; +export function branch(branch?: string): void; +export function count(): number; +export function date(): Date; +export function isDirty(): boolean; +export function isTagDirty(): boolean; +export function message(): string; +export function remoteUrl(): string; +export function tag(makeDirty?: boolean): string; diff --git a/types/git-rev-sync/tsconfig.json b/types/git-rev-sync/tsconfig.json new file mode 100644 index 0000000000..4ab561dfec --- /dev/null +++ b/types/git-rev-sync/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "git-rev-sync-tests.ts"] +} diff --git a/types/git-rev-sync/tslint.json b/types/git-rev-sync/tslint.json new file mode 100644 index 0000000000..1bec602599 --- /dev/null +++ b/types/git-rev-sync/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "dt-header": true + } +} diff --git a/types/graphql-resolvers/graphql-resolvers-tests.ts b/types/graphql-resolvers/graphql-resolvers-tests.ts new file mode 100644 index 0000000000..3acb3ccf27 --- /dev/null +++ b/types/graphql-resolvers/graphql-resolvers-tests.ts @@ -0,0 +1,19 @@ +import { + combineResolvers, + pipeResolvers, + allResolvers, + resolveDependee, + resolveDependees, + isDependee, + skip +} from "graphql-resolvers"; + +const resolverOne = () => skip; +const resolverTwo = () => skip; + +const combined = combineResolvers(resolverOne, resolverTwo); +const piped = pipeResolvers(resolverOne, resolverTwo); +const all = allResolvers([resolverOne, resolverTwo]); +const dependee = resolveDependee("resolverOne"); +const dependees = resolveDependees(["resolverOne", "resolverTwo"]); +const isDependent = isDependee(resolverOne); diff --git a/types/graphql-resolvers/index.d.ts b/types/graphql-resolvers/index.d.ts new file mode 100644 index 0000000000..292c22cf73 --- /dev/null +++ b/types/graphql-resolvers/index.d.ts @@ -0,0 +1,37 @@ +// Type definitions for graphql-resolvers 0.2 +// Project: https://github.com/lucasconstantino/graphql-resolvers#readme +// Definitions by: Mike Engel +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import { IFieldResolver } from "graphql-tools"; + +export const skip: undefined; + +export interface TArgs { + [argument: string]: any; +} + +export function combineResolvers( + ...resolvers: Array> +): IFieldResolver; + +export function pipeResolvers( + ...resolvers: Array> +): IFieldResolver; + +export function allResolvers( + resolvers: Array> +): IFieldResolver; + +export function resolveDependee( + dependeeName: string +): IFieldResolver; + +export function resolveDependees( + dependeeNames: string[] +): IFieldResolver; + +export function isDependee( + resolver: IFieldResolver +): IFieldResolver; diff --git a/types/graphql-resolvers/package.json b/types/graphql-resolvers/package.json new file mode 100644 index 0000000000..a3e9046d27 --- /dev/null +++ b/types/graphql-resolvers/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "graphql-tools": "^4.0.2" + } +} diff --git a/types/graphql-resolvers/tsconfig.json b/types/graphql-resolvers/tsconfig.json new file mode 100644 index 0000000000..602aa171ad --- /dev/null +++ b/types/graphql-resolvers/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6", "esnext.asynciterable"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "graphql-resolvers-tests.ts"] +} diff --git a/types/graphql-resolvers/tslint.json b/types/graphql-resolvers/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/graphql-resolvers/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/gsap/Animation.d.ts b/types/gsap/Animation.d.ts index 3c58f9b12a..8744e205bf 100644 --- a/types/gsap/Animation.d.ts +++ b/types/gsap/Animation.d.ts @@ -1,9 +1,14 @@ declare namespace gsap { - export class Animation { - /** Base class for all TweenLite, TweenMax, TimelineLite, and TimelineMax classes, providing core methods/properties/() => voidality, but there is no reason to create an instance of this class directly. */ + class Animation { + /** + * Base class for all TweenLite, TweenMax, TimelineLite, and TimelineMax classes, providing core methods/properties/() => voidality, but there is no reason to create an instance of this + * class directly. + */ constructor(duration?: number, vars?: any); - /** A place to store any data you want (initially populated with vars.data if it exists). */ + /** + * A place to store any data you want (initially populated with vars.data if it exists). + */ data: any; /** [Read-only] Parent timeline. */ @@ -20,14 +25,23 @@ declare namespace gsap { duration(): number; duration(value: number): Animation; - /** Gets or sets an event callback like "onComplete", "onUpdate", "onStart", "onReverseComplete" or "onRepeat" (onRepeat only applies to TweenMax or TimelineMax instances) along with any parameters that should be passed to that callback. */ + /** + * Gets or sets an event callback like "onComplete", "onUpdate", "onStart", "onReverseComplete" or "onRepeat" (onRepeat only applies to TweenMax or TimelineMax instances) along with any + * parameters that should be passed to that callback. + */ eventCallback(type: string): () => void; eventCallback(type: string, callback: () => void, params?: any[], scope?: any): Animation; - /** Clears any initialization data (like starting/ending values in tweens) which can be useful if, for example, you want to restart a tween without reverting to any previously recorded starting values. */ + /** + * Clears any initialization data (like starting/ending values in tweens) which can be useful if, for example, you want to restart a tween without reverting to any previously recorded + * starting values. + */ invalidate(): Animation; - /** Indicates whether or not the animation is currently active (meaning the virtual playhead is actively moving across this instance's time span and it is not paused, nor are any of its ancestor timelines). */ + /** + * Indicates whether or not the animation is currently active (meaning the virtual playhead is actively moving across this instance's time span and it is not paused, nor are any of its + * ancestor timelines). + */ isActive(): boolean; /** Kills the animation entirely or in part depending on the parameters. */ @@ -43,7 +57,10 @@ declare namespace gsap { /** Begins playing forward, optionally from a specific time (by default playback begins from wherever the playhead currently is). */ play(from?: any, suppressEvents?: boolean): Animation; - /** Gets or sets the animations's progress which is a value between 0 and 1 indicating the position of the virtual playhead (excluding repeats) where 0 is at the beginning, 0.5 is at the halfway point, and 1 is at the end (complete). */ + /** + * Gets or sets the animations's progress which is a value between 0 and 1 indicating the position of the virtual playhead (excluding repeats) where 0 is at the beginning, 0.5 is at the + * halfway point, and 1 is at the end (complete). + */ progress(): number; progress(value: number, suppressEvents?: boolean): Animation; @@ -67,7 +84,10 @@ declare namespace gsap { startTime(): number; startTime(value: number): Animation; - /** Gets or sets the local position of the playhead (essentially the current time), described in seconds (or frames for frames-based animations) which will never be less than 0 or greater than the animation's duration. */ + /** + * Gets or sets the local position of the playhead (essentially the current time), described in seconds (or frames for frames-based animations) which will never be less than 0 or greater + * than the animation's duration. + */ time(): number; time(value: number, suppressEvents?: boolean): Animation; @@ -79,7 +99,10 @@ declare namespace gsap { totalDuration(): number; totalDuration(value: number): Animation; - /** Gets or sets the animation's total progress which is a value between 0 and 1 indicating the position of the virtual playhead (including repeats) where 0 is at the beginning, 0.5 is at the halfway point, and 1 is at the end (complete). */ + /** + * Gets or sets the animation's total progress which is a value between 0 and 1 indicating the position of the virtual playhead (including repeats) where 0 is at the beginning, 0.5 is at + * the halfway point, and 1 is at the end (complete). + */ totalProgress(): number; totalProgress(value: number, suppressEvents?: boolean): Animation; diff --git a/types/gsap/Ease.d.ts b/types/gsap/Ease.d.ts index ea2d7e1d84..56603b5ed1 100644 --- a/types/gsap/Ease.d.ts +++ b/types/gsap/Ease.d.ts @@ -1,52 +1,51 @@ declare namespace gsap { - export class Ease { + class Ease { constructor(func?: () => void, extraParams?: any[], type?: number, power?: number); /** Translates the tween's progress ratio into the corresponding ease ratio. */ getRatio(p: number): number; } - export class EaseLookup { - static find(name: string): Ease; + interface EaseLookup { + find(name: string): Ease; } - export class Back extends Ease { + class Back extends Ease { static easeIn: Back; static easeInOut: Back; static easeOut: Back; config(overshoot: number): Elastic; - } - export class Bounce extends Ease { + class Bounce extends Ease { static easeIn: Bounce; static easeInOut: Bounce; static easeOut: Bounce; } - export class Circ extends Ease { + class Circ extends Ease { static easeIn: Circ; static easeInOut: Circ; static easeOut: Circ; } - export class Cubic extends Ease { + class Cubic extends Ease { static easeIn: Cubic; static easeInOut: Cubic; static easeOut: Cubic; } - export class Elastic extends Ease { + class Elastic extends Ease { static easeIn: Elastic; static easeInOut: Elastic; static easeOut: Elastic; config(amplitude: number, period: number): Elastic; } - export class Expo extends Ease { + class Expo extends Ease { static easeIn: Expo; static easeInOut: Expo; static easeOut: Expo; } - export class Linear extends Ease { + class Linear extends Ease { static ease: Linear; static easeIn: Linear; static easeInOut: Linear; @@ -54,60 +53,59 @@ declare namespace gsap { static easeOut: Linear; } - export class Quad extends Ease { + class Quad extends Ease { static easeIn: Quad; static easeInOut: Quad; static easeOut: Quad; } - export class Quart extends Ease { + class Quart extends Ease { static easeIn: Quart; static easeInOut: Quart; static easeOut: Quart; } - export class Quint extends Ease { + class Quint extends Ease { static easeIn: Quint; static easeInOut: Quint; static easeOut: Quint; } - export class Sine extends Ease { + class Sine extends Ease { static easeIn: Sine; static easeInOut: Sine; static easeOut: Sine; } - export class SlowMo extends Ease { + class SlowMo extends Ease { static ease: SlowMo; config(linearRatio: number, power: number, yoyoMode: boolean): SlowMo; } - export class SteppedEase extends Ease { + class SteppedEase extends Ease { constructor(staps: number); config(steps: number): SteppedEase; } - export interface RoughEaseConfig { + interface RoughEaseConfig { clamp?: boolean; points?: number; randomize?: boolean; strength?: number; - taper?: 'in' | 'out' | 'both' | 'none'; + taper?: "in" | "out" | "both" | "none"; template?: Ease; } - export class RoughEase extends Ease { + class RoughEase extends Ease { static ease: RoughEase; constructor(vars: RoughEaseConfig); config(steps?: number): RoughEase; } - - export var Power0: typeof Linear; - export var Power1: typeof Quad; - export var Power2: typeof Cubic; - export var Power3: typeof Quart; - export var Power4: typeof Quint; - export var Strong: typeof Quint; + const Power0: typeof Linear; + const Power1: typeof Quad; + const Power2: typeof Cubic; + const Power3: typeof Quart; + const Power4: typeof Quint; + const Strong: typeof Quint; } diff --git a/types/gsap/Plugins.d.ts b/types/gsap/Plugins.d.ts index d7ceca7bf8..3d6e3db73e 100644 --- a/types/gsap/Plugins.d.ts +++ b/types/gsap/Plugins.d.ts @@ -1,15 +1,15 @@ declare namespace gsap { - export interface BezierPlugin extends TweenPlugin { + interface BezierPlugin extends TweenPlugin { bezierThrough(values: any[], curviness?: number, quadratic?: boolean, correlate?: string, prepend?: {}, calcDifs?: boolean): {}; cubicToQuadratic(a: number, b: number, c: number, d: number): any[]; quadraticToCubic(a: number, b: number, c: number): {}; } - export interface CSSRulePlugin extends TweenPlugin { + interface CSSRulePlugin extends TweenPlugin { getRule(selector: string): {}; } - export interface TweenPlugin { + interface TweenPlugin { activate(plugins: any[]): boolean; } } diff --git a/types/gsap/Timeline.d.ts b/types/gsap/Timeline.d.ts index 9d14b2d4c5..60292e354d 100644 --- a/types/gsap/Timeline.d.ts +++ b/types/gsap/Timeline.d.ts @@ -1,8 +1,11 @@ declare namespace gsap { - export type Timeline = SimpleTimeline | TimelineLite | TimelineMax; + type Timeline = SimpleTimeline | TimelineLite | TimelineMax; - export class SimpleTimeline extends Animation { - /** SimpleTimeline is the base class for TimelineLite and TimelineMax, providing the most basic timeline () => voidality and it is used for the root timelines in TweenLite but is only intended for internal use in the GreenSock tweening platform. It is meant to be very fast and lightweight. */ + class SimpleTimeline extends Animation { + /** + * SimpleTimeline is the base class for TimelineLite and TimelineMax, providing the most basic timeline () => voidality and it is used for the root timelines in TweenLite but is only + * intended for internal use in the GreenSock tweening platform. It is meant to be very fast and lightweight. + */ constructor(vars?: any); /** If true, child tweens/timelines will be removed as soon as they complete. */ @@ -18,7 +21,7 @@ declare namespace gsap { render(time: number, suppressEvents?: boolean, force?: boolean): SimpleTimeline; } - export class TimelineLite extends SimpleTimeline { + class TimelineLite extends SimpleTimeline { constructor(vars?: {}); /** Adds a tween, timeline, callback, or label (or an array of them) to the timeline. */ @@ -30,7 +33,10 @@ declare namespace gsap { /** Inserts a special callback that pauses playback of the timeline at a particular time or label. */ addPause(position?: any, callback?: () => void, params?: any[], scope?: any): TimelineLite; - /** Adds a callback to the end of the timeline (or elsewhere using the "position" parameter) - this is a convenience method that accomplishes exactly the same thing as add( TweenLite.delayedCall(...) ) but with less code. */ + /** + * Adds a callback to the end of the timeline (or elsewhere using the "position" parameter) - this is a convenience method that accomplishes exactly the same thing as + * add( TweenLite.delayedCall(...) ) but with less code. + */ call(callback: () => void, params?: any[], scope?: any, position?: any): TimelineLite; /** Empties the timeline of all tweens, timelines, and callbacks (and optionally labels too). */ @@ -39,10 +45,16 @@ declare namespace gsap { /** Returns the time at which the animation will finish according to the parent timeline's local time. */ endTime(includeRepeats?: boolean): number; - /** Seamlessly transfers all tweens, timelines, and [optionally] delayed calls from the root timeline into a new TimelineLite so that you can perform advanced tasks on a seemingly global basis without affecting tweens/timelines that you create after the export. */ + /** + * Seamlessly transfers all tweens, timelines, and [optionally] delayed calls from the root timeline into a new TimelineLite so that you can perform advanced tasks on a seemingly global + * basis without affecting tweens/timelines that you create after the export. + */ static exportRoot(vars?: {}, omitDelayedCalls?: boolean): TimelineLite; - /** Adds a TweenLite.from() tween to the end of the timeline (or elsewhere using the "position" parameter) - this is a convenience method that accomplishes exactly the same thing as add( TweenLite.from(...) ) but with less code. */ + /** + * Adds a TweenLite.from() tween to the end of the timeline (or elsewhere using the "position" parameter) - this is a convenience method that accomplishes exactly the same thing as + * add( TweenLite.from(...) ) but with less code. + */ from(target: {}, duration: number, vars: {}, position?: any): TimelineLite; /** Adds a TweenLite.fromTo() tween to the end of the timeline - this is a convenience method that accomplishes exactly the same thing as add( TweenLite.fromTo(...) ) but with less code. */ @@ -57,7 +69,10 @@ declare namespace gsap { /** Returns the tweens of a particular object that are inside this timeline. */ getTweensOf(target: {}, nested?: boolean): Tween[]; - /** Clears any initialization data (like starting/ending values in tweens) which can be useful if, for example, you want to restart a tween without reverting to any previously recorded starting values. */ + /** + * Clears any initialization data (like starting/ending values in tweens) which can be useful if, for example, you want to restart a tween without reverting to any previously recorded + * starting values. + */ invalidate(): TimelineLite; /** Returns the most recently added child tween/timeline/callback regardless of its position in the timeline. */ @@ -72,22 +87,65 @@ declare namespace gsap { /** Jumps to a specific time (or label) without affecting whether or not the instance is paused or reversed. */ seek(position: string | number, supressEvents: boolean): TimelineLite; - /** Adds a zero-duration tween to the end of the timeline (or elsewhere using the "position" parameter) that sets values immediately (when the virtual playhead reaches that position on the timeline) - this is a convenience method that accomplishes exactly the same thing as add( TweenLite.to(target, 0, {...}) ) but with less code. */ + /** + * Adds a zero-duration tween to the end of the timeline (or elsewhere using the "position" parameter) that sets values immediately (when the virtual playhead reaches that + * position on the timeline) - this is a convenience method that accomplishes exactly the same thing as add( TweenLite.to(target, 0, {...}) ) but with less code. + */ set(target: {}, vars: {}, position?: any): TimelineLite; /** Shifts the startTime of the timeline's children by a certain amount and optionally adjusts labels too. */ shiftChildren(amount: number, adjustLabels?: boolean, ignoreBeforeTime?: number): TimelineLite; - /** Tweens an array of targets from a common set of destination values (using the current values as the destination), but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly small amount of code. */ - staggerFrom(targets: any, duration: number, vars: {}, stagger?: number, position?: any, onCompleteAll?: () => void, onCompleteAllParams?: any[], onCompleteScope?: any): TimelineLite; + /** + * Tweens an array of targets from a common set of destination values (using the current values as the destination), but staggers their start times by a specified amount of time, + * creating an evenly-spaced sequence with a surprisingly small amount of code. + */ + staggerFrom( + targets: any, + duration: number, + vars: {}, + stagger?: number, + position?: any, + onCompleteAll?: () => void, + onCompleteAllParams?: any[], + onCompleteScope?: any + ): TimelineLite; - /** Tweens an array of targets from and to a common set of values, but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly small amount of code. */ - staggerFromTo(targets: any, duration: number, fromVars: {}, toVars: {}, stagger?: number, position?: any, onCompleteAll?: () => void, onCompleteAllParams?: any[], onCompleteAllScope?: any): TimelineLite; + /** + * Tweens an array of targets from and to a common set of values, but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly + * small amount of code. + */ + staggerFromTo( + targets: any, + duration: number, + fromVars: {}, + toVars: {}, + stagger?: number, + position?: any, + onCompleteAll?: () => void, + onCompleteAllParams?: any[], + onCompleteAllScope?: any + ): TimelineLite; - /** Tweens an array of targets to a common set of destination values, but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly small amount of code. */ - staggerTo(targets: any, duration: number, vars: {}, stagger: number, position?: any, onCompleteAll?: () => void, onCompleteAllParams?: any[], onCompleteAllScope?: any): TimelineLite; + /** + * Tweens an array of targets to a common set of destination values, but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly + * small amount of code. + */ + staggerTo( + targets: any, + duration: number, + vars: {}, + stagger: number, + position?: any, + onCompleteAll?: () => void, + onCompleteAllParams?: any[], + onCompleteAllScope?: any + ): TimelineLite; - /** Adds a TweenLite.to() tween to the end of the timeline (or elsewhere using the "position" parameter) - this is a convenience method that accomplishes exactly the same thing as add( TweenLite.to(...) ) but with less code. */ + /** + * Adds a TweenLite.to() tween to the end of the timeline (or elsewhere using the "position" parameter) - this is a convenience method that accomplishes exactly the same thing as + * add( TweenLite.to(...) ) but with less code. + */ to(target: {}, duration: number, vars: {}, position?: any): TimelineLite; usesFrames(): boolean; @@ -95,7 +153,7 @@ declare namespace gsap { useFrames(): boolean; } - export class TimelineMax extends TimelineLite { + class TimelineMax extends TimelineLite { constructor(vars?: {}); addCallback(callback: () => void, position: any, params?: any[], scope?: any): TimelineMax; @@ -104,7 +162,7 @@ declare namespace gsap { getActive(nested?: boolean, tweens?: boolean, timelines?: boolean): Tween | Timeline[]; getLabelAfter(time: number): string; getLabelBefore(time: number): string; - getLabelsArray(): Array<{ name: string; time: number; }>; + getLabelsArray(): Array<{ name: string; time: number }>; removeCallback(callback: () => void, timeOrLabel?: any): TimelineMax; removePause(position: any): TimelineMax; repeat(): number; diff --git a/types/gsap/Tween.d.ts b/types/gsap/Tween.d.ts index b11260ef4c..11de164f00 100644 --- a/types/gsap/Tween.d.ts +++ b/types/gsap/Tween.d.ts @@ -1,6 +1,6 @@ declare namespace gsap { - export type Tween = TweenLite | TweenMax; - export class TweenLite extends Animation { + type Tween = TweenLite | TweenMax; + class TweenLite extends Animation { constructor(target: any, duration: number, vars: any); /** Provides An easy way to change the default easing equation. */ @@ -15,22 +15,37 @@ declare namespace gsap { /** Target object (or array of objects) whose properties the tween affects. */ readonly target: any; - /** The object that dispatches a "tick" event each time the engine updates, making it easy for you to add your own listener(s) to run custom logic after each update (great for game developers). */ + /** + * The object that dispatches a "tick" event each time the engine updates, making it easy for you to add your own listener(s) to run custom logic after each update + * (great for game developers). + */ static ticker: any; /** Provides a simple way to call a () => void after a set amount of time (or frames). */ static delayedCall(delay: number, callback: () => void, params?: any[], scope?: any, useFrames?: boolean): TweenLite; - /** Static method for creating a TweenLite instance that tweens backwards - you define the BEGINNING values and the current values are used as the destination values which is great for doing things like animating objects onto the screen because you can set them up initially the way you want them to look at the end of the tween and then animate in from elsewhere. */ + /** + * Static method for creating a TweenLite instance that tweens backwards - you define the BEGINNING values and the current values are used as the destination values which is great for doing + * things like animating objects onto the screen because you can set them up initially the way you want them to look at the end of the tween and then animate in from elsewhere. + */ static from(target: any, duration: number, vars: any): TweenLite; - /** Static method for creating a TweenLite instance that allows you to define both the starting and ending values (as opposed to to() and from() tweens which are based on the target's current values at one end or the other). */ + /** + * Static method for creating a TweenLite instance that allows you to define both the starting and ending values (as opposed to to() and from() tweens which are based on the target's + * current values at one end or the other). + */ static fromTo(target: any, duration: number, fromVars: any, toVars: any): TweenLite; - /** Returns an array containing all the tweens of a particular target (or group of targets) that have not been released for garbage collection yet which typically happens within a few seconds after the tween completes. */ + /** + * Returns an array containing all the tweens of a particular target (or group of targets) that have not been released for garbage collection yet which typically happens within a few + * seconds after the tween completes. + */ static getTweensOf(target: any, onlyActive?: boolean): TweenLite[]; - /** [override] Clears any initialization data (like starting/ending values in tweens) which can be useful if, for example, you want to restart a tween without reverting to any previously recorded starting values. */ + /** + * [override] Clears any initialization data (like starting/ending values in tweens) which can be useful if, for example, you want to restart a tween without reverting to any previously + * recorded starting values. + */ invalidate(): TweenLite; /** Immediately kills all of the delayedCalls to a particular () => void. */ @@ -42,7 +57,10 @@ declare namespace gsap { /** Permits you to control what happens when too much time elapses between two ticks (updates) of the engine, adjusting the core timing mechanism to compensate and avoid "jumps". */ static lagSmoothing(threshold: number, adjustedLag: number): void; - /** Forces a render of all active tweens which can be useful if, for example, you set up a bunch of from() tweens and then you need to force an immediate render (even of "lazy" tweens) to avoid a brief delay before things render on the very next tick. */ + /** + * Forces a render of all active tweens which can be useful if, for example, you set up a bunch of from() tweens and then you need to force an immediate render (even of "lazy" tweens) to + * avoid a brief delay before things render on the very next tick. + */ static render(): void; /** Immediately sets properties of the target accordingly - essentially a zero-duration to() tween with a more intuitive name. */ @@ -52,26 +70,35 @@ declare namespace gsap { static to(target: any, duration: number, vars: any): TweenLite; } - export class TweenMax extends TweenLite { + class TweenMax extends TweenLite { constructor(target: {}, duration: number, vars: {}); /** Provides a simple way to call a () => void after a set amount of time (or frames). */ static delayedCall(delay: number, callback: () => void, params?: any[], scope?: {}, useFrames?: boolean): TweenMax; - /** Static method for creating a TweenMax instance that tweens backwards - you define the BEGINNING values and the current values are used as the destination values which is great for doing things like animating objects onto the screen because you can set them up initially the way you want them to look at the end of the tween and then animate in from elsewhere. */ + /** + * Static method for creating a TweenMax instance that tweens backwards - you define the BEGINNING values and the current values are used as the destination values which is great for + * doing things like animating objects onto the screen because you can set them up initially the way you want them to look at the end of the tween and then animate in from elsewhere. + */ static from(target: {}, duration: number, vars: {}): TweenMax; - /** Static method for creating a TweenMax instance that allows you to define both the starting and ending values (as opposed to to() and from() tweens which are based on the target's current values at one end or the other). */ + /** + * Static method for creating a TweenMax instance that allows you to define both the starting and ending values (as opposed to to() and from() tweens which are based on the target's + * current values at one end or the other). + */ static fromTo(target: {}, duration: number, fromVars: {}, toVars: {}): TweenMax; /** Returns an array containing all tweens (and optionally timelines too, excluding the root timelines). */ static getAllTweens(includeTimelines?: boolean): Tween[]; - /** Returns an array containing all the tweens of a particular target (or group of targets) that have not been released for garbage collection yet which typically happens within a few seconds after the tween completes. */ + /** + * Returns an array containing all the tweens of a particular target (or group of targets) that have not been released for garbage collection yet which typically happens within a + * few seconds after the tween completes. + */ static getTweensOf(target: {}): Tween[]; /** Gets or sets the global timeScale which is a multiplier that affects ALL animations equally. This is a great way to globally speed up or slow down all animations at once. */ - static globalTimeScale(value: number): void; + static globalTimeScale(value?: number): number; /** Reports whether or not a particular object is actively tweening. */ static isTweening(target: {}): boolean; @@ -91,7 +118,10 @@ declare namespace gsap { /** Pauses all tweens and/or delayedCalls/callbacks and/or timelines. */ static pauseAll(tweens?: boolean, delayedCalls?: boolean, timelines?: boolean): void; - /** Gets or sets the tween's progress which is a value between 0 and 1 indicating the position of the virtual playhead (excluding repeats) where 0 is at the beginning, 0.5 is halfway complete, and 1 is complete. */ + /** + * Gets or sets the tween's progress which is a value between 0 and 1 indicating the position of the virtual playhead (excluding repeats) where 0 is at the beginning, 0.5 is halfway + * complete, and 1 is complete. + */ repeat(): number; repeat(value: number): TweenMax; @@ -105,14 +135,48 @@ declare namespace gsap { /** Immediately sets properties of the target accordingly - essentially a zero-duration to() tween with a more intuitive name. */ static set(target: {}, vars: {}): TweenMax; - /** Tweens an array of targets from a common set of destination values (using the current values as the destination), but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly small amount of code. */ - static staggerFrom(targets: any, duration: number, vars: {}, stagger: number, onCompleteAll?: () => void, onCompleteAllParams?: any[], onCompleteAllScope?: any): any[]; + /** + * Tweens an array of targets from a common set of destination values (using the current values as the destination), but staggers their start times by a specified amount of time, creating + * an evenly-spaced sequence with a surprisingly small amount of code. + */ + static staggerFrom( + targets: any, + duration: number, + vars: {}, + stagger: number, + onCompleteAll?: () => void, + onCompleteAllParams?: any[], + onCompleteAllScope?: any + ): any[]; - /** Tweens an array of targets from a common set of destination values to a common set of destination values, but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly small amount of code. */ - static staggerFromTo(targets: any, duration: number, fromVars: {}, toVars: {}, stagger: number, onCompleteAll?: () => void, onCompleteAllParams?: any[], onCompleteAllScope?: any): any[]; + /** + * Tweens an array of targets from a common set of destination values to a common set of destination values, but staggers their start times by a specified amount of time, creating an + * evenly-spaced sequence with a surprisingly small amount of code. + */ + static staggerFromTo( + targets: any, + duration: number, + fromVars: {}, + toVars: {}, + stagger: number, + onCompleteAll?: () => void, + onCompleteAllParams?: any[], + onCompleteAllScope?: any + ): any[]; - /** Tweens an array of targets to a common set of destination values, but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly small amount of code. */ - static staggerTo(targets: any, duration: number, vars: {}, stagger: number, onCompleteAll?: () => void, onCompleteAllParams?: any[], onCompleteAllScope?: any): any[]; + /** + * Tweens an array of targets to a common set of destination values, but staggers their start times by a specified amount of time, creating an evenly-spaced sequence with a surprisingly + * small amount of code. + */ + static staggerTo( + targets: any, + duration: number, + vars: {}, + stagger: number, + onCompleteAll?: () => void, + onCompleteAllParams?: any[], + onCompleteAllScope?: any + ): any[]; /** Static method for creating a TweenMax instance that animates to the specified destination values (from the current values). */ static to(target: {}, duration: number, vars: TweenConfig): TweenMax; diff --git a/types/gsap/TweenConfig.d.ts b/types/gsap/TweenConfig.d.ts index 33cde9c6ae..38b00404e6 100644 --- a/types/gsap/TweenConfig.d.ts +++ b/types/gsap/TweenConfig.d.ts @@ -1,10 +1,11 @@ declare namespace gsap { - export interface TweenConfig { - + interface TweenConfig { /** Any tweenable property */ [p: string]: any; - /** Amount of delay in seconds (or frames for frames-based tweens) before the animation should begin.*/ + /** + * Amount of delay in seconds (or frames for frames-based tweens) before the animation should begin. + */ delay?: number; /** Ease (or () => void or String) - You can choose from various eases to control the rate of change during the animation, giving it a specific "feel". */ @@ -15,7 +16,10 @@ declare namespace gsap { /** If true, the tween will pause itself immediately upon creation. */ paused?: boolean; - /** Controls how (and if) other tweens of the same target are overwritten. There are several modes to choose from, but "auto" is the default (although you can change the default mode using theTweenLite.defaultOverwrite property) */ + /** + * Controls how (and if) other tweens of the same target are overwritten. There are several modes to choose from, but "auto" is the default (although you can change the default mode using + * theTweenLite.defaultOverwrite property) + */ overwrite?: string | number; /** A () => void that should be called when the animation has completed. */ @@ -27,7 +31,11 @@ declare namespace gsap { /** Defines the scope of the onComplete () => void (what "this" refers to inside that () => void). */ onCompleteScope?: {}; - /** Normally when you create a tween, it begins rendering on the very next frame (update cycle) unless you specify a delay. However, if you prefer to force the tween to render immediately when it is created, setimmediateRender to true. Or to prevent a from() from rendering immediately, set immediateRender to false. By default, from() tweens set immediateRender to true. */ + /** + * Normally when you create a tween, it begins rendering on the very next frame (update cycle) unless you specify a delay. However, if you prefer to force the tween to render + * immediately when it is created, setimmediateRender to true. Or to prevent a from() from rendering immediately, set immediateRender to false. By default, from() tweens set + * immediateRender to true. + */ immediateRender?: boolean; /** A () => void that should be called when the tween has reached its beginning again from the reverse direction. */ @@ -57,10 +65,19 @@ declare namespace gsap { /** Defines the scope of the onUpdate () => void (what "this" refers to inside that () => void). */ onUpdateScope?: {}; - /** If useFrames is true, the tweens's timing will be based on frames instead of seconds because it is intially added to the root frames-based timeline. This causes both its duration and delay to be based on frames. An animations's timing mode is always determined by its parent timeline. */ + /** + * If useFrames is true, the tweens's timing will be based on frames instead of seconds because it is intially added to the root frames-based timeline. This causes both its duration and + * delay to be based on frames. An animations's timing mode is always determined by its parent timeline. + */ useFrames?: boolean; - /** When a tween renders for the very first time and reads its starting values, GSAP will automatically "lazy render" that particular tick by default, meaning it will try to delay the rendering (writing of values) until the very end of the "tick" cycle which can improve performance because it avoids the read/write/read/write layout thrashing that some browsers do. If you would like to disable lazy rendering for a particular tween, you can set lazy:false. Or, since zero-duration tweens do not lazy-render by default, you can specifically give it permission to lazy-render by setting lazy:true like TweenLite.set(element, {opacity:0, lazy:true});. In most cases, you won't need to set lazy. */ + /** + * When a tween renders for the very first time and reads its starting values, GSAP will automatically "lazy render" that particular tick by default, meaning it will try to delay the + * rendering (writing of values) until the very end of the "tick" cycle which can improve performance because it avoids the read/write/read/write layout thrashing that some browsers do. + * + * If you would like to disable lazy rendering for a particular tween, you can set lazy:false. Or, since zero-duration tweens do not lazy-render by default, you can specifically give it + * permission to lazy-render by setting lazy:true like TweenLite.set(element, {opacity:0, lazy:true});. In most cases, you won't need to set lazy. + */ lazy?: boolean; /** A () => void that should be called when the tween gets overwritten by another tween. */ diff --git a/types/gsap/index.d.ts b/types/gsap/index.d.ts index 77d589603a..5e3081cc6a 100644 --- a/types/gsap/index.d.ts +++ b/types/gsap/index.d.ts @@ -1,6 +1,10 @@ -// Type definitions for GSAP 1.19 +// Type definitions for GSAP 1.20.6 // Project: http://greensock.com/ -// Definitions by: VILIC VANE , Robert S , Richard Fox , Philip Bulley +// Definitions by: VILIC VANE , +// Robert S , +// Richard Fox , +// Philip Bulley , +// Leonardo Melo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -10,6 +14,6 @@ /// /// -declare module 'gsap' { +declare module "gsap" { export = gsap; } diff --git a/types/jest-axe/index.d.ts b/types/jest-axe/index.d.ts index f16f4e7651..60375e3605 100644 --- a/types/jest-axe/index.d.ts +++ b/types/jest-axe/index.d.ts @@ -82,4 +82,7 @@ declare global { toHaveNoViolations: IToHaveNoViolations; } } + + // axe-core depends on a global Node + interface Node {} } diff --git a/types/jest-axe/tsconfig.json b/types/jest-axe/tsconfig.json index 1889f0045d..887813c869 100644 --- a/types/jest-axe/tsconfig.json +++ b/types/jest-axe/tsconfig.json @@ -2,8 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6", - "dom" + "es6" ], "noImplicitAny": true, "noImplicitThis": true, diff --git a/types/jest-axe/tslint.json b/types/jest-axe/tslint.json index 3db14f85ea..4f44991c3c 100644 --- a/types/jest-axe/tslint.json +++ b/types/jest-axe/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-empty-interface": false + } +} diff --git a/types/jest/index.d.ts b/types/jest/index.d.ts index 8451987011..2b351bbf70 100644 --- a/types/jest/index.d.ts +++ b/types/jest/index.d.ts @@ -345,7 +345,14 @@ declare namespace jest { } interface ExpectExtendMap { - [key: string]: (this: MatcherUtils, received: any, ...actual: any[]) => { message(): string | (() => string), pass: boolean } | Promise<{ message(): string, pass: boolean }>; + [key: string]: CustomMatcher; + } + + type CustomMatcher = (this: MatcherUtils, received: any, ...actual: any[]) => CustomMatcherResult | Promise; + + interface CustomMatcherResult { + pass: boolean; + message: string | (() => string); } interface SnapshotSerializerOptions { diff --git a/types/jest/jest-tests.ts b/types/jest/jest-tests.ts index 4082bd9e31..18543b8f79 100644 --- a/types/jest/jest-tests.ts +++ b/types/jest/jest-tests.ts @@ -433,6 +433,14 @@ expect.extend({ }; } }); +expect.extend({ + foo(this: jest.MatcherUtils, received: {}, ...actual: Array<{}>) { + return { + message: JSON.stringify(received), + pass: false, + }; + } +}); expect.extend({ async foo(this: jest.MatcherUtils, received: {}, ...actual: Array<{}>) { return { @@ -441,6 +449,14 @@ expect.extend({ }; } }); +expect.extend({ + async foo(this: jest.MatcherUtils, received: {}, ...actual: Array<{}>) { + return { + message: JSON.stringify(received), + pass: false + }; + } +}); expect.extend({ foo(this: jest.MatcherUtils) { const isNot: boolean = this.isNot; diff --git a/types/joi/index.d.ts b/types/joi/index.d.ts index f3432036cf..f1437d3928 100644 --- a/types/joi/index.d.ts +++ b/types/joi/index.d.ts @@ -909,16 +909,29 @@ export interface BinarySchema extends AnySchema { } export interface DateSchema extends AnySchema { + /** + * Specifies that the value must be greater than date. + * Notes: 'now' can be passed in lieu of date so as to always compare relatively to the current date, + * allowing to explicitly ensure a date is either in the past or in the future. + * It can also be a reference to another field. + */ + greater(date: 'now' | Date | number | string | Reference): this; + + /** + * Specifies that the value must be less than date. + * Notes: 'now' can be passed in lieu of date so as to always compare relatively to the current date, + * allowing to explicitly ensure a date is either in the past or in the future. + * It can also be a reference to another field. + */ + less(date: 'now' | Date | number | string | Reference): this; + /** * Specifies the oldest date allowed. * Notes: 'now' can be passed in lieu of date so as to always compare relatively to the current date, * allowing to explicitly ensure a date is either in the past or in the future. * It can also be a reference to another field. */ - min(date: Date): this; - min(date: number): this; - min(date: string): this; - min(date: Reference): this; + min(date: 'now' | Date | number | string | Reference): this; /** * Specifies the latest date allowed. @@ -926,17 +939,13 @@ export interface DateSchema extends AnySchema { * allowing to explicitly ensure a date is either in the past or in the future. * It can also be a reference to another field. */ - max(date: Date): this; - max(date: number): this; - max(date: string): this; - max(date: Reference): this; + max(date: 'now' | Date | number | string | Reference): this; /** * Specifies the allowed date format: * @param format - string or array of strings that follow the moment.js format. */ - format(format: string): this; - format(format: string[]): this; + format(format: string | string[]): this; /** * Requires the string value to be in valid ISO 8601 date format. diff --git a/types/joi/joi-tests.ts b/types/joi/joi-tests.ts index 832858c7e9..8c3c6f2e4e 100644 --- a/types/joi/joi-tests.ts +++ b/types/joi/joi-tests.ts @@ -514,15 +514,28 @@ binSchema = binSchema.length(num); dateSchema = Joi.date(); +dateSchema = dateSchema.greater('now'); +dateSchema = dateSchema.less('now'); +dateSchema = dateSchema.min('now'); +dateSchema = dateSchema.max('now'); + +dateSchema = dateSchema.greater(date); +dateSchema = dateSchema.less(date); dateSchema = dateSchema.min(date); dateSchema = dateSchema.max(date); +dateSchema = dateSchema.greater(str); +dateSchema = dateSchema.less(str); dateSchema = dateSchema.min(str); dateSchema = dateSchema.max(str); +dateSchema = dateSchema.greater(num); +dateSchema = dateSchema.less(num); dateSchema = dateSchema.min(num); dateSchema = dateSchema.max(num); +dateSchema = dateSchema.greater(ref); +dateSchema = dateSchema.less(ref); dateSchema = dateSchema.min(ref); dateSchema = dateSchema.max(ref); diff --git a/types/mali/index.d.ts b/types/mali/index.d.ts deleted file mode 100644 index 8e536d5330..0000000000 --- a/types/mali/index.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -// Type definitions for mali 0.9 -// Project: https://github.com/malijs/mali -// Definitions by: Daniel Byrne -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 - -/// - -import { EventEmitter } from 'events'; -import { Stream } from 'stream'; - -declare class Mali extends EventEmitter { - constructor(path: any, name?: string | ReadonlyArray, options?: any); - name: string; - env: string; - ports: ReadonlyArray; - silent: boolean; - - addService(path: any, name: string | ReadonlyArray, options?: any): void; - use(service?: any, name?: any, fns?: any): void; - start(port: number | string, creds?: any, options?: any): any; // gnarly type inferring for these functions so Im just gonna let them handle it. - toJSON(): any; - close(): Promise; - inspect(): any; -} - -declare namespace Mali { - interface Context { - name: string; - fullName: string; - service: string; - package: string; - app: any; // ? app - call: any; - request: Request; - response: Response; - req: any; // ? - res: any; // ? - type: string; - metadata: string; - get(field: string): any; - set(field: any, val?: any): void; // do I need `?:` if its of type `any`? - sendMetadata(md: any): void; - getStatus(field: string): any; - setStatus(field: any, val?: any): void; // ^ - } - - class Request { - constructor(call: any, type: string); - call: any; - type: string; - metadata: any; - req: any; // ? - - getMetadata(): any; - get(field: string): any; - } - - class Response { - constructor(call: any, type: string); - call: any; - type: string; - metadata: any; - status: any; - res: any; // ? - set(field: any, val?: any): void; // is `val?:` necessary when its of type `any`? - get(field: string): any; - getMetadata(): any; - sendMetadata(md?: any): void; - getStatus(field: string): any; - setStatus(field: any, val?: any): void; // ^ same as above - } - - function exec(ctx: Context, handler: any, cb?: any): void; -} - -export = Mali; diff --git a/types/mali/mali-tests.ts b/types/mali/mali-tests.ts deleted file mode 100644 index d6d33a263f..0000000000 --- a/types/mali/mali-tests.ts +++ /dev/null @@ -1,16 +0,0 @@ -// example from https://github.com/malijs/mali#example - -import Mali = require('mali'); -import path = require('path'); - -const PROTO_PATH = path.resolve(__dirname, '../protos/helloworld.proto'); - -async function sayHello(ctx: Mali.Context) { - ctx.res = { message: 'Hello '.concat(ctx.req.name) }; -} - -const app = new Mali(PROTO_PATH); -// $ExpectType void -app.use({sayHello}); -// $ExpectType any -app.start('127.0.0.1:50051'); diff --git a/types/mali/tsconfig.json b/types/mali/tsconfig.json deleted file mode 100644 index 1a4f86d02c..0000000000 --- a/types/mali/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": ["es6"], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": ["../"], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "mali-tests.ts" - ] -} diff --git a/types/mali/tslint.json b/types/mali/tslint.json deleted file mode 100644 index d88586e5bd..0000000000 --- a/types/mali/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "dtslint/dt.json" -} diff --git a/types/mongodb/index.d.ts b/types/mongodb/index.d.ts index 07b36603d4..ab4d2f4c02 100644 --- a/types/mongodb/index.d.ts +++ b/types/mongodb/index.d.ts @@ -707,8 +707,8 @@ export interface Collection { findOneAndReplace(filter: FilterQuery, replacement: Object, options: FindOneAndReplaceOption, callback: MongoCallback>): void; /** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#findOneAndUpdate */ findOneAndUpdate(filter: FilterQuery, update: Object, callback: MongoCallback>): void; - findOneAndUpdate(filter: FilterQuery, update: Object, options?: FindOneAndReplaceOption): Promise>; - findOneAndUpdate(filter: FilterQuery, update: Object, options: FindOneAndReplaceOption, callback: MongoCallback>): void; + findOneAndUpdate(filter: FilterQuery, update: Object, options?: FindOneAndUpdateOption): Promise>; + findOneAndUpdate(filter: FilterQuery, update: Object, options: FindOneAndUpdateOption, callback: MongoCallback>): void; /** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#geoHaystackSearch */ geoHaystackSearch(x: number, y: number, callback: MongoCallback): void; geoHaystackSearch(x: number, y: number, options?: GeoHaystackSearchOptions): Promise; @@ -804,17 +804,17 @@ export interface Collection { /** @deprecated use updateOne, updateMany or bulkWrite */ update(filter: FilterQuery, update: UpdateQuery | TSchema, callback: MongoCallback): void; /** @deprecated use updateOne, updateMany or bulkWrite */ - update(filter: FilterQuery, update: UpdateQuery | TSchema, options?: ReplaceOneOptions & { multi?: boolean }): Promise; + update(filter: FilterQuery, update: UpdateQuery | TSchema, options?: UpdateOneOptions & { multi?: boolean }): Promise; /** @deprecated use updateOne, updateMany or bulkWrite */ - update(filter: FilterQuery, update: UpdateQuery | TSchema, options: ReplaceOneOptions & { multi?: boolean }, callback: MongoCallback): void; + update(filter: FilterQuery, update: UpdateQuery | TSchema, options: UpdateOneOptions & { multi?: boolean }, callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#updateMany */ updateMany(filter: FilterQuery, update: UpdateQuery | TSchema, callback: MongoCallback): void; - updateMany(filter: FilterQuery, update: UpdateQuery | TSchema, options?: CommonOptions & { upsert?: boolean }): Promise; - updateMany(filter: FilterQuery, update: UpdateQuery | TSchema, options: CommonOptions & { upsert?: boolean }, callback: MongoCallback): void; + updateMany(filter: FilterQuery, update: UpdateQuery | TSchema, options?: UpdateManyOptions): Promise; + updateMany(filter: FilterQuery, update: UpdateQuery | TSchema, options: UpdateManyOptions, callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#updateOne */ updateOne(filter: FilterQuery, update: UpdateQuery | TSchema, callback: MongoCallback): void; - updateOne(filter: FilterQuery, update: UpdateQuery | TSchema, options?: ReplaceOneOptions): Promise; - updateOne(filter: FilterQuery, update: UpdateQuery | TSchema, options: ReplaceOneOptions, callback: MongoCallback): void; + updateOne(filter: FilterQuery, update: UpdateQuery | TSchema, options?: UpdateOneOptions): Promise; + updateOne(filter: FilterQuery, update: UpdateQuery | TSchema, options: UpdateOneOptions, callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#watch */ watch(pipeline?: Object[], options?: ChangeStreamOptions & { startAtClusterTime?: Timestamp, session?: ClientSession }): ChangeStream; } @@ -1158,13 +1158,17 @@ export interface FindAndModifyWriteOpResultObject { } /** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#findOneAndReplace */ -export interface FindOneAndReplaceOption { +export interface FindOneAndReplaceOption extends CommonOptions { projection?: Object; sort?: Object; maxTimeMS?: number; upsert?: boolean; returnOriginal?: boolean; - session?: ClientSession; +} + +/** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#findOneAndUpdate */ +export interface FindOneAndUpdateOption extends FindOneAndReplaceOption { + arrayFilters?: Object[]; } /** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#geoHaystackSearch */ @@ -1356,6 +1360,17 @@ export interface ReplaceOneOptions extends CommonOptions { bypassDocumentValidation?: boolean; } +/** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#updateOne */ +export interface UpdateOneOptions extends ReplaceOneOptions { + arrayFilters?: Object[]; +} + +/** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#updateMany */ +export interface UpdateManyOptions extends CommonOptions { + upsert?: boolean; + arrayFilters?: Object[]; +} + /** http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#~updateWriteOpResult */ export interface UpdateWriteOpResult { result: { ok: number, n: number, nModified: number }; diff --git a/types/mongoose/index.d.ts b/types/mongoose/index.d.ts index 19551684e0..58522f752c 100644 --- a/types/mongoose/index.d.ts +++ b/types/mongoose/index.d.ts @@ -13,6 +13,7 @@ // Idan Dardikman // Dominik Heigl // Fazendaaa +// Dan Manastireanu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -869,6 +870,7 @@ declare module "mongoose" { /** controls document#toObject behavior when called manually - defaults to true */ minimize?: boolean; read?: string; + writeConcern?: WriteConcern; /** defaults to true. */ safe?: boolean | { w?: number | string; wtimeout?: number; j?: boolean }; diff --git a/types/mongoose/mongoose-tests.ts b/types/mongoose/mongoose-tests.ts index 20b24ba887..78f23372cb 100644 --- a/types/mongoose/mongoose-tests.ts +++ b/types/mongoose/mongoose-tests.ts @@ -1989,3 +1989,14 @@ db.createCollection('customers'). // visible outside of the transaction. then(() => session.commitTransaction()). then(() => Customer.findOne({ name: 'Test' }).exec()) + +/** + * https://mongoosejs.com/docs/guide.html#writeConcern + */ +new mongoose.Schema({ name: String }, { + writeConcern: { + w: 'majority', + j: true, + wtimeout: 1000 + } +}); diff --git a/types/moo/index.d.ts b/types/moo/index.d.ts index fa3a59d2ab..fd53f98e0a 100644 --- a/types/moo/index.d.ts +++ b/types/moo/index.d.ts @@ -104,7 +104,7 @@ export interface Token { /** * The number of line breaks found in the match. (Always zero if this rule has lineBreaks: false.) */ - lineBreaks: boolean; + lineBreaks: number; /** * The line number of the beginning of the match, starting from 1. */ diff --git a/types/n3/index.d.ts b/types/n3/index.d.ts index 31a2975bb0..75a8c4efef 100644 --- a/types/n3/index.d.ts +++ b/types/n3/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Fred Eisele // Ruben Taelman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.3 /// @@ -12,10 +12,12 @@ import * as stream from "stream"; import * as RDF from "rdf-js"; import { EventEmitter } from "events"; -export interface Prefixes { - [key: string]: RDF.NamedNode; +export interface Prefixes { + [key: string]: I; } +export type PrefixedToIri = (suffix: string) => RDF.NamedNode; + export class Term implements RDF.Term { termType: "NamedNode" | "BlankNode" | "Literal" | "Variable" | "DefaultGraph"; id: string; @@ -139,7 +141,7 @@ export interface N3StreamParser extends RDF.Stream, NodeJS.WritableStream, RDF.S export interface WriterOptions { format?: string; - prefixes?: Prefixes; + prefixes?: Prefixes; end?: boolean; } @@ -157,8 +159,8 @@ export interface N3Writer { addQuad(subject: RDF.Term, predicate: RDF.Term, object: RDF.Term | RDF.Term[], graph?: RDF.Term, done?: () => void): void; addQuad(quad: RDF.Quad): void; addQuads(quads: RDF.Quad[]): void; - addPrefix(prefix: string, iri: string, done?: () => void): void; - addPrefixes(prefixes: Prefixes, done?: () => void): void; + addPrefix(prefix: string, iri: RDF.NamedNode | string , done?: () => void): void; + addPrefixes(prefixes: Prefixes, done?: () => void): void; end(err?: ErrorCallback, result?: string): void; blank(predicate: RDF.Term, object: RDF.Term): RDF.Term; blank(triple: BlankTriple | RDF.Quad | BlankTriple[] | RDF.Quad[]): RDF.Term; @@ -218,6 +220,9 @@ export namespace Util { function isVariable(value: RDF.Term | null): boolean; function isDefaultGraph(value: RDF.Term | null): boolean; function inDefaultGraph(value: RDF.Quad): boolean; - function prefix(iri: string, factory?: RDF.DataFactory): (suffix: string) => RDF.NamedNode; - function prefixes(defaultPrefixes: Prefixes, factory?: RDF.DataFactory): (iri: string) => (suffix: string) => RDF.NamedNode; + function prefix(iri: RDF.NamedNode|string, factory?: RDF.DataFactory): PrefixedToIri; + function prefixes( + defaultPrefixes: Prefixes, + factory?: RDF.DataFactory + ): (prefix: string) => PrefixedToIri; } diff --git a/types/n3/n3-tests.ts b/types/n3/n3-tests.ts index a061777ad7..f7b2db2409 100644 --- a/types/n3/n3-tests.ts +++ b/types/n3/n3-tests.ts @@ -17,7 +17,8 @@ function test_add_prefixes() { writer.addPrefixes({ freebase: N3.DataFactory.namedNode("http://rdf.freebase.com/ns/"), - xsd: N3.DataFactory.namedNode("http://www.w3.org/2001/XMLSchema#") + xsd: N3.DataFactory.namedNode("http://www.w3.org/2001/XMLSchema#"), + rdf: 'http://test' }); writer.end((error, result) => { @@ -31,7 +32,7 @@ function test_serialize() { format: "ttl", prefixes: { foaf: "http://xmlns.com/foaf/0.1", - freebase: "http://rdf.freebase.com/ns/", + freebase: N3.DataFactory.namedNode("http://rdf.freebase.com/ns/"), g: "http://base.google.com/ns/1.0" } }); diff --git a/types/next-server/router.d.ts b/types/next-server/router.d.ts index dff4f13a79..190138e3ed 100644 --- a/types/next-server/router.d.ts +++ b/types/next-server/router.d.ts @@ -82,13 +82,19 @@ export interface WithRouterProps { router: SingletonRouter; } +/** + * Remove properties `K` from `T`. + * + * @internal + */ +export type Omit = T extends any ? Pick> : never; + // Manually disabling the no-unnecessary-generics rule so users can -// retain type inference if they warp their component in withRouter +// retain type inference if they wrap their component in withRouter // without defining props explicitly export function withRouter( - // tslint:disable-next-line:no-unnecessary-generics - Component: React.ComponentType> -): React.ComponentType; + Component: React.ComponentType> +): React.ComponentType>>; declare const Router: SingletonRouter; export default Router; diff --git a/types/next-server/test/next-server-router-tests.tsx b/types/next-server/test/next-server-router-tests.tsx index 8b4397baad..bac699b4e7 100644 --- a/types/next-server/test/next-server-router-tests.tsx +++ b/types/next-server/test/next-server-router-tests.tsx @@ -70,14 +70,14 @@ Router.prefetch("/route").then(Component => { const element = ; }); -interface TestComponentProps { +interface TestComponentProps extends WithRouterProps { testValue: string; } -class TestComponent extends React.Component { +class TestComponent extends React.Component { state = { ready: false }; - constructor(props: TestComponentProps & WithRouterProps) { + constructor(props: TestComponentProps) { super(props); props.router.ready(() => { this.setState({ ready: true }); @@ -97,12 +97,57 @@ class TestComponent extends React.Component { + state = { ready: false }; + + constructor(props: TestComponent2Props) { + super(props); + props.router.ready(() => { + this.setState({ ready: true }); + }); + } + + render() { + return ( +
+

{this.state.ready ? 'Ready' : 'Not Ready'}

+

Route: {this.props.router.route}

+

Another prop: {this.props.testValue}

+
+ ); + } +} + +const TestComponent2WithRouter = withRouter(TestComponent2); +const res = ; + interface TestSFCQuery { test?: string; } -interface TestSFCProps extends WithRouterProps { } +interface TestSFCProps extends WithRouterProps { + testProp: string; +} const TestSFC: React.SFC = ({ router }) => { return
{router.query && router.query.test}
; }; +const TestSFCComponent = withRouter(TestSFC); + +const res2 = ; + +const TestSFC2 = withRouter(({ router }) => { + return
{router.query && router.query.test}
; +}); + +const res3 = ; + +const TestSFC3 = withRouter(({ router }) => { + return
{router.query && router.query.test}
; +}); + +const res4 = ; diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 0f2d005973..bd2ff1fbe0 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -1822,6 +1822,14 @@ declare namespace Office { * [Api set: Mailbox 1.7] */ AppointmentTimeChanged, + /** + * Triggers when an attachment is added to or removed from an item. + * + * [Api set: Mailbox Preview] + * + * @beta + */ + AttachmentsChanged, /** * Occurs when data within the binding is changed. * To add an event handler for the BindingDataChanged event of a binding, use the addHandlerAsync method of the Binding object. @@ -1918,6 +1926,8 @@ declare namespace Office { * Triggers when the OfficeTheme is changed in Outlook. * * [Api set: Mailbox Preview] + * + * @beta */ OfficeThemeChanged, /** @@ -7340,6 +7350,57 @@ declare namespace Office { declare namespace Office { namespace MailboxEnums { + /** + * Specifies which string formatting to apply to an attachment's content. + * + * [Api set: Mailbox Preview] + * + * @remarks + *
+ * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} + * Compose or read
+ * + * @beta + */ + enum AttachmentContentFormat { + /** + * The content of the attachment is returned as a base64-encoded string. + */ + Base64 = "base64", + + /** + * The content of the attachment is returned as a string representing a URL. + */ + Url = "url", + + /** + * The content of the attachment is returned as a string representing an .eml formatted file. + */ + Eml = "eml" + } + /** + * Specifies whether an attachment was added to or removed from an item. + * + * [Api set: Mailbox Preview] + * + * @remarks + *
+ * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} + * Compose or read
+ * + * @beta + */ + enum AttachmentStatus { + /** + * An attachment was added to the item. + */ + Added = "added", + + /** + * An attachment was removed from the item. + */ + Removed = "removed" + } /** * Specifies an attachment's type. * @@ -8494,6 +8555,31 @@ declare namespace Office { */ subject: string; } + /** + * Represents the content of an attachment on a message or appointment item. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @beta + */ + interface AttachmentContent { + /** + * The content of an attachment as a string. + */ + content: string; + /** + * The string format to use for an attachment's content. + * For file attachments, the formatting is a base64-encoded string. + * For item attachments that represent messages, the formatting is a string representing an .eml formatted file. + * For cloud attachments, the formatting is a URL string. + */ + format: Office.MailboxEnums.AttachmentContentFormat; + } /** * Represents an attachment on an item from the server. Read mode only. * @@ -9279,6 +9365,154 @@ declare namespace Office { getAsync(callback?: (result: AsyncResult) => void): void; } + /** + * The InternetHeaders object represents properties that are preserved after the item leaves Exchange and converted to a MIME message. + * These properties are stored as x-headers in the MIME message. + * + * InternetHeaders are stored as key/value pairs on a per-item basis. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @beta + */ + export interface InternetHeaders { + /** + * Given an array of internet header names, this method returns a dictionary containing those internet headers and their values. + * If the add-in requests an x-header that is not available, that x-header will not be returned in the results. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * In addition to this signature, this method also has the following signature: + * + * `getAsync(names: string[], callback: (result: AsyncResult) => void): void;` + * + * @param names The names of the internet headers to be returned. + * @param options Optional. An object literal that contains one or more of the following properties: + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + * + * @beta + */ + getAsync(names: string[], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Given an array of internet header names, this method returns a dictionary containing those internet headers and their values. + * If the add-in requests an x-header that is not available, that x-header will not be returned in the results. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param names The names of the internet headers to be returned. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + * + * @beta + */ + getAsync(names: string[], callback?: (result: AsyncResult) => void): void; + /** + * Given an array of internet header names, this method removes the specified headers from the internet header collection. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * In addition to this signature, this method also has the following signature: + * + * `removeAsync(names: string[], callback: (result: AsyncResult) => void): void;` + * + * @param names The names of the internet headers to be removed. + * @param options Optional. An object literal that contains one or more of the following properties: + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + * + * @beta + */ + removeAsync(names: string[], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Given an array of internet header names, this method removes the specified headers from the internet header collection. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * @param names The names of the internet headers to be removed. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + * + * @beta + */ + removeAsync(names: string[], callback?: (result: AsyncResult) => void): void; + /** + * Sets the specified internet headers to the specified values. + * + * The setAsync method creates a new header if the specified header does not already exist; otherwise, the existing value is replaced with + * the new value. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + * + * In addition to this signature, this method also has the following signatures: + * + * `setAsync(headers: string, callback: (result: AsyncResult) => void): void;` + * + * @param headers The names and corresponding values of the headers to be set. Should be a dictionary object with keys being the names of the + * internet headers and values being the values of the internet headers. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + * Any errors encountered will be provided in the asyncResult.error property. + * + * @beta + */ + setAsync(headers: Object, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Sets the specified internet headers to the specified values. + * + * The setAsync method creates a new header if the specified header does not already exist; otherwise, the existing value is replaced with + * the new value. + * + * [Api set: Mailbox Preview] + * + * @remarks + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * + * + * @param headers The names and corresponding values of the headers to be set. Should be a dictionary object with keys being the names of the + * internet headers and values being the values of the internet headers. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + * Any errors encountered will be provided in the asyncResult.error property. + * + * @beta + */ + setAsync(headers: Object, callback?: (result: AsyncResult) => void): void; + } + /** * Represents the appointment organizer, even if an alias or a delegate was used to create the appointment. * This object provides a method to get the organizer value of an appointment in an Outlook add-in. @@ -9669,7 +9903,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -9696,7 +9931,7 @@ declare namespace Office { * Adds an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -9855,6 +10090,26 @@ declare namespace Office { *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
*/ close(): void; + /** + * Gets the item's attachments as an array. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. If the call fails, the asyncResult.error property will contain and error code with the reason for + * the failure. + * + * @beta + */ + getAttachmentsAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Gets initialization data passed when the add-in is activated by an actionable message. * @@ -9963,8 +10218,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -9997,8 +10252,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -10019,8 +10274,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -10044,8 +10299,8 @@ declare namespace Office { * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. * In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -10067,7 +10322,7 @@ declare namespace Office { * Removes an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -10081,7 +10336,7 @@ declare namespace Office { * * `removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void;` * - * @param eventType The event that should invoke the handler. + * @param eventType The event that should revoke the handler. * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. * @param options Optional. An object literal that contains one or more of the following properties. @@ -10093,7 +10348,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -10103,7 +10359,7 @@ declare namespace Office { * * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer * - * @param eventType The event that should invoke the handler. + * @param eventType The event that should revoke the handler. * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, @@ -10378,7 +10634,7 @@ declare namespace Office { */ interface AppointmentRead extends Appointment, ItemRead { /** - * Gets an array of attachments for the item. + * Gets the item's attachments as an array. * * [Api set: Mailbox 1.0] * @@ -10682,7 +10938,7 @@ declare namespace Office { * Adds an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -10710,7 +10966,7 @@ declare namespace Office { * Adds an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -11063,7 +11319,7 @@ declare namespace Office { * Removes an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -11077,7 +11333,7 @@ declare namespace Office { * * `removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void;` * - * @param eventType The event that should invoke the handler. + * @param eventType The event that should revoke the handler. * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. * @param options Optional. An object literal that contains one or more of the following properties. @@ -11090,7 +11346,7 @@ declare namespace Office { * Removes an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -11100,7 +11356,7 @@ declare namespace Office { * * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee * - * @param eventType The event that should invoke the handler. + * @param eventType The event that should revoke the handler. * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, @@ -11237,7 +11493,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -11264,7 +11521,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -11281,6 +11539,36 @@ declare namespace Office { * asyncResult, which is an Office.AsyncResult object. */ addHandlerAsync(eventType: Office.EventType, handler: any, callback?: (result: AsyncResult) => void): void; + + /** + * Gets an attachment from a message or appointment and returns it as an `Office.AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should use + * the identifier to retrieve an attachment in the same session that the attachmentIds were retrieved with the `getAttachmentsAsync` or + * `item.attachments` call. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param attachmentId The identifier of the attachment you want to get. The maximum length of the string is 100 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. If the call fails, the asyncResult.error property will contain and error code + * with the reason for the failure. + * + * @beta + */ + getAttachmentContentAsync(attachmentId: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Gets initialization data passed when the add-in is {@link https://docs.microsoft.com/outlook/actionable-messages/invoke-add-in-from-actionable-message | activated by an actionable message}. @@ -11384,7 +11672,7 @@ declare namespace Office { * Removes an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -11398,7 +11686,7 @@ declare namespace Office { * * `removeHandlerAsync(eventType: Office.EventType, handler: any, callback?: (result: AsyncResult) => void): void;` * - * @param eventType The event that should invoke the handler. + * @param eventType The event that should revoke the handler. * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. * @param options Optional. An object literal that contains one or more of the following properties. @@ -11412,7 +11700,7 @@ declare namespace Office { * Removes an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -11422,7 +11710,7 @@ declare namespace Office { * * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read * - * @param eventType The event that should invoke the handler. + * @param eventType The event that should revoke the handler. * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, @@ -11732,6 +12020,26 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose */ close(): void; + /** + * Gets the item's attachments as an array. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. If the call fails, the asyncResult.error property will contain and error code with the reason for + * the failure. + * + * @beta + */ + getAttachmentsAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Gets initialization data passed when the add-in is activated by an actionable message. * @@ -11818,8 +12126,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -11853,8 +12161,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -11875,8 +12183,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -11899,8 +12207,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -12192,7 +12500,7 @@ declare namespace Office { */ interface ItemRead extends Item { /** - * Gets an array of attachments for the item. + * Gets the item's attachments as an array. * * [Api set: Mailbox 1.0] * @@ -12740,6 +13048,22 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose */ from: Office.From; + /** + * Sets the internet headers of a message. + * + * The internetHeaders property returns an InternetHeaders object that provides methods to manage the internet headers on the message. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ * + * @beta + */ + internetHeaders: Office.InternetHeaders; /** * Gets the type of item that an instance represents. * @@ -12978,7 +13302,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -13005,7 +13330,7 @@ declare namespace Office { * Adds an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -13166,6 +13491,26 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose */ close(): void; + /** + * Gets the item's attachments as an array. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. If the call fails, the asyncResult.error property will contain and error code with the reason for + * the failure. + * + * @beta + */ + getAttachmentsAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Gets initialization data passed when the add-in is activated by an actionable message. * @@ -13278,8 +13623,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -13313,8 +13658,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -13335,8 +13680,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -13359,8 +13704,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -13382,7 +13727,7 @@ declare namespace Office { * Removes an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -13396,7 +13741,7 @@ declare namespace Office { * * `removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void;` * - * @param eventType The event that should invoke the handler. + * @param eventType The event that should revoke the handler. * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. * @param options Optional. An object literal that contains one or more of the following properties. @@ -13409,7 +13754,7 @@ declare namespace Office { * Removes an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -13419,7 +13764,7 @@ declare namespace Office { * * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose * - * @param eventType The event that should invoke the handler. + * @param eventType The event that should revoke the handler. * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, @@ -13694,7 +14039,7 @@ declare namespace Office { */ interface MessageRead extends Message, ItemRead { /** - * Gets an array of attachments for the item. + * Gets the item's attachments as an array. * * [Api set: Mailbox 1.0] * @@ -13802,6 +14147,22 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read */ from: EmailAddressDetails; + /** + * Gets the internet headers of a message. + * + * The internetHeaders property returns an InternetHeaders object that provides methods to manage the internet headers on the message. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ * + * @beta + */ + internetHeaders: Office.InternetHeaders; /** * Gets the Internet message identifier for an email message. * @@ -14014,7 +14375,7 @@ declare namespace Office { * Adds an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -14042,7 +14403,7 @@ declare namespace Office { * Adds an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -14399,7 +14760,7 @@ declare namespace Office { * Removes an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -14413,7 +14774,7 @@ declare namespace Office { * * `removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void;` * - * @param eventType The event that should invoke the handler. + * @param eventType The event that should revoke the handler. * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. * @param options Optional. An object literal that contains one or more of the following properties. @@ -14426,7 +14787,7 @@ declare namespace Office { * Removes an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -14436,7 +14797,7 @@ declare namespace Office { * * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read * - * @param eventType The event that should invoke the handler. + * @param eventType The event that should revoke the handler. * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, @@ -14733,7 +15094,7 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently, the supported event types are `Office.EventType.ItemChanged` and `Office.EventType.OfficeThemeChanged`. + * Currently, the only supported event type is `Office.EventType.ItemChanged`. In Preview, `Office.EventType.OfficeThemeChanged` is also supported. * * [Api set: Mailbox 1.5] * @@ -15139,6 +15500,27 @@ declare namespace Office { * @param userContext Optional. Any state data that is passed to the asynchronous method. */ makeEwsRequestAsync(data: any, callback: (result: AsyncResult) => void, userContext?: any): void; + /** + * Removes an event handler for a supported event. + * + * Currently, the only supported event type is `Office.EventType.ItemChanged`. In Preview, `Office.EventType.OfficeThemeChanged` is also supported. + * + * [Api set: Mailbox 1.5] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param eventType The event that should revoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to addHandlerAsync. + * @param options Optional. Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + */ + removeHandlerAsync(eventType: Office.EventType, handler: (type: EventType) => void, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; } /** @@ -16444,7 +16826,7 @@ declare namespace Office { */ owner: String; /** - * The remote REST url related to the owner’s mailbox. + * The remote REST URL related to the owner’s mailbox. */ restUrl: String; /** @@ -21397,12 +21779,11 @@ declare namespace Excel { inCellDropDown: boolean; /** * - * Source of the list for data validation - When setting the value, it can be passed in as a Excel Range object, or a string that contains comma separated number, boolean or date. + * The source of the list for data validation. The value is a string, which can either be a range reference (e.g. `"=Names!$A$1:$A$3"`) or a comma-separated list of the values themselves. * * [Api set: ExcelApi 1.8] */ - source: string | Range; + source: string; } /** * diff --git a/types/puppeteer/index.d.ts b/types/puppeteer/index.d.ts index 3ff4efbe4b..f1669473a6 100644 --- a/types/puppeteer/index.d.ts +++ b/types/puppeteer/index.d.ts @@ -1169,6 +1169,15 @@ export interface FrameBase extends Evalable { */ hover(selector: string): Promise; + /** + * Triggers a `change` and `input` event once all the provided options have been selected. + * If there's no `` has the `multiple` attribute, + * all values are considered, otherwise only the first one is taken into account. + */ + select(selector: string, ...values: string[]): Promise; + /** * Sets the page content. * @param html HTML markup to assign to the page. @@ -1472,15 +1481,6 @@ export interface Page extends EventEmitter, FrameBase { screenshot(options?: BinaryScreenShotOptions): Promise; screenshot(options?: ScreenshotOptions): Promise; - /** - * Triggers a `change` and `input` event once all the provided options have been selected. - * If there's no `` has the `multiple` attribute, - * all values are considered, otherwise only the first one is taken into account. - */ - select(selector: string, ...values: string[]): Promise; - /** * Toggles bypassing page's Content-Security-Policy. * NOTE CSP bypassing happens at the moment of CSP initialization rather then evaluation. diff --git a/types/ramda/es/F.d.ts b/types/ramda/es/F.d.ts new file mode 100644 index 0000000000..bdc0d570d9 --- /dev/null +++ b/types/ramda/es/F.d.ts @@ -0,0 +1,2 @@ +import { F } from '../index'; +export default F; diff --git a/types/ramda/es/T.d.ts b/types/ramda/es/T.d.ts new file mode 100644 index 0000000000..634808e684 --- /dev/null +++ b/types/ramda/es/T.d.ts @@ -0,0 +1,2 @@ +import { T } from '../index'; +export default T; diff --git a/types/ramda/es/add.d.ts b/types/ramda/es/add.d.ts new file mode 100644 index 0000000000..b7b3ee887c --- /dev/null +++ b/types/ramda/es/add.d.ts @@ -0,0 +1,2 @@ +import { add } from '../index'; +export default add; diff --git a/types/ramda/es/addIndex.d.ts b/types/ramda/es/addIndex.d.ts new file mode 100644 index 0000000000..9f27967dcb --- /dev/null +++ b/types/ramda/es/addIndex.d.ts @@ -0,0 +1,2 @@ +import { addIndex } from '../index'; +export default addIndex; diff --git a/types/ramda/es/adjust.d.ts b/types/ramda/es/adjust.d.ts new file mode 100644 index 0000000000..22b65ec38e --- /dev/null +++ b/types/ramda/es/adjust.d.ts @@ -0,0 +1,2 @@ +import { adjust } from '../index'; +export default adjust; diff --git a/types/ramda/es/all.d.ts b/types/ramda/es/all.d.ts new file mode 100644 index 0000000000..a2f6d934f9 --- /dev/null +++ b/types/ramda/es/all.d.ts @@ -0,0 +1,2 @@ +import { all } from '../index'; +export default all; diff --git a/types/ramda/es/allPass.d.ts b/types/ramda/es/allPass.d.ts new file mode 100644 index 0000000000..d44ac20e9d --- /dev/null +++ b/types/ramda/es/allPass.d.ts @@ -0,0 +1,2 @@ +import { allPass } from '../index'; +export default allPass; diff --git a/types/ramda/es/always.d.ts b/types/ramda/es/always.d.ts new file mode 100644 index 0000000000..aadc94983b --- /dev/null +++ b/types/ramda/es/always.d.ts @@ -0,0 +1,2 @@ +import { always } from '../index'; +export default always; diff --git a/types/ramda/es/and.d.ts b/types/ramda/es/and.d.ts new file mode 100644 index 0000000000..3d505f6ec3 --- /dev/null +++ b/types/ramda/es/and.d.ts @@ -0,0 +1,2 @@ +import { and } from '../index'; +export default and; diff --git a/types/ramda/es/any.d.ts b/types/ramda/es/any.d.ts new file mode 100644 index 0000000000..1e77e505e9 --- /dev/null +++ b/types/ramda/es/any.d.ts @@ -0,0 +1,2 @@ +import { any } from '../index'; +export default any; diff --git a/types/ramda/es/anyPass.d.ts b/types/ramda/es/anyPass.d.ts new file mode 100644 index 0000000000..d8e7fc8f0d --- /dev/null +++ b/types/ramda/es/anyPass.d.ts @@ -0,0 +1,2 @@ +import { anyPass } from '../index'; +export default anyPass; diff --git a/types/ramda/es/ap.d.ts b/types/ramda/es/ap.d.ts new file mode 100644 index 0000000000..5bf98d7fbd --- /dev/null +++ b/types/ramda/es/ap.d.ts @@ -0,0 +1,2 @@ +import { ap } from '../index'; +export default ap; diff --git a/types/ramda/es/aperture.d.ts b/types/ramda/es/aperture.d.ts new file mode 100644 index 0000000000..7536b091b8 --- /dev/null +++ b/types/ramda/es/aperture.d.ts @@ -0,0 +1,2 @@ +import { aperture } from '../index'; +export default aperture; diff --git a/types/ramda/es/append.d.ts b/types/ramda/es/append.d.ts new file mode 100644 index 0000000000..88a4e7cde2 --- /dev/null +++ b/types/ramda/es/append.d.ts @@ -0,0 +1,2 @@ +import { append } from '../index'; +export default append; diff --git a/types/ramda/es/apply.d.ts b/types/ramda/es/apply.d.ts new file mode 100644 index 0000000000..53d90689ed --- /dev/null +++ b/types/ramda/es/apply.d.ts @@ -0,0 +1,2 @@ +import { apply } from '../index'; +export default apply; diff --git a/types/ramda/es/applySpec.d.ts b/types/ramda/es/applySpec.d.ts new file mode 100644 index 0000000000..57e5b8018c --- /dev/null +++ b/types/ramda/es/applySpec.d.ts @@ -0,0 +1,2 @@ +import { applySpec } from '../index'; +export default applySpec; diff --git a/types/ramda/es/applyTo.d.ts b/types/ramda/es/applyTo.d.ts new file mode 100644 index 0000000000..30869542db --- /dev/null +++ b/types/ramda/es/applyTo.d.ts @@ -0,0 +1,2 @@ +import { applyTo } from '../index'; +export default applyTo; diff --git a/types/ramda/es/ascend.d.ts b/types/ramda/es/ascend.d.ts new file mode 100644 index 0000000000..e4c4e1199b --- /dev/null +++ b/types/ramda/es/ascend.d.ts @@ -0,0 +1,2 @@ +import { ascend } from '../index'; +export default ascend; diff --git a/types/ramda/es/assoc.d.ts b/types/ramda/es/assoc.d.ts new file mode 100644 index 0000000000..5acc97a0aa --- /dev/null +++ b/types/ramda/es/assoc.d.ts @@ -0,0 +1,2 @@ +import { assoc } from '../index'; +export default assoc; diff --git a/types/ramda/es/assocPath.d.ts b/types/ramda/es/assocPath.d.ts new file mode 100644 index 0000000000..040671bf38 --- /dev/null +++ b/types/ramda/es/assocPath.d.ts @@ -0,0 +1,2 @@ +import { assocPath } from '../index'; +export default assocPath; diff --git a/types/ramda/es/binary.d.ts b/types/ramda/es/binary.d.ts new file mode 100644 index 0000000000..259cb96e82 --- /dev/null +++ b/types/ramda/es/binary.d.ts @@ -0,0 +1,2 @@ +import { binary } from '../index'; +export default binary; diff --git a/types/ramda/es/bind.d.ts b/types/ramda/es/bind.d.ts new file mode 100644 index 0000000000..fe108f09a7 --- /dev/null +++ b/types/ramda/es/bind.d.ts @@ -0,0 +1,2 @@ +import { bind } from '../index'; +export default bind; diff --git a/types/ramda/es/both.d.ts b/types/ramda/es/both.d.ts new file mode 100644 index 0000000000..8061154cdd --- /dev/null +++ b/types/ramda/es/both.d.ts @@ -0,0 +1,2 @@ +import { both } from '../index'; +export default both; diff --git a/types/ramda/es/call.d.ts b/types/ramda/es/call.d.ts new file mode 100644 index 0000000000..35b6fda88c --- /dev/null +++ b/types/ramda/es/call.d.ts @@ -0,0 +1,2 @@ +import { call } from '../index'; +export default call; diff --git a/types/ramda/es/chain.d.ts b/types/ramda/es/chain.d.ts new file mode 100644 index 0000000000..53aafe210a --- /dev/null +++ b/types/ramda/es/chain.d.ts @@ -0,0 +1,2 @@ +import { chain } from '../index'; +export default chain; diff --git a/types/ramda/es/clamp.d.ts b/types/ramda/es/clamp.d.ts new file mode 100644 index 0000000000..1376643cbf --- /dev/null +++ b/types/ramda/es/clamp.d.ts @@ -0,0 +1,2 @@ +import { clamp } from '../index'; +export default clamp; diff --git a/types/ramda/es/clone.d.ts b/types/ramda/es/clone.d.ts new file mode 100644 index 0000000000..b95f842554 --- /dev/null +++ b/types/ramda/es/clone.d.ts @@ -0,0 +1,2 @@ +import { clone } from '../index'; +export default clone; diff --git a/types/ramda/es/comparator.d.ts b/types/ramda/es/comparator.d.ts new file mode 100644 index 0000000000..34023dea00 --- /dev/null +++ b/types/ramda/es/comparator.d.ts @@ -0,0 +1,2 @@ +import { comparator } from '../index'; +export default comparator; diff --git a/types/ramda/es/complement.d.ts b/types/ramda/es/complement.d.ts new file mode 100644 index 0000000000..b5d31fee50 --- /dev/null +++ b/types/ramda/es/complement.d.ts @@ -0,0 +1,2 @@ +import { complement } from '../index'; +export default complement; diff --git a/types/ramda/es/compose.d.ts b/types/ramda/es/compose.d.ts new file mode 100644 index 0000000000..dca4578840 --- /dev/null +++ b/types/ramda/es/compose.d.ts @@ -0,0 +1,2 @@ +import { compose } from '../index'; +export default compose; diff --git a/types/ramda/es/composeK.d.ts b/types/ramda/es/composeK.d.ts new file mode 100644 index 0000000000..646005a0b6 --- /dev/null +++ b/types/ramda/es/composeK.d.ts @@ -0,0 +1,2 @@ +import { composeK } from '../index'; +export default composeK; diff --git a/types/ramda/es/composeP.d.ts b/types/ramda/es/composeP.d.ts new file mode 100644 index 0000000000..ca0a96fb25 --- /dev/null +++ b/types/ramda/es/composeP.d.ts @@ -0,0 +1,2 @@ +import { composeP } from '../index'; +export default composeP; diff --git a/types/ramda/es/concat.d.ts b/types/ramda/es/concat.d.ts new file mode 100644 index 0000000000..9ae333cf95 --- /dev/null +++ b/types/ramda/es/concat.d.ts @@ -0,0 +1,2 @@ +import { concat } from '../index'; +export default concat; diff --git a/types/ramda/es/cond.d.ts b/types/ramda/es/cond.d.ts new file mode 100644 index 0000000000..0ab4930b0e --- /dev/null +++ b/types/ramda/es/cond.d.ts @@ -0,0 +1,2 @@ +import { cond } from '../index'; +export default cond; diff --git a/types/ramda/es/construct.d.ts b/types/ramda/es/construct.d.ts new file mode 100644 index 0000000000..736871cb61 --- /dev/null +++ b/types/ramda/es/construct.d.ts @@ -0,0 +1,2 @@ +import { construct } from '../index'; +export default construct; diff --git a/types/ramda/es/constructN.d.ts b/types/ramda/es/constructN.d.ts new file mode 100644 index 0000000000..d9efc76cf3 --- /dev/null +++ b/types/ramda/es/constructN.d.ts @@ -0,0 +1,2 @@ +import { constructN } from '../index'; +export default constructN; diff --git a/types/ramda/es/contains.d.ts b/types/ramda/es/contains.d.ts new file mode 100644 index 0000000000..d193bc6109 --- /dev/null +++ b/types/ramda/es/contains.d.ts @@ -0,0 +1,2 @@ +import { contains } from '../index'; +export default contains; diff --git a/types/ramda/es/converge.d.ts b/types/ramda/es/converge.d.ts new file mode 100644 index 0000000000..181c0bd7e9 --- /dev/null +++ b/types/ramda/es/converge.d.ts @@ -0,0 +1,2 @@ +import { converge } from '../index'; +export default converge; diff --git a/types/ramda/es/countBy.d.ts b/types/ramda/es/countBy.d.ts new file mode 100644 index 0000000000..03d46e23f0 --- /dev/null +++ b/types/ramda/es/countBy.d.ts @@ -0,0 +1,2 @@ +import { countBy } from '../index'; +export default countBy; diff --git a/types/ramda/es/curry.d.ts b/types/ramda/es/curry.d.ts new file mode 100644 index 0000000000..0d94abf560 --- /dev/null +++ b/types/ramda/es/curry.d.ts @@ -0,0 +1,2 @@ +import { curry } from '../index'; +export default curry; diff --git a/types/ramda/es/curryN.d.ts b/types/ramda/es/curryN.d.ts new file mode 100644 index 0000000000..dca634c3b8 --- /dev/null +++ b/types/ramda/es/curryN.d.ts @@ -0,0 +1,2 @@ +import { curryN } from '../index'; +export default curryN; diff --git a/types/ramda/es/dec.d.ts b/types/ramda/es/dec.d.ts new file mode 100644 index 0000000000..605681f0d8 --- /dev/null +++ b/types/ramda/es/dec.d.ts @@ -0,0 +1,2 @@ +import { dec } from '../index'; +export default dec; diff --git a/types/ramda/es/defaultTo.d.ts b/types/ramda/es/defaultTo.d.ts new file mode 100644 index 0000000000..9c61199544 --- /dev/null +++ b/types/ramda/es/defaultTo.d.ts @@ -0,0 +1,2 @@ +import { defaultTo } from '../index'; +export default defaultTo; diff --git a/types/ramda/es/descend.d.ts b/types/ramda/es/descend.d.ts new file mode 100644 index 0000000000..d0ff2b6d54 --- /dev/null +++ b/types/ramda/es/descend.d.ts @@ -0,0 +1,2 @@ +import { descend } from '../index'; +export default descend; diff --git a/types/ramda/es/difference.d.ts b/types/ramda/es/difference.d.ts new file mode 100644 index 0000000000..1ef0096735 --- /dev/null +++ b/types/ramda/es/difference.d.ts @@ -0,0 +1,2 @@ +import { difference } from '../index'; +export default difference; diff --git a/types/ramda/es/differenceWith.d.ts b/types/ramda/es/differenceWith.d.ts new file mode 100644 index 0000000000..5a2366f6e0 --- /dev/null +++ b/types/ramda/es/differenceWith.d.ts @@ -0,0 +1,2 @@ +import { differenceWith } from '../index'; +export default differenceWith; diff --git a/types/ramda/es/dissoc.d.ts b/types/ramda/es/dissoc.d.ts new file mode 100644 index 0000000000..0ed3e2def9 --- /dev/null +++ b/types/ramda/es/dissoc.d.ts @@ -0,0 +1,2 @@ +import { dissoc } from '../index'; +export default dissoc; diff --git a/types/ramda/es/dissocPath.d.ts b/types/ramda/es/dissocPath.d.ts new file mode 100644 index 0000000000..83c705d80f --- /dev/null +++ b/types/ramda/es/dissocPath.d.ts @@ -0,0 +1,2 @@ +import { dissocPath } from '../index'; +export default dissocPath; diff --git a/types/ramda/es/divide.d.ts b/types/ramda/es/divide.d.ts new file mode 100644 index 0000000000..45c27a4d21 --- /dev/null +++ b/types/ramda/es/divide.d.ts @@ -0,0 +1,2 @@ +import { divide } from '../index'; +export default divide; diff --git a/types/ramda/es/drop.d.ts b/types/ramda/es/drop.d.ts new file mode 100644 index 0000000000..fb89bef7f0 --- /dev/null +++ b/types/ramda/es/drop.d.ts @@ -0,0 +1,2 @@ +import { drop } from '../index'; +export default drop; diff --git a/types/ramda/es/dropLast.d.ts b/types/ramda/es/dropLast.d.ts new file mode 100644 index 0000000000..2402f890f1 --- /dev/null +++ b/types/ramda/es/dropLast.d.ts @@ -0,0 +1,2 @@ +import { dropLast } from '../index'; +export default dropLast; diff --git a/types/ramda/es/dropLastWhile.d.ts b/types/ramda/es/dropLastWhile.d.ts new file mode 100644 index 0000000000..82950dd98b --- /dev/null +++ b/types/ramda/es/dropLastWhile.d.ts @@ -0,0 +1,2 @@ +import { dropLastWhile } from '../index'; +export default dropLastWhile; diff --git a/types/ramda/es/either.d.ts b/types/ramda/es/either.d.ts new file mode 100644 index 0000000000..130f0c4e7f --- /dev/null +++ b/types/ramda/es/either.d.ts @@ -0,0 +1,2 @@ +import { either } from '../index'; +export default either; diff --git a/types/ramda/es/empty.d.ts b/types/ramda/es/empty.d.ts new file mode 100644 index 0000000000..2cb6e8fade --- /dev/null +++ b/types/ramda/es/empty.d.ts @@ -0,0 +1,2 @@ +import { empty } from '../index'; +export default empty; diff --git a/types/ramda/es/endsWith.d.ts b/types/ramda/es/endsWith.d.ts new file mode 100644 index 0000000000..f23a961bbc --- /dev/null +++ b/types/ramda/es/endsWith.d.ts @@ -0,0 +1,2 @@ +import { endsWith } from '../index'; +export default endsWith; diff --git a/types/ramda/es/eqBy.d.ts b/types/ramda/es/eqBy.d.ts new file mode 100644 index 0000000000..3ed508587a --- /dev/null +++ b/types/ramda/es/eqBy.d.ts @@ -0,0 +1,2 @@ +import { eqBy } from '../index'; +export default eqBy; diff --git a/types/ramda/es/eqProps.d.ts b/types/ramda/es/eqProps.d.ts new file mode 100644 index 0000000000..e33b163311 --- /dev/null +++ b/types/ramda/es/eqProps.d.ts @@ -0,0 +1,2 @@ +import { eqProps } from '../index'; +export default eqProps; diff --git a/types/ramda/es/equals.d.ts b/types/ramda/es/equals.d.ts new file mode 100644 index 0000000000..6d4c8050e1 --- /dev/null +++ b/types/ramda/es/equals.d.ts @@ -0,0 +1,2 @@ +import { equals } from '../index'; +export default equals; diff --git a/types/ramda/es/evolve.d.ts b/types/ramda/es/evolve.d.ts new file mode 100644 index 0000000000..21ec9896a3 --- /dev/null +++ b/types/ramda/es/evolve.d.ts @@ -0,0 +1,2 @@ +import { evolve } from '../index'; +export default evolve; diff --git a/types/ramda/es/filter.d.ts b/types/ramda/es/filter.d.ts new file mode 100644 index 0000000000..a4f7133638 --- /dev/null +++ b/types/ramda/es/filter.d.ts @@ -0,0 +1,2 @@ +import { filter } from '../index'; +export default filter; diff --git a/types/ramda/es/find.d.ts b/types/ramda/es/find.d.ts new file mode 100644 index 0000000000..a8c2905bed --- /dev/null +++ b/types/ramda/es/find.d.ts @@ -0,0 +1,2 @@ +import { find } from '../index'; +export default find; diff --git a/types/ramda/es/findIndex.d.ts b/types/ramda/es/findIndex.d.ts new file mode 100644 index 0000000000..88c14e28fc --- /dev/null +++ b/types/ramda/es/findIndex.d.ts @@ -0,0 +1,2 @@ +import { findIndex } from '../index'; +export default findIndex; diff --git a/types/ramda/es/findLast.d.ts b/types/ramda/es/findLast.d.ts new file mode 100644 index 0000000000..3d8ad5c7fa --- /dev/null +++ b/types/ramda/es/findLast.d.ts @@ -0,0 +1,2 @@ +import { findLast } from '../index'; +export default findLast; diff --git a/types/ramda/es/findLastIndex.d.ts b/types/ramda/es/findLastIndex.d.ts new file mode 100644 index 0000000000..ae1edaeb14 --- /dev/null +++ b/types/ramda/es/findLastIndex.d.ts @@ -0,0 +1,2 @@ +import { findLastIndex } from '../index'; +export default findLastIndex; diff --git a/types/ramda/es/flatten.d.ts b/types/ramda/es/flatten.d.ts new file mode 100644 index 0000000000..75a19402dc --- /dev/null +++ b/types/ramda/es/flatten.d.ts @@ -0,0 +1,2 @@ +import { flatten } from '../index'; +export default flatten; diff --git a/types/ramda/es/flip.d.ts b/types/ramda/es/flip.d.ts new file mode 100644 index 0000000000..164e607f33 --- /dev/null +++ b/types/ramda/es/flip.d.ts @@ -0,0 +1,2 @@ +import { flip } from '../index'; +export default flip; diff --git a/types/ramda/es/forEach.d.ts b/types/ramda/es/forEach.d.ts new file mode 100644 index 0000000000..c5f7a57837 --- /dev/null +++ b/types/ramda/es/forEach.d.ts @@ -0,0 +1,2 @@ +import { forEach } from '../index'; +export default forEach; diff --git a/types/ramda/es/forEachObjIndexed.d.ts b/types/ramda/es/forEachObjIndexed.d.ts new file mode 100644 index 0000000000..a098026381 --- /dev/null +++ b/types/ramda/es/forEachObjIndexed.d.ts @@ -0,0 +1,2 @@ +import { forEachObjIndexed } from '../index'; +export default forEachObjIndexed; diff --git a/types/ramda/es/fromPairs.d.ts b/types/ramda/es/fromPairs.d.ts new file mode 100644 index 0000000000..0cb1778350 --- /dev/null +++ b/types/ramda/es/fromPairs.d.ts @@ -0,0 +1,2 @@ +import { fromPairs } from '../index'; +export default fromPairs; diff --git a/types/ramda/es/groupBy.d.ts b/types/ramda/es/groupBy.d.ts new file mode 100644 index 0000000000..af2b32083b --- /dev/null +++ b/types/ramda/es/groupBy.d.ts @@ -0,0 +1,2 @@ +import { groupBy } from '../index'; +export default groupBy; diff --git a/types/ramda/es/groupWith.d.ts b/types/ramda/es/groupWith.d.ts new file mode 100644 index 0000000000..f9dca6c16b --- /dev/null +++ b/types/ramda/es/groupWith.d.ts @@ -0,0 +1,2 @@ +import { groupWith } from '../index'; +export default groupWith; diff --git a/types/ramda/es/gt.d.ts b/types/ramda/es/gt.d.ts new file mode 100644 index 0000000000..4cdb70d336 --- /dev/null +++ b/types/ramda/es/gt.d.ts @@ -0,0 +1,2 @@ +import { gt } from '../index'; +export default gt; diff --git a/types/ramda/es/gte.d.ts b/types/ramda/es/gte.d.ts new file mode 100644 index 0000000000..2b878eabc6 --- /dev/null +++ b/types/ramda/es/gte.d.ts @@ -0,0 +1,2 @@ +import { gte } from '../index'; +export default gte; diff --git a/types/ramda/es/has.d.ts b/types/ramda/es/has.d.ts new file mode 100644 index 0000000000..88c79bfdb0 --- /dev/null +++ b/types/ramda/es/has.d.ts @@ -0,0 +1,2 @@ +import { has } from '../index'; +export default has; diff --git a/types/ramda/es/hasIn.d.ts b/types/ramda/es/hasIn.d.ts new file mode 100644 index 0000000000..4cad709e64 --- /dev/null +++ b/types/ramda/es/hasIn.d.ts @@ -0,0 +1,2 @@ +import { hasIn } from '../index'; +export default hasIn; diff --git a/types/ramda/es/head.d.ts b/types/ramda/es/head.d.ts new file mode 100644 index 0000000000..bb1f3dd7b9 --- /dev/null +++ b/types/ramda/es/head.d.ts @@ -0,0 +1,2 @@ +import { head } from '../index'; +export default head; diff --git a/types/ramda/es/identical.d.ts b/types/ramda/es/identical.d.ts new file mode 100644 index 0000000000..6f2ccf4f94 --- /dev/null +++ b/types/ramda/es/identical.d.ts @@ -0,0 +1,2 @@ +import { identical } from '../index'; +export default identical; diff --git a/types/ramda/es/identity.d.ts b/types/ramda/es/identity.d.ts new file mode 100644 index 0000000000..ba0936116e --- /dev/null +++ b/types/ramda/es/identity.d.ts @@ -0,0 +1,2 @@ +import { identity } from '../index'; +export default identity; diff --git a/types/ramda/es/ifElse.d.ts b/types/ramda/es/ifElse.d.ts new file mode 100644 index 0000000000..46674829d7 --- /dev/null +++ b/types/ramda/es/ifElse.d.ts @@ -0,0 +1,2 @@ +import { ifElse } from '../index'; +export default ifElse; diff --git a/types/ramda/es/inc.d.ts b/types/ramda/es/inc.d.ts new file mode 100644 index 0000000000..c173b2dd8e --- /dev/null +++ b/types/ramda/es/inc.d.ts @@ -0,0 +1,2 @@ +import { inc } from '../index'; +export default inc; diff --git a/types/ramda/es/indexBy.d.ts b/types/ramda/es/indexBy.d.ts new file mode 100644 index 0000000000..93b29ec7cd --- /dev/null +++ b/types/ramda/es/indexBy.d.ts @@ -0,0 +1,2 @@ +import { indexBy } from '../index'; +export default indexBy; diff --git a/types/ramda/es/indexOf.d.ts b/types/ramda/es/indexOf.d.ts new file mode 100644 index 0000000000..22aa4b44db --- /dev/null +++ b/types/ramda/es/indexOf.d.ts @@ -0,0 +1,2 @@ +import { indexOf } from '../index'; +export default indexOf; diff --git a/types/ramda/es/init.d.ts b/types/ramda/es/init.d.ts new file mode 100644 index 0000000000..03849db7b0 --- /dev/null +++ b/types/ramda/es/init.d.ts @@ -0,0 +1,2 @@ +import { init } from '../index'; +export default init; diff --git a/types/ramda/es/insert.d.ts b/types/ramda/es/insert.d.ts new file mode 100644 index 0000000000..3fdde857fa --- /dev/null +++ b/types/ramda/es/insert.d.ts @@ -0,0 +1,2 @@ +import { insert } from '../index'; +export default insert; diff --git a/types/ramda/es/insertAll.d.ts b/types/ramda/es/insertAll.d.ts new file mode 100644 index 0000000000..a9fd784995 --- /dev/null +++ b/types/ramda/es/insertAll.d.ts @@ -0,0 +1,2 @@ +import { insertAll } from '../index'; +export default insertAll; diff --git a/types/ramda/es/intersection.d.ts b/types/ramda/es/intersection.d.ts new file mode 100644 index 0000000000..1ec1aadbe4 --- /dev/null +++ b/types/ramda/es/intersection.d.ts @@ -0,0 +1,2 @@ +import { intersection } from '../index'; +export default intersection; diff --git a/types/ramda/es/intersectionWith.d.ts b/types/ramda/es/intersectionWith.d.ts new file mode 100644 index 0000000000..773c36acbe --- /dev/null +++ b/types/ramda/es/intersectionWith.d.ts @@ -0,0 +1,2 @@ +import { intersectionWith } from '../index'; +export default intersectionWith; diff --git a/types/ramda/es/intersperse.d.ts b/types/ramda/es/intersperse.d.ts new file mode 100644 index 0000000000..b4420de34a --- /dev/null +++ b/types/ramda/es/intersperse.d.ts @@ -0,0 +1,2 @@ +import { intersperse } from '../index'; +export default intersperse; diff --git a/types/ramda/es/into.d.ts b/types/ramda/es/into.d.ts new file mode 100644 index 0000000000..3daa53afdd --- /dev/null +++ b/types/ramda/es/into.d.ts @@ -0,0 +1,2 @@ +import { into } from '../index'; +export default into; diff --git a/types/ramda/es/invert.d.ts b/types/ramda/es/invert.d.ts new file mode 100644 index 0000000000..825773f5dc --- /dev/null +++ b/types/ramda/es/invert.d.ts @@ -0,0 +1,2 @@ +import { invert } from '../index'; +export default invert; diff --git a/types/ramda/es/invertObj.d.ts b/types/ramda/es/invertObj.d.ts new file mode 100644 index 0000000000..8fd0f1fe7d --- /dev/null +++ b/types/ramda/es/invertObj.d.ts @@ -0,0 +1,2 @@ +import { invertObj } from '../index'; +export default invertObj; diff --git a/types/ramda/es/invoker.d.ts b/types/ramda/es/invoker.d.ts new file mode 100644 index 0000000000..1930a78917 --- /dev/null +++ b/types/ramda/es/invoker.d.ts @@ -0,0 +1,2 @@ +import { invoker } from '../index'; +export default invoker; diff --git a/types/ramda/es/is.d.ts b/types/ramda/es/is.d.ts new file mode 100644 index 0000000000..262d14160d --- /dev/null +++ b/types/ramda/es/is.d.ts @@ -0,0 +1,2 @@ +import { is } from '../index'; +export default is; diff --git a/types/ramda/es/isArrayLike.d.ts b/types/ramda/es/isArrayLike.d.ts new file mode 100644 index 0000000000..04aa464805 --- /dev/null +++ b/types/ramda/es/isArrayLike.d.ts @@ -0,0 +1,2 @@ +import { isArrayLike } from '../index'; +export default isArrayLike; diff --git a/types/ramda/es/isEmpty.d.ts b/types/ramda/es/isEmpty.d.ts new file mode 100644 index 0000000000..bea7bb8d08 --- /dev/null +++ b/types/ramda/es/isEmpty.d.ts @@ -0,0 +1,2 @@ +import { isEmpty } from '../index'; +export default isEmpty; diff --git a/types/ramda/es/isNaN.d.ts b/types/ramda/es/isNaN.d.ts new file mode 100644 index 0000000000..5dbe28177a --- /dev/null +++ b/types/ramda/es/isNaN.d.ts @@ -0,0 +1,2 @@ +import { isNaN } from '../index'; +export default isNaN; diff --git a/types/ramda/es/isNil.d.ts b/types/ramda/es/isNil.d.ts new file mode 100644 index 0000000000..bce78e7c70 --- /dev/null +++ b/types/ramda/es/isNil.d.ts @@ -0,0 +1,2 @@ +import { isNil } from '../index'; +export default isNil; diff --git a/types/ramda/es/join.d.ts b/types/ramda/es/join.d.ts new file mode 100644 index 0000000000..7505b7e769 --- /dev/null +++ b/types/ramda/es/join.d.ts @@ -0,0 +1,2 @@ +import { join } from '../index'; +export default join; diff --git a/types/ramda/es/juxt.d.ts b/types/ramda/es/juxt.d.ts new file mode 100644 index 0000000000..23e342f53d --- /dev/null +++ b/types/ramda/es/juxt.d.ts @@ -0,0 +1,2 @@ +import { juxt } from '../index'; +export default juxt; diff --git a/types/ramda/es/keys.d.ts b/types/ramda/es/keys.d.ts new file mode 100644 index 0000000000..b44e894b7a --- /dev/null +++ b/types/ramda/es/keys.d.ts @@ -0,0 +1,2 @@ +import { keys } from '../index'; +export default keys; diff --git a/types/ramda/es/keysIn.d.ts b/types/ramda/es/keysIn.d.ts new file mode 100644 index 0000000000..a54fb92a6d --- /dev/null +++ b/types/ramda/es/keysIn.d.ts @@ -0,0 +1,2 @@ +import { keysIn } from '../index'; +export default keysIn; diff --git a/types/ramda/es/last.d.ts b/types/ramda/es/last.d.ts new file mode 100644 index 0000000000..f8ea740735 --- /dev/null +++ b/types/ramda/es/last.d.ts @@ -0,0 +1,2 @@ +import { last } from '../index'; +export default last; diff --git a/types/ramda/es/lastIndexOf.d.ts b/types/ramda/es/lastIndexOf.d.ts new file mode 100644 index 0000000000..c34fe55a03 --- /dev/null +++ b/types/ramda/es/lastIndexOf.d.ts @@ -0,0 +1,2 @@ +import { lastIndexOf } from '../index'; +export default lastIndexOf; diff --git a/types/ramda/es/length.d.ts b/types/ramda/es/length.d.ts new file mode 100644 index 0000000000..7ef1d90dd5 --- /dev/null +++ b/types/ramda/es/length.d.ts @@ -0,0 +1,2 @@ +import { length } from '../index'; +export default length; diff --git a/types/ramda/es/lens.d.ts b/types/ramda/es/lens.d.ts new file mode 100644 index 0000000000..03688e0c4f --- /dev/null +++ b/types/ramda/es/lens.d.ts @@ -0,0 +1,2 @@ +import { lens } from '../index'; +export default lens; diff --git a/types/ramda/es/lensIndex.d.ts b/types/ramda/es/lensIndex.d.ts new file mode 100644 index 0000000000..d85cd88c2f --- /dev/null +++ b/types/ramda/es/lensIndex.d.ts @@ -0,0 +1,2 @@ +import { lensIndex } from '../index'; +export default lensIndex; diff --git a/types/ramda/es/lensPath.d.ts b/types/ramda/es/lensPath.d.ts new file mode 100644 index 0000000000..67b60fbf3c --- /dev/null +++ b/types/ramda/es/lensPath.d.ts @@ -0,0 +1,2 @@ +import { lensPath } from '../index'; +export default lensPath; diff --git a/types/ramda/es/lensProp.d.ts b/types/ramda/es/lensProp.d.ts new file mode 100644 index 0000000000..fc8db9e32d --- /dev/null +++ b/types/ramda/es/lensProp.d.ts @@ -0,0 +1,2 @@ +import { lensProp } from '../index'; +export default lensProp; diff --git a/types/ramda/es/lift.d.ts b/types/ramda/es/lift.d.ts new file mode 100644 index 0000000000..73e4cba184 --- /dev/null +++ b/types/ramda/es/lift.d.ts @@ -0,0 +1,2 @@ +import { lift } from '../index'; +export default lift; diff --git a/types/ramda/es/lt.d.ts b/types/ramda/es/lt.d.ts new file mode 100644 index 0000000000..71360d1c43 --- /dev/null +++ b/types/ramda/es/lt.d.ts @@ -0,0 +1,2 @@ +import { lt } from '../index'; +export default lt; diff --git a/types/ramda/es/lte.d.ts b/types/ramda/es/lte.d.ts new file mode 100644 index 0000000000..980ef22037 --- /dev/null +++ b/types/ramda/es/lte.d.ts @@ -0,0 +1,2 @@ +import { lte } from '../index'; +export default lte; diff --git a/types/ramda/es/map.d.ts b/types/ramda/es/map.d.ts new file mode 100644 index 0000000000..6883cb62f6 --- /dev/null +++ b/types/ramda/es/map.d.ts @@ -0,0 +1,2 @@ +import { map } from '../index'; +export default map; diff --git a/types/ramda/es/mapAccum.d.ts b/types/ramda/es/mapAccum.d.ts new file mode 100644 index 0000000000..356c715787 --- /dev/null +++ b/types/ramda/es/mapAccum.d.ts @@ -0,0 +1,2 @@ +import { mapAccum } from '../index'; +export default mapAccum; diff --git a/types/ramda/es/mapAccumRight.d.ts b/types/ramda/es/mapAccumRight.d.ts new file mode 100644 index 0000000000..817e73bb97 --- /dev/null +++ b/types/ramda/es/mapAccumRight.d.ts @@ -0,0 +1,2 @@ +import { mapAccumRight } from '../index'; +export default mapAccumRight; diff --git a/types/ramda/es/mapObjIndexed.d.ts b/types/ramda/es/mapObjIndexed.d.ts new file mode 100644 index 0000000000..3ef1eca52d --- /dev/null +++ b/types/ramda/es/mapObjIndexed.d.ts @@ -0,0 +1,2 @@ +import { mapObjIndexed } from '../index'; +export default mapObjIndexed; diff --git a/types/ramda/es/match.d.ts b/types/ramda/es/match.d.ts new file mode 100644 index 0000000000..a24f0bd6d0 --- /dev/null +++ b/types/ramda/es/match.d.ts @@ -0,0 +1,2 @@ +import { match } from '../index'; +export default match; diff --git a/types/ramda/es/mathMod.d.ts b/types/ramda/es/mathMod.d.ts new file mode 100644 index 0000000000..0b0205c822 --- /dev/null +++ b/types/ramda/es/mathMod.d.ts @@ -0,0 +1,2 @@ +import { mathMod } from '../index'; +export default mathMod; diff --git a/types/ramda/es/max.d.ts b/types/ramda/es/max.d.ts new file mode 100644 index 0000000000..fcb09338c0 --- /dev/null +++ b/types/ramda/es/max.d.ts @@ -0,0 +1,2 @@ +import { max } from '../index'; +export default max; diff --git a/types/ramda/es/maxBy.d.ts b/types/ramda/es/maxBy.d.ts new file mode 100644 index 0000000000..4d00e7e572 --- /dev/null +++ b/types/ramda/es/maxBy.d.ts @@ -0,0 +1,2 @@ +import { maxBy } from '../index'; +export default maxBy; diff --git a/types/ramda/es/mean.d.ts b/types/ramda/es/mean.d.ts new file mode 100644 index 0000000000..8babcc3374 --- /dev/null +++ b/types/ramda/es/mean.d.ts @@ -0,0 +1,2 @@ +import { mean } from '../index'; +export default mean; diff --git a/types/ramda/es/median.d.ts b/types/ramda/es/median.d.ts new file mode 100644 index 0000000000..f7386692ff --- /dev/null +++ b/types/ramda/es/median.d.ts @@ -0,0 +1,2 @@ +import { median } from '../index'; +export default median; diff --git a/types/ramda/es/memoize.d.ts b/types/ramda/es/memoize.d.ts new file mode 100644 index 0000000000..a32d4d0016 --- /dev/null +++ b/types/ramda/es/memoize.d.ts @@ -0,0 +1,2 @@ +import { memoize } from '../index'; +export default memoize; diff --git a/types/ramda/es/memoizeWith.d.ts b/types/ramda/es/memoizeWith.d.ts new file mode 100644 index 0000000000..8eb2abd416 --- /dev/null +++ b/types/ramda/es/memoizeWith.d.ts @@ -0,0 +1,2 @@ +import { memoizeWith } from '../index'; +export default memoizeWith; diff --git a/types/ramda/es/merge.d.ts b/types/ramda/es/merge.d.ts new file mode 100644 index 0000000000..9786c2b611 --- /dev/null +++ b/types/ramda/es/merge.d.ts @@ -0,0 +1,2 @@ +import { merge } from '../index'; +export default merge; diff --git a/types/ramda/es/mergeAll.d.ts b/types/ramda/es/mergeAll.d.ts new file mode 100644 index 0000000000..8bb141f82f --- /dev/null +++ b/types/ramda/es/mergeAll.d.ts @@ -0,0 +1,2 @@ +import { mergeAll } from '../index'; +export default mergeAll; diff --git a/types/ramda/es/mergeDeepLeft.d.ts b/types/ramda/es/mergeDeepLeft.d.ts new file mode 100644 index 0000000000..332df578d3 --- /dev/null +++ b/types/ramda/es/mergeDeepLeft.d.ts @@ -0,0 +1,2 @@ +import { mergeDeepLeft } from '../index'; +export default mergeDeepLeft; diff --git a/types/ramda/es/mergeDeepRight.d.ts b/types/ramda/es/mergeDeepRight.d.ts new file mode 100644 index 0000000000..c589924ca5 --- /dev/null +++ b/types/ramda/es/mergeDeepRight.d.ts @@ -0,0 +1,2 @@ +import { mergeDeepRight } from '../index'; +export default mergeDeepRight; diff --git a/types/ramda/es/mergeDeepWith.d.ts b/types/ramda/es/mergeDeepWith.d.ts new file mode 100644 index 0000000000..cd5523b224 --- /dev/null +++ b/types/ramda/es/mergeDeepWith.d.ts @@ -0,0 +1,2 @@ +import { mergeDeepWith } from '../index'; +export default mergeDeepWith; diff --git a/types/ramda/es/mergeDeepWithKey.d.ts b/types/ramda/es/mergeDeepWithKey.d.ts new file mode 100644 index 0000000000..70f6ace1db --- /dev/null +++ b/types/ramda/es/mergeDeepWithKey.d.ts @@ -0,0 +1,2 @@ +import { mergeDeepWithKey } from '../index'; +export default mergeDeepWithKey; diff --git a/types/ramda/es/mergeWith.d.ts b/types/ramda/es/mergeWith.d.ts new file mode 100644 index 0000000000..0270c71977 --- /dev/null +++ b/types/ramda/es/mergeWith.d.ts @@ -0,0 +1,2 @@ +import { mergeWith } from '../index'; +export default mergeWith; diff --git a/types/ramda/es/mergeWithKey.d.ts b/types/ramda/es/mergeWithKey.d.ts new file mode 100644 index 0000000000..b32e625cfc --- /dev/null +++ b/types/ramda/es/mergeWithKey.d.ts @@ -0,0 +1,2 @@ +import { mergeWithKey } from '../index'; +export default mergeWithKey; diff --git a/types/ramda/es/min.d.ts b/types/ramda/es/min.d.ts new file mode 100644 index 0000000000..af0dca8faa --- /dev/null +++ b/types/ramda/es/min.d.ts @@ -0,0 +1,2 @@ +import { min } from '../index'; +export default min; diff --git a/types/ramda/es/minBy.d.ts b/types/ramda/es/minBy.d.ts new file mode 100644 index 0000000000..14377eea93 --- /dev/null +++ b/types/ramda/es/minBy.d.ts @@ -0,0 +1,2 @@ +import { minBy } from '../index'; +export default minBy; diff --git a/types/ramda/es/modulo.d.ts b/types/ramda/es/modulo.d.ts new file mode 100644 index 0000000000..4c32f3ce8f --- /dev/null +++ b/types/ramda/es/modulo.d.ts @@ -0,0 +1,2 @@ +import { modulo } from '../index'; +export default modulo; diff --git a/types/ramda/es/multiply.d.ts b/types/ramda/es/multiply.d.ts new file mode 100644 index 0000000000..56d3a59380 --- /dev/null +++ b/types/ramda/es/multiply.d.ts @@ -0,0 +1,2 @@ +import { multiply } from '../index'; +export default multiply; diff --git a/types/ramda/es/nAry.d.ts b/types/ramda/es/nAry.d.ts new file mode 100644 index 0000000000..a9bce85047 --- /dev/null +++ b/types/ramda/es/nAry.d.ts @@ -0,0 +1,2 @@ +import { nAry } from '../index'; +export default nAry; diff --git a/types/ramda/es/negate.d.ts b/types/ramda/es/negate.d.ts new file mode 100644 index 0000000000..8410d94a22 --- /dev/null +++ b/types/ramda/es/negate.d.ts @@ -0,0 +1,2 @@ +import { negate } from '../index'; +export default negate; diff --git a/types/ramda/es/none.d.ts b/types/ramda/es/none.d.ts new file mode 100644 index 0000000000..6c545e7261 --- /dev/null +++ b/types/ramda/es/none.d.ts @@ -0,0 +1,2 @@ +import { none } from '../index'; +export default none; diff --git a/types/ramda/es/not.d.ts b/types/ramda/es/not.d.ts new file mode 100644 index 0000000000..10c4c56cfc --- /dev/null +++ b/types/ramda/es/not.d.ts @@ -0,0 +1,2 @@ +import { not } from '../index'; +export default not; diff --git a/types/ramda/es/nth.d.ts b/types/ramda/es/nth.d.ts new file mode 100644 index 0000000000..b5cef1993a --- /dev/null +++ b/types/ramda/es/nth.d.ts @@ -0,0 +1,2 @@ +import { nth } from '../index'; +export default nth; diff --git a/types/ramda/es/nthArg.d.ts b/types/ramda/es/nthArg.d.ts new file mode 100644 index 0000000000..5d61bb24f6 --- /dev/null +++ b/types/ramda/es/nthArg.d.ts @@ -0,0 +1,2 @@ +import { nthArg } from '../index'; +export default nthArg; diff --git a/types/ramda/es/objOf.d.ts b/types/ramda/es/objOf.d.ts new file mode 100644 index 0000000000..0a2b7c3075 --- /dev/null +++ b/types/ramda/es/objOf.d.ts @@ -0,0 +1,2 @@ +import { objOf } from '../index'; +export default objOf; diff --git a/types/ramda/es/of.d.ts b/types/ramda/es/of.d.ts new file mode 100644 index 0000000000..252569b5e6 --- /dev/null +++ b/types/ramda/es/of.d.ts @@ -0,0 +1,2 @@ +import { of } from '../index'; +export default of; diff --git a/types/ramda/es/omit.d.ts b/types/ramda/es/omit.d.ts new file mode 100644 index 0000000000..e7e9f796e9 --- /dev/null +++ b/types/ramda/es/omit.d.ts @@ -0,0 +1,2 @@ +import { omit } from '../index'; +export default omit; diff --git a/types/ramda/es/once.d.ts b/types/ramda/es/once.d.ts new file mode 100644 index 0000000000..f49febf008 --- /dev/null +++ b/types/ramda/es/once.d.ts @@ -0,0 +1,2 @@ +import { once } from '../index'; +export default once; diff --git a/types/ramda/es/or.d.ts b/types/ramda/es/or.d.ts new file mode 100644 index 0000000000..933ca7b2d2 --- /dev/null +++ b/types/ramda/es/or.d.ts @@ -0,0 +1,2 @@ +import { or } from '../index'; +export default or; diff --git a/types/ramda/es/over.d.ts b/types/ramda/es/over.d.ts new file mode 100644 index 0000000000..deee3577da --- /dev/null +++ b/types/ramda/es/over.d.ts @@ -0,0 +1,2 @@ +import { over } from '../index'; +export default over; diff --git a/types/ramda/es/pair.d.ts b/types/ramda/es/pair.d.ts new file mode 100644 index 0000000000..2a1cea9de0 --- /dev/null +++ b/types/ramda/es/pair.d.ts @@ -0,0 +1,2 @@ +import { pair } from '../index'; +export default pair; diff --git a/types/ramda/es/partial.d.ts b/types/ramda/es/partial.d.ts new file mode 100644 index 0000000000..acbb16bac3 --- /dev/null +++ b/types/ramda/es/partial.d.ts @@ -0,0 +1,2 @@ +import { partial } from '../index'; +export default partial; diff --git a/types/ramda/es/partialRight.d.ts b/types/ramda/es/partialRight.d.ts new file mode 100644 index 0000000000..5b3bb4b0fa --- /dev/null +++ b/types/ramda/es/partialRight.d.ts @@ -0,0 +1,2 @@ +import { partialRight } from '../index'; +export default partialRight; diff --git a/types/ramda/es/partition.d.ts b/types/ramda/es/partition.d.ts new file mode 100644 index 0000000000..28086418d7 --- /dev/null +++ b/types/ramda/es/partition.d.ts @@ -0,0 +1,2 @@ +import { partition } from '../index'; +export default partition; diff --git a/types/ramda/es/path.d.ts b/types/ramda/es/path.d.ts new file mode 100644 index 0000000000..edf4fa57b0 --- /dev/null +++ b/types/ramda/es/path.d.ts @@ -0,0 +1,2 @@ +import { path } from '../index'; +export default path; diff --git a/types/ramda/es/pathEq.d.ts b/types/ramda/es/pathEq.d.ts new file mode 100644 index 0000000000..27856ca3bc --- /dev/null +++ b/types/ramda/es/pathEq.d.ts @@ -0,0 +1,2 @@ +import { pathEq } from '../index'; +export default pathEq; diff --git a/types/ramda/es/pathOr.d.ts b/types/ramda/es/pathOr.d.ts new file mode 100644 index 0000000000..1af55adc0c --- /dev/null +++ b/types/ramda/es/pathOr.d.ts @@ -0,0 +1,2 @@ +import { pathOr } from '../index'; +export default pathOr; diff --git a/types/ramda/es/pathSatisfies.d.ts b/types/ramda/es/pathSatisfies.d.ts new file mode 100644 index 0000000000..e2493400a2 --- /dev/null +++ b/types/ramda/es/pathSatisfies.d.ts @@ -0,0 +1,2 @@ +import { pathSatisfies } from '../index'; +export default pathSatisfies; diff --git a/types/ramda/es/pick.d.ts b/types/ramda/es/pick.d.ts new file mode 100644 index 0000000000..67b2477a48 --- /dev/null +++ b/types/ramda/es/pick.d.ts @@ -0,0 +1,2 @@ +import { pick } from '../index'; +export default pick; diff --git a/types/ramda/es/pickAll.d.ts b/types/ramda/es/pickAll.d.ts new file mode 100644 index 0000000000..d7e7719077 --- /dev/null +++ b/types/ramda/es/pickAll.d.ts @@ -0,0 +1,2 @@ +import { pickAll } from '../index'; +export default pickAll; diff --git a/types/ramda/es/pickBy.d.ts b/types/ramda/es/pickBy.d.ts new file mode 100644 index 0000000000..4a047dc4ab --- /dev/null +++ b/types/ramda/es/pickBy.d.ts @@ -0,0 +1,2 @@ +import { pickBy } from '../index'; +export default pickBy; diff --git a/types/ramda/es/pipe.d.ts b/types/ramda/es/pipe.d.ts new file mode 100644 index 0000000000..ef1d61098b --- /dev/null +++ b/types/ramda/es/pipe.d.ts @@ -0,0 +1,2 @@ +import { pipe } from '../index'; +export default pipe; diff --git a/types/ramda/es/pipeK.d.ts b/types/ramda/es/pipeK.d.ts new file mode 100644 index 0000000000..bca50e6fff --- /dev/null +++ b/types/ramda/es/pipeK.d.ts @@ -0,0 +1,2 @@ +import { pipeK } from '../index'; +export default pipeK; diff --git a/types/ramda/es/pipeP.d.ts b/types/ramda/es/pipeP.d.ts new file mode 100644 index 0000000000..c69b96d23c --- /dev/null +++ b/types/ramda/es/pipeP.d.ts @@ -0,0 +1,2 @@ +import { pipeP } from '../index'; +export default pipeP; diff --git a/types/ramda/es/pluck.d.ts b/types/ramda/es/pluck.d.ts new file mode 100644 index 0000000000..8bdb4ccbe4 --- /dev/null +++ b/types/ramda/es/pluck.d.ts @@ -0,0 +1,2 @@ +import { pluck } from '../index'; +export default pluck; diff --git a/types/ramda/es/prepend.d.ts b/types/ramda/es/prepend.d.ts new file mode 100644 index 0000000000..9d3fde51b4 --- /dev/null +++ b/types/ramda/es/prepend.d.ts @@ -0,0 +1,2 @@ +import { prepend } from '../index'; +export default prepend; diff --git a/types/ramda/es/product.d.ts b/types/ramda/es/product.d.ts new file mode 100644 index 0000000000..32aed3c0ee --- /dev/null +++ b/types/ramda/es/product.d.ts @@ -0,0 +1,2 @@ +import { product } from '../index'; +export default product; diff --git a/types/ramda/es/project.d.ts b/types/ramda/es/project.d.ts new file mode 100644 index 0000000000..4c1b11c6ed --- /dev/null +++ b/types/ramda/es/project.d.ts @@ -0,0 +1,2 @@ +import { project } from '../index'; +export default project; diff --git a/types/ramda/es/prop.d.ts b/types/ramda/es/prop.d.ts new file mode 100644 index 0000000000..c990b9aca5 --- /dev/null +++ b/types/ramda/es/prop.d.ts @@ -0,0 +1,2 @@ +import { prop } from '../index'; +export default prop; diff --git a/types/ramda/es/propEq.d.ts b/types/ramda/es/propEq.d.ts new file mode 100644 index 0000000000..1e04cb564c --- /dev/null +++ b/types/ramda/es/propEq.d.ts @@ -0,0 +1,2 @@ +import { propEq } from '../index'; +export default propEq; diff --git a/types/ramda/es/propIs.d.ts b/types/ramda/es/propIs.d.ts new file mode 100644 index 0000000000..1be4e6bd04 --- /dev/null +++ b/types/ramda/es/propIs.d.ts @@ -0,0 +1,2 @@ +import { propIs } from '../index'; +export default propIs; diff --git a/types/ramda/es/propOr.d.ts b/types/ramda/es/propOr.d.ts new file mode 100644 index 0000000000..2935d077be --- /dev/null +++ b/types/ramda/es/propOr.d.ts @@ -0,0 +1,2 @@ +import { propOr } from '../index'; +export default propOr; diff --git a/types/ramda/es/propSatisfies.d.ts b/types/ramda/es/propSatisfies.d.ts new file mode 100644 index 0000000000..1b4ff52788 --- /dev/null +++ b/types/ramda/es/propSatisfies.d.ts @@ -0,0 +1,2 @@ +import { propSatisfies } from '../index'; +export default propSatisfies; diff --git a/types/ramda/es/props.d.ts b/types/ramda/es/props.d.ts new file mode 100644 index 0000000000..b856c60b00 --- /dev/null +++ b/types/ramda/es/props.d.ts @@ -0,0 +1,2 @@ +import { props } from '../index'; +export default props; diff --git a/types/ramda/es/range.d.ts b/types/ramda/es/range.d.ts new file mode 100644 index 0000000000..a507ebe4a9 --- /dev/null +++ b/types/ramda/es/range.d.ts @@ -0,0 +1,2 @@ +import { range } from '../index'; +export default range; diff --git a/types/ramda/es/reduce.d.ts b/types/ramda/es/reduce.d.ts new file mode 100644 index 0000000000..eb3b427d00 --- /dev/null +++ b/types/ramda/es/reduce.d.ts @@ -0,0 +1,2 @@ +import { reduce } from '../index'; +export default reduce; diff --git a/types/ramda/es/reduceBy.d.ts b/types/ramda/es/reduceBy.d.ts new file mode 100644 index 0000000000..655c96ef18 --- /dev/null +++ b/types/ramda/es/reduceBy.d.ts @@ -0,0 +1,2 @@ +import { reduceBy } from '../index'; +export default reduceBy; diff --git a/types/ramda/es/reduceRight.d.ts b/types/ramda/es/reduceRight.d.ts new file mode 100644 index 0000000000..3e72f7c309 --- /dev/null +++ b/types/ramda/es/reduceRight.d.ts @@ -0,0 +1,2 @@ +import { reduceRight } from '../index'; +export default reduceRight; diff --git a/types/ramda/es/reduceWhile.d.ts b/types/ramda/es/reduceWhile.d.ts new file mode 100644 index 0000000000..aaa836d38d --- /dev/null +++ b/types/ramda/es/reduceWhile.d.ts @@ -0,0 +1,2 @@ +import { reduceWhile } from '../index'; +export default reduceWhile; diff --git a/types/ramda/es/reduced.d.ts b/types/ramda/es/reduced.d.ts new file mode 100644 index 0000000000..f36739bbe2 --- /dev/null +++ b/types/ramda/es/reduced.d.ts @@ -0,0 +1,2 @@ +import { reduced } from '../index'; +export default reduced; diff --git a/types/ramda/es/reject.d.ts b/types/ramda/es/reject.d.ts new file mode 100644 index 0000000000..600c706f68 --- /dev/null +++ b/types/ramda/es/reject.d.ts @@ -0,0 +1,2 @@ +import { reject } from '../index'; +export default reject; diff --git a/types/ramda/es/remove.d.ts b/types/ramda/es/remove.d.ts new file mode 100644 index 0000000000..023edada47 --- /dev/null +++ b/types/ramda/es/remove.d.ts @@ -0,0 +1,2 @@ +import { remove } from '../index'; +export default remove; diff --git a/types/ramda/es/repeat.d.ts b/types/ramda/es/repeat.d.ts new file mode 100644 index 0000000000..3d8218a1a4 --- /dev/null +++ b/types/ramda/es/repeat.d.ts @@ -0,0 +1,2 @@ +import { repeat } from '../index'; +export default repeat; diff --git a/types/ramda/es/replace.d.ts b/types/ramda/es/replace.d.ts new file mode 100644 index 0000000000..dc735ab2cf --- /dev/null +++ b/types/ramda/es/replace.d.ts @@ -0,0 +1,2 @@ +import { replace } from '../index'; +export default replace; diff --git a/types/ramda/es/reverse.d.ts b/types/ramda/es/reverse.d.ts new file mode 100644 index 0000000000..2d1b2d9390 --- /dev/null +++ b/types/ramda/es/reverse.d.ts @@ -0,0 +1,2 @@ +import { reverse } from '../index'; +export default reverse; diff --git a/types/ramda/es/scan.d.ts b/types/ramda/es/scan.d.ts new file mode 100644 index 0000000000..8971cff9b7 --- /dev/null +++ b/types/ramda/es/scan.d.ts @@ -0,0 +1,2 @@ +import { scan } from '../index'; +export default scan; diff --git a/types/ramda/es/set.d.ts b/types/ramda/es/set.d.ts new file mode 100644 index 0000000000..5023a0b854 --- /dev/null +++ b/types/ramda/es/set.d.ts @@ -0,0 +1,2 @@ +import { set } from '../index'; +export default set; diff --git a/types/ramda/es/slice.d.ts b/types/ramda/es/slice.d.ts new file mode 100644 index 0000000000..6fdc54e59b --- /dev/null +++ b/types/ramda/es/slice.d.ts @@ -0,0 +1,2 @@ +import { slice } from '../index'; +export default slice; diff --git a/types/ramda/es/sort.d.ts b/types/ramda/es/sort.d.ts new file mode 100644 index 0000000000..9f4977e5c5 --- /dev/null +++ b/types/ramda/es/sort.d.ts @@ -0,0 +1,2 @@ +import { sort } from '../index'; +export default sort; diff --git a/types/ramda/es/sortBy.d.ts b/types/ramda/es/sortBy.d.ts new file mode 100644 index 0000000000..ff4eec72f4 --- /dev/null +++ b/types/ramda/es/sortBy.d.ts @@ -0,0 +1,2 @@ +import { sortBy } from '../index'; +export default sortBy; diff --git a/types/ramda/es/sortWith.d.ts b/types/ramda/es/sortWith.d.ts new file mode 100644 index 0000000000..e8e386a2fd --- /dev/null +++ b/types/ramda/es/sortWith.d.ts @@ -0,0 +1,2 @@ +import { sortWith } from '../index'; +export default sortWith; diff --git a/types/ramda/es/split.d.ts b/types/ramda/es/split.d.ts new file mode 100644 index 0000000000..c89a30372b --- /dev/null +++ b/types/ramda/es/split.d.ts @@ -0,0 +1,2 @@ +import { split } from '../index'; +export default split; diff --git a/types/ramda/es/splitAt.d.ts b/types/ramda/es/splitAt.d.ts new file mode 100644 index 0000000000..2f505a21e3 --- /dev/null +++ b/types/ramda/es/splitAt.d.ts @@ -0,0 +1,2 @@ +import { splitAt } from '../index'; +export default splitAt; diff --git a/types/ramda/es/splitEvery.d.ts b/types/ramda/es/splitEvery.d.ts new file mode 100644 index 0000000000..21329e9593 --- /dev/null +++ b/types/ramda/es/splitEvery.d.ts @@ -0,0 +1,2 @@ +import { splitEvery } from '../index'; +export default splitEvery; diff --git a/types/ramda/es/splitWhen.d.ts b/types/ramda/es/splitWhen.d.ts new file mode 100644 index 0000000000..fad94d5bfa --- /dev/null +++ b/types/ramda/es/splitWhen.d.ts @@ -0,0 +1,2 @@ +import { splitWhen } from '../index'; +export default splitWhen; diff --git a/types/ramda/es/startsWith.d.ts b/types/ramda/es/startsWith.d.ts new file mode 100644 index 0000000000..88811ae146 --- /dev/null +++ b/types/ramda/es/startsWith.d.ts @@ -0,0 +1,2 @@ +import { startsWith } from '../index'; +export default startsWith; diff --git a/types/ramda/es/subtract.d.ts b/types/ramda/es/subtract.d.ts new file mode 100644 index 0000000000..2bac6a6c9f --- /dev/null +++ b/types/ramda/es/subtract.d.ts @@ -0,0 +1,2 @@ +import { subtract } from '../index'; +export default subtract; diff --git a/types/ramda/es/sum.d.ts b/types/ramda/es/sum.d.ts new file mode 100644 index 0000000000..5aad66d4e2 --- /dev/null +++ b/types/ramda/es/sum.d.ts @@ -0,0 +1,2 @@ +import { sum } from '../index'; +export default sum; diff --git a/types/ramda/es/symmetricDifference.d.ts b/types/ramda/es/symmetricDifference.d.ts new file mode 100644 index 0000000000..d11802d977 --- /dev/null +++ b/types/ramda/es/symmetricDifference.d.ts @@ -0,0 +1,2 @@ +import { symmetricDifference } from '../index'; +export default symmetricDifference; diff --git a/types/ramda/es/symmetricDifferenceWith.d.ts b/types/ramda/es/symmetricDifferenceWith.d.ts new file mode 100644 index 0000000000..9ee8a2b855 --- /dev/null +++ b/types/ramda/es/symmetricDifferenceWith.d.ts @@ -0,0 +1,2 @@ +import { symmetricDifferenceWith } from '../index'; +export default symmetricDifferenceWith; diff --git a/types/ramda/es/tail.d.ts b/types/ramda/es/tail.d.ts new file mode 100644 index 0000000000..5a949add56 --- /dev/null +++ b/types/ramda/es/tail.d.ts @@ -0,0 +1,2 @@ +import { tail } from '../index'; +export default tail; diff --git a/types/ramda/es/take.d.ts b/types/ramda/es/take.d.ts new file mode 100644 index 0000000000..35806f3171 --- /dev/null +++ b/types/ramda/es/take.d.ts @@ -0,0 +1,2 @@ +import { take } from '../index'; +export default take; diff --git a/types/ramda/es/takeLast.d.ts b/types/ramda/es/takeLast.d.ts new file mode 100644 index 0000000000..145934b186 --- /dev/null +++ b/types/ramda/es/takeLast.d.ts @@ -0,0 +1,2 @@ +import { takeLast } from '../index'; +export default takeLast; diff --git a/types/ramda/es/takeLastWhile.d.ts b/types/ramda/es/takeLastWhile.d.ts new file mode 100644 index 0000000000..0d6f344445 --- /dev/null +++ b/types/ramda/es/takeLastWhile.d.ts @@ -0,0 +1,2 @@ +import { takeLastWhile } from '../index'; +export default takeLastWhile; diff --git a/types/ramda/es/takeWhile.d.ts b/types/ramda/es/takeWhile.d.ts new file mode 100644 index 0000000000..c3f71dd0fd --- /dev/null +++ b/types/ramda/es/takeWhile.d.ts @@ -0,0 +1,2 @@ +import { takeWhile } from '../index'; +export default takeWhile; diff --git a/types/ramda/es/tap.d.ts b/types/ramda/es/tap.d.ts new file mode 100644 index 0000000000..329108173e --- /dev/null +++ b/types/ramda/es/tap.d.ts @@ -0,0 +1,2 @@ +import { tap } from '../index'; +export default tap; diff --git a/types/ramda/es/test.d.ts b/types/ramda/es/test.d.ts new file mode 100644 index 0000000000..64a6289599 --- /dev/null +++ b/types/ramda/es/test.d.ts @@ -0,0 +1,2 @@ +import { test } from '../index'; +export default test; diff --git a/types/ramda/es/times.d.ts b/types/ramda/es/times.d.ts new file mode 100644 index 0000000000..141c101e23 --- /dev/null +++ b/types/ramda/es/times.d.ts @@ -0,0 +1,2 @@ +import { times } from '../index'; +export default times; diff --git a/types/ramda/es/toLower.d.ts b/types/ramda/es/toLower.d.ts new file mode 100644 index 0000000000..4086a90f75 --- /dev/null +++ b/types/ramda/es/toLower.d.ts @@ -0,0 +1,2 @@ +import { toLower } from '../index'; +export default toLower; diff --git a/types/ramda/es/toPairs.d.ts b/types/ramda/es/toPairs.d.ts new file mode 100644 index 0000000000..5a6d3b24c2 --- /dev/null +++ b/types/ramda/es/toPairs.d.ts @@ -0,0 +1,2 @@ +import { toPairs } from '../index'; +export default toPairs; diff --git a/types/ramda/es/toPairsIn.d.ts b/types/ramda/es/toPairsIn.d.ts new file mode 100644 index 0000000000..70a879e200 --- /dev/null +++ b/types/ramda/es/toPairsIn.d.ts @@ -0,0 +1,2 @@ +import { toPairsIn } from '../index'; +export default toPairsIn; diff --git a/types/ramda/es/toString.d.ts b/types/ramda/es/toString.d.ts new file mode 100644 index 0000000000..c731b264be --- /dev/null +++ b/types/ramda/es/toString.d.ts @@ -0,0 +1,2 @@ +import { toString } from '../index'; +export default toString; diff --git a/types/ramda/es/toUpper.d.ts b/types/ramda/es/toUpper.d.ts new file mode 100644 index 0000000000..0a91bccfed --- /dev/null +++ b/types/ramda/es/toUpper.d.ts @@ -0,0 +1,2 @@ +import { toUpper } from '../index'; +export default toUpper; diff --git a/types/ramda/es/transduce.d.ts b/types/ramda/es/transduce.d.ts new file mode 100644 index 0000000000..de33a7380c --- /dev/null +++ b/types/ramda/es/transduce.d.ts @@ -0,0 +1,2 @@ +import { transduce } from '../index'; +export default transduce; diff --git a/types/ramda/es/transpose.d.ts b/types/ramda/es/transpose.d.ts new file mode 100644 index 0000000000..8ed6535fb2 --- /dev/null +++ b/types/ramda/es/transpose.d.ts @@ -0,0 +1,2 @@ +import { transpose } from '../index'; +export default transpose; diff --git a/types/ramda/es/traverse.d.ts b/types/ramda/es/traverse.d.ts new file mode 100644 index 0000000000..cb4fdc0b1e --- /dev/null +++ b/types/ramda/es/traverse.d.ts @@ -0,0 +1,2 @@ +import { traverse } from '../index'; +export default traverse; diff --git a/types/ramda/es/trim.d.ts b/types/ramda/es/trim.d.ts new file mode 100644 index 0000000000..f0000b80bb --- /dev/null +++ b/types/ramda/es/trim.d.ts @@ -0,0 +1,2 @@ +import { trim } from '../index'; +export default trim; diff --git a/types/ramda/es/tryCatch.d.ts b/types/ramda/es/tryCatch.d.ts new file mode 100644 index 0000000000..3c9edd9f79 --- /dev/null +++ b/types/ramda/es/tryCatch.d.ts @@ -0,0 +1,2 @@ +import { tryCatch } from '../index'; +export default tryCatch; diff --git a/types/ramda/es/type.d.ts b/types/ramda/es/type.d.ts new file mode 100644 index 0000000000..de115bb279 --- /dev/null +++ b/types/ramda/es/type.d.ts @@ -0,0 +1,2 @@ +import { type } from '../index'; +export default type; diff --git a/types/ramda/es/unapply.d.ts b/types/ramda/es/unapply.d.ts new file mode 100644 index 0000000000..7ad4b767e0 --- /dev/null +++ b/types/ramda/es/unapply.d.ts @@ -0,0 +1,2 @@ +import { unapply } from '../index'; +export default unapply; diff --git a/types/ramda/es/unary.d.ts b/types/ramda/es/unary.d.ts new file mode 100644 index 0000000000..c022aec354 --- /dev/null +++ b/types/ramda/es/unary.d.ts @@ -0,0 +1,2 @@ +import { unary } from '../index'; +export default unary; diff --git a/types/ramda/es/uncurryN.d.ts b/types/ramda/es/uncurryN.d.ts new file mode 100644 index 0000000000..b6962cc979 --- /dev/null +++ b/types/ramda/es/uncurryN.d.ts @@ -0,0 +1,2 @@ +import { uncurryN } from '../index'; +export default uncurryN; diff --git a/types/ramda/es/unfold.d.ts b/types/ramda/es/unfold.d.ts new file mode 100644 index 0000000000..2ebaff6fe5 --- /dev/null +++ b/types/ramda/es/unfold.d.ts @@ -0,0 +1,2 @@ +import { unfold } from '../index'; +export default unfold; diff --git a/types/ramda/es/union.d.ts b/types/ramda/es/union.d.ts new file mode 100644 index 0000000000..9fac243b43 --- /dev/null +++ b/types/ramda/es/union.d.ts @@ -0,0 +1,2 @@ +import { union } from '../index'; +export default union; diff --git a/types/ramda/es/unionWith.d.ts b/types/ramda/es/unionWith.d.ts new file mode 100644 index 0000000000..8bf20a51b7 --- /dev/null +++ b/types/ramda/es/unionWith.d.ts @@ -0,0 +1,2 @@ +import { unionWith } from '../index'; +export default unionWith; diff --git a/types/ramda/es/uniq.d.ts b/types/ramda/es/uniq.d.ts new file mode 100644 index 0000000000..be0a00aef0 --- /dev/null +++ b/types/ramda/es/uniq.d.ts @@ -0,0 +1,2 @@ +import { uniq } from '../index'; +export default uniq; diff --git a/types/ramda/es/uniqBy.d.ts b/types/ramda/es/uniqBy.d.ts new file mode 100644 index 0000000000..f85de9e4e0 --- /dev/null +++ b/types/ramda/es/uniqBy.d.ts @@ -0,0 +1,2 @@ +import { uniqBy } from '../index'; +export default uniqBy; diff --git a/types/ramda/es/uniqWith.d.ts b/types/ramda/es/uniqWith.d.ts new file mode 100644 index 0000000000..42442bffc3 --- /dev/null +++ b/types/ramda/es/uniqWith.d.ts @@ -0,0 +1,2 @@ +import { uniqWith } from '../index'; +export default uniqWith; diff --git a/types/ramda/es/unless.d.ts b/types/ramda/es/unless.d.ts new file mode 100644 index 0000000000..3727700625 --- /dev/null +++ b/types/ramda/es/unless.d.ts @@ -0,0 +1,2 @@ +import { unless } from '../index'; +export default unless; diff --git a/types/ramda/es/unnest.d.ts b/types/ramda/es/unnest.d.ts new file mode 100644 index 0000000000..ccbb4be0e8 --- /dev/null +++ b/types/ramda/es/unnest.d.ts @@ -0,0 +1,2 @@ +import { unnest } from '../index'; +export default unnest; diff --git a/types/ramda/es/until.d.ts b/types/ramda/es/until.d.ts new file mode 100644 index 0000000000..ab26247fea --- /dev/null +++ b/types/ramda/es/until.d.ts @@ -0,0 +1,2 @@ +import { until } from '../index'; +export default until; diff --git a/types/ramda/es/update.d.ts b/types/ramda/es/update.d.ts new file mode 100644 index 0000000000..c3eba99c72 --- /dev/null +++ b/types/ramda/es/update.d.ts @@ -0,0 +1,2 @@ +import { update } from '../index'; +export default update; diff --git a/types/ramda/es/useWith.d.ts b/types/ramda/es/useWith.d.ts new file mode 100644 index 0000000000..0d1f54e80f --- /dev/null +++ b/types/ramda/es/useWith.d.ts @@ -0,0 +1,2 @@ +import { useWith } from '../index'; +export default useWith; diff --git a/types/ramda/es/values.d.ts b/types/ramda/es/values.d.ts new file mode 100644 index 0000000000..8664d8cc67 --- /dev/null +++ b/types/ramda/es/values.d.ts @@ -0,0 +1,2 @@ +import { values } from '../index'; +export default values; diff --git a/types/ramda/es/valuesIn.d.ts b/types/ramda/es/valuesIn.d.ts new file mode 100644 index 0000000000..d80b32fc67 --- /dev/null +++ b/types/ramda/es/valuesIn.d.ts @@ -0,0 +1,2 @@ +import { valuesIn } from '../index'; +export default valuesIn; diff --git a/types/ramda/es/view.d.ts b/types/ramda/es/view.d.ts new file mode 100644 index 0000000000..3c11fa0ae9 --- /dev/null +++ b/types/ramda/es/view.d.ts @@ -0,0 +1,2 @@ +import { view } from '../index'; +export default view; diff --git a/types/ramda/es/when.d.ts b/types/ramda/es/when.d.ts new file mode 100644 index 0000000000..57de7e19a7 --- /dev/null +++ b/types/ramda/es/when.d.ts @@ -0,0 +1,2 @@ +import { when } from '../index'; +export default when; diff --git a/types/ramda/es/where.d.ts b/types/ramda/es/where.d.ts new file mode 100644 index 0000000000..4c49c2dc25 --- /dev/null +++ b/types/ramda/es/where.d.ts @@ -0,0 +1,2 @@ +import { where } from '../index'; +export default where; diff --git a/types/ramda/es/whereEq.d.ts b/types/ramda/es/whereEq.d.ts new file mode 100644 index 0000000000..4bdffa1d24 --- /dev/null +++ b/types/ramda/es/whereEq.d.ts @@ -0,0 +1,2 @@ +import { whereEq } from '../index'; +export default whereEq; diff --git a/types/ramda/es/without.d.ts b/types/ramda/es/without.d.ts new file mode 100644 index 0000000000..be9b8584ed --- /dev/null +++ b/types/ramda/es/without.d.ts @@ -0,0 +1,2 @@ +import { without } from '../index'; +export default without; diff --git a/types/ramda/es/wrap.d.ts b/types/ramda/es/wrap.d.ts new file mode 100644 index 0000000000..a855106989 --- /dev/null +++ b/types/ramda/es/wrap.d.ts @@ -0,0 +1,2 @@ +import { wrap } from '../index'; +export default wrap; diff --git a/types/ramda/es/xprod.d.ts b/types/ramda/es/xprod.d.ts new file mode 100644 index 0000000000..2e3fd865ea --- /dev/null +++ b/types/ramda/es/xprod.d.ts @@ -0,0 +1,2 @@ +import { xprod } from '../index'; +export default xprod; diff --git a/types/ramda/es/zip.d.ts b/types/ramda/es/zip.d.ts new file mode 100644 index 0000000000..609fe7bb29 --- /dev/null +++ b/types/ramda/es/zip.d.ts @@ -0,0 +1,2 @@ +import { zip } from '../index'; +export default zip; diff --git a/types/ramda/es/zipObj.d.ts b/types/ramda/es/zipObj.d.ts new file mode 100644 index 0000000000..dcc28311bc --- /dev/null +++ b/types/ramda/es/zipObj.d.ts @@ -0,0 +1,2 @@ +import { zipObj } from '../index'; +export default zipObj; diff --git a/types/ramda/es/zipWith.d.ts b/types/ramda/es/zipWith.d.ts new file mode 100644 index 0000000000..df6890c369 --- /dev/null +++ b/types/ramda/es/zipWith.d.ts @@ -0,0 +1,2 @@ +import { zipWith } from '../index'; +export default zipWith; diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index 9623aa8865..9375c3107b 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -26,6 +26,249 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// + declare let R: R.Static; declare namespace R { diff --git a/types/react-i18next/index.d.ts b/types/react-i18next/index.d.ts deleted file mode 100644 index 979c648f50..0000000000 --- a/types/react-i18next/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Type definitions for react-i18next 7.8 -// Project: https://github.com/i18next/react-i18next -// Definitions by: Giedrius Grabauskas -// Simon Baumann -// Benedict Etzel -// Wu Haotian -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 - -import { TranslationFunction } from "i18next"; - -import { - setDefaults, - getDefaults, - setI18n, - getI18n, - ReactI18NextOptions, - reactI18nextModule -} from "./src/context"; -import I18n from "./src/I18n"; -import I18nextProvider from "./src/I18nextProvider"; -import Interpolate from "./src/interpolate"; -import loadNamespaces from "./src/loadNamespaces"; -import Trans from "./src/trans"; -import translate from "./src/translate"; - -export { - setDefaults, - getDefaults, - setI18n, - getI18n, - ReactI18NextOptions, - reactI18nextModule, - I18n, - I18nextProvider, - Interpolate, - loadNamespaces, - Trans, - translate, - TranslationFunction -}; - -export { InjectedI18nProps, InjectedTranslateProps } from "./src/props"; - -export as namespace reactI18Next; diff --git a/types/react-i18next/src/I18n.d.ts b/types/react-i18next/src/I18n.d.ts deleted file mode 100644 index 91de868caf..0000000000 --- a/types/react-i18next/src/I18n.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as React from "react"; -import { i18n, TranslationFunction } from "i18next"; - -export interface Options { - i18n: i18n; - t: TranslationFunction; -} - -export interface i18nProps { - wait?: boolean; - ns?: string | string[]; - nsMode?: string; - bindI18n?: string; - bindStore?: string; - i18n?: i18n; - initialI18nStore?: any; - initialLanguage?: string; - children: (t: TranslationFunction, options: Options) => React.ReactNode; -} - -export default class I18n extends React.Component { } diff --git a/types/react-i18next/src/I18nextProvider.d.ts b/types/react-i18next/src/I18nextProvider.d.ts deleted file mode 100644 index 2db5d0361b..0000000000 --- a/types/react-i18next/src/I18nextProvider.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import * as React from "react"; -import { i18n } from "i18next"; - -// tslint:disable-next-line:interface-name -export interface I18nextProviderProps { - i18n: i18n; - initialI18nStore?: any; - initialLanguage?: string; - children: React.ReactNode; -} - -export default class I18nextProvider extends React.Component { } diff --git a/types/react-i18next/src/context.d.ts b/types/react-i18next/src/context.d.ts deleted file mode 100644 index f772e8c1da..0000000000 --- a/types/react-i18next/src/context.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { i18n } from "i18next"; - -export interface ReactI18NextOptions { - wait?: boolean; - withRef?: boolean; - bindI18n?: string; - bindStore?: string; - translateFuncName?: string; - nsMode?: string; -} - -export function setDefaults(options: ReactI18NextOptions): void; - -export function getDefaults(): ReactI18NextOptions; - -export function setI18n(instance: i18n): void; - -export function getI18n(): i18n; - -export interface i18NextModule { - type: string; - - init: (instance: i18n) => void; -} - -export const reactI18nextModule: i18NextModule; diff --git a/types/react-i18next/src/interpolate.d.ts b/types/react-i18next/src/interpolate.d.ts deleted file mode 100644 index d6a4e64420..0000000000 --- a/types/react-i18next/src/interpolate.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import * as React from "react"; -import { i18n, InterpolationOptions, TranslationFunction } from "i18next"; - -export type InterpolateValue = string | JSX.Element; - -export interface InterpolatePropsBase { - parent?: string; - regexp?: RegExp; - useDangerouslySetInnerHTML?: boolean; - dangerouslySetInnerHTMLPartElement?: string; - options?: InterpolationOptions; - i18nKey?: string; - className?: string; - style?: React.CSSProperties; - i18n?: i18n; - t?: TranslationFunction; -} - -export interface OtherInterpolateProps { - [regexKey: string]: InterpolateValue | RegExp | InterpolationOptions | boolean | undefined; -} - -export type InterpolateProps = InterpolatePropsBase & OtherInterpolateProps; - -export default class Interpolate extends React.PureComponent { } diff --git a/types/react-i18next/src/loadNamespaces.d.ts b/types/react-i18next/src/loadNamespaces.d.ts deleted file mode 100644 index d0e0b372f5..0000000000 --- a/types/react-i18next/src/loadNamespaces.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as React from "react"; -import { i18n } from "i18next"; - -export interface LoadNamespacesArguments { - components: Array | React.StatelessComponent>; - i18n: i18n; -} - -export default function loadNamespaces(args: LoadNamespacesArguments): Promise; diff --git a/types/react-i18next/src/props.d.ts b/types/react-i18next/src/props.d.ts deleted file mode 100644 index 8435a7cc45..0000000000 --- a/types/react-i18next/src/props.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { i18n as I18n, TranslationFunction } from "i18next"; - -/** - * Extend your component's Prop interface with this one to get access to `this.props.t` - * - * Please note that if you use the `translateFuncName` option, you should create - * your own interface just like this one, but with your name of the translation function. - * - * interface MyComponentProps extends ReactI18next.InjectedTranslateProps {} - * - * Then specify the name of the translate function as generic argument - * - * const translated = translate("view", { translateFuncName: "_" })(YourComponent); - */ -export interface InjectedTranslateProps { - t: TranslationFunction; -} - -/** - * Extend your component's Prop interface with this one to get access to `this.props.i18n` - */ -export interface InjectedI18nProps { - i18n: I18n; -} diff --git a/types/react-i18next/src/trans.d.ts b/types/react-i18next/src/trans.d.ts deleted file mode 100644 index 2b0e8e7738..0000000000 --- a/types/react-i18next/src/trans.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import * as React from "react"; -import { i18n, TranslationFunction } from "i18next"; - -export interface TOptions { - [key: string]: any; -} - -export interface Values { - [key: string]: any; -} - -export interface TransProps { - i18nKey?: string; - count?: number; - parent?: React.ReactNode | (() => React.ReactNode); - i18n?: i18n; - t?: TranslationFunction; - tOptions?: TOptions; - defaults?: string; - values?: Values; - components?: React.ReactNode[]; - ns?: string; -} - -export default class Trans extends React.Component { } diff --git a/types/react-i18next/src/translate.d.ts b/types/react-i18next/src/translate.d.ts deleted file mode 100644 index 0383ee1ead..0000000000 --- a/types/react-i18next/src/translate.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import * as React from "react"; -import { i18n as I18n, TranslationFunction } from "i18next"; -import { InjectedTranslateProps, InjectedI18nProps } from "./props"; -import { setDefaults, setI18n } from "./context"; - -export interface TranslateOptions { - withRef?: boolean; - bindI18n?: string; - bindStore?: string; - translateFuncName?: TTranslateFuncName; - wait?: boolean; - nsMode?: string; - i18n?: I18n; -} - -export interface TranslateHocProps { - i18n?: I18n; - initialI18nStore?: object; - initialLanguage?: string; -} - -// Diff / Omit taken from https://github.com/Microsoft/TypeScript/issues/12215#issuecomment-311923766 -type Omit = Pick; - -type InjectedProps = InjectedI18nProps & InjectedTranslateProps; - -export interface WrapperComponentClass

extends React.ComponentClass

{ - new (props: P, context?: any): React.Component

& { getWrappedInstance(): React.Component }; -} - -// Injects props and removes them from the prop requirements. -// Adds the new properties t (or whatever the translation function is called) and i18n if needed. -export type InferableComponentEnhancerWithProps = -

(component: React.ComponentClass

| React.StatelessComponent

) => - React.ComponentClass & TranslateHocProps>; - -export type InferableComponentEnhancerWithPropsAndRef = -

(component: React.ComponentClass

| React.StatelessComponent

) => - WrapperComponentClass, P>; - -export interface Translate { - - (namespaces?: TNamespace | TNamespace[], options?: Omit & { withRef?: false }): - InferableComponentEnhancerWithProps<"t">; - - - (namespaces?: TNamespace | TNamespace[], options?: Omit & { withRef: true }): - InferableComponentEnhancerWithPropsAndRef<"t">; - - - (namespaces?: TNamespace | TNamespace[], options?: TranslateOptions & { withRef?: false }): - InferableComponentEnhancerWithProps; - - - (namespaces?: TNamespace | TNamespace[], options?: TranslateOptions & { withRef: true }): - InferableComponentEnhancerWithPropsAndRef; - - setDefaults: typeof setDefaults; - setI18n: typeof setI18n; -} - -declare const translate: Translate; -export default translate; diff --git a/types/react-i18next/test/react-i18next-tests.tsx b/types/react-i18next/test/react-i18next-tests.tsx deleted file mode 100644 index 30b95ece24..0000000000 --- a/types/react-i18next/test/react-i18next-tests.tsx +++ /dev/null @@ -1,201 +0,0 @@ -import * as React from 'react'; -import * as i18n from 'i18next'; -import { - setDefaults, - reactI18nextModule, - translate, - I18nextProvider, - Interpolate, - InjectedTranslateProps, - TranslationFunction, - loadNamespaces, - Trans, - I18n, - ReactI18NextOptions -} from 'react-i18next'; -import { InjectedI18nProps } from 'react-i18next/src/props'; - -interface InnerAnotherComponentProps { - _: TranslationFunction; -} - -class InnerAnotherComponent extends React.Component { - render() { - const _ = this.props._; - return

{_('content.text', {/* options t options */})}

; - } -} - -const AnotherComponent = translate('view', {wait: true, translateFuncName: '_'})(InnerAnotherComponent); -const instanceWithoutRef = new AnotherComponent({}); -instanceWithoutRef.componentWillReceiveProps!({ - i18n, - initialI18nStore: { context: { text: "a message" } }, - initialLanguage: "en" -}, {}); - -translate.setDefaults({ wait: false }); -translate.setI18n(i18n); - -const AnotherComponentWithRef = translate("view" as Key, { translateFuncName: "_", withRef: true })(InnerAnotherComponent); -const instanceWithRef = new AnotherComponentWithRef({}); -const ref = instanceWithRef.getWrappedInstance(); -instanceWithRef.componentWillReceiveProps!({ - i18n, - initialI18nStore: { context: { text: "a message" } }, - initialLanguage: "en" -}, {}); - -class InnerYetAnotherComponent extends React.Component { - render() { - const t = this.props.t; - return

{t('usingDefaultNS', {/* options t options */})}

; - } -} - -const YetAnotherComponent = translate()(InnerYetAnotherComponent); - -const YetAnotherComponentWithRef = translate(undefined, { withRef: true })(InnerYetAnotherComponent); -new YetAnotherComponentWithRef({}).getWrappedInstance(); -class TranslatableView extends React.Component { - render() { - const t = this.props.t; - const interpolateComponent = "a interpolated component"; - const options: i18n.InterpolationOptions = {}; - return ( -
-

{t('common:appName')}

- - - - - {t('nav:link1')} -
- ); - } -} - -const TranslatedView = translate(["view", "nav"] as Key[], { wait: true })(TranslatableView); - -class App extends React.Component { - render() { - return ( -
-
- -
-
- ); - } -} - - - -; - - - 123 -; - -loadNamespaces({components: [App], i18n}).then(() => { -}).catch(error => { -}); - -; -; -; -}/>; -
}/>; -; -; - - -; -; -placeholder - ]} - values={{ - universe: "World" - }} -/>; - -type Key = "view" | "nav"; - -class GenericsTest extends React.Component { - render() { - return null; - } -} - -const TranslatedGenericsTest = translate(["view", "nav"] as Key[])(GenericsTest); -; - -class GenericsTest2 extends React.Component { - render() { - return null; - } -} - -const TranslatedGenericsTest2 = translate("view" as Key)(GenericsTest2); -; - -class ComponentWithInjectedI18n extends React.Component { - render() { return null; } -} - -const TranslatedComponentWithInjectedI18n = translate()(ComponentWithInjectedI18n); -; - -function StatlessComponent(props: InjectedTranslateProps) { - return

{props.t("hy")}

; -} - -const TranslatedStatlessComponent = translate()(StatlessComponent); -; - -interface CustomTranslateFunctionProps { - _: TranslationFunction; -} - - - { - (t, {i18n}) => ( -
-

{t('keyFromDefault')}

-

{t('anotherNamespace:key.from.another.namespace', {/* options t options */})}

-
- ) - } -
; - - - {t => '123'} -; - -const defaults: ReactI18NextOptions = { - wait: true, - withRef: true, - bindI18n: 'string', - bindStore: 'string' -}; -setDefaults(defaults); - -reactI18nextModule.init(i18n.init()); diff --git a/types/react-i18next/v1/index.d.ts b/types/react-i18next/v1/index.d.ts deleted file mode 100644 index 0296da861c..0000000000 --- a/types/react-i18next/v1/index.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -// Type definitions for react-i18next 1.7.0 -// Project: https://github.com/i18next/react-i18next -// Definitions by: Kostya Esmukov -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 - -import * as I18next from "i18next"; -import * as React from "react"; - -export type TranslationFunction = I18next.TranslationFunction; - -// Extend your component's Prop interface with this one to get access to `this.props.t` -// -// Please note that if you use the `translateFuncName` option, you should create -// your own interface just like this one, but with your name of the translation function. -// -// interface MyComponentProps extends ReactI18next.InjectedTranslateProps {} -export interface InjectedTranslateProps { - t?: TranslationFunction; -} - -interface I18nextProviderProps { - i18n: I18next.I18n; - children?: React.ReactElement; -} - -export class I18nextProvider extends React.Component { } - - -type InterpolateValue = string | JSX.Element; - -interface InterpolateProps { - i18nKey: string; - - parent?: string; - regexp?: RegExp; - options?: I18next.TranslationOptions; - - useDangerouslySetInnerHTML?: boolean; - dangerouslySetInnerHTMLPartElement?: string; - - [regexKey: string]: InterpolateValue | RegExp | I18next.TranslationOptions | boolean | undefined; -} - -export class Interpolate extends React.Component { } - -interface TranslateOptions { - withRef?: boolean; - wait?: boolean; - translateFuncName?: string; -} - -export function translate(namespaces?: string[] | string, options?: TranslateOptions): (WrappedComponent: C) => C; - -export function loadNamespaces({ components, i18n }: { components: (React.ComponentClass | React.StatelessComponent)[], i18n: I18next.I18n }): Promise; - -export as namespace ReactI18Next; diff --git a/types/react-i18next/v1/react-i18next-tests.tsx b/types/react-i18next/v1/react-i18next-tests.tsx deleted file mode 100644 index 950e29d293..0000000000 --- a/types/react-i18next/v1/react-i18next-tests.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import * as ReactDOM from 'react-dom'; -import * as React from 'react'; -import * as i18n from 'i18next'; -import { translate, I18nextProvider, Interpolate, InjectedTranslateProps, TranslationFunction } from 'react-i18next'; - - -i18n - .init({ - fallbackLng: 'en', - - // have a common namespace used around the full app - ns: ['common'], - defaultNS: 'common', - - debug: true, - - interpolation: { - escapeValue: false // not needed for react!! - } - }); - - -interface InnerAnotherComponentProps { - _?: TranslationFunction; -} - -class InnerAnotherComponent extends React.Component { - render() { - const _ = this.props._!; - - return

{_('content.text', { /* options t options */ })}

; - } -} - -const AnotherComponent = translate('view', { wait: true, translateFuncName: '_' })(InnerAnotherComponent); - - - -interface InnerYetAnotherComponentProps extends InjectedTranslateProps { -} - -class InnerYetAnotherComponent extends React.Component { - render() { - const t = this.props.t!; - - return

{t('usingDefaultNS', { /* options t options */ })}

; - } -} -const YetAnotherComponent = translate()(InnerYetAnotherComponent); - - -interface TranslatableViewProps extends InjectedTranslateProps { -} - -@translate(['view', 'nav'], { wait: true }) -class TranslatableView extends React.Component { - render() { - const t = this.props.t!; - - let interpolateComponent = "a interpolated component"; - - return ( -
-

{t('common:appName')}

- - - - - {t('nav:link1')} -
- ) - } -} - -class App extends React.Component { - render() { - return ( -
-
- -
-
- ); - } -} - - -ReactDOM.render( - , - document.getElementById('app') -); diff --git a/types/react-i18next/v1/tsconfig.json b/types/react-i18next/v1/tsconfig.json deleted file mode 100644 index b16cb92b25..0000000000 --- a/types/react-i18next/v1/tsconfig.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../../", - "typeRoots": [ - "../../" - ], - "paths": { - "react-i18next": [ - "react-i18next/v1" - ], - "i18next": [ - "i18next/v2" - ] - }, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true, - "jsx": "react", - "experimentalDecorators": true - }, - "files": [ - "index.d.ts", - "react-i18next-tests.tsx" - ] -} \ No newline at end of file diff --git a/types/react-i18next/v1/tslint.json b/types/react-i18next/v1/tslint.json deleted file mode 100644 index a41bf5d19a..0000000000 --- a/types/react-i18next/v1/tslint.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "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 - } -} diff --git a/types/react-i18next/v4/I18nextProvider.d.ts b/types/react-i18next/v4/I18nextProvider.d.ts deleted file mode 100644 index 2ecb87f4a1..0000000000 --- a/types/react-i18next/v4/I18nextProvider.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import * as React from "react"; -import { i18n } from "i18next"; - -// tslint:disable-next-line:interface-name -export interface I18nextProviderProps { - i18n: i18n; - children: React.ReactElement; - initialI18nStore?: any; - initialLanguage?: string; -} - -export default class I18nextProvider extends React.Component { } diff --git a/types/react-i18next/v4/index.d.ts b/types/react-i18next/v4/index.d.ts deleted file mode 100644 index 758a00edef..0000000000 --- a/types/react-i18next/v4/index.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Type definitions for react-i18next 4.6 -// Project: https://github.com/i18next/react-i18next -// Definitions by: Giedrius Grabauskas -// Netanel Gilad -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 - -import { TranslationFunction } from "i18next"; - -import I18nextProvider from "./I18nextProvider"; -import Interpolate from "./interpolate"; -import loadNamespaces from "./loadNamespaces"; -import Trans from "./trans"; -import translate from "./translate"; - -export { - I18nextProvider, - Interpolate, - loadNamespaces, - Trans, - translate, - // Exports for TypeScript only - TranslationFunction -}; - -/** - * Extend your component's Prop interface with this one to get access to `this.props.t` - * - * Please note that if you use the `translateFuncName` option, you should create - * your own interface just like this one, but with your name of the translation function. - * - * interface MyComponentProps extends ReactI18next.InjectedTranslateProps {} - */ -export interface InjectedTranslateProps { - t: TranslationFunction; -} - -export as namespace reactI18Next; diff --git a/types/react-i18next/v4/interpolate.d.ts b/types/react-i18next/v4/interpolate.d.ts deleted file mode 100644 index e6f07893ed..0000000000 --- a/types/react-i18next/v4/interpolate.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import * as React from "react"; -import { InterpolationOptions } from "i18next"; - -export type InterpolateValue = string | JSX.Element; - -export interface InterpolatePropsBase { - parent?: string; - regexp?: RegExp; - useDangerouslySetInnerHTML?: boolean; - dangerouslySetInnerHTMLPartElement?: string; - options?: InterpolationOptions; - i18nKey?: string; - className?: string; - style?: React.CSSProperties; -} - -export interface OtherInterpolateProps { - [regexKey: string]: InterpolateValue | RegExp | InterpolationOptions | boolean | undefined; -} - -export type InterpolateProps = InterpolatePropsBase & OtherInterpolateProps; - -export default class Interpolate extends React.Component { } diff --git a/types/react-i18next/v4/loadNamespaces.d.ts b/types/react-i18next/v4/loadNamespaces.d.ts deleted file mode 100644 index d0e0b372f5..0000000000 --- a/types/react-i18next/v4/loadNamespaces.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as React from "react"; -import { i18n } from "i18next"; - -export interface LoadNamespacesArguments { - components: Array | React.StatelessComponent>; - i18n: i18n; -} - -export default function loadNamespaces(args: LoadNamespacesArguments): Promise; diff --git a/types/react-i18next/v4/react-i18next-tests.tsx b/types/react-i18next/v4/react-i18next-tests.tsx deleted file mode 100644 index 3e57dd091b..0000000000 --- a/types/react-i18next/v4/react-i18next-tests.tsx +++ /dev/null @@ -1,95 +0,0 @@ -import * as React from 'react'; -import * as i18n from 'i18next'; -import { translate, I18nextProvider, Interpolate, InjectedTranslateProps, TranslationFunction, loadNamespaces, Trans } from 'react-i18next'; - -interface InnerAnotherComponentProps { - _?: TranslationFunction; -} - -class InnerAnotherComponent extends React.Component { - render() { - const _ = this.props._!; - return

{_('content.text', { /* options t options */ })}

; - } -} - -const AnotherComponent = translate('view', { wait: true, translateFuncName: '_' })(InnerAnotherComponent); - -class InnerYetAnotherComponent extends React.Component { - render() { - const t = this.props.t; - return

{t('usingDefaultNS', { /* options t options */ })}

; - } -} - -const YetAnotherComponent = translate()(InnerYetAnotherComponent); - -class TranslatableView extends React.Component { - render() { - const t = this.props.t; - const interpolateComponent = "a interpolated component"; - - return ( -
-

{t('common:appName')}

- - - - - {t('nav:link1')} -
- ); - } -} - -const WrappedTranslatableView = translate(['view', 'nav'], { wait: true })(TranslatableView); - -class App extends React.Component { - render() { - return ( -
-
- -
-
- ); - } -} - - - -; - -loadNamespaces({ components: [App], i18n }).then(() => { }).catch(error => { }); - -; -; - - -; - -type Key = "view" | "nav"; - -class GenericsTest extends React.Component { - render() { return null; } -} - -translate(['view', 'nav'])(GenericsTest); - -class GenericsTest2 extends React.Component { - render() { return null; } -} - -translate('view')(GenericsTest2); diff --git a/types/react-i18next/v4/trans.d.ts b/types/react-i18next/v4/trans.d.ts deleted file mode 100644 index 384e1605f9..0000000000 --- a/types/react-i18next/v4/trans.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import * as React from "react"; - -export interface TransProps { - i18nKey?: string; - [name: string]: any; -} - -export default class Trans extends React.Component { } diff --git a/types/react-i18next/v4/translate.d.ts b/types/react-i18next/v4/translate.d.ts deleted file mode 100644 index 9a4fb6ddc2..0000000000 --- a/types/react-i18next/v4/translate.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import * as React from "react"; -import { i18n } from "i18next"; -import { InjectedTranslateProps } from "react-i18next"; - -export interface TranslateOptions { - withRef?: boolean; - bindI18n?: string; - bindStore?: string; - translateFuncName?: string; - wait?: boolean; - nsMode?: string; - i18n?: i18n; -} - -// Diff / Omit taken from https://github.com/Microsoft/TypeScript/issues/12215#issuecomment-311923766 -export type Omit = Pick; - -// Injects props and removes them from the prop requirements. -// Adds the new properties t (or whatever the translation function is called) and i18n if needed. -export type InferableComponentEnhancerWithProps = -

(component: React.ComponentClass

| React.StatelessComponent

) => - React.ComponentClass>; - -// tslint:disable-next-line:ban-types -export default function translate(namespaces?: TKey[] | TKey, options?: TranslateOptions): InferableComponentEnhancerWithProps<"t">; diff --git a/types/react-i18next/v4/tsconfig.json b/types/react-i18next/v4/tsconfig.json deleted file mode 100644 index b2c29f0bea..0000000000 --- a/types/react-i18next/v4/tsconfig.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../../", - "typeRoots": [ - "../../" - ], - "paths": { - "react-i18next": [ - "react-i18next/v4" - ] - }, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true, - "jsx": "react", - "experimentalDecorators": true - }, - "files": [ - "index.d.ts", - "react-i18next-tests.tsx", - "I18nextProvider.d.ts", - "interpolate.d.ts", - "loadNamespaces.d.ts", - "trans.d.ts", - "translate.d.ts" - ] -} \ No newline at end of file diff --git a/types/react-jsonschema-form/index.d.ts b/types/react-jsonschema-form/index.d.ts index 63a4de1b89..7e1e1df7e3 100644 --- a/types/react-jsonschema-form/index.d.ts +++ b/types/react-jsonschema-form/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-jsonschema-form 1.0.0 +// Type definitions for react-jsonschema-form 1.0.1 // Project: https://github.com/mozilla-services/react-jsonschema-form // Definitions by: Dan Fox // Ivan Jiang @@ -6,6 +6,7 @@ // Philippe Bourdages // Lucian Buzzo // Sylvain Thénault +// Sebastian Busch // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -68,7 +69,12 @@ declare module "react-jsonschema-form" { [key: string]: FieldId; }; - export interface WidgetProps extends React.HTMLAttributes { + export interface WidgetProps extends Pick< + React.HTMLAttributes, + Exclude< + keyof React.HTMLAttributes, + "onBlur"|"onFocus"> + > { id: string; schema: JSONSchema6; value: any; @@ -79,6 +85,8 @@ declare module "react-jsonschema-form" { onChange: (value: any) => void; options: object; formContext: any; + onBlur: (id: string, value: string) => void; + onFocus: (id: string, value: string) => void; } export type Widget = diff --git a/types/react-jsonschema-form/react-jsonschema-form-tests.tsx b/types/react-jsonschema-form/react-jsonschema-form-tests.tsx index 0bb6715372..90116127fd 100644 --- a/types/react-jsonschema-form/react-jsonschema-form-tests.tsx +++ b/types/react-jsonschema-form/react-jsonschema-form-tests.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import Form, { UiSchema, ErrorListProps } from "react-jsonschema-form"; +import Form, { UiSchema, ErrorListProps, WidgetProps } from "react-jsonschema-form"; import { JSONSchema6 } from "json-schema"; // example taken from the react-jsonschema-form playground: @@ -108,3 +108,9 @@ export class Example extends React.Component { ); } } + +export const CustomWidget: React.SFC = (props) => + props.onFocus('id', 'value')} + onBlur={()=> props.onFocus('id', 'value')} + /> diff --git a/types/react-native-calendars/index.d.ts b/types/react-native-calendars/index.d.ts index 647e64c0f2..20adae432a 100644 --- a/types/react-native-calendars/index.d.ts +++ b/types/react-native-calendars/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/wix/react-native-calendars#readme // Definitions by: Tyler Zhang // David Noreña +// Fabian Meul // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -23,6 +24,10 @@ export interface CalendarDot { selectedDotColor?: string; } +export interface CalendarThemeIdStyle { + [themeId: string]: ViewStyle; +} + export interface CalendarTheme { arrowColor?: string; backgroundColor?: string; @@ -43,6 +48,17 @@ export interface CalendarTheme { textMonthFontSize?: number; textSectionTitleColor?: string; todayTextColor?: string; + + // Theme ID's to style for + "stylesheet.calendar.header"?: CalendarThemeIdStyle; + "stylesheet.calendar.main"?: CalendarThemeIdStyle; + "stylesheet.calendar-list.main"?: CalendarThemeIdStyle; + "stylesheet.agenda.main"?: CalendarThemeIdStyle; + "stylesheet.agenda.list"?: CalendarThemeIdStyle; + "stylesheet.day.basic"?: CalendarThemeIdStyle; + "stylesheet.day.single"?: CalendarThemeIdStyle; + "stylesheet.day.multiDot"?: CalendarThemeIdStyle; + "stylesheet.day.period"?: CalendarThemeIdStyle; } export type DateCallbackHandler = (date: DateObject) => void; @@ -319,6 +335,11 @@ export interface CalendarListBaseProps extends CalendarBaseProps { * Enable or disable vertical scroll indicator. Default = false */ showScrollIndicator?: boolean; + + /** + * Initially selected day + */ + selected?: string; } export class CalendarList extends React.Component { } diff --git a/types/react-native-status-bar-height/index.d.ts b/types/react-native-status-bar-height/index.d.ts new file mode 100644 index 0000000000..6b24c8a9a2 --- /dev/null +++ b/types/react-native-status-bar-height/index.d.ts @@ -0,0 +1,6 @@ +// Type definitions for react-native-status-bar-height 2.1 +// Project: https://github.com/ovr/react-native-status-bar-height#readme +// Definitions by: Tom Spencer +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function getStatusBarHeight(skipAndroid?: boolean): number; diff --git a/types/react-native-status-bar-height/react-native-status-bar-height-tests.ts b/types/react-native-status-bar-height/react-native-status-bar-height-tests.ts new file mode 100644 index 0000000000..a31cb57259 --- /dev/null +++ b/types/react-native-status-bar-height/react-native-status-bar-height-tests.ts @@ -0,0 +1,5 @@ +import { getStatusBarHeight } from 'react-native-status-bar-height'; + +getStatusBarHeight(); // $ExpectType number +getStatusBarHeight(false); // $ExpectType number +getStatusBarHeight(true); // $ExpectType number diff --git a/types/react-native-status-bar-height/tsconfig.json b/types/react-native-status-bar-height/tsconfig.json new file mode 100644 index 0000000000..13c7ab69f5 --- /dev/null +++ b/types/react-native-status-bar-height/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", + "react-native-status-bar-height-tests.ts" + ] +} diff --git a/types/react-native-status-bar-height/tslint.json b/types/react-native-status-bar-height/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/react-native-status-bar-height/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/react-sortable-tree/index.d.ts b/types/react-sortable-tree/index.d.ts index 2127d0ffef..bcc6596ee6 100644 --- a/types/react-sortable-tree/index.d.ts +++ b/types/react-sortable-tree/index.d.ts @@ -158,7 +158,7 @@ export interface TreeRendererProps { export interface ThemeProps { style?: { [index: string]: any }; innerStyle?: { [index: string]: any }; - reactVirtualizedListProps?: ListProps; + reactVirtualizedListProps?: Partial; scaffoldBlockPxWidth?: number; slideRegionSize?: number; rowHeight?: ((info: Index) => number) | number; @@ -184,7 +184,7 @@ export interface ReactSortableTreeProps { onVisibilityToggle?(data: OnVisibilityToggleData): void; canDrag?: ((data: ExtendedNodeData) => boolean) | boolean; canDrop?(data: OnDragPreviousAndNextLocation & NodeData): boolean; - reactVirtualizedListProps?: ListProps; + reactVirtualizedListProps?: Partial; rowHeight?: ((info: Index) => number) | number; slideRegionSize?: number; scaffoldBlockPxWidth?: number; diff --git a/types/react-table/index.d.ts b/types/react-table/index.d.ts index ca7981a6f8..0d03604ae9 100644 --- a/types/react-table/index.d.ts +++ b/types/react-table/index.d.ts @@ -1,13 +1,13 @@ // Type definitions for react-table 6.7 // Project: https://github.com/react-tools/react-table -// Definitions by: Roy Xue , Pavel Sakalo , Krzysztof Porębski +// Definitions by: Roy Xue , Pavel Sakalo , Krzysztof Porębski , Andy S // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 import * as React from 'react'; export type ReactTableFunction = (value?: any) => void; -export type AccessorFunction = (row: object) => any; -export type Accessor = string | string[] | object | AccessorFunction; +export type AccessorFunction = (row: D) => any; +export type Accessor = string | string[] | AccessorFunction; export type Aggregator = (values: any, rows: any) => any; export type TableCellRenderer = ((data: any, column: any) => React.ReactNode) | React.ReactNode; export type FilterRender = (params: { column: Column, filter: any, onChange: ReactTableFunction, key?: string }) => React.ReactElement; @@ -46,7 +46,7 @@ export interface SortingRule { desc?: true; } -export interface TableProps extends +export interface TableProps extends Partial, Partial, Partial, @@ -54,7 +54,7 @@ export interface TableProps extends Partial, Partial { /** Default: [] */ - data: any[]; + data: D[]; /** Default: false */ loading: boolean; @@ -164,7 +164,7 @@ export interface TableProps extends column: Partial; /** Array of all Available Columns */ - columns?: Column[]; + columns?: Array>; /** Expander defaults. */ expanderDefaults: Partial; @@ -180,9 +180,9 @@ export interface TableProps extends /** Control callback for functional rendering */ children: ( - state: FinalState, + state: FinalState, makeTable: () => React.ReactElement, - instance: Instance + instance: Instance ) => React.ReactNode; } @@ -548,7 +548,7 @@ export interface PivotDefaults { render: TableCellRenderer; } -export interface Column extends +export interface Column extends Partial, Partial, Partial, @@ -562,7 +562,7 @@ export interface Column extends * @example {"a": {"b": {"c": $}}} * @example (row) => row.propertyName */ - accessor?: Accessor; + accessor?: Accessor; /** * Conditional - A unique ID is required if the accessor is not a string or if you would like to override the column name used in server-side calls @@ -598,7 +598,7 @@ export interface Column extends expander?: boolean; /** Header Groups only */ - columns?: any[]; + columns?: Array>; /** * Turns this column into a special column for specifying pivot position in your column definitions. @@ -608,12 +608,12 @@ export interface Column extends pivot?: boolean; } -export interface ColumnRenderProps { +export interface ColumnRenderProps { /** Sorted data. */ - data: any[]; + data: D[]; /** The column. */ - column: Column; + column: Column; } export interface RowRenderProps extends Partial { @@ -662,7 +662,7 @@ export interface RowInfo { original: any; } -export interface FinalState extends TableProps { +export interface FinalState extends TableProps { frozen: boolean; startRow: number; endRow: number; @@ -674,21 +674,21 @@ export interface FinalState extends TableProps { canNext: boolean; rowMinWidth: number; - allVisibleColumns: Column[]; - allDecoratedColumns: Column[]; + allVisibleColumns: Array>; + allDecoratedColumns: Array>; resolvedData: DerivedDataObject[]; sortedData: DerivedDataObject[]; headerGroups: any[]; } export const ReactTableDefaults: TableProps; -export default class ReactTable extends React.Component> { } +export default class ReactTable extends React.Component>> { } -export interface Instance extends ReactTable { +export interface Instance extends ReactTable { context: any; - props: Partial; + props: Partial>; refs: any; - state: FinalState; + state: FinalState; filterColumn(...props: any[]): any; filterData(...props: any[]): any; fireFetchData(...props: any[]): any; diff --git a/types/react-table/react-table-tests.tsx b/types/react-table/react-table-tests.tsx index b8380125b3..ca63bdd67c 100644 --- a/types/react-table/react-table-tests.tsx +++ b/types/react-table/react-table-tests.tsx @@ -5,7 +5,15 @@ import * as ReactDOM from 'react-dom'; import ReactTable, { Column, FinalState, Instance } from "react-table"; import "react-table/react-table.css"; -const columns: Column[] = [ +interface Data { + firstName: string; + lastName: string; + age: number; + visits: number; + progress: number; +} + +const columns: Array> = [ { Header: "Name", columns: [ @@ -16,7 +24,7 @@ const columns: Column[] = [ { Header: "Info", columns: [ - { Header: "Age", accessor: "age" }, + { Header: "Age", accessor: (data: Data) => data.age }, { Header: "Status", accessor: "status" } ] }, @@ -29,7 +37,7 @@ const columns: Column[] = [ ]; const Component = (props: {}) => { - const data = [ + const data: Data[] = [ { firstName: "plastic", lastName: "leather", age: 1, visits: 87, progress: 53 }, { firstName: "eggs", lastName: "quartz", age: 13, visits: 78, progress: 82 }, { firstName: "wash", lastName: "wrench", age: 29, visits: 75, progress: 49 }, @@ -156,9 +164,9 @@ const Component = (props: {}) => { }} > {( - state: FinalState, + state: FinalState, makeTable: () => React.ReactChild, - instance: Instance + instance: Instance ) => { return (

{ static hasId(id: string): boolean; static _findDatabaseRows(lookupObj: object): any; // TODO static get(lookupObj: object): ModelWithFields; - static reducer(session: SessionWithModels, action: any): any; + static reducer(action: any, modelClass: typeof Model, session: SessionWithModels): any; readonly ref: Fields & Additional & ORMId; diff --git a/types/request/index.d.ts b/types/request/index.d.ts index 60e24b7692..676156daaa 100644 --- a/types/request/index.d.ts +++ b/types/request/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for request 2.47 +// Type definitions for request 2.48 // Project: https://github.com/request/request // Definitions by: Carlos Ballesteros Velasco , // bonnici , @@ -8,6 +8,7 @@ // Jon Stevens , // Matt R. Wilson // Jose Colella +// Marek Urbanowicz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -24,6 +25,7 @@ import FormData = require('form-data'); import net = require('net'); import tough = require('tough-cookie'); import { Url } from 'url'; +import { SecureContextOptions } from 'tls'; declare namespace request { interface RequestAPI { @@ -132,7 +134,7 @@ declare namespace request { jsonReplacer?: (key: string, value: any) => any; multipart?: RequestPart[] | Multipart; agent?: http.Agent | https.Agent; - agentOptions?: any; + agentOptions?: SecureContextOptions; agentClass?: any; forever?: any; host?: string; diff --git a/types/sequelize/index.d.ts b/types/sequelize/index.d.ts index 5f1c8d1d1d..b6871ca3c4 100644 --- a/types/sequelize/index.d.ts +++ b/types/sequelize/index.d.ts @@ -14,6 +14,7 @@ // Todd Bealmear // Nick Schultz // Thomas Breleur +// Antoine Boisadam // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -5698,6 +5699,13 @@ declare namespace sequelize { * Pass object to limit set of aliased operators or false to disable completely. */ operatorsAliases?: boolean | OperatorsAliases; + + /** + * Set to `true` to enable connecting over SSL. + * + * Defaults to undefined + */ + ssl?: boolean; } /** diff --git a/types/slate-base64-serializer/index.d.ts b/types/slate-base64-serializer/index.d.ts index 6d356aa1c3..6e55220481 100644 --- a/types/slate-base64-serializer/index.d.ts +++ b/types/slate-base64-serializer/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/ianstormtaylor/slate // Definitions by: Brandon Shelton // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Value, Node } from "slate"; export function deserialize(string: string, options?: object): Value; diff --git a/types/slate-plain-serializer/index.d.ts b/types/slate-plain-serializer/index.d.ts index ed57cf3cca..1361c7f743 100644 --- a/types/slate-plain-serializer/index.d.ts +++ b/types/slate-plain-serializer/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Brandon Shelton // Martin Kiefel // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { BlockProperties, MarkProperties, Value } from 'slate'; export interface DeserializeOptions { diff --git a/types/slate/index.d.ts b/types/slate/index.d.ts index f1cd8ecc64..8f80ba4615 100644 --- a/types/slate/index.d.ts +++ b/types/slate/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for slate 0.40 +// Type definitions for slate 0.43 // Project: https://github.com/ianstormtaylor/slate // Definitions by: Andy Kent // Jamie Talbot @@ -7,9 +7,11 @@ // Kalley Powell // Francesco Agnoletto // Irwan Fario Subastian +// Sebastian Greaves // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 import * as Immutable from "immutable"; +import { SyntheticEvent } from "react"; export class Data extends Immutable.Record({}) { [key: string]: any; @@ -1476,10 +1478,10 @@ export class SlateError extends Error { [key: string]: any; } -export interface KeyUtils { - create(key: string): string; - setGenerator(func: () => any): void; - resetGenerator(): void; +export namespace KeyUtils { + function create(key?: string): string; + function setGenerator(func: () => any): void; + function resetGenerator(): void; } export type useMemoization = () => void; @@ -1527,4 +1529,30 @@ export interface PathUtils { ): Immutable.List; } +export interface EditorProperties { + onChange?: (change: Change) => void; + plugins?: any[]; + readOnly?: boolean; + value?: Value; +} + +export class Editor { + object: "editor"; + onChange: (change: Change) => void; + plugins: any[]; + readOnly: boolean; + value: Value; + constructor(attributes: EditorProperties) + + change(customChange: (change: Change, ...args: any[]) => Change): void; + command(name: string, ...args: any[]): void; + event(handler: string, event: Event | SyntheticEvent): void; + query(query: string, ...args: any[]): any; + registerCommand(command: string): void; + registerQuery(query: string): void; + run(key: string, ...args: any[]): any; + setReadOnly(readOnly: boolean): Editor; + setValue(value: Value, options?: object): Editor; +} + export {}; diff --git a/types/slate/slate-tests.ts b/types/slate/slate-tests.ts index 91ef2dadcb..7eb81633bf 100644 --- a/types/slate/slate-tests.ts +++ b/types/slate/slate-tests.ts @@ -1,4 +1,4 @@ -import { Value, Data, BlockJSON, Document } from "slate"; +import { Value, Data, BlockJSON, Document, Editor, Change, KeyUtils } from "slate"; const data = Data.create({ foo: "bar " }); const value = Value.create({ data }); @@ -45,3 +45,20 @@ const doc = Document.fromJSON({ data: {}, nodes: [node] }); + +const editor = new Editor({ value }); +editor.change((change: Change) => { + return change.insertText("test"); +}); + +editor.registerQuery("testQuery"); +editor.registerCommand("testCommand"); +editor.setReadOnly(true).setValue(value); +editor.command("testCommand"); +editor.query("testQuery"); +editor.run("testCommand"); +editor.event("mouseDown", new Event("mouseDown")); + +KeyUtils.setGenerator(() => "Test"); +KeyUtils.create(); +KeyUtils.resetGenerator(); diff --git a/types/snapsvg/index.d.ts b/types/snapsvg/index.d.ts index c012cc238c..85f1eda7b8 100644 --- a/types/snapsvg/index.d.ts +++ b/types/snapsvg/index.d.ts @@ -27,7 +27,7 @@ declare namespace Snap { export function fragment(varargs:any):Fragment; export function getElementByPoint(x:number,y:number):Snap.Element; export function is(o:any,type:string):boolean; - export function load(url:string,callback:Function,scope?:Object):void; + export function load(url:string,callback:(f:Fragment)=>void,scope?:Object):void; export function plugin(f:Function):void; export function select(query:string):Snap.Element; export function selectAll(query:string):any; diff --git a/types/snapsvg/test/3.ts b/types/snapsvg/test/3.ts index 45e7024c0a..7cd45e1ae9 100644 --- a/types/snapsvg/test/3.ts +++ b/types/snapsvg/test/3.ts @@ -175,8 +175,8 @@ window.onload=()=>{ { // Snap load and animate svg var g = s.group(); - var tux = Snap.load("Dreaming_tux.svg", function ( loadedFragment:Snap.Element ) { - g.append( loadedFragment ); + var tux = Snap.load("Dreaming_tux.svg", function ( loadedFragment:Snap.Fragment ) { + g.append( loadedFragment.selectAll() ); g.hover( hoverover, hoverout ); g.text(300,100, 'hover over me'); } ); diff --git a/types/speakeasy/index.d.ts b/types/speakeasy/index.d.ts index 06d79ea6aa..573a9df820 100644 --- a/types/speakeasy/index.d.ts +++ b/types/speakeasy/index.d.ts @@ -1,119 +1,452 @@ -// Type definitions for speakeasy v2.0.0 +// Type definitions for speakeasy 2.0 // Project: https://github.com/speakeasyjs/speakeasy // Definitions by: Lucas Woo , Alexander Batukhtin , Aayush Kapoor // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -interface SharedOptions { - encoding?: string; - algorithm?: string; +/// + +export type Encoding = 'ascii' | 'hex' | 'base32' | 'base64'; +export type Algorithm = 'sha1' | 'sha256' | 'sha512'; + +export interface SharedOptions { + /** + * Key encoding, defaults to ascii + */ + encoding?: Encoding; + /** + * Algorithm, defaults to sha1 + */ + algorithm?: Algorithm; } -interface Key { +export interface GeneratedSecret { + /** + * ASCII representation of the secret + */ ascii: string; - base32: string; + /** + * Hex representation of the secret + */ hex: string; - qr_code_ascii: string; - qr_code_hex: string; - qr_code_base32: string; + /** + * Base32 representation of the secret + */ + base32: string; + /** + * URL for the QR code for the ASCII secret. + * + * @deprecated use a separate QR code library + */ + qr_code_ascii?: string; + /** + * URL for the QR code for the hex secret. + * + * @deprecated use a separate QR code library + */ + qr_code_hex?: string; + /** + * URL for the QR code for the base32 secret. + * + * @deprecated use a separate QR code library + */ + qr_code_base32?: string; + /** + * URL for the Google Authenticator otpauth + * URL's QR code. + * + * @deprecated use a separate QR code library + */ google_auth_qr: string; + /** + * Google Authenticator-compatible otpauth URL. + */ otpauth_url?: string; } +export interface GeneratedSecretWithOtpAuthUrl extends GeneratedSecret { + /** + * Google Authenticator-compatible otpauth URL. + */ + otpauth_url: string; +} -interface DigestOptions extends SharedOptions { +export interface DigestOptions extends SharedOptions { secret: string; - counter: string; + counter: number; + /** + * @deprecated use secret + */ key?: string; } -interface GenerateOptions { +export interface GenerateSecretOptions { + /** + * Length of the secret, defaults to 32 + */ length?: number; + /** + * Whether to include symbols, defaults to false + */ symbols?: boolean; - qr_codes?: boolean; - google_auth_qr?: boolean; + /** + * The name to use with Google Authenticator, deaults to 'SecretKey' + */ name?: string; -} - -interface GenerateSecretOptions { - length?: number; - name?: string; - qr_codes?: boolean; - google_auth_qr?: boolean; + /** + * Whether to output a Google Authenticator-compatible otpauth:// URL + * (only returns otpauth:// URL, no QR code), defaults to false + */ otpauth_url?: boolean; - symbols?: boolean; + /** + * The provider or service with which the + * secret key is associated, defaults to '' + */ + issuer?: string; + /** + * Output QR code URLs for the token. + * + * @deprecated use your own QR code implementation to prevent + * leaking of secret to a third party. + */ + qr_codes?: boolean; + /** + * Output a Google Authenticator otpauth:// QR code URL. + * + * @deprecated use your own QR code implementation to prevent + * leaking of secret to a third party. + */ + google_auth_qr?: boolean; +} +export interface GenerateSecretWithOtpAuthUrlOptions extends GenerateSecretOptions { + /** + * Whether to output a Google Authenticator-compatible otpauth:// URL + * (only returns otpauth:// URL, no QR code), defaults to false + */ + otpauth_url: true; } -interface TotpOptions extends SharedOptions { - key?: string; - step?: number; +export interface HotpOptions extends DigestOptions { + /** + * @deprecated use digits + */ + length?: number; + /** + * The number of digits for the one-time passcode, defaults to 6 + */ + digits?: number; + /** + * The digest, automatically generated by default + */ + digest?: Buffer; +} + +export interface HotpVerifyOptions extends SharedOptions { + /** + * Shared secret key + */ + secret: string; + /** + * Passcode to validate + */ + token: string; + /** + * Counter value. This should be stored by + * the application and must be incremented for each request. + */ + counter: number; + /** + * The number of digits for the one-time passcode, defaults to 6 + */ + digits?: number; + /** + * The allowable margin for the counter. + * The function will check "W" codes in the future against the provided + * passcode, e.g. if W = 10, and C = 5, this function will check the + * passcode against all One Time Passcodes between 5 and 15, inclusive, + * defaults to 0 + */ + window?: number; +} + +export interface TotpOptions extends SharedOptions { + /** + * Time in seconds with which to calculate + * counter value, defaults to `Date.now() / 1000`. + */ time?: number; + /** + * Time step in seconds, defaults to 30 + */ + step?: number; + /** + * Initial time since the UNIX epoch from which to calculate the counter value, + * defaults to 0 (no offset). + */ + epoch?: number; + /** + * @deprecated use epoch + */ initial_time?: number; - length?: number; - counter?: number; - epoch?: number; - secret?: string; + /** + * The number of digits for the one-time passcode, defaults to 6 + */ digits?: number; - digest?: () => string; + /** + * @deprecated use digits + */ + length?: number; + /** + * The digest, automatically generated by default + */ + digest?: Buffer; + /** + * Shared secret key + */ + secret: string; + /** + * @deprecated use secret + */ + key?: string; + /** + * The counter value, calculated from time by default + */ + counter?: string; } -interface TotpVerifyOptions extends SharedOptions { +export interface TotpVerifyOptions extends SharedOptions { + /** + * Shared secret key + */ secret: string; + /** + * Passcode to validate + */ token: string; + /** + * Time in seconds with which to calculate + * counter value, defaults to `Date.now() / 1000`. + */ time?: number; + /** + * Time step in seconds, defaults to 30 + */ step?: number; + /** + * Initial time since the UNIX epoch from which to calculate the counter value, + * defaults to 0 (no offset). + */ epoch?: number; - counter?: number; + /** + * The number of digits for the one-time passcode, defaults to 6 + */ digits?: number; + /** + * The allowable margin for the counter. + * The function will check "W" codes in the future and the past against the + * provided passcode, e.g. if W = 5, and C = 1000, this function will check + * the passcode against all One Time Passcodes between 995 and 1005, inclusive + * defaults to 0 + */ window?: number; + /** + * The counter value, calculated from time by default + */ + counter?: string; } -interface HotpOptions extends SharedOptions { - key: string; - counter: number; - length?: number; - digits?: number; - digest?: () => string; -} - -interface HotpVerifyOptions extends SharedOptions { - secret: string; - token: string; - counter: number; - digits?: number; - window?: number; -} - -interface OtpauthURLOptions extends SharedOptions { +export interface OtpauthURLOptions extends SharedOptions { + /** + * Shared secret key + */ secret: string; + /** + * Used to identify the account with which the secret key is associated, + * e.g. the user's email address. + */ label: string; - issuer?: any; - type?: string; + /** + * Either 'hotp' or 'totp', defaults to 'totp' + */ + type?: 'htop' | 'totp'; + /** + * The initial counter value, required for HOTP. + */ counter?: number; + /** + * The provider or service with which the secret key is associated. + */ + issuer?: string; + /** + * The number of digits for the one-time passcode. Currently ignored + * by Google Authenticator, defaults to 6 + */ digits?: number; + /** + * The length of time for which a TOTP code will be valid, in seconds. + * Currently ignored by Google Authenticator, defaults to 30 + */ period?: number; } -interface Hotp { +export interface Delta { + delta: number; +} + +export interface Hotp { + /** + * Generate a counter-based one-time token. Specify the key and counter, and + * receive the one-time password for that counter position as a string. You can + * also specify a token length, as well as the encoding (ASCII, hexadecimal, or + * base32) and the hashing algorithm to use (SHA1, SHA256, SHA512). + * + * @return The one-time passcode. + */ (options: HotpOptions): string; - verifyDelta: (options: HotpVerifyOptions) => boolean; + /** + * Verify a counter-based one-time token against the secret and return the delta. + * By default, it verifies the token at the given counter value, with no leeway + * (no look-ahead or look-behind). A token validated at the current counter value + * will have a delta of 0. + * + * You can specify a window to add more leeway to the verification process. + * Setting the window param will check for the token at the given counter value + * as well as `window` tokens ahead (one-sided window). See param for more info. + * + * `verifyDelta()` will return the delta between the counter value of the token + * and the given counter value. For example, if given a counter 5 and a window + * 10, `verifyDelta()` will look at tokens from 5 to 15, inclusive. If it finds + * it at counter position 7, it will return `{ delta: 2 }`. + * + * @return On success, returns an object with the counter + * difference between the client and the server as the `delta` property (i.e. + * `{ delta: 0 }`). + */ + verifyDelta: (options: HotpVerifyOptions) => undefined | Delta; + /** + * Verify a counter-based one-time token against the secret and return true if + * it verifies. Helper function for `hotp.verifyDelta()`` that returns a boolean + * instead of an object. + * + * @return Returns true if the token matches within the given window, false otherwise. + */ verify: (options: HotpVerifyOptions) => boolean; } -interface Totp { +export interface Totp { + /** + * Generate a time-based one-time token. Specify the key, and receive the + * one-time password for that time as a string. By default, it uses the current + * time and a time step of 30 seconds, so there is a new token every 30 seconds. + * You may override the time step and epoch for custom timing. You can also + * specify a token length, as well as the encoding (ASCII, hexadecimal, or + * base32) and the hashing algorithm to use (SHA1, SHA256, SHA512). + * + * Under the hood, TOTP calculates the counter value by finding how many time + * steps have passed since the epoch, and calls HOTP with that counter value. + * + * @return The one-time passcode. + */ (options: TotpOptions): string; - verifyDelta: (options: TotpVerifyOptions) => boolean; + /** + * Verify a time-based one-time token against the secret and return the delta. + * By default, it verifies the token at the current time window, with no leeway + * (no look-ahead or look-behind). A token validated at the current time window + * will have a delta of 0. + * + * You can specify a window to add more leeway to the verification process. + * Setting the window param will check for the token at the given counter value + * as well as `window` tokens ahead and `window` tokens behind (two-sided + * window). See param for more info. + * + * `verifyDelta()` will return the delta between the counter value of the token + * and the given counter value. For example, if given a time at counter 1000 and + * a window of 5, `verifyDelta()` will look at tokens from 995 to 1005, + * inclusive. In other words, if the time-step is 30 seconds, it will look at + * tokens from 2.5 minutes ago to 2.5 minutes in the future, inclusive. + * If it finds it at counter position 1002, it will return `{ delta: 2 }`. + * If it finds it at counter position 997, it will return `{ delta: -3 }`. + * + * @return On success, returns an object with the time step + * difference between the client and the server as the `delta` property (e.g. + * `{ delta: 0 }`). + */ + verifyDelta: (options: TotpVerifyOptions) => undefined | Delta; + /** + * Verify a time-based one-time token against the secret and return true if it + * verifies. Helper function for verifyDelta() that returns a boolean instead of + * an object. + * + * @return Returns true if the token matches within the given + * window, false otherwise. + */ verify: (options: TotpVerifyOptions) => boolean; } -export declare const hotp: Hotp; -export declare const totp: Totp; +/** + * Digest the one-time passcode options. + * + * @return The one-time passcode as a buffer. + */ +export function digest(options: DigestOptions): Buffer; -export declare function time(options: TotpOptions): string; -export declare function counter(options: HotpOptions): string; -export declare function digest(options: DigestOptions): string; -export declare function generate_key(options: GenerateOptions): Key; -export declare function generateSecret(options?: GenerateSecretOptions): Key; -export declare function generateSecretASCII( +export const hotp: Hotp; +// Alias counter() for hotp() +export const counter: Hotp; + +export const totp: Totp; +// Alias time() for totp() +export const time: Totp; + +/** + * Generates a random secret with the set A-Z a-z 0-9 and symbols, of any length + * (default 32). Returns the secret key in ASCII, hexadecimal, and base32 format, + * along with the URL used for the QR code for Google Authenticator (an otpauth + * URL). Use a QR code library to generate a QR code based on the Google + * Authenticator URL to obtain a QR code you can scan into the app. + */ +export function generateSecret(options: GenerateSecretWithOtpAuthUrlOptions): GeneratedSecretWithOtpAuthUrl; +/** + * Generates a random secret with the set A-Z a-z 0-9 and symbols, of any length + * (default 32). Returns the secret key in ASCII, hexadecimal, and base32 format, + * along with the URL used for the QR code for Google Authenticator (an otpauth + * URL). Use a QR code library to generate a QR code based on the Google + * Authenticator URL to obtain a QR code you can scan into the app. + */ +export function generateSecret(options?: GenerateSecretOptions): GeneratedSecret; +/** + * @deprecated use generateSecret + */ +export const generate_key: typeof generateSecret; + +/** + * Generates a key of a certain length (default 32) from A-Z, a-z, 0-9, and + * symbols (if requested). + * + * @param length The length of the key, defaults to 32 + * @param symbols Whether to include symbols in the key, defaults to false + * @return The generated key. + */ +export function generateSecretASCII( length?: number, symbols?: boolean ): string; -export declare function otpauthURL(options: OtpauthURLOptions): string; +/** + * @deprecated use generateSecret + */ +export const generate_key_ascii: typeof generateSecretASCII; + +/** + * Generate a Google Authenticator-compatible otpauth:// URL for passing the + * secret to a mobile device to install the secret. + * + * Authenticator considers TOTP codes valid for 30 seconds. Additionally, + * the app presents 6 digits codes to the user. According to the + * documentation, the period and number of digits are currently ignored by + * the app. + * + * To generate a suitable QR Code, pass the generated URL to a QR Code + * generator, such as the `qr-image` module. + * + * @return A URL suitable for use with the Google Authenticator. + * @see https://github.com/google/google-authenticator/wiki/Key-Uri-Format + */ +export function otpauthURL(options: OtpauthURLOptions): string; diff --git a/types/speakeasy/speakeasy-tests.ts b/types/speakeasy/speakeasy-tests.ts index c807e568a3..587b95fd55 100644 --- a/types/speakeasy/speakeasy-tests.ts +++ b/types/speakeasy/speakeasy-tests.ts @@ -3,34 +3,39 @@ import * as speakeasy from 'speakeasy'; speakeasy.generate_key({length: 20, google_auth_qr: true}); // normal use. -speakeasy.hotp({key: 'secret', counter: 582}); +speakeasy.hotp({secret: 'secret', counter: 582}); // use a custom length. -speakeasy.hotp({key: 'secret', counter: 582, length: 8}); +speakeasy.hotp({secret: 'secret', counter: 582, length: 8}); // use a custom encoding. -speakeasy.hotp({key: 'AJFIEJGEHIFIU7148SF', counter: 147, encoding: 'base32'}); +speakeasy.hotp({secret: 'AJFIEJGEHIFIU7148SF', counter: 147, encoding: 'base32'}); // normal use. -speakeasy.totp({key: 'secret'}); +speakeasy.totp({secret: 'secret'}); // use a custom time step. -speakeasy.totp({key: 'secret', step: 60}); +speakeasy.totp({secret: 'secret', step: 60}); // use a custom time. -speakeasy.totp({key: 'secret', time: 159183717}); +speakeasy.totp({secret: 'secret', time: 159183717}); // use a initial time. -speakeasy.totp({key: 'secret', initial_time: 4182881485}); +speakeasy.totp({secret: 'secret', initial_time: 4182881485}); -speakeasy.generateSecret({ +const otpauth_url: string = speakeasy.generateSecret({ length: 3, name: 'testName', qr_codes: true, google_auth_qr: true, otpauth_url: true, symbols: true -}); +}).otpauth_url; + +const otpauth_url2: string | undefined = speakeasy.generateSecret({ + length: 3, + name: 'testName', +}).otpauth_url; speakeasy.generateSecretASCII(5, true); @@ -39,10 +44,10 @@ speakeasy.otpauthURL({ label: 'otpauthURLLength' }); -speakeasy.totp.verify({secret: "secret", token: "123456"}) +speakeasy.totp.verify({secret: "secret", token: "123456"}); -speakeasy.totp.verifyDelta({secret: "secret", token: "123456"}) +speakeasy.totp.verifyDelta({secret: "secret", token: "123456"}); -speakeasy.hotp.verify({secret: "secret", token: "123456", counter: 123}) +speakeasy.hotp.verify({secret: "secret", token: "123456", counter: 123}); -speakeasy.hotp.verifyDelta({secret: "secret", token: "123456", counter: 123}) +speakeasy.hotp.verifyDelta({secret: "secret", token: "123456", counter: 123}); diff --git a/types/speakeasy/tsconfig.json b/types/speakeasy/tsconfig.json index e27d664bc4..7831b0837f 100644 --- a/types/speakeasy/tsconfig.json +++ b/types/speakeasy/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ diff --git a/types/speakeasy/tslint.json b/types/speakeasy/tslint.json index a41bf5d19a..3db14f85ea 100644 --- a/types/speakeasy/tslint.json +++ b/types/speakeasy/tslint.json @@ -1,79 +1 @@ -{ - "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 - } -} +{ "extends": "dtslint/dt.json" } diff --git a/types/stellar-sdk/index.d.ts b/types/stellar-sdk/index.d.ts index 68ad432585..d690398d0c 100644 --- a/types/stellar-sdk/index.d.ts +++ b/types/stellar-sdk/index.d.ts @@ -4,6 +4,7 @@ // Triston Jones // Paul Selden // Max Bause +// Timur Ramazanov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 @@ -455,6 +456,8 @@ export class AccountResponse implements AccountRecord { export class Asset { static native(): Asset; + static fromOperation(xdr: xdr.Asset): Asset; + constructor(code: string, issuer: string) getCode(): string; @@ -462,6 +465,7 @@ export class Asset { getAssetType(): 'native' | 'credit_alphanum4' | 'credit_alphanum12'; isNative(): boolean; equals(other: Asset): boolean; + toXDRObject(): xdr.Asset; code: string; issuer: string; diff --git a/types/styled-components/index.d.ts b/types/styled-components/index.d.ts index c6210edf91..f436b8d490 100644 --- a/types/styled-components/index.d.ts +++ b/types/styled-components/index.d.ts @@ -82,7 +82,7 @@ export interface ThemedStyledFunction { strings: TemplateStringsArray, ...interpolations: Array>> ): StyledComponentClass

; - attrs = {}>( + attrs & { [others: string]: any; } = {}>( attrs: Attrs

, ): ThemedStyledFunction, T, DiffBetween>; } diff --git a/types/styled-components/macro.d.ts b/types/styled-components/macro.d.ts new file mode 100644 index 0000000000..08cee96a96 --- /dev/null +++ b/types/styled-components/macro.d.ts @@ -0,0 +1,2 @@ +export { default } from '.'; +export * from '.'; diff --git a/types/styled-components/styled-components-tests.tsx b/types/styled-components/test/index.tsx similarity index 98% rename from types/styled-components/styled-components-tests.tsx rename to types/styled-components/test/index.tsx index 8adfb03307..7f2197389f 100644 --- a/types/styled-components/styled-components-tests.tsx +++ b/types/styled-components/test/index.tsx @@ -312,6 +312,12 @@ const AttrsInput = styled.input.attrs({ padding: ${props => props.padding}; `; +// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/30042 +const AttrsWithOnlyNewProps = styled.h2.attrs({ as: 'h1' })` + color: ${props => props.as === 'h1' ? 'red' : 'blue'}; + font-size: ${props => props.as === 'h1' ? 2 : 1}; +`; + /** * component type */ diff --git a/types/styled-components/test/macro.tsx b/types/styled-components/test/macro.tsx new file mode 100644 index 0000000000..59acd127a3 --- /dev/null +++ b/types/styled-components/test/macro.tsx @@ -0,0 +1,20 @@ +import styled, { createGlobalStyle } from 'styled-components/macro'; + +// Check that the default export works. +const TitleFromMacro = styled.h1` + font-size: 1.5em; + text-align: center; + color: palevioletred; +`; + +// Check that named exports work as well. +const GlobalStyleFromMacro = createGlobalStyle` + @font-face { + font-family: 'Operator Mono'; + src: url('../fonts/Operator-Mono.ttf'); + } + + body { + margin: 0; + } +`; diff --git a/types/styled-components/tsconfig.json b/types/styled-components/tsconfig.json index 26cb1835d5..22af0d4a13 100644 --- a/types/styled-components/tsconfig.json +++ b/types/styled-components/tsconfig.json @@ -13,5 +13,10 @@ "typeRoots": ["../"], "types": [] }, - "files": ["index.d.ts", "styled-components-tests.tsx"] + "files": [ + "index.d.ts", + "macro.d.ts", + "test/index.tsx", + "test/macro.tsx" + ] } diff --git a/types/three/three-core.d.ts b/types/three/three-core.d.ts index 3ab89ea5a9..66276bb1f4 100755 --- a/types/three/three-core.d.ts +++ b/types/three/three-core.d.ts @@ -3378,17 +3378,18 @@ export class Color { */ getStyle(): string; - offsetHSL(h: number, s: number, l: number): Color; + offsetHSL(h: number, s: number, l: number): this; - add(color: Color): Color; - addColors(color1: Color, color2: Color): Color; - addScalar(s: number): Color; - sub(color: Color): Color; - multiply(color: Color): Color; - multiplyScalar(s: number): Color; - lerp(color: Color, alpha: number): Color; + add(color: Color): this; + addColors(color1: Color, color2: Color): this; + addScalar(s: number): this; + sub(color: Color): this; + multiply(color: Color): this; + multiplyScalar(s: number): this; + lerp(color: Color, alpha: number): this; + lerpHSL(color: Color, alpha: number): this; equals(color: Color): boolean; - fromArray(rgb: number[], offset?: number): Color; + fromArray(rgb: number[], offset?: number): this; toArray(array?: number[], offset?: number): number[]; } diff --git a/types/update-notifier/index.d.ts b/types/update-notifier/index.d.ts index 98c71d87f6..b8d6e02f52 100644 --- a/types/update-notifier/index.d.ts +++ b/types/update-notifier/index.d.ts @@ -1,8 +1,9 @@ -// Type definitions for update-notifier 2.2 +// Type definitions for update-notifier 2.5 // Project: https://github.com/yeoman/update-notifier // Definitions by: vvakame // Noah Chen // Jason Dreyzehner +// Michael Grinich // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export = UpdateNotifier; @@ -27,6 +28,7 @@ declare namespace UpdateNotifier { packageName?: string; packageVersion?: string; updateCheckInterval?: number; // in milliseconds, default 1000 * 60 * 60 * 24 (1 day) + shouldNotifyInNpmScript?: boolean; } interface BoxenOptions { diff --git a/types/webdriverio/index.d.ts b/types/webdriverio/index.d.ts index 27be7e973f..48fb31af47 100644 --- a/types/webdriverio/index.d.ts +++ b/types/webdriverio/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for WebdriverIO 4.10 +// Type definitions for WebdriverIO 4.13 // Project: http://www.webdriver.io/ // Definitions by: Nick Malaguti // Tim Brust @@ -327,6 +327,7 @@ declare namespace WebdriverIO { httpOnly?: boolean; expiry?: number; secure?: boolean; + domain?: string; } interface Suite {