diff --git a/types/alt/index.d.ts b/types/alt/index.d.ts index 0c69e4020a..9094642e70 100644 --- a/types/alt/index.d.ts +++ b/types/alt/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/goatslacker/alt // Definitions by: Michael Shearer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/aphrodite/index.d.ts b/types/aphrodite/index.d.ts index a82ec2f36b..bd2749f737 100644 --- a/types/aphrodite/index.d.ts +++ b/types/aphrodite/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/Khan/aphrodite // Definitions by: Alexey Svetliakov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as CSS from "csstype"; diff --git a/types/assert-equal-jsx/index.d.ts b/types/assert-equal-jsx/index.d.ts index e017fcf57c..735ab5974a 100644 --- a/types/assert-equal-jsx/index.d.ts +++ b/types/assert-equal-jsx/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/thejameskyle/assert-equal-jsx // Definitions by: Josh Toft // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/atlaskit__button/index.d.ts b/types/atlaskit__button/index.d.ts index e9a613fabd..95ac1e0961 100644 --- a/types/atlaskit__button/index.d.ts +++ b/types/atlaskit__button/index.d.ts @@ -2,7 +2,7 @@ // Project: https://bitbucket.org/atlassian/atlaskit-mk-2/ // Definitions by: Jimmy Luong // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, diff --git a/types/atlaskit__calendar/index.d.ts b/types/atlaskit__calendar/index.d.ts index e92776c1f3..e1c76eb397 100644 --- a/types/atlaskit__calendar/index.d.ts +++ b/types/atlaskit__calendar/index.d.ts @@ -2,7 +2,7 @@ // Project: https://bitbucket.org/atlassian/atlaskit-mk-2/src/master/ // Definitions by: Lee Standen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, HTMLAttributes, FocusEvent } from 'react'; diff --git a/types/atlaskit__inline-edit/index.d.ts b/types/atlaskit__inline-edit/index.d.ts index 4ee82ee4c3..d2d706c5a4 100644 --- a/types/atlaskit__inline-edit/index.d.ts +++ b/types/atlaskit__inline-edit/index.d.ts @@ -2,7 +2,7 @@ // Project: https://bitbucket.org/atlassian/atlaskit-mk-2/ // Definitions by: Lee Standen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ReactElement, Component } from 'react'; export default class InlineEdit extends Component {} diff --git a/types/atlaskit__layer/index.d.ts b/types/atlaskit__layer/index.d.ts index 2f50a5abcf..03673c47a3 100644 --- a/types/atlaskit__layer/index.d.ts +++ b/types/atlaskit__layer/index.d.ts @@ -2,7 +2,7 @@ // Project: https://bitbucket.org/atlassian/atlaskit-mk-2/src/master/ // Definitions by: Lee Standen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, ReactNode } from 'react'; diff --git a/types/atlaskit__single-select/index.d.ts b/types/atlaskit__single-select/index.d.ts index 6536869512..4910c10a11 100644 --- a/types/atlaskit__single-select/index.d.ts +++ b/types/atlaskit__single-select/index.d.ts @@ -2,7 +2,7 @@ // Project: https://bitbucket.org/atlassian/atlaskit-mk-2/src/master/ // Definitions by: Lee Standen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, ReactNode, SyntheticEvent } from 'react'; diff --git a/types/braft-editor/index.d.ts b/types/braft-editor/index.d.ts index 00d03d81d1..62f339a41b 100644 --- a/types/braft-editor/index.d.ts +++ b/types/braft-editor/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/margox/braft#readme // Definitions by: My Self // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; import { RawDraftContentState } from 'draft-js'; diff --git a/types/chai-enzyme/index.d.ts b/types/chai-enzyme/index.d.ts index 413f5ec545..783b7fce2f 100644 --- a/types/chai-enzyme/index.d.ts +++ b/types/chai-enzyme/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/producthunt/chai-enzyme // Definitions by: Alexey Svetliakov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/chrome-apps/index.d.ts b/types/chrome-apps/index.d.ts index 0d0ae8ff83..253b17e7dd 100644 --- a/types/chrome-apps/index.d.ts +++ b/types/chrome-apps/index.d.ts @@ -349,6 +349,10 @@ declare namespace chrome { NEW_NOTE: ActionType } + const ActionType: { + NEW_NOTE: actionType + } + interface LaunchData { /** * The ID of the file or URL handler that the app is being invoked with. @@ -9485,6 +9489,13 @@ declare namespace chrome { /** Excludes pages that this content script would otherwise be injected into. */ exclude_matches?: any[] + /** JavaScript or CSS file to inject. */ + file?: string + } + /** The type of injection item: code or a set of files. */ + interface InjectionItems { + /** JavaScript code or CSS to be injected into matching pages. */ + code?: string /** * Whether to insert the content script on about:blank and about:srcdoc. * Content scripts will only be injected on pages when their inherit URL diff --git a/types/create-subscription/index.d.ts b/types/create-subscription/index.d.ts index 79003980ee..8c7d8c1ced 100644 --- a/types/create-subscription/index.d.ts +++ b/types/create-subscription/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Asana // Vincent Siao // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/crypto-random-string/crypto-random-string-tests.ts b/types/crypto-random-string/crypto-random-string-tests.ts new file mode 100644 index 0000000000..1a66c25981 --- /dev/null +++ b/types/crypto-random-string/crypto-random-string-tests.ts @@ -0,0 +1,4 @@ +import generate = require('crypto-random-string'); + +// $ExpectType string +generate(10); diff --git a/types/crypto-random-string/index.d.ts b/types/crypto-random-string/index.d.ts new file mode 100644 index 0000000000..dc41e18428 --- /dev/null +++ b/types/crypto-random-string/index.d.ts @@ -0,0 +1,13 @@ +// Type definitions for crypto-random-string 1.0 +// Project: https://github.com/sindresorhus/crypto-random-string +// Definitions by: Manuel Warum +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Generate a hexadecimal string of the given length. + * @param length the length of the random string. + * @return a string of the specified length. + */ +declare function cryptoRandomString(length: number): string; + +export = cryptoRandomString; diff --git a/types/meteor-univserse-i18n/tsconfig.json b/types/crypto-random-string/tsconfig.json similarity index 91% rename from types/meteor-univserse-i18n/tsconfig.json rename to types/crypto-random-string/tsconfig.json index 7beab3bd30..fd68e9d080 100644 --- a/types/meteor-univserse-i18n/tsconfig.json +++ b/types/crypto-random-string/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "meteor-univserse-i18n-tests.ts" + "crypto-random-string-tests.ts" ] } diff --git a/types/crypto-random-string/tslint.json b/types/crypto-random-string/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/crypto-random-string/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/datatables.net/datatables.net-tests.ts b/types/datatables.net/datatables.net-tests.ts index d22e878d34..de739a673a 100644 --- a/types/datatables.net/datatables.net-tests.ts +++ b/types/datatables.net/datatables.net-tests.ts @@ -1073,3 +1073,92 @@ const util_1: boolean = dt.any(); const util_2: number = dt.count(); //#endregion "Methods-Util" + +//#region "ExtSettings" + +const ext_classes_settings: DataTables.ExtClassesSettings = { +}; +const ext_classes_settings_full: DataTables.ExtClassesSettings = { + sFilter: "", + sFilterInput: "", + sFooterTH: "", + sHeaderTH: "", + sInfo: "", + sJUIFooter: "", + sJUIHeader: "", + sLength: "", + sLengthSelect: "", + sNoFooter: "", + sPageButton: "", + sPageButtonActive: "", + sPageButtonDisabled: "", + sPaging: "", + sProcessing: "", + sRowEmpty: "", + sScrollBody: "", + sScrollFoot: "", + sScrollFootInner: "", + sScrollHead: "", + sScrollHeadInner: "", + sScrollWrapper: "", + sSortable: "", + sSortableAsc: "", + sSortableDesc: "", + sSortableNone: "", + sSortAsc: "", + sSortColumn: "", + sSortDesc: "", + sSortIcon: "", + sSortJUI: "", + sSortJUIAsc: "", + sSortJUIAscAllowed: "", + sSortJUIDesc: "", + sSortJUIDescAllowed: "", + sSortJUIWrapper: "", + sStripeEven: "", + sStripeOdd: "", + sTable: "", + sWrapper: "" +}; + +const ext_type_settings: DataTables.ExtTypeSettings = { + detect: [], + search: {}, + order: {} +}; +ext_type_settings.detect.push((d: string, s: DataTables.Settings) => { + return null; +}); +ext_type_settings.detect.push((d: string, s: DataTables.Settings) => { + return ""; +}); + +const ext_settings: DataTables.ExtSettings = { + aTypes: [], + afnFiltering: [], + afnSortData: {}, + aoFeatures: [], + builder: "", + classes: ext_classes_settings, + errMode: "", + feature: [], + fnVersionCheck: (version: string) => "", + iApiIndex: 0, + internal: {}, + legacy: {}, + oApi: {}, + oJUIClasses: {}, + oPagination: {}, + oSort: {}, + oStdClasses: ext_classes_settings, + ofnSearch: {}, + order: {}, + pager: {}, + renderer: {}, + sVersion: "", + search: [], + selector: {}, + type: ext_type_settings +}; + + //#endregion "ExtSettings" diff --git a/types/datatables.net/index.d.ts b/types/datatables.net/index.d.ts index ae7edf755a..ed87028502 100644 --- a/types/datatables.net/index.d.ts +++ b/types/datatables.net/index.d.ts @@ -2026,7 +2026,10 @@ declare namespace DataTables { sVersion: string; search: any[]; selector: object; - type: object; + /** + * Type based plug-ins. + */ + type: ExtTypeSettings; } interface ExtClassesSettings { @@ -2208,4 +2211,36 @@ declare namespace DataTables { sJUIFooter?: string; } //#endregion "ext internal" + + interface ExtTypeSettings { + /** + * Type detection functions for plug-in development. + * + * @see https://datatables.net/manual/plug-ins/type-detection + */ + detect: FunctionExtTypeSettingsDetect[]; + /** + * Type based ordering functions for plug-in development. + * + * @see https://datatables.net/manual/plug-ins/sorting + * @default {} + */ + order: object; + /** + * Type based search formatting for plug-in development. + * + * @default {} + * @example + * $.fn.dataTable.ext.type.search['title-numeric'] = function ( d ) { + * return d.replace(/\n/g," ").replace( /<.*?>/g, "" ); + * } + */ + search: object; + } + + /** + * @param data Data from the column cell to be analysed. + * @param DataTables settings object. + */ + type FunctionExtTypeSettingsDetect = (data: any, settings: Settings) => (string | null); } diff --git a/types/di/di-tests.ts b/types/di/di-tests.ts new file mode 100644 index 0000000000..4cfd3de5e7 --- /dev/null +++ b/types/di/di-tests.ts @@ -0,0 +1,21 @@ +import * as di from "di"; + +const emptyInjector = new di.Injector(); +const moduleSpecifications = [{}]; +const fullInjector = new di.Injector(moduleSpecifications); +const childInjector = new di.Injector(moduleSpecifications, emptyInjector); + +const dep: {} = fullInjector.get('foo'); + +const factory = (context: {}, deps: Array<{}>) => { + return {}; +}; + +const invoked: {} = fullInjector.invoke(factory, {}); + +const oldTimeyClass = {prototype: {}}; + +const instance: {} = fullInjector.instantiate(oldTimeyClass); + +const anotherChildInjector: di.Injector = + fullInjector.createChild(moduleSpecifications); diff --git a/types/di/index.d.ts b/types/di/index.d.ts new file mode 100644 index 0000000000..ea1d596017 --- /dev/null +++ b/types/di/index.d.ts @@ -0,0 +1,15 @@ +// Type definitions for di 0.0 +// Project: https://github.com/vojtajina/node-di +// Definitions by: John J Barton +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/// + +export class Injector { + get(dep: string): {}; + invoke(fn: (context: {}, deps: Array<{}>) => {}, context: {}): {}; + instantiate({prototype: {}}): {}; + createChild(modules: Array<{}>): Injector; + constructor(modules?: Array<{}>, parent?: Injector); +} diff --git a/types/di/tsconfig.json b/types/di/tsconfig.json new file mode 100644 index 0000000000..c7e591ab5a --- /dev/null +++ b/types/di/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", + "di-tests.ts" + ] +} diff --git a/types/meteor-univserse-i18n/tslint.json b/types/di/tslint.json similarity index 100% rename from types/meteor-univserse-i18n/tslint.json rename to types/di/tslint.json diff --git a/types/dnssd/dnssd-tests.ts b/types/dnssd/dnssd-tests.ts index 14b637d384..0fa7498bb2 100644 --- a/types/dnssd/dnssd-tests.ts +++ b/types/dnssd/dnssd-tests.ts @@ -1,6 +1,6 @@ import * as dnssd from 'dnssd'; -const serviceType = new dnssd.ServiceType(dnssd.tcp('_mqtt'), dnssd.udp('_mqtt')); +const serviceType = dnssd.ServiceType.tcp('_mqtt', '_mqtt._udp'); const advertisement = new dnssd.Advertisement(serviceType, 1883, { name: 'broker' }); const browser: dnssd.Browser = new dnssd.Browser(serviceType); diff --git a/types/dnssd/index.d.ts b/types/dnssd/index.d.ts index 9c66a6d6a4..80de2900f3 100644 --- a/types/dnssd/index.d.ts +++ b/types/dnssd/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for dnssd 0.3 +// Type definitions for dnssd 0.4 // Project: https://github.com/DeMille/dnssd.js#readme // Definitions by: Angel Merino +// Max Rumpf // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -9,22 +10,30 @@ import { EventEmitter } from 'events'; /** Declaration file generated by dts-gen */ export class Advertisement { - constructor(type: any, port: any, ...args: any[]); + constructor(type: string | string[] | ServiceType, port: number, ...args: any[]); - start(): any; + start(): Advertisement; - stop(forceImmediate: any, callback: any): void; + stop(forceImmediate?: boolean, callback?: () => any): void; updateTXT(txtObj: any): void; } +export class Options { + name?: string; + host?: string; + txt?: any; + subtypes?: string[]; + interface?: string; +} + /** * A service entry as returned by serviceUp */ export class Service { fullname: string; // 'InstanceName._googlecast._tcp.local.' name: string; // 'InstanceName' - type: SType; // { name: 'googlecast'; protocol: 'tcp' } + type: ServiceType; // { name: 'googlecast'; protocol: 'tcp' } domain: string; // 'local' host: string; // 'Hostname.local.' port: number; // 8009 @@ -33,9 +42,21 @@ export class Service { txtRaw: any; } -export class SType { +export class ServiceType { + constructor(...args: string[]) + constructor(args: ServiceType); + name: string; protocol: string; + subtypes: string[]; + + toString(): string; + + static all(): ServiceType; + + static tcp(...args: string[]): ServiceType; + + static udp(...args: string[]): ServiceType; } export class Browser extends EventEmitter { @@ -48,23 +69,11 @@ export class Browser extends EventEmitter { stop(): any; } -export class ServiceType { - constructor(...args: any[]); - - toString(): any; - - static all(): any; - - static tcp(...args: any[]): any; - - static udp(...args: any[]): any; -} - export const resolveA: any; export const resolveAAAA: any; -export function all(): any; +export function all(): ServiceType; export function resolve(name: any, type: any, ...args: any[]): any; @@ -74,6 +83,6 @@ export function resolveService(name: any, ...args: any[]): any; export function resolveTXT(name: any, opts: any): any; -export function tcp(...args: any[]): any; +export function tcp(...args: string[]): ServiceType; -export function udp(...args: any[]): any; +export function udp(...args: string[]): ServiceType; diff --git a/types/draft-js/index.d.ts b/types/draft-js/index.d.ts index 4064c9b8a0..06cb8f55f2 100644 --- a/types/draft-js/index.d.ts +++ b/types/draft-js/index.d.ts @@ -9,7 +9,7 @@ // Santiago Vilar // Ulf Schwekendiek // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import * as Immutable from 'immutable'; diff --git a/types/emoji-mart/index.d.ts b/types/emoji-mart/index.d.ts index 6a8ed65632..22c17731f3 100644 --- a/types/emoji-mart/index.d.ts +++ b/types/emoji-mart/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/missive/emoji-mart // Definitions by: Diogo Franco // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 // These definitions should work with 2.3, but the tests doesn't pass on 2.3. diff --git a/types/enzyme-adapter-react-15.4/index.d.ts b/types/enzyme-adapter-react-15.4/index.d.ts index 570cc22e99..2496fb1719 100644 --- a/types/enzyme-adapter-react-15.4/index.d.ts +++ b/types/enzyme-adapter-react-15.4/index.d.ts @@ -2,7 +2,7 @@ // Project: http://airbnb.io/enzyme/ // Definitions by: Nabeelah Ali // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { EnzymeAdapter } from 'enzyme'; diff --git a/types/enzyme-adapter-react-15/index.d.ts b/types/enzyme-adapter-react-15/index.d.ts index 90149cae55..06659d75b9 100644 --- a/types/enzyme-adapter-react-15/index.d.ts +++ b/types/enzyme-adapter-react-15/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/airbnb/enzyme // Definitions by: Tanguy Krotoff // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { EnzymeAdapter } from 'enzyme'; diff --git a/types/enzyme-adapter-react-16/index.d.ts b/types/enzyme-adapter-react-16/index.d.ts index 53f97ccce6..3e567d956b 100644 --- a/types/enzyme-adapter-react-16/index.d.ts +++ b/types/enzyme-adapter-react-16/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/airbnb/enzyme // Definitions by: Tanguy Krotoff // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { EnzymeAdapter } from 'enzyme'; diff --git a/types/enzyme-redux/index.d.ts b/types/enzyme-redux/index.d.ts index ad312d6d1f..e231119b89 100644 --- a/types/enzyme-redux/index.d.ts +++ b/types/enzyme-redux/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/Knegusen/enzyme-redux#readme // Definitions by: Dennis Axelsson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ReactWrapper, ShallowWrapper } from 'enzyme'; import { ReactElement } from 'react'; diff --git a/types/enzyme-to-json/index.d.ts b/types/enzyme-to-json/index.d.ts index d2ba70fc8f..1a8cafb23a 100644 --- a/types/enzyme-to-json/index.d.ts +++ b/types/enzyme-to-json/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/adriantoine/enzyme-to-json#readme // Definitions by: Joscha Feth // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ReactWrapper, ShallowWrapper } from 'enzyme'; diff --git a/types/enzyme/index.d.ts b/types/enzyme/index.d.ts index 7327f69511..a91f60b3c6 100644 --- a/types/enzyme/index.d.ts +++ b/types/enzyme/index.d.ts @@ -9,7 +9,7 @@ // Torgeir Hovden // Martin Hochel // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// import { ReactElement, Component, AllHTMLAttributes as ReactHTMLAttributes, SVGAttributes as ReactSVGAttributes } from "react"; diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 2ad6a8d1aa..8ad088763d 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -11,7 +11,7 @@ // Tina Roh // Nathan Phillip Brink // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { EventSubscription } from 'fbemitter'; import { Component, ComponentClass, Ref, ComponentType } from 'react'; diff --git a/types/expo/v23/index.d.ts b/types/expo/v23/index.d.ts index 4c33d8b13f..b5c327f6a1 100644 --- a/types/expo/v23/index.d.ts +++ b/types/expo/v23/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/expo/expo-sdk // Definitions by: Konstantin Kai // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { EventSubscription } from 'fbemitter'; import { Component, Ref } from 'react'; diff --git a/types/expo/v24/index.d.ts b/types/expo/v24/index.d.ts index 803ecccf32..35d1e9be92 100644 --- a/types/expo/v24/index.d.ts +++ b/types/expo/v24/index.d.ts @@ -6,7 +6,7 @@ // Sergio Sánchez // Fernando Helwanger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { EventSubscription } from 'fbemitter'; import { Component, ComponentClass, Ref, ComponentType } from 'react'; diff --git a/types/expo/v25/index.d.ts b/types/expo/v25/index.d.ts index 0a7093e2b7..766c055911 100644 --- a/types/expo/v25/index.d.ts +++ b/types/expo/v25/index.d.ts @@ -7,7 +7,7 @@ // Fernando Helwanger // Umidbek Karimov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { EventSubscription } from 'fbemitter'; import { Component, ComponentClass, Ref, ComponentType } from 'react'; diff --git a/types/expo/v26/index.d.ts b/types/expo/v26/index.d.ts index 9b65002305..9804579e66 100644 --- a/types/expo/v26/index.d.ts +++ b/types/expo/v26/index.d.ts @@ -8,7 +8,7 @@ // Umidbek Karimov // Tina Roh // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { EventSubscription } from 'fbemitter'; import { Component, ComponentClass, Ref, ComponentType } from 'react'; diff --git a/types/expo__vector-icons/index.d.ts b/types/expo__vector-icons/index.d.ts index 19aadf2a33..529142c0e9 100644 --- a/types/expo__vector-icons/index.d.ts +++ b/types/expo__vector-icons/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/expo/vector-icons // Definitions by: Hyeonsu Lee // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { TextProps } from 'react-native'; diff --git a/types/fixed-data-table-2/index.d.ts b/types/fixed-data-table-2/index.d.ts index 0b844ec194..16b0c0f3c5 100644 --- a/types/fixed-data-table-2/index.d.ts +++ b/types/fixed-data-table-2/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/schrodinger/fixed-data-table-2 // Definitions by: Ilya Petukhov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/fixed-data-table/index.d.ts b/types/fixed-data-table/index.d.ts index c8ee33a2a1..4c0b7f176f 100644 --- a/types/fixed-data-table/index.d.ts +++ b/types/fixed-data-table/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/facebook/fixed-data-table // Definitions by: Petar Paar , Stephen Jelfs // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/flux/index.d.ts b/types/flux/index.d.ts index ffc0330228..cafb6a5a0b 100644 --- a/types/flux/index.d.ts +++ b/types/flux/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Steve Baker // Giedrius Grabauskas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import Dispatcher = require("./lib/Dispatcher"); diff --git a/types/fluxible-router/index.d.ts b/types/fluxible-router/index.d.ts index 2dea024107..097c2b3c2d 100644 --- a/types/fluxible-router/index.d.ts +++ b/types/fluxible-router/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/yahoo/fluxible#readme // Definitions by: xbim // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// import * as React from 'react'; import { FluxibleContext } from 'fluxible'; diff --git a/types/fluxxor/index.d.ts b/types/fluxxor/index.d.ts index 3457dba949..191332fa7a 100644 --- a/types/fluxxor/index.d.ts +++ b/types/fluxxor/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/BinaryMuse/fluxxor // Definitions by: Yuichi Murata // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as EventEmitter3 from 'eventemitter3'; import * as React from "react"; diff --git a/types/google-map-react/index.d.ts b/types/google-map-react/index.d.ts index ca5348323a..ffd8cb90c2 100644 --- a/types/google-map-react/index.d.ts +++ b/types/google-map-react/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/istarkov/google-map-react // Definitions by: Honza Brecka // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/graphql/graphql-tests.ts b/types/graphql/graphql-tests.ts index 7c0210249b..e75fecb329 100644 --- a/types/graphql/graphql-tests.ts +++ b/types/graphql/graphql-tests.ts @@ -1,4 +1,4 @@ -import * as graphql from 'graphql'; +import { assertInputType, isInputType, isOutputType } from 'graphql'; /////////////////////////// // graphql // @@ -50,7 +50,10 @@ function language_visitor_tests() { // graphql/type // /////////////////////////// function type_definition_tests() { - // TODO + isInputType(null); + isOutputType(null); + + assertInputType(null); } function type_directives_tests() { diff --git a/types/graphql/type/definition.d.ts b/types/graphql/type/definition.d.ts index b078acccb1..ced45be4a2 100644 --- a/types/graphql/type/definition.d.ts +++ b/types/graphql/type/definition.d.ts @@ -36,37 +36,37 @@ export function isType(type: any): type is GraphQLType; export function assertType(type: any): GraphQLType; -export function isScalarType(type: GraphQLType): type is GraphQLScalarType; +export function isScalarType(type: any): type is GraphQLScalarType; -export function assertScalarType(type: GraphQLType): GraphQLScalarType; +export function assertScalarType(type: any): GraphQLScalarType; -export function isObjectType(type: GraphQLType): type is GraphQLObjectType; +export function isObjectType(type: any): type is GraphQLObjectType; -export function assertObjectType(type: GraphQLType): GraphQLObjectType; +export function assertObjectType(type: any): GraphQLObjectType; -export function isInterfaceType(type: GraphQLType): type is GraphQLInterfaceType; +export function isInterfaceType(type: any): type is GraphQLInterfaceType; -export function assertInterfaceType(type: GraphQLType): GraphQLInterfaceType; +export function assertInterfaceType(type: any): GraphQLInterfaceType; -export function isUnionType(type: GraphQLType): type is GraphQLUnionType; +export function isUnionType(type: any): type is GraphQLUnionType; -export function assertUnionType(type: GraphQLType): GraphQLUnionType; +export function assertUnionType(type: any): GraphQLUnionType; -export function isEnumType(type: GraphQLType): type is GraphQLEnumType; +export function isEnumType(type: any): type is GraphQLEnumType; -export function assertEnumType(type: GraphQLType): GraphQLEnumType; +export function assertEnumType(type: any): GraphQLEnumType; -export function isInputObjectType(type: GraphQLType): type is GraphQLInputObjectType; +export function isInputObjectType(type: any): type is GraphQLInputObjectType; -export function assertInputObjectType(type: GraphQLType): GraphQLInputObjectType; +export function assertInputObjectType(type: any): GraphQLInputObjectType; -export function isListType(type: GraphQLType): type is GraphQLList; +export function isListType(type: any): type is GraphQLList; -export function assertListType(type: GraphQLType): GraphQLList; +export function assertListType(type: any): GraphQLList; -export function isNonNullType(type: GraphQLType): type is GraphQLNonNull; +export function isNonNullType(type: any): type is GraphQLNonNull; -export function assertNonNullType(type: GraphQLType): GraphQLNonNull; +export function assertNonNullType(type: any): GraphQLNonNull; /** * These types may be used as input types for arguments and directives. @@ -78,9 +78,9 @@ export type GraphQLInputType = | GraphQLList | GraphQLNonNull>; -export function isInputType(type: GraphQLType): type is GraphQLInputType; +export function isInputType(type: any): type is GraphQLInputType; -export function assertInputType(type: GraphQLType): GraphQLInputType; +export function assertInputType(type: any): GraphQLInputType; /** * These types may be used as output types as the result of fields. @@ -101,36 +101,36 @@ export type GraphQLOutputType = | GraphQLList >; -export function isOutputType(type: GraphQLType): type is GraphQLOutputType; +export function isOutputType(type: any): type is GraphQLOutputType; -export function assertOutputType(type: GraphQLType): GraphQLOutputType; +export function assertOutputType(type: any): GraphQLOutputType; /** * These types may describe types which may be leaf values. */ export type GraphQLLeafType = GraphQLScalarType | GraphQLEnumType; -export function isLeafType(type: GraphQLType): type is GraphQLLeafType; +export function isLeafType(type: any): type is GraphQLLeafType; -export function assertLeafType(type: GraphQLType): GraphQLLeafType; +export function assertLeafType(type: any): GraphQLLeafType; /** * These types may describe the parent context of a selection set. */ export type GraphQLCompositeType = GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType; -export function isCompositeType(type: GraphQLType): type is GraphQLCompositeType; +export function isCompositeType(type: any): type is GraphQLCompositeType; -export function assertCompositeType(type: GraphQLType): GraphQLCompositeType; +export function assertCompositeType(type: any): GraphQLCompositeType; /** * These types may describe the parent context of a selection set. */ export type GraphQLAbstractType = GraphQLInterfaceType | GraphQLUnionType; -export function isAbstractType(type: GraphQLType): type is GraphQLAbstractType; +export function isAbstractType(type: any): type is GraphQLAbstractType; -export function assertAbstractType(type: GraphQLType): GraphQLAbstractType; +export function assertAbstractType(type: any): GraphQLAbstractType; /** * List Modifier @@ -188,9 +188,9 @@ export class GraphQLNonNull { export type GraphQLWrappingType = GraphQLList | GraphQLNonNull; -export function isWrappingType(type: GraphQLType): type is GraphQLWrappingType; +export function isWrappingType(type: any): type is GraphQLWrappingType; -export function assertWrappingType(type: GraphQLType): GraphQLWrappingType; +export function assertWrappingType(type: any): GraphQLWrappingType; /** * These types can all accept null as a value. @@ -204,9 +204,9 @@ export type GraphQLNullableType = | GraphQLInputObjectType | GraphQLList; -export function isNullableType(type: GraphQLType): type is GraphQLNullableType; +export function isNullableType(type: any): type is GraphQLNullableType; -export function assertNullableType(type: GraphQLType): GraphQLNullableType; +export function assertNullableType(type: any): GraphQLNullableType; export function getNullableType(type: void): undefined; export function getNullableType(type: T): T; @@ -223,9 +223,9 @@ export type GraphQLNamedType = | GraphQLEnumType | GraphQLInputObjectType; -export function isNamedType(type: GraphQLType): type is GraphQLNamedType; +export function isNamedType(type: any): type is GraphQLNamedType; -export function assertNamedType(type: GraphQLType): GraphQLNamedType; +export function assertNamedType(type: any): GraphQLNamedType; export function getNamedType(type: void): undefined; export function getNamedType(type: GraphQLType): GraphQLNamedType; diff --git a/types/grid-styled/index.d.ts b/types/grid-styled/index.d.ts index 81c11df405..2a245f2260 100644 --- a/types/grid-styled/index.d.ts +++ b/types/grid-styled/index.d.ts @@ -4,7 +4,7 @@ // Victor Orlov // Louis Hache // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 export type Omit = Pick; diff --git a/types/halogen/index.d.ts b/types/halogen/index.d.ts index de09f29f43..ab0d4f31f4 100644 --- a/types/halogen/index.d.ts +++ b/types/halogen/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/yuanyan/halogen // Definitions by: Vincent Rouffiat // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as react from "react"; diff --git a/types/hedron/index.d.ts b/types/hedron/index.d.ts index 6eb34e3638..1e19aaee7a 100644 --- a/types/hedron/index.d.ts +++ b/types/hedron/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/JSBros/hedron // Definitions by: Dmytro Borysov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/iarna__toml/iarna__toml-tests.ts b/types/iarna__toml/iarna__toml-tests.ts new file mode 100644 index 0000000000..65dcddbe3a --- /dev/null +++ b/types/iarna__toml/iarna__toml-tests.ts @@ -0,0 +1,35 @@ +import * as TOML from '@iarna/toml'; +import { Readable } from 'stream'; + +TOML.parse('{}'); // $ExpectType Record +TOML.parse.async('{}'); // $ExpectType Promise> +TOML.parse.async('{}', {}); // $ExpectType Promise> +TOML.parse.async('{}', {blocksize: 1}); // $ExpectType Promise> + +TOML.parse.stream(); // $ExpectType Transform +TOML.parse.stream(new Readable()); // $ExpectType Promise> + +TOML.stringify({}); // $ExpectType string +TOML.stringify(1); // $ExpectError + +TOML.stringify.value({}); // $ExpectType string +TOML.stringify.value(1); // $ExpectType string + +import parse = require('@iarna/toml/parse-string'); +parse('{}'); // $ExpectType Record + +import parseAsync = require('@iarna/toml/parse-async'); +parseAsync('{}'); // $ExpectType Promise> +parseAsync('{}', {}); // $ExpectType Promise> +parseAsync('{}', {blocksize: 1}); // $ExpectType Promise> + +import parseStream = require('@iarna/toml/parse-stream'); +parseStream(); // $ExpectType Transform +parseStream(new Readable()); // $ExpectType Promise> + +import stringify = require('@iarna/toml/stringify'); +stringify({}); // $ExpectType string +stringify(1); // $ExpectError + +stringify.value({}); // $ExpectType string +stringify.value(1); // $ExpectType string diff --git a/types/iarna__toml/index.d.ts b/types/iarna__toml/index.d.ts new file mode 100644 index 0000000000..1d7f8b1239 --- /dev/null +++ b/types/iarna__toml/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for @iarna/toml 2.0 +// Project: https://github.com/iarna/iarna-toml#readme +// Definitions by: Klaus Meinhardt +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +import parseAsync = require('./parse-async'); +import parseStream = require('./parse-stream'); + +export import stringify = require('./stringify'); + +/** Synchronously parse a TOML string and return an object. */ +export function parse(str: string): Record; +export namespace parse { + export { + parseAsync as async, + parseStream as stream, + }; +} diff --git a/types/iarna__toml/parse-async.d.ts b/types/iarna__toml/parse-async.d.ts new file mode 100644 index 0000000000..40ba9b64ba --- /dev/null +++ b/types/iarna__toml/parse-async.d.ts @@ -0,0 +1,10 @@ +/** Asynchronously parse a TOML string and return a promise of the resulting object. */ +declare function parseAsync(str: string, opts?: parseAsync.Options): Promise>; + +declare namespace parseAsync { + interface Options { + /** The amount text to parser per pass through the event loop. Defaults to 40kb. */ + blocksize?: number; + } +} +export = parseAsync; diff --git a/types/iarna__toml/parse-stream.d.ts b/types/iarna__toml/parse-stream.d.ts new file mode 100644 index 0000000000..f844be1f07 --- /dev/null +++ b/types/iarna__toml/parse-stream.d.ts @@ -0,0 +1,9 @@ +/// + +import { Readable, Transform } from "stream"; + +/** Given a readable stream, parse it as it feeds us data. Return a promise of the resulting object. */ +declare function parseStream(readable: Readable): Promise>; +/** Returns a transform stream in object mode. When it completes, emit the resulting object. Only one object will ever be emitted. */ +declare function parseStream(): Transform; +export = parseStream; diff --git a/types/iarna__toml/parse-string.d.ts b/types/iarna__toml/parse-string.d.ts new file mode 100644 index 0000000000..0ef7630951 --- /dev/null +++ b/types/iarna__toml/parse-string.d.ts @@ -0,0 +1,3 @@ +/** Synchronously parse a TOML string and return an object. */ +declare function parseString(str: string): Record; +export = parseString; diff --git a/types/iarna__toml/stringify.d.ts b/types/iarna__toml/stringify.d.ts new file mode 100644 index 0000000000..6596d587f3 --- /dev/null +++ b/types/iarna__toml/stringify.d.ts @@ -0,0 +1,15 @@ +/** + * Serialize an object as TOML. + * + * If an object `TOML.stringify` is serializing has a toJSON method then it will call it to transform the object before serializing it. + * This matches the behavior of JSON.stringify. + * The one exception to this is that toJSON is not called for Date objects because JSON represents dates as strings and TOML can represent them natively. + */ +declare function stringify(obj: Record): string; + +declare namespace stringify { + /** Serialize a value as TOML would. This is a fragment and not a complete valid TOML document. */ + function value(v: any): string; +} + +export = stringify; diff --git a/types/iarna__toml/tsconfig.json b/types/iarna__toml/tsconfig.json new file mode 100644 index 0000000000..fe5c1cbf66 --- /dev/null +++ b/types/iarna__toml/tsconfig.json @@ -0,0 +1,35 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true, + "paths": { + "@iarna/toml": [ + "iarna__toml" + ], + "@iarna/toml/*": [ + "iarna__toml/*" + ] + } + }, + "files": [ + "index.d.ts", + "parse-async.d.ts", + "parse-stream.d.ts", + "parse-string.d.ts", + "stringify.d.ts", + "iarna__toml-tests.ts" + ] +} diff --git a/types/iarna__toml/tslint.json b/types/iarna__toml/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/iarna__toml/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/is-callable/index.d.ts b/types/is-callable/index.d.ts new file mode 100644 index 0000000000..7e2c89f845 --- /dev/null +++ b/types/is-callable/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for is-callable 1.1 +// Project: https://github.com/ljharb/is-callable +// Definitions by: Daniel +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function isCallable(val: any): val is (...args: any[]) => any; + +export = isCallable; diff --git a/types/is-callable/is-callable-tests.ts b/types/is-callable/is-callable-tests.ts new file mode 100644 index 0000000000..7ae8518ffd --- /dev/null +++ b/types/is-callable/is-callable-tests.ts @@ -0,0 +1,26 @@ +import isCallable = require("is-callable"); + +isCallable(undefined); +isCallable(null); +isCallable(false); +isCallable(true); +isCallable([]); +isCallable({}); +isCallable(/a/g); +isCallable(new RegExp("a", "g")); +isCallable(new Date()); +isCallable(42); +isCallable(NaN); +isCallable(Infinity); +isCallable("foo"); +isCallable(Object("foo")); + +function func1() {} +if (isCallable(func1)) { + func1(); +} + +const func2 = (x: number) => x * x; +if (isCallable(func2)) { + func2(0); +} diff --git a/types/is-callable/tsconfig.json b/types/is-callable/tsconfig.json new file mode 100644 index 0000000000..e1334095d7 --- /dev/null +++ b/types/is-callable/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", + "is-callable-tests.ts" + ] +} diff --git a/types/is-callable/tslint.json b/types/is-callable/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/is-callable/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/jasmine-enzyme/index.d.ts b/types/jasmine-enzyme/index.d.ts index fd52c65ed8..bc37eda9bf 100644 --- a/types/jasmine-enzyme/index.d.ts +++ b/types/jasmine-enzyme/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/blainekasten/enzyme-matchers/blob/master/packages/jasmine-enzyme/README.md // Definitions by: Umar Bolatov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// /// diff --git a/types/jest-specific-snapshot/index.d.ts b/types/jest-specific-snapshot/index.d.ts index ef0e7f4225..61a65a416a 100644 --- a/types/jest-specific-snapshot/index.d.ts +++ b/types/jest-specific-snapshot/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/igor-dv/jest-specific-snapshot#readme // Definitions by: Janeene Beeforth // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/jsnox/index.d.ts b/types/jsnox/index.d.ts index 6b626c29f0..91c4361a94 100644 --- a/types/jsnox/index.d.ts +++ b/types/jsnox/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Steve Baker // Dovydas Navickas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/jsoneditor-for-react/index.d.ts b/types/jsoneditor-for-react/index.d.ts index 707f03c63e..0dedfc8a64 100644 --- a/types/jsoneditor-for-react/index.d.ts +++ b/types/jsoneditor-for-react/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/mixj93/jsoneditor-for-react#readme // Definitions by: JoshGoldberg // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; import JSONEditor, { JSONEditorOptions } from "jsoneditor"; diff --git a/types/material-ui-datatables/index.d.ts b/types/material-ui-datatables/index.d.ts index e456f84e7d..ece700fe23 100644 --- a/types/material-ui-datatables/index.d.ts +++ b/types/material-ui-datatables/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/hyojin/material-ui-datatables#readme // Definitions by: Ravi L. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/meteor-univserse-i18n/index.d.ts b/types/meteor-universe-i18n/index.d.ts similarity index 100% rename from types/meteor-univserse-i18n/index.d.ts rename to types/meteor-universe-i18n/index.d.ts diff --git a/types/meteor-univserse-i18n/meteor-univserse-i18n-tests.ts b/types/meteor-universe-i18n/meteor-universe-i18n-tests.ts similarity index 100% rename from types/meteor-univserse-i18n/meteor-univserse-i18n-tests.ts rename to types/meteor-universe-i18n/meteor-universe-i18n-tests.ts diff --git a/types/meteor-universe-i18n/tsconfig.json b/types/meteor-universe-i18n/tsconfig.json new file mode 100644 index 0000000000..3b4c98a86d --- /dev/null +++ b/types/meteor-universe-i18n/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", + "meteor-universe-i18n-tests.ts" + ] +} diff --git a/types/meteor-universe-i18n/tslint.json b/types/meteor-universe-i18n/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/meteor-universe-i18n/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/muicss/index.d.ts b/types/muicss/index.d.ts index f195ae5d23..813abbfdcc 100644 --- a/types/muicss/index.d.ts +++ b/types/muicss/index.d.ts @@ -2,6 +2,6 @@ // Project: https://www.muicss.com/ // Definitions by: Samuel Neff // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 // all definitions in react.d.ts and subdirs diff --git a/types/nanographql/index.d.ts b/types/nanographql/index.d.ts index 36bec2367a..aca13fdaa5 100644 --- a/types/nanographql/index.d.ts +++ b/types/nanographql/index.d.ts @@ -6,4 +6,4 @@ export = nanographql; -declare function nanographql(query: TemplateStringsArray): (variables?: object) => string; +declare function nanographql(query: TemplateStringsArray | string): (variables?: object) => string; diff --git a/types/nanographql/nanographql-tests.ts b/types/nanographql/nanographql-tests.ts index ecff5ce5e9..22ff648033 100644 --- a/types/nanographql/nanographql-tests.ts +++ b/types/nanographql/nanographql-tests.ts @@ -1,10 +1,24 @@ import gql = require('nanographql'); -const queryFactory = gql` + +// TemplateStringArray query test +const templateStringQueryFactory = gql` query($name: String!) { movie (name: $name) { releaseDate } } `; -const query = queryFactory({ name: 'Back to the Future' }); -JSON.parse(query); +const templatedQuery = templateStringQueryFactory({ name: 'Back to the Future' }); +JSON.parse(templatedQuery); + +// string query test +const stringField = 'movie'; +const strinQueryFactory = gql(` + query($name: String!) { + ${stringField} (name: $name) { + releaseDate + } + } +`); +const stringQuery = strinQueryFactory({ name: 'Back to the Future' }); +JSON.parse(stringQuery); diff --git a/types/navigation-react/index.d.ts b/types/navigation-react/index.d.ts index 3d98c0d5a5..330f0e9a52 100644 --- a/types/navigation-react/index.d.ts +++ b/types/navigation-react/index.d.ts @@ -2,7 +2,7 @@ // Project: http://grahammendick.github.io/navigation/ // Definitions by: Graham Mendick // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { StateNavigator } from 'navigation'; import { Component, HTMLProps } from 'react'; diff --git a/types/next/index.d.ts b/types/next/index.d.ts index 1beaffdfac..2d87121d61 100644 --- a/types/next/index.d.ts +++ b/types/next/index.d.ts @@ -7,7 +7,7 @@ // Scott Jones // Joao Vieira // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/node/index.d.ts b/types/node/index.d.ts index bb4b54efa7..f39dc1dc74 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -1151,7 +1151,6 @@ declare module "http" { constructor(); setTimeout(msecs: number, callback?: () => void): this; - destroy(error: Error): void; setHeader(name: string, value: number | string | string[]): void; getHeader(name: string): number | string | string[] | undefined; getHeaders(): OutgoingHttpHeaders; @@ -2777,7 +2776,6 @@ declare module "net" { bufferSize: number; setEncoding(encoding?: string): this; - destroy(err?: any): void; pause(): this; resume(): this; setTimeout(timeout: number, callback?: Function): this; @@ -3143,7 +3141,6 @@ declare module "fs" { export class ReadStream extends stream.Readable { close(): void; - destroy(): void; bytesRead: number; path: string | Buffer; @@ -5978,8 +5975,8 @@ declare module "stream" { highWaterMark?: number; encoding?: string; objectMode?: boolean; - read?: (this: Readable, size?: number) => any; - destroy?: (error: Error | null, callback: (error?: Error) => void) => void; + read?(this: Readable, size: number): void; + destroy?(this: Readable, error: Error | null, callback: (error: Error | null) => void): void; } export class Readable extends Stream implements NodeJS.ReadableStream { @@ -5997,7 +5994,7 @@ declare module "stream" { unshift(chunk: any): void; wrap(oldStream: NodeJS.ReadableStream): this; push(chunk: any, encoding?: string): boolean; - _destroy(error: Error | null, callback: (error?: Error) => void): void; + _destroy(error: Error | null, callback: (error: Error | null) => void): void; destroy(error?: Error): void; /** @@ -6009,66 +6006,66 @@ declare module "stream" { * 4. readable * 5. error */ - addListener(event: string, listener: (...args: any[]) => void): this; addListener(event: "close", listener: () => void): this; - addListener(event: "data", listener: (chunk: Buffer | string) => void): this; + addListener(event: "data", listener: (chunk: any) => void): this; addListener(event: "end", listener: () => void): this; addListener(event: "readable", listener: () => void): this; addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: string | symbol, ...args: any[]): boolean; emit(event: "close"): boolean; - emit(event: "data", chunk: Buffer | string): boolean; + emit(event: "data", chunk: any): boolean; emit(event: "end"): boolean; emit(event: "readable"): boolean; emit(event: "error", err: Error): boolean; + emit(event: string | symbol, ...args: any[]): boolean; - on(event: string, listener: (...args: any[]) => void): this; on(event: "close", listener: () => void): this; - on(event: "data", listener: (chunk: Buffer | string) => void): this; + on(event: "data", listener: (chunk: any) => void): this; on(event: "end", listener: () => void): this; on(event: "readable", listener: () => void): this; on(event: "error", listener: (err: Error) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: string, listener: (...args: any[]) => void): this; once(event: "close", listener: () => void): this; - once(event: "data", listener: (chunk: Buffer | string) => void): this; + once(event: "data", listener: (chunk: any) => void): this; once(event: "end", listener: () => void): this; once(event: "readable", listener: () => void): this; once(event: "error", listener: (err: Error) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; prependListener(event: "close", listener: () => void): this; - prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependListener(event: "data", listener: (chunk: any) => void): this; prependListener(event: "end", listener: () => void): this; prependListener(event: "readable", listener: () => void): this; prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: "data", listener: (chunk: any) => void): this; prependOnceListener(event: "end", listener: () => void): this; prependOnceListener(event: "readable", listener: () => void): this; prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - removeListener(event: string, listener: (...args: any[]) => void): this; removeListener(event: "close", listener: () => void): this; - removeListener(event: "data", listener: (chunk: Buffer | string) => void): this; + removeListener(event: "data", listener: (chunk: any) => void): this; removeListener(event: "end", listener: () => void): this; removeListener(event: "readable", listener: () => void): this; removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; - [Symbol.asyncIterator](): AsyncIterableIterator; + [Symbol.asyncIterator](): AsyncIterableIterator; } export interface WritableOptions { highWaterMark?: number; decodeStrings?: boolean; objectMode?: boolean; - write?: (chunk: any, encoding: string, callback: Function) => any; - writev?: (chunks: Array<{ chunk: any, encoding: string }>, callback: Function) => any; - destroy?: (error: Error | null, callback: (error?: Error) => void) => void; - final?: (callback: (error?: Error) => void) => void; + write?(this: Writable, chunk: any, encoding: string, callback: (error?: Error | null) => void): void; + writev?(this: Writable, chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; + destroy?(this: Writable, error: Error | null, callback: (error: Error | null) => void): void; + final?(this: Writable, callback: (error?: Error | null) => void): void; } export class Writable extends Stream implements NodeJS.WritableStream { @@ -6076,16 +6073,16 @@ declare module "stream" { readonly writableHighWaterMark: number; readonly writableLength: number; constructor(opts?: WritableOptions); - _write(chunk: any, encoding: string, callback: (err?: Error) => void): void; - _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (err?: Error) => void): void; - _destroy(error: Error | null, callback: (error?: Error) => void): void; - _final(callback: Function): void; - write(chunk: any, cb?: Function): boolean; - write(chunk: any, encoding?: string, cb?: Function): boolean; + _write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void; + _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; + _destroy(error: Error | null, callback: (error: Error | null) => void): void; + _final(callback: (error?: Error | null) => void): void; + write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean; + write(chunk: any, encoding?: string, cb?: (error: Error | null | undefined) => void): boolean; setDefaultEncoding(encoding: string): this; - end(cb?: Function): void; - end(chunk: any, cb?: Function): void; - end(chunk: any, encoding?: string, cb?: Function): void; + end(cb?: () => void): void; + end(chunk: any, cb?: () => void): void; + end(chunk: any, encoding?: string, cb?: () => void): void; cork(): void; uncork(): void; destroy(error?: Error): void; @@ -6100,67 +6097,72 @@ declare module "stream" { * 5. pipe * 6. unpipe */ - addListener(event: string, listener: (...args: any[]) => void): this; addListener(event: "close", listener: () => void): this; addListener(event: "drain", listener: () => void): this; addListener(event: "error", listener: (err: Error) => void): this; addListener(event: "finish", listener: () => void): this; addListener(event: "pipe", listener: (src: Readable) => void): this; addListener(event: "unpipe", listener: (src: Readable) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: string | symbol, ...args: any[]): boolean; emit(event: "close"): boolean; - emit(event: "drain", chunk: Buffer | string): boolean; + emit(event: "drain"): boolean; emit(event: "error", err: Error): boolean; emit(event: "finish"): boolean; emit(event: "pipe", src: Readable): boolean; emit(event: "unpipe", src: Readable): boolean; + emit(event: string | symbol, ...args: any[]): boolean; - on(event: string, listener: (...args: any[]) => void): this; on(event: "close", listener: () => void): this; on(event: "drain", listener: () => void): this; on(event: "error", listener: (err: Error) => void): this; on(event: "finish", listener: () => void): this; on(event: "pipe", listener: (src: Readable) => void): this; on(event: "unpipe", listener: (src: Readable) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: string, listener: (...args: any[]) => void): this; once(event: "close", listener: () => void): this; once(event: "drain", listener: () => void): this; once(event: "error", listener: (err: Error) => void): this; once(event: "finish", listener: () => void): this; once(event: "pipe", listener: (src: Readable) => void): this; once(event: "unpipe", listener: (src: Readable) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; prependListener(event: "close", listener: () => void): this; prependListener(event: "drain", listener: () => void): this; prependListener(event: "error", listener: (err: Error) => void): this; prependListener(event: "finish", listener: () => void): this; prependListener(event: "pipe", listener: (src: Readable) => void): this; prependListener(event: "unpipe", listener: (src: Readable) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; prependOnceListener(event: "close", listener: () => void): this; prependOnceListener(event: "drain", listener: () => void): this; prependOnceListener(event: "error", listener: (err: Error) => void): this; prependOnceListener(event: "finish", listener: () => void): this; prependOnceListener(event: "pipe", listener: (src: Readable) => void): this; prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - removeListener(event: string, listener: (...args: any[]) => void): this; removeListener(event: "close", listener: () => void): this; removeListener(event: "drain", listener: () => void): this; removeListener(event: "error", listener: (err: Error) => void): this; removeListener(event: "finish", listener: () => void): this; removeListener(event: "pipe", listener: (src: Readable) => void): this; removeListener(event: "unpipe", listener: (src: Readable) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; } export interface DuplexOptions extends ReadableOptions, WritableOptions { allowHalfOpen?: boolean; readableObjectMode?: boolean; writableObjectMode?: boolean; + read?(this: Duplex, size: number): void; + write?(this: Duplex, chunk: any, encoding: string, callback: (error?: Error | null) => void): void; + writev?(this: Duplex, chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; + final?(this: Duplex, callback: (error?: Error | null) => void): void; + destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void; } // Note: Duplex extends both Readable and Writable. @@ -6169,31 +6171,36 @@ declare module "stream" { readonly writableHighWaterMark: number; readonly writableLength: number; constructor(opts?: DuplexOptions); - _write(chunk: any, encoding: string, callback: (err?: Error) => void): void; - _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (err?: Error) => void): void; - _destroy(error: Error | null, callback: (error?: Error) => void): void; - _final(callback: Function): void; - write(chunk: any, cb?: Function): boolean; - write(chunk: any, encoding?: string, cb?: Function): boolean; + _write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void; + _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; + _destroy(error: Error | null, callback: (error: Error | null) => void): void; + _final(callback: (error?: Error | null) => void): void; + write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean; + write(chunk: any, encoding?: string, cb?: (error: Error | null | undefined) => void): boolean; setDefaultEncoding(encoding: string): this; - end(cb?: Function): void; - end(chunk: any, cb?: Function): void; - end(chunk: any, encoding?: string, cb?: Function): void; + end(cb?: () => void): void; + end(chunk: any, cb?: () => void): void; + end(chunk: any, encoding?: string, cb?: () => void): void; cork(): void; uncork(): void; } - type TransformCallback = (err?: Error, data?: any) => void; + type TransformCallback = (error?: Error, data?: any) => void; export interface TransformOptions extends DuplexOptions { - transform?: (chunk: any, encoding: string, callback: TransformCallback) => any; - flush?: (callback: TransformCallback) => any; + read?(this: Transform, size: number): void; + write?(this: Transform, chunk: any, encoding: string, callback: (error?: Error | null) => void): void; + writev?(this: Transform, chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; + final?(this: Transform, callback: (error?: Error | null) => void): void; + destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void; + transform?(this: Transform, chunk: any, encoding: string, callback: TransformCallback): void; + flush?(this: Transform, callback: TransformCallback): void; } export class Transform extends Duplex { constructor(opts?: TransformOptions); _transform(chunk: any, encoding: string, callback: TransformCallback): void; - destroy(error?: Error): void; + _flush(callback: TransformCallback): void; } export class PassThrough extends Transform { } diff --git a/types/node/node-tests.ts b/types/node/node-tests.ts index aae5512702..9c38a5672e 100644 --- a/types/node/node-tests.ts +++ b/types/node/node-tests.ts @@ -953,81 +953,149 @@ const unzipped: Buffer = zlib.unzipSync(compressMe); function simplified_stream_ctor_test() { new stream.Readable({ read(size) { - size.toFixed(); + // $ExpectType Readable + this; + // $ExpectType number + size; }, destroy(error, cb) { - error.stack; - cb(error); + // $ExpectType Error + error; + // $ExpectType (error: Error) => void + cb; } }); new stream.Writable({ write(chunk, enc, cb) { - chunk.slice(1); - enc.charAt(0); - cb(); + // $ExpectType Writable + this; + // $ExpectType any + chunk; + // $ExpectType string + enc; + // $ExpectType (error?: Error) => void + cb; }, writev(chunks, cb) { - chunks[0].chunk.slice(0); - chunks[0].encoding.charAt(0); - cb(); + // $ExpectType Writable + this; + // $ExpectType { chunk: any; encoding: string; }[] + chunks; + // $ExpectType (error?: Error) => void + cb; }, destroy(error, cb) { - error.stack; - cb(error); + // $ExpectType Writable + this; + // $ExpectType Error + error; + // $ExpectType (error: Error) => void + cb; }, final(cb) { - cb(null); + // $ExpectType Writable + this; + // $ExpectType (error?: Error) => void + cb; } }); new stream.Duplex({ read(size) { - size.toFixed(); + // $ExpectType Duplex + this; + // $ExpectType number + size; }, write(chunk, enc, cb) { - chunk.slice(1); - enc.charAt(0); - cb(); + // $ExpectType Duplex + this; + // $ExpectType any + chunk; + // $ExpectType string + enc; + // $ExpectType (error?: Error) => void + cb; }, writev(chunks, cb) { - chunks[0].chunk.slice(0); - chunks[0].encoding.charAt(0); - cb(); + // $ExpectType Duplex + this; + // $ExpectType { chunk: any; encoding: string; }[] + chunks; + // $ExpectType (error?: Error) => void + cb; }, destroy(error, cb) { - error.stack; - cb(error); + // $ExpectType Duplex + this; + // $ExpectType Error + error; + // $ExpectType (error: Error) => void + cb; + }, + final(cb) { + // $ExpectType Duplex + this; + // $ExpectType (error?: Error) => void + cb; }, readableObjectMode: true, writableObjectMode: true }); new stream.Transform({ - transform(chunk, enc, cb) { - chunk.slice(1); - enc.charAt(0); - cb(); - }, - flush(cb) { - cb(); - }, read(size) { - size.toFixed(); + // $ExpectType Transform + this; + // $ExpectType number + size; }, write(chunk, enc, cb) { - chunk.slice(1); - enc.charAt(0); - cb(); + // $ExpectType Transform + this; + // $ExpectType any + chunk; + // $ExpectType string + enc; + // $ExpectType (error?: Error) => void + cb; }, writev(chunks, cb) { - chunks[0].chunk.slice(0); - chunks[0].encoding.charAt(0); - cb(); + // $ExpectType Transform + this; + // $ExpectType { chunk: any; encoding: string; }[] + chunks; + // $ExpectType (error?: Error) => void + cb; }, destroy(error, cb) { - error.stack; - cb(error); + // $ExpectType Transform + this; + // $ExpectType Error + error; + // $ExpectType (error: Error) => void + cb; + }, + final(cb) { + // $ExpectType Transform + this; + // $ExpectType (error?: Error) => void + cb; + }, + transform(chunk, enc, cb) { + // $ExpectType Transform + this; + // $ExpectType any + chunk; + // $ExpectType string + enc; + // $ExpectType TransformCallback + cb; + }, + flush(cb) { + // $ExpectType TransformCallback + cb; }, allowHalfOpen: true, readableObjectMode: true, diff --git a/types/nuka-carousel/index.d.ts b/types/nuka-carousel/index.d.ts index 9766b64481..dcecb92a99 100644 --- a/types/nuka-carousel/index.d.ts +++ b/types/nuka-carousel/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/FormidableLabs/nuka-carousel // Definitions by: Roman Charugin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index a731343bc6..f0adb92080 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -280,7 +280,7 @@ declare namespace Office { * * @remarks * - * Returned by the {@link Office.AsyncResult.status | status} property of the {@link Office.AsyncResult | AsyncResult} object. + * Returned by the `status` property of the {@link Office.AsyncResult | AsyncResult} object. * * **Support details** * @@ -477,9 +477,9 @@ declare namespace Office { * @remarks *
HostsAccess, Excel, Outlook, PowerPoint, Project, Word
* - * You access the AsyncResult object in the function passed as the argument to the callback parameter of an "Async" method, such as the {@link Office.Document.getSelectedDataAsync | getSelectedDataAsync} and {@link Office.Document.setSelectedDataAsync | setSelectedDataAsync} methods of the Document object. + * You access the AsyncResult object in the function passed as the argument to the callback parameter of an "Async" method, such as the `getSelectedDataAsync` and `setSelectedDataAsync` methods of the {@link Office.Document | Document} object. * - * Note: What the value property returns for a particular "Async" method varies depending on the purpose and context of that method. To determine what is returned by the value property for an "Async" method, refer to the "Callback value" section of the method's topic. For a complete listing of the "Async" methods, see the Remarks section of the {@link Office.AsyncResult | AsyncResult} object topic. + * Note: What the value property returns for a particular "Async" method varies depending on the purpose and context of that method. To determine what is returned by the value property for an "Async" method, refer to the "Callback value" section of the method's topic. */ value: any; } @@ -1334,7 +1334,7 @@ declare namespace Office { /** * Return a JSON object that contains an array of the ids, titles, and indexes of the selected slides. For example, `{"slides":[{"id":257,"title":"Slide 2","index":2},{"id":256,"title":"Slide 1","index":1}]}` for a selection of two slides. * - * Note: Only applies to data in PowerPoint when calling the {@link Office.Document.getSelectedData | Document.getSelectedData} method to get the current slide or selected range of slides. + * Note: Only applies to data in PowerPoint when calling the {@link Office.Document | Document}.getSelectedData method to get the current slide or selected range of slides. */ SlideRange, /** @@ -1630,7 +1630,7 @@ declare namespace Office { Index } /** - * Specifies the relative PowerPoint slide + * Specifies the relative PowerPoint slide. * * @remarks * @@ -1642,7 +1642,7 @@ declare namespace Office { * * *Supported hosts, by platform* * - * + * * *
Office for Windows desktop Office Online (in browser) Office for iPad /th>
Office for Windows desktop Office Online (in browser) Office for iPad
PowerPoint Y Y Y
*/ @@ -1665,7 +1665,7 @@ declare namespace Office { Previous } /** - * Specifies whether to select (highlight) the location to navigate to (when using the {@link Office.Document.goToByIdAsync | Document.goToByIdAsync} method). + * Specifies whether to select (highlight) the location to navigate to (when using the {@link Office.Document | Document}.goToByIdAsync method). * * @remarks * @@ -1677,7 +1677,7 @@ declare namespace Office { * * *Supported hosts, by platform* * - * + * * * * @@ -3716,11 +3716,11 @@ declare namespace Office { */ interface TextBinding extends Binding { } /** - * Specifies the project fields that are available as a parameter for the {@link Office.Document.getProjectFieldAsync | getProjectFieldAsync} method. + * Specifies the project fields that are available as a parameter for the {@link Office.Document | Document}.getProjectFieldAsync method. * * @remarks * - * A ProjectProjectFields constant can be used as a parameter of the {@link Office.Document.getProjectFieldAsync | getProjectFieldAsync} method. + * A ProjectProjectFields constant can be used as a parameter of the {@link Office.Document | Document}.getProjectFieldAsync method. * * **Support details** * @@ -3786,10 +3786,10 @@ declare namespace Office { WSSList } /** - * Specifies the resource fields that are available as a parameter for the {@link Office.Document.getResourceFieldAsync | getResourceFieldAsync} method. + * Specifies the resource fields that are available as a parameter for the {@link Office.Document | Document}.getResourceFieldAsync method. * * @remarks - * A ProjectResourceFields constant can be used as a parameter of the {@link Office.Document.getResourceFieldAsync | getResourceFieldAsync} method. + * A ProjectResourceFields constant can be used as a parameter of the {@link Office.Document | Document}.getResourceFieldAsync method. * * For more information about working with fields in Project, see {@link https://support.office.com/article/Available-fields-reference-615a4563-1cc3-40f4-b66f-1b17e793a460 | Available fields} reference. In Project Help, search for Available fields. * @@ -4608,10 +4608,10 @@ declare namespace Office { Text9 } /** - * Specifies the task fields that are available as a parameter for the {@link Office.Document.getTaskFieldAsync | getTaskFieldAsync} method. + * Specifies the task fields that are available as a parameter for the {@link Office.Document | Document}.getTaskFieldAsync method. * * @remarks - * A ProjectTaskFields constant can be used as a parameter of the {@link Office.Document.getTaskFieldAsync | getTaskFieldAsync} method. + * A ProjectTaskFields constant can be used as a parameter of the {@link Office.Document | Document}.getTaskFieldAsync method. * * For more information about working with fields in Project, see the {@link https://support.office.com/article/Available-fields-reference-615a4563-1cc3-40f4-b66f-1b17e793a460 | Available fields} reference. In Project Help, search for Available fields. * @@ -5756,10 +5756,10 @@ declare namespace Office { WSSID } /** - * Specifies the types of views that the {@link Office.Document.getSelectedViewAsync | getSelectedViewAsync} method can recognize. + * Specifies the types of views that the {@link Office.Document | Document}.getSelectedViewAsync method can recognize. * * @remarks - * The {@link Office.Document.getSelectedViewAsync | getSelectedViewAsync} method returns the ProjectViewTypes constant value and name that corresponds to the active view. + * The {@link Office.Document | Document}.getSelectedViewAsync method returns the ProjectViewTypes constant value and name that corresponds to the active view. * * **Support details** * diff --git a/types/passport-saml/index.d.ts b/types/passport-saml/index.d.ts index 5e24211008..d9c86a9b23 100644 --- a/types/passport-saml/index.d.ts +++ b/types/passport-saml/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for passport-saml 0.15 // Project: https://github.com/bergie/passport-saml // Definitions by: Chris Barth +// Damian Assennato // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -62,6 +63,7 @@ export interface SamlConfig { cacheProvider?: CacheProvider; // Passport + name?: string; passReqToCallback?: boolean; // Logout diff --git a/types/passport-saml/passport-saml-tests.ts b/types/passport-saml/passport-saml-tests.ts index 45a3d18923..615c1b7320 100644 --- a/types/passport-saml/passport-saml-tests.ts +++ b/types/passport-saml/passport-saml-tests.ts @@ -5,6 +5,7 @@ import fs = require('fs'); const samlStrategy = new SamlStrategy.Strategy( { + name: 'samlCustomName', path: '/login/callback', entryPoint: 'https://openidp.feide.no/simplesaml/saml2/idp/SSOService.php', issuer: 'passport-saml', @@ -29,6 +30,6 @@ const samlStrategy = new SamlStrategy.Strategy( ); passport.use(samlStrategy); -passport.authenticate('saml', {failureRedirect: '/', failureFlash: true}); +passport.authenticate('samlCustomName', {failureRedirect: '/', failureFlash: true}); const metadata = samlStrategy.generateServiceProviderMetadata("decryptionCert"); diff --git a/types/proton-native/index.d.ts b/types/proton-native/index.d.ts index 62aa0dce25..e191c00698 100644 --- a/types/proton-native/index.d.ts +++ b/types/proton-native/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/kusti8/proton-native // Definitions by: Nguyen Xuan Khanh // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/ptomasroos__react-native-multi-slider/index.d.ts b/types/ptomasroos__react-native-multi-slider/index.d.ts index 572307b219..67c9106670 100644 --- a/types/ptomasroos__react-native-multi-slider/index.d.ts +++ b/types/ptomasroos__react-native-multi-slider/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/ptomasroos/react-native-multi-slider#readme // Definitions by: Edward Sammut Alessi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; import { ViewStyle } from "react-native"; diff --git a/types/qrcode.react/index.d.ts b/types/qrcode.react/index.d.ts index d38d8ce89b..01e8ef18af 100644 --- a/types/qrcode.react/index.d.ts +++ b/types/qrcode.react/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/zpao/qrcode.react // Definitions by: Mleko // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/radium/index.d.ts b/types/radium/index.d.ts index ce5ae3776a..6e46ce4ddd 100644 --- a/types/radium/index.d.ts +++ b/types/radium/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/formidablelabs/radium // Definitions by: Alex Gorbatchev , Philipp Holzer , Alexey Svetliakov , Mikael Hermansson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/rc-select/index.d.ts b/types/rc-select/index.d.ts index 5fdae43949..b78fc03837 100644 --- a/types/rc-select/index.d.ts +++ b/types/rc-select/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/react-component/select // Definitions by: Denis Tirilis // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/rc-slider/index.d.ts b/types/rc-slider/index.d.ts index 109819e20c..707f5425c5 100644 --- a/types/rc-slider/index.d.ts +++ b/types/rc-slider/index.d.ts @@ -5,7 +5,7 @@ // Austin Turner // Jacob Froman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; import { RCTooltip } from 'rc-tooltip'; diff --git a/types/rc-tooltip/index.d.ts b/types/rc-tooltip/index.d.ts index 9222d9f149..e752404f21 100644 --- a/types/rc-tooltip/index.d.ts +++ b/types/rc-tooltip/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: rhysd // ahstro // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/rc-tree/index.d.ts b/types/rc-tree/index.d.ts index 206f8abeaa..e2ac50d20d 100644 --- a/types/rc-tree/index.d.ts +++ b/types/rc-tree/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/react-component/tree // Definitions by: John Reilly , Methuselah96 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.7 +// TypeScript Version: 2.8 import { Component } from "react"; diff --git a/types/rdflib/index.d.ts b/types/rdflib/index.d.ts new file mode 100644 index 0000000000..f6e1c82ba7 --- /dev/null +++ b/types/rdflib/index.d.ts @@ -0,0 +1,1169 @@ +// Type definitions for rdflib 0.17 +// Project: https://github.com/linkeddata/rdflib.js +// Definitions by: Cénotélie +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Acknowledgements: This work has been financed by Logilab SA, FRANCE, logilab.fr + +/** + * Class orders + */ +export const ClassOrder: { + [id: string]: number; +}; +/** + * A type for values that serves as inputs + */ +export type ValueType = Node | Date | string | number | boolean | undefined; +/** + * The superclass of all RDF Statement objects, that is NamedNode, Literal, BlankNode, etc. + */ +export class Node { + /** + * The type of node + */ + termType: string; + /** + * Whether this node is a variable + */ + isVar: boolean; + /** + * The class order for this node + */ + classOrder: number; + /** + * The nod's value + */ + value: string; + /** + * Gets the substituted node for this one, according to the specified bindings + * @param bindings Bindings of identifiers to nodes + */ + substitute(bindings: { [id: string]: Node }): Node; + /** + * Compares this node with another + * @param term The other node + */ + compareTerm(term: Node): number; + /** + * Gets whether the two nodes are equal + * @param other The other node + */ + equals(other: Node): boolean; + /** + * Gets a hash for this node + */ + hashString(): string; + /** + * Gets whether this node is the same as the other one + * @param other Another node + */ + sameTerm(other: Node): boolean; + /** + * Gets the canonical string representation of this node + */ + toCanonical(): string; + /** + * Gets the n-triples string representation of this node + */ + toNT(): string; + /** + * Gets the string representation of this node + */ + toString(): string; + /** + * Gets a node for the specifed input + * @param value An input value + */ + static fromValue(value: ValueType): Node | ValueType; + /** + * Gets the javascript object equivalent to a node + * @param term The RDF node + */ + static toJS(term: Node): any; +} +/** + * An empty node + */ +export class Empty extends Node { + constructor(); + static termType: string; +} +/** + * A collection of other RDF nodes + */ +export class Collection extends Node { + /** + * The identifier for this collection + */ + id: string; + /** + * The nodes in this collection + */ + elements: Node[]; + /** + * Whether this collection is closed + */ + closed: boolean; + /** + * Initializes this collection + * @param initial The initial elements + */ + constructor(initial: ReadonlyArray); + /** + * Appends an element to this collection + * @param element The new element + */ + append(element: Node): number; + /** + * Closes this collection + */ + close(): boolean; + /** + * Removes the first element from the collection (and return it) + */ + shift(): Node; + /** + * Preprends the specified element to the colelction's front + * @param element The element to preprend + */ + unshift(element: Node): number; + static termType: string; +} +/** + * An RDF blank node + */ +export class BlankNode extends Node { + /** + * The identifier for the blank node + */ + id: string; + /** + * Whether this is a blank node + */ + isBlank: boolean; + /** + * Initializes this node + * @param id The identifier for the blank node + */ + constructor(id: string); + /** + * Gets a copy of this blank node in the specified formula + * @param formula The formula + */ + copy(formula: Formula): BlankNode; + /** + * The next unique identifier for blank nodes + */ + static nextId: number; + static termType: string; + static NTAnonymousNodePrefix: string; +} +/** + * A named (IRI) RDF node + */ +export class NamedNode extends Node { + /** + * The URI for this node + */ + uri: string; + /** + * Initializes this node + * @param iri The IRI for this node + */ + constructor(iri: NamedNode | string); + /** + * Returns an RDF node for the containing directory, ending in slash. + */ + dir(): NamedNode; + /** + * Returns an named node for the whole web site, ending in slash. + * Contrast with the "origin" which does NOT have a trailing slash + */ + site(): NamedNode; + /** + * Gets the named node for the document + */ + doc(): NamedNode; + static termType: string; + /** + * Gets a named node from the specified input value + * @param value An input value + */ + static fromValue(value: ValueType): NamedNode | ValueType; +} +/** + * A RDF literal node + */ +export class Literal extends Node { + /** + * The language for the literal + */ + lang: string; + /** + * The language for the literal + */ + language: string; + /** + * The literal's datatype as a named node + */ + datatype: NamedNode; + /** + * Initializes this literal + * @param value The literal's lexical value + * @param language The language for the literal + * @param datatype The literal's datatype as a named node + */ + constructor(value: string, language: string, datatype: NamedNode); + /** + * Gets a copy of this literal + */ + copy(): Literal; + static termType: string; + /** + * Builds a literal node from a boolean value + * @param value The value + */ + static fromBoolean(value: boolean): Literal; + /** + * Builds a literal node from a date value + * @param value The value + */ + static fromDate(value: Date): Literal; + /** + * Builds a literal node from a number value + * @param value The value + */ + static fromNumber(value: number): Literal; + /** + * Builds a literal node from an input value + * @param value The input value + */ + static fromValue(value: ValueType): Literal | ValueType; +} +/** + * Variables are placeholders used in patterns to be matched. + * In cwm they are symbols which are the formula's list of quantified variables. + * In sparql they are not visibly URIs. Here we compromise, by having + * a common special base URI for variables. Their names are uris, + * but the ? notation has an implicit base uri of 'varid:' + */ +export class Variable extends Node { + /** + * The base string for a variable's name + */ + base: string; + /** + * The unique identifier of this variable + */ + uri: string; + /** + * Initializes this variable + * @param name The variable's name + */ + constructor(name: string); + static termType: string; +} +/** + * The RDF default graph + */ +export class DefaultGraph extends Node { + /** + * Initializes this graph + */ + constructor(); +} +export namespace uri { + /** + * Gets the document part of an URI + * @param uri The URI + */ + function docpart(uri: string): string; + /** + * Gets the document part of an URI as a named node + * @param x The URI + */ + function document(x: string): NamedNode; + /** + * Gets the hostname in an URI + * @param u The URI + */ + function hostpart(u: string): string; + /** + * Joins an URI with a base + * @param given The relative part + * @param base The base URI + */ + function join(given: string, base: string): string; + /** + * Gets the protocol part of an URI + * @param uri The URI + */ + function protocol(uri: string): string; + /** + * Gets a relative uri + * @param base The base URI + * @param uri The absolute URI + */ + function refTo(base: string, uri: string): string; +} +export namespace log { + /** + * Logs a debug event + * @param x The event + */ + function debug(x: any): void; + /** + * Logs a warning event + * @param x The event + */ + function warn(x: any): void; + /** + * Logs an information event + * @param x The event + */ + function info(x: any): void; + /** + * Logs an error event + * @param x The event + */ + function error(x: any): void; + /** + * Logs a success event + * @param x The event + */ + function success(x: any): void; + /** + * Logs a message event + * @param x The event + */ + function msg(x: any): void; +} +/** + * An RDF statement (subject, predicate, object) + */ +export class Statement { + /** + * The statement's subject + */ + subject: Node; + /** + * The statement's predicate + */ + predicate: Node; + /** + * The statement's object + */ + object: Node; + /** + * The origin of this statement + */ + why: ValueType; + /** + * The graph the contains this statement + */ + graph: ValueType; + /** + * Initializes this statement + * @param subject The statement's subject + * @param predicate The statement's predicate + * @param object The statement's object + * @param graph The graph the contains this statement + */ + constructor( + subject: ValueType, + predicate: ValueType, + object: ValueType, + graph: ValueType + ); + /** + * Gets whether two statements are the same + * @param other The other statement + */ + equals(other: Statement): boolean; + /** + * Gets this statement with the bindings substituted + * @param bindings The bindings + */ + substitute(bindings: { [id: string]: Node }): Statement; + /** + * Gets the canonical string representation of this statement + */ + toCanonical(): string; + /** + * Gets the n-triples string representation of this statement + */ + toNT(): string; + /** + * Gets the string representation of this statement + */ + toString(): string; +} +export namespace convert { + /** + * Converts an n3 string to JSON + * @param n3String The n3 string + * @param jsonCallback Callback when the operation terminated + */ + function convertToJson( + n3String: string, + jsonCallback: (err: string, jsonString: string) => void + ): void; + /** + * Converts an n3 string to n-quads + * @param n3String The n3 string + * @param nquadCallback Callback when the operation terminated + */ + function convertToNQuads( + n3String: string, + nquadCallback: (err: string, nquadString: string) => void + ): void; +} +/** + * A formula, or store of RDF statements + */ +export class Formula extends Node { + /** + * The stored statements + */ + statements: Statement[]; + /** + * Initializes this formula + * @param statements The initial statements in this formulat + * @param constraints The additional constraints + * @param initBindings The initial bindings + * @param optional + */ + constructor( + statements: ReadonlyArray, + constraints: ReadonlyArray, + initBindings: { + [id: string]: Node; + }, + optional: ReadonlyArray + ); + /** + * Adds a statement to this formula + * @param s The subject + * @param p The predicate + * @param o The object + * @param g The graph that contains the statement + */ + add(s: ValueType, p: ValueType, o: ValueType, g: ValueType): number; + /** + * Adds a statement to this formula + * @param st The statement to add + */ + addStatement(st: Statement): number; + /** + * Gets a node that matches the specified pattern + * @param s The subject + * @param p The predicate + * @param o The object + * @param g The graph that contains the statement + */ + any(s: ValueType, p: ValueType, o: ValueType, g: ValueType): Node; + /** + * Gets a blank node + * @param id The node's identifier + */ + bnode(id: string): BlankNode; + /** + * Finds the types in the list which have no *stored* subtypes + * These are a set of classes which provide by themselves complete + * information -- the other classes are redundant for those who + * know the class DAG. + * @param types A map of the types + */ + bottomTypeURIs(types: { + [id: string]: string | NamedNode; + }): { + [id: string]: string | NamedNode; + }; + /** + * Gets a new collection + */ + collection(): Collection; + /** + * Gets each node that matches the specified pattern + * @param s The subject + * @param p The predicate + * @param o The object + * @param g The graph that contains the statement + */ + each(s: ValueType, p: ValueType, o: ValueType, g: ValueType): Node[]; + /** + * Gets whether this formula is equals to the other one + * @param other The other formula + */ + equals(other: Formula): boolean; + /** + * For thisClass or any subclass, anything which has it is its type + * or is the object of something which has the type as its range, or subject + * of something which has the type as its domain + * We don't bother doing subproperty (yet?)as it doesn't seeem to be used + * much. + * Get all the Classes of which we can RDFS-infer the subject is a member + * @param thisClass A named node + */ + findMembersNT( + thisClass: Node + ): { + [uri: string]: Statement; + }; + /** + * For thisClass or any subclass, anything which has it is its type + * or is the object of something which has the type as its range, or subject + * of something which has the type as its domain + * We don't bother doing subproperty (yet?)as it doesn't seeem to be used + * much. + * Get all the Classes of which we can RDFS-infer the subject is a member + * @param subject A named node + */ + findMemberURIs( + subject: Node + ): { + [uri: string]: Statement; + }; + /** + * Get all the Classes of which we can RDFS-infer the subject is a superclass + * Returns a hash table where key is NT of type and value is statement why we + * think so. + * Does NOT return terms, returns URI strings. + * We use NT representations in this version because they handle blank nodes. + * @param subject A subject node + */ + findSubClassesNT( + subject: Node + ): { + [uri: string]: boolean; + }; + /** + * Get all the Classes of which we can RDFS-infer the subject is a subclass + * Returns a hash table where key is NT of type and value is statement why we + * think so. + * Does NOT return terms, returns URI strings. + * We use NT representations in this version because they handle blank nodes. + * @param subject A subject node + */ + findSuperClassesNT( + subject: Node + ): { + [uri: string]: boolean; + }; + /** + * Get all the Classes of which we can RDFS-infer the subject is a member + * todo: This will loop is there is a class subclass loop (Sublass loops are + * not illegal) + * Returns a hash table where key is NT of type and value is statement why we + * think so. + * Does NOT return terms, returns URI strings. + * We use NT representations in this version because they handle blank nodes. + * @param subject A subject node + */ + findTypesNT( + subject: Node + ): { + [uri: string]: boolean; + }; + /** + * Get all the Classes of which we can RDFS-infer the subject is a member + * todo: This will loop is there is a class subclass loop (Sublass loops are + * not illegal) + * Returns a hash table where key is NT of type and value is statement why we + * think so. + * Does NOT return terms, returns URI strings. + * We use NT representations in this version because they handle blank nodes. + * @param subject A subject node + */ + findTypeURIs( + subject: Node + ): { + [uri: string]: boolean; + }; + /** + * Trace the statements which connect directly, or through bnodes + * Returns an array of statements + * doc param may be null to search all documents in store + * @param subject A subject node + * @param doc A document (the graph that contains statements) + * @param excludePredicateURIs The predicate URIs to exclude + */ + connectedStatements( + subject: Node, + doc: ValueType, + excludePredicateURIs: ReadonlyArray + ): Statement[]; + /** + * Creates a new empty formula + */ + formula(): Formula; + /** + * Creates a new empty indexed formulat + * @param features The list of features + */ + formula(features: ReadonlyArray): IndexedFormula; + /** + * Transforms an NTriples string format into a Node. + * The bnode bit should not be used on program-external values; designed + * for internal work such as storing a bnode id in an HTML attribute. + * This will only parse the strings generated by the vaious toNT() methods. + * @param str A string representation + */ + fromNT(str: string): Node; + /** + * Gets whether this formula holds the specified statement + * @param s A subject + * @param p A predicate + * @param o An object + * @param g A containing graph + */ + holds(s: ValueType, p: ValueType, o: ValueType, g: ValueType): boolean; + /** + * Gets whether this formula holds the specified statement + * @param s A statement + */ + holds(s: Statement | ReadonlyArray): boolean; + /** + * Gets whether this formula holds the specified statement + * @param st A statement + */ + holdsStatement(st: Statement): boolean; + /** + * Gets a collection from a list of values + * @param values The values + */ + list(values: Iterable): Collection; + /** + * Gets a literal node + * @param val The literal's lexical value + * @param lang The language + * @param dt The datatype as a named node + */ + literal(val: string, lang: string, dt: NamedNode): Literal; + /** + * Transform a collection of NTriple URIs into their URI strings + * @param t some iterable colletion of NTriple URI strings + * @return a collection of the URIs as strings + */ + NTtoURI(t: { + [uri: string]: any; + }): { + [uri: string]: any; + }; + /** + * Serializes this formula + * @param base The base string + * @param contentType The content type of the syntax to use + * @param provenance The provenance URI + */ + serialize(base: string, contentType: string, provenance: string): string; + /** + * Gets a new formula with the substituting bindings applied + * @param bindings The bindings to substitute + */ + substitute(bindings: { [id: string]: Node }): Formula; + /** + * Gets an named node for an URI + * @param uri The URI + */ + sym(uri: string | NamedNode): NamedNode; + /** + * Gets the node matching the specified pattern + * @param s The subject + * @param p The predicate + * @param o The object + * @param g The graph that contains the statement + */ + the(s: ValueType, p: ValueType, o: ValueType, g: ValueType): Node; + /** + * RDFS Inference + * These are hand-written implementations of a backward-chaining reasoner + * over the RDFS axioms. + * @param seeds A hash of NTs of classes to start with + * @param predicate The property to trace though + * @param inverse Trace inverse direction + */ + transitiveClosure( + seeds: { + [uri: string]: boolean; + }, + predicate: Node, + inverse: Node + ): { + [uri: string]: boolean; + }; + /** + * Finds the types in the list which have no *stored* supertypes + * We exclude the universal class, owl:Things and rdf:Resource, as it is + * information-free. + * @param types The types + */ + topTypeURIs(types: { + [id: string]: string | NamedNode; + }): { + [id: string]: string | NamedNode; + }; + /** + * Gets the number of statements in this formulat that matches the specified pattern + * @param s The subject + * @param p The predicate + * @param o The object + * @param g The graph that contains the statement + */ + whether(s: ValueType, p: ValueType, o: ValueType, g: ValueType): number; + /** + * Serializes this formulat to a string + */ + toString(): string; + /** + * Gets a namespace for the specified namespace's URI + * @param nsuri The URI for the namespace + */ + ns(nsuri: string): (ln: string) => NamedNode; + /** + * Gets a new variable + * @param name The variable's name + */ + variable(name: string): Variable; + static termType: string; +} +/** + * A formula (set of triples) which indexes by predicate, subject and object. + * It "smushes" (merges into a single node) things which are identical + * according to owl:sameAs or an owl:InverseFunctionalProperty + * or an owl:FunctionalProperty + */ +export class IndexedFormula extends Formula { + /** + * The number of statements in this formula + */ + length: number; + /** + * Creates a new formula + * @param features The list of features to support + */ + constructor(features: ReadonlyArray); + /** + * Gets the URI of the default graph + */ + static defaultGraphURI(): string; + /** + * Gets the statements matching the specified pattern + * @param subj The subject + * @param pred The predicate + * @param obj The object + * @param why The graph that contains the statement + * @param justOne Whether to only get one statement + */ + statementsMatching( + subj: Node, + pred: Node, + obj: Node, + why: Node, + justOne: boolean + ): Statement[]; + /** + * Adds all the statements to this formula + * @param statements A collection of statements + */ + addAll(statements: Iterable): void; + /** + * Gets the value of a node that matches the specified pattern + * @param s The subject + * @param p The predicate + * @param o The object + * @param g The graph that contains the statement + */ + anyValue(s: ValueType, p: ValueType, o: ValueType, g: ValueType): string; + /** + * Returns the symbol with canonical URI as smushed + * @param term A RDF node + */ + canon(term: Node): Node; + /** + * Checks this formula for consistency + */ + check(): void; + /** + * Checks a list of statements for consistency + * @param sts The list of statements to check + * @param from An index with the array ['subject', 'predicate', 'object', 'why'] + */ + checkStatementList(sts: ReadonlyArray, from: number): boolean; + /** + * Closes this formula (and return it) + */ + close(): IndexedFormula; + /** + * Simplify graph in store when we realize two identifiers are equivalent + * We replace the bigger with the smaller. + * @param u1 The first node + * @param u2 The second node + */ + equate(u1: Node, u2: Node): boolean; + /** + * eturns any quads matching the given arguments. + * Standard RDFJS Taskforce method for Source objects, implemented as an + * alias to `statementsMatching()` + * @param subject The subject + * @param predicate The predicate + * @param object The object + * @param graph The graph that contains the statement + */ + match( + subject: ValueType, + predicate: ValueType, + object: ValueType, + graph: ValueType + ): Statement[]; + /** + * Find out whether a given URI is used as symbol in the formula + * @param uri The URI to look for + */ + mentionsURI(uri: string): boolean; + /** + * Existentials are BNodes - something exists without naming + * @param uri An URI + */ + newExistential(uri: string): Node; + /** + * Creates a new universal node + * Universals are Variables + * @param uri An URI + */ + newUniversal(uri: string): Node; + /** + * Find an unused id for a file being edited: return a symbol + * (Note: Slow iff a lot of them -- could be O(log(k)) ) + * @param doc A document named node + */ + nextSymbol(doc: NamedNode): NamedNode; + /** + * Removes a statement from this formula + * @param st A statement to remove + */ + remove(st: Statement): IndexedFormula; + /** + * Removes all statemnts in a doc + * @param doc The document + */ + removeDocument(doc: NamedNode): IndexedFormula; + /** + * Remove all statements matching args (within limit) * + * @param subj The subject + * @param pred The predicate + * @param obj The object + * @param why The graph that contains the statement + * @param limit The number of statements to remove + */ + removeMany( + subj: Node, + pred: Node, + obj: Node, + why: Node, + limit: number + ): void; + /** + * Remove all matching statements + * @param subject The subject + * @param predicate The predicate + * @param object The object + * @param graph The graph that contains the statement + */ + removeMatches( + subject: ValueType, + predicate: ValueType, + object: ValueType, + graph: ValueType + ): void; + /** + * Removes a statement + * @param st The statement to remove + */ + removeStatement(st: Statement): Formula; + /** + * Removes statements + * @param sts The statements to remove + */ + removeStatements(sts: ReadonlyArray): Formula; + /** + * Return all equivalent URIs by which this is known + * @param x A named node + */ + allAliases(x: NamedNode): NamedNode[]; + /** + * Compare by canonical URI as smushed + * @param x A named node + * @param y Another named node + */ + sameThings(x: NamedNode, y: NamedNode): boolean; + /** + * A list of all the URIs by which this thing is known + * @param term + */ + uris(term: NamedNode): string[]; +} +export namespace DataFactory { + /** + * Creates a new blank node + * @param value The blank node's identifier + */ + function blankNode(value: string): BlankNode; + /** + * Creates a new collection + * @param elements The initial element + */ + function collection(elements: ReadonlyArray): Collection; + /** + * Gets the default graph + */ + function defaultGraph(): DefaultGraph; + /** + * Creates a new fetcher + * @param store The store to use + * @param options The options + */ + function fetcher(store: Formula, options: any): Fetcher; + /** + * Creates a new graph (store) + */ + function graph(): IndexedFormula; + /** + * Creates a new literal node + * @param val The lexical value + * @param lang The language + * @param dt The datatype + */ + function lit(val: string, lang: string, dt: NamedNode): Literal; + /** + * Creates a new literal node + * @param value The lexical value + * @param languageOrDatatype Either the language or the datatype + */ + function literal( + value: string, + languageOrDatatype: string | NamedNode + ): Literal; + /** + * Creates a new named node + * @param value The new named node + */ + function namedNode(value: string): NamedNode; + /** + * Creates a new statement + * @param subject The subject + * @param predicate The predicate + * @param object The object + * @param graph The containing graph + */ + function quad( + subject: Node, + predicate: Node, + object: Node, + graph: Node + ): Statement; + /** + * Creates a new statement + * @param subject The subject + * @param predicate The predicate + * @param object The object + * @param graph The containing graph + */ + function st( + subject: Node, + predicate: Node, + object: Node, + graph: Node + ): Statement; + /** + * Creates a new statement + * @param subject The subject + * @param predicate The predicate + * @param object The object + */ + function triple(subject: Node, predicate: Node, object: Node): Statement; + /** + * Creates a new variable + * @param name The name for the variable + */ + function variable(name: string): Variable; +} +export namespace Util { + /** + * Gets a named node for a media type + * @param mediaType A media type + */ + function mediaTypeClass(mediaType: string): NamedNode; + /** + * Gets a named node from the name of a relation + * @param relation The name of a relation + */ + function linkRelationProperty(relation: string): NamedNode; + /** + * Loads ontologies of the data we load (this is the callback from the kb to + * the fetcher). Exports as `AJAR_handleNewTerm` + * @param kb The store + * @param p A property + * @param requestedBy + */ + function AJAR_handleNewTerm( + kb: Formula, + p: NamedNode, + requestedBy: string + ): Promise; +} +/** + * A datatype-specific handler for fetching data + */ +export interface Handler { + response: any; + dom: any; +} +/** + * Responsible for fetching RDF data + */ +export class Fetcher { + store: any; + timeout: number; + appNode: BlankNode; + requested: { + [uri: string]: any; + }; + timeouts: any; + redirectedTo: any; + constructor(store: any, options: any); + static HANDLERS: { + RDFXMLHandler: Handler; + XHTMLHandler: Handler; + XMLHandler: Handler; + HTMLHandler: Handler; + TextHandler: Handler; + N3Handler: Handler; + }; + static CONTENT_TYPE_BY_EXT: { + [ext: string]: string; + }; +} +/** + * Gets a node for the specified input + * @param value An input value + */ +export function term(value: ValueType): Node | Collection | ValueType; +/** + * Gets a namespace + * @param nsuri The URI for the namespace + */ +export function Namespace(nsuri: string): (ln: string) => NamedNode; +/** + * Transforms an NTriples string format into a Node. + * The bnode bit should not be used on program-external values; designed + * for internal work such as storing a bnode id in an HTML attribute. + * This will only parse the strings generated by the vaious toNT() methods. + * @param str A string representation + */ +export function fromNT(str: string): Node; +/** + * Creates a new fetcher + * @param store The store to use + * @param options The options + */ +export function fetcher(store: Formula, options: any): Fetcher; +/** + * Creates a new graph (store) + */ +export function graph(): IndexedFormula; +/** + * Creates a new literal node + * @param val The lexical value + * @param lang The language + * @param dt The datatype + */ +export function lit(val: string, lang: string, dt: NamedNode): Literal; +/** + * Creates a new statement + * @param subject The subject + * @param predicate The predicate + * @param object The object + * @param graph The containing graph + */ +export function st( + subject: Node, + predicate: Node, + object: Node, + graph: Node +): Statement; +/** + * Creates a new named node + * @param value The new named node + */ +export function sym(value: string): NamedNode; +/** + * Creates a new variable + * @param name The name for the variable + */ +export function variable(name: string): Variable; +/** + * Creates a new blank node + * @param value The blank node's identifier + */ +export function blankNode(value: string): BlankNode; +/** + * Gets the default graph + */ +export function defaultGraph(): DefaultGraph; +/** + * Creates a new literal node + * @param value The lexical value + * @param languageOrDatatype Either the language or the datatype + */ +export function literal( + value: string, + languageOrDatatype: string | NamedNode +): Literal; +/** + * Creates a new named node + * @param value The new named node + */ +export function namedNode(value: string): NamedNode; +/** + * Creates a new statement + * @param subject The subject + * @param predicate The predicate + * @param object The object + * @param graph The containing graph + */ +export function quad( + subject: Node, + predicate: Node, + object: Node, + graph: Node +): Statement; +/** + * Creates a new statement + * @param subject The subject + * @param predicate The predicate + * @param object The object + */ +export function triple(subject: Node, predicate: Node, object: Node): Statement; +/** + * Parse a string and put the result into the graph kb. + * Normal method is sync. + * Unfortunately jsdonld is currently written to need to be called async. + * Hence the mess below with executeCallback. + * @param str The input string to parse + * @param kb The store to use + * @param base The base URI to use + * @param contentType The content type for the input + * @param callback The callback to call when the data has been loaded + */ +export function parse( + str: string, + kb: Formula, + base: string, + contentType: string, + callback: (error: any, kb: Formula) => void +): void; +/** + * Get the next available unique identifier + */ +export let NextId: number; diff --git a/types/rdflib/rdflib-tests.ts b/types/rdflib/rdflib-tests.ts new file mode 100644 index 0000000000..fecd177d47 --- /dev/null +++ b/types/rdflib/rdflib-tests.ts @@ -0,0 +1,17 @@ +import * as $rdf from "rdflib"; + +const store = $rdf.graph(); +$rdf.parse( + "some inline rdf data", + store, + "http://example.com", + "text/n3", + (x, y) => {} +); +const node = store.any( + $rdf.sym("http://example.com/subject"), + $rdf.sym("http://example.com/property"), + undefined, + undefined +); +const value = node.value; diff --git a/types/rdflib/tsconfig.json b/types/rdflib/tsconfig.json new file mode 100644 index 0000000000..6c84dd0e59 --- /dev/null +++ b/types/rdflib/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", + "rdflib-tests.ts" + ] +} \ No newline at end of file diff --git a/types/rdflib/tslint.json b/types/rdflib/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/rdflib/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/react-albus/index.d.ts b/types/react-albus/index.d.ts index dabdb4b81a..d9d6b5ff99 100644 --- a/types/react-albus/index.d.ts +++ b/types/react-albus/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/americanexpress/react-albus#readme // Definitions by: Sindre Seppola // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; import { History } from "history"; diff --git a/types/react-alert/index.d.ts b/types/react-alert/index.d.ts index 9150bf28b4..3814b7f29f 100644 --- a/types/react-alert/index.d.ts +++ b/types/react-alert/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/schiehll/react-alert // Definitions by: Steve Syrell // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-alice-carousel/index.d.ts b/types/react-alice-carousel/index.d.ts index 2d40293003..e3002f1193 100644 --- a/types/react-alice-carousel/index.d.ts +++ b/types/react-alice-carousel/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/maxmarinich/react-alice-carousel // Definitions by: endigo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-animate-on-scroll/index.d.ts b/types/react-animate-on-scroll/index.d.ts index 6584833cbe..6750cd8200 100644 --- a/types/react-animate-on-scroll/index.d.ts +++ b/types/react-animate-on-scroll/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/dbramwell/react-animate-on-scroll // Definitions by: Ricardo Albuquerque // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-app/index.d.ts b/types/react-app/index.d.ts index 7c5e00f57a..5315874ddd 100644 --- a/types/react-app/index.d.ts +++ b/types/react-app/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/kriasoft/react-app#readme // Definitions by: Prakarsh Pandey // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-aria-menubutton/index.d.ts b/types/react-aria-menubutton/index.d.ts index f7a4ef7de0..3bfc68259e 100644 --- a/types/react-aria-menubutton/index.d.ts +++ b/types/react-aria-menubutton/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Muhammad Fawwaz Orabi // Chris Rohlfs // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-autocomplete/index.d.ts b/types/react-autocomplete/index.d.ts index 0de7cd7eac..fd0bdc8b8a 100644 --- a/types/react-autocomplete/index.d.ts +++ b/types/react-autocomplete/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/reactjs/react-autocomplete // Definitions by: Lee Standen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, ChangeEvent, ReactNode, CSSProperties, HTMLProps } from 'react'; diff --git a/types/react-autosuggest/index.d.ts b/types/react-autosuggest/index.d.ts index ab91481925..bd20cc3c0a 100644 --- a/types/react-autosuggest/index.d.ts +++ b/types/react-autosuggest/index.d.ts @@ -7,7 +7,7 @@ // Christopher Deutsch // Kevin Ross // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-avatar-editor/index.d.ts b/types/react-avatar-editor/index.d.ts index 9f9ede1ea3..c2aebc5e63 100644 --- a/types/react-avatar-editor/index.d.ts +++ b/types/react-avatar-editor/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Diogo Corrêa // Gabriel Prates // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-beautiful-dnd/index.d.ts b/types/react-beautiful-dnd/index.d.ts index 3cb5e026f8..780a854751 100644 --- a/types/react-beautiful-dnd/index.d.ts +++ b/types/react-beautiful-dnd/index.d.ts @@ -5,7 +5,7 @@ // Austin Turner // Mark Nelissen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-big-calendar/index.d.ts b/types/react-big-calendar/index.d.ts index 9275511fc9..60db9a20f9 100644 --- a/types/react-big-calendar/index.d.ts +++ b/types/react-big-calendar/index.d.ts @@ -5,7 +5,7 @@ // Krzysztof Bezrąk // Sebastian Silbermann // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.7 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-body-classname/index.d.ts b/types/react-body-classname/index.d.ts index 23aa8d6f78..11dd7febeb 100644 --- a/types/react-body-classname/index.d.ts +++ b/types/react-body-classname/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/PactCoffee/react-body-classname // Definitions by: Mohamed Hegazy // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-bootstrap-date-picker/index.d.ts b/types/react-bootstrap-date-picker/index.d.ts index 96971cc0bb..9fdd94f2fb 100644 --- a/types/react-bootstrap-date-picker/index.d.ts +++ b/types/react-bootstrap-date-picker/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/pushtell/react-bootstrap-date-picker#readme // Definitions by: Karol Janyst , Antal Bodnar // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ComponentClass, StatelessComponent, ReactNode, FocusEventHandler, HTMLAttributes } from "react"; diff --git a/types/react-bootstrap-daterangepicker/index.d.ts b/types/react-bootstrap-daterangepicker/index.d.ts index 26fb15f45a..b9ef9a955b 100644 --- a/types/react-bootstrap-daterangepicker/index.d.ts +++ b/types/react-bootstrap-daterangepicker/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/skratchdot/react-bootstrap-daterangepicker // Definitions by: Ian Ker-Seymer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// /// diff --git a/types/react-bootstrap-table/index.d.ts b/types/react-bootstrap-table/index.d.ts index d98dac1c44..1284162778 100644 --- a/types/react-bootstrap-table/index.d.ts +++ b/types/react-bootstrap-table/index.d.ts @@ -6,7 +6,7 @@ // Janeene Beeforth // Oscar Andersson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 // documentation taken from http://allenfang.github.io/react-bootstrap-table/docs.html diff --git a/types/react-bootstrap-table/v2/index.d.ts b/types/react-bootstrap-table/v2/index.d.ts index 5ac31a4a77..07d7da53d9 100644 --- a/types/react-bootstrap-table/v2/index.d.ts +++ b/types/react-bootstrap-table/v2/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/AllenFang/react-bootstrap-table // Definitions by: Frank Laub , Aleksander Lode , Josué Us // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-bootstrap-typeahead/index.d.ts b/types/react-bootstrap-typeahead/index.d.ts index ad64d0941a..fa970bc5b3 100644 --- a/types/react-bootstrap-typeahead/index.d.ts +++ b/types/react-bootstrap-typeahead/index.d.ts @@ -4,7 +4,7 @@ // Rajab Shakirov // Paito Anderson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 // TODO: , , , components import * as React from 'react'; diff --git a/types/react-breadcrumbs-dynamic/index.d.ts b/types/react-breadcrumbs-dynamic/index.d.ts index ed0521ec28..491157b655 100644 --- a/types/react-breadcrumbs-dynamic/index.d.ts +++ b/types/react-breadcrumbs-dynamic/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/oklas/react-breadcrumbs-dynamic // Definitions by: mitsuruog // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-breadcrumbs/index.d.ts b/types/react-breadcrumbs/index.d.ts index d43b5ba81c..3aa1cc3670 100644 --- a/types/react-breadcrumbs/index.d.ts +++ b/types/react-breadcrumbs/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/svenanders/react-breadcrumbs // Definitions by: Kostya Esmukov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; import * as ReactRouter from "react-router"; diff --git a/types/react-broadcast/index.d.ts b/types/react-broadcast/index.d.ts index 8a9a3bf47b..11b2312570 100644 --- a/types/react-broadcast/index.d.ts +++ b/types/react-broadcast/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/ReactTraining/react-broadcast // Definitions by: Jaga Santagostino // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-burger-menu/index.d.ts b/types/react-burger-menu/index.d.ts index 51aec4fcd1..85d49494c2 100644 --- a/types/react-burger-menu/index.d.ts +++ b/types/react-burger-menu/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/negomi/react-burger-menu // Definitions by: Rajab Shakirov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-bytesize-icons/index.d.ts b/types/react-bytesize-icons/index.d.ts index d9dd1a50f7..de9d8e0f69 100644 --- a/types/react-bytesize-icons/index.d.ts +++ b/types/react-bytesize-icons/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/abdelhai/react-bytesize-icons // Definitions by: rhysd // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-calendar-heatmap/index.d.ts b/types/react-calendar-heatmap/index.d.ts index 9f85b5bd2f..a4dbf402a5 100644 --- a/types/react-calendar-heatmap/index.d.ts +++ b/types/react-calendar-heatmap/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/patientslikeme/react-calendar-heatmap // Definitions by: Keisuke Kan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-calendar-timeline/index.d.ts b/types/react-calendar-timeline/index.d.ts index 2ff17f6a82..cf97e70f50 100644 --- a/types/react-calendar-timeline/index.d.ts +++ b/types/react-calendar-timeline/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Rajab Shakirov // Alex Maclean // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-cartographer/index.d.ts b/types/react-cartographer/index.d.ts index 918fcbef81..646ca5de0e 100644 --- a/types/react-cartographer/index.d.ts +++ b/types/react-cartographer/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/yahoo/react-cartographer // Definitions by: Tre`Von McKay // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import Map from './lib/components/Map'; export { diff --git a/types/react-circular-progressbar/index.d.ts b/types/react-circular-progressbar/index.d.ts index dc6e1a1950..f93a64c8e9 100644 --- a/types/react-circular-progressbar/index.d.ts +++ b/types/react-circular-progressbar/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/iqnivek/react-circular-progressbar#readme // Definitions by: Lee Standen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, CSSProperties } from 'react'; diff --git a/types/react-click-outside/index.d.ts b/types/react-click-outside/index.d.ts index 5a1ce6d220..c09dccb155 100644 --- a/types/react-click-outside/index.d.ts +++ b/types/react-click-outside/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/kentor/react-click-outside // Definitions by: Christian Rackerseder // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; declare function enhanceWithClickOutside

(wrappedComponent: React.ComponentClass

): React.ComponentClass

; diff --git a/types/react-codemirror/index.d.ts b/types/react-codemirror/index.d.ts index 607554b269..1afe6362c9 100644 --- a/types/react-codemirror/index.d.ts +++ b/types/react-codemirror/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Vicky Lai // Rudi Chen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// /// diff --git a/types/react-collapse/index.d.ts b/types/react-collapse/index.d.ts index a4061860ba..c960fcd825 100644 --- a/types/react-collapse/index.d.ts +++ b/types/react-collapse/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/nkbt/react-collapse // Definitions by: Adam Binford // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; export interface CollapseProps extends React.HTMLProps { diff --git a/types/react-collapsible/index.d.ts b/types/react-collapsible/index.d.ts index ad56aba34e..def932f6ba 100644 --- a/types/react-collapsible/index.d.ts +++ b/types/react-collapsible/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/glennflanagan/react-collapsible#readme // Definitions by: knegusen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; export interface CollapsibleProp { diff --git a/types/react-color/index.d.ts b/types/react-color/index.d.ts index a1fbbad698..a49d7b6035 100644 --- a/types/react-color/index.d.ts +++ b/types/react-color/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/casesandberg/react-color/ // Definitions by: Karol Janyst , Marks Polakovs , Matthieu Montaudouin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ComponentClass, ClassAttributes, StatelessComponent, ReactNode } from "react"; diff --git a/types/react-confirm/index.d.ts b/types/react-confirm/index.d.ts index d07a367eab..532ac1768b 100644 --- a/types/react-confirm/index.d.ts +++ b/types/react-confirm/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/haradakunihiko/react-confirm // Definitions by: santiagodoldan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-content-loader/index.d.ts b/types/react-content-loader/index.d.ts index 23b0ad02c3..c395fc8a34 100644 --- a/types/react-content-loader/index.d.ts +++ b/types/react-content-loader/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Alaa Masoud // Sam Walsh // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-copy-to-clipboard/index.d.ts b/types/react-copy-to-clipboard/index.d.ts index 33e9549d30..a09d7bc8be 100644 --- a/types/react-copy-to-clipboard/index.d.ts +++ b/types/react-copy-to-clipboard/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Meno Abels // Bernabe // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-credit-cards/index.d.ts b/types/react-credit-cards/index.d.ts index bc9a8fbf51..da41f6f05e 100644 --- a/types/react-credit-cards/index.d.ts +++ b/types/react-credit-cards/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/amarofashion/react-credit-cards // Definitions by: Vytautas Strimaitis // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.7 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-cropper/index.d.ts b/types/react-cropper/index.d.ts index 3ab1106754..843cd50683 100644 --- a/types/react-cropper/index.d.ts +++ b/types/react-cropper/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/roadmanfong/react-cropper // Definitions by: Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as cropperjs from 'cropperjs'; import * as React from 'react'; diff --git a/types/react-css-modules/index.d.ts b/types/react-css-modules/index.d.ts index 955f76efa5..56b219728e 100644 --- a/types/react-css-modules/index.d.ts +++ b/types/react-css-modules/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/gajus/react-css-modules // Definitions by: Kostya Esmukov , Tadas Dailyda // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 interface TypeOptions { allowMultiple?: boolean; diff --git a/types/react-css-transition-replace/index.d.ts b/types/react-css-transition-replace/index.d.ts index f252707f42..b386019fc0 100644 --- a/types/react-css-transition-replace/index.d.ts +++ b/types/react-css-transition-replace/index.d.ts @@ -2,7 +2,7 @@ // Project: http://marnusw.github.io/react-css-transition-replace/ // Definitions by: Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; import * as CSSTransitionGroup from "react-addons-css-transition-group"; diff --git a/types/react-custom-scrollbars/index.d.ts b/types/react-custom-scrollbars/index.d.ts index f21ec7adba..db2ba3eb74 100644 --- a/types/react-custom-scrollbars/index.d.ts +++ b/types/react-custom-scrollbars/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: David-LeBlanc-git // kittimiyo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-custom-scrollbars/v3/index.d.ts b/types/react-custom-scrollbars/v3/index.d.ts index c0e7c1709e..f3ca0da419 100644 --- a/types/react-custom-scrollbars/v3/index.d.ts +++ b/types/react-custom-scrollbars/v3/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/malte-wessel/react-custom-scrollbars // Definitions by: David-LeBlanc-git // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-data-grid/index.d.ts b/types/react-data-grid/index.d.ts index 9c6ca297eb..bfa4ea979f 100644 --- a/types/react-data-grid/index.d.ts +++ b/types/react-data-grid/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/adazzle/react-data-grid.git // Definitions by: Simon Gellis , Kieran Peat , Martin Novak // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-data-grid/v1/index.d.ts b/types/react-data-grid/v1/index.d.ts index 81d7386dca..4db1f4042a 100644 --- a/types/react-data-grid/v1/index.d.ts +++ b/types/react-data-grid/v1/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/adazzle/react-data-grid.git // Definitions by: Simon Gellis // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-datagrid/index.d.ts b/types/react-datagrid/index.d.ts index 8b8d6e4848..032a640daf 100644 --- a/types/react-datagrid/index.d.ts +++ b/types/react-datagrid/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/zippyui/react-datagrid.git // Definitions by: Stephen Jelfs // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-date-range/index.d.ts b/types/react-date-range/index.d.ts index e5be9f751b..fbe74f11b5 100644 --- a/types/react-date-range/index.d.ts +++ b/types/react-date-range/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/Adphorus/react-date-range/ // Definitions by: Junbong Lee // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import * as moment from "moment-timezone"; diff --git a/types/react-datepicker/index.d.ts b/types/react-datepicker/index.d.ts index 5f48988dd4..7cee82930b 100644 --- a/types/react-datepicker/index.d.ts +++ b/types/react-datepicker/index.d.ts @@ -8,7 +8,7 @@ // Koala Human // Sean Kelley // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; import * as moment from "moment"; diff --git a/types/react-daterange-picker/index.d.ts b/types/react-daterange-picker/index.d.ts index dc070d64a0..86ada23508 100644 --- a/types/react-daterange-picker/index.d.ts +++ b/types/react-daterange-picker/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: UNCOVER TRUTH Inc. // MartynasZilinskas // Definitions: https://github.com/borisyankov/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; import * as moment from "moment"; diff --git a/types/react-dates/index.d.ts b/types/react-dates/index.d.ts index ac441c43cf..5e0a889384 100644 --- a/types/react-dates/index.d.ts +++ b/types/react-dates/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Artur Ampilogov // Nathan Holland // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 // Required fields are made according to 'minimum REQUIRED setup' in https://github.com/airbnb/react-dates/blob/master/README.md diff --git a/types/react-daum-postcode/index.d.ts b/types/react-daum-postcode/index.d.ts index b6d093db2d..8aca77413e 100644 --- a/types/react-daum-postcode/index.d.ts +++ b/types/react-daum-postcode/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/kimminsik-bernard/react-daum-postcode // Definitions by: Sa-ryong Kang // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component } from 'react'; diff --git a/types/react-dnd-multi-backend/index.d.ts b/types/react-dnd-multi-backend/index.d.ts index 10e6662bdd..0fcfbf256e 100644 --- a/types/react-dnd-multi-backend/index.d.ts +++ b/types/react-dnd-multi-backend/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Janeene Beeforth // Adam Haglund // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { CSSProperties, PureComponent } from "react"; import { BackendFactory } from "dnd-core"; diff --git a/types/react-dnd-touch-backend/index.d.ts b/types/react-dnd-touch-backend/index.d.ts index 9560f48883..e06a4106e7 100644 --- a/types/react-dnd-touch-backend/index.d.ts +++ b/types/react-dnd-touch-backend/index.d.ts @@ -4,7 +4,7 @@ // Janeene Beeforth // Adam Haglund // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { BackendFactory } from 'dnd-core'; diff --git a/types/react-document-title/index.d.ts b/types/react-document-title/index.d.ts index 85e9f3eb48..efaef782d8 100644 --- a/types/react-document-title/index.d.ts +++ b/types/react-document-title/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/gaearon/react-document-title // Definitions by: Cleve Littlefield // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-dragtastic/index.d.ts b/types/react-dragtastic/index.d.ts new file mode 100644 index 0000000000..64ce099e2f --- /dev/null +++ b/types/react-dragtastic/index.d.ts @@ -0,0 +1,167 @@ +// Type definitions for react-dragtastic 2.4 +// Project: https://github.com/chrisjpatty/react-dragtastic#readme +// Definitions by: Nicolás Scarcella +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import { ReactNode, Component, MouseEventHandler, TouchEventHandler } from 'react'; + +export type Id = string | number; +export type Type = string | number; +export type Accepts = string | ReadonlyArray; + +export interface State { + /** The user's current horizontal position on the page. */ + x: number; + /** The user's current vertical position on the page. */ + y: number; + /** The user's initial horizontal position on the page when they started dragging. */ + startingX: number; + /** The user's initial vertical position on the page when they started dragging. */ + startingY: number; + /** A boolean representing whether the user is currently dragging. */ + isDragging: boolean; + /** The id of the currently dragging element. */ + currentlyDraggingId?: Id; + /** The id of the currently being hovered. */ + currentlyHoveredDroppableId?: Id; + /** The accepts property of the currently being hovered. */ + currentlyHoveredDroppableAccepts?: Accepts; + /** Data from the data property of the which is currently active. null if not dragging. */ + data: any; + /** The type of the component being currently dragged. null if not dragging. */ + type?: Type; +} + +// ────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +// DRAGGABLE +// ────────────────────────────────────────────────────────────────────────────────────────────────────────────────── + +export interface DraggableProps { + /** An id which will be used in the draggable zone's target */ + id?: Id; + /** A string, or array of strings, used to limit which droppable zones will accept 's attached to this draggable. */ + type?: Type; + /** Data of any type which will be passed to the onDrop function of any which accepts this 's type. */ + data?: any; + /** A function which will be called when the zone is activated (The user started dragging). */ + onDragStart?: (data: any) => void; + /** A function which will be called when the zone is deactivated (The user stopped dragging). */ + onDragEnd?: (data: any) => void; + /** A function which will be called every time the user's cursor moves while dragging. */ + onDrag?: () => void; + /** + * An optional array of strings. For performance reasons you can limit which keys in the dragState your component subscribes to. + * For example, you may pass ['type', 'data'] to only rerender if these keys change. + */ + subscribeTo?: ReadonlyArray | null; + /** An optional int representing the distance in pixels the user's pointer must travel to activate the draggable. Defaults to 8 */ + delay?: number; + + children: (arg: State & { + /** A boolean representing if the draggable is currently active. */ + isActive: boolean; + events: { + onMouseDown: MouseEventHandler, + onTouchStart: TouchEventHandler + } + }) => ReactNode; +} + +/** + * This defines a draggable zone. At a minimum, spread the events over the element that should be draggable (usually the root element). + */ +export class Draggable extends Component { } + +// ────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +// DROPPABLE +// ────────────────────────────────────────────────────────────────────────────────────────────────────────────────── + +export interface DroppableProps { + /** An id which will be used in the draggable zone's target */ + id?: Id; + /** A string type corresponding to the type property of the zone for which this should accept drop events. */ + accepts?: Accepts; + /** A function which will be called when a user drops a on this with an accepted type. */ + onDrop?: (data: any) => void; + /** + * A function which will be called when the user's cursor enters the while dragging. + * This function will be called regardless of whether the droppable accepts the draggable currently being dragged. + */ + onDragEnter?: () => void; + /** + * A function which will be called when the user's cursor leaves the while dragging. + * This function will be called regardless of whether the droppable accepts the draggable currently being dragged. + */ + onDragLeave?: () => void; + /** + * An optional array of strings. For performance reasons you can limit which keys in the dragState your component subscribes to. + * For example, you may pass ['type', 'data'] to only rerender if these keys change. + */ + subscribeTo?: ReadonlyArray | null; + + children: (arg: State & { + /** A boolean representing if the user is currently hovering the . */ + isOver: boolean, + /** A boolean representing if this droppable will accept the currently dragging . */ + willAccept: boolean, + events: { + onMouseEnter: () => void, + onMouseLeave: () => void, + onMouseUp: () => void, + } + }) => ReactNode; +} + +/** + * This defines a droppable zone. At a minimum, spread the events over the element that should be droppable (usually the root element). + */ +export class Droppable extends Component { } + +// ────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +// DRAG +// ────────────────────────────────────────────────────────────────────────────────────────────────────────────────── + +export interface DragComponentProps { + /* A string corresponding to the id property of the zone that should trigger this component to start rendering. */ + for?: Id; + /** A function which will be called every time a user drags. */ + onDrag?: () => void; + /** A boolean determining whether or not the DragComponent should always render. Defaults to false. */ + alwaysRender?: boolean; + /** + * An optional array of strings. For performance reasons you can limit which keys in the dragState your component subscribes to. + * For example, you may pass ['type', 'data'] to only rerender if these keys change. + */ + subscribeTo?: ReadonlyArray | null; + + children: (arg: State & { + /** A boolean representing whether the user is currently hovering a that accepts the type of the currently active */ + isOverAccepted: boolean + }) => ReactNode; +} + +/** + * By default, children passed to this component will only render if the user is currently dragging, but this can be overridden. + */ +export class DragComponent extends Component { } + +// ────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +// DRAG STATE +// ────────────────────────────────────────────────────────────────────────────────────────────────────────────────── + +export interface DragStateProps { + /** + * An optional array of strings. For performance reasons you can limit which keys in the dragState your component subscribes to. + * For example, you may pass ['type', 'data'] to only rerender if these keys change. + */ + subscribeTo?: ReadonlyArray | null; + + children: (arg: State) => ReactNode; +} + +/** + * This component is used just like a draggable or droppable, but does not accept or trigger any drag events. + * Use it if you need to notify a component about changes in the dragState without making that component a draggable or droppable zone. + */ +export class DragState extends Component { } diff --git a/types/react-dragtastic/react-dragtastic-tests.tsx b/types/react-dragtastic/react-dragtastic-tests.tsx new file mode 100644 index 0000000000..87a8e828e1 --- /dev/null +++ b/types/react-dragtastic/react-dragtastic-tests.tsx @@ -0,0 +1,57 @@ +import * as React from 'react'; +import { Draggable, Droppable, DragComponent, DragState } from 'react-dragtastic'; + +class DraggableZone extends React.Component { + render() { + return ( + + {dragState =>

I'm a draggable zone
} + + ); + } +} + +class DroppableZone extends React.Component { + render() { + return ( + + {dragState =>
I'm a droppable zone
} +
+ ); + } +} + +class DragComponentWrapper extends React.Component { + render() { + return ( + + {dragState => ( +
+ I will render when my Draggable zone is activated +
+ )} +
+ ); + } +} + +class CompWithDragState extends React.Component { + render() { + return ( + + {dragState => ( +
+ I always render, and have access to the global dragState. +
+ )} +
+ ); + } +} diff --git a/types/react-dragtastic/tsconfig.json b/types/react-dragtastic/tsconfig.json new file mode 100644 index 0000000000..7c07bab561 --- /dev/null +++ b/types/react-dragtastic/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "jsx": "react", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-dragtastic-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/react-dragtastic/tslint.json b/types/react-dragtastic/tslint.json new file mode 100644 index 0000000000..30a1bdde2e --- /dev/null +++ b/types/react-dragtastic/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file diff --git a/types/react-dropzone/index.d.ts b/types/react-dropzone/index.d.ts index 423ce38462..116fcbdb57 100644 --- a/types/react-dropzone/index.d.ts +++ b/types/react-dropzone/index.d.ts @@ -8,7 +8,7 @@ // Andris Causs , // Juraj Husar // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { CSSProperties, Component, DragEvent, InputHTMLAttributes } from "react"; diff --git a/types/react-dropzone/v2/index.d.ts b/types/react-dropzone/v2/index.d.ts index 995e2cdb7d..bae20a74f6 100644 --- a/types/react-dropzone/v2/index.d.ts +++ b/types/react-dropzone/v2/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/okonet/react-dropzone // Definitions by: Mathieu Larouche Dube , Ivo Jesus , Luís Rodrigues , Ben Bayard // Definitions: https://github.com/Vooban/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-dropzone/v3/index.d.ts b/types/react-dropzone/v3/index.d.ts index 55f485203f..18955dff5f 100644 --- a/types/react-dropzone/v3/index.d.ts +++ b/types/react-dropzone/v3/index.d.ts @@ -6,7 +6,7 @@ // Ben Bayard , // Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { CSSProperties, Component, DragEvent, InputHTMLAttributes } from "react"; diff --git a/types/react-dynamic-number/index.d.ts b/types/react-dynamic-number/index.d.ts index 559d0c9d01..c885d8a54c 100644 --- a/types/react-dynamic-number/index.d.ts +++ b/types/react-dynamic-number/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/uhlryk/react-dynamic-number // Definitions by: Eugene Rodin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-easy-chart/index.d.ts b/types/react-easy-chart/index.d.ts index fa3eb07b2c..0697e0e11d 100644 --- a/types/react-easy-chart/index.d.ts +++ b/types/react-easy-chart/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/rma-consulting/react-easy-chart // Definitions by: Dave Leaver // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-event-listener/index.d.ts b/types/react-event-listener/index.d.ts index fcbabb9d68..b37566af5c 100644 --- a/types/react-event-listener/index.d.ts +++ b/types/react-event-listener/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/oliviertassinari/react-event-listener // Definitions by: Alexey Svetliakov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-fa/index.d.ts b/types/react-fa/index.d.ts index 86480a197e..b5641439af 100644 --- a/types/react-fa/index.d.ts +++ b/types/react-fa/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/andreypopp/react-fa // Definitions by: Frank Laub , Pat Sissons , Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, ComponentClass, HTMLProps, StatelessComponent, ReactElement } from "react"; diff --git a/types/react-facebook-login/index.d.ts b/types/react-facebook-login/index.d.ts index 2cd75419b2..82672660a8 100644 --- a/types/react-facebook-login/index.d.ts +++ b/types/react-facebook-login/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/keppelen/react-facebook-login // Definitions by: Alexandre Paré , Jan Karres // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-file-input/index.d.ts b/types/react-file-input/index.d.ts index d2aa7c70cf..0662941b44 100644 --- a/types/react-file-input/index.d.ts +++ b/types/react-file-input/index.d.ts @@ -2,7 +2,7 @@ // Project: https://www.npmjs.com/package/react-file-input // Definitions by: Dmitry Rogozhny // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-file-reader-input/index.d.ts b/types/react-file-reader-input/index.d.ts index c198d2c5f1..5dcb94ad66 100644 --- a/types/react-file-reader-input/index.d.ts +++ b/types/react-file-reader-input/index.d.ts @@ -2,7 +2,7 @@ // Project: https://www.npmjs.com/package/react-file-reader-input // Definitions by: Dmitry Rogozhny , Ali Taheri // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-flags-select/index.d.ts b/types/react-flags-select/index.d.ts index df01a33ae4..e681e93877 100644 --- a/types/react-flags-select/index.d.ts +++ b/types/react-flags-select/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/ekwonye-richard/react-flags-select#readme // Definitions by: Artur Sianiuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component } from 'react'; diff --git a/types/react-flatpickr/index.d.ts b/types/react-flatpickr/index.d.ts index 9683835e32..4586774568 100644 --- a/types/react-flatpickr/index.d.ts +++ b/types/react-flatpickr/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/coderhaoxin/react-flatpickr // Definitions by: begincalendar // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component } from 'react'; import flatpickr from 'flatpickr'; diff --git a/types/react-flex/index.d.ts b/types/react-flex/index.d.ts index 50df2b6fb1..cb470bb89b 100644 --- a/types/react-flex/index.d.ts +++ b/types/react-flex/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/zippyui/react-flex // Definitions by: Jeffery Grajkowski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-flexr/index.d.ts b/types/react-flexr/index.d.ts index 31be71a93e..848dd24800 100644 --- a/types/react-flexr/index.d.ts +++ b/types/react-flexr/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/kodyl/react-flexr // Definitions by: Jeffery Grajkowski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-fontawesome/index.d.ts b/types/react-fontawesome/index.d.ts index 9fa93692b3..6c680ca907 100644 --- a/types/react-fontawesome/index.d.ts +++ b/types/react-fontawesome/index.d.ts @@ -5,7 +5,7 @@ // Vincas Stonys // Gavin Gregory // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-form/index.d.ts b/types/react-form/index.d.ts index 4ae175d83b..b0f14afd2e 100644 --- a/types/react-form/index.d.ts +++ b/types/react-form/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Cameron McAteer // Mathieu Masy // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-form/v1/index.d.ts b/types/react-form/v1/index.d.ts index 41ca659a2d..0d4bdc6300 100644 --- a/types/react-form/v1/index.d.ts +++ b/types/react-form/v1/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/tannerlinsley/react-form#readme // Definitions by: Cameron McAteer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-gateway/index.d.ts b/types/react-gateway/index.d.ts index 7c90464019..d3e8f0b0e5 100644 --- a/types/react-gateway/index.d.ts +++ b/types/react-gateway/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/cloudflare/react-gateway // Definitions by: Jason Unger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import Gateway = require('./Gateway'); import { GatewayProps } from './Gateway'; diff --git a/types/react-geosuggest/index.d.ts b/types/react-geosuggest/index.d.ts index 2d31ba4d6d..6d5fd584f5 100644 --- a/types/react-geosuggest/index.d.ts +++ b/types/react-geosuggest/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/ubilabs/react-geosuggest // Definitions by: Brad Menchl // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-google-maps-loader/index.d.ts b/types/react-google-maps-loader/index.d.ts index 1bea9e2a9c..6bb5978bd2 100644 --- a/types/react-google-maps-loader/index.d.ts +++ b/types/react-google-maps-loader/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/xuopled/react-google-maps-loader // Definitions by: Vasily Nesterov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// import { Component, ReactNode } from "react"; diff --git a/types/react-google-places-suggest/index.d.ts b/types/react-google-places-suggest/index.d.ts index d11139a911..5e7276974f 100644 --- a/types/react-google-places-suggest/index.d.ts +++ b/types/react-google-places-suggest/index.d.ts @@ -2,7 +2,7 @@ // Project: https://xuopled.github.io/react-google-places-suggest // Definitions by: Vasily Nesterov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// import { Component, ReactNode } from "react"; diff --git a/types/react-google-recaptcha/index.d.ts b/types/react-google-recaptcha/index.d.ts index 841b6440af..faeac20b4e 100644 --- a/types/react-google-recaptcha/index.d.ts +++ b/types/react-google-recaptcha/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/dozoisch/react-google-recaptcha // Definitions by: Koala Human // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-gravatar/index.d.ts b/types/react-gravatar/index.d.ts index e2418c2cf6..b2962edc8d 100644 --- a/types/react-gravatar/index.d.ts +++ b/types/react-gravatar/index.d.ts @@ -2,7 +2,7 @@ // Project: http://kyleamathews.github.io/react-gravatar/ // Definitions by: invliD // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-grid-layout/index.d.ts b/types/react-grid-layout/index.d.ts index ff25317a96..91c8ad1f9c 100644 --- a/types/react-grid-layout/index.d.ts +++ b/types/react-grid-layout/index.d.ts @@ -5,7 +5,7 @@ // Zheyang Song , // Andrew Hathaway // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-hamburger-menu/index.d.ts b/types/react-hamburger-menu/index.d.ts index c187a7ace3..c8ff0a1659 100644 --- a/types/react-hamburger-menu/index.d.ts +++ b/types/react-hamburger-menu/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/cameronbourke/react-hamburger-menu // Definitions by: Grzegorz Kielak // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-helmet-async/index.d.ts b/types/react-helmet-async/index.d.ts index 1a240b075b..086ee1fcf0 100644 --- a/types/react-helmet-async/index.d.ts +++ b/types/react-helmet-async/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/staylor/react-helmet-async#readme // Definitions by: forabi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-helmet/index.d.ts b/types/react-helmet/index.d.ts index 93b83075fe..cecb86e12d 100644 --- a/types/react-helmet/index.d.ts +++ b/types/react-helmet/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/nfl/react-helmet // Definitions by: Evan Bremer , Isman Usoh , François Nguyen , Kok Sam , Yui T. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-helmet/v4/index.d.ts b/types/react-helmet/v4/index.d.ts index b9a813b432..4d1b0c699e 100644 --- a/types/react-helmet/v4/index.d.ts +++ b/types/react-helmet/v4/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/nfl/react-helmet // Definitions by: Evan Bremer , Isman Usoh // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-highlight-words/index.d.ts b/types/react-highlight-words/index.d.ts index de71c72c17..19d5cc0960 100644 --- a/types/react-highlight-words/index.d.ts +++ b/types/react-highlight-words/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Mohamed Hegazy // Diogo Corrêa // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-highlighter/index.d.ts b/types/react-highlighter/index.d.ts index 022cdc911a..07a0d7b8ec 100644 --- a/types/react-highlighter/index.d.ts +++ b/types/react-highlighter/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/helior/react-highlighter // Definitions by: Pedro Pereira // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-holder/index.d.ts b/types/react-holder/index.d.ts index 3fa3541786..3ab9d46182 100644 --- a/types/react-holder/index.d.ts +++ b/types/react-holder/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/Moeriki/react-holder // Definitions by: Isman Usoh // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-hyperscript/index.d.ts b/types/react-hyperscript/index.d.ts index 09030de2a9..ee953d3892 100644 --- a/types/react-hyperscript/index.d.ts +++ b/types/react-hyperscript/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/mlmorg/react-hyperscript // Definitions by: tock203 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ComponentClass, StatelessComponent, ReactElement } from 'react'; diff --git a/types/react-i18next/index.d.ts b/types/react-i18next/index.d.ts index 3f019617c1..e7b9c88526 100644 --- a/types/react-i18next/index.d.ts +++ b/types/react-i18next/index.d.ts @@ -4,7 +4,7 @@ // Simon Baumann // Benedict Etzel // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { TranslationFunction } from "i18next"; diff --git a/types/react-i18next/src/trans.d.ts b/types/react-i18next/src/trans.d.ts index 3ef535cf5d..2b0e8e7738 100644 --- a/types/react-i18next/src/trans.d.ts +++ b/types/react-i18next/src/trans.d.ts @@ -19,6 +19,7 @@ export interface TransProps { defaults?: string; values?: Values; components?: React.ReactNode[]; + ns?: string; } export default class Trans extends React.Component { } diff --git a/types/react-i18next/v1/index.d.ts b/types/react-i18next/v1/index.d.ts index 451e18c34a..0296da861c 100644 --- a/types/react-i18next/v1/index.d.ts +++ b/types/react-i18next/v1/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/i18next/react-i18next // Definitions by: Kostya Esmukov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as I18next from "i18next"; import * as React from "react"; diff --git a/types/react-i18next/v4/index.d.ts b/types/react-i18next/v4/index.d.ts index 6b87326975..14676aba7e 100644 --- a/types/react-i18next/v4/index.d.ts +++ b/types/react-i18next/v4/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/i18next/react-i18next // Definitions by: Giedrius Grabauskas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { TranslationFunction } from "i18next"; diff --git a/types/react-icon-base/index.d.ts b/types/react-icon-base/index.d.ts index 2103acc3c3..9264889f85 100644 --- a/types/react-icon-base/index.d.ts +++ b/types/react-icon-base/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/gorangajic/react-icon-base#readme // Definitions by: Alexandre Paré , Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-icons/index.d.ts b/types/react-icons/index.d.ts index 93c531c3b4..e65de56b08 100644 --- a/types/react-icons/index.d.ts +++ b/types/react-icons/index.d.ts @@ -4,4 +4,4 @@ // John Reilly // Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 diff --git a/types/react-image-crop/index.d.ts b/types/react-image-crop/index.d.ts index afadc9d8ac..7f3637d093 100644 --- a/types/react-image-crop/index.d.ts +++ b/types/react-image-crop/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/DominicTobias/react-image-crop // Definitions by: Daniela Yassuda // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, CSSProperties, ReactNode } from 'react'; diff --git a/types/react-image-gallery/index.d.ts b/types/react-image-gallery/index.d.ts index 45de6e4d0a..0082046763 100644 --- a/types/react-image-gallery/index.d.ts +++ b/types/react-image-gallery/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/xiaolin/react-image-gallery // Definitions by: Adam Webb // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-imageloader/index.d.ts b/types/react-imageloader/index.d.ts index bab7a49a34..6e569b1410 100644 --- a/types/react-imageloader/index.d.ts +++ b/types/react-imageloader/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/hzdg/react-imageloader // Definitions by: Stephen Jelfs // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-infinite-calendar/index.d.ts b/types/react-infinite-calendar/index.d.ts index 0264c70d91..2110d4dbd0 100644 --- a/types/react-infinite-calendar/index.d.ts +++ b/types/react-infinite-calendar/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/clauderic/react-infinite-calendar // Definitions by: Christian Chown // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-infinite-scroll-component/index.d.ts b/types/react-infinite-scroll-component/index.d.ts index 2e23e4f6bc..768ad1831b 100644 --- a/types/react-infinite-scroll-component/index.d.ts +++ b/types/react-infinite-scroll-component/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Stephanie Roy // Bartosz Dotryw // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-infinite-scroller/index.d.ts b/types/react-infinite-scroller/index.d.ts index 066714344c..47c2166bc9 100644 --- a/types/react-infinite-scroller/index.d.ts +++ b/types/react-infinite-scroller/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Lauri Lavanti , // Piotr Srebniak // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-infinite/index.d.ts b/types/react-infinite/index.d.ts index 80a2594464..e2149a8016 100644 --- a/types/react-infinite/index.d.ts +++ b/types/react-infinite/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/seatgeek/react-infinite // Definitions by: rhysd // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-input-calendar/index.d.ts b/types/react-input-calendar/index.d.ts index c0e33783b4..09a7fe59b0 100644 --- a/types/react-input-calendar/index.d.ts +++ b/types/react-input-calendar/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/Rudeg/react-input-calendar // Definitions by: Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-input-mask/index.d.ts b/types/react-input-mask/index.d.ts index 13140b1cad..c09719f871 100644 --- a/types/react-input-mask/index.d.ts +++ b/types/react-input-mask/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/sanniassin/react-input-mask // Definitions by: Alexandre Paré // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-intl/index.d.ts b/types/react-intl/index.d.ts index d33b014e36..53b6de8a80 100644 --- a/types/react-intl/index.d.ts +++ b/types/react-intl/index.d.ts @@ -9,7 +9,7 @@ // Krister Kari // Martin Raedlinger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 declare namespace ReactIntl { type DateSource = Date | string | number; diff --git a/types/react-intl/v1/index.d.ts b/types/react-intl/v1/index.d.ts index a891167f91..a5322844f3 100644 --- a/types/react-intl/v1/index.d.ts +++ b/types/react-intl/v1/index.d.ts @@ -2,7 +2,7 @@ // Project: http://formatjs.io/react/ // Definitions by: Bruno Grieder // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-is/index.d.ts b/types/react-is/index.d.ts index f088b1bcc9..b0a1fd1099 100644 --- a/types/react-is/index.d.ts +++ b/types/react-is/index.d.ts @@ -2,7 +2,7 @@ // Project: https://reactjs.org/ // Definitions by: Avi Vahl // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 export as namespace ReactIs; diff --git a/types/react-joyride/index.d.ts b/types/react-joyride/index.d.ts index 5f15d84d66..7cc118a2f0 100644 --- a/types/react-joyride/index.d.ts +++ b/types/react-joyride/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/gilbarbara/react-joyride // Definitions by: Daniel Rosenwasser , Ben Dixon // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-js-pagination/index.d.ts b/types/react-js-pagination/index.d.ts index b4de877d79..00f1b26a64 100644 --- a/types/react-js-pagination/index.d.ts +++ b/types/react-js-pagination/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/vayser/react-js-pagination // Definitions by: Ernesto Cruz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.7 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-json-pretty/index.d.ts b/types/react-json-pretty/index.d.ts index 4229ff7c3b..a34cbca5df 100644 --- a/types/react-json-pretty/index.d.ts +++ b/types/react-json-pretty/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/chenckang/react-json-pretty // Definitions by: Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ComponentClass, HTMLProps } from "react"; diff --git a/types/react-json-tree/index.d.ts b/types/react-json-tree/index.d.ts index f275070a62..f32cc61521 100644 --- a/types/react-json-tree/index.d.ts +++ b/types/react-json-tree/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/alexkuz/react-json-tree/ // Definitions by: Grant Nestor // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, diff --git a/types/react-json/index.d.ts b/types/react-json/index.d.ts index fa7eadeccc..a9ff7d6f8a 100644 --- a/types/react-json/index.d.ts +++ b/types/react-json/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/arqex/react-json // Definitions by: Christoph Spielmann // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-jsonschema-form/index.d.ts b/types/react-jsonschema-form/index.d.ts index ff061cfcdb..9a3b54fb4b 100644 --- a/types/react-jsonschema-form/index.d.ts +++ b/types/react-jsonschema-form/index.d.ts @@ -7,7 +7,7 @@ // Philippe Bourdages // Lucian Buzzo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 declare module "react-jsonschema-form" { import * as React from "react"; diff --git a/types/react-lazyload/index.d.ts b/types/react-lazyload/index.d.ts index a72fdd3581..3fd9b075e4 100644 --- a/types/react-lazyload/index.d.ts +++ b/types/react-lazyload/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/jasonslyvia/react-lazyload // Definitions by: m0a // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component } from "react"; diff --git a/types/react-lazylog/index.d.ts b/types/react-lazylog/index.d.ts index 57c7b623a1..7f180b425a 100644 --- a/types/react-lazylog/index.d.ts +++ b/types/react-lazylog/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/mozilla-frontend-infra/react-lazylog // Definitions by: Benjamin Romano // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 export * from "./build/LazyLog"; export * from "./build/ScrollFollow"; diff --git a/types/react-list/index.d.ts b/types/react-list/index.d.ts index 77559988da..60beba5403 100644 --- a/types/react-list/index.d.ts +++ b/types/react-list/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/orgsync/react-list // Definitions by: Yifei Yan , Tom Shen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, diff --git a/types/react-loadable/index.d.ts b/types/react-loadable/index.d.ts index b673d9b480..b27a4de764 100644 --- a/types/react-loadable/index.d.ts +++ b/types/react-loadable/index.d.ts @@ -6,7 +6,7 @@ // Tomek Łaziuk // Ian Mobley // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-loader/index.d.ts b/types/react-loader/index.d.ts index 2d8f7a99a0..70fc957e2a 100644 --- a/types/react-loader/index.d.ts +++ b/types/react-loader/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/quickleft/react-loader // Definitions by: Sudarsan Balaji // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component } from 'react'; diff --git a/types/react-mailchimp-subscribe/index.d.ts b/types/react-mailchimp-subscribe/index.d.ts index 558c6a92cd..55b5c487ed 100644 --- a/types/react-mailchimp-subscribe/index.d.ts +++ b/types/react-mailchimp-subscribe/index.d.ts @@ -2,7 +2,7 @@ // Project: https://revolunet.github.io/react-mailchimp-subscribe/ // Definitions by: Omar Diab // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, ReactNode } from "react"; diff --git a/types/react-map-gl/index.d.ts b/types/react-map-gl/index.d.ts index 6209e66e81..2260644d32 100644 --- a/types/react-map-gl/index.d.ts +++ b/types/react-map-gl/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Robert Imig // Fabio Berta // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import * as MapboxGL from 'mapbox-gl'; diff --git a/types/react-maskedinput/index.d.ts b/types/react-maskedinput/index.d.ts index 3a1b4687eb..dc38064cab 100644 --- a/types/react-maskedinput/index.d.ts +++ b/types/react-maskedinput/index.d.ts @@ -4,7 +4,7 @@ // Adam Lavin // Carlos Bonetti // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-mce/index.d.ts b/types/react-mce/index.d.ts index 6f1fb978db..1db5f00286 100644 --- a/types/react-mce/index.d.ts +++ b/types/react-mce/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/janstuemmel/react-mce // Definitions by: Gavin Heise // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import * as ActualTinyMCE from 'tinymce'; diff --git a/types/react-mdl/index.d.ts b/types/react-mdl/index.d.ts index caf910d421..1b83bf7def 100644 --- a/types/react-mdl/index.d.ts +++ b/types/react-mdl/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/tleunen/react-mdl // Definitions by: Brad Zacher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-measure/index.d.ts b/types/react-measure/index.d.ts index 241d482a53..9cd5853948 100644 --- a/types/react-measure/index.d.ts +++ b/types/react-measure/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/souporserious/react-measure // Definitions by: Alexey Svetliakov , Marc Fallows // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-mixin/index.d.ts b/types/react-mixin/index.d.ts index 265794afe2..284d278ff8 100644 --- a/types/react-mixin/index.d.ts +++ b/types/react-mixin/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/brigand/react-mixin // Definitions by: Qubo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-modal/index.d.ts b/types/react-modal/index.d.ts index 9dfbf7bdf7..237c725332 100644 --- a/types/react-modal/index.d.ts +++ b/types/react-modal/index.d.ts @@ -7,7 +7,7 @@ // Uwe Wiemer , // Peter Blazejewicz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-motion-slider/index.d.ts b/types/react-motion-slider/index.d.ts index 2e7ea921ef..a53ec42259 100644 --- a/types/react-motion-slider/index.d.ts +++ b/types/react-motion-slider/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/souporserious/react-motion-slider // Definitions by: Alexey Svetliakov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 declare module "react-motion-slider" { import * as React from "react"; diff --git a/types/react-motion-ui-pack/index.d.ts b/types/react-motion-ui-pack/index.d.ts index 0e0e518f70..477cf0e604 100644 --- a/types/react-motion-ui-pack/index.d.ts +++ b/types/react-motion-ui-pack/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/souporserious/react-motion-ui-pack // Definitions by: Jason Unger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import * as motion from 'react-motion'; diff --git a/types/react-motion/index.d.ts b/types/react-motion/index.d.ts index f4f94095a8..761c8e559f 100644 --- a/types/react-motion/index.d.ts +++ b/types/react-motion/index.d.ts @@ -4,7 +4,7 @@ // Alexey Svetliakov // Dimitar Nestorov // Definitions: https://github.com/borisyankov/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, ReactElement } from 'react'; diff --git a/types/react-native-android-taskdescription/index.d.ts b/types/react-native-android-taskdescription/index.d.ts index 0f395e91f2..172f47fe00 100644 --- a/types/react-native-android-taskdescription/index.d.ts +++ b/types/react-native-android-taskdescription/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/jwarby/react-native-android-taskdescription // Definitions by: Christian Chown // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-native-autocomplete-input/index.d.ts b/types/react-native-autocomplete-input/index.d.ts index f6c5f06eb6..9e39a47241 100644 --- a/types/react-native-autocomplete-input/index.d.ts +++ b/types/react-native-autocomplete-input/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/l-urence/react-native-autocomplete-input#readme // Definitions by: Ifiok Jr. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, ReactNode } from 'react'; import { diff --git a/types/react-native-bluetooth-serial/index.d.ts b/types/react-native-bluetooth-serial/index.d.ts index 8dc4d9c1a1..7dc49dcf83 100644 --- a/types/react-native-bluetooth-serial/index.d.ts +++ b/types/react-native-bluetooth-serial/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/rusel1989/react-native-bluetooth-serial // Definitions by: Rodrigo Weber // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; import * as ReactNative from "react-native"; diff --git a/types/react-native-calendars/index.d.ts b/types/react-native-calendars/index.d.ts index 6294af4682..3784c1f628 100644 --- a/types/react-native-calendars/index.d.ts +++ b/types/react-native-calendars/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/wix/react-native-calendars#readme // Definitions by: Tyler Zhang // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ViewProps, StyleProp } from 'react-native'; diff --git a/types/react-native-datepicker/index.d.ts b/types/react-native-datepicker/index.d.ts index dfc8bd5b13..929acdc375 100644 --- a/types/react-native-datepicker/index.d.ts +++ b/types/react-native-datepicker/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/xgfe/react-native-datepicker // Definitions by: Jacob Baskin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ImageURISource } from 'react-native'; diff --git a/types/react-native-dialog/index.d.ts b/types/react-native-dialog/index.d.ts index 3a1cf94be9..10e977f420 100644 --- a/types/react-native-dialog/index.d.ts +++ b/types/react-native-dialog/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/mmazzarolo/react-native-dialog // Definitions by: MrLuje // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Ref, PureComponent, ReactNode } from "react"; import { diff --git a/types/react-native-dialogflow/index.d.ts b/types/react-native-dialogflow/index.d.ts index c1b663ddb5..59ebff7cdf 100644 --- a/types/react-native-dialogflow/index.d.ts +++ b/types/react-native-dialogflow/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/innFactory/react-native-dialogflow#readme // Definitions by: Jason Merino // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 export namespace Dialogflow { const LANG_CHINESE_CHINA = 'zh-CN'; diff --git a/types/react-native-doc-viewer/index.d.ts b/types/react-native-doc-viewer/index.d.ts index 6d09e3966a..f7e28147b7 100644 --- a/types/react-native-doc-viewer/index.d.ts +++ b/types/react-native-doc-viewer/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/philipphecht/react-native-doc-viewer/blob/master/README.md // Definitions by: Kyle Roach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 export function openDoc( files: Array<{ url: string; fileName?: string }>, diff --git a/types/react-native-drawer-layout/index.d.ts b/types/react-native-drawer-layout/index.d.ts index af3a05698e..3bf4ace1db 100644 --- a/types/react-native-drawer-layout/index.d.ts +++ b/types/react-native-drawer-layout/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/react-native-community/react-native-drawer-layout // Definitions by: Justin Firth // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ViewProps } from 'react-native'; diff --git a/types/react-native-drawer/index.d.ts b/types/react-native-drawer/index.d.ts index 3a82e3363a..da3420b9a7 100644 --- a/types/react-native-drawer/index.d.ts +++ b/types/react-native-drawer/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: jnbt // suniahk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ViewStyle, ScaledSize } from 'react-native'; diff --git a/types/react-native-elevated-view/index.d.ts b/types/react-native-elevated-view/index.d.ts index e9ac2b1103..7c538a4742 100644 --- a/types/react-native-elevated-view/index.d.ts +++ b/types/react-native-elevated-view/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/alekhurst/react-native-elevated-view // Definitions by: fhelwanger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import * as ReactNative from 'react-native'; diff --git a/types/react-native-fbsdk/index.d.ts b/types/react-native-fbsdk/index.d.ts index 8b948d6b0d..eacc05209e 100644 --- a/types/react-native-fbsdk/index.d.ts +++ b/types/react-native-fbsdk/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/facebook/react-native-fbsdk // Definitions by: Ifiok Jr. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ComponentClass, Component } from 'react'; import { ViewStyle } from 'react-native'; diff --git a/types/react-native-fs/index.d.ts b/types/react-native-fs/index.d.ts index 17f26a5514..6c92933c44 100644 --- a/types/react-native-fs/index.d.ts +++ b/types/react-native-fs/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Paulo Cesar // Joseph Roque // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-native-google-signin/index.d.ts b/types/react-native-google-signin/index.d.ts index 862a40a35a..6cf83ed1e4 100644 --- a/types/react-native-google-signin/index.d.ts +++ b/types/react-native-google-signin/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/devfd/react-native-google-signin // Definitions by: Jacob Froman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ViewProps } from 'react-native'; diff --git a/types/react-native-htmlview/index.d.ts b/types/react-native-htmlview/index.d.ts index b0eb2ae6a3..0f2b9d661d 100644 --- a/types/react-native-htmlview/index.d.ts +++ b/types/react-native-htmlview/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/jsdf/react-native-htmlview // Definitions by: Ifiok Jr. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, ComponentType, ReactNode } from 'react'; import { diff --git a/types/react-native-indicators/index.d.ts b/types/react-native-indicators/index.d.ts index ee4a13a4c2..1a732d8cee 100644 --- a/types/react-native-indicators/index.d.ts +++ b/types/react-native-indicators/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/n4kz/react-native-indicators#readme // Definitions by: Ifiok Jr. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component } from 'react'; import { Animated, EasingFunction } from 'react-native'; diff --git a/types/react-native-keep-awake/index.d.ts b/types/react-native-keep-awake/index.d.ts index f22d1342c6..c717e83ba3 100644 --- a/types/react-native-keep-awake/index.d.ts +++ b/types/react-native-keep-awake/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/corbt/react-native-keep-awake // Definitions by: huhuanming // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; declare class KeepAwake extends React.Component<{ children?: JSX.Element }> { diff --git a/types/react-native-keyboard-spacer/index.d.ts b/types/react-native-keyboard-spacer/index.d.ts index 0c7ec24262..49ad68de41 100644 --- a/types/react-native-keyboard-spacer/index.d.ts +++ b/types/react-native-keyboard-spacer/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/Andr3wHur5t/react-native-keyboard-spacer#readme // Definitions by: Vincent Langlet // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import * as ReactNative from 'react-native'; diff --git a/types/react-native-loading-spinner-overlay/index.d.ts b/types/react-native-loading-spinner-overlay/index.d.ts index 93d511d863..aa494b5fd4 100644 --- a/types/react-native-loading-spinner-overlay/index.d.ts +++ b/types/react-native-loading-spinner-overlay/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/joinspontaneous/react-native-loading-spinner-overlay // Definitions by: fhelwanger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; import * as ReactNative from "react-native"; diff --git a/types/react-native-material-design-searchbar/index.d.ts b/types/react-native-material-design-searchbar/index.d.ts index 23b3204c76..ed9534a38c 100644 --- a/types/react-native-material-design-searchbar/index.d.ts +++ b/types/react-native-material-design-searchbar/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/ananddayalan/react-native-material-design-searchbar // Definitions by: Kyle Roach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { diff --git a/types/react-native-material-kit/index.d.ts b/types/react-native-material-kit/index.d.ts index f820d8e4cd..48c044a629 100644 --- a/types/react-native-material-kit/index.d.ts +++ b/types/react-native-material-kit/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Kyle Roach // Tim Wang // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { diff --git a/types/react-native-material-textfield/index.d.ts b/types/react-native-material-textfield/index.d.ts index 5f3ffc437f..c21caa15b4 100644 --- a/types/react-native-material-textfield/index.d.ts +++ b/types/react-native-material-textfield/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Ville Venäläinen // Kyle Roach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { diff --git a/types/react-native-material-ui/index.d.ts b/types/react-native-material-ui/index.d.ts index 3c4c549504..8bb86d3cc3 100644 --- a/types/react-native-material-ui/index.d.ts +++ b/types/react-native-material-ui/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/xotahal/react-native-material-ui // Definitions by: Kyle Roach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component } from 'react'; import { ViewStyle, TextStyle, Image } from 'react-native'; diff --git a/types/react-native-modalbox/index.d.ts b/types/react-native-modalbox/index.d.ts index 84461471f2..778f953f78 100644 --- a/types/react-native-modalbox/index.d.ts +++ b/types/react-native-modalbox/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/maxs15/react-native-modalbox#readme // Definitions by: Kyle Roach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { StyleProp, ViewStyle } from 'react-native'; diff --git a/types/react-native-multi-slider/index.d.ts b/types/react-native-multi-slider/index.d.ts index a3a5f39c63..42d4856938 100644 --- a/types/react-native-multi-slider/index.d.ts +++ b/types/react-native-multi-slider/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/JackDanielsAndCode/react-native-multi-slider#readme // Definitions by: Edward Sammut Alessi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; import { ViewStyle } from "react-native"; diff --git a/types/react-native-navbar/index.d.ts b/types/react-native-navbar/index.d.ts index 5c21ea38e8..afcd7df3ed 100644 --- a/types/react-native-navbar/index.d.ts +++ b/types/react-native-navbar/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/react-native-community/react-native-navbar // Definitions by: Ryo Kikuchi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ViewStyle, TextProps } from 'react-native'; diff --git a/types/react-native-photo-view/index.d.ts b/types/react-native-photo-view/index.d.ts index c3f27d78a6..c104b1c0e5 100644 --- a/types/react-native-photo-view/index.d.ts +++ b/types/react-native-photo-view/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/alwx/react-native-photo-view // Definitions by: Christian Chown // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ImageSourcePropType, ViewProps } from 'react-native'; diff --git a/types/react-native-popup-dialog/index.d.ts b/types/react-native-popup-dialog/index.d.ts index 5ddb40e0b2..3ff12802f4 100644 --- a/types/react-native-popup-dialog/index.d.ts +++ b/types/react-native-popup-dialog/index.d.ts @@ -4,7 +4,7 @@ // connectdotz // Michele Bombardi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { GestureResponderEvent, StyleProp, ViewStyle, TextStyle } from 'react-native'; diff --git a/types/react-native-qrcode/index.d.ts b/types/react-native-qrcode/index.d.ts index 7c745aa1b6..97709c5792 100644 --- a/types/react-native-qrcode/index.d.ts +++ b/types/react-native-qrcode/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/cssivision/react-native-qrcode // Definitions by: York Yao // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-native-safari-view/index.d.ts b/types/react-native-safari-view/index.d.ts index 658a6664ce..77b8aa15e8 100644 --- a/types/react-native-safari-view/index.d.ts +++ b/types/react-native-safari-view/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/naoufal/react-native-safari-view // Definitions by: Michael Randolph // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { EmitterSubscription } from 'react-native'; diff --git a/types/react-native-scrollable-tab-view/index.d.ts b/types/react-native-scrollable-tab-view/index.d.ts index 962ba8a810..9be23aa66c 100644 --- a/types/react-native-scrollable-tab-view/index.d.ts +++ b/types/react-native-scrollable-tab-view/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: CaiHuan // Egor Shulga // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { Animated, ScrollViewProps, ViewStyle, TextStyle } from 'react-native'; diff --git a/types/react-native-sensor-manager/index.d.ts b/types/react-native-sensor-manager/index.d.ts index 0b0f0bf67a..9c25be10ba 100644 --- a/types/react-native-sensor-manager/index.d.ts +++ b/types/react-native-sensor-manager/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/kprimice/react-native-sensor-manager // Definitions by: Sahin Vardar // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-native-settings-list/index.d.ts b/types/react-native-settings-list/index.d.ts index 0ba14c9562..e04b856296 100644 --- a/types/react-native-settings-list/index.d.ts +++ b/types/react-native-settings-list/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/evetstech/react-native-settings-list // Definitions by: MrLuje // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, ReactNode } from "react"; import { TextStyle, StyleProp, ImageStyle, ViewStyle } from "react-native"; diff --git a/types/react-native-snap-carousel/index.d.ts b/types/react-native-snap-carousel/index.d.ts index 56b083638b..3c630bc094 100644 --- a/types/react-native-snap-carousel/index.d.ts +++ b/types/react-native-snap-carousel/index.d.ts @@ -4,7 +4,7 @@ // Jacob Froman // Nikolay Polukhin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { diff --git a/types/react-native-sortable-grid/index.d.ts b/types/react-native-sortable-grid/index.d.ts index 392e9b1b01..0551d56efe 100644 --- a/types/react-native-sortable-grid/index.d.ts +++ b/types/react-native-sortable-grid/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/ollija/react-native-sortable-grid#readme // Definitions by: Jacob Froman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { StyleProp, ViewStyle, Animated } from 'react-native'; diff --git a/types/react-native-sortable-list/index.d.ts b/types/react-native-sortable-list/index.d.ts index d5466c8f68..65b34ce62f 100755 --- a/types/react-native-sortable-list/index.d.ts +++ b/types/react-native-sortable-list/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/gitim/react-native-sortable-list // Definitions by: Michael Sivolobov , Vince Maiuri // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ViewStyle } from 'react-native'; diff --git a/types/react-native-star-rating/index.d.ts b/types/react-native-star-rating/index.d.ts index 2285134c8f..a26002bf88 100644 --- a/types/react-native-star-rating/index.d.ts +++ b/types/react-native-star-rating/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/djchie/react-native-star-rating // Definitions by: iRoachie // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ImageURISource, StyleProp, ViewStyle } from 'react-native'; diff --git a/types/react-native-svg-uri/index.d.ts b/types/react-native-svg-uri/index.d.ts index 4529c53d5e..a47550bced 100644 --- a/types/react-native-svg-uri/index.d.ts +++ b/types/react-native-svg-uri/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/matiascba/react-native-svg-uri#readme // Definitions by: Kyle Roach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ImageURISource } from 'react-native'; diff --git a/types/react-native-swiper/index.d.ts b/types/react-native-swiper/index.d.ts index c6616aea0c..a201bcd00b 100644 --- a/types/react-native-swiper/index.d.ts +++ b/types/react-native-swiper/index.d.ts @@ -4,7 +4,7 @@ // HuHuanming // mhcgrq // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { diff --git a/types/react-native-tab-navigator/index.d.ts b/types/react-native-tab-navigator/index.d.ts index 1f4e5e5437..1586b7279a 100644 --- a/types/react-native-tab-navigator/index.d.ts +++ b/types/react-native-tab-navigator/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/exponentjs/react-native-tab-navigator#readme // Definitions by: My Self // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ViewStyle, TextStyle } from 'react-native'; diff --git a/types/react-native-tab-view/index.d.ts b/types/react-native-tab-view/index.d.ts index 0e5ee892ce..078247e97d 100644 --- a/types/react-native-tab-view/index.d.ts +++ b/types/react-native-tab-view/index.d.ts @@ -4,7 +4,7 @@ // Kyle Roach // Tim Wang // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { PureComponent, ReactNode, ComponentType } from 'react' import { Animated, diff --git a/types/react-native-text-input-mask/index.d.ts b/types/react-native-text-input-mask/index.d.ts index 33505ccc54..4cf4b392dc 100644 --- a/types/react-native-text-input-mask/index.d.ts +++ b/types/react-native-text-input-mask/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/react-native-community/react-native-text-input-mask // Definitions by: Rodrigo Weber // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; import * as ReactNative from "react-native"; diff --git a/types/react-native-toast-native/index.d.ts b/types/react-native-toast-native/index.d.ts index 130614290b..6240441781 100644 --- a/types/react-native-toast-native/index.d.ts +++ b/types/react-native-toast-native/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/onemolegames/react-native-toast-native/blob/master/README.md // Definitions by: Michele Bombardi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Platform } from 'react-native'; diff --git a/types/react-native-vector-icons/index.d.ts b/types/react-native-vector-icons/index.d.ts index 60e6408d18..6aabaadd70 100644 --- a/types/react-native-vector-icons/index.d.ts +++ b/types/react-native-vector-icons/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Kyle Roach // Tim Wang // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { Icon } from './Icon'; diff --git a/types/react-native-video/index.d.ts b/types/react-native-video/index.d.ts index d4ba6900f8..e84bcc7637 100644 --- a/types/react-native-video/index.d.ts +++ b/types/react-native-video/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/react-native-community/react-native-video // Definitions by: HuHuanming // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 2d3337c96d..aff434f277 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -12,7 +12,7 @@ // Tanguy Krotoff // Alexander T. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // @@ -1009,6 +1009,54 @@ export interface TextInputIOSProps { * If false, disables spell-check style (i.e. red underlines). The default value is inherited from autoCorrect */ spellCheck?: boolean; + + + /** + * Give the keyboard and the system information about the expected + * semantic meaning for the content that users enter. + * + * For iOS 11+ you can set `textContentType` to `username` or `password` to + * enable autofill of login details from the device keychain. + * + * To disable autofill, set textContentType to `none`. + * + * Possible values for `textContentType` are: + * + * - `'none'` + * - `'URL'` + * - `'addressCity'` + * - `'addressCityAndState'` + * - `'addressState'` + * - `'countryName'` + * - `'creditCardNumber'` + * - `'emailAddress'` + * - `'familyName'` + * - `'fullStreetAddress'` + * - `'givenName'` + * - `'jobTitle'` + * - `'location'` + * - `'middleName'` + * - `'name'` + * - `'namePrefix'` + * - `'nameSuffix'` + * - `'nickname'` + * - `'organizationName'` + * - `'postalCode'` + * - `'streetAddressLine1'` + * - `'streetAddressLine2'` + * - `'sublocality'` + * - `'telephoneNumber'` + * - `'username'` + * - `'password'` + * + */ + textContentType?: "none" | "URL" | "addressCity" | "addressCityAndState" | + "addressState" | "countryName" | "creditCardNumber" | "emailAddress" | + "familyName" | "fullStreetAddress" | "givenName" | "jobTitle" | + "location" | "middleName" | "name" | "namePrefix" | "nameSuffix" | + "nickname" | "organizationName" | "postalCode" | "streetAddressLine1" | + "streetAddressLine2" | "sublocality" | "telephoneNumber" | "username" | + "password"; } /** diff --git a/types/react-native/test/index.tsx b/types/react-native/test/index.tsx index 818be960c7..4921847c2b 100644 --- a/types/react-native/test/index.tsx +++ b/types/react-native/test/index.tsx @@ -547,6 +547,7 @@ class TextInputTest extends React.Component<{}, {username: string}> { this.username = input} + textContentType="username" value={this.state.username} onChangeText={this.handleUsernameChange} /> diff --git a/types/react-navigation/index.d.ts b/types/react-navigation/index.d.ts index e5e9ea00d8..2573315c09 100644 --- a/types/react-navigation/index.d.ts +++ b/types/react-navigation/index.d.ts @@ -20,7 +20,7 @@ // Luca Campana // Ullrich Schaefer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /** * Reference: https://github.com/react-navigation/react-navigation/tree/a37473c5e4833f48796ee6c7c9cb4a8ac49d9c06 diff --git a/types/react-navigation/v1/index.d.ts b/types/react-navigation/v1/index.d.ts index 1233ca39e3..16779c4e4e 100644 --- a/types/react-navigation/v1/index.d.ts +++ b/types/react-navigation/v1/index.d.ts @@ -17,7 +17,7 @@ // Ciaran Liedeman // Edward Sammut Alessi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /** * Reference: https://github.com/react-navigation/react-navigation/tree/3f3ef6485c8932f49fddc3dd2c508629110bf2b6 diff --git a/types/react-notification-system-redux/index.d.ts b/types/react-notification-system-redux/index.d.ts index d74ea35871..701bde55cf 100644 --- a/types/react-notification-system-redux/index.d.ts +++ b/types/react-notification-system-redux/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/gor181/react-notification-system-redux // Definitions by: Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component } from "react"; import { Action } from "redux"; diff --git a/types/react-notification-system/index.d.ts b/types/react-notification-system/index.d.ts index a993f6cc4d..d172cd6b2c 100644 --- a/types/react-notification-system/index.d.ts +++ b/types/react-notification-system/index.d.ts @@ -2,7 +2,7 @@ // Project: https://www.npmjs.com/package/react-notification-system // Definitions by: Giedrius Grabauskas , Deividas Bakanas , Karol Janyst , Bartosz Szewczyk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-notify-toast/index.d.ts b/types/react-notify-toast/index.d.ts index 689d543ce8..1feb26ef61 100644 --- a/types/react-notify-toast/index.d.ts +++ b/types/react-notify-toast/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/jesusoterogomez/react-notify-toast // Definitions by: Klaas Cuvelier // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-numeric-input/index.d.ts b/types/react-numeric-input/index.d.ts index b10a54cfe3..bc28d95825 100644 --- a/types/react-numeric-input/index.d.ts +++ b/types/react-numeric-input/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/vlad-ignatov/react-numeric-input#readme // Definitions by: Heather Booker // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-onclickoutside/index.d.ts b/types/react-onclickoutside/index.d.ts index d97970642f..2fb5659029 100644 --- a/types/react-onclickoutside/index.d.ts +++ b/types/react-onclickoutside/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/Pomax/react-onclickoutside // Definitions by: Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-onclickoutside/v5/index.d.ts b/types/react-onclickoutside/v5/index.d.ts index 4228697e22..82b4b21a25 100644 --- a/types/react-onclickoutside/v5/index.d.ts +++ b/types/react-onclickoutside/v5/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/Pomax/react-onclickoutside // Definitions by: Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-onsenui/index.d.ts b/types/react-onsenui/index.d.ts index 91055d25b4..39722faa7c 100644 --- a/types/react-onsenui/index.d.ts +++ b/types/react-onsenui/index.d.ts @@ -2,7 +2,7 @@ // Project: https://onsen.io/v2/docs/guide/react/ // Definitions by: Ozytis , Salim , Jemmyw // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import Component = React.Component; diff --git a/types/react-overlays/index.d.ts b/types/react-overlays/index.d.ts index 99df3b3cbd..a8df0341be 100644 --- a/types/react-overlays/index.d.ts +++ b/types/react-overlays/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Aaron Beall // Vito Samson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-owl-carousel/index.d.ts b/types/react-owl-carousel/index.d.ts index bcd9af38b5..365ea39598 100644 --- a/types/react-owl-carousel/index.d.ts +++ b/types/react-owl-carousel/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/seal789ie/react-owl-carousel // Definitions by: T Bounsiar , Ismael Gorissen , Kenneth Ceyer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-paginate/index.d.ts b/types/react-paginate/index.d.ts index 0030028055..83d8c476c9 100644 --- a/types/react-paginate/index.d.ts +++ b/types/react-paginate/index.d.ts @@ -5,7 +5,7 @@ // pegel03 // Simon Archer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-places-autocomplete/index.d.ts b/types/react-places-autocomplete/index.d.ts index f05820bbce..62e3d93a1d 100644 --- a/types/react-places-autocomplete/index.d.ts +++ b/types/react-places-autocomplete/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Guilherme Hübner // Andrew Makarov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 // /// diff --git a/types/react-pointable/index.d.ts b/types/react-pointable/index.d.ts index 0b83bdeb1d..9c0828fc76 100644 --- a/types/react-pointable/index.d.ts +++ b/types/react-pointable/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Stefan Fochler // Dibyo Majumdar // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-popover/index.d.ts b/types/react-popover/index.d.ts index fed9c4c32d..a7bc435d2e 100644 --- a/types/react-popover/index.d.ts +++ b/types/react-popover/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/littlebits/react-popover // Definitions by: Jakub Řičař // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-portal/index.d.ts b/types/react-portal/index.d.ts index 2994290013..5faff72d87 100644 --- a/types/react-portal/index.d.ts +++ b/types/react-portal/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Shun Takahashi // Horus Lugo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-primitives/index.d.ts b/types/react-primitives/index.d.ts index 881b3c6a91..7d276c6a94 100644 --- a/types/react-primitives/index.d.ts +++ b/types/react-primitives/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/lelandrichardson/react-primitives // Definitions by: Ahmed Ghoneim // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ComponentType } from 'react'; import { diff --git a/types/react-radio-group/index.d.ts b/types/react-radio-group/index.d.ts index 561599ed0a..809553e497 100644 --- a/types/react-radio-group/index.d.ts +++ b/types/react-radio-group/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/chenglou/react-radio-group // Definitions by: Jason Unger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-recaptcha/index.d.ts b/types/react-recaptcha/index.d.ts index 595cc1916e..614bc50f0f 100644 --- a/types/react-recaptcha/index.d.ts +++ b/types/react-recaptcha/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Mohamed Hegazy // Zach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component } from "react"; diff --git a/types/react-redux-epic/index.d.ts b/types/react-redux-epic/index.d.ts index f9bba811f8..a059786123 100644 --- a/types/react-redux-epic/index.d.ts +++ b/types/react-redux-epic/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/BerkeleyTrue/react-redux-epic#readme // Definitions by: forabi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { Observable } from 'rxjs/Observable'; diff --git a/types/react-redux-i18n/index.d.ts b/types/react-redux-i18n/index.d.ts index 7c133448e8..9d91ab025c 100644 --- a/types/react-redux-i18n/index.d.ts +++ b/types/react-redux-i18n/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/zoover/react-redux-i18n // Definitions by: Clément Devos // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 declare module 'react-redux-i18n' { import * as react from "react" diff --git a/types/react-redux/v5/index.d.ts b/types/react-redux/v5/index.d.ts index 0e3b6ffb88..6dc8844f1e 100644 --- a/types/react-redux/v5/index.d.ts +++ b/types/react-redux/v5/index.d.ts @@ -9,7 +9,7 @@ // Dibyo Majumdar // Prashant Deva // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 // Known Issue: // There is a known issue in TypeScript, which doesn't allow decorators to change the signature of the classes diff --git a/types/react-relay/index.d.ts b/types/react-relay/index.d.ts index f87ce26356..24993b0018 100644 --- a/types/react-relay/index.d.ts +++ b/types/react-relay/index.d.ts @@ -5,8 +5,9 @@ // Eloy Durán // Nicolas Pirotte // Cameron Knight +// Kaare Hoff Skovgaard // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 export { commitLocalUpdate, @@ -23,17 +24,17 @@ import * as RelayRuntimeTypes from "relay-runtime"; // Utility types // ~~~~~~~~~~~~~~~~~~~~~ -// Taken from https://github.com/pelotom/type-zoo -// tslint:disable-next-line:strict-export-declare-modifiers -type Omit = Pick; +export type FragmentOrRegularProp = T extends { ' $refType': infer U } ? { ' $fragmentRefs': U } : T; -export type RemoveRelayProp

= Omit

; +export type MappedFragmentProps = { [K in keyof T]: FragmentOrRegularProp }; + +export type RemoveRelayProp

= Pick>; export interface ComponentRef { componentRef?: (ref: any) => void; } -export type RelayContainer = React.ComponentType & ComponentRef>; +export type RelayContainer

= React.ComponentType> & ComponentRef>; // ~~~~~~~~~~~~~~~~~~~~~ // Maybe Fix @@ -96,10 +97,11 @@ export class QueryRenderer extends ReactRelayQueryRenderer {} // ~~~~~~~~~~~~~~~~~~~~~ // createFragmentContainer // ~~~~~~~~~~~~~~~~~~~~~ -export function createFragmentContainer( - Component: React.ComponentType, + +export function createFragmentContainer

( + Component: React.ComponentType

, fragmentSpec: RelayRuntimeTypes.GraphQLTaggedNode | GeneratedNodeMap -): RelayContainer; +): RelayContainer

; // ~~~~~~~~~~~~~~~~~~~~~ // createPaginationContainer @@ -143,11 +145,11 @@ export interface ConnectionConfig { ): RelayRuntimeTypes.Variables; query: RelayRuntimeTypes.GraphQLTaggedNode; } -export function createPaginationContainer( - Component: React.ComponentType, +export function createPaginationContainer

( + Component: React.ComponentType

, fragmentSpec: RelayRuntimeTypes.GraphQLTaggedNode | GeneratedNodeMap, - connectionConfig: ConnectionConfig -): RelayContainer; + connectionConfig: ConnectionConfig

+): RelayContainer

; // ~~~~~~~~~~~~~~~~~~~~~ // createRefetchContainer @@ -166,8 +168,8 @@ export type RelayRefetchProp = RelayProp & { options?: RefetchOptions ): RelayRuntimeTypes.Disposable; }; -export function createRefetchContainer( - Component: React.ComponentType, +export function createRefetchContainer

( + Component: React.ComponentType

, fragmentSpec: RelayRuntimeTypes.GraphQLTaggedNode | GeneratedNodeMap, taggedNode: RelayRuntimeTypes.GraphQLTaggedNode -): RelayContainer; +): RelayContainer

; diff --git a/types/react-relay/test/react-relay-tests.tsx b/types/react-relay/test/react-relay-tests.tsx index bf3e2d1475..300154678c 100644 --- a/types/react-relay/test/react-relay-tests.tsx +++ b/types/react-relay/test/react-relay-tests.tsx @@ -76,9 +76,8 @@ const MyEmptyQueryRenderer = () => ( type StoryLike = (storyID: string) => void; // Artifact produced by relay-compiler-language-typescript -// tslint:disable-next-line:no-const-enum -const enum _Story_story$ref {} -type Story_story$ref = _Story_story$ref & FragmentReference; +declare const _Story_story$ref: unique symbol; +type Story_story$ref = typeof _Story_story$ref; // tslint:disable-next-line:interface-over-type-literal type Story_story = { readonly id: string; @@ -150,8 +149,7 @@ const Story = (() => { function doesNotRequireRelayPropToBeProvided() { const onLike = (id: string) => console.log(`Liked story #${id}`); const story: { " $fragmentRefs": Story_story$ref } = {} as any; - // TODO: Fix requirement to cast fragment reference as `any`. - ; + ; } return StoryRefetchContainer; @@ -162,15 +160,14 @@ const Story = (() => { // ~~~~~~~~~~~~~~~~~~~~~ // Artifact produced by relay-compiler-language-typescript -// tslint:disable-next-line:no-const-enum -const enum _FeedStories_feed$ref {} -type FeedStories_feed$ref = _FeedStories_feed$ref & FragmentReference; +declare const _FeedStories_feed$ref: unique symbol; +type FeedStories_feed$ref = typeof _FeedStories_feed$ref; // tslint:disable-next-line:interface-over-type-literal type FeedStories_feed = { readonly edges: ReadonlyArray<{ readonly node: { readonly id: string; - readonly " $fragmentRefs": Story_story$ref; + readonly " $fragmentRefs": Story_story$ref & FeedStories_feed$ref; }; }>; readonly " $refType": FeedStories_feed$ref; @@ -189,8 +186,7 @@ const Feed = (() => { // If you have a good relavant example, please update! relay.environment; const stories = feed.edges.map(edge => { - // TODO: Fix requirement to cast fragment reference as `any`. - return ; + return ; }); return

{stories}
; }; @@ -214,8 +210,7 @@ const Feed = (() => { function doesNotRequireRelayPropToBeProvided() { const onStoryLike = (id: string) => console.log(`Liked story #${id}`); const feed: { " $fragmentRefs": FeedStories_feed$ref } = {} as any; - // TODO: Fix requirement to cast fragment reference as `any`. - ; + ; } return FeedFragmentContainer; @@ -226,9 +221,8 @@ const Feed = (() => { // ~~~~~~~~~~~~~~~~~~~~~ // Artifact produced by relay-compiler-language-typescript -// tslint:disable-next-line:no-const-enum -const enum _UserFeed_user$ref {} -type UserFeed_user$ref = _UserFeed_user$ref & FragmentReference; +declare const _UserFeed_user$ref: unique symbol; +type UserFeed_user$ref = typeof _UserFeed_user$ref; // tslint:disable-next-line:interface-over-type-literal type UserFeed_user = { readonly feed: { @@ -252,11 +246,9 @@ type UserFeed_user = { class UserFeed extends React.Component { render() { const onStoryLike = (id: string) => console.log(`Liked story #${id}`); - // TODO: Fix requirement to cast fragment reference as `any`. - const feed = this.props.user.feed as any; return (
- +
); @@ -329,8 +321,7 @@ type UserFeed_user = { function doesNotRequireRelayPropToBeProvided() { const user: { " $fragmentRefs": UserFeed_user$ref } = {} as any; - // TODO: Fix requirement to cast fragment reference as `any`. - ; + ; } }; diff --git a/types/react-resize-detector/index.d.ts b/types/react-resize-detector/index.d.ts index 5277109c2e..ee9341a358 100644 --- a/types/react-resize-detector/index.d.ts +++ b/types/react-resize-detector/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/maslianok/react-resize-detector // Definitions by: Matthew James , James Greenleaf // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-resolver/index.d.ts b/types/react-resolver/index.d.ts index c871426401..f8e0807fab 100644 --- a/types/react-resolver/index.d.ts +++ b/types/react-resolver/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/ericclemmons/react-resolver // Definitions by: forabi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ComponentType, StatelessComponent, Factory } from 'react'; diff --git a/types/react-responsive/index.d.ts b/types/react-responsive/index.d.ts index ad042a34c5..0fa9978c8f 100644 --- a/types/react-responsive/index.d.ts +++ b/types/react-responsive/index.d.ts @@ -4,7 +4,7 @@ // Alec Hill // Javier Gonzalez // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-responsive/v1/index.d.ts b/types/react-responsive/v1/index.d.ts index f9c3bfcf83..789278508a 100644 --- a/types/react-responsive/v1/index.d.ts +++ b/types/react-responsive/v1/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/contra/react-responsive // Definitions by: Alexey Svetliakov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-rnd/index.d.ts b/types/react-rnd/index.d.ts index ff5ac2078e..ef7fb89674 100644 --- a/types/react-rnd/index.d.ts +++ b/types/react-rnd/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Ragg // fsubal // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; type CSSProperties = React.CSSProperties; diff --git a/types/react-router/v2/index.d.ts b/types/react-router/v2/index.d.ts index 68f9c3f38f..3f24c22c2c 100644 --- a/types/react-router/v2/index.d.ts +++ b/types/react-router/v2/index.d.ts @@ -7,7 +7,7 @@ // Alex Wendland // Kostya Esmukov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 export as namespace ReactRouter; diff --git a/types/react-router/v3/index.d.ts b/types/react-router/v3/index.d.ts index 9ca93b3a9b..ee4e01ba40 100644 --- a/types/react-router/v3/index.d.ts +++ b/types/react-router/v3/index.d.ts @@ -11,7 +11,7 @@ // Dovydas Navickas // Ross Allen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 export { ChangeHook, diff --git a/types/react-s-alert/index.d.ts b/types/react-s-alert/index.d.ts index bd014abd0a..d55aae1105 100644 --- a/types/react-s-alert/index.d.ts +++ b/types/react-s-alert/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/juliancwirko/react-s-alert // Definitions by: mitsuruog // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-scroll/index.d.ts b/types/react-scroll/index.d.ts index f04e6d86ff..bc22a9f445 100644 --- a/types/react-scroll/index.d.ts +++ b/types/react-scroll/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Ioannis Kokkinidis // Giedrius Grabauskas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as ReactScroll from "./modules/index"; export = ReactScroll; diff --git a/types/react-scrollbar/index.d.ts b/types/react-scrollbar/index.d.ts index f551d83ebd..ef99d8ab94 100644 --- a/types/react-scrollbar/index.d.ts +++ b/types/react-scrollbar/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/souhe/reactScrollbar // Definitions by: Stephen Jelfs // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-select/lib/Creatable.d.ts b/types/react-select/lib/Creatable.d.ts index c194441a8b..ac67bf039c 100644 --- a/types/react-select/lib/Creatable.d.ts +++ b/types/react-select/lib/Creatable.d.ts @@ -14,10 +14,10 @@ export interface CreatableProps { formatCreateLabel?: (inputValue: string) => Node; /* Determines whether the "create new ..." option should be displayed based on the current input value, select value and options array. */ - isValidNewOption?: (a: string, b: ValueType, c: OptionsType) => boolean; + isValidNewOption?: (inputValue: string, value: ValueType, options: OptionsType) => boolean; /* Returns the data for the new option when it is created. Used to display the value, and is passed to `onChange`. */ - getNewOptionData?: (a: string, b: Node) => OptionType; + getNewOptionData?: (inputValue: string, optionLabel: Node) => OptionType; /* If provided, this will be called with the input value when a new option is created, and `onChange` will **not** be called. Use this when you need more control over what happens when new options are created. */ diff --git a/types/react-select/lib/Select.d.ts b/types/react-select/lib/Select.d.ts index 0298ea0288..3e89a139ac 100644 --- a/types/react-select/lib/Select.d.ts +++ b/types/react-select/lib/Select.d.ts @@ -107,7 +107,7 @@ export interface Props { /* Formats group labels in the menu as React components */ formatGroupLabel?: typeof formatGroupLabel; /* Formats option labels in the menu and control as React components */ - formatOptionLabel?: (a: OptionType, b: FormatOptionLabelMeta) => Node; + formatOptionLabel?: (option: OptionType, labelMeta: FormatOptionLabelMeta) => Node; /* Resolves option data to a string to be displayed as the label by components */ getOptionLabel?: typeof getOptionLabel; /* Resolves option data to a string to compare options and specify value attributes */ @@ -129,9 +129,9 @@ export interface Props { /* Is the select in a state of loading (async) */ isLoading?: boolean; /* Override the built-in logic to detect whether an option is disabled */ - isOptionDisabled?: (a: OptionType, b: OptionsType) => boolean | false; + isOptionDisabled?: (option: OptionType, options: OptionsType) => boolean | false; /* Override the built-in logic to detect whether an option is selected */ - isOptionSelected?: (a: OptionType, b: OptionsType) => boolean; + isOptionSelected?: (option: OptionType, options: OptionsType) => boolean; /* Support multiple selected options */ isMulti?: boolean; /* Is the select direction right-to-left */ diff --git a/types/react-select/lib/components/Control.d.ts b/types/react-select/lib/components/Control.d.ts index 019f75bee9..c48dee76d4 100644 --- a/types/react-select/lib/components/Control.d.ts +++ b/types/react-select/lib/components/Control.d.ts @@ -22,7 +22,7 @@ export type ControlProps = CommonProps & }, }; -export function css(state: State): any; // TODO css type +export function css(state: State): React.CSSProperties; declare const Control: ComponentType>; diff --git a/types/react-select/lib/components/Group.d.ts b/types/react-select/lib/components/Group.d.ts index d37964c0b4..9e05263224 100644 --- a/types/react-select/lib/components/Group.d.ts +++ b/types/react-select/lib/components/Group.d.ts @@ -13,11 +13,11 @@ interface ComponentProps { } export type GroupProps = CommonProps & ComponentProps; -export function groupCSS(): any; // TODO css type +export function groupCSS(): React.CSSProperties; export const Group: ComponentType>; -export function groupHeadingCSS(): any; // TODO css type +export function groupHeadingCSS(): React.CSSProperties; export const GroupHeading: ComponentType; diff --git a/types/react-select/lib/components/Input.d.ts b/types/react-select/lib/components/Input.d.ts index 16f07491d2..9f79ffb1e0 100644 --- a/types/react-select/lib/components/Input.d.ts +++ b/types/react-select/lib/components/Input.d.ts @@ -15,8 +15,8 @@ export type InputProps = PropsWithStyles & { className?: string, }; -export function inputCSS(props: InputProps): any; // TODO css type; -export function inputStyle(isHidden: boolean): any; // TODO css type +export function inputCSS(props: InputProps): React.CSSProperties; +export function inputStyle(isHidden: boolean): React.CSSProperties; export const Input: ComponentType; diff --git a/types/react-select/lib/components/Menu.d.ts b/types/react-select/lib/components/Menu.d.ts index 85b5ef0fae..d91288cdeb 100644 --- a/types/react-select/lib/components/Menu.d.ts +++ b/types/react-select/lib/components/Menu.d.ts @@ -64,7 +64,7 @@ export type MenuProps = CommonProps & { menuShouldScrollIntoView: boolean, }; -export function menuCSS(state: MenuState): any; // TODO css type +export function menuCSS(state: MenuState): React.CSSProperties; export class Menu extends Component, MenuState> { static contextTypes: { @@ -96,15 +96,15 @@ export interface MenuListProps { export type MenuListComponentProps = CommonProps & MenuListProps & MenuListState; -export function menuListCSS(state: MenuState): any; // TODO css type +export function menuListCSS(state: MenuState): React.CSSProperties; export const MenuList: ComponentType>; // ============================== // Menu Notices // ============================== -export function noOptionsMessageCSS(): any; // TODO css type -export function loadingMessageCSS(): any; // TODO css type +export function noOptionsMessageCSS(): React.CSSProperties; +export function loadingMessageCSS(): React.CSSProperties; export type NoticeProps = CommonProps & { /** The children to be rendered. */ @@ -143,7 +143,7 @@ interface PortalStyleArgs { rect: RectType; } -export function menuPortalCSS(args: PortalStyleArgs): any; // TODO css type +export function menuPortalCSS(args: PortalStyleArgs): React.CSSProperties; export class MenuPortal extends Component, MenuPortalState> { static childContextTypes: { diff --git a/types/react-select/lib/components/MultiValue.d.ts b/types/react-select/lib/components/MultiValue.d.ts index 495b4fc96f..ac304bd42a 100644 --- a/types/react-select/lib/components/MultiValue.d.ts +++ b/types/react-select/lib/components/MultiValue.d.ts @@ -18,9 +18,9 @@ export type MultiValueProps = CommonProps &{ }, }; -export function multiValueCSS(): any; // TODO css type -export function multiValueLabelCSS(props: MultiValueProps): any; // TODO css type -export function multiValueRemoveCSS(props: MultiValueProps): any; // TODO css type +export function multiValueCSS(): React.CSSProperties; +export function multiValueLabelCSS(props: MultiValueProps): React.CSSProperties; +export function multiValueRemoveCSS(props: MultiValueProps): React.CSSProperties; export interface MultiValueGenericProps { children: Node; diff --git a/types/react-select/lib/components/Option.d.ts b/types/react-select/lib/components/Option.d.ts index 743083fff8..81ab38e401 100644 --- a/types/react-select/lib/components/Option.d.ts +++ b/types/react-select/lib/components/Option.d.ts @@ -34,7 +34,7 @@ export type OptionProps = PropsWithStyles & type: 'option', }; -export function optionCSS(state: State): any; // TODO css type +export function optionCSS(state: State): React.CSSProperties; export const Option: ComponentType>; diff --git a/types/react-select/lib/components/Placeholder.d.ts b/types/react-select/lib/components/Placeholder.d.ts index f674f74cc2..6f674d70a8 100644 --- a/types/react-select/lib/components/Placeholder.d.ts +++ b/types/react-select/lib/components/Placeholder.d.ts @@ -10,7 +10,7 @@ export type PlaceholderProps = CommonProps & { innerProps: { [key: string]: any }, }; -export function placeholderCSS(): any; // TODO css type +export function placeholderCSS(): React.CSSProperties; export const Placeholder: ComponentType>; diff --git a/types/react-select/lib/components/SingleValue.d.ts b/types/react-select/lib/components/SingleValue.d.ts index c5f922d84c..c727b2242e 100644 --- a/types/react-select/lib/components/SingleValue.d.ts +++ b/types/react-select/lib/components/SingleValue.d.ts @@ -16,7 +16,7 @@ interface ValueProps { } export type SingleValueProps = CommonProps & ValueProps & State; -export function css(props: SingleValueProps): any; // TODO css type +export function css(props: SingleValueProps): React.CSSProperties; export const SingleValue: ComponentType>; diff --git a/types/react-select/lib/components/containers.d.ts b/types/react-select/lib/components/containers.d.ts index 373a552062..e75de6d756 100644 --- a/types/react-select/lib/components/containers.d.ts +++ b/types/react-select/lib/components/containers.d.ts @@ -20,7 +20,7 @@ export type ContainerProps = CommonProps & /** Inner props to be passed down to the container. */ innerProps: { onKeyDown: KeyboardEventHandler }, }; -export function containerCSS(state: ContainerState): any; // TODO css type; +export function containerCSS(state: ContainerState): React.CSSProperties; export const SelectContainer: ComponentType>; // ============================== @@ -35,7 +35,7 @@ export type ValueContainerProps = CommonProps & { /** The children to be rendered. */ children: Node, }; -export function valueContainerCSS(): any; // TODO css type; +export function valueContainerCSS(): React.CSSProperties; export class ValueContainer extends Component> {} // ============================== @@ -53,5 +53,5 @@ export type IndicatorContainerProps = CommonProps & children: Node, }; -export function indicatorsContainerCSS(): any; // TODO css type; +export function indicatorsContainerCSS(): React.CSSProperties; export const IndicatorsContainer: ComponentType>; diff --git a/types/react-select/lib/components/index.d.ts b/types/react-select/lib/components/index.d.ts index 7d493a562a..d9d505b119 100644 --- a/types/react-select/lib/components/index.d.ts +++ b/types/react-select/lib/components/index.d.ts @@ -79,33 +79,7 @@ export interface SelectComponents { ValueContainer: ComponentType>; } -export interface SelectComponentsConfig { - ClearIndicator?: IndicatorComponentType | null; - Control?: ComponentType>; - DropdownIndicator?: IndicatorComponentType | null; - DownChevron?: ComponentType; - CrossIcon?: ComponentType; - Group?: ComponentType>; - GroupHeading?: ComponentType; - IndicatorsContainer?: ComponentType>; - IndicatorSeparator?: IndicatorComponentType | null; - Input?: ComponentType; - LoadingIndicator?: ComponentType> | null; - Menu?: ComponentType>; - MenuList?: ComponentType>; - MenuPortal?: ComponentType>; - LoadingMessage?: ComponentType>; - NoOptionsMessage?: ComponentType>; - MultiValue?: ComponentType>; - MultiValueContainer?: ComponentType; - MultiValueLabel?: ComponentType; - MultiValueRemove?: ComponentType; - Option?: ComponentType>; - Placeholder?: ComponentType>; - SelectContainer?: ComponentType>; - SingleValue?: ComponentType>; - ValueContainer?: ComponentType>; -} +export type SelectComponentsConfig = Partial>; export namespace components { const ClearIndicator: IndicatorComponentType | null; diff --git a/types/react-select/lib/components/indicators.d.ts b/types/react-select/lib/components/indicators.d.ts index d27cc518da..15df6d3748 100644 --- a/types/react-select/lib/components/indicators.d.ts +++ b/types/react-select/lib/components/indicators.d.ts @@ -25,7 +25,7 @@ export type IndicatorProps = CommonProps & { isRtl: boolean, }; -export type baseCSS = (props: IndicatorProps) => any; // TODO css type +export type baseCSS = (props: IndicatorProps) => React.CSSProperties; export const dropdownIndicatorCSS: baseCSS; export const DropdownIndicator: ComponentType>; @@ -39,7 +39,7 @@ export const ClearIndicator: ComponentType>; export interface SeparatorState { isDisabled: boolean; } -export function indicatorSeparatorCSS(state: SeparatorState): any; // TODO css type +export function indicatorSeparatorCSS(state: SeparatorState): React.CSSProperties; export const IndicatorSeparator: ComponentType>; @@ -50,7 +50,7 @@ export const IndicatorSeparator: ComponentType>; export function loadingIndicatorCSS(state: { isFocused: boolean, size: number, -}): any; // TODO css type +}): React.CSSProperties; export type LoadingIconProps = { /** Props that will be passed on to the children. */ diff --git a/types/react-select/lib/styles.d.ts b/types/react-select/lib/styles.d.ts index 9c5178fed1..e9c63d07b8 100644 --- a/types/react-select/lib/styles.d.ts +++ b/types/react-select/lib/styles.d.ts @@ -27,6 +27,7 @@ import { multiValueLabelCSS, multiValueRemoveCSS, } from './components/MultiValue'; +import { CSSProperties } from 'react'; export interface Props { [key: string]: any; } @@ -35,7 +36,7 @@ export interface Props { [key: string]: any; } * @param state -- the component's current state e.g. `isFocused` * @returns */ -export type styleFn = (base: any, state: any) => any; +export type styleFn = (base: CSSProperties, state: any) => CSSProperties; export interface Styles { clearIndicator?: styleFn; @@ -63,37 +64,12 @@ export interface Styles { singleValue?: styleFn; valueContainer: styleFn; } -export interface StylesConfig { - clearIndicator?: styleFn; - container?: styleFn; - control?: styleFn; - dropdownIndicator?: styleFn; - group?: styleFn; - groupHeading?: styleFn; - indicatorsContainer?: styleFn; - indicatorSeparator?: styleFn; - input?: styleFn; - loadingIndicator?: styleFn; - // TODO loadingMessageCSS?: styleFn; - loadingMessage?: styleFn; - menu?: styleFn; - menuList?: styleFn; - menuPortal?: styleFn; - multiValue?: styleFn; - multiValueLabel?: styleFn; - multiValueRemove?: styleFn; - // TODO noOptionsMessageCSS?: styleFn; - noOptionsMessage?: styleFn; - option?: styleFn; - placeholder?: styleFn; - singleValue?: styleFn; - valueContainer?: styleFn; -} -export type GetStyles = (a: string, b: Props) => any; +export type StylesConfig = Partial; +export type GetStyles = (a: string, b: Props) => CSSProperties; export const defaultStyles: Styles; // Merge Utility // Allows consumers to extend a base Select with additional styles -export function mergeStyles(source: any, target: any): any; +export function mergeStyles(source: any, target: any): CSSProperties; diff --git a/types/react-select/test/examples/Experimental.tsx b/types/react-select/test/examples/Experimental.tsx index c2b8e42f95..c0bbf3c6ad 100644 --- a/types/react-select/test/examples/Experimental.tsx +++ b/types/react-select/test/examples/Experimental.tsx @@ -111,14 +111,14 @@ const Group = (props: any) => { > {label} -
// TODO css type +
{days.map((day, i) => ( - // TODO css type + {day} ))}
-
{children}
// TODO css type +
{children}
); }; diff --git a/types/react-select/test/examples/MenuPortal.tsx b/types/react-select/test/examples/MenuPortal.tsx index 32590acfb1..b7360e6fff 100644 --- a/types/react-select/test/examples/MenuPortal.tsx +++ b/types/react-select/test/examples/MenuPortal.tsx @@ -52,7 +52,6 @@ export default class MenuPortal extends React.Component { />
Office for Windows desktop Office Online (in browser) Office for iPad /th>
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
PowerPoint Y
Word Y Y