diff --git a/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md similarity index 100% rename from ISSUE_TEMPLATE.md rename to .github/ISSUE_TEMPLATE.md diff --git a/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from PULL_REQUEST_TEMPLATE.md rename to .github/PULL_REQUEST_TEMPLATE.md diff --git a/README.md b/README.md index 23bb52f13c..34ddfd9ef2 100644 --- a/README.md +++ b/README.md @@ -157,7 +157,7 @@ If a package was never on DefinitelyTyped, it does not need to be added to `notN To lint a package, just add a `tslint.json` to that package containing `{ "extends": "../tslint.json" }`. All new packages must be linted. If a `tslint.json` turns rules off, this is because that hasn't been fixed yet. For example: -```json +```js { "extends": "../tslint.json", "rules": { @@ -255,6 +255,10 @@ transitively `react-router-bootstrap` (which depends on `react-router`) also add Also, `/// ` will not work with path mapping, so dependencies must use `import`. +#### The file history in GitHub looks incomplete. + +GitHub doesn't [support](http://stackoverflow.com/questions/5646174/how-to-make-github-follow-directory-history-after-renames) file history for renamed files. Use [`git log --follow`](https://www.git-scm.com/docs/git-log) instead. + ## License diff --git a/bignumber.js/bignumber.js-tests.ts b/bignumber.js/bignumber.js-tests.ts deleted file mode 100644 index a375fc60cd..0000000000 --- a/bignumber.js/bignumber.js-tests.ts +++ /dev/null @@ -1,445 +0,0 @@ -var x: BigNumber.BigNumber = new BigNumber(9) -var y = new BigNumber(x) - -BigNumber(435.345) - -new BigNumber('5032485723458348569331745.33434346346912144534543') -new BigNumber('4.321e+4') -new BigNumber('-735.0918e-430') -new BigNumber(Infinity) -new BigNumber(NaN) -new BigNumber('.5') -new BigNumber('+2') -new BigNumber(-10110100.1, 2) -new BigNumber(-0b10110100) -new BigNumber('123412421.234324', 5) -new BigNumber('ff.8', 16) -new BigNumber('0xff.8') - -new BigNumber(9, 2) - -new BigNumber(96517860459076817.4395) - -new BigNumber('blurgh') - -BigNumber.config({ DECIMAL_PLACES: 5 }) -new BigNumber(1.23456789) -new BigNumber(1.23456789, 10) - -BigNumber.config({ DECIMAL_PLACES: 5 }) -var BN = BigNumber.another({ DECIMAL_PLACES: 9 }) - -x = new BigNumber(1) -y = new BN(1) - -x.div(3) -y.div(3) - -BN = BigNumber.another() -BN.config({ DECIMAL_PLACES: 9 }) - -BigNumber.config({ DECIMAL_PLACES: 5 }) -BigNumber.set({ DECIMAL_PLACES: 5 }) -BigNumber.config(5) - -BigNumber.config({ ROUNDING_MODE: 0 }) -BigNumber.config(undefined, BigNumber.ROUND_UP) - -BigNumber.config({ EXPONENTIAL_AT: 2 }) -new BigNumber(12.3) -new BigNumber(123) -new BigNumber(0.123) -new BigNumber(0.0123) - -BigNumber.config({ EXPONENTIAL_AT: [-7, 20] }) -new BigNumber(123456789) -new BigNumber(0.000000123) - -BigNumber.config({ EXPONENTIAL_AT: 1e+9 }) - -BigNumber.config({ EXPONENTIAL_AT: 0 }) - -BigNumber.config({ RANGE: 500 }) -BigNumber.config().RANGE -new BigNumber('9.999e499') -new BigNumber('1e500') -new BigNumber('1e-499') -new BigNumber('1e-500') - -BigNumber.config({ RANGE: [-3, 4] }) -new BigNumber(99999) -new BigNumber(100000) -new BigNumber(0.001) -new BigNumber(0.0001) - -BigNumber.config({ ERRORS: false }) - -BigNumber.config({ CRYPTO: true }) -BigNumber.config().CRYPTO -BigNumber.random() - -BigNumber.config({ MODULO_MODE: BigNumber.EUCLID }) -BigNumber.config({ MODULO_MODE: 9 }) - -BigNumber.config({ POW_PRECISION: 100 }) - -BigNumber.config({ - FORMAT: { - decimalSeparator: '.', - groupSeparator: ',', - groupSize: 3, - secondaryGroupSize: 0, - fractionGroupSeparator: ' ', - fractionGroupSize: 0 - } -}); - -BigNumber.config({ - DECIMAL_PLACES: 40, - ROUNDING_MODE: BigNumber.ROUND_HALF_CEIL, - EXPONENTIAL_AT: [-10, 20], - RANGE: [-500, 500], - ERRORS: true, - CRYPTO: true, - MODULO_MODE: BigNumber.ROUND_FLOOR, - POW_PRECISION: 80, - FORMAT: { - groupSize: 3, - groupSeparator: ' ', - decimalSeparator: ',' - } -}); - -BigNumber.config(40, 7, [-10, 20], 500, 1, 1, 3, 80) - -var obj = BigNumber.config(); -obj.ERRORS -obj.RANGE - -x = new BigNumber('3257869345.0378653') -BigNumber.max(4e9, x, '123456789.9') - -var arr = [12, '13', new BigNumber(14)] -BigNumber.max(arr) - -x = new BigNumber('3257869345.0378653') -BigNumber.min(4e9, x, '123456789.9') - -arr = [2, new BigNumber(-14), '-15.9999', -12] -BigNumber.min(arr) - -BigNumber.config({ DECIMAL_PLACES: 10 }) -BigNumber.random() -BigNumber.random(20) - -BigNumber.config({ ROUNDING_MODE: BigNumber.ROUND_CEIL }) -BigNumber.config({ ROUNDING_MODE: 2 }) - -x = new BigNumber(-0.8) -y = x.absoluteValue() -var z = y.abs() - -x = new BigNumber(1.3) -x.ceil() -y = new BigNumber(-1.8) -y.ceil() - -x = new BigNumber(Infinity) -y = new BigNumber(5) -x.comparedTo(y) -x.comparedTo(x.minus(1)) -y.cmp(NaN) -y.cmp('110', 2) - -x = new BigNumber(123.45) -x.decimalPlaces() -y = new BigNumber('9.9e-101') -y.dp() - -x = new BigNumber(355) -y = new BigNumber(113) -x.dividedBy(y) -x.div(5) -x.div(47, 16) - -x = new BigNumber(5) -y = new BigNumber(3) -x.dividedToIntegerBy(y) -x.divToInt(0.7) -x.divToInt('0.f', 16) - -0 === 1e-324 -x = new BigNumber(0) -x.equals('1e-324') -BigNumber(-0).eq(x) -BigNumber(255).eq('ff', 16) - -y = new BigNumber(NaN) -y.equals(NaN) - -x = new BigNumber(1.8) -x.floor() -y = new BigNumber(-1.3) -y.floor() - -0.1 > (0.3 - 0.2) -x = new BigNumber(0.1) -x.greaterThan(BigNumber(0.3).minus(0.2)) -BigNumber(0).gt(x) -BigNumber(11, 3).gt(11.1, 2) - -x = new BigNumber(0.3).minus(0.2) -x.greaterThanOrEqualTo(0.1) -BigNumber(1).gte(x) -BigNumber(10, 18).gte('i', 36) - -x = new BigNumber(1) -x.isFinite() -y = new BigNumber(Infinity) -y.isFinite() - -x = new BigNumber(1) -x.isInteger() -y = new BigNumber(123.456) -y.isInt() - -x = new BigNumber(NaN) -x.isNaN() -y = new BigNumber('Infinity') -y.isNaN() - -x = new BigNumber(-0) -x.isNegative() -y = new BigNumber(2) -y.isNeg() - -x = new BigNumber(-0) -x.isZero() && x.isNeg() -y = new BigNumber(Infinity) -y.isZero() - -x = new BigNumber(0.3).minus(0.2) -x.lessThan(0.1) -BigNumber(0).lt(x) -BigNumber(11.1, 2).lt(11, 3) - -x = new BigNumber(0.1) -x.lessThanOrEqualTo(BigNumber(0.3).minus(0.2)) -BigNumber(-1).lte(x) -BigNumber(10, 18).lte('i', 36) - -x = new BigNumber(0.3) -x.minus(0.1) -x.sub(0.6, 20) - -x = new BigNumber(1) -x.modulo(0.9) -y = new BigNumber(33) -y.mod('a', 33) - -x = new BigNumber(1.8) -x.negated() -y = new BigNumber(-1.3) -y.neg() - -x = new BigNumber(0.1) -y = x.plus(0.2) -BigNumber(0.7).plus(x).add(y) -x.plus('0.1', 8) - -x = new BigNumber(1.234) -x.precision() -y = new BigNumber(987000) -y.sd() -y.sd(true) - -y = new BigNumber(x) -y.round() -y.round(1) -y.round(2) -y.round(10) -y.round(0, 1) -y.round(0, 6) -y.round(1, 1) -y.round(1, BigNumber.ROUND_HALF_EVEN) -y - -x = new BigNumber(1.23) -x.shift(3) -x.shift(-3) - -x = new BigNumber(16) -x.squareRoot() -y = new BigNumber(3) -y.sqrt() - -x = new BigNumber(0.6) -y = x.times(3) -BigNumber('7e+500').times(y) -x.times('-a', 16) - -BigNumber.config({ DECIMAL_PLACES: 5, ROUNDING_MODE: 4 }) -x = new BigNumber(9876.54321) - -x.toDigits() -x.toDigits(6) -x.toDigits(6, BigNumber.ROUND_UP) -x.toDigits(2) -x.toDigits(2, 1) -x - -y = new BigNumber(45.6) -y.toExponential() -y.toExponential(0) -y.toExponential(1) -y.toExponential(1, 1) -y.toExponential(3) - -y = new BigNumber(3.456) -y.toFixed() -y.toFixed(0) -y.toFixed(2) -y.toFixed(2, 1) -y.toFixed(5) - -var format = { - decimalSeparator: '.', - groupSeparator: ',', - groupSize: 3, - secondaryGroupSize: 0, - fractionGroupSeparator: ' ', - fractionGroupSize: 0 -} -BigNumber.config({ FORMAT: format }) - -x = new BigNumber('123456789.123456789') -x.toFormat() -x.toFormat(1) - -format.groupSeparator = ' ' -format.fractionGroupSize = 5 -x.toFormat() - -BigNumber.config({ - FORMAT: { - decimalSeparator: ',', - groupSeparator: '.', - groupSize: 3, - secondaryGroupSize: 2 - } -}) - -x.toFormat(6) - -x = new BigNumber(1.75) -x.toFraction() - -var pi = new BigNumber('3.14159265358') -pi.toFraction() -pi.toFraction(100000) -pi.toFraction(10000) -pi.toFraction(100) -pi.toFraction(10) -pi.toFraction(1) - -x = new BigNumber('177.7e+457') -y = new BigNumber(235.4325) -z = new BigNumber('0.0098074') - -var str = JSON.stringify([x, y, z]) - -JSON.parse(str, (key, val) => key === '' ? val : new BigNumber(val)) - -x = new BigNumber(456.789) -x.toNumber() -{ +x } - -y = new BigNumber('45987349857634085409857349856430985') -y.toNumber() - -z = new BigNumber(-0) -1 / +z -1 / z.toNumber() - -x = new BigNumber(0.7) -x.toPower(2) -BigNumber(3).pow(-2) - -y = new BigNumber(45.6) -x.toPrecision() -y.toPrecision() -x.toPrecision(1) -y.toPrecision(1) -y.toPrecision(2, 0) -y.toPrecision(2, 1) -x.toPrecision(5) -y.toPrecision(5) - -x = new BigNumber(750000) -x.toString() -BigNumber.config({ EXPONENTIAL_AT: 5 }) -x.toString() - -y = new BigNumber(362.875) -y.toString(2) -y.toString(9) -y.toString(32) - -BigNumber.config({ DECIMAL_PLACES: 4 }); -z = new BigNumber('1.23456789') -z.toString() -z.toString(10) - -x = new BigNumber(123.456) -x.truncated() -y = new BigNumber(-12.3) -y.trunc() - -x = new BigNumber('-0') -x.toString() -x.valueOf() -y = new BigNumber('1.777e+457') -y.valueOf() - -x = new BigNumber(0.123) -x.toExponential() -x.c -x.e -x.s - -z = new BigNumber('-123.4567000e+2') -z.toExponential() -z.c -z.e -z.s - -x = new BigNumber(3) -x instanceof BigNumber -x.isBigNumber - -BN = BigNumber.another(); - -y = new BN(3) -y instanceof BigNumber -y.isBigNumber - -y = new BigNumber(-0) -y.c -y.e -y.s - -try { - // ... -} catch (e) { - if (e instanceof Error && e.name == 'BigNumber Error') { - // ... - } -} - -x = new BigNumber("1.0") -y = new BigNumber("1.1000") -z = x.add(y) - -x = new BigNumber("1.20") -y = new BigNumber("3.45000") -z = x.mul(y) diff --git a/blueimp-md5/blueimp-md5-tests.ts b/blueimp-md5/blueimp-md5-tests.ts deleted file mode 100644 index 18edc69b57..0000000000 --- a/blueimp-md5/blueimp-md5-tests.ts +++ /dev/null @@ -1,6 +0,0 @@ - -import blueimp = require('blueimp-md5'); - -function hash(): boolean { - return blueimp.md5('hello world') === '5eb63bbbe01eeed093cb22bb8f5acdc3'; -} diff --git a/blueimp-md5/index.d.ts b/blueimp-md5/index.d.ts deleted file mode 100644 index b51f554e32..0000000000 --- a/blueimp-md5/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Type definitions for blueimp-md5 v1.1.0 -// Project: https://github.com/blueimp/JavaScript-MD5 -// Definitions by: Ray Martone -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export declare function md5(value: string, key?: string, raw?: boolean): string; diff --git a/chokidar/chokidar-tests.ts b/chokidar/chokidar-tests.ts deleted file mode 100644 index a67638e927..0000000000 --- a/chokidar/chokidar-tests.ts +++ /dev/null @@ -1,47 +0,0 @@ - - -import fs = require('fs'); -import chokidar = require('chokidar'); - -var watcher = chokidar.watch('file, dir, or glob', { - ignored: /[\/\\]\./, persistent: true -}); - -var log = console.log.bind(console); - -let str: string; -let any: any; -let stats: fs.Stats; - -watcher - .on('add', path => { str = path; }) - .on('addDir', path => { str = path; }) - .on('change', path => { str = path; }) - .on('unlink', path => { str = path; }) - .on('unlinkDir', path => { str = path; }) - .on('error', (error) => { any = error; }) - .on('ready', () => { }) - .on('raw', (event, path, details) => { str = event; str = path; any = details; }) - -// 'add', 'addDir' and 'change' events also receive stat() results as second -// argument when available: http://nodejs.org/api/fs.html#fs_class_fs_stats -watcher.on('change', (path, _stats) => { - str = path; - stats = _stats; -}); - -// Watch new files. -watcher.add('new-file'); -watcher.add(['new-file-2', 'new-file-3', '**/other-file*']); - -// Un-watch some files. -watcher.unwatch('new-file*'); - -// Only needed if watching is `persistent: true`. -watcher.close(); - -// One-liner -chokidar.watch('.', {ignored: /[\/\\]\./}).on('all', (event, path) => { - str = event; - str = path; -}); \ No newline at end of file diff --git a/chokidar/index.d.ts b/chokidar/index.d.ts deleted file mode 100644 index ab37a73948..0000000000 --- a/chokidar/index.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Type definitions for chokidar 1.4.3 -// Project: https://github.com/paulmillr/chokidar -// Definitions by: Stefan Steinhart -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -declare module "chokidar" -{ - export class FSWatcher - { - constructor(options?: WatchOptions); - add(fileDirOrGlob:string):void; - add(filesDirsOrGlobs:Array):void; - unwatch(fileDirOrGlob:string):void; - unwatch(filesDirsOrGlobs:Array):void; - getWatched():any; - on(event: 'add', fn: (path: string, stats?: fs.Stats) => void): this; - on(event: 'change', fn: (path: string, stats?: fs.Stats) => void): this; - on(event: 'unlink', fn: (path: string) => void): this; - on(event: 'raw', fn: (event: string, path:string, details:any) => void): this; - on(event: 'all', fn: (event: string, path: string) => void): this; - on(event: string, fn: (path: string) => void): this; - close(): this; - } - - interface WatchOptions - { - persistent?:boolean; - ignored?:any; - ignoreInitial?:boolean; - followSymlinks?:boolean; - cwd?:string; - usePolling?:boolean; - useFsEvents?:boolean; - alwaysStat?:boolean; - depth?:number; - interval?:number; - binaryInterval?:number; - ignorePermissionErrors?:boolean; - atomic?:boolean; - awaitWriteFinish?:any; - } - - import fs = require("fs"); - - export function watch(fileDirOrGlob:string, options?:WatchOptions):FSWatcher; - export function watch(filesDirsOrGlobs:Array, options?:WatchOptions):FSWatcher; -} diff --git a/cucumber/cucumber-tests.ts b/cucumber/cucumber-tests.ts deleted file mode 100644 index 3eb86b223f..0000000000 --- a/cucumber/cucumber-tests.ts +++ /dev/null @@ -1,134 +0,0 @@ -import * as assert from "power-assert"; -import cucumber = require("cucumber"); - -function StepSample() { - type Callback = cucumber.CallbackStepDefinition; - type Table = cucumber.TableDefinition; - type HookScenario = cucumber.HookScenario; - type Hooks = cucumber.Hooks; - var step = this; - var hook = this; - - hook.setWorldConstructor(function() { - this.visit = function(url: string, callback: Callback) { - callback(null, 'pending'); - } - }) - - hook.Before(function(scenario: HookScenario, callback: Callback){ - scenario.isFailed() && callback.pending(); - }); - - hook.Around(function(scenario: HookScenario, runScenario: (error:string, callback?:Function)=>void) { - scenario.isFailed() && runScenario(null, function(){ - console.log('finish tasks'); - }); - }); - - hook.registerHandler('AfterFeatures', function (event:any, callback:Function) { - callback(); - }); - - step.Given(/^I am on the Cucumber.js GitHub repository$/, function(callback:Callback) { - this.visit('https://github.com/cucumber/cucumber-js', callback); - }); - - step.When(/^I go to the README file$/, function(title:string, callback:Callback) { - callback(null, 'pending'); - }); - - step.Then(/^I should see "(.*)" as the page title$/, { timeout:60*1000}, function(title:string, callback:Callback) { - var pageTitle = this.browser.text('title'); - - if (title === pageTitle) { - callback(); - } else { - callback(new Error("Expected to be on page with title " + title)); - } - }); - - // Type for data_table.js on - // https://github.com/cucumber/cucumber-js/blob/a5fd8251918c278ab2e389226d165cedb44df14a/lib/cucumber/ast/data_table.js - - step.Given(/^a table step with Table raw$/, function(table:Table){ - var expected = [ - ['Cucumber', 'Cucumis sativus'], - ['Burr Gherkin', 'Cucumis anguria'] - ]; - - assert.deepEqual(table.raw(), expected); - }); - - step.Given(/^a table step with Table rows$/, function(table: Table){ - var expected = [ - ['Apricot', '5'], - ['Brocolli', '2'], - ['Cucumber', '10'] - ]; - assert.deepEqual(table.rows(), expected) - }); - - step.Given(/^a table step with Table rowHash$/, function(table:Table){ - var expected = { - 'Cucumber': 'Cucumis sativus', - 'Burr Gherkin': 'Cucumis anguria' - }; - assert.deepEqual(table.rowsHash(), expected) - }); - - step.Given(/^a table step$/, function(table:Table){ - var expected = [ - {'Vegetable': 'Apricot', 'Rating': '5'}, - {'Vegetable': 'Brocolli', 'Rating': '2'}, - {'Vegetable': 'Cucumber', 'Rating': '10'} - ]; - assert.deepEqual(table.hashes(), expected) - }); - - cucumber.defineSupportCode(function(step: cucumber.StepDefinitions){ - step.Given( /^a variable set to (\d+)$/, (x:string) => { - console.log("the number is: " + x); - } ); - }); - cucumber.defineSupportCode(function(step: Hooks){ - step.After((scenario: HookScenario, callback?: Callback) => { - console.log("After"); - callback(); - } ) - }); - - cucumber.defineSupportCode(function(hook: cucumber.Hooks){ - hook.addTransform({ - captureGroupRegexps: ['red|blue|green'], - transformer: (arg: string) => arg, - typeName: 'color' - }); - }); - - cucumber.defineSupportCode(function({After, Given}) { - Given( /^a variable set to (\d+)$/, (x:string) => { - console.log("the number is: " + x); - }); - After((scenario: HookScenario, callback?: Callback) => { - console.log("After"); - callback(); - }); - }); - - let fns : cucumber.SupportCodeConsumer[] = cucumber.getSupportCodeFns() - - cucumber.clearSupportCodeFns(); -} - -function registerListener(): cucumber.EventListener { - let listener = Object.assign(cucumber.Listener(), { - handleBeforeScenarioEvent: (scenario: cucumber.events.ScenarioPayload, callback: () => void) => { - - // do some interesting stuff ... - - callback(); - } - }); - - return listener; -} diff --git a/cucumber/index.d.ts b/cucumber/index.d.ts deleted file mode 100644 index 99f31c5372..0000000000 --- a/cucumber/index.d.ts +++ /dev/null @@ -1,224 +0,0 @@ -// Type definitions for cucumber-js -// Project: https://github.com/cucumber/cucumber-js -// Definitions by: Abraão Alves , Jan Molak -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export = cucumber; - -declare namespace cucumber { - - export interface CallbackStepDefinition{ - pending : () => PromiseLike; - (error?:any, pending?: string):void; - } - - export interface TableDefinition{ - raw: () => Array; - rows: () => Array; - rowsHash: () => {}; - hashes: () => {}; - } - - type StepDefinitionParam = string | CallbackStepDefinition | TableDefinition; - - interface StepDefinitionCode { - (...stepArgs: Array): PromiseLike | any | void; - } - - interface StepDefinitionOptions{ - timeout?: number; - } - - export interface StepDefinitions { - Given(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; - Given(pattern: RegExp | string, code: StepDefinitionCode): void; - When(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; - When(pattern: RegExp | string, code: StepDefinitionCode): void; - Then(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; - Then(pattern: RegExp | string, code: StepDefinitionCode): void; - setDefaultTimeout(time:number): void; - } - - interface HookScenario{ - getKeyword():string; - getName():string; - getDescription():string; - getUri():string; - getLine():number; - getTags():string[]; - getException():Error; - getAttachments():any[]; - attach(data:any, mimeType?:string, callback?:(err?:any) => void):void; - isSuccessful():boolean; - isFailed():boolean; - isPending():boolean; - isUndefined():boolean; - isSkipped():boolean; - } - - interface HookCode { - (scenario: HookScenario, callback?: CallbackStepDefinition): void; - } - - interface AroundCode{ - (scenario: HookScenario, runScenario?: (error:string, callback?:Function)=>void): void; - } - - interface Transform { - captureGroupRegexps: Array; - transformer: (arg: string) => any; - typeName: string; - } - - export interface Hooks { - Before(code: HookCode): void; - After(code: HookCode): void; - Around(code: AroundCode):void; - setDefaultTimeout(time:number): void; - setWorldConstructor(world: () => void): void; - registerHandler(handlerOption:string, code:(event:any, callback:CallbackStepDefinition) =>void): void; - registerListener(listener: EventListener): void; - addTransform(transform: Transform): void; - } - - export class EventListener { - hear(event: events.Event, callback: ()=>void): void; - hasHandlerForEvent(event: events.Event): boolean; - buildHandlerNameForEvent(event: events.Event): string; - getHandlerForEvent(event: events.Event): EventHook; - buildHandlerName(shortName: string): string; - setHandlerForEvent(shortName: string, handler: EventListener): void; - } - - export function Listener(): EventListener; - - export namespace events { - - interface Event { - getName(): string; - getPayloadItem(name: string): EventPayload; - } - - interface EventPayload { - } - - interface FeaturesPayload extends EventPayload { - getFeatures(): any[]; // https://github.com/cucumber/cucumber-js/blob/dc698bf5bc10d591fa7adeec5fa21b2d90dc9679/lib/cucumber/runtime.js#L34 - } - - interface FeaturesResultPayload extends EventPayload { - getDuration(): any; - getScenarioCounts(): any; - getStepCounts(): any; - isSuccessful(): boolean; - } - - interface FeaturePayload extends EventPayload { - getStepKeywordByLines(): any; - getScenarioKeyword(): string; - getKeyword(): string; - getName(): string; - getDescription(): string; - getUri(): string; - getLine(): number; - getTags(): Tag[]; - getScenarios(): ScenarioPayload[]; - getPayloadItem(): FeaturePayload; - } - - interface ScenarioPayload extends EventPayload { - getName(): string; - getKeyword(): string; - getDescription(): string; - getFeature(): FeaturePayload; - getUri(): string; - getUris(): string[]; - getLine(): number; - getLines(): number[]; - getTags(): Tag[]; - getSteps(): any[]; - getPayloadItem(): ScenarioPayload; - } - - interface ScenarioResultPayload extends EventPayload { - getFailureException(): Error; - getScenario(): any; - getStatus(): any; - } - - interface StepPayload extends EventPayload { - isHidden(): boolean; - isOutlineStep(): boolean; - getKeyword(): string; - getName(): string; - hasUri(): boolean; - getUri(): string; - getLine(): number; - getPreviousStep(): any; - hasPreviousStep(): boolean; - getAttachment(): any; - getAttachmentContents(): any; - getDocString(): string; - getDataTable(): any; - hasAttachment(): boolean; - hasDocString(): boolean; - hasDataTable(): boolean; - ensureDataTableIsAttached(): void; - isOutcomeStep(): boolean; - isEventStep(): boolean; - hasOutcomeStepKeyword(): boolean; - hasEventStepKeyword(): boolean; - isRepeatingOutcomeStep(): boolean; - isRepeatingEventStep(): boolean; - hasRepeatStepKeyword(): boolean; - isPrecededByOutcomeStep(): boolean; - isPrecededByEventStep(): boolean; - } - - interface StepResultPayload extends EventPayload { - getAmbiguousStepDefinitions(): any[]; - getAttachments(): any[]; - getDuration(): any; - getFailureException(): Error; - getStep(): any; - getStepDefinition(): any; - getStatus(): any; - hasAttachments(): boolean; - } - - } - - interface Tag { - getName(): string; - getLine(): number; - } - - export interface Scenario { - getKeyword(): string; - getName(): string; - getDescription(): string; - getUri(): string; - getLine(): number; - getTags(): Tag[]; - getException(): Error; - getAttachments(): any[]; - attach(data: any, mimeType?: string, callback?: (err?: any) => void): void; - isSuccessful(): boolean; - isFailed(): boolean; - isPending(): boolean; - isUndefined(): boolean; - isSkipped(): boolean; - } - - interface EventHook { - (event: events.Event, callback?: ()=>void): void; - } - - export interface SupportCodeConsumer { - (stepDefinitions:StepDefinitions & Hooks):void; - } - - export function defineSupportCode(consumer:SupportCodeConsumer): void; - export function getSupportCodeFns(): SupportCodeConsumer[]; - export function clearSupportCodeFns(): void; -} diff --git a/ej.web.all/tslint.json b/ej.web.all/tslint.json deleted file mode 100644 index b0b7c81ba5..0000000000 --- a/ej.web.all/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/fetch.io/index.d.ts b/fetch.io/index.d.ts deleted file mode 100644 index 3c4ff7d781..0000000000 --- a/fetch.io/index.d.ts +++ /dev/null @@ -1,126 +0,0 @@ -// Type definitions for fetch.io 3.1 -// Project: https://github.com/haoxins/fetch.io -// Definitions by: newraina -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - - type TUrl = string; - - type TMethod = 'delete' | 'get' | 'head' | 'options' | 'post' | 'put'; - - interface Query { - [key: string]: number | boolean | string; - } - - interface Header { - [key: string]: string; - } - - interface Options extends RequestInit { - - prefix?: string; - - query?: Query; - - header?: Header; - - beforeRequest?(url: TUrl, body: BodyInit): boolean; - - afterResponse?(res: Response): void; - - afterJSON?(body: any): void; - } - - declare namespace FetchIo { - - class Request { - - constructor(method: TMethod, url: TUrl, options: Options) - - /** - * HTTP delete method - */ - delete: (url: TUrl) => this; - - /** - * HTTP get method - */ - get: (url: TUrl) => this; - - /** - * HTTP head method - */ - head: (url: TUrl) => this; - - /** - * HTTP options method - */ - options: (url: TUrl) => this; - - /** - * HTTP post method - */ - post: (url: TUrl) => this; - - /** - * HTTP put method - */ - put: (url: TUrl) => this; - - /** - * Set Options - */ - config(key: string, value: any): this - - config(opts: {[key: string]: any}): this - - /** - * Set Header - */ - set(key: string, value: any): this - - set(opts: {[key: string]: any}): this - - /** - * Set Content-Type - */ - type(type: 'json' | 'form' | 'urlencoded'): this - - /** - * Add query string - */ - query(object: {[key: string]: any}): this - - /** - * Send data - */ - send(data: {[key: string]: any}): this - - /** - * ppend formData - */ - append(key: string, value: string): this - - /** - * Get Response directly - */ - then(resolve: (value?: Response) => void, reject?: (reason?: any) => void): Promise - - /** - * Make Response to JSON - */ - json(strict?: boolean): Promise - - /** - * Make Response to string - */ - text(): Promise - } - - class Fetch extends Request { - constructor(options?: Options) - } -} - -export default FetchIo.Fetch; diff --git a/fix b/fix deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/google-protobuf/google-protobuf-tests.ts b/google-protobuf/google-protobuf-tests.ts deleted file mode 100644 index 76d4f19fcc..0000000000 --- a/google-protobuf/google-protobuf-tests.ts +++ /dev/null @@ -1,139 +0,0 @@ -import * as jspb from "google-protobuf"; - -/* This is a typescript version of a simple generated class from a proto file that is shown below. In order to make - this ES5 JS file into TypeScript there have been quite a few modifications, but the same calls are made to the library - classes. - - // FILE: simple.proto - syntax = "proto3"; - - package examplecom; - - message MySimple { - string my_string = 1; - bool my_bool = 2; - repeated string some_labels = 3; - } -*/ - -class MySimple extends jspb.Message { - constructor(opt_data?: any) { - super(); // This isn't actually called in the JS version of this file, but it's required by TS - jspb.Message.initialize(this, opt_data, 0, -1, MySimple.repeatedFields_, null); - }; - - static repeatedFields_ = [3]; - - toObject(opt_includeInstance: boolean): {} { - return MySimple.toObject(opt_includeInstance, this); - }; - - static toObject(includeInstance: boolean, msg: MySimple): {} { - const obj: {} = { - myString: jspb.Message.getFieldWithDefault(msg, 1, ""), - myBool: jspb.Message.getFieldWithDefault(msg, 2, false), - someLabelsList: jspb.Message.getField(msg, 3), - }; - - if (includeInstance) { - // This is commented out because it's not valid in TS, but it's a simple append to an object - // obj['$jspbMessageInstance'] = msg; - } - return obj; - }; - - static deserializeBinary(bytes: Uint8Array) { - const reader = new jspb.BinaryReader(bytes); - const msg = new MySimple(); - return MySimple.deserializeBinaryFromReader(msg, reader); - }; - - static deserializeBinaryFromReader(msg: MySimple, reader: jspb.BinaryReader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - const field = reader.getFieldNumber(); - switch (field) { - case 1: - const value1 = (reader.readString()); - msg.setMyString(value1); - break; - case 2: - const value2 = (reader.readBool()); - msg.setMyBool(value2); - break; - case 3: - const value3 = (reader.readString()); - msg.addSomeLabels(value3); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - - serializeBinary(): Uint8Array { - const writer = new jspb.BinaryWriter(); - MySimple.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - - static serializeBinaryToWriter(message: MySimple, writer: jspb.BinaryWriter) { - let f1 = message.getMyString(); - if (f1.length > 0) { - writer.writeString( - 1, - f1, - ); - } - const f2 = message.getMyBool(); - if (f2) { - writer.writeBool( - 2, - f2, - ); - } - const f3 = message.getSomeLabelsList(); - if (f3.length > 0) { - writer.writeRepeatedString( - 3, - f3, - ); - } - } - - getMyString(): string { - return jspb.Message.getFieldWithDefault(this, 1, ""); - } - - setMyString(value: string) { - jspb.Message.setField(this, 1, value); - } - - getMyBool(): boolean { - return jspb.Message.getFieldWithDefault(this, 2, false); - } - - setMyBool(value: boolean) { - jspb.Message.setField(this, 2, value); - } - - getSomeLabelsList(): string[] { - return jspb.Message.getField(this, 3); - } - - setSomeLabelsList(value: string[]) { - jspb.Message.setField(this, 3, value || []); - } - - addSomeLabels(value: string, opt_index?: number) { - jspb.Message.addToRepeatedField(this, 3, value, opt_index); - } - - clearSomeLabelsList() { - this.setSomeLabelsList([]); - } -} diff --git a/google-protobuf/index.d.ts b/google-protobuf/index.d.ts deleted file mode 100644 index cf6a7e218a..0000000000 --- a/google-protobuf/index.d.ts +++ /dev/null @@ -1,687 +0,0 @@ -// Type definitions for google-protobuf 3.2 -// Project: https://github.com/google/google-protobuf -// Definitions by: Marcus Longmuir -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -type ByteSource = ArrayBuffer|Uint8Array|number[]|string; -type ScalarFieldType = boolean|number|string; -type RepeatedFieldType = ScalarFieldType[] | Uint8Array[]; -type AnyFieldType = ScalarFieldType | RepeatedFieldType | Uint8Array; -type FieldValue = (string|number|boolean|Uint8Array|any/*This should be Array, but that isn't allowed*/|undefined) - -export abstract class Message { - getJsPbMessageId(): (string | undefined); - static initialize(msg: Message, - data: Message.MessageArray, - messageId: (string | number), - suggestedPivot: number, - repeatedFields: number[], - oneofFields?: number[][] | null): void; - static toObjectList(field: T[], - toObjectFn: (includeInstance: boolean, - data: T) => {}, - includeInstance?: boolean): {}[]; - static toObjectExtension(msg: Message, - obj: {}, - extensions: {[key: number]: ExtensionFieldInfo}, - getExtensionFn: (fieldInfo: ExtensionFieldInfo) => Message, - includeInstance?: boolean): void; - serializeBinaryExtensions(proto: Message, - writer: BinaryWriter, - extensions: {[key: number]: ExtensionFieldBinaryInfo}, - getExtensionFn: (fieldInfo: ExtensionFieldInfo) => T): void - readBinaryExtension(proto: Message, - reader: BinaryReader, - extensions: {[key: number]: ExtensionFieldBinaryInfo}, - setExtensionFn: (fieldInfo: ExtensionFieldInfo, - val: T) => void): void - static getField(msg: Message, - fieldNumber: number): FieldValue|null; - static getOptionalFloatingPointField(msg: Message, - fieldNumber: number): (number | undefined); - static getRepeatedFloatingPointField(msg: Message, - fieldNumber: number): number[]; - static bytesAsB64(bytes: Uint8Array): string; - static bytesAsU8(str: string): Uint8Array; - static bytesListAsB64(bytesList: Uint8Array[]): string[]; - static bytesListAsU8(strList: string[]): Uint8Array[]; - static getFieldWithDefault(msg: Message, - fieldNumber: number, - defaultValue: T): T; - static getMapField(msg: Message, - fieldNumber: number, - noLazyCreate: boolean, - valueCtor: typeof Message): Map; - static setField(msg: Message, - fieldNumber: number, - value: FieldValue): void; - static addToRepeatedField(msg: Message, - fieldNumber: number, - value: any, - index?: number): void; - static setOneofField(msg: Message, - fieldNumber: number, - oneof: number[], - value: FieldValue): void; - static computeOneofCase(msg: Message, - oneof: number[]): number; - static getWrapperField(msg: Message, - ctor: typeof Message, - fieldNumber: number, - required?: number): Message; - static getRepeatedWrapperField(msg: Message, - ctor: typeof Message, - fieldNumber: number): Message[]; - static setWrapperField(msg: Message, - fieldNumber: number, - value?: (Message|Map)): void; - static setOneofWrapperField(msg: Message, - fieldNumber: number, - oneof: number[], - value: any): void; - static setRepeatedWrapperField(msg: Message, - fieldNumber: number, - value: any): void; - static addToRepeatedWrapperField(msg: Message, - fieldNumber: number, - value: any, - ctor: typeof Message, - index: number): any; - static toMap(field: any[], - mapKeyGetterFn: (field: any) => string, - toObjectFn?: Message.StaticToObject, - includeInstance?: boolean): void; - toArray(): Message.MessageArray; - toString(): string; - getExtension(fieldInfo: ExtensionFieldInfo): T; - setExtension(fieldInfo: ExtensionFieldInfo, - value: T): void; - static difference(m1: T, - m2: T): T; - static equals(m1: Message, - m2: Message): boolean; - static compareExtensions(extension1: {}, - extension2: {}): boolean; - static compareFields(field1: any, - field2: any): boolean; - cloneMessage(): Message; - clone(): Message; - static clone(msg: T): T; - static cloneMessage(msg: T): T; - static copyInto(fromMessage: Message, - toMessage: Message): void; - static registerMessageType(id: number, - constructor: typeof Message): void; - - abstract serializeBinary(): Uint8Array; - abstract toObject(includeInstance?: boolean): {}; - - // These are `abstract static`, but that isn't allowed. Subclasses of Message will have these methods and properties - // and not having them on Message makes using this class for its intended purpose quite difficult. - static deserializeBinary(bytes: Uint8Array): Message; - static deserializeBinaryFromReader(message: Message, reader: BinaryReader): Message; - static serializeBinaryToWriter(message: Message, writer: BinaryWriter): void; - static toObject(includeInstance: boolean, msg: Message): {}; - static extensions: {[key: number]: ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: ExtensionFieldBinaryInfo}; -} - -export namespace Message { - export type MessageArray = any[]; // This type needs to reference itself - interface StaticToObject { - (includeInstance: boolean, - msg: Message): {}; - } -} - -export class ExtensionFieldInfo { - fieldIndex: number; - fieldName: number; - ctor: typeof Message; - toObjectFn: Message.StaticToObject; - isRepeated: number; - constructor(fieldIndex: number, - fieldName: {[key: string]: number}, - ctor: typeof Message, - toObjectFn: Message.StaticToObject, - isRepeated: number); - isMessageType(): boolean; -} - -export class ExtensionFieldBinaryInfo { - fieldInfo: ExtensionFieldInfo; - binaryReaderFn: BinaryRead; - binaryWriterFn: BinaryWrite; - opt_binaryMessageSerializeFn: (msg: Message, - writer: BinaryWriter) => void; - opt_binaryMessageDeserializeFn: (msg: Message, - reader: BinaryReader) => Message; - opt_isPacked: boolean; - constructor(fieldInfo: ExtensionFieldInfo, - binaryReaderFn: BinaryRead, - binaryWriterFn: BinaryWrite, - opt_binaryMessageSerializeFn: (msg: Message, - writer: BinaryWriter) => void, - opt_binaryMessageDeserializeFn: (msg: Message, - reader: BinaryReader) => Message, - opt_isPacked: boolean); -} - -export class Map { - constructor(arr: Array<[K, V]>, - valueCtor?: {new(init: any): V}); - toArray(): Array<[K, V]>; - toObject(includeInstance: boolean, - valueToObject: (includeInstance: boolean) => any): Array<[K, V]>; - static fromObject(entries: Array<[K, V]>, - valueCtor: any, - valueFromObject: any): Map; - getLength(): number; - clear(): void; - del(key: K): boolean; - getEntryList(): Array<[K, V]>; - entries(): Map.Iterator<[K, V]>; - keys(): Map.Iterator; - forEach(callback: (entry: V, - key: K) => void, - thisArg?: {}): void; - set(key: K, - value: V): void; - get(key: K): (V | undefined); - has(key: K): boolean; -} - -export namespace Map { - // This is implemented by jspb.Map.ArrayIteratorIterable_, but that class shouldn't be exported - interface Iterator { - next(): IteratorResult; - } - type IteratorResult = { - done: boolean, - value: T, - } -} - -interface BinaryReadReader { - (msg: any, - binaryReader: BinaryReader): void; -} - -interface BinaryRead { - (msg: any, - reader: BinaryReadReader): void; -} - -interface BinaryWriteCallback { - (value: any, - binaryWriter: BinaryWriter): void; -} - -interface BinaryWrite { - (fieldNumber: number, - value: any, - writerCallback: BinaryWriteCallback): void; -} - -export class BinaryReader { - constructor(bytes?: ByteSource, - start?: number, - length?: number); - static alloc(bytes?: ByteSource, - start?: number, - length?: number): BinaryReader; - alloc(bytes?: ByteSource, - start?: number, - length?: number): BinaryReader; - free(): void; - getFieldCursor(): number; - getCursor(): number; - getBuffer(): Uint8Array; - getFieldNumber(): number; - getWireType(): BinaryConstants.WireType; - isEndGroup(): boolean; - getError(): boolean; - setBlock(bytes?: ByteSource, - start?: number, - length?: number): void; - reset(): void; - advance(count: number): void; - nextField(): boolean; - unskipHeader(): void; - skipMatchingFields(): void; - skipVarintField(): void; - skipDelimitedField(): void; - skipFixed32Field(): void; - skipFixed64Field(): void; - skipGroup(): void; - skipField(): void; - registerReadCallback(callbackName: string, - callback: (binaryReader: BinaryReader) => any): void; - runReadCallback(callbackName: string): any; - readAny(fieldType: BinaryConstants.FieldType): AnyFieldType; - readMessage: BinaryRead; - readGroup(field: number, - message: Message, - reader: BinaryReadReader): void; - getFieldDecoder(): BinaryDecoder; - readInt32(): number; - readInt32String(): string; - readInt64(): number; - readInt64String(): string; - readUint32(): number; - readUint32String(): string; - readUint64(): number; - readUint64String(): string; - readSint32(): number; - readSint64(): number; - readSint64String(): string; - readFixed32(): number; - readFixed64(): number; - readFixed64String(): string; - readSfixed32(): number; - readSfixed32String(): string; - readSfixed64(): number; - readSfixed64String(): string; - readFloat(): number; - readDouble(): number; - readBool(): boolean; - readEnum(): number; - readString(): string; - readBytes(): Uint8Array; - readVarintHash64(): string; - readFixedHash64(): string; - readPackedInt32(): number[]; - readPackedInt32String(): string[]; - readPackedInt64(): number[]; - readPackedInt64String(): string[]; - readPackedUint32(): number[]; - readPackedUint32String(): string[]; - readPackedUint64(): number[]; - readPackedUint64String(): string[]; - readPackedSint32(): number[]; - readPackedSint64(): number[]; - readPackedSint64String(): string[]; - readPackedFixed32(): number[]; - readPackedFixed64(): number[]; - readPackedFixed64String(): string[]; - readPackedSfixed32(): number[]; - readPackedSfixed64(): number[]; - readPackedSfixed64String(): string[]; - readPackedFloat(): number[]; - readPackedDouble(): number[]; - readPackedBool(): boolean[]; - readPackedEnum(): number[]; - readPackedVarintHash64(): string[]; - readPackedFixedHash64(): string[]; -} - -export class BinaryWriter { - constructor(); - writeSerializedMessage(bytes: Uint8Array, - start: number, - end: number): void; - maybeWriteSerializedMessage(bytes?: Uint8Array, - start?: number, - end?: number): void; - reset(): void; - getResultBuffer(): Uint8Array; - getResultBase64String(): string; - beginSubMessage(field: number): void; - endSubMessage(field: number): void; - writeAny(fieldType: BinaryConstants.FieldType, - field: number, - value: AnyFieldType): void; - writeInt32(field: number, - value?: number): void; - writeInt32String(field: number, - value?: string): void; - writeInt64(field: number, - value?: number): void; - writeInt64String(field: number, - value?: string): void; - writeUint32(field: number, - value?: number): void; - writeUint32String(field: number, - value?: string): void; - writeUint64(field: number, - value?: number): void; - writeUint64String(field: number, - value?: string): void; - writeSint32(field: number, - value?: number): void; - writeSint64(field: number, - value?: number): void; - writeSint64String(field: number, - value?: string): void; - writeFixed32(field: number, - value?: number): void; - writeFixed64(field: number, - value?: number): void; - writeFixed64String(field: number, - value?: string): void; - writeSfixed32(field: number, - value?: number): void; - writeSfixed64(field: number, - value?: number): void; - writeSfixed64String(field: number, - value?: string): void; - writeFloat(field: number, - value?: number): void; - writeDouble(field: number, - value?: number): void; - writeBool(field: number, - value?: boolean): void; - writeEnum(field: number, - value?: number): void; - writeString(field: number, - value?: string): void; - writeBytes(field: number, - value?: ByteSource): void; - writeMessage: BinaryWrite; - writeGroup(field: number, - value: any, - writeCallback: BinaryWriteCallback): void; - writeFixedHash64(field: number, - value?: string): void; - writeVarintHash64(field: number, - value?: string): void; - writeRepeatedInt32(field: number, - value?: number[]): void; - writeRepeatedInt32String(field: number, - value?: string[]): void; - writeRepeatedInt64(field: number, - value?: number[]): void; - writeRepeatedInt64String(field: number, - value?: string[]): void; - writeRepeatedUint32(field: number, - value?: number[]): void; - writeRepeatedUint32String(field: number, - value?: string[]): void; - writeRepeatedUint64(field: number, - value?: number[]): void; - writeRepeatedUint64String(field: number, - value?: string[]): void; - writeRepeatedSint32(field: number, - value?: number[]): void; - writeRepeatedSint64(field: number, - value?: number[]): void; - writeRepeatedSint64String(field: number, - value?: string[]): void; - writeRepeatedFixed32(field: number, - value?: number[]): void; - writeRepeatedFixed64(field: number, - value?: number[]): void; - writeRepeatedFixed64String(field: number, - value?: string[]): void; - writeRepeatedSfixed32(field: number, - value?: number[]): void; - writeRepeatedSfixed64(field: number, - value?: number[]): void; - writeRepeatedSfixed64String(field: number, - value?: string[]): void; - writeRepeatedFloat(field: number, - value?: number[]): void; - writeRepeatedDouble(field: number, - value?: number[]): void; - writeRepeatedBool(field: number, - value?: boolean[]): void; - writeRepeatedEnum(field: number, - value?: number[]): void; - writeRepeatedString(field: number, - value?: string[]): void; - writeRepeatedBytes(field: number, - value?: ByteSource[]): void; - writeRepeatedMessage(field: number, - value: Message[], - writerCallback: BinaryWriteCallback): void; - writeRepeatedGroup(field: number, - value: Message[], - writerCallback: BinaryWriteCallback): void; - writeRepeatedFixedHash64(field: number, - value?: string[]): void; - writeRepeatedVarintHash64(field: number, - value?: string[]): void; - writePackedInt32(field: number, - value?: number[]): void; - writePackedInt32String(field: number, - value?: string[]): void; - writePackedInt64(field: number, - value?: number[]): void; - writePackedInt64String(field: number, - value?: string[]): void; - writePackedUint32(field: number, - value?: number[]): void; - writePackedUint32String(field: number, - value?: string[]): void; - writePackedUint64(field: number, - value?: number[]): void; - writePackedUint64String(field: number, - value?: string[]): void; - writePackedSint32(field: number, - value?: number[]): void; - writePackedSint64(field: number, - value?: number[]): void; - writePackedSint64String(field: number, - value?: string[]): void; - writePackedFixed32(field: number, - value?: number[]): void; - writePackedFixed64(field: number, - value?: number[]): void; - writePackedFixed64String(field: number, - value?: string[]): void; - writePackedSfixed32(field: number, - value?: number[]): void; - writePackedSfixed64(field: number, - value?: number[]): void; - writePackedSfixed64String(field: number, - value?: string[]): void; - writePackedFloat(field: number, - value?: number[]): void; - writePackedDouble(field: number, - value?: number[]): void; - writePackedBool(field: number, - value?: boolean[]): void; - writePackedEnum(field: number, - value?: number[]): void; - writePackedFixedHash64(field: number, - value?: string[]): void; - writePackedVarintHash64(field: number, - value?: string[]): void; -} - -export class BinaryEncoder { - constructor(); - length(): number; - end(): number[]; - writeSplitVarint64(lowBits: number, - highBits: number): void; - writeSplitFixed64(lowBits: number, - highBits: number): void; - writeUnsignedVarint32(value: number): void; - writeSignedVarint32(value: number): void; - writeUnsignedVarint64(value: number): void; - writeSignedVarint64(value: number): void; - writeZigzagVarint32(value: number): void; - writeZigzagVarint64(value: number): void; - writeZigzagVarint64String(value: string): void; - writeUint8(value: number): void; - writeUint16(value: number): void; - writeUint32(value: number): void; - writeUint64(value: number): void; - writeInt8(value: number): void; - writeInt16(value: number): void; - writeInt32(value: number): void; - writeInt64(value: number): void; - writeInt64String(value: string): void; - writeFloat(value: number): void; - writeDouble(value: number): void; - writeBool(value: boolean): void; - writeEnum(value: number): void; - writeBytes(bytes: Uint8Array): void; - writeVarintHash64(hash: string): void; - writeFixedHash64(hash: string): void; - writeString(value: string): number; -} - -export class BinaryDecoder { - constructor(bytes?: ByteSource, - start?: number, - length?: number) - static alloc(bytes?: ByteSource, - start?: number, - length?: number): BinaryDecoder; - free(): void; - clone(): BinaryDecoder; - clear(): void; - getBuffer(): Uint8Array; - setBlock(data: ByteSource, - start?: number, - length?: number): void; - getEnd(): number; - setEnd(end: number): void; - reset(): void; - getCursor(): number; - setCursor(cursor: number): void; - advance(count: number): void; - atEnd(): boolean; - pastEnd(): boolean; - getError(): boolean; - skipVarint(): void; - unskipVarint(value: number): void; - readUnsignedVarint32(): number; - readSignedVarint32(): number; - readUnsignedVarint32String(): number; - readSignedVarint32String(): number; - readZigzagVarint32(): number; - readUnsignedVarint64(): number; - readUnsignedVarint64String(): number; - readSignedVarint64(): number; - readSignedVarint64String(): number; - readZigzagVarint64(): number; - readZigzagVarint64String(): number; - readUint8(): number; - readUint16(): number; - readUint32(): number; - readUint64(): number; - readUint64String(): string; - readInt8(): number; - readInt16(): number; - readInt32(): number; - readInt64(): number; - readInt64String(): string; - readFloat(): number; - readDouble(): number; - readBool(): boolean; - readEnum(): number; - readString(length: number): string; - readStringWithLength(): string; - readBytes(length: number): Uint8Array; - readVarintHash64(): string; - readFixedHash64(): string; -} - -export class BinaryIterator { - constructor(decoder?: BinaryDecoder, - next?: () => number|boolean|string|null, - elements?: Array) - static alloc(decoder?: BinaryDecoder, - next?: () => number|boolean|string|null, - elements?: Array): BinaryIterator; - free(): void; - clear(): void; - get(): (ScalarFieldType | null); - atEnd(): boolean; - next(): (ScalarFieldType | null); -} - -export namespace BinaryConstants { - export enum FieldType { - INVALID = -1, - DOUBLE = 1, - FLOAT = 2, - INT64 = 3, - UINT64 = 4, - INT32 = 5, - FIXED64 = 6, - FIXED32 = 7, - BOOL = 8, - STRING = 9, - GROUP = 10, - MESSAGE = 11, - BYTES = 12, - UINT32 = 13, - ENUM = 14, - SFIXED32 = 15, - SFIXED64 = 16, - SINT32 = 17, - SINT64 = 18, - FHASH64 = 30, - VHASH64 = 31, - } - - export enum WireType { - INVALID = -1, - VARINT = 0, - FIXED64 = 1, - DELIMITED = 2, - START_GROUP = 3, - END_GROUP = 4, - FIXED32 = 5, - } - - const FieldTypeToWireType: (fieldType: FieldType) => WireType; - - const INVALID_FIELD_NUMBER: number; - const FLOAT32_EPS: number; - const FLOAT32_MIN: number; - const FLOAT32_MAX: number; - const FLOAT64_EPS: number; - const FLOAT64_MIN: number; - const FLOAT64_MAX: number; - const TWO_TO_20: number; - const TWO_TO_23: number; - const TWO_TO_31: number; - const TWO_TO_32: number; - const TWO_TO_52: number; - const TWO_TO_63: number; - const TWO_TO_64: number; - const ZERO_HASH: string; -} - -export namespace arith { - export class UInt64 { - lo: number; - hi: number; - constructor(lo: number, - hi: number); - cmp(other: UInt64): number; - rightShift(): UInt64; - leftShift(): UInt64; - msb(): boolean; - lsb(): boolean; - zero(): boolean; - add(other: UInt64): UInt64; - sub(other: UInt64): UInt64; - static mul32x32(a: number, - b: number): UInt64; - mul(a: number): UInt64; - div(divisor: number): [UInt64, UInt64]; - toString(): string; - static fromString(str: string): UInt64; - clone(): UInt64; - } - - export class Int64 { - lo: number; - hi: number; - constructor(lo: number, - hi: number); - add(other: Int64): Int64; - sub(other: Int64): Int64; - clone(): Int64; - toString(): string; - static fromString(str: string): Int64; - } -} - -// jspb.utils package excluded as it likely shouldn't be called by user code \ No newline at end of file diff --git a/google.analytics/index.d.ts b/google.analytics/index.d.ts deleted file mode 100644 index 0f86e0be40..0000000000 --- a/google.analytics/index.d.ts +++ /dev/null @@ -1,106 +0,0 @@ -// Type definitions for Google Analytics (Classic and Universal) -// Project: https://developers.google.com/analytics/devguides/collection/gajs/, https://developers.google.com/analytics/devguides/collection/analyticsjs/method-reference -// Definitions by: Ronnie Haakon Hegelund , Pat Kujawa -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare class Tracker { - _trackPageview(): void; - _getName(): string; - _getAccount(): string; - _getVersion(): string; - _getVisitorCustomVar(index: number): string; - _setAccount(): string; - _setCustomVar(index: number, name: string, value: string, opt_scope?: number): boolean; - _setSampleRate(newRate: string): void; - _setSessionCookieTimeout(cookieTimeoutMillis: number): void; - _setSiteSpeedSampleRate(sampleRate: number): void; - _setVisitorCookieTimeout(milliseconds: number): void; - _trackPageLoadTime(): void; -} - -interface GoogleAnalyticsCode { - push(commandArray: string[]): void; - push(func: Function): void; -} - -interface GoogleAnalyticsTracker { - _getTracker(account: string): Tracker; - _createTracker(opt_account: string, opt_name?: string): Tracker; - _getTrackerByName(opt_name?: string): Tracker; - _anonymizeIp(): void; -} - -interface GoogleAnalytics { - type: string; - src: string; - async: boolean; -} - -declare namespace UniversalAnalytics { - // https://developers.google.com/analytics/devguides/collection/analyticsjs/method-reference - - enum HitType { - 'pageview', 'screenview', 'event', 'transaction', 'item', 'social', 'exception', 'timing' - } - - interface ga { - l: number; - q: any[]; - - (command: 'send', hitType: 'event', eventCategory: string, eventAction: string, - eventLabel?: string, eventValue?: number, fieldsObject?: {}): void; - (command: 'send', hitType: 'event', fieldsObject: { - eventCategory: string, - eventAction: string, - eventLabel?: string, - eventValue?: number, - nonInteraction?: boolean}): void; - (command: 'send', fieldsObject: { - hitType: HitType, // 'event' - eventCategory: string, - eventAction: string, - eventLabel?: string, - eventValue?: number, - nonInteraction?: boolean}): void; - (command: 'send', hitType: 'pageview', page: string): void; - (command: 'send', hitType: 'social', - socialNetwork: string, socialAction: string, socialTarget: string): void; - (command: 'send', hitType: 'social', - fieldsObject: {socialNetwork: string, socialAction: string, socialTarget: string}): void; - (command: 'send', hitType: 'timing', - timingCategory: string, timingVar: string, timingValue: number): void; - (command: 'send', hitType: 'timing', - fieldsObject: {timingCategory: string, timingVar: string, timingValue: number}): void; - (command: 'send', fieldsObject: {}): void; - (command: string, hitType: HitType, ...fields: any[]): void; - - (command: 'create', trackingId: string, cookieDomain?: string, name?: string, fieldsObject?: {}): void; - (command: 'remove'): void; - - (command: string, ...fields: any[]): void; - - (readyCallback: (defaultTracker?: UniversalAnalytics.Tracker) => void): void; - - create(trackingId: string, cookieDomain: string, name: string, fieldsObject?: {}): UniversalAnalytics.Tracker; - create(trackingId: string, cookieDomain: string, fieldsObject?: {}): UniversalAnalytics.Tracker; - create(trackingId: string, fieldsObject?: {}): UniversalAnalytics.Tracker; - - getAll(): UniversalAnalytics.Tracker[]; - getByName(name: string): UniversalAnalytics.Tracker; - remove(name: string): void; - } - - interface Tracker { - get(fieldName: string): T; - send(hitType: string, opt_fieldObject?: {}): void; - set(fieldName: string, value: string): void; - set(fieldName: string, value: {}): void; - set(fieldName: string, value: number): void; - set(fieldName: string, value: boolean): void; - } -} - -declare var gaClassic: GoogleAnalytics; -declare var ga: UniversalAnalytics.ga; -declare var _gaq: GoogleAnalyticsCode; -declare var _gat: GoogleAnalyticsTracker; diff --git a/highcharts/modules/map/index.d.ts b/highcharts/modules/map/index.d.ts deleted file mode 100644 index 9818729a62..0000000000 --- a/highcharts/modules/map/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Type definitions for Highmaps 4.2.7 -// Project: http://www.highcharts.com/products/highmaps -// Definitions by: Albert Ozimek -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -import { Static } from 'highcharts'; - -declare module 'highcharts' { - export interface Static { - mapChart(renderTo: string | HTMLElement, options: Options, callback?: (chart: ChartObject) => void): ChartObject; - } -} - diff --git a/highcharts/test/no-data-to-display.ts b/highcharts/test/no-data-to-display.ts deleted file mode 100644 index e2bb453714..0000000000 --- a/highcharts/test/no-data-to-display.ts +++ /dev/null @@ -1,8 +0,0 @@ -function test_NoDataToDisplay() { - var chart = $("#container").highcharts(); - var chartHasData = chart.hasData(); - chart.hideNoData(); - chart.showNoData("Custom no data message"); -} - -HighchartsNoDataToDisplay(Highcharts); \ No newline at end of file diff --git a/htmlhint/htmlhint-tests.ts b/htmlhint/htmlhint-tests.ts deleted file mode 100644 index 1a44c78888..0000000000 --- a/htmlhint/htmlhint-tests.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { HTMLHint, RuleSet } from "htmlhint"; - -const htmlHintRules: RuleSet = { - "tagname-lowercase": true, - "attr-lowercase": true, - "attr-value-double-quotes": true, - "doctype-first": true, - "tag-pair": true, - "spec-char-escape": true, - "id-unique": true, - "src-not-empty": true, - "attr-no-duplication": true, - "title-require": true -}; - -const result = HTMLHint.verify('', htmlHintRules); -const formatted = HTMLHint.format(result, { indent: 2 }); diff --git a/http-codes/index.d.ts b/http-codes/index.d.ts deleted file mode 100644 index e106812f0c..0000000000 --- a/http-codes/index.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -// Type definitions for http-codes 1.0 -// Project: https://github.com/flesler/node-http-codes -// Definitions by: Mohamed Hegazy -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export declare const ACCEPTED: number; -export declare const ALREADY_REPORTED: number; -export declare const BAD_GATEWAY: number; -export declare const BAD_REQUEST: number; -export declare const BANDWIDTH_LIMIT_EXCEEDED: number; -export declare const CONFLICT: number; -export declare const CONTINUE: number; -export declare const CREATED: number; -export declare const EXPECTATION_FAILED: number; -export declare const FAILED_DEPENDENCY: number; -export declare const FORBIDDEN: number; -export declare const FOUND: number; -export declare const GATEWAY_TIMEOUT: number; -export declare const GONE: number; -export declare const HTTP_VERSION_NOT_SUPPORTED: number; -export declare const IM_A_TEAPOT: number; -export declare const IM_USED: number; -export declare const INSUFFICIENT_STORAGE: number; -export declare const INTERNAL_SERVER_ERROR: number; -export declare const LENGTH_REQUIRED: number; -export declare const LOCKED: number; -export declare const LOOP_DETECTED: number; -export declare const METHOD_NOT_ALLOWED: number; -export declare const MISDIRECTED_REQUEST: number; -export declare const MOVED_PERMANENTLY: number; -export declare const MULTIPLE_CHOICES: number; -export declare const MULTI_STATUS: number; -export declare const NETWORK_AUTHENTICATION_REQUIRED: number; -export declare const NON_AUTHORITATIVE_INFORMATION: number; -export declare const NOT_ACCEPTABLE: number; -export declare const NOT_EXTENDED: number; -export declare const NOT_FOUND: number; -export declare const NOT_IMPLEMENTED: number; -export declare const NOT_MODIFIED: number; -export declare const NO_CONTENT: number; -export declare const OK: number; -export declare const PARTIAL_CONTENT: number; -export declare const PAYLOAD_TOO_LARGE: number; -export declare const PAYMENT_REQUIRED: number; -export declare const PERMANENT_REDIRECT: number; -export declare const PRECONDITION_FAILED: number; -export declare const PRECONDITION_REQUIRED: number; -export declare const PROCESSING: number; -export declare const PROXY_AUTHENTICATION_REQUIRED: number; -export declare const RANGE_NOT_SATISFIABLE: number; -export declare const REQUEST_HEADER_FIELDS_TOO_LARGE: number; -export declare const REQUEST_TIMEOUT: number; -export declare const RESET_CONTENT: number; -export declare const SEE_OTHER: number; -export declare const SERVICE_UNAVAILABLE: number; -export declare const SWITCHING_PROTOCOLS: number; -export declare const TEMPORARY_REDIRECT: number; -export declare const TOO_MANY_REQUESTS: number; -export declare const UNAUTHORIZED: number; -export declare const UNAVAILABLE_FOR_LEGAL_REASONS: number; -export declare const UNORDERED_COLLECTION: number; -export declare const UNPROCESSABLE_ENTITY: number; -export declare const UNSUPPORTED_MEDIA_TYPE: number; -export declare const UPGRADE_REQUIRED: number; -export declare const URI_TOO_LONG: number; -export declare const USE_PROXY: number; -export declare const VARIANT_ALSO_NEGOTIATES: number; diff --git a/jmespath/jmespath-tests.ts b/jmespath/jmespath-tests.ts deleted file mode 100644 index 04034acf67..0000000000 --- a/jmespath/jmespath-tests.ts +++ /dev/null @@ -1,6 +0,0 @@ -import jmespath = require("jmespath"); - -const a = jmespath.search({foo: {bar: {baz: [0, 1, 2, 3, 4]}}}, "foo.bar.baz[2]"); -const b = jmespath.search({foo: {bar: {baz: [0, 1, 2, 3, 4]}}}, "foo.bar") -const c = jmespath.search({"foo": [{"first": "a", "last": "b"}, {"first": "c", "last": "d"}]}, "foo[*].first"); -const d = jmespath.search({"foo": [{"age": 20}, {"age": 25}, {"age": 30}, {"age": 35}, {"age": 40}]}, "foo[?age > `30`]"); diff --git a/jointjs/index.d.ts b/jointjs/index.d.ts deleted file mode 100644 index 95e2b2b7e3..0000000000 --- a/jointjs/index.d.ts +++ /dev/null @@ -1,896 +0,0 @@ -// Type definitions for Joint JS 1.0.1 -// Project: http://www.jointjs.com/ -// Definitions by: Aidan Reel , David Durman , Ewout Van Gossum , Federico Caselli , Chris Moran -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// typings: https://github.com/CaselIT/typings-jointjs - -/// - - -declare namespace joint { - export var g: any; - export var V: any; - - namespace dia { - interface Size { - width: number; - height: number; - } - - interface Point { - x: number; - y: number; - } - - interface BBox extends Point, Size { } - - interface TranslateOptions { - restrictedArea?: BBox; - transition?: TransitionOptions; - } - - interface TransitionOptions { - delay?: number; - duration?: number; - timingFunction?: (t: number) => number; - valueFunction?: (a: any, b: any) => (t: number) => any; - } - - interface DfsBfsOptions { - inbound?: boolean; - outbound?: boolean; - deep?: boolean; - } - - interface ExploreOptions { - breadthFirst?: boolean; - deep?: boolean; - } - - class Graph extends Backbone.Model { - constructor(attributes?: any, options?: { cellNamespace: any }); - addCell(cell: Cell | Cell[]): this; - addCells(cells: Cell[]): this; - resetCells(cells: Cell[], options?: any): this; - getCell(id: string): Cell; - getElements(): Element[]; - getLinks(): Link[]; - getCells(): Cell[]; - getFirstCell(): Cell; - getLastCell(): Cell; - getConnectedLinks(element: Cell, options?: { inbound?: boolean, outbound?: boolean, deep?: boolean }): Link[]; - disconnectLinks(cell: Cell, options?: any): void; - removeLinks(cell: Cell, options?: any): void; - translate(tx: number, ty?: number, options?: TranslateOptions): void; - cloneCells(cells: Cell[]): { [id: string]: Cell }; - getSubgraph(cells: Cell[], options?: { deep?: boolean }): Cell[]; - cloneSubgraph(cells: Cell[], options?: { deep?: boolean }): { [id: string]: Cell }; - dfs(element: Element, iteratee: (element: Element, distance: number) => boolean, options?: DfsBfsOptions, visited?: Object, distance?: number): void; - bfs(element: Element, iteratee: (element: Element, distance: number) => boolean, options?: DfsBfsOptions): void; - search(element: Element, iteratee: (element: Element, distance: number) => boolean, options?: { breadthFirst?: boolean }): void; - getSuccessors(element: Element, options?: ExploreOptions): Element[]; - getPredecessors(element: Element, options?: ExploreOptions): Element[]; - isSuccessor(elementA: Element, elementB: Element): boolean; - isPredecessor(elementA: Element, elementB: Element): boolean; - isSource(element: Element): boolean; - isSink(element: Element): boolean; - getSources(): Element[]; - getSinks(): Element[]; - getNeighbors(element: Element, options?: DfsBfsOptions): Element[]; - isNeighbor(elementA: Element, elementB: Element, options?: { inbound?: boolean, outbound?: boolean; }): boolean; - getCommonAncestor(...cells: Cell[]): Element; - toJSON(): any; - fromJSON(json: any, options?: any): this; - clear(options?: any): this; - findModelsFromPoint(rect: BBox): Element[]; - findModelsUnderElement(element: Element, options?: { searchBy?: 'bbox' | 'center' | 'origin' | 'corner' | 'topRight' | 'bottomLeft' }): Element[]; - getBBox(elements: Element[], options?: any): BBox; - toGraphLib(): any; // graphlib graph object - findModelsInArea(rect: BBox, options?: any): BBox | boolean; - getCellsBBox(cells: Cell[], options?: any): BBox; - getInboundEdges(node: string): Object; - getOutboundEdges(node: string): Object; - hasActiveBatch(name?: string): number | boolean; - maxZIndex(): number; - removeCells(cells: Cell[], options?: any): this; - resize(width: number, height: number, options?: number): this; - resizeCells(width: number, height: number, cells: Cell[], options?: number): this; - set(key: Object | string, value: any, options?: any): this; - startBatch(name: string, data?: Object): any; - stopBatch(name: string, data?: Object): any; - } - - class Cell extends Backbone.Model { - id: string; - toJSON(): any; - remove(options?: { disconnectLinks?: boolean }): this; - toFront(options?: { deep?: boolean }): this; - toBack(options?: { deep?: boolean }): this; - getAncestors(): Cell[]; - isEmbeddedIn(element: Element, options?: { deep: boolean }): boolean; - prop(key: string): any; - prop(object: any): this; - prop(key: string, value: any, options?: any): this; - removeProp(path: string, options?: any): this; - attr(key: string): any; - attr(object: SVGAttributes): this; - attr(key: string, value: any): this; - clone(): Cell; - clone(opt: { deep?: boolean }): Cell | Cell[]; - removeAttr(path: string | string[], options?: any): this; - transition(path: string, value?: any, options?: TransitionOptions, delim?: string): number; - getTransitions(): string[]; - stopTransitions(path?: string, delim?: string): this; - addTo(graph: Graph, options?: any): this; - isLink(): boolean; - embed(cell: Cell, options?: any): this; - findView(paper: Paper): CellView; - getEmbeddedCells(options?: any): Cell[]; - initialize(options?: any): void; - isElement(): boolean; - isEmbedded(): boolean; - processPorts(): void; - startBatch(name: string, options?: any): this; - stopBatch(name: string, options?: any): this; - unembed(cell: Cell, options?: any): this; - } - - type Padding = number | { - top?: number; - right?: number; - bottom?: number; - left?: number - }; - - class Element extends Cell { - translate(tx: number, ty?: number, options?: TranslateOptions): this; - position(options?: { parentRelative: boolean }): Point; - position(x: number, y: number, options?: { parentRelative?: boolean }): this; - resize(width: number, height: number, options?: { direction?: 'left' | 'right' | 'top' | 'bottom' | 'top-right' | 'top-left' | 'bottom-left' | 'bottom-right' }): this; - rotate(deg: number, absolute?: boolean, origin?: Point): this; - embed(cell: Cell): this; - unembed(cell: Cell): this; - getEmbeddedCells(options?: ExploreOptions): Cell[]; - fitEmbeds(options?: { deep?: boolean, padding?: Padding }): this; - getBBox(options?: any): BBox; - findView(paper: Paper): ElementView; - isElement(): boolean; - scale(scaleX: number, scaleY: number, origin?: Point, options?: any): this; - addPort(port: any, opt?: any): this; - addPorts(ports: any[], opt?: any): this; - removePort(port: any, opt?: any): this; - hasPorts(): boolean; - hasPort(id: string): boolean; - getPorts(): any[]; - getPort(id: string): any; - getPortIndex(port: any): number; - portProp(portId: string, path: any, value?: any, opt?: any): joint.dia.Element; - } - - interface CSSSelector { - [key: string]: string | number | Object; // Object added to support special attributes like filter http://jointjs.com/api#SpecialAttributes:filter - } - - interface SVGAttributes { - [selector: string]: CSSSelector; - } - - interface CellAttributes { - [key: string]: any; - } - - interface TextAttrs extends SVGAttributes { - text?: { - [key: string]: string | number; - text?: string; - }; - } - - interface Label { - position: number; - attrs?: TextAttrs; - } - interface LinkAttributes extends CellAttributes { - source?: Point | { id: string, selector?: string, port?: string }; - target?: Point | { id: string, selector?: string, port?: string }; - labels?: Label[]; - vertices?: Point[]; - smooth?: boolean; - attrs?: TextAttrs; - z?: number; - } - - class Link extends Cell { - markup: string; - labelMarkup: string; - toolMakup: string; - vertexMarkup: string; - arrowHeadMarkup: string; - - constructor(attributes?: LinkAttributes, options?: Object); - disconnect(): this; - label(index?: number): any; - label(index: number, value: Label): this; - reparent(options?: any): Element; - findView(paper: Paper): LinkView; - getSourceElement(): Element; - getTargetElement(): Element; - hasLoop(options?: { deep?: boolean }): boolean; - applyToPoints(fn: Function, options?: any): this; - getRelationshipAncestor(): Element; - isLink(): boolean; - isRelationshipEmbeddedIn(element: Element): boolean; - scale(sx: number, sy: number, origin: Point, optionts?: any): this; - translate(tx: number, ty: number, options?: any): this; - } - - interface ManhattanRouterArgs { - excludeTypes?: string[]; - excludeEnds?: 'source' | 'target'; - startDirections?: ['left' | 'right' | 'top' | 'bottom']; - endDirections?: ['left' | 'right' | 'top' | 'bottom']; - } - - interface PaperOptions extends Backbone.ViewOptions { - el?: string | JQuery | HTMLElement; - width?: number; - height?: number; - origin?: Point; - gridSize?: number; - perpendicularLinks?: boolean; - elementView?: (element: Element) => ElementView | ElementView; - linkView?: (link: Link) => LinkView | LinkView; - defaultLink?: ((cellView: CellView, magnet: SVGElement) => Link) | Link; - defaultRouter?: ((vertices: Point[], args: Object, linkView: LinkView) => Point[]) | { name: string, args?: ManhattanRouterArgs }; - defaultConnector?: ((sourcePoint: Point, targetPoint: Point, vertices: Point[], args: Object, linkView: LinkView) => string) | { name: string, args?: { radius?: number } }; - interactive?: ((cellView: CellView, event: string) => boolean) | boolean | { vertexAdd?: boolean, vertexMove?: boolean, vertexRemove?: boolean, arrowheadMove?: boolean }; - validateMagnet?: (cellView: CellView, magnet: SVGElement) => boolean; - validateConnection?: (cellViewS: CellView, magnetS: SVGElement, cellViewT: CellView, magnetT: SVGElement, end: 'source' | 'target', linkView: LinkView) => boolean; - linkConnectionPoint?: (linkView: LinkView, view: ElementView, magnet: SVGElement, reference: Point) => Point; - snapLinks?: boolean | { radius: number }; - linkPinning?: boolean; - markAvailable?: boolean; - async?: boolean | { batchZise: number }; - embeddingMode?: boolean; - validateEmbedding?: (childView: ElementView, parentView: ElementView) => boolean; - restrictTranslate?: ((elementView: ElementView) => BBox) | boolean; - guard?: (evt: Event, view: CellView) => boolean; - multiLinks?: boolean; - cellViewNamespace?: Object; - /** useful undocumented option */ - clickThreshold?: number; - highlighting?: any; - } - - interface ScaleContentOptions { - padding?: number; - preserveAspectRatio?: boolean; - minScale?: number; - minScaleX?: number; - minScaleY?: number; - maxScale?: number; - maxScaleX?: number; - maxScaleY?: number; - scaleGrid?: number; - fittingBBox?: BBox; - } - - interface FitToContentOptions { - gridWidth?: number; - gridHeight?: number; - padding?: Padding; - allowNewOrigin?: 'negative' | 'positive' | 'any'; - minWidth?: number; - minHeight?: number; - maxWidth?: number; - maxHeight?: number; - } - - class Paper extends Backbone.View { - constructor(options?: PaperOptions); - options: PaperOptions; - svg: SVGElement; - viewport: SVGGElement; - defs: SVGDefsElement; - setDimensions(width: number, height: number): void; - setOrigin(x: number, y: number): void; - scale(sx: number, sy?: number, ox?: number, oy?: number): this; - findView(element: any): CellView; - findViewByModel(model: Cell | string): CellView; - findViewsFromPoint(point: Point): ElementView[]; - findViewsInArea(rect: BBox, options?: { strict?: boolean }): CellView[]; - fitToContent(options?: FitToContentOptions): void; - scaleContentToFit(options?: ScaleContentOptions): void; - getContentBBox(): BBox; - clientToLocalPoint(p: Point): Point; - - rotate(deg: number, ox?: number, oy?: number): Paper; // @todo not released yet though it's in the source code already - - afterRenderViews(): void; - asyncRenderViews(cells: Cell[], options?: any): void; - beforeRenderViews(cells: Cell[]): Cell[]; - cellMouseout(evt: Event): void; - cellMouseover(evt: Event): void; - clearGrid(): this; - contextmenu(evt: Event): void; - createViewForModel(cell: Cell): CellView; - drawGrid(options?: any): this; - fitToContent(gridWidth?: number, gridHeight?: number, padding?: number, options?: any): void; - getArea(): BBox; - getDefaultLink(cellView: CellView, magnet: HTMLElement): Link; - getModelById(id: string): Cell; - getRestrictedArea(): BBox; - guard(evt: Event, view: CellView): boolean; - linkAllowed(linkViewOrModel: LinkView | Link): boolean; - mouseclick(evt: Event): void; - mousedblclick(evt: Event): void; - mousewheel(evt: Event): void; - onCellAdded(cell: Cell, graph: Graph, options: Object): void; - onCellHighlight(cellView: CellView, magnetEl: HTMLElement, options?: any): void; - onCellUnhighlight(cellView: CellView, magnetEl: HTMLElement, options?: any): void; - onRemove(): void; - pointerdown(evt: Event): void; - pointermove(evt: Event): void; - pointerup(evt: Event): void; - remove(): this; - removeView(cell: Cell): CellView; - removeViews(): void; - renderView(cell: Cell): CellView; - resetViews(cellsCollection: Cell[], options: any): void; - resolveHighlighter(options?: any): boolean | Object; - setGridSize(gridSize: number): this; - setInteractivity(value: any): void; - snapToGrid(p: Point): Point; - sortViews(): void; - } - - - interface GradientOptions { - type: 'linearGradient' | 'radialGradient'; - stops: Array<{ - offset: string; - color: string; - opacity?: number; - }>; - } - class CellViewGeneric extends Backbone.View { - getBBox(options?: { useModelGeometry?: boolean }): BBox; - highlight(el?: any, options?: any): this; - unhighlight(el?: any, options?: any): this; - applyFilter(selector: string | HTMLElement, filter: Object): void; - applyGradient(selector: string | HTMLElement, attr: 'fill' | 'stroke', gradient: GradientOptions): void; - can(feature: string): boolean; - findBySelector(selector: string): JQuery; - findMagnet(el: any): HTMLElement; - getSelector(el: HTMLElement, prevSelector: string): string; - getStrokeBBox(el: any): BBox; // string|HTMLElement|Vectorizer - mouseout(evt: Event): void; - mouseover(evt: Event): void; - mousewheel(evt: Event, x: number, y: number, delta: number): void - notify(eventName: string): void; - onChangeAttrs(cell: Cell, attrs: Backbone.ViewOptions, options?: any): this; - onSetTheme(oldTheme: string, newTheme: string): void; - pointerclick(evt: Event, x: number, y: number): void; - pointerdblclick(evt: Event, x: number, y: number): void; - pointerdown(evt: Event, x: number, y: number): void; - pointermove(evt: Event, x: number, y: number): void; - pointerup(evt: Event, x: number, y: number): void; - remove(): this; - setInteractivity(value: any): void; - setTheme(theme: string, options?: any): this; - } - - class CellView extends CellViewGeneric { } - - interface ElementViewAttributes { - style?: string; - text?: string; - html?: string; - "ref-x"?: string | number; - "ref-y"?: string | number; - "ref-dx"?: number; - "ref-dy"?: number; - "ref-width"?: string | number; - "ref-height"?: string | number; - ref?: string; - "x-alignment"?: 'middle' | 'right' | number; - "y-alignment"?: 'middle' | 'bottom' | number; - port?: string; - } - class ElementView extends CellViewGeneric { - scale(sx: number, sy: number): void; // @todo Documented in source but not released - finalizeEmbedding(options?: any): void; - getBBox(options?: any): BBox; - pointerdown(evt: Event, x: number, y: number): void; - pointermove(evt: Event, x: number, y: number): void; - pointerup(evt: Event, x: number, y: number): void; - positionRelative(vel: any, bbox: BBox, attributes: ElementViewAttributes, nodesBySelector?: Object): void; // Vectorizer - prepareEmbedding(options?: any): void; - processEmbedding(options?: any): void; - render(): this; - renderMarkup(): void; - resize(): void; - rotate(): void; - translate(model: Backbone.Model, changes?: any, options?: any): void; - update(cell: Cell, renderingOnlyAttrs?: Object): void; - } - - class LinkView extends CellViewGeneric { - options: { - shortLinkLength?: number, - doubleLinkTools?: boolean, - longLinkLength?: number, - linkToolsOffset?: number, - doubleLinkToolsOffset?: number, - sampleInterval: number - }; - getConnectionLength(): number; - sendToken(token: SVGElement, duration?: number, callback?: () => void): void; - addVertex(vertex: Point): number; - getPointAtLength(length: number): Point; // Marked as public api in source but not in the documents - createWatcher(endType: { id: string }): Function; - findRoute(oldVertices: Point[]): Point[]; - getConnectionPoint(end: 'source' | 'target', selectorOrPoint: Element | Point, referenceSelectorOrPoint: Element | Point): Point; - getPathData(vertices: Point[]): any; - onEndModelChange(endType: 'source' | 'target', endModel?: Element, opt?: any): void; - onLabelsChange(): void; - onSourceChange(cell: Cell, sourceEnd: { id: string }, options: any): void; - onTargetChange(cell: Cell, targetEnd: { id: string }, options: any): void; - onToolsChange(): void; - onVerticesChange(cell: Cell, changed: any, options: any): void; - pointerdown(evt: Event, x: number, y: number): void; - pointermove(evt: Event, x: number, y: number): void; - pointerup(evt: Event, x: number, y: number): void; - removeVertex(idx: number): this; - render(): this; - renderArrowheadMarkers(): this; - renderLabels(): this; - renderTools(): this; - renderVertexMarkers(): this; - startArrowheadMove(end: 'source' | 'target', options?: any): void; - startListening(): void; - update(model: any, attributes: any, options?: any): this; - updateArrowheadMarkers(): this; - updateAttributes(): void; - updateConnection(options?: any): void; - updateLabelPositions(): this; - updateToolsPosition(): this; - } - } - - namespace ui { } - - namespace shapes { - interface GenericAttributes extends dia.CellAttributes { - position?: dia.Point; - size?: dia.Size; - angle?: number; - attrs?: T; - } - interface ShapeAttrs extends dia.CSSSelector { - fill?: string; - stroke?: string; - r?: string | number; - rx?: string | number; - ry?: string | number; - cx?: string | number; - cy?: string | number; - height?: string | number; - width?: string | number; - transform?: string; - points?: string; - 'stroke-width'?: string | number; - 'ref-x'?: string | number; - 'ref-y'?: string | number; - ref?: string - } - - namespace basic { - class Generic extends dia.Element { - constructor(attributes?: GenericAttributes, options?: Object); - } - interface RectAttrs extends dia.TextAttrs { - rect?: ShapeAttrs; - } - class Rect extends Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class Text extends Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - interface CircleAttrs extends dia.TextAttrs { - circle?: ShapeAttrs; - } - class Circle extends Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - interface EllipseAttrs extends dia.TextAttrs { - ellipse?: ShapeAttrs; - } - class Ellipse extends Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - interface PolygonAttrs extends dia.TextAttrs { - polygon?: ShapeAttrs; - } - class Polygon extends Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - interface PolylineAttrs extends dia.TextAttrs { - polyline?: ShapeAttrs; - } - class Polyline extends Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class Image extends Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - interface PathAttrs extends dia.TextAttrs { - path?: ShapeAttrs; - } - class Path extends Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - interface RhombusAttrs extends dia.TextAttrs { - path?: ShapeAttrs; - } - class Rhombus extends Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - interface TextBlockAttrs extends dia.TextAttrs { - rect?: ShapeAttrs; - } - class TextBlock extends Generic { - constructor(attributes?: GenericAttributes, options?: Object); - updateSize(cell: dia.Cell, size: dia.Size): void; - updateContent(cell: dia.Cell, content: string): void; - } - } - - namespace chess { - class KingWhite extends basic.Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class KingBlack extends basic.Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class QueenWhite extends basic.Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class QueenBlack extends basic.Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class RookWhite extends basic.Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class RookBlack extends basic.Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class BishopWhite extends basic.Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class BishopBlack extends basic.Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class KnightWhite extends basic.Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class KnightBlack extends basic.Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class PawnWhite extends basic.Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class PawnBlack extends basic.Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - } - - namespace devs { - interface ModelAttributes extends GenericAttributes { - inPorts?: string[]; - outPorts?: string[]; - ports?: Object; - } - class Model extends basic.Generic { - constructor(attributes?: ModelAttributes, options?: Object); - changeInGroup(properties: any, opt?: any): boolean; - changeOutGroup(properties: any, opt?: any): boolean; - createPortItem(group: string, port: string): any; - createPortItems(group: string, ports: string[]): any[]; - addOutPort(port: string, opt?: any): this; - addInPort(port: string, opt?: any): this; - removeOutPort(port: string, opt?: any): this; - removeInPort(port: string, opt?: any): this; - } - class Coupled extends Model { - constructor(attributes?: ModelAttributes, options?: Object); - } - class Atomic extends Model { - constructor(attributes?: ModelAttributes, options?: Object); - } - class Link extends dia.Link { - constructor(attributes?: dia.LinkAttributes, options?: Object); - } - } - - namespace erd { - class Entity extends basic.Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class WeakEntity extends Entity { - constructor(attributes?: GenericAttributes, options?: Object); - } - class Relationship extends dia.Element { - constructor(attributes?: GenericAttributes, options?: Object); - } - class IdentifyingRelationship extends Relationship { - constructor(attributes?: GenericAttributes, options?: Object); - } - interface AttributeAttrs extends dia.TextAttrs { - ellipse?: ShapeAttrs; - } - class Attribute extends dia.Element { - constructor(attributes?: GenericAttributes, options?: Object); - } - class Multivalued extends Attribute { - constructor(attributes?: GenericAttributes, options?: Object); - } - class Derived extends Attribute { - constructor(attributes?: GenericAttributes, options?: Object); - } - class Key extends Attribute { - constructor(attributes?: GenericAttributes, options?: Object); - } - class Normal extends Attribute { - constructor(attributes?: GenericAttributes, options?: Object); - } - interface ISAAttrs extends dia.Element { - polygon?: ShapeAttrs; - } - class ISA extends dia.Element { - constructor(attributes?: GenericAttributes, options?: Object); - } - class Line extends dia.Link { - constructor(attributes?: dia.LinkAttributes, options?: Object); - cardinality(value: string | number): void; - } - } - - namespace fsa { - class State extends basic.Circle { - constructor(attributes?: GenericAttributes, options?: Object); - } - class StartState extends dia.Element { - constructor(attributes?: GenericAttributes, options?: Object); - } - class EndState extends dia.Element { - constructor(attributes?: GenericAttributes, options?: Object); - } - class Arrow extends dia.Link { - constructor(attributes?: dia.LinkAttributes, options?: Object); - } - } - - namespace logic { - interface LogicAttrs extends ShapeAttrs { - ref?: string; - 'ref-x'?: number | string; - 'ref-dx'?: number | string; - 'ref-y'?: number | string; - 'ref-dy'?: number | string; - magnet?: boolean; - 'class'?: string; - port?: string; - } - interface IOAttrs extends dia.TextAttrs { - circle?: LogicAttrs; - } - class Gate extends basic.Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class IO extends Gate { - constructor(attributes?: GenericAttributes, options?: Object); - } - class Input extends IO { - constructor(attributes?: GenericAttributes, options?: Object); - } - class Output extends IO { - constructor(attributes?: GenericAttributes, options?: Object); - } - class Gate11 extends Gate { - constructor(attributes?: GenericAttributes, options?: Object); - } - class Gate21 extends Gate { - constructor(attributes?: GenericAttributes, options?: Object); - } - interface Image { - 'xlink:href'?: string; - } - interface ImageAttrs extends LogicAttrs { - image?: Image; - } - class Repeater extends Gate11 { - constructor(attributes?: GenericAttributes, options?: Object); - operation(input: any): any; - } - class Note extends Gate11 { - constructor(attributes?: GenericAttributes, options?: Object); - operation(input: any): boolean; - } - class Or extends Gate21 { - constructor(attributes?: GenericAttributes, options?: Object); - operation(input1: any, input2: any): boolean; - } - class And extends Gate21 { - constructor(attributes?: GenericAttributes, options?: Object); - operation(input1: any, input2: any): boolean; - } - class Nor extends Gate21 { - constructor(attributes?: GenericAttributes, options?: Object); - operation(input1: any, input2: any): boolean; - } - class Nand extends Gate21 { - constructor(attributes?: GenericAttributes, options?: Object); - operation(input1: any, input2: any): boolean; - } - class Xor extends Gate21 { - constructor(attributes?: GenericAttributes, options?: Object); - operation(input1: any, input2: any): boolean; - } - class Xnor extends Gate21 { - constructor(attributes?: GenericAttributes, options?: Object); - operation(input1: any, input2: any): boolean; - } - interface WireArgs extends dia.LinkAttributes { - router?: Object; - connector?: Object; - } - class Wire extends dia.Link { - constructor(attributes?: WireArgs, options?: Object); - } - } - - namespace org { - interface MemberAttrs { - rect?: ShapeAttrs; - image?: ShapeAttrs; - } - class Member extends dia.Element { - constructor(attributes?: GenericAttributes, options?: Object); - } - class Arrow extends dia.Link { - constructor(attributes?: dia.LinkAttributes, options?: Object); - } - } - - namespace pn { - class Place extends basic.Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class PlaceView extends dia.ElementView { - renderTokens(): void; - } - class Transition extends basic.Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class Link extends dia.Link { - constructor(attributes?: dia.LinkAttributes, options?: Object); - } - } - - namespace uml { - interface ClassAttributes extends GenericAttributes { - name: string[]; - attributes: string[]; - methods: string[]; - } - class Class extends basic.Generic { - constructor(attributes?: ClassAttributes, options?: Object); - getClassName(): string[]; - updateRectangles(): void; - } - class ClassView extends dia.ElementView { - } - class Abstract extends Class { - constructor(attributes?: ClassAttributes, options?: Object); - } - class AbstractView extends ClassView { - constructor(attributes?: ClassAttributes, options?: Object); - } - class Interface extends Class { - constructor(attributes?: ClassAttributes, options?: Object); - } - class InterfaceView extends ClassView { - constructor(attributes?: ClassAttributes, options?: Object); - } - class Generalization extends dia.Link { - constructor(attributes?: dia.LinkAttributes, options?: Object); - } - class Implementation extends dia.Link { - constructor(attributes?: dia.LinkAttributes, options?: Object); - } - class Aggregation extends dia.Link { - constructor(attributes?: dia.LinkAttributes, options?: Object); - } - class Composition extends dia.Link { - constructor(attributes?: dia.LinkAttributes, options?: Object); - } - class Association extends dia.Link { - constructor(attributes?: dia.LinkAttributes, options?: Object); - } - interface StateAttributes extends GenericAttributes { - events?: string[]; - } - class State extends basic.Generic { - constructor(attributes?: GenericAttributes, options?: Object); - updateName(): void; - updateEvents(): void; - updatePath(): void; - } - class StartState extends basic.Circle { - constructor(attributes?: GenericAttributes, options?: Object); - } - class EndState extends basic.Generic { - constructor(attributes?: GenericAttributes, options?: Object); - } - class Transition extends dia.Link { - constructor(attributes?: dia.LinkAttributes, options?: Object); - } - } - } - - namespace util { - - namespace format { - export function number(specifier: string, value: number): string; - } - - export function uuid(): string; - export function guid(obj?: Object): string; - export function nextFrame(callback: () => void, context?: Object): number; - export function cancelFrame(requestId: number): void; - export function flattenObject(object: Object, delim: string, stop: (node: any) => boolean): any; - export function getByPath(object: Object, path: string, delim: string): any; - export function setByPath(object: Object, path: string, value: Object, delim: string): any; - export function unsetByPath(object: Object, path: string, delim: string): any; - export function breakText(text: string, size: dia.Size, attrs?: dia.SVGAttributes, options?: { svgDocument?: SVGElement }): string; - export function normalizeSides(box: number | { x?: number, y?: number, height?: number, width?: number }): dia.BBox; - export function getElementBBox(el: Element): dia.BBox; - export function setAttributesBySelector(el: Element, attrs: dia.SVGAttributes): void; - export function sortElements(elements: Element[] | string | JQuery, comparator: (a: Element, b: Element) => number): Element[]; - export function shapePerimeterConnectionPoint(linkView: dia.LinkView, view: dia.ElementView, magnet: SVGElement, ref: dia.Point): dia.Point; - export function imageToDataUri(url: string, callback: (err: Error, dataUri: string) => void): void; - - // Not documented but used in examples - /** @deprecated use lodash _.defaultsDeep */ - export function deepSupplement(objects: any, defaultIndicator?: any): any; - - // Private functions - /** @deprecated use lodash _.assign */ - export function mixin(objects: any[]): any; - /** @deprecated use lodash _.defaults */ - export function supplement(objects: any[]): any; - /** @deprecated use lodash _.mixin */ - export function deepMixin(objects: any[]): any; - } - - namespace layout { - - interface LayoutOptions { - nodeSep?: number; - edgeSep?: number; - rankSep?: number; - rankDir?: 'TB' | 'BT' | 'LR' | 'RL'; - marginX?: number; - marginY?: number; - resizeCluster?: boolean; - setPosition?: (element: dia.Element, position: dia.BBox) => void; - setLinkVertices?: (link: dia.Link, vertices: Position[]) => void; - } - - export class DirectedGraph { - static layout(graph: dia.Graph | dia.Cell[], options?: LayoutOptions): dia.BBox; - } - } -} diff --git a/jquery-toastmessage-plugin/jquery-toastmessage-plugin-tests.ts b/jquery-toastmessage-plugin/jquery-toastmessage-plugin-tests.ts deleted file mode 100644 index f11813cfbb..0000000000 --- a/jquery-toastmessage-plugin/jquery-toastmessage-plugin-tests.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* code examples from documentation */ - -$().toastmessage('showNoticeToast', 'some message here'); -$().toastmessage('showSuccessToast', "some message here"); -$().toastmessage('showWarningToast', "some message here"); -$().toastmessage('showErrorToast', "some message here"); - -// user configured toastmessage: -const toastObject = $().toastmessage('showToast', { - text : 'Hello World', - sticky : true, - position : 'top-right', - type : 'success', - close : function () {console.log("toast is closed ...");} -}); - -$().toastmessage('removeToast', toastObject); - -// reconfiguring the toasts as sticky -$().toastmessage({sticky : true}); - -// saving the newly created toast into a variable -var myToast = $().toastmessage('showNoticeToast', 'some message here'); - -// removing the toast -$().toastmessage('removeToast', myToast); - -// user configuration of all toastmessages to come: -$().toastmessage({ - text : 'Hello World', - sticky : true, - position : 'top-right', - type : 'success', - close : function () {console.log("toast is closed ...");} -}); - -$().toastmessage({ - inEffectDuration: 600, // in effect duration in miliseconds - stayTime: 3000, // time in miliseconds before the item has to disappear - text: '', // content of the item - sticky: false, // should the toast item sticky or not? - type: 'notice', // notice, warning, error, success - position: 'top-right', // top-left, top-center, top-right, middle-left, middle-center, middle-right - // Position of the toast container holding different toast. - // Position can be set only once at the very first call, - // changing the position after the first call does nothing - closeText: '', // text which will be shown as close button, - // set to '' when you want to introduce an image via css - close: undefined // callback function when the toastmessage is closed -}); - -/* code examples from tests */ - -$('.toast-container').remove(); - -$().toastmessage('showSuccessToast', "SUCCESS"); -$().toastmessage('showNoticeToast', "NOTICE"); -$().toastmessage('showWarningToast', "WARNING"); -$().toastmessage('showErrorToast', "ERROR"); -$().toastmessage({ - sticky : true, - position : 'top-right', - closeText: '' -}); -$().toastmessage('showToast', { - text : 'Success Dialog', - type : 'success' -}); -$().toastmessage('showToast', { - text : 'Success Dialog', - sticky : true, - position : 'top-right', - type : 'success', - closeText: '', - close : () => {} -}); -var toast = $().toastmessage('showToast', { - text : 'Success Dialog', - sticky : true, - position : 'top-right', - type : 'success', - closeText: '', - close : () => {} -}); -$().toastmessage('removeToast', toast, { close : () => {} }); diff --git a/jump.js/index.d.ts b/jump.js/index.d.ts deleted file mode 100644 index fdef97c712..0000000000 --- a/jump.js/index.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -// Type definitions for jump.js 1.0 -// Project: https://github.com/callmecavs/jump.js -// Definitions by: rhysd -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare type TransitionFunc = (t: number, b: number, c: number, d: number) => number; -declare interface JumpOptions { - duration?: number; - offset?: number; - callback?: () => void; - easing?: TransitionFunc; - a11y?: boolean; -} -declare type Jump = (target: string | Element | number, opts?: JumpOptions) => void; -declare const jump: Jump; -export = jump; diff --git a/koa-compose/koa-compose-tests.ts b/koa-compose/koa-compose-tests.ts deleted file mode 100644 index 2b2a65038e..0000000000 --- a/koa-compose/koa-compose-tests.ts +++ /dev/null @@ -1,17 +0,0 @@ - -import compose = require('koa-compose'); - -var fn1: compose.Middleware = function(context: any, next: () => Promise): Promise { - return Promise - .resolve(console.log('in fn1')) - .then(() => next()); -}; - -var fn2: compose.Middleware = function(context: any, next: () => Promise): Promise { - return Promise - .resolve(console.log('in fn2')) - .then(() => next()); -}; - - -var fn = compose([fn1, fn2]); \ No newline at end of file diff --git a/kramed/kramed-tests.ts b/kramed/kramed-tests.ts deleted file mode 100644 index 0782742234..0000000000 --- a/kramed/kramed-tests.ts +++ /dev/null @@ -1,43 +0,0 @@ - -import { KramedOptions, kramed, KramedParser, KramedStatic, KramedRenderer } from 'kramed'; - -var options: KramedOptions = { - gfm: true, - tables: true, - breaks: false, - pedantic: false, - sanitize: true, - smartLists: true, - silent: false, - highlight: function (code: string, lang: string) { - return ''; - }, - langPrefix: 'lang-', - smartypants: false, - renderer: new kramed.Renderer() -}; - -function callback() { - console.log('callback called'); -} - -kramed.setOptions(options); - -console.log(kramed('i am using __kramdown__.')); -console.log(kramed('i am using __kramdown__.', options)); -console.log(kramed('i am using __kramdown__.', callback)); -console.log(kramed('i am using __kramdown__.', options, callback)); - -console.log(kramed.parse('i am using __kramdown__.')); -console.log(kramed.parse('i am using __kramdown__.', options)); -console.log(kramed.parse('i am using __kramdown__.', callback)); -console.log(kramed.parse('i am using __kramdown__.', options, callback)); - -var text = 'something'; -var tokens = kramed.lexer(text, options); -console.log(kramed.parser(tokens)); - -var renderer = new kramed.Renderer(); -renderer.heading = function(text, level, raw) { - return text + level.toString() + raw; -}; diff --git a/leaflet-imageoverlay-rotated/index.d.ts b/leaflet-imageoverlay-rotated/index.d.ts deleted file mode 100644 index acb4d7f172..0000000000 --- a/leaflet-imageoverlay-rotated/index.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Type definitions for leaflet-imageoverlay-rotated 0.1 -// Project: https://github.com/IvanSanchez/Leaflet.ImageOverlay.Rotated -// Definitions by: Thomas Kleinke -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -declare namespace L { - - namespace ImageOverlay { - - export interface Rotated extends L.ImageOverlay { - reposition(topleft: L.LatLngExpression, - topright: L.LatLngExpression, - bottomleft: L.LatLngExpression): void; - } - } - - namespace imageOverlay { - - export function rotated(imgSrc: string | HTMLImageElement | HTMLCanvasElement, - topleft: L.LatLngExpression, - topright: L.LatLngExpression, - bottomleft: L.LatLngExpression, - options?: L.ImageOverlayOptions): L.ImageOverlay.Rotated; - } -} diff --git a/leaflet-imageoverlay-rotated/leaflet-imageoverlay-rotated-tests.ts b/leaflet-imageoverlay-rotated/leaflet-imageoverlay-rotated-tests.ts deleted file mode 100644 index 1b2ffd6c20..0000000000 --- a/leaflet-imageoverlay-rotated/leaflet-imageoverlay-rotated-tests.ts +++ /dev/null @@ -1,10 +0,0 @@ -var topleft = L.latLng(40.52256691873593, -3.7743186950683594); -var topright = L.latLng(40.5210255066156, -3.7734764814376835); -var bottomleft = L.latLng(40.52180437272552, -3.7768453359603886); - -var overlay = L.imageOverlay.rotated("image.jpg", topleft, topright, bottomleft, { - opacity: 0.5, - interactive: true -}); - -overlay.reposition(topleft, topright, bottomleft); diff --git a/linq4js/linq4js-tests.ts b/linq4js/linq4js-tests.ts deleted file mode 100644 index 9e0bbe7be5..0000000000 --- a/linq4js/linq4js-tests.ts +++ /dev/null @@ -1,5 +0,0 @@ -import "linq4js"; - -let array: Array = ["test", "test2", "test3", "test4", "test5"]; - -array.Add("test6").Remove("test3").Insert("test3", 2).Distinct().OrderBy(x => x).OrderByDescending(x => x).Select(x => x.length).Average(); \ No newline at end of file diff --git a/localforage/index.d.ts b/localforage/index.d.ts deleted file mode 100644 index d0194ec60f..0000000000 --- a/localforage/index.d.ts +++ /dev/null @@ -1,115 +0,0 @@ -// Type definitions for Mozilla's localForage -// Project: https://github.com/mozilla/localforage -// Definitions by: yuichi david pichsenmeister -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -interface LocalForageOptions { - driver?: string | LocalForageDriver | LocalForageDriver[]; - - name?: string; - - size?: number; - - storeName?: string; - - version?: number; - - description?: string; -} - -interface LocalForageDbMethods { - getItem(key: string): Promise; - getItem(key: string, callback: (err: any, value: T) => void): void; - - setItem(key: string, value: T): Promise; - setItem(key: string, value: T, callback: (err: any, value: T) => void): void; - - removeItem(key: string): Promise; - removeItem(key: string, callback: (err: any) => void): void; - - clear(): Promise; - clear(callback: (err: any) => void): void; - - length(): Promise; - length(callback: (err: any, numberOfKeys: number) => void): void; - - key(keyIndex: number): Promise; - key(keyIndex: number, callback: (err: any, key: string) => void): void; - - keys(): Promise; - keys(callback: (err: any, keys: string[]) => void): void; - - iterate(iteratee: (value: any, key: string, iterationNumber: number) => any): Promise; - iterate(iteratee: (value: any, key: string, iterationNumber: number) => any, - callback: (err: any, result: any) => void): void; -} - -interface LocalForageDriverSupportFunc { - (): Promise; -} - -interface LocalForageDriver extends LocalForageDbMethods { - _driver: string; - - _initStorage(options: LocalForageOptions): void; - - _support?: boolean | LocalForageDriverSupportFunc; -} - -interface LocalForageSerializer { - serialize(value: T | ArrayBuffer | Blob, callback: (value: string, error: any) => void): void; - - deserialize(value: string): T | ArrayBuffer | Blob; - - stringToBuffer(serializedString: string): ArrayBuffer; - - bufferToString(buffer: ArrayBuffer): string; -} - -interface LocalForage extends LocalForageDbMethods { - LOCALSTORAGE: string; - WEBSQL: string; - INDEXEDDB: string; - - /** - * Set and persist localForage options. This must be called before any other calls to localForage are made, but can be called after localForage is loaded. - * If you set any config values with this method they will persist after driver changes, so you can call config() then setDriver() - * @param {LocalForageOptions} options? - */ - config(options: LocalForageOptions): boolean; - - /** - * Create a new instance of localForage to point to a different store. - * All the configuration options used by config are supported. - * @param {LocalForageOptions} options - */ - createInstance(options: LocalForageOptions): LocalForage; - - driver(): string; - /** - * Force usage of a particular driver or drivers, if available. - * @param {string} driver - */ - setDriver(driver: string | string[]): Promise; - setDriver(driver: string | string[], callback: () => void, errorCallback: (error: any) => void): void; - defineDriver(driver: LocalForageDriver): Promise; - defineDriver(driver: LocalForageDriver, callback: () => void, errorCallback: (error: any) => void): void; - /** - * Return a particular driver - * @param {string} driver - */ - getDriver(driver: string): Promise; - - getSerializer(): Promise; - getSerializer(callback: (serializer: LocalForageSerializer) => void): void; - - supports(driverName: string): boolean; - - ready(callback: () => void): void; - ready(): Promise; -} - -declare module "localforage" { - let localforage: LocalForage; - export = localforage; -} diff --git a/localforage/localforage-tests.ts b/localforage/localforage-tests.ts deleted file mode 100644 index e3edeba2d0..0000000000 --- a/localforage/localforage-tests.ts +++ /dev/null @@ -1,117 +0,0 @@ - - -declare let localForage: LocalForage; - -namespace LocalForageTest { - localForage.clear((err: any) => { - let newError: any = err; - }); - - localForage.iterate((str: string, key: string, num: number) => { - let newStr: string = str; - let newKey: string = key; - let newNum: number = num; - }); - - localForage.length((err: any, num: number) => { - let newError: any = err; - let newNumber: number = num; - }); - - localForage.length().then((num: number) => { - var newNumber: number = num; - }); - - localForage.key(0, (err: any, value: string) => { - let newError: any = err; - let newValue: string = value; - }); - - localForage.keys((err: any, keys: Array) => { - let newError: any = err; - let newArray: Array = keys; - }); - - localForage.keys().then((keys: Array) => { - var newArray: Array = keys; - }); - - localForage.getItem("key",(err: any, str: string) => { - let newError: any = err; - let newStr: string = str - }); - - localForage.getItem("key").then((str: string) => { - let newStr: string = str; - }); - - localForage.setItem("key", "value",(err: any, str: string) => { - let newError: any = err; - let newStr: string = str - }); - - localForage.setItem("key", "value").then((str: string) => { - let newStr: string = str; - }); - - localForage.removeItem("key",(err: any) => { - let newError: any = err; - }); - - localForage.removeItem("key").then(() => { - }); - - localForage.getDriver("CustomDriver").then((result: LocalForageDriver) => { - var driver: LocalForageDriver = result; - // we need to use a variable for proper type guards before TS 2.0 - var _support = driver._support; - if (typeof _support === "function") { - // _support = _support.bind(driver); - _support().then((result: boolean) => { - let doesSupport: boolean = result; - }); - } else if (typeof _support === "boolean") { - let doesSupport: boolean = _support; - } - }); - - { - let config: boolean; - - config = localForage.config({ - name: "testyo", - driver: localForage.LOCALSTORAGE - }); - } - - { - let store: LocalForage; - - store = localForage.createInstance({ - name: "da instance", - driver: localForage.LOCALSTORAGE - }); - } - - { - let testSerializer: LocalForageSerializer; - - localForage.getSerializer() - .then((serializer: LocalForageSerializer) => { - testSerializer = serializer; - }); - - localForage.getSerializer((serializer: LocalForageSerializer) => { - testSerializer = serializer; - }); - } - - { - let store: LocalForage; - - store.ready() - .then(() => {}); - - store.ready(() => {}); - } -} \ No newline at end of file diff --git a/nedb-logger/nedb-logger-tests.ts b/nedb-logger/nedb-logger-tests.ts deleted file mode 100644 index b6665ad44d..0000000000 --- a/nedb-logger/nedb-logger-tests.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Created by Joe Vanderstelt 2017-02-22. - */ - -/// - - -import * as es6styleimport from 'nedb-logger'; - -import Q = require('q'); -import nedblogger = require('nedb-logger'); - -class BaseCollection { - - private dataStore: nedblogger; - - constructor(dataStore: nedblogger) { - - this.dataStore = dataStore; - } - - insert(document: T): Q.Promise { - - var deferred = Q.defer(); - - this.dataStore.insert(document, function(err: Error, newDoc: T) { // Callback is optional - // newDoc is the newly inserted document, including its _id - if (err) { - deferred.reject(err); - } else { - deferred.resolve(newDoc); - } - }); - - return deferred.promise; - } - -} - -// Type 1: Persistent datastore with manual loading - -import Datastore = require('nedb-logger'); -var db = new Datastore({filename: 'path/to/datafile'}); - -var doc: any = { - hello: 'world' - , n: 5 - , today: new Date() - , nedbIsAwesome: true - , notthere: null - , notToBeSaved: undefined // Will not be saved - , fruits: ['apple', 'orange', 'pear'] - , infos: {name: 'nedb'} -}; - -db.insert(doc, function(err: Error, newDoc: any) { // Callback is optional - // newDoc is the newly inserted document, including its _id - // newDoc has no key called notToBeSaved since its value was undefined -}); - -db.insert([{a: 5}, {a: 42}], function(err: Error, newdocs: any[]) { - // Two documents were inserted in the database - // newDocs is an array with these documents, augmented with their _id -}); diff --git a/node-form/index.d.ts b/node-form/index.d.ts deleted file mode 100644 index ddeb3d542f..0000000000 --- a/node-form/index.d.ts +++ /dev/null @@ -1,709 +0,0 @@ -// Type definitions for node-form v1.0.13 -// Project: https://github.com/rsamec/form -// Definitions by: Roman Samec -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -import * as Q from "q"; - -export as namespace Validation; - -export = Validation; - -declare namespace Validation { - /** - * Custom message functions. - */ - interface IErrorCustomMessage { - (config: any, args: any): string; - } - /** - * It represents a property validator for atomic object. - */ - interface IPropertyValidator { - isAcceptable(s: any): boolean; - customMessage?: IErrorCustomMessage; - tagName?: string; - } - /** - * It represents a property validator for simple string value. - */ - interface IStringValidator extends IPropertyValidator { - isAcceptable(s: string): boolean; - } - /** - * It represents an async property validator for atomic object. - */ - interface IAsyncPropertyValidator { - isAcceptable(s: any): Q.Promise; - customMessage?: IErrorCustomMessage; - isAsync: boolean; - tagName?: string; - } - /** - * It represents an async property validator for simple string value. - */ - interface IAsyncStringPropertyValidator extends IAsyncPropertyValidator { - isAcceptable(s: string): Q.Promise; - } - /** - * It defines compare operators. - */ - enum CompareOperator { - LessThan = 0, - LessThanEqual = 1, - Equal = 2, - NotEqual = 3, - GreaterThanEqual = 4, - GreaterThan = 5, - } - class StringFce { - static format(s: string, args: any): string; - } - class NumberFce { - static GetNegDigits(value: string): number; - } - class LettersOnlyValidator implements IStringValidator { - public isAcceptable(s: string): boolean; - public tagName: string; - } - class ZipCodeValidator implements IStringValidator { - public isAcceptable(s: string): boolean; - public tagName: string; - } - class EmailValidator implements IStringValidator { - public isAcceptable(s: string): boolean; - public tagName: string; - } - class UrlValidator implements IStringValidator { - public isAcceptable(s: string): boolean; - public tagName: string; - } - class RequiredValidator implements IStringValidator { - public isAcceptable(s: string): boolean; - public tagName: string; - } - class DateValidator implements IStringValidator { - public isAcceptable(s: string): boolean; - public tagName: string; - } - class DateISOValidator implements IStringValidator { - public isAcceptable(s: string): boolean; - public tagName: string; - } - class NumberValidator implements IStringValidator { - public isAcceptable(s: string): boolean; - public tagName: string; - } - class DigitValidator implements IStringValidator { - public isAcceptable(s: string): boolean; - public tagName: string; - } - class SignedDigitValidator implements IStringValidator { - public isAcceptable(s: string): boolean; - public tagName: string; - } - class MinLengthValidator implements IStringValidator { - public MinLength: number; - constructor(MinLength?: number); - public isAcceptable(s: string): boolean; - public tagName: string; - } - class MaxLengthValidator implements IStringValidator { - public MaxLength: number; - constructor(MaxLength?: number); - public isAcceptable(s: string): boolean; - public tagName: string; - } - class RangeLengthValidator implements IStringValidator { - public RangeLength: number[]; - constructor(RangeLength?: number[]); - public isAcceptable(s: string): boolean; - public MinLength : number; - public MaxLength : number; - public tagName: string; - } - class MinValidator implements IPropertyValidator { - public Min: number; - constructor(Min?: number); - public isAcceptable(s: any): boolean; - public tagName: string; - } - class MaxValidator implements IPropertyValidator { - public Max: number; - constructor(Max?: number); - public isAcceptable(s: any): boolean; - public tagName: string; - } - class RangeValidator implements IPropertyValidator { - public Range: number[]; - constructor(Range?: number[]); - public isAcceptable(s: any): boolean; - public Min : number; - public Max : number; - public tagName: string; - } - class StepValidator implements IPropertyValidator { - public Step: string; - constructor(Step?: string); - public isAcceptable(s: any): boolean; - public tagName: string; - } - class PatternValidator implements IStringValidator { - public Pattern: string; - constructor(Pattern?: string); - public isAcceptable(s: string): boolean; - public tagName: string; - } - class ContainsValidator implements IAsyncPropertyValidator { - public Options: Q.Promise; - constructor(Options: Q.Promise); - public isAcceptable(s: string): Q.Promise; - public isAsync: boolean; - public tagName: string; - } -} -declare namespace Validation { - /** - * basic error structure - */ - interface IError { - HasError: boolean; - ErrorMessage: string; - TranslateArgs?: IErrorTranslateArgs; - } - /** - * support for localization of error messages - */ - interface IErrorTranslateArgs { - TranslateId: string; - MessageArgs: any; - CustomMessage?: IErrorCustomMessage; - } - /** - * It defines conditional function. - */ - interface IOptional { - (): boolean; - } - /** - * It represents the validation result. - */ - interface IValidationFailure extends IError { - IsAsync: boolean; - Error: IError; - } - /** - * This class provides unit of information about error. - * Implements composite design pattern to enable nesting of error information. - */ - interface IValidationResult { - /** - * The name of error collection. - */ - Name: string; - /** - * Add error information to child collection of errors. - * @param validationResult - error information to be added. - */ - Add(validationResult: IValidationResult): void; - /** - * Remove error information from child collection of errors. - * @param index - index of error information to be removed. - */ - Remove(index: number): void; - /** - * Return collections of child errors information. - */ - Children: IValidationResult[]; - /** - * Return true if there is any error. - */ - HasErrors: boolean; - /** - * Return true if there is any error and hasw dirty state. - */ - HasErrorsDirty: boolean; - /** - * Return error message, if there is no error, return empty string. - */ - ErrorMessage: string; - /** - * Return number of errors. - */ - ErrorCount: number; - /** - * It enables to have errors optional. - */ - Optional?: IOptional; - /** - * It enables support for localization of error messages. - */ - TranslateArgs?: IErrorTranslateArgs[]; - } - /** - * - * @ngdoc object - * @name Error - * @module Validation - * - * - * @description - * It represents basic error structure. - */ - class Error implements IError { - public HasError: boolean; - public ErrorMessage: string; - constructor(); - } - /** - * - * @ngdoc object - * @name ValidationFailure - * @module Validation - * - * - * @description - * It represents validation failure. - */ - class ValidationFailure implements IError { - public Error: IError; - public IsAsync: boolean; - constructor(Error: IError, IsAsync: boolean); - public HasError : boolean; - public ErrorMessage : string; - public TranslateArgs : IErrorTranslateArgs; - } - /** - * - * @ngdoc object - * @name ValidationResult - * @module Validation - * - * - * @description - * It represents simple abstract error object. - */ - class ValidationResult implements IValidationResult { - public Name: string; - constructor(Name: string); - public IsDirty: boolean; - public Children : IValidationResult[]; - public Add(error: IValidationResult): void; - public Remove(index: number): void; - public Optional: IOptional; - public TranslateArgs: IErrorTranslateArgs[]; - public HasErrorsDirty : boolean; - public HasErrors : boolean; - public ErrorCount : number; - public ErrorMessage : string; - } - /** - * - * @ngdoc object - * @name CompositeValidationResult - * @module Validation - * - * - * @description - * It represents composite error object. - */ - class CompositeValidationResult implements IValidationResult { - public Name: string; - public Children: IValidationResult[]; - constructor(Name: string); - public Optional: IOptional; - public AddFirst(error: IValidationResult): void; - public Add(error: IValidationResult): void; - public Remove(index: number): void; - public HasErrorsDirty : boolean; - public HasErrors : boolean; - public ErrorCount : number; - public ErrorMessage : string; - public TranslateArgs : IErrorTranslateArgs[]; - public LogErrors(headerMessage?: string): void; - public Errors : { - [name: string]: IValidationResult; - }; - private FlattenErros; - public SetDirty(): void; - public SetPristine(): void; - private SetDirtyEx(node, dirty); - private flattenErrors(node, errorCollection); - private traverse(node, indent); - } -} -declare namespace Validation { - /** - * @ngdoc module - * @name Validation - * - * - * @description - * # Validation (core module) - * The module itself contains the essential components for an validation engine to function. The table below - * lists a high level breakdown of each of the components (object, functions) available within this core module. - * - *
- */ - /** - * It defines validation function. - */ - interface IValidate { - (args: IError): void; - } - /** - * It defines async validation function. - */ - interface IAsyncValidate { - (args: IError): Q.Promise; - } - /** - * It represents named validation function. - */ - interface IValidatorFce { - Name: string; - ValidationFce?: IValidate; - AsyncValidationFce?: IAsyncValidate; - } - /** - * This class represents custom validator. - */ - interface IValidator { - Validate(context: any): IValidationFailure; - ValidateAsync(context: any): Q.Promise; - Error: IError; - } - /** - * It represents abstract validator for type of . - */ - interface IAbstractValidator { - RuleFor(prop: string, validator: IPropertyValidator): any; - ValidationFor(prop: string, validator: IValidatorFce): any; - ValidatorFor(prop: string, validator: IAbstractValidator): any; - /** - * It creates new concrete validation rule and assigned data context to this rule. - * @param name of the rule - * @constructor - */ - CreateRule(name: string): IAbstractValidationRule; - CreateAbstractRule(name: string): IAbstractValidationRule; - CreateAbstractListRule(name: string): IAbstractValidationRule; - /** - * return true if this validation rule is intended for list of items, otherwise true - */ - ForList: boolean; - } - /** - * It represents concrete validation rule for type of . - */ - interface IAbstractValidationRule { - /** - * Performs validation using a validation context and returns a collection of Validation Failures. - */ - Validate(context: T): IValidationResult; - /** - * Performs validation using a validation context and returns a collection of Validation Failures asynchronoulsy. - */ - ValidateAsync(context: T): Q.Promise; - /** - * Performs validation and async validation using a validation context. - */ - ValidateAll(context: T): void; - /** - * Performs validation and async validation using a validation context for a passed field. - */ - ValidateField(context: T, propName: string): void; - /** - * Return validation results. - */ - ValidationResult: IValidationResult; - Rules: { - [name: string]: IPropertyValidationRule; - }; - Validators: { - [name: string]: IValidator; - }; - Children: { - [name: string]: AbstractValidationRule; - }; - } - /** - * It represents property validation rule for type of . - */ - interface IPropertyValidationRule { - /** - *The validators that are grouped under this rule. - */ - Validators: { - [name: string]: any; - }; - /** - * Performs validation using a validation context and returns a collection of Validation Failures. - */ - Validate(context: IValidationContext): IValidationFailure[]; - /** - * Performs validation using a validation context and returns a collection of Validation Failures asynchronoulsy. - */ - ValidateAsync(context: IValidationContext): Q.Promise; - } - /** - * It represents a data context for validation rule. - */ - interface IValidationContext { - /** - * Return current value. - */ - Value: string; - /** - * Return property name for current data context. - */ - Key: string; - /** - * Data context for validation rule. - */ - Data: T; - } - /** - * - * @ngdoc object - * @name AbstractValidator - * @module Validation - * - * - * @description - * It enables to create custom validator for your own abstract object (class) and to assign validation rules to its properties. - * You can assigned these rules - * - * + property validation rules - use _RuleFor_ property - * + property async validation rules - use _RuleFor_ property - * + shared validation rules - use _ValidationFor_ property - * + custom object validator - use _ValidatorFor_ property - enables composition of child custom validators - */ - class AbstractValidator implements IAbstractValidator { - public Validators: { - [name: string]: IPropertyValidator[]; - }; - public AbstractValidators: { - [name: string]: IAbstractValidator; - }; - public ValidationFunctions: { - [name: string]: IValidatorFce[]; - }; - public RuleFor(prop: string, validator: IPropertyValidator): void; - public ValidationFor(prop: string, fce: IValidatorFce): void; - public ValidatorFor(prop: string, validator: IAbstractValidator, forList?: boolean): void; - public CreateAbstractRule(name: string): AbstractValidationRule; - public CreateAbstractListRule(name: string): AbstractListValidationRule; - public CreateRule(name: string): AbstractValidationRule; - /** - * Return true if this validation rule is intended for list of items, otherwise true. - */ - public ForList: boolean; - } - /** - * - * @ngdoc object - * @name AbstractValidationRule - * @module Validation - * - * - * @description - * It represents concreate validator for custom object. It enables to assign validation rules to custom object properties. - */ - class AbstractValidationRule implements IAbstractValidationRule { - public Name: string; - public validator: AbstractValidator; - public ValidationResult: IValidationResult; - public Rules: { - [name: string]: IPropertyValidationRule; - }; - public Validators: { - [name: string]: IValidator; - }; - public Children: { - [name: string]: AbstractValidationRule; - }; - /** - * Return true if this validation rule is intended for list of items, otherwise true. - */ - public ForList: boolean; - constructor(Name: string, validator: AbstractValidator, forList?: boolean); - public addChildren(): void; - public SetOptional(fce: IOptional): void; - private createRuleFor(prop); - /** - * Performs validation using a validation context and returns a collection of Validation Failures. - */ - public Validate(context: T): IValidationResult; - /** - * Performs validation using a validation context and returns a collection of Validation Failures asynchronoulsy. - */ - public ValidateAsync(context: T): Q.Promise; - public ValidateAll(context: T): void; - public ValidateField(context: T, propName: string): void; - } - /** - * - * @ngdoc object - * @name AbstractListValidationRule - * @module Validation - * - * - * @description - * It represents an validator for custom object. It enables to assign rules to custom object properties. - */ - class AbstractListValidationRule extends AbstractValidationRule { - public Name: string; - public validator: AbstractValidator; - constructor(Name: string, validator: AbstractValidator); - /** - * Performs validation using a validation context and returns a collection of Validation Failures. - */ - public Validate(context: any): IValidationResult; - /** - * Performs validation using a validation context and returns a collection of Validation Failures asynchronoulsy. - */ - public ValidateAsync(context: any): Q.Promise; - private getValidationRule(i); - private getIndexedKey(i); - public NotifyListChanged(list: any[]): void; - } - /** - * - * @ngdoc object - * @name ValidationContext - * @module Validation - * - * - * @description - * It represents a data context for validation rule. - */ - class ValidationContext implements IValidationContext { - public Key: string; - public Data: T; - constructor(Key: string, Data: T); - public Value : any; - } - class MessageLocalization { - static customMsg: string; - static defaultMessages: { - "required": string; - "remote": string; - "email": string; - "url": string; - "date": string; - "dateISO": string; - "number": string; - "digits": string; - "signedDigits": string; - "creditcard": string; - "equalTo": string; - "maxlength": string; - "minlength": string; - "rangelength": string; - "range": string; - "max": string; - "min": string; - "step": string; - "contains": string; - "mask": string; - "custom": string; - }; - static ValidationMessages: { - "required": string; - "remote": string; - "email": string; - "url": string; - "date": string; - "dateISO": string; - "number": string; - "digits": string; - "signedDigits": string; - "creditcard": string; - "equalTo": string; - "maxlength": string; - "minlength": string; - "rangelength": string; - "range": string; - "max": string; - "min": string; - "step": string; - "contains": string; - "mask": string; - "custom": string; - }; - static GetValidationMessage(validator: any): string; - } - /** - * - * @ngdoc object - * @name PropertyValidationRule - * @module Validation - * - * - * @description - * It represents a property validation rule. The property has assigned collection of property validators. - */ - class PropertyValidationRule extends ValidationResult implements IPropertyValidationRule { - public Name: string; - public Validators: { - [name: string]: any; - }; - public ValidationFailures: { - [name: string]: IValidationFailure; - }; - constructor(Name: string, validatorsToAdd?: IPropertyValidator[]); - public AddValidator(validator: any): void; - public Errors : { - [name: string]: IValidationFailure; - }; - public HasErrors : boolean; - public ErrorCount : number; - public ErrorMessage : string; - public TranslateArgs : IErrorTranslateArgs[]; - /** - * Performs validation using a validation context and returns a collection of Validation Failures. - */ - public Validate(context: IValidationContext): IValidationFailure[]; - public ValidateEx(value: any): IValidationFailure[]; - /** - * Performs validation using a validation context and returns a collection of Validation Failures asynchronoulsy. - */ - public ValidateAsync(context: IValidationContext): Q.Promise; - /** - * Performs validation using a validation context and returns a collection of Validation Failures asynchronoulsy. - */ - public ValidateAsyncEx(value: string): Q.Promise; - } - /** - * - * @ngdoc object - * @name Validator - * @module Validation - * - * - * @description - * It represents a custom validator. It enables to define your own shared validation rules - */ - class Validator extends ValidationResult implements IValidator { - public Name: string; - private ValidateFce; - private AsyncValidationFce; - public Error: IError; - public ValidationFailures: { - [name: string]: IValidationFailure; - }; - constructor(Name: string, ValidateFce?: IValidate, AsyncValidationFce?: IAsyncValidate); - public Optional: IOptional; - public Validate(context: any): IValidationFailure; - public ValidateAsync(context: any): Q.Promise; - public HasError : boolean; - public Errors : { - [name: string]: IValidationFailure; - }; - public HasErrors : boolean; - public ErrorCount : number; - public ErrorMessage : string; - public TranslateArgs : IErrorTranslateArgs[]; - } -} diff --git a/node-form/node-form-tests.ts b/node-form/node-form-tests.ts deleted file mode 100644 index 75d98f6b13..0000000000 --- a/node-form/node-form-tests.ts +++ /dev/null @@ -1,25 +0,0 @@ -interface IPerson{ - Checked:boolean; - FirstName:string; - LastName:string; - Email:string; -} - -//create custom composite validator -var personValidator = new Validation.AbstractValidator(); - -//create field validators -var required = new Validation.RequiredValidator(); -var email = new Validation.EmailValidator(); -var maxLength = new Validation.MaxLengthValidator(); -maxLength.MaxLength = 15; - - -personValidator.RuleFor("FirstName", required); -personValidator.RuleFor("FirstName", maxLength); - -personValidator.RuleFor("LastName", required); -personValidator.RuleFor("LastName", maxLength); - -personValidator.RuleFor("Email", required); -personValidator.RuleFor("Email", email); diff --git a/notNeededPackages.json b/notNeededPackages.json index 049791856c..90a63f066e 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -1,94 +1,28 @@ { "packages": [ { - "libraryName": "Moment", - "typingsPackageName": "moment", - "sourceRepoURL": "https://github.com/moment/moment", - "asOfVersion": "2.13.0" - }, - { - "libraryName": "ng-table", - "typingsPackageName": "ng-table", - "sourceRepoURL": "https://github.com/esvit/ng-table", - "asOfVersion": "2.0.1" - }, - { - "libraryName": "spotify-web-api-js", - "typingsPackageName": "spotify-web-api-js", - "sourceRepoURL": "https://github.com/JMPerez/spotify-web-api-js", - "asOfVersion": "0.21.0" - }, - { - "libraryName": "Linq.JS", - "typingsPackageName": "linq", - "sourceRepoURL": "https://linqjs.codeplex.com/", - "asOfVersion": "2.2.33" - }, - { - "libraryName": "Protractor", - "typingsPackageName": "protractor", - "sourceRepoURL": "https://github.com/angular/protractor", - "asOfVersion": "4.0.0" - }, - { - "libraryName": "Dexie.js", - "typingsPackageName": "dexie", - "sourceRepoURL": "https://github.com/dfahlander/Dexie.js", - "asOfVersion": "1.3.1" - }, - { - "libraryName": "LinqSharp", - "typingsPackageName": "linqsharp", - "sourceRepoURL": "https://github.com/brunolm/LinqSharp", + "libraryName": "ajv", + "typingsPackageName": "ajv", + "sourceRepoURL": "https://github.com/epoberezkin/ajv", "asOfVersion": "1.0.0" }, { - "libraryName": "TypeScript", - "typingsPackageName": "typescript", - "sourceRepoURL": "https://github.com/Microsoft/TypeScript", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "TypeScript", - "typingsPackageName": "typescript-services", - "sourceRepoURL": "https://github.com/Microsoft/TypeScript", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "Prando", - "typingsPackageName": "prando", - "sourceRepoURL": "https://github.com/zeh/prando", + "libraryName": "antd", + "typingsPackageName": "antd", + "sourceRepoURL": "https://github.com/ant-design/ant-design", "asOfVersion": "1.0.0" }, { - "libraryName": "Shopify Prime", - "typingsPackageName": "shopify-prime", - "sourceRepoURL": "https://github.com/nozzlegear/shopify-prime", - "asOfVersion": "2.0.0" + "libraryName": "Argon2", + "typingsPackageName": "argon2", + "sourceRepoURL": "https://github.com/ranisalt/node-argon2", + "asOfVersion": "0.15.0" }, { - "libraryName": "SimpleSignal", - "typingsPackageName": "simplesignal", - "sourceRepoURL": "https://github.com/zeh/simplesignal", - "asOfVersion": "1.0.0" - }, - { - "libraryName": "Redux", - "typingsPackageName": "redux", - "sourceRepoURL": "https://github.com/reactjs/redux", - "asOfVersion": "3.6.0" - }, - { - "libraryName": "Redux Thunk", - "typingsPackageName": "redux-thunk", - "sourceRepoURL": "https://github.com/gaearon/redux-thunk", - "asOfVersion": "2.1.0" - }, - { - "libraryName": "Normalizr", - "typingsPackageName": "normalizr", - "sourceRepoURL": "https://github.com/paularmstrong/normalizr", - "asOfVersion": "2.0.18" + "libraryName": "axios", + "typingsPackageName": "axios", + "sourceRepoURL": "https://github.com/mzabriskie/axios", + "asOfVersion": "0.14.0" }, { "libraryName": "camel-case", @@ -108,12 +42,90 @@ "sourceRepoURL": "https://github.com/blakeembrey/constant-case", "asOfVersion": "1.1.2" }, + { + "libraryName": "date-fns", + "typingsPackageName": "date-fns", + "sourceRepoURL": "https://github.com/date-fns/date-fns", + "asOfVersion": "2.6.0" + }, + { + "libraryName": "Dexie.js", + "typingsPackageName": "dexie", + "sourceRepoURL": "https://github.com/dfahlander/Dexie.js", + "asOfVersion": "1.3.1" + }, { "libraryName": "dot-case", "typingsPackageName": "dot-case", "sourceRepoURL": "https://github.com/blakeembrey/dot-case", "asOfVersion": "1.1.2" }, + { + "libraryName": "dva", + "typingsPackageName": "dva", + "sourceRepoURL": "https://github.com/dvajs/dva", + "asOfVersion": "1.1.0" + }, + { + "libraryName": "ecmarkup", + "typingsPackageName": "ecmarkup", + "sourceRepoURL": "https://github.com/bterlson/ecmarkup", + "asOfVersion": "3.4.0" + }, + { + "libraryName": "FineUploader", + "typingsPackageName": "fine-uploader", + "sourceRepoURL": "http://fineuploader.com/", + "asOfVersion": "5.14.0" + }, + { + "libraryName": "gaea-model", + "typingsPackageName": "gaea-model", + "sourceRepoURL": "https://github.com/ascoders/gaea-model", + "asOfVersion": "0.0.0" + }, + { + "libraryName": "Facebook's Immutable", + "typingsPackageName": "immutable", + "sourceRepoURL": "https://github.com/facebook/immutable-js", + "asOfVersion": "3.8.7" + }, + { + "libraryName": "inversify", + "typingsPackageName": "inversify", + "sourceRepoURL": "http://inversify.io", + "asOfVersion": "2.0.33" + }, + { + "libraryName": "inversify-binding-decorators", + "typingsPackageName": "inversify-binding-decorators", + "sourceRepoURL": "https://github.com/inversify/inversify-binding-decorators", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "inversify-express-utils", + "typingsPackageName": "inversify-express-utils", + "sourceRepoURL": "https://github.com/inversify/inversify-express-utils", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "inversify-inject-decorators", + "typingsPackageName": "inversify-inject-decorators", + "sourceRepoURL": "https://github.com/inversify/inversify-inject-decorators", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "inversify-logger-middleware", + "typingsPackageName": "inversify-logger-middleware", + "sourceRepoURL": "https://github.com/inversify/inversify-logger-middleware", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "inversify-restify-utils", + "typingsPackageName": "inversify-restify-utils", + "sourceRepoURL": "https://github.com/inversify/inversify-restify-utils", + "asOfVersion": "2.0.0" + }, { "libraryName": "is-lower-case", "typingsPackageName": "is-lower-case", @@ -126,6 +138,30 @@ "sourceRepoURL": "https://github.com/blakeembrey/is-upper-case", "asOfVersion": "1.1.2" }, + { + "libraryName": "jsonschema", + "typingsPackageName": "jsonschema", + "sourceRepoURL": "https://github.com/tdegrunt/jsonschema", + "asOfVersion": "1.1.1" + }, + { + "libraryName": "Linq.JS", + "typingsPackageName": "linq", + "sourceRepoURL": "https://linqjs.codeplex.com/", + "asOfVersion": "2.2.33" + }, + { + "libraryName": "LinqSharp", + "typingsPackageName": "linqsharp", + "sourceRepoURL": "https://github.com/brunolm/LinqSharp", + "asOfVersion": "1.0.0" + }, + { + "libraryName": "localforage", + "typingsPackageName": "localforage", + "sourceRepoURL": "https://github.com/localForage/localForage", + "asOfVersion": "0.0.34" + }, { "libraryName": "lower-case", "typingsPackageName": "lower-case", @@ -138,6 +174,36 @@ "sourceRepoURL": "https://github.com/blakeembrey/lower-case-first", "asOfVersion": "1.0.1" }, + { + "libraryName": "mobservable", + "typingsPackageName": "mobservable", + "sourceRepoURL": "github.com/mweststrate/mobservable", + "asOfVersion": "1.2.5" + }, + { + "libraryName": "Moment", + "typingsPackageName": "moment", + "sourceRepoURL": "https://github.com/moment/moment", + "asOfVersion": "2.13.0" + }, + { + "libraryName": "ng-table", + "typingsPackageName": "ng-table", + "sourceRepoURL": "https://github.com/esvit/ng-table", + "asOfVersion": "2.0.1" + }, + { + "libraryName": "Normalizr", + "typingsPackageName": "normalizr", + "sourceRepoURL": "https://github.com/paularmstrong/normalizr", + "asOfVersion": "2.0.18" + }, + { + "libraryName": "Numbro", + "typingsPackageName": "numbro", + "sourceRepoURL": "https://github.com/foretagsplatsen/numbro/", + "asOfVersion": "1.9.3" + }, { "libraryName": "param-case", "typingsPackageName": "param-case", @@ -156,18 +222,108 @@ "sourceRepoURL": "https://github.com/blakeembrey/path-case", "asOfVersion": "1.1.2" }, + { + "libraryName": "pixi-spine", + "typingsPackageName": "pixi-spine", + "sourceRepoURL": "https://github.com/pixijs/pixi-spine", + "asOfVersion": "1.4.2" + }, + { + "libraryName": "poly2tri.js", + "typingsPackageName": "poly2tri", + "sourceRepoURL": "https://github.com/r3mi/poly2tri.js", + "asOfVersion": "1.4.0" + }, + { + "libraryName": "Prando", + "typingsPackageName": "prando", + "sourceRepoURL": "https://github.com/zeh/prando", + "asOfVersion": "1.0.0" + }, + { + "libraryName": "Protractor", + "typingsPackageName": "protractor", + "sourceRepoURL": "https://github.com/angular/protractor", + "asOfVersion": "4.0.0" + }, + { + "libraryName": "Raven JS", + "typingsPackageName": "raven-js", + "sourceRepoURL": "https://github.com/getsentry/raven-js", + "asOfVersion": "3.10.0" + }, + { + "libraryName": "Redux", + "typingsPackageName": "redux", + "sourceRepoURL": "https://github.com/reactjs/redux", + "asOfVersion": "3.6.0" + }, + { + "libraryName": "redux-persist", + "typingsPackageName": "redux-persist", + "sourceRepoURL": "https://github.com/rt2zz/redux-persist", + "asOfVersion": "4.3.1" + }, + { + "libraryName": "redux-persist-transform-compress", + "typingsPackageName": "redux-persist-transform-compress", + "sourceRepoURL": "https://github.com/rt2zz/redux-persist-transform-compress", + "asOfVersion": "4.2.0" + }, + { + "libraryName": "redux-saga", + "typingsPackageName": "redux-saga", + "sourceRepoURL": "https://github.com/redux-saga/redux-saga", + "asOfVersion": "0.10.5" + }, + { + "libraryName": "Redux Thunk", + "typingsPackageName": "redux-thunk", + "sourceRepoURL": "https://github.com/gaearon/redux-thunk", + "asOfVersion": "2.1.0" + }, + { + "libraryName": "node-scanf", + "typingsPackageName": "scanf", + "sourceRepoURL": "https://github.com/Lellansin/node-scanf", + "asOfVersion": "0.7.3" + }, { "libraryName": "sentence-case", "typingsPackageName": "sentence-case", "sourceRepoURL": "https://github.com/blakeembrey/sentence-case", "asOfVersion": "1.1.3" }, + { + "libraryName": "Shopify Prime", + "typingsPackageName": "shopify-prime", + "sourceRepoURL": "https://github.com/nozzlegear/shopify-prime", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "SimpleSignal", + "typingsPackageName": "simplesignal", + "sourceRepoURL": "https://github.com/zeh/simplesignal", + "asOfVersion": "1.0.0" + }, { "libraryName": "snake-case", "typingsPackageName": "snake-case", "sourceRepoURL": "https://github.com/blakeembrey/snake-case", "asOfVersion": "1.1.2" }, + { + "libraryName": "spotify-web-api-js", + "typingsPackageName": "spotify-web-api-js", + "sourceRepoURL": "https://github.com/JMPerez/spotify-web-api-js", + "asOfVersion": "0.21.0" + }, + { + "libraryName": "Sugar", + "typingsPackageName": "sugar", + "sourceRepoURL": "https://github.com/andrewplummer/Sugar", + "asOfVersion": "2.0.2" + }, { "libraryName": "swap-case", "typingsPackageName": "swap-case", @@ -180,6 +336,18 @@ "sourceRepoURL": "https://github.com/blakeembrey/title-case", "asOfVersion": "1.1.2" }, + { + "libraryName": "TypeScript", + "typingsPackageName": "typescript", + "sourceRepoURL": "https://github.com/Microsoft/TypeScript", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "TypeScript", + "typingsPackageName": "typescript-services", + "sourceRepoURL": "https://github.com/Microsoft/TypeScript", + "asOfVersion": "2.0.0" + }, { "libraryName": "upper-case", "typingsPackageName": "upper-case", @@ -192,90 +360,12 @@ "sourceRepoURL": "https://github.com/blakeembrey/upper-case-first", "asOfVersion": "1.1.2" }, - { - "libraryName": "Sugar", - "typingsPackageName": "sugar", - "sourceRepoURL": "https://github.com/andrewplummer/Sugar", - "asOfVersion": "2.0.2" - }, - { - "libraryName": "ajv", - "typingsPackageName": "ajv", - "sourceRepoURL": "https://github.com/epoberezkin/ajv", - "asOfVersion": "1.0.0" - }, - { - "libraryName": "date-fns", - "typingsPackageName": "date-fns", - "sourceRepoURL": "https://github.com/date-fns/date-fns", - "asOfVersion": "2.6.0" - }, { "libraryName": "vuejs", "typingsPackageName": "vue", "sourceRepoURL": "https://github.com/vuejs/vue", "asOfVersion": "2.0.0" }, - { - "libraryName": "Facebook's Immutable", - "typingsPackageName": "immutable", - "sourceRepoURL": "https://github.com/facebook/immutable-js", - "asOfVersion": "3.8.7" - }, - { - "libraryName": "dva", - "typingsPackageName": "dva", - "sourceRepoURL": "https://github.com/dvajs/dva", - "asOfVersion": "1.1.0" - }, - { - "libraryName": "inversify", - "typingsPackageName": "inversify", - "sourceRepoURL": "http://inversify.io", - "asOfVersion": "2.0.33" - }, - { - "libraryName": "inversify-express-utils", - "typingsPackageName": "inversify-express-utils", - "sourceRepoURL": "https://github.com/inversify/inversify-express-utils", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "inversify-binding-decorators", - "typingsPackageName": "inversify-binding-decorators", - "sourceRepoURL": "https://github.com/inversify/inversify-binding-decorators", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "inversify-logger-middleware", - "typingsPackageName": "inversify-logger-middleware", - "sourceRepoURL": "https://github.com/inversify/inversify-logger-middleware", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "inversify-inject-decorators", - "typingsPackageName": "inversify-inject-decorators", - "sourceRepoURL": "https://github.com/inversify/inversify-inject-decorators", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "inversify-restify-utils", - "typingsPackageName": "inversify-restify-utils", - "sourceRepoURL": "https://github.com/inversify/inversify-restify-utils", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "Argon2", - "typingsPackageName": "argon2", - "sourceRepoURL": "https://github.com/ranisalt/node-argon2", - "asOfVersion": "0.15.0" - }, - { - "libraryName": "node-scanf", - "typingsPackageName": "scanf", - "sourceRepoURL": "https://github.com/Lellansin/node-scanf", - "asOfVersion": "0.7.3" - }, { "libraryName": "vue-router", "typingsPackageName": "vue-router", @@ -283,64 +373,16 @@ "asOfVersion": "2.0.0" }, { - "libraryName": "ecmarkup", - "typingsPackageName": "ecmarkup", - "sourceRepoURL": "https://github.com/bterlson/ecmarkup", - "asOfVersion": "3.4.0" + "libraryName": "x2js", + "typingsPackageName": "x2js", + "sourceRepoURL": "https://code.google.com/p/x2js/", + "asOfVersion": "3.1.0" }, { - "libraryName": "redux-saga", - "typingsPackageName": "redux-saga", - "sourceRepoURL": "https://github.com/redux-saga/redux-saga", - "asOfVersion": "0.10.5" - }, - { - "libraryName": "axios", - "typingsPackageName": "axios", - "sourceRepoURL": "https://github.com/mzabriskie/axios", - "asOfVersion": "0.14.0" - }, - { - "libraryName": "gaea-model", - "typingsPackageName": "gaea-model", - "sourceRepoURL": "https://github.com/ascoders/gaea-model", - "asOfVersion": "0.0.0" - }, - { - "libraryName": "pixi-spine", - "typingsPackageName": "pixi-spine", - "sourceRepoURL": "https://github.com/pixijs/pixi-spine", - "asOfVersion": "1.4.2" - }, - { - "libraryName": "jsonschema", - "typingsPackageName": "jsonschema", - "sourceRepoURL": "https://github.com/tdegrunt/jsonschema", - "asOfVersion": "1.1.1" - }, - { - "libraryName": "Raven JS", - "typingsPackageName": "raven-js", - "sourceRepoURL": "https://github.com/getsentry/raven-js", - "asOfVersion": "3.10.0" - }, - { - "libraryName": "antd", - "typingsPackageName": "antd", - "sourceRepoURL": "https://github.com/ant-design/ant-design", - "asOfVersion": "1.0.0" - }, - { - "libraryName": "FineUploader", - "typingsPackageName": "fine-uploader", - "sourceRepoURL": "http://fineuploader.com/", - "asOfVersion": "5.14.0" - }, - { - "libraryName": "mobservable", - "typingsPackageName": "mobservable", - "sourceRepoURL": "github.com/mweststrate/mobservable", - "asOfVersion": "1.2.5" + "libraryName": "@xmpp/jid", + "typingsPackageName": "xmpp-jid", + "sourceRepoURL": "github.com/node-xmpp/node-xmpp/", + "asOfVersion": "1.2.0" } ] -} \ No newline at end of file +} diff --git a/numbro/index.d.ts b/numbro/index.d.ts deleted file mode 100644 index ccb0892a0d..0000000000 --- a/numbro/index.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Type definitions for Numbro.js -// Project: https://github.com/foretagsplatsen/numbro -// Definitions by: Vincent Bortone -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -interface NumbroLanguage { - delimiters: { - thousands: string; - decimal: string; - }; - abbreviations: { - thousand: string; - million: string; - billion: string; - trillion: string; - }; - ordinal(num: number): string; - currency: { - symbol: string; - }; -} - -interface Numbro { - (value?: any): Numbro; - version: string; - isNumbro: boolean; - language(key: string, values?: NumbroLanguage): Numbro; - zeroFormat(format: string): string; - clone(): Numbro; - format(inputString?: string): string; - formatCurrency(inputString?: string): string; - unformat(inputString: string): number; - value(): number; - valueOf(): number; - set (value: any): Numbro; - add(value: any): Numbro; - subtract(value: any): Numbro; - multiply(value: any): Numbro; - divide(value: any): Numbro; - difference(value: any): number; -} - -declare var numbro: Numbro; - -declare module "numbro" { - - export = numbro; - -} diff --git a/numbro/numbro-tests.ts b/numbro/numbro-tests.ts deleted file mode 100644 index 5b5b762353..0000000000 --- a/numbro/numbro-tests.ts +++ /dev/null @@ -1,43 +0,0 @@ - - -var valueFormat: string = numbro(1000).format('0,0'); -// '1,000' - -var valueUnformat: number = numbro().unformat('($10,000.00)'); -// '-10000' - -var value3: Numbro = numbro(1000); -var added: Numbro = value3.add(10); -// 1010 - -var value4: Numbro = numbro(1000); -var formatValue4a: string = value4.format('0,0'); -// '1,000' -var formatValue4b: number = value4.value(); -// 1000 - -var value5: Numbro = numbro(); -value5.set(1000); -var value5Num: number = value5.value(); -// 1000 - -var value6: Numbro = numbro(1000); -var value: number = 100; -var difference = value6.difference(value); -// 900 - -var value7: Numbro = numbro(0); -numbro.zeroFormat('N/A'); -var zeroString: string = value7.format('0.0'); -// 'N/A' - -var a: Numbro = numbro(1000); -var b: Numbro = numbro(a); -var c: Numbro = a.clone(); - -var aVal: number = a.set(2000).value(); -// 2000 -var bVal: number = b.value(); -// 1000 -var cVal: number = c.add(10).value(); -// 1010 diff --git a/poly2tri/index.d.ts b/poly2tri/index.d.ts deleted file mode 100644 index ed8d9e838f..0000000000 --- a/poly2tri/index.d.ts +++ /dev/null @@ -1,113 +0,0 @@ -// Type definitions for poly2tri v0.9.10 -// Project: http://github.com/r3mi/poly2tri.js/ -// Definitions by: Elemar Junior -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare namespace poly2tri { - - interface IPointLike { - x: number; - y: number; - } - - class Point implements IPointLike { - - x: number; - y: number; - - constructor(x: number, y: number); - - toString(): string; - - toJSON(): JSON; - - clone(): Point; - - set_zero(): Point; - - set(x: number, y: number): Point; - - negate(): Point; - - add(n: IPointLike): Point; - - sub(n: IPointLike): Point; - - mul(s: number): Point; - - length(): number; - - normalize(): number; - - equals(p: IPointLike): boolean; - - static negate(p: IPointLike): Point; - - static add(a: IPointLike, b: IPointLike): Point; - - static sub(a: IPointLike, b: IPointLike): Point; - - static mul(s: number, p: IPointLike): Point; - - static cross(a: number, b: number): number; - - static cross(a: IPointLike, b: number): number; - - static cross(a: IPointLike, b: IPointLike): number; - - static cross(a: number, b: IPointLike): number; - - static toStringBase(p: IPointLike): string; - - static toString(p: IPointLike): string; - - static compare(a: IPointLike, b: IPointLike): number; - - static equals(a: IPointLike, b: IPointLike): boolean; - - static dot(a: IPointLike, b: IPointLike): number; - } - - - class SweepContext { - constructor(contour: Array); - - constructor(contour: Array, options: JSON); - - addHole(polyline: Array): SweepContext; - - addHoles(holes: Array>): SweepContext; - - addPoint(point: IPointLike): SweepContext; - - addPoints(point: Array): SweepContext; - - triangulate(): SweepContext; - - getBoundingBox(): { min: IPointLike; max: IPointLike; }; - - getTriangles(): Array; - } - - class Triangle { - constructor(a: IPointLike, b: IPointLike, c: IPointLike); - - toString(): string; - - getPoint(index: number): IPointLike; - - getPoints(): Array; - - containsPoint(point: IPointLike): boolean; - - containsPoints(p1: IPointLike, p2: IPointLike): boolean; - - isInterior(): boolean; - } -} - - - - - - diff --git a/poly2tri/poly2tri-tests.ts b/poly2tri/poly2tri-tests.ts deleted file mode 100644 index 578596c8d1..0000000000 --- a/poly2tri/poly2tri-tests.ts +++ /dev/null @@ -1,92 +0,0 @@ - - -function initializeCDT(): poly2tri.SweepContext { - var contour = [ - new poly2tri.Point(100, 100), - new poly2tri.Point(100, 300), - new poly2tri.Point(300, 300), - new poly2tri.Point(300, 100) - ]; - - var swctx = new poly2tri.SweepContext(contour); - return swctx; -} - -function addHole() { - var swctx = initializeCDT(); - var hole = [ - new poly2tri.Point(200, 200), - new poly2tri.Point(200, 250), - new poly2tri.Point(250, 250) - ]; - swctx.addHole(hole); -} - -function addHoles() { - var swctx = initializeCDT(); - var hole1 = [ - new poly2tri.Point(200, 200), - new poly2tri.Point(200, 250), - new poly2tri.Point(250, 250) - ]; - - var hole2 = [ - new poly2tri.Point(110, 110), - new poly2tri.Point(110, 120), - new poly2tri.Point(120, 120) - ]; - - swctx.addHoles([hole1, hole2]); -} - -function addPoint() { - var swctx = initializeCDT(); - var point = new poly2tri.Point(150, 150); - swctx.addPoint(point); -} - -function addPoints() { - var swctx = initializeCDT(); - var point1 = new poly2tri.Point(150, 150); - var point2 = new poly2tri.Point(155, 155); - swctx.addPoints([point1, point2]); - swctx.addPoints([{x: 110, y: 120}]); -} - -function triangulate() { - var swctx = initializeCDT(); - swctx.triangulate(); - var triangles = swctx.getTriangles(); - - triangles.forEach(t => { - t.getPoints().forEach(p => { - console.log(p.x, p.y); - }); - var p1 = t.getPoint(0); - var p2 = t.getPoint(1); - var p3 = t.getPoint(2); - }); -} - -function chaining() { - var swctx = initializeCDT(); - - var hole1 = [ - new poly2tri.Point(200, 200), - new poly2tri.Point(200, 250), - new poly2tri.Point(250, 250) - ]; - - var hole2 = [ - new poly2tri.Point(110, 110), - new poly2tri.Point(110, 120), - new poly2tri.Point(120, 120) - ]; - - var holes = [hole1, hole2]; - var point1 = new poly2tri.Point(150, 150); - var point2 = new poly2tri.Point(155, 155); - var points = [point1, point2, { x: 153, y: 153 }]; - - var triangles = swctx.addHoles(holes).addPoints(points).triangulate().getTriangles(); -} diff --git a/prismjs/index.d.ts b/prismjs/index.d.ts deleted file mode 100644 index c3bbffae02..0000000000 --- a/prismjs/index.d.ts +++ /dev/null @@ -1,164 +0,0 @@ -// Type definitions for prism v1.4.4 -// Project: http://prismjs.com/ -// Definitions by: Erik Lieben -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare namespace PrismJS { - - /** - * The Prism object - */ - interface Prism { - - util: Util; - languages: Languages; - plugins: any; - - /** - * This is the most high-level function in Prism’s API. It fetches all the elements that have a .language-xxxx class and then calls Prism.highlightElement() on each one of them. - * - * @param {boolean} async - Whether to use Web Workers to improve performance and avoid blocking the UI when highlighting very large chunks of code. False by default. - * @param {(element:Element)=>void} callback? - An optional callback to be invoked after the highlighting is done. Mostly useful when async is true, since in that case, the highlighting is done asynchronously. - * @returns void - */ - highlightAll(async: boolean, callback?: (element: Element) => void): void; - - /** - * Highlights the code inside a single element. - * - * @param {Element} element - The element containing the code. It must have a class of language-xxxx to be processed, where xxxx is a valid language identifier. - * @param {boolean} async - Whether to use Web Workers to improve performance and avoid blocking the UI when highlighting very large chunks of code. False by default. - * @param {(element:Element)=>void} callback? - An optional callback to be invoked after the highlighting is done. Mostly useful when async is true, since in that case, the highlighting is done asynchronously. - * @returns void - */ - highlightElement(element: Element, async: boolean, callback?: (element: Element) => void): void; - - - /** - * Low-level function, only use if you know what you’re doing. It accepts a string of text as input and the language definitions to use, and returns a string with the HTML produced. - * - * @param {string} text - A string with the code to be highlighted. - * @param {LanguageDefinition} grammer - An object containing the tokens to use. Usually a language definition like Prism.languages.markup - * @param {LanguageDefinition} language - * @returns string - The highlighted HTML - */ - highlight(text: string, grammer: LanguageDefinition, language?: LanguageDefinition): string; - - /** - * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input and the language definitions to use, - * and returns an array with the tokenized code. When the language definition includes nested tokens, the function is called recursively on each of - * these tokens. This method could be useful in other contexts as well, as a very crude parser. - * - * @param {string} text - A string with the code to be highlighted. - * @param {LanguageDefinition} grammar - An object containing the tokens to use. Usually a language definition like Prism.languages.markup - * @param {LanguageDefinition} language - * @returns Array - An array of strings, tokens (class Prism.Token) and other arrays. - */ - tokenize(text: string, grammar: LanguageDefinition, language?: LanguageDefinition): Array; - - fileHighlight(): void; - - hooks: Hooks; - } - - interface Environment { - element?: Element; - language?: LanguageDefinition; - grammer?: any; - code?: any; - highlightedCode?: any; - type?: string; - content?:string; - tag?: string; - classes?: Array; - attributes?: Array | Object; - parent?: Element; - } - - interface Identifier { - value: number; - } - - interface Util { - encode(tokens:Token | Array | string): Token | Array | string; - type(o: Object): string; - objId(obj: Object): Identifier; - clone(o: LanguageDefinition): LanguageDefinition; - } - - interface LanguageDefinition { - keyword?: RegExp | LanguageDefinition; - number?: RegExp | LanguageDefinition; - function?: RegExp | LanguageDefinition; - string?: RegExp | LanguageDefinition; - boolean?: RegExp | LanguageDefinition; - operator?: RegExp | LanguageDefinition; - punctuation?: RegExp | LanguageDefinition; - atrule?: RegExp | LanguageDefinition; - url?: RegExp | LanguageDefinition; - selector?: RegExp | LanguageDefinition; - property?: RegExp | LanguageDefinition; - important?: RegExp | LanguageDefinition; - style?: RegExp | LanguageDefinition; - - /** - * This option can be used to define one or more aliases for the matched token. The result will be, that the styles - * of the token and its aliases are combined. This can be useful, to combine the styling of a well known token, - * which is already supported by most of the themes, with a semantically correct token name. The option can be - * set to a string literal or an array of string literals. In the following example the token name latex-equation - * is not supported by any theme, but it will be highlighted the same as a string. - */ - alias?: string; - - pattern?: RegExp; - - /** - * This option mitigates JavaScript’s lack of lookbehind. When set to true, the first capturing group in the regex - * pattern is discarded when matching this token, so it effectively behaves as if it was lookbehind - */ - lookbehind?: boolean; - - /** - * This property accepts another object literal, with tokens that are allowed to be nested in this token. - * This makes it easier to define certain languages. However, keep in mind that they’re slower and if coded poorly, - * can even result in infinite recursion. For an example of nested tokens, check out the Markup language definition - */ - inside?: LanguageDefinition; - - /** - * Accepts an object literal with tokens and appends them to the end of the current object literal. - */ - rest?: Array; - } - - interface Languages extends Array { - - extend(id: string, redef: LanguageDefinition): LanguageDefinition; - - /** - * Insert a token before another token in a language literal - * As this needs to recreate the object (we cannot actually insert before keys in object literals), - * we cannot just provide an object, we need anobject and a key. - * @param inside The key (or language id) of the parent - * @param before The key to insert before. If not provided, the function appends instead. - * @param insert Object with the key/value pairs to insert - * @param root The object that contains `inside`. If equal to Prism.languages, it can be omitted. - */ - insertBefore(inside: string, before: string, insert: LanguageDefinition, root: Object): any; - } - - interface Hooks { - all: Array void>>; - add(name: string, callback: (env: Environment) => void):void; - run(name: string, env: Environment): void; - } - - interface Token { - type: string; - content: Token | Array | string; - alias: string; - stringify(o:string| Array, language: LanguageDefinition, parent: HTMLPreElement): string; - } -} - -declare var Prism : PrismJS.Prism; \ No newline at end of file diff --git a/prismjs/prismjs-tests.ts b/prismjs/prismjs-tests.ts deleted file mode 100644 index 6d87b9b217..0000000000 --- a/prismjs/prismjs-tests.ts +++ /dev/null @@ -1,10 +0,0 @@ - - -var element = document.createElement("code"); -var callback = (element: Element) => console.log(element); - -Prism.highlightElement(element, false, callback); -Prism.highlightElement(element, false); -Prism.highlightAll(true, callback); -Prism.highlightAll(true); - diff --git a/qajax/index.d.ts b/qajax/index.d.ts deleted file mode 100644 index fcfbea6649..0000000000 --- a/qajax/index.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Type definitions for Qajax -// Project: https://github.com/gre/qajax -// Definitions by: Boltmade -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -import * as Q from "q"; - -export = Qajax; -export as namespace Qajax; - -declare function Qajax(url : string) : Q.Promise; -declare function Qajax(options : any) : Q.Promise; -declare function Qajax(url : string, options : any) : Q.Promise; - -declare namespace Qajax { - export var defaults : any; - export function filterStatus(validStatus : number) : (xhr : XMLHttpRequest) => Q.Promise; - export function filterStatus(validStatus : (status : number) => boolean) : (xhr : XMLHttpRequest) => Q.Promise; - export function filterSuccess() : Q.Promise; - - export function toJSON(xhr : XMLHttpRequest) : Q.Promise; - - export function getJSON(url : string) : Q.Promise; - - export function serialize(paramsObj : any) : string; -} \ No newline at end of file diff --git a/qajax/qajax-tests.ts b/qajax/qajax-tests.ts deleted file mode 100644 index 6770270cf4..0000000000 --- a/qajax/qajax-tests.ts +++ /dev/null @@ -1,69 +0,0 @@ -import Qajax = require("qajax"); -import * as Q from 'q'; - -// Based on https://github.com/gre/qajax/blob/master/test/qajax.js - -function resetDefaults () { - Qajax.defaults.logs = true; - Qajax.defaults.timeout = 1000; - Qajax.defaults.method = "GET"; - Qajax.defaults.headers = {}; - Qajax.defaults.base = ""; -} - -var sample01url = "/test/dataset/sample01.json"; -var sample01json = [ - { "name": "Jerome", "age": 20 }, - { "name": "Gerard", "age": 30 }, - { "name": "Martine", "age": 43 } -]; - -var emptyUrl = "/test/dataset/empty"; - -function urlWithOptions (url : string, options : any) { - return url+"?"+Qajax.serialize(options); -} - -Qajax; -Qajax.filterStatus; -Qajax.filterSuccess; -Qajax.getJSON; -Qajax.serialize({ foo: 123, bar: "toto" }); -Qajax.getJSON(sample01url).then((res) => true, (err) => true); -Qajax(sample01url).then(Qajax.filterSuccess).then(Qajax.toJSON); -Qajax(emptyUrl, { params: { status: 404 } }).then(Qajax.filterSuccess).then(Qajax.toJSON); -Qajax({method: "POST", url: "/ECHO", data: "1234567890\nazerty\nuiopqsdfghjklm\nwxcvbn\n"}).then(Qajax.filterSuccess); -Qajax({method: "POST", url: "/ECHO", data: { foo: 123, bar: { value: 42 }, arr: [1, 2, 3] }}).then(Qajax.filterSuccess).then(Qajax.toJSON); -Qajax({ url: emptyUrl, params: { status: 201 } }).then(Qajax.filterStatus(200)); -Qajax({method: "POST", url: emptyUrl, params: { status: 500 }}).then(Qajax.filterSuccess).then(Qajax.toJSON); - -var cancellationD = Q.defer(); -var cancellation = cancellationD.promise; -Qajax({ cancellation: cancellation, url: urlWithOptions(emptyUrl, { latency: 400 }) }).then(Qajax.filterSuccess).then(Qajax.toJSON); - -Qajax.defaults.timeout = 200; -Qajax({method: "DELETE", url: sample01url, params: { latency: 500 }}); - -resetDefaults(); -Qajax({method: "POST", url: sample01url, params: { latency: 300 }, timeout: 2000}); - -Qajax.defaults.timeout = 200; -Qajax({method: "DELETE", url: sample01url, params: { latency: 500 }, timeout: 0}); - -resetDefaults(); -Qajax({headers: { "X-Hello": "world" }, method: "GET", url: "/ECHO_HEADERS"}).then(Qajax.filterSuccess).then(Qajax.toJSON); -Qajax({headers: { "X-Hi": "world" }, method: "GET", url: "/ECHO_HEADERS"}).then(Qajax.filterSuccess).then(Qajax.toJSON); -Qajax.defaults.headers = {"X-Foo": "bar"}; -Qajax({method: "GET", url: "/ECHO_HEADERS"}).then(Qajax.filterSuccess).then(Qajax.toJSON); - -resetDefaults(); -Qajax("sample01.json", {base: "/test/dataset/"}).then(Qajax.filterSuccess).then(Qajax.toJSON); -Qajax.defaults.base = "/test/dataset/"; -Qajax("empty").then(Qajax.filterSuccess); - -resetDefaults(); -Qajax.defaults.method = "POST"; -Qajax("/ECHO", { data: "1234567890\nazerty\nuiopqsdfghjklm\nwxcvbn\n", responseType: "text/plain" }).then(Qajax.filterSuccess); - -resetDefaults(); -Qajax.getJSON(urlWithOptions(sample01url, { latency: 50 })).then((res) => true, (err) => true, () => true); diff --git a/qs/qs-tests.ts b/qs/qs-tests.ts deleted file mode 100644 index bcff0a0762..0000000000 --- a/qs/qs-tests.ts +++ /dev/null @@ -1,251 +0,0 @@ -import qs = require('qs'); -import * as assert from "power-assert"; - -qs.stringify({ a: 'b' }); -qs.stringify({ a: 'b', c: 'd' }, { delimiter: '&' }); - -qs.parse('a=b'); -qs.parse('a=b&c=d', { delimiter: '&' }); - -() => { - var obj = qs.parse('a=c'); - assert.deepEqual(obj, { a: 'c' }); - - var str = qs.stringify(obj); - assert.equal(str, 'a=c'); -} - -() => { - var plainObject = qs.parse('a[hasOwnProperty]=b', { plainObjects: true }); - assert.deepEqual(plainObject, { a: { hasOwnProperty: 'b' } }); -} - -() => { - var protoObject = qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }); - assert.deepEqual(protoObject, { a: { hasOwnProperty: 'b' } }); -} - -() => { - assert.deepEqual(qs.parse('a%5Bb%5D=c'), { - a: { b: 'c' } - }); -} - -() => { - assert.deepEqual(qs.parse('foo[bar][baz]=foobarbaz'), { - foo: { - bar: { - baz: 'foobarbaz' - } - } - }); -} - -() => { - var expected = { - a: { - b: { - c: { - d: { - e: { - f: { - '[g][h][i]': 'j' - } - } - } - } - } - } - }; - var string = 'a[b][c][d][e][f][g][h][i]=j'; - assert.deepEqual(qs.parse(string), expected); -} - -() => { - var deep = qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 }); - assert.deepEqual(deep, { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } }); -} - -() => { - var limited = qs.parse('a=b&c=d', { parameterLimit: 1 }); - assert.deepEqual(limited, { a: 'b' }); -} - -() => { - var delimited = qs.parse('a=b;c=d', { delimiter: ';' }); - assert.deepEqual(delimited, { a: 'b', c: 'd' }); -} - -() => { - var regexed = qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ }); - assert.deepEqual(regexed, { a: 'b', c: 'd', e: 'f' }); -} - -() => { - var withDots = qs.parse('a.b=c', { allowDots: true }); - assert.deepEqual(withDots, { a: { b: 'c' } }); -} - -() => { - var withArray = qs.parse('a[]=b&a[]=c'); - assert.deepEqual(withArray, { a: ['b', 'c'] }); -} - -() => { - var withIndexes = qs.parse('a[1]=c&a[0]=b'); - assert.deepEqual(withIndexes, { a: ['b', 'c'] }); -} - -() => { - var noSparse = qs.parse('a[1]=b&a[15]=c'); - assert.deepEqual(noSparse, { a: ['b', 'c'] }); -} - -() => { - var withEmptyString = qs.parse('a[]=&a[]=b'); - assert.deepEqual(withEmptyString, { a: ['', 'b'] }); - - var withIndexedEmptyString = qs.parse('a[0]=b&a[1]=&a[2]=c'); - assert.deepEqual(withIndexedEmptyString, { a: ['b', '', 'c'] }); -} - -() => { - var withMaxIndex = qs.parse('a[100]=b'); - assert.deepEqual(withMaxIndex, { a: { '100': 'b' } }); -} - -() => { - var withArrayLimit = qs.parse('a[1]=b', { arrayLimit: 0 }); - assert.deepEqual(withArrayLimit, { a: { '1': 'b' } }); -} - -() => { - var noParsingArrays = qs.parse('a[]=b', { parseArrays: false }); - assert.deepEqual(noParsingArrays, { a: { '0': 'b' } }); -} - -() => { - var mixedNotation = qs.parse('a[0]=b&a[b]=c'); - assert.deepEqual(mixedNotation, { a: { '0': 'b', b: 'c' } }); -} - -() => { - var arraysOfObjects = qs.parse('a[][b]=c'); - assert.deepEqual(arraysOfObjects, { a: [{ b: 'c' }] }); -} - -() => { - assert.equal(qs.stringify({ a: 'b' }), 'a=b'); - assert.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); -} - -() => { - var unencoded = qs.stringify({ a: { b: 'c' } }, { encode: false }); - assert.equal(unencoded, 'a[b]=c'); -} - -() => { - var encoded = qs.stringify({ a: { b: 'c' } }, { - encoder: function (str) { - // Passed in values `a`, `b`, `c` - return // Return encoded string - } - }) -} - -() => { - var decoded = qs.parse('x=z', { - decoder: function (str) { - // Passed in values `x`, `z` - return // Return decoded string - } - }) -} - -() => { - qs.stringify({ a: ['b', 'c', 'd'] }); - // 'a[0]=b&a[1]=c&a[2]=d' -} - -() => { - qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }); - // 'a=b&a=c&a=d' -} - -() => { - qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }) - // 'a[0]=b&a[1]=c' - qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }) - // 'a[]=b&a[]=c' - qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }) - // 'a=b&a=c' -} - -() => { - assert.equal(qs.stringify({ a: '' }), 'a='); -} - -() => { - assert.equal(qs.stringify({ a: null, b: undefined }), 'a='); -} - -() => { - assert.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); -} - -() => { - qs.stringify({ a: 'b', c: 'd', e: { f: new Date(123), g: [2] } }, { filter: function (prefix, value) { - if (prefix == 'b') { - // Return an `undefined` value to omit a property. - return; - } - if (prefix == 'e[f]') { - return value.getTime(); - } - if (prefix == 'e[g][0]') { - return value * 2; - } - return value; - } }); - // 'a=b&c=d&e[f]=123&e[g][0]=4' - qs.stringify({ a: 'b', c: 'd', e: 'f' }, { filter: ['a', 'e'] }); - // 'a=b&e=f' - qs.stringify({ a: ['b', 'c', 'd'], e: 'f' }, { filter: ['a', 0, 2] }); -} - -() => { - var withNull = qs.stringify({ a: null, b: '' }); - assert.equal(withNull, 'a=&b='); -} - -() => { - var equalsInsensitive = qs.parse('a&b='); - assert.deepEqual(equalsInsensitive, { a: '', b: '' }); -} - -() => { - var strictNull = qs.stringify({ a: null, b: '' }, { strictNullHandling: true }); - assert.equal(strictNull, 'a&b='); -} - -() => { - var parsedStrictNull = qs.parse('a&b=', { strictNullHandling: true }); - assert.deepEqual(parsedStrictNull, { a: null, b: '' }); -} - -() => { - var nullsSkipped = qs.stringify({ a: 'b', c: null }, { skipNulls: true }); - assert.equal(nullsSkipped, 'a=b'); -} - -() => { - var encoder = () => {}; - var shiftJISEncoded = qs.stringify({ a: 'こんにちは!' }, { encoder: encoder }); - assert.equal(shiftJISEncoded, 'a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I'); -} - -() => { - var decoder = () => {}; - var obj = qs.parse('a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I', { decoder: decoder }); - assert.deepEqual(obj, { a: 'こんにちは!' }); -} diff --git a/query-string/query-string-tests.ts b/query-string/query-string-tests.ts deleted file mode 100644 index c5ec7b624d..0000000000 --- a/query-string/query-string-tests.ts +++ /dev/null @@ -1,34 +0,0 @@ - -import qs = require('query-string'); - - -namespace stringify_tests { - let result: string; - // test obj - result = qs.stringify({ - str: 'bar', - strArray: ['baz'], - num: 123, - numArray: [456], - bool: true, - boolArray: [false], - }); - - // test options - result = qs.stringify({ foo: 'bar' }, { strict: false }) - result = qs.stringify({ foo: 'bar' }, { encode: false }) - result = qs.stringify({ foo: 'bar' }, { strict: false, encode: false }) -} - -namespace parse_tests { - let result: { [key: string]: string | string[] | null }; - result = qs.parse('?foo=bar'); - result = qs.parse('#foo=bar'); - result = qs.parse('&foo=bar&foo=baz'); -} - -namespace extract_tests { - let result: string; - result = qs.extract('http://foo.bar/?abc=def&hij=klm'); - result = qs.extract('http://foo.bar/?foo=bar'); -} diff --git a/rappid/index.d.ts b/rappid/index.d.ts deleted file mode 100644 index 5cbf07b995..0000000000 --- a/rappid/index.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Type definitions for Rappid 1.5 -// Project: http://jointjs.com/about-rappid -// Definitions by: Ewout Van Gossum -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -declare namespace joint { - namespace ui { - interface Handle { - name: string; - position: string; - icon: string; - } - - class SelectionView extends Backbone.Model { - paper: joint.dia.Paper; - graph: joint.dia.Graph; - model: Backbone.Collection; - - constructor(opt: { - paper: joint.dia.Paper; - graph: joint.dia.Graph; - model: Backbone.Collection - }); - - createSelectionBox(cellView: joint.dia.CellView): void; - destroySelectionBox(cellView: joint.dia.CellView): void; - startSelecting(evt: any): void; - cancelSelection(): void; - - addHandle(handle: Handle): void; - removeHandle(name: string): void; - changeHandle(name: string, handle: Handle): void; - } - } -} diff --git a/react-day-picker/index.d.ts b/react-day-picker/index.d.ts deleted file mode 100644 index 01c5492922..0000000000 --- a/react-day-picker/index.d.ts +++ /dev/null @@ -1,113 +0,0 @@ -// Type definitions for react-day-picker v1.2.0 -// Project: https://github.com/gpbl/react-day-picker -// Definitions by: Giampaolo Bellavite , Jason Killian -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 - -/// - -declare module "react-day-picker" { - import DayPicker = ReactDayPicker.DayPicker; - export = DayPicker; -} - -declare var DayPicker: typeof ReactDayPicker.DayPicker; - -declare namespace ReactDayPicker { - interface LocaleUtils { - formatMonthTitle: (month: Date, locale: string) => string; - formatWeekdayShort: (weekday: number, locale: string) => string; - formatWeekdayLong: (weekday: number, locale: string) => string; - getFirstDayOfWeek: (locale: string) => number; - getMonths: (locale: string) => string[]; - } - - interface DayModifiers { - selected?: boolean; - disabled?: boolean; - [name: string]: boolean | undefined; - } - - interface Modifiers { - [name: string]: (date: Date) => boolean; - } - - interface CaptionElementProps extends React.Props { - date?: Date; - localeUtils?: LocaleUtils; - locale?: string; - onClick?: React.MouseEventHandler<{}>; - } - - interface NavbarElementProps extends React.Props { - className?: string; - previousMonth?: Date; - nextMonth?: Date; - showPreviousButton?: boolean; - showNextButton?: boolean; - onPreviousClick(): void; - onNextClick(): void; - dir?: string; - localeUtils?: LocaleUtils; - locale?: string; - - } - - interface WeekdayElementProps extends React.Props { - weekday?: number; - className?: string; - localeUtils?: LocaleUtils; - locale?: string; - } - - interface Props extends React.Props{ - modifiers?: Modifiers; - initialMonth?: Date; - numberOfMonths?: number; - renderDay?: (date: Date) => number | string | JSX.Element; - enableOutsideDays?: boolean; - firstDayOfWeek?:number; - canChangeMonth?: boolean; - disabledDays?: (date: Date) => boolean; - fixedWeeks?: boolean; - fromMonth?: Date; - reverseMonths?: boolean; - toMonth?: Date; - localeUtils?: LocaleUtils; - locale?: string; - captionElement?: React.ReactElement; - onDayClick?: (e: React.SyntheticEvent<{}>, day: Date, modifiers: DayModifiers) => any; - onDayTouchTap?: (e: React.SyntheticEvent<{}>, day: Date, modifiers: DayModifiers) => any; - onDayMouseEnter?: (e: React.SyntheticEvent<{}>, day: Date, modifiers: DayModifiers) => any; - onDayMouseLeave?: (e: React.SyntheticEvent<{}>, day: Date, modifiers: DayModifiers) => any; - onDayTouchEnd?: (e: React.SyntheticEvent<{}>, day: Date, modifiers: DayModifiers) => any; - onDayTouchStart?: (e: React.SyntheticEvent<{}>, day: Date, modifiers: DayModifiers) => any; - navbarElement?: React.ReactElement; - weekdayElement?: React.ReactElement; - onMonthChange?: (month: Date) => any; - onCaptionClick?: (e: React.SyntheticEvent<{}>, month: Date) => any; - className?: string; - selectedDays?: (date: Date) => boolean; - style?: React.CSSProperties; - tabIndex?: number; - } - - class DayPicker extends React.Component { - showMonth(month: Date): void; - showPreviousMonth(): void; - showNextMonth(): void; - } - - namespace DayPicker { - var LocaleUtils: LocaleUtils; - namespace DateUtils { - function addMonths(d: Date, n: number): Date; - function clone(d: Date): Date; - function isSameDay(d1?: Date, d2?: Date): boolean; - function isPastDay(d: Date): boolean; - function isDayBetween(day: Date, startDate: Date, endDate: Date): boolean; - function addDayToRange(day: Date, range: { from?: Date, to?: Date }): { from?: Date, to?: Date }; - function isDayInRange(day: Date, range: { from?: Date, to?: Date }): boolean; - } - } -} diff --git a/react-day-picker/react-day-picker-tests.tsx b/react-day-picker/react-day-picker-tests.tsx deleted file mode 100644 index e8a17b5087..0000000000 --- a/react-day-picker/react-day-picker-tests.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import * as React from 'react'; -import * as DayPicker2 from "react-day-picker"; - -function isSunday(day: Date) { - return day.getDay() === 0; -} - -// make sure global variable version works -function MyComponent2() { - return -} -DayPicker.DateUtils.clone(new Date()); -DayPicker.DateUtils.isDayInRange(new Date(), {from: new Date()}); - -// make sure imported version works -function MyComponent() { - return -} -DayPicker2.DateUtils.clone(new Date()); -DayPicker2.DateUtils.isDayInRange(new Date(), { from: new Date() }); - -// test interface for captionElement prop -interface MyCaptionProps extends ReactDayPicker.CaptionElementProps { } -class Caption extends React.Component { - render() { - const { date, locale, localeUtils, onClick } = this.props; - - if (!date || !localeUtils || typeof locale === 'undefined') { - return null - } - - return ( -
- { localeUtils.formatMonthTitle(date, locale) } -
- ); - } -} -}/> diff --git a/react-native/index.d.ts b/react-native/index.d.ts deleted file mode 100644 index 29dd9fa780..0000000000 --- a/react-native/index.d.ts +++ /dev/null @@ -1,8374 +0,0 @@ -// Type definitions for react-native 0.42 -// Project: https://github.com/facebook/react-native -// Definitions by: Needs A Maintainer -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// -// USING: these definitions are meant to be used with the TSC compiler target set to ES6 -// -// USAGE EXAMPLES: check the RNTSExplorer project at https://github.com/bgrieder/RNTSExplorer -// -// CONTRIBUTING: please open pull requests -// -// CREDITS: This work is based on an original work made by Bernd Paradies: https://github.com/bparadie -// -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -import * as React from 'react'; - -export = React; - -//react-native "extends" react -declare module "react" { - export type MeasureOnSuccessCallback = ( - x: number, - y: number, - width: number, - height: number, - pageX: number, - pageY: number - ) => void - - export type MeasureInWindowOnSuccessCallback = ( - x: number, - y: number, - width: number, - height: number - ) => void - - export type MeasureLayoutOnSuccessCallback = ( - left: number, - top: number, - width: number, - height: number - ) => void - - /** - * EventSubscription represents a subscription to a particular event. It can - * remove its own subscription. - */ - interface EventSubscription { - - eventType: string; - key: number; - subscriber: EventSubscriptionVendor; - - /** - * @param {EventSubscriptionVendor} subscriber the subscriber that controls - * this subscription. - */ - new(subscriber: EventSubscriptionVendor): EventSubscription - - /** - * Removes this subscription from the subscriber that controls it. - */ - remove(): void - } - - /** - * EventSubscriptionVendor stores a set of EventSubscriptions that are - * subscribed to a particular event type. - */ - interface EventSubscriptionVendor { - - constructor(): EventSubscriptionVendor - - /** - * Adds a subscription keyed by an event type. - * - * @param {string} eventType - * @param {EventSubscription} subscription - */ - addSubscription(eventType: string, subscription: EventSubscription): EventSubscription - - /** - * Removes a bulk set of the subscriptions. - * - * @param {?string} eventType - Optional name of the event type whose - * registered supscriptions to remove, if null remove all subscriptions. - */ - removeAllSubscriptions(eventType?: string): void - - /** - * Removes a specific subscription. Instead of calling this function, call - * `subscription.remove()` directly. - * - * @param {object} subscription - */ - removeSubscription(subscription: any): void - - /** - * Returns the array of subscriptions that are currently registered for the - * given event type. - * - * Note: This array can be potentially sparse as subscriptions are deleted - * from it when they are removed. - * - * @param {string} eventType - * @returns {?array} - */ - getSubscriptionsForType(eventType: string): EventSubscription[] - } - - /** - * EmitterSubscription represents a subscription with listener and context data. - */ - interface EmitterSubscription extends EventSubscription { - emitter: EventEmitter - listener: () => any - context: any - - /** - * @param {EventEmitter} emitter - The event emitter that registered this - * subscription - * @param {EventSubscriptionVendor} subscriber - The subscriber that controls - * this subscription - * @param {function} listener - Function to invoke when the specified event is - * emitted - * @param {*} context - Optional context object to use when invoking the - * listener - */ - new(emitter: EventEmitter, subscriber: EventSubscriptionVendor, listener: () => any, context: any): EmitterSubscription - - /** - * Removes this subscription from the emitter that registered it. - * Note: we're overriding the `remove()` method of EventSubscription here - * but deliberately not calling `super.remove()` as the responsibility - * for removing the subscription lies with the EventEmitter. - */ - remove(): void - } - - interface EventEmitter { - /** - * @constructor - * - * @param {EventSubscriptionVendor} subscriber - Optional subscriber instance - * to use. If omitted, a new subscriber will be created for the emitter. - */ - new(subscriber?: EventSubscriptionVendor): EventEmitter - - /** - * Adds a listener to be invoked when events of the specified type are - * emitted. An optional calling context may be provided. The data arguments - * emitted will be passed to the listener function. - * - * @param {string} eventType - Name of the event to listen to - * @param {function} listener - Function to invoke when the specified event is - * emitted - * @param {*} context - Optional context object to use when invoking the - * listener - */ - addListener(eventType: string, listener: (...args: any[]) => any, context: any): EmitterSubscription - - /** - * Similar to addListener, except that the listener is removed after it is - * invoked once. - * - * @param {string} eventType - Name of the event to listen to - * @param {function} listener - Function to invoke only once when the - * specified event is emitted - * @param {*} context - Optional context object to use when invoking the - * listener - */ - once(eventType: string, listener: (...args: any[]) => any, context: any): EmitterSubscription - - /** - * Removes all of the registered listeners, including those registered as - * listener maps. - * - * @param {?string} eventType - Optional name of the event whose registered - * listeners to remove - */ - removeAllListeners(eventType?: string): void - - /** - * Provides an API that can be called during an eventing cycle to remove the - * last listener that was invoked. This allows a developer to provide an event - * object that can remove the listener (or listener map) during the - * invocation. - * - * If it is called when not inside of an emitting cycle it will throw. - * - * @throws {Error} When called not during an eventing cycle - * - * @example - * var subscription = emitter.addListenerMap({ - * someEvent: function(data, event) { - * console.log(data); - * emitter.removeCurrentListener(); - * } - * }); - * - * emitter.emit('someEvent', 'abc'); // logs 'abc' - * emitter.emit('someEvent', 'def'); // does not log anything - */ - removeCurrentListener(): void - - /** - * Removes a specific subscription. Called by the `remove()` method of the - * subscription itself to ensure any necessary cleanup is performed. - */ - removeSubscription(subscription: EmitterSubscription): void - - /** - * Returns an array of listeners that are currently registered for the given - * event. - * - * @param {string} eventType - Name of the event to query - * @returns {array} - */ - listeners(eventType: string): EmitterSubscription[] - - /** - * Emits an event of the given type with the given data. All handlers of that - * particular type will be notified. - * - * @param {string} eventType - Name of the event to emit - * @param {...*} Arbitrary arguments to be passed to each registered listener - * - * @example - * emitter.addListener('someEvent', function(message) { - * console.log(message); - * }); - * - * emitter.emit('someEvent', 'abc'); // logs 'abc' - */ - emit(eventType: string): void - - /** - * Removes the given listener for event of specific type. - * - * @param {string} eventType - Name of the event to emit - * @param {function} listener - Function to invoke when the specified event is - * emitted - * - * @example - * emitter.removeListener('someEvent', function(message) { - * console.log(message); - * }); // removes the listener if already registered - * - */ - removeListener(eventType: string, listener: (...args: any[]) => any): void - } - - /** NativeMethodsMixin provides methods to access the underlying native component directly. - * This can be useful in cases when you want to focus a view or measure its on-screen dimensions, - * for example. - * The methods described here are available on most of the default components provided by React Native. - * Note, however, that they are not available on composite components that aren't directly backed by a - * native view. This will generally include most components that you define in your own app. - * For more information, see [Direct Manipulation](http://facebook.github.io/react-native/docs/direct-manipulation.html). - * @see https://github.com/facebook/react-native/blob/master/Libraries/ReactIOS/NativeMethodsMixin.js - */ - export interface NativeMethodsMixinStatic { - /** - * Determines the location on screen, width, and height of the given view and - * returns the values via an async callback. If successful, the callback will - * be called with the following arguments: - * - * - x - * - y - * - width - * - height - * - pageX - * - pageY - * - * Note that these measurements are not available until after the rendering - * has been completed in native. If you need the measurements as soon as - * possible, consider using the [`onLayout` - * prop](docs/view.html#onlayout) instead. - */ - measure(callback: MeasureOnSuccessCallback): void; - - /** - * Determines the location of the given view in the window and returns the - * values via an async callback. If the React root view is embedded in - * another native view, this will give you the absolute coordinates. If - * successful, the callback will be called with the following - * arguments: - * - * - x - * - y - * - width - * - height - * - * Note that these measurements are not available until after the rendering - * has been completed in native. - */ - measureInWindow(callback: MeasureInWindowOnSuccessCallback): void; - - /** - * Like [`measure()`](#measure), but measures the view relative an ancestor, - * specified as `relativeToNativeNode`. This means that the returned x, y - * are relative to the origin x, y of the ancestor view. - * - * As always, to obtain a native node handle for a component, you can use - * `React.findNodeHandle(component)`. - */ - measureLayout( - relativeToNativeNode: number, - onSuccess: MeasureLayoutOnSuccessCallback, - onFail: () => void /* currently unused */ - ): void; - - /** - * This function sends props straight to native. They will not participate in - * future diff process - this means that if you do not include them in the - * next render, they will remain active (see [Direct - * Manipulation](docs/direct-manipulation.html)). - */ - setNativeProps(nativeProps: Object): void; - - /** - * Requests focus for the given input or view. The exact behavior triggered - * will depend on the platform and type of view. - */ - focus(): void; - - /** - * Removes focus from an input or view. This is the opposite of `focus()`. - */ - blur(): void; - - refs: { - [key: string]: Component - }; - } - - // see react-jsx.d.ts - export function createElement

(type: React.ReactType, - props?: P, - ...children: React.ReactNode[]): React.ReactElement

; - - - export type Runnable = (appParameters: any) => void; - - - // Similar to React.SyntheticEvent except for nativeEvent - interface NativeSyntheticEvent { - bubbles: boolean - cancelable: boolean - currentTarget: EventTarget - defaultPrevented: boolean - eventPhase: number - isTrusted: boolean - nativeEvent: T - preventDefault(): void - stopPropagation(): void - target: EventTarget - timeStamp: Date - type: string - } - - export interface NativeTouchEvent { - /** - * Array of all touch events that have changed since the last event - */ - changedTouches: NativeTouchEvent[] - - /** - * The ID of the touch - */ - identifier: string - - /** - * The X position of the touch, relative to the element - */ - locationX: number - - /** - * The Y position of the touch, relative to the element - */ - locationY: number - - /** - * The X position of the touch, relative to the screen - */ - pageX: number - - /** - * The Y position of the touch, relative to the screen - */ - pageY: number - - /** - * The node id of the element receiving the touch event - */ - target: string - - /** - * A time identifier for the touch, useful for velocity calculation - */ - timestamp: number - - /** - * Array of all current touches on the screen - */ - touches: NativeTouchEvent[] - } - - export interface GestureResponderEvent extends NativeSyntheticEvent { - } - - - export interface PointProperties { - x: number - y: number - } - - export interface Insets { - top?: number - left?: number - bottom?: number - right?: number - } - - /** - * //FIXME: need to find documentation on which component is a TTouchable and can implement that interface - * @see React.DOMAtributes - */ - export interface Touchable { - onTouchStart?: (event: GestureResponderEvent) => void - onTouchMove?: (event: GestureResponderEvent) => void - onTouchEnd?: (event: GestureResponderEvent) => void - onTouchCancel?: (event: GestureResponderEvent) => void - onTouchEndCapture?: (event: GestureResponderEvent) => void - } - - export type ComponentProvider = () => React.ComponentClass - - export type AppConfig = { - appKey: string; - component?: ComponentProvider - run?: Runnable; - } - - // https://github.com/facebook/react-native/blob/master/Libraries/AppRegistry/AppRegistry.js - /** - * `AppRegistry` is the JS entry point to running all React Native apps. App - * root components should register themselves with - * `AppRegistry.registerComponent`, then the native system can load the bundle - * for the app and then actually run the app when it's ready by invoking - * `AppRegistry.runApplication`. - * - * To "stop" an application when a view should be destroyed, call - * `AppRegistry.unmountApplicationComponentAtRootTag` with the tag that was - * pass into `runApplication`. These should always be used as a pair. - * - * `AppRegistry` should be `require`d early in the `require` sequence to make - * sure the JS execution environment is setup before other modules are - * `require`d. - */ - export class AppRegistry { - static registerConfig(config: AppConfig[]): void; - - static registerComponent( appKey: string, getComponentFunc: ComponentProvider ): string; - - static registerRunnable(appKey: string, func: Runnable): string; - - static getAppKeys(): string[]; - - static unmountApplicationComponentAtRootTag(rootTag: number): void; - - static runApplication(appKey: string, appParameters: any): void; - } - - export interface LayoutAnimationTypes { - spring: string - linear: string - easeInEaseOut: string - easeIn: string - easeOut: string - } - - export interface LayoutAnimationProperties { - opacity: string - scaleXY: string - } - - export interface LayoutAnimationAnim { - duration?: number - delay?: number - springDamping?: number - initialVelocity?: number - type?: string //LayoutAnimationTypes - property?: string //LayoutAnimationProperties - } - - export interface LayoutAnimationConfig { - duration: number - create?: LayoutAnimationAnim - update?: LayoutAnimationAnim - delete?: LayoutAnimationAnim - } - - /** Automatically animates views to their new positions when the next layout happens. - * A common way to use this API is to call LayoutAnimation.configureNext before - * calling setState. */ - export interface LayoutAnimationStatic { - /** Schedules an animation to happen on the next layout. - * @param config Specifies animation properties: - * `duration` in milliseconds - * `create`, config for animating in new views (see Anim type) - * `update`, config for animating views that have been updated (see Anim type) - * @param onAnimationDidEnd Called when the animation finished. Only supported on iOS. - */ - configureNext: ( config: LayoutAnimationConfig, onAnimationDidEnd?: () => void ) => void - /** Helper for creating a config for configureNext. */ - create: (duration: number, type?: string, creationProp?: string) => LayoutAnimationConfig - Types: LayoutAnimationTypes - Properties: LayoutAnimationProperties - configChecker: (shapeTypes: {[key: string]: any}) => any - Presets: { - easeInEaseOut: LayoutAnimationConfig - linear: LayoutAnimationConfig - spring: LayoutAnimationConfig - } - easeInEaseOut: (config: LayoutAnimationConfig, onAnimationDidEnd?: () => void) => void - linear: (config: LayoutAnimationConfig, onAnimationDidEnd?: () => void) => void - spring: (config: LayoutAnimationConfig, onAnimationDidEnd?: () => void) => void - } - - export type FlexAlignType = "flex-start" | "flex-end" | "center" | "stretch"; - export type FlexJustifyType = "flex-start" | "flex-end" | "center" | "space-between" | "space-around"; - export type FlexDirection = "row" | "column" | "row-reverse" | "column-reverse"; - - /** - * Flex Prop Types - * @see https://facebook.github.io/react-native/docs/flexbox.html#proptypes - * @see LayoutPropTypes.js - */ - export interface FlexStyle { - - alignItems?: FlexAlignType; - alignSelf?: "auto" | FlexAlignType; - borderBottomWidth?: number - borderLeftWidth?: number - borderRightWidth?: number - borderTopWidth?: number - borderWidth?: number - bottom?: number - flex?: number - flexGrow?: number - flexShrink?: number - flexBasis?: number - flexDirection?: FlexDirection - flexWrap?: "wrap" | "nowrap" - height?: number - justifyContent?: FlexJustifyType - left?: number - minWidth?: number - maxWidth?: number - minHeight?: number - maxHeight?: number - margin?: number - marginBottom?: number - marginHorizontal?: number - marginLeft?: number - marginRight?: number - marginTop?: number - marginVertical?: number - overflow?: "visible" | "hidden" | "scroll" - padding?: number - paddingBottom?: number - paddingHorizontal?: number - paddingLeft?: number - paddingRight?: number - paddingTop?: number - paddingVertical?: number - position?: "absolute" | "relative" - right?: number - top?: number - width?: number - - /** - * @platform ios - */ - zIndex?: number - } - - /** - * @see ShadowPropTypesIOS.js - */ - export interface ShadowPropTypesIOSStatic { - /** - * Sets the drop shadow color - * @platform ios - */ - shadowColor: string - - /** - * Sets the drop shadow offset - * @platform ios - */ - shadowOffset: { width: number, height: number } - - /** - * Sets the drop shadow opacity (multiplied by the color's alpha component) - * @platform ios - */ - shadowOpacity: number - - /** - * Sets the drop shadow blur radius - * @platform ios - */ - shadowRadius: number - } - - type GetCurrentPositionOptions = { - timeout: number - maximumAge: number - enableHighAccuracy: boolean - distanceFilter: number - } - - type WatchPositionOptions = { - timeout: number - maximumAge: number - enableHighAccuracy: boolean - distanceFilter: number - } - - type GeolocationReturnType = { - coords: { - latitude: number - longitude: number - altitude?: number - accuracy?: number - altitudeAccuracy?: number - heading?: number - speed?: number - } - timestamp: number - } - - interface PerpectiveTransform { - perspective: number; - } - - interface RotateTransform { - rotate: string; - } - - interface RotateXTransform { - rotateX: string; - } - - interface RotateYTransform { - rotateY: string; - } - - interface RotateZTransform { - rotateZ: string; - } - - interface ScaleTransform { - scale: number; - } - - interface ScaleXTransform { - scaleX: number; - } - - interface ScaleYTransform { - scaleY: number; - } - - interface TranslateXTransform { - translateX: number; - } - - interface TranslateYTransform { - translateY: number; - } - - interface SkewXTransform { - skewX: string; - } - - interface SkewYTransform { - skewY: string; - } - - export interface TransformsStyle { - - transform?: (PerpectiveTransform|RotateTransform|RotateXTransform|RotateYTransform|RotateZTransform|ScaleTransform|ScaleXTransform|ScaleYTransform|TranslateXTransform|TranslateYTransform|SkewXTransform|SkewYTransform)[] - transformMatrix?: Array - rotation?: number - scaleX?: number - scaleY?: number - translateX?: number - translateY?: number - } - - - export interface StyleSheetProperties { - hairlineWidth: number - flatten(style: T): T - } - - export interface LayoutRectangle { - x: number; - y: number; - width: number; - height: number; - } - - // @see TextProperties.onLayout - export interface LayoutChangeEvent { - nativeEvent: { - layout: LayoutRectangle - } - } - - export interface TextStyleIOS extends ViewStyle { - letterSpacing?: number - textDecorationColor?: string - textDecorationStyle?: "solid" | "double" | "dotted" | "dashed" - writingDirection?: "auto" | "ltr" | "rtl" - } - - export interface TextStyleAndroid extends ViewStyle { - textAlignVertical?: "auto" | "top" | "bottom" | "center" - includeFontPadding?: boolean - } - - // @see https://facebook.github.io/react-native/docs/text.html#style - export interface TextStyle extends TextStyleIOS, TextStyleAndroid, ViewStyle { - color?: string - fontFamily?: string - fontSize?: number - fontStyle?: "normal" | "italic" - /** - * Specifies font weight. The values 'normal' and 'bold' are supported - * for most fonts. Not all fonts have a variant for each of the numeric - * values, in that case the closest one is chosen. - */ - fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" - letterSpacing?: number - lineHeight?: number - /** - * Specifies text alignment. - * The value 'justify' is only supported on iOS. - */ - textAlign?: "auto" | "left" | "right" | "center" - textDecorationLine?: "none" | "underline" | "line-through" | "underline line-through" - textDecorationStyle?: "solid" | "double" | "dotted" | "dashed" - textDecorationColor?: string - textShadowColor?: string - textShadowOffset?: { width: number, height: number } - textShadowRadius?: number - testID?: string - } - - export interface TextPropertiesIOS { - /** - * Specifies whether fonts should scale to respect Text Size accessibility setting on iOS. The - * default is `true`. - */ - allowFontScaling?: boolean - - /** - * Specifies whether font should be scaled down automatically to fit given style constraints. - */ - adjustsFontSizeToFit?: boolean - - /** - * Specifies smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0). - */ - minimumFontScale?: number - - /** - * When `true`, no visual change is made when text is pressed down. By - * default, a gray oval highlights the text on press down. - */ - suppressHighlighting?: boolean - } - - export interface TextPropertiesAndroid { - /** - * Lets the user select text, to use the native copy and paste functionality. - */ - selectable?: boolean - } - - // https://facebook.github.io/react-native/docs/text.html#props - export interface TextProperties extends TextPropertiesIOS, TextPropertiesAndroid, React.Props { - - /** - * When set to `true`, indicates that the view is an accessibility element. The default value - * for a `Text` element is `true`. - * - * See the - * [Accessibility guide](/react-native/docs/accessibility.html#accessible-ios-android) - * for more information. - */ - accessible?: boolean - - /** - * This can be one of the following values: - * - * - `head` - The line is displayed so that the end fits in the container and the missing text - * at the beginning of the line is indicated by an ellipsis glyph. e.g., "...wxyz" - * - `middle` - The line is displayed so that the beginning and end fit in the container and the - * missing text in the middle is indicated by an ellipsis glyph. "ab...yz" - * - `tail` - The line is displayed so that the beginning fits in the container and the - * missing text at the end of the line is indicated by an ellipsis glyph. e.g., "abcd..." - * - `clip` - Lines are not drawn past the edge of the text container. - * - * The default is `tail`. - * - * `numberOfLines` must be set in conjunction with this prop. - * - * > `clip` is working only for iOS - */ - ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip' - - /** - * Line Break mode. Works only with numberOfLines. - * clip is working only for iOS - */ - lineBreakMode?: 'head' | 'middle' | 'tail' | 'clip' - - /** - * Used to truncate the text with an ellipsis after computing the text - * layout, including line wrapping, such that the total number of lines - * does not exceed this number. - * - * This prop is commonly used with `ellipsizeMode`. - */ - numberOfLines?: number - - /** - * Invoked on mount and layout changes with - * - * {nativeEvent: { layout: {x, y, width, height}}}. - */ - onLayout?: (event: LayoutChangeEvent) => void - - /** - * This function is called on press. - * Text intrinsically supports press handling with a default highlight state (which can be disabled with suppressHighlighting). - */ - onPress?: () => void - - /** - * This function is called on long press. - * e.g., `onLongPress={this.increaseSize}>`` - */ - onLongPress?: () => void - - /** - * @see https://facebook.github.io/react-native/docs/text.html#style - */ - style?: TextStyle - - /** - * Used to locate this view in end-to-end tests. - */ - testID?: string - } - - /** - * A React component for displaying text which supports nesting, styling, and touch handling. - */ - export interface TextStatic extends NativeMethodsMixin, React.ClassicComponentClass { - - } - - type DataDetectorTypes = 'phoneNumber' | 'link' | 'address' | 'calendarEvent' | 'none' | 'all'; - - /** - * DocumentSelectionState is responsible for maintaining selection information - * for a document. - * - * It is intended for use by AbstractTextEditor-based components for - * identifying the appropriate start/end positions to modify the - * DocumentContent, and for programatically setting browser selection when - * components re-render. - */ - export interface DocumentSelectionState extends EventEmitter { - new(anchor: number, focus: number): DocumentSelectionState - - /** - * Apply an update to the state. If either offset value has changed, - * set the values and emit the `change` event. Otherwise no-op. - * - * @param {number} anchor - * @param {number} focus - */ - update(anchor: number, focus: number): void - - /** - * Given a max text length, constrain our selection offsets to ensure - * that the selection remains strictly within the text range. - * - * @param {number} maxLength - */ - constrainLength(maxLength: number): void - - focus(): void - blur(): void - hasFocus(): boolean - isCollapsed(): boolean - isBackward(): boolean - - getAnchorOffset(): number - getFocusOffset(): number - getStartOffset(): number - getEndOffset(): number - overlaps(start: number, end: number): boolean - } - - - /** - * IOS Specific properties for TextInput - * @see https://facebook.github.io/react-native/docs/textinput.html#props - */ - export interface TextInputIOSProperties { - - /** - * enum('never', 'while-editing', 'unless-editing', 'always') - * When the clear button should appear on the right side of the text view - */ - clearButtonMode?: 'never' | 'while-editing' | 'unless-editing' | 'always' - - /** - * If true, clears the text field automatically when editing begins - */ - clearTextOnFocus?: boolean - - /** - * Determines the types of data converted to clickable URLs in the text input. - * Only valid if `multiline={true}` and `editable={false}`. - * By default no data types are detected. - * - * You can provide one type or an array of many types. - * - * Possible values for `dataDetectorTypes` are: - * - * - `'phoneNumber'` - * - `'link'` - * - `'address'` - * - `'calendarEvent'` - * - `'none'` - * - `'all'` - */ - dataDetectorTypes?: DataDetectorTypes | DataDetectorTypes[] - - /** - * If true, the keyboard disables the return key when there is no text and automatically enables it when there is text. - * The default value is false. - */ - enablesReturnKeyAutomatically?: boolean - - /** - * Determines the color of the keyboard. - */ - keyboardAppearance?: 'default' | 'light' | 'dark' - - /** - * Callback that is called when a key is pressed. - * Pressed key value is passed as an argument to the callback handler. - * Fires before onChange callbacks. - */ - onKeyPress?: (key: string) => void - - /** - * See DocumentSelectionState.js, some state that is responsible for maintaining selection information for a document - */ - selectionState?: DocumentSelectionState - - - } - - /** - * Android Specific properties for TextInput - * @see https://facebook.github.io/react-native/docs/textinput.html#props - */ - export interface TextInputAndroidProperties { - - /** - * If defined, the provided image resource will be rendered on the left. - */ - inlineImageLeft?: string - - /** - * Padding between the inline image, if any, and the text input itself. - */ - inlineImagePadding?: number - - /** - * Sets the number of lines for a TextInput. - * Use it with multiline set to true to be able to fill the lines. - */ - numberOfLines?: number - - /** - * Sets the return key to the label. Use it instead of `returnKeyType`. - * @platform android - */ - returnKeyLabel?: string - - /** - * The color of the textInput underline. - */ - underlineColorAndroid?: string - } - - export type KeyboardType = "default" | "email-address" | "numeric" | "phone-pad" - export type KeyboardTypeIOS = "ascii-capable" | "numbers-and-punctuation" | "url" | "number-pad" | "name-phone-pad" | "decimal-pad" | "twitter" | "web-search" - - export type ReturnKeyType = "done" | "go" | "next" | "search" | "send" - export type ReturnKeyTypeAndroid = "none" | "previous" - export type ReturnKeyTypeIOS = "default" | "google" | "join" | "route" | "yahoo" | "emergency-call" - - /** - * @see https://facebook.github.io/react-native/docs/textinput.html#props - */ - export interface TextInputProperties extends ViewProperties, TextInputIOSProperties, TextInputAndroidProperties, React.Props { - - /** - * Can tell TextInput to automatically capitalize certain characters. - * characters: all characters, - * words: first letter of each word - * sentences: first letter of each sentence (default) - * none: don't auto capitalize anything - * - * https://facebook.github.io/react-native/docs/textinput.html#autocapitalize - */ - autoCapitalize?: "none" | "sentences" | "words" | "characters" - - /** - * If false, disables auto-correct. - * The default value is true. - */ - autoCorrect?: boolean - - /** - * If true, focuses the input on componentDidMount. - * The default value is false. - */ - autoFocus?: boolean - - /** - * If true, the text field will blur when submitted. - * The default value is true. - */ - blurOnSubmit?: boolean - - /** - * Provides an initial value that will change when the user starts typing. - * Useful for simple use-cases where you don't want to deal with listening to events - * and updating the value prop to keep the controlled state in sync. - */ - defaultValue?: string - - /** - * If false, text is not editable. The default value is true. - */ - editable?: boolean - - /** - * enum("default", 'numeric', 'email-address', "ascii-capable", 'numbers-and-punctuation', 'url', 'number-pad', 'phone-pad', 'name-phone-pad', 'decimal-pad', 'twitter', 'web-search') - * Determines which keyboard to open, e.g.numeric. - * The following values work across platforms: - default - numeric - email-address - phone-pad - */ - keyboardType?: KeyboardType | KeyboardTypeIOS - - /** - * Limits the maximum number of characters that can be entered. - * Use this instead of implementing the logic in JS to avoid flicker. - */ - maxLength?: number - - /** - * If true, the text input can be multiple lines. The default value is false. - */ - multiline?: boolean - - /** - * Callback that is called when the text input is blurred - */ - onBlur?: () => void - - /** - * Callback that is called when the text input's text changes. - */ - onChange?: (event: { nativeEvent: { text: string, contentSize: { width: number, height: number }, target: number, eventCount: number } }) => void - - /** - * Callback that is called when the text input's text changes. - * Changed text is passed as an argument to the callback handler. - */ - onChangeText?: (text: string) => void - - /** - * Callback that is called when the text input's content size changes. - * This will be called with - * `{ nativeEvent: { contentSize: { width, height } } }`. - * - * Only called for multiline text inputs. - */ - onContentSizeChange?: ( event: {nativeEvent: {contentSize: { width: number, height: number}}} ) => void - - /** - * Callback that is called when text input ends. - */ - onEndEditing?: (event: { nativeEvent: { text: string } }) => void - - /** - * Callback that is called when the text input is focused - */ - onFocus?: () => void - - /** - * Callback that is called when the text input selection is changed. - */ - onSelectionChange?: (event: { nativeEvent: { selection: { start: number, end: number }, target: number } }) => void - - /** - * Callback that is called when the text input's submit button is pressed. - */ - onSubmitEditing?: (event: { nativeEvent: { text: string } }) => void - - /** - * The string that will be rendered before text input has been entered - */ - placeholder?: string - - /** - * The text color of the placeholder string - */ - placeholderTextColor?: string - - /** - * enum('default', 'go', 'google', 'join', 'next', 'route', 'search', 'send', 'yahoo', 'done', 'emergency-call') - * Determines how the return key should look. - */ - returnKeyType?: ReturnKeyType | ReturnKeyTypeAndroid | ReturnKeyTypeIOS - - /** - * If true, the text input obscures the text entered so that sensitive text like passwords stay secure. - * The default value is false. - */ - secureTextEntry?: boolean - - /** - * If true, all text will automatically be selected on focus - */ - selectTextOnFocus?: boolean - - /** - * The start and end of the text input's selection. Set start and end to - * the same value to position the cursor. - */ - selection?: { start: number, end?: number } - - /** - * The highlight (and cursor on ios) color of the text input - */ - selectionColor?: string - - /** - * Styles - */ - style?: TextStyle - - /** - * Used to locate this view in end-to-end tests - */ - testID?: string - - /** - * The value to show for the text input. TextInput is a controlled component, - * which means the native value will be forced to match this value prop if provided. - * For most uses this works great, but in some cases this may cause flickering - one common cause is preventing edits by keeping value the same. - * In addition to simply setting the same value, either set editable={false}, - * or set/update maxLength to prevent unwanted edits without flicker. - */ - value?: string - - ref?: Ref - } - - /** - * This class is responsible for coordinating the "focused" - * state for TextInputs. All calls relating to the keyboard - * should be funneled through here - */ - interface TextInputState { - /** - * Returns the ID of the currently focused text field, if one exists - * If no text field is focused it returns null - */ - currentlyFocusedField(): number - - /** - * @param {number} TextInputID id of the text field to focus - * Focuses the specified text field - * noop if the text field was already focused - */ - focusTextInput(textFieldID?: number): void - - /** - * @param {number} textFieldID id of the text field to focus - * Unfocuses the specified text field - * noop if it wasn't focused - */ - blurTextInput(textFieldID?: number) : void - } - - /** - * @see https://facebook.github.io/react-native/docs/textinput.html#methods - */ - export interface TextInputStatic extends NativeMethodsMixin, TimerMixin, React.ComponentClass { - State: TextInputState - - /** - * Returns if the input is currently focused. - */ - isFocused: () => boolean - - /** - * Removes all text from the input. - */ - clear: () => void - } - - export type ToolbarAndroidAction = { - /** - * title: required, the title of this action - */ - title: string - - /** - * icon: the icon for this action, e.g. require('./some_icon.png') - */ - icon?: ImageURISource - - /** - * show: when to show this action as an icon or hide it in the overflow menu: always, ifRoom or never - */ - show?: "always" | "ifRoom" | "never" - - /** - * showWithText: boolean, whether to show text alongside the icon or not - */ - showWithText?: boolean - } - - export interface ToolbarAndroidProperties extends ViewProperties, React.Props { - - /** - * Sets possible actions on the toolbar as part of the action menu. These are displayed as icons - * or text on the right side of the widget. If they don't fit they are placed in an 'overflow' - * menu. - * - * This property takes an array of objects, where each object has the following keys: - * - * * `title`: **required**, the title of this action - * * `icon`: the icon for this action, e.g. `require('./some_icon.png')` - * * `show`: when to show this action as an icon or hide it in the overflow menu: `always`, - * `ifRoom` or `never` - * * `showWithText`: boolean, whether to show text alongside the icon or not - */ - actions?: ToolbarAndroidAction[] - - /** - * Sets the content inset for the toolbar ending edge. - * The content inset affects the valid area for Toolbar content other - * than the navigation button and menu. Insets define the minimum - * margin for these components and can be used to effectively align - * Toolbar content along well-known gridlines. - */ - contentInsetEnd?: number - - /** - * Sets the content inset for the toolbar starting edge. - * The content inset affects the valid area for Toolbar content - * other than the navigation button and menu. Insets define the - * minimum margin for these components and can be used to effectively - * align Toolbar content along well-known gridlines. - */ - contentInsetStart?: number - - /** - * Sets the toolbar logo. - */ - logo?: ImageURISource - - /** - * Sets the navigation icon. - */ - navIcon?: ImageURISource - - /** - * Callback that is called when an action is selected. The only - * argument that is passed to the callback is the position of the - * action in the actions array. - */ - onActionSelected?: (position: number) => void - - /** - * Callback called when the icon is selected. - */ - onIconClicked?: () => void - - /** - * Sets the overflow icon. - */ - overflowIcon?: ImageURISource - - /** - * Used to set the toolbar direction to RTL. - * In addition to this property you need to add - * android:supportsRtl="true" - * to your application AndroidManifest.xml and then call - * setLayoutDirection(LayoutDirection.RTL) in your MainActivity - * onCreate method. - */ - rtl?: boolean - - /** - * Sets the toolbar subtitle. - */ - subtitle?: string - - /** - * Sets the toolbar subtitle color. - */ - subtitleColor?: string - - /** - * Used to locate this view in end-to-end tests. - */ - testID?: string - - /** - * Sets the toolbar title. - */ - title?: string - - /** - * Sets the toolbar title color. - */ - titleColor?: string - - ref?: Ref - } - - /** - * React component that wraps the Android-only [`Toolbar` widget][0]. A Toolbar can display a logo, - * navigation icon (e.g. hamburger menu), a title & subtitle and a list of actions. The title and - * subtitle are expanded so the logo and navigation icons are displayed on the left, title and - * subtitle in the middle and the actions on the right. - * - * If the toolbar has an only child, it will be displayed between the title and actions. - * - * Although the Toolbar supports remote images for the logo, navigation and action icons, this - * should only be used in DEV mode where `require('./some_icon.png')` translates into a packager - * URL. In release mode you should always use a drawable resource for these icons. Using - * `require('./some_icon.png')` will do this automatically for you, so as long as you don't - * explicitly use e.g. `{uri: 'http://...'}`, you will be good. - * - * [0]: https://developer.android.com/reference/android/support/v7/widget/Toolbar.html - */ - export interface ToolbarAndroidStatic extends NativeMethodsMixin, React.ComponentClass { - - } - - - /** - * Gesture recognition on mobile devices is much more complicated than web. - * A touch can go through several phases as the app determines what the user's intention is. - * For example, the app needs to determine if the touch is scrolling, sliding on a widget, or tapping. - * This can even change during the duration of a touch. There can also be multiple simultaneous touches. - * - * The touch responder system is needed to allow components to negotiate these touch interactions - * without any additional knowledge about their parent or child components. - * This system is implemented in ResponderEventPlugin.js, which contains further details and documentation. - * - * Best Practices - * Users can feel huge differences in the usability of web apps vs. native, and this is one of the big causes. - * Every action should have the following attributes: - * Feedback/highlighting- show the user what is handling their touch, and what will happen when they release the gesture - * Cancel-ability- when making an action, the user should be able to abort it mid-touch by dragging their finger away - * - * These features make users more comfortable while using an app, - * because it allows people to experiment and interact without fear of making mistakes. - * - * TouchableHighlight and Touchable* - * The responder system can be complicated to use. - * So we have provided an abstract Touchable implementation for things that should be "tappable". - * This uses the responder system and allows you to easily configure tap interactions declaratively. - * Use TouchableHighlight anywhere where you would use a button or link on web. - */ - export interface GestureResponderHandlers { - - /** - * A view can become the touch responder by implementing the correct negotiation methods. - * There are two methods to ask the view if it wants to become responder: - */ - - /** - * Does this view want to become responder on the start of a touch? - */ - onStartShouldSetResponder?: (event: GestureResponderEvent) => boolean - - /** - * Called for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness? - */ - onMoveShouldSetResponder?: (event: GestureResponderEvent) => boolean - - /** - * If the View returns true and attempts to become the responder, one of the following will happen: - */ - - onResponderEnd?: ( event: GestureResponderEvent ) => void - - /** - * The View is now responding for touch events. - * This is the time to highlight and show the user what is happening - */ - onResponderGrant?: (event: GestureResponderEvent) => void - - /** - * Something else is the responder right now and will not release it - */ - onResponderReject?: (event: GestureResponderEvent) => void - - /** - * If the view is responding, the following handlers can be called: - */ - - /** - * The user is moving their finger - */ - onResponderMove?: (event: GestureResponderEvent) => void - - /** - * Fired at the end of the touch, ie "touchUp" - */ - onResponderRelease?: (event: GestureResponderEvent) => void - - onResponderStart?: ( event: GestureResponderEvent ) => void - - /** - * Something else wants to become responder. - * Should this view release the responder? Returning true allows release - */ - onResponderTerminationRequest?: (event: GestureResponderEvent) => boolean - - /** - * The responder has been taken from the View. - * Might be taken by other views after a call to onResponderTerminationRequest, - * or might be taken by the OS without asking (happens with control center/ notification center on iOS) - */ - onResponderTerminate?: (event: GestureResponderEvent) => void - - /** - * onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, - * where the deepest node is called first. - * That means that the deepest component will become responder when multiple Views return true for *ShouldSetResponder handlers. - * This is desirable in most cases, because it makes sure all controls and buttons are usable. - * - * However, sometimes a parent will want to make sure that it becomes responder. - * This can be handled by using the capture phase. - * Before the responder system bubbles up from the deepest component, - * it will do a capture phase, firing on*ShouldSetResponderCapture. - * So if a parent View wants to prevent the child from becoming responder on a touch start, - * it should have a onStartShouldSetResponderCapture handler which returns true. - */ - onStartShouldSetResponderCapture?: (event: GestureResponderEvent) => boolean - - /** - * onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, - * where the deepest node is called first. - * That means that the deepest component will become responder when multiple Views return true for *ShouldSetResponder handlers. - * This is desirable in most cases, because it makes sure all controls and buttons are usable. - * - * However, sometimes a parent will want to make sure that it becomes responder. - * This can be handled by using the capture phase. - * Before the responder system bubbles up from the deepest component, - * it will do a capture phase, firing on*ShouldSetResponderCapture. - * So if a parent View wants to prevent the child from becoming responder on a touch start, - * it should have a onStartShouldSetResponderCapture handler which returns true. - */ - onMoveShouldSetResponderCapture?: () => void; - - } - - // @see https://facebook.github.io/react-native/docs/view.html#style - export interface ViewStyle extends FlexStyle, TransformsStyle { - backfaceVisibility?: "visible" | "hidden" - backgroundColor?: string; - borderBottomColor?: string; - borderBottomLeftRadius?: number; - borderBottomRightRadius?: number; - borderBottomWidth?: number; - borderColor?: string; - borderLeftColor?: string; - borderRadius?: number; - borderRightColor?: string; - borderRightWidth?: number; - borderStyle?: "solid" | "dotted" | "dashed" - borderTopColor?: string; - borderTopLeftRadius?: number; - borderTopRightRadius?: number; - borderTopWidth?: number - opacity?: number; - overflow?: "visible" | "hidden" - shadowColor?: string; - shadowOffset?: { width: number, height: number }; - shadowOpacity?: number; - shadowRadius?: number; - elevation?: number; - testID?: string; - } - - - export interface ViewPropertiesIOS { - - /** - * Provides additional traits to screen reader. - * By default no traits are provided unless specified otherwise in element - * - * @enum('none', 'button', 'link', 'header', 'search', 'image', 'selected', 'plays', 'key', 'text','summary', 'disabled', 'frequentUpdates', 'startsMedia', 'adjustable', 'allowsDirectInteraction', 'pageTurn') - */ - accessibilityTraits?: ViewAccessibilityTraits | ViewAccessibilityTraits[]; - - /** - * Whether this view should be rendered as a bitmap before compositing. - * - * On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; - * for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view - * and quickly composite it during each frame. - * - * Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. - * Test and measure when using this property. - */ - shouldRasterizeIOS?: boolean - } - - export interface ViewPropertiesAndroid { - - /** - * Indicates to accessibility services to treat UI component like a native one. - * Works for Android only. - * - * @enum('none', 'button', 'radiobutton_checked', 'radiobutton_unchecked' ) - */ - accessibilityComponentType?: 'none' | 'button' | 'radiobutton_checked' | 'radiobutton_unchecked' - - - /** - * Indicates to accessibility services whether the user should be notified when this view changes. - * Works for Android API >= 19 only. - * See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. - */ - accessibilityLiveRegion?: 'none' | 'polite' | 'assertive' - - /** - * Views that are only used to layout their children or otherwise don't draw anything - * may be automatically removed from the native hierarchy as an optimization. - * Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy. - */ - collapsable?: boolean - - - /** - * Controls how view is important for accessibility which is if it fires accessibility events - * and if it is reported to accessibility services that query the screen. - * Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. - * - * Possible values: - * 'auto' - The system determines whether the view is important for accessibility - default (recommended). - * 'yes' - The view is important for accessibility. - * 'no' - The view is not important for accessibility. - * 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views. - */ - importantForAccessibility?: 'auto' | 'yes' | 'no' | 'no-hide-descendants' - - - /** - * Whether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. - * The default (false) falls back to drawing the component and its children - * with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. - * This default may be noticeable and undesired in the case where the View you are setting an opacity on - * has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). - * - * Rendering offscreen to preserve correct alpha behavior is extremely expensive - * and hard to debug for non-native developers, which is why it is not turned on by default. - * If you do need to enable this property for an animation, - * consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). - * If that property is enabled, this View will be rendered off-screen once, - * saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU. - */ - needsOffscreenAlphaCompositing?: boolean - - - /** - * Whether this view should render itself (and all of its children) into a single hardware texture on the GPU. - * - * On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: - * in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be - * re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation. - */ - renderToHardwareTextureAndroid?: boolean; - - } - - /** - * @see https://facebook.github.io/react-native/docs/view.html#props - */ - export interface ViewProperties extends ViewPropertiesAndroid, ViewPropertiesIOS, GestureResponderHandlers, Touchable, React.Props { - - /** - * Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the Text nodes separated by space. - */ - accessibilityLabel?: string; - - /** - * When true, indicates that the view is an accessibility element. - * By default, all the touchable elements are accessible. - */ - accessible?: boolean; - - /** - * This defines how far a touch event can start away from the view. - * Typical interface guidelines recommend touch targets that are at least - * 30 - 40 points/density-independent pixels. If a Touchable view has - * a height of 20 the touchable height can be extended to 40 with - * hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} - * NOTE The touch area never extends past the parent view bounds and - * the Z-index of sibling views always takes precedence if a touch - * hits two overlapping views. - */ - - hitSlop?: Insets - - /** - * When `accessible` is true, the system will try to invoke this function when the user performs accessibility tap gesture. - */ - onAcccessibilityTap?: () => void; - - /** - * Invoked on mount and layout changes with - * - * {nativeEvent: { layout: {x, y, width, height}}}. - */ - onLayout?: (event: LayoutChangeEvent) => void; - - /** - * When accessible is true, the system will invoke this function when the user performs the magic tap gesture. - */ - onMagicTap?: () => void; - - /** - * - * In the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: - * - * .box-none { - * pointer-events: none; - * } - * .box-none * { - * pointer-events: all; - * } - * - * box-only is the equivalent of - * - * .box-only { - * pointer-events: all; - * } - * .box-only * { - * pointer-events: none; - * } - * - * But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, - * we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform. - */ - pointerEvents?: "box-none" | "none" | "box-only" | "auto" - - /** - * - * This is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, - * most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. - * The subviews must also have overflow: hidden, as should the containing view (or one of its superviews). - */ - removeClippedSubviews?: boolean - - style?: ViewStyle; - - /** - * Used to locate this view in end-to-end tests. - */ - testID?: string; - } - - /** - * The most fundamental component for building UI, View is a container that supports layout with flexbox, style, some touch handling, - * and accessibility controls, and is designed to be nested inside other views and to have 0 to many children of any type. - * View maps directly to the native view equivalent on whatever platform React is running on, - * whether that is a UIView,

, android.view, etc. - */ - export interface ViewStatic extends NativeMethodsMixin, React.ClassicComponentClass { - AccessibilityTraits: [ - 'none', - 'button', - 'link', - 'header', - 'search', - 'image', - 'selected', - 'plays', - 'key', - 'text', - 'summary', - 'disabled', - 'frequentUpdates', - 'startsMedia', - 'adjustable', - 'allowsDirectInteraction', - 'pageTurn' - ] - - AccessibilityComponentType: [ - 'none', - 'button', - 'radiobutton_checked', - 'radiobutton_unchecked' - ], - - /** - * Is 3D Touch / Force Touch available (i.e. will touch events include `force`) - * @platform ios - */ - forceTouchAvailable: boolean, - } - - /** - * @see https://facebook.github.io/react-native/docs/viewpagerandroid.html#props - */ - - - export interface ViewPagerAndroidOnPageScrollEventData { - position: number; - offset: number; - } - - export interface ViewPagerAndroidOnPageSelectedEventData { - position: number; - } - - export interface ViewPagerAndroidProperties extends ViewProperties { - /** - * Index of initial page that should be selected. Use `setPage` method to - * update the page, and `onPageSelected` to monitor page changes - */ - initialPage?: number; - - /** - * When false, the content does not scroll. - * The default value is true. - */ - scrollEnabled?: boolean; - - /** - * Executed when transitioning between pages (ether because of animation for - * the requested page change or when user is swiping/dragging between pages) - * The `event.nativeEvent` object for this callback will carry following data: - * - position - index of first page from the left that is currently visible - * - offset - value from range [0,1) describing stage between page transitions. - * Value x means that (1 - x) fraction of the page at "position" index is - * visible, and x fraction of the next page is visible. - */ - onPageScroll?: (event: NativeSyntheticEvent) => void; - - /** - * This callback will be called once ViewPager finish navigating to selected page - * (when user swipes between pages). The `event.nativeEvent` object passed to this - * callback will have following fields: - * - position - index of page that has been selected - */ - onPageSelected?: (event: NativeSyntheticEvent) => void; - - /** - * Function called when the page scrolling state has changed. - * The page scrolling state can be in 3 states: - * - idle, meaning there is no interaction with the page scroller happening at the time - * - dragging, meaning there is currently an interaction with the page scroller - * - settling, meaning that there was an interaction with the page scroller, and the - * page scroller is now finishing it's closing or opening animation - */ - onPageScrollStateChanged?: (state: "Idle" | "Dragging" | "Settling") => void - - /** - * Determines whether the keyboard gets dismissed in response to a drag. - * - 'none' (the default), drags do not dismiss the keyboard. - * - 'on-drag', the keyboard is dismissed when a drag begins. - */ - keyboardDismissMode?: "none" | "on-drag" - - /** - * Blank space to show between pages. This is only visible while scrolling, pages are still - * edge-to-edge. - */ - pageMargin?: number - } - - export interface ViewPagerAndroidStatic extends NativeMethodsMixin, React.ComponentClass { - /** - * A helper function to scroll to a specific page in the ViewPager. - * The transition between pages will be animated. - */ - setPage(selectedPage: number): void - - /** - * A helper function to scroll to a specific page in the ViewPager. - * The transition between pages will *not* be animated. - */ - setPageWithoutAnimation(selectedPage: number): void - } - - /** - * It is a component to solve the common problem of views that need to move out of the way of the virtual keyboard. - * It can automatically adjust either its position or bottom padding based on the position of the keyboard. - */ - export interface KeyboardAvoidingViewStatic extends TimerMixin, React.ClassicComponentClass { - - } - - export interface KeyboardAvoidingViewProps extends ViewProperties, React.Props { - - behavior?: 'height' | 'position' | 'padding' - - /** - * The style of the content container(View) when behavior is 'position'. - */ - contentContainerStyle?: ViewStyle - - /** - * This is the distance between the top of the user screen and the react native view, - * may be non-zero in some use cases. - */ - keyboardVerticalOffset?: number - - ref?: Ref - } - - /** - * //FIXME: No documentation extracted from code comment on WebView.ios.js - */ - export interface NavState { - - url?: string - title?: string - loading?: boolean - canGoBack?: boolean - canGoForward?: boolean; - - [key: string]: any - } - - /** - * Passed data from WebView via window.postMessage. - */ - export interface WebViewMessageEventData { - /** - * The data sent from a WebView; can only be a string. - */ - data: string - } - - export interface WebViewPropertiesAndroid { - - /** - * Used for android only, JS is enabled by default for WebView on iOS - */ - javaScriptEnabled?: boolean - - /** - * Used on Android only, controls whether DOM Storage is enabled - * or not android - */ - domStorageEnabled?: boolean, - - /** - * Sets the user-agent for the WebView. - */ - userAgent?: string - } - - export interface WebViewIOSLoadRequestEvent { - target: number - canGoBack: boolean - lockIdentifier: number - loading: boolean - title: string - canGoForward: boolean - navigationType: 'other' | 'click' - url: string - } - - export interface WebViewPropertiesIOS { - - /** - * Determines whether HTML5 videos play inline or use the native - * full-screen controller. default value false - * NOTE : "In order * for video to play inline, not only does - * this property need to be set to true, but the video element - * in the HTML document must also include the webkit-playsinline - * attribute." - */ - allowsInlineMediaPlayback?: boolean - - /** - * Boolean value that determines whether the web view bounces - * when it reaches the edge of the content. The default value is `true`. - * @platform ios - */ - bounces?: boolean - - /** - * A floating-point number that determines how quickly the scroll - * view decelerates after the user lifts their finger. You may also - * use string shortcuts "normal" and "fast" which match the - * underlying iOS settings for UIScrollViewDecelerationRateNormal - * and UIScrollViewDecelerationRateFast respectively. - * - normal: 0.998 - fast: 0.99 (the default for iOS WebView) - */ - decelerationRate?: "normal" | "fast" | number - - /** - * Allows custom handling of any webview requests by a JS handler. - * Return true or false from this method to continue loading the - * request. - */ - onShouldStartLoadWithRequest?: (event: WebViewIOSLoadRequestEvent) => boolean - - /** - * Boolean value that determines whether scrolling is enabled in the - * `WebView`. The default value is `true`. - */ - scrollEnabled?: boolean - } - - export interface WebViewUriSource { - - /* - * The URI to load in the WebView. Can be a local or remote file. - */ - uri?: string; - - /* - * The HTTP Method to use. Defaults to GET if not specified. - * NOTE: On Android, only GET and POST are supported. - */ - method?: string; - - /* - * Additional HTTP headers to send with the request. - * NOTE: On Android, this can only be used with GET requests. - */ - headers?: any; - - /* - * The HTTP body to send with the request. This must be a valid - * UTF-8 string, and will be sent exactly as specified, with no - * additional encoding (e.g. URL-escaping or base64) applied. - * NOTE: On Android, this can only be used with POST requests. - */ - body?: string; - } - - export interface WebViewHtmlSource { - - /* - * A static HTML page to display in the WebView. - */ - html: string; - - /* - * The base URL to be used for any relative links in the HTML. - */ - baseUrl?: string; - } - - /** - * @see https://facebook.github.io/react-native/docs/webview.html#props - */ - export interface WebViewProperties extends ViewProperties, WebViewPropertiesAndroid, WebViewPropertiesIOS, React.Props { - - /** - * Controls whether to adjust the content inset for web views that are - * placed behind a navigation bar, tab bar, or toolbar. The default value - * is `true`. - */ - automaticallyAdjustContentInsets?: boolean - - /** - * The amount by which the web view content is inset from the edges of - * the scroll view. Defaults to {top: 0, left: 0, bottom: 0, right: 0}. - */ - contentInset?: Insets - - /** - * @deprecated - */ - html?: string - - /** - * Set this to provide JavaScript that will be injected into the web page - * when the view loads. - */ - injectedJavaScript?: string - - /** - * Invoked when load fails - */ - onError?: (event: NavState) => void - - /** - * Invoked when load finish - */ - onLoad?: (event: NavState) => void - - /** - * Invoked when load either succeeds or fails - */ - onLoadEnd?: (event: NavState) => void - - /** - * Invoked on load start - */ - onLoadStart?: (event: NavState) => void - - /** - * Invoked when window.postMessage is called from WebView. - */ - onMessage?: ( event: NativeSyntheticEvent ) => void - - /** - * Function that is invoked when the `WebView` loading starts or ends. - */ - onNavigationStateChange?: ( event: NavState ) => void - - /** - * Function that returns a view to show if there's an error. - */ - renderError?: () => React.ReactElement - - /** - * Function that returns a loading indicator. - */ - renderLoading?: () => React.ReactElement - - /** - * Boolean value that forces the `WebView` to show the loading view - * on the first load. - */ - startInLoadingState?: boolean - - style?: ViewStyle - - // Deprecated: Use the `source` prop instead. - url?: string - - source?: WebViewUriSource | WebViewHtmlSource | number - - /** - * Determines whether HTML5 audio & videos require the user to tap - * before they can start playing. The default value is false. - */ - mediaPlaybackRequiresUserAction?: boolean - - /** - * sets whether the webpage scales to fit the view and the user can change the scale - */ - scalesPageToFit?: boolean - - ref?: Ref - } - - - export interface WebViewStatic extends React.ClassicComponentClass { - - /** - * Go back one page in the webview's history. - */ - goBack: () => void - - /** - * Go forward one page in the webview's history. - */ - goForward: () => void - - /** - * Post a message to the WebView in the form of a string. - */ - postMessage: (message: string) => void - - /** - * Reloads the current page. - */ - reload: () => void - - /** - * Stop loading the current page. - */ - stopLoading(): void - - /** - * Returns the native webview node. - */ - getWebViewHandle: () => any - } - - - /** - * @see https://facebook.github.io/react-native/docs/segmentedcontrolios.html - * @see SegmentedControlIOS.ios.js - */ - export interface NativeSegmentedControlIOSChangeEvent { - value: string - selectedSegmentIndex: number - target: number - } - - export interface SegmentedControlIOSProperties extends ViewProperties, React.Props { - - /** - * If false the user won't be able to interact with the control. Default value is true. - */ - enabled?: boolean - - /** - * If true, then selecting a segment won't persist visually. - * The onValueChange callback will still work as expected. - */ - momentary?: boolean - - /** - * Callback that is called when the user taps a segment; - * passes the event as an argument - * @param event - */ - onChange?: (event: NativeSyntheticEvent) => void - - /** - * Callback that is called when the user taps a segment; passes the segment's value as an argument - * @param value - */ - onValueChange?: (value: string) => void - - /** - * The index in props.values of the segment to be (pre)selected. - */ - selectedIndex?: number - - /** - * Accent color of the control. - */ - tintColor?: string - - /** - * The labels for the control's segment buttons, in order. - */ - values?: string[] - - ref?: Ref - } - - /** - * Use `SegmentedControlIOS` to render a UISegmentedControl iOS. - * - * #### Programmatically changing selected index - * - * The selected index can be changed on the fly by assigning the - * selectIndex prop to a state variable, then changing that variable. - * Note that the state variable would need to be updated as the user - * selects a value and changes the index, as shown in the example below. - * - * ```` - * { - * this.setState({selectedIndex: event.nativeEvent.selectedSegmentIndex}); - * }} - * /> - * ```` - */ - export interface SegmentedControlIOSStatic extends NativeMethodsMixin, React.ClassicComponentClass { - - } - - - export interface NavigatorIOSProperties extends React.Props { - /** - * The default background color of the navigation bar. - */ - barTintColor?: string - - /** - * NavigatorIOS uses "route" objects to identify child views, their props, and navigation bar configuration. - * "push" and all the other navigation operations expect routes to be like this - */ - initialRoute: Route - - /** - * The default wrapper style for components in the navigator. - * A common use case is to set the backgroundColor for every page - */ - itemWrapperStyle?: ViewStyle - - /** - * Boolean value that indicates whether the interactive pop gesture is - * enabled. This is useful for enabling/disabling the back swipe navigation - * gesture. - * - * If this prop is not provided, the default behavior is for the back swipe - * gesture to be enabled when the navigation bar is shown and disabled when - * the navigation bar is hidden. Once you've provided the - * `interactivePopGestureEnabled` prop, you can never restore the default - * behavior. - */ - interactivePopGestureEnabled?: boolean - - /** - * A Boolean value that indicates whether the navigation bar is hidden - */ - navigationBarHidden?: boolean - - /** - * A Boolean value that indicates whether to hide the 1px hairline shadow - */ - shadowHidden?: boolean - - /** - * The color used for buttons in the navigation bar - */ - tintColor?: string - - /** - * The text color of the navigation bar title - */ - titleTextColor?: string - - /** - * A Boolean value that indicates whether the navigation bar is translucent - */ - translucent?: boolean - - /** - * NOT IN THE DOC BUT IN THE EXAMPLES - */ - style?: ViewStyle - } - - /** - * A navigator is an object of navigation functions that a view can call. - * It is passed as a prop to any component rendered by NavigatorIOS. - * - * Navigator functions are also available on the NavigatorIOS component: - * - * @see https://facebook.github.io/react-native/docs/navigatorios.html#navigator - */ - export interface NavigationIOS { - /** - * Navigate forward to a new route - */ - push: (route: Route) => void - - /** - * Go back one page - */ - pop: () => void - - /** - * Go back N pages at once. When N=1, behavior matches pop() - */ - popN: (n: number) => void - - /** - * Replace the route for the current page and immediately load the view for the new route - */ - replace: (route: Route) => void - - /** - * Replace the route/view for the previous page - */ - replacePrevious: (route: Route) => void - - /** - * Replaces the previous route/view and transitions back to it - */ - replacePreviousAndPop: (route: Route) => void - - /** - * Replaces the top item and popToTop - */ - resetTo: (route: Route) => void - - /** - * Go back to the item for a particular route object - */ - popToRoute(route: Route): void - - /** - * Go back to the top item - */ - popToTop(): void - } - - export interface NavigatorIOSStatic extends NavigationIOS, React.ComponentClass { - } - - - /** - * @see https://facebook.github.io/react-native/docs/activityindicator.html#props - */ - export interface ActivityIndicatorProperties extends ViewProperties, React.Props { - - /** - * Whether to show the indicator (true, the default) or hide it (false). - */ - animating?: boolean - - /** - * The foreground color of the spinner (default is gray). - */ - color?: string - - /** - * Whether the indicator should hide when not animating (true by default). - */ - hidesWhenStopped?: boolean - - /** - * Size of the indicator. - * Small has a height of 20, large has a height of 36. - * - * enum('small', 'large') - */ - size?: number | 'small' | 'large' - - style?: ViewStyle - - ref?: Ref - } - - export interface ActivityIndicatorStatic extends React.NativeMethodsMixin, React.ClassicComponentClass { - } - - - /** - * @see https://facebook.github.io/react-native/docs/activityindicatorios.html#props - */ - export interface ActivityIndicatorIOSProperties extends ViewProperties, React.Props { - - /** - * Whether to show the indicator (true, the default) or hide it (false). - */ - animating?: boolean - - /** - * The foreground color of the spinner (default is gray). - */ - color?: string - - /** - * Whether the indicator should hide when not animating (true by default). - */ - hidesWhenStopped?: boolean - - /** - * Invoked on mount and layout changes with - */ - onLayout?: (event: { nativeEvent: { layout: { x: number, y: number, width: number, height: number } } }) => void - - /** - * Size of the indicator. - * Small has a height of 20, large has a height of 36. - * - * enum('small', 'large') - */ - size?: 'small' | 'large' - - style?: ViewStyle - - ref?: Ref - } - - /** - * @Deprecated since version 0.28.0 - */ - export interface ActivityIndicatorIOSStatic extends React.ComponentClass { - } - - - export interface DatePickerIOSProperties extends ViewProperties, React.Props { - - /** - * The currently selected date. - */ - date: Date - - - /** - * Maximum date. - * Restricts the range of possible date/time values. - */ - maximumDate?: Date - - /** - * Maximum date. - * Restricts the range of possible date/time values. - */ - minimumDate?: Date - - /** - * enum(1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30) - * The interval at which minutes can be selected. - */ - minuteInterval?: number - - /** - * enum('date', 'time', 'datetime') - * The date picker mode. - */ - mode?: "date" | "time" | "datetime" - - /** - * Date change handler. - * This is called when the user changes the date or time in the UI. - * The first and only argument is a Date object representing the new date and time. - */ - onDateChange: ( newDate: Date ) => void - - /** - * Timezone offset in minutes. - * By default, the date picker will use the device's timezone. With this parameter, it is possible to force a certain timezone offset. - * For instance, to show times in Pacific Standard Time, pass -7 * 60. - */ - timeZoneOffsetInMinutes?: number - - ref?: Ref - } - - export interface DatePickerIOSStatic extends React.NativeMethodsMixin, React.ComponentClass { - } - - export interface DrawerSlideEvent extends NativeSyntheticEvent { - } - - /** - * @see DrawerLayoutAndroid.android.js - */ - export interface DrawerLayoutAndroidProperties extends ViewProperties, React.Props { - - /** - * Specifies the background color of the drawer. The default value - * is white. If you want to set the opacity of the drawer, use rgba. - * Example: - * return ( - * - * - *); - */ - drawerBackgroundColor?: string; - - /** - * Specifies the lock mode of the drawer. The drawer can be locked - * in 3 states: - * - * - unlocked (default), meaning that the drawer will respond - * (open/close) to touch gestures. - * - * - locked-closed, meaning that the drawer will stay closed and not - * respond to gestures. - * - * - locked-open, meaning that the drawer will stay opened and - * not respond to gestures. The drawer may still be opened and - * closed programmatically (openDrawer/closeDrawer). - */ - drawerLockMode?: "unlocked" | "locked-closed" | "locked-open"; - - /** - * Specifies the side of the screen from which the drawer will slide in. - * enum(DrawerLayoutAndroid.positions.Left, DrawerLayoutAndroid.positions.Right) - */ - drawerPosition?: number; - - /** - * Specifies the width of the drawer, more precisely the width of the - * view that be pulled in from the edge of the window. - */ - drawerWidth?: number; - - /** - * Determines whether the keyboard gets dismissed in response to a drag. - * - 'none' (the default), drags do not dismiss the keyboard. - * - 'on-drag', the keyboard is dismissed when a drag begins. - */ - keyboardDismissMode?: "none" | "on-drag" - - /** - * Function called whenever the navigation view has been closed. - */ - onDrawerClose?: () => void - - /** - * Function called whenever the navigation view has been opened. - */ - onDrawerOpen?: () => void - - /** - * Function called whenever there is an interaction with the navigation view. - * @param event - */ - onDrawerSlide?: (event: DrawerSlideEvent) => void - - /** - * Function called when the drawer state has changed. - * The drawer can be in 3 states: - * - idle, meaning there is no interaction with the navigation - * view happening at the time - * - dragging, meaning there is currently an interaction with the - * navigation view - * - settling, meaning that there was an interaction with the - * navigation view, and the navigation view is now finishing - * it's closing or opening animation - * @param event - */ - onDrawerStateChanged?: (event: "Idle" | "Dragging" | "Settling") => void - - /** - * The navigation view that will be rendered to the side of the - * screen and can be pulled in. - */ - renderNavigationView: () => JSX.Element - - /** - * Make the drawer take the entire screen and draw the background of - * the status bar to allow it to open over the status bar. It will - * only have an effect on API 21+. - */ - statusBarBackgroundColor?: string - - ref?: Ref - } - - interface DrawerPosition { - Left: number - Right: number - } - - export interface DrawerLayoutAndroidStatic extends NativeMethodsMixin, React.ClassicComponentClass { - - /** - * drawer's positions. - */ - positions: DrawerPosition - - /** - * Opens the drawer. - */ - openDrawer(): void - - /** - * Closes the drawer. - */ - closeDrawer(): void - } - - - /** - * @see PickerIOS.ios.js - */ - export interface PickerIOSItemProperties extends React.Props { - value?: string | number - label?: string - } - - /** - * @see PickerIOS.ios.js - */ - export interface PickerIOSItemStatic extends React.ComponentClass { - } - - /** - * @see Picker.js - */ - export interface PickerItemProperties extends React.Props { - label: string - value?: any - } - - export interface PickerItemStatic extends React.ComponentClass { - } - - export interface PickerPropertiesIOS extends ViewProperties, React.Props { - - /** - * Style to apply to each of the item labels. - * @platform ios - */ - itemStyle?: ViewStyle, - - ref?: Ref - } - - export interface PickerPropertiesAndroid extends ViewProperties, React.Props { - - /** - * If set to false, the picker will be disabled, i.e. the user will not be able to make a - * selection. - * @platform android - */ - enabled?: boolean - - /** - * On Android, specifies how to display the selection items when the user taps on the picker: - * - * - 'dialog': Show a modal dialog. This is the default. - * - 'dropdown': Shows a dropdown anchored to the picker view - * - * @platform android - */ - mode?: "dialog" | "dropdown" - - /** - * Prompt string for this picker, used on Android in dialog mode as the title of the dialog. - * @platform android - */ - prompt?: string - - ref?: Ref - } - - /** - * @see https://facebook.github.io/react-native/docs/picker.html - * @see Picker.js - */ - export interface PickerProperties extends PickerPropertiesIOS, PickerPropertiesAndroid, React.Props { - - /** - * Callback for when an item is selected. This is called with the - * following parameters: - * - itemValue: the value prop of the item that was selected - * - itemPosition: the index of the selected item in this picker - * @param itemValue - * @param itemPosition - */ - onValueChange?: (itemValue: any, itemPosition: number) => void - - /** - * Value matching value of one of the items. - * Can be a string or an integer. - */ - selectedValue?: any - - style?: ViewStyle - - /** - * Used to locate this view in end-to-end tests. - */ - testId?: string - - ref?: Ref - } - - /** - * @see https://facebook.github.io/react-native/docs/picker.html - * @see Picker.js - */ - export interface PickerStatic extends React.ComponentClass { - - /** - * On Android, display the options in a dialog. - */ - MODE_DIALOG: string - /** - * On Android, display the options in a dropdown (this is the default). - */ - MODE_DROPDOWN: string - - Item?: PickerItemStatic - } - - /** - * @see https://facebook.github.io/react-native/docs/pickerios.html - * @see PickerIOS.ios.js - */ - export interface PickerIOSProperties extends ViewProperties, React.Props { - - itemStyle?: TextStyle - onValueChange?: ( value: string | number ) => void - selectedValue?: string | number - - ref?: Ref - } - - /** - * @see https://facebook.github.io/react-native/docs/pickerios.html - * @see PickerIOS.ios.js - */ - export interface PickerIOSStatic extends NativeMethodsMixin, React.ClassicComponentClass { - - Item: PickerIOSItemStatic - } - - /** - * @see https://facebook.github.io/react-native/docs/progressbarandroid.html - * @see ProgressBarAndroid.android.js - */ - export interface ProgressBarAndroidProperties extends ViewProperties, React.Props { - - /** - * Style of the ProgressBar. One of: - Horizontal - Normal (default) - Small - Large - Inverse - SmallInverse - LargeInverse - */ - styleAttr?: "Horizontal" | "Normal" | "Small" | "Large" | "Inverse" | "SmallInverse" | "LargeInverse" - - /** - * If the progress bar will show indeterminate progress. - * Note that this can only be false if styleAttr is Horizontal. - */ - indeterminate?: boolean - - /** - * The progress value (between 0 and 1). - */ - progress?: number - - /** - * Color of the progress bar. - */ - color?: string - - /** - * Used to locate this view in end-to-end tests. - */ - testID?: string - - ref?: Ref - } - /** - * React component that wraps the Android-only `ProgressBar`. This component is used to indicate - * that the app is loading or there is some activity in the app. - */ - export interface ProgressBarAndroidStatic extends NativeMethodsMixin, React.ClassicComponentClass { - } - - /** - * @see https://facebook.github.io/react-native/docs/progressviewios.html - * @see ProgressViewIOS.ios.js - */ - export interface ProgressViewIOSProperties extends ViewProperties, React.Props { - - /** - * The progress bar style. - */ - progressViewStyle?: "default" | "bar" - - /** - * The progress value (between 0 and 1). - */ - progress?: number - - /** - * The tint color of the progress bar itself. - */ - progressTintColor?: string - - /** - * The tint color of the progress bar track. - */ - trackTintColor?: string - - /** - * A stretchable image to display as the progress bar. - */ - progressImage?: ImageURISource | ImageURISource[] - - /** - * A stretchable image to display behind the progress bar. - */ - trackImage?: ImageURISource | ImageURISource[] - - ref?: Ref - } - export interface ProgressViewIOSStatic extends NativeMethodsMixin, React.ClassicComponentClass { - } - - export interface RefreshControlPropertiesIOS extends ViewProperties, React.Props { - - /** - * The color of the refresh indicator. - */ - tintColor?: string - - /** - * The title displayed under the refresh indicator. - */ - title?: string - - /** - * Title color. - */ - titleColor?: string - - ref?: Ref - } - - export interface RefreshControlPropertiesAndroid extends ViewProperties, React.Props { - - /** - * The colors (at least one) that will be used to draw the refresh indicator. - */ - colors?: string[] - - /** - * Whether the pull to refresh functionality is enabled. - */ - enabled?: boolean - - /** - * The background color of the refresh indicator. - */ - progressBackgroundColor?: string - - /** - * Size of the refresh indicator, see RefreshControl.SIZE. - */ - size?: number - - /** - * Progress view top offset - * @platform android - */ - progressViewOffset?: number - - ref?: Ref - } - - export interface RefreshControlProperties extends RefreshControlPropertiesIOS, RefreshControlPropertiesAndroid, React.Props { - - /** - * Called when the view starts refreshing. - */ - onRefresh?: () => void - - /** - * Whether the view should be indicating an active refresh. - */ - refreshing: boolean - - ref?: Ref - } - - /** - * This component is used inside a ScrollView or ListView to add pull to refresh - * functionality. When the ScrollView is at `scrollY: 0`, swiping down - * triggers an `onRefresh` event. - * - * __Note:__ `refreshing` is a controlled prop, this is why it needs to be set to true - * in the `onRefresh` function otherwise the refresh indicator will stop immediately. - */ - export interface RefreshControlStatic extends NativeMethodsMixin, React.ClassicComponentClass { - SIZE: Object // Undocumented - } - - export interface RecyclerViewBackedScrollViewProperties extends ScrollViewProperties, React.Props { - ref?: Ref - } - - /** - * Wrapper around android native recycler view. - * - * It simply renders rows passed as children in a separate recycler view cells - * similarly to how `ScrollView` is doing it. Thanks to the fact that it uses - * native `RecyclerView` though, rows that are out of sight are going to be - * automatically detached (similarly on how this would work with - * `removeClippedSubviews = true` on a `ScrollView.js`). - * - * CAUTION: This is an experimental component and should only be used together - * with javascript implementation of list view (see ListView.js). In order to - * use it pass this component as `renderScrollComponent` to the list view. For - * now only horizontal scrolling is supported. - */ - export interface RecyclerViewBackedScrollViewStatic extends ScrollResponderMixin, React.ClassicComponentClass { - - /** - * A helper function to scroll to a specific point in the scrollview. - * This is currently used to help focus on child textviews, but can also - * be used to quickly scroll to any element we want to focus. Syntax: - * - * scrollResponderScrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true}) - * - * Note: The weird argument signature is due to the fact that, for historical reasons, - * the function also accepts separate arguments as as alternative to the options object. - * This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED. - */ - scrollTo( - y?: number | { x?: number, y?: number, animated?: boolean }, - x?: number, - animated?: boolean - ): void; - - /** - * Returns a reference to the underlying scroll responder, which supports - * operations like `scrollTo`. All ScrollView-like components should - * implement this method so that they can be composed while providing access - * to the underlying scroll responder's methods. - */ - getScrollResponder(): JSX.Element; - } - - export interface SliderPropertiesIOS extends ViewProperties, React.Props { - - /** - * Assigns a maximum track image. Only static images are supported. - * The leftmost pixel of the image will be stretched to fill the track. - */ - maximumTrackImage?: ImageURISource - - /** - * The color used for the track to the right of the button. - * Overrides the default blue gradient image. - */ - maximumTrackTintColor?: string - - /** - * Assigns a minimum track image. Only static images are supported. - * The rightmost pixel of the image will be stretched to fill the track. - */ - minimumTrackImage?: ImageURISource - - /** - * The color used for the track to the left of the button. - * Overrides the default blue gradient image. - */ - minimumTrackTintColor?: string - - /** - * Sets an image for the thumb. Only static images are supported. - */ - thumbImage?: ImageURISource - - /** - * Assigns a single image for the track. Only static images - * are supported. The center pixel of the image will be stretched - * to fill the track. - */ - trackImage?: ImageURISource - - ref?: Ref - } - - export interface SliderProperties extends SliderPropertiesIOS, React.Props { - - /** - * If true the user won't be able to move the slider. - * Default value is false. - */ - disabled?: boolean - - /** - * Initial maximum value of the slider. Default value is 1. - */ - maximumValue?: number - - /** - * Initial minimum value of the slider. Default value is 0. - */ - minimumValue?: number - - /** - * Callback called when the user finishes changing the value (e.g. when the slider is released). - * @param value - */ - onSlidingComplete?: (value: number) => void - - /** - * Callback continuously called while the user is dragging the slider. - * @param value - */ - onValueChange?: (value: number) => void - - /** - * Step value of the slider. The value should be between 0 and (maximumValue - minimumValue). Default value is 0. - */ - step?: number - - /** - * Used to style and layout the Slider. See StyleSheet.js and ViewStylePropTypes.js for more info. - */ - style?: ViewStyle - - /** - * Used to locate this view in UI automation tests. - */ - testID?: string - - /** - * Initial value of the slider. The value should be between minimumValue - * and maximumValue, which default to 0 and 1 respectively. - * Default value is 0. - * This is not a controlled component, you don't need to update - * the value during dragging. - */ - value?: number - } - - /** - * A component used to select a single value from a range of values. - */ - export interface SliderStatic extends NativeMethodsMixin, React.ClassicComponentClass { - - } - - /** - * https://facebook.github.io/react-native/docs/switchios.html#props - */ - export interface SwitchIOSProperties extends ViewProperties, React.Props { - - /** - * If true the user won't be able to toggle the switch. Default value is false. - */ - disabled?: boolean - - /** - * Background color when the switch is turned on. - */ - onTintColor?: string - - /** - * Callback that is called when the user toggles the switch. - */ - onValueChange?: (value: boolean) => void - - /** - * Background color for the switch round button. - */ - thumbTintColor?: string - - /** - * Background color when the switch is turned off. - */ - tintColor?: string - - /** - * The value of the switch, if true the switch will be turned on. Default value is false. - */ - value?: boolean - - ref?: Ref - } - - /** - * - * Use SwitchIOS to render a boolean input on iOS. - * - * This is a controlled component, so you must hook in to the onValueChange callback and update the value prop in order for the component to update, - * otherwise the user's change will be reverted immediately to reflect props.value as the source of truth. - * - * @see https://facebook.github.io/react-native/docs/switchios.html - */ - export interface SwitchIOSStatic extends React.ComponentClass { - - } - - export type ImageResizeMode = "contain" | "cover" | "stretch" | "center" | "repeat" - - /** - * @see ImageResizeMode.js - */ - export interface ImageResizeModeStatic { - /** - * contain - The image will be resized such that it will be completely - * visible, contained within the frame of the View. - */ - contain: ImageResizeMode - /** - * cover - The image will be resized such that the entire area of the view - * is covered by the image, potentially clipping parts of the image. - */ - cover: ImageResizeMode - /** - * stretch - The image will be stretched to fill the entire frame of the - * view without clipping. This may change the aspect ratio of the image, - * distoring it. Only supported on iOS. - */ - stretch: ImageResizeMode - /** - * center - The image will be scaled down such that it is completely visible, - * if bigger than the area of the view. - * The image will not be scaled up. - */ - center: ImageResizeMode, - - /** - * repeat - The image will be repeated to cover the frame of the View. The - * image will keep it's size and aspect ratio. - */ - repeat: ImageResizeMode, - } - - export interface ShadowStyleIOS { - shadowColor?: string - shadowOffset?: {width: number, height: number} - shadowOpacity?: number - shadowRadius?: number - } - - /** - * Image style - * @see https://facebook.github.io/react-native/docs/image.html#style - */ - export interface ImageStyle extends FlexStyle, TransformsStyle, ShadowStyleIOS { - resizeMode?: ImageResizeMode - backfaceVisibility?: "visible" | "hidden" - borderBottomLeftRadius?: number - borderBottomRightRadius?: number - backgroundColor?: string - borderColor?: string - borderWidth?: number - borderRadius?: number - borderTopLeftRadius?: number - borderTopRightRadius?: number - overflow?: "visible" | "hidden" - overlayColor?: string - tintColor?: string - opacity?: number - } - - export interface ImagePropertiesIOS { - /** - * The text that's read by the screen reader when the user interacts with the image. - */ - accessibilityLabel?: string; - - /** - * When true, indicates the image is an accessibility element. - */ - accessible?: boolean; - - /** - * blurRadius: the blur radius of the blur filter added to the image - * @platform ios - */ - blurRadius?: number, - - /** - * When the image is resized, the corners of the size specified by capInsets will stay a fixed size, - * but the center content and borders of the image will be stretched. - * This is useful for creating resizable rounded buttons, shadows, and other resizable assets. - * More info on Apple documentation - */ - capInsets?: Insets - - /** - * A static image to display while downloading the final image off the network. - */ - defaultSource?: ImageURISource | number - - /** - * Invoked on load error with {nativeEvent: {error}} - */ - onError?: (error: { nativeEvent: any }) => void - - /** - * Invoked on download progress with {nativeEvent: {loaded, total}} - */ - onProgress?: () => void - - /** - * Invoked when a partial load of the image is complete. The definition of - * what constitutes a "partial load" is loader specific though this is meant - * for progressive JPEG loads. - * @platform ios - */ - onPartialLoad?: () => void, - } - - /* - * @see https://github.com/facebook/react-native/blob/master/Libraries/Image/ImageSourcePropType.js - */ - interface ImageURISource { - /** - * `uri` is a string representing the resource identifier for the image, which - * could be an http address, a local file path, or the name of a static image - * resource (which should be wrapped in the `require('./path/to/image.png')` - * function). - */ - uri?: string, - /** - * `bundle` is the iOS asset bundle which the image is included in. This - * will default to [NSBundle mainBundle] if not set. - * @platform ios - */ - bundle?: string, - /** - * `method` is the HTTP Method to use. Defaults to GET if not specified. - */ - method?: string, - /** - * `headers` is an object representing the HTTP headers to send along with the - * request for a remote image. - */ - headers?: {[key: string]: string}, - /** - * `body` is the HTTP body to send with the request. This must be a valid - * UTF-8 string, and will be sent exactly as specified, with no - * additional encoding (e.g. URL-escaping or base64) applied. - */ - body?: string, - /** - * `width` and `height` can be specified if known at build time, in which case - * these will be used to set the default `` component dimensions. - */ - width?: number, - height?: number, - /** - * `scale` is used to indicate the scale factor of the image. Defaults to 1.0 if - * unspecified, meaning that one image pixel equates to one display point / DIP. - */ - scale?: number, - } - - /** - * @see https://facebook.github.io/react-native/docs/image.html - */ - export interface ImageProperties extends ImagePropertiesIOS, React.Props { - fadeDuration?: number - /** - * onLayout function - * - * Invoked on mount and layout changes with - * - * {nativeEvent: { layout: {x, y, width, height}}}. - */ - onLayout?: (event: LayoutChangeEvent) => void; - - /** - * Invoked when load completes successfully - */ - onLoad?: () => void - - /** - * Invoked when load either succeeds or fails - */ - onLoadEnd?: () => void - - /** - * Invoked on load start - */ - onLoadStart?: () => void - - progressiveRenderingEnabled?: boolean - - /** - * Determines how to resize the image when the frame doesn't match the raw - * image dimensions. - * - * 'cover': Scale the image uniformly (maintain the image's aspect ratio) - * so that both dimensions (width and height) of the image will be equal - * to or larger than the corresponding dimension of the view (minus padding). - * - * 'contain': Scale the image uniformly (maintain the image's aspect ratio) - * so that both dimensions (width and height) of the image will be equal to - * or less than the corresponding dimension of the view (minus padding). - * - * 'stretch': Scale width and height independently, This may change the - * aspect ratio of the src. - * - * 'center': Scale the image down so that it is completely visible, - * if bigger than the area of the view. - * The image will not be scaled up. - */ - resizeMode?: 'cover' |'contain' |'stretch' |'center' - - /** - * The mechanism that should be used to resize the image when the image's dimensions - * differ from the image view's dimensions. Defaults to `auto`. - * - * - `auto`: Use heuristics to pick between `resize` and `scale`. - * - * - `resize`: A software operation which changes the encoded image in memory before it - * gets decoded. This should be used instead of `scale` when the image is much larger - * than the view. - * - * - `scale`: The image gets drawn downscaled or upscaled. Compared to `resize`, `scale` is - * faster (usually hardware accelerated) and produces higher quality images. This - * should be used if the image is smaller than the view. It should also be used if the - * image is slightly bigger than the view. - * - * More details about `resize` and `scale` can be found at http://frescolib.org/docs/resizing-rotating.html. - * - * @platform android - */ - resizeMethod?: 'auto' | 'resize' | 'scale' - - /** - * `uri` is a string representing the resource identifier for the image, which - * could be an http address, a local file path, or a static image - * resource (which should be wrapped in the `require('./path/to/image.png')` function). - * This prop can also contain several remote `uri`, specified together with - * their width and height. The native side will then choose the best `uri` to display - * based on the measured size of the image container. - */ - source: ImageURISource | ImageURISource[] - - /** - * similarly to `source`, this property represents the resource used to render - * the loading indicator for the image, displayed until image is ready to be - * displayed, typically after when it got downloaded from network. - */ - loadingIndicatorSource?: ImageURISource; - - /** - * - * Style - */ - style?: ImageStyle; - - /** - * A unique identifier for this element to be used in UI Automation testing scripts. - */ - testID?: string; - - } - - export interface ImageStatic extends React.NativeMethodsMixin, React.ComponentClass { - resizeMode: ImageResizeMode - getSize(uri: string, success: (width: number, height: number) => void, failure: (error: any) => void): any - prefetch(url: string): any - abortPrefetch?(requestId: number): void - queryCache?(urls: string[]): Promise> - } - - /** - * @see https://facebook.github.io/react-native/docs/listview.html#props - */ - export interface ListViewProperties extends ScrollViewProperties, React.Props { - - /** - * An instance of [ListView.DataSource](docs/listviewdatasource.html) to use - */ - dataSource: ListViewDataSource - - /** - * Flag indicating whether empty section headers should be rendered. - * In the future release empty section headers will be rendered by - * default, and the flag will be deprecated. If empty sections are not - * desired to be rendered their indices should be excluded from - * sectionID object. - */ - enableEmptySections?: boolean - - /** - * How many rows to render on initial component mount. Use this to make - * it so that the first screen worth of data apears at one time instead of - * over the course of multiple frames. - */ - initialListSize?: number - - /** - * (visibleRows, changedRows) => void - * - * Called when the set of visible rows changes. `visibleRows` maps - * { sectionID: { rowID: true }} for all the visible rows, and - * `changedRows` maps { sectionID: { rowID: true | false }} for the rows - * that have changed their visibility, with true indicating visible, and - * false indicating the view has moved out of view. - */ - onChangeVisibleRows?: (visibleRows: Array<{ [sectionId: string]: { [rowID: string]: boolean } }>, changedRows: Array<{ [sectionId: string]: { [rowID: string]: boolean } }>) => void - - /** - * Called when all rows have been rendered and the list has been scrolled - * to within onEndReachedThreshold of the bottom. The native scroll - * event is provided. - */ - onEndReached?: () => void - - /** - * Threshold in pixels for onEndReached. - */ - onEndReachedThreshold?: number - - /** - * Number of rows to render per event loop. - */ - pageSize?: number - - /** - * A performance optimization for improving scroll perf of - * large lists, used in conjunction with overflow: 'hidden' on the row - * containers. Use at your own risk. - */ - removeClippedSubviews?: boolean - - /** - * () => renderable - * - * The header and footer are always rendered (if these props are provided) - * on every render pass. If they are expensive to re-render, wrap them - * in StaticContainer or other mechanism as appropriate. Footer is always - * at the bottom of the list, and header at the top, on every render pass. - */ - renderFooter?: () => React.ReactElement - - /** - * () => renderable - * - * The header and footer are always rendered (if these props are provided) - * on every render pass. If they are expensive to re-render, wrap them - * in StaticContainer or other mechanism as appropriate. Footer is always - * at the bottom of the list, and header at the top, on every render pass. - */ - renderHeader?: () => React.ReactElement - - /** - * (rowData, sectionID, rowID) => renderable - * Takes a data entry from the data source and its ids and should return - * a renderable component to be rendered as the row. By default the data - * is exactly what was put into the data source, but it's also possible to - * provide custom extractors. - */ - renderRow: ( rowData: any, sectionID: string | number, rowID: string | number, highlightRow?: boolean ) => React.ReactElement - - - /** - * A function that returns the scrollable component in which the list rows are rendered. - * Defaults to returning a ScrollView with the given props. - */ - renderScrollComponent?: (props: ScrollViewProperties) => React.ReactElement - - /** - * (sectionData, sectionID) => renderable - * - * If provided, a sticky header is rendered for this section. The sticky - * behavior means that it will scroll with the content at the top of the - * section until it reaches the top of the screen, at which point it will - * stick to the top until it is pushed off the screen by the next section - * header. - */ - renderSectionHeader?: (sectionData: any, sectionId: string | number) => React.ReactElement - - - /** - * (sectionID, rowID, adjacentRowHighlighted) => renderable - * If provided, a renderable component to be rendered as the separator below each row - * but not the last row if there is a section header below. - * Take a sectionID and rowID of the row above and whether its adjacent row is highlighted. - */ - renderSeparator?: (sectionID: string | number, rowID: string | number, adjacentRowHighlighted?: boolean) => React.ReactElement - - /** - * How early to start rendering rows before they come on screen, in - * pixels. - */ - scrollRenderAheadDistance?: number - - /** - * An array of child indices determining which children get docked to the - * top of the screen when scrolling. For example, passing - * `stickyHeaderIndices={[0]}` will cause the first child to be fixed to the - * top of the scroll view. This property is not supported in conjunction - * with `horizontal={true}`. - * @platform ios - */ - stickyHeaderIndices?: number[] - - ref?: Ref - } - - - interface TimerMixin { - setTimeout: typeof setTimeout, - clearTimeout: typeof clearTimeout, - setInterval: typeof setInterval, - clearInterval: typeof clearInterval, - setImmediate: typeof setImmediate, - clearImmediate: typeof clearImmediate, - requestAnimationFrame: typeof requestAnimationFrame, - cancelAnimationFrame: typeof cancelAnimationFrame, - } - - export interface ListViewStatic extends ScrollResponderMixin, TimerMixin, React.ComponentClass { - DataSource: ListViewDataSource; - - /** - * Exports some data, e.g. for perf investigations or analytics. - */ - getMetrics: () => { - contentLength: number, - totalRows: number, - renderedRows: number, - visibleRows: number, - } - - /** - * Provides a handle to the underlying scroll responder. - */ - getScrollResponder: () => any, - - /** - * Scrolls to a given x, y offset, either immediately or with a smooth animation. - * - * See `ScrollView#scrollTo`. - */ - scrollTo: ( y?: number | { x?: number, y?: number, animated?: boolean } , x?: number, animated?: boolean ) => void, - } - - - export interface MapViewAnnotation { - latitude: number - longitude: number - animateDrop?: boolean - draggable?: boolean - onDragStateChange?: () => any, - onFocus?: () => any, - onBlur?: () => any, - title?: string - subtitle?: string - leftCalloutView?: ReactElement - rightCalloutView?: ReactElement - detailCalloutView?: ReactElement - tintColor?: string - image?: ImageURISource - view?: ReactElement - hasLeftCallout?: boolean - hasRightCallout?: boolean - onLeftCalloutPress?: () => void - onRightCalloutPress?: () => void - id?: string - } - - export interface MapViewRegion { - latitude: number - longitude: number - latitudeDelta?: number - longitudeDelta?: number - } - - export interface MapViewOverlay { - coordinates: ({ latitude: number, longitude: number })[] - lineWidth?: number - strokeColor?: string - fillColor?: string - id?: string - } - - export interface MapViewProperties extends ViewProperties, React.Props { - - /** - * If false points of interest won't be displayed on the map. - * Default value is true. - */ - showsPointsOfInterest?: boolean - - /** - * Map annotations with title/subtitle. - */ - annotations?: MapViewAnnotation[] - - /** - * If true the map will follow the user's location whenever it changes. - * Note that this has no effect unless showsUserLocation is enabled. - * Default value is true. - */ - followUserLocation?: boolean - - /** - * Insets for the map's legal label, originally at bottom left of the map. See EdgeInsetsPropType.js for more information. - */ - legalLabelInsets?: Insets - - /** - * The map type to be displayed. - * standard: standard road map (default) - * satellite: satellite view - * hybrid: satellite view with roads and points of interest overlayed - * - * enum('standard', 'satellite', 'hybrid') - */ - mapType?: 'standard' |'satellite' |'hybrid' - - /** - * Maximum size of area that can be displayed. - */ - maxDelta?: number - - /** - * Minimum size of area that can be displayed. - */ - minDelta?: number - - /** - * Map overlays - */ - overlays?: MapViewOverlay[] - - /** - * If false compass won't be displayed on the map. - * Default value is true. - */ - showsCompass?: boolean - - /** - * Callback that is called once, when the user taps an annotation. - */ - onAnnotationPress?: () => void - - /** - * Callback that is called continuously when the user is dragging the map. - */ - onRegionChange?: (region: MapViewRegion) => void - - /** - * Callback that is called once, when the user is done moving the map. - */ - onRegionChangeComplete?: (region: MapViewRegion) => void - - /** - * When this property is set to true and a valid camera is associated with the map, - * the camera’s pitch angle is used to tilt the plane of the map. - * - * When this property is set to false, the camera’s pitch angle is ignored and - * the map is always displayed as if the user is looking straight down onto it. - */ - pitchEnabled?: boolean - - /** - * The region to be displayed by the map. - * The region is defined by the center coordinates and the span of coordinates to display. - */ - region?: MapViewRegion - - /** - * When this property is set to true and a valid camera is associated with the map, - * the camera’s heading angle is used to rotate the plane of the map around its center point. - * - * When this property is set to false, the camera’s heading angle is ignored and the map is always oriented - * so that true north is situated at the top of the map view - */ - rotateEnabled?: boolean - - /** - * If false the user won't be able to change the map region being displayed. - * Default value is true. - */ - scrollEnabled?: boolean - - /** - * If true the app will ask for the user's location and focus on it. - * Default value is false. - * - * NOTE: You need to add NSLocationWhenInUseUsageDescription key in Info.plist to enable geolocation, - * otherwise it is going to fail silently! - */ - showsUserLocation?: boolean - - /** - * Used to style and layout the MapView. - * See StyleSheet.js and ViewStylePropTypes.js for more info. - */ - style?: ViewStyle - - /** - * If false the user won't be able to pinch/zoom the map. - * Default value is true. - */ - zoomEnabled?: boolean - - ref?: Ref - } - - /** - * @see https://facebook.github.io/react-native/docs/mapview.html#content - */ - export interface MapViewStatic extends React.NativeMethodsMixin, React.ComponentClass { - PinColors: { - RED: string, - GREEN: string, - PURPLE: string - } - } - - export interface ModalProperties extends React.Props { - - // Only `animated` is documented. The JS code says `animated` is - // deprecated and `animationType` is preferred. - animated?: boolean - /** - * The `animationType` prop controls how the modal animates. - * - * - `slide` slides in from the bottom - * - `fade` fades into view - * - `none` appears without an animation - */ - animationType?: "none" | "slide" | "fade" - /** - * The `transparent` prop determines whether your modal will fill the entire view. - * Setting this to `true` will render the modal over a transparent background. - */ - transparent?: boolean - /** - * The `visible` prop determines whether your modal is visible. - */ - visible?: boolean - /** - * The `onRequestClose` prop allows passing a function that will be called once the modal has been dismissed. - * _On the Android platform, this is a required function._ - */ - onRequestClose?: () => void - /** - * The `onShow` prop allows passing a function that will be called once the modal has been shown. - */ - onShow?: (event: NativeSyntheticEvent) => void - /** - * The `supportedOrientations` prop allows the modal to be rotated to any of the specified orientations. - * On iOS, the modal is still restricted by what's specified in your app's Info.plist's UISupportedInterfaceOrientations field. - * @platform ios - */ - supportedOrientations?: ('portrait' | 'portrait-upside-down' | 'landscape' | 'landscape-left' | 'landscape-right')[] - /** - * The `onOrientationChange` callback is called when the orientation changes while the modal is being displayed. - * The orientation provided is only 'portrait' or 'landscape'. This callback is also called on initial render, regardless of the current orientation. - * @platform ios - */ - onOrientationChange?: () => void - } - - export interface ModalStatic extends React.ComponentClass { - - } - - /** - * @see https://github.com/facebook/react-native/blob/0.34-stable\Libraries\Components\Touchable\Touchable.js - */ - interface TouchableMixin { - - /** - * Invoked when the item should be highlighted. Mixers should implement this - * to visually distinguish the `VisualRect` so that the user knows that - * releasing a touch will result in a "selection" (analog to click). - */ - touchableHandleActivePressIn(e: Event): void - - /** - * Invoked when the item is "active" (in that it is still eligible to become - * a "select") but the touch has left the `PressRect`. Usually the mixer will - * want to unhighlight the `VisualRect`. If the user (while pressing) moves - * back into the `PressRect` `touchableHandleActivePressIn` will be invoked - * again and the mixer should probably highlight the `VisualRect` again. This - * event will not fire on an `touchEnd/mouseUp` event, only move events while - * the user is depressing the mouse/touch. - */ - touchableHandleActivePressOut(e: Event): void - - /** - * Invoked when the item is "selected" - meaning the interaction ended by - * letting up while the item was either in the state - * `RESPONDER_ACTIVE_PRESS_IN` or `RESPONDER_INACTIVE_PRESS_IN`. - */ - touchableHandlePress(e: Event): void - - /** - * Invoked when the item is long pressed - meaning the interaction ended by - * letting up while the item was in `RESPONDER_ACTIVE_LONG_PRESS_IN`. If - * `touchableHandleLongPress` is *not* provided, `touchableHandlePress` will - * be called as it normally is. If `touchableHandleLongPress` is provided, by - * default any `touchableHandlePress` callback will not be invoked. To - * override this default behavior, override `touchableLongPressCancelsPress` - * to return false. As a result, `touchableHandlePress` will be called when - * lifting up, even if `touchableHandleLongPress` has also been called. - */ - touchableHandleLongPress(e: Event): void - - /** - * Returns the amount to extend the `HitRect` into the `PressRect`. Positive - * numbers mean the size expands outwards. - */ - touchableGetPressRectOffset(): Insets - - /** - * Returns the number of millis to wait before triggering a highlight. - */ - touchableGetHighlightDelayMS(): number - - // These methods are undocumented but still being used by TouchableMixin internals - touchableGetLongPressDelayMS(): number - touchableGetPressOutDelayMS(): number - touchableGetHitSlop(): Insets - } - - export interface TouchableWithoutFeedbackAndroidProperties { - - /** - * Indicates to accessibility services to treat UI component like a native one. - * Works for Android only. - * - * @enum('none', 'button', 'radiobutton_checked', 'radiobutton_unchecked' ) - */ - accessibilityComponentType?: 'none' | 'button' | 'radiobutton_checked' | 'radiobutton_unchecked' - } - - type ViewAccessibilityTraits = 'none' | 'button' | 'link' | 'header' | 'search' | 'image' | 'selected' | 'plays' | 'key' | 'text' | 'summary' | 'disabled' | 'frequentUpdates' | 'startsMedia' | 'adjustable' | 'allowsDirectInteraction' | 'pageTurn' - - export interface TouchableWithoutFeedbackIOSProperties { - - /** - * Provides additional traits to screen reader. - * By default no traits are provided unless specified otherwise in element - * - * @enum('none', 'button', 'link', 'header', 'search', 'image', 'selected', 'plays', 'key', 'text','summary', 'disabled', 'frequentUpdates', 'startsMedia', 'adjustable', 'allowsDirectInteraction', 'pageTurn') - */ - accessibilityTraits?: ViewAccessibilityTraits | ViewAccessibilityTraits[] - - } - - /** - * @see https://facebook.github.io/react-native/docs/touchablewithoutfeedback.html#props - */ - export interface TouchableWithoutFeedbackProperties extends TouchableWithoutFeedbackAndroidProperties, TouchableWithoutFeedbackIOSProperties { - - - /** - * Called when the touch is released, but not if cancelled (e.g. by a scroll that steals the responder lock). - */ - accessible?: boolean - - /** - * Delay in ms, from onPressIn, before onLongPress is called. - */ - delayLongPress?: number; - - /** - * Delay in ms, from the start of the touch, before onPressIn is called. - */ - delayPressIn?: number; - - /** - * Delay in ms, from the release of the touch, before onPressOut is called. - */ - delayPressOut?: number; - - /** - * If true, disable all interactions for this component. - */ - disabled?: boolean - - /** - * This defines how far your touch can start away from the button. - * This is added to pressRetentionOffset when moving off of the button. - * NOTE The touch area never extends past the parent view bounds and - * the Z-index of sibling views always takes precedence if a touch hits - * two overlapping views. - */ - hitSlop?: Insets - - /** - * Invoked on mount and layout changes with - * {nativeEvent: {layout: {x, y, width, height}}} - */ - onLayout?: (event: LayoutChangeEvent) => void - - onLongPress?: () => void; - - /** - * Called when the touch is released, - * but not if cancelled (e.g. by a scroll that steals the responder lock). - */ - onPress?: () => void; - - onPressIn?: () => void; - - onPressOut?: () => void; - - /** - * //FIXME: not in doc but available in examples - */ - style?: ViewStyle - - /** - * When the scroll view is disabled, this defines how far your - * touch may move off of the button, before deactivating the button. - * Once deactivated, try moving it back and you'll see that the button - * is once again reactivated! Move it back and forth several times - * while the scroll view is disabled. Ensure you pass in a constant - * to reduce memory allocations. - */ - pressRetentionOffset?: Insets - } - - - export interface TouchableWithoutFeedbackProps extends TouchableWithoutFeedbackProperties, React.Props { - - } - - /** - * Do not use unless you have a very good reason. - * All the elements that respond to press should have a visual feedback when touched. - * This is one of the primary reason a "web" app doesn't feel "native". - * - * @see https://facebook.github.io/react-native/docs/touchablewithoutfeedback.html - */ - export interface TouchableWithoutFeedbackStatic extends TimerMixin, TouchableMixin, React.ClassicComponentClass { - - } - - /** - * @see https://facebook.github.io/react-native/docs/touchablehighlight.html#props - */ - export interface TouchableHighlightProperties extends TouchableWithoutFeedbackProperties, React.Props { - - /** - * Determines what the opacity of the wrapped view should be when touch is active. - */ - activeOpacity?: number - - /** - * - * Called immediately after the underlay is hidden - */ - onHideUnderlay?: () => void - - /** - * Called immediately after the underlay is shown - */ - onShowUnderlay?: () => void - - /** - * @see https://facebook.github.io/react-native/docs/view.html#style - */ - style?: ViewStyle - - - /** - * The color of the underlay that will show through when the touch is active. - */ - underlayColor?: string - } - - /** - * A wrapper for making views respond properly to touches. - * On press down, the opacity of the wrapped view is decreased, - * which allows the underlay color to show through, darkening or tinting the view. - * The underlay comes from adding a view to the view hierarchy, - * which can sometimes cause unwanted visual artifacts if not used correctly, - * for example if the backgroundColor of the wrapped view isn't explicitly set to an opaque color. - * - * NOTE: TouchableHighlight supports only one child - * If you wish to have several child components, wrap them in a View. - * - * @see https://facebook.github.io/react-native/docs/touchablehighlight.html - */ - export interface TouchableHighlightStatic extends NativeMethodsMixin, TimerMixin, TouchableMixin, React.ClassicComponentClass { - } - - - /** - * @see https://facebook.github.io/react-native/docs/touchableopacity.html#props - */ - export interface TouchableOpacityProperties extends TouchableWithoutFeedbackProperties, React.Props { - /** - * Determines what the opacity of the wrapped view should be when touch is active. - * Defaults to 0.2 - */ - activeOpacity?: number - } - - /** - * A wrapper for making views respond properly to touches. - * On press down, the opacity of the wrapped view is decreased, dimming it. - * This is done without actually changing the view hierarchy, - * and in general is easy to add to an app without weird side-effects. - * - * @see https://facebook.github.io/react-native/docs/touchableopacity.html - */ - export interface TouchableOpacityStatic extends TimerMixin, TouchableMixin, NativeMethodsMixin, React.ClassicComponentClass { - /** - * Animate the touchable to a new opacity. - */ - setOpacityTo: (value: number) => void - } - - interface BaseBackgroundPropType { - type: string - } - - interface RippleBackgroundPropType extends BaseBackgroundPropType { - type: 'RippleAndroid' - color?: number, - borderless?: boolean - } - - interface ThemeAttributeBackgroundPropType extends BaseBackgroundPropType { - type: 'ThemeAttrAndroid' - attribute: string - } - - type BackgroundPropType = RippleBackgroundPropType | ThemeAttributeBackgroundPropType - - /** - * @see https://facebook.github.io/react-native/docs/touchableopacity.html#props - */ - export interface TouchableNativeFeedbackProperties extends TouchableWithoutFeedbackProperties, React.Props { - /** - * Determines the type of background drawable that's going to be used to display feedback. - * It takes an object with type property and extra data depending on the type. - * It's recommended to use one of the following static methods to generate that dictionary: - * 1) TouchableNativeFeedback.SelectableBackground() - will create object that represents android theme's default background for selectable elements (?android:attr/selectableItemBackground) - * 2) TouchableNativeFeedback.SelectableBackgroundBorderless() - will create object that represent android theme's default background for borderless selectable elements (?android:attr/selectableItemBackgroundBorderless). Available on android API level 21+ - * 3) TouchableNativeFeedback.Ripple(color, borderless) - will create object that represents ripple drawable with specified color (as a string). If property borderless evaluates to true the ripple will render outside of the view bounds (see native actionbar buttons as an example of that behavior). This background type is available on Android API level 21+ - */ - background?: BackgroundPropType - } - - /** - * A wrapper for making views respond properly to touches (Android only). - * On Android this component uses native state drawable to display touch feedback. - * At the moment it only supports having a single View instance as a child node, - * as it's implemented by replacing that View with another instance of RCTView node with some additional properties set. - * - * Background drawable of native feedback touchable can be customized with background property. - * - * @see https://facebook.github.io/react-native/docs/touchablenativefeedback.html#content - */ - export interface TouchableNativeFeedbackStatic extends TouchableMixin, React.ClassicComponentClass { - - /** - * Creates an object that represents android theme's default background for - * selectable elements (?android:attr/selectableItemBackground). - */ - SelectableBackground(): ThemeAttributeBackgroundPropType - - /** - * Creates an object that represent android theme's default background for borderless - * selectable elements (?android:attr/selectableItemBackgroundBorderless). - * Available on android API level 21+. - */ - SelectableBackgroundBorderless(): ThemeAttributeBackgroundPropType - - /** - * Creates an object that represents ripple drawable with specified color (as a - * string). If property `borderless` evaluates to true the ripple will - * render outside of the view bounds (see native actionbar buttons as an - * example of that behavior). This background type is available on Android - * API level 21+. - * - * @param color The ripple color - * @param borderless If the ripple can render outside it's bounds - */ - Ripple( color: string, borderless?: boolean ): RippleBackgroundPropType - } - - - export interface LeftToRightGesture { - // If the gesture can end and restart during one continuous touch - isDetachable: boolean; - // How far the swipe must drag to start transitioning - gestureDetectMovement: number; - // Amplitude of release velocity that is considered still - notMoving: number; - // Fraction of directional move required. - directionRatio: number; - // Velocity to transition with when the gesture release was "not moving" - snapVelocity: number; - // Region that can trigger swipe. iOS default is 30px from the left edge - edgeHitWidth: number; - // Ratio of gesture completion when non-velocity release will cause action - stillCompletionRatio: number; - fullDistance: any; - direction: string; - } - - export interface JumpGesture extends LeftToRightGesture{ - overswipe: { - frictionConstant: number - frictionByDistance: number - } - } - - // see /NavigatorSceneConfigs.js - export interface SceneConfig { - // A list of all gestures that are enabled on this scene - gestures?: { - pop?: LeftToRightGesture, - }, - - // Rebound spring parameters when transitioning FROM this scene - springFriction: number; - springTension: number; - - // Velocity to start at when transitioning without gesture - defaultTransitionVelocity: number; - - // Animation interpolators for horizontal transitioning: - animationInterpolators: { - into: () => boolean, - out: () => boolean - }; - } - - export interface JumpSceneConfig extends SceneConfig { - gestures: { - jumpBack: JumpGesture - jumpForward: JumpGesture - } - } - - // see /NavigatorSceneConfigs.js - export interface SceneConfigs { - PushFromRight: SceneConfig; - PushFromLeft: SceneConfig; - FloatFromRight: SceneConfig; - FloatFromLeft: SceneConfig; - FloatFromBottom: SceneConfig; - FloatFromBottomAndroid: SceneConfig; - FadeAndroid: SceneConfig; - HorizontalSwipeJump: SceneConfig; - HorizontalSwipeJumpFromRight: SceneConfig; - VerticalUpSwipeJump: SceneConfig; - VerticalDownSwipeJump: SceneConfig; - } - - export interface Route { - component?: React.ComponentClass - id?: string - title?: string - passProps?: Object; - - //anything else - [key: string]: any - - //Commonly found properties - backButtonTitle?: string - content?: string - message?: string; - index?: number - onRightButtonPress?: () => void - rightButtonTitle?: string - sceneConfig?: SceneConfig - wrapperStyle?: any - } - - - /** - * @see https://facebook.github.io/react-native/docs/navigator.html#content - */ - export interface NavigatorProperties extends React.Props { - /** - * Optional function that allows configuration about scene animations and gestures. - * Will be invoked with `route` and `routeStack` parameters, where `route` - * corresponds to the current scene being rendered by the `Navigator` and - * `routeStack` is the set of currently mounted routes that the navigator - * could transition to. The function should return a scene configuration object. - * @param route - * @param routeStack - */ - configureScene?: (route: Route, routeStack: Route[]) => SceneConfig - /** - * Specify a route to start on. - * A route is an object that the navigator will use to identify each scene to render. - * initialRoute must be a route in the initialRouteStack if both props are provided. - * The initialRoute will default to the last item in the initialRouteStack. - */ - initialRoute?: Route - /** - * Provide a set of routes to initially mount. - * Required if no initialRoute is provided. - * Otherwise, it will default to an array containing only the initialRoute - */ - initialRouteStack?: Route[] - - /** - * Optionally provide a navigation bar that persists across scene transitions - */ - navigationBar?: React.ReactElement - - /** - * Optionally provide the navigator object from a parent Navigator - */ - navigator?: Navigator - - /** - * @deprecated Use navigationContext.addListener('willfocus', callback) instead. - */ - onDidFocus?: Function - - /** - * @deprecated Use navigationContext.addListener('willfocus', callback) instead. - */ - onWillFocus?: Function - - /** - * Required function which renders the scene for a given route. - * Will be invoked with the route and the navigator object - * @param route - * @param navigator - */ - renderScene: ( route: Route, navigator: Navigator ) => React.ReactElement - - /** - * Styles to apply to the container of each scene - */ - sceneStyle?: ViewStyle - - } - - /** - * Class that contains the info and methods for app navigation. - */ - export interface NavigationContext { - parent: NavigationContext; - top: NavigationContext; - currentRoute: any; - appendChild(childContext: NavigationContext): void; - addListener(eventType: string, listener: () => void, useCapture?: boolean): NativeEventSubscription; - emit(eventType: string, data: any, didEmitCallback?: () => void): void; - dispose(): void; - } - - interface InteractionMixin { - createInteractionHandle(): number - clearInteractionHandle(clearHandle: number): void - /** - * Schedule work for after all interactions have completed. - * - * @param {function} callback - */ - runAfterInteractions(callback: () => any): void - } - - interface SubscribableMixin { - /** - * Special form of calling `addListener` that *guarantees* that a - * subscription *must* be tied to a component instance, and therefore will - * be cleaned up when the component is unmounted. It is impossible to create - * the subscription and pass it in - this method must be the one to create - * the subscription and therefore can guarantee it is retained in a way that - * will be cleaned up. - * - * @param {EventEmitter} eventEmitter emitter to subscribe to. - * @param {string} eventType Type of event to listen to. - * @param {function} listener Function to invoke when event occurs. - * @param {object} context Object to use as listener context. - */ - addListenerOn( eventEmitter: any, eventType: string, listener: () => any, context: any ): void - } - - /** - * Use Navigator to transition between different scenes in your app. - * To accomplish this, provide route objects to the navigator to identify each scene, - * and also a renderScene function that the navigator can use to render the scene for a given route. - * - * To change the animation or gesture properties of the scene, provide a configureScene prop to get the config object for a given route. - * See Navigator.SceneConfigs for default animations and more info on scene config options. - * @see https://facebook.github.io/react-native/docs/navigator.html - */ - export interface NavigatorStatic extends TimerMixin, InteractionMixin, SubscribableMixin, React.ComponentClass { - SceneConfigs: SceneConfigs; - NavigationBar: NavigatorStatic.NavigationBarStatic; - BreadcrumbNavigationBar: NavigatorStatic.BreadcrumbNavigationBarStatic; - - navigationContext: NavigationContext; - - /** - * returns the current list of routes - */ - getCurrentRoutes(): Route[]; - - /** - * Jump backward without unmounting the current scen - */ - jumpBack(): void; - - /** - * Jump forward to the next scene in the route stack - */ - jumpForward(): void; - - /** - * Transition to an existing scene without unmounting - */ - jumpTo(route: Route): void; - - /** - * Navigate forward to a new scene, squashing any scenes that you could jumpForward to - */ - push(route: Route): void; - - /** - * Transition back and unmount the current scene - */ - pop(): void; - - /** - * Go back N scenes at once. When N=1, behavior matches `pop()`. - * When N is invalid(negative or bigger than current routes count), do nothing. - * @param {number} n The number of scenes to pop. Should be an integer. - */ - popN(n: number): void - - /** - * Replace the current scene with a new route - */ - replace(route: Route): void; - - /** - * Replace a scene as specified by an index - */ - replaceAtIndex(route: Route, index: number): void; - - /** - * Replace the previous scene - */ - replacePrevious(route: Route): void; - - /** - * Reset every scene with an array of routes - */ - immediatelyResetRouteStack(routes: Route[]): void; - - /** - * Pop to a particular scene, as specified by its route. All scenes after it will be unmounted - */ - popToRoute(route: Route): void; - - /** - * Pop to the first scene in the stack, unmounting every other scene - */ - popToTop(): void; - - /** - * Replace the previous scene and pop to it. - */ - replacePreviousAndPop( route: Route ): void; - - /** - * Navigate to a new scene and reset route stack. - */ - resetTo( route: Route ): void; - - } - - namespace NavigatorStatic { - - - export interface NavState { - routeStack: Route[] - presentedIndex: number - } - - // @see NavigationBarStyle.ios.js - export interface NavigationBarStyle { - General: { - NavBarHeight: number - StatusBarHeight: number - TotalNavHeight: number - }, - Interpolators: { - // Animating *into* the center stage from the right - RightToCenter: () => boolean - // Animating out of the center stage, to the left - CenterToLeft: () => boolean - // Both stages (animating *past* the center stage) - RightToLeft: () => boolean - }, - Stages: { - Left: { - Title: FlexStyle - LeftButton: FlexStyle - RightButton: FlexStyle - }, - Center: { - Title: FlexStyle - LeftButton: FlexStyle - RightButton: FlexStyle - }, - Right: { - Title: FlexStyle - LeftButton: FlexStyle - RightButton: FlexStyle - }, - } - } - - - export interface NavigationBarRouteMapper { - Title: (route: Route, nav: Navigator, index: number, navState: NavState) => JSX.Element | null; - LeftButton: (route: Route, nav: Navigator, index: number, navState: NavState) => JSX.Element | null; - RightButton: (route: Route, nav: Navigator, index: number, navState: NavState) => JSX.Element | null; - } - - /** - * @see NavigatorNavigationBar.js - */ - export interface NavigationBarProperties extends React.Props { - navigator?: Navigator - routeMapper?: NavigationBarRouteMapper - navState?: NavState - navigationStyles?: NavigationBarStyle - style?: ViewStyle - } - - export interface NavigationBarStatic extends React.ComponentClass { - Styles: NavigationBarStyle - StylesAndroid: NavigationBarStyle; - StylesIOS: NavigationBarStyle; - - /** - * Stop transtion, immediately resets the cached state and re-render the - * whole view. - */ - immediatelyRefresh(): void; - } - - export type NavigationBar = NavigationBarStatic - export var NavigationBar: NavigationBarStatic - - - export interface BreadcrumbNavigationBarStyle { - //TODO &see NavigatorBreadcrumbNavigationBar.js - } - - export interface BreadcrumbNavigationBarRouteMapper { - rightContentForRoute: (route: Route, navigator: Navigator) => React.ReactElement - titleContentForRoute: (route: Route, navigator: Navigator) => React.ReactElement - iconForRoute: (route: Route, navigator: Navigator) => React.ReactElement - //in samples... - separatorForRoute: (route: Route, navigator: Navigator) => React.ReactElement - } - - /** - * @see NavigatorNavigationBar.js - */ - export interface BreadcrumbNavigationBarProperties extends React.Props { - navigator?: Navigator - routeMapper?: BreadcrumbNavigationBarRouteMapper - navState?: NavState - style?: ViewStyle - } - - export interface BreadcrumbNavigationBarStatic extends React.ComponentClass { - Styles: BreadcrumbNavigationBarStyle - - immediatelyRefresh(): void - } - - export type BreadcrumbNavigationBar = BreadcrumbNavigationBarStatic - var BreadcrumbNavigationBar: BreadcrumbNavigationBarStatic - - } - - // @see https://github.com/facebook/react-native/blob/0.34-stable\Libraries\StyleSheet\StyleSheetTypes.js - export namespace StyleSheet { - - type Style = ViewStyle | TextStyle | ImageStyle - - /** - * Creates a StyleSheet style reference from the given object. - */ - export function create( styles: T ): T; - - /** - * Flattens an array of style objects, into one aggregated style object. - * Alternatively, this method can be used to lookup IDs, returned by - * StyleSheet.register. - * - * > **NOTE**: Exercise caution as abusing this can tax you in terms of - * > optimizations. - * > - * > IDs enable optimizations through the bridge and memory in general. Refering - * > to style objects directly will deprive you of these optimizations. - * - * Example: - * ``` - * var styles = StyleSheet.create({ - * listItem: { - * flex: 1, - * fontSize: 16, - * color: 'white' - * }, - * selectedListItem: { - * color: 'green' - * } - * }); - * - * StyleSheet.flatten([styles.listItem, styles.selectedListItem]) - * // returns { flex: 1, fontSize: 16, color: 'green' } - * ``` - * Alternative use: - * ``` - * StyleSheet.flatten(styles.listItem); - * // return { flex: 1, fontSize: 16, color: 'white' } - * // Simply styles.listItem would return its ID (number) - * ``` - * This method internally uses `StyleSheetRegistry.getStyleByID(style)` - * to resolve style objects represented by IDs. Thus, an array of style - * objects (instances of StyleSheet.create), are individually resolved to, - * their respective objects, merged as one and then returned. This also explains - * the alternative use. - */ - export function flatten(style?: Style | Style[]): Style - - /** - * This is defined as the width of a thin line on the platform. It can be - * used as the thickness of a border or division between two elements. - * Example: - * ``` - * { - * borderBottomColor: '#bbb', - * borderBottomWidth: StyleSheet.hairlineWidth - * } - * ``` - * - * This constant will always be a round number of pixels (so a line defined - * by it look crisp) and will try to match the standard width of a thin line - * on the underlying platform. However, you should not rely on it being a - * constant size, because on different platforms and screen densities its - * value may be calculated differently. - */ - export var hairlineWidth: number - - /** - * A very common pattern is to create overlays with position absolute and zero positioning, - * so `absoluteFill` can be used for convenience and to reduce duplication of these repeated - * styles. - */ - export var absoluteFill: number - - /** - * Sometimes you may want `absoluteFill` but with a couple tweaks - `absoluteFillObject` can be - * used to create a customized entry in a `StyleSheet`, e.g.: - * - * const styles = StyleSheet.create({ - * wrapper: { - * ...StyleSheet.absoluteFillObject, - * top: 10, - * backgroundColor: 'transparent', - * }, - * }); - */ - export var absoluteFillObject: { - position: string - left: number - right: number - top: number - bottom: number - } - } - - export interface RelayProfiler { - attachProfileHandler( - name: string, - handler: (name: string, state?: any) => () => void - ): void, - - attachAggregateHandler( - name: string, - handler: (name: string, callback: () => void) => void - ): void, - } - - export interface SystraceStatic { - setEnabled(enabled: boolean): void - /** - * beginEvent/endEvent for starting and then ending a profile within the same call stack frame - **/ - beginEvent(profileName?: any, args?: any): void - endEvent(): void - /** - * beginAsyncEvent/endAsyncEvent for starting and then ending a profile where the end can either - * occur on another thread or out of the current stack frame, eg await - * the returned cookie variable should be used as input into the endAsyncEvent call to end the profile - **/ - beginAsyncEvent(profileName?: any): any - endAsyncEvent(profileName?: any, cookie?: any): void - /** - * counterEvent registers the value to the profileName on the systrace timeline - **/ - counterEvent(profileName?: any, value?: any): void - /** - * Relay profiles use await calls, so likely occur out of current stack frame - * therefore async variant of profiling is used - **/ - attachToRelayProfiler(relayProfiler: RelayProfiler): void - /* This is not called by default due to perf overhead but it's useful - if you want to find traces which spend too much time in JSON. */ - swizzleJSON(): void - /** - * Measures multiple methods of a class. For example, you can do: - * Systrace.measureMethods(JSON, 'JSON', ['parse', 'stringify']); - * - * @param object - * @param objectName - * @param methodNames Map from method names to method display names. - */ - measureMethods(object: any, objectName: string, methodNames: Array): void - /** - * Returns an profiled version of the input function. For example, you can: - * JSON.parse = Systrace.measure('JSON', 'parse', JSON.parse); - * - * @param objName - * @param fnName - * @param {function} func - * @return {function} replacement function - */ - measure(objName: string, fnName: string, func: Function): Function - } - - /** - * //FIXME: Could not find docs. Inferred from examples and jscode : ListViewDataSource.js - */ - export interface DataSourceAssetCallback { - rowHasChanged?: (r1: any, r2: any) => boolean - sectionHeaderHasChanged?: (h1: any, h2: any) => boolean - getRowData?: (dataBlob: any, sectionID: number | string, rowID: number | string) => T - getSectionHeaderData?: (dataBlob: any, sectionID: number | string) => T - } - - /** - * Provides efficient data processing and access to the - * `ListView` component. A `ListViewDataSource` is created with functions for - * extracting data from the input blob, and comparing elements (with default - * implementations for convenience). The input blob can be as simple as an - * array of strings, or an object with rows nested inside section objects. - * - * To update the data in the datasource, use `cloneWithRows` (or - * `cloneWithRowsAndSections` if you care about sections). The data in the - * data source is immutable, so you can't modify it directly. The clone methods - * suck in the new data and compute a diff for each row so ListView knows - * whether to re-render it or not. - */ - export interface ListViewDataSource { - /** - * You can provide custom extraction and `hasChanged` functions for section - * headers and rows. If absent, data will be extracted with the - * `defaultGetRowData` and `defaultGetSectionHeaderData` functions. - * - * The default extractor expects data of one of the following forms: - * - * { sectionID_1: { rowID_1: , ... }, ... } - * - * or - * - * { sectionID_1: [ , , ... ], ... } - * - * or - * - * [ [ , , ... ], ... ] - * - * The constructor takes in a params argument that can contain any of the - * following: - * - * - getRowData(dataBlob, sectionID, rowID); - * - getSectionHeaderData(dataBlob, sectionID); - * - rowHasChanged(prevRowData, nextRowData); - * - sectionHeaderHasChanged(prevSectionData, nextSectionData); - */ - new (onAsset: DataSourceAssetCallback): ListViewDataSource; - - /** - * Clones this `ListViewDataSource` with the specified `dataBlob` and - * `rowIdentities`. The `dataBlob` is just an aribitrary blob of data. At - * construction an extractor to get the interesting informatoin was defined - * (or the default was used). - * - * The `rowIdentities` is is a 2D array of identifiers for rows. - * ie. [['a1', 'a2'], ['b1', 'b2', 'b3'], ...]. If not provided, it's - * assumed that the keys of the section data are the row identities. - * - * Note: This function does NOT clone the data in this data source. It simply - * passes the functions defined at construction to a new data source with - * the data specified. If you wish to maintain the existing data you must - * handle merging of old and new data separately and then pass that into - * this function as the `dataBlob`. - */ - cloneWithRows(dataBlob: Array | { [key: string]: any }, rowIdentities?: Array): ListViewDataSource - - /** - * This performs the same function as the `cloneWithRows` function but here - * you also specify what your `sectionIdentities` are. If you don't care - * about sections you should safely be able to use `cloneWithRows`. - * - * `sectionIdentities` is an array of identifiers for sections. - * ie. ['s1', 's2', ...]. If not provided, it's assumed that the - * keys of dataBlob are the section identities. - * - * Note: this returns a new object! - */ - cloneWithRowsAndSections(dataBlob: Array | { [key: string]: any }, sectionIdentities?: Array, rowIdentities?: Array>): ListViewDataSource - - getRowCount(): number - getRowAndSectionCount(): number - - /** - * Returns if the row is dirtied and needs to be rerendered - */ - rowShouldUpdate(sectionIndex: number, rowIndex: number): boolean - - /** - * Gets the data required to render the row. - */ - getRowData(sectionIndex: number, rowIndex: number): any - - /** - * Gets the rowID at index provided if the dataSource arrays were flattened, - * or null of out of range indexes. - */ - getRowIDForFlatIndex(index: number): string - - /** - * Gets the sectionID at index provided if the dataSource arrays were flattened, - * or null for out of range indexes. - */ - getSectionIDForFlatIndex(index: number): string - - /** - * Returns an array containing the number of rows in each section - */ - getSectionLengths(): Array - - /** - * Returns if the section header is dirtied and needs to be rerendered - */ - sectionHeaderShouldUpdate(sectionIndex: number): boolean - - /** - * Gets the data required to render the section header - */ - getSectionHeaderData(sectionIndex: number): any - } - - - /** - * @see https://facebook.github.io/react-native/docs/tabbarios-item.html#props - */ - export interface TabBarItemProperties extends ViewProperties, React.Props { - - /** - * Little red bubble that sits at the top right of the icon. - */ - badge?: string | number - - /** - * A custom icon for the tab. It is ignored when a system icon is defined. - */ - icon?: ImageURISource - - /** - * Callback when this tab is being selected, - * you should change the state of your component to set selected={true}. - */ - onPress?: () => void - - /** - * If set to true it renders the image as original, - * it defaults to being displayed as a template - */ - renderAsOriginal?: boolean - - /** - * It specifies whether the children are visible or not. If you see a blank content, you probably forgot to add a selected one. - */ - selected?: boolean - - /** - * A custom icon when the tab is selected. - * It is ignored when a system icon is defined. If left empty, the icon will be tinted in blue. - */ - selectedIcon?: ImageURISource - - /** - * React style object. - */ - style?: ViewStyle - - /** - * Items comes with a few predefined system icons. - * Note that if you are using them, the title and selectedIcon will be overriden with the system ones. - * - * enum('bookmarks', 'contacts', 'downloads', 'favorites', 'featured', 'history', 'more', 'most-recent', 'most-viewed', 'recents', 'search', 'top-rated') - */ - systemIcon?: "bookmarks" | "contacts" | "downloads" | "favorites" | "featured" | "history" | "more" | "most-recent" | "most-viewed" | "recents" | "search" | "top-rated" - - /** - * Text that appears under the icon. It is ignored when a system icon is defined. - */ - title?: string - - ref?: Ref - } - - export interface TabBarItemStatic extends React.ComponentClass { - } - - /** - * @see https://facebook.github.io/react-native/docs/tabbarios.html#props - */ - export interface TabBarIOSProperties extends ViewProperties, React.Props { - - /** - * Background color of the tab bar - */ - barTintColor?: string - - /** - * Specifies tab bar item positioning. Available values are: - * - fill - distributes items across the entire width of the tab bar - * - center - centers item in the available tab bar space - * - auto (default) - distributes items dynamically according to the - * user interface idiom. In a horizontally compact environment (e.g. iPhone 5) - * this value defaults to `fill`, in a horizontally regular one (e.g. iPad) - * it defaults to center. - */ - itemPositioning?: 'fill' | 'center' | 'auto' - - /** - * Color of the currently selected tab icon - */ - tintColor?: string - - /** - * A Boolean value that indicates whether the tab bar is translucent - */ - translucent?: boolean - - /** - * Color of text on unselected tabs - */ - unselectedTintColor?: string - - ref?: Ref - } - - export interface TabBarIOSStatic extends React.ComponentClass { - Item: TabBarItemStatic; - } - - - export interface PixelRatioStatic { - - /* - Returns the device pixel density. Some examples: - PixelRatio.get() === 1 - mdpi Android devices (160 dpi) - PixelRatio.get() === 1.5 - hdpi Android devices (240 dpi) - PixelRatio.get() === 2 - iPhone 4, 4S - iPhone 5, 5c, 5s - iPhone 6 - xhdpi Android devices (320 dpi) - PixelRatio.get() === 3 - iPhone 6 plus - xxhdpi Android devices (480 dpi) - PixelRatio.get() === 3.5 - Nexus 6 - */ - get(): number; - - /* - Returns the scaling factor for font sizes. This is the ratio that is - used to calculate the absolute font size, so any elements that - heavily depend on that should use this to do calculations. - - If a font scale is not set, this returns the device pixel ratio. - - Currently this is only implemented on Android and reflects the user - preference set in Settings > Display > Font size, - on iOS it will always return the default pixel ratio. - */ - getFontScale(): number - - /** - * Converts a layout size (dp) to pixel size (px). - * Guaranteed to return an integer number. - * @param layoutSize - */ - getPixelSizeForLayoutSize(layoutSize: number): number - - /** - * Rounds a layout size (dp) to the nearest layout size that - * corresponds to an integer number of pixels. For example, - * on a device with a PixelRatio of 3, - * PixelRatio.roundToNearestPixel(8.4) = 8.33, - * which corresponds to exactly (8.33 * 3) = 25 pixels. - * @param layoutSize - */ - roundToNearestPixel(layoutSize: number): number - - /** - * No-op for iOS, but used on the web. Should not be documented. [sic] - */ - startDetecting(): void - } - - /** - * @see https://facebook.github.io/react-native/docs/platform-specific-code.html#content - */ - export type PlatformOSType = 'ios' | 'android' - - interface PlatformStatic { - OS: PlatformOSType - Version: number - - /** - * @see https://facebook.github.io/react-native/docs/platform-specific-code.html#content - */ - select( specifics: { ios?: T, android?: T} ): T; - } - - /** - * Deprecated - subclass NativeEventEmitter to create granular event modules instead of - * adding all event listeners directly to RCTDeviceEventEmitter. - */ - interface DeviceEventEmitterStatic extends EventEmitter { - sharedSubscriber: EventSubscriptionVendor - new(): DeviceEventEmitterStatic; - addListener( type: string, listener: ( data: T ) => void, context?: any ): EmitterSubscription; - } - - // Used by Dimensions below - export interface ScaledSize { - width: number; - height: number; - scale: number; - fontScale: number; - } - - /** - * Initial dimensions are set before `runApplication` is called so they should - * be available before any other require's are run, but may be updated later. - * - * Note: Although dimensions are available immediately, they may change (e.g - * due to device rotation) so any rendering logic or styles that depend on - * these constants should try to call this function on every render, rather - * than caching the value (for example, using inline styles rather than - * setting a value in a `StyleSheet`). - * - * Example: `var {height, width} = Dimensions.get('window');` - * - * @param {string} dim Name of dimension as defined when calling `set`. - * @returns {Object?} Value for the dimension. - * @see https://facebook.github.io/react-native/docs/dimensions.html#content - */ - export interface Dimensions { - /** - * Initial dimensions are set before runApplication is called so they - * should be available before any other require's are run, but may be - * updated later. - * Note: Although dimensions are available immediately, they may - * change (e.g due to device rotation) so any rendering logic or - * styles that depend on these constants should try to call this - * function on every render, rather than caching the value (for - * example, using inline styles rather than setting a value in a - * StyleSheet). - * Example: var {height, width} = Dimensions.get('window'); - @param {string} dim Name of dimension as defined when calling set. - @returns {Object?} Value for the dimension. - */ - get(dim: "window" | "screen"): ScaledSize; - - /** - * This should only be called from native code by sending the didUpdateDimensions event. - * @param {object} dims Simple string-keyed object of dimensions to set - */ - set( dims: {[key: string]: any} ): void - } - - export type SimpleTask = { - name: string - gen: () => void - } - export type PromiseTask = { - name: string - gen: () => Promise - } - - export type Handle = number - - export interface InteractionManagerStatic { - Events: { - interactionStart: string - interactionComplete: string - } - - addListener( - eventType: string, listener: Function, context?: Object): EmitterSubscription - - /** - * Schedule a function to run after all interactions have completed. - * Returns a cancellable - * @param fn - */ - runAfterInteractions( task: Function | SimpleTask | PromiseTask): - {then: Function, done: Function, cancel: Function} - - /** - * Notify manager that an interaction has started. - */ - createInteractionHandle(): Handle - - /** - * Notify manager that an interaction has completed. - */ - clearInteractionHandle(handle: Handle): void - - /** - * A positive number will use setTimeout to schedule any tasks after - * the eventLoopRunningTime hits the deadline value, otherwise all - * tasks will be executed in one setImmediate batch (default). - */ - setDeadline(deadline: number): void - } - - - export interface ScrollViewStyle extends FlexStyle, TransformsStyle { - - backfaceVisibility?: "visible" | "hidden" - backgroundColor?: string - borderColor?: string - borderTopColor?: string - borderRightColor?: string - borderBottomColor?: string - borderLeftColor?: string - borderRadius?: number - borderTopLeftRadius?: number - borderTopRightRadius?: number - borderBottomLeftRadius?: number - borderBottomRightRadius?: number - borderStyle?: "solid" | "dotted" | "dashed" - borderWidth?: number - borderTopWidth?: number - borderRightWidth?: number - borderBottomWidth?: number - borderLeftWidth?: number - opacity?: number - overflow?: "visible" | "hidden" - shadowColor?: string - shadowOffset?: { width: number; height: number } - shadowOpacity?: number - shadowRadius?: number - elevation?: number - } - - - interface ScrollResponderMixin extends SubscribableMixin { - /** - * Invoke this from an `onScroll` event. - */ - scrollResponderHandleScrollShouldSetResponder(): boolean - - /** - * Merely touch starting is not sufficient for a scroll view to become the - * responder. Being the "responder" means that the very next touch move/end - * event will result in an action/movement. - * - * Invoke this from an `onStartShouldSetResponder` event. - * - * `onStartShouldSetResponder` is used when the next move/end will trigger - * some UI movement/action, but when you want to yield priority to views - * nested inside of the view. - * - * There may be some cases where scroll views actually should return `true` - * from `onStartShouldSetResponder`: Any time we are detecting a standard tap - * that gives priority to nested views. - * - * - If a single tap on the scroll view triggers an action such as - * recentering a map style view yet wants to give priority to interaction - * views inside (such as dropped pins or labels), then we would return true - * from this method when there is a single touch. - * - * - Similar to the previous case, if a two finger "tap" should trigger a - * zoom, we would check the `touches` count, and if `>= 2`, we would return - * true. - * - */ - scrollResponderHandleStartShouldSetResponder(): boolean - - /** - * There are times when the scroll view wants to become the responder - * (meaning respond to the next immediate `touchStart/touchEnd`), in a way - * that *doesn't* give priority to nested views (hence the capture phase): - * - * - Currently animating. - * - Tapping anywhere that is not the focused input, while the keyboard is - * up (which should dismiss the keyboard). - * - * Invoke this from an `onStartShouldSetResponderCapture` event. - */ - scrollResponderHandleStartShouldSetResponderCapture(e: Event): boolean - - /** - * Invoke this from an `onResponderReject` event. - * - * Some other element is not yielding its role as responder. Normally, we'd - * just disable the `UIScrollView`, but a touch has already began on it, the - * `UIScrollView` will not accept being disabled after that. The easiest - * solution for now is to accept the limitation of disallowing this - * altogether. To improve this, find a way to disable the `UIScrollView` after - * a touch has already started. - */ - scrollResponderHandleResponderReject(): any - - /** - * We will allow the scroll view to give up its lock iff it acquired the lock - * during an animation. This is a very useful default that happens to satisfy - * many common user experiences. - * - * - Stop a scroll on the left edge, then turn that into an outer view's - * backswipe. - * - Stop a scroll mid-bounce at the top, continue pulling to have the outer - * view dismiss. - * - However, without catching the scroll view mid-bounce (while it is - * motionless), if you drag far enough for the scroll view to become - * responder (and therefore drag the scroll view a bit), any backswipe - * navigation of a swipe gesture higher in the view hierarchy, should be - * rejected. - */ - scrollResponderHandleTerminationRequest(): boolean - - /** - * Invoke this from an `onTouchEnd` event. - * - * @param {SyntheticEvent} e Event. - */ - scrollResponderHandleTouchEnd(e: Event): void - - /** - * Invoke this from an `onResponderRelease` event. - */ - scrollResponderHandleResponderRelease(e: Event): void - - scrollResponderHandleScroll(e: Event): void - - /** - * Invoke this from an `onResponderGrant` event. - */ - scrollResponderHandleResponderGrant(e: Event): void - - /** - * Unfortunately, `onScrollBeginDrag` also fires when *stopping* the scroll - * animation, and there's not an easy way to distinguish a drag vs. stopping - * momentum. - * - * Invoke this from an `onScrollBeginDrag` event. - */ - scrollResponderHandleScrollBeginDrag(e: Event): void - - /** - * Invoke this from an `onScrollEndDrag` event. - */ - scrollResponderHandleScrollEndDrag(e: Event): void - - /** - * Invoke this from an `onMomentumScrollBegin` event. - */ - scrollResponderHandleMomentumScrollBegin(e: Event): void - - /** - * Invoke this from an `onMomentumScrollEnd` event. - */ - scrollResponderHandleMomentumScrollEnd(e: Event): void - - /** - * Invoke this from an `onTouchStart` event. - * - * Since we know that the `SimpleEventPlugin` occurs later in the plugin - * order, after `ResponderEventPlugin`, we can detect that we were *not* - * permitted to be the responder (presumably because a contained view became - * responder). The `onResponderReject` won't fire in that case - it only - * fires when a *current* responder rejects our request. - * - * @param {SyntheticEvent} e Touch Start event. - */ - scrollResponderHandleTouchStart(e: Event): void - - /** - * Invoke this from an `onTouchMove` event. - * - * Since we know that the `SimpleEventPlugin` occurs later in the plugin - * order, after `ResponderEventPlugin`, we can detect that we were *not* - * permitted to be the responder (presumably because a contained view became - * responder). The `onResponderReject` won't fire in that case - it only - * fires when a *current* responder rejects our request. - * - * @param {SyntheticEvent} e Touch Start event. - */ - scrollResponderHandleTouchMove(e: Event): void - - /** - * A helper function for this class that lets us quickly determine if the - * view is currently animating. This is particularly useful to know when - * a touch has just started or ended. - */ - scrollResponderIsAnimating(): boolean - - /** - * Returns the node that represents native view that can be scrolled. - * Components can pass what node to use by defining a `getScrollableNode` - * function otherwise `this` is used. - */ - scrollResponderGetScrollableNode(): any - - /** - * A helper function to scroll to a specific point in the scrollview. - * This is currently used to help focus on child textviews, but can also - * be used to quickly scroll to any element we want to focus. Syntax: - * - * scrollResponderScrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true}) - * - * Note: The weird argument signature is due to the fact that, for historical reasons, - * the function also accepts separate arguments as as alternative to the options object. - * This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED. - */ - scrollResponderScrollTo( x?: number | { x?: number, y?: number, animated?: boolean }, y?: number, animated?: boolean ): void, - - /** - * A helper function to zoom to a specific rect in the scrollview. The argument has the shape - * {x: number; y: number; width: number; height: number; animated: boolean = true} - * - * @platform ios - */ - scrollResponderZoomTo( - rect: { x: number, y: number, width: number, height: number, animated?: boolean }, - animated?: boolean // deprecated, put this inside the rect argument instead - ): void - - /** - * This method should be used as the callback to onFocus in a TextInputs' - * parent view. Note that any module using this mixin needs to return - * the parent view's ref in getScrollViewRef() in order to use this method. - * @param {any} nodeHandle The TextInput node handle - * @param {number} additionalOffset The scroll view's top "contentInset". - * Default is 0. - * @param {bool} preventNegativeScrolling Whether to allow pulling the content - * down to make it meet the keyboard's top. Default is false. - */ - scrollResponderScrollNativeHandleToKeyboard(nodeHandle: any, additionalOffset?: number, preventNegativeScrollOffset?: boolean): void - - /** - * The calculations performed here assume the scroll view takes up the entire - * screen - even if has some content inset. We then measure the offsets of the - * keyboard, and compensate both for the scroll view's "contentInset". - * - * @param {number} left Position of input w.r.t. table view. - * @param {number} top Position of input w.r.t. table view. - * @param {number} width Width of the text input. - * @param {number} height Height of the text input. - */ - scrollResponderInputMeasureAndScrollToKeyboard(left: number, top: number, width: number, height: number): void - - scrollResponderTextInputFocusError(e: Event): void - - /** - * `componentWillMount` is the closest thing to a standard "constructor" for - * React components. - * - * The `keyboardWillShow` is called before input focus. - */ - componentWillMount(): void - - /** - * Warning, this may be called several times for a single keyboard opening. - * It's best to store the information in this method and then take any action - * at a later point (either in `keyboardDidShow` or other). - * - * Here's the order that events occur in: - * - focus - * - willShow {startCoordinates, endCoordinates} several times - * - didShow several times - * - blur - * - willHide {startCoordinates, endCoordinates} several times - * - didHide several times - * - * The `ScrollResponder` providesModule callbacks for each of these events. - * Even though any user could have easily listened to keyboard events - * themselves, using these `props` callbacks ensures that ordering of events - * is consistent - and not dependent on the order that the keyboard events are - * subscribed to. This matters when telling the scroll view to scroll to where - * the keyboard is headed - the scroll responder better have been notified of - * the keyboard destination before being instructed to scroll to where the - * keyboard will be. Stick to the `ScrollResponder` callbacks, and everything - * will work. - * - * WARNING: These callbacks will fire even if a keyboard is displayed in a - * different navigation pane. Filter out the events to determine if they are - * relevant to you. (For example, only if you receive these callbacks after - * you had explicitly focused a node etc). - */ - scrollResponderKeyboardWillShow(e: Event): void - - scrollResponderKeyboardWillHide(e: Event): void - - scrollResponderKeyboardDidShow(e: Event): void - - scrollResponderKeyboardDidHide(e: Event): void - } - - export interface ScrollViewPropertiesIOS { - - /** - * When true the scroll view bounces horizontally when it reaches the end - * even if the content is smaller than the scroll view itself. The default - * value is true when `horizontal={true}` and false otherwise. - */ - alwaysBounceHorizontal?: boolean - /** - * When true the scroll view bounces vertically when it reaches the end - * even if the content is smaller than the scroll view itself. The default - * value is false when `horizontal={true}` and true otherwise. - */ - alwaysBounceVertical?: boolean - - /** - * Controls whether iOS should automatically adjust the content inset for scroll views that are placed behind a navigation bar or tab bar/ toolbar. - * The default value is true. - */ - automaticallyAdjustContentInsets?: boolean // true - - /** - * When true the scroll view bounces when it reaches the end of the - * content if the content is larger then the scroll view along the axis of - * the scroll direction. When false it disables all bouncing even if - * the `alwaysBounce*` props are true. The default value is true. - */ - bounces?: boolean - /** - * When true gestures can drive zoom past min/max and the zoom will animate - * to the min/max value at gesture end otherwise the zoom will not exceed - * the limits. - */ - bouncesZoom?: boolean - - /** - * When false once tracking starts won't try to drag if the touch moves. - * The default value is true. - */ - canCancelContentTouches?: boolean - - /** - * When true the scroll view automatically centers the content when the - * content is smaller than the scroll view bounds; when the content is - * larger than the scroll view this property has no effect. The default - * value is false. - */ - centerContent?: boolean - - /** - * The amount by which the scroll view content is inset from the edges of the scroll view. - * Defaults to {0, 0, 0, 0}. - */ - contentInset?: Insets // zeros - - /** - * Used to manually set the starting scroll offset. - * The default value is {x: 0, y: 0} - */ - contentOffset?: PointProperties // zeros - - /** - * A floating-point number that determines how quickly the scroll view - * decelerates after the user lifts their finger. Reasonable choices include - * - Normal: 0.998 (the default) - * - Fast: 0.9 - */ - decelerationRate?: "fast" | "normal" | number - - /** - * When true the ScrollView will try to lock to only vertical or horizontal - * scrolling while dragging. The default value is false. - */ - directionalLockEnabled?: boolean - - /** - * The style of the scroll indicators. - * - default (the default), same as black. - * - black, scroll indicator is black. This style is good against - * a white content background. - * - white, scroll indicator is white. This style is good against - * a black content background. - */ - indicatorStyle?: "default" | "black" | "white" - - /** - * The maximum allowed zoom scale. The default value is 1.0. - */ - maximumZoomScale?: number - - /** - * The minimum allowed zoom scale. The default value is 1.0. - */ - minimumZoomScale?: number - - /** - * Called when a scrolling animation ends. - */ - onScrollAnimationEnd?: () => void - - /** - * This controls how often the scroll event will be fired while scrolling (in events per seconds). - * A higher number yields better accuracy for code that is tracking the scroll position, - * but can lead to scroll performance problems due to the volume of information being send over the bridge. - * The default value is zero, which means the scroll event will be sent only once each time the view is scrolled. - */ - scrollEventThrottle?: number // null - - /** - * The amount by which the scroll view indicators are inset from the edges of the scroll view. - * This should normally be set to the same value as the contentInset. - * Defaults to {0, 0, 0, 0}. - */ - scrollIndicatorInsets?: Insets //zeroes - - /** - * When true the scroll view scrolls to top when the status bar is tapped. - * The default value is true. - */ - scrollsToTop?: boolean - - /** - * When snapToInterval is set, snapToAlignment will define the relationship of the the snapping to the scroll view. - * - start (the default) will align the snap at the left (horizontal) or top (vertical) - * - center will align the snap in the center - * - end will align the snap at the right (horizontal) or bottom (vertical) - */ - snapToAlignment?: "start" | "center" | "end" - - /** - * When set, causes the scroll view to stop at multiples of the value of snapToInterval. - * This can be used for paginating through children that have lengths smaller than the scroll view. - * Used in combination with snapToAlignment. - */ - snapToInterval?: number[] - - /** - * An array of child indices determining which children get docked to the - * top of the screen when scrolling. For example passing - * `stickyHeaderIndices={[0]}` will cause the first child to be fixed to the - * top of the scroll view. This property is not supported in conjunction - * with `horizontal={true}`. - */ - stickyHeaderIndices?: number[] - - /** - * The current scale of the scroll view content. The default value is 1.0. - */ - zoomScale?: number - } - - export interface ScrollViewPropertiesAndroid { - - /** - * Sometimes a scrollview takes up more space than its content fills. - * When this is the case, this prop will fill the rest of the - * scrollview with a color to avoid setting a background and creating - * unnecessary overdraw. This is an advanced optimization that is not - * needed in the general case. - */ - endFillColor?: string - - /** - * Tag used to log scroll performance on this scroll view. Will force - * momentum events to be turned on (see sendMomentumEvents). This doesn't do - * anything out of the box and you need to implement a custom native - * FpsListener for it to be useful. - * @platform android - */ - scrollPerfTag?: string - - /** - * Used to override default value of overScroll mode. - - * Possible values: - * - 'auto' - Default value, allow a user to over-scroll this view only if the content is large enough to meaningfully scroll. - * - 'always' - Always allow a user to over-scroll this view. - * - 'never' - Never allow a user to over-scroll this view. - */ - overScrollMode?: 'auto' | 'always' | 'never' - } - - export interface ScrollViewProperties extends ViewProperties, ScrollViewPropertiesIOS, ScrollViewPropertiesAndroid, Touchable, React.Props { - - /** - * These styles will be applied to the scroll view content container which - * wraps all of the child views. Example: - * - * return ( - * - * - * ); - * ... - * var styles = StyleSheet.create({ - * contentContainer: { - * paddingVertical: 20 - * } - * }); - */ - contentContainerStyle?: ViewStyle - - /** - * When true the scroll view's children are arranged horizontally in a row - * instead of vertically in a column. The default value is false. - */ - horizontal?: boolean - - /** - * Determines whether the keyboard gets dismissed in response to a drag. - * - 'none' (the default) drags do not dismiss the keyboard. - * - 'onDrag' the keyboard is dismissed when a drag begins. - * - 'interactive' the keyboard is dismissed interactively with the drag - * and moves in synchrony with the touch; dragging upwards cancels the - * dismissal. - */ - keyboardDismissMode?: 'none' | 'interactive' | 'on-drag' - - /** - * When false tapping outside of the focused text input when the keyboard - * is up dismisses the keyboard. When true the scroll view will not catch - * taps and the keyboard will not dismiss automatically. The default value - * is false. - */ - keyboardShouldPersistTaps?: boolean | 'always' | 'never' | 'handled' - - /** - * Called when scrollable content view of the ScrollView changes. - * Handler function is passed the content width and content height as parameters: (contentWidth, contentHeight) - * It's implemented using onLayout handler attached to the content container which this ScrollView renders. - * - */ - onContentSizeChange?: (w: number, h: number) => void - - /** - * Fires at most once per frame during scrolling. - * The frequency of the events can be contolled using the scrollEventThrottle prop. - */ - onScroll?: (event?: NativeSyntheticEvent) => void - - /** - * Fires if a user initiates a scroll gesture. - */ - onScrollBeginDrag?: (event?: NativeSyntheticEvent) => void - - /** - * Fires when a user has finished scrolling. - */ - onScrollEndDrag?: (event?: NativeSyntheticEvent) => void - - /** - * Fires when scroll view has finished moving - */ - onMomentumScrollEnd?: (event?: NativeSyntheticEvent) => void - - /** - * Fires when scroll view has begun moving - */ - onMomentumScrollBegin?: (event?: NativeSyntheticEvent) => void - - /** - * When true the scroll view stops on multiples of the scroll view's size - * when scrolling. This can be used for horizontal pagination. The default - * value is false. - */ - pagingEnabled?: boolean - - /** - * When false, the content does not scroll. The default value is true - */ - scrollEnabled?: boolean // true - - /** - * Experimental: When true offscreen child views (whose `overflow` value is - * `hidden`) are removed from their native backing superview when offscreen. - * This canimprove scrolling performance on long lists. The default value is - * false. - */ - removeClippedSubviews?: boolean - - /** - * When true, shows a horizontal scroll indicator. - */ - showsHorizontalScrollIndicator?: boolean - - /** - * When true, shows a vertical scroll indicator. - */ - showsVerticalScrollIndicator?: boolean - - /** - * Style - */ - style?: ScrollViewStyle - - /** - * A RefreshControl component, used to provide pull-to-refresh - * functionality for the ScrollView. - */ - refreshControl?: React.ReactElement - - ref?: Ref - } - - export interface ScrollViewProps extends ScrollViewProperties, React.Props { - ref?: Ref - } - - interface ScrollViewStatic extends ScrollResponderMixin, React.ComponentClass { - - /** - * Scrolls to a given x, y offset, either immediately or with a smooth animation. - * Syntax: - * - * scrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true}) - * - * Note: The weird argument signature is due to the fact that, for historical reasons, - * the function also accepts separate arguments as as alternative to the options object. - * This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED. - */ - scrollTo( - y?: number | { x?: number, y?: number, animated?: boolean }, - x?: number, - animated?: boolean - ): void; - - /** - * Returns a reference to the underlying scroll responder, which supports - * operations like `scrollTo`. All ScrollView-like components should - * implement this method so that they can be composed while providing access - * to the underlying scroll responder's methods. - */ - getScrollResponder(): JSX.Element; - - getScrollableNode(): any; - - // Undocumented - getInnerViewNode(): any; - - // Deprecated, do not use. - scrollWithoutAnimationTo?: (y: number, x: number) => void - } - - - export interface NativeScrollRectangle { - left: number; - top: number; - bottom: number; - right: number; - } - - export interface NativeScrollPoint { - x: number; - y: number; - } - - export interface NativeScrollSize { - height: number; - width: number; - } - - export interface NativeScrollEvent { - contentInset: NativeScrollRectangle; - contentOffset: NativeScrollPoint; - contentSize: NativeScrollSize; - layoutMeasurement: NativeScrollSize; - zoomScale: number; - } - - export interface SnapshotViewIOSProperties extends ViewProperties, React.Props { - - // A callback when the Snapshot view is ready to be compared - onSnapshotReady(): any, - - // A name to identify the individual instance to the SnapshotView - testIdentifier : string, - - ref?: Ref - } - - export interface SnapshotViewIOSStatic extends NativeMethodsMixin, React.ComponentClass {} - - // Deduced from - // https://github.com/facebook/react-native/commit/052cd7eb8afa7a805ef13e940251be080499919c - - /** - * Data source wrapper around ListViewDataSource to allow for tracking of - * which row is swiped open and close opened row(s) when another row is swiped - * open. - * - * See https://github.com/facebook/react-native/pull/5602 for why - * ListViewDataSource is not subclassed. - */ - export interface SwipeableListViewDataSource { - cloneWithRowsAndSections(dataBlob: any, - sectionIdentities?: Array, - rowIdentities?: Array>): SwipeableListViewDataSource - getDataSource(): ListViewDataSource - getOpenRowID(): string - getFirstRowID(): string - setOpenRowID(rowID: string): SwipeableListViewDataSource - } - - export interface SwipeableListViewProps extends React.Props { - - /** - * To alert the user that swiping is possible, the first row can bounce - * on component mount. - */ - bounceFirstRowOnMount: boolean - - /** - * Use `SwipeableListView.getNewDataSource()` to get a data source to use, - * then use it just like you would a normal ListView data source - */ - dataSource: SwipeableListViewDataSource - - // Maximum distance to open to after a swipe - maxSwipeDistance: number - - // Callback method to render the swipeable view - renderRow: (rowData: any, sectionID: string | number, rowID: string | number, highlightRow?: boolean) => React.ReactElement - - // Callback method to render the view that will be unveiled on swipe - renderQuickActions(rowData: any, sectionID: string | number, rowID: string | number): React.ReactElement - } - - /** - * A container component that renders multiple SwipeableRow's in a ListView - * implementation. This is designed to be a drop-in replacement for the - * standard React Native `ListView`, so use it as if it were a ListView, but - * with extra props, i.e. - * - * let ds = SwipeableListView.getNewDataSource(); - * ds.cloneWithRowsAndSections(dataBlob, ?sectionIDs, ?rowIDs); - * // .. - * - * - * SwipeableRow can be used independently of this component, but the main - * benefit of using this component is - * - * - It ensures that at most 1 row is swiped open (auto closes others) - * - It can bounce the 1st row of the list so users know it's swipeable - * - More to come - */ - export interface SwipeableListViewStatic extends React.ComponentClass { - getNewDataSource(): SwipeableListViewDataSource - } - - - ////////////////////////////////////////////////////////////////////////// - // - // A P I s - // - ////////////////////////////////////////////////////////////////////////// - - /** - * @see: http://facebook.github.io/react-native/docs/actionsheetios.html#content - */ - export interface ActionSheetIOSOptions { - title?: string - options: string[] - cancelButtonIndex?: number - destructiveButtonIndex?: number - message?: string - } - - export interface ShareActionSheetIOSOptions { - message?: string - url?: string - subject?: string - /** The activities to exclude from the ActionSheet. - * For example: ['com.apple.UIKit.activity.PostToTwitter'] - */ - excludedActivityTypes?: string[] - } - - /** - * @see https://facebook.github.io/react-native/docs/actionsheetios.html#content - */ - export interface ActionSheetIOSStatic { - /** - * Display an iOS action sheet. The `options` object must contain one or more - * of: - * - `options` (array of strings) - a list of button titles (required) - * - `cancelButtonIndex` (int) - index of cancel button in `options` - * - `destructiveButtonIndex` (int) - index of destructive button in `options` - * - `title` (string) - a title to show above the action sheet - * - `message` (string) - a message to show below the title - */ - showActionSheetWithOptions: (options: ActionSheetIOSOptions, callback: (buttonIndex: number) => void) => void - - /** - * Display the iOS share sheet. The `options` object should contain - * one or both of `message` and `url` and can additionally have - * a `subject` or `excludedActivityTypes`: - * - * - `url` (string) - a URL to share - * - `message` (string) - a message to share - * - `subject` (string) - a subject for the message - * - `excludedActivityTypes` (array) - the activities to exclude from the ActionSheet - * - * NOTE: if `url` points to a local file, or is a base64-encoded - * uri, the file it points to will be loaded and shared directly. - * In this way, you can share images, videos, PDF files, etc. - */ - showShareActionSheetWithOptions: (options: ShareActionSheetIOSOptions, failureCallback: (error: Error) => void, successCallback: (success: boolean, method: string) => void) => void - } - - export type ShareContent = { - title?: string - message: string - } | { - title?: string - url: string - } - - export type ShareOptions = { - dialogTitle?: string - excludeActivityTypes?: Array - tintColor?: string - } - - export interface ShareStatic { - /** - * Open a dialog to share text content. - * - * In iOS, Returns a Promise which will be invoked an object containing `action`, `activityType`. - * If the user dismissed the dialog, the Promise will still be resolved with action being `Share.dismissedAction` - * and all the other keys being undefined. - * - * In Android, Returns a Promise which always be resolved with action being `Share.sharedAction`. - * - * ### Content - * - * - `message` - a message to share - * - `title` - title of the message - * - * #### iOS - * - * - `url` - an URL to share - * - * At least one of URL and message is required. - * - * ### Options - * - * #### iOS - * - * - `excludedActivityTypes` - * - `tintColor` - * - * #### Android - * - * - `dialogTitle` - * - */ - share(content: ShareContent, options: ShareOptions): Promise - sharedAction: string - dismissedAction: string - } - - /** - * @see https://facebook.github.io/react-native/docs/alert.html#content - */ - export interface AlertButton { - text?: string - onPress?: () => void - style?: "default" | "cancel" | "destructive" - } - - interface AlertOptions { - /** @platform android */ - cancelable?: boolean; - } - - /** - * Launches an alert dialog with the specified title and message. - * - * Optionally provide a list of buttons. Tapping any button will fire the - * respective onPress callback and dismiss the alert. By default, the only - * button will be an 'OK' button. - * - * This is an API that works both on iOS and Android and can show static - * alerts. To show an alert that prompts the user to enter some information, - * see `AlertIOS`; entering text in an alert is common on iOS only. - * - * ## iOS - * - * On iOS you can specify any number of buttons. Each button can optionally - * specify a style, which is one of 'default', 'cancel' or 'destructive'. - * - * ## Android - * - * On Android at most three buttons can be specified. Android has a concept - * of a neutral, negative and a positive button: - * - * - If you specify one button, it will be the 'positive' one (such as 'OK') - * - Two buttons mean 'negative', 'positive' (such as 'Cancel', 'OK') - * - Three buttons mean 'neutral', 'negative', 'positive' (such as 'Later', 'Cancel', 'OK') - * - * ``` - * // Works on both iOS and Android - * Alert.alert( - * 'Alert Title', - * 'My Alert Msg', - * [ - * {text: 'Ask me later', onPress: () => console.log('Ask me later pressed')}, - * {text: 'Cancel', onPress: () => console.log('Cancel Pressed'), style: 'cancel'}, - * {text: 'OK', onPress: () => console.log('OK Pressed')}, - * ] - * ) - * ``` - */ - export interface AlertStatic { - alert: (title: string, message?: string, buttons?: AlertButton[], options?: AlertOptions, type?: string) => void - } - - /** - * Wrapper around the Android native module. - */ - export interface AlertAndroidStatic { - alert: (title: string, message?: string, buttons?: AlertButton[], options?: AlertOptions) => void - } - - /** - * //FIXME: No documentation - inferred from RCTAdSupport.m - */ - export interface AdSupportIOSStatic { - getAdvertisingId: (onSuccess: (deviceId: string) => void, onFailure: (err: Error) => void) => void - getAdvertisingTrackingEnabled: (onSuccess: (hasTracking: boolean) => void, onFailure: (err: Error) => void) => void - } - - interface AlertIOSButton { - text: string - onPress?: () => void - style?: "default" | "cancel" | "destructive" - } - - export type AlertType = "default" | "plain-text" | "secure-text" | "login-password" - - /** - * @description - * `AlertIOS` provides functionality to create an iOS alert dialog with a - * message or create a prompt for user input. - * - * We recommend using the [`Alert.alert`](/docs/alert.html) method for - * cross-platform support if you don't need to create iOS-only prompts. - * - * @see https://facebook.github.io/react-native/docs/alertios.html#content - */ - export interface AlertIOSStatic { - - /** - * Create and display a popup alert. - * @static - * @method alert - * @param title The dialog's title. - * @param message An optional message that appears below - * the dialog's title. - * @param callbackOrButtons This optional argument should - * be either a single-argument function or an array of buttons. If passed - * a function, it will be called when the user taps 'OK'. - * - * If passed an array of button configurations, each button should include - * a `text` key, as well as optional `onPress` and `style` keys. `style` - * should be one of 'default', 'cancel' or 'destructive'. - * @param type Deprecated, do not use. - */ - alert: ( title: string, message?: string, callbackOrButtons?: (() => void) | Array, type?: AlertType ) => void - - /** - * Create and display a prompt to enter some text. - * @static - * @method prompt - * @param title The dialog's title. - * @param message An optional message that appears above the text - * input. - * @param callbackOrButtons This optional argument should - * be either a single-argument function or an array of buttons. If passed - * a function, it will be called with the prompt's value when the user - * taps 'OK'. - * - * If passed an array of button configurations, each button should include - * a `text` key, as well as optional `onPress` and `style` keys (see - * example). `style` should be one of 'default', 'cancel' or 'destructive'. - * @param type This configures the text input. One of 'plain-text', - * 'secure-text' or 'login-password'. - * @param defaultValue The default text in text input. - */ - prompt: ( title: string, message?: string, callbackOrButtons?: ((value: string) => void) | Array, type?: AlertType, defaultValue?: string ) => void - } - - /** - * AppStateIOS can tell you if the app is in the foreground or background, - * and notify you when the state changes. - * - * AppStateIOS is frequently used to determine the intent and proper behavior - * when handling push notifications. - * - * iOS App States - * active - The app is running in the foreground - * background - The app is running in the background. The user is either in another app or on the home screen - * inactive - This is a transition state that currently never happens for typical React Native apps. - * - * For more information, see Apple's documentation: https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/TheAppLifeCycle/TheAppLifeCycle.html - * - * @see https://facebook.github.io/react-native/docs/appstateios.html#content - */ - export type AppStateEvent = "change" | "memoryWarning" - export type AppStateStatus = "active" | "background" | "inactive" - - export interface AppStateStatic { - - currentState: string - - /** - * Add a handler to AppState changes by listening to the change event - * type and providing the handler - */ - addEventListener(type: AppStateEvent, listener: (state: AppStateStatus) => void): void - - /** - * Remove a handler by passing the change event type and the handler - */ - removeEventListener(type: AppStateEvent, listener: (state: AppStateStatus) => void): void - } - - /** - * AsyncStorage is a simple, unencrypted, asynchronous, persistent, key-value storage - * system that is global to the app. It should be used instead of LocalStorage. - * - * It is recommended that you use an abstraction on top of `AsyncStorage` - * instead of `AsyncStorage` directly for anything more than light usage since - * it operates globally. - * - * On iOS, `AsyncStorage` is backed by native code that stores small values in a - * serialized dictionary and larger values in separate files. On Android, - * `AsyncStorage` will use either [RocksDB](http://rocksdb.org/) or SQLite - * based on what is available. - * - * @see https://facebook.github.io/react-native/docs/asyncstorage.html#content - */ - export interface AsyncStorageStatic { - - /** - * Fetches key and passes the result to callback, along with an Error if there is any. - */ - getItem(key: string, callback?: (error?: Error, result?: string) => void): Promise - - /** - * Sets value for key and calls callback on completion, along with an Error if there is any - */ - setItem(key: string, value: string, callback?: (error?: Error) => void): Promise - - removeItem(key: string, callback?: (error?: Error) => void): Promise - - /** - * Merges existing value with input value, assuming they are stringified json. Returns a Promise object. - * Not supported by all native implementation - */ - mergeItem(key: string, value: string, callback?: (error?: Error) => void): Promise - - /** - * Erases all AsyncStorage for all clients, libraries, etc. You probably don't want to call this. - * Use removeItem or multiRemove to clear only your own keys instead. - */ - clear(callback?: (error?: Error) => void): Promise - - /** - * Gets all keys known to the app, for all callers, libraries, etc - */ - getAllKeys(callback?: (error?: Error, keys?: string[]) => void): Promise - - /** - * multiGet invokes callback with an array of key-value pair arrays that matches the input format of multiSet - */ - multiGet(keys: string[], callback?: (errors?: Error[], result?: [string, string][]) => void): Promise<[string, string][]> - - /** - * multiSet and multiMerge take arrays of key-value array pairs that match the output of multiGet, - * - * multiSet([['k1', 'val1'], ['k2', 'val2']], cb); - */ - multiSet(keyValuePairs: string[][], callback?: (errors?: Error[]) => void): Promise - - /** - * Delete all the keys in the keys array. - */ - multiRemove(keys: string[], callback?: (errors?: Error[]) => void): Promise - - /** - * Merges existing values with input values, assuming they are stringified json. - * Returns a Promise object. - * - * Not supported by all native implementations. - */ - multiMerge(keyValuePairs: string[][], callback?: (errors?: Error[]) => void): Promise - } - - export type BackPressEventName = "hardwareBackPress" - - /** - * Detect hardware back button presses, and programmatically invoke the - * default back button functionality to exit the app if there are no - * listeners or if none of the listeners return true. - * Methods don't have more detailed documentation as of 0.25. - */ - export interface BackAndroidStatic { - exitApp(): void; - addEventListener(eventName: BackPressEventName, handler: () => void): void; - removeEventListener(eventName: BackPressEventName, handler: () => void): void; - } - - export interface ButtonProperties { - title: string; - onPress: () => any; - color?: string; - accessibilityLabel?: string; - disabled?: boolean; - } - - export interface ButtonStatic extends ComponentClass { - } - - export type CameraRollGroupType = "Album" | "All" | "Event" | "Faces" | "Library" | "PhotoStream" | "SavedPhotos"; - export type CameraRollAssetType = "All" | "Videos" | "Photos"; - - export interface CameraRollFetchParams { - first: number; - after?: string; - groupTypes?: CameraRollGroupType - groupName?: string - assetType?: CameraRollAssetType - } - - export interface CameraRollNodeInfo { - image: Image; - group_name: string; - timestamp: number; - location: any; - } - - export interface CameraRollEdgeInfo { - node: CameraRollNodeInfo; - } - - export interface CameraRollAssetInfo { - edges: CameraRollEdgeInfo[]; - page_info: { - has_next_page: boolean; - end_cursor: string; - }; - } - - export interface GetPhotosParamType { - first: number - after?: string - groupTypes?: CameraRollGroupType - groupName?: string - assetType?: CameraRollAssetType - mimeTypes?: string[] - } - - export interface GetPhotosReturnType { - edges: { - node: { - type: string - group_name: string - image: { - uri: string - height: number - width: number - isStored?: boolean - } - timestamp: number - location: { - latitude: number - longitude: number - altitude: number - heading: number - speed: number - } - } - }[] - - page_info: { - has_next_page: boolean - start_cursor?: string - end_cursor?: string - } - } - - /** - * CameraRoll provides access to the local camera roll / gallery. - * Before using this you must link the RCTCameraRoll library. - * You can refer to (Linking)[https://facebook.github.io/react-native/docs/linking-libraries-ios.html] for help. - */ - export interface CameraRollStatic { - - GroupTypesOptions: CameraRollGroupType[] //'Album','All','Event','Faces','Library','PhotoStream','SavedPhotos' - AssetTypeOptions: CameraRollAssetType[] // "All", "Videos", "Photos" - - /** - * Saves the image to the camera roll / gallery. - * - * @tag On Android, this is a local URI, such as "file:///sdcard/img.png". - * On iOS, the tag can be one of the following: - * local URI - * assets-library tag - * a tag not maching any of the above, which means the image data will be stored in memory (and consume memory as long as the process is alive) - * - * @deprecated use saveToCameraRoll instead - */ - saveImageWithTag(tag: string): Promise - - /** - * Saves the photo or video to the camera roll / gallery. - * - * On Android, the tag must be a local image or video URI, such as `"file:///sdcard/img.png"`. - * - * On iOS, the tag can be any image URI (including local, remote asset-library and base64 data URIs) - * or a local video file URI (remote or data URIs are not supported for saving video at this time). - * - * If the tag has a file extension of .mov or .mp4, it will be inferred as a video. Otherwise - * it will be treated as a photo. To override the automatic choice, you can pass an optional - * `type` parameter that must be one of 'photo' or 'video'. - * - * Returns a Promise which will resolve with the new URI. - */ - saveToCameraRoll(tag: string, type?: 'photo' | 'video'): Promise - - /** - * Saves the photo or video to the camera roll / gallery. - * - * On Android, the tag must be a local image or video URI, such as `"file:///sdcard/img.png"`. - * - * On iOS, the tag can be any image URI (including local, remote asset-library and base64 data URIs) - * or a local video file URI (remote or data URIs are not supported for saving video at this time). - * - * If the tag has a file extension of .mov or .mp4, it will be inferred as a video. Otherwise - * it will be treated as a photo. To override the automatic choice, you can pass an optional - * `type` parameter that must be one of 'photo' or 'video'. - * - * Returns a Promise which will resolve with the new URI. - */ - saveToCameraRoll(tag: string, type?: 'photo' | 'video'): Promise - - /** - * Invokes callback with photo identifier objects from the local camera roll of the device matching shape defined by getPhotosReturnChecker. - * - * @param {object} params See getPhotosParamChecker. - */ - getPhotos(params: GetPhotosParamType): Promise; - } - - /** Clipboard gives you an interface for setting and getting content from Clipboard on both iOS and Android */ - export interface ClipboardStatic { - getString(): Promise; - setString(content: string): void; - } - - export interface DatePickerAndroidOpenOption { - date?: Date | number - minDate?: Date | number - maxDate?: Date | number - } - - // Deduced from DatePickerAndroid.android.js - export interface DatePickerAndroidOpenReturn { - action: string // "dateSetAction" | "dismissedAction" - year?: number - month?: number - day?: number - } - - export interface DatePickerAndroidStatic { - /* - Opens the standard Android date picker dialog. - - The available keys for the options object are: - * date (Date object or timestamp in milliseconds) - date to show by default - * minDate (Date object or timestamp in milliseconds) - minimum date that can be selected - * maxDate (Date object or timestamp in milliseconds) - maximum date that can be selected - - Returns a Promise which will be invoked an object containing action, year, month (0-11), day if the user picked a date. If the user dismissed the dialog, the Promise will still be resolved with action being DatePickerAndroid.dismissedAction and all the other keys being undefined. Always check whether the action before reading the values. - - Note the native date picker dialog has some UI glitches on Android 4 and lower when using the minDate and maxDate options. - */ - open(options?: DatePickerAndroidOpenOption): Promise - - /** - * A date has been selected. - */ - dateSetAction: string - - /** - * The dialog has been dismissed. - */ - dismissedAction: string - } - - export interface FetchableListenable { - fetch: () => Promise - - /** - * eventName is expected to be `change` - * //FIXME: No doc - inferred from NetInfo.js - */ - addEventListener: (eventName: string, listener: (result: T) => void) => void - - /** - * eventName is expected to be `change` - * //FIXME: No doc - inferred from NetInfo.js - */ - removeEventListener: (eventName: string, listener: (result: T) => void) => void - } - - export interface IntentAndroidStatic { - /** - * Starts a corresponding external activity for the given URL. - - For example, if the URL is "https://www.facebook.com", the system browser will be opened, or the "choose application" dialog will be shown. - - You can use other URLs, like a location (e.g. "geo:37.484847,-122.148386"), a contact, or any other URL that can be opened with {@code Intent.ACTION_VIEW}. - - NOTE: This method will fail if the system doesn't know how to open the specified URL. If you're passing in a non-http(s) URL, it's best to check {@code canOpenURL} first. - - NOTE: For web URLs, the protocol ("http://", "https://") must be set accordingly! - - @deprecated - */ - openURL(url: string): void - - /** - * Determine whether or not an installed app can handle a given URL. - - You can use other URLs, like a location (e.g. "geo:37.484847,-122.148386"), a contact, or any other URL that can be opened with {@code Intent.ACTION_VIEW}. - - NOTE: For web URLs, the protocol ("http://", "https://") must be set accordingly! - - @param URL the URL to open - - @deprecated - */ - canOpenURL(url: string, callback: (supported: boolean) => void): void - - /** - * If the app launch was triggered by an app link with {@code Intent.ACTION_VIEW}, it will give the link url, otherwise it will give null - - Refer http://developer.android.com/training/app-indexing/deep-linking.html#handling-intents - - @deprecated - */ - getInitialURL(callback: (url: string) => void): void - } - - export interface LinkingStatic extends NativeEventEmitter { - /** - * Add a handler to Linking changes by listening to the `url` event type - * and providing the handler - */ - addEventListener(type: string, handler: (event: { url: string }) => void): void - - /** - * Remove a handler by passing the `url` event type and the handler - */ - removeEventListener(type: string, handler: (event: { url: string }) => void): void - - /** - * Try to open the given url with any of the installed apps. - * You can use other URLs, like a location (e.g. "geo:37.484847,-122.148386"), a contact, or any other URL that can be opened with the installed apps. - * NOTE: This method will fail if the system doesn't know how to open the specified URL. If you're passing in a non-http(s) URL, it's best to check {@code canOpenURL} first. - * NOTE: For web URLs, the protocol ("http://", "https://") must be set accordingly! - */ - openURL(url: string): Promise - - /** - * Determine whether or not an installed app can handle a given URL. - * NOTE: For web URLs, the protocol ("http://", "https://") must be set accordingly! - * NOTE: As of iOS 9, your app needs to provide the LSApplicationQueriesSchemes key inside Info.plist. - * @param URL the URL to open - */ - canOpenURL(url: string): Promise - - /** - * If the app launch was triggered by an app link with, it will give the link url, otherwise it will give null - * NOTE: To support deep linking on Android, refer http://developer.android.com/training/app-indexing/deep-linking.html#handling-intents - */ - getInitialURL(): Promise - } - - export interface LinkingIOSStatic { - /** - * Add a handler to LinkingIOS changes by listening to the url event type and providing the handler - @deprecated - */ - addEventListener(type: string, handler: (event: { url: string }) => void): void - - /** - * Remove a handler by passing the url event type and the handler - @deprecated - */ - removeEventListener(type: string, handler: (event: { url: string }) => void): void - - /** - * Try to open the given url with any of the installed apps. - @deprecated - */ - openURL(url: string): void - - /** - * Determine whether or not an installed app can handle a given URL. The callback function will be called with bool supported as the only argument - NOTE: As of iOS 9, your app needs to provide the LSApplicationQueriesSchemes key inside Info.plist. - @deprecated - */ - canOpenURL(url: string, callback: (supported: boolean) => void): void - - /** - * If the app launch was triggered by an app link, it will pop the link url, otherwise it will return null - @deprecated - */ - popInitialURL(): string; - } - - - /** - * NetInfo exposes info about online/offline status - * - * Asynchronously determine if the device is online and on a cellular network. - * - * - `none` - device is offline - * - `wifi` - device is online and connected via wifi, or is the iOS simulator - * - `cell` - device is connected via Edge, 3G, WiMax, or LTE - * - `unknown` - error case and the network status is unknown - * @see https://facebook.github.io/react-native/docs/netinfo.html#content - */ - - // This is from code, a few items more than documentation@0.25 - export type NetInfoReturnType = "none" | "wifi" | "cell" | "unknown" | - "NONE" | "MOBILE" | "WIFI" | "MOBILE_MMS" | "MOBILE_SUPL" | "MOBILE_DUN" | - "MOBILE_HIPRI" | "WIMAX" | "BLUETOOTH" | "DUMMY" | "ETHERNET" | "MOBILE_FOTA" | - "MOBILE_IMS" | "MOBILE_CBS" | "WIFI_P2P" | "MOBILE_IA" | "MOBILE_EMERGENCY" | - "PROXY" | "VPN" | "UNKNOWN" - - export interface NetInfoStatic extends FetchableListenable { - - /** - * - * Available on all platforms. - * Asynchronously fetch a boolean to determine internet connectivity. - */ - isConnected: FetchableListenable - - /** - * Available on Android. Detect if the current active connection is - * metered or not. A network is classified as metered when the user is - * sensitive to heavy data usage on that connection due to monetary - * costs, data limitations or battery/performance issues. - */ - isConnectionExpensive: Promise - } - - - export interface PanResponderGestureState { - - /** - * ID of the gestureState- persisted as long as there at least one touch on - */ - stateID: number - - /** - * the latest screen coordinates of the recently-moved touch - */ - moveX: number - - /** - * the latest screen coordinates of the recently-moved touch - */ - moveY: number - - /** - * the screen coordinates of the responder grant - */ - x0: number - - /** - * the screen coordinates of the responder grant - */ - y0: number - - /** - * accumulated distance of the gesture since the touch started - */ - dx: number - - /** - * accumulated distance of the gesture since the touch started - */ - dy: number - - /** - * current velocity of the gesture - */ - vx: number - - /** - * current velocity of the gesture - */ - vy: number - - /** - * Number of touches currently on screen - */ - numberActiveTouches: number - - - // All `gestureState` accounts for timeStamps up until: - _accountsForMovesUpTo: number - } - - - /** - * @see documentation of GestureResponderHandlers - */ - export interface PanResponderCallbacks { - onMoveShouldSetPanResponder?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean - onStartShouldSetPanResponder?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void - onPanResponderGrant?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void - onPanResponderMove?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void - onPanResponderRelease?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void - onPanResponderTerminate?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void - - onMoveShouldSetPanResponderCapture?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean - onStartShouldSetPanResponderCapture?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean - onPanResponderReject?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void - onPanResponderStart?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void - onPanResponderEnd?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void - onPanResponderTerminationRequest?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean - } - - export interface PanResponderInstance { - panHandlers: GestureResponderHandlers - } - - /** - * PanResponder reconciles several touches into a single gesture. - * It makes single-touch gestures resilient to extra touches, - * and can be used to recognize simple multi-touch gestures. - * - * It provides a predictable wrapper of the responder handlers provided by the gesture responder system. - * For each handler, it provides a new gestureState object alongside the normal event. - */ - export interface PanResponderStatic { - /** - * @param config Enhanced versions of all of the responder callbacks - * that provide not only the typical `ResponderSyntheticEvent`, but also the - * `PanResponder` gesture state. Simply replace the word `Responder` with - * `PanResponder` in each of the typical `onResponder*` callbacks. For - * example, the `config` object would look like: - * - * - `onMoveShouldSetPanResponder: (e, gestureState) => {...}` - * - `onMoveShouldSetPanResponderCapture: (e, gestureState) => {...}` - * - `onStartShouldSetPanResponder: (e, gestureState) => {...}` - * - `onStartShouldSetPanResponderCapture: (e, gestureState) => {...}` - * - `onPanResponderReject: (e, gestureState) => {...}` - * - `onPanResponderGrant: (e, gestureState) => {...}` - * - `onPanResponderStart: (e, gestureState) => {...}` - * - `onPanResponderEnd: (e, gestureState) => {...}` - * - `onPanResponderRelease: (e, gestureState) => {...}` - * - `onPanResponderMove: (e, gestureState) => {...}` - * - `onPanResponderTerminate: (e, gestureState) => {...}` - * - `onPanResponderTerminationRequest: (e, gestureState) => {...}` - * - * In general, for events that have capture equivalents, we update the - * gestureState once in the capture phase and can use it in the bubble phase - * as well. - * - * Be careful with onStartShould* callbacks. They only reflect updated - * `gestureState` for start/end events that bubble/capture to the Node. - * Once the node is the responder, you can rely on every start/end event - * being processed by the gesture and `gestureState` being updated - * accordingly. (numberActiveTouches) may not be totally accurate unless you - * are the responder. - */ - create(config: PanResponderCallbacks): PanResponderInstance - } - - export interface Rationale { - title: string - message: string - } - - export type Permission = "android.permission.READ_CALENDAR" | "android.permission.WRITE_CALENDAR" | "android.permission.CAMERA" | "android.permission.READ_CONTACTS" | "android.permission.WRITE_CONTACTS" | "android.permission.GET_ACCOUNTS" | "android.permission.ACCESS_FINE_LOCATION" | "android.permission.ACCESS_COARSE_LOCATION" | "android.permission.RECORD_AUDIO" | "android.permission.READ_PHONE_STATE" | "android.permission.CALL_PHONE" | "android.permission.READ_CALL_LOG" | "android.permission.WRITE_CALL_LOG" | "com.android.voicemail.permission.ADD_VOICEMAIL" | "android.permission.USE_SIP" | "android.permission.PROCESS_OUTGOING_CALLS" | "android.permission.BODY_SENSORS" | "android.permission.SEND_SMS" | "android.permission.RECEIVE_SMS" | "android.permission.READ_SMS" | "android.permission.RECEIVE_WAP_PUSH" | "android.permission.RECEIVE_MMS" | "android.permission.READ_EXTERNAL_STORAGE" | "android.permission.WRITE_EXTERNAL_STORAGE" - - export interface PermissionsAndroidStatic { - /** - * A list of specified "dangerous" permissions that require prompting the user - */ - PERMISSIONS: {[key: string]: Permission} - new(): PermissionsAndroidStatic - /** - * Returns a promise resolving to a boolean value as to whether the specified - * permissions has been granted - */ - checkPermission(permission: Permission): Promise - /** - * Prompts the user to enable a permission and returns a promise resolving to a - * boolean value indicating whether the user allowed or denied the request - * - * If the optional rationale argument is included (which is an object with a - * `title` and `message`), this function checks with the OS whether it is - * necessary to show a dialog explaining why the permission is needed - * (https://developer.android.com/training/permissions/requesting.html#explain) - * and then shows the system permission dialog - */ - requestPermission(permission: Permission, rationale?: Rationale): Promise - } - - export interface PushNotificationPermissions { - alert?: boolean - badge?: boolean - sound?: boolean - } - - export interface PushNotification { - - - /** - * An alias for `getAlert` to get the notification's main message string - */ - getMessage(): string | Object - - /** - * Gets the sound string from the `aps` object - */ - getSound(): string - - /** - * Gets the notification's main message from the `aps` object - */ - getAlert(): string | Object - - /** - * Gets the badge count number from the `aps` object - */ - getBadgeCount(): number - - /** - * Gets the data object on the notif - */ - getData(): Object - - } - - - type PresentLocalNotificationDetails = { - alertBody: string - alertAction: string - soundName?: string - category?: string - userInfo?: Object - applicationIconBadgeNumber?: number - } - - type ScheduleLocalNotificationDetails = { - fireDate: Date - alertBody: string - alertAction: string - soundName?: string - category?: string - userInfo?: Object - applicationIconBadgeNumber?: number - } - - export type PushNotificationEventName = "notification" | "localNotification" | "register" | "registrationError" - - /** - * Handle push notifications for your app, including permission handling and icon badge number. - * @see https://facebook.github.io/react-native/docs/pushnotificationios.html#content - * - * //FIXME: BGR: The documentation seems completely off compared to the actual js implementation. I could never get the example to run - */ - export interface PushNotificationIOSStatic { - - /** - * Schedules the localNotification for immediate presentation. - * details is an object containing: - * alertBody : The message displayed in the notification alert. - * alertAction : The "action" displayed beneath an actionable notification. Defaults to "view"; - * soundName : The sound played when the notification is fired (optional). - * category : The category of this notification, required for actionable notifications (optional). - * userInfo : An optional object containing additional notification data. - * applicationIconBadgeNumber (optional) : The number to display as the app's icon badge. The default value of this property is 0, which means that no badge is displayed. - */ - presentLocalNotification(details: PresentLocalNotificationDetails): void - - /** - * Schedules the localNotification for future presentation. - * details is an object containing: - * fireDate : The date and time when the system should deliver the notification. - * alertBody : The message displayed in the notification alert. - * alertAction : The "action" displayed beneath an actionable notification. Defaults to "view"; - * soundName : The sound played when the notification is fired (optional). - * category : The category of this notification, required for actionable notifications (optional). - * userInfo : An optional object containing additional notification data. - * applicationIconBadgeNumber (optional) : The number to display as the app's icon badge. Setting the number to 0 removes the icon badge. - */ - scheduleLocalNotification(details: ScheduleLocalNotificationDetails): void - - /** - * Cancels all scheduled localNotifications - */ - cancelAllLocalNotifications(): void - - /** - * Cancel local notifications. - * Optionally restricts the set of canceled notifications to those notifications whose userInfo fields match the corresponding fields in the userInfo argument. - */ - cancelLocalNotifications(userInfo: Object): void - - /** - * Sets the badge number for the app icon on the home screen - */ - setApplicationIconBadgeNumber(number: number): void - - /** - * Gets the current badge number for the app icon on the home screen - */ - getApplicationIconBadgeNumber(callback: (badge: number) => void): void - - /** - * Gets the local notifications that are currently scheduled. - */ - getScheduledLocalNotifications(callback: (notifications: ScheduleLocalNotificationDetails[]) => void): void - - /** - * Attaches a listener to remote notifications while the app is running in the - * foreground or the background. - * - * The handler will get be invoked with an instance of `PushNotificationIOS` - * - * The type MUST be 'notification' - */ - addEventListener( type: PushNotificationEventName, handler: ( notification: PushNotification ) => void ):void - - /** - * Removes the event listener. Do this in `componentWillUnmount` to prevent - * memory leaks - */ - removeEventListener( type: PushNotificationEventName, handler: ( notification: PushNotification ) => void ): void - - /** - * Requests all notification permissions from iOS, prompting the user's - * dialog box. - */ - requestPermissions(permissions?: PushNotificationPermissions[]): void - - /** - * Requests all notification permissions from iOS, prompting the user's - * dialog box. - */ - requestPermissions( permissions?: PushNotificationPermissions ): Promise - - /** - * Unregister for all remote notifications received via Apple Push - * Notification service. - * You should call this method in rare circumstances only, such as when - * a new version of the app removes support for all types of remote - * notifications. Users can temporarily prevent apps from receiving - * remote notifications through the Notifications section of the - * Settings app. Apps unregistered through this method can always - * re-register. - */ - abandonPermissions(): void - - /** - * See what push permissions are currently enabled. `callback` will be - * invoked with a `permissions` object: - * - * - `alert` :boolean - * - `badge` :boolean - * - `sound` :boolean - */ - checkPermissions(callback: (permissions: PushNotificationPermissions) => void): void - - /** - * This method returns a promise that resolves to either the notification - * object if the app was launched by a push notification, or `null` otherwise. - */ - getInitialNotification(): PushNotification - } - - export interface SettingsStatic { - get(key: string): any - set(settings: Object): void - watchKeys(keys: string | Array, callback: (() => void)): number - clearWatch(watchId: number): void - } - - - /** - * @enum('default', 'light-content') - */ - export type StatusBarStyle = "default" | "light-content" - - /** - * @enum('fade', 'slide') - */ - export type StatusBarAnimation = "none" | "fade" | "slide" - - export interface StatusBarPropertiesIOS extends React.Props { - /** - * Sets the color of the status bar text. - */ - barStyle?: StatusBarStyle - - /** - * If the network activity indicator should be visible. - */ - networkActivityIndicatorVisible?: boolean - - /** - * The transition effect when showing and hiding the status bar using - * the hidden prop. Defaults to 'fade'. - */ - showHideTransition?: "fade" | "slide" - } - - export interface StatusBarPropertiesAndroid extends React.Props { - /** - * The background color of the status bar. - */ - backgroundColor?: string - - /** - * If the status bar is translucent. When translucent is set to true, - * the app will draw under the status bar. This is useful when using a - * semi transparent status bar color. - */ - translucent?: boolean - } - - export interface StatusBarProperties extends StatusBarPropertiesIOS, StatusBarPropertiesAndroid, React.Props { - - /** - * If the transition between status bar property changes should be - * animated. Supported for backgroundColor, barStyle and hidden. - */ - animated?: boolean - - /** - * If the status bar is hidden. - */ - hidden?: boolean - } - - export interface StatusBarStatic extends React.ComponentClass { - - /** - * The current height of the status bar on the device. - * @platform android - */ - currentHeight?: number - - /** - * Show or hide the status bar - * @param hidden The dialog's title. - * @param animation Optional animation when - * changing the status bar hidden property. - */ - setHidden: (hidden: boolean, animation?: StatusBarAnimation) => void - - /** - * Set the status bar style - * @param style Status bar style to set - * @param animated Animate the style change. - */ - setBarStyle: (style: StatusBarStyle, animated?: boolean) => void - - /** - * Control the visibility of the network activity indicator - * @param visible Show the indicator. - */ - setNetworkActivityIndicatorVisible: (visible: boolean) => void - - /** - * Set the background color for the status bar - * @param color Background color. - * @param animated Animate the style change. - */ - setBackgroundColor: (color: string, animated?: boolean) => void - - /** - * Control the translucency of the status bar - * @param translucent Set as translucent. - */ - setTranslucent: (translucent: boolean) => void - } - - /** - * StatusBarIOS is deprecated. - * Use `StatusBar` for mutating the status bar. - */ - export interface StatusBarIOSStatic extends NativeEventEmitter { - } - - type TimePickerAndroidOpenOptions = { - hour?: number - minute?: number - is24Hour?: boolean - } - - /** - * Opens the standard Android time picker dialog. - * - * ### Example - * - * ``` - * try { - * const {action, hour, minute} = await TimePickerAndroid.open({ - * hour: 14, - * minute: 0, - * is24Hour: false, // Will display '2 PM' - * }); - * if (action !== TimePickerAndroid.dismissedAction) { - * // Selected hour (0-23), minute (0-59) - * } - * } catch ({code, message}) { - * console.warn('Cannot open time picker', message); - * } - * ``` - */ - export interface TimePickerAndroidStatic { - - /** - * Opens the standard Android time picker dialog. - * - * The available keys for the `options` object are: - * * `hour` (0-23) - the hour to show, defaults to the current time - * * `minute` (0-59) - the minute to show, defaults to the current time - * * `is24Hour` (boolean) - If `true`, the picker uses the 24-hour format. If `false`, - * the picker shows an AM/PM chooser. If undefined, the default for the current locale - * is used. - * - * Returns a Promise which will be invoked an object containing `action`, `hour` (0-23), - * `minute` (0-59) if the user picked a time. If the user dismissed the dialog, the Promise will - * still be resolved with action being `TimePickerAndroid.dismissedAction` and all the other keys - * being undefined. **Always** check whether the `action` before reading the values. - */ - open(options: TimePickerAndroidOpenOptions): Promise<{ action: string, hour: number, minute: number }> - - /** - * A time has been selected. - */ - timeSetAction: string - - /** - * The dialog has been dismissed. - */ - dismissedAction: string - } - - /** - * This exposes the native ToastAndroid module as a JS module. This has a function 'show' - * which takes the following parameters: - * - * 1. String message: A string with the text to toast - * 2. int duration: The duration of the toast. May be ToastAndroid.SHORT or ToastAndroid.LONG - * - * There is also a function `showWithGravity` to specify the layout gravity. May be - * ToastAndroid.TOP, ToastAndroid.BOTTOM, ToastAndroid.CENTER - */ - export interface ToastAndroidStatic { - /** - * String message: A string with the text to toast - * int duration: The duration of the toast. - * May be ToastAndroid.SHORT or ToastAndroid.LONG - */ - show(message: string, duration: number): void - /** `gravity` may be ToastAndroid.TOP, ToastAndroid.BOTTOM, ToastAndroid.CENTER */ - showWithGravity( - message: string, - duration: number, - gravity: number - ): void - // Toast duration constants - SHORT: number - LONG: number - // Toast gravity constants - TOP: number - BOTTOM: number - CENTER: number - } - - export interface UIManagerStatic { - /** - * Capture an image of the screen, window or an individual view. The image - * will be stored in a temporary file that will only exist for as long as the - * app is running. - * - * The `view` argument can be the literal string `window` if you want to - * capture the entire window, or it can be a reference to a specific - * React Native component. - * - * The `options` argument may include: - * - width/height (number) - the width and height of the image to capture. - * - format (string) - either 'png' or 'jpeg'. Defaults to 'png'. - * - quality (number) - the quality when using jpeg. 0.0 - 1.0 (default). - * - * Returns a Promise (tempFilePath) - * @platform ios - */ - takeSnapshot: ( - view ?: 'window' | ReactElement | number, - options ?: { - width ?: number, - height ?: number, - format ?: 'png' | 'jpeg', - quality ?: number, - } - ) => Promise - } - - export interface SwitchPropertiesIOS extends ViewProperties, React.Props { - - /** - * Background color when the switch is turned on. - */ - onTintColor?: string - - /** - * Color of the foreground switch grip. - */ - thumbTintColor?: string - - /** - * Background color when the switch is turned off. - */ - tintColor?: string - - ref?: Ref - } - - export interface SwitchProperties extends SwitchPropertiesIOS, React.Props { - - /** - * If true the user won't be able to toggle the switch. - * Default value is false. - */ - disabled?: boolean - - /** - * Invoked with the new value when the value changes. - */ - onValueChange?: (value: boolean) => void - - /** - * Used to locate this view in end-to-end tests. - */ - testID?: string - - /** - * The value of the switch. If true the switch will be turned on. - * Default value is false. - */ - value?: boolean - style?: ViewStyle - } - - /** - * Renders a boolean input. - * - * This is a controlled component that requires an `onValueChange` callback that - * updates the `value` prop in order for the component to reflect user actions. - * If the `value` prop is not updated, the component will continue to render - * the supplied `value` prop instead of the expected result of any user actions. - */ - export interface SwitchStatic extends NativeMethodsMixin, React.ClassicComponentClass { - - } - - /** - * NOTE: `VibrationIOS` is being deprecated. Use `Vibration` instead. - * - * The Vibration API is exposed at VibrationIOS.vibrate(). - * On iOS, calling this function will trigger a one second vibration. - * The vibration is asynchronous so this method will return immediately. - * - * There will be no effect on devices that do not support Vibration, eg. the iOS simulator. - * - * Vibration patterns are currently unsupported. - * - * @see https://facebook.github.io/react-native/docs/vibrationios.html#content - */ - export interface VibrationIOSStatic { - /** - * @deprecated - */ - vibrate(): void - } - - /** - * The Vibration API is exposed at `Vibration.vibrate()`. - * The vibration is asynchronous so this method will return immediately. - * - * There will be no effect on devices that do not support Vibration, eg. the simulator. - * - * **Note for android** - * add `` to `AndroidManifest.xml` - * - * **Android Usage:** - * - * [0, 500, 200, 500] - * V(0.5s) --wait(0.2s)--> V(0.5s) - * - * [300, 500, 200, 500] - * --wait(0.3s)--> V(0.5s) --wait(0.2s)--> V(0.5s) - * - * **iOS Usage:** - * if first argument is 0, it will not be included in pattern array. - * - * [0, 1000, 2000, 3000] - * V(fixed) --wait(1s)--> V(fixed) --wait(2s)--> V(fixed) --wait(3s)--> V(fixed) - */ - export interface VibrationStatic { - vibrate(pattern: number | number[], repeat: boolean): void - - /** - * Stop vibration - */ - cancel(): void - } - - /** - * This class implements common easing functions. The math is pretty obscure, - * but this cool website has nice visual illustrations of what they represent: - * http://xaedes.de/dev/transitions/ - */ - export type EasingFunction = (value: number) => number; - export interface EasingStatic { - step0: EasingFunction; - step1: EasingFunction; - linear: EasingFunction; - ease: EasingFunction; - quad: EasingFunction; - cubic: EasingFunction; - poly: EasingFunction; - sin: EasingFunction; - circle: EasingFunction; - exp: EasingFunction; - elastic: EasingFunction; - back(s: number): EasingFunction; - bounce: EasingFunction; - bezier(x1: number, - y1: number, - x2: number, - y2: number): EasingFunction; - in(easing: EasingFunction): EasingFunction; - out(easing: EasingFunction): EasingFunction; - inOut(easing: EasingFunction): EasingFunction; - } - - export module Animated { - // Most (all?) functions where AnimatedValue is used any subclass of Animated can be used as well. - type AnimatedValue = Animated; - type AnimatedValueXY = ValueXY; - - type Base = Animated; - - class Animated { - // Internal class, no public API. - } - - class AnimatedWithChildren extends Animated { - // Internal class, no public API. - } - - class AnimatedInterpolation extends AnimatedWithChildren { - interpolate(config: InterpolationConfigType): AnimatedInterpolation; - } - - type ExtrapolateType = 'extend' | 'identity' | 'clamp'; - - type InterpolationConfigType = { - inputRange: number[]; - outputRange: (number[] | string[]); - easing?: ((input: number) => number); - extrapolate?: ExtrapolateType; - extrapolateLeft?: ExtrapolateType; - extrapolateRight?: ExtrapolateType; - }; - - type ValueListenerCallback = (state: { value: number }) => void; - - /** - * Standard value for driving animations. One `Animated.Value` can drive - * multiple properties in a synchronized fashion, but can only be driven by one - * mechanism at a time. Using a new mechanism (e.g. starting a new animation, - * or calling `setValue`) will stop any previous ones. - */ - export class Value extends AnimatedWithChildren { - constructor(value: number); - - /** - * Directly set the value. This will stop any animations running on the value - * and update all the bound properties. - */ - setValue(value: number): void; - - /** - * Sets an offset that is applied on top of whatever value is set, whether via - * `setValue`, an animation, or `Animated.event`. Useful for compensating - * things like the start of a pan gesture. - */ - setOffset(offset: number): void; - - /** - * Merges the offset value into the base value and resets the offset to zero. - * The final output of the value is unchanged. - */ - flattenOffset(): void; - - /** - * Adds an asynchronous listener to the value so you can observe updates from - * animations. This is useful because there is no way to - * synchronously read the value because it might be driven natively. - */ - addListener(callback: ValueListenerCallback): string; - - removeListener(id: string): void; - - removeAllListeners(): void; - - /** - * Stops any running animation or tracking. `callback` is invoked with the - * final value after stopping the animation, which is useful for updating - * state to match the animation position with layout. - */ - stopAnimation(callback?: (value: number) => void): void; - - /** - * Interpolates the value before updating the property, e.g. mapping 0-1 to - * 0-10. - */ - interpolate(config: InterpolationConfigType): AnimatedInterpolation; - } - - type ValueXYListenerCallback = (value: { x: number; y: number }) => void; - - /** - * 2D Value for driving 2D animations, such as pan gestures. Almost identical - * API to normal `Animated.Value`, but multiplexed. Contains two regular - * `Animated.Value`s under the hood. - */ - export class ValueXY extends AnimatedWithChildren { - x: AnimatedValue; - y: AnimatedValue; - - constructor(valueIn?: { x: number | AnimatedValue; y: number | AnimatedValue }); - - setValue(value: { x: number; y: number }): void; - - setOffset(offset: { x: number; y: number }): void; - - flattenOffset(): void - - stopAnimation(callback?: (value: {x: number, y: number}) => void): void; - - addListener(callback: ValueXYListenerCallback): string; - - removeListener(id: string): void; - - /** - * Converts `{x, y}` into `{left, top}` for use in style, e.g. - * - *```javascript - * style={this.state.anim.getLayout()} - *``` - */ - getLayout(): { [key: string]: AnimatedValue }; - - /** - * Converts `{x, y}` into a useable translation transform, e.g. - * - *```javascript - * style={{ - * transform: this.state.anim.getTranslateTransform() - * }} - *``` - */ - getTranslateTransform(): { [key: string]: AnimatedValue }[]; - - } - - type EndResult = { finished: boolean }; - type EndCallback = (result: EndResult) => void; - - interface CompositeAnimation { - start: (callback?: EndCallback) => void; - stop: () => void; - } - - interface AnimationConfig { - isInteraction?: boolean; - useNativeDriver?: boolean; - } - - /** - * Animates a value from an initial velocity to zero based on a decay - * coefficient. - */ - export function decay( - value: AnimatedValue | AnimatedValueXY, - config: DecayAnimationConfig - ): CompositeAnimation; - - interface DecayAnimationConfig extends AnimationConfig { - velocity: number | { x: number, y: number }; - deceleration?: number; - } - - /** - * Animates a value along a timed easing curve. The `Easing` module has tons - * of pre-defined curves, or you can use your own function. - */ - export var timing: ( - value: AnimatedValue | AnimatedValueXY, - config: TimingAnimationConfig - ) => CompositeAnimation; - - interface TimingAnimationConfig extends AnimationConfig { - toValue: number | AnimatedValue | { x: number, y: number } | AnimatedValueXY; - easing?: (value: number) => number; - duration?: number; - delay?: number; - } - - interface SpringAnimationConfig extends AnimationConfig { - toValue: number | AnimatedValue | { x: number, y: number } | AnimatedValueXY; - overshootClamping?: boolean; - restDisplacementThreshold?: number; - restSpeedThreshold?: number; - velocity?: number | { x: number, y: number }; - bounciness?: number; - speed?: number; - tension?: number; - friction?: number; - } - - /** - * Creates a new Animated value composed from two Animated values added - * together. - */ - export function add( - a: Animated, - b: Animated - ): AnimatedAddition; - - class AnimatedAddition extends AnimatedInterpolation { } - - /** - * Creates a new Animated value composed from two Animated values multiplied - * together. - */ - export function multiply( - a: Animated, - b: Animated - ): AnimatedMultiplication; - - class AnimatedMultiplication extends AnimatedInterpolation { } - - /** - * Creates a new Animated value that is the (non-negative) modulo of the - * provided Animated value - */ - export function modulo( - a: Animated, - modulus: number - ): AnimatedModulo; - - class AnimatedModulo extends AnimatedInterpolation { } - - /** - * Create a new Animated value that is limited between 2 values. It uses the - * difference between the last value so even if the value is far from the bounds - * it will start changing when the value starts getting closer again. - * (`value = clamp(value + diff, min, max)`). - * - * This is useful with scroll events, for example, to show the navbar when - * scrolling up and to hide it when scrolling down. - */ - export function diffClamp(a: Animated, min: number, max: number): AnimatedDiffClamp; - - class AnimatedDiffClamp extends AnimatedInterpolation {} - - /** - * Starts an animation after the given delay. - */ - export function delay(time: number): CompositeAnimation; - - /** - * Starts an array of animations in order, waiting for each to complete - * before starting the next. If the current running animation is stopped, no - * following animations will be started. - */ - export function sequence( - animations: Array - ): CompositeAnimation; - - /** - * Array of animations may run in parallel (overlap), but are started in - * sequence with successive delays. Nice for doing trailing effects. - */ - - export function stagger( - time: number, - animations: Array - ): CompositeAnimation - - /** - * Spring animation based on Rebound and Origami. Tracks velocity state to - * create fluid motions as the `toValue` updates, and can be chained together. - */ - export function spring ( - value: AnimatedValue | AnimatedValueXY, - config: SpringAnimationConfig - ): CompositeAnimation; - - type ParallelConfig = { - stopTogether?: boolean; // If one is stopped, stop all. default: true - } - - /** - * Starts an array of animations all at the same time. By default, if one - * of the animations is stopped, they will all be stopped. You can override - * this with the `stopTogether` flag. - */ - export function parallel ( - animations: Array, - config?: ParallelConfig - ): CompositeAnimation; - - type Mapping = { [key: string]: Mapping } | AnimatedValue; - interface EventConfig { - listener?: Function - } - - /** - * Takes an array of mappings and extracts values from each arg accordingly, - * then calls `setValue` on the mapped outputs. e.g. - * - *```javascript - * onScroll={Animated.event( - * [{nativeEvent: {contentOffset: {x: this._scrollX}}}] - * {listener}, // Optional async listener - * ) - * ... - * onPanResponderMove: Animated.event([ - * null, // raw event arg ignored - * {dx: this._panX}, // gestureState arg - * ]), - *``` - */ - export function event ( - argMapping: Mapping[], - config?: EventConfig - ): (...args: any[]) => void; - - /** - * Make any React component Animatable. Used to create `Animated.View`, etc. - */ - export function createAnimatedComponent (component: any) : any; - - /** - * Animated variants of the basic native views. Accepts Animated.Value for - * props and style. - */ - export var View: any; - export var Image: any; - export var Text: any; - } - - export interface I18nManagerStatic { - isRTL: boolean - allowRTL: (allowRTL: boolean) => {} - forceRTL: (forceRTL: boolean) => {} - } - - export interface GeolocationStatic { - /* - * Invokes the success callback once with the latest location info. Supported - * options: timeout (ms), maximumAge (ms), enableHighAccuracy (bool) - * On Android, this can return almost immediately if the location is cached or - * request an update, which might take a while. - */ - getCurrentPosition(geo_success: (position: GeolocationReturnType) => void, geo_error?: (error: Error) => void, geo_options?: GetCurrentPositionOptions): void - - /* - * Invokes the success callback whenever the location changes. Supported - * options: timeout (ms), maximumAge (ms), enableHighAccuracy (bool), distanceFilter(m) - */ - watchPosition(success: (position: Geolocation) => void, error?: (error: Error) => void, options?: WatchPositionOptions): void - - clearWatch(watchID: number): void - - stopObserving(): void - } - - export interface OpenCameraDialogOptions { - /** Defaults to false */ - videoMode?: boolean - } - - export interface OpenSelectDialogOptions { - /** Defaults to true */ - showImages?: boolean - /** Defaults to false */ - showVideos?: boolean - } - - /** [imageURL|tempImageTag, height, width] */ - export type ImagePickerResult = [string, number, number] - - export interface ImagePickerIOSStatic { - canRecordVideos(callback: (value: boolean) => void): void - canUseCamera(callback: (value: boolean) => void): void - openCameraDialog(config: OpenCameraDialogOptions, successCallback: (args:ImagePickerResult) => void, cancelCallback: (args:any[]) => void): void - openSelectDialog(config: OpenSelectDialogOptions, successCallback: (args:ImagePickerResult) => void, cancelCallback: (args:any[]) => void): void - } - - export interface ImageStoreStatic { - /** - * Check if the ImageStore contains image data for the specified URI. - * @platform ios - */ - hasImageForTag(uri: string, callback: (hasImage: boolean) => void): void - /** - * Delete an image from the ImageStore. Images are stored in memory and - * must be manually removed when you are finished with them, otherwise they - * will continue to use up RAM until the app is terminated. It is safe to - * call `removeImageForTag()` without first calling `hasImageForTag()`, it - * will simply fail silently. - * @platform ios - */ - removeImageForTag(uri: string): void - /** - * Stores a base64-encoded image in the ImageStore, and returns a URI that - * can be used to access or display the image later. Images are stored in - * memory only, and must be manually deleted when you are finished with - * them by calling `removeImageForTag()`. - * - * Note that it is very inefficient to transfer large quantities of binary - * data between JS and native code, so you should avoid calling this more - * than necessary. - * @platform ios - */ - addImageFromBase64( - base64ImageData: string, - success: (uri: string) => void, - failure: (error: any) => void - ): void - /** - * Retrieves the base64-encoded data for an image in the ImageStore. If the - * specified URI does not match an image in the store, the failure callback - * will be called. - * - * Note that it is very inefficient to transfer large quantities of binary - * data between JS and native code, so you should avoid calling this more - * than necessary. To display an image in the ImageStore, you can just pass - * the URI to an `` component; there is no need to retrieve the - * base64 data. - */ - getBase64ForTag( - uri: string, - success: (base64ImageData: string) => void, - failure: (error: any) => void - ): void - } - - // Network Polyfill - // TODO: Add proper support for fetch - export type fetch = (url: string, options?: Object) => Promise - export const fetch: fetch; - - // Timers polyfill - export type timedScheduler = (fn: string | Function, time: number) => number - export type untimedScheduler = (fn: string | Function) => number - export type setTimeout = timedScheduler - export type setInterval = timedScheduler - export type setImmediate = untimedScheduler - export type requestAnimationFrame = untimedScheduler - - export type schedulerCanceller = (id: number) => void - export type clearTimeout = schedulerCanceller - export type clearInterval = schedulerCanceller - export type clearImmediate = schedulerCanceller - export type cancelAnimationFrame = schedulerCanceller - - - export interface TabsReducerStatic { - JumpToAction(index: number): any; - } - - export type TabsReducerFunction = (params: any) => any; - - export interface NavigationTab { - key: string; - } - - export interface NavigationAction { - type: string; - } - - export interface NavigationRoute { - key: string; - title?: string; - } - - export interface NavigationState extends NavigationRoute { - index: number; - routes: NavigationRoute[]; - } - - export type NavigationRenderer = ( - route: NavigationState, - onNavigate: (action: NavigationAction) => boolean - ) => JSX.Element; - - interface SubViewProps extends NavigationSceneRendererProps { - onNavigateBack?(): void; - } - - type SubViewRenderer = (subViewProps: SubViewProps) => JSX.Element | null; - - export interface NavigationHeaderProps extends NavigationSceneRendererProps { - onNavigateBack?(): void, - renderLeftComponent?: SubViewRenderer, - renderRightComponent?: SubViewRenderer, - renderTitleComponent?: SubViewRenderer, - style?: ViewStyle, - viewProps?: any, - statusBarHeight?: number | NavigationAnimatedValue - } - - export interface NavigationHeaderStatic extends React.ComponentClass { - Title: NavigationHeaderTitleStatic - HEIGHT: number - } - - export interface NavigationHeaderTitleProps { - children?: JSX.Element, - style?: ViewStyle, - textStyle?: TextStyle, - viewProps?: any - } - - export interface NavigationHeaderTitleStatic extends React.ComponentClass { - } - - export interface NavigationCardStackProps { - /** - * Custom style applied to the card. - */ - cardStyle?: ViewStyle - /** - * Custom style interpolator for the card. - */ - cardStyleInterpolator?: (props: NavigationSceneRendererProps) => ViewStyle; - /** - * Direction of the cards movement. Value could be `horizontal` or - * `vertical`. Default value is `horizontal`. - */ - direction?: 'horizontal' | 'vertical' - /** - * The distance from the edge of the card which gesture response can start - * for. Defaults value is `30`. - */ - gestureResponseDistance?: number - /** - * Enable gestures. Default value is true - */ - enableGestures?: boolean, - /** - * The controlled navigation state. Typically, the navigation state - * look like this: - * - * ```js - * const navigationState = { - * index: 0, // the index of the selected route. - * routes: [ // A list of routes. - * {key: 'page 1'}, // The 1st route. - * {key: 'page 2'}, // The second route. - * ], - * }; - * ``` - */ - navigationState: NavigationState, - /** - * Callback that is called when the "back" action is performed. - * This happens when the back button is pressed or the back gesture is - * performed. - */ - onNavigateBack?: Function, - /** - * Function that renders the header. - */ - renderHeader?: NavigationSceneRenderer, - /** - * Function that renders the a scene for a route. - */ - renderScene: NavigationSceneRenderer, - /** - * Custom style applied to the cards stack. - */ - style?: ViewStyle, - } - - // Object Instances - - export type NavigationAnimatedValue = Animated.Value; - - // Value & Structs. - - export type NavigationGestureDirection = 'horizontal' | 'vertical'; - - export type NavigationLayout = { - height: NavigationAnimatedValue, - initHeight: number, - initWidth: number, - isMeasured: boolean, - width: NavigationAnimatedValue, - }; - - export type NavigationScene = { - index: number, - isActive: boolean, - isStale: boolean, - key: string, - route: NavigationRoute, - }; - - // Similar to `NavigationTransitionProps`, except that the prop `scene` - // represents the scene for the renderer to render. - export interface NavigationSceneRendererProps { - layout: NavigationLayout, - navigationState: NavigationState, - position: NavigationAnimatedValue, - progress: NavigationAnimatedValue, - scenes: Array, - scene: NavigationScene, - gestureResponseDistance?: number, - } - - export interface NavigationSceneRenderer extends React.StatelessComponent { - } - - export interface NavigationPropTypes { - // helpers - extractSceneRendererProps(props: NavigationSceneRendererProps): NavigationSceneRendererProps - - // Bundled propTypes. - SceneRendererProps: { - layout: string, - navigationState: string, - position: string, - progress: string, - scene: string, - scenes: NavigationScene[], - } - - // propTypes - SceneRenderer: any, // TODO: fix this - action: NavigationAction, - navigationState: NavigationState, - navigationRoute: NavigationRoute, - panHandlers: GestureResponderHandlers, - } - - export interface NavigationCardProps extends React.ComponentClass { - onComponentRef: (ref: any) => void, - onNavigateBack?: Function, - panHandlers?: GestureResponderHandlers, - pointerEvents: string, - renderScene: NavigationSceneRenderer, - style?: ViewStyle, - } - - export interface NavigationCardStackStatic extends React.ComponentClass { - } - - export interface NavigationCardStatic extends React.ComponentClass { - } - - /** - * Utilities to perform atomic operation with navigate state and routes. - * - * ```javascript - * const state1 = {key: 'page 1'}; - * const state2 = NavigationStateUtils.push(state1, {key: 'page 2'}); - * ``` - */ - export interface NavigationStateUtils { - get(state: NavigationState, key: string): NavigationRoute - indexOf(state: NavigationState, key: string): number - has(state: NavigationState, key: string): boolean - push(state: NavigationState, route: NavigationRoute): NavigationState - pop(state: NavigationState): NavigationState - jumpToIndex(state: NavigationState, index: number): NavigationState - jumpTo(state: NavigationState, key: string): NavigationState - back(state: NavigationState): NavigationState - forward(state: NavigationState): NavigationState - replaceAt( - state: NavigationState, - key: string, - route: NavigationRoute - ): NavigationState - replaceAtIndex( - state: NavigationState, - index: number, - route: NavigationRoute - ): NavigationState - reset( - state: NavigationState, - routes: Array, - index?: number - ): NavigationState - } - - export type NavigationTransitionProps = { - // The layout of the transitioner of the scenes. - layout: NavigationLayout, - - // The navigation state of the transitioner. - navigationState: NavigationState, - - // The progressive index of the transitioner's navigation state. - position: NavigationAnimatedValue, - - // The value that represents the progress of the transition when navigation - // state changes from one to another. Its numberic value will range from 0 - // to 1. - // progress.__getAnimatedValue() < 1 : transtion is happening. - // progress.__getAnimatedValue() == 1 : transtion completes. - progress: NavigationAnimatedValue, - - // All the scenes of the transitioner. - scenes: Array, - - // The active scene, corresponding to the route at - // `navigationState.routes[navigationState.index]`. - scene: NavigationScene, - - // The gesture distance for `horizontal` and `vertical` transitions - gestureResponseDistance?: number, - } - export type NavigationTransitionSpec = { - duration?: number, - // An easing function from `Easing`. - easing?: EasingFunction, - // A timing function such as `Animated.timing`. - timing?: (value: NavigationAnimatedValue, config: any) => any, - } - export interface NavigationTransitionerProps { - configureTransition?: ( - a: NavigationTransitionProps, - b?: NavigationTransitionProps - ) => NavigationTransitionSpec, - navigationState: NavigationState, - onTransitionEnd?: () => void, - onTransitionStart?: () => void, - render: (a: NavigationTransitionProps, b?: NavigationTransitionProps) => any, - style: any, - } - - export interface NavigationTransitioner extends React.ComponentClass { - } - - export interface NavigationCard extends React.ComponentClass { - } - - export interface NavigationExperimentalStatic { - // Core - StateUtils: NavigationStateUtils - - // Views - Transitioner: NavigationTransitioner, - - //AnimatedView: NavigationAnimatedViewStatic; - // CustomComponents: - Card: NavigationCard, - CardStack: NavigationCardStackStatic; - Header: NavigationHeaderStatic; - - PropTypes: NavigationPropTypes, - } - - // - // Interfacing with Native Modules - // https://facebook.github.io/react-native/docs/native-modules-ios.html - // - - export interface NativeEventSubscription { - /** - * Call this method to un-subscribe from a native-event - */ - remove(): void; - } - - /** - * Receive events from native-code - * Deprecated - subclass NativeEventEmitter to create granular event modules instead of - * adding all event listeners directly to RCTNativeAppEventEmitter. - * @see https://github.com/facebook/react-native/blob/0.34-stable\Libraries\EventEmitter\RCTNativeAppEventEmitter.js - * @see https://facebook.github.io/react-native/docs/native-modules-ios.html#sending-events-to-javascript - */ - type RCTNativeAppEventEmitter = DeviceEventEmitterStatic - - interface ImageCropData { - /** - * The top-left corner of the cropped image, specified in the original - * image's coordinate space. - */ - offset: { - x: number; - y: number; - } - - /** - * The size (dimensions) of the cropped image, specified in the original - * image's coordinate space. - */ - size: { - width: number; - height: number; - } - - /** - * (Optional) size to scale the cropped image to. - */ - displaySize?: { width: number, height: number } - - /** - * (Optional) the resizing mode to use when scaling the image. If the - * `displaySize` param is not specified, this has no effect. - */ - resizeMode?: 'contain' | 'cover' | 'stretch' - } - - interface ImageEditorStatic { - /** - * Crop the image specified by the URI param. If URI points to a remote - * image, it will be downloaded automatically. If the image cannot be - * loaded/downloaded, the failure callback will be called. - * - * If the cropping process is successful, the resultant cropped image - * will be stored in the ImageStore, and the URI returned in the success - * callback will point to the image in the store. Remember to delete the - * cropped image from the ImageStore when you are done with it. - */ - cropImage( uri: string, cropData: ImageCropData, success: (uri: string) => void, failure: (error: Object) => void ): void - } - - export interface ARTShapeProps { - d: string, - strokeWidth: number, - strokeDash?: number[], - stroke: string - } - - export interface ARTSurfaceProps { - style: ViewStyle, - width: number, - height: number - } - - export interface ShapeStatic extends React.ComponentClass { - } - - export interface SurfaceStatic extends React.ComponentClass { - } - - export interface ARTStatic { - Shape: ShapeStatic, - Surface: SurfaceStatic - } - - export interface KeyboardStatic extends NativeEventEmitter { - dismiss: ()=>void - } - - ////////////////////////////////////////////////////////////////////////// - // - // R E - E X P O R T S - // - ////////////////////////////////////////////////////////////////////////// - - // TODO: The following components need to be added - // - [ ] ART - export var ART: ARTStatic - export type ART = ARTStatic - - export var ActivityIndicator: ActivityIndicatorStatic - export type ActivityIndicator = ActivityIndicatorStatic - - export var ActivityIndicatorIOS: ActivityIndicatorIOSStatic - export type ActivityIndicatorIOS = ActivityIndicatorIOSStatic - - export var DatePickerIOS: DatePickerIOSStatic - export type DatePickerIOS = DatePickerIOSStatic - - export var DrawerLayoutAndroid: DrawerLayoutAndroidStatic - export type DrawerLayoutAndroid = DrawerLayoutAndroidStatic - - export var Image: ImageStatic - export type Image = ImageStatic - - export var ImagePickerIOS: ImagePickerIOSStatic - export type ImagePickerIOS = ImagePickerIOSStatic - - export var LayoutAnimation: LayoutAnimationStatic - export type LayoutAnimation = LayoutAnimationStatic - - export var ListView: ListViewStatic - export type ListView = ListViewStatic - - export var MapView: MapViewStatic - export type MapView = MapViewStatic - - export var Modal: ModalStatic - export type Modal = ModalStatic - - export var Navigator: NavigatorStatic - export type Navigator = NavigatorStatic - - export var NavigatorIOS: NavigatorIOSStatic - export type NavigatorIOS = NavigatorIOSStatic - - export var Picker: PickerStatic - export type Picker = PickerStatic - - export var PickerIOS: PickerIOSStatic - export type PickerIOS = PickerIOSStatic - - export var ProgressBarAndroid: ProgressBarAndroidStatic - export type ProgressBarAndroid = ProgressBarAndroidStatic - - export var ProgressViewIOS: ProgressViewIOSStatic - export type ProgressViewIOS = ProgressViewIOSStatic - - export var RefreshControl: RefreshControlStatic - export type RefreshControl = RefreshControlStatic - - export var RecyclerViewBackedScrollView: RecyclerViewBackedScrollViewStatic - export type RecyclerViewBackedScrollView = RecyclerViewBackedScrollViewStatic - - export var SegmentedControlIOS: SegmentedControlIOSStatic - export type SegmentedControlIOS = SegmentedControlIOSStatic - - export var Slider: SliderStatic - export type Slider = SliderStatic - - export var SliderIOS: SliderStatic - export type SliderIOS = SliderStatic - - export var StatusBar: StatusBarStatic - export type StatusBar = StatusBarStatic - - export var ScrollView: ScrollViewStatic - export type ScrollView = ScrollViewStatic - - export var SnapshotViewIOS: SnapshotViewIOSStatic - export type SnapshotViewIOS = SnapshotViewIOSStatic - - export var Systrace: SystraceStatic - export type Systrace = SystraceStatic - - export var SwipeableListView: SwipeableListViewStatic - export type SwipeableListView = SwipeableListViewStatic - - export var Switch: SwitchStatic - export type Switch = SwitchStatic - - export var SwitchIOS: SwitchIOSStatic - export type SwitchIOS = SwitchIOSStatic - - export var TabBarIOS: TabBarIOSStatic - export type TabBarIOS = TabBarIOSStatic - - export var Text: TextStatic - export type Text = TextStatic - - export var TextInput: TextInputStatic - export type TextInput = TextInputStatic - - export var ToolbarAndroid: ToolbarAndroidStatic - export type ToolbarAndroid = ToolbarAndroidStatic - - export var TouchableHighlight: TouchableHighlightStatic - export type TouchableHighlight = TouchableHighlightStatic - - export var TouchableNativeFeedback: TouchableNativeFeedbackStatic - export type TouchableNativeFeedback = TouchableNativeFeedbackStatic - - export var TouchableOpacity: TouchableOpacityStatic - export type TouchableOpacity = TouchableOpacityStatic - - export var TouchableWithoutFeedback: TouchableWithoutFeedbackStatic - export type TouchableWithoutFeedback = TouchableWithoutFeedbackStatic - - export var View: ViewStatic - export type View = ViewStatic - - export var ViewPagerAndroid: ViewPagerAndroidStatic - export type ViewPagerAndroid = ViewPagerAndroidStatic - - export var WebView: WebViewStatic - export type WebView = WebViewStatic - - - //////////// APIS ////////////// - export var ActionSheetIOS: ActionSheetIOSStatic - export type ActionSheetIOS = ActionSheetIOSStatic - - export var Share: ShareStatic - export type Share = ShareStatic - - export var AdSupportIOS: AdSupportIOSStatic - export type AdSupportIOS = AdSupportIOSStatic - - export var Alert: AlertStatic - export type Alert = AlertStatic - - export var AlertAndroid: AlertAndroidStatic - export type AlertAndroid = AlertAndroidStatic - - export var AlertIOS: AlertIOSStatic - export type AlertIOS = AlertIOSStatic - - export var AppState: AppStateStatic; - export type AppState = AppStateStatic; - - export var AppStateIOS: AppStateStatic - export type AppStateIOS = AppStateStatic - - export var AsyncStorage: AsyncStorageStatic - export type AsyncStorage = AsyncStorageStatic - - export var BackAndroid: BackAndroidStatic - export type BackAndroid = BackAndroidStatic - - export var Button: ButtonStatic - export type Button = ButtonStatic - - export var CameraRoll: CameraRollStatic - export type CameraRoll = CameraRollStatic - - export var Clipboard: ClipboardStatic - export type Clipboard = ClipboardStatic - - export var DatePickerAndroid: DatePickerAndroidStatic - export type DatePickerAndroid = DatePickerAndroidStatic - - export var Geolocation: GeolocationStatic - export type Geolocation = GeolocationStatic - - /** http://facebook.github.io/react-native/blog/2016/08/19/right-to-left-support-for-react-native-apps.html */ - export var I18nManager: I18nManagerStatic - export type I18nManager = I18nManagerStatic - - export var ImageEditor: ImageEditorStatic - export type ImageEditor = ImageEditorStatic - - export var ImageStore: ImageStoreStatic - export type ImageStore = ImageStoreStatic - - export var InteractionManager: InteractionManagerStatic - - export var IntentAndroid: IntentAndroidStatic - export type IntentAndroid = IntentAndroidStatic - - export var Keyboard: KeyboardStatic - - export var KeyboardAvoidingView: KeyboardAvoidingViewStatic - export type KeyboardAvoidingView = KeyboardAvoidingViewStatic - - export var Linking: LinkingStatic - export type Linking = LinkingStatic - - export var LinkingIOS: LinkingIOSStatic - export type LinkingIOS = LinkingIOSStatic - - export var NativeMethodsMixin: NativeMethodsMixinStatic - export type NativeMethodsMixin = NativeMethodsMixinStatic - - export var NativeComponent: NativeMethodsMixinStatic - export type NativeComponent = NativeMethodsMixinStatic - - export var NetInfo: NetInfoStatic - export type NetInfo = NetInfoStatic - - export var PanResponder: PanResponderStatic - export type PanResponder = PanResponderStatic - - export var PermissionsAndroid: PermissionsAndroidStatic - export type PermissionsAndroid = PermissionsAndroidStatic - - export var PushNotificationIOS: PushNotificationIOSStatic - export type PushNotificationIOS = PushNotificationIOSStatic - - export var Settings: SettingsStatic - export type Settings = SettingsStatic - - export var StatusBarIOS: StatusBarIOSStatic - export type StatusBarIOS = StatusBarIOSStatic - - export var TimePickerAndroid: TimePickerAndroidStatic - export type TimePickerAndroid = TimePickerAndroidStatic - - export var ToastAndroid: ToastAndroidStatic - export type ToastAndroid = ToastAndroidStatic - - export var UIManager: UIManagerStatic - export type UIManager = UIManagerStatic - - export var VibrationIOS: VibrationIOSStatic - export type VibrationIOS = VibrationIOSStatic - - export var Vibration: VibrationStatic - export type Vibration = VibrationStatic - - export var Dimensions: Dimensions; - export var ShadowPropTypesIOS: ShadowPropTypesIOSStatic; - - export type NavigationExperimental = NavigationExperimentalStatic; - export var NavigationExperimental: NavigationExperimentalStatic; - - export type Easing = EasingStatic; - export var Easing: EasingStatic; - - //////////// Plugins ////////////// - - export var DeviceEventEmitter: DeviceEventEmitterStatic - /** - * Abstract base class for implementing event-emitting modules. This implements - * a subset of the standard EventEmitter node module API. - */ - export interface NativeEventEmitter extends EventEmitter {} - export var NativeEventEmitter: NativeEventEmitter - /** - * Deprecated - subclass NativeEventEmitter to create granular event modules instead of - * adding all event listeners directly to RCTNativeAppEventEmitter. - */ - export var NativeAppEventEmitter: RCTNativeAppEventEmitter - /** - * Native Modules written in ObjectiveC/Swift/Java exposed via the RCTBridge - * Define lazy getters for each module. These will return the module if already loaded, or load it if not. - * See https://facebook.github.io/react-native/docs/native-modules-ios.html - * Use: - * const MyModule = NativeModules.ModuleName - */ - export var NativeModules: any - export var Platform: PlatformStatic - export var PixelRatio: PixelRatioStatic - - export interface ComponentInterface

{ - name?: string; - displayName?: string; - propTypes: P - } - - /** - * Used to create React components that directly wrap native component - * implementations. Config information is extracted from data exported from the - * UIManager module. You should also wrap the native component in a - * hand-written component with full propTypes definitions and other - * documentation - pass the hand-written component in as `componentInterface` to - * verify all the native props are documented via `propTypes`. - * - * If some native props shouldn't be exposed in the wrapper interface, you can - * pass null for `componentInterface` and call `verifyPropTypes` directly - * with `nativePropsToIgnore`; - * - * Common types are lined up with the appropriate prop differs with - * `TypeToDifferMap`. Non-scalar types not in the map default to `deepDiffer`. - */ - export function requireNativeComponent

( - viewName: string, - componentInterface?: ComponentInterface

, - extraConfig?: {nativeOnly?: any} - ): React.ComponentClass

; - - export function processColor(color: any): number; - - ////////////////////////////////////////////////////////////////////////// - // - // Additional ( and controversial) - // - ////////////////////////////////////////////////////////////////////////// - - export function __spread(target: any, ...sources: any[]): any; - - export interface GlobalStatic { - - /** - * Accepts a function as its only argument and calls that function before the next repaint. - * It is an essential building block for animations that underlies all of the JavaScript-based animation APIs. - * In general, you shouldn't need to call this yourself - the animation API's will manage frame updates for you. - * @see https://facebook.github.io/react-native/docs/animations.html#requestanimationframe - */ - requestAnimationFrame(fn: () => void): void; - - } - - // - // Add-Ons - // - namespace addons { - - //FIXME: Documentation ? - export interface TestModuleStatic { - - verifySnapshot: (done: (indicator?: any) => void) => void - markTestPassed: (indicator: any) => void - markTestCompleted: () => void - } - - export var TestModule: TestModuleStatic - export type TestModule = TestModuleStatic - } - - // - // Prop Types - // - export var ColorPropType: Requireable - export var EdgeInsetsPropType: Requireable - export var PointPropType: Requireable -} - -declare global { - const global: React.GlobalStatic; - function require(name: string): any; - - /** - * This variable is set to true when react-native is running in Dev mode - * Typical usage: - * if (__DEV__) console.log('Running in dev mode') - */ - var __DEV__: boolean -} diff --git a/react-paginate/react-paginate-tests.tsx b/react-paginate/react-paginate-tests.tsx deleted file mode 100644 index 42a7c49c30..0000000000 --- a/react-paginate/react-paginate-tests.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import * as React from "react"; -import ReactPaginate = require("react-paginate"); - -class Test extends React.Component<{}, {}> { - public render() { - return ( - - ); - } -} diff --git a/redux-logger/index.d.ts b/redux-logger/index.d.ts deleted file mode 100644 index 257f070d44..0000000000 --- a/redux-logger/index.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Type definitions for redux-logger v2.6.0 -// Project: https://github.com/fcomb/redux-logger -// Definitions by: Alexander Rusakov -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -import * as Redux from "redux"; - -// Trickery to get TypeScript to accept that our anonymous, non-default export is a function. -// see https://github.com/Microsoft/TypeScript/issues/3612 for more -declare namespace createLogger { - export type LoggerPredicate = (getState: () => any, action: any) => boolean; - - export type StateToString = (state: any) => string; - export type ActionToString = (action: any) => string; - export type ErrorToString = (error: any, prevState: any) => string; - - export interface ColorsObject { - title?: boolean | ActionToString; - prevState?: boolean | StateToString; - action?: boolean | ActionToString; - nextState?: boolean | StateToString; - error?: boolean | ErrorToString; - } - - export interface LevelObject { - prevState?: string | boolean | StateToString; - action?: string | boolean | ActionToString; - nextState?: string | boolean | StateToString; - error?: string | boolean | ErrorToString; - } - - export interface ReduxLoggerOptions { - level?: string | ActionToString | LevelObject; - duration?: boolean; - timestamp?: boolean; - colors?: ColorsObject; - logger?: any; - logErrors?: boolean; - collapsed?: boolean | LoggerPredicate; - predicate?: LoggerPredicate; - stateTransformer?: (state: any) => any; - actionTransformer?: (action: any) => any; - errorTransformer?: (error: any) => any; - diff?: boolean; - diffPredicate?: LoggerPredicate; - } -} -declare function createLogger(options?: createLogger.ReduxLoggerOptions): Redux.Middleware; -export = createLogger; diff --git a/redux-persist-transform-compress/index.d.ts b/redux-persist-transform-compress/index.d.ts deleted file mode 100644 index 2f8fb7f366..0000000000 --- a/redux-persist-transform-compress/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -// Type definitions for redux-persist-transform-compress 4.1 -// Project: https://github.com/rt2zz/redux-persist-transform-compress -// Definitions by: Karol Janyst -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -import { PersistConfig, PersistTransformer } from "redux-persist"; - -export = createCompressor; -declare function createCompressor (config?: PersistConfig): PersistTransformer; diff --git a/redux-persist-transform-compress/redux-persist-transform-compress-tests.ts b/redux-persist-transform-compress/redux-persist-transform-compress-tests.ts deleted file mode 100644 index b445171cb9..0000000000 --- a/redux-persist-transform-compress/redux-persist-transform-compress-tests.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { createStore, Reducer, Store } from "redux" -import { createPersistor, Persistor, PersistTransformer } from "redux-persist" -import createCompressor = require("redux-persist-transform-compress") - -const reducer: Reducer = (state: any, action: any) => ({}) - -const compressor: PersistTransformer = createCompressor({ whitelist : ["foo"] }) - -const store: Store = createStore(reducer) - -const persistor: Persistor = createPersistor(store, { transforms : [compressor] }) diff --git a/redux-persist-transform-encrypt/index.d.ts b/redux-persist-transform-encrypt/index.d.ts deleted file mode 100644 index 048f02221f..0000000000 --- a/redux-persist-transform-encrypt/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -// Type definitions for redux-persist-transform-encrypt 0.1 -// Project: https://github.com/maxdeviant/redux-persist-transform-encrypt#readme -// Definitions by: Karol Janyst -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -import { PersistTransformer } from "redux-persist"; - -export as namespace ReduxPersistEncryptor; - -export = createEncryptor; - -declare function createEncryptor (config: createEncryptor.EncryptorConfig): PersistTransformer; - -declare namespace createEncryptor { - export interface EncryptorConfig { - secretKey: string; - } -} diff --git a/redux-persist-transform-encrypt/redux-persist-transform-encrypt-tests.ts b/redux-persist-transform-encrypt/redux-persist-transform-encrypt-tests.ts deleted file mode 100644 index b3a70dc776..0000000000 --- a/redux-persist-transform-encrypt/redux-persist-transform-encrypt-tests.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { createStore, Reducer, Store } from "redux" -import { createPersistor, Persistor, PersistTransformer } from "redux-persist" -import { EncryptorConfig } from "redux-persist-transform-encrypt" -import * as createEncryptor from "redux-persist-transform-encrypt" - -const reducer: Reducer = (state: any, action: any) => ({}) - -const config: EncryptorConfig = { secretKey : "foo" } -const encryptor: PersistTransformer = createEncryptor(config) - -const store: Store = createStore(reducer) - -const persistor: Persistor = createPersistor(store, { transforms : [encryptor] }) diff --git a/redux-persist-transform-filter/redux-persist-transform-filter-tests.ts b/redux-persist-transform-filter/redux-persist-transform-filter-tests.ts deleted file mode 100644 index a19f7610e4..0000000000 --- a/redux-persist-transform-filter/redux-persist-transform-filter-tests.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { createStore, Reducer, Store } from "redux" -import { createPersistor, Persistor, PersistTransformer } from "redux-persist" -import createFilter from "redux-persist-transform-filter" - -const reducer: Reducer = (state: any, action: any) => ({}) - -const filter: PersistTransformer = createFilter( - "foo", - ["foo.bar"], - ["fizz.buzz"] -) - -const store: Store = createStore(reducer) - -const persistor: Persistor = createPersistor(store, { transforms : [filter] }) diff --git a/redux-persist/constants.d.ts b/redux-persist/constants.d.ts deleted file mode 100644 index 93d3249dda..0000000000 --- a/redux-persist/constants.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const KEY_PREFIX: string; -export const REHYDRATE: string; diff --git a/redux-persist/index.d.ts b/redux-persist/index.d.ts deleted file mode 100644 index c8d099d5e6..0000000000 --- a/redux-persist/index.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -// Type definitions for redux-persist 4.0 -// Project: https://github.com/rt2zz/redux-persist -// Definitions by: Karol Janyst -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -import { Action, GenericStoreEnhancer, Store } from "redux"; - -export interface PersistAction extends Action { - payload?: S; - error?: any; -} - -export interface PersistorRehydrateOptions { - serial?: boolean; -} - -export interface Persistor { - purge(keys?: string[]): void; - rehydrate(incoming: A, options?: PersistorRehydrateOptions): A; - pause(): void; - resume(): void; -} - -export type PersistCallback = (err: any, response?: A) => void; - -export interface PersistTransformer { - in(state: any, key: string): any; - out(state: any, key: string): any; -} - -export interface PersistStorage { - setItem(key: string, value: any, callback?: PersistCallback): Promise; - getItem(key: string, callback?: PersistCallback): Promise; - removeItem(key: string, callback?: PersistCallback): Promise; - getAllKeys(callback?: PersistCallback): Promise; - [key: string]: any; -} - -export type PersistStateReconciler = (state: A, inboundState: B, reducedState: C, log?: boolean) => C; - -export interface PersistAutoRehydrateConfig { - stateReconcile?: PersistStateReconciler; -} - -export interface PersistConfig { - whitelist?: string[]; - blacklist?: string[]; - transforms?: PersistTransformer[]; - storage?: PersistStorage; - debounce?: number; - keyPrefix?: string; - serialize?: (data: any) => string; - deserialize?: (data: string) => any; -} - -export function autoRehydrate (config?: PersistAutoRehydrateConfig): GenericStoreEnhancer; - -export function createPersistor (store: Store, config?: PersistConfig): Persistor; - -export function createTransform (inbound: any, outbound: any, config?: PersistConfig): PersistTransformer; - -export function getStoredState(config?: PersistConfig, callback?: PersistCallback): Promise; - -export function persistStore (store: Store, config?: PersistConfig, callback?: PersistCallback): Persistor; - -export function purgeStoredState (config?: PersistConfig, keys?: string[]): Promise; diff --git a/redux-persist/package.json b/redux-persist/package.json deleted file mode 100644 index 36ce503807..0000000000 --- a/redux-persist/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "redux": "^3.6.0" - } -} diff --git a/redux-persist/redux-persist-tests.ts b/redux-persist/redux-persist-tests.ts deleted file mode 100644 index 59885a292a..0000000000 --- a/redux-persist/redux-persist-tests.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { createStore, Store, Reducer } from "redux" -import { - autoRehydrate, - createPersistor, - createTransform, - getStoredState, - persistStore, - purgeStoredState, - PersistConfig, - PersistAutoRehydrateConfig, - PersistCallback, - Persistor, - PersistorRehydrateOptions, - PersistTransformer -} from "redux-persist" -import { KEY_PREFIX, REHYDRATE } from "redux-persist/constants" -import { asyncLocalStorage, asyncSessionStorage } from "redux-persist/storages" - -const reducer: Reducer = (state: any, action: any) => ({}) - -const persistCallback: PersistCallback = (err: any, response: any) => {} - -const transform: PersistTransformer = createTransform({}, {}, { whitelist : ["foo"] }) - -const persistConfig: PersistConfig = { - blacklist : ["foo"], - whitelist : ["bar"], - storage : asyncLocalStorage, - transforms : [transform], - debounce : 1000, - keyPrefix : KEY_PREFIX -} - -const rehydrateOptions: PersistorRehydrateOptions = { serial : true } - -const autoRehydrateConfig: PersistAutoRehydrateConfig = { - stateReconcile: (state: any, inboundState: any, reducedState: any, log: boolean) => ({}) -} - -const store: Store = createStore(reducer, autoRehydrate(autoRehydrateConfig)) -const persistor: Persistor = persistStore(store, persistConfig, persistCallback) - -purgeStoredState({ whitelist : ["foo"] }, ["bar"]) - -getStoredState(persistConfig, (err: any, restoredState: any) => { - const store: Store = createStore(reducer, restoredState) - const persistor: Persistor = createPersistor(store, persistConfig) - const secondaryPersistor: Persistor = createPersistor(store, { storage : asyncSessionStorage }) - persistor.pause() - persistor.resume() - persistor.purge(["foo", "bar"]) - persistor.rehydrate(restoredState, rehydrateOptions) -}) diff --git a/redux-persist/storages.d.ts b/redux-persist/storages.d.ts deleted file mode 100644 index b798ed2664..0000000000 --- a/redux-persist/storages.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { PersistStorage } from "redux-persist"; - -export const asyncLocalStorage: PersistStorage; -export const asyncSessionStorage: PersistStorage; diff --git a/redux-persist/tsconfig.json b/redux-persist/tsconfig.json deleted file mode 100644 index 53bbe4f198..0000000000 --- a/redux-persist/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "constants.d.ts", - "storages.d.ts", - "redux-persist-tests.ts" - ] -} \ No newline at end of file diff --git a/redux-promise-middleware/package.json b/redux-promise-middleware/package.json deleted file mode 100644 index 36ce503807..0000000000 --- a/redux-promise-middleware/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "redux": "^3.6.0" - } -} diff --git a/redux-router/package.json b/redux-router/package.json deleted file mode 100644 index 36ce503807..0000000000 --- a/redux-router/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "redux": "^3.6.0" - } -} diff --git a/scripts/fix-tslint.ts b/scripts/fix-tslint.ts index 940257e945..a54f4c7386 100644 --- a/scripts/fix-tslint.ts +++ b/scripts/fix-tslint.ts @@ -2,16 +2,11 @@ /// -import assert = require("assert"); -import * as fs from 'fs'; -import * as path from 'path'; +import * as fs from "fs"; +import * as path from "path"; import JSON = require("comment-json"); -function repeat(s: string, count: number) { - return Array(count + 1).join(s); -} - -const home = path.join(__dirname, '..'); +const home = path.join(__dirname, "..", "types"); for (const dirName of fs.readdirSync(home)) { if (dirName.startsWith(".") || dirName === "node_modules" || dirName === "scripts") { diff --git a/scripts/lint.js b/scripts/lint.js index 4d47ce3406..84ef71259d 100644 --- a/scripts/lint.js +++ b/scripts/lint.js @@ -4,9 +4,11 @@ const execSync = require("child_process").execSync; const existsSync = require("fs").existsSync; const path = require("path"); +const pkgPath = path.join("types", pkg); + // Path of tslint when `types-publisher` is symlinked -const symlinkedTslintPath = "../node_modules/types-publisher/node_modules/tslint" -let tslintPath = existsSync(path.join(pkg, symlinkedTslintPath)) ? symlinkedTslintPath : "../node_modules/tslint"; +const symlinkedTslintPath = "../../node_modules/types-publisher/node_modules/tslint" +let tslintPath = existsSync(path.join(pkgPath, symlinkedTslintPath)) ? symlinkedTslintPath : "../node_modules/tslint"; // An older version (e.g. abs/v0) is in a nested directory, so needs to look one more level up for tslint. if (pkg.includes("/") && pkg[pkg.length - 1] !== "/") { tslintPath = path.join("..", tslintPath); @@ -17,7 +19,7 @@ console.log(cmd); try { // Child process writes directly to our own stdout - execSync(cmd, { cwd: pkg, stdio: "inherit" }); + execSync(cmd, { cwd: pkgPath, stdio: "inherit" }); } catch (_) { // Process should have printed out error info } diff --git a/scripts/not-needed.js b/scripts/not-needed.js index f5b5cc8e6a..e17b3ac6ce 100644 --- a/scripts/not-needed.js +++ b/scripts/not-needed.js @@ -13,9 +13,10 @@ if (process.argv.length !== 5 && process.argv.length !== 6) { process.exit(1); } -rmdirRecursive(typingsPackageName); +rmdirRecursive(path.join("types", typingsPackageName)); const notNeededPackages = JSON.parse(fs.readFileSync("notNeededPackages.json", "utf-8")); notNeededPackages.packages.push({ libraryName, typingsPackageName, sourceRepoURL, asOfVersion }); +notNeededPackages.packages.sort((x, y) => x.typingsPackageName < y.typingsPackageName ? -1 : 1); fs.writeFileSync("notNeededPackages.json", JSON.stringify(notNeededPackages, undefined, 4), "utf-8"); function rmdirRecursive(dir) { diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json index f0f0258c77..899f96af64 100644 --- a/scripts/tsconfig.json +++ b/scripts/tsconfig.json @@ -4,9 +4,13 @@ "target": "es6", "noImplicitAny": true, "strictNullChecks": true, - "baseUrl": "../", + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "baseUrl": "../types", "typeRoots": [ - "../" + "../types" ], "types": [], "forceConsistentCasingInFileNames": true diff --git a/toastr/index.d.ts b/toastr/index.d.ts deleted file mode 100644 index 5cd8b30c82..0000000000 --- a/toastr/index.d.ts +++ /dev/null @@ -1,226 +0,0 @@ -// Type definitions for Toastr 2.1.3 -// Project: https://github.com/CodeSeven/toastr -// Definitions by: Boris Yankov -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - -/// - -interface ToastrOptions { - /** - * Optionally override the animation easing to show or hide the toasts. Default is swing. swing and linear are built into jQuery. - */ - showEasing?: string; - /** - * Optionally override the animation easing to show or hide the toasts. Default is swing. swing and linear are built into jQuery. - */ - hideEasing?: string; - /** - * Use the jQuery show/hide method of your choice. These default to fadeIn/fadeOut. The methods fadeIn/fadeOut, slideDown/slideUp, and show/hide are built into jQuery. - */ - showMethod?: string; - /** - * Use the jQuery show/hide method of your choice. These default to fadeIn/fadeOut. The methods fadeIn/fadeOut, slideDown/slideUp, and show/hide are built into jQuery. - */ - hideMethod?: string; - /** - * Should a close button be shown - */ - closeButton?: boolean; - /** - * Html for the close button - */ - closeHtml?: string; - /** - * Should clicking on toast dismiss it? - */ - tapToDismiss?: boolean; - /** - * CSS class the toast element will be given - */ - toastClass?: string; - /** - * Id toast container will be given - */ - containerId?: string; - /** - * Should debug details be outputted to the console - */ - debug?: boolean; - /** - * Time in milliseconds the toast should take to show - */ - showDuration?: number; - /** - * onShown function callback - **/ - onShown?: () => void; - /** - * Time in milliseconds the toast should take to hide - */ - hideDuration?: number; - /** - * onHidden function callback - **/ - onHidden?: () => void; - /** - * Time in milliseconds the toast should be displayed after mouse over - */ - extendedTimeOut?: number; - iconClasses?: { - /** - * Icon to use on error toasts - */ - error: string; - /** - * Icon to use on info toasts - */ - info: string; - /** - * Icon to use on success toasts - */ - success: string; - /** - * Icon to use on warning toasts - */ - warning: string; - }; - /** - * Icon to use for toast - */ - iconClass?: string; - /** - * Where toast should be displayed - */ - positionClass?: string; - /** - * Where toast should be displayed - background - */ - backgroundpositionClass?: string; - /** - * Time in milliseconds that the toast should be displayed - */ - timeOut?: number; - /** - * CSS class the title element will be given - */ - titleClass?: string; - /** - * CSS class the message element will be given - */ - messageClass?: string; - /** - * Set newest toast to appear on top - **/ - newestOnTop?: boolean; - /** - * The element to put the toastr container - **/ - target?: string; - /** - * Rather than having identical toasts stack, set the preventDuplicates property to true. Duplicates are matched to the previous toast based on their message content. - */ - preventDuplicates?: boolean; - /** - * Visually indicates how long before a toast expires. - */ - progressBar?: boolean; - /** - * Function to execute on toast click - */ - onclick?: () => void; - /** - * Set if toastr should parse containing html - **/ - allowHtml?: boolean; - /** - * Set if toastr should escape html - **/ - escapeHtml?: boolean; -} - -interface ToastrDisplayMethod { - /** - * Create a toast - * - * @param message Message to display in toast - */ - (message: string): JQuery; - /** - * Create a toast - * - * @param message Message to display in toast - * @param title Title to display on toast - */ - (message: string, title: string): JQuery; - /** - * Create a toast - * - * @param message Message to display in toast - * @param title Title to display on toast - * @param overrides Option values for toast - */ - (message: string, title: string, overrides: ToastrOptions): JQuery; -} - -interface Toastr { - /** - * Clear toasts - */ - clear: { - /** - * Clear all toasts - */ - (): void; - /** - * Clear specific toast - * - * @param toast Toast to clear - */ - (toast: JQuery): void; - /** - * Clear specific toast - * - * @param toast Toast to clear - * @param clearOptions force clearing a toast, ignoring focus - */ - (toast: JQuery, clearOptions: { force: boolean }): void; - }; - /** - * Removes all toasts (without animation) - */ - remove: { - (): void; - }; - /** - * Create an error toast - */ - error: ToastrDisplayMethod; - /** - * Create an info toast - */ - info: ToastrDisplayMethod; - /** - * Create an options object - */ - options: ToastrOptions; - /** - * Create a success toast - */ - success: ToastrDisplayMethod; - /** - * Create a warning toast - */ - warning: ToastrDisplayMethod; - /** - * Get toastr version - */ - version: string; - - [key: string]: any; -} - -declare var toastr: Toastr; -declare module "toastr" { - export = toastr; -} diff --git a/tslint.json b/tslint.json deleted file mode 100644 index 6b04ae7f36..0000000000 --- a/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "./node_modules/types-publisher/tslint-definitions.json" } \ No newline at end of file diff --git a/3d-bin-packing/3d-bin-packing-tests.ts b/types/3d-bin-packing/3d-bin-packing-tests.ts similarity index 100% rename from 3d-bin-packing/3d-bin-packing-tests.ts rename to types/3d-bin-packing/3d-bin-packing-tests.ts diff --git a/3d-bin-packing/index.d.ts b/types/3d-bin-packing/index.d.ts similarity index 100% rename from 3d-bin-packing/index.d.ts rename to types/3d-bin-packing/index.d.ts diff --git a/3d-bin-packing/tsconfig.json b/types/3d-bin-packing/tsconfig.json similarity index 100% rename from 3d-bin-packing/tsconfig.json rename to types/3d-bin-packing/tsconfig.json diff --git a/ably/ably-tests.ts b/types/ably/ably-tests.ts similarity index 100% rename from ably/ably-tests.ts rename to types/ably/ably-tests.ts diff --git a/ably/index.d.ts b/types/ably/index.d.ts similarity index 99% rename from ably/index.d.ts rename to types/ably/index.d.ts index a6ea5785ac..b8d1eb9bfe 100644 --- a/ably/index.d.ts +++ b/types/ably/index.d.ts @@ -444,7 +444,7 @@ declare namespace ablyLib { } } -export declare class Rest { +export class Rest { constructor(options: ablyLib.ClientOptions | string); static Crypto: ablyLib.Crypto; static Message: ablyLib.MessageStatic; @@ -456,7 +456,7 @@ export declare class Rest { time: (paramsOrCallback?: ablyLib.timeCallback | any, callback?: ablyLib.timeCallback) => void; } -export declare class Realtime { +export class Realtime { constructor(options: ablyLib.ClientOptions | string); static Crypto: ablyLib.Crypto; static Message: ablyLib.MessageStatic; diff --git a/ably/tsconfig.json b/types/ably/tsconfig.json similarity index 100% rename from ably/tsconfig.json rename to types/ably/tsconfig.json diff --git a/ably/tslint.json b/types/ably/tslint.json similarity index 100% rename from ably/tslint.json rename to types/ably/tslint.json diff --git a/abs/abs-tests.ts b/types/abs/abs-tests.ts similarity index 100% rename from abs/abs-tests.ts rename to types/abs/abs-tests.ts diff --git a/abs/index.d.ts b/types/abs/index.d.ts similarity index 100% rename from abs/index.d.ts rename to types/abs/index.d.ts diff --git a/abs/tsconfig.json b/types/abs/tsconfig.json similarity index 100% rename from abs/tsconfig.json rename to types/abs/tsconfig.json diff --git a/abs/tslint.json b/types/abs/tslint.json similarity index 100% rename from abs/tslint.json rename to types/abs/tslint.json diff --git a/absolute/absolute-tests.ts b/types/absolute/absolute-tests.ts similarity index 100% rename from absolute/absolute-tests.ts rename to types/absolute/absolute-tests.ts diff --git a/absolute/index.d.ts b/types/absolute/index.d.ts similarity index 100% rename from absolute/index.d.ts rename to types/absolute/index.d.ts diff --git a/absolute/tsconfig.json b/types/absolute/tsconfig.json similarity index 100% rename from absolute/tsconfig.json rename to types/absolute/tsconfig.json diff --git a/acc-wizard/acc-wizard-tests.ts b/types/acc-wizard/acc-wizard-tests.ts similarity index 100% rename from acc-wizard/acc-wizard-tests.ts rename to types/acc-wizard/acc-wizard-tests.ts diff --git a/acc-wizard/index.d.ts b/types/acc-wizard/index.d.ts similarity index 100% rename from acc-wizard/index.d.ts rename to types/acc-wizard/index.d.ts diff --git a/acc-wizard/tsconfig.json b/types/acc-wizard/tsconfig.json similarity index 100% rename from acc-wizard/tsconfig.json rename to types/acc-wizard/tsconfig.json diff --git a/accepts/accepts-tests.ts b/types/accepts/accepts-tests.ts similarity index 100% rename from accepts/accepts-tests.ts rename to types/accepts/accepts-tests.ts diff --git a/accepts/index.d.ts b/types/accepts/index.d.ts similarity index 97% rename from accepts/index.d.ts rename to types/accepts/index.d.ts index a12dcaf5c9..1fef801986 100644 --- a/accepts/index.d.ts +++ b/types/accepts/index.d.ts @@ -4,11 +4,11 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace accepts { - export interface Headers { + interface Headers { [key: string]: string | string[]; } - export interface Accepts { + interface Accepts { /** * Return the first accepted charset. If nothing in `charsets` is accepted, then `false` is returned. */ diff --git a/accepts/tsconfig.json b/types/accepts/tsconfig.json similarity index 100% rename from accepts/tsconfig.json rename to types/accepts/tsconfig.json diff --git a/accepts/tslint.json b/types/accepts/tslint.json similarity index 100% rename from accepts/tslint.json rename to types/accepts/tslint.json diff --git a/accounting/accounting-tests.ts b/types/accounting/accounting-tests.ts similarity index 100% rename from accounting/accounting-tests.ts rename to types/accounting/accounting-tests.ts diff --git a/accounting/index.d.ts b/types/accounting/index.d.ts similarity index 100% rename from accounting/index.d.ts rename to types/accounting/index.d.ts diff --git a/accounting/tsconfig.json b/types/accounting/tsconfig.json similarity index 100% rename from accounting/tsconfig.json rename to types/accounting/tsconfig.json diff --git a/accounting/tslint.json b/types/accounting/tslint.json similarity index 100% rename from accounting/tslint.json rename to types/accounting/tslint.json diff --git a/ace/index.d.ts b/types/ace/index.d.ts similarity index 100% rename from ace/index.d.ts rename to types/ace/index.d.ts diff --git a/ace/test/anchor.ts b/types/ace/test/anchor.ts similarity index 100% rename from ace/test/anchor.ts rename to types/ace/test/anchor.ts diff --git a/ace/test/background_tokenizer.ts b/types/ace/test/background_tokenizer.ts similarity index 100% rename from ace/test/background_tokenizer.ts rename to types/ace/test/background_tokenizer.ts diff --git a/ace/test/default.ts b/types/ace/test/default.ts similarity index 100% rename from ace/test/default.ts rename to types/ace/test/default.ts diff --git a/ace/test/document.ts b/types/ace/test/document.ts similarity index 100% rename from ace/test/document.ts rename to types/ace/test/document.ts diff --git a/ace/test/edit_session.ts b/types/ace/test/edit_session.ts similarity index 100% rename from ace/test/edit_session.ts rename to types/ace/test/edit_session.ts diff --git a/ace/test/editor1.ts b/types/ace/test/editor1.ts similarity index 100% rename from ace/test/editor1.ts rename to types/ace/test/editor1.ts diff --git a/ace/test/editor_highlight_selected_word.ts b/types/ace/test/editor_highlight_selected_word.ts similarity index 100% rename from ace/test/editor_highlight_selected_word.ts rename to types/ace/test/editor_highlight_selected_word.ts diff --git a/ace/test/editor_navigation.ts b/types/ace/test/editor_navigation.ts similarity index 100% rename from ace/test/editor_navigation.ts rename to types/ace/test/editor_navigation.ts diff --git a/ace/test/editor_text_edit.ts b/types/ace/test/editor_text_edit.ts similarity index 100% rename from ace/test/editor_text_edit.ts rename to types/ace/test/editor_text_edit.ts diff --git a/ace/test/multi_select.ts b/types/ace/test/multi_select.ts similarity index 100% rename from ace/test/multi_select.ts rename to types/ace/test/multi_select.ts diff --git a/ace/test/placeholder.ts b/types/ace/test/placeholder.ts similarity index 100% rename from ace/test/placeholder.ts rename to types/ace/test/placeholder.ts diff --git a/ace/test/range.ts b/types/ace/test/range.ts similarity index 100% rename from ace/test/range.ts rename to types/ace/test/range.ts diff --git a/ace/test/range_list.ts b/types/ace/test/range_list.ts similarity index 100% rename from ace/test/range_list.ts rename to types/ace/test/range_list.ts diff --git a/ace/test/search.ts b/types/ace/test/search.ts similarity index 100% rename from ace/test/search.ts rename to types/ace/test/search.ts diff --git a/ace/test/selection.ts b/types/ace/test/selection.ts similarity index 100% rename from ace/test/selection.ts rename to types/ace/test/selection.ts diff --git a/ace/test/token_iterator.ts b/types/ace/test/token_iterator.ts similarity index 100% rename from ace/test/token_iterator.ts rename to types/ace/test/token_iterator.ts diff --git a/ace/test/virtual_renderer.ts b/types/ace/test/virtual_renderer.ts similarity index 100% rename from ace/test/virtual_renderer.ts rename to types/ace/test/virtual_renderer.ts diff --git a/ace/tsconfig.json b/types/ace/tsconfig.json similarity index 100% rename from ace/tsconfig.json rename to types/ace/tsconfig.json diff --git a/acl/index.d.ts b/types/acl/index.d.ts similarity index 100% rename from acl/index.d.ts rename to types/acl/index.d.ts diff --git a/acl/test/index.ts b/types/acl/test/index.ts similarity index 100% rename from acl/test/index.ts rename to types/acl/test/index.ts diff --git a/acl/test/mongodbBackend.ts b/types/acl/test/mongodbBackend.ts similarity index 100% rename from acl/test/mongodbBackend.ts rename to types/acl/test/mongodbBackend.ts diff --git a/acl/test/redisBackend.ts b/types/acl/test/redisBackend.ts similarity index 100% rename from acl/test/redisBackend.ts rename to types/acl/test/redisBackend.ts diff --git a/acl/tsconfig.json b/types/acl/tsconfig.json similarity index 100% rename from acl/tsconfig.json rename to types/acl/tsconfig.json diff --git a/acorn/README.md b/types/acorn/README.md similarity index 100% rename from acorn/README.md rename to types/acorn/README.md diff --git a/acorn/acorn-tests.ts b/types/acorn/acorn-tests.ts similarity index 100% rename from acorn/acorn-tests.ts rename to types/acorn/acorn-tests.ts diff --git a/acorn/index.d.ts b/types/acorn/index.d.ts similarity index 100% rename from acorn/index.d.ts rename to types/acorn/index.d.ts diff --git a/acorn/tsconfig.json b/types/acorn/tsconfig.json similarity index 100% rename from acorn/tsconfig.json rename to types/acorn/tsconfig.json diff --git a/actioncable/actioncable-tests.ts b/types/actioncable/actioncable-tests.ts similarity index 100% rename from actioncable/actioncable-tests.ts rename to types/actioncable/actioncable-tests.ts diff --git a/actioncable/index.d.ts b/types/actioncable/index.d.ts similarity index 100% rename from actioncable/index.d.ts rename to types/actioncable/index.d.ts diff --git a/actioncable/tsconfig.json b/types/actioncable/tsconfig.json similarity index 100% rename from actioncable/tsconfig.json rename to types/actioncable/tsconfig.json diff --git a/activex-data-objects/activex-data-objects-tests.ts b/types/activex-data-objects/activex-data-objects-tests.ts similarity index 100% rename from activex-data-objects/activex-data-objects-tests.ts rename to types/activex-data-objects/activex-data-objects-tests.ts diff --git a/activex-data-objects/index.d.ts b/types/activex-data-objects/index.d.ts similarity index 100% rename from activex-data-objects/index.d.ts rename to types/activex-data-objects/index.d.ts diff --git a/activex-data-objects/tsconfig.json b/types/activex-data-objects/tsconfig.json similarity index 100% rename from activex-data-objects/tsconfig.json rename to types/activex-data-objects/tsconfig.json diff --git a/activex-scripting-runtime/activex-scripting-runtime-tests.ts b/types/activex-scripting-runtime/activex-scripting-runtime-tests.ts similarity index 100% rename from activex-scripting-runtime/activex-scripting-runtime-tests.ts rename to types/activex-scripting-runtime/activex-scripting-runtime-tests.ts diff --git a/activex-scripting-runtime/index.d.ts b/types/activex-scripting-runtime/index.d.ts similarity index 100% rename from activex-scripting-runtime/index.d.ts rename to types/activex-scripting-runtime/index.d.ts diff --git a/activex-scripting-runtime/tsconfig.json b/types/activex-scripting-runtime/tsconfig.json similarity index 100% rename from activex-scripting-runtime/tsconfig.json rename to types/activex-scripting-runtime/tsconfig.json diff --git a/activex-windows-image-acquisition/activex-windows-image-acquisition-tests.ts b/types/activex-windows-image-acquisition/activex-windows-image-acquisition-tests.ts similarity index 100% rename from activex-windows-image-acquisition/activex-windows-image-acquisition-tests.ts rename to types/activex-windows-image-acquisition/activex-windows-image-acquisition-tests.ts diff --git a/activex-windows-image-acquisition/index.d.ts b/types/activex-windows-image-acquisition/index.d.ts similarity index 100% rename from activex-windows-image-acquisition/index.d.ts rename to types/activex-windows-image-acquisition/index.d.ts diff --git a/activex-windows-image-acquisition/tsconfig.json b/types/activex-windows-image-acquisition/tsconfig.json similarity index 100% rename from activex-windows-image-acquisition/tsconfig.json rename to types/activex-windows-image-acquisition/tsconfig.json diff --git a/adal/adal-angular.d.ts b/types/adal/adal-angular.d.ts similarity index 100% rename from adal/adal-angular.d.ts rename to types/adal/adal-angular.d.ts diff --git a/adal/index.d.ts b/types/adal/index.d.ts similarity index 100% rename from adal/index.d.ts rename to types/adal/index.d.ts diff --git a/adal/test/angular.ts b/types/adal/test/angular.ts similarity index 100% rename from adal/test/angular.ts rename to types/adal/test/angular.ts diff --git a/adal/test/index.ts b/types/adal/test/index.ts similarity index 100% rename from adal/test/index.ts rename to types/adal/test/index.ts diff --git a/adal/tsconfig.json b/types/adal/tsconfig.json similarity index 100% rename from adal/tsconfig.json rename to types/adal/tsconfig.json diff --git a/add2home/add2home-tests.ts b/types/add2home/add2home-tests.ts similarity index 100% rename from add2home/add2home-tests.ts rename to types/add2home/add2home-tests.ts diff --git a/add2home/index.d.ts b/types/add2home/index.d.ts similarity index 100% rename from add2home/index.d.ts rename to types/add2home/index.d.ts diff --git a/add2home/tsconfig.json b/types/add2home/tsconfig.json similarity index 100% rename from add2home/tsconfig.json rename to types/add2home/tsconfig.json diff --git a/adm-zip/adm-zip-tests.ts b/types/adm-zip/adm-zip-tests.ts similarity index 100% rename from adm-zip/adm-zip-tests.ts rename to types/adm-zip/adm-zip-tests.ts diff --git a/adm-zip/index.d.ts b/types/adm-zip/index.d.ts similarity index 100% rename from adm-zip/index.d.ts rename to types/adm-zip/index.d.ts diff --git a/adm-zip/tsconfig.json b/types/adm-zip/tsconfig.json similarity index 100% rename from adm-zip/tsconfig.json rename to types/adm-zip/tsconfig.json diff --git a/ag-grid/ag-grid-tests.ts b/types/ag-grid/ag-grid-tests.ts similarity index 100% rename from ag-grid/ag-grid-tests.ts rename to types/ag-grid/ag-grid-tests.ts diff --git a/ag-grid/index.d.ts b/types/ag-grid/index.d.ts similarity index 100% rename from ag-grid/index.d.ts rename to types/ag-grid/index.d.ts diff --git a/ag-grid/tsconfig.json b/types/ag-grid/tsconfig.json similarity index 100% rename from ag-grid/tsconfig.json rename to types/ag-grid/tsconfig.json diff --git a/agenda/agenda-tests.ts b/types/agenda/agenda-tests.ts similarity index 100% rename from agenda/agenda-tests.ts rename to types/agenda/agenda-tests.ts diff --git a/agenda/index.d.ts b/types/agenda/index.d.ts similarity index 100% rename from agenda/index.d.ts rename to types/agenda/index.d.ts diff --git a/agenda/tsconfig.json b/types/agenda/tsconfig.json similarity index 100% rename from agenda/tsconfig.json rename to types/agenda/tsconfig.json diff --git a/alertify/alertify-tests.ts b/types/alertify/alertify-tests.ts similarity index 100% rename from alertify/alertify-tests.ts rename to types/alertify/alertify-tests.ts diff --git a/alertify/index.d.ts b/types/alertify/index.d.ts similarity index 100% rename from alertify/index.d.ts rename to types/alertify/index.d.ts diff --git a/alertify/tsconfig.json b/types/alertify/tsconfig.json similarity index 100% rename from alertify/tsconfig.json rename to types/alertify/tsconfig.json diff --git a/alexa-sdk/alexa-sdk-tests.ts b/types/alexa-sdk/alexa-sdk-tests.ts similarity index 100% rename from alexa-sdk/alexa-sdk-tests.ts rename to types/alexa-sdk/alexa-sdk-tests.ts diff --git a/alexa-sdk/index.d.ts b/types/alexa-sdk/index.d.ts similarity index 100% rename from alexa-sdk/index.d.ts rename to types/alexa-sdk/index.d.ts diff --git a/alexa-sdk/tsconfig.json b/types/alexa-sdk/tsconfig.json similarity index 100% rename from alexa-sdk/tsconfig.json rename to types/alexa-sdk/tsconfig.json diff --git a/algoliasearch/algoliasearch-tests.ts b/types/algoliasearch/algoliasearch-tests.ts similarity index 100% rename from algoliasearch/algoliasearch-tests.ts rename to types/algoliasearch/algoliasearch-tests.ts diff --git a/algoliasearch/index.d.ts b/types/algoliasearch/index.d.ts similarity index 100% rename from algoliasearch/index.d.ts rename to types/algoliasearch/index.d.ts diff --git a/algoliasearch/tsconfig.json b/types/algoliasearch/tsconfig.json similarity index 100% rename from algoliasearch/tsconfig.json rename to types/algoliasearch/tsconfig.json diff --git a/alt/alt-tests.ts b/types/alt/alt-tests.ts similarity index 100% rename from alt/alt-tests.ts rename to types/alt/alt-tests.ts diff --git a/alt/index.d.ts b/types/alt/index.d.ts similarity index 100% rename from alt/index.d.ts rename to types/alt/index.d.ts diff --git a/alt/tsconfig.json b/types/alt/tsconfig.json similarity index 100% rename from alt/tsconfig.json rename to types/alt/tsconfig.json diff --git a/amazon-product-api/amazon-product-api-tests.ts b/types/amazon-product-api/amazon-product-api-tests.ts similarity index 100% rename from amazon-product-api/amazon-product-api-tests.ts rename to types/amazon-product-api/amazon-product-api-tests.ts diff --git a/amazon-product-api/index.d.ts b/types/amazon-product-api/index.d.ts similarity index 100% rename from amazon-product-api/index.d.ts rename to types/amazon-product-api/index.d.ts diff --git a/amazon-product-api/tsconfig.json b/types/amazon-product-api/tsconfig.json similarity index 100% rename from amazon-product-api/tsconfig.json rename to types/amazon-product-api/tsconfig.json diff --git a/amcharts/index.d.ts b/types/amcharts/index.d.ts similarity index 100% rename from amcharts/index.d.ts rename to types/amcharts/index.d.ts diff --git a/amcharts/tsconfig.json b/types/amcharts/tsconfig.json similarity index 100% rename from amcharts/tsconfig.json rename to types/amcharts/tsconfig.json diff --git a/amplify-deferred/amplify-deferred-tests.ts b/types/amplify-deferred/amplify-deferred-tests.ts similarity index 100% rename from amplify-deferred/amplify-deferred-tests.ts rename to types/amplify-deferred/amplify-deferred-tests.ts diff --git a/amplify-deferred/index.d.ts b/types/amplify-deferred/index.d.ts similarity index 100% rename from amplify-deferred/index.d.ts rename to types/amplify-deferred/index.d.ts diff --git a/amplify-deferred/tsconfig.json b/types/amplify-deferred/tsconfig.json similarity index 100% rename from amplify-deferred/tsconfig.json rename to types/amplify-deferred/tsconfig.json diff --git a/amplify-deferred/tslint.json b/types/amplify-deferred/tslint.json similarity index 100% rename from amplify-deferred/tslint.json rename to types/amplify-deferred/tslint.json diff --git a/amplify/amplify-tests.ts b/types/amplify/amplify-tests.ts similarity index 99% rename from amplify/amplify-tests.ts rename to types/amplify/amplify-tests.ts index b4f98ccd5b..8cce567960 100644 --- a/amplify/amplify-tests.ts +++ b/types/amplify/amplify-tests.ts @@ -257,4 +257,3 @@ amplify.request({ error: (data, status) => { } }); - diff --git a/amplify/index.d.ts b/types/amplify/index.d.ts similarity index 99% rename from amplify/index.d.ts rename to types/amplify/index.d.ts index 1e62e57a01..5cb03e5b1d 100644 --- a/amplify/index.d.ts +++ b/types/amplify/index.d.ts @@ -34,7 +34,6 @@ declare namespace amplify { } interface Request { - /*** * Request a resource. * resourceId: Identifier string for the resource. @@ -118,7 +117,6 @@ declare namespace amplify { } interface Store extends StorageTypeStore { - /*** * IE 8+, Firefox 3.5+, Safari 4+, Chrome, Opera 10.5+, iPhone 2+, Android 2+ */ @@ -143,12 +141,9 @@ declare namespace amplify { * An in-memory store is provided as a fallback if none of the other storage types are available. */ memory: StorageTypeStore; - - } interface Static { - subscribe: Subscribe; /*** diff --git a/amplify/tsconfig.json b/types/amplify/tsconfig.json similarity index 100% rename from amplify/tsconfig.json rename to types/amplify/tsconfig.json diff --git a/amplify/tslint.json b/types/amplify/tslint.json similarity index 100% rename from amplify/tslint.json rename to types/amplify/tslint.json diff --git a/amplitude-js/amplitude-js-tests.ts b/types/amplitude-js/amplitude-js-tests.ts similarity index 100% rename from amplitude-js/amplitude-js-tests.ts rename to types/amplitude-js/amplitude-js-tests.ts diff --git a/amplitude-js/index.d.ts b/types/amplitude-js/index.d.ts similarity index 100% rename from amplitude-js/index.d.ts rename to types/amplitude-js/index.d.ts diff --git a/amplitude-js/tsconfig.json b/types/amplitude-js/tsconfig.json similarity index 100% rename from amplitude-js/tsconfig.json rename to types/amplitude-js/tsconfig.json diff --git a/amqp-rpc/amqp-rpc-tests.ts b/types/amqp-rpc/amqp-rpc-tests.ts similarity index 100% rename from amqp-rpc/amqp-rpc-tests.ts rename to types/amqp-rpc/amqp-rpc-tests.ts diff --git a/amqp-rpc/index.d.ts b/types/amqp-rpc/index.d.ts similarity index 100% rename from amqp-rpc/index.d.ts rename to types/amqp-rpc/index.d.ts diff --git a/amqp-rpc/tsconfig.json b/types/amqp-rpc/tsconfig.json similarity index 100% rename from amqp-rpc/tsconfig.json rename to types/amqp-rpc/tsconfig.json diff --git a/amqplib/amqplib-tests.ts b/types/amqplib/amqplib-tests.ts similarity index 100% rename from amqplib/amqplib-tests.ts rename to types/amqplib/amqplib-tests.ts diff --git a/amqplib/callback_api.d.ts b/types/amqplib/callback_api.d.ts similarity index 100% rename from amqplib/callback_api.d.ts rename to types/amqplib/callback_api.d.ts diff --git a/amqplib/index.d.ts b/types/amqplib/index.d.ts similarity index 100% rename from amqplib/index.d.ts rename to types/amqplib/index.d.ts diff --git a/amqplib/properties.d.ts b/types/amqplib/properties.d.ts similarity index 100% rename from amqplib/properties.d.ts rename to types/amqplib/properties.d.ts diff --git a/amqplib/tsconfig.json b/types/amqplib/tsconfig.json similarity index 100% rename from amqplib/tsconfig.json rename to types/amqplib/tsconfig.json diff --git a/amqplib/tslint.json b/types/amqplib/tslint.json similarity index 100% rename from amqplib/tslint.json rename to types/amqplib/tslint.json diff --git a/analytics-node/analytics-node-tests.ts b/types/analytics-node/analytics-node-tests.ts similarity index 100% rename from analytics-node/analytics-node-tests.ts rename to types/analytics-node/analytics-node-tests.ts diff --git a/analytics-node/index.d.ts b/types/analytics-node/index.d.ts similarity index 100% rename from analytics-node/index.d.ts rename to types/analytics-node/index.d.ts diff --git a/analytics-node/tsconfig.json b/types/analytics-node/tsconfig.json similarity index 100% rename from analytics-node/tsconfig.json rename to types/analytics-node/tsconfig.json diff --git a/angular-agility/angular-agility-tests.ts b/types/angular-agility/angular-agility-tests.ts similarity index 100% rename from angular-agility/angular-agility-tests.ts rename to types/angular-agility/angular-agility-tests.ts diff --git a/angular-agility/index.d.ts b/types/angular-agility/index.d.ts similarity index 100% rename from angular-agility/index.d.ts rename to types/angular-agility/index.d.ts diff --git a/angular-agility/tsconfig.json b/types/angular-agility/tsconfig.json similarity index 100% rename from angular-agility/tsconfig.json rename to types/angular-agility/tsconfig.json diff --git a/angular-animate/index.d.ts b/types/angular-animate/index.d.ts similarity index 100% rename from angular-animate/index.d.ts rename to types/angular-animate/index.d.ts diff --git a/angular-animate/tsconfig.json b/types/angular-animate/tsconfig.json similarity index 100% rename from angular-animate/tsconfig.json rename to types/angular-animate/tsconfig.json diff --git a/angular-bootstrap-calendar/angular-bootstrap-calendar-tests.ts b/types/angular-bootstrap-calendar/angular-bootstrap-calendar-tests.ts similarity index 100% rename from angular-bootstrap-calendar/angular-bootstrap-calendar-tests.ts rename to types/angular-bootstrap-calendar/angular-bootstrap-calendar-tests.ts diff --git a/angular-bootstrap-calendar/index.d.ts b/types/angular-bootstrap-calendar/index.d.ts similarity index 100% rename from angular-bootstrap-calendar/index.d.ts rename to types/angular-bootstrap-calendar/index.d.ts diff --git a/angular-bootstrap-calendar/package.json b/types/angular-bootstrap-calendar/package.json similarity index 100% rename from angular-bootstrap-calendar/package.json rename to types/angular-bootstrap-calendar/package.json diff --git a/angular-bootstrap-calendar/tsconfig.json b/types/angular-bootstrap-calendar/tsconfig.json similarity index 100% rename from angular-bootstrap-calendar/tsconfig.json rename to types/angular-bootstrap-calendar/tsconfig.json diff --git a/angular-bootstrap-lightbox/angular-bootstrap-lightbox-tests.ts b/types/angular-bootstrap-lightbox/angular-bootstrap-lightbox-tests.ts similarity index 100% rename from angular-bootstrap-lightbox/angular-bootstrap-lightbox-tests.ts rename to types/angular-bootstrap-lightbox/angular-bootstrap-lightbox-tests.ts diff --git a/angular-bootstrap-lightbox/index.d.ts b/types/angular-bootstrap-lightbox/index.d.ts similarity index 100% rename from angular-bootstrap-lightbox/index.d.ts rename to types/angular-bootstrap-lightbox/index.d.ts diff --git a/angular-bootstrap-lightbox/tsconfig.json b/types/angular-bootstrap-lightbox/tsconfig.json similarity index 100% rename from angular-bootstrap-lightbox/tsconfig.json rename to types/angular-bootstrap-lightbox/tsconfig.json diff --git a/angular-breadcrumb/index.d.ts b/types/angular-breadcrumb/index.d.ts similarity index 100% rename from angular-breadcrumb/index.d.ts rename to types/angular-breadcrumb/index.d.ts diff --git a/angular-breadcrumb/tsconfig.json b/types/angular-breadcrumb/tsconfig.json similarity index 100% rename from angular-breadcrumb/tsconfig.json rename to types/angular-breadcrumb/tsconfig.json diff --git a/angular-clipboard/angular-clipboard-tests.ts b/types/angular-clipboard/angular-clipboard-tests.ts similarity index 100% rename from angular-clipboard/angular-clipboard-tests.ts rename to types/angular-clipboard/angular-clipboard-tests.ts diff --git a/angular-clipboard/index.d.ts b/types/angular-clipboard/index.d.ts similarity index 100% rename from angular-clipboard/index.d.ts rename to types/angular-clipboard/index.d.ts diff --git a/angular-clipboard/tsconfig.json b/types/angular-clipboard/tsconfig.json similarity index 100% rename from angular-clipboard/tsconfig.json rename to types/angular-clipboard/tsconfig.json diff --git a/angular-cookie/angular-cookie-tests.ts b/types/angular-cookie/angular-cookie-tests.ts similarity index 100% rename from angular-cookie/angular-cookie-tests.ts rename to types/angular-cookie/angular-cookie-tests.ts diff --git a/angular-cookie/index.d.ts b/types/angular-cookie/index.d.ts similarity index 100% rename from angular-cookie/index.d.ts rename to types/angular-cookie/index.d.ts diff --git a/angular-cookie/tsconfig.json b/types/angular-cookie/tsconfig.json similarity index 100% rename from angular-cookie/tsconfig.json rename to types/angular-cookie/tsconfig.json diff --git a/angular-cookies/index.d.ts b/types/angular-cookies/index.d.ts similarity index 100% rename from angular-cookies/index.d.ts rename to types/angular-cookies/index.d.ts diff --git a/angular-cookies/tsconfig.json b/types/angular-cookies/tsconfig.json similarity index 100% rename from angular-cookies/tsconfig.json rename to types/angular-cookies/tsconfig.json diff --git a/angular-deferred-bootstrap/angular-deferred-bootstrap-tests.ts b/types/angular-deferred-bootstrap/angular-deferred-bootstrap-tests.ts similarity index 100% rename from angular-deferred-bootstrap/angular-deferred-bootstrap-tests.ts rename to types/angular-deferred-bootstrap/angular-deferred-bootstrap-tests.ts diff --git a/angular-deferred-bootstrap/index.d.ts b/types/angular-deferred-bootstrap/index.d.ts similarity index 100% rename from angular-deferred-bootstrap/index.d.ts rename to types/angular-deferred-bootstrap/index.d.ts diff --git a/angular-deferred-bootstrap/tsconfig.json b/types/angular-deferred-bootstrap/tsconfig.json similarity index 100% rename from angular-deferred-bootstrap/tsconfig.json rename to types/angular-deferred-bootstrap/tsconfig.json diff --git a/angular-dialog-service/angular-dialog-service-tests.ts b/types/angular-dialog-service/angular-dialog-service-tests.ts similarity index 100% rename from angular-dialog-service/angular-dialog-service-tests.ts rename to types/angular-dialog-service/angular-dialog-service-tests.ts diff --git a/angular-dialog-service/index.d.ts b/types/angular-dialog-service/index.d.ts similarity index 100% rename from angular-dialog-service/index.d.ts rename to types/angular-dialog-service/index.d.ts diff --git a/angular-dialog-service/tsconfig.json b/types/angular-dialog-service/tsconfig.json similarity index 100% rename from angular-dialog-service/tsconfig.json rename to types/angular-dialog-service/tsconfig.json diff --git a/angular-dynamic-locale/angular-dynamic-locale-tests.ts b/types/angular-dynamic-locale/angular-dynamic-locale-tests.ts similarity index 100% rename from angular-dynamic-locale/angular-dynamic-locale-tests.ts rename to types/angular-dynamic-locale/angular-dynamic-locale-tests.ts diff --git a/angular-dynamic-locale/index.d.ts b/types/angular-dynamic-locale/index.d.ts similarity index 100% rename from angular-dynamic-locale/index.d.ts rename to types/angular-dynamic-locale/index.d.ts diff --git a/angular-dynamic-locale/tsconfig.json b/types/angular-dynamic-locale/tsconfig.json similarity index 100% rename from angular-dynamic-locale/tsconfig.json rename to types/angular-dynamic-locale/tsconfig.json diff --git a/angular-environment/angular-environment-tests.ts b/types/angular-environment/angular-environment-tests.ts similarity index 100% rename from angular-environment/angular-environment-tests.ts rename to types/angular-environment/angular-environment-tests.ts diff --git a/angular-environment/index.d.ts b/types/angular-environment/index.d.ts similarity index 100% rename from angular-environment/index.d.ts rename to types/angular-environment/index.d.ts diff --git a/angular-environment/tsconfig.json b/types/angular-environment/tsconfig.json similarity index 100% rename from angular-environment/tsconfig.json rename to types/angular-environment/tsconfig.json diff --git a/angular-es/angular-es-tests.ts b/types/angular-es/angular-es-tests.ts similarity index 100% rename from angular-es/angular-es-tests.ts rename to types/angular-es/angular-es-tests.ts diff --git a/angular-es/index.d.ts b/types/angular-es/index.d.ts similarity index 100% rename from angular-es/index.d.ts rename to types/angular-es/index.d.ts diff --git a/angular-es/tsconfig.json b/types/angular-es/tsconfig.json similarity index 100% rename from angular-es/tsconfig.json rename to types/angular-es/tsconfig.json diff --git a/angular-feature-flags/angular-feature-flags-tests.ts b/types/angular-feature-flags/angular-feature-flags-tests.ts similarity index 100% rename from angular-feature-flags/angular-feature-flags-tests.ts rename to types/angular-feature-flags/angular-feature-flags-tests.ts diff --git a/angular-feature-flags/index.d.ts b/types/angular-feature-flags/index.d.ts similarity index 100% rename from angular-feature-flags/index.d.ts rename to types/angular-feature-flags/index.d.ts diff --git a/angular-feature-flags/tsconfig.json b/types/angular-feature-flags/tsconfig.json similarity index 100% rename from angular-feature-flags/tsconfig.json rename to types/angular-feature-flags/tsconfig.json diff --git a/angular-file-saver/angular-file-saver-tests.ts b/types/angular-file-saver/angular-file-saver-tests.ts similarity index 100% rename from angular-file-saver/angular-file-saver-tests.ts rename to types/angular-file-saver/angular-file-saver-tests.ts diff --git a/angular-file-saver/index.d.ts b/types/angular-file-saver/index.d.ts similarity index 87% rename from angular-file-saver/index.d.ts rename to types/angular-file-saver/index.d.ts index 7e1fb90b16..2fb846eef4 100644 --- a/angular-file-saver/index.d.ts +++ b/types/angular-file-saver/index.d.ts @@ -3,13 +3,12 @@ // Definitions by: Donald Nairn // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - -declare namespace angular { +import * as angular from 'angular'; +declare module 'angular' { /** * A core Angular factory proving FileSaver functionality. */ - interface FileSaver { + export interface FileSaver { /** * Immediately starts saving a file * @param data: a Blob instance; @@ -18,4 +17,4 @@ declare namespace angular { */ saveAs(blob: Blob, fileName: string, disableBOM?: boolean): void; } -} \ No newline at end of file +} diff --git a/angular-file-saver/tsconfig.json b/types/angular-file-saver/tsconfig.json similarity index 100% rename from angular-file-saver/tsconfig.json rename to types/angular-file-saver/tsconfig.json diff --git a/angular-formly/angular-formly-tests.ts b/types/angular-formly/angular-formly-tests.ts similarity index 100% rename from angular-formly/angular-formly-tests.ts rename to types/angular-formly/angular-formly-tests.ts diff --git a/angular-formly/index.d.ts b/types/angular-formly/index.d.ts similarity index 100% rename from angular-formly/index.d.ts rename to types/angular-formly/index.d.ts diff --git a/angular-formly/tsconfig.json b/types/angular-formly/tsconfig.json similarity index 100% rename from angular-formly/tsconfig.json rename to types/angular-formly/tsconfig.json diff --git a/angular-fullscreen/angular-fullscreen-tests.ts b/types/angular-fullscreen/angular-fullscreen-tests.ts similarity index 100% rename from angular-fullscreen/angular-fullscreen-tests.ts rename to types/angular-fullscreen/angular-fullscreen-tests.ts diff --git a/angular-fullscreen/index.d.ts b/types/angular-fullscreen/index.d.ts similarity index 100% rename from angular-fullscreen/index.d.ts rename to types/angular-fullscreen/index.d.ts diff --git a/angular-fullscreen/tsconfig.json b/types/angular-fullscreen/tsconfig.json similarity index 100% rename from angular-fullscreen/tsconfig.json rename to types/angular-fullscreen/tsconfig.json diff --git a/angular-gettext/angular-gettext-tests.ts b/types/angular-gettext/angular-gettext-tests.ts similarity index 100% rename from angular-gettext/angular-gettext-tests.ts rename to types/angular-gettext/angular-gettext-tests.ts diff --git a/angular-gettext/index.d.ts b/types/angular-gettext/index.d.ts similarity index 100% rename from angular-gettext/index.d.ts rename to types/angular-gettext/index.d.ts diff --git a/angular-gettext/tsconfig.json b/types/angular-gettext/tsconfig.json similarity index 100% rename from angular-gettext/tsconfig.json rename to types/angular-gettext/tsconfig.json diff --git a/angular-google-analytics/angular-google-analytics-tests.ts b/types/angular-google-analytics/angular-google-analytics-tests.ts similarity index 100% rename from angular-google-analytics/angular-google-analytics-tests.ts rename to types/angular-google-analytics/angular-google-analytics-tests.ts diff --git a/angular-google-analytics/index.d.ts b/types/angular-google-analytics/index.d.ts similarity index 100% rename from angular-google-analytics/index.d.ts rename to types/angular-google-analytics/index.d.ts diff --git a/angular-google-analytics/tsconfig.json b/types/angular-google-analytics/tsconfig.json similarity index 100% rename from angular-google-analytics/tsconfig.json rename to types/angular-google-analytics/tsconfig.json diff --git a/angular-gridster/angular-gridster-tests.ts b/types/angular-gridster/angular-gridster-tests.ts similarity index 100% rename from angular-gridster/angular-gridster-tests.ts rename to types/angular-gridster/angular-gridster-tests.ts diff --git a/angular-gridster/index.d.ts b/types/angular-gridster/index.d.ts similarity index 99% rename from angular-gridster/index.d.ts rename to types/angular-gridster/index.d.ts index fc0e990d41..272470bc6f 100644 --- a/angular-gridster/index.d.ts +++ b/types/angular-gridster/index.d.ts @@ -8,11 +8,8 @@ import * as angular from "angular"; export default "gridster"; declare module "angular" { - - export namespace gridster { - + namespace gridster { interface GridsterConfig { - // number of columns in the grid columns?: number; // whether to push other items out of the way @@ -83,7 +80,6 @@ declare module "angular" { // options to pass to resizable handler resizable?: { - // whether the items are resizable enabled?: boolean; @@ -103,7 +99,6 @@ declare module "angular" { // options to pass to draggable handler draggable?: { - // whether the items are resizable enabled?: boolean; @@ -128,7 +123,6 @@ declare module "angular" { } interface StandardGridsterItem { - // width of the item expressed in terms of number of columns it will occupy sizeX: number; diff --git a/angular-gridster/tsconfig.json b/types/angular-gridster/tsconfig.json similarity index 100% rename from angular-gridster/tsconfig.json rename to types/angular-gridster/tsconfig.json diff --git a/angular-gridster/tslint.json b/types/angular-gridster/tslint.json similarity index 100% rename from angular-gridster/tslint.json rename to types/angular-gridster/tslint.json diff --git a/angular-growl-v2/angular-growl-v2-tests.ts b/types/angular-growl-v2/angular-growl-v2-tests.ts similarity index 100% rename from angular-growl-v2/angular-growl-v2-tests.ts rename to types/angular-growl-v2/angular-growl-v2-tests.ts diff --git a/angular-growl-v2/index.d.ts b/types/angular-growl-v2/index.d.ts similarity index 100% rename from angular-growl-v2/index.d.ts rename to types/angular-growl-v2/index.d.ts diff --git a/angular-growl-v2/tsconfig.json b/types/angular-growl-v2/tsconfig.json similarity index 100% rename from angular-growl-v2/tsconfig.json rename to types/angular-growl-v2/tsconfig.json diff --git a/angular-hotkeys/angular-hotkeys-tests.ts b/types/angular-hotkeys/angular-hotkeys-tests.ts similarity index 100% rename from angular-hotkeys/angular-hotkeys-tests.ts rename to types/angular-hotkeys/angular-hotkeys-tests.ts diff --git a/angular-hotkeys/index.d.ts b/types/angular-hotkeys/index.d.ts similarity index 100% rename from angular-hotkeys/index.d.ts rename to types/angular-hotkeys/index.d.ts diff --git a/angular-hotkeys/tsconfig.json b/types/angular-hotkeys/tsconfig.json similarity index 100% rename from angular-hotkeys/tsconfig.json rename to types/angular-hotkeys/tsconfig.json diff --git a/angular-http-auth/angular-http-auth-tests.ts b/types/angular-http-auth/angular-http-auth-tests.ts similarity index 100% rename from angular-http-auth/angular-http-auth-tests.ts rename to types/angular-http-auth/angular-http-auth-tests.ts diff --git a/angular-http-auth/index.d.ts b/types/angular-http-auth/index.d.ts similarity index 100% rename from angular-http-auth/index.d.ts rename to types/angular-http-auth/index.d.ts diff --git a/angular-http-auth/tsconfig.json b/types/angular-http-auth/tsconfig.json similarity index 100% rename from angular-http-auth/tsconfig.json rename to types/angular-http-auth/tsconfig.json diff --git a/angular-httpi/angular-httpi-tests.ts b/types/angular-httpi/angular-httpi-tests.ts similarity index 100% rename from angular-httpi/angular-httpi-tests.ts rename to types/angular-httpi/angular-httpi-tests.ts diff --git a/angular-httpi/index.d.ts b/types/angular-httpi/index.d.ts similarity index 100% rename from angular-httpi/index.d.ts rename to types/angular-httpi/index.d.ts diff --git a/angular-httpi/tsconfig.json b/types/angular-httpi/tsconfig.json similarity index 100% rename from angular-httpi/tsconfig.json rename to types/angular-httpi/tsconfig.json diff --git a/angular-idle/angular-idle-tests.ts b/types/angular-idle/angular-idle-tests.ts similarity index 100% rename from angular-idle/angular-idle-tests.ts rename to types/angular-idle/angular-idle-tests.ts diff --git a/angular-idle/index.d.ts b/types/angular-idle/index.d.ts similarity index 100% rename from angular-idle/index.d.ts rename to types/angular-idle/index.d.ts diff --git a/angular-idle/tsconfig.json b/types/angular-idle/tsconfig.json similarity index 100% rename from angular-idle/tsconfig.json rename to types/angular-idle/tsconfig.json diff --git a/angular-jwt/angular-jwt-tests.ts b/types/angular-jwt/angular-jwt-tests.ts similarity index 100% rename from angular-jwt/angular-jwt-tests.ts rename to types/angular-jwt/angular-jwt-tests.ts diff --git a/angular-jwt/index.d.ts b/types/angular-jwt/index.d.ts similarity index 100% rename from angular-jwt/index.d.ts rename to types/angular-jwt/index.d.ts diff --git a/angular-jwt/tsconfig.json b/types/angular-jwt/tsconfig.json similarity index 100% rename from angular-jwt/tsconfig.json rename to types/angular-jwt/tsconfig.json diff --git a/angular-load/angular-load-tests.ts b/types/angular-load/angular-load-tests.ts similarity index 100% rename from angular-load/angular-load-tests.ts rename to types/angular-load/angular-load-tests.ts diff --git a/angular-load/index.d.ts b/types/angular-load/index.d.ts similarity index 100% rename from angular-load/index.d.ts rename to types/angular-load/index.d.ts diff --git a/angular-load/tsconfig.json b/types/angular-load/tsconfig.json similarity index 100% rename from angular-load/tsconfig.json rename to types/angular-load/tsconfig.json diff --git a/angular-loading-bar/angular-loading-bar-tests.ts b/types/angular-loading-bar/angular-loading-bar-tests.ts similarity index 100% rename from angular-loading-bar/angular-loading-bar-tests.ts rename to types/angular-loading-bar/angular-loading-bar-tests.ts diff --git a/angular-loading-bar/index.d.ts b/types/angular-loading-bar/index.d.ts similarity index 100% rename from angular-loading-bar/index.d.ts rename to types/angular-loading-bar/index.d.ts diff --git a/angular-loading-bar/tsconfig.json b/types/angular-loading-bar/tsconfig.json similarity index 100% rename from angular-loading-bar/tsconfig.json rename to types/angular-loading-bar/tsconfig.json diff --git a/angular-local-storage/angular-local-storage-tests.ts b/types/angular-local-storage/angular-local-storage-tests.ts similarity index 100% rename from angular-local-storage/angular-local-storage-tests.ts rename to types/angular-local-storage/angular-local-storage-tests.ts diff --git a/angular-local-storage/index.d.ts b/types/angular-local-storage/index.d.ts similarity index 100% rename from angular-local-storage/index.d.ts rename to types/angular-local-storage/index.d.ts diff --git a/angular-local-storage/tsconfig.json b/types/angular-local-storage/tsconfig.json similarity index 100% rename from angular-local-storage/tsconfig.json rename to types/angular-local-storage/tsconfig.json diff --git a/angular-localforage/angular-localforage-tests.ts b/types/angular-localforage/angular-localforage-tests.ts similarity index 100% rename from angular-localforage/angular-localforage-tests.ts rename to types/angular-localforage/angular-localforage-tests.ts diff --git a/angular-localforage/index.d.ts b/types/angular-localforage/index.d.ts similarity index 100% rename from angular-localforage/index.d.ts rename to types/angular-localforage/index.d.ts diff --git a/types/angular-localforage/package.json b/types/angular-localforage/package.json new file mode 100644 index 0000000000..07bf3d2615 --- /dev/null +++ b/types/angular-localforage/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "localforage": "^1.5.0" + } +} \ No newline at end of file diff --git a/angular-localforage/tsconfig.json b/types/angular-localforage/tsconfig.json similarity index 100% rename from angular-localforage/tsconfig.json rename to types/angular-localforage/tsconfig.json diff --git a/angular-locker/angular-locker-tests.ts b/types/angular-locker/angular-locker-tests.ts similarity index 100% rename from angular-locker/angular-locker-tests.ts rename to types/angular-locker/angular-locker-tests.ts diff --git a/angular-locker/index.d.ts b/types/angular-locker/index.d.ts similarity index 100% rename from angular-locker/index.d.ts rename to types/angular-locker/index.d.ts diff --git a/angular-locker/tsconfig.json b/types/angular-locker/tsconfig.json similarity index 100% rename from angular-locker/tsconfig.json rename to types/angular-locker/tsconfig.json diff --git a/angular-material/angular-material-tests.ts b/types/angular-material/angular-material-tests.ts similarity index 100% rename from angular-material/angular-material-tests.ts rename to types/angular-material/angular-material-tests.ts diff --git a/angular-material/index.d.ts b/types/angular-material/index.d.ts similarity index 100% rename from angular-material/index.d.ts rename to types/angular-material/index.d.ts diff --git a/angular-material/tsconfig.json b/types/angular-material/tsconfig.json similarity index 100% rename from angular-material/tsconfig.json rename to types/angular-material/tsconfig.json diff --git a/angular-media-queries/angular-media-queries-tests.ts b/types/angular-media-queries/angular-media-queries-tests.ts similarity index 100% rename from angular-media-queries/angular-media-queries-tests.ts rename to types/angular-media-queries/angular-media-queries-tests.ts diff --git a/angular-media-queries/index.d.ts b/types/angular-media-queries/index.d.ts similarity index 100% rename from angular-media-queries/index.d.ts rename to types/angular-media-queries/index.d.ts diff --git a/angular-media-queries/tsconfig.json b/types/angular-media-queries/tsconfig.json similarity index 100% rename from angular-media-queries/tsconfig.json rename to types/angular-media-queries/tsconfig.json diff --git a/angular-meteor/angular-meteor-tests.ts b/types/angular-meteor/angular-meteor-tests.ts similarity index 100% rename from angular-meteor/angular-meteor-tests.ts rename to types/angular-meteor/angular-meteor-tests.ts diff --git a/angular-meteor/index.d.ts b/types/angular-meteor/index.d.ts similarity index 100% rename from angular-meteor/index.d.ts rename to types/angular-meteor/index.d.ts diff --git a/angular-meteor/tsconfig.json b/types/angular-meteor/tsconfig.json similarity index 100% rename from angular-meteor/tsconfig.json rename to types/angular-meteor/tsconfig.json diff --git a/angular-mocks/angular-mocks-tests.ts b/types/angular-mocks/angular-mocks-tests.ts similarity index 100% rename from angular-mocks/angular-mocks-tests.ts rename to types/angular-mocks/angular-mocks-tests.ts diff --git a/angular-mocks/index.d.ts b/types/angular-mocks/index.d.ts similarity index 100% rename from angular-mocks/index.d.ts rename to types/angular-mocks/index.d.ts diff --git a/angular-mocks/mocks.d.ts b/types/angular-mocks/mocks.d.ts similarity index 100% rename from angular-mocks/mocks.d.ts rename to types/angular-mocks/mocks.d.ts diff --git a/angular-mocks/tsconfig.json b/types/angular-mocks/tsconfig.json similarity index 100% rename from angular-mocks/tsconfig.json rename to types/angular-mocks/tsconfig.json diff --git a/angular-modal/angular-modal-tests.ts b/types/angular-modal/angular-modal-tests.ts similarity index 100% rename from angular-modal/angular-modal-tests.ts rename to types/angular-modal/angular-modal-tests.ts diff --git a/angular-modal/index.d.ts b/types/angular-modal/index.d.ts similarity index 100% rename from angular-modal/index.d.ts rename to types/angular-modal/index.d.ts diff --git a/angular-modal/tsconfig.json b/types/angular-modal/tsconfig.json similarity index 100% rename from angular-modal/tsconfig.json rename to types/angular-modal/tsconfig.json diff --git a/angular-notifications/angular-notifications-tests.ts b/types/angular-notifications/angular-notifications-tests.ts similarity index 100% rename from angular-notifications/angular-notifications-tests.ts rename to types/angular-notifications/angular-notifications-tests.ts diff --git a/angular-notifications/index.d.ts b/types/angular-notifications/index.d.ts similarity index 100% rename from angular-notifications/index.d.ts rename to types/angular-notifications/index.d.ts diff --git a/angular-notifications/tsconfig.json b/types/angular-notifications/tsconfig.json similarity index 100% rename from angular-notifications/tsconfig.json rename to types/angular-notifications/tsconfig.json diff --git a/angular-notify/angular-notify-tests.ts b/types/angular-notify/angular-notify-tests.ts similarity index 100% rename from angular-notify/angular-notify-tests.ts rename to types/angular-notify/angular-notify-tests.ts diff --git a/angular-notify/index.d.ts b/types/angular-notify/index.d.ts similarity index 100% rename from angular-notify/index.d.ts rename to types/angular-notify/index.d.ts diff --git a/angular-notify/tsconfig.json b/types/angular-notify/tsconfig.json similarity index 100% rename from angular-notify/tsconfig.json rename to types/angular-notify/tsconfig.json diff --git a/angular-oauth2/angular-oauth2-tests.ts b/types/angular-oauth2/angular-oauth2-tests.ts similarity index 100% rename from angular-oauth2/angular-oauth2-tests.ts rename to types/angular-oauth2/angular-oauth2-tests.ts diff --git a/angular-oauth2/index.d.ts b/types/angular-oauth2/index.d.ts similarity index 95% rename from angular-oauth2/index.d.ts rename to types/angular-oauth2/index.d.ts index e6b9592874..23df762df1 100644 --- a/angular-oauth2/index.d.ts +++ b/types/angular-oauth2/index.d.ts @@ -6,8 +6,8 @@ import * as angular from 'angular'; declare module 'angular' { - export namespace oauth2 { - interface OAuthConfig { + namespace oauth2 { + interface OAuthConfig { baseUrl: string; clientId: string; clientSecret?: string; @@ -43,7 +43,5 @@ declare module 'angular' { interface OAuthTokenProvider { configure(params: OAuthTokenConfig): OAuthTokenConfig; } - } } - diff --git a/angular-oauth2/tsconfig.json b/types/angular-oauth2/tsconfig.json similarity index 100% rename from angular-oauth2/tsconfig.json rename to types/angular-oauth2/tsconfig.json diff --git a/angular-oauth2/tslint.json b/types/angular-oauth2/tslint.json similarity index 100% rename from angular-oauth2/tslint.json rename to types/angular-oauth2/tslint.json diff --git a/angular-odata-resources/angular-odata-resources-tests.ts b/types/angular-odata-resources/angular-odata-resources-tests.ts similarity index 100% rename from angular-odata-resources/angular-odata-resources-tests.ts rename to types/angular-odata-resources/angular-odata-resources-tests.ts diff --git a/angular-odata-resources/index.d.ts b/types/angular-odata-resources/index.d.ts similarity index 100% rename from angular-odata-resources/index.d.ts rename to types/angular-odata-resources/index.d.ts diff --git a/angular-odata-resources/tsconfig.json b/types/angular-odata-resources/tsconfig.json similarity index 100% rename from angular-odata-resources/tsconfig.json rename to types/angular-odata-resources/tsconfig.json diff --git a/angular-permission/angular-permission-tests.ts b/types/angular-permission/angular-permission-tests.ts similarity index 100% rename from angular-permission/angular-permission-tests.ts rename to types/angular-permission/angular-permission-tests.ts diff --git a/angular-permission/index.d.ts b/types/angular-permission/index.d.ts similarity index 100% rename from angular-permission/index.d.ts rename to types/angular-permission/index.d.ts diff --git a/angular-permission/tsconfig.json b/types/angular-permission/tsconfig.json similarity index 100% rename from angular-permission/tsconfig.json rename to types/angular-permission/tsconfig.json diff --git a/angular-promise-tracker/angular-promise-tracker-tests.ts b/types/angular-promise-tracker/angular-promise-tracker-tests.ts similarity index 100% rename from angular-promise-tracker/angular-promise-tracker-tests.ts rename to types/angular-promise-tracker/angular-promise-tracker-tests.ts diff --git a/angular-promise-tracker/index.d.ts b/types/angular-promise-tracker/index.d.ts similarity index 100% rename from angular-promise-tracker/index.d.ts rename to types/angular-promise-tracker/index.d.ts diff --git a/angular-promise-tracker/tsconfig.json b/types/angular-promise-tracker/tsconfig.json similarity index 100% rename from angular-promise-tracker/tsconfig.json rename to types/angular-promise-tracker/tsconfig.json diff --git a/angular-q-spread/angular-q-spread-tests.ts b/types/angular-q-spread/angular-q-spread-tests.ts similarity index 100% rename from angular-q-spread/angular-q-spread-tests.ts rename to types/angular-q-spread/angular-q-spread-tests.ts diff --git a/angular-q-spread/index.d.ts b/types/angular-q-spread/index.d.ts similarity index 100% rename from angular-q-spread/index.d.ts rename to types/angular-q-spread/index.d.ts diff --git a/angular-q-spread/tsconfig.json b/types/angular-q-spread/tsconfig.json similarity index 100% rename from angular-q-spread/tsconfig.json rename to types/angular-q-spread/tsconfig.json diff --git a/angular-resource/angular-resource-tests.ts b/types/angular-resource/angular-resource-tests.ts similarity index 100% rename from angular-resource/angular-resource-tests.ts rename to types/angular-resource/angular-resource-tests.ts diff --git a/angular-resource/index.d.ts b/types/angular-resource/index.d.ts similarity index 100% rename from angular-resource/index.d.ts rename to types/angular-resource/index.d.ts diff --git a/angular-resource/tsconfig.json b/types/angular-resource/tsconfig.json similarity index 100% rename from angular-resource/tsconfig.json rename to types/angular-resource/tsconfig.json diff --git a/angular-route/angular-route-tests.ts b/types/angular-route/angular-route-tests.ts similarity index 100% rename from angular-route/angular-route-tests.ts rename to types/angular-route/angular-route-tests.ts diff --git a/angular-route/index.d.ts b/types/angular-route/index.d.ts similarity index 100% rename from angular-route/index.d.ts rename to types/angular-route/index.d.ts diff --git a/angular-route/tsconfig.json b/types/angular-route/tsconfig.json similarity index 100% rename from angular-route/tsconfig.json rename to types/angular-route/tsconfig.json diff --git a/angular-sanitize/angular-sanitize-tests.ts b/types/angular-sanitize/angular-sanitize-tests.ts similarity index 100% rename from angular-sanitize/angular-sanitize-tests.ts rename to types/angular-sanitize/angular-sanitize-tests.ts diff --git a/angular-sanitize/index.d.ts b/types/angular-sanitize/index.d.ts similarity index 100% rename from angular-sanitize/index.d.ts rename to types/angular-sanitize/index.d.ts diff --git a/angular-sanitize/tsconfig.json b/types/angular-sanitize/tsconfig.json similarity index 100% rename from angular-sanitize/tsconfig.json rename to types/angular-sanitize/tsconfig.json diff --git a/angular-scenario/index.d.ts b/types/angular-scenario/index.d.ts similarity index 100% rename from angular-scenario/index.d.ts rename to types/angular-scenario/index.d.ts diff --git a/angular-scenario/tsconfig.json b/types/angular-scenario/tsconfig.json similarity index 100% rename from angular-scenario/tsconfig.json rename to types/angular-scenario/tsconfig.json diff --git a/angular-scroll/angular-scroll-tests.ts b/types/angular-scroll/angular-scroll-tests.ts similarity index 100% rename from angular-scroll/angular-scroll-tests.ts rename to types/angular-scroll/angular-scroll-tests.ts diff --git a/angular-scroll/index.d.ts b/types/angular-scroll/index.d.ts similarity index 100% rename from angular-scroll/index.d.ts rename to types/angular-scroll/index.d.ts diff --git a/angular-scroll/tsconfig.json b/types/angular-scroll/tsconfig.json similarity index 100% rename from angular-scroll/tsconfig.json rename to types/angular-scroll/tsconfig.json diff --git a/angular-signalr-hub/angular-signalr-hub-tests.ts b/types/angular-signalr-hub/angular-signalr-hub-tests.ts similarity index 100% rename from angular-signalr-hub/angular-signalr-hub-tests.ts rename to types/angular-signalr-hub/angular-signalr-hub-tests.ts diff --git a/angular-signalr-hub/index.d.ts b/types/angular-signalr-hub/index.d.ts similarity index 100% rename from angular-signalr-hub/index.d.ts rename to types/angular-signalr-hub/index.d.ts diff --git a/angular-signalr-hub/tsconfig.json b/types/angular-signalr-hub/tsconfig.json similarity index 100% rename from angular-signalr-hub/tsconfig.json rename to types/angular-signalr-hub/tsconfig.json diff --git a/angular-spinner/angular-spinner-tests.ts b/types/angular-spinner/angular-spinner-tests.ts similarity index 100% rename from angular-spinner/angular-spinner-tests.ts rename to types/angular-spinner/angular-spinner-tests.ts diff --git a/angular-spinner/index.d.ts b/types/angular-spinner/index.d.ts similarity index 100% rename from angular-spinner/index.d.ts rename to types/angular-spinner/index.d.ts diff --git a/angular-spinner/tsconfig.json b/types/angular-spinner/tsconfig.json similarity index 100% rename from angular-spinner/tsconfig.json rename to types/angular-spinner/tsconfig.json diff --git a/angular-storage/angular-storage-tests.ts b/types/angular-storage/angular-storage-tests.ts similarity index 100% rename from angular-storage/angular-storage-tests.ts rename to types/angular-storage/angular-storage-tests.ts diff --git a/angular-storage/index.d.ts b/types/angular-storage/index.d.ts similarity index 100% rename from angular-storage/index.d.ts rename to types/angular-storage/index.d.ts diff --git a/angular-storage/tsconfig.json b/types/angular-storage/tsconfig.json similarity index 100% rename from angular-storage/tsconfig.json rename to types/angular-storage/tsconfig.json diff --git a/angular-strap/angular-strap-tests.ts b/types/angular-strap/angular-strap-tests.ts similarity index 100% rename from angular-strap/angular-strap-tests.ts rename to types/angular-strap/angular-strap-tests.ts diff --git a/angular-strap/index.d.ts b/types/angular-strap/index.d.ts similarity index 100% rename from angular-strap/index.d.ts rename to types/angular-strap/index.d.ts diff --git a/angular-strap/tsconfig.json b/types/angular-strap/tsconfig.json similarity index 100% rename from angular-strap/tsconfig.json rename to types/angular-strap/tsconfig.json diff --git a/angular-toastr/angular-toastr-tests.ts b/types/angular-toastr/angular-toastr-tests.ts similarity index 100% rename from angular-toastr/angular-toastr-tests.ts rename to types/angular-toastr/angular-toastr-tests.ts diff --git a/angular-toastr/index.d.ts b/types/angular-toastr/index.d.ts similarity index 100% rename from angular-toastr/index.d.ts rename to types/angular-toastr/index.d.ts diff --git a/angular-toastr/tsconfig.json b/types/angular-toastr/tsconfig.json similarity index 100% rename from angular-toastr/tsconfig.json rename to types/angular-toastr/tsconfig.json diff --git a/angular-toasty/angular-toasty-tests.ts b/types/angular-toasty/angular-toasty-tests.ts similarity index 100% rename from angular-toasty/angular-toasty-tests.ts rename to types/angular-toasty/angular-toasty-tests.ts diff --git a/angular-toasty/index.d.ts b/types/angular-toasty/index.d.ts similarity index 100% rename from angular-toasty/index.d.ts rename to types/angular-toasty/index.d.ts diff --git a/angular-toasty/tsconfig.json b/types/angular-toasty/tsconfig.json similarity index 100% rename from angular-toasty/tsconfig.json rename to types/angular-toasty/tsconfig.json diff --git a/angular-touchspin/angular-touchspin-tests.ts b/types/angular-touchspin/angular-touchspin-tests.ts similarity index 100% rename from angular-touchspin/angular-touchspin-tests.ts rename to types/angular-touchspin/angular-touchspin-tests.ts diff --git a/angular-touchspin/index.d.ts b/types/angular-touchspin/index.d.ts similarity index 100% rename from angular-touchspin/index.d.ts rename to types/angular-touchspin/index.d.ts diff --git a/angular-touchspin/tsconfig.json b/types/angular-touchspin/tsconfig.json similarity index 100% rename from angular-touchspin/tsconfig.json rename to types/angular-touchspin/tsconfig.json diff --git a/angular-translate/angular-translate-tests.ts b/types/angular-translate/angular-translate-tests.ts similarity index 100% rename from angular-translate/angular-translate-tests.ts rename to types/angular-translate/angular-translate-tests.ts diff --git a/angular-translate/index.d.ts b/types/angular-translate/index.d.ts similarity index 100% rename from angular-translate/index.d.ts rename to types/angular-translate/index.d.ts diff --git a/angular-translate/tsconfig.json b/types/angular-translate/tsconfig.json similarity index 100% rename from angular-translate/tsconfig.json rename to types/angular-translate/tsconfig.json diff --git a/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts b/types/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts similarity index 100% rename from angular-ui-bootstrap/angular-ui-bootstrap-tests.ts rename to types/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts diff --git a/angular-ui-bootstrap/index.d.ts b/types/angular-ui-bootstrap/index.d.ts similarity index 97% rename from angular-ui-bootstrap/index.d.ts rename to types/angular-ui-bootstrap/index.d.ts index bc80d96b5a..1e4d15d282 100644 --- a/angular-ui-bootstrap/index.d.ts +++ b/types/angular-ui-bootstrap/index.d.ts @@ -15,6 +15,7 @@ export type IDropdownConfig = angular.ui.bootstrap.IDropdownConfig; export type IModalProvider = angular.ui.bootstrap.IModalProvider; export type IModalService = angular.ui.bootstrap.IModalService; export type IModalServiceInstance = angular.ui.bootstrap.IModalServiceInstance; +export type IModalInstanceService = angular.ui.bootstrap.IModalInstanceService; export type IModalScope = angular.ui.bootstrap.IModalScope; export type IModalSettings = angular.ui.bootstrap.IModalSettings; export type IModalStackService = angular.ui.bootstrap.IModalStackService; @@ -320,12 +321,12 @@ declare module 'angular' { interface IModalService { /** * @param {IModalSettings} options - * @returns {IModalServiceInstance} + * @returns {IModalInstanceService} */ - open(options: IModalSettings): IModalServiceInstance; + open(options: IModalSettings): IModalInstanceService; } - interface IModalServiceInstance { + interface IModalInstanceService { /** * A method that can be used to close a modal, passing a result. If `preventDefault` is called on the `modal.closing` event then the modal will remain open. */ @@ -357,6 +358,11 @@ declare module 'angular' { closed: angular.IPromise; } + /** + * @deprecated use IModalInstanceService instead. + */ + interface IModalServiceInstance extends IModalInstanceService { } + interface IModalScope extends angular.IScope { /** * Dismiss the dialog without assigning a value to the promise output. If `preventDefault` is called on the `modal.closing` event then the modal will remain open. @@ -512,17 +518,17 @@ declare module 'angular' { /** * Opens a new modal instance. */ - open(modalInstance: IModalServiceInstance, modal: any): void; + open(modalInstance: IModalInstanceService, modal: any): void; /** * Closes a modal instance with an optional result. */ - close(modalInstance: IModalServiceInstance, result?: any): void; + close(modalInstance: IModalInstanceService, result?: any): void; /** * Dismisses a modal instance with an optional reason. */ - dismiss(modalInstance: IModalServiceInstance, reason?: any): void; + dismiss(modalInstance: IModalInstanceService, reason?: any): void; /** * Dismiss all open modal instances with an optional reason that will be passed to each instance. @@ -536,7 +542,7 @@ declare module 'angular' { } interface IModalStackedMapKeyValuePair { - key: IModalServiceInstance; + key: IModalInstanceService; value: any; } diff --git a/angular-ui-bootstrap/tsconfig.json b/types/angular-ui-bootstrap/tsconfig.json similarity index 100% rename from angular-ui-bootstrap/tsconfig.json rename to types/angular-ui-bootstrap/tsconfig.json diff --git a/angular-ui-notification/angular-ui-notification-tests.ts b/types/angular-ui-notification/angular-ui-notification-tests.ts similarity index 100% rename from angular-ui-notification/angular-ui-notification-tests.ts rename to types/angular-ui-notification/angular-ui-notification-tests.ts diff --git a/angular-ui-notification/index.d.ts b/types/angular-ui-notification/index.d.ts similarity index 100% rename from angular-ui-notification/index.d.ts rename to types/angular-ui-notification/index.d.ts diff --git a/angular-ui-notification/tsconfig.json b/types/angular-ui-notification/tsconfig.json similarity index 100% rename from angular-ui-notification/tsconfig.json rename to types/angular-ui-notification/tsconfig.json diff --git a/angular-ui-router-default/angular-ui-router-default-tests.ts b/types/angular-ui-router-default/angular-ui-router-default-tests.ts similarity index 100% rename from angular-ui-router-default/angular-ui-router-default-tests.ts rename to types/angular-ui-router-default/angular-ui-router-default-tests.ts diff --git a/angular-ui-router-default/index.d.ts b/types/angular-ui-router-default/index.d.ts similarity index 100% rename from angular-ui-router-default/index.d.ts rename to types/angular-ui-router-default/index.d.ts diff --git a/angular-ui-router-default/tsconfig.json b/types/angular-ui-router-default/tsconfig.json similarity index 100% rename from angular-ui-router-default/tsconfig.json rename to types/angular-ui-router-default/tsconfig.json diff --git a/angular-ui-router-uib-modal/angular-ui-router-uib-modal-tests.ts b/types/angular-ui-router-uib-modal/angular-ui-router-uib-modal-tests.ts similarity index 100% rename from angular-ui-router-uib-modal/angular-ui-router-uib-modal-tests.ts rename to types/angular-ui-router-uib-modal/angular-ui-router-uib-modal-tests.ts diff --git a/angular-ui-router-uib-modal/index.d.ts b/types/angular-ui-router-uib-modal/index.d.ts similarity index 100% rename from angular-ui-router-uib-modal/index.d.ts rename to types/angular-ui-router-uib-modal/index.d.ts diff --git a/angular-ui-router-uib-modal/tsconfig.json b/types/angular-ui-router-uib-modal/tsconfig.json similarity index 100% rename from angular-ui-router-uib-modal/tsconfig.json rename to types/angular-ui-router-uib-modal/tsconfig.json diff --git a/angular-ui-router/angular-ui-router-tests.ts b/types/angular-ui-router/angular-ui-router-tests.ts similarity index 100% rename from angular-ui-router/angular-ui-router-tests.ts rename to types/angular-ui-router/angular-ui-router-tests.ts diff --git a/angular-ui-router/index.d.ts b/types/angular-ui-router/index.d.ts similarity index 100% rename from angular-ui-router/index.d.ts rename to types/angular-ui-router/index.d.ts diff --git a/angular-ui-router/tsconfig.json b/types/angular-ui-router/tsconfig.json similarity index 100% rename from angular-ui-router/tsconfig.json rename to types/angular-ui-router/tsconfig.json diff --git a/angular-ui-scroll/angular-ui-scroll-tests.ts b/types/angular-ui-scroll/angular-ui-scroll-tests.ts similarity index 100% rename from angular-ui-scroll/angular-ui-scroll-tests.ts rename to types/angular-ui-scroll/angular-ui-scroll-tests.ts diff --git a/angular-ui-scroll/index.d.ts b/types/angular-ui-scroll/index.d.ts similarity index 100% rename from angular-ui-scroll/index.d.ts rename to types/angular-ui-scroll/index.d.ts diff --git a/angular-ui-scroll/tsconfig.json b/types/angular-ui-scroll/tsconfig.json similarity index 100% rename from angular-ui-scroll/tsconfig.json rename to types/angular-ui-scroll/tsconfig.json diff --git a/angular-ui-sortable/angular-ui-sortable-tests.ts b/types/angular-ui-sortable/angular-ui-sortable-tests.ts similarity index 100% rename from angular-ui-sortable/angular-ui-sortable-tests.ts rename to types/angular-ui-sortable/angular-ui-sortable-tests.ts diff --git a/angular-ui-sortable/index.d.ts b/types/angular-ui-sortable/index.d.ts similarity index 100% rename from angular-ui-sortable/index.d.ts rename to types/angular-ui-sortable/index.d.ts diff --git a/angular-ui-sortable/tsconfig.json b/types/angular-ui-sortable/tsconfig.json similarity index 100% rename from angular-ui-sortable/tsconfig.json rename to types/angular-ui-sortable/tsconfig.json diff --git a/angular-ui-tree/angular-ui-tree-tests.ts b/types/angular-ui-tree/angular-ui-tree-tests.ts similarity index 100% rename from angular-ui-tree/angular-ui-tree-tests.ts rename to types/angular-ui-tree/angular-ui-tree-tests.ts diff --git a/angular-ui-tree/index.d.ts b/types/angular-ui-tree/index.d.ts similarity index 100% rename from angular-ui-tree/index.d.ts rename to types/angular-ui-tree/index.d.ts diff --git a/angular-ui-tree/tsconfig.json b/types/angular-ui-tree/tsconfig.json similarity index 100% rename from angular-ui-tree/tsconfig.json rename to types/angular-ui-tree/tsconfig.json diff --git a/angular-websocket/angular-websocket-tests.ts b/types/angular-websocket/angular-websocket-tests.ts similarity index 100% rename from angular-websocket/angular-websocket-tests.ts rename to types/angular-websocket/angular-websocket-tests.ts diff --git a/angular-websocket/index.d.ts b/types/angular-websocket/index.d.ts similarity index 100% rename from angular-websocket/index.d.ts rename to types/angular-websocket/index.d.ts diff --git a/angular-websocket/tsconfig.json b/types/angular-websocket/tsconfig.json similarity index 100% rename from angular-websocket/tsconfig.json rename to types/angular-websocket/tsconfig.json diff --git a/angular-wizard/angular-wizard-tests.ts b/types/angular-wizard/angular-wizard-tests.ts similarity index 100% rename from angular-wizard/angular-wizard-tests.ts rename to types/angular-wizard/angular-wizard-tests.ts diff --git a/angular-wizard/index.d.ts b/types/angular-wizard/index.d.ts similarity index 100% rename from angular-wizard/index.d.ts rename to types/angular-wizard/index.d.ts diff --git a/angular-wizard/tsconfig.json b/types/angular-wizard/tsconfig.json similarity index 100% rename from angular-wizard/tsconfig.json rename to types/angular-wizard/tsconfig.json diff --git a/angular-xeditable/angular-xeditable-tests.ts b/types/angular-xeditable/angular-xeditable-tests.ts similarity index 100% rename from angular-xeditable/angular-xeditable-tests.ts rename to types/angular-xeditable/angular-xeditable-tests.ts diff --git a/angular-xeditable/index.d.ts b/types/angular-xeditable/index.d.ts similarity index 100% rename from angular-xeditable/index.d.ts rename to types/angular-xeditable/index.d.ts diff --git a/angular-xeditable/tsconfig.json b/types/angular-xeditable/tsconfig.json similarity index 100% rename from angular-xeditable/tsconfig.json rename to types/angular-xeditable/tsconfig.json diff --git a/angular.throttle/angular.throttle-tests.ts b/types/angular.throttle/angular.throttle-tests.ts similarity index 100% rename from angular.throttle/angular.throttle-tests.ts rename to types/angular.throttle/angular.throttle-tests.ts diff --git a/angular.throttle/index.d.ts b/types/angular.throttle/index.d.ts similarity index 100% rename from angular.throttle/index.d.ts rename to types/angular.throttle/index.d.ts diff --git a/angular.throttle/tsconfig.json b/types/angular.throttle/tsconfig.json similarity index 100% rename from angular.throttle/tsconfig.json rename to types/angular.throttle/tsconfig.json diff --git a/angular/README.md b/types/angular/README.md similarity index 100% rename from angular/README.md rename to types/angular/README.md diff --git a/angular/UNUSED_FILES.txt b/types/angular/UNUSED_FILES.txt similarity index 100% rename from angular/UNUSED_FILES.txt rename to types/angular/UNUSED_FILES.txt diff --git a/angular/angular-component-router.d.ts b/types/angular/angular-component-router.d.ts similarity index 99% rename from angular/angular-component-router.d.ts rename to types/angular/angular-component-router.d.ts index 92458331d6..da3afc7a71 100644 --- a/angular/angular-component-router.d.ts +++ b/types/angular/angular-component-router.d.ts @@ -178,6 +178,7 @@ declare namespace angular { registry: RouteRegistry; parent: Router; hostComponent: any; + currentInstruction: Instruction; /** * Constructs a child router. You probably don't need to use this unless you're writing a reusable diff --git a/angular/angular-tests.ts b/types/angular/angular-tests.ts similarity index 100% rename from angular/angular-tests.ts rename to types/angular/angular-tests.ts diff --git a/angular/index.d.ts b/types/angular/index.d.ts similarity index 99% rename from angular/index.d.ts rename to types/angular/index.d.ts index 5d47751844..485ad9ebb3 100644 --- a/angular/index.d.ts +++ b/types/angular/index.d.ts @@ -26,7 +26,6 @@ import ng = angular; // ng module (angular.js) /////////////////////////////////////////////////////////////////////////////// declare namespace angular { - type Injectable = T | Array; // not directly implemented, but ensures that constructed class implements $get @@ -344,7 +343,6 @@ declare namespace angular { * see https://docs.angularjs.org/api/ng/type/form.FormController */ interface IFormController { - /** * Indexer which should return ng.INgModelController for most properties but cannot because of "All named properties must be assignable to string indexer type" constraint - see https://github.com/Microsoft/TypeScript/issues/272 */ @@ -532,7 +530,6 @@ declare namespace angular { * see https://docs.angularjs.org/api/ng/directive/ngRepeat */ interface IRepeatScope extends IScope { - /** * iterator offset of the repeated element (0..length-1). */ @@ -562,7 +559,6 @@ declare namespace angular { * true if the iterator position $index is odd (otherwise false). */ $odd: boolean; - } interface IAngularEvent { @@ -1944,8 +1940,7 @@ declare namespace angular { /////////////////////////////////////////////////////////////////////////// // AUTO module (angular.js) /////////////////////////////////////////////////////////////////////////// - export namespace auto { - + namespace auto { /////////////////////////////////////////////////////////////////////// // InjectorService // see http://docs.angularjs.org/api/AUTO.$injector diff --git a/angular/tsconfig.json b/types/angular/tsconfig.json similarity index 100% rename from angular/tsconfig.json rename to types/angular/tsconfig.json diff --git a/angular/tslint.json b/types/angular/tslint.json similarity index 100% rename from angular/tslint.json rename to types/angular/tslint.json diff --git a/angularfire/angularfire-tests.ts b/types/angularfire/angularfire-tests.ts similarity index 100% rename from angularfire/angularfire-tests.ts rename to types/angularfire/angularfire-tests.ts diff --git a/angularfire/index.d.ts b/types/angularfire/index.d.ts similarity index 100% rename from angularfire/index.d.ts rename to types/angularfire/index.d.ts diff --git a/angularfire/tsconfig.json b/types/angularfire/tsconfig.json similarity index 100% rename from angularfire/tsconfig.json rename to types/angularfire/tsconfig.json diff --git a/angularlocalstorage/angularlocalstorage-tests.ts b/types/angularlocalstorage/angularlocalstorage-tests.ts similarity index 100% rename from angularlocalstorage/angularlocalstorage-tests.ts rename to types/angularlocalstorage/angularlocalstorage-tests.ts diff --git a/angularlocalstorage/index.d.ts b/types/angularlocalstorage/index.d.ts similarity index 100% rename from angularlocalstorage/index.d.ts rename to types/angularlocalstorage/index.d.ts diff --git a/angularlocalstorage/tsconfig.json b/types/angularlocalstorage/tsconfig.json similarity index 100% rename from angularlocalstorage/tsconfig.json rename to types/angularlocalstorage/tsconfig.json diff --git a/angulartics/angulartics-tests.ts b/types/angulartics/angulartics-tests.ts similarity index 100% rename from angulartics/angulartics-tests.ts rename to types/angulartics/angulartics-tests.ts diff --git a/angulartics/index.d.ts b/types/angulartics/index.d.ts similarity index 100% rename from angulartics/index.d.ts rename to types/angulartics/index.d.ts diff --git a/angulartics/tsconfig.json b/types/angulartics/tsconfig.json similarity index 100% rename from angulartics/tsconfig.json rename to types/angulartics/tsconfig.json diff --git a/animation-frame/animation-frame-tests.ts b/types/animation-frame/animation-frame-tests.ts similarity index 100% rename from animation-frame/animation-frame-tests.ts rename to types/animation-frame/animation-frame-tests.ts diff --git a/animation-frame/index.d.ts b/types/animation-frame/index.d.ts similarity index 100% rename from animation-frame/index.d.ts rename to types/animation-frame/index.d.ts diff --git a/animation-frame/tsconfig.json b/types/animation-frame/tsconfig.json similarity index 100% rename from animation-frame/tsconfig.json rename to types/animation-frame/tsconfig.json diff --git a/ansi-styles/ansi-styles-tests.ts b/types/ansi-styles/ansi-styles-tests.ts similarity index 100% rename from ansi-styles/ansi-styles-tests.ts rename to types/ansi-styles/ansi-styles-tests.ts diff --git a/ansi-styles/index.d.ts b/types/ansi-styles/index.d.ts similarity index 100% rename from ansi-styles/index.d.ts rename to types/ansi-styles/index.d.ts diff --git a/ansi-styles/tsconfig.json b/types/ansi-styles/tsconfig.json similarity index 100% rename from ansi-styles/tsconfig.json rename to types/ansi-styles/tsconfig.json diff --git a/ansicolors/index.d.ts b/types/ansicolors/index.d.ts similarity index 100% rename from ansicolors/index.d.ts rename to types/ansicolors/index.d.ts diff --git a/ansicolors/tsconfig.json b/types/ansicolors/tsconfig.json similarity index 100% rename from ansicolors/tsconfig.json rename to types/ansicolors/tsconfig.json diff --git a/any-db-transaction/any-db-transaction-tests.ts b/types/any-db-transaction/any-db-transaction-tests.ts similarity index 100% rename from any-db-transaction/any-db-transaction-tests.ts rename to types/any-db-transaction/any-db-transaction-tests.ts diff --git a/any-db-transaction/index.d.ts b/types/any-db-transaction/index.d.ts similarity index 100% rename from any-db-transaction/index.d.ts rename to types/any-db-transaction/index.d.ts diff --git a/any-db-transaction/tsconfig.json b/types/any-db-transaction/tsconfig.json similarity index 100% rename from any-db-transaction/tsconfig.json rename to types/any-db-transaction/tsconfig.json diff --git a/any-db/any-db-tests.ts b/types/any-db/any-db-tests.ts similarity index 100% rename from any-db/any-db-tests.ts rename to types/any-db/any-db-tests.ts diff --git a/any-db/index.d.ts b/types/any-db/index.d.ts similarity index 100% rename from any-db/index.d.ts rename to types/any-db/index.d.ts diff --git a/any-db/tsconfig.json b/types/any-db/tsconfig.json similarity index 100% rename from any-db/tsconfig.json rename to types/any-db/tsconfig.json diff --git a/anybar/anybar-tests.ts b/types/anybar/anybar-tests.ts similarity index 100% rename from anybar/anybar-tests.ts rename to types/anybar/anybar-tests.ts diff --git a/anybar/index.d.ts b/types/anybar/index.d.ts similarity index 100% rename from anybar/index.d.ts rename to types/anybar/index.d.ts diff --git a/anybar/tsconfig.json b/types/anybar/tsconfig.json similarity index 100% rename from anybar/tsconfig.json rename to types/anybar/tsconfig.json diff --git a/anydb-sql-migrations/anydb-sql-migrations-tests.ts b/types/anydb-sql-migrations/anydb-sql-migrations-tests.ts similarity index 100% rename from anydb-sql-migrations/anydb-sql-migrations-tests.ts rename to types/anydb-sql-migrations/anydb-sql-migrations-tests.ts diff --git a/anydb-sql-migrations/index.d.ts b/types/anydb-sql-migrations/index.d.ts similarity index 100% rename from anydb-sql-migrations/index.d.ts rename to types/anydb-sql-migrations/index.d.ts diff --git a/anydb-sql-migrations/tsconfig.json b/types/anydb-sql-migrations/tsconfig.json similarity index 100% rename from anydb-sql-migrations/tsconfig.json rename to types/anydb-sql-migrations/tsconfig.json diff --git a/anydb-sql/anydb-sql-tests.ts b/types/anydb-sql/anydb-sql-tests.ts similarity index 100% rename from anydb-sql/anydb-sql-tests.ts rename to types/anydb-sql/anydb-sql-tests.ts diff --git a/anydb-sql/index.d.ts b/types/anydb-sql/index.d.ts similarity index 100% rename from anydb-sql/index.d.ts rename to types/anydb-sql/index.d.ts diff --git a/anydb-sql/tsconfig.json b/types/anydb-sql/tsconfig.json similarity index 100% rename from anydb-sql/tsconfig.json rename to types/anydb-sql/tsconfig.json diff --git a/apex.js/apex.js-tests.ts b/types/apex.js/apex.js-tests.ts similarity index 100% rename from apex.js/apex.js-tests.ts rename to types/apex.js/apex.js-tests.ts diff --git a/apex.js/index.d.ts b/types/apex.js/index.d.ts similarity index 100% rename from apex.js/index.d.ts rename to types/apex.js/index.d.ts diff --git a/apex.js/tsconfig.json b/types/apex.js/tsconfig.json similarity index 100% rename from apex.js/tsconfig.json rename to types/apex.js/tsconfig.json diff --git a/apex.js/tslint.json b/types/apex.js/tslint.json similarity index 100% rename from apex.js/tslint.json rename to types/apex.js/tslint.json diff --git a/aphrodite/aphrodite-tests.tsx b/types/aphrodite/aphrodite-tests.tsx similarity index 100% rename from aphrodite/aphrodite-tests.tsx rename to types/aphrodite/aphrodite-tests.tsx diff --git a/aphrodite/index.d.ts b/types/aphrodite/index.d.ts similarity index 100% rename from aphrodite/index.d.ts rename to types/aphrodite/index.d.ts diff --git a/aphrodite/no-important/index.d.ts b/types/aphrodite/no-important/index.d.ts similarity index 100% rename from aphrodite/no-important/index.d.ts rename to types/aphrodite/no-important/index.d.ts diff --git a/aphrodite/tsconfig.json b/types/aphrodite/tsconfig.json similarity index 100% rename from aphrodite/tsconfig.json rename to types/aphrodite/tsconfig.json diff --git a/api-error-handler/api-error-handler-tests.ts b/types/api-error-handler/api-error-handler-tests.ts similarity index 100% rename from api-error-handler/api-error-handler-tests.ts rename to types/api-error-handler/api-error-handler-tests.ts diff --git a/api-error-handler/index.d.ts b/types/api-error-handler/index.d.ts similarity index 100% rename from api-error-handler/index.d.ts rename to types/api-error-handler/index.d.ts diff --git a/api-error-handler/tsconfig.json b/types/api-error-handler/tsconfig.json similarity index 100% rename from api-error-handler/tsconfig.json rename to types/api-error-handler/tsconfig.json diff --git a/apigee-access/apigee-access-tests.ts b/types/apigee-access/apigee-access-tests.ts similarity index 100% rename from apigee-access/apigee-access-tests.ts rename to types/apigee-access/apigee-access-tests.ts diff --git a/apigee-access/index.d.ts b/types/apigee-access/index.d.ts similarity index 100% rename from apigee-access/index.d.ts rename to types/apigee-access/index.d.ts diff --git a/apigee-access/tsconfig.json b/types/apigee-access/tsconfig.json similarity index 100% rename from apigee-access/tsconfig.json rename to types/apigee-access/tsconfig.json diff --git a/apn/apn-tests.ts b/types/apn/apn-tests.ts similarity index 100% rename from apn/apn-tests.ts rename to types/apn/apn-tests.ts diff --git a/apn/index.d.ts b/types/apn/index.d.ts similarity index 100% rename from apn/index.d.ts rename to types/apn/index.d.ts diff --git a/apn/tsconfig.json b/types/apn/tsconfig.json similarity index 100% rename from apn/tsconfig.json rename to types/apn/tsconfig.json diff --git a/app-root-path/app-root-path-tests.ts b/types/app-root-path/app-root-path-tests.ts similarity index 100% rename from app-root-path/app-root-path-tests.ts rename to types/app-root-path/app-root-path-tests.ts diff --git a/app-root-path/index.d.ts b/types/app-root-path/index.d.ts similarity index 100% rename from app-root-path/index.d.ts rename to types/app-root-path/index.d.ts diff --git a/app-root-path/tsconfig.json b/types/app-root-path/tsconfig.json similarity index 100% rename from app-root-path/tsconfig.json rename to types/app-root-path/tsconfig.json diff --git a/appframework/appframework-tests.ts b/types/appframework/appframework-tests.ts similarity index 100% rename from appframework/appframework-tests.ts rename to types/appframework/appframework-tests.ts diff --git a/appframework/index.d.ts b/types/appframework/index.d.ts similarity index 100% rename from appframework/index.d.ts rename to types/appframework/index.d.ts diff --git a/appframework/tsconfig.json b/types/appframework/tsconfig.json similarity index 100% rename from appframework/tsconfig.json rename to types/appframework/tsconfig.json diff --git a/appletvjs/README.md b/types/appletvjs/README.md similarity index 100% rename from appletvjs/README.md rename to types/appletvjs/README.md diff --git a/appletvjs/appletvjs-tests.ts b/types/appletvjs/appletvjs-tests.ts similarity index 100% rename from appletvjs/appletvjs-tests.ts rename to types/appletvjs/appletvjs-tests.ts diff --git a/appletvjs/index.d.ts b/types/appletvjs/index.d.ts similarity index 100% rename from appletvjs/index.d.ts rename to types/appletvjs/index.d.ts diff --git a/appletvjs/tsconfig.json b/types/appletvjs/tsconfig.json similarity index 100% rename from appletvjs/tsconfig.json rename to types/appletvjs/tsconfig.json diff --git a/applicationinsights-js/applicationinsights-js-tests.ts b/types/applicationinsights-js/applicationinsights-js-tests.ts similarity index 95% rename from applicationinsights-js/applicationinsights-js-tests.ts rename to types/applicationinsights-js/applicationinsights-js-tests.ts index 06a7d06bc5..66bc1f268d 100644 --- a/applicationinsights-js/applicationinsights-js-tests.ts +++ b/types/applicationinsights-js/applicationinsights-js-tests.ts @@ -31,7 +31,7 @@ var config: Microsoft.ApplicationInsights.IConfig = { }; var appInsights: Microsoft.ApplicationInsights.IAppInsights = { - config: config, + config, context: null, queue: null, @@ -128,7 +128,8 @@ context.track(eventEnvelope); // track exception var exceptionObj = new Microsoft.ApplicationInsights.Telemetry.Exception(new Error(), "handledAt", null, null, AI.SeverityLevel.Critical); -var exceptionData = new Microsoft.ApplicationInsights.Telemetry.Common.Data(Microsoft.ApplicationInsights.Telemetry.Exception.dataType, exceptionObj); +var exceptionData = new Microsoft.ApplicationInsights.Telemetry.Common.Data( + Microsoft.ApplicationInsights.Telemetry.Exception.dataType, exceptionObj); var exceptionEnvelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(exceptionData, Microsoft.ApplicationInsights.Telemetry.Exception.envelopeType); context.track(exceptionEnvelope); @@ -146,13 +147,15 @@ context.track(pageViewEnvelope); // track page view performance var pageViewPerfObj = new Microsoft.ApplicationInsights.Telemetry.PageViewPerformance("page name", "url", 999, null, null); -var pageViewPerfData = new Microsoft.ApplicationInsights.Telemetry.Common.Data(Microsoft.ApplicationInsights.Telemetry.PageViewPerformance.dataType, pageViewPerfObj); +var pageViewPerfData = new Microsoft.ApplicationInsights.Telemetry.Common.Data( + Microsoft.ApplicationInsights.Telemetry.PageViewPerformance.dataType, pageViewPerfObj); var pageViewPerfEnvelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(pageViewPerfData, Microsoft.ApplicationInsights.Telemetry.PageViewPerformance.envelopeType); context.track(pageViewPerfEnvelope); // track remote dependency var remoteDepObj = new Microsoft.ApplicationInsights.Telemetry.RemoteDependencyData("id", "url", "command", 1, true, 1234, "GET"); -var remoteDepData = new Microsoft.ApplicationInsights.Telemetry.Common.Data(Microsoft.ApplicationInsights.Telemetry.RemoteDependencyData.dataType, remoteDepObj); +var remoteDepData = new Microsoft.ApplicationInsights.Telemetry.Common.Data( + Microsoft.ApplicationInsights.Telemetry.RemoteDependencyData.dataType, remoteDepObj); var remoteDepEnvelope = new Microsoft.ApplicationInsights.Telemetry.Common.Envelope(remoteDepData, Microsoft.ApplicationInsights.Telemetry.RemoteDependencyData.envelopeType); context.track(pageViewPerfEnvelope); diff --git a/applicationinsights-js/index.d.ts b/types/applicationinsights-js/index.d.ts similarity index 99% rename from applicationinsights-js/index.d.ts rename to types/applicationinsights-js/index.d.ts index c032919618..ede1584bb5 100644 --- a/applicationinsights-js/index.d.ts +++ b/types/applicationinsights-js/index.d.ts @@ -306,7 +306,6 @@ declare module Microsoft.Telemetry { } declare module Microsoft.ApplicationInsights.Telemetry { - class Event implements Microsoft.ApplicationInsights.ISerializable { static envelopeType: string; static dataType: string; @@ -794,7 +793,7 @@ declare module Microsoft.ApplicationInsights { } declare module 'applicationinsights-js' { - export let AppInsights: Microsoft.ApplicationInsights.IAppInsights; + const AppInsights: Microsoft.ApplicationInsights.IAppInsights; } declare var appInsights: Microsoft.ApplicationInsights.IAppInsights; \ No newline at end of file diff --git a/applicationinsights-js/tsconfig.json b/types/applicationinsights-js/tsconfig.json similarity index 100% rename from applicationinsights-js/tsconfig.json rename to types/applicationinsights-js/tsconfig.json diff --git a/applicationinsights-js/tslint.json b/types/applicationinsights-js/tslint.json similarity index 100% rename from applicationinsights-js/tslint.json rename to types/applicationinsights-js/tslint.json diff --git a/applicationinsights/applicationinsights-tests.ts b/types/applicationinsights/applicationinsights-tests.ts similarity index 100% rename from applicationinsights/applicationinsights-tests.ts rename to types/applicationinsights/applicationinsights-tests.ts diff --git a/applicationinsights/index.d.ts b/types/applicationinsights/index.d.ts similarity index 100% rename from applicationinsights/index.d.ts rename to types/applicationinsights/index.d.ts diff --git a/applicationinsights/tsconfig.json b/types/applicationinsights/tsconfig.json similarity index 100% rename from applicationinsights/tsconfig.json rename to types/applicationinsights/tsconfig.json diff --git a/arbiter/arbiter-tests.ts b/types/arbiter/arbiter-tests.ts similarity index 100% rename from arbiter/arbiter-tests.ts rename to types/arbiter/arbiter-tests.ts diff --git a/arbiter/index.d.ts b/types/arbiter/index.d.ts similarity index 100% rename from arbiter/index.d.ts rename to types/arbiter/index.d.ts diff --git a/arbiter/tsconfig.json b/types/arbiter/tsconfig.json similarity index 100% rename from arbiter/tsconfig.json rename to types/arbiter/tsconfig.json diff --git a/arcgis-js-api/arcgis-js-api-tests.ts b/types/arcgis-js-api/arcgis-js-api-tests.ts similarity index 100% rename from arcgis-js-api/arcgis-js-api-tests.ts rename to types/arcgis-js-api/arcgis-js-api-tests.ts diff --git a/arcgis-js-api/index.d.ts b/types/arcgis-js-api/index.d.ts similarity index 100% rename from arcgis-js-api/index.d.ts rename to types/arcgis-js-api/index.d.ts diff --git a/arcgis-js-api/tsconfig.json b/types/arcgis-js-api/tsconfig.json similarity index 100% rename from arcgis-js-api/tsconfig.json rename to types/arcgis-js-api/tsconfig.json diff --git a/arcgis-js-api/v3/arcgis-js-api-tests.ts b/types/arcgis-js-api/v3/arcgis-js-api-tests.ts similarity index 100% rename from arcgis-js-api/v3/arcgis-js-api-tests.ts rename to types/arcgis-js-api/v3/arcgis-js-api-tests.ts diff --git a/arcgis-js-api/v3/index.d.ts b/types/arcgis-js-api/v3/index.d.ts similarity index 100% rename from arcgis-js-api/v3/index.d.ts rename to types/arcgis-js-api/v3/index.d.ts diff --git a/arcgis-js-api/v3/tsconfig.json b/types/arcgis-js-api/v3/tsconfig.json similarity index 100% rename from arcgis-js-api/v3/tsconfig.json rename to types/arcgis-js-api/v3/tsconfig.json diff --git a/arcgis-rest-api/arcgis-rest-api-tests.ts b/types/arcgis-rest-api/arcgis-rest-api-tests.ts similarity index 100% rename from arcgis-rest-api/arcgis-rest-api-tests.ts rename to types/arcgis-rest-api/arcgis-rest-api-tests.ts diff --git a/arcgis-rest-api/index.d.ts b/types/arcgis-rest-api/index.d.ts similarity index 100% rename from arcgis-rest-api/index.d.ts rename to types/arcgis-rest-api/index.d.ts diff --git a/arcgis-rest-api/tsconfig.json b/types/arcgis-rest-api/tsconfig.json similarity index 100% rename from arcgis-rest-api/tsconfig.json rename to types/arcgis-rest-api/tsconfig.json diff --git a/arcgis-rest-api/tslint.json b/types/arcgis-rest-api/tslint.json similarity index 100% rename from arcgis-rest-api/tslint.json rename to types/arcgis-rest-api/tslint.json diff --git a/arcgis-to-geojson-utils/arcgis-to-geojson-utils-tests.ts b/types/arcgis-to-geojson-utils/arcgis-to-geojson-utils-tests.ts similarity index 100% rename from arcgis-to-geojson-utils/arcgis-to-geojson-utils-tests.ts rename to types/arcgis-to-geojson-utils/arcgis-to-geojson-utils-tests.ts diff --git a/arcgis-to-geojson-utils/index.d.ts b/types/arcgis-to-geojson-utils/index.d.ts similarity index 100% rename from arcgis-to-geojson-utils/index.d.ts rename to types/arcgis-to-geojson-utils/index.d.ts diff --git a/arcgis-to-geojson-utils/tsconfig.json b/types/arcgis-to-geojson-utils/tsconfig.json similarity index 100% rename from arcgis-to-geojson-utils/tsconfig.json rename to types/arcgis-to-geojson-utils/tsconfig.json diff --git a/arcgis-to-geojson-utils/tslint.json b/types/arcgis-to-geojson-utils/tslint.json similarity index 100% rename from arcgis-to-geojson-utils/tslint.json rename to types/arcgis-to-geojson-utils/tslint.json diff --git a/archiver/archiver-tests.ts b/types/archiver/archiver-tests.ts similarity index 100% rename from archiver/archiver-tests.ts rename to types/archiver/archiver-tests.ts diff --git a/archiver/index.d.ts b/types/archiver/index.d.ts similarity index 100% rename from archiver/index.d.ts rename to types/archiver/index.d.ts diff --git a/archiver/tsconfig.json b/types/archiver/tsconfig.json similarity index 100% rename from archiver/tsconfig.json rename to types/archiver/tsconfig.json diff --git a/archy/archy-tests.ts b/types/archy/archy-tests.ts similarity index 100% rename from archy/archy-tests.ts rename to types/archy/archy-tests.ts diff --git a/archy/index.d.ts b/types/archy/index.d.ts similarity index 100% rename from archy/index.d.ts rename to types/archy/index.d.ts diff --git a/archy/tsconfig.json b/types/archy/tsconfig.json similarity index 100% rename from archy/tsconfig.json rename to types/archy/tsconfig.json diff --git a/argparse/argparse-tests.ts b/types/argparse/argparse-tests.ts similarity index 100% rename from argparse/argparse-tests.ts rename to types/argparse/argparse-tests.ts diff --git a/argparse/index.d.ts b/types/argparse/index.d.ts similarity index 100% rename from argparse/index.d.ts rename to types/argparse/index.d.ts diff --git a/argparse/tsconfig.json b/types/argparse/tsconfig.json similarity index 100% rename from argparse/tsconfig.json rename to types/argparse/tsconfig.json diff --git a/argv/argv-tests.ts b/types/argv/argv-tests.ts similarity index 100% rename from argv/argv-tests.ts rename to types/argv/argv-tests.ts diff --git a/argv/index.d.ts b/types/argv/index.d.ts similarity index 100% rename from argv/index.d.ts rename to types/argv/index.d.ts diff --git a/argv/tsconfig.json b/types/argv/tsconfig.json similarity index 100% rename from argv/tsconfig.json rename to types/argv/tsconfig.json diff --git a/array-find-index/array-find-index-tests.ts b/types/array-find-index/array-find-index-tests.ts similarity index 100% rename from array-find-index/array-find-index-tests.ts rename to types/array-find-index/array-find-index-tests.ts diff --git a/array-find-index/index.d.ts b/types/array-find-index/index.d.ts similarity index 100% rename from array-find-index/index.d.ts rename to types/array-find-index/index.d.ts diff --git a/array-find-index/tsconfig.json b/types/array-find-index/tsconfig.json similarity index 100% rename from array-find-index/tsconfig.json rename to types/array-find-index/tsconfig.json diff --git a/array-find-index/tslint.json b/types/array-find-index/tslint.json similarity index 100% rename from array-find-index/tslint.json rename to types/array-find-index/tslint.json diff --git a/array-foreach/array-foreach-tests.ts b/types/array-foreach/array-foreach-tests.ts similarity index 100% rename from array-foreach/array-foreach-tests.ts rename to types/array-foreach/array-foreach-tests.ts diff --git a/array-foreach/index.d.ts b/types/array-foreach/index.d.ts similarity index 100% rename from array-foreach/index.d.ts rename to types/array-foreach/index.d.ts diff --git a/array-foreach/tsconfig.json b/types/array-foreach/tsconfig.json similarity index 100% rename from array-foreach/tsconfig.json rename to types/array-foreach/tsconfig.json diff --git a/array-uniq/array-uniq-tests.ts b/types/array-uniq/array-uniq-tests.ts similarity index 100% rename from array-uniq/array-uniq-tests.ts rename to types/array-uniq/array-uniq-tests.ts diff --git a/array-uniq/index.d.ts b/types/array-uniq/index.d.ts similarity index 100% rename from array-uniq/index.d.ts rename to types/array-uniq/index.d.ts diff --git a/array-uniq/tsconfig.json b/types/array-uniq/tsconfig.json similarity index 100% rename from array-uniq/tsconfig.json rename to types/array-uniq/tsconfig.json diff --git a/array-uniq/tslint.json b/types/array-uniq/tslint.json similarity index 100% rename from array-uniq/tslint.json rename to types/array-uniq/tslint.json diff --git a/artyom.js/artyom.js-tests.ts b/types/artyom.js/artyom.js-tests.ts similarity index 100% rename from artyom.js/artyom.js-tests.ts rename to types/artyom.js/artyom.js-tests.ts diff --git a/artyom.js/index.d.ts b/types/artyom.js/index.d.ts similarity index 99% rename from artyom.js/index.d.ts rename to types/artyom.js/index.d.ts index 0b0f253827..ae120015ca 100644 --- a/artyom.js/index.d.ts +++ b/types/artyom.js/index.d.ts @@ -164,7 +164,6 @@ interface SpeechSynthesisVoice { } declare namespace Artyom { - interface ArtyomDevice { isChrome(): boolean; isMobile(): boolean; @@ -235,7 +234,7 @@ declare namespace Artyom { onend(): void; } - export interface ArtyomJS { + interface ArtyomJS { /** * Contains some basic information that artyom needs to know as the type of device and browser * @see http://ourcodeworld.com/projects/projects-documentation/6/read-doc/artyom-device/artyom-js @@ -499,13 +498,12 @@ declare namespace Artyom { /** * ArtyomBuilder bla, bla... */ - export class ArtyomBuilder { + class ArtyomBuilder { /** * Method to bla, bla, bla... */ static getInstance(): ArtyomJS } - } // tslint:disable-next-line:export-just-namespace diff --git a/artyom.js/tsconfig.json b/types/artyom.js/tsconfig.json similarity index 100% rename from artyom.js/tsconfig.json rename to types/artyom.js/tsconfig.json diff --git a/artyom.js/tslint.json b/types/artyom.js/tslint.json similarity index 100% rename from artyom.js/tslint.json rename to types/artyom.js/tslint.json diff --git a/asana/asana-tests.ts b/types/asana/asana-tests.ts similarity index 100% rename from asana/asana-tests.ts rename to types/asana/asana-tests.ts diff --git a/asana/index.d.ts b/types/asana/index.d.ts similarity index 100% rename from asana/index.d.ts rename to types/asana/index.d.ts diff --git a/asana/tsconfig.json b/types/asana/tsconfig.json similarity index 100% rename from asana/tsconfig.json rename to types/asana/tsconfig.json diff --git a/asciify/asciify-tests.ts b/types/asciify/asciify-tests.ts similarity index 100% rename from asciify/asciify-tests.ts rename to types/asciify/asciify-tests.ts diff --git a/asciify/index.d.ts b/types/asciify/index.d.ts similarity index 100% rename from asciify/index.d.ts rename to types/asciify/index.d.ts diff --git a/asciify/tsconfig.json b/types/asciify/tsconfig.json similarity index 100% rename from asciify/tsconfig.json rename to types/asciify/tsconfig.json diff --git a/asn1js/asn1js-tests.ts b/types/asn1js/asn1js-tests.ts similarity index 100% rename from asn1js/asn1js-tests.ts rename to types/asn1js/asn1js-tests.ts diff --git a/asn1js/index.d.ts b/types/asn1js/index.d.ts similarity index 100% rename from asn1js/index.d.ts rename to types/asn1js/index.d.ts diff --git a/asn1js/tsconfig.json b/types/asn1js/tsconfig.json similarity index 100% rename from asn1js/tsconfig.json rename to types/asn1js/tsconfig.json diff --git a/aspnet-identity-pw/aspnet-identity-pw-tests.ts b/types/aspnet-identity-pw/aspnet-identity-pw-tests.ts similarity index 100% rename from aspnet-identity-pw/aspnet-identity-pw-tests.ts rename to types/aspnet-identity-pw/aspnet-identity-pw-tests.ts diff --git a/aspnet-identity-pw/index.d.ts b/types/aspnet-identity-pw/index.d.ts similarity index 100% rename from aspnet-identity-pw/index.d.ts rename to types/aspnet-identity-pw/index.d.ts diff --git a/aspnet-identity-pw/tsconfig.json b/types/aspnet-identity-pw/tsconfig.json similarity index 100% rename from aspnet-identity-pw/tsconfig.json rename to types/aspnet-identity-pw/tsconfig.json diff --git a/assert-plus/assert-plus-tests.ts b/types/assert-plus/assert-plus-tests.ts similarity index 100% rename from assert-plus/assert-plus-tests.ts rename to types/assert-plus/assert-plus-tests.ts diff --git a/assert-plus/index.d.ts b/types/assert-plus/index.d.ts similarity index 100% rename from assert-plus/index.d.ts rename to types/assert-plus/index.d.ts diff --git a/assert-plus/tsconfig.json b/types/assert-plus/tsconfig.json similarity index 100% rename from assert-plus/tsconfig.json rename to types/assert-plus/tsconfig.json diff --git a/assert-plus/tslint.json b/types/assert-plus/tslint.json similarity index 100% rename from assert-plus/tslint.json rename to types/assert-plus/tslint.json diff --git a/assertion-error/assertion-error-tests.ts b/types/assertion-error/assertion-error-tests.ts similarity index 100% rename from assertion-error/assertion-error-tests.ts rename to types/assertion-error/assertion-error-tests.ts diff --git a/assertion-error/index.d.ts b/types/assertion-error/index.d.ts similarity index 100% rename from assertion-error/index.d.ts rename to types/assertion-error/index.d.ts diff --git a/assertion-error/tsconfig.json b/types/assertion-error/tsconfig.json similarity index 100% rename from assertion-error/tsconfig.json rename to types/assertion-error/tsconfig.json diff --git a/assertsharp/assertsharp-tests.ts b/types/assertsharp/assertsharp-tests.ts similarity index 100% rename from assertsharp/assertsharp-tests.ts rename to types/assertsharp/assertsharp-tests.ts diff --git a/assertsharp/index.d.ts b/types/assertsharp/index.d.ts similarity index 100% rename from assertsharp/index.d.ts rename to types/assertsharp/index.d.ts diff --git a/assertsharp/tsconfig.json b/types/assertsharp/tsconfig.json similarity index 100% rename from assertsharp/tsconfig.json rename to types/assertsharp/tsconfig.json diff --git a/async-lock/async-lock-tests.ts b/types/async-lock/async-lock-tests.ts similarity index 100% rename from async-lock/async-lock-tests.ts rename to types/async-lock/async-lock-tests.ts diff --git a/async-lock/index.d.ts b/types/async-lock/index.d.ts similarity index 100% rename from async-lock/index.d.ts rename to types/async-lock/index.d.ts diff --git a/async-lock/tsconfig.json b/types/async-lock/tsconfig.json similarity index 100% rename from async-lock/tsconfig.json rename to types/async-lock/tsconfig.json diff --git a/async-polling/async-polling-tests.ts b/types/async-polling/async-polling-tests.ts similarity index 100% rename from async-polling/async-polling-tests.ts rename to types/async-polling/async-polling-tests.ts diff --git a/async-polling/index.d.ts b/types/async-polling/index.d.ts similarity index 100% rename from async-polling/index.d.ts rename to types/async-polling/index.d.ts diff --git a/async-polling/tsconfig.json b/types/async-polling/tsconfig.json similarity index 100% rename from async-polling/tsconfig.json rename to types/async-polling/tsconfig.json diff --git a/async-writer/async-writer-tests.ts b/types/async-writer/async-writer-tests.ts similarity index 100% rename from async-writer/async-writer-tests.ts rename to types/async-writer/async-writer-tests.ts diff --git a/async-writer/index.d.ts b/types/async-writer/index.d.ts similarity index 100% rename from async-writer/index.d.ts rename to types/async-writer/index.d.ts diff --git a/async-writer/tsconfig.json b/types/async-writer/tsconfig.json similarity index 100% rename from async-writer/tsconfig.json rename to types/async-writer/tsconfig.json diff --git a/async/index.d.ts b/types/async/index.d.ts similarity index 83% rename from async/index.d.ts rename to types/async/index.d.ts index 62e047b209..33bb1a6c0e 100644 --- a/async/index.d.ts +++ b/types/async/index.d.ts @@ -90,34 +90,34 @@ interface AsyncCargo { interface Async { // Collections - each(arr: T[], iterator: AsyncIterator, callback?: ErrorCallback): void; + each(arr: T[] | IterableIterator, iterator: AsyncIterator, callback?: ErrorCallback): void; each(arr: Dictionary, iterator: AsyncIterator, callback?: ErrorCallback): void; eachSeries: typeof async.each; - eachLimit(arr: T[], limit: number, iterator: AsyncIterator, callback?: ErrorCallback): void; + eachLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncIterator, callback?: ErrorCallback): void; eachLimit(arr: Dictionary, limit: number, iterator: AsyncIterator, callback?: ErrorCallback): void; forEach: typeof async.each; forEachSeries: typeof async.each; forEachLimit: typeof async.eachLimit; - forEachOf(obj: T[], iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; + forEachOf(obj: T[] | IterableIterator, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; forEachOf(obj: Dictionary, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; forEachOfSeries: typeof async.forEachOf; - forEachOfLimit(obj: T[], limit: number, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; + forEachOfLimit(obj: T[] | IterableIterator, limit: number, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; forEachOfLimit(obj: Dictionary, limit: number, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; eachOf: typeof async.forEachOf; eachOfSeries: typeof async.forEachOf; eachOfLimit: typeof async.forEachOfLimit; - map(arr: T[], iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; + map(arr: T[] | IterableIterator, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; map(arr: Dictionary, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; mapSeries: typeof async.map; - mapLimit(arr: T[], limit: number, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; + mapLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; mapLimit(arr: Dictionary, limit: number, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; mapValuesLimit(obj: Dictionary, limit: number, iteratee: (value: T, key: string, callback: AsyncResultCallback) => void, callback: AsyncResultObjectCallback): void; mapValues(obj: Dictionary, iteratee: (value: T, key: string, callback: AsyncResultCallback) => void, callback: AsyncResultObjectCallback): void; mapValuesSeries: typeof async.mapValues; - filter(arr: T[], iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; + filter(arr: T[] | IterableIterator, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; filter(arr: Dictionary, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; filterSeries: typeof async.filter; - filterLimit(arr: T[], limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; + filterLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; filterLimit(arr: Dictionary, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; select: typeof async.filter; selectSeries: typeof async.filter; @@ -125,38 +125,38 @@ interface Async { reject: typeof async.filter; rejectSeries: typeof async.filter; rejectLimit: typeof async.filterLimit; - reduce(arr: T[], memo: R, iterator: AsyncMemoIterator, callback?: AsyncResultCallback): void; + reduce(arr: T[] | IterableIterator, memo: R, iterator: AsyncMemoIterator, callback?: AsyncResultCallback): void; inject: typeof async.reduce; foldl: typeof async.reduce; reduceRight: typeof async.reduce; foldr: typeof async.reduce; - detect(arr: T[], iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; + detect(arr: T[] | IterableIterator, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; detect(arr: Dictionary, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; detectSeries: typeof async.detect; - detectLimit(arr: T[], limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; + detectLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; detectLimit(arr: Dictionary, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; find: typeof async.detect; findSeries: typeof async.detect; findLimit: typeof async.detectLimit; - sortBy(arr: T[], iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; - some(arr: T[], iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; + sortBy(arr: T[] | IterableIterator, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; + some(arr: T[] | IterableIterator, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; some(arr: Dictionary, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; someSeries: typeof async.some; - someLimit(arr: T[], limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; + someLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; someLimit(arr: Dictionary, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; any: typeof async.some; anySeries: typeof async.someSeries; anyLimit: typeof async.someLimit; - every(arr: T[], iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; + every(arr: T[] | IterableIterator, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; every(arr: Dictionary, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; everySeries: typeof async.every; - everyLimit(arr: T[], limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; + everyLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; everyLimit(arr: Dictionary, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; all: typeof async.every; allSeries: typeof async.every; allLimit: typeof async.everyLimit; - concat(arr: T[], iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; + concat(arr: T[] | IterableIterator, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; concat(arr: Dictionary, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; concatSeries: typeof async.concat; diff --git a/types/async/test/es6-generators.ts b/types/async/test/es6-generators.ts new file mode 100644 index 0000000000..2a7328a09a --- /dev/null +++ b/types/async/test/es6-generators.ts @@ -0,0 +1,54 @@ +function* collectionGenerator(): IterableIterator { } + +function funcMapIterator(value: T, callback: AsyncResultCallback) { } +function funcMapComplete(error: E, results: T[]) { } + +function booleanIterator(v: T, cb: (err: Error, res: boolean) => void) { } + +function eachIterator(item: T, callback: (err: Error) => void) { } +function eachOfIterator(item: T, key: K, callback: (err: Error) => void) { } + +function concatIterator(item: T, callback: (err: E, res: R[]) => void) { } + +async.map(collectionGenerator(), funcMapIterator, funcMapComplete) +async.mapSeries(collectionGenerator(), funcMapIterator, funcMapComplete) +async.mapLimit(collectionGenerator(), 2, funcMapIterator, funcMapComplete) + +async.filter(collectionGenerator(), booleanIterator, function (err: Error, results: any[]) { }) +async.filterSeries(collectionGenerator(), booleanIterator, function (err: Error, results: any[]) { }) +async.filterLimit(collectionGenerator(), 2, booleanIterator, function (err: Error, results: any[]) { }) +async.select(collectionGenerator(), booleanIterator, function (err: Error, results: any[]) { }) +async.selectSeries(collectionGenerator(), booleanIterator, function (err: Error, results: any[]) { }) +async.selectLimit(collectionGenerator(), 2, booleanIterator, function (err: Error, results: any[]) { }) + +async.reject(collectionGenerator(), booleanIterator, function (err: Error, results: any[]) { }) +async.rejectSeries(collectionGenerator(), booleanIterator, function (err: Error, results: any[]) { }) +async.rejectLimit(collectionGenerator(), 2, booleanIterator, function (err: Error, results: any[]) { }) + +async.each(collectionGenerator(), eachIterator, function (err: Error) { }) +async.eachLimit(collectionGenerator(), 2, eachIterator, function (err: Error) { }) +async.eachSeries(collectionGenerator(), eachIterator, function (err: Error) { }) +async.eachOf(collectionGenerator(), eachOfIterator, function (err: Error) { }) +async.eachOfLimit(collectionGenerator(), 2, eachOfIterator, function (err: Error) { }) +async.eachOfSeries(collectionGenerator(), eachOfIterator, function (err: Error) { }) +async.forEach(collectionGenerator(), eachIterator, function (err: Error) { }) +async.forEachLimit(collectionGenerator(), 2, eachIterator, function (err: Error) { }) +async.forEachSeries(collectionGenerator(), eachIterator, function (err: Error) { }) +async.forEachOf(collectionGenerator(), eachOfIterator, function (err: Error) { }) +async.forEachOfLimit(collectionGenerator(), 2, eachOfIterator, function (err: Error) { }) +async.forEachOfSeries(collectionGenerator(), eachOfIterator, function (err: Error) { }) + +async.every(collectionGenerator(), booleanIterator, function (err: Error, res: boolean) { }) +async.everyLimit(collectionGenerator(), 2, booleanIterator, function (err: Error, res: boolean) { }) +async.everySeries(collectionGenerator(), booleanIterator, function (err: Error, res: boolean) { }) + +async.some(collectionGenerator(), booleanIterator, function (err: Error, res: boolean) { }) +async.someLimit(collectionGenerator(), 2, booleanIterator, function (err: Error, res: boolean) { }) +async.someSeries(collectionGenerator(), booleanIterator, function (err: Error, res: boolean) { }) + +async.detect(collectionGenerator(), booleanIterator, function (err: Error, res: boolean) { }) +async.detectLimit(collectionGenerator(), 2, booleanIterator, function (err: Error, res: boolean) { }) +async.detectSeries(collectionGenerator(), booleanIterator, function (err: Error, res: boolean) { }) + +async.concat(collectionGenerator(), concatIterator, (err: Error, res: any[]) => { }) +async.concatSeries(collectionGenerator(), concatIterator, (err: Error, res: any[]) => { }) diff --git a/async/test/explicit.ts b/types/async/test/explicit.ts similarity index 100% rename from async/test/explicit.ts rename to types/async/test/explicit.ts diff --git a/async/test/index.ts b/types/async/test/index.ts similarity index 100% rename from async/test/index.ts rename to types/async/test/index.ts diff --git a/redux-persist-transform-compress/tsconfig.json b/types/async/tsconfig.json similarity index 78% rename from redux-persist-transform-compress/tsconfig.json rename to types/async/tsconfig.json index 5e33f4960f..46ac98ea58 100644 --- a/redux-persist-transform-compress/tsconfig.json +++ b/types/async/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "target": "es6", "module": "commonjs", "lib": [ "es6" @@ -17,6 +18,8 @@ }, "files": [ "index.d.ts", - "redux-persist-transform-compress-tests.ts" + "test/index.ts", + "test/explicit.ts", + "test/es6-generators.ts" ] -} \ No newline at end of file +} diff --git a/asyncblock/asyncblock-tests.ts b/types/asyncblock/asyncblock-tests.ts similarity index 100% rename from asyncblock/asyncblock-tests.ts rename to types/asyncblock/asyncblock-tests.ts diff --git a/asyncblock/index.d.ts b/types/asyncblock/index.d.ts similarity index 100% rename from asyncblock/index.d.ts rename to types/asyncblock/index.d.ts diff --git a/asyncblock/tsconfig.json b/types/asyncblock/tsconfig.json similarity index 100% rename from asyncblock/tsconfig.json rename to types/asyncblock/tsconfig.json diff --git a/atmosphere/atmosphere-tests.ts b/types/atmosphere/atmosphere-tests.ts similarity index 100% rename from atmosphere/atmosphere-tests.ts rename to types/atmosphere/atmosphere-tests.ts diff --git a/atmosphere/index.d.ts b/types/atmosphere/index.d.ts similarity index 100% rename from atmosphere/index.d.ts rename to types/atmosphere/index.d.ts diff --git a/atmosphere/tsconfig.json b/types/atmosphere/tsconfig.json similarity index 100% rename from atmosphere/tsconfig.json rename to types/atmosphere/tsconfig.json diff --git a/atom-keymap/.editorconfig b/types/atom-keymap/.editorconfig similarity index 100% rename from atom-keymap/.editorconfig rename to types/atom-keymap/.editorconfig diff --git a/atom-keymap/atom-keymap-tests.ts b/types/atom-keymap/atom-keymap-tests.ts similarity index 100% rename from atom-keymap/atom-keymap-tests.ts rename to types/atom-keymap/atom-keymap-tests.ts diff --git a/atom-keymap/index.d.ts b/types/atom-keymap/index.d.ts similarity index 100% rename from atom-keymap/index.d.ts rename to types/atom-keymap/index.d.ts diff --git a/atom-keymap/tsconfig.json b/types/atom-keymap/tsconfig.json similarity index 100% rename from atom-keymap/tsconfig.json rename to types/atom-keymap/tsconfig.json diff --git a/atom/api-docs.d.ts b/types/atom/api-docs.d.ts similarity index 100% rename from atom/api-docs.d.ts rename to types/atom/api-docs.d.ts diff --git a/atom/atom-tests.ts b/types/atom/atom-tests.ts similarity index 100% rename from atom/atom-tests.ts rename to types/atom/atom-tests.ts diff --git a/atom/index.d.ts b/types/atom/index.d.ts similarity index 100% rename from atom/index.d.ts rename to types/atom/index.d.ts diff --git a/atom/tsconfig.json b/types/atom/tsconfig.json similarity index 100% rename from atom/tsconfig.json rename to types/atom/tsconfig.json diff --git a/atpl/atpl-tests.ts b/types/atpl/atpl-tests.ts similarity index 100% rename from atpl/atpl-tests.ts rename to types/atpl/atpl-tests.ts diff --git a/atpl/index.d.ts b/types/atpl/index.d.ts similarity index 100% rename from atpl/index.d.ts rename to types/atpl/index.d.ts diff --git a/atpl/tsconfig.json b/types/atpl/tsconfig.json similarity index 100% rename from atpl/tsconfig.json rename to types/atpl/tsconfig.json diff --git a/aurelia-knockout/aurelia-knockout-tests.ts b/types/aurelia-knockout/aurelia-knockout-tests.ts similarity index 99% rename from aurelia-knockout/aurelia-knockout-tests.ts rename to types/aurelia-knockout/aurelia-knockout-tests.ts index 6944ab5889..cf769d0dc2 100644 --- a/aurelia-knockout/aurelia-knockout-tests.ts +++ b/types/aurelia-knockout/aurelia-knockout-tests.ts @@ -1,6 +1,4 @@ - export class ViewModel { - constructor(private knockoutBindable: KnockoutBindable) { } diff --git a/aurelia-knockout/index.d.ts b/types/aurelia-knockout/index.d.ts similarity index 96% rename from aurelia-knockout/index.d.ts rename to types/aurelia-knockout/index.d.ts index 2ccec60b46..6f04567a5f 100644 --- a/aurelia-knockout/index.d.ts +++ b/types/aurelia-knockout/index.d.ts @@ -3,8 +3,7 @@ // Definitions by: Christian Kotzbauer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare interface KnockoutBindable { - +interface KnockoutBindable { /** * Applys all values from a data object (usually the activation data) to the corresponding instance fields * in the current view model if they are marked as @bindable. By default all matching values from the data object diff --git a/aurelia-knockout/tsconfig.json b/types/aurelia-knockout/tsconfig.json similarity index 100% rename from aurelia-knockout/tsconfig.json rename to types/aurelia-knockout/tsconfig.json diff --git a/aurelia-knockout/tslint.json b/types/aurelia-knockout/tslint.json similarity index 100% rename from aurelia-knockout/tslint.json rename to types/aurelia-knockout/tslint.json diff --git a/auth0-angular/auth0-angular-tests.ts b/types/auth0-angular/auth0-angular-tests.ts similarity index 100% rename from auth0-angular/auth0-angular-tests.ts rename to types/auth0-angular/auth0-angular-tests.ts diff --git a/auth0-angular/index.d.ts b/types/auth0-angular/index.d.ts similarity index 100% rename from auth0-angular/index.d.ts rename to types/auth0-angular/index.d.ts diff --git a/auth0-angular/tsconfig.json b/types/auth0-angular/tsconfig.json similarity index 100% rename from auth0-angular/tsconfig.json rename to types/auth0-angular/tsconfig.json diff --git a/auth0-js/auth0-js-tests.ts b/types/auth0-js/auth0-js-tests.ts similarity index 100% rename from auth0-js/auth0-js-tests.ts rename to types/auth0-js/auth0-js-tests.ts diff --git a/auth0-js/index.d.ts b/types/auth0-js/index.d.ts similarity index 100% rename from auth0-js/index.d.ts rename to types/auth0-js/index.d.ts diff --git a/auth0-js/tsconfig.json b/types/auth0-js/tsconfig.json similarity index 100% rename from auth0-js/tsconfig.json rename to types/auth0-js/tsconfig.json diff --git a/auth0-js/v7/auth0-js-tests.ts b/types/auth0-js/v7/auth0-js-tests.ts similarity index 100% rename from auth0-js/v7/auth0-js-tests.ts rename to types/auth0-js/v7/auth0-js-tests.ts diff --git a/auth0-js/v7/index.d.ts b/types/auth0-js/v7/index.d.ts similarity index 100% rename from auth0-js/v7/index.d.ts rename to types/auth0-js/v7/index.d.ts diff --git a/auth0-js/v7/tsconfig.json b/types/auth0-js/v7/tsconfig.json similarity index 100% rename from auth0-js/v7/tsconfig.json rename to types/auth0-js/v7/tsconfig.json diff --git a/auth0-lock/auth0-lock-tests.ts b/types/auth0-lock/auth0-lock-tests.ts similarity index 100% rename from auth0-lock/auth0-lock-tests.ts rename to types/auth0-lock/auth0-lock-tests.ts diff --git a/auth0-lock/index.d.ts b/types/auth0-lock/index.d.ts similarity index 100% rename from auth0-lock/index.d.ts rename to types/auth0-lock/index.d.ts diff --git a/auth0-lock/package.json b/types/auth0-lock/package.json similarity index 100% rename from auth0-lock/package.json rename to types/auth0-lock/package.json diff --git a/auth0-lock/tsconfig.json b/types/auth0-lock/tsconfig.json similarity index 100% rename from auth0-lock/tsconfig.json rename to types/auth0-lock/tsconfig.json diff --git a/auth0.widget/auth0.widget-tests.ts b/types/auth0.widget/auth0.widget-tests.ts similarity index 100% rename from auth0.widget/auth0.widget-tests.ts rename to types/auth0.widget/auth0.widget-tests.ts diff --git a/auth0.widget/index.d.ts b/types/auth0.widget/index.d.ts similarity index 100% rename from auth0.widget/index.d.ts rename to types/auth0.widget/index.d.ts diff --git a/auth0.widget/package.json b/types/auth0.widget/package.json similarity index 100% rename from auth0.widget/package.json rename to types/auth0.widget/package.json diff --git a/auth0.widget/tsconfig.json b/types/auth0.widget/tsconfig.json similarity index 100% rename from auth0.widget/tsconfig.json rename to types/auth0.widget/tsconfig.json diff --git a/auth0/auth0-tests.ts b/types/auth0/auth0-tests.ts similarity index 100% rename from auth0/auth0-tests.ts rename to types/auth0/auth0-tests.ts diff --git a/auth0/index.d.ts b/types/auth0/index.d.ts similarity index 100% rename from auth0/index.d.ts rename to types/auth0/index.d.ts diff --git a/auth0/tsconfig.json b/types/auth0/tsconfig.json similarity index 100% rename from auth0/tsconfig.json rename to types/auth0/tsconfig.json diff --git a/auto-launch/auto-launch-tests.ts b/types/auto-launch/auto-launch-tests.ts similarity index 100% rename from auto-launch/auto-launch-tests.ts rename to types/auto-launch/auto-launch-tests.ts diff --git a/auto-launch/index.d.ts b/types/auto-launch/index.d.ts similarity index 100% rename from auto-launch/index.d.ts rename to types/auto-launch/index.d.ts diff --git a/auto-launch/tsconfig.json b/types/auto-launch/tsconfig.json similarity index 100% rename from auto-launch/tsconfig.json rename to types/auto-launch/tsconfig.json diff --git a/autobahn/autobahn-tests.ts b/types/autobahn/autobahn-tests.ts similarity index 100% rename from autobahn/autobahn-tests.ts rename to types/autobahn/autobahn-tests.ts diff --git a/autobahn/index.d.ts b/types/autobahn/index.d.ts similarity index 100% rename from autobahn/index.d.ts rename to types/autobahn/index.d.ts diff --git a/autobahn/tsconfig.json b/types/autobahn/tsconfig.json similarity index 100% rename from autobahn/tsconfig.json rename to types/autobahn/tsconfig.json diff --git a/autobind-decorator/autobind-decorator-tests.ts b/types/autobind-decorator/autobind-decorator-tests.ts similarity index 100% rename from autobind-decorator/autobind-decorator-tests.ts rename to types/autobind-decorator/autobind-decorator-tests.ts diff --git a/autobind-decorator/index.d.ts b/types/autobind-decorator/index.d.ts similarity index 100% rename from autobind-decorator/index.d.ts rename to types/autobind-decorator/index.d.ts diff --git a/autobind-decorator/tsconfig.json b/types/autobind-decorator/tsconfig.json similarity index 100% rename from autobind-decorator/tsconfig.json rename to types/autobind-decorator/tsconfig.json diff --git a/autolinker/autolinker-tests.ts b/types/autolinker/autolinker-tests.ts similarity index 100% rename from autolinker/autolinker-tests.ts rename to types/autolinker/autolinker-tests.ts diff --git a/autolinker/index.d.ts b/types/autolinker/index.d.ts similarity index 100% rename from autolinker/index.d.ts rename to types/autolinker/index.d.ts diff --git a/autolinker/tsconfig.json b/types/autolinker/tsconfig.json similarity index 100% rename from autolinker/tsconfig.json rename to types/autolinker/tsconfig.json diff --git a/autoprefixer-core/autoprefixer-core-tests.ts b/types/autoprefixer-core/autoprefixer-core-tests.ts similarity index 100% rename from autoprefixer-core/autoprefixer-core-tests.ts rename to types/autoprefixer-core/autoprefixer-core-tests.ts diff --git a/autoprefixer-core/index.d.ts b/types/autoprefixer-core/index.d.ts similarity index 100% rename from autoprefixer-core/index.d.ts rename to types/autoprefixer-core/index.d.ts diff --git a/autoprefixer-core/tsconfig.json b/types/autoprefixer-core/tsconfig.json similarity index 100% rename from autoprefixer-core/tsconfig.json rename to types/autoprefixer-core/tsconfig.json diff --git a/autoprefixer/autoprefixer-tests.ts b/types/autoprefixer/autoprefixer-tests.ts similarity index 100% rename from autoprefixer/autoprefixer-tests.ts rename to types/autoprefixer/autoprefixer-tests.ts diff --git a/autoprefixer/index.d.ts b/types/autoprefixer/index.d.ts similarity index 82% rename from autoprefixer/index.d.ts rename to types/autoprefixer/index.d.ts index 0a01c34d9a..b5249746d1 100644 --- a/autoprefixer/index.d.ts +++ b/types/autoprefixer/index.d.ts @@ -6,8 +6,7 @@ import { Plugin, Transformer as PostcssTransformer } from 'postcss'; declare namespace autoprefixer { - - export interface Options { + interface Options { browsers?: string[]; env?: string; cascade?: boolean; @@ -19,11 +18,11 @@ declare namespace autoprefixer { stats?: any; } - export interface Transformer extends PostcssTransformer { + interface Transformer extends PostcssTransformer { info(): string; } - export interface Autoprefixer extends Plugin { + interface Autoprefixer extends Plugin { (opts?: Options): Transformer; } } diff --git a/autoprefixer/package.json b/types/autoprefixer/package.json similarity index 100% rename from autoprefixer/package.json rename to types/autoprefixer/package.json diff --git a/autoprefixer/tsconfig.json b/types/autoprefixer/tsconfig.json similarity index 100% rename from autoprefixer/tsconfig.json rename to types/autoprefixer/tsconfig.json diff --git a/autoprefixer/tslint.json b/types/autoprefixer/tslint.json similarity index 100% rename from autoprefixer/tslint.json rename to types/autoprefixer/tslint.json diff --git a/autosize/autosize-tests.ts b/types/autosize/autosize-tests.ts similarity index 100% rename from autosize/autosize-tests.ts rename to types/autosize/autosize-tests.ts diff --git a/autosize/index.d.ts b/types/autosize/index.d.ts similarity index 100% rename from autosize/index.d.ts rename to types/autosize/index.d.ts diff --git a/autosize/tsconfig.json b/types/autosize/tsconfig.json similarity index 100% rename from autosize/tsconfig.json rename to types/autosize/tsconfig.json diff --git a/avoscloud-sdk/avoscloud-sdk-tests.ts b/types/avoscloud-sdk/avoscloud-sdk-tests.ts similarity index 100% rename from avoscloud-sdk/avoscloud-sdk-tests.ts rename to types/avoscloud-sdk/avoscloud-sdk-tests.ts diff --git a/avoscloud-sdk/index.d.ts b/types/avoscloud-sdk/index.d.ts similarity index 100% rename from avoscloud-sdk/index.d.ts rename to types/avoscloud-sdk/index.d.ts diff --git a/avoscloud-sdk/tsconfig.json b/types/avoscloud-sdk/tsconfig.json similarity index 100% rename from avoscloud-sdk/tsconfig.json rename to types/avoscloud-sdk/tsconfig.json diff --git a/awesomplete/awesomplete-tests.ts b/types/awesomplete/awesomplete-tests.ts similarity index 94% rename from awesomplete/awesomplete-tests.ts rename to types/awesomplete/awesomplete-tests.ts index 7998dc49e3..5a33aeb135 100644 --- a/awesomplete/awesomplete-tests.ts +++ b/types/awesomplete/awesomplete-tests.ts @@ -54,7 +54,7 @@ new Awesomplete('input[data-multiple]', { var ajax = new XMLHttpRequest(); ajax.open("GET", "https://restcountries.eu/rest/v1/lang/fr", true); ajax.onload = () => { - var list = JSON.parse(ajax.responseText).map((i: any) => { return i.name; }); - new Awesomplete(document.querySelector("#ajax-example input"), { list: list }); + var list = JSON.parse(ajax.responseText).map((i: any) => i.name); + new Awesomplete(document.querySelector("#ajax-example input"), { list }); }; ajax.send(); diff --git a/awesomplete/index.d.ts b/types/awesomplete/index.d.ts similarity index 95% rename from awesomplete/index.d.ts rename to types/awesomplete/index.d.ts index 9b8976cfd1..41abc36be6 100644 --- a/awesomplete/index.d.ts +++ b/types/awesomplete/index.d.ts @@ -41,7 +41,7 @@ declare namespace Awesomplete { type Suggestion = string | {label: string | any, value: string | any} | [string, string]; interface Options { - list?: string | string[] | Element | { label: string, value: any }[] | [string, string][]; + list?: string | string[] | Element | Array<{ label: string, value: any }> | Array<[string, string]>; minChars?: number; maxItems?: number; autoFirst?: boolean; diff --git a/awesomplete/tsconfig.json b/types/awesomplete/tsconfig.json similarity index 100% rename from awesomplete/tsconfig.json rename to types/awesomplete/tsconfig.json diff --git a/awesomplete/tslint.json b/types/awesomplete/tslint.json similarity index 100% rename from awesomplete/tslint.json rename to types/awesomplete/tslint.json diff --git a/aws-iot-device-sdk/aws-iot-device-sdk-tests.ts b/types/aws-iot-device-sdk/aws-iot-device-sdk-tests.ts similarity index 100% rename from aws-iot-device-sdk/aws-iot-device-sdk-tests.ts rename to types/aws-iot-device-sdk/aws-iot-device-sdk-tests.ts diff --git a/aws-iot-device-sdk/index.d.ts b/types/aws-iot-device-sdk/index.d.ts similarity index 100% rename from aws-iot-device-sdk/index.d.ts rename to types/aws-iot-device-sdk/index.d.ts diff --git a/aws-iot-device-sdk/tsconfig.json b/types/aws-iot-device-sdk/tsconfig.json similarity index 100% rename from aws-iot-device-sdk/tsconfig.json rename to types/aws-iot-device-sdk/tsconfig.json diff --git a/aws-lambda/aws-lambda-tests.ts b/types/aws-lambda/aws-lambda-tests.ts similarity index 79% rename from aws-lambda/aws-lambda-tests.ts rename to types/aws-lambda/aws-lambda-tests.ts index 1ffdb2980b..3aede36d4c 100644 --- a/aws-lambda/aws-lambda-tests.ts +++ b/types/aws-lambda/aws-lambda-tests.ts @@ -12,11 +12,50 @@ var context: AWSLambda.Context; var identity: AWSLambda.CognitoIdentity; var proxyResult: AWSLambda.ProxyResult; var snsEvt: AWSLambda.SNSEvent; -var snsEvtRecs: Array; +var snsEvtRecs: AWSLambda.SNSEventRecord[]; var snsEvtRec: AWSLambda.SNSEventRecord; var snsMsg: AWSLambda.SNSMessage; var snsMsgAttr: AWSLambda.SNSMessageAttribute; var snsMsgAttrs: AWSLambda.SNSMessageAttributes; +var S3CreateEvent: AWSLambda.S3CreateEvent = { + Records: [{ + eventVersion: 'string', + eventSource: 'string', + awsRegion: 'string', + eventTime: 'string', + eventName: 'string', + userIdentity: { + principalId: 'string' + }, + requestParameters: { + sourceIPAddress: 'string' + }, + responseElements: { + 'x-amz-request-id': 'string', + 'x-amz-id-2': 'string' + }, + s3: { + s3SchemaVersion: 'string', + configurationId: 'string', + bucket: { + name: 'string', + ownerIdentity: { + principalId: 'string' + }, + arn: 'string' + }, + object: { + key: 'string', + size: 1, + eTag: 'string', + versionId: 'string', + sequencer: 'string' + } + } + } + ] +}; + /* API Gateway Event */ str = apiGwEvt.body; @@ -78,7 +117,7 @@ num = proxyResult.statusCode; proxyResult.headers["example"] = str; proxyResult.headers["example"] = b; proxyResult.headers["example"] = num; -str = proxyResult.body +str = proxyResult.body; /* Context */ b = context.callbackWaitsForEmptyEventLoop; @@ -142,5 +181,5 @@ context.fail(error); context.fail(str); /* Handler */ -let handler: AWSLambda.Handler = (event: any, context: AWSLambda.Context, cb: AWSLambda.Callback) => {}; -let proxyHandler: AWSLambda.ProxyHandler = (event: AWSLambda.APIGatewayEvent, context: AWSLambda.Context, cb: AWSLambda.ProxyCallback) => {}; +let handler: AWSLambda.Handler = (event: any, context: AWSLambda.Context, cb: AWSLambda.Callback) => { }; +let proxyHandler: AWSLambda.ProxyHandler = (event: AWSLambda.APIGatewayEvent, context: AWSLambda.Context, cb: AWSLambda.ProxyCallback) => { }; diff --git a/aws-lambda/index.d.ts b/types/aws-lambda/index.d.ts similarity index 81% rename from aws-lambda/index.d.ts rename to types/aws-lambda/index.d.ts index 83579b4d0d..c5e49d54c6 100644 --- a/aws-lambda/index.d.ts +++ b/types/aws-lambda/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for AWS Lambda // Project: http://docs.aws.amazon.com/lambda -// Definitions by: James Darbyshire , Michael Skarum , Stef Heyenrath , Toby Hede , Rich Buggy +// Definitions by: James Darbyshire , Michael Skarum , Stef Heyenrath , Toby Hede , Rich Buggy , Simon Ramsay // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // API Gateway "event" @@ -74,6 +74,49 @@ interface SNSEvent { Records: Array; } +/** + * S3Create event + * https://docs.aws.amazon.com/AmazonS3/latest/dev/notification-content-structure.html + */ +interface S3CreateEvent { + Records: [{ + eventVersion: string; + eventSource: string; + awsRegion: string + eventTime: string; + eventName: string; + userIdentity: { + principalId: string; + }, + requestParameters: { + sourceIPAddress: string; + }, + responseElements: { + 'x-amz-request-id': string; + 'x-amz-id-2': string; + }, + s3: { + s3SchemaVersion: string; + configurationId: string; + bucket: { + name: string; + ownerIdentity: { + principalId: string; + }, + arn: string; + }, + object: { + key: string; + size: number; + eTag: string; + versionId: string; + sequencer: string; + } + } + } + ]; +} + // Context // http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-context.html interface Context { diff --git a/aws-lambda/tsconfig.json b/types/aws-lambda/tsconfig.json similarity index 100% rename from aws-lambda/tsconfig.json rename to types/aws-lambda/tsconfig.json diff --git a/aws-sdk/aws-sdk-tests.ts b/types/aws-sdk/aws-sdk-tests.ts similarity index 100% rename from aws-sdk/aws-sdk-tests.ts rename to types/aws-sdk/aws-sdk-tests.ts diff --git a/aws-sdk/index.d.ts b/types/aws-sdk/index.d.ts similarity index 100% rename from aws-sdk/index.d.ts rename to types/aws-sdk/index.d.ts diff --git a/aws-sdk/tsconfig.json b/types/aws-sdk/tsconfig.json similarity index 100% rename from aws-sdk/tsconfig.json rename to types/aws-sdk/tsconfig.json diff --git a/aws-serverless-express/aws-serverless-express-tests.ts b/types/aws-serverless-express/aws-serverless-express-tests.ts similarity index 100% rename from aws-serverless-express/aws-serverless-express-tests.ts rename to types/aws-serverless-express/aws-serverless-express-tests.ts diff --git a/aws-serverless-express/index.d.ts b/types/aws-serverless-express/index.d.ts similarity index 100% rename from aws-serverless-express/index.d.ts rename to types/aws-serverless-express/index.d.ts diff --git a/aws-serverless-express/middleware.d.ts b/types/aws-serverless-express/middleware.d.ts similarity index 100% rename from aws-serverless-express/middleware.d.ts rename to types/aws-serverless-express/middleware.d.ts diff --git a/aws-serverless-express/tsconfig.json b/types/aws-serverless-express/tsconfig.json similarity index 100% rename from aws-serverless-express/tsconfig.json rename to types/aws-serverless-express/tsconfig.json diff --git a/aws-serverless-express/tslint.json b/types/aws-serverless-express/tslint.json similarity index 100% rename from aws-serverless-express/tslint.json rename to types/aws-serverless-express/tslint.json diff --git a/aws4/aws4-tests.ts b/types/aws4/aws4-tests.ts similarity index 100% rename from aws4/aws4-tests.ts rename to types/aws4/aws4-tests.ts diff --git a/aws4/index.d.ts b/types/aws4/index.d.ts similarity index 100% rename from aws4/index.d.ts rename to types/aws4/index.d.ts diff --git a/aws4/tsconfig.json b/types/aws4/tsconfig.json similarity index 100% rename from aws4/tsconfig.json rename to types/aws4/tsconfig.json diff --git a/axe-core/axe-core-tests.ts b/types/axe-core/axe-core-tests.ts similarity index 100% rename from axe-core/axe-core-tests.ts rename to types/axe-core/axe-core-tests.ts diff --git a/axe-core/index.d.ts b/types/axe-core/index.d.ts similarity index 100% rename from axe-core/index.d.ts rename to types/axe-core/index.d.ts diff --git a/axe-core/tsconfig.json b/types/axe-core/tsconfig.json similarity index 100% rename from axe-core/tsconfig.json rename to types/axe-core/tsconfig.json diff --git a/types/axel/axel-tests.ts b/types/axel/axel-tests.ts new file mode 100644 index 0000000000..553973b210 --- /dev/null +++ b/types/axel/axel-tests.ts @@ -0,0 +1,7 @@ + +import * as axel from 'axel'; + +axel.clear(); +axel.bg(0,255,0); +axel.line(1,1,10,10); +axel.cursor.restore(); diff --git a/types/axel/index.d.ts b/types/axel/index.d.ts new file mode 100644 index 0000000000..751e2c33fa --- /dev/null +++ b/types/axel/index.d.ts @@ -0,0 +1,37 @@ +// Type definitions for Axel module +// Project: https://github.com/F1LT3R/axel +// Definitions by: Ruslan Molodyko +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare class Axel { + brush: string; + rows: number; + cols: number; + cursor: cursorInterface; + + lerp(p1: number, p2: number, m: number): number; + circ(x: number, y: number, m: number): number; + goto(x: number, y: number): void; + scrub(x1: number, y1: number, w: number, h: number): void; + box(x1: number, y1: number, w: number, h: number): void; + point(x: number, y: number, char: string): void; + dist(x1: number, y1: number, x2: number, y2: number): number; + line(x1: number, y1: number, x2: number, y2: number): void; + text(x: number, y: number, text: string): void; + fg(r: number, g: number, b: number): void; + bg(r: number, g: number, b: number): void; + draw(cb: Function): void; + clear(): void; +} + +declare interface cursorInterface { + on(): void; + off(): void; + reset(): void; + restore(): void; +} + +declare module 'axel' { + const instance: Axel; + export = instance; +} diff --git a/types/axel/tsconfig.json b/types/axel/tsconfig.json new file mode 100644 index 0000000000..0ac3689676 --- /dev/null +++ b/types/axel/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "axel-tests.ts", + "index.d.ts" + ] +} \ No newline at end of file diff --git a/azure-mobile-apps/azure-mobile-apps-tests.ts b/types/azure-mobile-apps/azure-mobile-apps-tests.ts similarity index 100% rename from azure-mobile-apps/azure-mobile-apps-tests.ts rename to types/azure-mobile-apps/azure-mobile-apps-tests.ts diff --git a/azure-mobile-apps/index.d.ts b/types/azure-mobile-apps/index.d.ts similarity index 100% rename from azure-mobile-apps/index.d.ts rename to types/azure-mobile-apps/index.d.ts diff --git a/azure-mobile-apps/tsconfig.json b/types/azure-mobile-apps/tsconfig.json similarity index 100% rename from azure-mobile-apps/tsconfig.json rename to types/azure-mobile-apps/tsconfig.json diff --git a/azure-mobile-services-client/azure-mobile-services-client-tests.ts b/types/azure-mobile-services-client/azure-mobile-services-client-tests.ts similarity index 100% rename from azure-mobile-services-client/azure-mobile-services-client-tests.ts rename to types/azure-mobile-services-client/azure-mobile-services-client-tests.ts diff --git a/azure-mobile-services-client/index.d.ts b/types/azure-mobile-services-client/index.d.ts similarity index 100% rename from azure-mobile-services-client/index.d.ts rename to types/azure-mobile-services-client/index.d.ts diff --git a/azure-mobile-services-client/tsconfig.json b/types/azure-mobile-services-client/tsconfig.json similarity index 100% rename from azure-mobile-services-client/tsconfig.json rename to types/azure-mobile-services-client/tsconfig.json diff --git a/azure-sb/azure-sb-tests.ts b/types/azure-sb/azure-sb-tests.ts similarity index 100% rename from azure-sb/azure-sb-tests.ts rename to types/azure-sb/azure-sb-tests.ts diff --git a/azure-sb/index.d.ts b/types/azure-sb/index.d.ts similarity index 100% rename from azure-sb/index.d.ts rename to types/azure-sb/index.d.ts diff --git a/azure-sb/tsconfig.json b/types/azure-sb/tsconfig.json similarity index 100% rename from azure-sb/tsconfig.json rename to types/azure-sb/tsconfig.json diff --git a/azure/azure-tests.ts b/types/azure/azure-tests.ts similarity index 100% rename from azure/azure-tests.ts rename to types/azure/azure-tests.ts diff --git a/azure/index.d.ts b/types/azure/index.d.ts similarity index 100% rename from azure/index.d.ts rename to types/azure/index.d.ts diff --git a/azure/tsconfig.json b/types/azure/tsconfig.json similarity index 100% rename from azure/tsconfig.json rename to types/azure/tsconfig.json diff --git a/b_/b_-tests.ts b/types/b_/b_-tests.ts similarity index 100% rename from b_/b_-tests.ts rename to types/b_/b_-tests.ts diff --git a/b_/index.d.ts b/types/b_/index.d.ts similarity index 100% rename from b_/index.d.ts rename to types/b_/index.d.ts diff --git a/b_/tsconfig.json b/types/b_/tsconfig.json similarity index 100% rename from b_/tsconfig.json rename to types/b_/tsconfig.json diff --git a/b_/tslint.json b/types/b_/tslint.json similarity index 100% rename from b_/tslint.json rename to types/b_/tslint.json diff --git a/babel-code-frame/babel-code-frame-tests.ts b/types/babel-code-frame/babel-code-frame-tests.ts similarity index 100% rename from babel-code-frame/babel-code-frame-tests.ts rename to types/babel-code-frame/babel-code-frame-tests.ts diff --git a/babel-code-frame/index.d.ts b/types/babel-code-frame/index.d.ts similarity index 100% rename from babel-code-frame/index.d.ts rename to types/babel-code-frame/index.d.ts diff --git a/babel-code-frame/tsconfig.json b/types/babel-code-frame/tsconfig.json similarity index 100% rename from babel-code-frame/tsconfig.json rename to types/babel-code-frame/tsconfig.json diff --git a/babel-code-frame/tslint.json b/types/babel-code-frame/tslint.json similarity index 100% rename from babel-code-frame/tslint.json rename to types/babel-code-frame/tslint.json diff --git a/babel-core/babel-core-tests.ts b/types/babel-core/babel-core-tests.ts similarity index 100% rename from babel-core/babel-core-tests.ts rename to types/babel-core/babel-core-tests.ts diff --git a/babel-core/index.d.ts b/types/babel-core/index.d.ts similarity index 100% rename from babel-core/index.d.ts rename to types/babel-core/index.d.ts diff --git a/babel-core/tsconfig.json b/types/babel-core/tsconfig.json similarity index 100% rename from babel-core/tsconfig.json rename to types/babel-core/tsconfig.json diff --git a/babel-generator/babel-generator-tests.ts b/types/babel-generator/babel-generator-tests.ts similarity index 100% rename from babel-generator/babel-generator-tests.ts rename to types/babel-generator/babel-generator-tests.ts diff --git a/babel-generator/index.d.ts b/types/babel-generator/index.d.ts similarity index 100% rename from babel-generator/index.d.ts rename to types/babel-generator/index.d.ts diff --git a/babel-generator/tsconfig.json b/types/babel-generator/tsconfig.json similarity index 100% rename from babel-generator/tsconfig.json rename to types/babel-generator/tsconfig.json diff --git a/babel-template/babel-template-tests.ts b/types/babel-template/babel-template-tests.ts similarity index 100% rename from babel-template/babel-template-tests.ts rename to types/babel-template/babel-template-tests.ts diff --git a/babel-template/index.d.ts b/types/babel-template/index.d.ts similarity index 100% rename from babel-template/index.d.ts rename to types/babel-template/index.d.ts diff --git a/babel-template/tsconfig.json b/types/babel-template/tsconfig.json similarity index 100% rename from babel-template/tsconfig.json rename to types/babel-template/tsconfig.json diff --git a/babel-traverse/babel-traverse-tests.ts b/types/babel-traverse/babel-traverse-tests.ts similarity index 100% rename from babel-traverse/babel-traverse-tests.ts rename to types/babel-traverse/babel-traverse-tests.ts diff --git a/babel-traverse/index.d.ts b/types/babel-traverse/index.d.ts similarity index 100% rename from babel-traverse/index.d.ts rename to types/babel-traverse/index.d.ts diff --git a/babel-traverse/tsconfig.json b/types/babel-traverse/tsconfig.json similarity index 100% rename from babel-traverse/tsconfig.json rename to types/babel-traverse/tsconfig.json diff --git a/babel-types/babel-types-tests.ts b/types/babel-types/babel-types-tests.ts similarity index 100% rename from babel-types/babel-types-tests.ts rename to types/babel-types/babel-types-tests.ts diff --git a/babel-types/index.d.ts b/types/babel-types/index.d.ts similarity index 100% rename from babel-types/index.d.ts rename to types/babel-types/index.d.ts diff --git a/babel-types/tsconfig.json b/types/babel-types/tsconfig.json similarity index 100% rename from babel-types/tsconfig.json rename to types/babel-types/tsconfig.json diff --git a/babelify/babelify-tests.ts b/types/babelify/babelify-tests.ts similarity index 100% rename from babelify/babelify-tests.ts rename to types/babelify/babelify-tests.ts diff --git a/babelify/index.d.ts b/types/babelify/index.d.ts similarity index 100% rename from babelify/index.d.ts rename to types/babelify/index.d.ts diff --git a/babelify/tsconfig.json b/types/babelify/tsconfig.json similarity index 100% rename from babelify/tsconfig.json rename to types/babelify/tsconfig.json diff --git a/babylon/babylon-tests.ts b/types/babylon/babylon-tests.ts similarity index 100% rename from babylon/babylon-tests.ts rename to types/babylon/babylon-tests.ts diff --git a/babylon/index.d.ts b/types/babylon/index.d.ts similarity index 100% rename from babylon/index.d.ts rename to types/babylon/index.d.ts diff --git a/babylon/tsconfig.json b/types/babylon/tsconfig.json similarity index 100% rename from babylon/tsconfig.json rename to types/babylon/tsconfig.json diff --git a/babylonjs/babylonjs-tests.ts b/types/babylonjs/babylonjs-tests.ts similarity index 100% rename from babylonjs/babylonjs-tests.ts rename to types/babylonjs/babylonjs-tests.ts diff --git a/babylonjs/index.d.ts b/types/babylonjs/index.d.ts similarity index 100% rename from babylonjs/index.d.ts rename to types/babylonjs/index.d.ts diff --git a/babylonjs/tsconfig.json b/types/babylonjs/tsconfig.json similarity index 100% rename from babylonjs/tsconfig.json rename to types/babylonjs/tsconfig.json diff --git a/babyparse/babyparse-tests.ts b/types/babyparse/babyparse-tests.ts similarity index 100% rename from babyparse/babyparse-tests.ts rename to types/babyparse/babyparse-tests.ts diff --git a/babyparse/index.d.ts b/types/babyparse/index.d.ts similarity index 100% rename from babyparse/index.d.ts rename to types/babyparse/index.d.ts diff --git a/babyparse/tsconfig.json b/types/babyparse/tsconfig.json similarity index 100% rename from babyparse/tsconfig.json rename to types/babyparse/tsconfig.json diff --git a/backbone-associations/backbone-associations-tests.ts b/types/backbone-associations/backbone-associations-tests.ts similarity index 100% rename from backbone-associations/backbone-associations-tests.ts rename to types/backbone-associations/backbone-associations-tests.ts diff --git a/backbone-associations/index.d.ts b/types/backbone-associations/index.d.ts similarity index 100% rename from backbone-associations/index.d.ts rename to types/backbone-associations/index.d.ts diff --git a/backbone-associations/tsconfig.json b/types/backbone-associations/tsconfig.json similarity index 100% rename from backbone-associations/tsconfig.json rename to types/backbone-associations/tsconfig.json diff --git a/backbone-fetch-cache/backbone-fetch-cache-tests.ts b/types/backbone-fetch-cache/backbone-fetch-cache-tests.ts similarity index 100% rename from backbone-fetch-cache/backbone-fetch-cache-tests.ts rename to types/backbone-fetch-cache/backbone-fetch-cache-tests.ts diff --git a/backbone-fetch-cache/index.d.ts b/types/backbone-fetch-cache/index.d.ts similarity index 100% rename from backbone-fetch-cache/index.d.ts rename to types/backbone-fetch-cache/index.d.ts diff --git a/backbone-fetch-cache/tsconfig.json b/types/backbone-fetch-cache/tsconfig.json similarity index 100% rename from backbone-fetch-cache/tsconfig.json rename to types/backbone-fetch-cache/tsconfig.json diff --git a/backbone-relational/backbone-relational-tests.ts b/types/backbone-relational/backbone-relational-tests.ts similarity index 100% rename from backbone-relational/backbone-relational-tests.ts rename to types/backbone-relational/backbone-relational-tests.ts diff --git a/backbone-relational/index.d.ts b/types/backbone-relational/index.d.ts similarity index 100% rename from backbone-relational/index.d.ts rename to types/backbone-relational/index.d.ts diff --git a/backbone-relational/tsconfig.json b/types/backbone-relational/tsconfig.json similarity index 100% rename from backbone-relational/tsconfig.json rename to types/backbone-relational/tsconfig.json diff --git a/backbone.layoutmanager/backbone.layoutmanager-tests.ts b/types/backbone.layoutmanager/backbone.layoutmanager-tests.ts similarity index 100% rename from backbone.layoutmanager/backbone.layoutmanager-tests.ts rename to types/backbone.layoutmanager/backbone.layoutmanager-tests.ts diff --git a/backbone.layoutmanager/index.d.ts b/types/backbone.layoutmanager/index.d.ts similarity index 100% rename from backbone.layoutmanager/index.d.ts rename to types/backbone.layoutmanager/index.d.ts diff --git a/backbone.layoutmanager/tsconfig.json b/types/backbone.layoutmanager/tsconfig.json similarity index 100% rename from backbone.layoutmanager/tsconfig.json rename to types/backbone.layoutmanager/tsconfig.json diff --git a/backbone.localstorage/backbone.localstorage-tests.ts b/types/backbone.localstorage/backbone.localstorage-tests.ts similarity index 100% rename from backbone.localstorage/backbone.localstorage-tests.ts rename to types/backbone.localstorage/backbone.localstorage-tests.ts diff --git a/backbone.localstorage/index.d.ts b/types/backbone.localstorage/index.d.ts similarity index 100% rename from backbone.localstorage/index.d.ts rename to types/backbone.localstorage/index.d.ts diff --git a/backbone.localstorage/tsconfig.json b/types/backbone.localstorage/tsconfig.json similarity index 100% rename from backbone.localstorage/tsconfig.json rename to types/backbone.localstorage/tsconfig.json diff --git a/backbone.marionette/backbone.marionette-tests.ts b/types/backbone.marionette/backbone.marionette-tests.ts similarity index 97% rename from backbone.marionette/backbone.marionette-tests.ts rename to types/backbone.marionette/backbone.marionette-tests.ts index b5eb9d07c6..2c1f5b68bd 100644 --- a/backbone.marionette/backbone.marionette-tests.ts +++ b/types/backbone.marionette/backbone.marionette-tests.ts @@ -66,11 +66,11 @@ namespace MarionetteTests { let regions: {[key: string]: Marionette.Region} = this.layoutView.getRegions(); let prefix: string = this.layoutView.childViewEventPrefix; let region: Marionette.Region = this.layoutView.removeRegion('main'); - let layout: Marionette.LayoutView = this.layoutView.destroy(); + let layout: Marionette.View = this.layoutView.destroy(); } } - class AppLayoutView extends Marionette.LayoutView { + class AppLayoutView extends Marionette.View { constructor() { super({ el: 'body' }); } @@ -111,7 +111,7 @@ namespace MarionetteTests { } - class MyView extends Marionette.ItemView { + class MyView extends Marionette.View { behaviors: any; constructor(model: MyModel) { @@ -189,7 +189,7 @@ namespace MarionetteTests { constructor() { super(); this.childView = MyView; - this.childEvents = { + this.childViewEvents = { render: function () { console.log("a childView has been rendered"); } diff --git a/backbone.marionette/index.d.ts b/types/backbone.marionette/index.d.ts similarity index 90% rename from backbone.marionette/index.d.ts rename to types/backbone.marionette/index.d.ts index edaab2c2d6..d24f9d64f9 100644 --- a/backbone.marionette/index.d.ts +++ b/types/backbone.marionette/index.d.ts @@ -4,6 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import * as Backbone from 'backbone'; +import * as Radio from 'backbone.radio'; export as namespace Marionette; export = Marionette; @@ -22,8 +23,6 @@ declare module 'backbone' { findByIndex(index: number): TView; findByCid(cid: string): TView; remove(view: TView): void; - call(method: any): void; - apply(method: any, args?: any[]): void; //mixins from Collection (copied from Backbone's Collection declaration) @@ -180,6 +179,27 @@ declare namespace Marionette { * backbone conventions and utilities like initialize and Backbone.Events. */ class Object extends Backbone.Events { + + /** + * Defines the Radio channel that will be used for the requests and/or events + */ + channelName: string; + + /** + * Returns a Radio.Channel instance using 'channelName' + */ + getChannel(): Backbone.Radio.Channel; + + /** + * Defines an events hash with the events to be listened and its respective handlers + */ + radioEvents: any; + + /** + * Defines an events hash with the requests to be replied and its respective handlers + */ + radioRequests: any; + /** * Initialize is called immediately after the Object has been instantiated, * and is invoked with the same arguments that the constructor received. @@ -750,7 +770,7 @@ declare namespace Marionette { /** * View implements a destroy method, which is called by the region managers automatically. As part of the implementation. */ - destroy(...args: any[]): void; + destroy(...args: any[]): View; /** * In several cases you need to access ui elements inside the view to @@ -772,12 +792,37 @@ declare namespace Marionette { triggerMethod(name: string, ...args: any[]): any; /** - * Called on the view instance when the view has been rendered and - * displayed. This event can be used to react to when a view has been - * shown via a region. A common use case for the onShow method is to - * use it to add children views. + * Item views will serialize a model or collection, by default, by calling + * .toJSON on either the model or collection. If both a model and + * collection are attached to an item view, the model will be used as the + * data source. The results of the data serialization will be passed to + * the template that is rendered. + * + * If you need custom serialization for your data, you can provide a serializeData + * method on your view. It must return a valid JSON object, as if you had + * called .toJSON on a model or collection. */ - onShow(): void; + serializeData(): any; + + /** + * Renders the view. It is unwise to override the render method of any + * Marionette view. Instead, you should use the onBeforeRender and + * onRender callbacks to layer in additional functionality to the + * rendering of your view. + */ + render(): any; + + /** + * Triggered before an ItemView is rendered. + */ + onBeforeRender(): void; + + /** + * Triggered after the view has been rendered. You can implement this in + * your view to provide custom code for dealing with the view's el after + * it has been rendered. + */ + onRender(): void; /** * Triggered just after the view has been destroyed. @@ -814,49 +859,65 @@ declare namespace Marionette { isDestroyed: boolean; supportsRenderLifecycle: boolean; supportsDestroyLifecycle: boolean; - } - - /** - * An ItemView is a view that represents a single item. That item may be - * a Backbone.Model or may be a Backbone.Collection. Whichever it is though, - * it will be treated as a single item. - */ - class ItemView extends View { - - constructor(options?: Backbone.ViewOptions); /** - * Item views will serialize a model or collection, by default, by calling - * .toJSON on either the model or collection. If both a model and - * collection are attached to an item view, the model will be used as the - * data source. The results of the data serialization will be passed to - * the template that is rendered. - * - * If you need custom serialization for your data, you can provide a serializeData - * method on your view. It must return a valid JSON object, as if you had - * called .toJSON on a model or collection. + * If you have the need to replace the Region with a region class of your + * own implementation, you can specify an alternate class to use with this + * property. */ - serializeData(): any; + regionClass: any; /** - * Renders the view. It is unwise to override the render method of any - * Marionette view. Instead, you should use the onBeforeRender and - * onRender callbacks to layer in additional functionality to the - * rendering of your view. - */ - render(): ItemView; + * Regions hash or a method returning the regions hash that maps + * regions/selectors to methods on your View. + **/ + regions(): any; + + /** Adds a region to the layout view. */ + addRegion(name: string, definition: any): Region; /** - * Triggered before an ItemView is rendered. + * Add multiple regions as a {name: definition, name2: def2} object literal. */ - onBeforeRender(): void; + addRegions(regions: any): any; + + /** Returns a region from the layout view */ + getRegion(name: string): Region; /** - * Triggered after the view has been rendered. You can implement this in - * your view to provide custom code for dealing with the view's el after - * it has been rendered. + * Removes the region with the specified name. + * @param name the name of the region to remove. */ - onRender(): void; + removeRegion(name: string): Region; + + /** Enable easy overriding of the default `RegionManager` + * for customized region interactions and business specific + * view logic for better control over single regions. + */ + getRegionManager(): RegionManager; + + /** + * Show a view into the region specified by `regionName`. + */ + showChildView(regionName: string, view: any, options?: RegionShowOptions): void; + + /** + * Get the current view that is shown in the region specified by + * `regionName`. + */ + getChildView(regionName: string): Backbone.View; + + /** + * Returns all regions from the layout view. The results contains an + * Object hash that has `string`s as keys and `Region`s as values. + */ + getRegions(): {[key: string]: Region}; + + /** + * You can customize the event prefix for events that are forwarded through + * the layout view with this property. + */ + childViewEventPrefix: string; } @@ -928,12 +989,12 @@ declare namespace Marionette { childViewEventPrefix: string; /** - * You can specify a childEvents hash or method which allows you to - * capture all bubbling childEvents without having to manually set bindings. + * You can specify a childViewEvents hash or method which allows you to + * capture all bubbling childViewEvents without having to manually set bindings. * The keys of the hash can either be a function or a string that is the * name of a method on the collection view. */ - childEvents: any; + childViewEvents: any; /** * When a collection has no children, and you need to render a view other than @@ -1034,37 +1095,9 @@ declare namespace Marionette { */ attachHtml(collectionView: CollectionView, childView: TView, index: number): void; - /** - * The value returned by this method is the ChildView class that will be - * instantiated when a Model needs to be initially rendered. This method - * also gives you the ability to customize per Model ChildViews. - */ - getChildView(item: M): new (...args:any[]) => TView; - - /** - * If you need the emptyView's class chosen dynamically, specify - * getEmptyView. - */ - getEmptyView(): any; - /** Serialize a collection by serializing each of its models. */ serializeCollection(): any; - /** - * Attaches the content of a given view. - * This method can be overridden to optimize rendering, - * or to render in a non standard way. - * - * For example, using `innerHTML` instead of `$el.html` - * - * @example - * attachElContent: function(html) { - * this.el.innerHTML = html; - * return this; - * } - */ - attachElContent(html: string): ItemView; - /** * Reorder DOM after sorting. When your element's rendering * do not use their index, you can pass reorderOnSort: true @@ -1132,165 +1165,6 @@ declare namespace Marionette { onRemoveChild(childView: TView): void; } - /** - * A CompositeView extends from CollectionView to be used as a composite view - * for scenarios where it should represent both a branch and leaf in a tree - * structure, or for scenarios where a collection needs to be rendered within - * a wrapper template. - */ - class CompositeView> extends CollectionView { - - constructor(options?: CollectionViewOptions); - - /** - * Each childView will be rendered using the childView's template. The - * CompositeView's template is rendered and the childView's templates are - * added to this. - */ - childView: new (...args:any[]) => TView; - - /** - * By default the composite view uses the same attachHtml method that the - * collection view provides. This means the view will call jQuery's - * .append to move the HTML contents from the child view instance in to - * the collection view's el. - * This is typically not very useful as a composite view will usually render - * a container DOM element in which the child views should be placed. - * This can be either a string or a function returning a string. - */ - childViewContainer: any; - - /** - * Renders the view. - */ - render(): CompositeView; - - /** - * Invoked before the model has been rendered - */ - onBeforeRenderTemplate(): void; - - /** - * Invoked after the model has been rendered. - */ - onRenderTemplate(): void; - - /** - * Invoked before the collection of models is rendered - */ - onBeforeRenderCollection(): void; - - /** - * Invoked after the collection of models has been rendered - */ - onRenderCollection(): void; - } - - interface LayoutViewOptions extends Backbone.ViewOptions { - /** - * The LayoutView takes an additional parameter where you can pass the regions as option on creation. - */ - regions?:any; - - /** - * This option removes the layoutView from the DOM before destroying the - * children preventing repaints as each option is removed. However, it - * makes it difficult to do close animations for a child view (false by - * default) - */ - destroyImmediate?: boolean; - } - - /** - * A LayoutView is a hybrid of an ItemView and a collection of Region objects. - * They are ideal for rendering application layouts with multiple sub-regions - * managed by specified region managers. - * A layoutView can also act as a composite-view to aggregate multiple views - * and sub-application areas of the screen allowing applications to attach - * multiple region managers to dynamically rendered HTML. - * You can create complex views by nesting layoutView managers within Regions. - */ - class LayoutView extends ItemView { - /** - * If you have the need to replace the Region with a region class of your - * own implementation, you can specify an alternate class to use with this - * property. - */ - regionClass: any; - - /** - * Constructor. - * A hash that can contain a regions hash that allows you to specify regions per - * LayoutView instance. - */ - constructor(options?: LayoutViewOptions); - - /** - * Handle destroying regions, and then destroy the view itself. - */ - destroy(): LayoutView; - - /** - * Regions hash or a method returning the regions hash that maps - * regions/selectors to methods on your View. - **/ - regions(): any; - - /** Adds a region to the layout view. */ - addRegion(name: string, definition: any): Region; - - /** - * Add multiple regions as a {name: definition, name2: def2} object literal. - */ - addRegions(regions: any): any; - - /** Returns a region from the layout view */ - getRegion(name: string): Region; - - /** - * Renders the view. It will use the existing region objects the first - * time it is called. Subsequent calls will destroy the views that the - * regions are showing and then reset the `el` for the regions to the - * newly rendered DOM elements. - */ - render(): LayoutView; - - /** - * Removes the region with the specified name. - * @param name the name of the region to remove. - */ - removeRegion(name: string): Region; - - /** Enable easy overriding of the default `RegionManager` - * for customized region interactions and business specific - * view logic for better control over single regions. - */ - getRegionManager(): RegionManager; - - /** - * Show a view into the region specified by `regionName`. - */ - showChildView(regionName: string, view: any, options?: RegionShowOptions): void; - - /** - * Get the current view that is shown in the region specified by - * `regionName`. - */ - getChildView(regionName: string): Backbone.View; - - /** - * Returns all regions from the layout view. The results contains an - * Object hash that has `string`s as keys and `Region`s as values. - */ - getRegions(): {[key: string]: Region}; - - /** - * You can customize the event prefix for events that are forwarded through - * the layout view with this property. - */ - childViewEventPrefix: string; - } - interface AppRouterOptions extends Backbone.RouterOptions { /** * The appRoutes. @@ -1437,7 +1311,7 @@ declare namespace Marionette { options: any; - /** + /** * Behaviors can have their own ui hash, which will be mixed into the ui * hash of its associated View instance. ui elements defined on either the * Behavior or the View will be made available within events and triggers. diff --git a/backbone.marionette/tsconfig.json b/types/backbone.marionette/tsconfig.json similarity index 100% rename from backbone.marionette/tsconfig.json rename to types/backbone.marionette/tsconfig.json diff --git a/backbone.paginator/backbone.paginator-tests.ts b/types/backbone.paginator/backbone.paginator-tests.ts similarity index 100% rename from backbone.paginator/backbone.paginator-tests.ts rename to types/backbone.paginator/backbone.paginator-tests.ts diff --git a/backbone.paginator/index.d.ts b/types/backbone.paginator/index.d.ts similarity index 100% rename from backbone.paginator/index.d.ts rename to types/backbone.paginator/index.d.ts diff --git a/backbone.paginator/tsconfig.json b/types/backbone.paginator/tsconfig.json similarity index 100% rename from backbone.paginator/tsconfig.json rename to types/backbone.paginator/tsconfig.json diff --git a/backbone.radio/backbone.radio-tests.ts b/types/backbone.radio/backbone.radio-tests.ts similarity index 100% rename from backbone.radio/backbone.radio-tests.ts rename to types/backbone.radio/backbone.radio-tests.ts diff --git a/backbone.radio/index.d.ts b/types/backbone.radio/index.d.ts similarity index 100% rename from backbone.radio/index.d.ts rename to types/backbone.radio/index.d.ts diff --git a/backbone.radio/tsconfig.json b/types/backbone.radio/tsconfig.json similarity index 100% rename from backbone.radio/tsconfig.json rename to types/backbone.radio/tsconfig.json diff --git a/backbone/backbone-tests.ts b/types/backbone/backbone-tests.ts similarity index 100% rename from backbone/backbone-tests.ts rename to types/backbone/backbone-tests.ts diff --git a/backbone/index.d.ts b/types/backbone/index.d.ts similarity index 100% rename from backbone/index.d.ts rename to types/backbone/index.d.ts diff --git a/backbone/tsconfig.json b/types/backbone/tsconfig.json similarity index 100% rename from backbone/tsconfig.json rename to types/backbone/tsconfig.json diff --git a/backgrid/backgrid-tests.ts b/types/backgrid/backgrid-tests.ts similarity index 100% rename from backgrid/backgrid-tests.ts rename to types/backgrid/backgrid-tests.ts diff --git a/backgrid/index.d.ts b/types/backgrid/index.d.ts similarity index 100% rename from backgrid/index.d.ts rename to types/backgrid/index.d.ts diff --git a/backgrid/tsconfig.json b/types/backgrid/tsconfig.json similarity index 100% rename from backgrid/tsconfig.json rename to types/backgrid/tsconfig.json diff --git a/backlog-js/backlog-js-tests.ts b/types/backlog-js/backlog-js-tests.ts similarity index 100% rename from backlog-js/backlog-js-tests.ts rename to types/backlog-js/backlog-js-tests.ts diff --git a/backlog-js/index.d.ts b/types/backlog-js/index.d.ts similarity index 100% rename from backlog-js/index.d.ts rename to types/backlog-js/index.d.ts diff --git a/backlog-js/tsconfig.json b/types/backlog-js/tsconfig.json similarity index 100% rename from backlog-js/tsconfig.json rename to types/backlog-js/tsconfig.json diff --git a/baconjs/.editorconfig b/types/baconjs/.editorconfig similarity index 100% rename from baconjs/.editorconfig rename to types/baconjs/.editorconfig diff --git a/baconjs/baconjs-tests.ts b/types/baconjs/baconjs-tests.ts similarity index 100% rename from baconjs/baconjs-tests.ts rename to types/baconjs/baconjs-tests.ts diff --git a/baconjs/index.d.ts b/types/baconjs/index.d.ts similarity index 100% rename from baconjs/index.d.ts rename to types/baconjs/index.d.ts diff --git a/baconjs/tsconfig.json b/types/baconjs/tsconfig.json similarity index 100% rename from baconjs/tsconfig.json rename to types/baconjs/tsconfig.json diff --git a/barcode/barcode-tests.ts b/types/barcode/barcode-tests.ts similarity index 100% rename from barcode/barcode-tests.ts rename to types/barcode/barcode-tests.ts diff --git a/barcode/index.d.ts b/types/barcode/index.d.ts similarity index 100% rename from barcode/index.d.ts rename to types/barcode/index.d.ts diff --git a/barcode/tsconfig.json b/types/barcode/tsconfig.json similarity index 100% rename from barcode/tsconfig.json rename to types/barcode/tsconfig.json diff --git a/bardjs/bardjs-tests.ts b/types/bardjs/bardjs-tests.ts similarity index 100% rename from bardjs/bardjs-tests.ts rename to types/bardjs/bardjs-tests.ts diff --git a/bardjs/index.d.ts b/types/bardjs/index.d.ts similarity index 100% rename from bardjs/index.d.ts rename to types/bardjs/index.d.ts diff --git a/bardjs/tsconfig.json b/types/bardjs/tsconfig.json similarity index 100% rename from bardjs/tsconfig.json rename to types/bardjs/tsconfig.json diff --git a/base-64/base-64-tests.ts b/types/base-64/base-64-tests.ts similarity index 100% rename from base-64/base-64-tests.ts rename to types/base-64/base-64-tests.ts diff --git a/base-64/index.d.ts b/types/base-64/index.d.ts similarity index 100% rename from base-64/index.d.ts rename to types/base-64/index.d.ts diff --git a/base-64/tsconfig.json b/types/base-64/tsconfig.json similarity index 100% rename from base-64/tsconfig.json rename to types/base-64/tsconfig.json diff --git a/base-64/tslint.json b/types/base-64/tslint.json similarity index 100% rename from base-64/tslint.json rename to types/base-64/tslint.json diff --git a/base-x/base-x-tests.ts b/types/base-x/base-x-tests.ts similarity index 100% rename from base-x/base-x-tests.ts rename to types/base-x/base-x-tests.ts diff --git a/base-x/index.d.ts b/types/base-x/index.d.ts similarity index 100% rename from base-x/index.d.ts rename to types/base-x/index.d.ts diff --git a/base-x/tsconfig.json b/types/base-x/tsconfig.json similarity index 100% rename from base-x/tsconfig.json rename to types/base-x/tsconfig.json diff --git a/base16/base16-tests.ts b/types/base16/base16-tests.ts similarity index 100% rename from base16/base16-tests.ts rename to types/base16/base16-tests.ts diff --git a/base16/index.d.ts b/types/base16/index.d.ts similarity index 100% rename from base16/index.d.ts rename to types/base16/index.d.ts diff --git a/base16/tsconfig.json b/types/base16/tsconfig.json similarity index 100% rename from base16/tsconfig.json rename to types/base16/tsconfig.json diff --git a/base64-js/base64-js-tests.ts b/types/base64-js/base64-js-tests.ts similarity index 100% rename from base64-js/base64-js-tests.ts rename to types/base64-js/base64-js-tests.ts diff --git a/base64-js/index.d.ts b/types/base64-js/index.d.ts similarity index 100% rename from base64-js/index.d.ts rename to types/base64-js/index.d.ts diff --git a/base64-js/tsconfig.json b/types/base64-js/tsconfig.json similarity index 100% rename from base64-js/tsconfig.json rename to types/base64-js/tsconfig.json diff --git a/base64-js/tslint.json b/types/base64-js/tslint.json similarity index 100% rename from base64-js/tslint.json rename to types/base64-js/tslint.json diff --git a/base64url/base64url-tests.ts b/types/base64url/base64url-tests.ts similarity index 100% rename from base64url/base64url-tests.ts rename to types/base64url/base64url-tests.ts diff --git a/base64url/index.d.ts b/types/base64url/index.d.ts similarity index 100% rename from base64url/index.d.ts rename to types/base64url/index.d.ts diff --git a/base64url/tsconfig.json b/types/base64url/tsconfig.json similarity index 100% rename from base64url/tsconfig.json rename to types/base64url/tsconfig.json diff --git a/bases/bases-tests.ts b/types/bases/bases-tests.ts similarity index 100% rename from bases/bases-tests.ts rename to types/bases/bases-tests.ts diff --git a/bases/index.d.ts b/types/bases/index.d.ts similarity index 100% rename from bases/index.d.ts rename to types/bases/index.d.ts diff --git a/bases/tsconfig.json b/types/bases/tsconfig.json similarity index 100% rename from bases/tsconfig.json rename to types/bases/tsconfig.json diff --git a/basic-auth/basic-auth-tests.ts b/types/basic-auth/basic-auth-tests.ts similarity index 100% rename from basic-auth/basic-auth-tests.ts rename to types/basic-auth/basic-auth-tests.ts diff --git a/basic-auth/index.d.ts b/types/basic-auth/index.d.ts similarity index 100% rename from basic-auth/index.d.ts rename to types/basic-auth/index.d.ts diff --git a/basic-auth/tsconfig.json b/types/basic-auth/tsconfig.json similarity index 100% rename from basic-auth/tsconfig.json rename to types/basic-auth/tsconfig.json diff --git a/batch-stream/batch-stream-tests.ts b/types/batch-stream/batch-stream-tests.ts similarity index 100% rename from batch-stream/batch-stream-tests.ts rename to types/batch-stream/batch-stream-tests.ts diff --git a/batch-stream/index.d.ts b/types/batch-stream/index.d.ts similarity index 100% rename from batch-stream/index.d.ts rename to types/batch-stream/index.d.ts diff --git a/batch-stream/tsconfig.json b/types/batch-stream/tsconfig.json similarity index 100% rename from batch-stream/tsconfig.json rename to types/batch-stream/tsconfig.json diff --git a/bazinga-translator/bazinga-translator-tests.ts b/types/bazinga-translator/bazinga-translator-tests.ts similarity index 100% rename from bazinga-translator/bazinga-translator-tests.ts rename to types/bazinga-translator/bazinga-translator-tests.ts diff --git a/bazinga-translator/index.d.ts b/types/bazinga-translator/index.d.ts similarity index 100% rename from bazinga-translator/index.d.ts rename to types/bazinga-translator/index.d.ts diff --git a/bazinga-translator/tsconfig.json b/types/bazinga-translator/tsconfig.json similarity index 100% rename from bazinga-translator/tsconfig.json rename to types/bazinga-translator/tsconfig.json diff --git a/bcrypt-nodejs/bcrypt-nodejs-tests.ts b/types/bcrypt-nodejs/bcrypt-nodejs-tests.ts similarity index 100% rename from bcrypt-nodejs/bcrypt-nodejs-tests.ts rename to types/bcrypt-nodejs/bcrypt-nodejs-tests.ts diff --git a/bcrypt-nodejs/index.d.ts b/types/bcrypt-nodejs/index.d.ts similarity index 100% rename from bcrypt-nodejs/index.d.ts rename to types/bcrypt-nodejs/index.d.ts diff --git a/bcrypt-nodejs/tsconfig.json b/types/bcrypt-nodejs/tsconfig.json similarity index 100% rename from bcrypt-nodejs/tsconfig.json rename to types/bcrypt-nodejs/tsconfig.json diff --git a/bcrypt/bcrypt-tests.ts b/types/bcrypt/bcrypt-tests.ts similarity index 100% rename from bcrypt/bcrypt-tests.ts rename to types/bcrypt/bcrypt-tests.ts diff --git a/bcrypt/index.d.ts b/types/bcrypt/index.d.ts similarity index 100% rename from bcrypt/index.d.ts rename to types/bcrypt/index.d.ts diff --git a/bcrypt/tsconfig.json b/types/bcrypt/tsconfig.json similarity index 100% rename from bcrypt/tsconfig.json rename to types/bcrypt/tsconfig.json diff --git a/bcryptjs/bcryptjs-tests.ts b/types/bcryptjs/bcryptjs-tests.ts similarity index 100% rename from bcryptjs/bcryptjs-tests.ts rename to types/bcryptjs/bcryptjs-tests.ts diff --git a/bcryptjs/index.d.ts b/types/bcryptjs/index.d.ts similarity index 100% rename from bcryptjs/index.d.ts rename to types/bcryptjs/index.d.ts diff --git a/bcryptjs/tsconfig.json b/types/bcryptjs/tsconfig.json similarity index 100% rename from bcryptjs/tsconfig.json rename to types/bcryptjs/tsconfig.json diff --git a/benchmark/benchmark-tests.ts b/types/benchmark/benchmark-tests.ts similarity index 100% rename from benchmark/benchmark-tests.ts rename to types/benchmark/benchmark-tests.ts diff --git a/benchmark/index.d.ts b/types/benchmark/index.d.ts similarity index 100% rename from benchmark/index.d.ts rename to types/benchmark/index.d.ts diff --git a/benchmark/tsconfig.json b/types/benchmark/tsconfig.json similarity index 100% rename from benchmark/tsconfig.json rename to types/benchmark/tsconfig.json diff --git a/better-curry/better-curry-tests.ts b/types/better-curry/better-curry-tests.ts similarity index 100% rename from better-curry/better-curry-tests.ts rename to types/better-curry/better-curry-tests.ts diff --git a/better-curry/index.d.ts b/types/better-curry/index.d.ts similarity index 100% rename from better-curry/index.d.ts rename to types/better-curry/index.d.ts diff --git a/better-curry/tsconfig.json b/types/better-curry/tsconfig.json similarity index 100% rename from better-curry/tsconfig.json rename to types/better-curry/tsconfig.json diff --git a/bezier-easing/bezier-easing-tests.ts b/types/bezier-easing/bezier-easing-tests.ts similarity index 100% rename from bezier-easing/bezier-easing-tests.ts rename to types/bezier-easing/bezier-easing-tests.ts diff --git a/bezier-easing/index.d.ts b/types/bezier-easing/index.d.ts similarity index 100% rename from bezier-easing/index.d.ts rename to types/bezier-easing/index.d.ts diff --git a/bezier-easing/tsconfig.json b/types/bezier-easing/tsconfig.json similarity index 100% rename from bezier-easing/tsconfig.json rename to types/bezier-easing/tsconfig.json diff --git a/bezier-js/bezier-js-tests.ts b/types/bezier-js/bezier-js-tests.ts similarity index 100% rename from bezier-js/bezier-js-tests.ts rename to types/bezier-js/bezier-js-tests.ts diff --git a/bezier-js/index.d.ts b/types/bezier-js/index.d.ts similarity index 100% rename from bezier-js/index.d.ts rename to types/bezier-js/index.d.ts diff --git a/bezier-js/tsconfig.json b/types/bezier-js/tsconfig.json similarity index 100% rename from bezier-js/tsconfig.json rename to types/bezier-js/tsconfig.json diff --git a/bgiframe/index.d.ts b/types/bgiframe/index.d.ts similarity index 100% rename from bgiframe/index.d.ts rename to types/bgiframe/index.d.ts diff --git a/bgiframe/tsconfig.json b/types/bgiframe/tsconfig.json similarity index 100% rename from bgiframe/tsconfig.json rename to types/bgiframe/tsconfig.json diff --git a/big-integer/big-integer-tests.ts b/types/big-integer/big-integer-tests.ts similarity index 100% rename from big-integer/big-integer-tests.ts rename to types/big-integer/big-integer-tests.ts diff --git a/big-integer/index.d.ts b/types/big-integer/index.d.ts similarity index 100% rename from big-integer/index.d.ts rename to types/big-integer/index.d.ts diff --git a/big-integer/tsconfig.json b/types/big-integer/tsconfig.json similarity index 100% rename from big-integer/tsconfig.json rename to types/big-integer/tsconfig.json diff --git a/big.js/big.js-tests.ts b/types/big.js/big.js-tests.ts similarity index 100% rename from big.js/big.js-tests.ts rename to types/big.js/big.js-tests.ts diff --git a/big.js/index.d.ts b/types/big.js/index.d.ts similarity index 100% rename from big.js/index.d.ts rename to types/big.js/index.d.ts diff --git a/big.js/tsconfig.json b/types/big.js/tsconfig.json similarity index 100% rename from big.js/tsconfig.json rename to types/big.js/tsconfig.json diff --git a/bigi/bigi-tests.ts b/types/bigi/bigi-tests.ts similarity index 100% rename from bigi/bigi-tests.ts rename to types/bigi/bigi-tests.ts diff --git a/bigi/index.d.ts b/types/bigi/index.d.ts similarity index 100% rename from bigi/index.d.ts rename to types/bigi/index.d.ts diff --git a/bigi/tsconfig.json b/types/bigi/tsconfig.json similarity index 100% rename from bigi/tsconfig.json rename to types/bigi/tsconfig.json diff --git a/bigi/tslint.json b/types/bigi/tslint.json similarity index 100% rename from bigi/tslint.json rename to types/bigi/tslint.json diff --git a/bigint/bigint-tests.ts b/types/bigint/bigint-tests.ts similarity index 100% rename from bigint/bigint-tests.ts rename to types/bigint/bigint-tests.ts diff --git a/bigint/index.d.ts b/types/bigint/index.d.ts similarity index 100% rename from bigint/index.d.ts rename to types/bigint/index.d.ts diff --git a/bigint/tsconfig.json b/types/bigint/tsconfig.json similarity index 100% rename from bigint/tsconfig.json rename to types/bigint/tsconfig.json diff --git a/bignum/bignum-tests.ts b/types/bignum/bignum-tests.ts similarity index 100% rename from bignum/bignum-tests.ts rename to types/bignum/bignum-tests.ts diff --git a/bignum/index.d.ts b/types/bignum/index.d.ts similarity index 100% rename from bignum/index.d.ts rename to types/bignum/index.d.ts diff --git a/bignum/tsconfig.json b/types/bignum/tsconfig.json similarity index 100% rename from bignum/tsconfig.json rename to types/bignum/tsconfig.json diff --git a/types/bignumber.js/bignumber.js-tests.ts b/types/bignumber.js/bignumber.js-tests.ts new file mode 100644 index 0000000000..9dc96dd7ea --- /dev/null +++ b/types/bignumber.js/bignumber.js-tests.ts @@ -0,0 +1,443 @@ +var x: BigNumber.BigNumber = new BigNumber(9); +var y = new BigNumber(x); + +BigNumber(435.345); + +new BigNumber('5032485723458348569331745.33434346346912144534543'); +new BigNumber('4.321e+4'); +new BigNumber('-735.0918e-430'); +new BigNumber(Infinity); +new BigNumber(NaN); +new BigNumber('.5'); +new BigNumber('+2'); +new BigNumber(-10110100.1, 2); +new BigNumber(-0b10110100); +new BigNumber('123412421.234324', 5); +new BigNumber('ff.8', 16); +new BigNumber('0xff.8'); + +new BigNumber(9, 2); + +new BigNumber(96517860459076817.4395); + +new BigNumber('blurgh'); + +BigNumber.config({ DECIMAL_PLACES: 5 }); +new BigNumber(1.23456789); +new BigNumber(1.23456789, 10); + +BigNumber.config({ DECIMAL_PLACES: 5 }); +var BN = BigNumber.another({ DECIMAL_PLACES: 9 }); + +x = new BigNumber(1); +y = new BN(1); + +x.div(3); +y.div(3); + +BN = BigNumber.another(); +BN.config({ DECIMAL_PLACES: 9 }); + +BigNumber.config({ DECIMAL_PLACES: 5 }); +BigNumber.set({ DECIMAL_PLACES: 5 }); +BigNumber.config(5); + +BigNumber.config({ ROUNDING_MODE: 0 }); +BigNumber.config(undefined, BigNumber.ROUND_UP); + +BigNumber.config({ EXPONENTIAL_AT: 2 }); +new BigNumber(12.3); +new BigNumber(123); +new BigNumber(0.123); +new BigNumber(0.0123); + +BigNumber.config({ EXPONENTIAL_AT: [-7, 20] }); +new BigNumber(123456789); +new BigNumber(0.000000123); + +BigNumber.config({ EXPONENTIAL_AT: 1e+9 }); + +BigNumber.config({ EXPONENTIAL_AT: 0 }); + +BigNumber.config({ RANGE: 500 }); +BigNumber.config().RANGE; +new BigNumber('9.999e499'); +new BigNumber('1e500'); +new BigNumber('1e-499'); +new BigNumber('1e-500'); + +BigNumber.config({ RANGE: [-3, 4] }); +new BigNumber(99999); +new BigNumber(100000); +new BigNumber(0.001); +new BigNumber(0.0001); + +BigNumber.config({ ERRORS: false }); + +BigNumber.config({ CRYPTO: true }); +BigNumber.config().CRYPTO; +BigNumber.random(); + +BigNumber.config({ MODULO_MODE: BigNumber.EUCLID }); +BigNumber.config({ MODULO_MODE: 9 }); + +BigNumber.config({ POW_PRECISION: 100 }); + +BigNumber.config({ + FORMAT: { + decimalSeparator: '.', + groupSeparator: ',', + groupSize: 3, + secondaryGroupSize: 0, + fractionGroupSeparator: ' ', + fractionGroupSize: 0 + } +}); + +BigNumber.config({ + DECIMAL_PLACES: 40, + ROUNDING_MODE: BigNumber.ROUND_HALF_CEIL, + EXPONENTIAL_AT: [-10, 20], + RANGE: [-500, 500], + ERRORS: true, + CRYPTO: true, + MODULO_MODE: BigNumber.ROUND_FLOOR, + POW_PRECISION: 80, + FORMAT: { + groupSize: 3, + groupSeparator: ' ', + decimalSeparator: ',' + } +}); + +BigNumber.config(40, 7, [-10, 20], 500, 1, 1, 3, 80); + +var obj = BigNumber.config(); +obj.ERRORS; +obj.RANGE; + +x = new BigNumber('3257869345.0378653'); +BigNumber.max(4e9, x, '123456789.9'); + +var arr = [12, '13', new BigNumber(14)]; +BigNumber.max(arr); + +x = new BigNumber('3257869345.0378653'); +BigNumber.min(4e9, x, '123456789.9'); + +arr = [2, new BigNumber(-14), '-15.9999', -12]; +BigNumber.min(arr); + +BigNumber.config({ DECIMAL_PLACES: 10 }); +BigNumber.random(); +BigNumber.random(20); + +BigNumber.config({ ROUNDING_MODE: BigNumber.ROUND_CEIL }); +BigNumber.config({ ROUNDING_MODE: 2 }); + +x = new BigNumber(-0.8); +y = x.absoluteValue(); +var z = y.abs(); + +x = new BigNumber(1.3); +x.ceil(); +y = new BigNumber(-1.8); +y.ceil(); + +x = new BigNumber(Infinity); +y = new BigNumber(5); +x.comparedTo(y); +x.comparedTo(x.minus(1)); +y.cmp(NaN); +y.cmp('110', 2); + +x = new BigNumber(123.45); +x.decimalPlaces(); +y = new BigNumber('9.9e-101'); +y.dp(); + +x = new BigNumber(355); +y = new BigNumber(113); +x.dividedBy(y); +x.div(5); +x.div(47, 16); + +x = new BigNumber(5); +y = new BigNumber(3); +x.dividedToIntegerBy(y); +x.divToInt(0.7); +x.divToInt('0.f', 16); + +0 === 1e-324; +x = new BigNumber(0); +x.equals('1e-324'); +BigNumber(-0).eq(x); +BigNumber(255).eq('ff', 16); + +y = new BigNumber(NaN); +y.equals(NaN); + +x = new BigNumber(1.8); +x.floor(); +y = new BigNumber(-1.3); +y.floor(); + +0.1 > (0.3 - 0.2); +x = new BigNumber(0.1); +x.greaterThan(BigNumber(0.3).minus(0.2)); +BigNumber(0).gt(x); +BigNumber(11, 3).gt(11.1, 2); + +x = new BigNumber(0.3).minus(0.2); +x.greaterThanOrEqualTo(0.1); +BigNumber(1).gte(x); +BigNumber(10, 18).gte('i', 36); + +x = new BigNumber(1); +x.isFinite(); +y = new BigNumber(Infinity); +y.isFinite(); + +x = new BigNumber(1); +x.isInteger(); +y = new BigNumber(123.456); +y.isInt(); + +x = new BigNumber(NaN); +x.isNaN(); +y = new BigNumber('Infinity'); +y.isNaN(); + +x = new BigNumber(-0); +x.isNegative(); +y = new BigNumber(2); +y.isNeg(); + +x = new BigNumber(-0); +x.isZero() && x.isNeg(); +y = new BigNumber(Infinity); +y.isZero(); + +x = new BigNumber(0.3).minus(0.2); +x.lessThan(0.1); +BigNumber(0).lt(x); +BigNumber(11.1, 2).lt(11, 3); + +x = new BigNumber(0.1); +x.lessThanOrEqualTo(BigNumber(0.3).minus(0.2)); +BigNumber(-1).lte(x); +BigNumber(10, 18).lte('i', 36); + +x = new BigNumber(0.3); +x.minus(0.1); +x.sub(0.6, 20); + +x = new BigNumber(1); +x.modulo(0.9); +y = new BigNumber(33); +y.mod('a', 33); + +x = new BigNumber(1.8); +x.negated(); +y = new BigNumber(-1.3); +y.neg(); + +x = new BigNumber(0.1); +y = x.plus(0.2); +BigNumber(0.7).plus(x).add(y); +x.plus('0.1', 8); + +x = new BigNumber(1.234); +x.precision(); +y = new BigNumber(987000); +y.sd(); +y.sd(true); + +y = new BigNumber(x); +y.round(); +y.round(1); +y.round(2); +y.round(10); +y.round(0, 1); +y.round(0, 6); +y.round(1, 1); +y.round(1, BigNumber.ROUND_HALF_EVEN); + +x = new BigNumber(1.23); +x.shift(3); +x.shift(-3); + +x = new BigNumber(16); +x.squareRoot(); +y = new BigNumber(3); +y.sqrt(); + +x = new BigNumber(0.6); +y = x.times(3); +BigNumber('7e+500').times(y); +x.times('-a', 16); + +BigNumber.config({ DECIMAL_PLACES: 5, ROUNDING_MODE: 4 }); +x = new BigNumber(9876.54321); + +x.toDigits(); +x.toDigits(6); +x.toDigits(6, BigNumber.ROUND_UP); +x.toDigits(2); +x.toDigits(2, 1); + +y = new BigNumber(45.6); +y.toExponential(); +y.toExponential(0); +y.toExponential(1); +y.toExponential(1, 1); +y.toExponential(3); + +y = new BigNumber(3.456); +y.toFixed(); +y.toFixed(0); +y.toFixed(2); +y.toFixed(2, 1); +y.toFixed(5); + +var format = { + decimalSeparator: '.', + groupSeparator: ',', + groupSize: 3, + secondaryGroupSize: 0, + fractionGroupSeparator: ' ', + fractionGroupSize: 0 +}; +BigNumber.config({ FORMAT: format }); + +x = new BigNumber('123456789.123456789'); +x.toFormat(); +x.toFormat(1); + +format.groupSeparator = ' '; +format.fractionGroupSize = 5; +x.toFormat(); + +BigNumber.config({ + FORMAT: { + decimalSeparator: ',', + groupSeparator: '.', + groupSize: 3, + secondaryGroupSize: 2 + } +}); + +x.toFormat(6); + +x = new BigNumber(1.75); +x.toFraction(); + +var pi = new BigNumber('3.14159265358'); +pi.toFraction(); +pi.toFraction(100000); +pi.toFraction(10000); +pi.toFraction(100); +pi.toFraction(10); +pi.toFraction(1); + +x = new BigNumber('177.7e+457'); +y = new BigNumber(235.4325); +z = new BigNumber('0.0098074'); + +var str = JSON.stringify([x, y, z]); + +JSON.parse(str, (key, val) => key === '' ? val : new BigNumber(val)); + +x = new BigNumber(456.789); +x.toNumber(); +{ +x; } + +y = new BigNumber('45987349857634085409857349856430985'); +y.toNumber(); + +z = new BigNumber(-0); +1 / +z; +1 / z.toNumber(); + +x = new BigNumber(0.7); +x.toPower(2); +BigNumber(3).pow(-2); + +y = new BigNumber(45.6); +x.toPrecision(); +y.toPrecision(); +x.toPrecision(1); +y.toPrecision(1); +y.toPrecision(2, 0); +y.toPrecision(2, 1); +x.toPrecision(5); +y.toPrecision(5); + +x = new BigNumber(750000); +x.toString(); +BigNumber.config({ EXPONENTIAL_AT: 5 }); +x.toString(); + +y = new BigNumber(362.875); +y.toString(2); +y.toString(9); +y.toString(32); + +BigNumber.config({ DECIMAL_PLACES: 4 }); +z = new BigNumber('1.23456789'); +z.toString(); +z.toString(10); + +x = new BigNumber(123.456); +x.truncated(); +y = new BigNumber(-12.3); +y.trunc(); + +x = new BigNumber('-0'); +x.toString(); +x.valueOf(); +y = new BigNumber('1.777e+457'); +y.valueOf(); + +x = new BigNumber(0.123); +x.toExponential(); +x.c; +x.e; +x.s; + +z = new BigNumber('-123.4567000e+2'); +z.toExponential(); +z.c; +z.e; +z.s; + +x = new BigNumber(3); +x instanceof BigNumber; +x.isBigNumber; + +BN = BigNumber.another(); + +y = new BN(3); +y instanceof BigNumber; +y.isBigNumber; + +y = new BigNumber(-0); +y.c; +y.e; +y.s; + +try { + // ... +} catch (e) { + if (e instanceof Error && e.name === 'BigNumber Error') { + // ... + } +} + +x = new BigNumber("1.0"); +y = new BigNumber("1.1000"); +z = x.add(y); + +x = new BigNumber("1.20"); +y = new BigNumber("3.45000"); +z = x.mul(y); diff --git a/bignumber.js/index.d.ts b/types/bignumber.js/index.d.ts similarity index 94% rename from bignumber.js/index.d.ts rename to types/bignumber.js/index.d.ts index d94be507c7..10423b1ed3 100644 --- a/bignumber.js/index.d.ts +++ b/types/bignumber.js/index.d.ts @@ -10,9 +10,7 @@ export as namespace BigNumber; export = BigNumber; declare namespace BigNumber { - interface FormatConfig { - /** * The decimal separator. */ @@ -45,9 +43,8 @@ declare namespace BigNumber { } interface BigNumberConfig { - /** - * The maximum number of decimal places of the results of operations involving division, + * The maximum number of decimal places of the results of operations involving division, * i.e. division, square root and base conversion operations, and power operations with negative exponents. */ DECIMAL_PLACES: number; @@ -59,56 +56,56 @@ declare namespace BigNumber { /** * The exponent value(s) at which `toString` returns exponential notation. - * + * * If a single number is assigned, the value is the exponent magnitude. - * - * If an array of two numbers is assigned then the first number is the negative exponent value at and beneath which exponential notation is used, + * + * If an array of two numbers is assigned then the first number is the negative exponent value at and beneath which exponential notation is used, * and the second number is the positive exponent value at and above which the same. */ EXPONENTIAL_AT: number | number[]; /** * The exponent value(s) beyond which overflow to `Infinity` and underflow to zero occurs. - * - * If a single number is assigned, it is the maximum exponent magnitude: - * values wth a positive exponent of greater magnitude become `Infinity` + * + * If a single number is assigned, it is the maximum exponent magnitude: + * values wth a positive exponent of greater magnitude become `Infinity` * and those with a negative exponent of greater magnitude become zero. - * + * * If an array of two numbers is assigned then the first number is the negative exponent limit and the second number is the positive exponent limit. */ RANGE: number | number[]; /** * The value that determines whether BigNumber Errors are thrown. - * + * * If `ERRORS` is false, no errors will be thrown. */ ERRORS: boolean | 0 | 1; /** * The value that determines whether cryptographically-secure pseudo-random number generation is used. - * - * If `CRYPTO` is set to `true` then the `random` method will generate random digits using `crypto.getRandomValues` in browsers that support it, + * + * If `CRYPTO` is set to `true` then the `random` method will generate random digits using `crypto.getRandomValues` in browsers that support it, * or `crypto.randomBytes` if using a version of Node.js that supports it. - * + * * If neither function is supported by the host environment then attempting to set `CRYPTO` to `true` will fail, and if `ERRORS` is `true` an exception will be thrown. - * + * * If `CRYPTO` is `false` then the source of randomness used will be `Math.random` (which is assumed to generate at least `30` bits of randomness). */ CRYPTO: boolean | 0 | 1; /** * The modulo mode used when calculating the modulus: `a mod n`. - * + * * The quotient, `q = a / n`, is calculated according to the `ROUNDING_MODE` that corresponds to the chosen `MODULO_MODE`. - * + * * The remainder, `r`, is calculated as: `r = a - n * q`. */ MODULO_MODE: ModuloMode; /** * The maximum number of significant digits of the result of the power operation (unless a modulus is specified). - * + * * If set to `0`, the number of signifcant digits will not be limited. */ POW_PRECISION: number; @@ -116,15 +113,14 @@ declare namespace BigNumber { /** * The `FORMAT` object configures the format of the string returned by the toFormat method. */ - FORMAT: Partial + FORMAT: Partial; } type NumberLike = number | string | BigNumber; - type RoundingMode = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 - type ModuloMode = RoundingMode | 9 + type RoundingMode = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; + type ModuloMode = RoundingMode | 9; interface BigNumberStatic { - /** * Returns a new instance of a BigNumber object. */ @@ -142,7 +138,7 @@ declare namespace BigNumber { /** * Configures the settings for this particular BigNumber constructor. - * + * */ config(obj?: Partial): BigNumberConfig; @@ -201,17 +197,17 @@ declare namespace BigNumber { /** * Returns a new BigNumber with a pseudo-random value equal to or greater than `0` and less than `1`. - * + * * The return value will have `dp` decimal places (or less if trailing zeros are produced). * If `dp` is omitted then the number of decimal places will default to the current `DECIMAL_PLACES` setting. - * - * Depending on the value of this BigNumber constructor's `CRYPTO` setting and the support for the `crypto` object in the host environment, - * the random digits of the return value are generated by either - * `Math.random` (fastest), - * `crypto.getRandomValues` (Web Cryptography API in recent browsers) + * + * Depending on the value of this BigNumber constructor's `CRYPTO` setting and the support for the `crypto` object in the host environment, + * the random digits of the return value are generated by either + * `Math.random` (fastest), + * `crypto.getRandomValues` (Web Cryptography API in recent browsers) * or `crypto.randomBytes` (Node.js). - * - * If `CRYPTO` is `true`, i.e. one of the `crypto` methods is to be used, + * + * If `CRYPTO` is `true`, i.e. one of the `crypto` methods is to be used, * the value of a returned BigNumber should be cryptographically-secure and statistically indistinguishable from a random value. */ random(dp?: number): BigNumber; @@ -267,15 +263,14 @@ declare namespace BigNumber { ROUND_HALF_FLOOR: 8; /** - * The remainder is always positive. - * + * The remainder is always positive. + * * Euclidian division: `q = sign(n) * floor(a / abs(n))` */ EUCLID: 9; } interface BigNumber { - /** * Returns a BigNumber whose value is the absolute value, i.e. the magnitude, of the value of this BigNumber. */ @@ -293,26 +288,26 @@ declare namespace BigNumber { /** * Returns - * + * * `1` if the value of this BigNumber is greater than the value of `n` - * + * * `-1` if the value of this BigNumber is less than the value of `n` - * + * * `0` if this BigNumber and `n` have the same value - * + * * `null` if the value of either this BigNumber or `n` is `NaN` */ comparedTo(n: NumberLike, base?: number): 1 | -1 | 0 | null; /** * Returns - * + * * `1` if the value of this BigNumber is greater than the value of `n` - * + * * `-1` if the value of this BigNumber is less than the value of `n` - * + * * `0` if this BigNumber and `n` have the same value - * + * * `null` if the value of either this BigNumber or `n` is `NaN` */ cmp(n: NumberLike, base?: number): 1 | -1 | 0 | null; @@ -348,15 +343,15 @@ declare namespace BigNumber { divToInt(n: NumberLike, base?: number): BigNumber; /** - * Returns `true` if the value of this BigNumber equals the value of `n`, otherwise returns `false`. - * + * Returns `true` if the value of this BigNumber equals the value of `n`, otherwise returns `false`. + * * As with JavaScript, `NaN` does not equal `NaN`. */ equals(n: NumberLike, base?: number): boolean; /** - * Returns `true` if the value of this BigNumber equals the value of `n`, otherwise returns `false`. - * + * Returns `true` if the value of this BigNumber equals the value of `n`, otherwise returns `false`. + * * As with JavaScript, `NaN` does not equal `NaN`. */ eq(n: NumberLike, base?: number): boolean; @@ -388,7 +383,7 @@ declare namespace BigNumber { /** * Returns `true` if the value of this BigNumber is a finite number, otherwise returns `false`. - * + * * The only possible non-finite values of a BigNumber are `NaN`, `Infinity` and `-Infinity`. */ isFinite(): boolean; @@ -434,12 +429,12 @@ declare namespace BigNumber { lt(n: NumberLike, base?: number): boolean; /** - * Returns `true` if the value of this BigNumber is less than or equal to the value of `n`, otherwise returns + * Returns `true` if the value of this BigNumber is less than or equal to the value of `n`, otherwise returns */ lessThanOrEqualTo(n: NumberLike, base?: number): boolean; /** - * Returns `true` if the value of this BigNumber is less than or equal to the value of `n`, otherwise returns + * Returns `true` if the value of this BigNumber is less than or equal to the value of `n`, otherwise returns */ lte(n: NumberLike, base?: number): boolean; @@ -455,18 +450,18 @@ declare namespace BigNumber { /** * Returns a BigNumber whose value is the value of this BigNumber modulo `n`, i.e. the integer remainder of dividing this BigNumber by `n`. - * - * The value returned, and in particular its sign, is dependent on the value of the `MODULO_MODE` setting of this BigNumber constructor. - * If it is `1` (default value), the result will have the same sign as this BigNumber, + * + * The value returned, and in particular its sign, is dependent on the value of the `MODULO_MODE` setting of this BigNumber constructor. + * If it is `1` (default value), the result will have the same sign as this BigNumber, * and it will match that of Javascript's `%` operator (within the limits of double precision) and BigDecimal's `remainder` method. */ modulo(n: NumberLike, base?: number): BigNumber; /** * Returns a BigNumber whose value is the value of this BigNumber modulo `n`, i.e. the integer remainder of dividing this BigNumber by `n`. - * - * The value returned, and in particular its sign, is dependent on the value of the `MODULO_MODE` setting of this BigNumber constructor. - * If it is `1` (default value), the result will have the same sign as this BigNumber, + * + * The value returned, and in particular its sign, is dependent on the value of the `MODULO_MODE` setting of this BigNumber constructor. + * If it is `1` (default value), the result will have the same sign as this BigNumber, * and it will match that of Javascript's `%` operator (within the limits of double precision) and BigDecimal's `remainder` method. */ mod(n: NumberLike, base?: number): BigNumber; @@ -493,44 +488,44 @@ declare namespace BigNumber { /** * Returns the number of significant digits of the value of this BigNumber. - * + * * If `z` is `true` or `1` then any trailing zeros of the integer part of a number are counted as significant digits, otherwise they are not. */ precision(z?: boolean | 0 | 1): number; /** * Returns the number of significant digits of the value of this BigNumber. - * + * * If `z` is `true` or `1` then any trailing zeros of the integer part of a number are counted as significant digits, otherwise they are not. */ sd(z?: boolean | 0 | 1): number; /** * Returns a BigNumber whose value is the value of this BigNumber rounded by rounding mode `rm` to a maximum of `dp` decimal places. - * + * * If `dp` is omitted, or is `null` or `undefined`, the return value is `n` rounded to a whole number. - * + * * If `rm` is omitted, or is `null` or `undefined`, `ROUNDING_MODE` is used. */ round(dp?: number, rm?: RoundingMode): BigNumber; /** * Returns a BigNumber whose value is the value of this BigNumber shifted `n` places. - * + * * The shift is of the decimal point, i.e. of powers of ten, and is to the left if `n` is negative or to the right if `n` is positive. */ shift(n: number): BigNumber; /** * Returns a BigNumber whose value is the square root of the value of this BigNumber, rounded according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` configuration. - * + * * The return value will be correctly rounded, i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding. */ squareRoot(): BigNumber; /** * Returns a BigNumber whose value is the square root of the value of this BigNumber, rounded according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` configuration. - * + * * The return value will be correctly rounded, i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding. */ sqrt(): BigNumber; @@ -547,36 +542,36 @@ declare namespace BigNumber { /** * Returns a BigNumber whose value is the value of this BigNumber rounded to `sd` significant digits using rounding mode `rm`. - * + * * If `sd` is omitted or is `null` or `undefined`, the return value will not be rounded. - * + * * If `rm` is omitted or is `null` or `undefined`, ROUNDING_MODE will be used. */ toDigits(sd?: number, rm?: RoundingMode): BigNumber; /** - * Returns a string representing the value of this BigNumber in exponential notation rounded using rounding mode `rm` to `dp` decimal places, + * Returns a string representing the value of this BigNumber in exponential notation rounded using rounding mode `rm` to `dp` decimal places, * i.e with one digit before the decimal point and `dp` digits after it. - * + * * If the value of this BigNumber in exponential notation has fewer than `dp` fraction digits, the return value will be appended with zeros accordingly. - * + * * If `dp` is omitted, or is `null` or `undefined`, the number of digits after the decimal point defaults to the minimum number of digits necessary to represent the value exactly. - * + * * If `rm` is omitted or is `null` or `undefined`, `ROUNDING_MODE` is used. */ toExponential(dp?: number, rm?: RoundingMode): string; /** * Returns a string representing the value of this BigNumber in normal (fixed-point) notation rounded to `dp` decimal places using rounding mode `rm`. - * + * * If the value of this BigNumber in normal notation has fewer than `dp` fraction digits, the return value will be appended with zeros accordingly. - * + * * Unlike `Number.prototype.toFixed`, which returns exponential notation if a number is greater or equal to `10e21`, this method will always return normal notation. - * - * If `dp` is omitted or is `null` or `undefined`, the return value will be unrounded and in normal notation. + * + * If `dp` is omitted or is `null` or `undefined`, the return value will be unrounded and in normal notation. * This is also unlike `Number.prototype.toFixed`, which returns the value to zero decimal places. * It is useful when fixed-point notation is required and the current `EXPONENTIAL_AT` setting causes `toString` to return exponential notation. - * + * * If `rm` is omitted or is `null` or `undefined`, `ROUNDING_MODE` is used. */ toFixed(dp?: number, rm?: RoundingMode): string; @@ -584,17 +579,17 @@ declare namespace BigNumber { /** * Returns a string representing the value of this BigNumber in normal (fixed-point) notation rounded to `dp` decimal places using rounding mode `rm`, * and formatted according to the properties of the `FORMAT` object. - * + * * If `dp` is omitted or is `null` or `undefined`, then the return value is not rounded to a fixed number of decimal places. - * + * * If `rm` is omitted or is `null` or `undefined`, `ROUNDING_MODE` is used. */ toFormat(dp?: number, rm?: RoundingMode): string; /** - * Returns a string array representing the value of this BigNumber as a simple fraction with an integer numerator and an integer denominator. + * Returns a string array representing the value of this BigNumber as a simple fraction with an integer numerator and an integer denominator. * The denominator will be a positive non-zero value less than or equal to `max`. - * + * * If a maximum denominator, `max`, is not specified, or is `null` or `undefined`, the denominator will be the lowest value necessary to represent the number exactly. */ toFraction(max?: NumberLike): [string, string]; @@ -606,32 +601,32 @@ declare namespace BigNumber { /** * Returns the value of this BigNumber as a JavaScript number primitive. - * + * * Type coercion with, for example, the unary plus operator will also work, except that a BigNumber with the value minus zero will be converted to positive zero. */ toNumber(): number; /** * Returns a BigNumber whose value is the value of this BigNumber raised to the power `n`, and optionally modulo a modulus `m`. - * + * * If `n` is negative the result is rounded according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` configuration. */ toPower(n: number, m?: NumberLike): BigNumber; /** * Returns a BigNumber whose value is the value of this BigNumber raised to the power `n`, and optionally modulo a modulus `m`. - * + * * If `n` is negative the result is rounded according to the current `DECIMAL_PLACES` and `ROUNDING_MODE` configuration. */ pow(n: number, m?: NumberLike): BigNumber; /** * Returns a string representing the value of this BigNumber rounded to `sd` significant digits using rounding mode `rm`. - * + * * If `sd` is less than the number of digits necessary to represent the integer part of the value in normal (fixed-point) notation, then exponential notation is used. - * + * * If `sd` is omitted, or is `null` or `undefined`, then the return value is the same as `n.toString()`. - * + * * If `rm` is omitted or is `null` or `undefined`, `ROUNDING_MODE` is used. */ toPrecision(sd?: number, rm?: RoundingMode): string; diff --git a/bignumber.js/tsconfig.json b/types/bignumber.js/tsconfig.json similarity index 100% rename from bignumber.js/tsconfig.json rename to types/bignumber.js/tsconfig.json diff --git a/bignumber.js/tslint.json b/types/bignumber.js/tslint.json similarity index 100% rename from bignumber.js/tslint.json rename to types/bignumber.js/tslint.json diff --git a/bigscreen/bigscreen-tests.ts b/types/bigscreen/bigscreen-tests.ts similarity index 100% rename from bigscreen/bigscreen-tests.ts rename to types/bigscreen/bigscreen-tests.ts diff --git a/bigscreen/index.d.ts b/types/bigscreen/index.d.ts similarity index 100% rename from bigscreen/index.d.ts rename to types/bigscreen/index.d.ts diff --git a/bigscreen/tsconfig.json b/types/bigscreen/tsconfig.json similarity index 100% rename from bigscreen/tsconfig.json rename to types/bigscreen/tsconfig.json diff --git a/bind-ponyfill/bind-ponyfill-tests.ts b/types/bind-ponyfill/bind-ponyfill-tests.ts similarity index 100% rename from bind-ponyfill/bind-ponyfill-tests.ts rename to types/bind-ponyfill/bind-ponyfill-tests.ts diff --git a/bind-ponyfill/index.d.ts b/types/bind-ponyfill/index.d.ts similarity index 100% rename from bind-ponyfill/index.d.ts rename to types/bind-ponyfill/index.d.ts diff --git a/bind-ponyfill/tsconfig.json b/types/bind-ponyfill/tsconfig.json similarity index 100% rename from bind-ponyfill/tsconfig.json rename to types/bind-ponyfill/tsconfig.json diff --git a/bingmaps/Microsoft.Maps.AdvancedShapes.d.ts b/types/bingmaps/Microsoft.Maps.AdvancedShapes.d.ts similarity index 100% rename from bingmaps/Microsoft.Maps.AdvancedShapes.d.ts rename to types/bingmaps/Microsoft.Maps.AdvancedShapes.d.ts diff --git a/bingmaps/Microsoft.Maps.Directions.d.ts b/types/bingmaps/Microsoft.Maps.Directions.d.ts similarity index 100% rename from bingmaps/Microsoft.Maps.Directions.d.ts rename to types/bingmaps/Microsoft.Maps.Directions.d.ts diff --git a/bingmaps/Microsoft.Maps.Search.d.ts b/types/bingmaps/Microsoft.Maps.Search.d.ts similarity index 100% rename from bingmaps/Microsoft.Maps.Search.d.ts rename to types/bingmaps/Microsoft.Maps.Search.d.ts diff --git a/bingmaps/Microsoft.Maps.Themes.BingTheme.d.ts b/types/bingmaps/Microsoft.Maps.Themes.BingTheme.d.ts similarity index 100% rename from bingmaps/Microsoft.Maps.Themes.BingTheme.d.ts rename to types/bingmaps/Microsoft.Maps.Themes.BingTheme.d.ts diff --git a/bingmaps/Microsoft.Maps.Traffic.d.ts b/types/bingmaps/Microsoft.Maps.Traffic.d.ts similarity index 100% rename from bingmaps/Microsoft.Maps.Traffic.d.ts rename to types/bingmaps/Microsoft.Maps.Traffic.d.ts diff --git a/bingmaps/Microsoft.Maps.VenueMaps.d.ts b/types/bingmaps/Microsoft.Maps.VenueMaps.d.ts similarity index 100% rename from bingmaps/Microsoft.Maps.VenueMaps.d.ts rename to types/bingmaps/Microsoft.Maps.VenueMaps.d.ts diff --git a/bingmaps/UNUSED_FILES.txt b/types/bingmaps/UNUSED_FILES.txt similarity index 100% rename from bingmaps/UNUSED_FILES.txt rename to types/bingmaps/UNUSED_FILES.txt diff --git a/bingmaps/bingmaps-tests.ts b/types/bingmaps/bingmaps-tests.ts similarity index 100% rename from bingmaps/bingmaps-tests.ts rename to types/bingmaps/bingmaps-tests.ts diff --git a/bingmaps/index.d.ts b/types/bingmaps/index.d.ts similarity index 100% rename from bingmaps/index.d.ts rename to types/bingmaps/index.d.ts diff --git a/bingmaps/tsconfig.json b/types/bingmaps/tsconfig.json similarity index 100% rename from bingmaps/tsconfig.json rename to types/bingmaps/tsconfig.json diff --git a/bintrees/bintrees-tests.ts b/types/bintrees/bintrees-tests.ts similarity index 100% rename from bintrees/bintrees-tests.ts rename to types/bintrees/bintrees-tests.ts diff --git a/bintrees/index.d.ts b/types/bintrees/index.d.ts similarity index 100% rename from bintrees/index.d.ts rename to types/bintrees/index.d.ts diff --git a/bintrees/tsconfig.json b/types/bintrees/tsconfig.json similarity index 100% rename from bintrees/tsconfig.json rename to types/bintrees/tsconfig.json diff --git a/bip21/bip21-tests.ts b/types/bip21/bip21-tests.ts similarity index 100% rename from bip21/bip21-tests.ts rename to types/bip21/bip21-tests.ts diff --git a/bip21/index.d.ts b/types/bip21/index.d.ts similarity index 100% rename from bip21/index.d.ts rename to types/bip21/index.d.ts diff --git a/bip21/tsconfig.json b/types/bip21/tsconfig.json similarity index 100% rename from bip21/tsconfig.json rename to types/bip21/tsconfig.json diff --git a/bit-array/bit-array-tests.ts b/types/bit-array/bit-array-tests.ts similarity index 100% rename from bit-array/bit-array-tests.ts rename to types/bit-array/bit-array-tests.ts diff --git a/bit-array/index.d.ts b/types/bit-array/index.d.ts similarity index 100% rename from bit-array/index.d.ts rename to types/bit-array/index.d.ts diff --git a/bit-array/tsconfig.json b/types/bit-array/tsconfig.json similarity index 100% rename from bit-array/tsconfig.json rename to types/bit-array/tsconfig.json diff --git a/bitcoinjs-lib/bitcoinjs-lib-tests.ts b/types/bitcoinjs-lib/bitcoinjs-lib-tests.ts similarity index 100% rename from bitcoinjs-lib/bitcoinjs-lib-tests.ts rename to types/bitcoinjs-lib/bitcoinjs-lib-tests.ts diff --git a/bitcoinjs-lib/index.d.ts b/types/bitcoinjs-lib/index.d.ts similarity index 100% rename from bitcoinjs-lib/index.d.ts rename to types/bitcoinjs-lib/index.d.ts diff --git a/bitcoinjs-lib/tsconfig.json b/types/bitcoinjs-lib/tsconfig.json similarity index 100% rename from bitcoinjs-lib/tsconfig.json rename to types/bitcoinjs-lib/tsconfig.json diff --git a/bitcoinjs-lib/tslint.json b/types/bitcoinjs-lib/tslint.json similarity index 100% rename from bitcoinjs-lib/tslint.json rename to types/bitcoinjs-lib/tslint.json diff --git a/bittorrent-protocol/bittorrent-protocol-tests.ts b/types/bittorrent-protocol/bittorrent-protocol-tests.ts similarity index 78% rename from bittorrent-protocol/bittorrent-protocol-tests.ts rename to types/bittorrent-protocol/bittorrent-protocol-tests.ts index 1d0d17793a..f5f6b4649f 100644 --- a/bittorrent-protocol/bittorrent-protocol-tests.ts +++ b/types/bittorrent-protocol/bittorrent-protocol-tests.ts @@ -1,9 +1,16 @@ import * as Protocol from 'bittorrent-protocol'; import * as net from 'net'; +class TestExtension implements Protocol.Extension { + constructor(protected wire: Protocol.Wire) { } + name = 'extname'; +} + net.createServer(socket => { var wire = new Protocol(); + wire.use(TestExtension); + // pipe to and from the protocol socket.pipe(wire).pipe(socket); diff --git a/bittorrent-protocol/index.d.ts b/types/bittorrent-protocol/index.d.ts similarity index 83% rename from bittorrent-protocol/index.d.ts rename to types/bittorrent-protocol/index.d.ts index be1a60b179..6d838a90f5 100644 --- a/bittorrent-protocol/index.d.ts +++ b/types/bittorrent-protocol/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for bittorrent-protocol 2.1 +// Type definitions for bittorrent-protocol 2.2 // Project: https://github.com/feross/bittorrent-protocol#readme -// Definitions by: Tomasz Łaziuk +// Definitions by: Feross Aboukhadijeh , Tomasz Łaziuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -15,18 +15,18 @@ declare namespace BittorrentProtocol { (): Wire; } + export interface ExtensionConstructor { + new (wire: Wire): Extension; + } + export interface Extension { - //tslint:disable-next-line:no-misused-new - could use class instead of interface but class is not extendible - constructor(wire: Wire): this; - onHandshake?: () => void; - onExtendedHandshake?: () => void; - onMessage?: () => void; + onHandshake?: (infoHash: string, peerId: string, extensions: { [name: string]: boolean }) => void; + onExtendedHandshake?: (handshake: { [key: string]: any }) => void; + onMessage?: (buf: Buffer) => void; name: string; } export interface Request { - //tslint:disable-next-line:no-misused-new - could use class instead of interface but class is not extendible - constructor(piece: number, offset: number, length: number, callback: () => void): this; piece: number; offset: number; length: number; @@ -52,7 +52,7 @@ declare namespace BittorrentProtocol { destroy(): void; - use(ext: Extension): void; + use(ext: ExtensionConstructor): void; handshake(infoHash: string | Buffer, peerId: string | Buffer, extensions?: any): void; diff --git a/bittorrent-protocol/tsconfig.json b/types/bittorrent-protocol/tsconfig.json similarity index 100% rename from bittorrent-protocol/tsconfig.json rename to types/bittorrent-protocol/tsconfig.json diff --git a/bittorrent-protocol/tslint.json b/types/bittorrent-protocol/tslint.json similarity index 100% rename from bittorrent-protocol/tslint.json rename to types/bittorrent-protocol/tslint.json diff --git a/bitwise-xor/bitwise-xor-tests.ts b/types/bitwise-xor/bitwise-xor-tests.ts similarity index 100% rename from bitwise-xor/bitwise-xor-tests.ts rename to types/bitwise-xor/bitwise-xor-tests.ts diff --git a/bitwise-xor/index.d.ts b/types/bitwise-xor/index.d.ts similarity index 100% rename from bitwise-xor/index.d.ts rename to types/bitwise-xor/index.d.ts diff --git a/bitwise-xor/tsconfig.json b/types/bitwise-xor/tsconfig.json similarity index 100% rename from bitwise-xor/tsconfig.json rename to types/bitwise-xor/tsconfig.json diff --git a/bl/bl-tests.ts b/types/bl/bl-tests.ts similarity index 100% rename from bl/bl-tests.ts rename to types/bl/bl-tests.ts diff --git a/bl/index.d.ts b/types/bl/index.d.ts similarity index 100% rename from bl/index.d.ts rename to types/bl/index.d.ts diff --git a/bl/tsconfig.json b/types/bl/tsconfig.json similarity index 100% rename from bl/tsconfig.json rename to types/bl/tsconfig.json diff --git a/blacklist/blacklist-tests.ts b/types/blacklist/blacklist-tests.ts similarity index 100% rename from blacklist/blacklist-tests.ts rename to types/blacklist/blacklist-tests.ts diff --git a/blacklist/index.d.ts b/types/blacklist/index.d.ts similarity index 100% rename from blacklist/index.d.ts rename to types/blacklist/index.d.ts diff --git a/blacklist/tsconfig.json b/types/blacklist/tsconfig.json similarity index 100% rename from blacklist/tsconfig.json rename to types/blacklist/tsconfig.json diff --git a/blacklist/tslint.json b/types/blacklist/tslint.json similarity index 100% rename from blacklist/tslint.json rename to types/blacklist/tslint.json diff --git a/blazy/blazy-tests.ts b/types/blazy/blazy-tests.ts similarity index 100% rename from blazy/blazy-tests.ts rename to types/blazy/blazy-tests.ts diff --git a/blazy/index.d.ts b/types/blazy/index.d.ts similarity index 100% rename from blazy/index.d.ts rename to types/blazy/index.d.ts diff --git a/blazy/tsconfig.json b/types/blazy/tsconfig.json similarity index 100% rename from blazy/tsconfig.json rename to types/blazy/tsconfig.json diff --git a/blessed/blessed-tests.ts b/types/blessed/blessed-tests.ts similarity index 100% rename from blessed/blessed-tests.ts rename to types/blessed/blessed-tests.ts diff --git a/blessed/index.d.ts b/types/blessed/index.d.ts similarity index 100% rename from blessed/index.d.ts rename to types/blessed/index.d.ts diff --git a/blessed/tsconfig.json b/types/blessed/tsconfig.json similarity index 100% rename from blessed/tsconfig.json rename to types/blessed/tsconfig.json diff --git a/blissfuljs/blissfuljs-tests.ts b/types/blissfuljs/blissfuljs-tests.ts similarity index 100% rename from blissfuljs/blissfuljs-tests.ts rename to types/blissfuljs/blissfuljs-tests.ts diff --git a/blissfuljs/index.d.ts b/types/blissfuljs/index.d.ts similarity index 100% rename from blissfuljs/index.d.ts rename to types/blissfuljs/index.d.ts diff --git a/blissfuljs/tsconfig.json b/types/blissfuljs/tsconfig.json similarity index 100% rename from blissfuljs/tsconfig.json rename to types/blissfuljs/tsconfig.json diff --git a/blob-stream/blob-stream-tests.ts b/types/blob-stream/blob-stream-tests.ts similarity index 100% rename from blob-stream/blob-stream-tests.ts rename to types/blob-stream/blob-stream-tests.ts diff --git a/blob-stream/index.d.ts b/types/blob-stream/index.d.ts similarity index 100% rename from blob-stream/index.d.ts rename to types/blob-stream/index.d.ts diff --git a/blob-stream/tsconfig.json b/types/blob-stream/tsconfig.json similarity index 100% rename from blob-stream/tsconfig.json rename to types/blob-stream/tsconfig.json diff --git a/blocks/blocks-tests.ts b/types/blocks/blocks-tests.ts similarity index 100% rename from blocks/blocks-tests.ts rename to types/blocks/blocks-tests.ts diff --git a/blocks/index.d.ts b/types/blocks/index.d.ts similarity index 100% rename from blocks/index.d.ts rename to types/blocks/index.d.ts diff --git a/blocks/tsconfig.json b/types/blocks/tsconfig.json similarity index 100% rename from blocks/tsconfig.json rename to types/blocks/tsconfig.json diff --git a/types/bloomfilter/bloomfilter-tests.ts b/types/bloomfilter/bloomfilter-tests.ts new file mode 100644 index 0000000000..f1f3306d62 --- /dev/null +++ b/types/bloomfilter/bloomfilter-tests.ts @@ -0,0 +1,11 @@ +import { BloomFilter } from './index'; +function test_bloomfilter() { + const m: number = 10; + const k: number = 2; + + let bloomFilter = new BloomFilter(m, k); + let array: Array = bloomFilter.buckets; + let length: number = bloomFilter.buckets.length; + bloomFilter.add('someString'); + let test: boolean = bloomFilter.test('someString'); +} diff --git a/types/bloomfilter/index.d.ts b/types/bloomfilter/index.d.ts new file mode 100644 index 0000000000..071c32dfc6 --- /dev/null +++ b/types/bloomfilter/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for BloomFilter 0.1 +// Project: https://github.com/jasondavies/bloomfilter.js +// Definitions by: slawiko +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export declare class BloomFilter { + buckets: Array; + + constructor(m: number, k: number); + + add(value: any): void; + + test(value: any): boolean; +} diff --git a/google-protobuf/tsconfig.json b/types/bloomfilter/tsconfig.json similarity index 86% rename from google-protobuf/tsconfig.json rename to types/bloomfilter/tsconfig.json index 269fec20d9..b8bae54b77 100644 --- a/google-protobuf/tsconfig.json +++ b/types/bloomfilter/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6" + "es6", + "dom" ], "noImplicitAny": true, "noImplicitThis": true, @@ -17,6 +18,6 @@ }, "files": [ "index.d.ts", - "google-protobuf-tests.ts" + "bloomfilter-tests.ts" ] -} \ No newline at end of file +} diff --git a/csprng/tslint.json b/types/bloomfilter/tslint.json similarity index 100% rename from csprng/tslint.json rename to types/bloomfilter/tslint.json diff --git a/blue-tape/blue-tape-tests.ts b/types/blue-tape/blue-tape-tests.ts similarity index 100% rename from blue-tape/blue-tape-tests.ts rename to types/blue-tape/blue-tape-tests.ts diff --git a/blue-tape/index.d.ts b/types/blue-tape/index.d.ts similarity index 100% rename from blue-tape/index.d.ts rename to types/blue-tape/index.d.ts diff --git a/blue-tape/tsconfig.json b/types/blue-tape/tsconfig.json similarity index 100% rename from blue-tape/tsconfig.json rename to types/blue-tape/tsconfig.json diff --git a/bluebird-global/bluebird-global-tests.ts b/types/bluebird-global/bluebird-global-tests.ts similarity index 100% rename from bluebird-global/bluebird-global-tests.ts rename to types/bluebird-global/bluebird-global-tests.ts diff --git a/bluebird-global/index.d.ts b/types/bluebird-global/index.d.ts similarity index 99% rename from bluebird-global/index.d.ts rename to types/bluebird-global/index.d.ts index e4c4920501..a705222e9d 100644 --- a/bluebird-global/index.d.ts +++ b/types/bluebird-global/index.d.ts @@ -80,6 +80,8 @@ declare global { // then: typeof Bluebird.prototype.then; thenReturn: typeof Bluebird.prototype.thenReturn; thenThrow: typeof Bluebird.prototype.thenThrow; + catchReturn: typeof Bluebird.prototype.catchReturn; + catchThrow: typeof Bluebird.prototype.catchThrow; throw: typeof Bluebird.prototype.throw; timeout: typeof Bluebird.prototype.timeout; toJSON: typeof Bluebird.prototype.toJSON; diff --git a/bluebird-global/tsconfig.json b/types/bluebird-global/tsconfig.json similarity index 100% rename from bluebird-global/tsconfig.json rename to types/bluebird-global/tsconfig.json diff --git a/bluebird-global/tslint.json b/types/bluebird-global/tslint.json similarity index 100% rename from bluebird-global/tslint.json rename to types/bluebird-global/tslint.json diff --git a/bluebird-retry/bluebird-retry-tests.ts b/types/bluebird-retry/bluebird-retry-tests.ts similarity index 100% rename from bluebird-retry/bluebird-retry-tests.ts rename to types/bluebird-retry/bluebird-retry-tests.ts diff --git a/bluebird-retry/index.d.ts b/types/bluebird-retry/index.d.ts similarity index 100% rename from bluebird-retry/index.d.ts rename to types/bluebird-retry/index.d.ts diff --git a/bluebird-retry/tsconfig.json b/types/bluebird-retry/tsconfig.json similarity index 100% rename from bluebird-retry/tsconfig.json rename to types/bluebird-retry/tsconfig.json diff --git a/bluebird/bluebird-tests.ts b/types/bluebird/bluebird-tests.ts similarity index 99% rename from bluebird/bluebird-tests.ts rename to types/bluebird/bluebird-tests.ts index c08a7bdc6b..b9fc8d0cef 100644 --- a/bluebird/bluebird-tests.ts +++ b/types/bluebird/bluebird-tests.ts @@ -506,6 +506,15 @@ fooProm = fooProm.thenThrow(err); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +barProm = fooProm.catchReturn(bar); + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +// fooProm +fooProm = fooProm.catchThrow(err); + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + str = fooProm.toString(); obj = fooProm.toJSON(); diff --git a/bluebird/index.d.ts b/types/bluebird/index.d.ts similarity index 96% rename from bluebird/index.d.ts rename to types/bluebird/index.d.ts index ecacedfd0d..e9a79d8834 100644 --- a/bluebird/index.d.ts +++ b/types/bluebird/index.d.ts @@ -248,6 +248,37 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection; thenThrow(reason: Error): Bluebird; + /** + * Convenience method for: + * + * + * .catch(function() { + * return value; + * }); + * + * + * in the case where `value` doesn't change its value. That means `value` is bound at the time of calling `.catchReturn()` + */ + catchReturn(value: U): Bluebird; + catchReturn(predicate: (error: any) => boolean, value: U): Bluebird; + catchReturn(ErrorClass: new (...args: any[]) => E, value: U): Bluebird; + catchReturn(predicate: Object, value: U): Bluebird; + + /** + * Convenience method for: + * + * + * .catch(function() { + * throw reason; + * }); + * + * Same limitations apply as with `.catchReturn()`. + */ + catchThrow(reason: Error): Bluebird; + catchThrow(predicate: (error: any) => boolean, reason: Error): Bluebird; + catchThrow(ErrorClass: new (...args: any[]) => E, reason: Error): Bluebird; + catchThrow(predicate: Object, reason: Error): Bluebird; + /** * Convert to String. */ @@ -502,11 +533,11 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection(arg1: A1 | Bluebird.Thenable, handler: (arg1?: A1) => R | Bluebird.Thenable): Bluebird; - static join(arg1: A1 | Bluebird.Thenable, arg2: A2 | Bluebird.Thenable, handler: (arg1?: A1, arg2?: A2) => R | Bluebird.Thenable): Bluebird; - static join(arg1: A1 | Bluebird.Thenable, arg2: A2 | Bluebird.Thenable, arg3: A3 | Bluebird.Thenable, handler: (arg1?: A1, arg2?: A2, arg3?: A3) => R | Bluebird.Thenable): Bluebird; - static join(arg1: A1 | Bluebird.Thenable, arg2: A2 | Bluebird.Thenable, arg3: A3 | Bluebird.Thenable, arg4: A4 | Bluebird.Thenable, handler: (arg1?: A1, arg2?: A2, arg3?: A3, arg4?: A4) => R | Bluebird.Thenable): Bluebird; - static join(arg1: A1 | Bluebird.Thenable, arg2: A2 | Bluebird.Thenable, arg3: A3 | Bluebird.Thenable, arg4: A4 | Bluebird.Thenable, arg5: A5 | Bluebird.Thenable, handler: (arg1?: A1, arg2?: A2, arg3?: A3, arg4?: A4, arg5?: A5) => R | Bluebird.Thenable): Bluebird; + static join(arg1: A1 | Bluebird.Thenable, handler: (arg1: A1) => R | Bluebird.Thenable): Bluebird; + static join(arg1: A1 | Bluebird.Thenable, arg2: A2 | Bluebird.Thenable, handler: (arg1: A1, arg2: A2) => R | Bluebird.Thenable): Bluebird; + static join(arg1: A1 | Bluebird.Thenable, arg2: A2 | Bluebird.Thenable, arg3: A3 | Bluebird.Thenable, handler: (arg1: A1, arg2: A2, arg3: A3) => R | Bluebird.Thenable): Bluebird; + static join(arg1: A1 | Bluebird.Thenable, arg2: A2 | Bluebird.Thenable, arg3: A3 | Bluebird.Thenable, arg4: A4 | Bluebird.Thenable, handler: (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => R | Bluebird.Thenable): Bluebird; + static join(arg1: A1 | Bluebird.Thenable, arg2: A2 | Bluebird.Thenable, arg3: A3 | Bluebird.Thenable, arg4: A4 | Bluebird.Thenable, arg5: A5 | Bluebird.Thenable, handler: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => R | Bluebird.Thenable): Bluebird; // variadic array /** @deprecated use .all instead */ diff --git a/bluebird/tsconfig.json b/types/bluebird/tsconfig.json similarity index 100% rename from bluebird/tsconfig.json rename to types/bluebird/tsconfig.json diff --git a/bluebird/v1/bluebird-tests.ts b/types/bluebird/v1/bluebird-tests.ts similarity index 100% rename from bluebird/v1/bluebird-tests.ts rename to types/bluebird/v1/bluebird-tests.ts diff --git a/bluebird/v1/index.d.ts b/types/bluebird/v1/index.d.ts similarity index 100% rename from bluebird/v1/index.d.ts rename to types/bluebird/v1/index.d.ts diff --git a/bluebird/v1/tsconfig.json b/types/bluebird/v1/tsconfig.json similarity index 100% rename from bluebird/v1/tsconfig.json rename to types/bluebird/v1/tsconfig.json diff --git a/bluebird/v2/bluebird-tests.ts b/types/bluebird/v2/bluebird-tests.ts similarity index 100% rename from bluebird/v2/bluebird-tests.ts rename to types/bluebird/v2/bluebird-tests.ts diff --git a/bluebird/v2/index.d.ts b/types/bluebird/v2/index.d.ts similarity index 100% rename from bluebird/v2/index.d.ts rename to types/bluebird/v2/index.d.ts diff --git a/bluebird/v2/tsconfig.json b/types/bluebird/v2/tsconfig.json similarity index 100% rename from bluebird/v2/tsconfig.json rename to types/bluebird/v2/tsconfig.json diff --git a/types/blueimp-md5/blueimp-md5-tests.ts b/types/blueimp-md5/blueimp-md5-tests.ts new file mode 100644 index 0000000000..0b59ae2f24 --- /dev/null +++ b/types/blueimp-md5/blueimp-md5-tests.ts @@ -0,0 +1,5 @@ +import md5 = require("blueimp-md5"); + +function hash1(): string { + return md5('hello world'); +} diff --git a/types/blueimp-md5/index.d.ts b/types/blueimp-md5/index.d.ts new file mode 100644 index 0000000000..881d5c7afe --- /dev/null +++ b/types/blueimp-md5/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for blueimp-md5 v2.7.0 +// Project: https://github.com/blueimp/JavaScript-MD5 +// Definitions by: Ray Martone , Mikael Kohlmyr +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function md5(value: string, key?: string, raw?: boolean): string; +export = md5; diff --git a/blueimp-md5/tsconfig.json b/types/blueimp-md5/tsconfig.json similarity index 100% rename from blueimp-md5/tsconfig.json rename to types/blueimp-md5/tsconfig.json diff --git a/body-parser/body-parser-tests.ts b/types/body-parser/body-parser-tests.ts similarity index 100% rename from body-parser/body-parser-tests.ts rename to types/body-parser/body-parser-tests.ts diff --git a/body-parser/index.d.ts b/types/body-parser/index.d.ts similarity index 72% rename from body-parser/index.d.ts rename to types/body-parser/index.d.ts index c0ce775bb0..8d068cb66a 100644 --- a/body-parser/index.d.ts +++ b/types/body-parser/index.d.ts @@ -13,36 +13,34 @@ import { Request, RequestHandler, Response } from 'express'; declare function bodyParser(options?: bodyParser.OptionsJson & bodyParser.OptionsText & bodyParser.OptionsUrlencoded): RequestHandler; declare namespace bodyParser { - - export interface Options { + interface Options { inflate?: boolean; limit?: number | string; type?: string | ((req: Request) => any); verify?: (req: Request, res: Response, buf: Buffer, encoding: string) => void; } - export interface OptionsJson extends Options { + interface OptionsJson extends Options { reviever?: (key: string, value: any) => any; strict?: boolean; } - export interface OptionsText extends Options { + interface OptionsText extends Options { defaultCharset?: string; } - export interface OptionsUrlencoded extends Options { + interface OptionsUrlencoded extends Options { extended?: boolean; parameterLimit?: number; } - export function json(options?: OptionsJson): RequestHandler; + function json(options?: OptionsJson): RequestHandler; - export function raw(options?: Options): RequestHandler; + function raw(options?: Options): RequestHandler; - export function text(options?: OptionsText): RequestHandler; - - export function urlencoded(options?: OptionsUrlencoded): RequestHandler; + function text(options?: OptionsText): RequestHandler; + function urlencoded(options?: OptionsUrlencoded): RequestHandler; } export = bodyParser; diff --git a/body-parser/tsconfig.json b/types/body-parser/tsconfig.json similarity index 100% rename from body-parser/tsconfig.json rename to types/body-parser/tsconfig.json diff --git a/body-parser/tslint.json b/types/body-parser/tslint.json similarity index 100% rename from body-parser/tslint.json rename to types/body-parser/tslint.json diff --git a/bonjour/bonjour-tests.ts b/types/bonjour/bonjour-tests.ts similarity index 100% rename from bonjour/bonjour-tests.ts rename to types/bonjour/bonjour-tests.ts diff --git a/bonjour/index.d.ts b/types/bonjour/index.d.ts similarity index 100% rename from bonjour/index.d.ts rename to types/bonjour/index.d.ts diff --git a/bonjour/tsconfig.json b/types/bonjour/tsconfig.json similarity index 100% rename from bonjour/tsconfig.json rename to types/bonjour/tsconfig.json diff --git a/bookshelf/bookshelf-tests.ts b/types/bookshelf/bookshelf-tests.ts similarity index 100% rename from bookshelf/bookshelf-tests.ts rename to types/bookshelf/bookshelf-tests.ts diff --git a/bookshelf/index.d.ts b/types/bookshelf/index.d.ts similarity index 99% rename from bookshelf/index.d.ts rename to types/bookshelf/index.d.ts index c7947579c8..398534806d 100644 --- a/bookshelf/index.d.ts +++ b/types/bookshelf/index.d.ts @@ -2,7 +2,7 @@ // Project: http://bookshelfjs.org/ // Definitions by: Andrew Schurman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.2 import Knex = require('knex'); import knex = require('knex'); diff --git a/bookshelf/tsconfig.json b/types/bookshelf/tsconfig.json similarity index 100% rename from bookshelf/tsconfig.json rename to types/bookshelf/tsconfig.json diff --git a/boolify-string/boolify-string-tests.ts b/types/boolify-string/boolify-string-tests.ts similarity index 100% rename from boolify-string/boolify-string-tests.ts rename to types/boolify-string/boolify-string-tests.ts diff --git a/boolify-string/index.d.ts b/types/boolify-string/index.d.ts similarity index 100% rename from boolify-string/index.d.ts rename to types/boolify-string/index.d.ts diff --git a/boolify-string/tsconfig.json b/types/boolify-string/tsconfig.json similarity index 100% rename from boolify-string/tsconfig.json rename to types/boolify-string/tsconfig.json diff --git a/boom/boom-tests.ts b/types/boom/boom-tests.ts similarity index 100% rename from boom/boom-tests.ts rename to types/boom/boom-tests.ts diff --git a/boom/index.d.ts b/types/boom/index.d.ts similarity index 100% rename from boom/index.d.ts rename to types/boom/index.d.ts diff --git a/boom/tsconfig.json b/types/boom/tsconfig.json similarity index 100% rename from boom/tsconfig.json rename to types/boom/tsconfig.json diff --git a/bootbox/bootbox-tests.ts b/types/bootbox/bootbox-tests.ts similarity index 80% rename from bootbox/bootbox-tests.ts rename to types/bootbox/bootbox-tests.ts index b5f32931ae..f5604d5312 100644 --- a/bootbox/bootbox-tests.ts +++ b/types/bootbox/bootbox-tests.ts @@ -38,7 +38,29 @@ bootbox.prompt({ console.log(result); } }); - +bootbox.prompt({ + title: "This is a prompt with a set of checkbox inputs!", + inputType: 'checkbox', + inputOptions: [ + { + text: 'Choice One', + value: '1', + group: 'Group 1' + }, + { + text: 'Choice Two', + value: '2', + group: 'Group 1' + }, + { + text: 'Choice Three', + value: '3' + } + ], + callback: function (result) { + console.log(result); + } +}); bootbox.dialog({ title: "Wassup?", diff --git a/bootbox/index.d.ts b/types/bootbox/index.d.ts similarity index 94% rename from bootbox/index.d.ts rename to types/bootbox/index.d.ts index d5ceb5ef62..28d30e2ba0 100644 --- a/bootbox/index.d.ts +++ b/types/bootbox/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for Bootbox 4.4.0 // Project: https://github.com/makeusabrew/bootbox -// Definitions by: Vincent Bortone , Kon Pik , Anup Kattel , Dominik Schroeter , Troy McKinnon +// Definitions by: Vincent Bortone , Kon Pik , Anup Kattel , Dominik Schroeter , Troy McKinnon , Stanny Nuytkens // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -44,6 +44,7 @@ interface BootboxPromptOptions extends BootboxBaseOptions { inputType?: "text" | "textarea" | "email" | "select" | "checkbox" | "date" | "time" | "number" | "password"; callback: (result: string) => any; buttons?: BootboxConfirmPromptButtonMap; + inputOptions?: { text: string, value: string, group?: string }[]; } /** Bootbox options available when setting defaults for modals */ diff --git a/bootbox/tsconfig.json b/types/bootbox/tsconfig.json similarity index 100% rename from bootbox/tsconfig.json rename to types/bootbox/tsconfig.json diff --git a/bootpag/bootpag-tests.ts b/types/bootpag/bootpag-tests.ts similarity index 100% rename from bootpag/bootpag-tests.ts rename to types/bootpag/bootpag-tests.ts diff --git a/bootpag/index.d.ts b/types/bootpag/index.d.ts similarity index 100% rename from bootpag/index.d.ts rename to types/bootpag/index.d.ts diff --git a/bootpag/tsconfig.json b/types/bootpag/tsconfig.json similarity index 100% rename from bootpag/tsconfig.json rename to types/bootpag/tsconfig.json diff --git a/bootstrap-datepicker/bootstrap-datepicker-tests.ts b/types/bootstrap-datepicker/bootstrap-datepicker-tests.ts similarity index 100% rename from bootstrap-datepicker/bootstrap-datepicker-tests.ts rename to types/bootstrap-datepicker/bootstrap-datepicker-tests.ts diff --git a/bootstrap-datepicker/index.d.ts b/types/bootstrap-datepicker/index.d.ts similarity index 100% rename from bootstrap-datepicker/index.d.ts rename to types/bootstrap-datepicker/index.d.ts diff --git a/bootstrap-datepicker/tsconfig.json b/types/bootstrap-datepicker/tsconfig.json similarity index 100% rename from bootstrap-datepicker/tsconfig.json rename to types/bootstrap-datepicker/tsconfig.json diff --git a/bootstrap-fileinput/index.d.ts b/types/bootstrap-fileinput/index.d.ts similarity index 100% rename from bootstrap-fileinput/index.d.ts rename to types/bootstrap-fileinput/index.d.ts diff --git a/bootstrap-fileinput/tsconfig.json b/types/bootstrap-fileinput/tsconfig.json similarity index 100% rename from bootstrap-fileinput/tsconfig.json rename to types/bootstrap-fileinput/tsconfig.json diff --git a/bootstrap-maxlength/bootstrap-maxlength-tests.ts b/types/bootstrap-maxlength/bootstrap-maxlength-tests.ts similarity index 100% rename from bootstrap-maxlength/bootstrap-maxlength-tests.ts rename to types/bootstrap-maxlength/bootstrap-maxlength-tests.ts diff --git a/bootstrap-maxlength/index.d.ts b/types/bootstrap-maxlength/index.d.ts similarity index 100% rename from bootstrap-maxlength/index.d.ts rename to types/bootstrap-maxlength/index.d.ts diff --git a/bootstrap-maxlength/tsconfig.json b/types/bootstrap-maxlength/tsconfig.json similarity index 100% rename from bootstrap-maxlength/tsconfig.json rename to types/bootstrap-maxlength/tsconfig.json diff --git a/bootstrap-notify/bootstrap-notify-tests.ts b/types/bootstrap-notify/bootstrap-notify-tests.ts similarity index 100% rename from bootstrap-notify/bootstrap-notify-tests.ts rename to types/bootstrap-notify/bootstrap-notify-tests.ts diff --git a/bootstrap-notify/index.d.ts b/types/bootstrap-notify/index.d.ts similarity index 100% rename from bootstrap-notify/index.d.ts rename to types/bootstrap-notify/index.d.ts diff --git a/bootstrap-notify/tsconfig.json b/types/bootstrap-notify/tsconfig.json similarity index 100% rename from bootstrap-notify/tsconfig.json rename to types/bootstrap-notify/tsconfig.json diff --git a/bootstrap-select/bootstrap-select-tests.ts b/types/bootstrap-select/bootstrap-select-tests.ts similarity index 100% rename from bootstrap-select/bootstrap-select-tests.ts rename to types/bootstrap-select/bootstrap-select-tests.ts diff --git a/bootstrap-select/index.d.ts b/types/bootstrap-select/index.d.ts similarity index 100% rename from bootstrap-select/index.d.ts rename to types/bootstrap-select/index.d.ts diff --git a/bootstrap-select/tsconfig.json b/types/bootstrap-select/tsconfig.json similarity index 100% rename from bootstrap-select/tsconfig.json rename to types/bootstrap-select/tsconfig.json diff --git a/bootstrap-slider/bootstrap-slider-tests.ts b/types/bootstrap-slider/bootstrap-slider-tests.ts similarity index 100% rename from bootstrap-slider/bootstrap-slider-tests.ts rename to types/bootstrap-slider/bootstrap-slider-tests.ts diff --git a/bootstrap-slider/index.d.ts b/types/bootstrap-slider/index.d.ts similarity index 100% rename from bootstrap-slider/index.d.ts rename to types/bootstrap-slider/index.d.ts diff --git a/bootstrap-slider/tsconfig.json b/types/bootstrap-slider/tsconfig.json similarity index 100% rename from bootstrap-slider/tsconfig.json rename to types/bootstrap-slider/tsconfig.json diff --git a/bootstrap-switch/bootstrap-switch-tests.ts b/types/bootstrap-switch/bootstrap-switch-tests.ts similarity index 100% rename from bootstrap-switch/bootstrap-switch-tests.ts rename to types/bootstrap-switch/bootstrap-switch-tests.ts diff --git a/bootstrap-switch/index.d.ts b/types/bootstrap-switch/index.d.ts similarity index 100% rename from bootstrap-switch/index.d.ts rename to types/bootstrap-switch/index.d.ts diff --git a/bootstrap-switch/tsconfig.json b/types/bootstrap-switch/tsconfig.json similarity index 100% rename from bootstrap-switch/tsconfig.json rename to types/bootstrap-switch/tsconfig.json diff --git a/bootstrap-table/bootstrap-table-tests.ts b/types/bootstrap-table/bootstrap-table-tests.ts similarity index 100% rename from bootstrap-table/bootstrap-table-tests.ts rename to types/bootstrap-table/bootstrap-table-tests.ts diff --git a/bootstrap-table/index.d.ts b/types/bootstrap-table/index.d.ts similarity index 100% rename from bootstrap-table/index.d.ts rename to types/bootstrap-table/index.d.ts diff --git a/bootstrap-table/tsconfig.json b/types/bootstrap-table/tsconfig.json similarity index 100% rename from bootstrap-table/tsconfig.json rename to types/bootstrap-table/tsconfig.json diff --git a/bootstrap-touchspin/bootstrap-touchspin-tests.ts b/types/bootstrap-touchspin/bootstrap-touchspin-tests.ts similarity index 100% rename from bootstrap-touchspin/bootstrap-touchspin-tests.ts rename to types/bootstrap-touchspin/bootstrap-touchspin-tests.ts diff --git a/bootstrap-touchspin/index.d.ts b/types/bootstrap-touchspin/index.d.ts similarity index 100% rename from bootstrap-touchspin/index.d.ts rename to types/bootstrap-touchspin/index.d.ts diff --git a/bootstrap-touchspin/tsconfig.json b/types/bootstrap-touchspin/tsconfig.json similarity index 100% rename from bootstrap-touchspin/tsconfig.json rename to types/bootstrap-touchspin/tsconfig.json diff --git a/bootstrap-validator/bootstrap-validator-tests.ts b/types/bootstrap-validator/bootstrap-validator-tests.ts similarity index 100% rename from bootstrap-validator/bootstrap-validator-tests.ts rename to types/bootstrap-validator/bootstrap-validator-tests.ts diff --git a/bootstrap-validator/index.d.ts b/types/bootstrap-validator/index.d.ts similarity index 100% rename from bootstrap-validator/index.d.ts rename to types/bootstrap-validator/index.d.ts diff --git a/bootstrap-validator/tsconfig.json b/types/bootstrap-validator/tsconfig.json similarity index 100% rename from bootstrap-validator/tsconfig.json rename to types/bootstrap-validator/tsconfig.json diff --git a/bootstrap-validator/tslint.json b/types/bootstrap-validator/tslint.json similarity index 100% rename from bootstrap-validator/tslint.json rename to types/bootstrap-validator/tslint.json diff --git a/bootstrap.paginator/index.d.ts b/types/bootstrap.paginator/index.d.ts similarity index 100% rename from bootstrap.paginator/index.d.ts rename to types/bootstrap.paginator/index.d.ts diff --git a/bootstrap.paginator/tsconfig.json b/types/bootstrap.paginator/tsconfig.json similarity index 100% rename from bootstrap.paginator/tsconfig.json rename to types/bootstrap.paginator/tsconfig.json diff --git a/bootstrap.timepicker/index.d.ts b/types/bootstrap.timepicker/index.d.ts similarity index 100% rename from bootstrap.timepicker/index.d.ts rename to types/bootstrap.timepicker/index.d.ts diff --git a/bootstrap.timepicker/tsconfig.json b/types/bootstrap.timepicker/tsconfig.json similarity index 100% rename from bootstrap.timepicker/tsconfig.json rename to types/bootstrap.timepicker/tsconfig.json diff --git a/bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker-tests.ts b/types/bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker-tests.ts similarity index 99% rename from bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker-tests.ts rename to types/bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker-tests.ts index 575f72b7cb..70c8f8a586 100644 --- a/bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker-tests.ts +++ b/types/bootstrap.v3.datetimepicker/bootstrap.v3.datetimepicker-tests.ts @@ -116,7 +116,6 @@ function test_timeZone() { strFormats = dp.timeZone() as string; } - function test_widgetParent() { let nullW: null = null; let str: string = "myId"; diff --git a/bootstrap.v3.datetimepicker/index.d.ts b/types/bootstrap.v3.datetimepicker/index.d.ts similarity index 96% rename from bootstrap.v3.datetimepicker/index.d.ts rename to types/bootstrap.v3.datetimepicker/index.d.ts index d8ec008dca..653135057d 100644 --- a/bootstrap.v3.datetimepicker/index.d.ts +++ b/types/bootstrap.v3.datetimepicker/index.d.ts @@ -49,9 +49,9 @@ export interface Datetimepicker { hide(): void; /**Returns the components current options object. * Note that the changing the values of the returned object does not change the components actual configuration. */ - options(): DatetimepickerOptions + options(): DatetimepickerOptions; /**Takes an object variable with option key:value properties and configures the component. Use this to update multiple options on the component. */ - options(options: DatetimepickerOptions): void + options(options: DatetimepickerOptions): void; /**Shows the widget * Emits: * - dp.show - if the widget was hidden before that call @@ -85,14 +85,14 @@ export interface Datetimepicker { /**Returns the options.daysOfWeekDisabled configuration * IMPORTANT! Throws exception if not set explicitly https://github.com/Eonasdan/bootstrap-datetimepicker/issues/1459 */ - daysOfWeekDisabled(): Array; + daysOfWeekDisabled(): number[]; /**Takes an [ Number:0 to 6 ] and disallow the user to select weekdays that exist in this array. * This has lower priority over the options.minDate, options.maxDate, options.disabledDates and options.enabledDates configuration settings. * Emits: * - dp.change - if the currently selected moment falls in the values passed on the daysOfWeek parameter. * - dp.error - if the currently selected moment falls in the values passed on the daysOfWeek parameter. */ - daysOfWeekDisabled(days: Array): void; + daysOfWeekDisabled(days: number[]): void; /**Returns the options.dayViewHeaderFormat option. */ dayViewHeaderFormat(): string; /**Used to customize the header of the day view. */ @@ -117,22 +117,22 @@ export interface Datetimepicker { */ disabledDates(dates: boolean | Array): void; /**Returns the options.disabledHours option. - * NOTES: probably should be: disabledHours(): boolean | Array; see: DatetimepickerOptions + * NOTES: probably should be: disabledHours(): boolean | number[]; see: DatetimepickerOptions */ disabledHours(): boolean | any; /**Must be in 24 hour format. Will disallow hour selections (much like disabledTimeIntervals) but will affect all days. * Like en/disabledDates, the en/disabledHours options are mutually exclusive and will reset one of the options back to false. */ - disabledHours(value: boolean | Array): void; + disabledHours(value: boolean | number[]): void; /**Returns the options.disabledTimeIntervals option, or... not exactly * IMPORTANT! Creates an object from the options.disabledTimeIntervals with the keys being numbers, the values being the moment arrays. * eg { "0": [, ], "1": [...] } * https://github.com/Eonasdan/bootstrap-datetimepicker/issues/1498 */ - disabledTimeIntervals(): boolean | Array>; + disabledTimeIntervals(): boolean | moment.Moment[][]; /**Disables time selection between the given moments * eg: [[moment({ h: 0 }), moment({ h: 8 })], [moment({ h: 18 }), moment({ h: 24 })]] */ - disabledTimeIntervals(value: boolean | Array>): void; + disabledTimeIntervals(value: boolean | moment.Moment[][]): void; /**Returns the options.enabledDates option * NOTES: probably should be: enabledDates(): boolean | Array; see: DatetimepickerOptions */ @@ -144,12 +144,12 @@ export interface Datetimepicker { */ enabledDates(dates: boolean | Array): void; /**Returns the options.enabledHours option. - * NOTES: probably should be: enabledHours(): boolean | Array; see: DatetimepickerOptions + * NOTES: probably should be: enabledHours(): boolean | number[]; see: DatetimepickerOptions */ enabledHours(): boolean | any; /**Must be in 24 hour format. Will allow hour selections (much like enabledTimeIntervals) but will affect all days. * Like en/disabledDates, the en/disabledHours options are mutually exclusive and will reset one of the options back to false. */ - enabledHours(value: boolean | Array): void; + enabledHours(value: boolean | number[]): void; /**Returns a boolean or array with the options.extraFormats option configuration */ extraFormats(): boolean | Array; /**Takes an array of valid input moment format options, or boolean:false */ @@ -303,7 +303,7 @@ export interface Datetimepicker { */ viewMode(value: string): void; /**Returns a $(element) variable with the currently set options.widgetParent option. */ - widgetParent(): string | JQuery | null + widgetParent(): string | JQuery | null; /**Takes a string or $(element) value. */ widgetParent(widgetParent: string | JQuery | null): void; /**Returns the options.widgetPositioning object */ @@ -332,7 +332,7 @@ export interface DatetimepickerOptions { * Accepts: array of numbers from 0-6 * @default: false */ - daysOfWeekDisabled?: Array | boolean; + daysOfWeekDisabled?: number[] | boolean; /**Changes the heading of the datepicker when in "days" view. * @default: "MMMM YYYY" */ @@ -358,12 +358,12 @@ export interface DatetimepickerOptions { * eg disabledHours = [0, 1]; -> disabledHours will be { "0": true, "1": true } * https://github.com/Eonasdan/bootstrap-datetimepicker/issues/1499 */ - disabledHours?: boolean | Array | any; + disabledHours?: boolean | number[] | any; /**Disables time selection between the given moments * eg: [[moment({ h: 0 }), moment({ h: 8 })], [moment({ h: 18 }), moment({ h: 24 })]] * @default: false */ - disabledTimeIntervals?: boolean | Array>; + disabledTimeIntervals?: boolean | moment.Moment[][]; /**Disables selection of dates NOT in the array, e.g. holidays * @default: false * IMPORTANT! The getter returns an Object NOT an Array, with keys being the dates, values being true. @@ -377,7 +377,7 @@ export interface DatetimepickerOptions { * eg enabledHours = [0, 1]; -> enabledHours will be { "0": true, "1": true } * https://github.com/Eonasdan/bootstrap-datetimepicker/issues/1499 */ - enabledHours?: boolean | Array; + enabledHours?: boolean | number[]; /**Allows for several input formats to be valid. See: https://github.com/Eonasdan/bootstrap-datetimepicker/pull/666 * @default: false */ @@ -566,7 +566,6 @@ type EventName = "dp.show" | "dp.hide" | "dp.error"; declare global { interface JQuery { - datetimepicker(options?: DatetimepickerOptions): JQuery; data(key: "DateTimePicker"): Datetimepicker; @@ -575,21 +574,21 @@ declare global { on(events: "dp.change", selector: string, handler: (eventobject: ChangeEvent) => any): JQuery; on(events: "dp.change", selector: string, data: any, handler?: (eventobject: ChangeEvent) => any): JQuery; - off(events: "dp.change", handler: (eventobject: ChangeEvent) => any): JQuery; - off(events: "dp.change", selector?: string, handler?: (eventobject: ChangeEvent) => any): JQuery; + on(events: "dp.update", handler: (eventObject: UpdateEvent) => any): JQuery; + on(events: "dp.update", selector: string, handler: (eventobject: UpdateEvent) => any): JQuery; + on(events: "dp.update", selector: string, data: any, handler?: (eventobject: UpdateEvent) => any): JQuery; on(events: EventName , handler: (eventObject: Event) => any): JQuery; on(events: EventName, selector: string, handler: (eventobject: Event) => any): JQuery; on(events: EventName, selector: string, data: any, handler?: (eventobject: Event) => any): JQuery; - off(events: EventName, handler: (eventobject: Event) => any): JQuery; - off(events: EventName, selector?: string, handler?: (eventobject: Event) => any): JQuery; - - on(events: "dp.update", handler: (eventObject: UpdateEvent) => any): JQuery; - on(events: "dp.update", selector: string, handler: (eventobject: UpdateEvent) => any): JQuery; - on(events: "dp.update", selector: string, data: any, handler?: (eventobject: UpdateEvent) => any): JQuery; + off(events: "dp.change", handler: (eventobject: ChangeEvent) => any): JQuery; + off(events: "dp.change", selector?: string, handler?: (eventobject: ChangeEvent) => any): JQuery; off(events: "dp.update", handler: (eventobject: UpdateEvent) => any): JQuery; off(events: "dp.update", selector?: string, handler?: (eventobject: UpdateEvent) => any): JQuery; + + off(events: EventName, handler: (eventobject: Event) => any): JQuery; + off(events: EventName, selector?: string, handler?: (eventobject: Event) => any): JQuery; } } diff --git a/bootstrap.v3.datetimepicker/package.json b/types/bootstrap.v3.datetimepicker/package.json similarity index 100% rename from bootstrap.v3.datetimepicker/package.json rename to types/bootstrap.v3.datetimepicker/package.json diff --git a/bootstrap.v3.datetimepicker/tsconfig.json b/types/bootstrap.v3.datetimepicker/tsconfig.json similarity index 100% rename from bootstrap.v3.datetimepicker/tsconfig.json rename to types/bootstrap.v3.datetimepicker/tsconfig.json diff --git a/bootstrap.v3.datetimepicker/tslint.json b/types/bootstrap.v3.datetimepicker/tslint.json similarity index 100% rename from bootstrap.v3.datetimepicker/tslint.json rename to types/bootstrap.v3.datetimepicker/tslint.json diff --git a/bootstrap.v3.datetimepicker/v3/index.d.ts b/types/bootstrap.v3.datetimepicker/v3/index.d.ts similarity index 100% rename from bootstrap.v3.datetimepicker/v3/index.d.ts rename to types/bootstrap.v3.datetimepicker/v3/index.d.ts diff --git a/bootstrap.v3.datetimepicker/v3/package.json b/types/bootstrap.v3.datetimepicker/v3/package.json similarity index 100% rename from bootstrap.v3.datetimepicker/v3/package.json rename to types/bootstrap.v3.datetimepicker/v3/package.json diff --git a/bootstrap.v3.datetimepicker/v3/tsconfig.json b/types/bootstrap.v3.datetimepicker/v3/tsconfig.json similarity index 100% rename from bootstrap.v3.datetimepicker/v3/tsconfig.json rename to types/bootstrap.v3.datetimepicker/v3/tsconfig.json diff --git a/bootstrap/bootstrap-tests.ts b/types/bootstrap/bootstrap-tests.ts similarity index 100% rename from bootstrap/bootstrap-tests.ts rename to types/bootstrap/bootstrap-tests.ts diff --git a/bootstrap/index.d.ts b/types/bootstrap/index.d.ts similarity index 100% rename from bootstrap/index.d.ts rename to types/bootstrap/index.d.ts diff --git a/bootstrap/tsconfig.json b/types/bootstrap/tsconfig.json similarity index 100% rename from bootstrap/tsconfig.json rename to types/bootstrap/tsconfig.json diff --git a/bounce.js/bounce.js-tests.ts b/types/bounce.js/bounce.js-tests.ts similarity index 100% rename from bounce.js/bounce.js-tests.ts rename to types/bounce.js/bounce.js-tests.ts diff --git a/bounce.js/index.d.ts b/types/bounce.js/index.d.ts similarity index 100% rename from bounce.js/index.d.ts rename to types/bounce.js/index.d.ts diff --git a/bounce.js/tsconfig.json b/types/bounce.js/tsconfig.json similarity index 100% rename from bounce.js/tsconfig.json rename to types/bounce.js/tsconfig.json diff --git a/bowser/bowser-tests.ts b/types/bowser/bowser-tests.ts similarity index 100% rename from bowser/bowser-tests.ts rename to types/bowser/bowser-tests.ts diff --git a/bowser/index.d.ts b/types/bowser/index.d.ts similarity index 100% rename from bowser/index.d.ts rename to types/bowser/index.d.ts diff --git a/bowser/tsconfig.json b/types/bowser/tsconfig.json similarity index 100% rename from bowser/tsconfig.json rename to types/bowser/tsconfig.json diff --git a/box2d/README.md b/types/box2d/README.md similarity index 100% rename from box2d/README.md rename to types/box2d/README.md diff --git a/box2d/box2d-tests.ts b/types/box2d/box2d-tests.ts similarity index 100% rename from box2d/box2d-tests.ts rename to types/box2d/box2d-tests.ts diff --git a/box2d/index.d.ts b/types/box2d/index.d.ts similarity index 100% rename from box2d/index.d.ts rename to types/box2d/index.d.ts diff --git a/box2d/tsconfig.json b/types/box2d/tsconfig.json similarity index 100% rename from box2d/tsconfig.json rename to types/box2d/tsconfig.json diff --git a/braintree-web/braintree-web-tests.ts b/types/braintree-web/braintree-web-tests.ts similarity index 100% rename from braintree-web/braintree-web-tests.ts rename to types/braintree-web/braintree-web-tests.ts diff --git a/braintree-web/index.d.ts b/types/braintree-web/index.d.ts similarity index 100% rename from braintree-web/index.d.ts rename to types/braintree-web/index.d.ts diff --git a/braintree-web/tsconfig.json b/types/braintree-web/tsconfig.json similarity index 100% rename from braintree-web/tsconfig.json rename to types/braintree-web/tsconfig.json diff --git a/breeze/breeze-tests.ts b/types/breeze/breeze-tests.ts similarity index 100% rename from breeze/breeze-tests.ts rename to types/breeze/breeze-tests.ts diff --git a/breeze/index.d.ts b/types/breeze/index.d.ts similarity index 93% rename from breeze/index.d.ts rename to types/breeze/index.d.ts index 8cc109d746..323e9a8f87 100644 --- a/breeze/index.d.ts +++ b/types/breeze/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Breeze 1.5.x +// Type definitions for Breeze 1.6.3 // Project: http://www.breezejs.com/ // Definitions by: Boris Yankov , IdeaBlade // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -12,7 +12,10 @@ // Updated Jan 20 2015 for Breeze 1.5.2 and merging changes from DefinitelyTyped // Updated Feb 28 2015 add any/all clause on Predicate // Updated Jun 27 2016 - Marcel Good (www.ideablade.com) -// Updated Jul 28 2016 - Serkan "coni2k" Holat +// Updated Jun 29 2016 - Marcel Good (www.ideablade.com) +// Updated Jul 15 2016 - Added methods to JsonResultsAdapter - Steve Schmitt +// Updated Sep 23 2016 - Added core methods +// Updated March 5 2017 - Eliminate promises.IPromise and replace with Promise declare namespace breeze.core { @@ -89,6 +92,19 @@ declare namespace breeze.core { export function stringStartsWith(str: string, prefix: string): boolean; export function stringEndsWith(str: string, suffix: string): boolean; export function formatString(format: string, ...args: any[]): string; + + /** Change text to title case with spaces, e.g. 'myPropertyName12' to 'My Property Name 12' */ + export function titleCase(str: string): string; + + /** Return the ES5 property descriptor for the property, which may be on a prototype of the object */ + export function getPropertyDescriptor(obj: any, propertyName: string): PropertyDescriptor + + /** safely perform toJSON logic on objects with cycles. Replacer function can map or exclude properties. */ + export function toJSONSafe(obj: any, replacer: (prop: string, val: any) => any): any + + /** Default value replacer for toJSONSafe. Replaces entityAspect and other internal properties with undefined. */ + export function toJSONSafeReplacer(prop: string, val: any): any + } declare namespace breeze { @@ -214,19 +230,23 @@ declare namespace breeze { export class DataServiceAdapter { checkForRecomposition(interfaceInitializedArgs: { interfaceName: string; isDefault: boolean }): void; initialize(): void; - fetchMetadata(metadataStore: MetadataStore, dataService: DataService): breeze.promises.IPromise; - executeQuery(mappingContext: { getUrl: () => string; query: EntityQuery; dataService: DataService }): breeze.promises.IPromise; - saveChanges(saveContext: { resourceName: string; dataService: DataService }, saveBundle: Object): breeze.promises.IPromise; + fetchMetadata(metadataStore: MetadataStore, dataService: DataService): Promise; + executeQuery(mappingContext: { getUrl: () => string; query: EntityQuery; dataService: DataService }): Promise; + saveChanges(saveContext: { resourceName: string; dataService: DataService }, saveBundle: Object): Promise; JsonResultsAdapter: JsonResultsAdapter; } export class JsonResultsAdapter { name: string; extractResults: (data: {}) => {}; + extractSaveResults: (data: {}) => any[]; + extractKeyMappings: (data: {}) => KeyMapping[]; visitNode: (node: {}, queryContext: QueryContext, nodeContext: NodeContext) => { entityType?: EntityType; nodeId?: any; nodeRefId?: any; ignore?: boolean; }; constructor(config: { name: string; extractResults?: (data: {}) => {}; + extractSaveResults?: (data: {}) => any[]; + extractKeyMappings?: (data: {}) => KeyMapping[]; visitNode: (node: {}, queryContext: QueryContext, nodeContext: NodeContext) => { entityType?: EntityType; nodeId?: any; nodeRefId?: any; ignore?: boolean; }; }); } @@ -241,6 +261,7 @@ declare namespace breeze { export interface NodeContext { nodeType: string; + propertyName: string; } export class DataTypeSymbol extends breeze.core.EnumSymbol { @@ -333,8 +354,8 @@ declare namespace breeze { isNavigationPropertyLoaded(navigationProperty: string): boolean; isNavigationPropertyLoaded(navigationProperty: NavigationProperty): boolean; - loadNavigationProperty(navigationProperty: string, callback?: Function, errorCallback?: Function): breeze.promises.IPromise; - loadNavigationProperty(navigationProperty: NavigationProperty, callback?: Function, errorCallback?: Function): breeze.promises.IPromise; + loadNavigationProperty(navigationProperty: string, callback?: Function, errorCallback?: Function): Promise; + loadNavigationProperty(navigationProperty: NavigationProperty, callback?: Function, errorCallback?: Function): Promise; rejectChanges(): void; @@ -423,16 +444,16 @@ declare namespace breeze { createEntity(typeName: string, config?: {}, entityState?: EntityStateSymbol, mergeStrategy?: MergeStrategySymbol): Entity; createEntity(entityType: EntityType, config?: {}, entityState?: EntityStateSymbol, mergeStrategy?: MergeStrategySymbol): Entity; detachEntity(entity: Entity): boolean; - executeQuery(query: string, callback?: ExecuteQuerySuccessCallback, errorCallback?: ExecuteQueryErrorCallback): breeze.promises.IPromise; - executeQuery(query: EntityQuery, callback?: ExecuteQuerySuccessCallback, errorCallback?: ExecuteQueryErrorCallback): breeze.promises.IPromise; + executeQuery(query: string, callback?: ExecuteQuerySuccessCallback, errorCallback?: ExecuteQueryErrorCallback): Promise; + executeQuery(query: EntityQuery, callback?: ExecuteQuerySuccessCallback, errorCallback?: ExecuteQueryErrorCallback): Promise; executeQueryLocally(query: EntityQuery): Entity[]; exportEntities(entities?: Entity[], includeMetadata?: boolean): string; exportEntities(entities?: Entity[], options?: ExportEntitiesOptions): any; // string | Object - fetchEntityByKey(typeName: string, keyValue: any, checkLocalCacheFirst?: boolean): breeze.promises.IPromise; - fetchEntityByKey(typeName: string, keyValues: any[], checkLocalCacheFirst?: boolean): breeze.promises.IPromise; - fetchEntityByKey(entityKey: EntityKey): breeze.promises.IPromise; - fetchMetadata(callback?: (schema: any) => void, errorCallback?: breeze.core.ErrorCallback): breeze.promises.IPromise; + fetchEntityByKey(typeName: string, keyValue: any, checkLocalCacheFirst?: boolean): Promise; + fetchEntityByKey(typeName: string, keyValues: any[], checkLocalCacheFirst?: boolean): Promise; + fetchEntityByKey(entityKey: EntityKey): Promise; + fetchMetadata(callback?: (schema: any) => void, errorCallback?: breeze.core.ErrorCallback): Promise; generateTempKeyValue(entity: Entity): any; getChanges(): Entity[]; getChanges(entityTypeName: string): Entity[]; @@ -466,7 +487,7 @@ declare namespace breeze { importEntities(exportedData: Object, config?: { mergeStrategy?: MergeStrategySymbol; metadataVersionFn?: (any: any) => void }): { entities: Entity[]; tempKeyMapping: { [key: string]: EntityKey } }; rejectChanges(): Entity[]; - saveChanges(entities?: Entity[], saveOptions?: SaveOptions, callback?: SaveChangesSuccessCallback, errorCallback?: SaveChangesErrorCallback): breeze.promises.IPromise; + saveChanges(entities?: Entity[], saveOptions?: SaveOptions, callback?: SaveChangesSuccessCallback, errorCallback?: SaveChangesErrorCallback): Promise; setProperties(config: EntityManagerProperties): void; } @@ -554,7 +575,7 @@ declare namespace breeze { /** Create query from an expression tree */ constructor(tree: Object); - execute(callback?: ExecuteQuerySuccessCallback, errorCallback?: ExecuteQueryErrorCallback): breeze.promises.IPromise; + execute(callback?: ExecuteQuerySuccessCallback, errorCallback?: ExecuteQueryErrorCallback): Promise; executeLocally(): Entity[]; expand(propertyPaths: string[]): EntityQuery; expand(propertyPaths: string): EntityQuery; @@ -591,6 +612,8 @@ declare namespace breeze { where(property: string, filterop: FilterQueryOpSymbol, property2: string, filterop2: FilterQueryOpSymbol, value: any): EntityQuery; // for any/all clauses where(property: string, filterop: string, property2: string, filterop2: string, value: any): EntityQuery; // for any/all clauses where(predicate: FilterQueryOpSymbol): EntityQuery; + where(anArray: IRecursiveArray): EntityQuery; + withParameters(params: Object): EntityQuery; toJSON(): string; @@ -721,13 +744,14 @@ declare namespace breeze { addDataService(dataService: DataService, shouldOverwrite?: boolean): void; addEntityType(structuralType: IStructuralType): void; exportMetadata(): string; - fetchMetadata(dataService: string, callback?: (data: any) => void, errorCallback?: breeze.core.ErrorCallback): breeze.promises.IPromise; - fetchMetadata(dataService: DataService, callback?: (data: any) => void, errorCallback?: breeze.core.ErrorCallback): breeze.promises.IPromise; + fetchMetadata(dataService: string, callback?: (data: any) => void, errorCallback?: breeze.core.ErrorCallback): Promise; + fetchMetadata(dataService: DataService, callback?: (data: any) => void, errorCallback?: breeze.core.ErrorCallback): Promise; getDataService(serviceName: string): DataService; getEntityType(entityTypeName: string, okIfNotFound?: boolean): IStructuralType; getEntityTypes(): IStructuralType[]; hasMetadataFor(serviceName: string): boolean; static importMetadata(exportedString: string): MetadataStore; + static normalizeTypeName(typeName: string): string; importMetadata(exportedString: string, allowMerge?: boolean): MetadataStore; isEmpty(): boolean; registerEntityTypeCtor(entityTypeName: string, entityCtor: Function, initializationFn?: (entity: Entity) => void, noTrackingFn?: (node: Object, entityType: EntityType) => Object): void; @@ -796,7 +820,7 @@ declare namespace breeze { export interface IRecursiveArray { [i: number]: T | IRecursiveArray; } - + export class Predicate { constructor(); constructor(property: string, operator: string, value: any); @@ -904,10 +928,16 @@ declare namespace breeze { export interface SaveResult { entities: Entity[]; - keyMappings: any; + keyMappings: KeyMapping[]; XHR: XMLHttpRequest; } + export interface KeyMapping { + entityTypeName: string; + tempValue: any; + realValue: any; + } + export class ValidationError { key: string; context: any; @@ -993,7 +1023,7 @@ declare namespace breeze { /** Creates a regular expression validator with a fixed expression. */ static makeRegExpValidator(validatorName: string, expression: RegExp, defaultMessage: string, context?: any): Validator; - /** Run this validator against the specified value. + /** Run this validator against the specified value. @param value {Object} Value to validate @param additionalContext {Object} Any additional contextual information that the Validator can make use of. @return {ValidationError|null} A ValidationError if validation fails, null otherwise */ @@ -1044,20 +1074,16 @@ declare namespace breeze.config { @return {an instance of the specified adapter} **/ export function getAdapterInstance(interfaceName: string, adapterName?: string): Object; - - export interface Adapter { - getRoutePrefix: Function - } /** - Initializes a single adapter implementation. Initialization means either newing a instance of the + Initializes a single adapter implementation. Initialization means either newing a instance of the specified interface and then calling "initialize" on it or simply calling "initialize" on the instance if it already exists. @param interfaceName {String} The name of the interface to which the adapter to initialize belongs. @param adapterName {String} - The name of a previously registered adapter to initialize. - @param isDefault=true {Boolean} - Whether to make this the default "adapter" for this interface. + @param isDefault=true {Boolean} - Whether to make this the default "adapter" for this interface. @return {an instance of the specified adapter} **/ - export function initializeAdapterInstance(interfaceName: string, adapterName: string, isDefault?: boolean): Adapter; + export function initializeAdapterInstance(interfaceName: string, adapterName: string, isDefault?: boolean): Object; export interface AdapterInstancesConfig { /** the name of a previously registered "ajax" adapter */ @@ -1080,15 +1106,15 @@ declare namespace breeze.config { export var objectRegistry: Object; /** Method use to register implementations of standard breeze interfaces. Calls to this method are usually - made as the last step within an adapter implementation. + made as the last step within an adapter implementation. @param interfaceName {String} - one of the following interface names "ajax", "dataService" or "modelLibrary" - @param adapterCtor {Function} - an ctor function that returns an instance of the specified interface. + @param adapterCtor {Function} - an ctor function that returns an instance of the specified interface. **/ export function registerAdapter(interfaceName: string, adapterCtor: Function): void; export function registerFunction(fn: Function, fnName: string): void; export function registerType(ctor: Function, typeName: string): void; //static setProperties(config: Object): void; //deprecated - /** + /** Set the promise implementation, if Q.js is not found. @param q - implementation of promise. @see http://wiki.commonjs.org/wiki/Promises/A */ @@ -1101,27 +1127,17 @@ declare namespace breeze.config { /** Promises interface used by Breeze. Usually implemented by Q (https://github.com/kriskowal/q) or angular.$q using breeze.config.setQ(impl) */ declare namespace breeze.promises { - export interface IPromise { - then(onFulfill: (value: T) => U, onReject?: (reason: any) => U): IPromise; - then(onFulfill: (value: T) => IPromise, onReject?: (reason: any) => U): IPromise; - then(onFulfill: (value: T) => U, onReject?: (reason: any) => IPromise): IPromise; - then(onFulfill: (value: T) => IPromise, onReject?: (reason: any) => IPromise): IPromise; - catch(onRejected: (reason: any) => U): IPromise; - catch(onRejected: (reason: any) => IPromise): IPromise; - finally(finallyCallback: () => any): IPromise; - } - export interface IDeferred { - promise: IPromise; + promise: Promise; resolve(value: T): void; reject(reason: any): void; } export interface IPromiseService { defer(): IDeferred; - reject(reason?: any): IPromise; - resolve(object: T): IPromise; - resolve(object: IPromise): IPromise; + reject(reason?: any): Promise; + resolve(object: T): Promise; + resolve(object: Promise): Promise; } } diff --git a/breeze/tsconfig.json b/types/breeze/tsconfig.json similarity index 100% rename from breeze/tsconfig.json rename to types/breeze/tsconfig.json diff --git a/brorand/brorand-tests.ts b/types/brorand/brorand-tests.ts similarity index 100% rename from brorand/brorand-tests.ts rename to types/brorand/brorand-tests.ts diff --git a/brorand/index.d.ts b/types/brorand/index.d.ts similarity index 100% rename from brorand/index.d.ts rename to types/brorand/index.d.ts diff --git a/brorand/tsconfig.json b/types/brorand/tsconfig.json similarity index 100% rename from brorand/tsconfig.json rename to types/brorand/tsconfig.json diff --git a/browser-bunyan/browser-bunyan-tests.ts b/types/browser-bunyan/browser-bunyan-tests.ts similarity index 83% rename from browser-bunyan/browser-bunyan-tests.ts rename to types/browser-bunyan/browser-bunyan-tests.ts index ffb2ebf7a7..47f439a07e 100644 --- a/browser-bunyan/browser-bunyan-tests.ts +++ b/types/browser-bunyan/browser-bunyan-tests.ts @@ -1,6 +1,6 @@ import * as bunyan from "browser-bunyan"; -var log = bunyan.createLogger({ +const log = bunyan.createLogger({ name: 'play', serializers: bunyan.stdSerializers }); diff --git a/browser-bunyan/index.d.ts b/types/browser-bunyan/index.d.ts similarity index 85% rename from browser-bunyan/index.d.ts rename to types/browser-bunyan/index.d.ts index f2981bfacd..bb243e4324 100644 --- a/browser-bunyan/index.d.ts +++ b/types/browser-bunyan/index.d.ts @@ -6,7 +6,7 @@ import bunyan = require("bunyan"); declare module "bunyan" { - export function ConsoleFormattedStream(): void; + function ConsoleFormattedStream(): void; } export = bunyan; diff --git a/browser-bunyan/tsconfig.json b/types/browser-bunyan/tsconfig.json similarity index 100% rename from browser-bunyan/tsconfig.json rename to types/browser-bunyan/tsconfig.json diff --git a/browser-bunyan/tslint.json b/types/browser-bunyan/tslint.json similarity index 100% rename from browser-bunyan/tslint.json rename to types/browser-bunyan/tslint.json diff --git a/browser-fingerprint/browser-fingerprint-tests.ts b/types/browser-fingerprint/browser-fingerprint-tests.ts similarity index 100% rename from browser-fingerprint/browser-fingerprint-tests.ts rename to types/browser-fingerprint/browser-fingerprint-tests.ts diff --git a/browser-fingerprint/index.d.ts b/types/browser-fingerprint/index.d.ts similarity index 100% rename from browser-fingerprint/index.d.ts rename to types/browser-fingerprint/index.d.ts diff --git a/browser-fingerprint/tsconfig.json b/types/browser-fingerprint/tsconfig.json similarity index 100% rename from browser-fingerprint/tsconfig.json rename to types/browser-fingerprint/tsconfig.json diff --git a/browser-fingerprint/tslint.json b/types/browser-fingerprint/tslint.json similarity index 100% rename from browser-fingerprint/tslint.json rename to types/browser-fingerprint/tslint.json diff --git a/browser-harness/browser-harness-tests.ts b/types/browser-harness/browser-harness-tests.ts similarity index 100% rename from browser-harness/browser-harness-tests.ts rename to types/browser-harness/browser-harness-tests.ts diff --git a/browser-harness/index.d.ts b/types/browser-harness/index.d.ts similarity index 100% rename from browser-harness/index.d.ts rename to types/browser-harness/index.d.ts diff --git a/browser-harness/tsconfig.json b/types/browser-harness/tsconfig.json similarity index 100% rename from browser-harness/tsconfig.json rename to types/browser-harness/tsconfig.json diff --git a/browser-pack/browser-pack-tests.ts b/types/browser-pack/browser-pack-tests.ts similarity index 100% rename from browser-pack/browser-pack-tests.ts rename to types/browser-pack/browser-pack-tests.ts diff --git a/browser-pack/index.d.ts b/types/browser-pack/index.d.ts similarity index 100% rename from browser-pack/index.d.ts rename to types/browser-pack/index.d.ts diff --git a/browser-pack/tsconfig.json b/types/browser-pack/tsconfig.json similarity index 100% rename from browser-pack/tsconfig.json rename to types/browser-pack/tsconfig.json diff --git a/browser-resolve/browser-resolve-tests.ts b/types/browser-resolve/browser-resolve-tests.ts similarity index 100% rename from browser-resolve/browser-resolve-tests.ts rename to types/browser-resolve/browser-resolve-tests.ts diff --git a/browser-resolve/index.d.ts b/types/browser-resolve/index.d.ts similarity index 100% rename from browser-resolve/index.d.ts rename to types/browser-resolve/index.d.ts diff --git a/browser-resolve/tsconfig.json b/types/browser-resolve/tsconfig.json similarity index 100% rename from browser-resolve/tsconfig.json rename to types/browser-resolve/tsconfig.json diff --git a/browser-sync/browser-sync-tests.ts b/types/browser-sync/browser-sync-tests.ts similarity index 100% rename from browser-sync/browser-sync-tests.ts rename to types/browser-sync/browser-sync-tests.ts diff --git a/browser-sync/index.d.ts b/types/browser-sync/index.d.ts similarity index 100% rename from browser-sync/index.d.ts rename to types/browser-sync/index.d.ts diff --git a/browser-sync/tsconfig.json b/types/browser-sync/tsconfig.json similarity index 100% rename from browser-sync/tsconfig.json rename to types/browser-sync/tsconfig.json diff --git a/browserify/browserify-tests.ts b/types/browserify/browserify-tests.ts similarity index 100% rename from browserify/browserify-tests.ts rename to types/browserify/browserify-tests.ts diff --git a/browserify/index.d.ts b/types/browserify/index.d.ts similarity index 100% rename from browserify/index.d.ts rename to types/browserify/index.d.ts diff --git a/browserify/tsconfig.json b/types/browserify/tsconfig.json similarity index 100% rename from browserify/tsconfig.json rename to types/browserify/tsconfig.json diff --git a/bs58/bs58-tests.ts b/types/bs58/bs58-tests.ts similarity index 100% rename from bs58/bs58-tests.ts rename to types/bs58/bs58-tests.ts diff --git a/bs58/index.d.ts b/types/bs58/index.d.ts similarity index 100% rename from bs58/index.d.ts rename to types/bs58/index.d.ts diff --git a/bs58/tsconfig.json b/types/bs58/tsconfig.json similarity index 100% rename from bs58/tsconfig.json rename to types/bs58/tsconfig.json diff --git a/bson/bson-tests.ts b/types/bson/bson-tests.ts similarity index 100% rename from bson/bson-tests.ts rename to types/bson/bson-tests.ts diff --git a/bson/index.d.ts b/types/bson/index.d.ts similarity index 100% rename from bson/index.d.ts rename to types/bson/index.d.ts diff --git a/bson/tsconfig.json b/types/bson/tsconfig.json similarity index 100% rename from bson/tsconfig.json rename to types/bson/tsconfig.json diff --git a/bucks/bucks-tests.ts b/types/bucks/bucks-tests.ts similarity index 100% rename from bucks/bucks-tests.ts rename to types/bucks/bucks-tests.ts diff --git a/bucks/index.d.ts b/types/bucks/index.d.ts similarity index 100% rename from bucks/index.d.ts rename to types/bucks/index.d.ts diff --git a/bucks/tsconfig.json b/types/bucks/tsconfig.json similarity index 100% rename from bucks/tsconfig.json rename to types/bucks/tsconfig.json diff --git a/buffer-compare/buffer-compare-tests.ts b/types/buffer-compare/buffer-compare-tests.ts similarity index 100% rename from buffer-compare/buffer-compare-tests.ts rename to types/buffer-compare/buffer-compare-tests.ts diff --git a/buffer-compare/index.d.ts b/types/buffer-compare/index.d.ts similarity index 100% rename from buffer-compare/index.d.ts rename to types/buffer-compare/index.d.ts diff --git a/buffer-compare/tsconfig.json b/types/buffer-compare/tsconfig.json similarity index 100% rename from buffer-compare/tsconfig.json rename to types/buffer-compare/tsconfig.json diff --git a/buffer-equal/buffer-equal-tests.ts b/types/buffer-equal/buffer-equal-tests.ts similarity index 100% rename from buffer-equal/buffer-equal-tests.ts rename to types/buffer-equal/buffer-equal-tests.ts diff --git a/buffer-equal/index.d.ts b/types/buffer-equal/index.d.ts similarity index 100% rename from buffer-equal/index.d.ts rename to types/buffer-equal/index.d.ts diff --git a/buffer-equal/tsconfig.json b/types/buffer-equal/tsconfig.json similarity index 100% rename from buffer-equal/tsconfig.json rename to types/buffer-equal/tsconfig.json diff --git a/buffers/buffers-tests.ts b/types/buffers/buffers-tests.ts similarity index 100% rename from buffers/buffers-tests.ts rename to types/buffers/buffers-tests.ts diff --git a/buffers/index.d.ts b/types/buffers/index.d.ts similarity index 100% rename from buffers/index.d.ts rename to types/buffers/index.d.ts diff --git a/buffers/tsconfig.json b/types/buffers/tsconfig.json similarity index 100% rename from buffers/tsconfig.json rename to types/buffers/tsconfig.json diff --git a/bufferstream/bufferstream-tests.ts b/types/bufferstream/bufferstream-tests.ts similarity index 80% rename from bufferstream/bufferstream-tests.ts rename to types/bufferstream/bufferstream-tests.ts index 06cbd43e28..609e8828c7 100644 --- a/bufferstream/bufferstream-tests.ts +++ b/types/bufferstream/bufferstream-tests.ts @@ -1,8 +1,6 @@ - - import BufferStream = require('bufferstream'); -var stream = new BufferStream({encoding: 'utf8', size: 'flexible'}); +const stream = new BufferStream({encoding: 'utf8', size: 'flexible'}); stream.enable(); stream.disable(); stream.split('//', ':'); @@ -11,4 +9,3 @@ stream.on('split', (chunk: any, token: any) => { }); stream.write("buffer:stream//23"); console.log(stream.toString()); - diff --git a/bufferstream/index.d.ts b/types/bufferstream/index.d.ts similarity index 97% rename from bufferstream/index.d.ts rename to types/bufferstream/index.d.ts index 1d1ffcdb10..0642fd8740 100644 --- a/bufferstream/index.d.ts +++ b/types/bufferstream/index.d.ts @@ -59,9 +59,9 @@ declare class BufferStream extends stream.Duplex { */ length: number; } // https://github.com/dodo/node-bufferstream/blob/master/src/buffer-stream.coffee#L28 -declare namespace BufferStream { - export interface Opts { +declare namespace BufferStream { + interface Opts { /* default encoding for writing strings */ @@ -85,5 +85,5 @@ declare namespace BufferStream { // String or Buffer split?: any; } - export var fn: {warn: boolean}; + const fn: {warn: boolean}; } diff --git a/bufferstream/postbuffer.d.ts b/types/bufferstream/postbuffer.d.ts similarity index 100% rename from bufferstream/postbuffer.d.ts rename to types/bufferstream/postbuffer.d.ts diff --git a/bufferstream/tsconfig.json b/types/bufferstream/tsconfig.json similarity index 100% rename from bufferstream/tsconfig.json rename to types/bufferstream/tsconfig.json diff --git a/bufferstream/tslint.json b/types/bufferstream/tslint.json similarity index 100% rename from bufferstream/tslint.json rename to types/bufferstream/tslint.json diff --git a/bugsnag/bugsnag-tests.ts b/types/bugsnag/bugsnag-tests.ts similarity index 100% rename from bugsnag/bugsnag-tests.ts rename to types/bugsnag/bugsnag-tests.ts diff --git a/bugsnag/index.d.ts b/types/bugsnag/index.d.ts similarity index 100% rename from bugsnag/index.d.ts rename to types/bugsnag/index.d.ts diff --git a/bugsnag/tsconfig.json b/types/bugsnag/tsconfig.json similarity index 100% rename from bugsnag/tsconfig.json rename to types/bugsnag/tsconfig.json diff --git a/bull/bull-tests.tsx b/types/bull/bull-tests.tsx similarity index 100% rename from bull/bull-tests.tsx rename to types/bull/bull-tests.tsx diff --git a/bull/index.d.ts b/types/bull/index.d.ts similarity index 100% rename from bull/index.d.ts rename to types/bull/index.d.ts diff --git a/bull/tsconfig.json b/types/bull/tsconfig.json similarity index 100% rename from bull/tsconfig.json rename to types/bull/tsconfig.json diff --git a/bunnymq/bunnymq-tests.ts b/types/bunnymq/bunnymq-tests.ts similarity index 100% rename from bunnymq/bunnymq-tests.ts rename to types/bunnymq/bunnymq-tests.ts diff --git a/bunnymq/index.d.ts b/types/bunnymq/index.d.ts similarity index 100% rename from bunnymq/index.d.ts rename to types/bunnymq/index.d.ts diff --git a/bunnymq/tsconfig.json b/types/bunnymq/tsconfig.json similarity index 100% rename from bunnymq/tsconfig.json rename to types/bunnymq/tsconfig.json diff --git a/bunyan-blackhole/bunyan-blackhole-tests.ts b/types/bunyan-blackhole/bunyan-blackhole-tests.ts similarity index 100% rename from bunyan-blackhole/bunyan-blackhole-tests.ts rename to types/bunyan-blackhole/bunyan-blackhole-tests.ts diff --git a/bunyan-blackhole/index.d.ts b/types/bunyan-blackhole/index.d.ts similarity index 100% rename from bunyan-blackhole/index.d.ts rename to types/bunyan-blackhole/index.d.ts diff --git a/bunyan-blackhole/tsconfig.json b/types/bunyan-blackhole/tsconfig.json similarity index 100% rename from bunyan-blackhole/tsconfig.json rename to types/bunyan-blackhole/tsconfig.json diff --git a/bunyan-blackhole/tslint.json b/types/bunyan-blackhole/tslint.json similarity index 100% rename from bunyan-blackhole/tslint.json rename to types/bunyan-blackhole/tslint.json diff --git a/bunyan-config/bunyan-config-tests.ts b/types/bunyan-config/bunyan-config-tests.ts similarity index 100% rename from bunyan-config/bunyan-config-tests.ts rename to types/bunyan-config/bunyan-config-tests.ts diff --git a/bunyan-config/index.d.ts b/types/bunyan-config/index.d.ts similarity index 100% rename from bunyan-config/index.d.ts rename to types/bunyan-config/index.d.ts diff --git a/bunyan-config/tsconfig.json b/types/bunyan-config/tsconfig.json similarity index 100% rename from bunyan-config/tsconfig.json rename to types/bunyan-config/tsconfig.json diff --git a/bunyan-logentries/bunyan-logentries-tests.ts b/types/bunyan-logentries/bunyan-logentries-tests.ts similarity index 100% rename from bunyan-logentries/bunyan-logentries-tests.ts rename to types/bunyan-logentries/bunyan-logentries-tests.ts diff --git a/bunyan-logentries/index.d.ts b/types/bunyan-logentries/index.d.ts similarity index 100% rename from bunyan-logentries/index.d.ts rename to types/bunyan-logentries/index.d.ts diff --git a/bunyan-logentries/tsconfig.json b/types/bunyan-logentries/tsconfig.json similarity index 100% rename from bunyan-logentries/tsconfig.json rename to types/bunyan-logentries/tsconfig.json diff --git a/bunyan-prettystream/bunyan-prettystream-tests.ts b/types/bunyan-prettystream/bunyan-prettystream-tests.ts similarity index 100% rename from bunyan-prettystream/bunyan-prettystream-tests.ts rename to types/bunyan-prettystream/bunyan-prettystream-tests.ts diff --git a/bunyan-prettystream/index.d.ts b/types/bunyan-prettystream/index.d.ts similarity index 100% rename from bunyan-prettystream/index.d.ts rename to types/bunyan-prettystream/index.d.ts diff --git a/bunyan-prettystream/tsconfig.json b/types/bunyan-prettystream/tsconfig.json similarity index 100% rename from bunyan-prettystream/tsconfig.json rename to types/bunyan-prettystream/tsconfig.json diff --git a/bunyan/bunyan-tests.ts b/types/bunyan/bunyan-tests.ts similarity index 100% rename from bunyan/bunyan-tests.ts rename to types/bunyan/bunyan-tests.ts diff --git a/bunyan/index.d.ts b/types/bunyan/index.d.ts similarity index 100% rename from bunyan/index.d.ts rename to types/bunyan/index.d.ts diff --git a/bunyan/tsconfig.json b/types/bunyan/tsconfig.json similarity index 100% rename from bunyan/tsconfig.json rename to types/bunyan/tsconfig.json diff --git a/busboy/busboy-tests.ts b/types/busboy/busboy-tests.ts similarity index 100% rename from busboy/busboy-tests.ts rename to types/busboy/busboy-tests.ts diff --git a/busboy/index.d.ts b/types/busboy/index.d.ts similarity index 100% rename from busboy/index.d.ts rename to types/busboy/index.d.ts diff --git a/busboy/tsconfig.json b/types/busboy/tsconfig.json similarity index 100% rename from busboy/tsconfig.json rename to types/busboy/tsconfig.json diff --git a/business-rules-engine/Utils.d.ts b/types/business-rules-engine/Utils.d.ts similarity index 100% rename from business-rules-engine/Utils.d.ts rename to types/business-rules-engine/Utils.d.ts diff --git a/business-rules-engine/Validation.d.ts b/types/business-rules-engine/Validation.d.ts similarity index 100% rename from business-rules-engine/Validation.d.ts rename to types/business-rules-engine/Validation.d.ts diff --git a/business-rules-engine/business-rules-engine-tests.ts b/types/business-rules-engine/business-rules-engine-tests.ts similarity index 100% rename from business-rules-engine/business-rules-engine-tests.ts rename to types/business-rules-engine/business-rules-engine-tests.ts diff --git a/business-rules-engine/index.d.ts b/types/business-rules-engine/index.d.ts similarity index 100% rename from business-rules-engine/index.d.ts rename to types/business-rules-engine/index.d.ts diff --git a/business-rules-engine/node-validators.d.ts b/types/business-rules-engine/node-validators.d.ts similarity index 100% rename from business-rules-engine/node-validators.d.ts rename to types/business-rules-engine/node-validators.d.ts diff --git a/business-rules-engine/package.json b/types/business-rules-engine/package.json similarity index 100% rename from business-rules-engine/package.json rename to types/business-rules-engine/package.json diff --git a/business-rules-engine/tsconfig.json b/types/business-rules-engine/tsconfig.json similarity index 100% rename from business-rules-engine/tsconfig.json rename to types/business-rules-engine/tsconfig.json diff --git a/bwip-js/bwip-js-tests.ts b/types/bwip-js/bwip-js-tests.ts similarity index 100% rename from bwip-js/bwip-js-tests.ts rename to types/bwip-js/bwip-js-tests.ts diff --git a/bwip-js/index.d.ts b/types/bwip-js/index.d.ts similarity index 100% rename from bwip-js/index.d.ts rename to types/bwip-js/index.d.ts diff --git a/bwip-js/tsconfig.json b/types/bwip-js/tsconfig.json similarity index 100% rename from bwip-js/tsconfig.json rename to types/bwip-js/tsconfig.json diff --git a/byline/byline-tests.ts b/types/byline/byline-tests.ts similarity index 100% rename from byline/byline-tests.ts rename to types/byline/byline-tests.ts diff --git a/byline/index.d.ts b/types/byline/index.d.ts similarity index 100% rename from byline/index.d.ts rename to types/byline/index.d.ts diff --git a/byline/tsconfig.json b/types/byline/tsconfig.json similarity index 100% rename from byline/tsconfig.json rename to types/byline/tsconfig.json diff --git a/bytebuffer/bytebuffer-tests.ts b/types/bytebuffer/bytebuffer-tests.ts similarity index 100% rename from bytebuffer/bytebuffer-tests.ts rename to types/bytebuffer/bytebuffer-tests.ts diff --git a/bytebuffer/index.d.ts b/types/bytebuffer/index.d.ts similarity index 100% rename from bytebuffer/index.d.ts rename to types/bytebuffer/index.d.ts diff --git a/bytebuffer/tsconfig.json b/types/bytebuffer/tsconfig.json similarity index 100% rename from bytebuffer/tsconfig.json rename to types/bytebuffer/tsconfig.json diff --git a/bytes/bytes-tests.ts b/types/bytes/bytes-tests.ts similarity index 100% rename from bytes/bytes-tests.ts rename to types/bytes/bytes-tests.ts diff --git a/bytes/index.d.ts b/types/bytes/index.d.ts similarity index 100% rename from bytes/index.d.ts rename to types/bytes/index.d.ts diff --git a/bytes/tsconfig.json b/types/bytes/tsconfig.json similarity index 100% rename from bytes/tsconfig.json rename to types/bytes/tsconfig.json diff --git a/c3/c3-tests.ts b/types/c3/c3-tests.ts similarity index 99% rename from c3/c3-tests.ts rename to types/c3/c3-tests.ts index 4a0695af1f..d9057eabb6 100644 --- a/c3/c3-tests.ts +++ b/types/c3/c3-tests.ts @@ -368,7 +368,9 @@ function line_examples() { data: {}, line: { connectNull: true, - step_type: "step-after" + step: { + type: "step-after" + } } }); } diff --git a/c3/index.d.ts b/types/c3/index.d.ts similarity index 99% rename from c3/index.d.ts rename to types/c3/index.d.ts index 5edb096395..748b19bfc5 100644 --- a/c3/index.d.ts +++ b/types/c3/index.d.ts @@ -145,7 +145,9 @@ declare namespace c3 { /** * Change step type for step chart. 'step', 'step-before' and 'step-after' can be used. */ - step_type?: string; + step?: { + type: string; + }; }; area?: { diff --git a/c3/tsconfig.json b/types/c3/tsconfig.json similarity index 100% rename from c3/tsconfig.json rename to types/c3/tsconfig.json diff --git a/cache-manager/cache-manager-tests.ts b/types/cache-manager/cache-manager-tests.ts similarity index 100% rename from cache-manager/cache-manager-tests.ts rename to types/cache-manager/cache-manager-tests.ts diff --git a/cache-manager/index.d.ts b/types/cache-manager/index.d.ts similarity index 100% rename from cache-manager/index.d.ts rename to types/cache-manager/index.d.ts diff --git a/cache-manager/tsconfig.json b/types/cache-manager/tsconfig.json similarity index 100% rename from cache-manager/tsconfig.json rename to types/cache-manager/tsconfig.json diff --git a/cachefactory/cachefactory-tests.ts b/types/cachefactory/cachefactory-tests.ts similarity index 100% rename from cachefactory/cachefactory-tests.ts rename to types/cachefactory/cachefactory-tests.ts diff --git a/cachefactory/index.d.ts b/types/cachefactory/index.d.ts similarity index 100% rename from cachefactory/index.d.ts rename to types/cachefactory/index.d.ts diff --git a/cachefactory/tsconfig.json b/types/cachefactory/tsconfig.json similarity index 100% rename from cachefactory/tsconfig.json rename to types/cachefactory/tsconfig.json diff --git a/cal-heatmap/cal-heatmap-tests.ts b/types/cal-heatmap/cal-heatmap-tests.ts similarity index 100% rename from cal-heatmap/cal-heatmap-tests.ts rename to types/cal-heatmap/cal-heatmap-tests.ts diff --git a/cal-heatmap/index.d.ts b/types/cal-heatmap/index.d.ts similarity index 100% rename from cal-heatmap/index.d.ts rename to types/cal-heatmap/index.d.ts diff --git a/cal-heatmap/tsconfig.json b/types/cal-heatmap/tsconfig.json similarity index 100% rename from cal-heatmap/tsconfig.json rename to types/cal-heatmap/tsconfig.json diff --git a/callsite/callsite-tests.ts b/types/callsite/callsite-tests.ts similarity index 100% rename from callsite/callsite-tests.ts rename to types/callsite/callsite-tests.ts diff --git a/callsite/index.d.ts b/types/callsite/index.d.ts similarity index 100% rename from callsite/index.d.ts rename to types/callsite/index.d.ts diff --git a/callsite/tsconfig.json b/types/callsite/tsconfig.json similarity index 100% rename from callsite/tsconfig.json rename to types/callsite/tsconfig.json diff --git a/calq/calq-tests.ts b/types/calq/calq-tests.ts similarity index 100% rename from calq/calq-tests.ts rename to types/calq/calq-tests.ts diff --git a/calq/index.d.ts b/types/calq/index.d.ts similarity index 100% rename from calq/index.d.ts rename to types/calq/index.d.ts diff --git a/calq/tsconfig.json b/types/calq/tsconfig.json similarity index 100% rename from calq/tsconfig.json rename to types/calq/tsconfig.json diff --git a/camelcase-keys/camelcase-keys-tests.ts b/types/camelcase-keys/camelcase-keys-tests.ts similarity index 100% rename from camelcase-keys/camelcase-keys-tests.ts rename to types/camelcase-keys/camelcase-keys-tests.ts diff --git a/camelcase-keys/index.d.ts b/types/camelcase-keys/index.d.ts similarity index 100% rename from camelcase-keys/index.d.ts rename to types/camelcase-keys/index.d.ts diff --git a/camelcase-keys/tsconfig.json b/types/camelcase-keys/tsconfig.json similarity index 100% rename from camelcase-keys/tsconfig.json rename to types/camelcase-keys/tsconfig.json diff --git a/camelcase-keys/tslint.json b/types/camelcase-keys/tslint.json similarity index 100% rename from camelcase-keys/tslint.json rename to types/camelcase-keys/tslint.json diff --git a/camelcase/camelcase-tests.ts b/types/camelcase/camelcase-tests.ts similarity index 100% rename from camelcase/camelcase-tests.ts rename to types/camelcase/camelcase-tests.ts diff --git a/camelcase/index.d.ts b/types/camelcase/index.d.ts similarity index 100% rename from camelcase/index.d.ts rename to types/camelcase/index.d.ts diff --git a/camelcase/tsconfig.json b/types/camelcase/tsconfig.json similarity index 100% rename from camelcase/tsconfig.json rename to types/camelcase/tsconfig.json diff --git a/camljs/camljs-tests.ts b/types/camljs/camljs-tests.ts similarity index 100% rename from camljs/camljs-tests.ts rename to types/camljs/camljs-tests.ts diff --git a/camljs/index.d.ts b/types/camljs/index.d.ts similarity index 100% rename from camljs/index.d.ts rename to types/camljs/index.d.ts diff --git a/camljs/tsconfig.json b/types/camljs/tsconfig.json similarity index 100% rename from camljs/tsconfig.json rename to types/camljs/tsconfig.json diff --git a/camo/camo-tests.ts b/types/camo/camo-tests.ts similarity index 100% rename from camo/camo-tests.ts rename to types/camo/camo-tests.ts diff --git a/camo/index.d.ts b/types/camo/index.d.ts similarity index 100% rename from camo/index.d.ts rename to types/camo/index.d.ts diff --git a/camo/tsconfig.json b/types/camo/tsconfig.json similarity index 100% rename from camo/tsconfig.json rename to types/camo/tsconfig.json diff --git a/cannon/cannon-tests.ts b/types/cannon/cannon-tests.ts similarity index 100% rename from cannon/cannon-tests.ts rename to types/cannon/cannon-tests.ts diff --git a/cannon/index.d.ts b/types/cannon/index.d.ts similarity index 100% rename from cannon/index.d.ts rename to types/cannon/index.d.ts diff --git a/cannon/tsconfig.json b/types/cannon/tsconfig.json similarity index 100% rename from cannon/tsconfig.json rename to types/cannon/tsconfig.json diff --git a/canvas-gauges/canvas-gauges-tests.ts b/types/canvas-gauges/canvas-gauges-tests.ts similarity index 100% rename from canvas-gauges/canvas-gauges-tests.ts rename to types/canvas-gauges/canvas-gauges-tests.ts diff --git a/canvas-gauges/index.d.ts b/types/canvas-gauges/index.d.ts similarity index 100% rename from canvas-gauges/index.d.ts rename to types/canvas-gauges/index.d.ts diff --git a/canvas-gauges/tsconfig.json b/types/canvas-gauges/tsconfig.json similarity index 100% rename from canvas-gauges/tsconfig.json rename to types/canvas-gauges/tsconfig.json diff --git a/canvasjs/canvasjs-tests.ts b/types/canvasjs/canvasjs-tests.ts similarity index 100% rename from canvasjs/canvasjs-tests.ts rename to types/canvasjs/canvasjs-tests.ts diff --git a/canvasjs/index.d.ts b/types/canvasjs/index.d.ts similarity index 100% rename from canvasjs/index.d.ts rename to types/canvasjs/index.d.ts diff --git a/canvasjs/tsconfig.json b/types/canvasjs/tsconfig.json similarity index 100% rename from canvasjs/tsconfig.json rename to types/canvasjs/tsconfig.json diff --git a/cash/index.d.ts b/types/cash/index.d.ts similarity index 100% rename from cash/index.d.ts rename to types/cash/index.d.ts diff --git a/cash/tsconfig.json b/types/cash/tsconfig.json similarity index 100% rename from cash/tsconfig.json rename to types/cash/tsconfig.json diff --git a/casperjs/index.d.ts b/types/casperjs/index.d.ts similarity index 99% rename from casperjs/index.d.ts rename to types/casperjs/index.d.ts index f252509af3..e8388d17c7 100644 --- a/casperjs/index.d.ts +++ b/types/casperjs/index.d.ts @@ -39,7 +39,7 @@ export class Casper { download(url: string, target?: string, method?: string, data?: any): Casper; each(array: T[], fn: (this: Casper, item: T, index: number) => void): Casper; echo(message: string, style?: string): Casper; - evaluate(fn: () => T, ...args: any[]): T + evaluate(fn: (...args: any[]) => T, ...args: any[]): T evaluateOrDie(fn: () => any, message?: string, status?: number): Casper; exit(status?: number): Casper; exists(selector: string): boolean; diff --git a/casperjs/tsconfig.json b/types/casperjs/tsconfig.json similarity index 100% rename from casperjs/tsconfig.json rename to types/casperjs/tsconfig.json diff --git a/cassandra-driver/cassandra-driver-tests.ts b/types/cassandra-driver/cassandra-driver-tests.ts similarity index 100% rename from cassandra-driver/cassandra-driver-tests.ts rename to types/cassandra-driver/cassandra-driver-tests.ts diff --git a/cassandra-driver/index.d.ts b/types/cassandra-driver/index.d.ts similarity index 100% rename from cassandra-driver/index.d.ts rename to types/cassandra-driver/index.d.ts diff --git a/cassandra-driver/tsconfig.json b/types/cassandra-driver/tsconfig.json similarity index 100% rename from cassandra-driver/tsconfig.json rename to types/cassandra-driver/tsconfig.json diff --git a/cbor/cbor-tests.ts b/types/cbor/cbor-tests.ts similarity index 100% rename from cbor/cbor-tests.ts rename to types/cbor/cbor-tests.ts diff --git a/cbor/index.d.ts b/types/cbor/index.d.ts similarity index 100% rename from cbor/index.d.ts rename to types/cbor/index.d.ts diff --git a/cbor/tsconfig.json b/types/cbor/tsconfig.json similarity index 100% rename from cbor/tsconfig.json rename to types/cbor/tsconfig.json diff --git a/chai-as-promised/chai-as-promised-tests.ts b/types/chai-as-promised/chai-as-promised-tests.ts similarity index 99% rename from chai-as-promised/chai-as-promised-tests.ts rename to types/chai-as-promised/chai-as-promised-tests.ts index d9f681769b..7dceef924a 100644 --- a/chai-as-promised/chai-as-promised-tests.ts +++ b/types/chai-as-promised/chai-as-promised-tests.ts @@ -1,6 +1,5 @@ import chai = require('chai'); import chaiAsPromised = require('chai-as-promised'); -import Q = require('q'); chai.use(chaiAsPromised); @@ -45,7 +44,7 @@ thenableNum.should.be.fulfilled.then(function () { thenableNum.should.equal("after"); }).should.notify(() => console.log('done')); -Q.all([ +Promise.all([ thenableNum.should.become("happy"), thenableNum.should.eventually.have.property("fun times"), thenableNum.should.be.rejectedWith(TypeError, "only joyful types are allowed") diff --git a/chai-as-promised/index.d.ts b/types/chai-as-promised/index.d.ts similarity index 100% rename from chai-as-promised/index.d.ts rename to types/chai-as-promised/index.d.ts diff --git a/chai-as-promised/tsconfig.json b/types/chai-as-promised/tsconfig.json similarity index 100% rename from chai-as-promised/tsconfig.json rename to types/chai-as-promised/tsconfig.json diff --git a/chai-datetime/chai-datetime-tests.ts b/types/chai-datetime/chai-datetime-tests.ts similarity index 100% rename from chai-datetime/chai-datetime-tests.ts rename to types/chai-datetime/chai-datetime-tests.ts diff --git a/chai-datetime/index.d.ts b/types/chai-datetime/index.d.ts similarity index 100% rename from chai-datetime/index.d.ts rename to types/chai-datetime/index.d.ts diff --git a/chai-datetime/tsconfig.json b/types/chai-datetime/tsconfig.json similarity index 100% rename from chai-datetime/tsconfig.json rename to types/chai-datetime/tsconfig.json diff --git a/chai-dom/chai-dom-tests.ts b/types/chai-dom/chai-dom-tests.ts similarity index 100% rename from chai-dom/chai-dom-tests.ts rename to types/chai-dom/chai-dom-tests.ts diff --git a/chai-dom/index.d.ts b/types/chai-dom/index.d.ts similarity index 100% rename from chai-dom/index.d.ts rename to types/chai-dom/index.d.ts diff --git a/chai-dom/tsconfig.json b/types/chai-dom/tsconfig.json similarity index 100% rename from chai-dom/tsconfig.json rename to types/chai-dom/tsconfig.json diff --git a/chai-enzyme/chai-enzyme-tests.tsx b/types/chai-enzyme/chai-enzyme-tests.tsx similarity index 100% rename from chai-enzyme/chai-enzyme-tests.tsx rename to types/chai-enzyme/chai-enzyme-tests.tsx diff --git a/chai-enzyme/index.d.ts b/types/chai-enzyme/index.d.ts similarity index 100% rename from chai-enzyme/index.d.ts rename to types/chai-enzyme/index.d.ts diff --git a/chai-enzyme/tsconfig.json b/types/chai-enzyme/tsconfig.json similarity index 100% rename from chai-enzyme/tsconfig.json rename to types/chai-enzyme/tsconfig.json diff --git a/chai-fuzzy/chai-fuzzy-tests.ts b/types/chai-fuzzy/chai-fuzzy-tests.ts similarity index 100% rename from chai-fuzzy/chai-fuzzy-tests.ts rename to types/chai-fuzzy/chai-fuzzy-tests.ts diff --git a/chai-fuzzy/index.d.ts b/types/chai-fuzzy/index.d.ts similarity index 100% rename from chai-fuzzy/index.d.ts rename to types/chai-fuzzy/index.d.ts diff --git a/chai-fuzzy/tsconfig.json b/types/chai-fuzzy/tsconfig.json similarity index 100% rename from chai-fuzzy/tsconfig.json rename to types/chai-fuzzy/tsconfig.json diff --git a/chai-http/chai-http-tests.ts b/types/chai-http/chai-http-tests.ts similarity index 100% rename from chai-http/chai-http-tests.ts rename to types/chai-http/chai-http-tests.ts diff --git a/chai-http/index.d.ts b/types/chai-http/index.d.ts similarity index 100% rename from chai-http/index.d.ts rename to types/chai-http/index.d.ts diff --git a/chai-http/tsconfig.json b/types/chai-http/tsconfig.json similarity index 100% rename from chai-http/tsconfig.json rename to types/chai-http/tsconfig.json diff --git a/chai-jquery/chai-jquery-tests.ts b/types/chai-jquery/chai-jquery-tests.ts similarity index 100% rename from chai-jquery/chai-jquery-tests.ts rename to types/chai-jquery/chai-jquery-tests.ts diff --git a/chai-jquery/index.d.ts b/types/chai-jquery/index.d.ts similarity index 100% rename from chai-jquery/index.d.ts rename to types/chai-jquery/index.d.ts diff --git a/chai-jquery/tsconfig.json b/types/chai-jquery/tsconfig.json similarity index 100% rename from chai-jquery/tsconfig.json rename to types/chai-jquery/tsconfig.json diff --git a/chai-json-schema/chai-json-schema-tests.ts b/types/chai-json-schema/chai-json-schema-tests.ts similarity index 99% rename from chai-json-schema/chai-json-schema-tests.ts rename to types/chai-json-schema/chai-json-schema-tests.ts index 5d4715a76e..7273ac60cc 100644 --- a/chai-json-schema/chai-json-schema-tests.ts +++ b/types/chai-json-schema/chai-json-schema-tests.ts @@ -65,4 +65,3 @@ const data2 = [true, 123]; expect(chai.tv4.validate(data1, schema)).to.be.true; expect(chai.tv4.validate(data2, schema)).to.be.false; - diff --git a/chai-json-schema/index.d.ts b/types/chai-json-schema/index.d.ts similarity index 87% rename from chai-json-schema/index.d.ts rename to types/chai-json-schema/index.d.ts index 1498510f9f..69aec8bec7 100644 --- a/chai-json-schema/index.d.ts +++ b/types/chai-json-schema/index.d.ts @@ -9,16 +9,16 @@ import tv4 = require('tv4'); declare global { namespace Chai { - export interface Assert { + interface Assert { jsonSchema(value: any, schema: any, msg?: string): void; notJsonSchema(value: any, schema: any, msg?: string): void; } - export interface LanguageChains { + interface LanguageChains { jsonSchema(schema: any, msg?: string): void; } - export interface ChaiStatic { + interface ChaiStatic { tv4: tv4.TV4; } } diff --git a/chai-json-schema/tsconfig.json b/types/chai-json-schema/tsconfig.json similarity index 100% rename from chai-json-schema/tsconfig.json rename to types/chai-json-schema/tsconfig.json diff --git a/chai-json-schema/tslint.json b/types/chai-json-schema/tslint.json similarity index 100% rename from chai-json-schema/tslint.json rename to types/chai-json-schema/tslint.json diff --git a/chai-oequal/chai-oequal-tests.ts b/types/chai-oequal/chai-oequal-tests.ts similarity index 100% rename from chai-oequal/chai-oequal-tests.ts rename to types/chai-oequal/chai-oequal-tests.ts diff --git a/chai-oequal/index.d.ts b/types/chai-oequal/index.d.ts similarity index 100% rename from chai-oequal/index.d.ts rename to types/chai-oequal/index.d.ts diff --git a/chai-oequal/tsconfig.json b/types/chai-oequal/tsconfig.json similarity index 100% rename from chai-oequal/tsconfig.json rename to types/chai-oequal/tsconfig.json diff --git a/chai-oequal/tslint.json b/types/chai-oequal/tslint.json similarity index 100% rename from chai-oequal/tslint.json rename to types/chai-oequal/tslint.json diff --git a/chai-spies/chai-spies-tests.ts b/types/chai-spies/chai-spies-tests.ts similarity index 100% rename from chai-spies/chai-spies-tests.ts rename to types/chai-spies/chai-spies-tests.ts diff --git a/chai-spies/index.d.ts b/types/chai-spies/index.d.ts similarity index 100% rename from chai-spies/index.d.ts rename to types/chai-spies/index.d.ts diff --git a/chai-spies/tsconfig.json b/types/chai-spies/tsconfig.json similarity index 100% rename from chai-spies/tsconfig.json rename to types/chai-spies/tsconfig.json diff --git a/chai-string/chai-string-tests.ts b/types/chai-string/chai-string-tests.ts similarity index 100% rename from chai-string/chai-string-tests.ts rename to types/chai-string/chai-string-tests.ts diff --git a/chai-string/index.d.ts b/types/chai-string/index.d.ts similarity index 100% rename from chai-string/index.d.ts rename to types/chai-string/index.d.ts diff --git a/chai-string/tsconfig.json b/types/chai-string/tsconfig.json similarity index 100% rename from chai-string/tsconfig.json rename to types/chai-string/tsconfig.json diff --git a/chai-subset/chai-subset-tests.ts b/types/chai-subset/chai-subset-tests.ts similarity index 100% rename from chai-subset/chai-subset-tests.ts rename to types/chai-subset/chai-subset-tests.ts diff --git a/chai-subset/index.d.ts b/types/chai-subset/index.d.ts similarity index 100% rename from chai-subset/index.d.ts rename to types/chai-subset/index.d.ts diff --git a/chai-subset/tsconfig.json b/types/chai-subset/tsconfig.json similarity index 100% rename from chai-subset/tsconfig.json rename to types/chai-subset/tsconfig.json diff --git a/chai-subset/tslint.json b/types/chai-subset/tslint.json similarity index 100% rename from chai-subset/tslint.json rename to types/chai-subset/tslint.json diff --git a/chai-things/chai-things-tests.ts b/types/chai-things/chai-things-tests.ts similarity index 100% rename from chai-things/chai-things-tests.ts rename to types/chai-things/chai-things-tests.ts diff --git a/chai-things/index.d.ts b/types/chai-things/index.d.ts similarity index 100% rename from chai-things/index.d.ts rename to types/chai-things/index.d.ts diff --git a/chai-things/tsconfig.json b/types/chai-things/tsconfig.json similarity index 100% rename from chai-things/tsconfig.json rename to types/chai-things/tsconfig.json diff --git a/chai-xml/chai-xml-tests.ts b/types/chai-xml/chai-xml-tests.ts similarity index 100% rename from chai-xml/chai-xml-tests.ts rename to types/chai-xml/chai-xml-tests.ts diff --git a/chai-xml/index.d.ts b/types/chai-xml/index.d.ts similarity index 100% rename from chai-xml/index.d.ts rename to types/chai-xml/index.d.ts diff --git a/chai-xml/tsconfig.json b/types/chai-xml/tsconfig.json similarity index 100% rename from chai-xml/tsconfig.json rename to types/chai-xml/tsconfig.json diff --git a/chai-xml/tslint.json b/types/chai-xml/tslint.json similarity index 100% rename from chai-xml/tslint.json rename to types/chai-xml/tslint.json diff --git a/chai/chai-tests.ts b/types/chai/chai-tests.ts similarity index 100% rename from chai/chai-tests.ts rename to types/chai/chai-tests.ts diff --git a/chai/index.d.ts b/types/chai/index.d.ts similarity index 100% rename from chai/index.d.ts rename to types/chai/index.d.ts diff --git a/chai/tsconfig.json b/types/chai/tsconfig.json similarity index 100% rename from chai/tsconfig.json rename to types/chai/tsconfig.json diff --git a/chai/v2/index.d.ts b/types/chai/v2/index.d.ts similarity index 100% rename from chai/v2/index.d.ts rename to types/chai/v2/index.d.ts diff --git a/chai/v2/tsconfig.json b/types/chai/v2/tsconfig.json similarity index 100% rename from chai/v2/tsconfig.json rename to types/chai/v2/tsconfig.json diff --git a/chalk/chalk-tests.ts b/types/chalk/chalk-tests.ts similarity index 100% rename from chalk/chalk-tests.ts rename to types/chalk/chalk-tests.ts diff --git a/chalk/index.d.ts b/types/chalk/index.d.ts similarity index 100% rename from chalk/index.d.ts rename to types/chalk/index.d.ts diff --git a/chalk/tsconfig.json b/types/chalk/tsconfig.json similarity index 100% rename from chalk/tsconfig.json rename to types/chalk/tsconfig.json diff --git a/chance/chance-tests.ts b/types/chance/chance-tests.ts similarity index 100% rename from chance/chance-tests.ts rename to types/chance/chance-tests.ts diff --git a/chance/index.d.ts b/types/chance/index.d.ts similarity index 100% rename from chance/index.d.ts rename to types/chance/index.d.ts diff --git a/chance/tsconfig.json b/types/chance/tsconfig.json similarity index 100% rename from chance/tsconfig.json rename to types/chance/tsconfig.json diff --git a/change-emitter/change-emitter-tests.ts b/types/change-emitter/change-emitter-tests.ts similarity index 100% rename from change-emitter/change-emitter-tests.ts rename to types/change-emitter/change-emitter-tests.ts diff --git a/change-emitter/index.d.ts b/types/change-emitter/index.d.ts similarity index 100% rename from change-emitter/index.d.ts rename to types/change-emitter/index.d.ts diff --git a/change-emitter/tsconfig.json b/types/change-emitter/tsconfig.json similarity index 100% rename from change-emitter/tsconfig.json rename to types/change-emitter/tsconfig.json diff --git a/charm/charm-tests.ts b/types/charm/charm-tests.ts similarity index 100% rename from charm/charm-tests.ts rename to types/charm/charm-tests.ts diff --git a/charm/index.d.ts b/types/charm/index.d.ts similarity index 100% rename from charm/index.d.ts rename to types/charm/index.d.ts diff --git a/charm/tsconfig.json b/types/charm/tsconfig.json similarity index 100% rename from charm/tsconfig.json rename to types/charm/tsconfig.json diff --git a/charm/tslint.json b/types/charm/tslint.json similarity index 100% rename from charm/tslint.json rename to types/charm/tslint.json diff --git a/chart.js/chart.js-tests.ts b/types/chart.js/chart.js-tests.ts similarity index 100% rename from chart.js/chart.js-tests.ts rename to types/chart.js/chart.js-tests.ts diff --git a/chart.js/index.d.ts b/types/chart.js/index.d.ts similarity index 99% rename from chart.js/index.d.ts rename to types/chart.js/index.d.ts index 43192689c1..cad58a2aa8 100644 --- a/chart.js/index.d.ts +++ b/types/chart.js/index.d.ts @@ -413,16 +413,16 @@ declare namespace Chart { } export interface TimeScale extends ChartScales { - format?: string; displayFormats?: TimeDisplayFormat; isoWeekday?: boolean; max?: string; min?: string; parser?: string | ((arg: any) => any); - round?: string; + round?: TimeUnit; tooltipFormat?: string; unit?: TimeUnit; unitStepSize?: number; + minUnit?: TimeUnit; } export interface RadialLinearScale { diff --git a/chart.js/tsconfig.json b/types/chart.js/tsconfig.json similarity index 100% rename from chart.js/tsconfig.json rename to types/chart.js/tsconfig.json diff --git a/chartist/chartist-tests.ts b/types/chartist/chartist-tests.ts similarity index 100% rename from chartist/chartist-tests.ts rename to types/chartist/chartist-tests.ts diff --git a/chartist/index.d.ts b/types/chartist/index.d.ts similarity index 100% rename from chartist/index.d.ts rename to types/chartist/index.d.ts diff --git a/chartist/tsconfig.json b/types/chartist/tsconfig.json similarity index 100% rename from chartist/tsconfig.json rename to types/chartist/tsconfig.json diff --git a/chartjs/chartjs-tests.ts b/types/chartjs/chartjs-tests.ts similarity index 100% rename from chartjs/chartjs-tests.ts rename to types/chartjs/chartjs-tests.ts diff --git a/chartjs/index.d.ts b/types/chartjs/index.d.ts similarity index 100% rename from chartjs/index.d.ts rename to types/chartjs/index.d.ts diff --git a/chartjs/tsconfig.json b/types/chartjs/tsconfig.json similarity index 100% rename from chartjs/tsconfig.json rename to types/chartjs/tsconfig.json diff --git a/cheap-ruler/cheap-ruler-tests.ts b/types/cheap-ruler/cheap-ruler-tests.ts similarity index 100% rename from cheap-ruler/cheap-ruler-tests.ts rename to types/cheap-ruler/cheap-ruler-tests.ts diff --git a/cheap-ruler/index.d.ts b/types/cheap-ruler/index.d.ts similarity index 100% rename from cheap-ruler/index.d.ts rename to types/cheap-ruler/index.d.ts diff --git a/cheap-ruler/tsconfig.json b/types/cheap-ruler/tsconfig.json similarity index 100% rename from cheap-ruler/tsconfig.json rename to types/cheap-ruler/tsconfig.json diff --git a/checkstyle-formatter/index.d.ts b/types/checkstyle-formatter/index.d.ts similarity index 100% rename from checkstyle-formatter/index.d.ts rename to types/checkstyle-formatter/index.d.ts diff --git a/checkstyle-formatter/tsconfig.json b/types/checkstyle-formatter/tsconfig.json similarity index 100% rename from checkstyle-formatter/tsconfig.json rename to types/checkstyle-formatter/tsconfig.json diff --git a/checkstyle-formatter/tslint.json b/types/checkstyle-formatter/tslint.json similarity index 100% rename from checkstyle-formatter/tslint.json rename to types/checkstyle-formatter/tslint.json diff --git a/checksum/checksum-tests.ts b/types/checksum/checksum-tests.ts similarity index 100% rename from checksum/checksum-tests.ts rename to types/checksum/checksum-tests.ts diff --git a/checksum/index.d.ts b/types/checksum/index.d.ts similarity index 100% rename from checksum/index.d.ts rename to types/checksum/index.d.ts diff --git a/checksum/tsconfig.json b/types/checksum/tsconfig.json similarity index 100% rename from checksum/tsconfig.json rename to types/checksum/tsconfig.json diff --git a/cheerio/cheerio-tests.ts b/types/cheerio/cheerio-tests.ts similarity index 100% rename from cheerio/cheerio-tests.ts rename to types/cheerio/cheerio-tests.ts diff --git a/cheerio/index.d.ts b/types/cheerio/index.d.ts similarity index 100% rename from cheerio/index.d.ts rename to types/cheerio/index.d.ts diff --git a/cheerio/tsconfig.json b/types/cheerio/tsconfig.json similarity index 100% rename from cheerio/tsconfig.json rename to types/cheerio/tsconfig.json diff --git a/chocolatechipjs/chocolatechipjs-tests.ts b/types/chocolatechipjs/chocolatechipjs-tests.ts similarity index 100% rename from chocolatechipjs/chocolatechipjs-tests.ts rename to types/chocolatechipjs/chocolatechipjs-tests.ts diff --git a/chocolatechipjs/index.d.ts b/types/chocolatechipjs/index.d.ts similarity index 100% rename from chocolatechipjs/index.d.ts rename to types/chocolatechipjs/index.d.ts diff --git a/chocolatechipjs/tsconfig.json b/types/chocolatechipjs/tsconfig.json similarity index 100% rename from chocolatechipjs/tsconfig.json rename to types/chocolatechipjs/tsconfig.json diff --git a/types/chokidar/chokidar-tests.ts b/types/chokidar/chokidar-tests.ts new file mode 100644 index 0000000000..13e5fe6a90 --- /dev/null +++ b/types/chokidar/chokidar-tests.ts @@ -0,0 +1,57 @@ +import * as fs from 'fs'; +import chokidar = require('chokidar'); + +const watcher = chokidar.watch('file, dir, or glob', { + ignored: /[\/\\]\./, persistent: true +}); + +const log = console.log.bind(console); + +watcher + .on('add', (path: string) => { + log('File', path, 'has been added'); + }) + .on('addDir', (path: string) => { + log('Directory', path, 'has been added'); + }) + .on('change', (path: string) => { + log('File', path, 'has been changed'); + }) + .on('unlink', (path: string) => { + log('File', path, 'has been removed'); + }) + .on('unlinkDir', (path: string) => { + log('Directory', path, 'has been removed'); + }) + .on('error', (error: any) => { + log('Error happened', error); + }) + .on('ready', () => { + log('Initial scan complete. Ready for changes.'); + }) + .on('raw', (event: string, path: string, details: any) => { + log('Raw event info:', event, path, details); + }); + +// 'add', 'addDir' and 'change' events also receive stat() results as second +// argument when available: http://nodejs.org/api/fs.html#fs_class_fs_stats +watcher.on('change', (path: string, stats: fs.Stats) => { + if (stats) { + console.log('File', path, 'changed size to', stats.size); + } +}); + +// Watch new files. +watcher.add('new-file'); +watcher.add(['new-file-2', 'new-file-3', '**/other-file*']); + +// Un-watch some files. +watcher.unwatch('new-file*'); + +// Only needed if watching is `persistent: true`. +watcher.close(); + +// One-liner +chokidar.watch('.', { ignored: /[\/\\]\./ }).on('all', (event: string, path: string) => { + console.log(event, path); +}); diff --git a/types/chokidar/index.d.ts b/types/chokidar/index.d.ts new file mode 100644 index 0000000000..dd0569656c --- /dev/null +++ b/types/chokidar/index.d.ts @@ -0,0 +1,160 @@ +// Type definitions for chokidar 1.6.1 +// Project: https://github.com/paulmillr/chokidar +// Definitions by: Stefan Steinhart , Felix Becker +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as fs from 'fs'; +import {EventEmitter} from 'events'; + +/** + * The object's keys are all the directories (using absolute paths unless the `cwd` option was + * used), and the values are arrays of the names of the items contained in each directory. + */ +export interface WatchedPaths { + [directory: string]: string[]; +} + +export class FSWatcher extends EventEmitter implements fs.FSWatcher { + + /** + * Add files, directories, or glob patterns for tracking. Takes an array of strings or just one + * string. + */ + add(paths: string | string[]): void; + + /** + * Stop watching files, directories, or glob patterns. Takes an array of strings or just one + * string. + */ + unwatch(paths: string | string[]): void; + + /** + * Returns an object representing all the paths on the file system being watched by this + * `FSWatcher` instance. The object's keys are all the directories (using absolute paths unless + * the `cwd` option was used), and the values are arrays of the names of the items contained in + * each directory. + */ + getWatched(): WatchedPaths; + + /** + * Removes all listeners from watched files. + */ + close(): void; +} + +export interface WatchOptions { + + /** + * Indicates whether the process should continue to run as long as files are being watched. If + * set to `false` when using `fsevents` to watch, no more events will be emitted after `ready`, + * even if the process continues to run. + */ + persistent?: boolean; + + /** + * ([anymatch](https://github.com/es128/anymatch)-compatible definition) Defines files/paths to + * be ignored. The whole relative or absolute path is tested, not just filename. If a function + * with two arguments is provided, it gets called twice per path - once with a single argument + * (the path), second time with two arguments (the path and the + * [`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) object of that path). + */ + ignored?: any; + + /** + * If set to `false` then `add`/`addDir` events are also emitted for matching paths while + * instantiating the watching as chokidar discovers these file paths (before the `ready` event). + */ + ignoreInitial?: boolean; + + /** + * When `false`, only the symlinks themselves will be watched for changes instead of following + * the link references and bubbling events through the link's path. + */ + followSymlinks?: boolean; + + /** + * The base directory from which watch `paths` are to be derived. Paths emitted with events will + * be relative to this. + */ + cwd?: string; + + /** + * Whether to use fs.watchFile (backed by polling), or fs.watch. If polling leads to high CPU + * utilization, consider setting this to `false`. It is typically necessary to **set this to + * `true` to successfully watch files over a network**, and it may be necessary to successfully + * watch files in other non-standard situations. Setting to `true` explicitly on OS X overrides + * the `useFsEvents` default. + */ + usePolling?: boolean; + + /** + * Whether to use the `fsevents` watching interface if available. When set to `true` explicitly + * and `fsevents` is available this supercedes the `usePolling` setting. When set to `false` on + * OS X, `usePolling: true` becomes the default. + */ + useFsEvents?: boolean; + + /** + * If relying upon the [`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) object that + * may get passed with `add`, `addDir`, and `change` events, set this to `true` to ensure it is + * provided even in cases where it wasn't already available from the underlying watch events. + */ + alwaysStat?: boolean; + + /** + * If set, limits how many levels of subdirectories will be traversed. + */ + depth?: number; + + /** + * Interval of file system polling. + */ + interval?: number; + + /** + * Interval of file system polling for binary files. ([see list of binary extensions](https://gi + * thub.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json)) + */ + binaryInterval?: number; + + /** + * Indicates whether to watch files that don't have read permissions if possible. If watching + * fails due to `EPERM` or `EACCES` with this set to `true`, the errors will be suppressed + * silently. + */ + ignorePermissionErrors?: boolean; + + /** + * `true` if `useFsEvents` and `usePolling` are `false`). Automatically filters out artifacts + * that occur when using editors that use "atomic writes" instead of writing directly to the + * source file. If a file is re-added within 100 ms of being deleted, Chokidar emits a `change` + * event rather than `unlink` then `add`. If the default of 100 ms does not work well for you, + * you can override it by setting `atomic` to a custom value, in milliseconds. + */ + atomic?: boolean | number; + + /** + * can be set to an object in order to adjust timing params: + */ + awaitWriteFinish?: AwaitWriteFinishOptions; +} + +export interface AwaitWriteFinishOptions { + + /** + * Amount of time in milliseconds for a file size to remain constant before emitting its event. + */ + stabilityThreshold?: number; + + /** + * File size polling interval. + */ + pollInterval?: number; +} + +/** + * produces an instance of `FSWatcher`. + */ +export function watch(paths: string | string[], options?: WatchOptions): FSWatcher; diff --git a/chokidar/tsconfig.json b/types/chokidar/tsconfig.json similarity index 100% rename from chokidar/tsconfig.json rename to types/chokidar/tsconfig.json diff --git a/chosen-js/chosen-js-tests.ts b/types/chosen-js/chosen-js-tests.ts similarity index 100% rename from chosen-js/chosen-js-tests.ts rename to types/chosen-js/chosen-js-tests.ts diff --git a/chosen-js/index.d.ts b/types/chosen-js/index.d.ts similarity index 100% rename from chosen-js/index.d.ts rename to types/chosen-js/index.d.ts diff --git a/chosen-js/tsconfig.json b/types/chosen-js/tsconfig.json similarity index 100% rename from chosen-js/tsconfig.json rename to types/chosen-js/tsconfig.json diff --git a/chroma-js/chroma-js-tests.ts b/types/chroma-js/chroma-js-tests.ts similarity index 100% rename from chroma-js/chroma-js-tests.ts rename to types/chroma-js/chroma-js-tests.ts diff --git a/chroma-js/index.d.ts b/types/chroma-js/index.d.ts similarity index 100% rename from chroma-js/index.d.ts rename to types/chroma-js/index.d.ts diff --git a/chroma-js/tsconfig.json b/types/chroma-js/tsconfig.json similarity index 100% rename from chroma-js/tsconfig.json rename to types/chroma-js/tsconfig.json diff --git a/chroma-js/v0/chroma-js-tests.ts b/types/chroma-js/v0/chroma-js-tests.ts similarity index 100% rename from chroma-js/v0/chroma-js-tests.ts rename to types/chroma-js/v0/chroma-js-tests.ts diff --git a/chroma-js/v0/index.d.ts b/types/chroma-js/v0/index.d.ts similarity index 100% rename from chroma-js/v0/index.d.ts rename to types/chroma-js/v0/index.d.ts diff --git a/chroma-js/v0/tsconfig.json b/types/chroma-js/v0/tsconfig.json similarity index 100% rename from chroma-js/v0/tsconfig.json rename to types/chroma-js/v0/tsconfig.json diff --git a/chrome/chrome-app.d.ts b/types/chrome/chrome-app.d.ts similarity index 100% rename from chrome/chrome-app.d.ts rename to types/chrome/chrome-app.d.ts diff --git a/chrome/chrome-cast.d.ts b/types/chrome/chrome-cast.d.ts similarity index 100% rename from chrome/chrome-cast.d.ts rename to types/chrome/chrome-cast.d.ts diff --git a/chrome/index.d.ts b/types/chrome/index.d.ts similarity index 99% rename from chrome/index.d.ts rename to types/chrome/index.d.ts index b7b6de0076..1b07c1c2e8 100644 --- a/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -5974,6 +5974,12 @@ declare namespace chrome.tabs { runAt?: string; /** Optional. JavaScript or CSS file to inject. */ file?: string; + /** + * Optional. + * The frame where the script or CSS should be injected. Defaults to 0 (the top-level frame). + * @since Chrome 39. + */ + frameId?: number; /** * Optional. * If matchAboutBlank is true, then the code is also injected in about:blank and about:srcdoc frames if your extension has access to its parent document. Code cannot be inserted in top-level about:-frames. By default it is false. @@ -6557,6 +6563,12 @@ declare namespace chrome.tabs { * @since Chrome 38. */ var onZoomChange: TabZoomChangeEvent; + + /** + * An ID which represents the absence of a browser tab. + * @since Chrome 46. + */ + var TAB_ID_NONE: -1; } //////////////////// diff --git a/chrome/test/chrome-app.ts b/types/chrome/test/chrome-app.ts similarity index 100% rename from chrome/test/chrome-app.ts rename to types/chrome/test/chrome-app.ts diff --git a/chrome/test/index.ts b/types/chrome/test/index.ts similarity index 94% rename from chrome/test/index.ts rename to types/chrome/test/index.ts index 3074b8a0c3..3da3f534be 100644 --- a/chrome/test/index.ts +++ b/types/chrome/test/index.ts @@ -194,6 +194,35 @@ function beforeRedditNavigation() { },{urls: ["http://*/*"], types: ["image"]}); } +// for chrome.tabs.InjectDetails.frameId +function executeScriptFramed () { + + const tabId = 123; + const frameId = 0; + + const code = "alert('hi');"; + + chrome.tabs.executeScript({frameId, code}); + chrome.tabs.insertCSS({frameId, code}); + + chrome.tabs.executeScript(tabId, {frameId, code}); + chrome.tabs.insertCSS(tabId, {frameId, code}); + +} + +// for chrome.tabs.TAB_ID_NONE +function realTabsOnly () { + chrome.webRequest.onBeforeRequest.addListener(function (details) { + if (details.tabId === chrome.tabs.TAB_ID_NONE) { + console.log("Request not related to a tab. %o", details); + return; + } + // ... + }, { + urls: [""] + }); +} + // contrived settings example function proxySettings() { chrome.proxy.settings.get({ incognito: true }, (details) => { diff --git a/chrome/tsconfig.json b/types/chrome/tsconfig.json similarity index 100% rename from chrome/tsconfig.json rename to types/chrome/tsconfig.json diff --git a/chui/chui-tests.ts b/types/chui/chui-tests.ts similarity index 100% rename from chui/chui-tests.ts rename to types/chui/chui-tests.ts diff --git a/chui/index.d.ts b/types/chui/index.d.ts similarity index 100% rename from chui/index.d.ts rename to types/chui/index.d.ts diff --git a/chui/tsconfig.json b/types/chui/tsconfig.json similarity index 100% rename from chui/tsconfig.json rename to types/chui/tsconfig.json diff --git a/chunked-dc/chunked-dc-tests.ts b/types/chunked-dc/chunked-dc-tests.ts similarity index 100% rename from chunked-dc/chunked-dc-tests.ts rename to types/chunked-dc/chunked-dc-tests.ts diff --git a/chunked-dc/index.d.ts b/types/chunked-dc/index.d.ts similarity index 100% rename from chunked-dc/index.d.ts rename to types/chunked-dc/index.d.ts diff --git a/chunked-dc/tsconfig.json b/types/chunked-dc/tsconfig.json similarity index 100% rename from chunked-dc/tsconfig.json rename to types/chunked-dc/tsconfig.json diff --git a/chunked-dc/tslint.json b/types/chunked-dc/tslint.json similarity index 100% rename from chunked-dc/tslint.json rename to types/chunked-dc/tslint.json diff --git a/circular-json/circular-json-tests.ts b/types/circular-json/circular-json-tests.ts similarity index 100% rename from circular-json/circular-json-tests.ts rename to types/circular-json/circular-json-tests.ts diff --git a/circular-json/index.d.ts b/types/circular-json/index.d.ts similarity index 100% rename from circular-json/index.d.ts rename to types/circular-json/index.d.ts diff --git a/circular-json/tsconfig.json b/types/circular-json/tsconfig.json similarity index 100% rename from circular-json/tsconfig.json rename to types/circular-json/tsconfig.json diff --git a/ckeditor/ckeditor-tests.ts b/types/ckeditor/ckeditor-tests.ts similarity index 100% rename from ckeditor/ckeditor-tests.ts rename to types/ckeditor/ckeditor-tests.ts diff --git a/ckeditor/index.d.ts b/types/ckeditor/index.d.ts similarity index 100% rename from ckeditor/index.d.ts rename to types/ckeditor/index.d.ts diff --git a/ckeditor/tsconfig.json b/types/ckeditor/tsconfig.json similarity index 100% rename from ckeditor/tsconfig.json rename to types/ckeditor/tsconfig.json diff --git a/clamp-js/clamp-js-tests.ts b/types/clamp-js/clamp-js-tests.ts old mode 100755 new mode 100644 similarity index 100% rename from clamp-js/clamp-js-tests.ts rename to types/clamp-js/clamp-js-tests.ts diff --git a/clamp-js/index.d.ts b/types/clamp-js/index.d.ts old mode 100755 new mode 100644 similarity index 82% rename from clamp-js/index.d.ts rename to types/clamp-js/index.d.ts index 2e86e544f7..2fa557bac6 --- a/clamp-js/index.d.ts +++ b/types/clamp-js/index.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace clamp { - export interface ClampOptions { + interface ClampOptions { clamp?: number|string; useNativeClamp?: boolean; splitOnChars?: string[]; @@ -13,9 +13,9 @@ declare namespace clamp { truncationHTML?: string | null; } - export interface ClampResponse { - 'original': string; - 'clamped': string; + interface ClampResponse { + original: string; + clamped: string; } } diff --git a/clamp-js/tsconfig.json b/types/clamp-js/tsconfig.json old mode 100755 new mode 100644 similarity index 100% rename from clamp-js/tsconfig.json rename to types/clamp-js/tsconfig.json diff --git a/clamp-js/tslint.json b/types/clamp-js/tslint.json similarity index 100% rename from clamp-js/tslint.json rename to types/clamp-js/tslint.json diff --git a/classnames/classnames-tests.ts b/types/classnames/classnames-tests.ts similarity index 100% rename from classnames/classnames-tests.ts rename to types/classnames/classnames-tests.ts diff --git a/classnames/index.d.ts b/types/classnames/index.d.ts similarity index 100% rename from classnames/index.d.ts rename to types/classnames/index.d.ts diff --git a/classnames/tsconfig.json b/types/classnames/tsconfig.json similarity index 100% rename from classnames/tsconfig.json rename to types/classnames/tsconfig.json diff --git a/cldrjs/UNUSED_FILES.txt b/types/cldrjs/UNUSED_FILES.txt similarity index 100% rename from cldrjs/UNUSED_FILES.txt rename to types/cldrjs/UNUSED_FILES.txt diff --git a/cldrjs/cldr.js-event.d.ts b/types/cldrjs/cldr.js-event.d.ts similarity index 100% rename from cldrjs/cldr.js-event.d.ts rename to types/cldrjs/cldr.js-event.d.ts diff --git a/cldrjs/cldr.js-supplemental.d.ts b/types/cldrjs/cldr.js-supplemental.d.ts similarity index 100% rename from cldrjs/cldr.js-supplemental.d.ts rename to types/cldrjs/cldr.js-supplemental.d.ts diff --git a/cldrjs/index.d.ts b/types/cldrjs/index.d.ts similarity index 100% rename from cldrjs/index.d.ts rename to types/cldrjs/index.d.ts diff --git a/cldrjs/test/event.ts b/types/cldrjs/test/event.ts similarity index 100% rename from cldrjs/test/event.ts rename to types/cldrjs/test/event.ts diff --git a/cldrjs/test/index.ts b/types/cldrjs/test/index.ts similarity index 100% rename from cldrjs/test/index.ts rename to types/cldrjs/test/index.ts diff --git a/cldrjs/test/supplemental.ts b/types/cldrjs/test/supplemental.ts similarity index 100% rename from cldrjs/test/supplemental.ts rename to types/cldrjs/test/supplemental.ts diff --git a/cldrjs/tsconfig.json b/types/cldrjs/tsconfig.json similarity index 100% rename from cldrjs/tsconfig.json rename to types/cldrjs/tsconfig.json diff --git a/clean-css/clean-css-tests.ts b/types/clean-css/clean-css-tests.ts similarity index 100% rename from clean-css/clean-css-tests.ts rename to types/clean-css/clean-css-tests.ts diff --git a/clean-css/index.d.ts b/types/clean-css/index.d.ts similarity index 100% rename from clean-css/index.d.ts rename to types/clean-css/index.d.ts diff --git a/clean-css/tsconfig.json b/types/clean-css/tsconfig.json similarity index 100% rename from clean-css/tsconfig.json rename to types/clean-css/tsconfig.json diff --git a/cli-color/cli-color-tests.ts b/types/cli-color/cli-color-tests.ts similarity index 100% rename from cli-color/cli-color-tests.ts rename to types/cli-color/cli-color-tests.ts diff --git a/cli-color/index.d.ts b/types/cli-color/index.d.ts similarity index 100% rename from cli-color/index.d.ts rename to types/cli-color/index.d.ts diff --git a/cli-color/tsconfig.json b/types/cli-color/tsconfig.json similarity index 100% rename from cli-color/tsconfig.json rename to types/cli-color/tsconfig.json diff --git a/cli/cli-tests.ts b/types/cli/cli-tests.ts similarity index 100% rename from cli/cli-tests.ts rename to types/cli/cli-tests.ts diff --git a/cli/index.d.ts b/types/cli/index.d.ts similarity index 100% rename from cli/index.d.ts rename to types/cli/index.d.ts diff --git a/cli/tsconfig.json b/types/cli/tsconfig.json similarity index 100% rename from cli/tsconfig.json rename to types/cli/tsconfig.json diff --git a/cliff/cliff-tests.ts b/types/cliff/cliff-tests.ts similarity index 100% rename from cliff/cliff-tests.ts rename to types/cliff/cliff-tests.ts diff --git a/cliff/index.d.ts b/types/cliff/index.d.ts similarity index 100% rename from cliff/index.d.ts rename to types/cliff/index.d.ts diff --git a/cliff/tsconfig.json b/types/cliff/tsconfig.json similarity index 100% rename from cliff/tsconfig.json rename to types/cliff/tsconfig.json diff --git a/clipboard-js/clipboard-js-tests.ts b/types/clipboard-js/clipboard-js-tests.ts similarity index 100% rename from clipboard-js/clipboard-js-tests.ts rename to types/clipboard-js/clipboard-js-tests.ts diff --git a/clipboard-js/index.d.ts b/types/clipboard-js/index.d.ts similarity index 100% rename from clipboard-js/index.d.ts rename to types/clipboard-js/index.d.ts diff --git a/clipboard-js/tsconfig.json b/types/clipboard-js/tsconfig.json similarity index 100% rename from clipboard-js/tsconfig.json rename to types/clipboard-js/tsconfig.json diff --git a/clipboard/clipboard-tests.ts b/types/clipboard/clipboard-tests.ts similarity index 100% rename from clipboard/clipboard-tests.ts rename to types/clipboard/clipboard-tests.ts diff --git a/clipboard/index.d.ts b/types/clipboard/index.d.ts similarity index 100% rename from clipboard/index.d.ts rename to types/clipboard/index.d.ts diff --git a/clipboard/tsconfig.json b/types/clipboard/tsconfig.json similarity index 100% rename from clipboard/tsconfig.json rename to types/clipboard/tsconfig.json diff --git a/clipboard/tslint.json b/types/clipboard/tslint.json similarity index 100% rename from clipboard/tslint.json rename to types/clipboard/tslint.json diff --git a/clndr/clndr-tests.ts b/types/clndr/clndr-tests.ts similarity index 100% rename from clndr/clndr-tests.ts rename to types/clndr/clndr-tests.ts diff --git a/clndr/index.d.ts b/types/clndr/index.d.ts similarity index 100% rename from clndr/index.d.ts rename to types/clndr/index.d.ts diff --git a/clndr/package.json b/types/clndr/package.json similarity index 100% rename from clndr/package.json rename to types/clndr/package.json diff --git a/clndr/tsconfig.json b/types/clndr/tsconfig.json similarity index 100% rename from clndr/tsconfig.json rename to types/clndr/tsconfig.json diff --git a/clndr/tslint.json b/types/clndr/tslint.json similarity index 100% rename from clndr/tslint.json rename to types/clndr/tslint.json diff --git a/clone/clone-tests.ts b/types/clone/clone-tests.ts similarity index 100% rename from clone/clone-tests.ts rename to types/clone/clone-tests.ts diff --git a/clone/index.d.ts b/types/clone/index.d.ts similarity index 100% rename from clone/index.d.ts rename to types/clone/index.d.ts diff --git a/clone/tsconfig.json b/types/clone/tsconfig.json similarity index 100% rename from clone/tsconfig.json rename to types/clone/tsconfig.json diff --git a/closure-compiler/closure-compiler-tests.ts b/types/closure-compiler/closure-compiler-tests.ts similarity index 100% rename from closure-compiler/closure-compiler-tests.ts rename to types/closure-compiler/closure-compiler-tests.ts diff --git a/closure-compiler/index.d.ts b/types/closure-compiler/index.d.ts similarity index 100% rename from closure-compiler/index.d.ts rename to types/closure-compiler/index.d.ts diff --git a/closure-compiler/tsconfig.json b/types/closure-compiler/tsconfig.json similarity index 100% rename from closure-compiler/tsconfig.json rename to types/closure-compiler/tsconfig.json diff --git a/co-body/co-body-tests.ts b/types/co-body/co-body-tests.ts similarity index 100% rename from co-body/co-body-tests.ts rename to types/co-body/co-body-tests.ts diff --git a/co-body/index.d.ts b/types/co-body/index.d.ts similarity index 100% rename from co-body/index.d.ts rename to types/co-body/index.d.ts diff --git a/co-body/tsconfig.json b/types/co-body/tsconfig.json similarity index 100% rename from co-body/tsconfig.json rename to types/co-body/tsconfig.json diff --git a/co-views/co-views-tests.ts b/types/co-views/co-views-tests.ts similarity index 100% rename from co-views/co-views-tests.ts rename to types/co-views/co-views-tests.ts diff --git a/co-views/index.d.ts b/types/co-views/index.d.ts similarity index 96% rename from co-views/index.d.ts rename to types/co-views/index.d.ts index 5df2238c12..3eda7191b1 100644 --- a/co-views/index.d.ts +++ b/types/co-views/index.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace CoViews { - export interface Options { + interface Options { /** * default extname */ diff --git a/co-views/tsconfig.json b/types/co-views/tsconfig.json similarity index 100% rename from co-views/tsconfig.json rename to types/co-views/tsconfig.json diff --git a/co-views/tslint.json b/types/co-views/tslint.json similarity index 100% rename from co-views/tslint.json rename to types/co-views/tslint.json diff --git a/code/code-tests.ts b/types/code/code-tests.ts similarity index 100% rename from code/code-tests.ts rename to types/code/code-tests.ts diff --git a/code/index.d.ts b/types/code/index.d.ts similarity index 100% rename from code/index.d.ts rename to types/code/index.d.ts diff --git a/code/tsconfig.json b/types/code/tsconfig.json similarity index 100% rename from code/tsconfig.json rename to types/code/tsconfig.json diff --git a/code/tslint.json b/types/code/tslint.json similarity index 100% rename from code/tslint.json rename to types/code/tslint.json diff --git a/codemirror/codemirror-matchbrackets.d.ts b/types/codemirror/codemirror-matchbrackets.d.ts similarity index 100% rename from codemirror/codemirror-matchbrackets.d.ts rename to types/codemirror/codemirror-matchbrackets.d.ts diff --git a/codemirror/codemirror-runmode.d.ts b/types/codemirror/codemirror-runmode.d.ts similarity index 100% rename from codemirror/codemirror-runmode.d.ts rename to types/codemirror/codemirror-runmode.d.ts diff --git a/codemirror/codemirror-showhint.d.ts b/types/codemirror/codemirror-showhint.d.ts similarity index 100% rename from codemirror/codemirror-showhint.d.ts rename to types/codemirror/codemirror-showhint.d.ts diff --git a/codemirror/index.d.ts b/types/codemirror/index.d.ts similarity index 100% rename from codemirror/index.d.ts rename to types/codemirror/index.d.ts diff --git a/codemirror/searchcursor.d.ts b/types/codemirror/searchcursor.d.ts similarity index 100% rename from codemirror/searchcursor.d.ts rename to types/codemirror/searchcursor.d.ts diff --git a/codemirror/test/index.ts b/types/codemirror/test/index.ts similarity index 100% rename from codemirror/test/index.ts rename to types/codemirror/test/index.ts diff --git a/codemirror/test/matchbrackets.ts b/types/codemirror/test/matchbrackets.ts similarity index 100% rename from codemirror/test/matchbrackets.ts rename to types/codemirror/test/matchbrackets.ts diff --git a/codemirror/test/runmode.ts b/types/codemirror/test/runmode.ts similarity index 100% rename from codemirror/test/runmode.ts rename to types/codemirror/test/runmode.ts diff --git a/codemirror/test/searchcursor.ts b/types/codemirror/test/searchcursor.ts similarity index 100% rename from codemirror/test/searchcursor.ts rename to types/codemirror/test/searchcursor.ts diff --git a/codemirror/test/showhint.ts b/types/codemirror/test/showhint.ts similarity index 100% rename from codemirror/test/showhint.ts rename to types/codemirror/test/showhint.ts diff --git a/codemirror/tsconfig.json b/types/codemirror/tsconfig.json similarity index 100% rename from codemirror/tsconfig.json rename to types/codemirror/tsconfig.json diff --git a/codependency/codependency-tests.ts b/types/codependency/codependency-tests.ts similarity index 100% rename from codependency/codependency-tests.ts rename to types/codependency/codependency-tests.ts diff --git a/codependency/index.d.ts b/types/codependency/index.d.ts similarity index 100% rename from codependency/index.d.ts rename to types/codependency/index.d.ts diff --git a/codependency/tsconfig.json b/types/codependency/tsconfig.json similarity index 100% rename from codependency/tsconfig.json rename to types/codependency/tsconfig.json diff --git a/codependency/tslint.json b/types/codependency/tslint.json similarity index 100% rename from codependency/tslint.json rename to types/codependency/tslint.json diff --git a/coffeeify/coffeeify-tests.ts b/types/coffeeify/coffeeify-tests.ts similarity index 100% rename from coffeeify/coffeeify-tests.ts rename to types/coffeeify/coffeeify-tests.ts diff --git a/coffeeify/index.d.ts b/types/coffeeify/index.d.ts similarity index 100% rename from coffeeify/index.d.ts rename to types/coffeeify/index.d.ts diff --git a/coffeeify/tsconfig.json b/types/coffeeify/tsconfig.json similarity index 100% rename from coffeeify/tsconfig.json rename to types/coffeeify/tsconfig.json diff --git a/coinstring/coinstring-tests.ts b/types/coinstring/coinstring-tests.ts similarity index 100% rename from coinstring/coinstring-tests.ts rename to types/coinstring/coinstring-tests.ts diff --git a/coinstring/index.d.ts b/types/coinstring/index.d.ts similarity index 100% rename from coinstring/index.d.ts rename to types/coinstring/index.d.ts diff --git a/coinstring/tsconfig.json b/types/coinstring/tsconfig.json similarity index 100% rename from coinstring/tsconfig.json rename to types/coinstring/tsconfig.json diff --git a/coinstring/tslint.json b/types/coinstring/tslint.json similarity index 100% rename from coinstring/tslint.json rename to types/coinstring/tslint.json diff --git a/color/color-tests.ts b/types/color/color-tests.ts similarity index 100% rename from color/color-tests.ts rename to types/color/color-tests.ts diff --git a/color/index.d.ts b/types/color/index.d.ts similarity index 100% rename from color/index.d.ts rename to types/color/index.d.ts diff --git a/color/tsconfig.json b/types/color/tsconfig.json similarity index 100% rename from color/tsconfig.json rename to types/color/tsconfig.json diff --git a/color/v0/color-tests.ts b/types/color/v0/color-tests.ts similarity index 100% rename from color/v0/color-tests.ts rename to types/color/v0/color-tests.ts diff --git a/color/v0/index.d.ts b/types/color/v0/index.d.ts similarity index 100% rename from color/v0/index.d.ts rename to types/color/v0/index.d.ts diff --git a/color/v0/tsconfig.json b/types/color/v0/tsconfig.json similarity index 100% rename from color/v0/tsconfig.json rename to types/color/v0/tsconfig.json diff --git a/colorbrewer/colorbrewer-tests.ts b/types/colorbrewer/colorbrewer-tests.ts similarity index 100% rename from colorbrewer/colorbrewer-tests.ts rename to types/colorbrewer/colorbrewer-tests.ts diff --git a/colorbrewer/index.d.ts b/types/colorbrewer/index.d.ts similarity index 100% rename from colorbrewer/index.d.ts rename to types/colorbrewer/index.d.ts diff --git a/colorbrewer/tsconfig.json b/types/colorbrewer/tsconfig.json similarity index 100% rename from colorbrewer/tsconfig.json rename to types/colorbrewer/tsconfig.json diff --git a/colors/colors-tests.ts b/types/colors/colors-tests.ts similarity index 100% rename from colors/colors-tests.ts rename to types/colors/colors-tests.ts diff --git a/colors/index.d.ts b/types/colors/index.d.ts similarity index 100% rename from colors/index.d.ts rename to types/colors/index.d.ts diff --git a/colors/safe.d.ts b/types/colors/safe.d.ts similarity index 100% rename from colors/safe.d.ts rename to types/colors/safe.d.ts diff --git a/colors/tsconfig.json b/types/colors/tsconfig.json similarity index 100% rename from colors/tsconfig.json rename to types/colors/tsconfig.json diff --git a/colors/tslint.json b/types/colors/tslint.json similarity index 100% rename from colors/tslint.json rename to types/colors/tslint.json diff --git a/com.darktalker.cordova.screenshot/com.darktalker.cordova.screenshot-tests.ts b/types/com.darktalker.cordova.screenshot/com.darktalker.cordova.screenshot-tests.ts similarity index 100% rename from com.darktalker.cordova.screenshot/com.darktalker.cordova.screenshot-tests.ts rename to types/com.darktalker.cordova.screenshot/com.darktalker.cordova.screenshot-tests.ts diff --git a/com.darktalker.cordova.screenshot/index.d.ts b/types/com.darktalker.cordova.screenshot/index.d.ts similarity index 100% rename from com.darktalker.cordova.screenshot/index.d.ts rename to types/com.darktalker.cordova.screenshot/index.d.ts diff --git a/com.darktalker.cordova.screenshot/tsconfig.json b/types/com.darktalker.cordova.screenshot/tsconfig.json similarity index 100% rename from com.darktalker.cordova.screenshot/tsconfig.json rename to types/com.darktalker.cordova.screenshot/tsconfig.json diff --git a/combined-stream/combined-stream-tests.ts b/types/combined-stream/combined-stream-tests.ts similarity index 100% rename from combined-stream/combined-stream-tests.ts rename to types/combined-stream/combined-stream-tests.ts diff --git a/combined-stream/index.d.ts b/types/combined-stream/index.d.ts similarity index 91% rename from combined-stream/index.d.ts rename to types/combined-stream/index.d.ts index cada758701..271814a4af 100644 --- a/combined-stream/index.d.ts +++ b/types/combined-stream/index.d.ts @@ -43,14 +43,14 @@ declare class CombinedStream extends Stream implements CombinedStream.Options { } declare namespace CombinedStream { - export interface Options { + interface Options { maxDataSize?: number; pauseStreams?: boolean; } - export function create(options?: Options): CombinedStream; + function create(options?: Options): CombinedStream; - export function isStreamLike(stream: any): stream is Stream; + function isStreamLike(stream: any): stream is Stream; } export = CombinedStream; diff --git a/combined-stream/tsconfig.json b/types/combined-stream/tsconfig.json similarity index 100% rename from combined-stream/tsconfig.json rename to types/combined-stream/tsconfig.json diff --git a/combined-stream/tslint.json b/types/combined-stream/tslint.json similarity index 100% rename from combined-stream/tslint.json rename to types/combined-stream/tslint.json diff --git a/combokeys/combokeys-tests.ts b/types/combokeys/combokeys-tests.ts similarity index 100% rename from combokeys/combokeys-tests.ts rename to types/combokeys/combokeys-tests.ts diff --git a/combokeys/index.d.ts b/types/combokeys/index.d.ts similarity index 100% rename from combokeys/index.d.ts rename to types/combokeys/index.d.ts diff --git a/combokeys/tsconfig.json b/types/combokeys/tsconfig.json similarity index 100% rename from combokeys/tsconfig.json rename to types/combokeys/tsconfig.json diff --git a/cometd/index.d.ts b/types/cometd/index.d.ts similarity index 100% rename from cometd/index.d.ts rename to types/cometd/index.d.ts diff --git a/cometd/tsconfig.json b/types/cometd/tsconfig.json similarity index 100% rename from cometd/tsconfig.json rename to types/cometd/tsconfig.json diff --git a/commander/commander-tests.ts b/types/commander/commander-tests.ts similarity index 100% rename from commander/commander-tests.ts rename to types/commander/commander-tests.ts diff --git a/commander/index.d.ts b/types/commander/index.d.ts similarity index 100% rename from commander/index.d.ts rename to types/commander/index.d.ts diff --git a/commander/tsconfig.json b/types/commander/tsconfig.json similarity index 100% rename from commander/tsconfig.json rename to types/commander/tsconfig.json diff --git a/commangular/commangular-mock.d.ts b/types/commangular/commangular-mock.d.ts similarity index 100% rename from commangular/commangular-mock.d.ts rename to types/commangular/commangular-mock.d.ts diff --git a/commangular/index.d.ts b/types/commangular/index.d.ts similarity index 100% rename from commangular/index.d.ts rename to types/commangular/index.d.ts diff --git a/commangular/tsconfig.json b/types/commangular/tsconfig.json similarity index 100% rename from commangular/tsconfig.json rename to types/commangular/tsconfig.json diff --git a/comment-json/comment-json-tests.ts b/types/comment-json/comment-json-tests.ts similarity index 100% rename from comment-json/comment-json-tests.ts rename to types/comment-json/comment-json-tests.ts diff --git a/comment-json/index.d.ts b/types/comment-json/index.d.ts similarity index 100% rename from comment-json/index.d.ts rename to types/comment-json/index.d.ts diff --git a/comment-json/tsconfig.json b/types/comment-json/tsconfig.json similarity index 100% rename from comment-json/tsconfig.json rename to types/comment-json/tsconfig.json diff --git a/comment-json/tslint.json b/types/comment-json/tslint.json similarity index 100% rename from comment-json/tslint.json rename to types/comment-json/tslint.json diff --git a/common-tags/common-tags-tests.ts b/types/common-tags/common-tags-tests.ts similarity index 100% rename from common-tags/common-tags-tests.ts rename to types/common-tags/common-tags-tests.ts diff --git a/common-tags/index.d.ts b/types/common-tags/index.d.ts similarity index 100% rename from common-tags/index.d.ts rename to types/common-tags/index.d.ts diff --git a/common-tags/tsconfig.json b/types/common-tags/tsconfig.json similarity index 100% rename from common-tags/tsconfig.json rename to types/common-tags/tsconfig.json diff --git a/commonmark/commonmark-tests.ts b/types/commonmark/commonmark-tests.ts similarity index 100% rename from commonmark/commonmark-tests.ts rename to types/commonmark/commonmark-tests.ts diff --git a/commonmark/index.d.ts b/types/commonmark/index.d.ts similarity index 100% rename from commonmark/index.d.ts rename to types/commonmark/index.d.ts diff --git a/commonmark/tsconfig.json b/types/commonmark/tsconfig.json similarity index 100% rename from commonmark/tsconfig.json rename to types/commonmark/tsconfig.json diff --git a/compare-version/compare-version-tests.ts b/types/compare-version/compare-version-tests.ts similarity index 100% rename from compare-version/compare-version-tests.ts rename to types/compare-version/compare-version-tests.ts diff --git a/compare-version/index.d.ts b/types/compare-version/index.d.ts similarity index 100% rename from compare-version/index.d.ts rename to types/compare-version/index.d.ts diff --git a/compare-version/tsconfig.json b/types/compare-version/tsconfig.json similarity index 100% rename from compare-version/tsconfig.json rename to types/compare-version/tsconfig.json diff --git a/complex/complex-tests.ts b/types/complex/complex-tests.ts similarity index 100% rename from complex/complex-tests.ts rename to types/complex/complex-tests.ts diff --git a/complex/index.d.ts b/types/complex/index.d.ts similarity index 100% rename from complex/index.d.ts rename to types/complex/index.d.ts diff --git a/complex/tsconfig.json b/types/complex/tsconfig.json similarity index 100% rename from complex/tsconfig.json rename to types/complex/tsconfig.json diff --git a/component-emitter/component-emitter-tests.ts b/types/component-emitter/component-emitter-tests.ts similarity index 100% rename from component-emitter/component-emitter-tests.ts rename to types/component-emitter/component-emitter-tests.ts diff --git a/component-emitter/index.d.ts b/types/component-emitter/index.d.ts similarity index 100% rename from component-emitter/index.d.ts rename to types/component-emitter/index.d.ts diff --git a/component-emitter/tsconfig.json b/types/component-emitter/tsconfig.json similarity index 100% rename from component-emitter/tsconfig.json rename to types/component-emitter/tsconfig.json diff --git a/compose-function/compose-function-tests.ts b/types/compose-function/compose-function-tests.ts similarity index 100% rename from compose-function/compose-function-tests.ts rename to types/compose-function/compose-function-tests.ts diff --git a/compose-function/index.d.ts b/types/compose-function/index.d.ts similarity index 100% rename from compose-function/index.d.ts rename to types/compose-function/index.d.ts diff --git a/compose-function/tsconfig.json b/types/compose-function/tsconfig.json similarity index 100% rename from compose-function/tsconfig.json rename to types/compose-function/tsconfig.json diff --git a/compression-webpack-plugin/compression-webpack-plugin-tests.ts b/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts similarity index 100% rename from compression-webpack-plugin/compression-webpack-plugin-tests.ts rename to types/compression-webpack-plugin/compression-webpack-plugin-tests.ts diff --git a/compression-webpack-plugin/index.d.ts b/types/compression-webpack-plugin/index.d.ts similarity index 97% rename from compression-webpack-plugin/index.d.ts rename to types/compression-webpack-plugin/index.d.ts index 536a77b8e9..4f2453e3b1 100644 --- a/compression-webpack-plugin/index.d.ts +++ b/types/compression-webpack-plugin/index.d.ts @@ -12,7 +12,7 @@ declare class CompressionPlugin extends Plugin { } declare namespace CompressionPlugin { - export interface Options { + interface Options { asset?: string; algorithm?: string; test?: RegExp | RegExp[]; diff --git a/compression-webpack-plugin/tsconfig.json b/types/compression-webpack-plugin/tsconfig.json similarity index 100% rename from compression-webpack-plugin/tsconfig.json rename to types/compression-webpack-plugin/tsconfig.json diff --git a/compression-webpack-plugin/tslint.json b/types/compression-webpack-plugin/tslint.json similarity index 100% rename from compression-webpack-plugin/tslint.json rename to types/compression-webpack-plugin/tslint.json diff --git a/compression/compression-tests.ts b/types/compression/compression-tests.ts similarity index 100% rename from compression/compression-tests.ts rename to types/compression/compression-tests.ts diff --git a/compression/index.d.ts b/types/compression/index.d.ts similarity index 100% rename from compression/index.d.ts rename to types/compression/index.d.ts diff --git a/compression/tsconfig.json b/types/compression/tsconfig.json similarity index 100% rename from compression/tsconfig.json rename to types/compression/tsconfig.json diff --git a/concat-stream/concat-stream-tests.ts b/types/concat-stream/concat-stream-tests.ts similarity index 100% rename from concat-stream/concat-stream-tests.ts rename to types/concat-stream/concat-stream-tests.ts diff --git a/concat-stream/index.d.ts b/types/concat-stream/index.d.ts similarity index 100% rename from concat-stream/index.d.ts rename to types/concat-stream/index.d.ts diff --git a/concat-stream/tsconfig.json b/types/concat-stream/tsconfig.json similarity index 100% rename from concat-stream/tsconfig.json rename to types/concat-stream/tsconfig.json diff --git a/concat-stream/tslint.json b/types/concat-stream/tslint.json similarity index 100% rename from concat-stream/tslint.json rename to types/concat-stream/tslint.json diff --git a/concaveman/concaveman-tests.ts b/types/concaveman/concaveman-tests.ts similarity index 100% rename from concaveman/concaveman-tests.ts rename to types/concaveman/concaveman-tests.ts diff --git a/concaveman/index.d.ts b/types/concaveman/index.d.ts similarity index 100% rename from concaveman/index.d.ts rename to types/concaveman/index.d.ts diff --git a/concaveman/tsconfig.json b/types/concaveman/tsconfig.json similarity index 100% rename from concaveman/tsconfig.json rename to types/concaveman/tsconfig.json diff --git a/conf/conf-tests.ts b/types/conf/conf-tests.ts similarity index 100% rename from conf/conf-tests.ts rename to types/conf/conf-tests.ts diff --git a/conf/index.d.ts b/types/conf/index.d.ts similarity index 100% rename from conf/index.d.ts rename to types/conf/index.d.ts diff --git a/conf/tsconfig.json b/types/conf/tsconfig.json similarity index 100% rename from conf/tsconfig.json rename to types/conf/tsconfig.json diff --git a/conf/tslint.json b/types/conf/tslint.json similarity index 100% rename from conf/tslint.json rename to types/conf/tslint.json diff --git a/confidence/confidence-tests.ts b/types/confidence/confidence-tests.ts similarity index 100% rename from confidence/confidence-tests.ts rename to types/confidence/confidence-tests.ts diff --git a/confidence/index.d.ts b/types/confidence/index.d.ts similarity index 100% rename from confidence/index.d.ts rename to types/confidence/index.d.ts diff --git a/confidence/tsconfig.json b/types/confidence/tsconfig.json similarity index 100% rename from confidence/tsconfig.json rename to types/confidence/tsconfig.json diff --git a/config/config-tests.ts b/types/config/config-tests.ts similarity index 100% rename from config/config-tests.ts rename to types/config/config-tests.ts diff --git a/config/index.d.ts b/types/config/index.d.ts similarity index 100% rename from config/index.d.ts rename to types/config/index.d.ts diff --git a/config/tsconfig.json b/types/config/tsconfig.json similarity index 100% rename from config/tsconfig.json rename to types/config/tsconfig.json diff --git a/configstore/configstore-tests.ts b/types/configstore/configstore-tests.ts similarity index 59% rename from configstore/configstore-tests.ts rename to types/configstore/configstore-tests.ts index 724dbe9a38..ffd04e31a7 100644 --- a/configstore/configstore-tests.ts +++ b/types/configstore/configstore-tests.ts @@ -1,12 +1,10 @@ - import Configstore = require('configstore'); -var cs = new Configstore('foo'); +const cs = new Configstore('foo'); -var value: any; -var key: string; -var num: number; -var bool: any; -var object: any; +let value: any; +let key: string; +let num: number; +let object: any; cs.set(key, value); value = cs.get(key); diff --git a/configstore/index.d.ts b/types/configstore/index.d.ts similarity index 97% rename from configstore/index.d.ts rename to types/configstore/index.d.ts index 628a4a1d6c..2617f2bce0 100644 --- a/configstore/index.d.ts +++ b/types/configstore/index.d.ts @@ -65,7 +65,7 @@ declare class Configstore { } declare namespace Configstore { - export interface ConfigstoreOptions { + interface ConfigstoreOptions { globalConfigPath?: boolean; } } diff --git a/configstore/tsconfig.json b/types/configstore/tsconfig.json similarity index 100% rename from configstore/tsconfig.json rename to types/configstore/tsconfig.json diff --git a/configstore/tslint.json b/types/configstore/tslint.json similarity index 100% rename from configstore/tslint.json rename to types/configstore/tslint.json diff --git a/confit/confit-tests.ts b/types/confit/confit-tests.ts similarity index 100% rename from confit/confit-tests.ts rename to types/confit/confit-tests.ts diff --git a/confit/index.d.ts b/types/confit/index.d.ts similarity index 100% rename from confit/index.d.ts rename to types/confit/index.d.ts diff --git a/confit/tsconfig.json b/types/confit/tsconfig.json similarity index 100% rename from confit/tsconfig.json rename to types/confit/tsconfig.json diff --git a/connect-ensure-login/connect-ensure-login-tests.ts b/types/connect-ensure-login/connect-ensure-login-tests.ts similarity index 98% rename from connect-ensure-login/connect-ensure-login-tests.ts rename to types/connect-ensure-login/connect-ensure-login-tests.ts index 68ce1a76a2..708f76a9ba 100644 --- a/connect-ensure-login/connect-ensure-login-tests.ts +++ b/types/connect-ensure-login/connect-ensure-login-tests.ts @@ -10,4 +10,4 @@ login.ensureLoggedOut(); login.ensureLoggedOut("/"); login.ensureLoggedOut({ redirectTo: "/", -}); \ No newline at end of file +}); diff --git a/connect-ensure-login/index.d.ts b/types/connect-ensure-login/index.d.ts similarity index 91% rename from connect-ensure-login/index.d.ts rename to types/connect-ensure-login/index.d.ts index d542f63a90..fb1716abf9 100644 --- a/connect-ensure-login/index.d.ts +++ b/types/connect-ensure-login/index.d.ts @@ -47,7 +47,7 @@ interface LoggedOutOptions { * ensureLoggedIn({ redirectTo: '/session/new', setReturnTo: false }), * function(req, res) { ... }); */ -export declare function ensureLoggedIn(options?: LoggedInOptions | string): RequestHandler; +export function ensureLoggedIn(options?: LoggedInOptions | string): RequestHandler; /** * Ensure that no user is logged in before proceeding to next route middleware. @@ -70,4 +70,4 @@ export declare function ensureLoggedIn(options?: LoggedInOptions | string): Requ * ensureLoggedOut({ redirectTo: '/home' }), * function(req, res) { ... }); */ -export declare function ensureLoggedOut(options?: LoggedOutOptions | string): RequestHandler; \ No newline at end of file +export function ensureLoggedOut(options?: LoggedOutOptions | string): RequestHandler; diff --git a/connect-ensure-login/tsconfig.json b/types/connect-ensure-login/tsconfig.json similarity index 100% rename from connect-ensure-login/tsconfig.json rename to types/connect-ensure-login/tsconfig.json diff --git a/connect-ensure-login/tslint.json b/types/connect-ensure-login/tslint.json similarity index 100% rename from connect-ensure-login/tslint.json rename to types/connect-ensure-login/tslint.json diff --git a/connect-flash/connect-flash-tests.ts b/types/connect-flash/connect-flash-tests.ts similarity index 100% rename from connect-flash/connect-flash-tests.ts rename to types/connect-flash/connect-flash-tests.ts diff --git a/connect-flash/index.d.ts b/types/connect-flash/index.d.ts similarity index 100% rename from connect-flash/index.d.ts rename to types/connect-flash/index.d.ts diff --git a/connect-flash/tsconfig.json b/types/connect-flash/tsconfig.json similarity index 100% rename from connect-flash/tsconfig.json rename to types/connect-flash/tsconfig.json diff --git a/connect-livereload/connect-livereload-tests.ts b/types/connect-livereload/connect-livereload-tests.ts similarity index 100% rename from connect-livereload/connect-livereload-tests.ts rename to types/connect-livereload/connect-livereload-tests.ts diff --git a/connect-livereload/index.d.ts b/types/connect-livereload/index.d.ts similarity index 100% rename from connect-livereload/index.d.ts rename to types/connect-livereload/index.d.ts diff --git a/connect-livereload/tsconfig.json b/types/connect-livereload/tsconfig.json similarity index 100% rename from connect-livereload/tsconfig.json rename to types/connect-livereload/tsconfig.json diff --git a/connect-modrewrite/connect-modrewrite-tests.ts b/types/connect-modrewrite/connect-modrewrite-tests.ts similarity index 100% rename from connect-modrewrite/connect-modrewrite-tests.ts rename to types/connect-modrewrite/connect-modrewrite-tests.ts diff --git a/connect-modrewrite/index.d.ts b/types/connect-modrewrite/index.d.ts similarity index 100% rename from connect-modrewrite/index.d.ts rename to types/connect-modrewrite/index.d.ts diff --git a/connect-modrewrite/tsconfig.json b/types/connect-modrewrite/tsconfig.json similarity index 100% rename from connect-modrewrite/tsconfig.json rename to types/connect-modrewrite/tsconfig.json diff --git a/connect-mongo/connect-mongo-tests.ts b/types/connect-mongo/connect-mongo-tests.ts similarity index 100% rename from connect-mongo/connect-mongo-tests.ts rename to types/connect-mongo/connect-mongo-tests.ts diff --git a/connect-mongo/index.d.ts b/types/connect-mongo/index.d.ts similarity index 100% rename from connect-mongo/index.d.ts rename to types/connect-mongo/index.d.ts diff --git a/connect-mongo/tsconfig.json b/types/connect-mongo/tsconfig.json similarity index 100% rename from connect-mongo/tsconfig.json rename to types/connect-mongo/tsconfig.json diff --git a/connect-redis/connect-redis-tests.ts b/types/connect-redis/connect-redis-tests.ts similarity index 100% rename from connect-redis/connect-redis-tests.ts rename to types/connect-redis/connect-redis-tests.ts diff --git a/connect-redis/index.d.ts b/types/connect-redis/index.d.ts similarity index 100% rename from connect-redis/index.d.ts rename to types/connect-redis/index.d.ts diff --git a/connect-redis/tsconfig.json b/types/connect-redis/tsconfig.json similarity index 100% rename from connect-redis/tsconfig.json rename to types/connect-redis/tsconfig.json diff --git a/connect-slashes/connect-slashes-tests.ts b/types/connect-slashes/connect-slashes-tests.ts similarity index 100% rename from connect-slashes/connect-slashes-tests.ts rename to types/connect-slashes/connect-slashes-tests.ts diff --git a/connect-slashes/index.d.ts b/types/connect-slashes/index.d.ts similarity index 100% rename from connect-slashes/index.d.ts rename to types/connect-slashes/index.d.ts diff --git a/connect-slashes/tsconfig.json b/types/connect-slashes/tsconfig.json similarity index 100% rename from connect-slashes/tsconfig.json rename to types/connect-slashes/tsconfig.json diff --git a/connect-timeout/connect-timeout-tests.ts b/types/connect-timeout/connect-timeout-tests.ts similarity index 100% rename from connect-timeout/connect-timeout-tests.ts rename to types/connect-timeout/connect-timeout-tests.ts diff --git a/connect-timeout/index.d.ts b/types/connect-timeout/index.d.ts similarity index 100% rename from connect-timeout/index.d.ts rename to types/connect-timeout/index.d.ts diff --git a/connect-timeout/tsconfig.json b/types/connect-timeout/tsconfig.json similarity index 100% rename from connect-timeout/tsconfig.json rename to types/connect-timeout/tsconfig.json diff --git a/connect/connect-tests.ts b/types/connect/connect-tests.ts similarity index 100% rename from connect/connect-tests.ts rename to types/connect/connect-tests.ts diff --git a/connect/index.d.ts b/types/connect/index.d.ts similarity index 100% rename from connect/index.d.ts rename to types/connect/index.d.ts diff --git a/connect/tsconfig.json b/types/connect/tsconfig.json similarity index 100% rename from connect/tsconfig.json rename to types/connect/tsconfig.json diff --git a/console-stamp/console-stamp-tests.ts b/types/console-stamp/console-stamp-tests.ts similarity index 100% rename from console-stamp/console-stamp-tests.ts rename to types/console-stamp/console-stamp-tests.ts diff --git a/console-stamp/index.d.ts b/types/console-stamp/index.d.ts similarity index 100% rename from console-stamp/index.d.ts rename to types/console-stamp/index.d.ts diff --git a/console-stamp/tsconfig.json b/types/console-stamp/tsconfig.json similarity index 100% rename from console-stamp/tsconfig.json rename to types/console-stamp/tsconfig.json diff --git a/consolidate/consolidate-tests.ts b/types/consolidate/consolidate-tests.ts similarity index 100% rename from consolidate/consolidate-tests.ts rename to types/consolidate/consolidate-tests.ts diff --git a/consolidate/index.d.ts b/types/consolidate/index.d.ts similarity index 100% rename from consolidate/index.d.ts rename to types/consolidate/index.d.ts diff --git a/consolidate/tsconfig.json b/types/consolidate/tsconfig.json similarity index 100% rename from consolidate/tsconfig.json rename to types/consolidate/tsconfig.json diff --git a/consul/consul-tests.ts b/types/consul/consul-tests.ts similarity index 100% rename from consul/consul-tests.ts rename to types/consul/consul-tests.ts diff --git a/consul/index.d.ts b/types/consul/index.d.ts similarity index 100% rename from consul/index.d.ts rename to types/consul/index.d.ts diff --git a/consul/tsconfig.json b/types/consul/tsconfig.json similarity index 100% rename from consul/tsconfig.json rename to types/consul/tsconfig.json diff --git a/content-disposition/content-disposition-tests.ts b/types/content-disposition/content-disposition-tests.ts similarity index 100% rename from content-disposition/content-disposition-tests.ts rename to types/content-disposition/content-disposition-tests.ts diff --git a/content-disposition/index.d.ts b/types/content-disposition/index.d.ts similarity index 77% rename from content-disposition/index.d.ts rename to types/content-disposition/index.d.ts index 4d0bbd8d94..31e60c1041 100644 --- a/content-disposition/index.d.ts +++ b/types/content-disposition/index.d.ts @@ -4,17 +4,17 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace contentDisposition { - export interface ContentDisposition { + interface ContentDisposition { type: string; parameters: any; } - export interface Options { + interface Options { type?: string; fallback?: string | boolean; } - export function parse(contentDispositionHeader: string): ContentDisposition; + function parse(contentDispositionHeader: string): ContentDisposition; } declare function contentDisposition(filename?: string, options?: contentDisposition.Options): string; diff --git a/content-disposition/tsconfig.json b/types/content-disposition/tsconfig.json similarity index 100% rename from content-disposition/tsconfig.json rename to types/content-disposition/tsconfig.json diff --git a/content-disposition/tslint.json b/types/content-disposition/tslint.json similarity index 100% rename from content-disposition/tslint.json rename to types/content-disposition/tslint.json diff --git a/content-type/content-type-tests.ts b/types/content-type/content-type-tests.ts similarity index 100% rename from content-type/content-type-tests.ts rename to types/content-type/content-type-tests.ts diff --git a/content-type/index.d.ts b/types/content-type/index.d.ts similarity index 100% rename from content-type/index.d.ts rename to types/content-type/index.d.ts diff --git a/content-type/tsconfig.json b/types/content-type/tsconfig.json similarity index 100% rename from content-type/tsconfig.json rename to types/content-type/tsconfig.json diff --git a/contentful-resolve-response/contentful-resolve-response-tests.ts b/types/contentful-resolve-response/contentful-resolve-response-tests.ts similarity index 100% rename from contentful-resolve-response/contentful-resolve-response-tests.ts rename to types/contentful-resolve-response/contentful-resolve-response-tests.ts diff --git a/contentful-resolve-response/index.d.ts b/types/contentful-resolve-response/index.d.ts similarity index 100% rename from contentful-resolve-response/index.d.ts rename to types/contentful-resolve-response/index.d.ts diff --git a/contentful-resolve-response/tsconfig.json b/types/contentful-resolve-response/tsconfig.json similarity index 100% rename from contentful-resolve-response/tsconfig.json rename to types/contentful-resolve-response/tsconfig.json diff --git a/contextjs/contextjs-tests.ts b/types/contextjs/contextjs-tests.ts similarity index 100% rename from contextjs/contextjs-tests.ts rename to types/contextjs/contextjs-tests.ts diff --git a/contextjs/index.d.ts b/types/contextjs/index.d.ts similarity index 100% rename from contextjs/index.d.ts rename to types/contextjs/index.d.ts diff --git a/contextjs/tsconfig.json b/types/contextjs/tsconfig.json similarity index 100% rename from contextjs/tsconfig.json rename to types/contextjs/tsconfig.json diff --git a/continuation-local-storage/continuation-local-storage-tests.ts b/types/continuation-local-storage/continuation-local-storage-tests.ts similarity index 100% rename from continuation-local-storage/continuation-local-storage-tests.ts rename to types/continuation-local-storage/continuation-local-storage-tests.ts diff --git a/continuation-local-storage/index.d.ts b/types/continuation-local-storage/index.d.ts similarity index 100% rename from continuation-local-storage/index.d.ts rename to types/continuation-local-storage/index.d.ts diff --git a/continuation-local-storage/tsconfig.json b/types/continuation-local-storage/tsconfig.json similarity index 100% rename from continuation-local-storage/tsconfig.json rename to types/continuation-local-storage/tsconfig.json diff --git a/convert-source-map/convert-source-map-tests.ts b/types/convert-source-map/convert-source-map-tests.ts similarity index 100% rename from convert-source-map/convert-source-map-tests.ts rename to types/convert-source-map/convert-source-map-tests.ts diff --git a/convert-source-map/index.d.ts b/types/convert-source-map/index.d.ts similarity index 100% rename from convert-source-map/index.d.ts rename to types/convert-source-map/index.d.ts diff --git a/convert-source-map/tsconfig.json b/types/convert-source-map/tsconfig.json similarity index 100% rename from convert-source-map/tsconfig.json rename to types/convert-source-map/tsconfig.json diff --git a/convert-source-map/tslint.json b/types/convert-source-map/tslint.json similarity index 100% rename from convert-source-map/tslint.json rename to types/convert-source-map/tslint.json diff --git a/convict/convict-tests.ts b/types/convict/convict-tests.ts similarity index 100% rename from convict/convict-tests.ts rename to types/convict/convict-tests.ts diff --git a/convict/index.d.ts b/types/convict/index.d.ts similarity index 100% rename from convict/index.d.ts rename to types/convict/index.d.ts diff --git a/convict/tsconfig.json b/types/convict/tsconfig.json similarity index 100% rename from convict/tsconfig.json rename to types/convict/tsconfig.json diff --git a/cookie-parser/cookie-parser-tests.ts b/types/cookie-parser/cookie-parser-tests.ts similarity index 100% rename from cookie-parser/cookie-parser-tests.ts rename to types/cookie-parser/cookie-parser-tests.ts diff --git a/cookie-parser/index.d.ts b/types/cookie-parser/index.d.ts similarity index 100% rename from cookie-parser/index.d.ts rename to types/cookie-parser/index.d.ts diff --git a/cookie-parser/tsconfig.json b/types/cookie-parser/tsconfig.json similarity index 100% rename from cookie-parser/tsconfig.json rename to types/cookie-parser/tsconfig.json diff --git a/cookie-session/cookie-session-tests.ts b/types/cookie-session/cookie-session-tests.ts similarity index 100% rename from cookie-session/cookie-session-tests.ts rename to types/cookie-session/cookie-session-tests.ts diff --git a/cookie-session/index.d.ts b/types/cookie-session/index.d.ts similarity index 100% rename from cookie-session/index.d.ts rename to types/cookie-session/index.d.ts diff --git a/cookie-session/tsconfig.json b/types/cookie-session/tsconfig.json similarity index 100% rename from cookie-session/tsconfig.json rename to types/cookie-session/tsconfig.json diff --git a/cookie-signature/cookie-signature-tests.ts b/types/cookie-signature/cookie-signature-tests.ts similarity index 100% rename from cookie-signature/cookie-signature-tests.ts rename to types/cookie-signature/cookie-signature-tests.ts diff --git a/cookie-signature/index.d.ts b/types/cookie-signature/index.d.ts similarity index 100% rename from cookie-signature/index.d.ts rename to types/cookie-signature/index.d.ts diff --git a/cookie-signature/tsconfig.json b/types/cookie-signature/tsconfig.json similarity index 100% rename from cookie-signature/tsconfig.json rename to types/cookie-signature/tsconfig.json diff --git a/cookie-signature/tslint.json b/types/cookie-signature/tslint.json similarity index 100% rename from cookie-signature/tslint.json rename to types/cookie-signature/tslint.json diff --git a/cookie/cookie-tests.ts b/types/cookie/cookie-tests.ts similarity index 100% rename from cookie/cookie-tests.ts rename to types/cookie/cookie-tests.ts diff --git a/cookie/index.d.ts b/types/cookie/index.d.ts similarity index 100% rename from cookie/index.d.ts rename to types/cookie/index.d.ts diff --git a/cookie/tsconfig.json b/types/cookie/tsconfig.json similarity index 100% rename from cookie/tsconfig.json rename to types/cookie/tsconfig.json diff --git a/cookiejs/cookiejs-tests.ts b/types/cookiejs/cookiejs-tests.ts similarity index 100% rename from cookiejs/cookiejs-tests.ts rename to types/cookiejs/cookiejs-tests.ts diff --git a/cookiejs/index.d.ts b/types/cookiejs/index.d.ts similarity index 100% rename from cookiejs/index.d.ts rename to types/cookiejs/index.d.ts diff --git a/cookiejs/tsconfig.json b/types/cookiejs/tsconfig.json similarity index 100% rename from cookiejs/tsconfig.json rename to types/cookiejs/tsconfig.json diff --git a/cookies/cookies-tests.ts b/types/cookies/cookies-tests.ts similarity index 99% rename from cookies/cookies-tests.ts rename to types/cookies/cookies-tests.ts index 5a2ad1e4a7..112246907c 100644 --- a/cookies/cookies-tests.ts +++ b/types/cookies/cookies-tests.ts @@ -36,4 +36,4 @@ const server = http.createServer((req, res) => { "tampered expected: undefined\n\n" + "tampered: " + tampered + "\n\n" ); -}); \ No newline at end of file +}); diff --git a/cookies/index.d.ts b/types/cookies/index.d.ts similarity index 94% rename from cookies/index.d.ts rename to types/cookies/index.d.ts index 390890bb4a..55feb7ec7d 100644 --- a/cookies/index.d.ts +++ b/types/cookies/index.d.ts @@ -7,7 +7,7 @@ import { IncomingMessage, ServerResponse } from 'http'; import * as Keygrip from 'keygrip'; -declare interface Cookies { +interface Cookies { secure: boolean; request: IncomingMessage; response: ServerResponse; @@ -27,27 +27,26 @@ declare interface Cookies { set(name: string, value?: string, opts?: Cookies.SetOption): this; } - declare namespace Cookies { /** * for backward-compatibility */ - export type ICookies = Cookies; + type ICookies = Cookies; /** * for backward-compatibility */ - export type IOptions = SetOption; + type IOptions = SetOption; - export interface Option { + interface Option { keys: string[] | Keygrip; secure?: boolean; } - export interface GetOption { + interface GetOption { signed: boolean; } - export interface SetOption { + interface SetOption { /** * a number representing the milliseconds from Date.now() for expiry */ @@ -97,9 +96,9 @@ declare namespace Cookies { overwrite?: boolean; } - export type CookieAttr = SetOption; + type CookieAttr = SetOption; - export interface Cookie { + interface Cookie { name: string; value: string; /** @@ -119,7 +118,7 @@ declare namespace Cookies { } } -declare interface CookiesFunction { +interface CookiesFunction { (request: IncomingMessage, response: ServerResponse, options?: Cookies.Option): Cookies; /** * "options" array of key strings is deprecated, provide using options {"keys": keygrip} diff --git a/cookies/tsconfig.json b/types/cookies/tsconfig.json similarity index 100% rename from cookies/tsconfig.json rename to types/cookies/tsconfig.json diff --git a/cookies/tslint.json b/types/cookies/tslint.json similarity index 100% rename from cookies/tslint.json rename to types/cookies/tslint.json diff --git a/copy-paste/copy-paste-tests.ts b/types/copy-paste/copy-paste-tests.ts similarity index 100% rename from copy-paste/copy-paste-tests.ts rename to types/copy-paste/copy-paste-tests.ts diff --git a/copy-paste/index.d.ts b/types/copy-paste/index.d.ts similarity index 100% rename from copy-paste/index.d.ts rename to types/copy-paste/index.d.ts diff --git a/copy-paste/tsconfig.json b/types/copy-paste/tsconfig.json similarity index 100% rename from copy-paste/tsconfig.json rename to types/copy-paste/tsconfig.json diff --git a/copy-webpack-plugin/copy-webpack-plugin-tests.ts b/types/copy-webpack-plugin/copy-webpack-plugin-tests.ts similarity index 100% rename from copy-webpack-plugin/copy-webpack-plugin-tests.ts rename to types/copy-webpack-plugin/copy-webpack-plugin-tests.ts diff --git a/copy-webpack-plugin/index.d.ts b/types/copy-webpack-plugin/index.d.ts similarity index 100% rename from copy-webpack-plugin/index.d.ts rename to types/copy-webpack-plugin/index.d.ts diff --git a/copy-webpack-plugin/tsconfig.json b/types/copy-webpack-plugin/tsconfig.json similarity index 100% rename from copy-webpack-plugin/tsconfig.json rename to types/copy-webpack-plugin/tsconfig.json diff --git a/cordova-ionic/cordova-ionic-tests.ts b/types/cordova-ionic/cordova-ionic-tests.ts similarity index 100% rename from cordova-ionic/cordova-ionic-tests.ts rename to types/cordova-ionic/cordova-ionic-tests.ts diff --git a/cordova-ionic/index.d.ts b/types/cordova-ionic/index.d.ts similarity index 100% rename from cordova-ionic/index.d.ts rename to types/cordova-ionic/index.d.ts diff --git a/cordova-ionic/keyboard.d.ts b/types/cordova-ionic/keyboard.d.ts similarity index 100% rename from cordova-ionic/keyboard.d.ts rename to types/cordova-ionic/keyboard.d.ts diff --git a/cordova-ionic/tsconfig.json b/types/cordova-ionic/tsconfig.json similarity index 100% rename from cordova-ionic/tsconfig.json rename to types/cordova-ionic/tsconfig.json diff --git a/cordova-plugin-app-version/cordova-plugin-app-version-tests.ts b/types/cordova-plugin-app-version/cordova-plugin-app-version-tests.ts similarity index 100% rename from cordova-plugin-app-version/cordova-plugin-app-version-tests.ts rename to types/cordova-plugin-app-version/cordova-plugin-app-version-tests.ts diff --git a/cordova-plugin-app-version/index.d.ts b/types/cordova-plugin-app-version/index.d.ts similarity index 100% rename from cordova-plugin-app-version/index.d.ts rename to types/cordova-plugin-app-version/index.d.ts diff --git a/cordova-plugin-app-version/tsconfig.json b/types/cordova-plugin-app-version/tsconfig.json similarity index 100% rename from cordova-plugin-app-version/tsconfig.json rename to types/cordova-plugin-app-version/tsconfig.json diff --git a/cordova-plugin-background-mode/cordova-plugin-background-mode-tests.ts b/types/cordova-plugin-background-mode/cordova-plugin-background-mode-tests.ts similarity index 100% rename from cordova-plugin-background-mode/cordova-plugin-background-mode-tests.ts rename to types/cordova-plugin-background-mode/cordova-plugin-background-mode-tests.ts diff --git a/cordova-plugin-background-mode/index.d.ts b/types/cordova-plugin-background-mode/index.d.ts similarity index 100% rename from cordova-plugin-background-mode/index.d.ts rename to types/cordova-plugin-background-mode/index.d.ts diff --git a/cordova-plugin-background-mode/tsconfig.json b/types/cordova-plugin-background-mode/tsconfig.json similarity index 100% rename from cordova-plugin-background-mode/tsconfig.json rename to types/cordova-plugin-background-mode/tsconfig.json diff --git a/cordova-plugin-battery-status/cordova-plugin-battery-status-tests.ts b/types/cordova-plugin-battery-status/cordova-plugin-battery-status-tests.ts similarity index 100% rename from cordova-plugin-battery-status/cordova-plugin-battery-status-tests.ts rename to types/cordova-plugin-battery-status/cordova-plugin-battery-status-tests.ts diff --git a/cordova-plugin-battery-status/index.d.ts b/types/cordova-plugin-battery-status/index.d.ts similarity index 100% rename from cordova-plugin-battery-status/index.d.ts rename to types/cordova-plugin-battery-status/index.d.ts diff --git a/cordova-plugin-battery-status/tsconfig.json b/types/cordova-plugin-battery-status/tsconfig.json similarity index 100% rename from cordova-plugin-battery-status/tsconfig.json rename to types/cordova-plugin-battery-status/tsconfig.json diff --git a/cordova-plugin-ble-central/cordova-plugin-ble-central-tests.ts b/types/cordova-plugin-ble-central/cordova-plugin-ble-central-tests.ts similarity index 100% rename from cordova-plugin-ble-central/cordova-plugin-ble-central-tests.ts rename to types/cordova-plugin-ble-central/cordova-plugin-ble-central-tests.ts diff --git a/cordova-plugin-ble-central/index.d.ts b/types/cordova-plugin-ble-central/index.d.ts similarity index 100% rename from cordova-plugin-ble-central/index.d.ts rename to types/cordova-plugin-ble-central/index.d.ts diff --git a/cordova-plugin-ble-central/tsconfig.json b/types/cordova-plugin-ble-central/tsconfig.json similarity index 100% rename from cordova-plugin-ble-central/tsconfig.json rename to types/cordova-plugin-ble-central/tsconfig.json diff --git a/cordova-plugin-camera/cordova-plugin-camera-tests.ts b/types/cordova-plugin-camera/cordova-plugin-camera-tests.ts similarity index 100% rename from cordova-plugin-camera/cordova-plugin-camera-tests.ts rename to types/cordova-plugin-camera/cordova-plugin-camera-tests.ts diff --git a/cordova-plugin-camera/index.d.ts b/types/cordova-plugin-camera/index.d.ts similarity index 100% rename from cordova-plugin-camera/index.d.ts rename to types/cordova-plugin-camera/index.d.ts diff --git a/cordova-plugin-camera/tsconfig.json b/types/cordova-plugin-camera/tsconfig.json similarity index 100% rename from cordova-plugin-camera/tsconfig.json rename to types/cordova-plugin-camera/tsconfig.json diff --git a/cordova-plugin-contacts/cordova-plugin-contacts-tests.ts b/types/cordova-plugin-contacts/cordova-plugin-contacts-tests.ts similarity index 100% rename from cordova-plugin-contacts/cordova-plugin-contacts-tests.ts rename to types/cordova-plugin-contacts/cordova-plugin-contacts-tests.ts diff --git a/cordova-plugin-contacts/index.d.ts b/types/cordova-plugin-contacts/index.d.ts similarity index 100% rename from cordova-plugin-contacts/index.d.ts rename to types/cordova-plugin-contacts/index.d.ts diff --git a/cordova-plugin-contacts/tsconfig.json b/types/cordova-plugin-contacts/tsconfig.json similarity index 100% rename from cordova-plugin-contacts/tsconfig.json rename to types/cordova-plugin-contacts/tsconfig.json diff --git a/cordova-plugin-device-motion/cordova-plugin-device-motion-tests.ts b/types/cordova-plugin-device-motion/cordova-plugin-device-motion-tests.ts similarity index 100% rename from cordova-plugin-device-motion/cordova-plugin-device-motion-tests.ts rename to types/cordova-plugin-device-motion/cordova-plugin-device-motion-tests.ts diff --git a/cordova-plugin-device-motion/index.d.ts b/types/cordova-plugin-device-motion/index.d.ts similarity index 100% rename from cordova-plugin-device-motion/index.d.ts rename to types/cordova-plugin-device-motion/index.d.ts diff --git a/cordova-plugin-device-motion/tsconfig.json b/types/cordova-plugin-device-motion/tsconfig.json similarity index 100% rename from cordova-plugin-device-motion/tsconfig.json rename to types/cordova-plugin-device-motion/tsconfig.json diff --git a/cordova-plugin-device-name/README.md b/types/cordova-plugin-device-name/README.md similarity index 100% rename from cordova-plugin-device-name/README.md rename to types/cordova-plugin-device-name/README.md diff --git a/cordova-plugin-device-name/cordova-plugin-device-name-tests.ts b/types/cordova-plugin-device-name/cordova-plugin-device-name-tests.ts similarity index 100% rename from cordova-plugin-device-name/cordova-plugin-device-name-tests.ts rename to types/cordova-plugin-device-name/cordova-plugin-device-name-tests.ts diff --git a/cordova-plugin-device-name/index.d.ts b/types/cordova-plugin-device-name/index.d.ts similarity index 100% rename from cordova-plugin-device-name/index.d.ts rename to types/cordova-plugin-device-name/index.d.ts diff --git a/cordova-plugin-device-name/tsconfig.json b/types/cordova-plugin-device-name/tsconfig.json similarity index 100% rename from cordova-plugin-device-name/tsconfig.json rename to types/cordova-plugin-device-name/tsconfig.json diff --git a/cordova-plugin-device-orientation/cordova-plugin-device-orientation-tests.ts b/types/cordova-plugin-device-orientation/cordova-plugin-device-orientation-tests.ts similarity index 100% rename from cordova-plugin-device-orientation/cordova-plugin-device-orientation-tests.ts rename to types/cordova-plugin-device-orientation/cordova-plugin-device-orientation-tests.ts diff --git a/cordova-plugin-device-orientation/index.d.ts b/types/cordova-plugin-device-orientation/index.d.ts similarity index 100% rename from cordova-plugin-device-orientation/index.d.ts rename to types/cordova-plugin-device-orientation/index.d.ts diff --git a/cordova-plugin-device-orientation/tsconfig.json b/types/cordova-plugin-device-orientation/tsconfig.json similarity index 100% rename from cordova-plugin-device-orientation/tsconfig.json rename to types/cordova-plugin-device-orientation/tsconfig.json diff --git a/cordova-plugin-device/cordova-plugin-device-tests.ts b/types/cordova-plugin-device/cordova-plugin-device-tests.ts similarity index 100% rename from cordova-plugin-device/cordova-plugin-device-tests.ts rename to types/cordova-plugin-device/cordova-plugin-device-tests.ts diff --git a/cordova-plugin-device/index.d.ts b/types/cordova-plugin-device/index.d.ts similarity index 100% rename from cordova-plugin-device/index.d.ts rename to types/cordova-plugin-device/index.d.ts diff --git a/cordova-plugin-device/tsconfig.json b/types/cordova-plugin-device/tsconfig.json similarity index 100% rename from cordova-plugin-device/tsconfig.json rename to types/cordova-plugin-device/tsconfig.json diff --git a/cordova-plugin-dialogs/cordova-plugin-dialogs-tests.ts b/types/cordova-plugin-dialogs/cordova-plugin-dialogs-tests.ts similarity index 100% rename from cordova-plugin-dialogs/cordova-plugin-dialogs-tests.ts rename to types/cordova-plugin-dialogs/cordova-plugin-dialogs-tests.ts diff --git a/cordova-plugin-dialogs/index.d.ts b/types/cordova-plugin-dialogs/index.d.ts similarity index 100% rename from cordova-plugin-dialogs/index.d.ts rename to types/cordova-plugin-dialogs/index.d.ts diff --git a/cordova-plugin-dialogs/tsconfig.json b/types/cordova-plugin-dialogs/tsconfig.json similarity index 100% rename from cordova-plugin-dialogs/tsconfig.json rename to types/cordova-plugin-dialogs/tsconfig.json diff --git a/cordova-plugin-email-composer/cordova-plugin-email-composer-tests.ts b/types/cordova-plugin-email-composer/cordova-plugin-email-composer-tests.ts similarity index 100% rename from cordova-plugin-email-composer/cordova-plugin-email-composer-tests.ts rename to types/cordova-plugin-email-composer/cordova-plugin-email-composer-tests.ts diff --git a/cordova-plugin-email-composer/index.d.ts b/types/cordova-plugin-email-composer/index.d.ts similarity index 100% rename from cordova-plugin-email-composer/index.d.ts rename to types/cordova-plugin-email-composer/index.d.ts diff --git a/cordova-plugin-email-composer/tsconfig.json b/types/cordova-plugin-email-composer/tsconfig.json similarity index 100% rename from cordova-plugin-email-composer/tsconfig.json rename to types/cordova-plugin-email-composer/tsconfig.json diff --git a/cordova-plugin-file-transfer/cordova-plugin-file-transfer-tests.ts b/types/cordova-plugin-file-transfer/cordova-plugin-file-transfer-tests.ts similarity index 100% rename from cordova-plugin-file-transfer/cordova-plugin-file-transfer-tests.ts rename to types/cordova-plugin-file-transfer/cordova-plugin-file-transfer-tests.ts diff --git a/cordova-plugin-file-transfer/index.d.ts b/types/cordova-plugin-file-transfer/index.d.ts similarity index 100% rename from cordova-plugin-file-transfer/index.d.ts rename to types/cordova-plugin-file-transfer/index.d.ts diff --git a/cordova-plugin-file-transfer/tsconfig.json b/types/cordova-plugin-file-transfer/tsconfig.json similarity index 100% rename from cordova-plugin-file-transfer/tsconfig.json rename to types/cordova-plugin-file-transfer/tsconfig.json diff --git a/cordova-plugin-file/cordova-plugin-file-tests.ts b/types/cordova-plugin-file/cordova-plugin-file-tests.ts similarity index 100% rename from cordova-plugin-file/cordova-plugin-file-tests.ts rename to types/cordova-plugin-file/cordova-plugin-file-tests.ts diff --git a/cordova-plugin-file/index.d.ts b/types/cordova-plugin-file/index.d.ts similarity index 100% rename from cordova-plugin-file/index.d.ts rename to types/cordova-plugin-file/index.d.ts diff --git a/cordova-plugin-file/tsconfig.json b/types/cordova-plugin-file/tsconfig.json similarity index 100% rename from cordova-plugin-file/tsconfig.json rename to types/cordova-plugin-file/tsconfig.json diff --git a/cordova-plugin-globalization/cordova-plugin-globalization-tests.ts b/types/cordova-plugin-globalization/cordova-plugin-globalization-tests.ts similarity index 100% rename from cordova-plugin-globalization/cordova-plugin-globalization-tests.ts rename to types/cordova-plugin-globalization/cordova-plugin-globalization-tests.ts diff --git a/cordova-plugin-globalization/index.d.ts b/types/cordova-plugin-globalization/index.d.ts similarity index 100% rename from cordova-plugin-globalization/index.d.ts rename to types/cordova-plugin-globalization/index.d.ts diff --git a/cordova-plugin-globalization/tsconfig.json b/types/cordova-plugin-globalization/tsconfig.json similarity index 100% rename from cordova-plugin-globalization/tsconfig.json rename to types/cordova-plugin-globalization/tsconfig.json diff --git a/cordova-plugin-ibeacon/cordova-plugin-ibeacon-tests.ts b/types/cordova-plugin-ibeacon/cordova-plugin-ibeacon-tests.ts similarity index 100% rename from cordova-plugin-ibeacon/cordova-plugin-ibeacon-tests.ts rename to types/cordova-plugin-ibeacon/cordova-plugin-ibeacon-tests.ts diff --git a/cordova-plugin-ibeacon/index.d.ts b/types/cordova-plugin-ibeacon/index.d.ts similarity index 100% rename from cordova-plugin-ibeacon/index.d.ts rename to types/cordova-plugin-ibeacon/index.d.ts diff --git a/cordova-plugin-ibeacon/tsconfig.json b/types/cordova-plugin-ibeacon/tsconfig.json similarity index 100% rename from cordova-plugin-ibeacon/tsconfig.json rename to types/cordova-plugin-ibeacon/tsconfig.json diff --git a/cordova-plugin-inappbrowser/cordova-plugin-inappbrowser-tests.ts b/types/cordova-plugin-inappbrowser/cordova-plugin-inappbrowser-tests.ts similarity index 100% rename from cordova-plugin-inappbrowser/cordova-plugin-inappbrowser-tests.ts rename to types/cordova-plugin-inappbrowser/cordova-plugin-inappbrowser-tests.ts diff --git a/cordova-plugin-inappbrowser/index.d.ts b/types/cordova-plugin-inappbrowser/index.d.ts similarity index 100% rename from cordova-plugin-inappbrowser/index.d.ts rename to types/cordova-plugin-inappbrowser/index.d.ts diff --git a/cordova-plugin-inappbrowser/tsconfig.json b/types/cordova-plugin-inappbrowser/tsconfig.json similarity index 100% rename from cordova-plugin-inappbrowser/tsconfig.json rename to types/cordova-plugin-inappbrowser/tsconfig.json diff --git a/cordova-plugin-insomnia/cordova-plugin-insomnia-tests.ts b/types/cordova-plugin-insomnia/cordova-plugin-insomnia-tests.ts similarity index 100% rename from cordova-plugin-insomnia/cordova-plugin-insomnia-tests.ts rename to types/cordova-plugin-insomnia/cordova-plugin-insomnia-tests.ts diff --git a/cordova-plugin-insomnia/index.d.ts b/types/cordova-plugin-insomnia/index.d.ts similarity index 100% rename from cordova-plugin-insomnia/index.d.ts rename to types/cordova-plugin-insomnia/index.d.ts diff --git a/cordova-plugin-insomnia/tsconfig.json b/types/cordova-plugin-insomnia/tsconfig.json similarity index 100% rename from cordova-plugin-insomnia/tsconfig.json rename to types/cordova-plugin-insomnia/tsconfig.json diff --git a/cordova-plugin-keyboard/cordova-plugin-keyboard-tests.ts b/types/cordova-plugin-keyboard/cordova-plugin-keyboard-tests.ts similarity index 100% rename from cordova-plugin-keyboard/cordova-plugin-keyboard-tests.ts rename to types/cordova-plugin-keyboard/cordova-plugin-keyboard-tests.ts diff --git a/cordova-plugin-keyboard/index.d.ts b/types/cordova-plugin-keyboard/index.d.ts similarity index 100% rename from cordova-plugin-keyboard/index.d.ts rename to types/cordova-plugin-keyboard/index.d.ts diff --git a/cordova-plugin-keyboard/tsconfig.json b/types/cordova-plugin-keyboard/tsconfig.json similarity index 100% rename from cordova-plugin-keyboard/tsconfig.json rename to types/cordova-plugin-keyboard/tsconfig.json diff --git a/cordova-plugin-mapsforge/cordova-plugin-mapsforge-tests.ts b/types/cordova-plugin-mapsforge/cordova-plugin-mapsforge-tests.ts similarity index 100% rename from cordova-plugin-mapsforge/cordova-plugin-mapsforge-tests.ts rename to types/cordova-plugin-mapsforge/cordova-plugin-mapsforge-tests.ts diff --git a/cordova-plugin-mapsforge/index.d.ts b/types/cordova-plugin-mapsforge/index.d.ts similarity index 100% rename from cordova-plugin-mapsforge/index.d.ts rename to types/cordova-plugin-mapsforge/index.d.ts diff --git a/cordova-plugin-mapsforge/tsconfig.json b/types/cordova-plugin-mapsforge/tsconfig.json similarity index 100% rename from cordova-plugin-mapsforge/tsconfig.json rename to types/cordova-plugin-mapsforge/tsconfig.json diff --git a/cordova-plugin-media-capture/cordova-plugin-media-capture-tests.ts b/types/cordova-plugin-media-capture/cordova-plugin-media-capture-tests.ts similarity index 100% rename from cordova-plugin-media-capture/cordova-plugin-media-capture-tests.ts rename to types/cordova-plugin-media-capture/cordova-plugin-media-capture-tests.ts diff --git a/cordova-plugin-media-capture/index.d.ts b/types/cordova-plugin-media-capture/index.d.ts similarity index 100% rename from cordova-plugin-media-capture/index.d.ts rename to types/cordova-plugin-media-capture/index.d.ts diff --git a/cordova-plugin-media-capture/tsconfig.json b/types/cordova-plugin-media-capture/tsconfig.json similarity index 100% rename from cordova-plugin-media-capture/tsconfig.json rename to types/cordova-plugin-media-capture/tsconfig.json diff --git a/cordova-plugin-media/cordova-plugin-media-tests.ts b/types/cordova-plugin-media/cordova-plugin-media-tests.ts similarity index 100% rename from cordova-plugin-media/cordova-plugin-media-tests.ts rename to types/cordova-plugin-media/cordova-plugin-media-tests.ts diff --git a/cordova-plugin-media/index.d.ts b/types/cordova-plugin-media/index.d.ts similarity index 100% rename from cordova-plugin-media/index.d.ts rename to types/cordova-plugin-media/index.d.ts diff --git a/cordova-plugin-media/tsconfig.json b/types/cordova-plugin-media/tsconfig.json similarity index 100% rename from cordova-plugin-media/tsconfig.json rename to types/cordova-plugin-media/tsconfig.json diff --git a/cordova-plugin-ms-adal/cordova-plugin-ms-adal-tests.ts b/types/cordova-plugin-ms-adal/cordova-plugin-ms-adal-tests.ts similarity index 100% rename from cordova-plugin-ms-adal/cordova-plugin-ms-adal-tests.ts rename to types/cordova-plugin-ms-adal/cordova-plugin-ms-adal-tests.ts diff --git a/cordova-plugin-ms-adal/index.d.ts b/types/cordova-plugin-ms-adal/index.d.ts similarity index 100% rename from cordova-plugin-ms-adal/index.d.ts rename to types/cordova-plugin-ms-adal/index.d.ts diff --git a/cordova-plugin-ms-adal/tsconfig.json b/types/cordova-plugin-ms-adal/tsconfig.json similarity index 100% rename from cordova-plugin-ms-adal/tsconfig.json rename to types/cordova-plugin-ms-adal/tsconfig.json diff --git a/cordova-plugin-network-information/cordova-plugin-network-information-tests.ts b/types/cordova-plugin-network-information/cordova-plugin-network-information-tests.ts similarity index 100% rename from cordova-plugin-network-information/cordova-plugin-network-information-tests.ts rename to types/cordova-plugin-network-information/cordova-plugin-network-information-tests.ts diff --git a/cordova-plugin-network-information/index.d.ts b/types/cordova-plugin-network-information/index.d.ts similarity index 100% rename from cordova-plugin-network-information/index.d.ts rename to types/cordova-plugin-network-information/index.d.ts diff --git a/cordova-plugin-network-information/tsconfig.json b/types/cordova-plugin-network-information/tsconfig.json similarity index 100% rename from cordova-plugin-network-information/tsconfig.json rename to types/cordova-plugin-network-information/tsconfig.json diff --git a/cordova-plugin-ouralabs/cordova-plugin-ouralabs-tests.ts b/types/cordova-plugin-ouralabs/cordova-plugin-ouralabs-tests.ts similarity index 100% rename from cordova-plugin-ouralabs/cordova-plugin-ouralabs-tests.ts rename to types/cordova-plugin-ouralabs/cordova-plugin-ouralabs-tests.ts diff --git a/cordova-plugin-ouralabs/index.d.ts b/types/cordova-plugin-ouralabs/index.d.ts similarity index 100% rename from cordova-plugin-ouralabs/index.d.ts rename to types/cordova-plugin-ouralabs/index.d.ts diff --git a/cordova-plugin-ouralabs/tsconfig.json b/types/cordova-plugin-ouralabs/tsconfig.json similarity index 100% rename from cordova-plugin-ouralabs/tsconfig.json rename to types/cordova-plugin-ouralabs/tsconfig.json diff --git a/cordova-plugin-qrscanner/cordova-plugin-qrscanner-tests.ts b/types/cordova-plugin-qrscanner/cordova-plugin-qrscanner-tests.ts similarity index 100% rename from cordova-plugin-qrscanner/cordova-plugin-qrscanner-tests.ts rename to types/cordova-plugin-qrscanner/cordova-plugin-qrscanner-tests.ts diff --git a/cordova-plugin-qrscanner/index.d.ts b/types/cordova-plugin-qrscanner/index.d.ts similarity index 100% rename from cordova-plugin-qrscanner/index.d.ts rename to types/cordova-plugin-qrscanner/index.d.ts diff --git a/cordova-plugin-qrscanner/tsconfig.json b/types/cordova-plugin-qrscanner/tsconfig.json similarity index 100% rename from cordova-plugin-qrscanner/tsconfig.json rename to types/cordova-plugin-qrscanner/tsconfig.json diff --git a/cordova-plugin-spinner/cordova-plugin-spinner-tests.ts b/types/cordova-plugin-spinner/cordova-plugin-spinner-tests.ts similarity index 100% rename from cordova-plugin-spinner/cordova-plugin-spinner-tests.ts rename to types/cordova-plugin-spinner/cordova-plugin-spinner-tests.ts diff --git a/cordova-plugin-spinner/index.d.ts b/types/cordova-plugin-spinner/index.d.ts similarity index 100% rename from cordova-plugin-spinner/index.d.ts rename to types/cordova-plugin-spinner/index.d.ts diff --git a/cordova-plugin-spinner/tsconfig.json b/types/cordova-plugin-spinner/tsconfig.json similarity index 100% rename from cordova-plugin-spinner/tsconfig.json rename to types/cordova-plugin-spinner/tsconfig.json diff --git a/cordova-plugin-splashscreen/cordova-plugin-splashscreen-tests.ts b/types/cordova-plugin-splashscreen/cordova-plugin-splashscreen-tests.ts similarity index 100% rename from cordova-plugin-splashscreen/cordova-plugin-splashscreen-tests.ts rename to types/cordova-plugin-splashscreen/cordova-plugin-splashscreen-tests.ts diff --git a/cordova-plugin-splashscreen/index.d.ts b/types/cordova-plugin-splashscreen/index.d.ts similarity index 100% rename from cordova-plugin-splashscreen/index.d.ts rename to types/cordova-plugin-splashscreen/index.d.ts diff --git a/cordova-plugin-splashscreen/tsconfig.json b/types/cordova-plugin-splashscreen/tsconfig.json similarity index 100% rename from cordova-plugin-splashscreen/tsconfig.json rename to types/cordova-plugin-splashscreen/tsconfig.json diff --git a/cordova-plugin-statusbar/cordova-plugin-statusbar-tests.ts b/types/cordova-plugin-statusbar/cordova-plugin-statusbar-tests.ts similarity index 100% rename from cordova-plugin-statusbar/cordova-plugin-statusbar-tests.ts rename to types/cordova-plugin-statusbar/cordova-plugin-statusbar-tests.ts diff --git a/cordova-plugin-statusbar/index.d.ts b/types/cordova-plugin-statusbar/index.d.ts similarity index 100% rename from cordova-plugin-statusbar/index.d.ts rename to types/cordova-plugin-statusbar/index.d.ts diff --git a/cordova-plugin-statusbar/tsconfig.json b/types/cordova-plugin-statusbar/tsconfig.json similarity index 100% rename from cordova-plugin-statusbar/tsconfig.json rename to types/cordova-plugin-statusbar/tsconfig.json diff --git a/cordova-plugin-vibration/cordova-plugin-vibration-tests.ts b/types/cordova-plugin-vibration/cordova-plugin-vibration-tests.ts similarity index 100% rename from cordova-plugin-vibration/cordova-plugin-vibration-tests.ts rename to types/cordova-plugin-vibration/cordova-plugin-vibration-tests.ts diff --git a/cordova-plugin-vibration/index.d.ts b/types/cordova-plugin-vibration/index.d.ts similarity index 100% rename from cordova-plugin-vibration/index.d.ts rename to types/cordova-plugin-vibration/index.d.ts diff --git a/cordova-plugin-vibration/tsconfig.json b/types/cordova-plugin-vibration/tsconfig.json similarity index 100% rename from cordova-plugin-vibration/tsconfig.json rename to types/cordova-plugin-vibration/tsconfig.json diff --git a/cordova-plugin-websql/cordova-plugin-websql-tests.ts b/types/cordova-plugin-websql/cordova-plugin-websql-tests.ts similarity index 100% rename from cordova-plugin-websql/cordova-plugin-websql-tests.ts rename to types/cordova-plugin-websql/cordova-plugin-websql-tests.ts diff --git a/cordova-plugin-websql/index.d.ts b/types/cordova-plugin-websql/index.d.ts similarity index 100% rename from cordova-plugin-websql/index.d.ts rename to types/cordova-plugin-websql/index.d.ts diff --git a/cordova-plugin-websql/tsconfig.json b/types/cordova-plugin-websql/tsconfig.json similarity index 100% rename from cordova-plugin-websql/tsconfig.json rename to types/cordova-plugin-websql/tsconfig.json diff --git a/cordova-plugin-x-socialsharing/cordova-plugin-x-socialsharing-tests.ts b/types/cordova-plugin-x-socialsharing/cordova-plugin-x-socialsharing-tests.ts old mode 100755 new mode 100644 similarity index 100% rename from cordova-plugin-x-socialsharing/cordova-plugin-x-socialsharing-tests.ts rename to types/cordova-plugin-x-socialsharing/cordova-plugin-x-socialsharing-tests.ts diff --git a/cordova-plugin-x-socialsharing/index.d.ts b/types/cordova-plugin-x-socialsharing/index.d.ts similarity index 100% rename from cordova-plugin-x-socialsharing/index.d.ts rename to types/cordova-plugin-x-socialsharing/index.d.ts diff --git a/cordova-plugin-x-socialsharing/tsconfig.json b/types/cordova-plugin-x-socialsharing/tsconfig.json similarity index 100% rename from cordova-plugin-x-socialsharing/tsconfig.json rename to types/cordova-plugin-x-socialsharing/tsconfig.json diff --git a/cordova-sqlite-storage/cordova-sqlite-storage-tests.ts b/types/cordova-sqlite-storage/cordova-sqlite-storage-tests.ts similarity index 100% rename from cordova-sqlite-storage/cordova-sqlite-storage-tests.ts rename to types/cordova-sqlite-storage/cordova-sqlite-storage-tests.ts diff --git a/cordova-sqlite-storage/index.d.ts b/types/cordova-sqlite-storage/index.d.ts similarity index 100% rename from cordova-sqlite-storage/index.d.ts rename to types/cordova-sqlite-storage/index.d.ts diff --git a/cordova-sqlite-storage/tsconfig.json b/types/cordova-sqlite-storage/tsconfig.json similarity index 100% rename from cordova-sqlite-storage/tsconfig.json rename to types/cordova-sqlite-storage/tsconfig.json diff --git a/cordova-sqlite-storage/tslint.json b/types/cordova-sqlite-storage/tslint.json similarity index 100% rename from cordova-sqlite-storage/tslint.json rename to types/cordova-sqlite-storage/tslint.json diff --git a/cordova.plugins.diagnostic/cordova.plugins.diagnostic-tests.ts b/types/cordova.plugins.diagnostic/cordova.plugins.diagnostic-tests.ts similarity index 100% rename from cordova.plugins.diagnostic/cordova.plugins.diagnostic-tests.ts rename to types/cordova.plugins.diagnostic/cordova.plugins.diagnostic-tests.ts diff --git a/cordova.plugins.diagnostic/index.d.ts b/types/cordova.plugins.diagnostic/index.d.ts similarity index 100% rename from cordova.plugins.diagnostic/index.d.ts rename to types/cordova.plugins.diagnostic/index.d.ts diff --git a/cordova.plugins.diagnostic/tsconfig.json b/types/cordova.plugins.diagnostic/tsconfig.json similarity index 100% rename from cordova.plugins.diagnostic/tsconfig.json rename to types/cordova.plugins.diagnostic/tsconfig.json diff --git a/cordova/cordova-tests.ts b/types/cordova/cordova-tests.ts similarity index 100% rename from cordova/cordova-tests.ts rename to types/cordova/cordova-tests.ts diff --git a/cordova/index.d.ts b/types/cordova/index.d.ts similarity index 100% rename from cordova/index.d.ts rename to types/cordova/index.d.ts diff --git a/cordova/tsconfig.json b/types/cordova/tsconfig.json similarity index 100% rename from cordova/tsconfig.json rename to types/cordova/tsconfig.json diff --git a/cordova_app_version_plugin/README.md b/types/cordova_app_version_plugin/README.md similarity index 100% rename from cordova_app_version_plugin/README.md rename to types/cordova_app_version_plugin/README.md diff --git a/cordova_app_version_plugin/cordova_app_version_plugin-tests.ts b/types/cordova_app_version_plugin/cordova_app_version_plugin-tests.ts similarity index 100% rename from cordova_app_version_plugin/cordova_app_version_plugin-tests.ts rename to types/cordova_app_version_plugin/cordova_app_version_plugin-tests.ts diff --git a/cordova_app_version_plugin/index.d.ts b/types/cordova_app_version_plugin/index.d.ts similarity index 100% rename from cordova_app_version_plugin/index.d.ts rename to types/cordova_app_version_plugin/index.d.ts diff --git a/cordova_app_version_plugin/tsconfig.json b/types/cordova_app_version_plugin/tsconfig.json similarity index 100% rename from cordova_app_version_plugin/tsconfig.json rename to types/cordova_app_version_plugin/tsconfig.json diff --git a/cordovarduino/cordovarduino-tests.ts b/types/cordovarduino/cordovarduino-tests.ts similarity index 100% rename from cordovarduino/cordovarduino-tests.ts rename to types/cordovarduino/cordovarduino-tests.ts diff --git a/cordovarduino/index.d.ts b/types/cordovarduino/index.d.ts similarity index 100% rename from cordovarduino/index.d.ts rename to types/cordovarduino/index.d.ts diff --git a/cordovarduino/tsconfig.json b/types/cordovarduino/tsconfig.json similarity index 100% rename from cordovarduino/tsconfig.json rename to types/cordovarduino/tsconfig.json diff --git a/core-decorators/core-decorators-tests.ts b/types/core-decorators/core-decorators-tests.ts similarity index 94% rename from core-decorators/core-decorators-tests.ts rename to types/core-decorators/core-decorators-tests.ts index 04a22c19cf..ef4659e56b 100644 --- a/core-decorators/core-decorators-tests.ts +++ b/types/core-decorators/core-decorators-tests.ts @@ -1,4 +1,3 @@ - // // @autobind // @@ -35,7 +34,7 @@ class Meal { entree: string = 'steak'; } -var dinner = new Meal(); +const dinner = new Meal(); dinner.entree = 'salmon'; // @@ -99,11 +98,9 @@ person2.facepalmHarder(); // @debounce // - import { debounce } from 'core-decorators'; class Editor { - content = ''; @debounce(500) @@ -119,7 +116,6 @@ class Editor { import { throttle } from 'core-decorators'; class Editor2 { - content = ''; @throttle(500, {leading: false}) @@ -162,8 +158,8 @@ class Meal2 { cost: number = 4.44; } -var dinner2 = new Meal2(); -for (var key in dinner2) { +const dinner2 = new Meal2(); +for (const key in dinner2) { key; // "entree" only, not "cost" } @@ -182,7 +178,7 @@ class Meal3 { entree: string = 'steak'; } -var dinner3 = new Meal3(); +const dinner3 = new Meal3(); Object.defineProperty(dinner3, 'entree', { enumerable: false @@ -196,7 +192,7 @@ Object.defineProperty(dinner3, 'entree', { declare function memoize(func: T): T; import { decorate } from 'core-decorators'; -var count = 0; +let count = 0; class Task { @decorate(memoize) @@ -207,8 +203,8 @@ class Task { } } -var task = new Task(); -var data = [1, 2, 3]; +const task = new Task(); +const data = [1, 2, 3]; task.doSomethingExpensive(data); task.doSomethingExpensive(data); @@ -232,7 +228,7 @@ class Editor3 { hugeBuffer = createHugeBuffer(); } -var editor = new Editor3(); +const editor = new Editor3(); // createHugeBuffer() has not been called yet editor.hugeBuffer; @@ -270,7 +266,7 @@ class Bird { } } -var bird = new Bird(); +const bird = new Bird(); bird.singMatingCall(); // alerts "tweet tweet" @@ -288,17 +284,12 @@ const myConsole = { class Bird2 { @time('sing') - sing() { - } + sing() {} @time('sing2', myConsole) - sing2() { - - } + sing2() {} } -var bird2 = new Bird2(); +const bird2 = new Bird2(); bird2.sing(); // console.time label will be 'sing-0' bird2.sing(); // console.time label will be 'sing-1' - - diff --git a/core-decorators/index.d.ts b/types/core-decorators/index.d.ts similarity index 100% rename from core-decorators/index.d.ts rename to types/core-decorators/index.d.ts diff --git a/core-decorators/tsconfig.json b/types/core-decorators/tsconfig.json similarity index 100% rename from core-decorators/tsconfig.json rename to types/core-decorators/tsconfig.json diff --git a/core-decorators/tslint.json b/types/core-decorators/tslint.json similarity index 100% rename from core-decorators/tslint.json rename to types/core-decorators/tslint.json diff --git a/core-js/core-js-tests.ts b/types/core-js/core-js-tests.ts similarity index 99% rename from core-js/core-js-tests.ts rename to types/core-js/core-js-tests.ts index 0614b117b9..3f585db33e 100644 --- a/core-js/core-js-tests.ts +++ b/types/core-js/core-js-tests.ts @@ -1,5 +1,3 @@ - - interface Point { x: number; y: number; } interface Point3D extends Point { z: number; } diff --git a/core-js/index.d.ts b/types/core-js/index.d.ts similarity index 77% rename from core-js/index.d.ts rename to types/core-js/index.d.ts index 4191cd11aa..0bbe4974ae 100644 --- a/core-js/index.d.ts +++ b/types/core-js/index.d.ts @@ -456,7 +456,7 @@ interface String { declare function delay(msec: number): Promise; declare namespace core { - var version: string; + const version: string; namespace Reflect { function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; @@ -475,7 +475,7 @@ declare namespace core { function setPrototypeOf(target: any, proto: any): boolean; } - var Object: { + const Object: { getPrototypeOf(o: any): any; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; @@ -502,12 +502,12 @@ declare namespace core { make(proto: T, mixin?: any): T; }; - var Function: { + const Function: { bind(target: Function, thisArg: any, ...argArray: any[]): any; part(target: Function, ...args: any[]): any; }; - var Array: { + const Array: { from(arrayLike: ArrayLike | Iterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; from(arrayLike: ArrayLike | Iterable): T[]; of(...items: T[]): T[]; @@ -544,7 +544,7 @@ declare namespace core { turn(array: ArrayLike, callbackfn: (memo: U, value: T, index: number, array: T[]) => void, memo?: U): U; }; - var String: { + const String: { codePointAt(text: string, pos: number): number; includes(text: string, searchString: string, position?: number): boolean; endsWith(text: string, searchString: string, endPosition?: number): boolean; @@ -559,14 +559,14 @@ declare namespace core { unescapeHTML(text: string): string; }; - var Date: { + const Date: { now(): number; toISOString(date: Date): string; format(date: Date, template: string, locale?: string): string; formatUTC(date: Date, template: string, locale?: string): string; }; - var Number: { + const Number: { EPSILON: number; isFinite(number: number): boolean; isInteger(number: number): boolean; @@ -596,7 +596,7 @@ declare namespace core { random(lim?: number): number; }; - var Math: { + const Math: { clz32(x: number): number; imul(x: number, y: number): number; sign(x: number): number; @@ -616,20 +616,20 @@ declare namespace core { cbrt(x: number): number; }; - var RegExp: { + const RegExp: { escape(str: string): string; }; - var Map: MapConstructor; - var Set: SetConstructor; - var WeakMap: WeakMapConstructor; - var WeakSet: WeakSetConstructor; - var Promise: PromiseConstructor; - var Symbol: SymbolConstructor; - var Dict: DictConstructor; - var global: any; - var log: Log; - var _: boolean; + const Map: MapConstructor; + const Set: SetConstructor; + const WeakMap: WeakMapConstructor; + const WeakSet: WeakSetConstructor; + const Promise: PromiseConstructor; + const Symbol: SymbolConstructor; + const Dict: DictConstructor; + const global: any; + const log: Log; + const _: boolean; function setTimeout(handler: any, timeout?: any, ...args: any[]): number; @@ -671,47 +671,47 @@ declare module "core-js/core/$for" { export = $for; } declare module "core-js/core/_" { - var _: typeof core._; + const _: typeof core._; export = _; } declare module "core-js/core/array" { - var Array: typeof core.Array; + const Array: typeof core.Array; export = Array; } declare module "core-js/core/date" { - var Date: typeof core.Date; + const Date: typeof core.Date; export = Date; } declare module "core-js/core/delay" { - var delay: typeof core.delay; + const delay: typeof core.delay; export = delay; } declare module "core-js/core/dict" { - var Dict: typeof core.Dict; + const Dict: typeof core.Dict; export = Dict; } declare module "core-js/core/function" { - var Function: typeof core.Function; + const Function: typeof core.Function; export = Function; } declare module "core-js/core/global" { - var global: typeof core.global; + const global: typeof core.global; export = global; } declare module "core-js/core/log" { - var log: typeof core.log; + const log: typeof core.log; export = log; } declare module "core-js/core/number" { - var Number: typeof core.Number; + const Number: typeof core.Number; export = Number; } declare module "core-js/core/object" { - var Object: typeof core.Object; + const Object: typeof core.Object; export = Object; } declare module "core-js/core/string" { - var String: typeof core.String; + const String: typeof core.String; export = String; } declare module "core-js/fn/$for" { @@ -719,613 +719,613 @@ declare module "core-js/fn/$for" { export = $for; } declare module "core-js/fn/_" { - var _: typeof core._; + const _: typeof core._; export = _; } declare module "core-js/fn/clear-immediate" { - var clearImmediate: typeof core.clearImmediate; + const clearImmediate: typeof core.clearImmediate; export = clearImmediate; } declare module "core-js/fn/delay" { - var delay: typeof core.delay; + const delay: typeof core.delay; export = delay; } declare module "core-js/fn/dict" { - var Dict: typeof core.Dict; + const Dict: typeof core.Dict; export = Dict; } declare module "core-js/fn/get-iterator" { - var getIterator: typeof core.getIterator; + const getIterator: typeof core.getIterator; export = getIterator; } declare module "core-js/fn/global" { - var global: typeof core.global; + const global: typeof core.global; export = global; } declare module "core-js/fn/is-iterable" { - var isIterable: typeof core.isIterable; + const isIterable: typeof core.isIterable; export = isIterable; } declare module "core-js/fn/log" { - var log: typeof core.log; + const log: typeof core.log; export = log; } declare module "core-js/fn/map" { - var Map: typeof core.Map; + const Map: typeof core.Map; export = Map; } declare module "core-js/fn/promise" { - var Promise: typeof core.Promise; + const Promise: typeof core.Promise; export = Promise; } declare module "core-js/fn/set" { - var Set: typeof core.Set; + const Set: typeof core.Set; export = Set; } declare module "core-js/fn/set-immediate" { - var setImmediate: typeof core.setImmediate; + const setImmediate: typeof core.setImmediate; export = setImmediate; } declare module "core-js/fn/set-interval" { - var setInterval: typeof core.setInterval; + const setInterval: typeof core.setInterval; export = setInterval; } declare module "core-js/fn/set-timeout" { - var setTimeout: typeof core.setTimeout; + const setTimeout: typeof core.setTimeout; export = setTimeout; } declare module "core-js/fn/weak-map" { - var WeakMap: typeof core.WeakMap; + const WeakMap: typeof core.WeakMap; export = WeakMap; } declare module "core-js/fn/weak-set" { - var WeakSet: typeof core.WeakSet; + const WeakSet: typeof core.WeakSet; export = WeakSet; } declare module "core-js/fn/array" { - var Array: typeof core.Array; + const Array: typeof core.Array; export = Array; } declare module "core-js/fn/array/concat" { - var concat: typeof core.Array.concat; + const concat: typeof core.Array.concat; export = concat; } declare module "core-js/fn/array/copy-within" { - var copyWithin: typeof core.Array.copyWithin; + const copyWithin: typeof core.Array.copyWithin; export = copyWithin; } declare module "core-js/fn/array/entries" { - var entries: typeof core.Array.entries; + const entries: typeof core.Array.entries; export = entries; } declare module "core-js/fn/array/every" { - var every: typeof core.Array.every; + const every: typeof core.Array.every; export = every; } declare module "core-js/fn/array/fill" { - var fill: typeof core.Array.fill; + const fill: typeof core.Array.fill; export = fill; } declare module "core-js/fn/array/filter" { - var filter: typeof core.Array.filter; + const filter: typeof core.Array.filter; export = filter; } declare module "core-js/fn/array/find" { - var find: typeof core.Array.find; + const find: typeof core.Array.find; export = find; } declare module "core-js/fn/array/find-index" { - var findIndex: typeof core.Array.findIndex; + const findIndex: typeof core.Array.findIndex; export = findIndex; } declare module "core-js/fn/array/for-each" { - var forEach: typeof core.Array.forEach; + const forEach: typeof core.Array.forEach; export = forEach; } declare module "core-js/fn/array/from" { - var from: typeof core.Array.from; + const from: typeof core.Array.from; export = from; } declare module "core-js/fn/array/includes" { - var includes: typeof core.Array.includes; + const includes: typeof core.Array.includes; export = includes; } declare module "core-js/fn/array/index-of" { - var indexOf: typeof core.Array.indexOf; + const indexOf: typeof core.Array.indexOf; export = indexOf; } declare module "core-js/fn/array/join" { - var join: typeof core.Array.join; + const join: typeof core.Array.join; export = join; } declare module "core-js/fn/array/keys" { - var keys: typeof core.Array.keys; + const keys: typeof core.Array.keys; export = keys; } declare module "core-js/fn/array/last-index-of" { - var lastIndexOf: typeof core.Array.lastIndexOf; + const lastIndexOf: typeof core.Array.lastIndexOf; export = lastIndexOf; } declare module "core-js/fn/array/map" { - var map: typeof core.Array.map; + const map: typeof core.Array.map; export = map; } declare module "core-js/fn/array/of" { - var of: typeof core.Array.of; + const of: typeof core.Array.of; export = of; } declare module "core-js/fn/array/pop" { - var pop: typeof core.Array.pop; + const pop: typeof core.Array.pop; export = pop; } declare module "core-js/fn/array/push" { - var push: typeof core.Array.push; + const push: typeof core.Array.push; export = push; } declare module "core-js/fn/array/reduce" { - var reduce: typeof core.Array.reduce; + const reduce: typeof core.Array.reduce; export = reduce; } declare module "core-js/fn/array/reduce-right" { - var reduceRight: typeof core.Array.reduceRight; + const reduceRight: typeof core.Array.reduceRight; export = reduceRight; } declare module "core-js/fn/array/reverse" { - var reverse: typeof core.Array.reverse; + const reverse: typeof core.Array.reverse; export = reverse; } declare module "core-js/fn/array/shift" { - var shift: typeof core.Array.shift; + const shift: typeof core.Array.shift; export = shift; } declare module "core-js/fn/array/slice" { - var slice: typeof core.Array.slice; + const slice: typeof core.Array.slice; export = slice; } declare module "core-js/fn/array/some" { - var some: typeof core.Array.some; + const some: typeof core.Array.some; export = some; } declare module "core-js/fn/array/sort" { - var sort: typeof core.Array.sort; + const sort: typeof core.Array.sort; export = sort; } declare module "core-js/fn/array/splice" { - var splice: typeof core.Array.splice; + const splice: typeof core.Array.splice; export = splice; } declare module "core-js/fn/array/turn" { - var turn: typeof core.Array.turn; + const turn: typeof core.Array.turn; export = turn; } declare module "core-js/fn/array/unshift" { - var unshift: typeof core.Array.unshift; + const unshift: typeof core.Array.unshift; export = unshift; } declare module "core-js/fn/array/values" { - var values: typeof core.Array.values; + const values: typeof core.Array.values; export = values; } declare module "core-js/fn/date" { - var Date: typeof core.Date; + const Date: typeof core.Date; export = Date; } declare module "core-js/fn/date/add-locale" { - var addLocale: typeof core.addLocale; + const addLocale: typeof core.addLocale; export = addLocale; } declare module "core-js/fn/date/format" { - var format: typeof core.Date.format; + const format: typeof core.Date.format; export = format; } declare module "core-js/fn/date/formatUTC" { - var formatUTC: typeof core.Date.formatUTC; + const formatUTC: typeof core.Date.formatUTC; export = formatUTC; } declare module "core-js/fn/function" { - var Function: typeof core.Function; + const Function: typeof core.Function; export = Function; } declare module "core-js/fn/function/has-instance" { - var hasInstance: (value: any) => boolean; + const hasInstance: (value: any) => boolean; export = hasInstance; } declare module "core-js/fn/function/name" { } declare module "core-js/fn/function/part" { - var part: typeof core.Function.part; + const part: typeof core.Function.part; export = part; } declare module "core-js/fn/math" { - var Math: typeof core.Math; + const Math: typeof core.Math; export = Math; } declare module "core-js/fn/math/acosh" { - var acosh: typeof core.Math.acosh; + const acosh: typeof core.Math.acosh; export = acosh; } declare module "core-js/fn/math/asinh" { - var asinh: typeof core.Math.asinh; + const asinh: typeof core.Math.asinh; export = asinh; } declare module "core-js/fn/math/atanh" { - var atanh: typeof core.Math.atanh; + const atanh: typeof core.Math.atanh; export = atanh; } declare module "core-js/fn/math/cbrt" { - var cbrt: typeof core.Math.cbrt; + const cbrt: typeof core.Math.cbrt; export = cbrt; } declare module "core-js/fn/math/clz32" { - var clz32: typeof core.Math.clz32; + const clz32: typeof core.Math.clz32; export = clz32; } declare module "core-js/fn/math/cosh" { - var cosh: typeof core.Math.cosh; + const cosh: typeof core.Math.cosh; export = cosh; } declare module "core-js/fn/math/expm1" { - var expm1: typeof core.Math.expm1; + const expm1: typeof core.Math.expm1; export = expm1; } declare module "core-js/fn/math/fround" { - var fround: typeof core.Math.fround; + const fround: typeof core.Math.fround; export = fround; } declare module "core-js/fn/math/hypot" { - var hypot: typeof core.Math.hypot; + const hypot: typeof core.Math.hypot; export = hypot; } declare module "core-js/fn/math/imul" { - var imul: typeof core.Math.imul; + const imul: typeof core.Math.imul; export = imul; } declare module "core-js/fn/math/log10" { - var log10: typeof core.Math.log10; + const log10: typeof core.Math.log10; export = log10; } declare module "core-js/fn/math/log1p" { - var log1p: typeof core.Math.log1p; + const log1p: typeof core.Math.log1p; export = log1p; } declare module "core-js/fn/math/log2" { - var log2: typeof core.Math.log2; + const log2: typeof core.Math.log2; export = log2; } declare module "core-js/fn/math/sign" { - var sign: typeof core.Math.sign; + const sign: typeof core.Math.sign; export = sign; } declare module "core-js/fn/math/sinh" { - var sinh: typeof core.Math.sinh; + const sinh: typeof core.Math.sinh; export = sinh; } declare module "core-js/fn/math/tanh" { - var tanh: typeof core.Math.tanh; + const tanh: typeof core.Math.tanh; export = tanh; } declare module "core-js/fn/math/trunc" { - var trunc: typeof core.Math.trunc; + const trunc: typeof core.Math.trunc; export = trunc; } declare module "core-js/fn/number" { - var Number: typeof core.Number; + const Number: typeof core.Number; export = Number; } declare module "core-js/fn/number/epsilon" { - var EPSILON: typeof core.Number.EPSILON; + const EPSILON: typeof core.Number.EPSILON; export = EPSILON; } declare module "core-js/fn/number/is-finite" { - var isFinite: typeof core.Number.isFinite; + const isFinite: typeof core.Number.isFinite; export = isFinite; } declare module "core-js/fn/number/is-integer" { - var isInteger: typeof core.Number.isInteger; + const isInteger: typeof core.Number.isInteger; export = isInteger; } declare module "core-js/fn/number/is-nan" { - var isNaN: typeof core.Number.isNaN; + const isNaN: typeof core.Number.isNaN; export = isNaN; } declare module "core-js/fn/number/is-safe-integer" { - var isSafeInteger: typeof core.Number.isSafeInteger; + const isSafeInteger: typeof core.Number.isSafeInteger; export = isSafeInteger; } declare module "core-js/fn/number/max-safe-integer" { - var MAX_SAFE_INTEGER: typeof core.Number.MAX_SAFE_INTEGER; + const MAX_SAFE_INTEGER: typeof core.Number.MAX_SAFE_INTEGER; export = MAX_SAFE_INTEGER; } declare module "core-js/fn/number/min-safe-integer" { - var MIN_SAFE_INTEGER: typeof core.Number.MIN_SAFE_INTEGER; + const MIN_SAFE_INTEGER: typeof core.Number.MIN_SAFE_INTEGER; export = MIN_SAFE_INTEGER; } declare module "core-js/fn/number/parse-float" { - var parseFloat: typeof core.Number.parseFloat; + const parseFloat: typeof core.Number.parseFloat; export = parseFloat; } declare module "core-js/fn/number/parse-int" { - var parseInt: typeof core.Number.parseInt; + const parseInt: typeof core.Number.parseInt; export = parseInt; } declare module "core-js/fn/number/random" { - var random: typeof core.Number.random; + const random: typeof core.Number.random; export = random; } declare module "core-js/fn/object" { - var Object: typeof core.Object; + const Object: typeof core.Object; export = Object; } declare module "core-js/fn/object/assign" { - var assign: typeof core.Object.assign; + const assign: typeof core.Object.assign; export = assign; } declare module "core-js/fn/object/classof" { - var classof: typeof core.Object.classof; + const classof: typeof core.Object.classof; export = classof; } declare module "core-js/fn/object/create" { - var create: typeof core.Object.create; + const create: typeof core.Object.create; export = create; } declare module "core-js/fn/object/define" { - var define: typeof core.Object.define; + const define: typeof core.Object.define; export = define; } declare module "core-js/fn/object/define-properties" { - var defineProperties: typeof core.Object.defineProperties; + const defineProperties: typeof core.Object.defineProperties; export = defineProperties; } declare module "core-js/fn/object/define-property" { - var defineProperty: typeof core.Object.defineProperty; + const defineProperty: typeof core.Object.defineProperty; export = defineProperty; } declare module "core-js/fn/object/entries" { - var entries: typeof core.Object.entries; + const entries: typeof core.Object.entries; export = entries; } declare module "core-js/fn/object/freeze" { - var freeze: typeof core.Object.freeze; + const freeze: typeof core.Object.freeze; export = freeze; } declare module "core-js/fn/object/get-own-property-descriptor" { - var getOwnPropertyDescriptor: typeof core.Object.getOwnPropertyDescriptor; + const getOwnPropertyDescriptor: typeof core.Object.getOwnPropertyDescriptor; export = getOwnPropertyDescriptor; } declare module "core-js/fn/object/get-own-property-descriptors" { - var getOwnPropertyDescriptors: typeof core.Object.getOwnPropertyDescriptors; + const getOwnPropertyDescriptors: typeof core.Object.getOwnPropertyDescriptors; export = getOwnPropertyDescriptors; } declare module "core-js/fn/object/get-own-property-names" { - var getOwnPropertyNames: typeof core.Object.getOwnPropertyNames; + const getOwnPropertyNames: typeof core.Object.getOwnPropertyNames; export = getOwnPropertyNames; } declare module "core-js/fn/object/get-own-property-symbols" { - var getOwnPropertySymbols: typeof core.Object.getOwnPropertySymbols; + const getOwnPropertySymbols: typeof core.Object.getOwnPropertySymbols; export = getOwnPropertySymbols; } declare module "core-js/fn/object/get-prototype-of" { - var getPrototypeOf: typeof core.Object.getPrototypeOf; + const getPrototypeOf: typeof core.Object.getPrototypeOf; export = getPrototypeOf; } declare module "core-js/fn/object/is" { - var is: typeof core.Object.is; + const is: typeof core.Object.is; export = is; } declare module "core-js/fn/object/is-extensible" { - var isExtensible: typeof core.Object.isExtensible; + const isExtensible: typeof core.Object.isExtensible; export = isExtensible; } declare module "core-js/fn/object/is-frozen" { - var isFrozen: typeof core.Object.isFrozen; + const isFrozen: typeof core.Object.isFrozen; export = isFrozen; } declare module "core-js/fn/object/is-object" { - var isObject: typeof core.Object.isObject; + const isObject: typeof core.Object.isObject; export = isObject; } declare module "core-js/fn/object/is-sealed" { - var isSealed: typeof core.Object.isSealed; + const isSealed: typeof core.Object.isSealed; export = isSealed; } declare module "core-js/fn/object/keys" { - var keys: typeof core.Object.keys; + const keys: typeof core.Object.keys; export = keys; } declare module "core-js/fn/object/make" { - var make: typeof core.Object.make; + const make: typeof core.Object.make; export = make; } declare module "core-js/fn/object/prevent-extensions" { - var preventExtensions: typeof core.Object.preventExtensions; + const preventExtensions: typeof core.Object.preventExtensions; export = preventExtensions; } declare module "core-js/fn/object/seal" { - var seal: typeof core.Object.seal; + const seal: typeof core.Object.seal; export = seal; } declare module "core-js/fn/object/set-prototype-of" { - var setPrototypeOf: typeof core.Object.setPrototypeOf; + const setPrototypeOf: typeof core.Object.setPrototypeOf; export = setPrototypeOf; } declare module "core-js/fn/object/values" { - var values: typeof core.Object.values; + const values: typeof core.Object.values; export = values; } declare module "core-js/fn/reflect" { - var Reflect: typeof core.Reflect; + const Reflect: typeof core.Reflect; export = Reflect; } declare module "core-js/fn/reflect/apply" { - var apply: typeof core.Reflect.apply; + const apply: typeof core.Reflect.apply; export = apply; } declare module "core-js/fn/reflect/construct" { - var construct: typeof core.Reflect.construct; + const construct: typeof core.Reflect.construct; export = construct; } declare module "core-js/fn/reflect/define-property" { - var defineProperty: typeof core.Reflect.defineProperty; + const defineProperty: typeof core.Reflect.defineProperty; export = defineProperty; } declare module "core-js/fn/reflect/delete-property" { - var deleteProperty: typeof core.Reflect.deleteProperty; + const deleteProperty: typeof core.Reflect.deleteProperty; export = deleteProperty; } declare module "core-js/fn/reflect/enumerate" { - var enumerate: typeof core.Reflect.enumerate; + const enumerate: typeof core.Reflect.enumerate; export = enumerate; } declare module "core-js/fn/reflect/get" { - var get: typeof core.Reflect.get; + const get: typeof core.Reflect.get; export = get; } declare module "core-js/fn/reflect/get-own-property-descriptor" { - var getOwnPropertyDescriptor: typeof core.Reflect.getOwnPropertyDescriptor; + const getOwnPropertyDescriptor: typeof core.Reflect.getOwnPropertyDescriptor; export = getOwnPropertyDescriptor; } declare module "core-js/fn/reflect/get-prototype-of" { - var getPrototypeOf: typeof core.Reflect.getPrototypeOf; + const getPrototypeOf: typeof core.Reflect.getPrototypeOf; export = getPrototypeOf; } declare module "core-js/fn/reflect/has" { - var has: typeof core.Reflect.has; + const has: typeof core.Reflect.has; export = has; } declare module "core-js/fn/reflect/is-extensible" { - var isExtensible: typeof core.Reflect.isExtensible; + const isExtensible: typeof core.Reflect.isExtensible; export = isExtensible; } declare module "core-js/fn/reflect/own-keys" { - var ownKeys: typeof core.Reflect.ownKeys; + const ownKeys: typeof core.Reflect.ownKeys; export = ownKeys; } declare module "core-js/fn/reflect/prevent-extensions" { - var preventExtensions: typeof core.Reflect.preventExtensions; + const preventExtensions: typeof core.Reflect.preventExtensions; export = preventExtensions; } declare module "core-js/fn/reflect/set" { - var set: typeof core.Reflect.set; + const set: typeof core.Reflect.set; export = set; } declare module "core-js/fn/reflect/set-prototype-of" { - var setPrototypeOf: typeof core.Reflect.setPrototypeOf; + const setPrototypeOf: typeof core.Reflect.setPrototypeOf; export = setPrototypeOf; } declare module "core-js/fn/regexp" { - var RegExp: typeof core.RegExp; + const RegExp: typeof core.RegExp; export = RegExp; } declare module "core-js/fn/regexp/escape" { - var escape: typeof core.RegExp.escape; + const escape: typeof core.RegExp.escape; export = escape; } declare module "core-js/fn/string" { - var String: typeof core.String; + const String: typeof core.String; export = String; } declare module "core-js/fn/string/at" { - var at: typeof core.String.at; + const at: typeof core.String.at; export = at; } declare module "core-js/fn/string/code-point-at" { - var codePointAt: typeof core.String.codePointAt; + const codePointAt: typeof core.String.codePointAt; export = codePointAt; } declare module "core-js/fn/string/ends-with" { - var endsWith: typeof core.String.endsWith; + const endsWith: typeof core.String.endsWith; export = endsWith; } declare module "core-js/fn/string/escape-html" { - var escapeHTML: typeof core.String.escapeHTML; + const escapeHTML: typeof core.String.escapeHTML; export = escapeHTML; } declare module "core-js/fn/string/from-code-point" { - var fromCodePoint: typeof core.String.fromCodePoint; + const fromCodePoint: typeof core.String.fromCodePoint; export = fromCodePoint; } declare module "core-js/fn/string/includes" { - var includes: typeof core.String.includes; + const includes: typeof core.String.includes; export = includes; } declare module "core-js/fn/string/lpad" { - var lpad: typeof core.String.lpad; + const lpad: typeof core.String.lpad; export = lpad; } declare module "core-js/fn/string/raw" { - var raw: typeof core.String.raw; + const raw: typeof core.String.raw; export = raw; } declare module "core-js/fn/string/repeat" { - var repeat: typeof core.String.repeat; + const repeat: typeof core.String.repeat; export = repeat; } declare module "core-js/fn/string/rpad" { - var rpad: typeof core.String.rpad; + const rpad: typeof core.String.rpad; export = rpad; } declare module "core-js/fn/string/starts-with" { - var startsWith: typeof core.String.startsWith; + const startsWith: typeof core.String.startsWith; export = startsWith; } declare module "core-js/fn/string/unescape-html" { - var unescapeHTML: typeof core.String.unescapeHTML; + const unescapeHTML: typeof core.String.unescapeHTML; export = unescapeHTML; } declare module "core-js/fn/symbol" { - var Symbol: typeof core.Symbol; + const Symbol: typeof core.Symbol; export = Symbol; } declare module "core-js/fn/symbol/for" { - var _for: typeof core.Symbol.for; + const _for: typeof core.Symbol.for; export = _for; } declare module "core-js/fn/symbol/has-instance" { - var hasInstance: typeof core.Symbol.hasInstance; + const hasInstance: typeof core.Symbol.hasInstance; export = hasInstance; } declare module "core-js/fn/symbol/is-concat-spreadable" { - var isConcatSpreadable: typeof core.Symbol.isConcatSpreadable; + const isConcatSpreadable: typeof core.Symbol.isConcatSpreadable; export = isConcatSpreadable; } declare module "core-js/fn/symbol/iterator" { - var iterator: typeof core.Symbol.iterator; + const iterator: typeof core.Symbol.iterator; export = iterator; } declare module "core-js/fn/symbol/key-for" { - var keyFor: typeof core.Symbol.keyFor; + const keyFor: typeof core.Symbol.keyFor; export = keyFor; } declare module "core-js/fn/symbol/match" { - var match: typeof core.Symbol.match; + const match: typeof core.Symbol.match; export = match; } declare module "core-js/fn/symbol/replace" { - var replace: typeof core.Symbol.replace; + const replace: typeof core.Symbol.replace; export = replace; } declare module "core-js/fn/symbol/search" { - var search: typeof core.Symbol.search; + const search: typeof core.Symbol.search; export = search; } declare module "core-js/fn/symbol/species" { - var species: typeof core.Symbol.species; + const species: typeof core.Symbol.species; export = species; } declare module "core-js/fn/symbol/split" { - var split: typeof core.Symbol.split; + const split: typeof core.Symbol.split; export = split; } declare module "core-js/fn/symbol/to-primitive" { - var toPrimitive: typeof core.Symbol.toPrimitive; + const toPrimitive: typeof core.Symbol.toPrimitive; export = toPrimitive; } declare module "core-js/fn/symbol/to-string-tag" { - var toStringTag: typeof core.Symbol.toStringTag; + const toStringTag: typeof core.Symbol.toStringTag; export = toStringTag; } declare module "core-js/fn/symbol/unscopables" { - var unscopables: typeof core.Symbol.unscopables; + const unscopables: typeof core.Symbol.unscopables; export = unscopables; } declare module "core-js/es5" { @@ -1335,93 +1335,93 @@ declare module "core-js/es6" { export = core; } declare module "core-js/es6/array" { - var Array: typeof core.Array; + const Array: typeof core.Array; export = Array; } declare module "core-js/es6/function" { - var Function: typeof core.Function; + const Function: typeof core.Function; export = Function; } declare module "core-js/es6/map" { - var Map: typeof core.Map; + const Map: typeof core.Map; export = Map; } declare module "core-js/es6/math" { - var Math: typeof core.Math; + const Math: typeof core.Math; export = Math; } declare module "core-js/es6/number" { - var Number: typeof core.Number; + const Number: typeof core.Number; export = Number; } declare module "core-js/es6/object" { - var Object: typeof core.Object; + const Object: typeof core.Object; export = Object; } declare module "core-js/es6/promise" { - var Promise: typeof core.Promise; + const Promise: typeof core.Promise; export = Promise; } declare module "core-js/es6/reflect" { - var Reflect: typeof core.Reflect; + const Reflect: typeof core.Reflect; export = Reflect; } declare module "core-js/es6/regexp" { - var RegExp: typeof core.RegExp; + const RegExp: typeof core.RegExp; export = RegExp; } declare module "core-js/es6/set" { - var Set: typeof core.Set; + const Set: typeof core.Set; export = Set; } declare module "core-js/es6/string" { - var String: typeof core.String; + const String: typeof core.String; export = String; } declare module "core-js/es6/symbol" { - var Symbol: typeof core.Symbol; + const Symbol: typeof core.Symbol; export = Symbol; } declare module "core-js/es6/weak-map" { - var WeakMap: typeof core.WeakMap; + const WeakMap: typeof core.WeakMap; export = WeakMap; } declare module "core-js/es6/weak-set" { - var WeakSet: typeof core.WeakSet; + const WeakSet: typeof core.WeakSet; export = WeakSet; } declare module "core-js/es7" { export = core; } declare module "core-js/es7/array" { - var Array: typeof core.Array; + const Array: typeof core.Array; export = Array; } declare module "core-js/es7/map" { - var Map: typeof core.Map; + const Map: typeof core.Map; export = Map; } declare module "core-js/es7/object" { - var Object: typeof core.Object; + const Object: typeof core.Object; export = Object; } declare module "core-js/es7/regexp" { - var RegExp: typeof core.RegExp; + const RegExp: typeof core.RegExp; export = RegExp; } declare module "core-js/es7/set" { - var Set: typeof core.Set; + const Set: typeof core.Set; export = Set; } declare module "core-js/es7/string" { - var String: typeof core.String; + const String: typeof core.String; export = String; } declare module "core-js/js" { export = core; } declare module "core-js/js/array" { - var Array: typeof core.Array; + const Array: typeof core.Array; export = Array; } declare module "core-js/web" { @@ -1450,47 +1450,47 @@ declare module "core-js/library/core/$for" { export = $for; } declare module "core-js/library/core/_" { - var _: typeof core._; + const _: typeof core._; export = _; } declare module "core-js/library/core/array" { - var Array: typeof core.Array; + const Array: typeof core.Array; export = Array; } declare module "core-js/library/core/date" { - var Date: typeof core.Date; + const Date: typeof core.Date; export = Date; } declare module "core-js/library/core/delay" { - var delay: typeof core.delay; + const delay: typeof core.delay; export = delay; } declare module "core-js/library/core/dict" { - var Dict: typeof core.Dict; + const Dict: typeof core.Dict; export = Dict; } declare module "core-js/library/core/function" { - var Function: typeof core.Function; + const Function: typeof core.Function; export = Function; } declare module "core-js/library/core/global" { - var global: typeof core.global; + const global: typeof core.global; export = global; } declare module "core-js/library/core/log" { - var log: typeof core.log; + const log: typeof core.log; export = log; } declare module "core-js/library/core/number" { - var Number: typeof core.Number; + const Number: typeof core.Number; export = Number; } declare module "core-js/library/core/object" { - var Object: typeof core.Object; + const Object: typeof core.Object; export = Object; } declare module "core-js/library/core/string" { - var String: typeof core.String; + const String: typeof core.String; export = String; } declare module "core-js/library/fn/$for" { @@ -1498,613 +1498,613 @@ declare module "core-js/library/fn/$for" { export = $for; } declare module "core-js/library/fn/_" { - var _: typeof core._; + const _: typeof core._; export = _; } declare module "core-js/library/fn/clear-immediate" { - var clearImmediate: typeof core.clearImmediate; + const clearImmediate: typeof core.clearImmediate; export = clearImmediate; } declare module "core-js/library/fn/delay" { - var delay: typeof core.delay; + const delay: typeof core.delay; export = delay; } declare module "core-js/library/fn/dict" { - var Dict: typeof core.Dict; + const Dict: typeof core.Dict; export = Dict; } declare module "core-js/library/fn/get-iterator" { - var getIterator: typeof core.getIterator; + const getIterator: typeof core.getIterator; export = getIterator; } declare module "core-js/library/fn/global" { - var global: typeof core.global; + const global: typeof core.global; export = global; } declare module "core-js/library/fn/is-iterable" { - var isIterable: typeof core.isIterable; + const isIterable: typeof core.isIterable; export = isIterable; } declare module "core-js/library/fn/log" { - var log: typeof core.log; + const log: typeof core.log; export = log; } declare module "core-js/library/fn/map" { - var Map: typeof core.Map; + const Map: typeof core.Map; export = Map; } declare module "core-js/library/fn/promise" { - var Promise: typeof core.Promise; + const Promise: typeof core.Promise; export = Promise; } declare module "core-js/library/fn/set" { - var Set: typeof core.Set; + const Set: typeof core.Set; export = Set; } declare module "core-js/library/fn/set-immediate" { - var setImmediate: typeof core.setImmediate; + const setImmediate: typeof core.setImmediate; export = setImmediate; } declare module "core-js/library/fn/set-interval" { - var setInterval: typeof core.setInterval; + const setInterval: typeof core.setInterval; export = setInterval; } declare module "core-js/library/fn/set-timeout" { - var setTimeout: typeof core.setTimeout; + const setTimeout: typeof core.setTimeout; export = setTimeout; } declare module "core-js/library/fn/weak-map" { - var WeakMap: typeof core.WeakMap; + const WeakMap: typeof core.WeakMap; export = WeakMap; } declare module "core-js/library/fn/weak-set" { - var WeakSet: typeof core.WeakSet; + const WeakSet: typeof core.WeakSet; export = WeakSet; } declare module "core-js/library/fn/array" { - var Array: typeof core.Array; + const Array: typeof core.Array; export = Array; } declare module "core-js/library/fn/array/concat" { - var concat: typeof core.Array.concat; + const concat: typeof core.Array.concat; export = concat; } declare module "core-js/library/fn/array/copy-within" { - var copyWithin: typeof core.Array.copyWithin; + const copyWithin: typeof core.Array.copyWithin; export = copyWithin; } declare module "core-js/library/fn/array/entries" { - var entries: typeof core.Array.entries; + const entries: typeof core.Array.entries; export = entries; } declare module "core-js/library/fn/array/every" { - var every: typeof core.Array.every; + const every: typeof core.Array.every; export = every; } declare module "core-js/library/fn/array/fill" { - var fill: typeof core.Array.fill; + const fill: typeof core.Array.fill; export = fill; } declare module "core-js/library/fn/array/filter" { - var filter: typeof core.Array.filter; + const filter: typeof core.Array.filter; export = filter; } declare module "core-js/library/fn/array/find" { - var find: typeof core.Array.find; + const find: typeof core.Array.find; export = find; } declare module "core-js/library/fn/array/find-index" { - var findIndex: typeof core.Array.findIndex; + const findIndex: typeof core.Array.findIndex; export = findIndex; } declare module "core-js/library/fn/array/for-each" { - var forEach: typeof core.Array.forEach; + const forEach: typeof core.Array.forEach; export = forEach; } declare module "core-js/library/fn/array/from" { - var from: typeof core.Array.from; + const from: typeof core.Array.from; export = from; } declare module "core-js/library/fn/array/includes" { - var includes: typeof core.Array.includes; + const includes: typeof core.Array.includes; export = includes; } declare module "core-js/library/fn/array/index-of" { - var indexOf: typeof core.Array.indexOf; + const indexOf: typeof core.Array.indexOf; export = indexOf; } declare module "core-js/library/fn/array/join" { - var join: typeof core.Array.join; + const join: typeof core.Array.join; export = join; } declare module "core-js/library/fn/array/keys" { - var keys: typeof core.Array.keys; + const keys: typeof core.Array.keys; export = keys; } declare module "core-js/library/fn/array/last-index-of" { - var lastIndexOf: typeof core.Array.lastIndexOf; + const lastIndexOf: typeof core.Array.lastIndexOf; export = lastIndexOf; } declare module "core-js/library/fn/array/map" { - var map: typeof core.Array.map; + const map: typeof core.Array.map; export = map; } declare module "core-js/library/fn/array/of" { - var of: typeof core.Array.of; + const of: typeof core.Array.of; export = of; } declare module "core-js/library/fn/array/pop" { - var pop: typeof core.Array.pop; + const pop: typeof core.Array.pop; export = pop; } declare module "core-js/library/fn/array/push" { - var push: typeof core.Array.push; + const push: typeof core.Array.push; export = push; } declare module "core-js/library/fn/array/reduce" { - var reduce: typeof core.Array.reduce; + const reduce: typeof core.Array.reduce; export = reduce; } declare module "core-js/library/fn/array/reduce-right" { - var reduceRight: typeof core.Array.reduceRight; + const reduceRight: typeof core.Array.reduceRight; export = reduceRight; } declare module "core-js/library/fn/array/reverse" { - var reverse: typeof core.Array.reverse; + const reverse: typeof core.Array.reverse; export = reverse; } declare module "core-js/library/fn/array/shift" { - var shift: typeof core.Array.shift; + const shift: typeof core.Array.shift; export = shift; } declare module "core-js/library/fn/array/slice" { - var slice: typeof core.Array.slice; + const slice: typeof core.Array.slice; export = slice; } declare module "core-js/library/fn/array/some" { - var some: typeof core.Array.some; + const some: typeof core.Array.some; export = some; } declare module "core-js/library/fn/array/sort" { - var sort: typeof core.Array.sort; + const sort: typeof core.Array.sort; export = sort; } declare module "core-js/library/fn/array/splice" { - var splice: typeof core.Array.splice; + const splice: typeof core.Array.splice; export = splice; } declare module "core-js/library/fn/array/turn" { - var turn: typeof core.Array.turn; + const turn: typeof core.Array.turn; export = turn; } declare module "core-js/library/fn/array/unshift" { - var unshift: typeof core.Array.unshift; + const unshift: typeof core.Array.unshift; export = unshift; } declare module "core-js/library/fn/array/values" { - var values: typeof core.Array.values; + const values: typeof core.Array.values; export = values; } declare module "core-js/library/fn/date" { - var Date: typeof core.Date; + const Date: typeof core.Date; export = Date; } declare module "core-js/library/fn/date/add-locale" { - var addLocale: typeof core.addLocale; + const addLocale: typeof core.addLocale; export = addLocale; } declare module "core-js/library/fn/date/format" { - var format: typeof core.Date.format; + const format: typeof core.Date.format; export = format; } declare module "core-js/library/fn/date/formatUTC" { - var formatUTC: typeof core.Date.formatUTC; + const formatUTC: typeof core.Date.formatUTC; export = formatUTC; } declare module "core-js/library/fn/function" { - var Function: typeof core.Function; + const Function: typeof core.Function; export = Function; } declare module "core-js/library/fn/function/has-instance" { - var hasInstance: (value: any) => boolean; + const hasInstance: (value: any) => boolean; export = hasInstance; } declare module "core-js/library/fn/function/name" { } declare module "core-js/library/fn/function/part" { - var part: typeof core.Function.part; + const part: typeof core.Function.part; export = part; } declare module "core-js/library/fn/math" { - var Math: typeof core.Math; + const Math: typeof core.Math; export = Math; } declare module "core-js/library/fn/math/acosh" { - var acosh: typeof core.Math.acosh; + const acosh: typeof core.Math.acosh; export = acosh; } declare module "core-js/library/fn/math/asinh" { - var asinh: typeof core.Math.asinh; + const asinh: typeof core.Math.asinh; export = asinh; } declare module "core-js/library/fn/math/atanh" { - var atanh: typeof core.Math.atanh; + const atanh: typeof core.Math.atanh; export = atanh; } declare module "core-js/library/fn/math/cbrt" { - var cbrt: typeof core.Math.cbrt; + const cbrt: typeof core.Math.cbrt; export = cbrt; } declare module "core-js/library/fn/math/clz32" { - var clz32: typeof core.Math.clz32; + const clz32: typeof core.Math.clz32; export = clz32; } declare module "core-js/library/fn/math/cosh" { - var cosh: typeof core.Math.cosh; + const cosh: typeof core.Math.cosh; export = cosh; } declare module "core-js/library/fn/math/expm1" { - var expm1: typeof core.Math.expm1; + const expm1: typeof core.Math.expm1; export = expm1; } declare module "core-js/library/fn/math/fround" { - var fround: typeof core.Math.fround; + const fround: typeof core.Math.fround; export = fround; } declare module "core-js/library/fn/math/hypot" { - var hypot: typeof core.Math.hypot; + const hypot: typeof core.Math.hypot; export = hypot; } declare module "core-js/library/fn/math/imul" { - var imul: typeof core.Math.imul; + const imul: typeof core.Math.imul; export = imul; } declare module "core-js/library/fn/math/log10" { - var log10: typeof core.Math.log10; + const log10: typeof core.Math.log10; export = log10; } declare module "core-js/library/fn/math/log1p" { - var log1p: typeof core.Math.log1p; + const log1p: typeof core.Math.log1p; export = log1p; } declare module "core-js/library/fn/math/log2" { - var log2: typeof core.Math.log2; + const log2: typeof core.Math.log2; export = log2; } declare module "core-js/library/fn/math/sign" { - var sign: typeof core.Math.sign; + const sign: typeof core.Math.sign; export = sign; } declare module "core-js/library/fn/math/sinh" { - var sinh: typeof core.Math.sinh; + const sinh: typeof core.Math.sinh; export = sinh; } declare module "core-js/library/fn/math/tanh" { - var tanh: typeof core.Math.tanh; + const tanh: typeof core.Math.tanh; export = tanh; } declare module "core-js/library/fn/math/trunc" { - var trunc: typeof core.Math.trunc; + const trunc: typeof core.Math.trunc; export = trunc; } declare module "core-js/library/fn/number" { - var Number: typeof core.Number; + const Number: typeof core.Number; export = Number; } declare module "core-js/library/fn/number/epsilon" { - var EPSILON: typeof core.Number.EPSILON; + const EPSILON: typeof core.Number.EPSILON; export = EPSILON; } declare module "core-js/library/fn/number/is-finite" { - var isFinite: typeof core.Number.isFinite; + const isFinite: typeof core.Number.isFinite; export = isFinite; } declare module "core-js/library/fn/number/is-integer" { - var isInteger: typeof core.Number.isInteger; + const isInteger: typeof core.Number.isInteger; export = isInteger; } declare module "core-js/library/fn/number/is-nan" { - var isNaN: typeof core.Number.isNaN; + const isNaN: typeof core.Number.isNaN; export = isNaN; } declare module "core-js/library/fn/number/is-safe-integer" { - var isSafeInteger: typeof core.Number.isSafeInteger; + const isSafeInteger: typeof core.Number.isSafeInteger; export = isSafeInteger; } declare module "core-js/library/fn/number/max-safe-integer" { - var MAX_SAFE_INTEGER: typeof core.Number.MAX_SAFE_INTEGER; + const MAX_SAFE_INTEGER: typeof core.Number.MAX_SAFE_INTEGER; export = MAX_SAFE_INTEGER; } declare module "core-js/library/fn/number/min-safe-integer" { - var MIN_SAFE_INTEGER: typeof core.Number.MIN_SAFE_INTEGER; + const MIN_SAFE_INTEGER: typeof core.Number.MIN_SAFE_INTEGER; export = MIN_SAFE_INTEGER; } declare module "core-js/library/fn/number/parse-float" { - var parseFloat: typeof core.Number.parseFloat; + const parseFloat: typeof core.Number.parseFloat; export = parseFloat; } declare module "core-js/library/fn/number/parse-int" { - var parseInt: typeof core.Number.parseInt; + const parseInt: typeof core.Number.parseInt; export = parseInt; } declare module "core-js/library/fn/number/random" { - var random: typeof core.Number.random; + const random: typeof core.Number.random; export = random; } declare module "core-js/library/fn/object" { - var Object: typeof core.Object; + const Object: typeof core.Object; export = Object; } declare module "core-js/library/fn/object/assign" { - var assign: typeof core.Object.assign; + const assign: typeof core.Object.assign; export = assign; } declare module "core-js/library/fn/object/classof" { - var classof: typeof core.Object.classof; + const classof: typeof core.Object.classof; export = classof; } declare module "core-js/library/fn/object/create" { - var create: typeof core.Object.create; + const create: typeof core.Object.create; export = create; } declare module "core-js/library/fn/object/define" { - var define: typeof core.Object.define; + const define: typeof core.Object.define; export = define; } declare module "core-js/library/fn/object/define-properties" { - var defineProperties: typeof core.Object.defineProperties; + const defineProperties: typeof core.Object.defineProperties; export = defineProperties; } declare module "core-js/library/fn/object/define-property" { - var defineProperty: typeof core.Object.defineProperty; + const defineProperty: typeof core.Object.defineProperty; export = defineProperty; } declare module "core-js/library/fn/object/entries" { - var entries: typeof core.Object.entries; + const entries: typeof core.Object.entries; export = entries; } declare module "core-js/library/fn/object/freeze" { - var freeze: typeof core.Object.freeze; + const freeze: typeof core.Object.freeze; export = freeze; } declare module "core-js/library/fn/object/get-own-property-descriptor" { - var getOwnPropertyDescriptor: typeof core.Object.getOwnPropertyDescriptor; + const getOwnPropertyDescriptor: typeof core.Object.getOwnPropertyDescriptor; export = getOwnPropertyDescriptor; } declare module "core-js/library/fn/object/get-own-property-descriptors" { - var getOwnPropertyDescriptors: typeof core.Object.getOwnPropertyDescriptors; + const getOwnPropertyDescriptors: typeof core.Object.getOwnPropertyDescriptors; export = getOwnPropertyDescriptors; } declare module "core-js/library/fn/object/get-own-property-names" { - var getOwnPropertyNames: typeof core.Object.getOwnPropertyNames; + const getOwnPropertyNames: typeof core.Object.getOwnPropertyNames; export = getOwnPropertyNames; } declare module "core-js/library/fn/object/get-own-property-symbols" { - var getOwnPropertySymbols: typeof core.Object.getOwnPropertySymbols; + const getOwnPropertySymbols: typeof core.Object.getOwnPropertySymbols; export = getOwnPropertySymbols; } declare module "core-js/library/fn/object/get-prototype-of" { - var getPrototypeOf: typeof core.Object.getPrototypeOf; + const getPrototypeOf: typeof core.Object.getPrototypeOf; export = getPrototypeOf; } declare module "core-js/library/fn/object/is" { - var is: typeof core.Object.is; + const is: typeof core.Object.is; export = is; } declare module "core-js/library/fn/object/is-extensible" { - var isExtensible: typeof core.Object.isExtensible; + const isExtensible: typeof core.Object.isExtensible; export = isExtensible; } declare module "core-js/library/fn/object/is-frozen" { - var isFrozen: typeof core.Object.isFrozen; + const isFrozen: typeof core.Object.isFrozen; export = isFrozen; } declare module "core-js/library/fn/object/is-object" { - var isObject: typeof core.Object.isObject; + const isObject: typeof core.Object.isObject; export = isObject; } declare module "core-js/library/fn/object/is-sealed" { - var isSealed: typeof core.Object.isSealed; + const isSealed: typeof core.Object.isSealed; export = isSealed; } declare module "core-js/library/fn/object/keys" { - var keys: typeof core.Object.keys; + const keys: typeof core.Object.keys; export = keys; } declare module "core-js/library/fn/object/make" { - var make: typeof core.Object.make; + const make: typeof core.Object.make; export = make; } declare module "core-js/library/fn/object/prevent-extensions" { - var preventExtensions: typeof core.Object.preventExtensions; + const preventExtensions: typeof core.Object.preventExtensions; export = preventExtensions; } declare module "core-js/library/fn/object/seal" { - var seal: typeof core.Object.seal; + const seal: typeof core.Object.seal; export = seal; } declare module "core-js/library/fn/object/set-prototype-of" { - var setPrototypeOf: typeof core.Object.setPrototypeOf; + const setPrototypeOf: typeof core.Object.setPrototypeOf; export = setPrototypeOf; } declare module "core-js/library/fn/object/values" { - var values: typeof core.Object.values; + const values: typeof core.Object.values; export = values; } declare module "core-js/library/fn/reflect" { - var Reflect: typeof core.Reflect; + const Reflect: typeof core.Reflect; export = Reflect; } declare module "core-js/library/fn/reflect/apply" { - var apply: typeof core.Reflect.apply; + const apply: typeof core.Reflect.apply; export = apply; } declare module "core-js/library/fn/reflect/construct" { - var construct: typeof core.Reflect.construct; + const construct: typeof core.Reflect.construct; export = construct; } declare module "core-js/library/fn/reflect/define-property" { - var defineProperty: typeof core.Reflect.defineProperty; + const defineProperty: typeof core.Reflect.defineProperty; export = defineProperty; } declare module "core-js/library/fn/reflect/delete-property" { - var deleteProperty: typeof core.Reflect.deleteProperty; + const deleteProperty: typeof core.Reflect.deleteProperty; export = deleteProperty; } declare module "core-js/library/fn/reflect/enumerate" { - var enumerate: typeof core.Reflect.enumerate; + const enumerate: typeof core.Reflect.enumerate; export = enumerate; } declare module "core-js/library/fn/reflect/get" { - var get: typeof core.Reflect.get; + const get: typeof core.Reflect.get; export = get; } declare module "core-js/library/fn/reflect/get-own-property-descriptor" { - var getOwnPropertyDescriptor: typeof core.Reflect.getOwnPropertyDescriptor; + const getOwnPropertyDescriptor: typeof core.Reflect.getOwnPropertyDescriptor; export = getOwnPropertyDescriptor; } declare module "core-js/library/fn/reflect/get-prototype-of" { - var getPrototypeOf: typeof core.Reflect.getPrototypeOf; + const getPrototypeOf: typeof core.Reflect.getPrototypeOf; export = getPrototypeOf; } declare module "core-js/library/fn/reflect/has" { - var has: typeof core.Reflect.has; + const has: typeof core.Reflect.has; export = has; } declare module "core-js/library/fn/reflect/is-extensible" { - var isExtensible: typeof core.Reflect.isExtensible; + const isExtensible: typeof core.Reflect.isExtensible; export = isExtensible; } declare module "core-js/library/fn/reflect/own-keys" { - var ownKeys: typeof core.Reflect.ownKeys; + const ownKeys: typeof core.Reflect.ownKeys; export = ownKeys; } declare module "core-js/library/fn/reflect/prevent-extensions" { - var preventExtensions: typeof core.Reflect.preventExtensions; + const preventExtensions: typeof core.Reflect.preventExtensions; export = preventExtensions; } declare module "core-js/library/fn/reflect/set" { - var set: typeof core.Reflect.set; + const set: typeof core.Reflect.set; export = set; } declare module "core-js/library/fn/reflect/set-prototype-of" { - var setPrototypeOf: typeof core.Reflect.setPrototypeOf; + const setPrototypeOf: typeof core.Reflect.setPrototypeOf; export = setPrototypeOf; } declare module "core-js/library/fn/regexp" { - var RegExp: typeof core.RegExp; + const RegExp: typeof core.RegExp; export = RegExp; } declare module "core-js/library/fn/regexp/escape" { - var escape: typeof core.RegExp.escape; + const escape: typeof core.RegExp.escape; export = escape; } declare module "core-js/library/fn/string" { - var String: typeof core.String; + const String: typeof core.String; export = String; } declare module "core-js/library/fn/string/at" { - var at: typeof core.String.at; + const at: typeof core.String.at; export = at; } declare module "core-js/library/fn/string/code-point-at" { - var codePointAt: typeof core.String.codePointAt; + const codePointAt: typeof core.String.codePointAt; export = codePointAt; } declare module "core-js/library/fn/string/ends-with" { - var endsWith: typeof core.String.endsWith; + const endsWith: typeof core.String.endsWith; export = endsWith; } declare module "core-js/library/fn/string/escape-html" { - var escapeHTML: typeof core.String.escapeHTML; + const escapeHTML: typeof core.String.escapeHTML; export = escapeHTML; } declare module "core-js/library/fn/string/from-code-point" { - var fromCodePoint: typeof core.String.fromCodePoint; + const fromCodePoint: typeof core.String.fromCodePoint; export = fromCodePoint; } declare module "core-js/library/fn/string/includes" { - var includes: typeof core.String.includes; + const includes: typeof core.String.includes; export = includes; } declare module "core-js/library/fn/string/lpad" { - var lpad: typeof core.String.lpad; + const lpad: typeof core.String.lpad; export = lpad; } declare module "core-js/library/fn/string/raw" { - var raw: typeof core.String.raw; + const raw: typeof core.String.raw; export = raw; } declare module "core-js/library/fn/string/repeat" { - var repeat: typeof core.String.repeat; + const repeat: typeof core.String.repeat; export = repeat; } declare module "core-js/library/fn/string/rpad" { - var rpad: typeof core.String.rpad; + const rpad: typeof core.String.rpad; export = rpad; } declare module "core-js/library/fn/string/starts-with" { - var startsWith: typeof core.String.startsWith; + const startsWith: typeof core.String.startsWith; export = startsWith; } declare module "core-js/library/fn/string/unescape-html" { - var unescapeHTML: typeof core.String.unescapeHTML; + const unescapeHTML: typeof core.String.unescapeHTML; export = unescapeHTML; } declare module "core-js/library/fn/symbol" { - var Symbol: typeof core.Symbol; + const Symbol: typeof core.Symbol; export = Symbol; } declare module "core-js/library/fn/symbol/for" { - var _for: typeof core.Symbol.for; + const _for: typeof core.Symbol.for; export = _for; } declare module "core-js/library/fn/symbol/has-instance" { - var hasInstance: typeof core.Symbol.hasInstance; + const hasInstance: typeof core.Symbol.hasInstance; export = hasInstance; } declare module "core-js/library/fn/symbol/is-concat-spreadable" { - var isConcatSpreadable: typeof core.Symbol.isConcatSpreadable; + const isConcatSpreadable: typeof core.Symbol.isConcatSpreadable; export = isConcatSpreadable; } declare module "core-js/library/fn/symbol/iterator" { - var iterator: typeof core.Symbol.iterator; + const iterator: typeof core.Symbol.iterator; export = iterator; } declare module "core-js/library/fn/symbol/key-for" { - var keyFor: typeof core.Symbol.keyFor; + const keyFor: typeof core.Symbol.keyFor; export = keyFor; } declare module "core-js/library/fn/symbol/match" { - var match: typeof core.Symbol.match; + const match: typeof core.Symbol.match; export = match; } declare module "core-js/library/fn/symbol/replace" { - var replace: typeof core.Symbol.replace; + const replace: typeof core.Symbol.replace; export = replace; } declare module "core-js/library/fn/symbol/search" { - var search: typeof core.Symbol.search; + const search: typeof core.Symbol.search; export = search; } declare module "core-js/library/fn/symbol/species" { - var species: typeof core.Symbol.species; + const species: typeof core.Symbol.species; export = species; } declare module "core-js/library/fn/symbol/split" { - var split: typeof core.Symbol.split; + const split: typeof core.Symbol.split; export = split; } declare module "core-js/library/fn/symbol/to-primitive" { - var toPrimitive: typeof core.Symbol.toPrimitive; + const toPrimitive: typeof core.Symbol.toPrimitive; export = toPrimitive; } declare module "core-js/library/fn/symbol/to-string-tag" { - var toStringTag: typeof core.Symbol.toStringTag; + const toStringTag: typeof core.Symbol.toStringTag; export = toStringTag; } declare module "core-js/library/fn/symbol/unscopables" { - var unscopables: typeof core.Symbol.unscopables; + const unscopables: typeof core.Symbol.unscopables; export = unscopables; } declare module "core-js/library/es5" { @@ -2114,93 +2114,93 @@ declare module "core-js/library/es6" { export = core; } declare module "core-js/library/es6/array" { - var Array: typeof core.Array; + const Array: typeof core.Array; export = Array; } declare module "core-js/library/es6/function" { - var Function: typeof core.Function; + const Function: typeof core.Function; export = Function; } declare module "core-js/library/es6/map" { - var Map: typeof core.Map; + const Map: typeof core.Map; export = Map; } declare module "core-js/library/es6/math" { - var Math: typeof core.Math; + const Math: typeof core.Math; export = Math; } declare module "core-js/library/es6/number" { - var Number: typeof core.Number; + const Number: typeof core.Number; export = Number; } declare module "core-js/library/es6/object" { - var Object: typeof core.Object; + const Object: typeof core.Object; export = Object; } declare module "core-js/library/es6/promise" { - var Promise: typeof core.Promise; + const Promise: typeof core.Promise; export = Promise; } declare module "core-js/library/es6/reflect" { - var Reflect: typeof core.Reflect; + const Reflect: typeof core.Reflect; export = Reflect; } declare module "core-js/library/es6/regexp" { - var RegExp: typeof core.RegExp; + const RegExp: typeof core.RegExp; export = RegExp; } declare module "core-js/library/es6/set" { - var Set: typeof core.Set; + const Set: typeof core.Set; export = Set; } declare module "core-js/library/es6/string" { - var String: typeof core.String; + const String: typeof core.String; export = String; } declare module "core-js/library/es6/symbol" { - var Symbol: typeof core.Symbol; + const Symbol: typeof core.Symbol; export = Symbol; } declare module "core-js/library/es6/weak-map" { - var WeakMap: typeof core.WeakMap; + const WeakMap: typeof core.WeakMap; export = WeakMap; } declare module "core-js/library/es6/weak-set" { - var WeakSet: typeof core.WeakSet; + const WeakSet: typeof core.WeakSet; export = WeakSet; } declare module "core-js/library/es7" { export = core; } declare module "core-js/library/es7/array" { - var Array: typeof core.Array; + const Array: typeof core.Array; export = Array; } declare module "core-js/library/es7/map" { - var Map: typeof core.Map; + const Map: typeof core.Map; export = Map; } declare module "core-js/library/es7/object" { - var Object: typeof core.Object; + const Object: typeof core.Object; export = Object; } declare module "core-js/library/es7/regexp" { - var RegExp: typeof core.RegExp; + const RegExp: typeof core.RegExp; export = RegExp; } declare module "core-js/library/es7/set" { - var Set: typeof core.Set; + const Set: typeof core.Set; export = Set; } declare module "core-js/library/es7/string" { - var String: typeof core.String; + const String: typeof core.String; export = String; } declare module "core-js/library/js" { export = core; } declare module "core-js/library/js/array" { - var Array: typeof core.Array; + const Array: typeof core.Array; export = Array; } declare module "core-js/library/web" { diff --git a/core-js/tsconfig.json b/types/core-js/tsconfig.json similarity index 100% rename from core-js/tsconfig.json rename to types/core-js/tsconfig.json diff --git a/core-js/tslint.json b/types/core-js/tslint.json similarity index 100% rename from core-js/tslint.json rename to types/core-js/tslint.json diff --git a/cors/cors-tests.ts b/types/cors/cors-tests.ts similarity index 100% rename from cors/cors-tests.ts rename to types/cors/cors-tests.ts diff --git a/cors/index.d.ts b/types/cors/index.d.ts similarity index 100% rename from cors/index.d.ts rename to types/cors/index.d.ts diff --git a/cors/tsconfig.json b/types/cors/tsconfig.json similarity index 100% rename from cors/tsconfig.json rename to types/cors/tsconfig.json diff --git a/couchbase/couchbase-tests.ts b/types/couchbase/couchbase-tests.ts similarity index 100% rename from couchbase/couchbase-tests.ts rename to types/couchbase/couchbase-tests.ts diff --git a/couchbase/index.d.ts b/types/couchbase/index.d.ts similarity index 100% rename from couchbase/index.d.ts rename to types/couchbase/index.d.ts diff --git a/couchbase/tsconfig.json b/types/couchbase/tsconfig.json similarity index 100% rename from couchbase/tsconfig.json rename to types/couchbase/tsconfig.json diff --git a/countdown/countdown-tests.ts b/types/countdown/countdown-tests.ts similarity index 100% rename from countdown/countdown-tests.ts rename to types/countdown/countdown-tests.ts diff --git a/countdown/index.d.ts b/types/countdown/index.d.ts similarity index 100% rename from countdown/index.d.ts rename to types/countdown/index.d.ts diff --git a/countdown/tsconfig.json b/types/countdown/tsconfig.json similarity index 100% rename from countdown/tsconfig.json rename to types/countdown/tsconfig.json diff --git a/cpy/cpy-tests.ts b/types/cpy/cpy-tests.ts similarity index 100% rename from cpy/cpy-tests.ts rename to types/cpy/cpy-tests.ts diff --git a/cpy/index.d.ts b/types/cpy/index.d.ts similarity index 100% rename from cpy/index.d.ts rename to types/cpy/index.d.ts diff --git a/cpy/tsconfig.json b/types/cpy/tsconfig.json similarity index 100% rename from cpy/tsconfig.json rename to types/cpy/tsconfig.json diff --git a/cpy/tslint.json b/types/cpy/tslint.json similarity index 100% rename from cpy/tslint.json rename to types/cpy/tslint.json diff --git a/cradle/cradle-tests.ts b/types/cradle/cradle-tests.ts similarity index 100% rename from cradle/cradle-tests.ts rename to types/cradle/cradle-tests.ts diff --git a/cradle/index.d.ts b/types/cradle/index.d.ts similarity index 100% rename from cradle/index.d.ts rename to types/cradle/index.d.ts diff --git a/cradle/tsconfig.json b/types/cradle/tsconfig.json similarity index 100% rename from cradle/tsconfig.json rename to types/cradle/tsconfig.json diff --git a/crc/crc-tests.ts b/types/crc/crc-tests.ts similarity index 100% rename from crc/crc-tests.ts rename to types/crc/crc-tests.ts diff --git a/crc/index.d.ts b/types/crc/index.d.ts similarity index 100% rename from crc/index.d.ts rename to types/crc/index.d.ts diff --git a/crc/tsconfig.json b/types/crc/tsconfig.json similarity index 100% rename from crc/tsconfig.json rename to types/crc/tsconfig.json diff --git a/crc/tslint.json b/types/crc/tslint.json similarity index 100% rename from crc/tslint.json rename to types/crc/tslint.json diff --git a/create-error/create-error-tests.ts b/types/create-error/create-error-tests.ts similarity index 100% rename from create-error/create-error-tests.ts rename to types/create-error/create-error-tests.ts diff --git a/create-error/index.d.ts b/types/create-error/index.d.ts similarity index 100% rename from create-error/index.d.ts rename to types/create-error/index.d.ts diff --git a/create-error/tsconfig.json b/types/create-error/tsconfig.json similarity index 100% rename from create-error/tsconfig.json rename to types/create-error/tsconfig.json diff --git a/createjs-lib/index.d.ts b/types/createjs-lib/index.d.ts similarity index 100% rename from createjs-lib/index.d.ts rename to types/createjs-lib/index.d.ts diff --git a/createjs-lib/tsconfig.json b/types/createjs-lib/tsconfig.json similarity index 100% rename from createjs-lib/tsconfig.json rename to types/createjs-lib/tsconfig.json diff --git a/createjs/index.d.ts b/types/createjs/index.d.ts similarity index 100% rename from createjs/index.d.ts rename to types/createjs/index.d.ts diff --git a/createjs/tsconfig.json b/types/createjs/tsconfig.json similarity index 100% rename from createjs/tsconfig.json rename to types/createjs/tsconfig.json diff --git a/credential/credential-tests.ts b/types/credential/credential-tests.ts similarity index 100% rename from credential/credential-tests.ts rename to types/credential/credential-tests.ts diff --git a/credential/index.d.ts b/types/credential/index.d.ts similarity index 100% rename from credential/index.d.ts rename to types/credential/index.d.ts diff --git a/credential/tsconfig.json b/types/credential/tsconfig.json similarity index 100% rename from credential/tsconfig.json rename to types/credential/tsconfig.json diff --git a/credit-card-type/credit-card-type-tests.ts b/types/credit-card-type/credit-card-type-tests.ts similarity index 100% rename from credit-card-type/credit-card-type-tests.ts rename to types/credit-card-type/credit-card-type-tests.ts diff --git a/credit-card-type/index.d.ts b/types/credit-card-type/index.d.ts similarity index 100% rename from credit-card-type/index.d.ts rename to types/credit-card-type/index.d.ts diff --git a/credit-card-type/tsconfig.json b/types/credit-card-type/tsconfig.json similarity index 100% rename from credit-card-type/tsconfig.json rename to types/credit-card-type/tsconfig.json diff --git a/cron/cron-tests.ts b/types/cron/cron-tests.ts similarity index 100% rename from cron/cron-tests.ts rename to types/cron/cron-tests.ts diff --git a/cron/index.d.ts b/types/cron/index.d.ts similarity index 100% rename from cron/index.d.ts rename to types/cron/index.d.ts diff --git a/cron/tsconfig.json b/types/cron/tsconfig.json similarity index 100% rename from cron/tsconfig.json rename to types/cron/tsconfig.json diff --git a/cropperjs/cropperjs-tests.ts b/types/cropperjs/cropperjs-tests.ts similarity index 100% rename from cropperjs/cropperjs-tests.ts rename to types/cropperjs/cropperjs-tests.ts diff --git a/cropperjs/index.d.ts b/types/cropperjs/index.d.ts similarity index 100% rename from cropperjs/index.d.ts rename to types/cropperjs/index.d.ts diff --git a/cropperjs/tsconfig.json b/types/cropperjs/tsconfig.json similarity index 100% rename from cropperjs/tsconfig.json rename to types/cropperjs/tsconfig.json diff --git a/croppie/croppie-tests.ts b/types/croppie/croppie-tests.ts similarity index 100% rename from croppie/croppie-tests.ts rename to types/croppie/croppie-tests.ts diff --git a/croppie/index.d.ts b/types/croppie/index.d.ts similarity index 100% rename from croppie/index.d.ts rename to types/croppie/index.d.ts diff --git a/croppie/tsconfig.json b/types/croppie/tsconfig.json similarity index 100% rename from croppie/tsconfig.json rename to types/croppie/tsconfig.json diff --git a/croppie/tslint.json b/types/croppie/tslint.json similarity index 100% rename from croppie/tslint.json rename to types/croppie/tslint.json diff --git a/cross-storage/cross-storage-tests.ts b/types/cross-storage/cross-storage-tests.ts similarity index 100% rename from cross-storage/cross-storage-tests.ts rename to types/cross-storage/cross-storage-tests.ts diff --git a/cross-storage/index.d.ts b/types/cross-storage/index.d.ts similarity index 100% rename from cross-storage/index.d.ts rename to types/cross-storage/index.d.ts diff --git a/cross-storage/tsconfig.json b/types/cross-storage/tsconfig.json similarity index 100% rename from cross-storage/tsconfig.json rename to types/cross-storage/tsconfig.json diff --git a/crossfilter/crossfilter-tests.ts b/types/crossfilter/crossfilter-tests.ts similarity index 100% rename from crossfilter/crossfilter-tests.ts rename to types/crossfilter/crossfilter-tests.ts diff --git a/crossfilter/index.d.ts b/types/crossfilter/index.d.ts similarity index 100% rename from crossfilter/index.d.ts rename to types/crossfilter/index.d.ts diff --git a/crossfilter/tsconfig.json b/types/crossfilter/tsconfig.json similarity index 100% rename from crossfilter/tsconfig.json rename to types/crossfilter/tsconfig.json diff --git a/crossroads/crossroads-tests.ts b/types/crossroads/crossroads-tests.ts similarity index 100% rename from crossroads/crossroads-tests.ts rename to types/crossroads/crossroads-tests.ts diff --git a/crossroads/index.d.ts b/types/crossroads/index.d.ts similarity index 100% rename from crossroads/index.d.ts rename to types/crossroads/index.d.ts diff --git a/crossroads/tsconfig.json b/types/crossroads/tsconfig.json similarity index 100% rename from crossroads/tsconfig.json rename to types/crossroads/tsconfig.json diff --git a/crypto-js/aes/index.d.ts b/types/crypto-js/aes/index.d.ts similarity index 100% rename from crypto-js/aes/index.d.ts rename to types/crypto-js/aes/index.d.ts diff --git a/crypto-js/core/index.d.ts b/types/crypto-js/core/index.d.ts similarity index 100% rename from crypto-js/core/index.d.ts rename to types/crypto-js/core/index.d.ts diff --git a/crypto-js/crypto-js-tests.ts b/types/crypto-js/crypto-js-tests.ts similarity index 100% rename from crypto-js/crypto-js-tests.ts rename to types/crypto-js/crypto-js-tests.ts diff --git a/crypto-js/enc-base64/index.d.ts b/types/crypto-js/enc-base64/index.d.ts similarity index 100% rename from crypto-js/enc-base64/index.d.ts rename to types/crypto-js/enc-base64/index.d.ts diff --git a/crypto-js/enc-hex/index.d.ts b/types/crypto-js/enc-hex/index.d.ts similarity index 100% rename from crypto-js/enc-hex/index.d.ts rename to types/crypto-js/enc-hex/index.d.ts diff --git a/crypto-js/enc-latin1/index.d.ts b/types/crypto-js/enc-latin1/index.d.ts similarity index 100% rename from crypto-js/enc-latin1/index.d.ts rename to types/crypto-js/enc-latin1/index.d.ts diff --git a/crypto-js/enc-utf16/index.d.ts b/types/crypto-js/enc-utf16/index.d.ts similarity index 100% rename from crypto-js/enc-utf16/index.d.ts rename to types/crypto-js/enc-utf16/index.d.ts diff --git a/crypto-js/enc-utf8/index.d.ts b/types/crypto-js/enc-utf8/index.d.ts similarity index 100% rename from crypto-js/enc-utf8/index.d.ts rename to types/crypto-js/enc-utf8/index.d.ts diff --git a/crypto-js/evpkdf/index.d.ts b/types/crypto-js/evpkdf/index.d.ts similarity index 100% rename from crypto-js/evpkdf/index.d.ts rename to types/crypto-js/evpkdf/index.d.ts diff --git a/crypto-js/format-hex/index.d.ts b/types/crypto-js/format-hex/index.d.ts similarity index 100% rename from crypto-js/format-hex/index.d.ts rename to types/crypto-js/format-hex/index.d.ts diff --git a/crypto-js/format-openssl/index.d.ts b/types/crypto-js/format-openssl/index.d.ts similarity index 100% rename from crypto-js/format-openssl/index.d.ts rename to types/crypto-js/format-openssl/index.d.ts diff --git a/crypto-js/hmac-md5/index.d.ts b/types/crypto-js/hmac-md5/index.d.ts similarity index 100% rename from crypto-js/hmac-md5/index.d.ts rename to types/crypto-js/hmac-md5/index.d.ts diff --git a/crypto-js/hmac-ripemd160/index.d.ts b/types/crypto-js/hmac-ripemd160/index.d.ts similarity index 100% rename from crypto-js/hmac-ripemd160/index.d.ts rename to types/crypto-js/hmac-ripemd160/index.d.ts diff --git a/crypto-js/hmac-sha1/index.d.ts b/types/crypto-js/hmac-sha1/index.d.ts similarity index 100% rename from crypto-js/hmac-sha1/index.d.ts rename to types/crypto-js/hmac-sha1/index.d.ts diff --git a/crypto-js/hmac-sha224/index.d.ts b/types/crypto-js/hmac-sha224/index.d.ts similarity index 100% rename from crypto-js/hmac-sha224/index.d.ts rename to types/crypto-js/hmac-sha224/index.d.ts diff --git a/crypto-js/hmac-sha256/index.d.ts b/types/crypto-js/hmac-sha256/index.d.ts similarity index 100% rename from crypto-js/hmac-sha256/index.d.ts rename to types/crypto-js/hmac-sha256/index.d.ts diff --git a/crypto-js/hmac-sha3/index.d.ts b/types/crypto-js/hmac-sha3/index.d.ts similarity index 100% rename from crypto-js/hmac-sha3/index.d.ts rename to types/crypto-js/hmac-sha3/index.d.ts diff --git a/crypto-js/hmac-sha384/index.d.ts b/types/crypto-js/hmac-sha384/index.d.ts similarity index 100% rename from crypto-js/hmac-sha384/index.d.ts rename to types/crypto-js/hmac-sha384/index.d.ts diff --git a/crypto-js/hmac-sha512/index.d.ts b/types/crypto-js/hmac-sha512/index.d.ts similarity index 100% rename from crypto-js/hmac-sha512/index.d.ts rename to types/crypto-js/hmac-sha512/index.d.ts diff --git a/crypto-js/index.d.ts b/types/crypto-js/index.d.ts similarity index 100% rename from crypto-js/index.d.ts rename to types/crypto-js/index.d.ts diff --git a/crypto-js/lib-typedarrays/index.d.ts b/types/crypto-js/lib-typedarrays/index.d.ts similarity index 100% rename from crypto-js/lib-typedarrays/index.d.ts rename to types/crypto-js/lib-typedarrays/index.d.ts diff --git a/crypto-js/md5/index.d.ts b/types/crypto-js/md5/index.d.ts similarity index 100% rename from crypto-js/md5/index.d.ts rename to types/crypto-js/md5/index.d.ts diff --git a/crypto-js/mode-cfb/index.d.ts b/types/crypto-js/mode-cfb/index.d.ts similarity index 100% rename from crypto-js/mode-cfb/index.d.ts rename to types/crypto-js/mode-cfb/index.d.ts diff --git a/crypto-js/mode-ctr-gladman/index.d.ts b/types/crypto-js/mode-ctr-gladman/index.d.ts similarity index 100% rename from crypto-js/mode-ctr-gladman/index.d.ts rename to types/crypto-js/mode-ctr-gladman/index.d.ts diff --git a/crypto-js/mode-ctr/index.d.ts b/types/crypto-js/mode-ctr/index.d.ts similarity index 100% rename from crypto-js/mode-ctr/index.d.ts rename to types/crypto-js/mode-ctr/index.d.ts diff --git a/crypto-js/mode-ecb/index.d.ts b/types/crypto-js/mode-ecb/index.d.ts similarity index 100% rename from crypto-js/mode-ecb/index.d.ts rename to types/crypto-js/mode-ecb/index.d.ts diff --git a/crypto-js/mode-ofb/index.d.ts b/types/crypto-js/mode-ofb/index.d.ts similarity index 100% rename from crypto-js/mode-ofb/index.d.ts rename to types/crypto-js/mode-ofb/index.d.ts diff --git a/crypto-js/pad-ansix923/index.d.ts b/types/crypto-js/pad-ansix923/index.d.ts similarity index 100% rename from crypto-js/pad-ansix923/index.d.ts rename to types/crypto-js/pad-ansix923/index.d.ts diff --git a/crypto-js/pad-iso10126/index.d.ts b/types/crypto-js/pad-iso10126/index.d.ts similarity index 100% rename from crypto-js/pad-iso10126/index.d.ts rename to types/crypto-js/pad-iso10126/index.d.ts diff --git a/crypto-js/pad-iso97971/index.d.ts b/types/crypto-js/pad-iso97971/index.d.ts similarity index 100% rename from crypto-js/pad-iso97971/index.d.ts rename to types/crypto-js/pad-iso97971/index.d.ts diff --git a/crypto-js/pad-nopadding/index.d.ts b/types/crypto-js/pad-nopadding/index.d.ts similarity index 100% rename from crypto-js/pad-nopadding/index.d.ts rename to types/crypto-js/pad-nopadding/index.d.ts diff --git a/crypto-js/pad-pkcs7/index.d.ts b/types/crypto-js/pad-pkcs7/index.d.ts similarity index 100% rename from crypto-js/pad-pkcs7/index.d.ts rename to types/crypto-js/pad-pkcs7/index.d.ts diff --git a/crypto-js/pad-zeropadding/index.d.ts b/types/crypto-js/pad-zeropadding/index.d.ts similarity index 100% rename from crypto-js/pad-zeropadding/index.d.ts rename to types/crypto-js/pad-zeropadding/index.d.ts diff --git a/crypto-js/pbkdf2/index.d.ts b/types/crypto-js/pbkdf2/index.d.ts similarity index 100% rename from crypto-js/pbkdf2/index.d.ts rename to types/crypto-js/pbkdf2/index.d.ts diff --git a/crypto-js/rabbit-legacy/index.d.ts b/types/crypto-js/rabbit-legacy/index.d.ts similarity index 100% rename from crypto-js/rabbit-legacy/index.d.ts rename to types/crypto-js/rabbit-legacy/index.d.ts diff --git a/crypto-js/rabbit/index.d.ts b/types/crypto-js/rabbit/index.d.ts similarity index 100% rename from crypto-js/rabbit/index.d.ts rename to types/crypto-js/rabbit/index.d.ts diff --git a/crypto-js/rc4/index.d.ts b/types/crypto-js/rc4/index.d.ts similarity index 100% rename from crypto-js/rc4/index.d.ts rename to types/crypto-js/rc4/index.d.ts diff --git a/crypto-js/ripemd160/index.d.ts b/types/crypto-js/ripemd160/index.d.ts similarity index 100% rename from crypto-js/ripemd160/index.d.ts rename to types/crypto-js/ripemd160/index.d.ts diff --git a/crypto-js/sha1/index.d.ts b/types/crypto-js/sha1/index.d.ts similarity index 100% rename from crypto-js/sha1/index.d.ts rename to types/crypto-js/sha1/index.d.ts diff --git a/crypto-js/sha224/index.d.ts b/types/crypto-js/sha224/index.d.ts similarity index 100% rename from crypto-js/sha224/index.d.ts rename to types/crypto-js/sha224/index.d.ts diff --git a/crypto-js/sha256/index.d.ts b/types/crypto-js/sha256/index.d.ts similarity index 100% rename from crypto-js/sha256/index.d.ts rename to types/crypto-js/sha256/index.d.ts diff --git a/crypto-js/sha3/index.d.ts b/types/crypto-js/sha3/index.d.ts similarity index 100% rename from crypto-js/sha3/index.d.ts rename to types/crypto-js/sha3/index.d.ts diff --git a/crypto-js/sha384/index.d.ts b/types/crypto-js/sha384/index.d.ts similarity index 100% rename from crypto-js/sha384/index.d.ts rename to types/crypto-js/sha384/index.d.ts diff --git a/crypto-js/sha512/index.d.ts b/types/crypto-js/sha512/index.d.ts similarity index 100% rename from crypto-js/sha512/index.d.ts rename to types/crypto-js/sha512/index.d.ts diff --git a/crypto-js/test/submodule-tests.ts b/types/crypto-js/test/submodule-tests.ts similarity index 100% rename from crypto-js/test/submodule-tests.ts rename to types/crypto-js/test/submodule-tests.ts diff --git a/crypto-js/tripledes/index.d.ts b/types/crypto-js/tripledes/index.d.ts similarity index 100% rename from crypto-js/tripledes/index.d.ts rename to types/crypto-js/tripledes/index.d.ts diff --git a/crypto-js/tsconfig.json b/types/crypto-js/tsconfig.json similarity index 100% rename from crypto-js/tsconfig.json rename to types/crypto-js/tsconfig.json diff --git a/crypto-js/x64-core/index.d.ts b/types/crypto-js/x64-core/index.d.ts similarity index 100% rename from crypto-js/x64-core/index.d.ts rename to types/crypto-js/x64-core/index.d.ts diff --git a/cryptojs/index.d.ts b/types/cryptojs/index.d.ts similarity index 100% rename from cryptojs/index.d.ts rename to types/cryptojs/index.d.ts diff --git a/cryptojs/test/aes-profile-tests.ts b/types/cryptojs/test/aes-profile-tests.ts similarity index 100% rename from cryptojs/test/aes-profile-tests.ts rename to types/cryptojs/test/aes-profile-tests.ts diff --git a/cryptojs/test/aes-tests.ts b/types/cryptojs/test/aes-tests.ts similarity index 100% rename from cryptojs/test/aes-tests.ts rename to types/cryptojs/test/aes-tests.ts diff --git a/cryptojs/test/des-profile-tests.ts b/types/cryptojs/test/des-profile-tests.ts similarity index 100% rename from cryptojs/test/des-profile-tests.ts rename to types/cryptojs/test/des-profile-tests.ts diff --git a/cryptojs/test/des-tests.ts b/types/cryptojs/test/des-tests.ts similarity index 100% rename from cryptojs/test/des-tests.ts rename to types/cryptojs/test/des-tests.ts diff --git a/cryptojs/test/enc-base64-tests.ts b/types/cryptojs/test/enc-base64-tests.ts similarity index 100% rename from cryptojs/test/enc-base64-tests.ts rename to types/cryptojs/test/enc-base64-tests.ts diff --git a/cryptojs/test/enc-hex-tests.ts b/types/cryptojs/test/enc-hex-tests.ts similarity index 100% rename from cryptojs/test/enc-hex-tests.ts rename to types/cryptojs/test/enc-hex-tests.ts diff --git a/cryptojs/test/enc-latin1-tests.ts b/types/cryptojs/test/enc-latin1-tests.ts similarity index 100% rename from cryptojs/test/enc-latin1-tests.ts rename to types/cryptojs/test/enc-latin1-tests.ts diff --git a/cryptojs/test/enc-utf16-tests.ts b/types/cryptojs/test/enc-utf16-tests.ts similarity index 100% rename from cryptojs/test/enc-utf16-tests.ts rename to types/cryptojs/test/enc-utf16-tests.ts diff --git a/cryptojs/test/enc-utf8-tests.ts b/types/cryptojs/test/enc-utf8-tests.ts similarity index 100% rename from cryptojs/test/enc-utf8-tests.ts rename to types/cryptojs/test/enc-utf8-tests.ts diff --git a/cryptojs/test/evpkdf-profile-tests.ts b/types/cryptojs/test/evpkdf-profile-tests.ts similarity index 100% rename from cryptojs/test/evpkdf-profile-tests.ts rename to types/cryptojs/test/evpkdf-profile-tests.ts diff --git a/cryptojs/test/evpkdf-tests.ts b/types/cryptojs/test/evpkdf-tests.ts similarity index 100% rename from cryptojs/test/evpkdf-tests.ts rename to types/cryptojs/test/evpkdf-tests.ts diff --git a/cryptojs/test/format-openssl-tests.ts b/types/cryptojs/test/format-openssl-tests.ts similarity index 100% rename from cryptojs/test/format-openssl-tests.ts rename to types/cryptojs/test/format-openssl-tests.ts diff --git a/cryptojs/test/hmac-profile-tests.ts b/types/cryptojs/test/hmac-profile-tests.ts similarity index 100% rename from cryptojs/test/hmac-profile-tests.ts rename to types/cryptojs/test/hmac-profile-tests.ts diff --git a/cryptojs/test/hmac-tests.ts b/types/cryptojs/test/hmac-tests.ts similarity index 100% rename from cryptojs/test/hmac-tests.ts rename to types/cryptojs/test/hmac-tests.ts diff --git a/cryptojs/test/kdf-openssl-tests.ts b/types/cryptojs/test/kdf-openssl-tests.ts similarity index 100% rename from cryptojs/test/kdf-openssl-tests.ts rename to types/cryptojs/test/kdf-openssl-tests.ts diff --git a/cryptojs/test/lib-base-tests.ts b/types/cryptojs/test/lib-base-tests.ts similarity index 100% rename from cryptojs/test/lib-base-tests.ts rename to types/cryptojs/test/lib-base-tests.ts diff --git a/cryptojs/test/lib-cipherparams-tests.ts b/types/cryptojs/test/lib-cipherparams-tests.ts similarity index 100% rename from cryptojs/test/lib-cipherparams-tests.ts rename to types/cryptojs/test/lib-cipherparams-tests.ts diff --git a/cryptojs/test/lib-passwordbasedcipher-tests.ts b/types/cryptojs/test/lib-passwordbasedcipher-tests.ts similarity index 100% rename from cryptojs/test/lib-passwordbasedcipher-tests.ts rename to types/cryptojs/test/lib-passwordbasedcipher-tests.ts diff --git a/cryptojs/test/lib-serializablecipher-tests.ts b/types/cryptojs/test/lib-serializablecipher-tests.ts similarity index 100% rename from cryptojs/test/lib-serializablecipher-tests.ts rename to types/cryptojs/test/lib-serializablecipher-tests.ts diff --git a/cryptojs/test/lib-typedarrays-tests.ts b/types/cryptojs/test/lib-typedarrays-tests.ts similarity index 100% rename from cryptojs/test/lib-typedarrays-tests.ts rename to types/cryptojs/test/lib-typedarrays-tests.ts diff --git a/cryptojs/test/lib-wordarray-tests.ts b/types/cryptojs/test/lib-wordarray-tests.ts similarity index 100% rename from cryptojs/test/lib-wordarray-tests.ts rename to types/cryptojs/test/lib-wordarray-tests.ts diff --git a/cryptojs/test/md5-profile-tests.ts b/types/cryptojs/test/md5-profile-tests.ts similarity index 100% rename from cryptojs/test/md5-profile-tests.ts rename to types/cryptojs/test/md5-profile-tests.ts diff --git a/cryptojs/test/md5-tests.ts b/types/cryptojs/test/md5-tests.ts similarity index 100% rename from cryptojs/test/md5-tests.ts rename to types/cryptojs/test/md5-tests.ts diff --git a/cryptojs/test/mode-cbc-tests.ts b/types/cryptojs/test/mode-cbc-tests.ts similarity index 100% rename from cryptojs/test/mode-cbc-tests.ts rename to types/cryptojs/test/mode-cbc-tests.ts diff --git a/cryptojs/test/mode-cfb-tests.ts b/types/cryptojs/test/mode-cfb-tests.ts similarity index 100% rename from cryptojs/test/mode-cfb-tests.ts rename to types/cryptojs/test/mode-cfb-tests.ts diff --git a/cryptojs/test/mode-ctr-tests.ts b/types/cryptojs/test/mode-ctr-tests.ts similarity index 100% rename from cryptojs/test/mode-ctr-tests.ts rename to types/cryptojs/test/mode-ctr-tests.ts diff --git a/cryptojs/test/mode-ecb-tests.ts b/types/cryptojs/test/mode-ecb-tests.ts similarity index 100% rename from cryptojs/test/mode-ecb-tests.ts rename to types/cryptojs/test/mode-ecb-tests.ts diff --git a/cryptojs/test/mode-ofb-tests.ts b/types/cryptojs/test/mode-ofb-tests.ts similarity index 100% rename from cryptojs/test/mode-ofb-tests.ts rename to types/cryptojs/test/mode-ofb-tests.ts diff --git a/cryptojs/test/pad-ansix923-tests.ts b/types/cryptojs/test/pad-ansix923-tests.ts similarity index 100% rename from cryptojs/test/pad-ansix923-tests.ts rename to types/cryptojs/test/pad-ansix923-tests.ts diff --git a/cryptojs/test/pad-iso10126-tests.ts b/types/cryptojs/test/pad-iso10126-tests.ts similarity index 100% rename from cryptojs/test/pad-iso10126-tests.ts rename to types/cryptojs/test/pad-iso10126-tests.ts diff --git a/cryptojs/test/pad-iso97971-tests.ts b/types/cryptojs/test/pad-iso97971-tests.ts similarity index 100% rename from cryptojs/test/pad-iso97971-tests.ts rename to types/cryptojs/test/pad-iso97971-tests.ts diff --git a/cryptojs/test/pad-pkcs7-tests.ts b/types/cryptojs/test/pad-pkcs7-tests.ts similarity index 100% rename from cryptojs/test/pad-pkcs7-tests.ts rename to types/cryptojs/test/pad-pkcs7-tests.ts diff --git a/cryptojs/test/pad-zeropadding-tests.ts b/types/cryptojs/test/pad-zeropadding-tests.ts similarity index 100% rename from cryptojs/test/pad-zeropadding-tests.ts rename to types/cryptojs/test/pad-zeropadding-tests.ts diff --git a/cryptojs/test/pbkdf2-profile-tests.ts b/types/cryptojs/test/pbkdf2-profile-tests.ts similarity index 100% rename from cryptojs/test/pbkdf2-profile-tests.ts rename to types/cryptojs/test/pbkdf2-profile-tests.ts diff --git a/cryptojs/test/pbkdf2-tests.ts b/types/cryptojs/test/pbkdf2-tests.ts similarity index 100% rename from cryptojs/test/pbkdf2-tests.ts rename to types/cryptojs/test/pbkdf2-tests.ts diff --git a/cryptojs/test/rabbit-legacy-tests.ts b/types/cryptojs/test/rabbit-legacy-tests.ts similarity index 100% rename from cryptojs/test/rabbit-legacy-tests.ts rename to types/cryptojs/test/rabbit-legacy-tests.ts diff --git a/cryptojs/test/rabbit-profile-tests.ts b/types/cryptojs/test/rabbit-profile-tests.ts similarity index 100% rename from cryptojs/test/rabbit-profile-tests.ts rename to types/cryptojs/test/rabbit-profile-tests.ts diff --git a/cryptojs/test/rabbit-tests.ts b/types/cryptojs/test/rabbit-tests.ts similarity index 100% rename from cryptojs/test/rabbit-tests.ts rename to types/cryptojs/test/rabbit-tests.ts diff --git a/cryptojs/test/rc4-profile-tests.ts b/types/cryptojs/test/rc4-profile-tests.ts similarity index 100% rename from cryptojs/test/rc4-profile-tests.ts rename to types/cryptojs/test/rc4-profile-tests.ts diff --git a/cryptojs/test/rc4-tests.ts b/types/cryptojs/test/rc4-tests.ts similarity index 100% rename from cryptojs/test/rc4-tests.ts rename to types/cryptojs/test/rc4-tests.ts diff --git a/cryptojs/test/ripemd160-tests.ts b/types/cryptojs/test/ripemd160-tests.ts similarity index 100% rename from cryptojs/test/ripemd160-tests.ts rename to types/cryptojs/test/ripemd160-tests.ts diff --git a/cryptojs/test/sha1-profile-tests.ts b/types/cryptojs/test/sha1-profile-tests.ts similarity index 100% rename from cryptojs/test/sha1-profile-tests.ts rename to types/cryptojs/test/sha1-profile-tests.ts diff --git a/cryptojs/test/sha1-tests.ts b/types/cryptojs/test/sha1-tests.ts similarity index 100% rename from cryptojs/test/sha1-tests.ts rename to types/cryptojs/test/sha1-tests.ts diff --git a/cryptojs/test/sha224-tests.ts b/types/cryptojs/test/sha224-tests.ts similarity index 100% rename from cryptojs/test/sha224-tests.ts rename to types/cryptojs/test/sha224-tests.ts diff --git a/cryptojs/test/sha256-profile-tests.ts b/types/cryptojs/test/sha256-profile-tests.ts similarity index 100% rename from cryptojs/test/sha256-profile-tests.ts rename to types/cryptojs/test/sha256-profile-tests.ts diff --git a/cryptojs/test/sha256-tests.ts b/types/cryptojs/test/sha256-tests.ts similarity index 100% rename from cryptojs/test/sha256-tests.ts rename to types/cryptojs/test/sha256-tests.ts diff --git a/cryptojs/test/sha3-profile-tests.ts b/types/cryptojs/test/sha3-profile-tests.ts similarity index 100% rename from cryptojs/test/sha3-profile-tests.ts rename to types/cryptojs/test/sha3-profile-tests.ts diff --git a/cryptojs/test/sha3-tests.ts b/types/cryptojs/test/sha3-tests.ts similarity index 100% rename from cryptojs/test/sha3-tests.ts rename to types/cryptojs/test/sha3-tests.ts diff --git a/cryptojs/test/sha384-tests.ts b/types/cryptojs/test/sha384-tests.ts similarity index 100% rename from cryptojs/test/sha384-tests.ts rename to types/cryptojs/test/sha384-tests.ts diff --git a/cryptojs/test/sha512-profile-tests.ts b/types/cryptojs/test/sha512-profile-tests.ts similarity index 100% rename from cryptojs/test/sha512-profile-tests.ts rename to types/cryptojs/test/sha512-profile-tests.ts diff --git a/cryptojs/test/sha512-tests.ts b/types/cryptojs/test/sha512-tests.ts similarity index 100% rename from cryptojs/test/sha512-tests.ts rename to types/cryptojs/test/sha512-tests.ts diff --git a/cryptojs/test/tripledes-profile-tests.ts b/types/cryptojs/test/tripledes-profile-tests.ts similarity index 100% rename from cryptojs/test/tripledes-profile-tests.ts rename to types/cryptojs/test/tripledes-profile-tests.ts diff --git a/cryptojs/test/tripledes-tests.ts b/types/cryptojs/test/tripledes-tests.ts similarity index 100% rename from cryptojs/test/tripledes-tests.ts rename to types/cryptojs/test/tripledes-tests.ts diff --git a/cryptojs/test/x64-word-tests.ts b/types/cryptojs/test/x64-word-tests.ts similarity index 100% rename from cryptojs/test/x64-word-tests.ts rename to types/cryptojs/test/x64-word-tests.ts diff --git a/cryptojs/test/x64-wordarray-tests.ts b/types/cryptojs/test/x64-wordarray-tests.ts similarity index 100% rename from cryptojs/test/x64-wordarray-tests.ts rename to types/cryptojs/test/x64-wordarray-tests.ts diff --git a/cryptojs/tsconfig.json b/types/cryptojs/tsconfig.json similarity index 100% rename from cryptojs/tsconfig.json rename to types/cryptojs/tsconfig.json diff --git a/cson/cson-tests.ts b/types/cson/cson-tests.ts similarity index 100% rename from cson/cson-tests.ts rename to types/cson/cson-tests.ts diff --git a/cson/index.d.ts b/types/cson/index.d.ts similarity index 100% rename from cson/index.d.ts rename to types/cson/index.d.ts diff --git a/cson/tsconfig.json b/types/cson/tsconfig.json similarity index 100% rename from cson/tsconfig.json rename to types/cson/tsconfig.json diff --git a/csprng/csprng-tests.ts b/types/csprng/csprng-tests.ts similarity index 100% rename from csprng/csprng-tests.ts rename to types/csprng/csprng-tests.ts diff --git a/csprng/index.d.ts b/types/csprng/index.d.ts similarity index 100% rename from csprng/index.d.ts rename to types/csprng/index.d.ts diff --git a/csprng/tsconfig.json b/types/csprng/tsconfig.json similarity index 100% rename from csprng/tsconfig.json rename to types/csprng/tsconfig.json diff --git a/node-xmpp-core/tslint.json b/types/csprng/tslint.json similarity index 100% rename from node-xmpp-core/tslint.json rename to types/csprng/tslint.json diff --git a/css-modules-require-hook/css-modules-require-hook-tests.ts b/types/css-modules-require-hook/css-modules-require-hook-tests.ts similarity index 100% rename from css-modules-require-hook/css-modules-require-hook-tests.ts rename to types/css-modules-require-hook/css-modules-require-hook-tests.ts diff --git a/css-modules-require-hook/index.d.ts b/types/css-modules-require-hook/index.d.ts similarity index 100% rename from css-modules-require-hook/index.d.ts rename to types/css-modules-require-hook/index.d.ts diff --git a/css-modules-require-hook/tsconfig.json b/types/css-modules-require-hook/tsconfig.json similarity index 100% rename from css-modules-require-hook/tsconfig.json rename to types/css-modules-require-hook/tsconfig.json diff --git a/css/css-tests.ts b/types/css/css-tests.ts similarity index 100% rename from css/css-tests.ts rename to types/css/css-tests.ts diff --git a/css/index.d.ts b/types/css/index.d.ts similarity index 100% rename from css/index.d.ts rename to types/css/index.d.ts diff --git a/css/tsconfig.json b/types/css/tsconfig.json similarity index 100% rename from css/tsconfig.json rename to types/css/tsconfig.json diff --git a/cssbeautify/cssbeautify-tests.ts b/types/cssbeautify/cssbeautify-tests.ts similarity index 100% rename from cssbeautify/cssbeautify-tests.ts rename to types/cssbeautify/cssbeautify-tests.ts diff --git a/cssbeautify/index.d.ts b/types/cssbeautify/index.d.ts similarity index 100% rename from cssbeautify/index.d.ts rename to types/cssbeautify/index.d.ts diff --git a/cssbeautify/tsconfig.json b/types/cssbeautify/tsconfig.json similarity index 100% rename from cssbeautify/tsconfig.json rename to types/cssbeautify/tsconfig.json diff --git a/csurf/index.d.ts b/types/csurf/index.d.ts similarity index 100% rename from csurf/index.d.ts rename to types/csurf/index.d.ts diff --git a/csurf/tsconfig.json b/types/csurf/tsconfig.json similarity index 100% rename from csurf/tsconfig.json rename to types/csurf/tsconfig.json diff --git a/csv-parse/csv-parse-tests.ts b/types/csv-parse/csv-parse-tests.ts similarity index 100% rename from csv-parse/csv-parse-tests.ts rename to types/csv-parse/csv-parse-tests.ts diff --git a/csv-parse/index.d.ts b/types/csv-parse/index.d.ts similarity index 100% rename from csv-parse/index.d.ts rename to types/csv-parse/index.d.ts diff --git a/csv-parse/lib/sync.d.ts b/types/csv-parse/lib/sync.d.ts similarity index 100% rename from csv-parse/lib/sync.d.ts rename to types/csv-parse/lib/sync.d.ts diff --git a/csv-parse/tsconfig.json b/types/csv-parse/tsconfig.json similarity index 100% rename from csv-parse/tsconfig.json rename to types/csv-parse/tsconfig.json diff --git a/csv-parse/tslint.json b/types/csv-parse/tslint.json similarity index 100% rename from csv-parse/tslint.json rename to types/csv-parse/tslint.json diff --git a/csv-stringify/csv-stringify-tests.ts b/types/csv-stringify/csv-stringify-tests.ts similarity index 100% rename from csv-stringify/csv-stringify-tests.ts rename to types/csv-stringify/csv-stringify-tests.ts diff --git a/csv-stringify/index.d.ts b/types/csv-stringify/index.d.ts similarity index 100% rename from csv-stringify/index.d.ts rename to types/csv-stringify/index.d.ts diff --git a/csv-stringify/tsconfig.json b/types/csv-stringify/tsconfig.json similarity index 100% rename from csv-stringify/tsconfig.json rename to types/csv-stringify/tsconfig.json diff --git a/csv-stringify/tslint.json b/types/csv-stringify/tslint.json similarity index 100% rename from csv-stringify/tslint.json rename to types/csv-stringify/tslint.json diff --git a/csvtojson/csvtojson-tests.ts b/types/csvtojson/csvtojson-tests.ts similarity index 98% rename from csvtojson/csvtojson-tests.ts rename to types/csvtojson/csvtojson-tests.ts index 4368d00494..a4ee3d76d4 100644 --- a/csvtojson/csvtojson-tests.ts +++ b/types/csvtojson/csvtojson-tests.ts @@ -16,7 +16,7 @@ csv({ noheader: true }) console.log(csvRow); // => [1,2,3] , [4,5,6] , [7,8,9] }) .on('done', () => { - //parsing finished + // parsing finished }); // event emitter version using Converter class @@ -26,7 +26,7 @@ new csv.Converter({ noheader: true }) console.log(csvRow); // => [1,2,3] , [4,5,6] , [7,8,9] }) .on('done', () => { - //parsing finished + // parsing finished }); // callback version using Converter class diff --git a/csvtojson/index.d.ts b/types/csvtojson/index.d.ts similarity index 99% rename from csvtojson/index.d.ts rename to types/csvtojson/index.d.ts index 9ba01212c7..504311f47a 100644 --- a/csvtojson/index.d.ts +++ b/types/csvtojson/index.d.ts @@ -8,7 +8,6 @@ import * as stream from 'stream'; declare namespace csvtojson { - /** * Stream options */ @@ -18,7 +17,6 @@ declare namespace csvtojson { * Converter options */ interface ConverterOptions { - /** * Delimiter used for seperating columns. Use "auto" if delimiter is unknown in advance, * in this case, delimiter will be auto-detected (by best attempt). Use an array to give @@ -173,7 +171,6 @@ declare namespace csvtojson { * Converts provided CSV input to a JSON object. */ class Converter extends stream.Transform { - /** * Initializes a new instance of a Converter * @param {ConverterOptions} options converter options diff --git a/csvtojson/tsconfig.json b/types/csvtojson/tsconfig.json similarity index 100% rename from csvtojson/tsconfig.json rename to types/csvtojson/tsconfig.json diff --git a/csvtojson/tslint.json b/types/csvtojson/tslint.json similarity index 100% rename from csvtojson/tslint.json rename to types/csvtojson/tslint.json diff --git a/types/cucumber/cucumber-tests.ts b/types/cucumber/cucumber-tests.ts new file mode 100644 index 0000000000..9b057a362c --- /dev/null +++ b/types/cucumber/cucumber-tests.ts @@ -0,0 +1,136 @@ +import * as assert from "power-assert"; +import cucumber = require("cucumber"); + +function StepSample() { + type Callback = cucumber.CallbackStepDefinition; + type Table = cucumber.TableDefinition; + type HookScenarioResult = cucumber.HookScenarioResult; + + cucumber.defineSupportCode(function ({setWorldConstructor, defineParameterType, After, Around, Before, registerHandler, Given, When, Then}) { + setWorldConstructor(function ({attach, parameters}) { + this.attach = attach; + this.parameters = parameters; + this.visit = function (url: string, callback: Callback) { + callback(null, 'pending'); + } + }); + + Before(function (scenarioResult: HookScenarioResult, callback: Callback) { + console.log(scenarioResult.status === "failed"); + callback(); + }); + + Before({ timeout: 1000 }, function (scenarioResult: HookScenarioResult, callback: Callback) { + console.log(scenarioResult.status === "failed"); + callback(); + }); + + Around(function (scenarioResult: HookScenarioResult, runScenario: (error: string, callback?: Function) => void) { + scenarioResult.status === "failed" && runScenario(null, function () { + console.log('finish tasks'); + }); + }); + + After((scenarioResult: HookScenarioResult, callback?: Callback) => { + console.log("After"); + callback(); + }); + + After({ timeout: 1000 }, (scenarioResult: HookScenarioResult, callback?: Callback) => { + console.log("After"); + callback(); + }); + + registerHandler('AfterFeatures', function (event: any, callback: Function) { + callback(); + }); + + Given(/^a variable set to (\d+)$/, (x: string) => { + console.log("the number is: " + x); + }); + + Given(/^I am on the Cucumber.js GitHub repository$/, function (callback: Callback) { + this.visit('https://github.com/cucumber/cucumber-js', callback); + }); + + When(/^I go to the README file$/, function (title: string, callback: Callback) { + callback(null, 'pending'); + }); + + Then(/^I should see "(.*)" as the page title$/, {timeout: 60 * 1000}, function (title: string, callback: Callback) { + var pageTitle = this.browser.text('title'); + + if (title === pageTitle) { + callback(); + } else { + callback(new Error("Expected to be on page with title " + title)); + } + }); + + // Type for data_table.js on + // https://github.com/cucumber/cucumber-js/blob/a5fd8251918c278ab2e389226d165cedb44df14a/lib/cucumber/ast/data_table.js + + Given(/^a table step with Table raw$/, function (table: Table) { + var expected = [ + ['Cucumber', 'Cucumis sativus'], + ['Burr Gherkin', 'Cucumis anguria'] + ]; + + assert.deepEqual(table.raw(), expected); + }); + + Given(/^a table step with Table rows$/, function (table: Table) { + var expected = [ + ['Apricot', '5'], + ['Brocolli', '2'], + ['Cucumber', '10'] + ]; + assert.deepEqual(table.rows(), expected) + }); + + Given(/^a table step with Table rowHash$/, function (table: Table) { + var expected = { + 'Cucumber': 'Cucumis sativus', + 'Burr Gherkin': 'Cucumis anguria' + }; + assert.deepEqual(table.rowsHash(), expected) + }); + + Given(/^a table step$/, function (table: Table) { + var expected = [ + {'Vegetable': 'Apricot', 'Rating': '5'}, + {'Vegetable': 'Brocolli', 'Rating': '2'}, + {'Vegetable': 'Cucumber', 'Rating': '10'} + ]; + assert.deepEqual(table.hashes(), expected) + }); + + defineParameterType({ + regexp: /particular/, + transformer: s => s.toUpperCase(), + typeName: 'param' + }); + + Given('a {param} step', function (param) { + assert.equal(param, 'PARTICULAR') + }); + + }); + + let fns: cucumber.SupportCodeConsumer[] = cucumber.getSupportCodeFns(); + + cucumber.clearSupportCodeFns(); +} + +function registerListener(): cucumber.EventListener { + let listener = Object.assign(cucumber.Listener(), { + handleBeforeScenarioEvent: (scenario: cucumber.events.ScenarioPayload, callback: () => void) => { + + // do some interesting stuff ... + + callback(); + } + }); + + return listener; +} \ No newline at end of file diff --git a/types/cucumber/index.d.ts b/types/cucumber/index.d.ts new file mode 100644 index 0000000000..04ed7289cb --- /dev/null +++ b/types/cucumber/index.d.ts @@ -0,0 +1,262 @@ +// Type definitions for cucumber-js v2.0.0 +// Project: https://github.com/cucumber/cucumber-js +// Definitions by: Abraão Alves , Jan Molak , Isaiah Soung +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = cucumber; + +declare namespace cucumber { + + export interface CallbackStepDefinition { + pending: () => PromiseLike; + (error?: any, pending?: string): void; + } + + export interface TableDefinition { + raw: () => Array; + rows: () => Array; + rowsHash: () => {}; + hashes: () => {}; + } + + type StepDefinitionParam = string | CallbackStepDefinition | TableDefinition; + + interface StepDefinitionCode { + (...stepArgs: Array): PromiseLike | any | void; + } + + interface StepDefinitionOptions { + timeout?: number; + } + + export interface StepDefinitions { + Given(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; + Given(pattern: RegExp | string, code: StepDefinitionCode): void; + When(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; + When(pattern: RegExp | string, code: StepDefinitionCode): void; + Then(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; + Then(pattern: RegExp | string, code: StepDefinitionCode): void; + setDefaultTimeout(time: number): void; + } + + interface HookScenarioResult { + duration: number; + failureException: Error; + scenario: Scenario; + status: string; + stepsResults: any; + } + + interface HookCode { + (scenario: HookScenarioResult, callback?: CallbackStepDefinition): void; + } + + interface AroundCode { + (scenario: HookScenarioResult, runScenario?: (error: string, callback?: Function) => void): void; + } + + interface Transform { + regexp: RegExp; + transformer: (arg: string) => any; + typeName: string; + } + + interface HookOptions{ + timeout?: number; + } + + export interface Hooks { + Before(code: HookCode): void; + Before(options: HookOptions, code: HookCode): void; + After(code: HookCode): void; + After(options: HookOptions, code: HookCode): void; + Around(code: AroundCode): void; + setDefaultTimeout(time: number): void; + setWorldConstructor(world: (() => void) | ({})): void; + registerHandler(handlerOption: string, code: (event: any, callback: CallbackStepDefinition) => void): void; + registerListener(listener: EventListener): void; + defineParameterType(transform: Transform): void; + } + + export class EventListener { + hear(event: events.Event, callback: () => void): void; + hasHandlerForEvent(event: events.Event): boolean; + buildHandlerNameForEvent(event: events.Event): string; + getHandlerForEvent(event: events.Event): EventHook; + buildHandlerName(shortName: string): string; + setHandlerForEvent(shortName: string, handler: EventListener): void; + } + + export function Listener(): EventListener; + + export namespace events { + + interface Event { + name: string; + data: any; + } + + interface EventPayload { + } + + interface FeaturesPayload extends EventPayload { + getFeatures(): any[]; // https://github.com/cucumber/cucumber-js/blob/dc698bf5bc10d591fa7adeec5fa21b2d90dc9679/lib/cucumber/runtime.js#L34 + } + + interface FeaturesResultPayload extends EventPayload { + duration: number; + scenarioResults: any[]; + success: boolean; + stepsResults: any[]; + strict: boolean; + } + + interface FeaturePayload extends EventPayload { + description: string; + keyword: string; + line: number; + name: string; + tags: Tag[]; + uri: string; + scenarios: Scenario[]; + } + + interface ScenarioPayload extends EventPayload { + feature: Feature; + exception: Error; + keyword: string; + lines: number[]; + name: string; + tags: Tag[]; + uri: string; + line: number; + description: string; + steps: Step[]; + } + + interface ScenarioResultPayload extends EventPayload { + duration: any; + failureException: Error; + scenario: Scenario; + status: string; + stepResults: any[]; + } + + interface StepPayload extends EventPayload { + arguments: any; + line: number; + name: string; + scenario: Scenario; + uri: string; + isBackground: boolean; + keyword: string; + keywordType: string; + } + + interface StepResultPayload extends EventPayload { + ambiguousStepDefinitions: any; + attachments: any[]; + duration: any; + failureException: Error; + step: Step; + stepDefinition: StepDefinition; + status: string; + } + + } + + export interface StepDefinition { + code: Function; + line: number; + options: {}; + pattern: any; + uri: string; + } + + export interface Tag { + name: string; + line: number; + } + + export interface Step { + arguments: any; + line: number; + name: string; + scenario: Scenario; + uri: string; + isBackground: boolean; + keyword: string; + keywordType: string; + } + + export interface Scenario { + feature: Feature; + exception: Error; + keyword: string; + lines: number[]; + name: string; + tags: Tag[]; + uri: string; + line: number; + description: string; + steps: Step[]; + } + + export interface Feature { + description: string; + keyword: string; + line: number; + name: string; + tags: Tag[]; + uri: string; + scenarios: Scenario[]; + } + + interface EventHook { + (event: events.Event, callback?: () => void): void; + } + + export interface SupportCodeConsumer { + (stepDefinitions: StepDefinitions & Hooks): void; + } + + export function defineSupportCode(consumer: SupportCodeConsumer): void; + + export function getSupportCodeFns(): SupportCodeConsumer[]; + + export function clearSupportCodeFns(): void; + + // https://github.com/cucumber/cucumber-js/commit/231183a8a11c985ef7ced1155b7a75f5120a34b6 + export class Formatter { + constructor(options?: any); + log(data: any): void; + } + + export class SummaryFormatter extends Formatter { + indent(text: string, numberOfSpaces: number): any; + } + export class PrettyFormatter extends SummaryFormatter { + formatTags(tags: Tag[]): any; + logIndented(text: string, level: number): void; + logStepResult(stepResult: any): void; + } + + export class ProgressFormatter extends SummaryFormatter{ + } + + export class RerunFormatter extends Formatter{ + } + + export class SnippetsFormatter extends Formatter{ + } + + export class UsageFormatter extends Formatter{ + } + + export class UsageJsonFormatter extends Formatter{ + } + + export class JsonFormatter extends Formatter { + } + +} \ No newline at end of file diff --git a/cucumber/tsconfig.json b/types/cucumber/tsconfig.json similarity index 100% rename from cucumber/tsconfig.json rename to types/cucumber/tsconfig.json diff --git a/types/cucumber/v1/cucumber-tests.ts b/types/cucumber/v1/cucumber-tests.ts new file mode 100644 index 0000000000..596772274f --- /dev/null +++ b/types/cucumber/v1/cucumber-tests.ts @@ -0,0 +1,102 @@ +import * as assert from "power-assert"; +import cucumber = require("cucumber"); + +function StepSample() { + type Callback = cucumber.CallbackStepDefinition; + type Table = cucumber.TableDefinition; + type HookScenario = cucumber.HookScenario; + var step = this; + var hook = this; + + hook.Before(function (scenario: HookScenario, callback: Callback) { + scenario.isFailed() && callback.pending(); + }); + + hook.Before({ timeout: 1000 }, function(scenario: HookScenario, callback: Callback) { + callback(); + }); + + hook.After({ timeout: 1000 }, function(scenario: HookScenario, callback: Callback) { + callback(); + }); + + hook.Around(function (scenario: HookScenario, runScenario: (error: string, callback?: Function) => void) { + scenario.isFailed() && runScenario(null, function () { + console.log('finish tasks'); + }); + }); + + hook.registerHandler('AfterFeatures', function (event: any, callback: Function) { + callback(); + }); + + step.Given(/^I am on the Cucumber.js GitHub repository$/, function (callback: Callback) { + this.visit('https://github.com/cucumber/cucumber-js', callback); + }); + + step.When(/^I go to the README file$/, function (title: string, callback: Callback) { + callback(null, 'pending'); + }); + + step.Then(/^I should see "(.*)" as the page title$/, {timeout: 60 * 1000}, function (title: string, callback: Callback) { + var pageTitle = this.browser.text('title'); + + if (title === pageTitle) { + callback(); + } else { + callback(new Error("Expected to be on page with title " + title)); + } + }); + + // Type for data_table.js on + // https://github.com/cucumber/cucumber-js/blob/a5fd8251918c278ab2e389226d165cedb44df14a/lib/cucumber/ast/data_table.js + + step.Given(/^a table step with Table raw$/, function (table: Table) { + var expected = [ + ['Cucumber', 'Cucumis sativus'], + ['Burr Gherkin', 'Cucumis anguria'] + ]; + + assert.deepEqual(table.raw(), expected); + }); + + step.Given(/^a table step with Table rows$/, function (table: Table) { + var expected = [ + ['Apricot', '5'], + ['Brocolli', '2'], + ['Cucumber', '10'] + ]; + assert.deepEqual(table.rows(), expected) + }); + + step.Given(/^a table step with Table rowHash$/, function (table: Table) { + var expected = { + 'Cucumber': 'Cucumis sativus', + 'Burr Gherkin': 'Cucumis anguria' + }; + assert.deepEqual(table.rowsHash(), expected) + }); + + step.Given(/^a table step$/, function (table: Table) { + var expected = [ + {'Vegetable': 'Apricot', 'Rating': '5'}, + {'Vegetable': 'Brocolli', 'Rating': '2'}, + {'Vegetable': 'Cucumber', 'Rating': '10'} + ]; + assert.deepEqual(table.hashes(), expected) + }); + +} + +function registerListener(): cucumber.EventListener { + let listener = Object.assign(cucumber.Listener(), { + handleBeforeScenarioEvent: (scenario: cucumber.events.ScenarioPayload, callback: () => void) => { + + // do some interesting stuff ... + + callback(); + } + }); + + return listener; +} diff --git a/types/cucumber/v1/index.d.ts b/types/cucumber/v1/index.d.ts new file mode 100644 index 0000000000..5fb080ff5f --- /dev/null +++ b/types/cucumber/v1/index.d.ts @@ -0,0 +1,214 @@ +// Type definitions for cucumber-js v1.3.1 +// Project: https://github.com/cucumber/cucumber-js +// Definitions by: Abraão Alves , Jan Molak , Isaiah Soung +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = cucumber; + +declare namespace cucumber { + + export interface CallbackStepDefinition { + pending: () => PromiseLike; + (error?: any, pending?: string): void; + } + + export interface TableDefinition { + raw: () => Array; + rows: () => Array; + rowsHash: () => {}; + hashes: () => {}; + } + + type StepDefinitionParam = string | CallbackStepDefinition | TableDefinition; + + interface StepDefinitionCode { + (...stepArgs: Array): PromiseLike | any | void; + } + + interface StepDefinitionOptions { + timeout?: number; + } + + export interface StepDefinitions { + Given(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; + Given(pattern: RegExp | string, code: StepDefinitionCode): void; + When(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; + When(pattern: RegExp | string, code: StepDefinitionCode): void; + Then(pattern: RegExp | string, options: StepDefinitionOptions, code: StepDefinitionCode): void; + Then(pattern: RegExp | string, code: StepDefinitionCode): void; + setDefaultTimeout(time: number): void; + } + + interface HookScenario { + getKeyword(): string; + getName(): string; + getDescription(): string; + getUri(): string; + getLine(): number; + getTags(): string[]; + getException(): Error; + getAttachments(): any[]; + attach(data: any, mimeType?: string, callback?: (err?: any) => void): void; + isSuccessful(): boolean; + isFailed(): boolean; + isPending(): boolean; + isUndefined(): boolean; + isSkipped(): boolean; + } + + interface HookCode { + (scenario: HookScenario, callback?: CallbackStepDefinition): void; + } + + interface AroundCode { + (scenario: HookScenario, runScenario?: (error: string, callback?: Function) => void): void; + } + + interface HookOptions{ + timeout?: number; + } + + export interface Hooks { + Before(code: HookCode): void; + Before(options: HookOptions, code: HookCode): void; + After(code: HookCode): void; + After(options: HookOptions, code: HookCode): void; + Around(code: AroundCode): void; + setDefaultTimeout(time: number): void; + registerHandler(handlerOption: string, code: (event: any, callback: CallbackStepDefinition) => void): void; + registerListener(listener: EventListener): void; + } + + export class EventListener { + hear(event: events.Event, callback: () => void): void; + hasHandlerForEvent(event: events.Event): boolean; + buildHandlerNameForEvent(event: events.Event): string; + getHandlerForEvent(event: events.Event): EventHook; + buildHandlerName(shortName: string): string; + setHandlerForEvent(shortName: string, handler: EventListener): void; + } + + export function Listener(): EventListener; + + export namespace events { + + interface Event { + getName(): string; + getPayloadItem(name: string): EventPayload; + } + + interface EventPayload { + } + + interface FeaturesPayload extends EventPayload { + getFeatures(): any[]; // https://github.com/cucumber/cucumber-js/blob/dc698bf5bc10d591fa7adeec5fa21b2d90dc9679/lib/cucumber/runtime.js#L34 + } + + interface FeaturesResultPayload extends EventPayload { + getDuration(): any; + getScenarioCounts(): any; + getStepCounts(): any; + isSuccessful(): boolean; + } + + interface FeaturePayload extends EventPayload { + getStepKeywordByLines(): any; + getScenarioKeyword(): string; + getKeyword(): string; + getName(): string; + getDescription(): string; + getUri(): string; + getLine(): number; + getTags(): Tag[]; + getScenarios(): ScenarioPayload[]; + getPayloadItem(): FeaturePayload; + } + + interface ScenarioPayload extends EventPayload { + getName(): string; + getKeyword(): string; + getDescription(): string; + getFeature(): FeaturePayload; + getUri(): string; + getUris(): string[]; + getLine(): number; + getLines(): number[]; + getTags(): Tag[]; + getSteps(): any[]; + getPayloadItem(): ScenarioPayload; + } + + interface ScenarioResultPayload extends EventPayload { + getFailureException(): Error; + getScenario(): any; + getStatus(): any; + } + + interface StepPayload extends EventPayload { + isHidden(): boolean; + isOutlineStep(): boolean; + getKeyword(): string; + getName(): string; + hasUri(): boolean; + getUri(): string; + getLine(): number; + getPreviousStep(): any; + hasPreviousStep(): boolean; + getAttachment(): any; + getAttachmentContents(): any; + getDocString(): string; + getDataTable(): any; + hasAttachment(): boolean; + hasDocString(): boolean; + hasDataTable(): boolean; + ensureDataTableIsAttached(): void; + isOutcomeStep(): boolean; + isEventStep(): boolean; + hasOutcomeStepKeyword(): boolean; + hasEventStepKeyword(): boolean; + isRepeatingOutcomeStep(): boolean; + isRepeatingEventStep(): boolean; + hasRepeatStepKeyword(): boolean; + isPrecededByOutcomeStep(): boolean; + isPrecededByEventStep(): boolean; + } + + interface StepResultPayload extends EventPayload { + getAmbiguousStepDefinitions(): any[]; + getAttachments(): any[]; + getDuration(): any; + getFailureException(): Error; + getStep(): any; + getStepDefinition(): any; + getStatus(): any; + hasAttachments(): boolean; + } + + } + + interface Tag { + getName(): string; + getLine(): number; + } + + export interface Scenario { + getKeyword(): string; + getName(): string; + getDescription(): string; + getUri(): string; + getLine(): number; + getTags(): Tag[]; + getException(): Error; + getAttachments(): any[]; + attach(data: any, mimeType?: string, callback?: (err?: any) => void): void; + isSuccessful(): boolean; + isFailed(): boolean; + isPending(): boolean; + isUndefined(): boolean; + isSkipped(): boolean; + } + + interface EventHook { + (event: events.Event, callback?: () => void): void; + } +} diff --git a/types/cucumber/v1/tsconfig.json b/types/cucumber/v1/tsconfig.json new file mode 100644 index 0000000000..b467d8c4b4 --- /dev/null +++ b/types/cucumber/v1/tsconfig.json @@ -0,0 +1,31 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": false, + "strictNullChecks": false, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "paths": { + "cucumber": [ + "cucumber/v1" + ], + "cucumber/*": [ + "cucumber/v1/*" + ] + }, + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "cucumber-tests.ts" + ] +} diff --git a/cuid/cuid-tests.ts b/types/cuid/cuid-tests.ts similarity index 100% rename from cuid/cuid-tests.ts rename to types/cuid/cuid-tests.ts diff --git a/cuid/index.d.ts b/types/cuid/index.d.ts similarity index 100% rename from cuid/index.d.ts rename to types/cuid/index.d.ts diff --git a/cuid/tsconfig.json b/types/cuid/tsconfig.json similarity index 100% rename from cuid/tsconfig.json rename to types/cuid/tsconfig.json diff --git a/currency-formatter/currencies.d.ts b/types/currency-formatter/currencies.d.ts similarity index 100% rename from currency-formatter/currencies.d.ts rename to types/currency-formatter/currencies.d.ts diff --git a/currency-formatter/currency-formatter-tests.ts b/types/currency-formatter/currency-formatter-tests.ts similarity index 100% rename from currency-formatter/currency-formatter-tests.ts rename to types/currency-formatter/currency-formatter-tests.ts diff --git a/currency-formatter/index.d.ts b/types/currency-formatter/index.d.ts similarity index 100% rename from currency-formatter/index.d.ts rename to types/currency-formatter/index.d.ts diff --git a/currency-formatter/tsconfig.json b/types/currency-formatter/tsconfig.json similarity index 100% rename from currency-formatter/tsconfig.json rename to types/currency-formatter/tsconfig.json diff --git a/currency-formatter/tslint.json b/types/currency-formatter/tslint.json similarity index 100% rename from currency-formatter/tslint.json rename to types/currency-formatter/tslint.json diff --git a/custom-error-generator/custom-error-generator-tests.ts b/types/custom-error-generator/custom-error-generator-tests.ts similarity index 100% rename from custom-error-generator/custom-error-generator-tests.ts rename to types/custom-error-generator/custom-error-generator-tests.ts diff --git a/custom-error-generator/index.d.ts b/types/custom-error-generator/index.d.ts similarity index 100% rename from custom-error-generator/index.d.ts rename to types/custom-error-generator/index.d.ts diff --git a/custom-error-generator/tsconfig.json b/types/custom-error-generator/tsconfig.json similarity index 100% rename from custom-error-generator/tsconfig.json rename to types/custom-error-generator/tsconfig.json diff --git a/cybozulabs-md5/cybozulabs-md5-tests.ts b/types/cybozulabs-md5/cybozulabs-md5-tests.ts similarity index 100% rename from cybozulabs-md5/cybozulabs-md5-tests.ts rename to types/cybozulabs-md5/cybozulabs-md5-tests.ts diff --git a/cybozulabs-md5/index.d.ts b/types/cybozulabs-md5/index.d.ts similarity index 100% rename from cybozulabs-md5/index.d.ts rename to types/cybozulabs-md5/index.d.ts diff --git a/cybozulabs-md5/tsconfig.json b/types/cybozulabs-md5/tsconfig.json similarity index 100% rename from cybozulabs-md5/tsconfig.json rename to types/cybozulabs-md5/tsconfig.json diff --git a/d3-array/d3-array-tests.ts b/types/d3-array/d3-array-tests.ts similarity index 99% rename from d3-array/d3-array-tests.ts rename to types/d3-array/d3-array-tests.ts index 7dbe08bad0..bb713192e8 100644 --- a/d3-array/d3-array-tests.ts +++ b/types/d3-array/d3-array-tests.ts @@ -26,7 +26,6 @@ class NumCoercible { } class MixedObject { - num: number; str: string; numeric: NumCoercible; @@ -289,7 +288,6 @@ num = mixedObjectDateBisectorObject.right(mixedObjectArray, new Date(2015, 3, 14 num = mixedObjectDateBisectorObject.right(mixedObjectArray, new Date(2015, 3, 14), 1); num = mixedObjectDateBisectorObject.right(mixedObjectArray, new Date(2015, 3, 14), 3, 4); - // ascending() ----------------------------------------------------------------- num = d3Array.ascending(undefined, 20); @@ -339,12 +337,11 @@ crossed = d3Array.cross(['x', 'y'], [1, 2]); let strArray: string[] = d3Array.cross([2, 3], [5, 6], (a, b) => (a + b) + 'px'); strArray = d3Array.cross([2, 3], [5, 6], (a, b) => { - let aa: number = a; - let bb: number = b; + const aa: number = a; + const bb: number = b; return (aa + bb) + 'px'; }); - // pairs() --------------------------------------------------------------------- let pairs: Array<[MixedObject, MixedObject]>; @@ -353,8 +350,8 @@ pairs = d3Array.pairs(mergedArray); numbersArray = d3Array.pairs(mergedArray, (a, b) => b.num - a.num); numbersArray = d3Array.pairs(mergedArray, (a, b) => { - let aa: MixedObject = a; - let bb: MixedObject = b; + const aa: MixedObject = a; + const bb: MixedObject = b; return bb.num - aa.num; }); @@ -374,7 +371,6 @@ const testObject = { const x: Array = d3Array.permute(testObject, ['name', 'val', 'when', 'more']); - // range() --------------------------------------------------------------------- numbersArray = d3Array.range(10); @@ -389,7 +385,6 @@ mergedArray = d3Array.shuffle(mergedArray, 1); mergedArray = d3Array.shuffle(mergedArray, 1, 3); - // ticks() --------------------------------------------------------------------- numbersArray = d3Array.ticks(1, 10, 5); @@ -519,8 +514,6 @@ const mixedObject: MixedObject = testBin[0]; // with element type MixedObject date = testBin.x0; // bin lower bound is Date date = testBin.x1; // bin upper bound is Date - - // Histogram Tresholds ========================================================= num = d3Array.thresholdFreedmanDiaconis([-1, 0, 1, 1, 3, 20, 234], -1, 234); diff --git a/d3-array/index.d.ts b/types/d3-array/index.d.ts similarity index 99% rename from d3-array/index.d.ts rename to types/d3-array/index.d.ts index d938a8c032..ccd2d568bb 100644 --- a/d3-array/index.d.ts +++ b/types/d3-array/index.d.ts @@ -9,7 +9,6 @@ // Shared Types and Interfaces // -------------------------------------------------------------------------- - /** * Administrivia: JavaScript primitive types and Date */ @@ -26,7 +25,6 @@ interface Numeric { // Descriptive Statistics // -------------------------------------------------------------------------------------- - /** * Return the maximum value in the array of strings using natural order. */ @@ -67,8 +65,6 @@ export function min(array: T[], accessor: (datum: T, index: number, array: T[ */ export function min(array: T[], accessor: (datum: T, index: number, array: T[]) => U | undefined | null): U | undefined; - - /** * Return the min and max simultaneously. */ @@ -139,7 +135,6 @@ export function variance(array: Array): */ export function variance(array: T[], accessor: (datum: T, index: number, array: T[]) => number | undefined | null): number | undefined; - // -------------------------------------------------------------------------------------- // Searching Arrays // -------------------------------------------------------------------------------------- @@ -155,7 +150,7 @@ export function bisectRight(array: number[], x: number, lo?: number, hi?: number export function bisectRight(array: string[], x: string, lo?: number, hi?: number): number; export function bisectRight(array: Date[], x: Date, lo?: number, hi?: number): number; -export var bisect: typeof bisectRight; +export const bisect: typeof bisectRight; export interface Bisector { left: (array: T[], x: U, lo?: number, hi?: number) => number; @@ -244,7 +239,6 @@ export function range(stop: number): number[]; */ export function range(start: number, stop: number, step?: number): number[]; - /** * Randomizes the order of the specified array using the Fisher–Yates shuffle. */ @@ -261,13 +255,11 @@ export function ticks(start: number, stop: number, count: number): number[]; */ export function tickStep(start: number, stop: number, count: number): number[]; - /** * Transpose a matrix provided in Array of Arrays format. */ export function transpose(matrix: T[][]): T[][]; - /** * Returns an array of arrays, where the ith array contains the ith element from each of the argument arrays. * The returned array is truncated in length to the shortest array in arrays. If arrays contains only a single array, the returned array @@ -294,8 +286,6 @@ export type ThresholdCountGenerator = (values: number[], min?: number, max?: num */ export type ThresholdArrayGenerator = (values: Value[], min?: Value, max?: Value) => Value[]; - - export interface HistogramGenerator { (data: Datum[]): Array>; value(): (d: Datum, i: number, data: Datum[]) => Value; diff --git a/d3-array/tsconfig.json b/types/d3-array/tsconfig.json similarity index 100% rename from d3-array/tsconfig.json rename to types/d3-array/tsconfig.json diff --git a/d3-array/tslint.json b/types/d3-array/tslint.json similarity index 100% rename from d3-array/tslint.json rename to types/d3-array/tslint.json diff --git a/d3-axis/d3-axis-tests.ts b/types/d3-axis/d3-axis-tests.ts similarity index 99% rename from d3-axis/d3-axis-tests.ts rename to types/d3-axis/d3-axis-tests.ts index 1a4077d690..f2b47beaa8 100644 --- a/d3-axis/d3-axis-tests.ts +++ b/types/d3-axis/d3-axis-tests.ts @@ -26,8 +26,6 @@ import { Transition } from 'd3-transition'; import { timeMinute } from 'd3-time'; import { format } from 'd3-format'; - - // -------------------------------------------------------------------------- // Preparatory Steps // -------------------------------------------------------------------------- @@ -81,8 +79,6 @@ leftAxis = leftAxis.scale(scalePow()); const powerScale: ScalePower = leftAxis.scale>(); // powerScale = leftAxis.scale(); // fails, without casting as AxisScale is purposely generic - - bottomAxis = bottomAxis.scale(scaleOrdinal()); // bottomAxis = bottomAxis.scale(scalePow()) // fails, domain of scale incompatible with domain of axis diff --git a/d3-axis/index.d.ts b/types/d3-axis/index.d.ts similarity index 99% rename from d3-axis/index.d.ts rename to types/d3-axis/index.d.ts index cd8ed94714..4a65952070 100644 --- a/d3-axis/index.d.ts +++ b/types/d3-axis/index.d.ts @@ -11,7 +11,6 @@ import { Selection, TransitionLike } from 'd3-selection'; // Shared Types and Interfaces // -------------------------------------------------------------------------- - /** * A helper interface to describe the minimal contract to be met by a time interval * which can be passed into the Axis.ticks(...) or Axis.tickArguments(...) methods when @@ -171,7 +170,6 @@ export interface Axis { */ tickValues(values: null): this; - /** * Returns the currently set tick format function, which defaults to null. */ @@ -258,7 +256,6 @@ export interface Axis { * @param padding Padding in pixels (Default is 3). */ tickPadding(padding: number): this; - } /** diff --git a/d3-axis/tsconfig.json b/types/d3-axis/tsconfig.json similarity index 100% rename from d3-axis/tsconfig.json rename to types/d3-axis/tsconfig.json diff --git a/d3-axis/tslint.json b/types/d3-axis/tslint.json similarity index 100% rename from d3-axis/tslint.json rename to types/d3-axis/tslint.json diff --git a/d3-box/d3-box-tests.ts b/types/d3-box/d3-box-tests.ts similarity index 100% rename from d3-box/d3-box-tests.ts rename to types/d3-box/d3-box-tests.ts diff --git a/d3-box/index.d.ts b/types/d3-box/index.d.ts similarity index 100% rename from d3-box/index.d.ts rename to types/d3-box/index.d.ts diff --git a/d3-box/tsconfig.json b/types/d3-box/tsconfig.json similarity index 100% rename from d3-box/tsconfig.json rename to types/d3-box/tsconfig.json diff --git a/d3-brush/d3-brush-tests.ts b/types/d3-brush/d3-brush-tests.ts similarity index 99% rename from d3-brush/d3-brush-tests.ts rename to types/d3-brush/d3-brush-tests.ts index 367cc05d1b..2d9ee319aa 100644 --- a/d3-brush/d3-brush-tests.ts +++ b/types/d3-brush/d3-brush-tests.ts @@ -19,7 +19,6 @@ interface BrushDatum { filterZoomEvent: boolean; } - // ----------------------------------------------------------------------------- // Test Define BrushBehavior // ----------------------------------------------------------------------------- @@ -48,7 +47,6 @@ brush = brush.extent(function(d, i, group) { // chainable brush = brush.filter(function(d, i, group) { - // Cast d3 event to D3ZoomEvent to be used in filter logic const e = > event; @@ -80,7 +78,6 @@ brush = brush.on('end', brushed); // brush = brush.on('end', wrongHandler1); // fails, wrongHandler event handler has wrong this // brush = brush.on('end', wrongHandler2); // fails, wrongHandler event handler has wrong datum type - brushed = brush.on('end'); // chainable remove handler @@ -97,8 +94,6 @@ brush.on('end', function(d, i, g) { // do anything }); - - // ----------------------------------------------------------------------------- // Test Attach Brush Behavior // ----------------------------------------------------------------------------- @@ -121,10 +116,8 @@ const gX = select('svg') filterZoomEvent: true }); - gX.call(brushX); - // ----------------------------------------------------------------------------- // Test Use Brush Behavior // ----------------------------------------------------------------------------- @@ -155,7 +148,6 @@ brush.move(gTransition, function(d, i, group) { return selection; }); - const gXTransition = gX.transition(); // 1d brush move with Selection @@ -178,15 +170,12 @@ brush.move(gXTransition, function(d, i, group) { return selection; }); - // ----------------------------------------------------------------------------- // Test Brush Event Interface // ----------------------------------------------------------------------------- - const e: d3Brush.D3BrushEvent = event; - const target: d3Brush.BrushBehavior = e.target; const type: 'start' | 'brush' | 'end' | string = e.type; const brushSelection: d3Brush.BrushSelection = e.selection; diff --git a/d3-brush/index.d.ts b/types/d3-brush/index.d.ts similarity index 99% rename from d3-brush/index.d.ts rename to types/d3-brush/index.d.ts index 5c89465bce..644e6c06f7 100644 --- a/d3-brush/index.d.ts +++ b/types/d3-brush/index.d.ts @@ -189,7 +189,6 @@ export interface BrushBehavior { * with this as the current DOM element. */ on(typenames: string, listener: ValueFn): this; - } /** diff --git a/d3-brush/tsconfig.json b/types/d3-brush/tsconfig.json similarity index 100% rename from d3-brush/tsconfig.json rename to types/d3-brush/tsconfig.json diff --git a/d3-brush/tslint.json b/types/d3-brush/tslint.json similarity index 100% rename from d3-brush/tslint.json rename to types/d3-brush/tslint.json diff --git a/d3-chord/d3-chord-tests.ts b/types/d3-chord/d3-chord-tests.ts similarity index 99% rename from d3-chord/d3-chord-tests.ts rename to types/d3-chord/d3-chord-tests.ts index c826c81fac..b66f39787a 100644 --- a/d3-chord/d3-chord-tests.ts +++ b/types/d3-chord/d3-chord-tests.ts @@ -10,7 +10,6 @@ import * as d3Chord from 'd3-chord'; import { select, Selection } from 'd3-selection'; import { ascending } from 'd3-array'; - // --------------------------------------------------------------------- // Preparatory Steps // --------------------------------------------------------------------- @@ -39,7 +38,6 @@ let numAccessor: (this: SVGPathElement, d: d3Chord.ChordSubgroup, ...args: any[] // Test Chord // --------------------------------------------------------------------- - // chord() create ChordLayout generator =============================== let chordLayout: d3Chord.ChordLayout; @@ -64,7 +62,6 @@ chordLayout = chordLayout.sortSubgroups(ascending); chordLayout = chordLayout.sortSubgroups(null); comparatorFn = chordLayout.sortSubgroups(); - // sortChords() -------------------------------------------------------- chordLayout = chordLayout.sortChords(ascending); @@ -75,10 +72,8 @@ comparatorFn = chordLayout.sortChords(); chords = chordLayout(matrix); - // Test supporting interfaces ========================================== - const length: number = chords.length; chordGroups = chords.groups; @@ -98,7 +93,6 @@ num = chordSubgroup.endAngle; num = chordSubgroup.value; num = chordSubgroup.index; - // --------------------------------------------------------------------- // Test Ribbon // --------------------------------------------------------------------- @@ -140,7 +134,6 @@ svgRibbon = svgRibbon.target(d => { subgroupAccessor = svgRibbon.target(); - // radius() ----------------------------------------------------------- canvasRibbon = canvasRibbon.radius(30); diff --git a/d3-chord/index.d.ts b/types/d3-chord/index.d.ts similarity index 100% rename from d3-chord/index.d.ts rename to types/d3-chord/index.d.ts diff --git a/d3-chord/tsconfig.json b/types/d3-chord/tsconfig.json similarity index 100% rename from d3-chord/tsconfig.json rename to types/d3-chord/tsconfig.json diff --git a/d3-chord/tslint.json b/types/d3-chord/tslint.json similarity index 100% rename from d3-chord/tslint.json rename to types/d3-chord/tslint.json diff --git a/d3-collection/d3-collection-tests.ts b/types/d3-collection/d3-collection-tests.ts similarity index 100% rename from d3-collection/d3-collection-tests.ts rename to types/d3-collection/d3-collection-tests.ts diff --git a/d3-collection/index.d.ts b/types/d3-collection/index.d.ts similarity index 100% rename from d3-collection/index.d.ts rename to types/d3-collection/index.d.ts diff --git a/d3-collection/tsconfig.json b/types/d3-collection/tsconfig.json similarity index 100% rename from d3-collection/tsconfig.json rename to types/d3-collection/tsconfig.json diff --git a/d3-color/d3-color-tests.ts b/types/d3-color/d3-color-tests.ts similarity index 100% rename from d3-color/d3-color-tests.ts rename to types/d3-color/d3-color-tests.ts diff --git a/d3-color/index.d.ts b/types/d3-color/index.d.ts similarity index 100% rename from d3-color/index.d.ts rename to types/d3-color/index.d.ts diff --git a/d3-color/tsconfig.json b/types/d3-color/tsconfig.json similarity index 100% rename from d3-color/tsconfig.json rename to types/d3-color/tsconfig.json diff --git a/d3-dispatch/d3-dispatch-tests.ts b/types/d3-dispatch/d3-dispatch-tests.ts similarity index 100% rename from d3-dispatch/d3-dispatch-tests.ts rename to types/d3-dispatch/d3-dispatch-tests.ts diff --git a/d3-dispatch/index.d.ts b/types/d3-dispatch/index.d.ts similarity index 100% rename from d3-dispatch/index.d.ts rename to types/d3-dispatch/index.d.ts diff --git a/d3-dispatch/tsconfig.json b/types/d3-dispatch/tsconfig.json similarity index 100% rename from d3-dispatch/tsconfig.json rename to types/d3-dispatch/tsconfig.json diff --git a/d3-drag/d3-drag-tests.ts b/types/d3-drag/d3-drag-tests.ts similarity index 100% rename from d3-drag/d3-drag-tests.ts rename to types/d3-drag/d3-drag-tests.ts diff --git a/d3-drag/index.d.ts b/types/d3-drag/index.d.ts similarity index 100% rename from d3-drag/index.d.ts rename to types/d3-drag/index.d.ts diff --git a/d3-drag/tsconfig.json b/types/d3-drag/tsconfig.json similarity index 100% rename from d3-drag/tsconfig.json rename to types/d3-drag/tsconfig.json diff --git a/d3-drag/tslint.json b/types/d3-drag/tslint.json similarity index 100% rename from d3-drag/tslint.json rename to types/d3-drag/tslint.json diff --git a/d3-dsv/d3-dsv-tests.ts b/types/d3-dsv/d3-dsv-tests.ts similarity index 100% rename from d3-dsv/d3-dsv-tests.ts rename to types/d3-dsv/d3-dsv-tests.ts diff --git a/d3-dsv/index.d.ts b/types/d3-dsv/index.d.ts similarity index 100% rename from d3-dsv/index.d.ts rename to types/d3-dsv/index.d.ts diff --git a/d3-dsv/tsconfig.json b/types/d3-dsv/tsconfig.json similarity index 100% rename from d3-dsv/tsconfig.json rename to types/d3-dsv/tsconfig.json diff --git a/d3-dsv/v0/d3-dsv-tests.ts b/types/d3-dsv/v0/d3-dsv-tests.ts similarity index 100% rename from d3-dsv/v0/d3-dsv-tests.ts rename to types/d3-dsv/v0/d3-dsv-tests.ts diff --git a/d3-dsv/v0/index.d.ts b/types/d3-dsv/v0/index.d.ts similarity index 100% rename from d3-dsv/v0/index.d.ts rename to types/d3-dsv/v0/index.d.ts diff --git a/d3-dsv/v0/tsconfig.json b/types/d3-dsv/v0/tsconfig.json similarity index 100% rename from d3-dsv/v0/tsconfig.json rename to types/d3-dsv/v0/tsconfig.json diff --git a/d3-dsv/v0/tslint.json b/types/d3-dsv/v0/tslint.json similarity index 100% rename from d3-dsv/v0/tslint.json rename to types/d3-dsv/v0/tslint.json diff --git a/d3-ease/d3-ease-tests.ts b/types/d3-ease/d3-ease-tests.ts similarity index 100% rename from d3-ease/d3-ease-tests.ts rename to types/d3-ease/d3-ease-tests.ts diff --git a/d3-ease/index.d.ts b/types/d3-ease/index.d.ts similarity index 100% rename from d3-ease/index.d.ts rename to types/d3-ease/index.d.ts diff --git a/d3-ease/tsconfig.json b/types/d3-ease/tsconfig.json similarity index 100% rename from d3-ease/tsconfig.json rename to types/d3-ease/tsconfig.json diff --git a/d3-ease/tslint.json b/types/d3-ease/tslint.json similarity index 100% rename from d3-ease/tslint.json rename to types/d3-ease/tslint.json diff --git a/d3-force/d3-force-tests.ts b/types/d3-force/d3-force-tests.ts similarity index 100% rename from d3-force/d3-force-tests.ts rename to types/d3-force/d3-force-tests.ts diff --git a/d3-force/index.d.ts b/types/d3-force/index.d.ts similarity index 100% rename from d3-force/index.d.ts rename to types/d3-force/index.d.ts diff --git a/d3-force/tsconfig.json b/types/d3-force/tsconfig.json similarity index 100% rename from d3-force/tsconfig.json rename to types/d3-force/tsconfig.json diff --git a/d3-force/tslint.json b/types/d3-force/tslint.json similarity index 100% rename from d3-force/tslint.json rename to types/d3-force/tslint.json diff --git a/d3-format/d3-format-tests.ts b/types/d3-format/d3-format-tests.ts similarity index 100% rename from d3-format/d3-format-tests.ts rename to types/d3-format/d3-format-tests.ts diff --git a/d3-format/index.d.ts b/types/d3-format/index.d.ts similarity index 100% rename from d3-format/index.d.ts rename to types/d3-format/index.d.ts diff --git a/d3-format/tsconfig.json b/types/d3-format/tsconfig.json similarity index 100% rename from d3-format/tsconfig.json rename to types/d3-format/tsconfig.json diff --git a/d3-geo/d3-geo-tests.ts b/types/d3-geo/d3-geo-tests.ts similarity index 80% rename from d3-geo/d3-geo-tests.ts rename to types/d3-geo/d3-geo-tests.ts index a29dce0e8b..b5ad28f3e2 100644 --- a/d3-geo/d3-geo-tests.ts +++ b/types/d3-geo/d3-geo-tests.ts @@ -144,7 +144,7 @@ contained = d3Geo.geoContains(sampleExtendedFeatureCollection, [0, 0]); // geoDistance(...) ======================================================= -let distance: number = d3Geo.geoDistance([54, 2], [53, 1]); +const distance: number = d3Geo.geoDistance([54, 2], [53, 1]); // geoLength(...) ========================================================= @@ -160,19 +160,19 @@ length = d3Geo.geoLength(sampleExtendedFeatureCollection); // geoInterpolate(...) ==================================================== -let interpolateFct: (t: number) => [number, number] = d3Geo.geoInterpolate([54, 2], [53, 1]); +const interpolateFct: (t: number) => [number, number] = d3Geo.geoInterpolate([54, 2], [53, 1]); // geoRotation(...) ======================================================= // create rotation ----------------------------------------------------- -let rotation: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45]); -let rotation2: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45, 27.5]); +const rotation: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45]); +const rotation2: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45, 27.5]); // use rotation -------------------------------------------------------- -let point: [number, number] = rotation([54, 2]); -let inverted: [number, number] = rotation.invert([54, 2]); +const point: [number, number] = rotation([54, 2]); +const inverted: [number, number] = rotation.invert([54, 2]); // ---------------------------------------------------------------------- // Spherical Shapes - geoCircle @@ -185,24 +185,23 @@ let circleGeneratorSimple: d3Geo.GeoCircleGenerator = d3Geo.geoCircle( // complex use as part of object class Circulator { - constructor(radius: number, precision: number) { this.r = radius; this.p = precision; this.circleGenerator = d3Geo.geoCircle() - .radius(function (datum) { - let t: Circulator = this; - let d: [number, number] | undefined = datum; + .radius(function(datum) { + const t: Circulator = this; + const d: [number, number] | undefined = datum; return this.r; }) - .precision(function (datum) { - let t: Circulator = this; - let d: [number, number] | undefined = datum; + .precision(function(datum) { + const t: Circulator = this; + const d: [number, number] | undefined = datum; return this.p; }) - .center(function (datum) { - let t: Circulator = this; - let d: [number, number] | undefined = datum; + .center(function(datum) { + const t: Circulator = this; + const d: [number, number] | undefined = datum; return d ? d : [0, 0]; }); } @@ -219,28 +218,28 @@ class Circulator { } } -let circulator = new Circulator(50, 2); +const circulator = new Circulator(50, 2); // Configure CircleGenerator ============================================ // center(...) ---------------------------------------------------------- -let centerFctSimple: ((this: any, d: any, ...args: any[]) => [number, number]) = circleGeneratorSimple.center(); +const centerFctSimple: ((this: any, d: any, ...args: any[]) => [number, number]) = circleGeneratorSimple.center(); -let c: [number, number] = [54, 2]; +const c: [number, number] = [54, 2]; circleGeneratorSimple = circleGeneratorSimple.center(() => c); circleGeneratorSimple = circleGeneratorSimple.center(c); // radius(...) ----------------------------------------------------------- -let radius: ((...args: any[]) => number) = circleGeneratorSimple.radius(); +const radius: ((...args: any[]) => number) = circleGeneratorSimple.radius(); circleGeneratorSimple = circleGeneratorSimple.radius(() => 5); circleGeneratorSimple = circleGeneratorSimple.radius(2); // precision(...) -------------------------------------------------------- -let precision: ((...args: any[]) => number) = circleGeneratorSimple.precision(); +const precision: ((...args: any[]) => number) = circleGeneratorSimple.precision(); circleGeneratorSimple = circleGeneratorSimple.precision(() => 5); circleGeneratorSimple = circleGeneratorSimple.precision(2); @@ -253,7 +252,6 @@ let circlePolygon: GeoJSON.Polygon = circleGeneratorSimple(); circlePolygon = circulator.getCirclePolygon([5, 5]); circlePolygon = circulator.getCirclePolygon(); - // ---------------------------------------------------------------------- // Spherical Shapes - geoGraticule // ---------------------------------------------------------------------- @@ -266,44 +264,44 @@ let graticuleGenerator: d3Geo.GeoGraticuleGenerator = d3Geo.geoGraticule(); // extent(...) ----------------------------------------------------------- -let extent: [[number, number], [number, number]] = graticuleGenerator.extent(); +const extent: [[number, number], [number, number]] = graticuleGenerator.extent(); graticuleGenerator = graticuleGenerator.extent([[-180, -80], [180, 80]]); // extentMajor(...) --------------------------------------------------------- -let extentMajor: [[number, number], [number, number]] = graticuleGenerator.extentMajor(); +const extentMajor: [[number, number], [number, number]] = graticuleGenerator.extentMajor(); graticuleGenerator = graticuleGenerator.extentMajor([[-180, -80], [180, 80]]); // extentMinor(...) --------------------------------------------------------- -let extentMinor: [[number, number], [number, number]] = graticuleGenerator.extentMinor(); +const extentMinor: [[number, number], [number, number]] = graticuleGenerator.extentMinor(); graticuleGenerator = graticuleGenerator.extentMinor([[-180, -80], [180, 80]]); // step(...) ---------------------------------------------------------------- -let step: [number, number] = graticuleGenerator.step(); +const step: [number, number] = graticuleGenerator.step(); graticuleGenerator = graticuleGenerator.step([10, 10]); // stepMajor(...) ----------------------------------------------------------- -let stepMajor: [number, number] = graticuleGenerator.stepMajor(); +const stepMajor: [number, number] = graticuleGenerator.stepMajor(); graticuleGenerator = graticuleGenerator.stepMajor([10, 10]); // stepMinor(...) ------------------------------------------------------------ -let stepMinor: [number, number] = graticuleGenerator.stepMinor(); +const stepMinor: [number, number] = graticuleGenerator.stepMinor(); graticuleGenerator = graticuleGenerator.stepMinor([10, 10]); // precision(...) ------------------------------------------------------------- -let precision1: number = graticuleGenerator.precision(); +const precision1: number = graticuleGenerator.precision(); graticuleGenerator = graticuleGenerator.precision(5); // Use GeoGraticuleGenerator ============================================ let multiString: GeoJSON.MultiLineString = graticuleGenerator(); -let lines: GeoJSON.LineString[] = graticuleGenerator.lines(); -let polygon2: GeoJSON.Polygon = graticuleGenerator.outline(); +const lines: GeoJSON.LineString[] = graticuleGenerator.lines(); +const polygon2: GeoJSON.Polygon = graticuleGenerator.outline(); // geoGraticule10() ===================================================== @@ -317,24 +315,22 @@ multiString = d3Geo.geoGraticule10(); // Pre-Defined Raw Projection Factories ================================= -let azimuthalEqualAreaRaw: d3Geo.GeoRawProjection = d3Geo.geoAzimuthalEqualAreaRaw(); -let azimuthalEquidistantRaw: d3Geo.GeoRawProjection = d3Geo.geoAzimuthalEquidistantRaw(); -let conicConformalRaw: d3Geo.GeoRawProjection = d3Geo.geoConicConformalRaw(0, 0); -let conicEqualAreaRaw: d3Geo.GeoRawProjection = d3Geo.geoConicEqualAreaRaw(0, 0); -let conicEquidistantRaw: d3Geo.GeoRawProjection = d3Geo.geoConicEquidistantRaw(0, 0); -let equirectangularRaw: d3Geo.GeoRawProjection = d3Geo.geoEquirectangularRaw(); -let gnomonicRaw: d3Geo.GeoRawProjection = d3Geo.geoGnomonicRaw(); -let mercatorRaw: d3Geo.GeoRawProjection = d3Geo.geoMercatorRaw(); -let orthographicRaw: d3Geo.GeoRawProjection = d3Geo.geoOrthographicRaw(); -let stereographicRaw: d3Geo.GeoRawProjection = d3Geo.geoStereographicRaw(); -let transverseMercatorRaw: d3Geo.GeoRawProjection = d3Geo.geoTransverseMercatorRaw(); +const azimuthalEqualAreaRaw: d3Geo.GeoRawProjection = d3Geo.geoAzimuthalEqualAreaRaw(); +const azimuthalEquidistantRaw: d3Geo.GeoRawProjection = d3Geo.geoAzimuthalEquidistantRaw(); +const conicConformalRaw: d3Geo.GeoRawProjection = d3Geo.geoConicConformalRaw(0, 0); +const conicEqualAreaRaw: d3Geo.GeoRawProjection = d3Geo.geoConicEqualAreaRaw(0, 0); +const conicEquidistantRaw: d3Geo.GeoRawProjection = d3Geo.geoConicEquidistantRaw(0, 0); +const equirectangularRaw: d3Geo.GeoRawProjection = d3Geo.geoEquirectangularRaw(); +const gnomonicRaw: d3Geo.GeoRawProjection = d3Geo.geoGnomonicRaw(); +const mercatorRaw: d3Geo.GeoRawProjection = d3Geo.geoMercatorRaw(); +const orthographicRaw: d3Geo.GeoRawProjection = d3Geo.geoOrthographicRaw(); +const stereographicRaw: d3Geo.GeoRawProjection = d3Geo.geoStereographicRaw(); +const transverseMercatorRaw: d3Geo.GeoRawProjection = d3Geo.geoTransverseMercatorRaw(); // Use Raw Projection ===================================================== -let rawProjectionPoint: [number, number] = azimuthalEqualAreaRaw(54, 2); -let rawProjectionInvertedPoint: [number, number] = azimuthalEqualAreaRaw.invert(180, 6); - - +const rawProjectionPoint: [number, number] = azimuthalEqualAreaRaw(54, 2); +const rawProjectionInvertedPoint: [number, number] = azimuthalEqualAreaRaw.invert(180, 6); // ---------------------------------------------------------------------- // Pre-Defined Projections @@ -342,39 +338,38 @@ let rawProjectionInvertedPoint: [number, number] = azimuthalEqualAreaRaw.invert( // Create predefined Projection from factory ============================= -let albers: d3Geo.GeoConicProjection = d3Geo.geoAlbers(); -let albersUsa: d3Geo.GeoProjection = d3Geo.geoAlbersUsa(); -let azimuthalEqualArea: d3Geo.GeoProjection = d3Geo.geoAzimuthalEqualArea(); -let azimuthalEquidistant: d3Geo.GeoProjection = d3Geo.geoAzimuthalEquidistant(); +const albers: d3Geo.GeoConicProjection = d3Geo.geoAlbers(); +const albersUsa: d3Geo.GeoProjection = d3Geo.geoAlbersUsa(); +const azimuthalEqualArea: d3Geo.GeoProjection = d3Geo.geoAzimuthalEqualArea(); +const azimuthalEquidistant: d3Geo.GeoProjection = d3Geo.geoAzimuthalEquidistant(); let conicConformal: d3Geo.GeoConicProjection = d3Geo.geoConicConformal(); -let conicEqualArea: d3Geo.GeoConicProjection = d3Geo.geoConicEqualArea(); -let conicEquidistant: d3Geo.GeoConicProjection = d3Geo.geoConicEquidistant(); -let cquirectangular: d3Geo.GeoProjection = d3Geo.geoEquirectangular(); -let gnomonic: d3Geo.GeoProjection = d3Geo.geoGnomonic(); -let mercator: d3Geo.GeoProjection = d3Geo.geoMercator(); -let orthographic: d3Geo.GeoProjection = d3Geo.geoOrthographic(); -let stereographic: d3Geo.GeoProjection = d3Geo.geoStereographic(); -let transverseMercator: d3Geo.GeoProjection = d3Geo.geoTransverseMercator(); +const conicEqualArea: d3Geo.GeoConicProjection = d3Geo.geoConicEqualArea(); +const conicEquidistant: d3Geo.GeoConicProjection = d3Geo.geoConicEquidistant(); +const cquirectangular: d3Geo.GeoProjection = d3Geo.geoEquirectangular(); +const gnomonic: d3Geo.GeoProjection = d3Geo.geoGnomonic(); +const mercator: d3Geo.GeoProjection = d3Geo.geoMercator(); +const orthographic: d3Geo.GeoProjection = d3Geo.geoOrthographic(); +const stereographic: d3Geo.GeoProjection = d3Geo.geoStereographic(); +const transverseMercator: d3Geo.GeoProjection = d3Geo.geoTransverseMercator(); // ---------------------------------------------------------------------- // Create New Projections // ---------------------------------------------------------------------- +const geoProjection: d3Geo.GeoProjection = d3Geo.geoProjection(azimuthalEqualAreaRaw); -let geoProjection: d3Geo.GeoProjection = d3Geo.geoProjection(azimuthalEqualAreaRaw); - -let mutate: () => d3Geo.GeoProjection = d3Geo.geoProjectionMutator(() => azimuthalEqualAreaRaw); +const mutate: () => d3Geo.GeoProjection = d3Geo.geoProjectionMutator(() => azimuthalEqualAreaRaw); let constructedProjection: d3Geo.GeoProjection = mutate(); // Use Projection ========================================================== -let projected: [number, number] = constructedProjection([54, 2]); -let inverted2: [number, number] = constructedProjection.invert([54, 2]); +const projected: [number, number] = constructedProjection([54, 2]); +const inverted2: [number, number] = constructedProjection.invert([54, 2]); // TODO ????? // let stream: d3Geo.Stream = constructedProjection.stream([54, 2]); -let clipAngle: number = constructedProjection.clipAngle(); +const clipAngle: number = constructedProjection.clipAngle(); constructedProjection = constructedProjection.clipAngle(null); constructedProjection = constructedProjection.clipAngle(45); @@ -388,14 +383,14 @@ constructedProjection = constructedProjection.scale(45); let translate: [number, number] = constructedProjection.translate(); constructedProjection = constructedProjection.translate([480, 250]); -let center: [number, number] = constructedProjection.center(); +const center: [number, number] = constructedProjection.center(); constructedProjection = constructedProjection.center([0, 0]); -let rotate: [number, number, number] = constructedProjection.rotate(); +const rotate: [number, number, number] = constructedProjection.rotate(); constructedProjection = constructedProjection.rotate([0, 0]); constructedProjection = constructedProjection.rotate([0, 0, 0]); -let precision2: number = constructedProjection.precision(); +const precision2: number = constructedProjection.precision(); constructedProjection = constructedProjection.precision(0.707); constructedProjection = constructedProjection.fitExtent([[0, 0], [960, 500]], samplePolygon); @@ -423,7 +418,7 @@ constructedProjection = constructedProjection.fitSize([960, 500], sampleExtended // ---------------------------------------------------------------------- // parallels(...) ------------------------------------------------------ -let parallels: [number, number] = conicConformal.parallels(); +const parallels: [number, number] = conicConformal.parallels(); conicConformal = conicConformal.parallels([20, 20]); // test method inheritance from GeoProjection --------------------------- @@ -434,7 +429,7 @@ conicConformal = conicConformal.fitSize([960, 500], samplePolygon); // inherited // GeoPath Generator // ---------------------------------------------------------------------- -let minimalRenderingContextMockUp: d3Geo.GeoContext = { +const minimalRenderingContextMockUp: d3Geo.GeoContext = { beginPath: () => { return; }, moveTo: (x: number, y: number) => { return; }, lineTo: (x: number, y: number) => { return; }, @@ -460,12 +455,12 @@ geoPathSVG = d3Geo.geoPath(); +const geoPathProjectionMinimal: d3Geo.GeoStreamWrapper = geoPathCanvas.projection(); +const geoPathProjectionUnion: d3Geo.GeoProjection | d3Geo.GeoConicProjection | d3Geo.GeoStreamWrapper = geoPathCanvas.projection(); +const geoPathProjection: d3Geo.GeoProjection = geoPathCanvas.projection(); geoPathSVG = geoPathSVG.projection(conicConformal); -let geoPathConicProjection: d3Geo.GeoConicProjection = geoPathSVG.projection(); +const geoPathConicProjection: d3Geo.GeoConicProjection = geoPathSVG.projection(); // geoPathConicProjection = geoPathSVG.projection(); // fails without casting to GeoConicProjection, or alternatively custom typeguard // geoPathConicProjection = geoPathSVG.projection(); // fails as SampleProperties does not extend minimal interface @@ -474,8 +469,7 @@ let geoPathConicProjection: d3Geo.GeoConicProjection = geoPathSVG.projection(); // pointRadius(...) ------------------------------------------------------ geoPathCanvas = geoPathCanvas.pointRadius(5); -let geoPathCanvasPointRadiusAccessor: ((this: any, d: d3Geo.GeoPermissibleObjects, ...args: any[]) => number) | number = geoPathCanvas.pointRadius(); +const geoPathCanvasPointRadiusAccessor: ((this: any, d: d3Geo.GeoPermissibleObjects, ...args: any[]) => number) | number = geoPathCanvas.pointRadius(); -geoPathSVG = geoPathSVG.pointRadius(function (datum) { - let that: SVGPathElement = this; - let d: d3Geo.ExtendedFeature = datum; +geoPathSVG = geoPathSVG.pointRadius(function(datum) { + const that: SVGPathElement = this; + const d: d3Geo.ExtendedFeature = datum; return datum.properties.name === 'Alabama' ? 10 : 15; }); -let geoPathSVGPointRadiusAccessor: number | ((this: SVGPathElement, d: d3Geo.ExtendedFeature, ...args: any[]) => number) = geoPathSVG.pointRadius(); +const geoPathSVGPointRadiusAccessor: number | ((this: SVGPathElement, d: d3Geo.ExtendedFeature, ...args: any[]) => number) = geoPathSVG.pointRadius(); // let geoPathSVGPointRadiusAccessorWrong1: number | ((this: SVGCircleElement, d: d3Geo.ExtendedFeature, ...args: any[]) => number) // = geoPathSVG.pointRadius(); // fails, mismatch in this context // let geoPathSVGPointRadiusAccessorWrong2: number | ((this: SVGPathElement, d: d3Geo.GeoGeometryObjects, ...args: any[]) => number) = geoPathSVG.pointRadius(); // fails, mismatch in object datum type @@ -521,7 +515,6 @@ geoPathArea = geoPathCanvas.area(sampleExtendedFeatureCollection); // geoPathArea = geoPathSVG.area(sampleExtendedFeatureCollection); // fails, wrong data object type - // bounds(...) ------------------------------------------------------ let geoPathBounds: [[number, number], [number, number]] = geoPathCanvas.bounds(samplePolygon); @@ -550,7 +543,6 @@ geoPathCentroid = geoPathCanvas.centroid(sampleExtendedFeatureCollection); // geoPathCentroid = geoPathSVG.centroid(sampleExtendedFeatureCollection); // fails, wrong data object type - // measure(...) ------------------------------------------------------ let geoPathMeasure: number = geoPathCanvas.measure(samplePolygon); @@ -579,22 +571,19 @@ geoPathCanvas(sampleExtendedFeatureCollection); // Use path string generator for SVGPathElement -let svgPath: Selection, any, any>; +declare const svgPath: Selection, any, any>; svgPath.attr('d', geoPathSVG); -let svgCircleWrong: Selection, any, any>; +declare const svgCircleWrong: Selection, any, any>; // svgCircleWrong.attr('d', geoPathSVG); // fails, mismatch in `this` context -let svgPathWrong: Selection; +declare const svgPathWrong: Selection; // svgPathWrong.attr('d', geoPathSVG); // fails, mismatch in datum type - - - // ---------------------------------------------------------------------- // Context interface // ---------------------------------------------------------------------- -let context: d3Geo.GeoContext = { +const context: d3Geo.GeoContext = { beginPath: () => { return; }, moveTo: (x: number, y: number) => { return; }, lineTo: (x: number, y: number) => { return; }, @@ -608,7 +597,7 @@ let context: d3Geo.GeoContext = { // geoTransform(...) ==================================================== -let transformFunction: { stream: (s: d3Geo.GeoStream) => {} } = d3Geo.geoTransform({}); +const transformFunction: { stream: (s: d3Geo.GeoStream) => {} } = d3Geo.geoTransform({}); interface CustomTranformProto extends d3Geo.GeoTransformPrototype { a: number; @@ -617,14 +606,13 @@ interface CustomTranformProto extends d3Geo.GeoTransformPrototype { let customTransformProto: CustomTranformProto; customTransformProto = { - point: function (x, y) { + point(x, y) { return this.stream.point(x + this.a, -y); }, a: 10 }; -let t: { stream: (s: d3Geo.GeoStream) => (CustomTranformProto & d3Geo.GeoStream) } = d3Geo.geoTransform(customTransformProto); - +const t: { stream: (s: d3Geo.GeoStream) => (CustomTranformProto & d3Geo.GeoStream) } = d3Geo.geoTransform(customTransformProto); // geoIdentity() ======================================================== @@ -675,7 +663,7 @@ reflecting = identityTransform.reflectY(); // ---------------------------------------------------------------------- // Stream interface // ---------------------------------------------------------------------- -let stream: d3Geo.GeoStream; +declare const stream: d3Geo.GeoStream; stream.point(0, 0); stream.point(0, 0, 0); @@ -696,4 +684,3 @@ d3Geo.geoStream(sampleExtendedFeature1, stream); d3Geo.geoStream(sampleExtendedFeature2, stream); d3Geo.geoStream(sampleFeatureCollection, stream); d3Geo.geoStream(sampleExtendedFeatureCollection, stream); - diff --git a/d3-geo/index.d.ts b/types/d3-geo/index.d.ts similarity index 99% rename from d3-geo/index.d.ts rename to types/d3-geo/index.d.ts index dfc58a5f9e..1e9fed9b92 100644 --- a/d3-geo/index.d.ts +++ b/types/d3-geo/index.d.ts @@ -274,7 +274,6 @@ export interface GeoRotation { */ export function geoRotation(angles: [number, number] | [number, number, number]): GeoRotation; - // ---------------------------------------------------------------------- // Spherical Shapes // ---------------------------------------------------------------------- @@ -535,8 +534,6 @@ export interface GeoStream { sphere?(): void; } - - // geoStream(...) ======================================================= /** @@ -575,15 +572,10 @@ export function geoStream(object: GeoGeometryObjects, stream: GeoStream): void; */ export function geoStream(object: ExtendedGeometryCollection, stream: GeoStream): void; - - // ---------------------------------------------------------------------- // Projections // ---------------------------------------------------------------------- - - - /** * Raw projections are point transformation functions that are used to implement custom projections; they typically passed to d3.geoProjection or d3.geoProjectionMutator. * They are exposed here to facilitate the derivation of related projections. @@ -737,7 +729,6 @@ export interface GeoProjection extends GeoStreamWrapper { */ fitExtent(extent: [[number, number], [number, number]], object: ExtendedGeometryCollection): this; - /** * Sets the projection’s scale and translate to fit the specified geographic feature in the center of an extent with the given size and top-left corner of [0, 0]. * Returns the projection. @@ -845,7 +836,6 @@ export interface GeoProjection extends GeoStreamWrapper { * A Conic Projection */ export interface GeoConicProjection extends GeoProjection { - /** * Return the standard parallels for the conic projection in degrees. */ @@ -856,10 +846,8 @@ export interface GeoConicProjection extends GeoProjection { * @param value A two-dimensional array representing the standard parallels in degrees. */ parallels(value: [number, number]): this; - } - // geoPath ============================================================== /** @@ -869,7 +857,6 @@ export interface GeoConicProjection extends GeoProjection { * For reference to the CanvasRenderingContext2D see https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D */ export interface GeoContext { - /** * Adds an arc to the path with center point (x, y) and radius r starting at startAngle and ending at endAngle. * The arc is drawn in clockwise directio by default. @@ -921,7 +908,6 @@ export interface GeoContext { * The second generic corresponds to the type of the DatumObject which will be passed into the geo path generator for rendering. */ export interface GeoPath { - /** * Renders the given object, which may be any GeoJSON feature or geometry object: * @@ -1084,7 +1070,6 @@ export interface GeoPath { * It is passed the object to be rendered, and any additional arguments which have been passed into the call to the render function of the path generator. */ pointRadius(value: (this: This, object: DatumObject, ...args: any[]) => number): this; - } /** @@ -1143,9 +1128,6 @@ export function geoPath(projection?: */ export function geoPath(projection?: GeoProjection | GeoStreamWrapper | null, context?: GeoContext | null): GeoPath; - - - // geoProjection ========================================================== /** @@ -1366,7 +1348,6 @@ export function geoTransform(methods: T): { str * Geo Identity Transform */ export interface GeoIdentityTranform extends GeoStreamWrapper { - /** * Returns the current viewport clip extent which defaults to null. */ @@ -1431,7 +1412,6 @@ export interface GeoIdentityTranform extends GeoStreamWrapper { */ fitExtent(extent: [[number, number], [number, number]], object: ExtendedGeometryCollection): this; - /** * Sets the projection’s scale and translate to fit the specified geographic feature in the center of an extent with the given size and top-left corner of [0, 0]. * Returns the projection. diff --git a/d3-geo/tsconfig.json b/types/d3-geo/tsconfig.json similarity index 100% rename from d3-geo/tsconfig.json rename to types/d3-geo/tsconfig.json diff --git a/d3-geo/tslint.json b/types/d3-geo/tslint.json similarity index 100% rename from d3-geo/tslint.json rename to types/d3-geo/tslint.json diff --git a/d3-hexbin/d3-hexbin-tests.ts b/types/d3-hexbin/d3-hexbin-tests.ts similarity index 100% rename from d3-hexbin/d3-hexbin-tests.ts rename to types/d3-hexbin/d3-hexbin-tests.ts diff --git a/d3-hexbin/index.d.ts b/types/d3-hexbin/index.d.ts similarity index 100% rename from d3-hexbin/index.d.ts rename to types/d3-hexbin/index.d.ts diff --git a/d3-hexbin/tsconfig.json b/types/d3-hexbin/tsconfig.json similarity index 100% rename from d3-hexbin/tsconfig.json rename to types/d3-hexbin/tsconfig.json diff --git a/d3-hierarchy/d3-hierarchy-tests.ts b/types/d3-hierarchy/d3-hierarchy-tests.ts similarity index 100% rename from d3-hierarchy/d3-hierarchy-tests.ts rename to types/d3-hierarchy/d3-hierarchy-tests.ts diff --git a/d3-hierarchy/index.d.ts b/types/d3-hierarchy/index.d.ts similarity index 100% rename from d3-hierarchy/index.d.ts rename to types/d3-hierarchy/index.d.ts diff --git a/d3-hierarchy/tsconfig.json b/types/d3-hierarchy/tsconfig.json similarity index 100% rename from d3-hierarchy/tsconfig.json rename to types/d3-hierarchy/tsconfig.json diff --git a/d3-hsv/d3-hsv-tests.ts b/types/d3-hsv/d3-hsv-tests.ts similarity index 100% rename from d3-hsv/d3-hsv-tests.ts rename to types/d3-hsv/d3-hsv-tests.ts diff --git a/d3-hsv/index.d.ts b/types/d3-hsv/index.d.ts similarity index 100% rename from d3-hsv/index.d.ts rename to types/d3-hsv/index.d.ts diff --git a/d3-hsv/tsconfig.json b/types/d3-hsv/tsconfig.json similarity index 100% rename from d3-hsv/tsconfig.json rename to types/d3-hsv/tsconfig.json diff --git a/d3-interpolate/d3-interpolate-tests.ts b/types/d3-interpolate/d3-interpolate-tests.ts similarity index 100% rename from d3-interpolate/d3-interpolate-tests.ts rename to types/d3-interpolate/d3-interpolate-tests.ts diff --git a/d3-interpolate/index.d.ts b/types/d3-interpolate/index.d.ts similarity index 100% rename from d3-interpolate/index.d.ts rename to types/d3-interpolate/index.d.ts diff --git a/d3-interpolate/tsconfig.json b/types/d3-interpolate/tsconfig.json similarity index 100% rename from d3-interpolate/tsconfig.json rename to types/d3-interpolate/tsconfig.json diff --git a/d3-path/d3-path-tests.ts b/types/d3-path/d3-path-tests.ts similarity index 100% rename from d3-path/d3-path-tests.ts rename to types/d3-path/d3-path-tests.ts diff --git a/d3-path/index.d.ts b/types/d3-path/index.d.ts similarity index 100% rename from d3-path/index.d.ts rename to types/d3-path/index.d.ts diff --git a/d3-path/tsconfig.json b/types/d3-path/tsconfig.json similarity index 100% rename from d3-path/tsconfig.json rename to types/d3-path/tsconfig.json diff --git a/d3-polygon/d3-polygon-tests.ts b/types/d3-polygon/d3-polygon-tests.ts similarity index 100% rename from d3-polygon/d3-polygon-tests.ts rename to types/d3-polygon/d3-polygon-tests.ts diff --git a/d3-polygon/index.d.ts b/types/d3-polygon/index.d.ts similarity index 100% rename from d3-polygon/index.d.ts rename to types/d3-polygon/index.d.ts diff --git a/d3-polygon/tsconfig.json b/types/d3-polygon/tsconfig.json similarity index 100% rename from d3-polygon/tsconfig.json rename to types/d3-polygon/tsconfig.json diff --git a/d3-quadtree/d3-quadtree-tests.ts b/types/d3-quadtree/d3-quadtree-tests.ts similarity index 100% rename from d3-quadtree/d3-quadtree-tests.ts rename to types/d3-quadtree/d3-quadtree-tests.ts diff --git a/d3-quadtree/index.d.ts b/types/d3-quadtree/index.d.ts similarity index 100% rename from d3-quadtree/index.d.ts rename to types/d3-quadtree/index.d.ts diff --git a/d3-quadtree/tsconfig.json b/types/d3-quadtree/tsconfig.json similarity index 100% rename from d3-quadtree/tsconfig.json rename to types/d3-quadtree/tsconfig.json diff --git a/d3-queue/d3-queue-tests.ts b/types/d3-queue/d3-queue-tests.ts similarity index 100% rename from d3-queue/d3-queue-tests.ts rename to types/d3-queue/d3-queue-tests.ts diff --git a/d3-queue/index.d.ts b/types/d3-queue/index.d.ts similarity index 100% rename from d3-queue/index.d.ts rename to types/d3-queue/index.d.ts diff --git a/d3-queue/tsconfig.json b/types/d3-queue/tsconfig.json similarity index 100% rename from d3-queue/tsconfig.json rename to types/d3-queue/tsconfig.json diff --git a/d3-random/d3-random-tests.ts b/types/d3-random/d3-random-tests.ts similarity index 100% rename from d3-random/d3-random-tests.ts rename to types/d3-random/d3-random-tests.ts diff --git a/d3-random/index.d.ts b/types/d3-random/index.d.ts similarity index 100% rename from d3-random/index.d.ts rename to types/d3-random/index.d.ts diff --git a/d3-random/tsconfig.json b/types/d3-random/tsconfig.json similarity index 100% rename from d3-random/tsconfig.json rename to types/d3-random/tsconfig.json diff --git a/d3-request/d3-request-tests.ts b/types/d3-request/d3-request-tests.ts similarity index 100% rename from d3-request/d3-request-tests.ts rename to types/d3-request/d3-request-tests.ts diff --git a/d3-request/index.d.ts b/types/d3-request/index.d.ts similarity index 100% rename from d3-request/index.d.ts rename to types/d3-request/index.d.ts diff --git a/d3-request/tsconfig.json b/types/d3-request/tsconfig.json similarity index 100% rename from d3-request/tsconfig.json rename to types/d3-request/tsconfig.json diff --git a/d3-scale-chromatic/d3-scale-chromatic-tests.ts b/types/d3-scale-chromatic/d3-scale-chromatic-tests.ts similarity index 100% rename from d3-scale-chromatic/d3-scale-chromatic-tests.ts rename to types/d3-scale-chromatic/d3-scale-chromatic-tests.ts diff --git a/d3-scale-chromatic/index.d.ts b/types/d3-scale-chromatic/index.d.ts similarity index 100% rename from d3-scale-chromatic/index.d.ts rename to types/d3-scale-chromatic/index.d.ts diff --git a/d3-scale-chromatic/tsconfig.json b/types/d3-scale-chromatic/tsconfig.json similarity index 100% rename from d3-scale-chromatic/tsconfig.json rename to types/d3-scale-chromatic/tsconfig.json diff --git a/d3-scale/d3-scale-tests.ts b/types/d3-scale/d3-scale-tests.ts similarity index 100% rename from d3-scale/d3-scale-tests.ts rename to types/d3-scale/d3-scale-tests.ts diff --git a/d3-scale/index.d.ts b/types/d3-scale/index.d.ts similarity index 100% rename from d3-scale/index.d.ts rename to types/d3-scale/index.d.ts diff --git a/d3-scale/tsconfig.json b/types/d3-scale/tsconfig.json similarity index 100% rename from d3-scale/tsconfig.json rename to types/d3-scale/tsconfig.json diff --git a/d3-scale/tslint.json b/types/d3-scale/tslint.json similarity index 100% rename from d3-scale/tslint.json rename to types/d3-scale/tslint.json diff --git a/d3-selection-multi/d3-selection-multi-tests.ts b/types/d3-selection-multi/d3-selection-multi-tests.ts similarity index 100% rename from d3-selection-multi/d3-selection-multi-tests.ts rename to types/d3-selection-multi/d3-selection-multi-tests.ts diff --git a/d3-selection-multi/index.d.ts b/types/d3-selection-multi/index.d.ts similarity index 96% rename from d3-selection-multi/index.d.ts rename to types/d3-selection-multi/index.d.ts index 30268ad3aa..da3c64e5e3 100644 --- a/d3-selection-multi/index.d.ts +++ b/types/d3-selection-multi/index.d.ts @@ -8,7 +8,6 @@ import {Selection, BaseType, ArrayLike, ValueFn} from 'd3-selection'; import {Transition} from 'd3-transition'; - /** * An object mapping attribute (or style or property) names to value accessors * @@ -29,7 +28,7 @@ declare module 'd3-selection' { * The third generic "PElement" refers to the type of the parent element(s) in the D3 selection. * The fourth generic "PDatum" refers to the type of the datum of the parent element(s). */ - export interface Selection { + interface Selection { /** * Set multiple attributes on the given selection. Attribute values may be constant or derived from each node and its bound data. * @@ -85,7 +84,7 @@ declare module 'd3-transition' { * The third generic "PElement" refers to the type of the parent element(s) in the D3 selection in the Transition. * The fourth generic "PDatum" refers to the type of the datum of the parent element(s) in the Transition. */ - export interface Transition { + interface Transition { /** * Set multiple attribute values. The transition will animate from the present value to the new value. Attribute values may be constant or derived from each node and its bound data. * diff --git a/d3-selection-multi/tsconfig.json b/types/d3-selection-multi/tsconfig.json similarity index 100% rename from d3-selection-multi/tsconfig.json rename to types/d3-selection-multi/tsconfig.json diff --git a/d3-selection-multi/tslint.json b/types/d3-selection-multi/tslint.json similarity index 100% rename from d3-selection-multi/tslint.json rename to types/d3-selection-multi/tslint.json diff --git a/d3-selection/d3-selection-tests.ts b/types/d3-selection/d3-selection-tests.ts similarity index 100% rename from d3-selection/d3-selection-tests.ts rename to types/d3-selection/d3-selection-tests.ts diff --git a/d3-selection/index.d.ts b/types/d3-selection/index.d.ts similarity index 100% rename from d3-selection/index.d.ts rename to types/d3-selection/index.d.ts diff --git a/d3-selection/tsconfig.json b/types/d3-selection/tsconfig.json similarity index 100% rename from d3-selection/tsconfig.json rename to types/d3-selection/tsconfig.json diff --git a/d3-selection/tslint.json b/types/d3-selection/tslint.json similarity index 100% rename from d3-selection/tslint.json rename to types/d3-selection/tslint.json diff --git a/d3-shape/d3-shape-tests.ts b/types/d3-shape/d3-shape-tests.ts similarity index 99% rename from d3-shape/d3-shape-tests.ts rename to types/d3-shape/d3-shape-tests.ts index 204f1e7eb1..3ac854df2b 100644 --- a/d3-shape/d3-shape-tests.ts +++ b/types/d3-shape/d3-shape-tests.ts @@ -147,7 +147,6 @@ svgArc = svgArc.padRadius(null); accessorArcDatumNumberOrNull = svgArc.padRadius(); - // use Arc(...) generator ============================================================ // centroid(...) --------------------------------------------------------------------- @@ -160,7 +159,6 @@ const centroid: [number, number] = svgArc.centroid(arcDatum); // use with canvas canvasArc(arcDefaultDatum); - // use with svg const pArc: Selection = select('.arc-paths'); // mock @@ -171,7 +169,6 @@ pArc.attr('d', svgArc); // wrongArc1.attr('d', svgArc); // fails, incompatible this contexts // wrongArc2.attr('d', svgArc); // fails, incompatible datum types - // pathStringMaybe = svgArc(arcDatum); // fails, wrong this type for invocation // Use with custom object @@ -230,12 +227,10 @@ interface PieDatum { name: string; } - let accessorPieDatumNumber: (this: any, data: PieDatum[], ...args: any[]) => number; // PieArcDatum interface ============================================================= - const pieArcObject: d3Shape.PieArcDatum = { data: { val: 10, @@ -280,7 +275,6 @@ pie = pie.value((d, i, data) => { pieValueAccessor = pie.value(); - // sort(...) --------------------------------------------------------------------------- let pieSorter: ((a: PieDatum, b: PieDatum) => number) | null; @@ -332,7 +326,6 @@ defaultPie = defaultPie.padAngle(0.03); pie = pie.padAngle(d => { console.log(d.length > 0 ? d[0].val : 'no data'); // data type is Array return 0.03; - }); accessorPieDatumNumber = pie.padAngle(); @@ -351,7 +344,6 @@ let pieChart: Array>; pieChart = pie(pieData); - // ----------------------------------------------------------------------------------- // Test Line Generators // ----------------------------------------------------------------------------------- @@ -519,7 +511,6 @@ const radialLineData: RadialLineDatum[] = [ const radialLinePathStringMaybe: string | null = radialLine(radialLineData); - // ----------------------------------------------------------------------------------- // Test Area Generators // ----------------------------------------------------------------------------------- @@ -808,7 +799,6 @@ areaRadialLineGenerator = radialArea.lineInnerRadius(); areaRadialLineGenerator = radialArea.lineEndAngle(); areaRadialLineGenerator = radialArea.lineOuterRadius(); - // ----------------------------------------------------------------------------------- // Test Curve Factories // ----------------------------------------------------------------------------------- @@ -1002,7 +992,6 @@ pSymbol.attr('d', svgSymbol); // wrongSymbol1.attr('d', svgSymbol); // fails, incompatible this contexts // wrongSymbol2.attr('d', svgSymbol); // fails, incompatible datum types - // pathStringMaybe = svgSymbol(symbolDatum); // fails, wrong this type for invocation // Use with custom object @@ -1056,7 +1045,6 @@ const sym = new Symbolizer(100, 'square'); pathStringMaybe = sym.getPathString(); pathStringMaybe = sym.getPathString({ size: 10, type: 'circle' }); - // Test pre-fab symbols =============================================================== const symbolArray: d3Shape.SymbolType[] = d3Shape.symbols; @@ -1099,7 +1087,6 @@ const stackData: StackDatum[] = [ { values: { bananas: 12, apples: 10, oranges: 50 } } ]; - // Create stack generator ========================================================== let defaultStack: d3Shape.Stack; @@ -1110,7 +1097,6 @@ let overlyComplicatedStack: d3Shape.Stack; overlyComplicatedStack = d3Shape.stack(); - // Configure stack generator ======================================================= // keys(...) ---------------------------------------------------------------------- @@ -1181,8 +1167,6 @@ num = seriesPoint[0]; num = seriesPoint[1]; seriesDatum = seriesPoint.data; - - // Test stack orders =============================================================== let order: number[]; diff --git a/d3-shape/index.d.ts b/types/d3-shape/index.d.ts similarity index 99% rename from d3-shape/index.d.ts rename to types/d3-shape/index.d.ts index 367a9dee2b..e1d80b6786 100644 --- a/d3-shape/index.d.ts +++ b/types/d3-shape/index.d.ts @@ -790,7 +790,6 @@ export function line(): Line<[number, number]>; */ export function line(): Line; - /** * The radial line generator produces a spline or polyline, as in a line chart. * @@ -1285,7 +1284,6 @@ export function area(): Area; * The generic refers to the data type of an element in the input array passed into the area generator. */ export interface RadialArea { - /** * Generates a radial area for the given array of data. * @@ -1670,7 +1668,7 @@ export interface CurveFactory { * The first and last points are triplicated such that the spline starts at the first point and ends at the last point, * and is tangent to the line between the first and second points, and to the line between the penultimate and last points. */ -export var curveBasis: CurveFactory; +export const curveBasis: CurveFactory; /** * A curve factory for closed cubic basis spline generators. @@ -1678,7 +1676,7 @@ export var curveBasis: CurveFactory; * The curve generators produce a closed cubic basis spline using the specified control points. * When a line segment ends, the first three control points are repeated, producing a closed loop with C2 continuity. */ -export var curveBasisClosed: CurveFactory; +export const curveBasisClosed: CurveFactory; /** * A curve factory for open cubic basis spline generators. @@ -1686,7 +1684,7 @@ export var curveBasisClosed: CurveFactory; * The curve generators produce a cubic basis spline using the specified control points. * Unlike basis, the first and last points are not repeated, and thus the curve typically does not intersect these points. */ -export var curveBasisOpen: CurveFactory; +export const curveBasisOpen: CurveFactory; /** * A curve factory for straightened cubic basis spline generators. @@ -1719,8 +1717,7 @@ export interface CurveBundleFactory extends CurveFactoryLineOnly { * * This curve does not implement curve.areaStart and curve.areaEnd; it is intended to work with d3.line, not d3.area. */ -export var curveBundle: CurveBundleFactory; - +export const curveBundle: CurveBundleFactory; /** * A curve factory for cubic cardinal spline generators. @@ -1741,7 +1738,7 @@ export interface CurveCardinalFactory extends CurveFactory { * The curve generators produce a cubic cardinal spline using the specified control points, with one-sided differences used for the first and last piece. * The default tension is 0. */ -export var curveCardinal: CurveCardinalFactory; +export const curveCardinal: CurveCardinalFactory; /** * A curve factory for closed cubic cardinal spline generators. @@ -1750,7 +1747,7 @@ export var curveCardinal: CurveCardinalFactory; * When a line segment ends, the first three control points are repeated, producing a closed loop. * The default tension is 0. */ -export var curveCardinalClosed: CurveCardinalFactory; +export const curveCardinalClosed: CurveCardinalFactory; /** * A curve factory for open cubic cardinal spline generators. @@ -1760,7 +1757,7 @@ export var curveCardinalClosed: CurveCardinalFactory; * and thus the curve starts at the second point and ends at the penultimate point. * The default tension is 0. */ -export var curveCardinalOpen: CurveCardinalFactory; +export const curveCardinalOpen: CurveCardinalFactory; /** * A curve factory for cubic Catmull–Rom spline generators. @@ -1784,7 +1781,7 @@ export interface CurveCatmullRomFactory extends CurveFactory { * which defaults to 0.5, as proposed by Yuksel et al. in On the Parameterization of Catmull–Rom Curves, * with one-sided differences used for the first and last piece. */ -export var curveCatmullRom: CurveCatmullRomFactory; +export const curveCatmullRom: CurveCatmullRomFactory; /** * A curve factory for cubic Catmull–Rom spline generators. @@ -1793,7 +1790,7 @@ export var curveCatmullRom: CurveCatmullRomFactory; * which defaults to 0.5, as proposed by Yuksel et al. When a line segment ends, * the first three control points are repeated, producing a closed loop. */ -export var curveCatmullRomClosed: CurveCatmullRomFactory; +export const curveCatmullRomClosed: CurveCatmullRomFactory; /** * A curve factory for cubic Catmull–Rom spline generators. @@ -1802,22 +1799,21 @@ export var curveCatmullRomClosed: CurveCatmullRomFactory; * which defaults to 0.5, as proposed by Yuksel et al. Unlike curveCatmullRom, one-sided differences are not used for the first and last piece, * and thus the curve starts at the second point and ends at the penultimate point. */ -export var curveCatmullRomOpen: CurveCatmullRomFactory; - +export const curveCatmullRomOpen: CurveCatmullRomFactory; /** * A curve factory for polyline generators. * * The curve generators produce a polyline through the specified points. */ -export var curveLinear: CurveFactory; +export const curveLinear: CurveFactory; /** * A curve factory for closed polyline generators. * * The curve generators produce a closed polyline through the specified points by repeating the first point when the line segment ends. */ -export var curveLinearClosed: CurveFactory; +export const curveLinearClosed: CurveFactory; /** * A curve factory for cubic spline generators preserving monotonicity in y. @@ -1826,7 +1822,7 @@ export var curveLinearClosed: CurveFactory; * “a smooth curve with continuous first-order derivatives that passes through any given set of data points without spurious oscillations. * Local extrema can occur only at grid points where they are given by the data, but not in between two adjacent grid points.” */ -export var curveMonotoneX: CurveFactory; +export const curveMonotoneX: CurveFactory; /** * A curve factory for cubic spline generators preserving monotonicity in x. @@ -1835,14 +1831,14 @@ export var curveMonotoneX: CurveFactory; * “a smooth curve with continuous first-order derivatives that passes through any given set of data points without spurious oscillations. * Local extrema can occur only at grid points where they are given by the data, but not in between two adjacent grid points.” */ -export var curveMonotoneY: CurveFactory; +export const curveMonotoneY: CurveFactory; /** * A curve factory for natural cubic spline generators. * * The curve generators produce a natural cubic spline with the second derivative of the spline set to zero at the endpoints. */ -export var curveNatural: CurveFactory; +export const curveNatural: CurveFactory; /** * A curve factory for step function (midpoint) generators. @@ -1850,7 +1846,7 @@ export var curveNatural: CurveFactory; * The curve generators produce a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. * The y-value changes at the midpoint of each pair of adjacent x-values. */ -export var curveStep: CurveFactory; +export const curveStep: CurveFactory; /** * A curve factory for step function (after) generators. @@ -1858,7 +1854,7 @@ export var curveStep: CurveFactory; * The curve generators produce a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. * The y-value changes after the x-value. */ -export var curveStepAfter: CurveFactory; +export const curveStepAfter: CurveFactory; /** * A curve factory for step function (before) generators. @@ -1866,8 +1862,7 @@ export var curveStepAfter: CurveFactory; * The curve generators produce a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. * The y-value changes before the x-value. */ -export var curveStepBefore: CurveFactory; - +export const curveStepBefore: CurveFactory; // ----------------------------------------------------------------------------------- // SYMBOLS @@ -1990,7 +1985,6 @@ export interface Symbol { * @param context null, to remove rendering context. */ context(context: null): this; - } /** @@ -2017,43 +2011,42 @@ export function symbol(): Symbol; * An array containing the set of all built-in symbol types: circle, cross, diamond, square, star, triangle, and wye. * Useful for constructing the range of an ordinal scale should you wish to use a shape encoding for categorical data. */ -export var symbols: SymbolType[]; +export const symbols: SymbolType[]; /** * The circle symbol type. */ -export var symbolCircle: SymbolType; +export const symbolCircle: SymbolType; /** * The Greek cross symbol type, with arms of equal length. */ -export var symbolCross: SymbolType; +export const symbolCross: SymbolType; /** * The rhombus symbol type. */ -export var symbolDiamond: SymbolType; +export const symbolDiamond: SymbolType; /** * The square symbol type. */ -export var symbolSquare: SymbolType; +export const symbolSquare: SymbolType; /** * The pentagonal star (pentagram) symbol type. */ -export var symbolStar: SymbolType; +export const symbolStar: SymbolType; /** * he up-pointing triangle symbol type. */ -export var symbolTriangle: SymbolType; +export const symbolTriangle: SymbolType; /** * The Y-shape symbol type. */ -export var symbolWye: SymbolType; - +export const symbolWye: SymbolType; // ----------------------------------------------------------------------------------- // STACKS @@ -2221,7 +2214,6 @@ export interface Stack { * The offset function is then responsible for updating the lower and upper values in the series array to layout the stack. */ offset(offset: (series: Series, order: number[]) => void): this; - } /** diff --git a/d3-shape/tsconfig.json b/types/d3-shape/tsconfig.json similarity index 100% rename from d3-shape/tsconfig.json rename to types/d3-shape/tsconfig.json diff --git a/d3-shape/tslint.json b/types/d3-shape/tslint.json similarity index 100% rename from d3-shape/tslint.json rename to types/d3-shape/tslint.json diff --git a/d3-time-format/d3-time-format-tests.ts b/types/d3-time-format/d3-time-format-tests.ts similarity index 100% rename from d3-time-format/d3-time-format-tests.ts rename to types/d3-time-format/d3-time-format-tests.ts diff --git a/d3-time-format/index.d.ts b/types/d3-time-format/index.d.ts similarity index 100% rename from d3-time-format/index.d.ts rename to types/d3-time-format/index.d.ts diff --git a/d3-time-format/tsconfig.json b/types/d3-time-format/tsconfig.json similarity index 100% rename from d3-time-format/tsconfig.json rename to types/d3-time-format/tsconfig.json diff --git a/d3-time/d3-time-tests.ts b/types/d3-time/d3-time-tests.ts similarity index 100% rename from d3-time/d3-time-tests.ts rename to types/d3-time/d3-time-tests.ts diff --git a/d3-time/index.d.ts b/types/d3-time/index.d.ts similarity index 100% rename from d3-time/index.d.ts rename to types/d3-time/index.d.ts diff --git a/d3-time/tsconfig.json b/types/d3-time/tsconfig.json similarity index 100% rename from d3-time/tsconfig.json rename to types/d3-time/tsconfig.json diff --git a/d3-timer/d3-timer-tests.ts b/types/d3-timer/d3-timer-tests.ts similarity index 100% rename from d3-timer/d3-timer-tests.ts rename to types/d3-timer/d3-timer-tests.ts diff --git a/d3-timer/index.d.ts b/types/d3-timer/index.d.ts similarity index 100% rename from d3-timer/index.d.ts rename to types/d3-timer/index.d.ts diff --git a/d3-timer/tsconfig.json b/types/d3-timer/tsconfig.json similarity index 100% rename from d3-timer/tsconfig.json rename to types/d3-timer/tsconfig.json diff --git a/d3-tip/d3-tip-tests.ts b/types/d3-tip/d3-tip-tests.ts similarity index 100% rename from d3-tip/d3-tip-tests.ts rename to types/d3-tip/d3-tip-tests.ts diff --git a/d3-tip/index.d.ts b/types/d3-tip/index.d.ts similarity index 100% rename from d3-tip/index.d.ts rename to types/d3-tip/index.d.ts diff --git a/d3-tip/tsconfig.json b/types/d3-tip/tsconfig.json similarity index 100% rename from d3-tip/tsconfig.json rename to types/d3-tip/tsconfig.json diff --git a/d3-transition/d3-transition-tests.ts b/types/d3-transition/d3-transition-tests.ts similarity index 99% rename from d3-transition/d3-transition-tests.ts rename to types/d3-transition/d3-transition-tests.ts index c2917aaf94..ba0ae99750 100644 --- a/d3-transition/d3-transition-tests.ts +++ b/types/d3-transition/d3-transition-tests.ts @@ -122,7 +122,6 @@ const enterCircles = circles .style('stroke', d => d.color) .style('fill', d => d.color); - const exitCircles = circles.exit(); // Note: need to re-type datum type, as the exit selection elements have the 'old data' // -------------------------------------------------------------------------- @@ -166,7 +165,6 @@ const duration: number = enterTransition.duration(); enterTransition = enterTransition.delay(500); // settable and chainable const delay: number = enterTransition.delay(); - // ease() --------------------------------------------------------------- let easingFn: (normalizedTime: number) => number; @@ -207,8 +205,6 @@ firstDivTransition = bodyTransition.select(function(d, i, g) { return this.querySelector('div')!; // 'this' type is HTMLElement, return type is HTMLDivElement }); - - // selectAll() --------------------------------------------------------------- // assume paragraphs were previously selected and their data were set to ParagraphDatum type @@ -323,7 +319,6 @@ select('body') .transition().duration(100) .text(d => d.test); // selection datum type - // test, when it is not certain, whether an element of the type to be selected exists let maybeG1: d3Transition.Transition; @@ -343,7 +338,6 @@ maybeG1 = selectAll('svg') } else { return null; } - }); // Tweening Function Use ===================================================== @@ -366,7 +360,6 @@ exitTransition = exitTransition.styleTween('fill', function(d, i, group) { let tweenFnAccessor: undefined | ((this: SVGCircleElement, datum?: CircleDatum, i?: number, group?: SVGCircleElement[] | ArrayLike) => ((t: number) => void)); - // chainable updateTransition = updateTransition.tween('fillColor', null); // remove named tween @@ -407,7 +400,6 @@ exitTransition.remove(); let listener: undefined | ((this: SVGCircleElement, datum: CircleDatum, index: number, group: SVGCircleElement[] | ArrayLike) => void); - enterTransition = enterTransition.on('end', function(d, i, g) { const that: SVGCircleElement = this; // const that2: HTMLElement = this; // fails, type mismatch @@ -433,7 +425,6 @@ enterTransition = enterTransition.on('end', null); // check chaining return type // Test Control Flow // -------------------------------------------------------------------------- - // each() ------------------------------------------------------------------------------- // each(valueFn: (this: GElement, datum?: Datum, index?: number, group?: Array | ArrayLike) => void): Transition; @@ -524,7 +515,3 @@ updateTransitionActive = d3Transition.active { + interface Selection { /** * Interrupts the active transition of the specified name on the selected elements, and cancels any pending transitions with the specified name, if any. * If a name is not specified, null is used. @@ -88,7 +88,6 @@ export function interrupt(node: BaseType, name?: string): void; * The fourth generic "PDatum" refers to the type of the datum of the parent element(s) in the Transition. */ export interface Transition { - // Sub-selection ------------------------- /** diff --git a/d3-transition/tsconfig.json b/types/d3-transition/tsconfig.json similarity index 100% rename from d3-transition/tsconfig.json rename to types/d3-transition/tsconfig.json diff --git a/d3-transition/tslint.json b/types/d3-transition/tslint.json similarity index 100% rename from d3-transition/tslint.json rename to types/d3-transition/tslint.json diff --git a/d3-voronoi/d3-voronoi-tests.ts b/types/d3-voronoi/d3-voronoi-tests.ts similarity index 100% rename from d3-voronoi/d3-voronoi-tests.ts rename to types/d3-voronoi/d3-voronoi-tests.ts diff --git a/d3-voronoi/index.d.ts b/types/d3-voronoi/index.d.ts similarity index 100% rename from d3-voronoi/index.d.ts rename to types/d3-voronoi/index.d.ts diff --git a/d3-voronoi/tsconfig.json b/types/d3-voronoi/tsconfig.json similarity index 100% rename from d3-voronoi/tsconfig.json rename to types/d3-voronoi/tsconfig.json diff --git a/d3-zoom/d3-zoom-tests.ts b/types/d3-zoom/d3-zoom-tests.ts similarity index 99% rename from d3-zoom/d3-zoom-tests.ts rename to types/d3-zoom/d3-zoom-tests.ts index f4a1c0944e..b583bfc8b6 100644 --- a/d3-zoom/d3-zoom-tests.ts +++ b/types/d3-zoom/d3-zoom-tests.ts @@ -52,7 +52,6 @@ function drawPointOnCanvas(radius: number) { }; } - // SVG Prep ------------------------------------------------------------------- interface SVGDatum { @@ -66,7 +65,6 @@ const svg = select('svg') .attr('width', d => d.width) .attr('height', d => d.height); - const g = svg.append('g'); g.selectAll() @@ -85,7 +83,6 @@ interface GroupDatum { toK: number; } - // -------------------------------------------------------------------------- // Test Define ZoomBehaviour // -------------------------------------------------------------------------- @@ -93,7 +90,6 @@ interface GroupDatum { // Canvas Example ----------------------------------------------------------- function zoomedCanvas(this: HTMLCanvasElement, d: CanvasDatum) { - // Cast d3 event to D3ZoomEvent to be used in zoom event handler const e = > event; if (context) { @@ -115,7 +111,6 @@ canvasZoom = d3Zoom.zoom() // SVG Example -------------------------------------------------------------- function zoomedSVGOverlay(this: SVGRectElement) { - // Cast d3 event to D3ZoomEvent to be used in zoom event handler const e = > event; @@ -126,7 +121,6 @@ let svgZoom: d3Zoom.ZoomBehavior; svgZoom = d3Zoom.zoom(); - // filter() ---------------------------------------------------------------- // chainable @@ -141,7 +135,6 @@ svgZoom = svgZoom.filter(function(d, i, group) { let filterFn: (this: SVGRectElement, d: SVGDatum, index: number, group: SVGRectElement[]) => boolean; filterFn = svgZoom.filter(); - // extent() --------------------------------------------------------------- let extentAccessor: (this: SVGRectElement, d: SVGDatum, index: number, group: SVGRectElement[]) => [[number, number], [number, number]]; @@ -172,7 +165,6 @@ svgZoom = svgZoom.translateExtent([[-500, -500], [500, 500]]); let translateExtent: [[number, number], [number, number]]; translateExtent = svgZoom.translateExtent(); - // duration() -------------------------------------------------------------- // chainable @@ -187,7 +179,6 @@ svgZoom = svgZoom.interpolate(interpolateZoom); svgZoom = svgZoom.interpolate(interpolate); svgZoom = svgZoom.interpolate(interpolateArray); - // getter let basicInterpolatorFactory: (a: ZoomView, b: ZoomView) => ((t: number) => ZoomView); @@ -220,7 +211,6 @@ if (zoomHandler) { // Test Attach ZoomBehaviour // -------------------------------------------------------------------------- - // Canvas Example ----------------------------------------------------------- // attach the zoom behavior to the canvas element diff --git a/d3-zoom/index.d.ts b/types/d3-zoom/index.d.ts similarity index 99% rename from d3-zoom/index.d.ts rename to types/d3-zoom/index.d.ts index 87a55e9b2a..904f7b8e62 100644 --- a/d3-zoom/index.d.ts +++ b/types/d3-zoom/index.d.ts @@ -8,7 +8,6 @@ import { ArrayLike, Selection, TransitionLike, ValueFn } from 'd3-selection'; import { ZoomView, ZoomInterpolator } from 'd3-interpolate'; - // -------------------------------------------------------------------------- // Shared Type Definitions and Interfaces // -------------------------------------------------------------------------- diff --git a/d3-zoom/tsconfig.json b/types/d3-zoom/tsconfig.json similarity index 100% rename from d3-zoom/tsconfig.json rename to types/d3-zoom/tsconfig.json diff --git a/d3-zoom/tslint.json b/types/d3-zoom/tslint.json similarity index 100% rename from d3-zoom/tslint.json rename to types/d3-zoom/tslint.json diff --git a/d3.cloud.layout/d3.cloud.layout-tests.ts b/types/d3.cloud.layout/d3.cloud.layout-tests.ts similarity index 100% rename from d3.cloud.layout/d3.cloud.layout-tests.ts rename to types/d3.cloud.layout/d3.cloud.layout-tests.ts diff --git a/d3.cloud.layout/index.d.ts b/types/d3.cloud.layout/index.d.ts similarity index 100% rename from d3.cloud.layout/index.d.ts rename to types/d3.cloud.layout/index.d.ts diff --git a/d3.cloud.layout/tsconfig.json b/types/d3.cloud.layout/tsconfig.json similarity index 100% rename from d3.cloud.layout/tsconfig.json rename to types/d3.cloud.layout/tsconfig.json diff --git a/d3.slider/d3.slider-tests.ts b/types/d3.slider/d3.slider-tests.ts similarity index 100% rename from d3.slider/d3.slider-tests.ts rename to types/d3.slider/d3.slider-tests.ts diff --git a/d3.slider/index.d.ts b/types/d3.slider/index.d.ts similarity index 100% rename from d3.slider/index.d.ts rename to types/d3.slider/index.d.ts diff --git a/d3.slider/tsconfig.json b/types/d3.slider/tsconfig.json similarity index 100% rename from d3.slider/tsconfig.json rename to types/d3.slider/tsconfig.json diff --git a/d3/d3-tests.ts b/types/d3/d3-tests.ts similarity index 99% rename from d3/d3-tests.ts rename to types/d3/d3-tests.ts index ca4932d27c..1efb46be8e 100644 --- a/d3/d3-tests.ts +++ b/types/d3/d3-tests.ts @@ -1,6 +1,5 @@ import * as d3 from 'd3'; - // TODO: complete tests. Note the tests here should be limited to // testing existence of re-exported members of the // constituent modules comprising the D3 version 4 standard bundle @@ -8,5 +7,3 @@ import * as d3 from 'd3'; // Ability to access d3-select related properties const d: d3.Selection = d3.selection(); - - diff --git a/d3/index.d.ts b/types/d3/index.d.ts similarity index 100% rename from d3/index.d.ts rename to types/d3/index.d.ts diff --git a/d3/tsconfig.json b/types/d3/tsconfig.json similarity index 100% rename from d3/tsconfig.json rename to types/d3/tsconfig.json diff --git a/d3/tslint.json b/types/d3/tslint.json similarity index 100% rename from d3/tslint.json rename to types/d3/tslint.json diff --git a/d3/v3/d3-tests.ts b/types/d3/v3/d3-tests.ts similarity index 100% rename from d3/v3/d3-tests.ts rename to types/d3/v3/d3-tests.ts diff --git a/d3/v3/index.d.ts b/types/d3/v3/index.d.ts similarity index 100% rename from d3/v3/index.d.ts rename to types/d3/v3/index.d.ts diff --git a/d3/v3/tsconfig.json b/types/d3/v3/tsconfig.json similarity index 100% rename from d3/v3/tsconfig.json rename to types/d3/v3/tsconfig.json diff --git a/d3kit/d3kit-tests.ts b/types/d3kit/d3kit-tests.ts similarity index 100% rename from d3kit/d3kit-tests.ts rename to types/d3kit/d3kit-tests.ts diff --git a/d3kit/index.d.ts b/types/d3kit/index.d.ts similarity index 100% rename from d3kit/index.d.ts rename to types/d3kit/index.d.ts diff --git a/d3kit/tsconfig.json b/types/d3kit/tsconfig.json similarity index 100% rename from d3kit/tsconfig.json rename to types/d3kit/tsconfig.json diff --git a/d3kit/v1/d3kit-tests.ts b/types/d3kit/v1/d3kit-tests.ts similarity index 100% rename from d3kit/v1/d3kit-tests.ts rename to types/d3kit/v1/d3kit-tests.ts diff --git a/d3kit/v1/index.d.ts b/types/d3kit/v1/index.d.ts similarity index 100% rename from d3kit/v1/index.d.ts rename to types/d3kit/v1/index.d.ts diff --git a/d3kit/v1/tsconfig.json b/types/d3kit/v1/tsconfig.json similarity index 100% rename from d3kit/v1/tsconfig.json rename to types/d3kit/v1/tsconfig.json diff --git a/d3pie/d3pie-tests.ts b/types/d3pie/d3pie-tests.ts similarity index 100% rename from d3pie/d3pie-tests.ts rename to types/d3pie/d3pie-tests.ts diff --git a/d3pie/index.d.ts b/types/d3pie/index.d.ts similarity index 100% rename from d3pie/index.d.ts rename to types/d3pie/index.d.ts diff --git a/d3pie/tsconfig.json b/types/d3pie/tsconfig.json similarity index 100% rename from d3pie/tsconfig.json rename to types/d3pie/tsconfig.json diff --git a/dagre-d3/dagre-d3-tests.ts b/types/dagre-d3/dagre-d3-tests.ts similarity index 100% rename from dagre-d3/dagre-d3-tests.ts rename to types/dagre-d3/dagre-d3-tests.ts diff --git a/dagre-d3/index.d.ts b/types/dagre-d3/index.d.ts similarity index 100% rename from dagre-d3/index.d.ts rename to types/dagre-d3/index.d.ts diff --git a/dagre-d3/tsconfig.json b/types/dagre-d3/tsconfig.json similarity index 100% rename from dagre-d3/tsconfig.json rename to types/dagre-d3/tsconfig.json diff --git a/dagre-d3/tslint.json b/types/dagre-d3/tslint.json similarity index 100% rename from dagre-d3/tslint.json rename to types/dagre-d3/tslint.json diff --git a/dagre/dagre-tests.ts b/types/dagre/dagre-tests.ts similarity index 100% rename from dagre/dagre-tests.ts rename to types/dagre/dagre-tests.ts diff --git a/dagre/index.d.ts b/types/dagre/index.d.ts similarity index 100% rename from dagre/index.d.ts rename to types/dagre/index.d.ts diff --git a/dagre/tsconfig.json b/types/dagre/tsconfig.json similarity index 100% rename from dagre/tsconfig.json rename to types/dagre/tsconfig.json diff --git a/dagre/tslint.json b/types/dagre/tslint.json similarity index 100% rename from dagre/tslint.json rename to types/dagre/tslint.json diff --git a/dat-gui/dat-gui-tests.ts b/types/dat-gui/dat-gui-tests.ts similarity index 100% rename from dat-gui/dat-gui-tests.ts rename to types/dat-gui/dat-gui-tests.ts diff --git a/dat-gui/index.d.ts b/types/dat-gui/index.d.ts similarity index 100% rename from dat-gui/index.d.ts rename to types/dat-gui/index.d.ts diff --git a/dat-gui/tsconfig.json b/types/dat-gui/tsconfig.json similarity index 100% rename from dat-gui/tsconfig.json rename to types/dat-gui/tsconfig.json diff --git a/data-driven/data-driven-tests.ts b/types/data-driven/data-driven-tests.ts similarity index 100% rename from data-driven/data-driven-tests.ts rename to types/data-driven/data-driven-tests.ts diff --git a/data-driven/index.d.ts b/types/data-driven/index.d.ts similarity index 100% rename from data-driven/index.d.ts rename to types/data-driven/index.d.ts diff --git a/data-driven/tsconfig.json b/types/data-driven/tsconfig.json similarity index 100% rename from data-driven/tsconfig.json rename to types/data-driven/tsconfig.json diff --git a/datatables.net-buttons/datatables.net-buttons-tests.ts b/types/datatables.net-buttons/datatables.net-buttons-tests.ts similarity index 96% rename from datatables.net-buttons/datatables.net-buttons-tests.ts rename to types/datatables.net-buttons/datatables.net-buttons-tests.ts index 6acbbeaf8a..015917c456 100644 --- a/datatables.net-buttons/datatables.net-buttons-tests.ts +++ b/types/datatables.net-buttons/datatables.net-buttons-tests.ts @@ -22,6 +22,7 @@ $(document).ready(function () { name: 'name', namespace: 'namespace', titleAttr: 'title', + title: 'title' } ], } diff --git a/datatables.net-buttons/index.d.ts b/types/datatables.net-buttons/index.d.ts similarity index 85% rename from datatables.net-buttons/index.d.ts rename to types/datatables.net-buttons/index.d.ts index b4ed4b0eb5..ba4aa75654 100644 --- a/datatables.net-buttons/index.d.ts +++ b/types/datatables.net-buttons/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for JQuery DataTables Buttons extension 1.1.0 // Project: http://datatables.net/extensions/buttons/ -// Definitions by: Sam Germano +// Definitions by: Sam Germano , Jim Hartford // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -80,13 +80,18 @@ declare namespace DataTables { */ titleAttr?: string; + /** + * Button 'title' text + */ + title?: string; + exportOptions?: ButtonExportOptions; autoPrint?: boolean; customize?: FunctionButtonCustomize; } export interface FunctionButtonAvailable { - (dt: DataTables.DataTable, config: any): boolean + (dt: DataTables.Api, config: any): boolean } export interface ButtonExportOptions { columns?: string; @@ -101,14 +106,14 @@ declare namespace DataTables { } export interface ButtonText { - (dt: DataTables.DataTable, node: JQuery, config: any): string + (dt: DataTables.Api, node: JQuery, config: any): string } export interface FunctionButtonInit { - (dt: DataTables.DataTable, node: JQuery, config: any): void + (dt: DataTables.Api, node: JQuery, config: any): void } // api object? export interface FunctionButtonAction { - (e: any, dt: DataTables.DataTable, node: JQuery, config: any): void + (e: any, dt: DataTables.Api, node: JQuery, config: any): void } export interface FunctionButtonCustomize { diff --git a/datatables.net-buttons/tsconfig.json b/types/datatables.net-buttons/tsconfig.json similarity index 100% rename from datatables.net-buttons/tsconfig.json rename to types/datatables.net-buttons/tsconfig.json diff --git a/datatables.net-fixedheader/datatables.net-fixedheader-tests.ts b/types/datatables.net-fixedheader/datatables.net-fixedheader-tests.ts similarity index 83% rename from datatables.net-fixedheader/datatables.net-fixedheader-tests.ts rename to types/datatables.net-fixedheader/datatables.net-fixedheader-tests.ts index 561b968ba9..72d8665838 100644 --- a/datatables.net-fixedheader/datatables.net-fixedheader-tests.ts +++ b/types/datatables.net-fixedheader/datatables.net-fixedheader-tests.ts @@ -1,5 +1,5 @@ $(document).ready(() => { - var config: DataTables.Settings = { + const config: DataTables.Settings = { // FixedHeader extension options fixedHeader: { footer: true, diff --git a/datatables.net-fixedheader/index.d.ts b/types/datatables.net-fixedheader/index.d.ts similarity index 96% rename from datatables.net-fixedheader/index.d.ts rename to types/datatables.net-fixedheader/index.d.ts index caf3987d35..cb0b363b65 100644 --- a/datatables.net-fixedheader/index.d.ts +++ b/types/datatables.net-fixedheader/index.d.ts @@ -6,7 +6,7 @@ /// declare namespace DataTables { - export interface Settings { + interface Settings { /* * FixedHeader extension options */ diff --git a/datatables.net-fixedheader/tsconfig.json b/types/datatables.net-fixedheader/tsconfig.json similarity index 100% rename from datatables.net-fixedheader/tsconfig.json rename to types/datatables.net-fixedheader/tsconfig.json diff --git a/datatables.net-fixedheader/tslint.json b/types/datatables.net-fixedheader/tslint.json similarity index 100% rename from datatables.net-fixedheader/tslint.json rename to types/datatables.net-fixedheader/tslint.json diff --git a/datatables.net-select/datatables.net-select-tests.ts b/types/datatables.net-select/datatables.net-select-tests.ts similarity index 86% rename from datatables.net-select/datatables.net-select-tests.ts rename to types/datatables.net-select/datatables.net-select-tests.ts index 5d8fdd8dc6..9b7eb24c2a 100644 --- a/datatables.net-select/datatables.net-select-tests.ts +++ b/types/datatables.net-select/datatables.net-select-tests.ts @@ -1,5 +1,5 @@ $(document).ready(() => { - var config: DataTables.Settings = { + const config: DataTables.Settings = { // Select extension options select: { blurable: true, diff --git a/datatables.net-select/index.d.ts b/types/datatables.net-select/index.d.ts similarity index 97% rename from datatables.net-select/index.d.ts rename to types/datatables.net-select/index.d.ts index 96529a10c1..201d00ba27 100644 --- a/datatables.net-select/index.d.ts +++ b/types/datatables.net-select/index.d.ts @@ -6,7 +6,7 @@ /// declare namespace DataTables { - export interface Settings { + interface Settings { /* * Select extension options */ diff --git a/datatables.net-select/tsconfig.json b/types/datatables.net-select/tsconfig.json similarity index 100% rename from datatables.net-select/tsconfig.json rename to types/datatables.net-select/tsconfig.json diff --git a/datatables.net-select/tslint.json b/types/datatables.net-select/tslint.json similarity index 100% rename from datatables.net-select/tslint.json rename to types/datatables.net-select/tslint.json diff --git a/datatables.net/datatables.net-tests.ts b/types/datatables.net/datatables.net-tests.ts similarity index 98% rename from datatables.net/datatables.net-tests.ts rename to types/datatables.net/datatables.net-tests.ts index c4a8fcaf3e..838ca9131c 100644 --- a/datatables.net/datatables.net-tests.ts +++ b/types/datatables.net/datatables.net-tests.ts @@ -321,7 +321,7 @@ $(document).ready(function () { destroy = dt.destroy(true); destroy.$(""); - var draw: DataTables.DataTable = dt.draw(); + var draw: DataTables.Api = dt.draw(); draw = dt.draw(true); draw = dt.draw("page"); draw.$(""); @@ -787,8 +787,8 @@ $(document).ready(function () { var rows_13 = dt.rows.add([{}, {}]); dt.rows().every(function () { }); dt.rows().every(function (rowIdx, tableLoop, rowLoop) { }); - var rows_14: DataTables.DataTable = dt.rows("selector").ids(); - var rows_15: DataTables.DataTable = dt.rows("selector").ids(false); + var rows_14: DataTables.Api = dt.rows("selector").ids(); + var rows_15: DataTables.Api = dt.rows("selector").ids(false); var table3 = $('#example').DataTable(); table3.row.add({ @@ -909,11 +909,11 @@ $(document).ready(function () { var staticFn: DataTables.StaticFunctions; // With boolean parameter type, always returns DataTables.DataTable[]. - var static_1: DataTables.DataTable[] = staticFn.tables(true); + var static_1: DataTables.Api[] = staticFn.tables(true); // With object parameter type, returns DataTables.DataTable[] when "api" property is false. - static_1 = staticFn.tables({ "visible": true, "api": false }); + static_1 = staticFn.tables({ "visible": true, "api": false }); // With object parameter type, returns DataTables.DataTable when "api" property is true. - var static_2: DataTables.DataTable = staticFn.tables({ "visible": true, "api": true }); + var static_2: DataTables.Api = staticFn.tables({ "visible": true, "api": true }); //#endregion "Methods-Static" diff --git a/datatables.net/index.d.ts b/types/datatables.net/index.d.ts similarity index 93% rename from datatables.net/index.d.ts rename to types/datatables.net/index.d.ts index 2640dbabe6..c0aaf9cc6c 100644 --- a/datatables.net/index.d.ts +++ b/types/datatables.net/index.d.ts @@ -11,7 +11,7 @@ /// interface JQuery { - DataTable(param?: DataTables.Settings): DataTables.DataTable; + DataTable(opts?: DataTables.Settings): DataTables.Api; } //TODO: Wrong, as jquery.d.ts has no interface for fn @@ -20,11 +20,11 @@ interface JQuery { //} declare namespace DataTables { - export interface DataTable extends DataTableCore { + export interface Api extends CoreMethods { /** * Get the data for the whole table. */ - data(): DataTable; + data(): Api; /** * Order Methods / Object @@ -127,8 +127,8 @@ declare namespace DataTables { //#endregion "Table/Tables" } - export interface DataTables extends DataTableCore { - [index: number]: DataTable; + export interface DataTables extends CoreMethods { + [index: number]: Api; } interface ObjectSelectorModifier { @@ -155,7 +155,7 @@ declare namespace DataTables { //#region "core-methods" - interface DataTableCore extends UtilityMethods { + interface CoreMethods extends UtilityMethods { /** * Get jquery object */ @@ -172,21 +172,21 @@ declare namespace DataTables { /** * Clear the table of all data. */ - clear(): DataTable; + clear(): Api; /** * Destroy the DataTables in the current context. * * @param remove Completely remove the table from the DOM (true) or leave it in the DOM in its original plain un-enhanced HTML state (default, false). */ - destroy(remove?: boolean): DataTable; + destroy(remove?: boolean): Api; /** * Redraw the DataTables in the current context, optionally updating ordering, searching and paging as required. * * @param paging This parameter is used to determine what kind of draw DataTables will perform. */ - draw(paging?: boolean | string): DataTable; + draw(paging?: boolean | string): Api; /* * Look up a language token that was defined in the DataTables' language initialisation object. @@ -210,7 +210,7 @@ declare namespace DataTables { * @param event Event name to remove. * @param callback Specific callback function to remove if you want to unbind a single event listener. */ - off(event: string, callback?: Function): DataTable; + off(event: string, callback?: Function): Api; /** * Table events listener. @@ -218,7 +218,7 @@ declare namespace DataTables { * @param event Event to listen for. * @param callback Specific callback function to remove if you want to unbind a single event listener. */ - on(event: string, callback: Function): DataTable; + on(event: string, callback: Function): Api; /** * Listen for a table event once and then remove the listener. @@ -226,7 +226,7 @@ declare namespace DataTables { * @param event Event to listen for. * @param callback Specific callback function to remove if you want to unbind a single event listener. */ - one(event: string, callback: Function): DataTable; + one(event: string, callback: Function): Api; /** * Page Methods / Object @@ -246,12 +246,12 @@ declare namespace DataTables { * @param smart Perform smart search. * @param caseInsen Do case-insensitive matching (default, true) or not (false). */ - search(input: string, regex?: boolean, smart?: boolean, caseInsen?: boolean): DataTable; + search(input: string, regex?: boolean, smart?: boolean, caseInsen?: boolean): Api; /** * Obtain the table's settings object */ - settings(): DataTable; + settings(): Api; /** * Page Methods / Object @@ -261,14 +261,14 @@ declare namespace DataTables { //#region "ajax-methods" - interface AjaxMethods extends DataTable { + interface AjaxMethods extends Api { /** * Reload the table data from the Ajax data source. * * @param callback Function which is executed when the data as been reloaded and the table fully redrawn. * @param resetPaging Reset (default action or true) or hold the current paging position (false). */ - load(callback?: Function, resetPaging?: boolean): DataTable; + load(callback?: Function, resetPaging?: boolean): Api; } interface AjaxMethodModel { @@ -288,7 +288,7 @@ declare namespace DataTables { * @param callback Function which is executed when the data as been reloaded and the table fully redrawn. * @param resetPaging Reset (default action or true) or hold the current paging position (false). */ - reload(callback?: Function, resetPaging?: boolean): DataTable; + reload(callback?: Function, resetPaging?: boolean): Api; /** * Reload the table data from the Ajax data source @@ -318,9 +318,9 @@ declare namespace DataTables { * * @param order Order Model */ - (order?: (string | number)[]): DataTable; - (order?: (string | number)[][]): DataTable; - (order: (string | number)[], ...args: any[]): DataTable; + (order?: (string | number)[]): Api; + (order?: (string | number)[][]): Api; + (order: (string | number)[], ...args: any[]): Api; /** * Add an ordering listener to an element, for a given column. @@ -329,7 +329,7 @@ declare namespace DataTables { * @param column Column index * @param callback Callback function */ - listener(node: string | Node | JQuery, column: number, callback: Function): DataTable; + listener(node: string | Node | JQuery, column: number, callback: Function): Api; } //#endregion "order-methods" @@ -346,7 +346,7 @@ declare namespace DataTables { * * @param page Index or 'first', 'next', 'previous', 'last' */ - (page: number | string): DataTable; + (page: number | string): Api; /** * Get paging information about the table @@ -363,7 +363,7 @@ declare namespace DataTables { * * @param length Page length to set. use -1 to show all records. */ - len(length: number): DataTable; + len(length: number): Api; } interface PageMethodeModelInfoReturn { @@ -390,7 +390,7 @@ declare namespace DataTables { /** * Clear the saved state of the table. */ - clear(): DataTable; + clear(): Api; /** * Get the table state that was loaded during initialisation. @@ -400,7 +400,7 @@ declare namespace DataTables { /** * Trigger a state save. */ - save(): DataTable; + save(): Api; } interface StateReturnModel { @@ -435,7 +435,7 @@ declare namespace DataTables { * @param a API instance to concatenate to the initial instance. * @param b Additional API instance(s) to concatenate to the initial instance. */ - concat(a: Object, ...b: Object[]): DataTable; + concat(a: Object, ...b: Object[]): Api; /** * Get the number of entries in an API instance's result set, regardless of multi-table grouping (e.g. any data, selected rows, etc). Since: 1.10.8 @@ -447,26 +447,26 @@ declare namespace DataTables { * * @param fn Callback function which is called for each item in the API instance result set. The callback is called with three parameters */ - each(fn: Function): DataTable; + each(fn: Function): Api; /** * Reduce an Api instance to a single context and result set. * * @param idx Index to select */ - eq(idx: number): DataTable; + eq(idx: number): Api; /** * Iterate over the result set of an API instance and test each item, creating a new instance from those items which pass. * * @param fn Callback function which is called for each item in the API instance result set. The callback is called with three parameters. */ - filter(fn: Function): DataTable; + filter(fn: Function): Api; /** * Flatten a 2D array structured API instance to a 1D array structure. */ - flatten(): DataTable; + flatten(): Api; /** * Find the first instance of a value in the API instance's result set. @@ -499,14 +499,14 @@ declare namespace DataTables { * * @param fn Callback function which is called for each item in the API instance result set. The callback is called with three parameters. */ - map(fn: Function): DataTable; + map(fn: Function): Api; /** * Iterate over the result set of an API instance, creating a new API instance from the values retrieved from the original elements. * * @param property Object property name to use from the element in the original result set for the new result set. */ - pluck(property: number | string): DataTable; + pluck(property: number | string): Api; /** * Remove the last item from an API instance's result set. @@ -539,7 +539,7 @@ declare namespace DataTables { /** * Reverse the result set of the API instance and return the original array. */ - reverse(): DataTable; + reverse(): Api; /** * Remove the first item from an API instance's result set. @@ -551,7 +551,7 @@ declare namespace DataTables { * * @param fn This is a standard Javascript sort comparison function. It accepts two parameters. */ - sort(fn?: Function): DataTable; + sort(fn?: Function): Api; /** * Modify the contents of an Api instance's result set, adding or removing items from it as required. @@ -580,7 +580,7 @@ declare namespace DataTables { /** * Create a new API instance containing only the unique items from a the elements in an instance's result set. */ - unique(): DataTable; + unique(): Api; /** * Add one or more items to the start of an API instance's result set. @@ -598,7 +598,7 @@ declare namespace DataTables { * * @param t Specify which cache the data should be read from. Can take one of two values: search or order */ - cache(t: string): DataTable; + cache(t: string): Api; } //#region "cell-methods" @@ -609,7 +609,7 @@ declare namespace DataTables { * * @param source Data source to read the new data from. */ - invalidate(source?: string): DataTable; + invalidate(source?: string): Api; /** * Get data for the selected cell @@ -619,7 +619,7 @@ declare namespace DataTables { render(t: string): any; } - interface CellMethods extends DataTableCore, CommonCellMethods { + interface CellMethods extends CoreMethods, CommonCellMethods { /** * Get data for the selected cell */ @@ -630,7 +630,7 @@ declare namespace DataTables { * * @param data Value to assign to the data for the cell */ - data(data: any): DataTable; + data(data: any): Api; /** * Get index information about the selected cell @@ -649,28 +649,28 @@ declare namespace DataTables { columnVisible: number; } - interface CellsMethods extends DataTableCore, CommonCellMethods { + interface CellsMethods extends CoreMethods, CommonCellMethods { /** * Get data for the selected cells */ - data(): DataTable; + data(): Api; /** * Iterate over each selected cell, with the function context set to be the cell in question. Since: DataTables 1.10.6 * * @param fn Function to execute for every cell selected. */ - every(fn: (cellRowIdx: number, cellColIdx: number, tableLoop: number, cellLoop: number) => void): DataTable; + every(fn: (cellRowIdx: number, cellColIdx: number, tableLoop: number, cellLoop: number) => void): Api; /** * Get index information about the selected cells */ - indexes(): DataTable; + indexes(): Api; /** * Get the DOM elements for the selected cells */ - nodes(): DataTable; + nodes(): Api; } //#endregion "cell-methods" @@ -692,7 +692,7 @@ declare namespace DataTables { * * @param direction Direction of sort to apply to the selected column - desc (descending) or asc (ascending). */ - order(direction: string): DataTable; + order(direction: string): Api; /** * Get the visibility of the selected column. @@ -705,7 +705,7 @@ declare namespace DataTables { * @param show Specify if the column should be visible (true) or not (false). * @param redrawCalculations Indicate if DataTables should recalculate the column layout (true - default) or not (false). Typically this would be left as the default value, but it can be useful to disable when using the method in a loop - so the calculations are performed on every call as they can hamper performance. */ - visible(show: boolean, redrawCalculations?: boolean): DataTable; + visible(show: boolean, redrawCalculations?: boolean): Api; } interface ColumnMethodsModel { @@ -726,11 +726,11 @@ declare namespace DataTables { index(t: string, index: number): number; } - interface ColumnMethods extends DataTableCore, CommonColumnMethod { + interface ColumnMethods extends CoreMethods, CommonColumnMethod { /** * Get the data for the cells in the selected column. */ - data(): DataTable; + data(): Api; /** * Get the data source property for the selected column @@ -742,12 +742,12 @@ declare namespace DataTables { * * @param t Specify if you want to get the column data index (default) or the visible index (visible). */ - index(t?: string): DataTable; + index(t?: string): Api; /** * Obtain the th / td nodes for the selected column */ - nodes(): DataTable[]; + nodes(): Api[]; } interface ColumnsMethodsModel { @@ -769,38 +769,38 @@ declare namespace DataTables { /** * Recalculate the column widths for layout. */ - adjust(): DataTable; + adjust(): Api; } - interface ColumnsMethods extends DataTableCore, CommonColumnMethod { + interface ColumnsMethods extends CoreMethods, CommonColumnMethod { /** * Obtain the data for the columns from the selector */ - data(): DataTable; + data(): Api; /** * Get the data source property for the selected columns. */ - dataSrc(): DataTable; + dataSrc(): Api; /** * Iterate over each selected column, with the function context set to be the column in question. Since: DataTables 1.10.6 * * @param fn Function to execute for every column selected. */ - every(fn: (colIdx: number, tableLoop: number, colLoop: number) => void): DataTable; + every(fn: (colIdx: number, tableLoop: number, colLoop: number) => void): Api; /** * Get the column indexes of the selected columns. * * @param t Specify if you want to get the column data index (default) or the visible index (visible). */ - indexes(t?: string): DataTable; + indexes(t?: string): Api; /** * Obtain the th / td nodes for the selected columns */ - nodes(): DataTable[][]; + nodes(): Api[][]; } //#endregion "column-methods" @@ -812,7 +812,7 @@ declare namespace DataTables { * * @param source Data source to read the new data from. Values: 'auto', 'data', 'dom' */ - invalidate(source?: string): DataTable; + invalidate(source?: string): Api; } interface RowChildMethodModel { @@ -839,39 +839,39 @@ declare namespace DataTables { /** * Hide the child row(s) of a parent row */ - hide(): DataTable; + hide(): Api; /** * Check if the child rows of a parent row are visible */ - isShown(): DataTable; + isShown(): Api; /** * Remove child row(s) from display and release any allocated memory */ - remove(): DataTable; + remove(): Api; /** * Show the child row(s) of a parent row */ - show(): DataTable; + show(): Api; } - interface RowChildMethods extends DataTableCore { + interface RowChildMethods extends CoreMethods { /** * Hide the child row(s) of a parent row */ - hide(): DataTable; + hide(): Api; /** * Remove child row(s) from display and release any allocated memory */ - remove(): DataTable; + remove(): Api; /** * Make newly defined child rows visible */ - show(): DataTable; + show(): Api; } interface RowMethodsModel { @@ -888,10 +888,10 @@ declare namespace DataTables { * * @param data Data to use for the new row. This may be an array, object or Javascript object instance, but must be in the same format as the other data in the table */ - add(data: any[] | Object): DataTable; + add(data: any[] | Object): Api; } - interface RowMethods extends DataTableCore, CommonRowMethod { + interface RowMethods extends CoreMethods, CommonRowMethod { /** * Order Methods / Object */ @@ -907,7 +907,7 @@ declare namespace DataTables { * * @param d Data to use for the row. */ - data(d: any[] | Object): DataTable; + data(d: any[] | Object): Api; /** @@ -956,28 +956,28 @@ declare namespace DataTables { * * @param data Array of data elements, with each one describing a new row to be added to the table */ - add(data: any[]): DataTable; + add(data: any[]): Api; } - interface RowsMethods extends DataTableCore, CommonRowMethod { + interface RowsMethods extends CoreMethods, CommonRowMethod { /** * Get the data for the rows from the selector */ - data(): DataTable; + data(): Api; /** * Set the data for the selected row * * @param d Data to use for the row. */ - data(d: any[] | Object): DataTable; + data(d: any[] | Object): Api; /** * Iterate over each selected row, with the function context set to be the row in question. Since: DataTables 1.10.6 * * @param fn Function to execute for every row selected. */ - every(fn: (rowIdx: number, tableLoop: number, rowLoop: number) => void): DataTable; + every(fn: (rowIdx: number, tableLoop: number, rowLoop: number) => void): Api; /** * Get the ids of the selected rows. Since: 1.10.8 @@ -986,28 +986,28 @@ declare namespace DataTables { * false - Do not modify the id value. * @returns Api instance with the selected rows in its result set. If a row does not have an id available 'undefined' will be returned as the value. */ - ids(hash?: boolean): DataTable; + ids(hash?: boolean): Api; /** * Get the row indexes of the selected rows. */ - indexes(): DataTable; + indexes(): Api; /** * Obtain the tr nodes for the selected rows */ - nodes(): DataTable; + nodes(): Api; /** * Delete the selected rows from the DataTable. */ - remove(): DataTable; + remove(): Api; } //#endregion "row-methods" //#region "table-methods" - interface TableMethods extends DataTableCore { + interface TableMethods extends CoreMethods { /** * Get the tfoot node for the table in the API's context */ @@ -1034,31 +1034,31 @@ declare namespace DataTables { node(): Node; } - interface TablesMethods extends DataTableCore { + interface TablesMethods extends CoreMethods { /** * Get the tfoot nodes for the tables in the API's context */ - footer(): DataTable; + footer(): Api; /** * Get the thead nodes for the tables in the API's context */ - header(): DataTable; + header(): Api; /** * Get the tbody nodes for the tables in the API's context */ - body(): DataTable; + body(): Api; /** * Get the div container nodes for the tables in the API's context */ - containers(): DataTable; + containers(): Api; /** * Get the table nodes for the tables in the API's context */ - nodes(): DataTable; + nodes(): Api; } //#endregion "table-methods" @@ -1080,7 +1080,7 @@ declare namespace DataTables { * @param visible As a boolean value this options is used to indicate if you want all tables on the page should be returned (false), or visible tables only (true). * Since 1.10.8 this option can also be given as an object. */ - tables(visible?: boolean | ObjectTablesStatic): DataTables.DataTable[] | DataTables.DataTable; + tables(visible?: boolean | ObjectTablesStatic): DataTables.Api[] | DataTables.Api; /** * Version number compatibility check function @@ -1099,7 +1099,7 @@ declare namespace DataTables { * * @param table Selector string for table */ - Api(selector: string | Node | Node[] | JQuery): DataTables.DataTable; + Api(selector: string | Node | Node[] | JQuery): DataTables.Api; } export interface StaticUtilFunctions { diff --git a/datatables.net/tsconfig.json b/types/datatables.net/tsconfig.json similarity index 100% rename from datatables.net/tsconfig.json rename to types/datatables.net/tsconfig.json diff --git a/date.format.js/date.format.js-tests.ts b/types/date.format.js/date.format.js-tests.ts similarity index 100% rename from date.format.js/date.format.js-tests.ts rename to types/date.format.js/date.format.js-tests.ts diff --git a/date.format.js/index.d.ts b/types/date.format.js/index.d.ts similarity index 100% rename from date.format.js/index.d.ts rename to types/date.format.js/index.d.ts diff --git a/date.format.js/tsconfig.json b/types/date.format.js/tsconfig.json similarity index 100% rename from date.format.js/tsconfig.json rename to types/date.format.js/tsconfig.json diff --git a/dateformat/dateformat-tests.ts b/types/dateformat/dateformat-tests.ts similarity index 100% rename from dateformat/dateformat-tests.ts rename to types/dateformat/dateformat-tests.ts diff --git a/dateformat/index.d.ts b/types/dateformat/index.d.ts similarity index 100% rename from dateformat/index.d.ts rename to types/dateformat/index.d.ts diff --git a/dateformat/tsconfig.json b/types/dateformat/tsconfig.json similarity index 100% rename from dateformat/tsconfig.json rename to types/dateformat/tsconfig.json diff --git a/datejs/datejs-tests.ts b/types/datejs/datejs-tests.ts similarity index 100% rename from datejs/datejs-tests.ts rename to types/datejs/datejs-tests.ts diff --git a/datejs/index.d.ts b/types/datejs/index.d.ts similarity index 100% rename from datejs/index.d.ts rename to types/datejs/index.d.ts diff --git a/datejs/sugarpak.d.ts b/types/datejs/sugarpak.d.ts similarity index 100% rename from datejs/sugarpak.d.ts rename to types/datejs/sugarpak.d.ts diff --git a/datejs/tsconfig.json b/types/datejs/tsconfig.json similarity index 100% rename from datejs/tsconfig.json rename to types/datejs/tsconfig.json diff --git a/daterangepicker/daterangepicker-tests.ts b/types/daterangepicker/daterangepicker-tests.ts similarity index 100% rename from daterangepicker/daterangepicker-tests.ts rename to types/daterangepicker/daterangepicker-tests.ts diff --git a/daterangepicker/index.d.ts b/types/daterangepicker/index.d.ts similarity index 100% rename from daterangepicker/index.d.ts rename to types/daterangepicker/index.d.ts diff --git a/daterangepicker/package.json b/types/daterangepicker/package.json similarity index 100% rename from daterangepicker/package.json rename to types/daterangepicker/package.json diff --git a/daterangepicker/tsconfig.json b/types/daterangepicker/tsconfig.json similarity index 100% rename from daterangepicker/tsconfig.json rename to types/daterangepicker/tsconfig.json diff --git a/db-migrate-base/db-migrate-base-tests.ts b/types/db-migrate-base/db-migrate-base-tests.ts similarity index 100% rename from db-migrate-base/db-migrate-base-tests.ts rename to types/db-migrate-base/db-migrate-base-tests.ts diff --git a/db-migrate-base/index.d.ts b/types/db-migrate-base/index.d.ts similarity index 100% rename from db-migrate-base/index.d.ts rename to types/db-migrate-base/index.d.ts diff --git a/db-migrate-base/tsconfig.json b/types/db-migrate-base/tsconfig.json similarity index 100% rename from db-migrate-base/tsconfig.json rename to types/db-migrate-base/tsconfig.json diff --git a/db-migrate-pg/db-migrate-pg-tests.ts b/types/db-migrate-pg/db-migrate-pg-tests.ts similarity index 100% rename from db-migrate-pg/db-migrate-pg-tests.ts rename to types/db-migrate-pg/db-migrate-pg-tests.ts diff --git a/db-migrate-pg/index.d.ts b/types/db-migrate-pg/index.d.ts similarity index 100% rename from db-migrate-pg/index.d.ts rename to types/db-migrate-pg/index.d.ts diff --git a/db-migrate-pg/tsconfig.json b/types/db-migrate-pg/tsconfig.json similarity index 100% rename from db-migrate-pg/tsconfig.json rename to types/db-migrate-pg/tsconfig.json diff --git a/db.js/db.js-tests.ts b/types/db.js/db.js-tests.ts similarity index 100% rename from db.js/db.js-tests.ts rename to types/db.js/db.js-tests.ts diff --git a/db.js/index.d.ts b/types/db.js/index.d.ts similarity index 100% rename from db.js/index.d.ts rename to types/db.js/index.d.ts diff --git a/db.js/tsconfig.json b/types/db.js/tsconfig.json similarity index 100% rename from db.js/tsconfig.json rename to types/db.js/tsconfig.json diff --git a/dc/dc-tests.ts b/types/dc/dc-tests.ts similarity index 100% rename from dc/dc-tests.ts rename to types/dc/dc-tests.ts diff --git a/dc/index.d.ts b/types/dc/index.d.ts similarity index 100% rename from dc/index.d.ts rename to types/dc/index.d.ts diff --git a/dc/tsconfig.json b/types/dc/tsconfig.json similarity index 100% rename from dc/tsconfig.json rename to types/dc/tsconfig.json diff --git a/debounce/debounce-tests.ts b/types/debounce/debounce-tests.ts similarity index 100% rename from debounce/debounce-tests.ts rename to types/debounce/debounce-tests.ts diff --git a/debounce/index.d.ts b/types/debounce/index.d.ts similarity index 100% rename from debounce/index.d.ts rename to types/debounce/index.d.ts diff --git a/debounce/tsconfig.json b/types/debounce/tsconfig.json similarity index 100% rename from debounce/tsconfig.json rename to types/debounce/tsconfig.json diff --git a/debug/debug-tests.ts b/types/debug/debug-tests.ts similarity index 100% rename from debug/debug-tests.ts rename to types/debug/debug-tests.ts diff --git a/debug/index.d.ts b/types/debug/index.d.ts similarity index 100% rename from debug/index.d.ts rename to types/debug/index.d.ts diff --git a/debug/tsconfig.json b/types/debug/tsconfig.json similarity index 100% rename from debug/tsconfig.json rename to types/debug/tsconfig.json diff --git a/decamelize/decamelize-tests.ts b/types/decamelize/decamelize-tests.ts similarity index 100% rename from decamelize/decamelize-tests.ts rename to types/decamelize/decamelize-tests.ts diff --git a/decamelize/index.d.ts b/types/decamelize/index.d.ts similarity index 100% rename from decamelize/index.d.ts rename to types/decamelize/index.d.ts diff --git a/decamelize/tsconfig.json b/types/decamelize/tsconfig.json similarity index 100% rename from decamelize/tsconfig.json rename to types/decamelize/tsconfig.json diff --git a/decay/decay-tests.ts b/types/decay/decay-tests.ts similarity index 100% rename from decay/decay-tests.ts rename to types/decay/decay-tests.ts diff --git a/decay/index.d.ts b/types/decay/index.d.ts similarity index 100% rename from decay/index.d.ts rename to types/decay/index.d.ts diff --git a/decay/tsconfig.json b/types/decay/tsconfig.json similarity index 100% rename from decay/tsconfig.json rename to types/decay/tsconfig.json diff --git a/decay/tslint.json b/types/decay/tslint.json similarity index 100% rename from decay/tslint.json rename to types/decay/tslint.json diff --git a/decimal.js/decimal.js-tests.ts b/types/decimal.js/decimal.js-tests.ts similarity index 100% rename from decimal.js/decimal.js-tests.ts rename to types/decimal.js/decimal.js-tests.ts diff --git a/decimal.js/index.d.ts b/types/decimal.js/index.d.ts similarity index 100% rename from decimal.js/index.d.ts rename to types/decimal.js/index.d.ts diff --git a/decimal.js/tsconfig.json b/types/decimal.js/tsconfig.json similarity index 100% rename from decimal.js/tsconfig.json rename to types/decimal.js/tsconfig.json diff --git a/decorum/decorum-tests.ts b/types/decorum/decorum-tests.ts similarity index 100% rename from decorum/decorum-tests.ts rename to types/decorum/decorum-tests.ts diff --git a/decorum/index.d.ts b/types/decorum/index.d.ts similarity index 100% rename from decorum/index.d.ts rename to types/decorum/index.d.ts diff --git a/decorum/tsconfig.json b/types/decorum/tsconfig.json similarity index 100% rename from decorum/tsconfig.json rename to types/decorum/tsconfig.json diff --git a/deep-assign/deep-assign-tests.ts b/types/deep-assign/deep-assign-tests.ts similarity index 100% rename from deep-assign/deep-assign-tests.ts rename to types/deep-assign/deep-assign-tests.ts diff --git a/deep-assign/index.d.ts b/types/deep-assign/index.d.ts similarity index 100% rename from deep-assign/index.d.ts rename to types/deep-assign/index.d.ts diff --git a/deep-assign/tsconfig.json b/types/deep-assign/tsconfig.json similarity index 100% rename from deep-assign/tsconfig.json rename to types/deep-assign/tsconfig.json diff --git a/deep-diff/deep-diff-tests.ts b/types/deep-diff/deep-diff-tests.ts similarity index 100% rename from deep-diff/deep-diff-tests.ts rename to types/deep-diff/deep-diff-tests.ts diff --git a/deep-diff/index.d.ts b/types/deep-diff/index.d.ts similarity index 100% rename from deep-diff/index.d.ts rename to types/deep-diff/index.d.ts diff --git a/deep-diff/tsconfig.json b/types/deep-diff/tsconfig.json similarity index 100% rename from deep-diff/tsconfig.json rename to types/deep-diff/tsconfig.json diff --git a/deep-equal/deep-equal-tests.ts b/types/deep-equal/deep-equal-tests.ts similarity index 100% rename from deep-equal/deep-equal-tests.ts rename to types/deep-equal/deep-equal-tests.ts diff --git a/deep-equal/index.d.ts b/types/deep-equal/index.d.ts similarity index 100% rename from deep-equal/index.d.ts rename to types/deep-equal/index.d.ts diff --git a/deep-equal/tsconfig.json b/types/deep-equal/tsconfig.json similarity index 100% rename from deep-equal/tsconfig.json rename to types/deep-equal/tsconfig.json diff --git a/deep-equal/tslint.json b/types/deep-equal/tslint.json similarity index 100% rename from deep-equal/tslint.json rename to types/deep-equal/tslint.json diff --git a/deep-extend/deep-extend-tests.ts b/types/deep-extend/deep-extend-tests.ts similarity index 100% rename from deep-extend/deep-extend-tests.ts rename to types/deep-extend/deep-extend-tests.ts diff --git a/deep-extend/index.d.ts b/types/deep-extend/index.d.ts similarity index 100% rename from deep-extend/index.d.ts rename to types/deep-extend/index.d.ts diff --git a/deep-extend/tsconfig.json b/types/deep-extend/tsconfig.json similarity index 100% rename from deep-extend/tsconfig.json rename to types/deep-extend/tsconfig.json diff --git a/deep-freeze-strict/index.d.ts b/types/deep-freeze-strict/index.d.ts similarity index 100% rename from deep-freeze-strict/index.d.ts rename to types/deep-freeze-strict/index.d.ts diff --git a/deep-freeze-strict/tsconfig.json b/types/deep-freeze-strict/tsconfig.json similarity index 100% rename from deep-freeze-strict/tsconfig.json rename to types/deep-freeze-strict/tsconfig.json diff --git a/deep-freeze-strict/tslint.json b/types/deep-freeze-strict/tslint.json similarity index 100% rename from deep-freeze-strict/tslint.json rename to types/deep-freeze-strict/tslint.json diff --git a/deep-freeze/deep-freeze-tests.ts b/types/deep-freeze/deep-freeze-tests.ts similarity index 100% rename from deep-freeze/deep-freeze-tests.ts rename to types/deep-freeze/deep-freeze-tests.ts diff --git a/deep-freeze/index.d.ts b/types/deep-freeze/index.d.ts similarity index 100% rename from deep-freeze/index.d.ts rename to types/deep-freeze/index.d.ts diff --git a/deep-freeze/tsconfig.json b/types/deep-freeze/tsconfig.json similarity index 100% rename from deep-freeze/tsconfig.json rename to types/deep-freeze/tsconfig.json diff --git a/deepmerge/deepmerge-tests.ts b/types/deepmerge/deepmerge-tests.ts similarity index 100% rename from deepmerge/deepmerge-tests.ts rename to types/deepmerge/deepmerge-tests.ts diff --git a/deepmerge/index.d.ts b/types/deepmerge/index.d.ts similarity index 100% rename from deepmerge/index.d.ts rename to types/deepmerge/index.d.ts diff --git a/deepmerge/tsconfig.json b/types/deepmerge/tsconfig.json similarity index 100% rename from deepmerge/tsconfig.json rename to types/deepmerge/tsconfig.json diff --git a/deepmerge/tslint.json b/types/deepmerge/tslint.json similarity index 100% rename from deepmerge/tslint.json rename to types/deepmerge/tslint.json diff --git a/defaults/defaults-tests.ts b/types/defaults/defaults-tests.ts similarity index 100% rename from defaults/defaults-tests.ts rename to types/defaults/defaults-tests.ts diff --git a/defaults/index.d.ts b/types/defaults/index.d.ts similarity index 100% rename from defaults/index.d.ts rename to types/defaults/index.d.ts diff --git a/defaults/tsconfig.json b/types/defaults/tsconfig.json similarity index 100% rename from defaults/tsconfig.json rename to types/defaults/tsconfig.json diff --git a/deku/deku-tests.ts b/types/deku/deku-tests.ts similarity index 100% rename from deku/deku-tests.ts rename to types/deku/deku-tests.ts diff --git a/deku/index.d.ts b/types/deku/index.d.ts similarity index 100% rename from deku/index.d.ts rename to types/deku/index.d.ts diff --git a/deku/tsconfig.json b/types/deku/tsconfig.json similarity index 100% rename from deku/tsconfig.json rename to types/deku/tsconfig.json diff --git a/del/del-tests.ts b/types/del/del-tests.ts similarity index 100% rename from del/del-tests.ts rename to types/del/del-tests.ts diff --git a/del/index.d.ts b/types/del/index.d.ts similarity index 100% rename from del/index.d.ts rename to types/del/index.d.ts diff --git a/del/tsconfig.json b/types/del/tsconfig.json similarity index 100% rename from del/tsconfig.json rename to types/del/tsconfig.json diff --git a/del/tslint.json b/types/del/tslint.json similarity index 100% rename from del/tslint.json rename to types/del/tslint.json diff --git a/denodeify/denodeify-tests.ts b/types/denodeify/denodeify-tests.ts similarity index 100% rename from denodeify/denodeify-tests.ts rename to types/denodeify/denodeify-tests.ts diff --git a/denodeify/index.d.ts b/types/denodeify/index.d.ts similarity index 100% rename from denodeify/index.d.ts rename to types/denodeify/index.d.ts diff --git a/denodeify/tsconfig.json b/types/denodeify/tsconfig.json similarity index 100% rename from denodeify/tsconfig.json rename to types/denodeify/tsconfig.json diff --git a/deoxxa-content-type/deoxxa-content-type-tests.ts b/types/deoxxa-content-type/deoxxa-content-type-tests.ts similarity index 100% rename from deoxxa-content-type/deoxxa-content-type-tests.ts rename to types/deoxxa-content-type/deoxxa-content-type-tests.ts diff --git a/deoxxa-content-type/index.d.ts b/types/deoxxa-content-type/index.d.ts similarity index 100% rename from deoxxa-content-type/index.d.ts rename to types/deoxxa-content-type/index.d.ts diff --git a/deoxxa-content-type/tsconfig.json b/types/deoxxa-content-type/tsconfig.json similarity index 100% rename from deoxxa-content-type/tsconfig.json rename to types/deoxxa-content-type/tsconfig.json diff --git a/depd/depd-tests.ts b/types/depd/depd-tests.ts similarity index 100% rename from depd/depd-tests.ts rename to types/depd/depd-tests.ts diff --git a/depd/index.d.ts b/types/depd/index.d.ts similarity index 100% rename from depd/index.d.ts rename to types/depd/index.d.ts diff --git a/depd/tsconfig.json b/types/depd/tsconfig.json similarity index 100% rename from depd/tsconfig.json rename to types/depd/tsconfig.json diff --git a/deployjava/deployjava-tests.ts b/types/deployjava/deployjava-tests.ts similarity index 100% rename from deployjava/deployjava-tests.ts rename to types/deployjava/deployjava-tests.ts diff --git a/deployjava/index.d.ts b/types/deployjava/index.d.ts similarity index 100% rename from deployjava/index.d.ts rename to types/deployjava/index.d.ts diff --git a/deployjava/tsconfig.json b/types/deployjava/tsconfig.json similarity index 100% rename from deployjava/tsconfig.json rename to types/deployjava/tsconfig.json diff --git a/detect-browser/detect-browser-tests.ts b/types/detect-browser/detect-browser-tests.ts similarity index 100% rename from detect-browser/detect-browser-tests.ts rename to types/detect-browser/detect-browser-tests.ts diff --git a/detect-browser/index.d.ts b/types/detect-browser/index.d.ts similarity index 60% rename from detect-browser/index.d.ts rename to types/detect-browser/index.d.ts index 0f845cd781..57ed80c411 100644 --- a/detect-browser/index.d.ts +++ b/types/detect-browser/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for detect-browser v1.3.3 +// Type definitions for detect-browser v1.6.2 // Project: https://github.com/DamonOehlman/detect-browser // Definitions by: Rogier Schouten // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -6,7 +6,7 @@ /** * Browser name */ -export const name: string; +export const name: "edge" | "yandexbrowser" | "chrome" | "crios" | "firefox" | "opera" | "ie" | "bb10" | "android" | "ios" | "safari"; /** * Browser version diff --git a/detect-browser/tsconfig.json b/types/detect-browser/tsconfig.json similarity index 100% rename from detect-browser/tsconfig.json rename to types/detect-browser/tsconfig.json diff --git a/detect-indent/detect-indent-tests.ts b/types/detect-indent/detect-indent-tests.ts similarity index 100% rename from detect-indent/detect-indent-tests.ts rename to types/detect-indent/detect-indent-tests.ts diff --git a/detect-indent/index.d.ts b/types/detect-indent/index.d.ts similarity index 100% rename from detect-indent/index.d.ts rename to types/detect-indent/index.d.ts diff --git a/detect-indent/tsconfig.json b/types/detect-indent/tsconfig.json similarity index 100% rename from detect-indent/tsconfig.json rename to types/detect-indent/tsconfig.json diff --git a/devexpress-web/README.md b/types/devexpress-web/README.md similarity index 100% rename from devexpress-web/README.md rename to types/devexpress-web/README.md diff --git a/devexpress-web/devexpress-web-tests.ts b/types/devexpress-web/devexpress-web-tests.ts similarity index 100% rename from devexpress-web/devexpress-web-tests.ts rename to types/devexpress-web/devexpress-web-tests.ts diff --git a/devexpress-web/index.d.ts b/types/devexpress-web/index.d.ts similarity index 100% rename from devexpress-web/index.d.ts rename to types/devexpress-web/index.d.ts diff --git a/devexpress-web/tsconfig.json b/types/devexpress-web/tsconfig.json similarity index 100% rename from devexpress-web/tsconfig.json rename to types/devexpress-web/tsconfig.json diff --git a/devextreme/README.md b/types/devextreme/README.md similarity index 100% rename from devextreme/README.md rename to types/devextreme/README.md diff --git a/devextreme/devextreme-tests.ts b/types/devextreme/devextreme-tests.ts similarity index 100% rename from devextreme/devextreme-tests.ts rename to types/devextreme/devextreme-tests.ts diff --git a/devextreme/index.d.ts b/types/devextreme/index.d.ts similarity index 100% rename from devextreme/index.d.ts rename to types/devextreme/index.d.ts diff --git a/devextreme/tsconfig.json b/types/devextreme/tsconfig.json similarity index 100% rename from devextreme/tsconfig.json rename to types/devextreme/tsconfig.json diff --git a/devextreme/v15/devextreme-tests.ts b/types/devextreme/v15/devextreme-tests.ts similarity index 100% rename from devextreme/v15/devextreme-tests.ts rename to types/devextreme/v15/devextreme-tests.ts diff --git a/devextreme/v15/index.d.ts b/types/devextreme/v15/index.d.ts similarity index 100% rename from devextreme/v15/index.d.ts rename to types/devextreme/v15/index.d.ts diff --git a/devextreme/v15/tsconfig.json b/types/devextreme/v15/tsconfig.json similarity index 100% rename from devextreme/v15/tsconfig.json rename to types/devextreme/v15/tsconfig.json diff --git a/devtools-detect/devtools-detect-tests.ts b/types/devtools-detect/devtools-detect-tests.ts similarity index 100% rename from devtools-detect/devtools-detect-tests.ts rename to types/devtools-detect/devtools-detect-tests.ts diff --git a/devtools-detect/index.d.ts b/types/devtools-detect/index.d.ts similarity index 100% rename from devtools-detect/index.d.ts rename to types/devtools-detect/index.d.ts diff --git a/devtools-detect/tsconfig.json b/types/devtools-detect/tsconfig.json similarity index 100% rename from devtools-detect/tsconfig.json rename to types/devtools-detect/tsconfig.json diff --git a/df-visible/df-visible-tests.ts b/types/df-visible/df-visible-tests.ts similarity index 100% rename from df-visible/df-visible-tests.ts rename to types/df-visible/df-visible-tests.ts diff --git a/df-visible/index.d.ts b/types/df-visible/index.d.ts similarity index 100% rename from df-visible/index.d.ts rename to types/df-visible/index.d.ts diff --git a/df-visible/tsconfig.json b/types/df-visible/tsconfig.json similarity index 100% rename from df-visible/tsconfig.json rename to types/df-visible/tsconfig.json diff --git a/dhtmlxgantt/dhtmlxgantt-tests.ts b/types/dhtmlxgantt/dhtmlxgantt-tests.ts similarity index 100% rename from dhtmlxgantt/dhtmlxgantt-tests.ts rename to types/dhtmlxgantt/dhtmlxgantt-tests.ts diff --git a/dhtmlxgantt/index.d.ts b/types/dhtmlxgantt/index.d.ts similarity index 100% rename from dhtmlxgantt/index.d.ts rename to types/dhtmlxgantt/index.d.ts diff --git a/dhtmlxgantt/tsconfig.json b/types/dhtmlxgantt/tsconfig.json similarity index 100% rename from dhtmlxgantt/tsconfig.json rename to types/dhtmlxgantt/tsconfig.json diff --git a/dhtmlxscheduler/dhtmlxscheduler-tests.ts b/types/dhtmlxscheduler/dhtmlxscheduler-tests.ts similarity index 100% rename from dhtmlxscheduler/dhtmlxscheduler-tests.ts rename to types/dhtmlxscheduler/dhtmlxscheduler-tests.ts diff --git a/dhtmlxscheduler/index.d.ts b/types/dhtmlxscheduler/index.d.ts similarity index 100% rename from dhtmlxscheduler/index.d.ts rename to types/dhtmlxscheduler/index.d.ts diff --git a/dhtmlxscheduler/tsconfig.json b/types/dhtmlxscheduler/tsconfig.json similarity index 100% rename from dhtmlxscheduler/tsconfig.json rename to types/dhtmlxscheduler/tsconfig.json diff --git a/di-lite/di-lite-tests.ts b/types/di-lite/di-lite-tests.ts similarity index 100% rename from di-lite/di-lite-tests.ts rename to types/di-lite/di-lite-tests.ts diff --git a/di-lite/index.d.ts b/types/di-lite/index.d.ts similarity index 100% rename from di-lite/index.d.ts rename to types/di-lite/index.d.ts diff --git a/di-lite/tsconfig.json b/types/di-lite/tsconfig.json similarity index 100% rename from di-lite/tsconfig.json rename to types/di-lite/tsconfig.json diff --git a/diff-match-patch/diff-match-patch-tests.ts b/types/diff-match-patch/diff-match-patch-tests.ts similarity index 100% rename from diff-match-patch/diff-match-patch-tests.ts rename to types/diff-match-patch/diff-match-patch-tests.ts diff --git a/diff-match-patch/index.d.ts b/types/diff-match-patch/index.d.ts similarity index 100% rename from diff-match-patch/index.d.ts rename to types/diff-match-patch/index.d.ts diff --git a/diff-match-patch/tsconfig.json b/types/diff-match-patch/tsconfig.json similarity index 100% rename from diff-match-patch/tsconfig.json rename to types/diff-match-patch/tsconfig.json diff --git a/diff/diff-tests.ts b/types/diff/diff-tests.ts similarity index 100% rename from diff/diff-tests.ts rename to types/diff/diff-tests.ts diff --git a/diff/index.d.ts b/types/diff/index.d.ts similarity index 100% rename from diff/index.d.ts rename to types/diff/index.d.ts diff --git a/diff/tsconfig.json b/types/diff/tsconfig.json similarity index 100% rename from diff/tsconfig.json rename to types/diff/tsconfig.json diff --git a/diff2html/diff2html-tests.ts b/types/diff2html/diff2html-tests.ts similarity index 100% rename from diff2html/diff2html-tests.ts rename to types/diff2html/diff2html-tests.ts diff --git a/diff2html/index.d.ts b/types/diff2html/index.d.ts similarity index 100% rename from diff2html/index.d.ts rename to types/diff2html/index.d.ts diff --git a/diff2html/tsconfig.json b/types/diff2html/tsconfig.json similarity index 100% rename from diff2html/tsconfig.json rename to types/diff2html/tsconfig.json diff --git a/dir-resolve/dir-resolve-tests.ts b/types/dir-resolve/dir-resolve-tests.ts similarity index 100% rename from dir-resolve/dir-resolve-tests.ts rename to types/dir-resolve/dir-resolve-tests.ts diff --git a/dir-resolve/index.d.ts b/types/dir-resolve/index.d.ts similarity index 100% rename from dir-resolve/index.d.ts rename to types/dir-resolve/index.d.ts diff --git a/dir-resolve/tsconfig.json b/types/dir-resolve/tsconfig.json similarity index 100% rename from dir-resolve/tsconfig.json rename to types/dir-resolve/tsconfig.json diff --git a/dir-resolve/tslint.json b/types/dir-resolve/tslint.json similarity index 100% rename from dir-resolve/tslint.json rename to types/dir-resolve/tslint.json diff --git a/discontinuous-range/discontinuous-range-tests.ts b/types/discontinuous-range/discontinuous-range-tests.ts similarity index 100% rename from discontinuous-range/discontinuous-range-tests.ts rename to types/discontinuous-range/discontinuous-range-tests.ts diff --git a/discontinuous-range/index.d.ts b/types/discontinuous-range/index.d.ts similarity index 100% rename from discontinuous-range/index.d.ts rename to types/discontinuous-range/index.d.ts diff --git a/discontinuous-range/tsconfig.json b/types/discontinuous-range/tsconfig.json similarity index 100% rename from discontinuous-range/tsconfig.json rename to types/discontinuous-range/tsconfig.json diff --git a/discontinuous-range/tslint.json b/types/discontinuous-range/tslint.json similarity index 100% rename from discontinuous-range/tslint.json rename to types/discontinuous-range/tslint.json diff --git a/disposable-email-domains/disposable-email-domains-tests.ts b/types/disposable-email-domains/disposable-email-domains-tests.ts similarity index 100% rename from disposable-email-domains/disposable-email-domains-tests.ts rename to types/disposable-email-domains/disposable-email-domains-tests.ts diff --git a/disposable-email-domains/index.d.ts b/types/disposable-email-domains/index.d.ts similarity index 100% rename from disposable-email-domains/index.d.ts rename to types/disposable-email-domains/index.d.ts diff --git a/disposable-email-domains/tsconfig.json b/types/disposable-email-domains/tsconfig.json similarity index 100% rename from disposable-email-domains/tsconfig.json rename to types/disposable-email-domains/tsconfig.json diff --git a/doccookies/doccookies-tests.ts b/types/doccookies/doccookies-tests.ts similarity index 100% rename from doccookies/doccookies-tests.ts rename to types/doccookies/doccookies-tests.ts diff --git a/doccookies/index.d.ts b/types/doccookies/index.d.ts similarity index 100% rename from doccookies/index.d.ts rename to types/doccookies/index.d.ts diff --git a/doccookies/tsconfig.json b/types/doccookies/tsconfig.json similarity index 100% rename from doccookies/tsconfig.json rename to types/doccookies/tsconfig.json diff --git a/dock-spawn/dock-spawn-tests.ts b/types/dock-spawn/dock-spawn-tests.ts similarity index 100% rename from dock-spawn/dock-spawn-tests.ts rename to types/dock-spawn/dock-spawn-tests.ts diff --git a/dock-spawn/index.d.ts b/types/dock-spawn/index.d.ts similarity index 100% rename from dock-spawn/index.d.ts rename to types/dock-spawn/index.d.ts diff --git a/dock-spawn/tsconfig.json b/types/dock-spawn/tsconfig.json similarity index 100% rename from dock-spawn/tsconfig.json rename to types/dock-spawn/tsconfig.json diff --git a/dockerode/dockerode-tests.ts b/types/dockerode/dockerode-tests.ts similarity index 100% rename from dockerode/dockerode-tests.ts rename to types/dockerode/dockerode-tests.ts diff --git a/dockerode/index.d.ts b/types/dockerode/index.d.ts similarity index 100% rename from dockerode/index.d.ts rename to types/dockerode/index.d.ts diff --git a/dockerode/tsconfig.json b/types/dockerode/tsconfig.json similarity index 100% rename from dockerode/tsconfig.json rename to types/dockerode/tsconfig.json diff --git a/dockerode/tslint.json b/types/dockerode/tslint.json similarity index 100% rename from dockerode/tslint.json rename to types/dockerode/tslint.json diff --git a/docopt/docopt-tests.ts b/types/docopt/docopt-tests.ts similarity index 100% rename from docopt/docopt-tests.ts rename to types/docopt/docopt-tests.ts diff --git a/docopt/index.d.ts b/types/docopt/index.d.ts similarity index 100% rename from docopt/index.d.ts rename to types/docopt/index.d.ts diff --git a/docopt/tsconfig.json b/types/docopt/tsconfig.json similarity index 100% rename from docopt/tsconfig.json rename to types/docopt/tsconfig.json diff --git a/doctrine/doctrine-tests.ts b/types/doctrine/doctrine-tests.ts similarity index 100% rename from doctrine/doctrine-tests.ts rename to types/doctrine/doctrine-tests.ts diff --git a/doctrine/index.d.ts b/types/doctrine/index.d.ts similarity index 100% rename from doctrine/index.d.ts rename to types/doctrine/index.d.ts diff --git a/doctrine/tsconfig.json b/types/doctrine/tsconfig.json similarity index 100% rename from doctrine/tsconfig.json rename to types/doctrine/tsconfig.json diff --git a/documentdb-server/documentdb-server-tests.ts b/types/documentdb-server/documentdb-server-tests.ts similarity index 100% rename from documentdb-server/documentdb-server-tests.ts rename to types/documentdb-server/documentdb-server-tests.ts diff --git a/documentdb-server/index.d.ts b/types/documentdb-server/index.d.ts similarity index 100% rename from documentdb-server/index.d.ts rename to types/documentdb-server/index.d.ts diff --git a/documentdb-server/tsconfig.json b/types/documentdb-server/tsconfig.json similarity index 100% rename from documentdb-server/tsconfig.json rename to types/documentdb-server/tsconfig.json diff --git a/documentdb/documentdb-tests.ts b/types/documentdb/documentdb-tests.ts similarity index 100% rename from documentdb/documentdb-tests.ts rename to types/documentdb/documentdb-tests.ts diff --git a/documentdb/index.d.ts b/types/documentdb/index.d.ts similarity index 100% rename from documentdb/index.d.ts rename to types/documentdb/index.d.ts diff --git a/documentdb/tsconfig.json b/types/documentdb/tsconfig.json similarity index 100% rename from documentdb/tsconfig.json rename to types/documentdb/tsconfig.json diff --git a/dojo/README.md b/types/dojo/README.md similarity index 100% rename from dojo/README.md rename to types/dojo/README.md diff --git a/dojo/dijit.d.ts b/types/dojo/dijit.d.ts similarity index 100% rename from dojo/dijit.d.ts rename to types/dojo/dijit.d.ts diff --git a/dojo/doh.d.ts b/types/dojo/doh.d.ts similarity index 100% rename from dojo/doh.d.ts rename to types/dojo/doh.d.ts diff --git a/dojo/dojox.NodeList.d.ts b/types/dojo/dojox.NodeList.d.ts similarity index 100% rename from dojo/dojox.NodeList.d.ts rename to types/dojo/dojox.NodeList.d.ts diff --git a/dojo/dojox.analytics.d.ts b/types/dojo/dojox.analytics.d.ts similarity index 100% rename from dojo/dojox.analytics.d.ts rename to types/dojo/dojox.analytics.d.ts diff --git a/dojo/dojox.app.d.ts b/types/dojo/dojox.app.d.ts similarity index 100% rename from dojo/dojox.app.d.ts rename to types/dojo/dojox.app.d.ts diff --git a/dojo/dojox.atom.d.ts b/types/dojo/dojox.atom.d.ts similarity index 100% rename from dojo/dojox.atom.d.ts rename to types/dojo/dojox.atom.d.ts diff --git a/dojo/dojox.av.d.ts b/types/dojo/dojox.av.d.ts similarity index 100% rename from dojo/dojox.av.d.ts rename to types/dojo/dojox.av.d.ts diff --git a/dojo/dojox.calc.d.ts b/types/dojo/dojox.calc.d.ts similarity index 100% rename from dojo/dojox.calc.d.ts rename to types/dojo/dojox.calc.d.ts diff --git a/dojo/dojox.calendar.d.ts b/types/dojo/dojox.calendar.d.ts similarity index 100% rename from dojo/dojox.calendar.d.ts rename to types/dojo/dojox.calendar.d.ts diff --git a/dojo/dojox.charting.d.ts b/types/dojo/dojox.charting.d.ts similarity index 100% rename from dojo/dojox.charting.d.ts rename to types/dojo/dojox.charting.d.ts diff --git a/dojo/dojox.collections.d.ts b/types/dojo/dojox.collections.d.ts similarity index 100% rename from dojo/dojox.collections.d.ts rename to types/dojo/dojox.collections.d.ts diff --git a/dojo/dojox.color.d.ts b/types/dojo/dojox.color.d.ts similarity index 100% rename from dojo/dojox.color.d.ts rename to types/dojo/dojox.color.d.ts diff --git a/dojo/dojox.css3.d.ts b/types/dojo/dojox.css3.d.ts similarity index 100% rename from dojo/dojox.css3.d.ts rename to types/dojo/dojox.css3.d.ts diff --git a/dojo/dojox.data.d.ts b/types/dojo/dojox.data.d.ts similarity index 100% rename from dojo/dojox.data.d.ts rename to types/dojo/dojox.data.d.ts diff --git a/dojo/dojox.date.d.ts b/types/dojo/dojox.date.d.ts similarity index 100% rename from dojo/dojox.date.d.ts rename to types/dojo/dojox.date.d.ts diff --git a/dojo/dojox.dgauges.d.ts b/types/dojo/dojox.dgauges.d.ts similarity index 100% rename from dojo/dojox.dgauges.d.ts rename to types/dojo/dojox.dgauges.d.ts diff --git a/dojo/dojox.dnd.d.ts b/types/dojo/dojox.dnd.d.ts similarity index 100% rename from dojo/dojox.dnd.d.ts rename to types/dojo/dojox.dnd.d.ts diff --git a/dojo/dojox.drawing.d.ts b/types/dojo/dojox.drawing.d.ts similarity index 100% rename from dojo/dojox.drawing.d.ts rename to types/dojo/dojox.drawing.d.ts diff --git a/dojo/dojox.dtl.d.ts b/types/dojo/dojox.dtl.d.ts similarity index 100% rename from dojo/dojox.dtl.d.ts rename to types/dojo/dojox.dtl.d.ts diff --git a/dojo/dojox.editor.d.ts b/types/dojo/dojox.editor.d.ts similarity index 100% rename from dojo/dojox.editor.d.ts rename to types/dojo/dojox.editor.d.ts diff --git a/dojo/dojox.embed.d.ts b/types/dojo/dojox.embed.d.ts similarity index 100% rename from dojo/dojox.embed.d.ts rename to types/dojo/dojox.embed.d.ts diff --git a/dojo/dojox.encoding.d.ts b/types/dojo/dojox.encoding.d.ts similarity index 100% rename from dojo/dojox.encoding.d.ts rename to types/dojo/dojox.encoding.d.ts diff --git a/dojo/dojox.flash.d.ts b/types/dojo/dojox.flash.d.ts similarity index 100% rename from dojo/dojox.flash.d.ts rename to types/dojo/dojox.flash.d.ts diff --git a/dojo/dojox.form.d.ts b/types/dojo/dojox.form.d.ts similarity index 100% rename from dojo/dojox.form.d.ts rename to types/dojo/dojox.form.d.ts diff --git a/dojo/dojox.fx.d.ts b/types/dojo/dojox.fx.d.ts similarity index 100% rename from dojo/dojox.fx.d.ts rename to types/dojo/dojox.fx.d.ts diff --git a/dojo/dojox.gantt.d.ts b/types/dojo/dojox.gantt.d.ts similarity index 100% rename from dojo/dojox.gantt.d.ts rename to types/dojo/dojox.gantt.d.ts diff --git a/dojo/dojox.gauges.d.ts b/types/dojo/dojox.gauges.d.ts similarity index 100% rename from dojo/dojox.gauges.d.ts rename to types/dojo/dojox.gauges.d.ts diff --git a/dojo/dojox.geo.d.ts b/types/dojo/dojox.geo.d.ts similarity index 100% rename from dojo/dojox.geo.d.ts rename to types/dojo/dojox.geo.d.ts diff --git a/dojo/dojox.gesture.d.ts b/types/dojo/dojox.gesture.d.ts similarity index 100% rename from dojo/dojox.gesture.d.ts rename to types/dojo/dojox.gesture.d.ts diff --git a/dojo/dojox.gfx.d.ts b/types/dojo/dojox.gfx.d.ts similarity index 100% rename from dojo/dojox.gfx.d.ts rename to types/dojo/dojox.gfx.d.ts diff --git a/dojo/dojox.gfx3d.d.ts b/types/dojo/dojox.gfx3d.d.ts similarity index 100% rename from dojo/dojox.gfx3d.d.ts rename to types/dojo/dojox.gfx3d.d.ts diff --git a/dojo/dojox.grid.d.ts b/types/dojo/dojox.grid.d.ts similarity index 100% rename from dojo/dojox.grid.d.ts rename to types/dojo/dojox.grid.d.ts diff --git a/dojo/dojox.help.d.ts b/types/dojo/dojox.help.d.ts similarity index 100% rename from dojo/dojox.help.d.ts rename to types/dojo/dojox.help.d.ts diff --git a/dojo/dojox.highlight.d.ts b/types/dojo/dojox.highlight.d.ts similarity index 100% rename from dojo/dojox.highlight.d.ts rename to types/dojo/dojox.highlight.d.ts diff --git a/dojo/dojox.html.d.ts b/types/dojo/dojox.html.d.ts similarity index 100% rename from dojo/dojox.html.d.ts rename to types/dojo/dojox.html.d.ts diff --git a/dojo/dojox.image.d.ts b/types/dojo/dojox.image.d.ts similarity index 100% rename from dojo/dojox.image.d.ts rename to types/dojo/dojox.image.d.ts diff --git a/dojo/dojox.io.d.ts b/types/dojo/dojox.io.d.ts similarity index 100% rename from dojo/dojox.io.d.ts rename to types/dojo/dojox.io.d.ts diff --git a/dojo/dojox.jq.d.ts b/types/dojo/dojox.jq.d.ts similarity index 100% rename from dojo/dojox.jq.d.ts rename to types/dojo/dojox.jq.d.ts diff --git a/dojo/dojox.json.d.ts b/types/dojo/dojox.json.d.ts similarity index 100% rename from dojo/dojox.json.d.ts rename to types/dojo/dojox.json.d.ts diff --git a/dojo/dojox.jsonPath.d.ts b/types/dojo/dojox.jsonPath.d.ts similarity index 100% rename from dojo/dojox.jsonPath.d.ts rename to types/dojo/dojox.jsonPath.d.ts diff --git a/dojo/dojox.lang.d.ts b/types/dojo/dojox.lang.d.ts similarity index 100% rename from dojo/dojox.lang.d.ts rename to types/dojo/dojox.lang.d.ts diff --git a/dojo/dojox.layout.d.ts b/types/dojo/dojox.layout.d.ts similarity index 100% rename from dojo/dojox.layout.d.ts rename to types/dojo/dojox.layout.d.ts diff --git a/dojo/dojox.main.d.ts b/types/dojo/dojox.main.d.ts similarity index 100% rename from dojo/dojox.main.d.ts rename to types/dojo/dojox.main.d.ts diff --git a/dojo/dojox.math.d.ts b/types/dojo/dojox.math.d.ts similarity index 100% rename from dojo/dojox.math.d.ts rename to types/dojo/dojox.math.d.ts diff --git a/dojo/dojox.mdnd.d.ts b/types/dojo/dojox.mdnd.d.ts similarity index 100% rename from dojo/dojox.mdnd.d.ts rename to types/dojo/dojox.mdnd.d.ts diff --git a/dojo/dojox.mobile.d.ts b/types/dojo/dojox.mobile.d.ts similarity index 100% rename from dojo/dojox.mobile.d.ts rename to types/dojo/dojox.mobile.d.ts diff --git a/dojo/dojox.mvc.d.ts b/types/dojo/dojox.mvc.d.ts similarity index 100% rename from dojo/dojox.mvc.d.ts rename to types/dojo/dojox.mvc.d.ts diff --git a/dojo/dojox.rails.d.ts b/types/dojo/dojox.rails.d.ts similarity index 100% rename from dojo/dojox.rails.d.ts rename to types/dojo/dojox.rails.d.ts diff --git a/dojo/dojox.robot.d.ts b/types/dojo/dojox.robot.d.ts similarity index 100% rename from dojo/dojox.robot.d.ts rename to types/dojo/dojox.robot.d.ts diff --git a/dojo/dojox.rpc.d.ts b/types/dojo/dojox.rpc.d.ts similarity index 100% rename from dojo/dojox.rpc.d.ts rename to types/dojo/dojox.rpc.d.ts diff --git a/dojo/dojox.secure.d.ts b/types/dojo/dojox.secure.d.ts similarity index 100% rename from dojo/dojox.secure.d.ts rename to types/dojo/dojox.secure.d.ts diff --git a/dojo/dojox.sketch.d.ts b/types/dojo/dojox.sketch.d.ts similarity index 100% rename from dojo/dojox.sketch.d.ts rename to types/dojo/dojox.sketch.d.ts diff --git a/dojo/dojox.socket.d.ts b/types/dojo/dojox.socket.d.ts similarity index 100% rename from dojo/dojox.socket.d.ts rename to types/dojo/dojox.socket.d.ts diff --git a/dojo/dojox.sql.d.ts b/types/dojo/dojox.sql.d.ts similarity index 100% rename from dojo/dojox.sql.d.ts rename to types/dojo/dojox.sql.d.ts diff --git a/dojo/dojox.storage.d.ts b/types/dojo/dojox.storage.d.ts similarity index 100% rename from dojo/dojox.storage.d.ts rename to types/dojo/dojox.storage.d.ts diff --git a/dojo/dojox.string.d.ts b/types/dojo/dojox.string.d.ts similarity index 100% rename from dojo/dojox.string.d.ts rename to types/dojo/dojox.string.d.ts diff --git a/dojo/dojox.testing.d.ts b/types/dojo/dojox.testing.d.ts similarity index 100% rename from dojo/dojox.testing.d.ts rename to types/dojo/dojox.testing.d.ts diff --git a/dojo/dojox.timing.d.ts b/types/dojo/dojox.timing.d.ts similarity index 100% rename from dojo/dojox.timing.d.ts rename to types/dojo/dojox.timing.d.ts diff --git a/dojo/dojox.treemap.d.ts b/types/dojo/dojox.treemap.d.ts similarity index 100% rename from dojo/dojox.treemap.d.ts rename to types/dojo/dojox.treemap.d.ts diff --git a/dojo/dojox.uuid.d.ts b/types/dojo/dojox.uuid.d.ts similarity index 100% rename from dojo/dojox.uuid.d.ts rename to types/dojo/dojox.uuid.d.ts diff --git a/dojo/dojox.validate.d.ts b/types/dojo/dojox.validate.d.ts similarity index 100% rename from dojo/dojox.validate.d.ts rename to types/dojo/dojox.validate.d.ts diff --git a/dojo/dojox.widget.d.ts b/types/dojo/dojox.widget.d.ts similarity index 100% rename from dojo/dojox.widget.d.ts rename to types/dojo/dojox.widget.d.ts diff --git a/dojo/dojox.xml.d.ts b/types/dojo/dojox.xml.d.ts similarity index 100% rename from dojo/dojox.xml.d.ts rename to types/dojo/dojox.xml.d.ts diff --git a/dojo/index.d.ts b/types/dojo/index.d.ts similarity index 100% rename from dojo/index.d.ts rename to types/dojo/index.d.ts diff --git a/dojo/tsconfig.json b/types/dojo/tsconfig.json similarity index 100% rename from dojo/tsconfig.json rename to types/dojo/tsconfig.json diff --git a/dom4/dom4-tests.ts b/types/dom4/dom4-tests.ts similarity index 100% rename from dom4/dom4-tests.ts rename to types/dom4/dom4-tests.ts diff --git a/dom4/index.d.ts b/types/dom4/index.d.ts similarity index 100% rename from dom4/index.d.ts rename to types/dom4/index.d.ts diff --git a/dom4/tsconfig.json b/types/dom4/tsconfig.json similarity index 100% rename from dom4/tsconfig.json rename to types/dom4/tsconfig.json diff --git a/domo/domo-tests.ts b/types/domo/domo-tests.ts similarity index 100% rename from domo/domo-tests.ts rename to types/domo/domo-tests.ts diff --git a/domo/index.d.ts b/types/domo/index.d.ts similarity index 100% rename from domo/index.d.ts rename to types/domo/index.d.ts diff --git a/domo/tsconfig.json b/types/domo/tsconfig.json similarity index 100% rename from domo/tsconfig.json rename to types/domo/tsconfig.json diff --git a/dompurify/dompurify-tests.ts b/types/dompurify/dompurify-tests.ts similarity index 100% rename from dompurify/dompurify-tests.ts rename to types/dompurify/dompurify-tests.ts diff --git a/dompurify/index.d.ts b/types/dompurify/index.d.ts similarity index 100% rename from dompurify/index.d.ts rename to types/dompurify/index.d.ts diff --git a/dompurify/tsconfig.json b/types/dompurify/tsconfig.json similarity index 100% rename from dompurify/tsconfig.json rename to types/dompurify/tsconfig.json diff --git a/domready/domready-tests.ts b/types/domready/domready-tests.ts similarity index 100% rename from domready/domready-tests.ts rename to types/domready/domready-tests.ts diff --git a/domready/index.d.ts b/types/domready/index.d.ts similarity index 100% rename from domready/index.d.ts rename to types/domready/index.d.ts diff --git a/domready/tsconfig.json b/types/domready/tsconfig.json similarity index 100% rename from domready/tsconfig.json rename to types/domready/tsconfig.json diff --git a/domurl/domurl-tests.ts b/types/domurl/domurl-tests.ts similarity index 100% rename from domurl/domurl-tests.ts rename to types/domurl/domurl-tests.ts diff --git a/domurl/index.d.ts b/types/domurl/index.d.ts similarity index 100% rename from domurl/index.d.ts rename to types/domurl/index.d.ts diff --git a/domurl/tsconfig.json b/types/domurl/tsconfig.json similarity index 100% rename from domurl/tsconfig.json rename to types/domurl/tsconfig.json diff --git a/donna/donna-tests.ts b/types/donna/donna-tests.ts similarity index 100% rename from donna/donna-tests.ts rename to types/donna/donna-tests.ts diff --git a/donna/index.d.ts b/types/donna/index.d.ts similarity index 100% rename from donna/index.d.ts rename to types/donna/index.d.ts diff --git a/donna/tsconfig.json b/types/donna/tsconfig.json similarity index 100% rename from donna/tsconfig.json rename to types/donna/tsconfig.json diff --git a/dookie/dookie-tests.ts b/types/dookie/dookie-tests.ts similarity index 71% rename from dookie/dookie-tests.ts rename to types/dookie/dookie-tests.ts index 44cd6ec7ac..476538b8de 100644 --- a/dookie/dookie-tests.ts +++ b/types/dookie/dookie-tests.ts @@ -1,8 +1,5 @@ - -import {push, pull} from './index'; +import {push, pull} from 'dookie'; (async () => { - await push('mongodb://localhost:27017/test', {test: [{ok: 1}, {ok: 2}]}); - })(); diff --git a/dookie/index.d.ts b/types/dookie/index.d.ts similarity index 100% rename from dookie/index.d.ts rename to types/dookie/index.d.ts diff --git a/dookie/tsconfig.json b/types/dookie/tsconfig.json similarity index 100% rename from dookie/tsconfig.json rename to types/dookie/tsconfig.json diff --git a/dookie/tslint.json b/types/dookie/tslint.json similarity index 100% rename from dookie/tslint.json rename to types/dookie/tslint.json diff --git a/dot-object/dot-object-tests.ts b/types/dot-object/dot-object-tests.ts similarity index 100% rename from dot-object/dot-object-tests.ts rename to types/dot-object/dot-object-tests.ts diff --git a/dot-object/index.d.ts b/types/dot-object/index.d.ts similarity index 100% rename from dot-object/index.d.ts rename to types/dot-object/index.d.ts diff --git a/dot-object/tsconfig.json b/types/dot-object/tsconfig.json similarity index 100% rename from dot-object/tsconfig.json rename to types/dot-object/tsconfig.json diff --git a/dot-prop/dot-prop-tests.ts b/types/dot-prop/dot-prop-tests.ts similarity index 100% rename from dot-prop/dot-prop-tests.ts rename to types/dot-prop/dot-prop-tests.ts diff --git a/dot-prop/index.d.ts b/types/dot-prop/index.d.ts similarity index 100% rename from dot-prop/index.d.ts rename to types/dot-prop/index.d.ts diff --git a/dot-prop/tsconfig.json b/types/dot-prop/tsconfig.json similarity index 100% rename from dot-prop/tsconfig.json rename to types/dot-prop/tsconfig.json diff --git a/dot/dot-tests.ts b/types/dot/dot-tests.ts similarity index 100% rename from dot/dot-tests.ts rename to types/dot/dot-tests.ts diff --git a/dot/index.d.ts b/types/dot/index.d.ts similarity index 100% rename from dot/index.d.ts rename to types/dot/index.d.ts diff --git a/dot/tsconfig.json b/types/dot/tsconfig.json similarity index 100% rename from dot/tsconfig.json rename to types/dot/tsconfig.json diff --git a/dot/tslint.json b/types/dot/tslint.json similarity index 100% rename from dot/tslint.json rename to types/dot/tslint.json diff --git a/dotdotdot/dotdotdot-tests.ts b/types/dotdotdot/dotdotdot-tests.ts similarity index 100% rename from dotdotdot/dotdotdot-tests.ts rename to types/dotdotdot/dotdotdot-tests.ts diff --git a/dotdotdot/index.d.ts b/types/dotdotdot/index.d.ts similarity index 100% rename from dotdotdot/index.d.ts rename to types/dotdotdot/index.d.ts diff --git a/dotdotdot/tsconfig.json b/types/dotdotdot/tsconfig.json similarity index 100% rename from dotdotdot/tsconfig.json rename to types/dotdotdot/tsconfig.json diff --git a/dotenv/dotenv-tests.ts b/types/dotenv/dotenv-tests.ts similarity index 100% rename from dotenv/dotenv-tests.ts rename to types/dotenv/dotenv-tests.ts diff --git a/dotenv/index.d.ts b/types/dotenv/index.d.ts similarity index 100% rename from dotenv/index.d.ts rename to types/dotenv/index.d.ts diff --git a/dotenv/tsconfig.json b/types/dotenv/tsconfig.json similarity index 100% rename from dotenv/tsconfig.json rename to types/dotenv/tsconfig.json diff --git a/dotenv/tslint.json b/types/dotenv/tslint.json similarity index 100% rename from dotenv/tslint.json rename to types/dotenv/tslint.json diff --git a/doublearray/doublearray-tests.ts b/types/doublearray/doublearray-tests.ts similarity index 100% rename from doublearray/doublearray-tests.ts rename to types/doublearray/doublearray-tests.ts diff --git a/doublearray/index.d.ts b/types/doublearray/index.d.ts similarity index 100% rename from doublearray/index.d.ts rename to types/doublearray/index.d.ts diff --git a/doublearray/tsconfig.json b/types/doublearray/tsconfig.json similarity index 100% rename from doublearray/tsconfig.json rename to types/doublearray/tsconfig.json diff --git a/doubleclick-gpt/doubleclick-gpt-tests.ts b/types/doubleclick-gpt/doubleclick-gpt-tests.ts similarity index 100% rename from doubleclick-gpt/doubleclick-gpt-tests.ts rename to types/doubleclick-gpt/doubleclick-gpt-tests.ts diff --git a/doubleclick-gpt/index.d.ts b/types/doubleclick-gpt/index.d.ts similarity index 100% rename from doubleclick-gpt/index.d.ts rename to types/doubleclick-gpt/index.d.ts diff --git a/doubleclick-gpt/tsconfig.json b/types/doubleclick-gpt/tsconfig.json similarity index 100% rename from doubleclick-gpt/tsconfig.json rename to types/doubleclick-gpt/tsconfig.json diff --git a/draft-js/draft-js-tests.tsx b/types/draft-js/draft-js-tests.tsx similarity index 100% rename from draft-js/draft-js-tests.tsx rename to types/draft-js/draft-js-tests.tsx diff --git a/draft-js/index.d.ts b/types/draft-js/index.d.ts similarity index 100% rename from draft-js/index.d.ts rename to types/draft-js/index.d.ts diff --git a/draft-js/package.json b/types/draft-js/package.json similarity index 100% rename from draft-js/package.json rename to types/draft-js/package.json diff --git a/draft-js/tsconfig.json b/types/draft-js/tsconfig.json similarity index 100% rename from draft-js/tsconfig.json rename to types/draft-js/tsconfig.json diff --git a/dragster/dragster-tests.ts b/types/dragster/dragster-tests.ts similarity index 100% rename from dragster/dragster-tests.ts rename to types/dragster/dragster-tests.ts diff --git a/dragster/index.d.ts b/types/dragster/index.d.ts similarity index 100% rename from dragster/index.d.ts rename to types/dragster/index.d.ts diff --git a/dragster/tsconfig.json b/types/dragster/tsconfig.json similarity index 100% rename from dragster/tsconfig.json rename to types/dragster/tsconfig.json diff --git a/dragster/tslint.json b/types/dragster/tslint.json similarity index 100% rename from dragster/tslint.json rename to types/dragster/tslint.json diff --git a/dragula/dragula-tests.ts b/types/dragula/dragula-tests.ts similarity index 100% rename from dragula/dragula-tests.ts rename to types/dragula/dragula-tests.ts diff --git a/dragula/index.d.ts b/types/dragula/index.d.ts similarity index 100% rename from dragula/index.d.ts rename to types/dragula/index.d.ts diff --git a/dragula/tsconfig.json b/types/dragula/tsconfig.json similarity index 100% rename from dragula/tsconfig.json rename to types/dragula/tsconfig.json diff --git a/dropboxjs/dropboxjs-tests.ts b/types/dropboxjs/dropboxjs-tests.ts similarity index 100% rename from dropboxjs/dropboxjs-tests.ts rename to types/dropboxjs/dropboxjs-tests.ts diff --git a/dropboxjs/index.d.ts b/types/dropboxjs/index.d.ts similarity index 100% rename from dropboxjs/index.d.ts rename to types/dropboxjs/index.d.ts diff --git a/dropboxjs/tsconfig.json b/types/dropboxjs/tsconfig.json similarity index 100% rename from dropboxjs/tsconfig.json rename to types/dropboxjs/tsconfig.json diff --git a/dropkickjs/dropkickjs-tests.ts b/types/dropkickjs/dropkickjs-tests.ts similarity index 100% rename from dropkickjs/dropkickjs-tests.ts rename to types/dropkickjs/dropkickjs-tests.ts diff --git a/dropkickjs/index.d.ts b/types/dropkickjs/index.d.ts similarity index 100% rename from dropkickjs/index.d.ts rename to types/dropkickjs/index.d.ts diff --git a/dropkickjs/tsconfig.json b/types/dropkickjs/tsconfig.json similarity index 100% rename from dropkickjs/tsconfig.json rename to types/dropkickjs/tsconfig.json diff --git a/dropkickjs/tslint.json b/types/dropkickjs/tslint.json similarity index 100% rename from dropkickjs/tslint.json rename to types/dropkickjs/tslint.json diff --git a/dropzone/dropzone-tests.ts b/types/dropzone/dropzone-tests.ts old mode 100755 new mode 100644 similarity index 100% rename from dropzone/dropzone-tests.ts rename to types/dropzone/dropzone-tests.ts diff --git a/dropzone/index.d.ts b/types/dropzone/index.d.ts old mode 100755 new mode 100644 similarity index 100% rename from dropzone/index.d.ts rename to types/dropzone/index.d.ts diff --git a/dropzone/tsconfig.json b/types/dropzone/tsconfig.json similarity index 100% rename from dropzone/tsconfig.json rename to types/dropzone/tsconfig.json diff --git a/dsv/dsv-tests.ts b/types/dsv/dsv-tests.ts similarity index 100% rename from dsv/dsv-tests.ts rename to types/dsv/dsv-tests.ts diff --git a/dsv/index.d.ts b/types/dsv/index.d.ts similarity index 100% rename from dsv/index.d.ts rename to types/dsv/index.d.ts diff --git a/dsv/tsconfig.json b/types/dsv/tsconfig.json similarity index 100% rename from dsv/tsconfig.json rename to types/dsv/tsconfig.json diff --git a/dts-bundle/dts-bundle-tests.ts b/types/dts-bundle/dts-bundle-tests.ts similarity index 100% rename from dts-bundle/dts-bundle-tests.ts rename to types/dts-bundle/dts-bundle-tests.ts diff --git a/dts-bundle/index.d.ts b/types/dts-bundle/index.d.ts similarity index 100% rename from dts-bundle/index.d.ts rename to types/dts-bundle/index.d.ts diff --git a/dts-bundle/tsconfig.json b/types/dts-bundle/tsconfig.json similarity index 100% rename from dts-bundle/tsconfig.json rename to types/dts-bundle/tsconfig.json diff --git a/duplexer2/duplexer2-tests.ts b/types/duplexer2/duplexer2-tests.ts similarity index 100% rename from duplexer2/duplexer2-tests.ts rename to types/duplexer2/duplexer2-tests.ts diff --git a/duplexer2/index.d.ts b/types/duplexer2/index.d.ts similarity index 100% rename from duplexer2/index.d.ts rename to types/duplexer2/index.d.ts diff --git a/duplexer2/tsconfig.json b/types/duplexer2/tsconfig.json similarity index 100% rename from duplexer2/tsconfig.json rename to types/duplexer2/tsconfig.json diff --git a/duplexer2/tslint.json b/types/duplexer2/tslint.json similarity index 100% rename from duplexer2/tslint.json rename to types/duplexer2/tslint.json diff --git a/durandal/index.d.ts b/types/durandal/index.d.ts similarity index 100% rename from durandal/index.d.ts rename to types/durandal/index.d.ts diff --git a/durandal/tsconfig.json b/types/durandal/tsconfig.json similarity index 100% rename from durandal/tsconfig.json rename to types/durandal/tsconfig.json diff --git a/durandal/v1/index.d.ts b/types/durandal/v1/index.d.ts similarity index 100% rename from durandal/v1/index.d.ts rename to types/durandal/v1/index.d.ts diff --git a/durandal/v1/tsconfig.json b/types/durandal/v1/tsconfig.json similarity index 100% rename from durandal/v1/tsconfig.json rename to types/durandal/v1/tsconfig.json diff --git a/dustjs-linkedin/dustjs-linkedin-tests.ts b/types/dustjs-linkedin/dustjs-linkedin-tests.ts similarity index 100% rename from dustjs-linkedin/dustjs-linkedin-tests.ts rename to types/dustjs-linkedin/dustjs-linkedin-tests.ts diff --git a/dustjs-linkedin/index.d.ts b/types/dustjs-linkedin/index.d.ts similarity index 100% rename from dustjs-linkedin/index.d.ts rename to types/dustjs-linkedin/index.d.ts diff --git a/dustjs-linkedin/tsconfig.json b/types/dustjs-linkedin/tsconfig.json similarity index 100% rename from dustjs-linkedin/tsconfig.json rename to types/dustjs-linkedin/tsconfig.json diff --git a/dw-bxslider-4/dw-bxslider-4-tests.ts b/types/dw-bxslider-4/dw-bxslider-4-tests.ts similarity index 100% rename from dw-bxslider-4/dw-bxslider-4-tests.ts rename to types/dw-bxslider-4/dw-bxslider-4-tests.ts diff --git a/dw-bxslider-4/index.d.ts b/types/dw-bxslider-4/index.d.ts similarity index 100% rename from dw-bxslider-4/index.d.ts rename to types/dw-bxslider-4/index.d.ts diff --git a/dw-bxslider-4/tsconfig.json b/types/dw-bxslider-4/tsconfig.json similarity index 100% rename from dw-bxslider-4/tsconfig.json rename to types/dw-bxslider-4/tsconfig.json diff --git a/dygraphs/dygraphs-tests.ts b/types/dygraphs/dygraphs-tests.ts similarity index 100% rename from dygraphs/dygraphs-tests.ts rename to types/dygraphs/dygraphs-tests.ts diff --git a/dygraphs/index.d.ts b/types/dygraphs/index.d.ts similarity index 100% rename from dygraphs/index.d.ts rename to types/dygraphs/index.d.ts diff --git a/dygraphs/tsconfig.json b/types/dygraphs/tsconfig.json similarity index 100% rename from dygraphs/tsconfig.json rename to types/dygraphs/tsconfig.json diff --git a/dymo-label-framework/dymo-label-framework-tests.ts b/types/dymo-label-framework/dymo-label-framework-tests.ts similarity index 100% rename from dymo-label-framework/dymo-label-framework-tests.ts rename to types/dymo-label-framework/dymo-label-framework-tests.ts diff --git a/dymo-label-framework/index.d.ts b/types/dymo-label-framework/index.d.ts similarity index 100% rename from dymo-label-framework/index.d.ts rename to types/dymo-label-framework/index.d.ts diff --git a/dymo-label-framework/tsconfig.json b/types/dymo-label-framework/tsconfig.json similarity index 100% rename from dymo-label-framework/tsconfig.json rename to types/dymo-label-framework/tsconfig.json diff --git a/dynatable/dynatable-tests.ts b/types/dynatable/dynatable-tests.ts similarity index 100% rename from dynatable/dynatable-tests.ts rename to types/dynatable/dynatable-tests.ts diff --git a/dynatable/index.d.ts b/types/dynatable/index.d.ts similarity index 100% rename from dynatable/index.d.ts rename to types/dynatable/index.d.ts diff --git a/dynatable/tsconfig.json b/types/dynatable/tsconfig.json similarity index 100% rename from dynatable/tsconfig.json rename to types/dynatable/tsconfig.json diff --git a/each/each-tests.ts b/types/each/each-tests.ts similarity index 100% rename from each/each-tests.ts rename to types/each/each-tests.ts diff --git a/each/index.d.ts b/types/each/index.d.ts similarity index 100% rename from each/index.d.ts rename to types/each/index.d.ts diff --git a/each/tsconfig.json b/types/each/tsconfig.json similarity index 100% rename from each/tsconfig.json rename to types/each/tsconfig.json diff --git a/easeljs/easeljs-tests.ts b/types/easeljs/easeljs-tests.ts similarity index 100% rename from easeljs/easeljs-tests.ts rename to types/easeljs/easeljs-tests.ts diff --git a/easeljs/index.d.ts b/types/easeljs/index.d.ts similarity index 100% rename from easeljs/index.d.ts rename to types/easeljs/index.d.ts diff --git a/easeljs/tsconfig.json b/types/easeljs/tsconfig.json similarity index 100% rename from easeljs/tsconfig.json rename to types/easeljs/tsconfig.json diff --git a/easy-api-request/easy-api-request-tests.ts b/types/easy-api-request/easy-api-request-tests.ts similarity index 100% rename from easy-api-request/easy-api-request-tests.ts rename to types/easy-api-request/easy-api-request-tests.ts diff --git a/easy-api-request/index.d.ts b/types/easy-api-request/index.d.ts similarity index 100% rename from easy-api-request/index.d.ts rename to types/easy-api-request/index.d.ts diff --git a/easy-api-request/tsconfig.json b/types/easy-api-request/tsconfig.json similarity index 100% rename from easy-api-request/tsconfig.json rename to types/easy-api-request/tsconfig.json diff --git a/easy-jsend/easy-jsend-tests.ts b/types/easy-jsend/easy-jsend-tests.ts similarity index 100% rename from easy-jsend/easy-jsend-tests.ts rename to types/easy-jsend/easy-jsend-tests.ts diff --git a/easy-jsend/index.d.ts b/types/easy-jsend/index.d.ts similarity index 100% rename from easy-jsend/index.d.ts rename to types/easy-jsend/index.d.ts diff --git a/easy-jsend/tsconfig.json b/types/easy-jsend/tsconfig.json similarity index 100% rename from easy-jsend/tsconfig.json rename to types/easy-jsend/tsconfig.json diff --git a/easy-session/easy-session-tests.ts b/types/easy-session/easy-session-tests.ts similarity index 100% rename from easy-session/easy-session-tests.ts rename to types/easy-session/easy-session-tests.ts diff --git a/easy-session/index.d.ts b/types/easy-session/index.d.ts similarity index 100% rename from easy-session/index.d.ts rename to types/easy-session/index.d.ts diff --git a/easy-session/tsconfig.json b/types/easy-session/tsconfig.json similarity index 100% rename from easy-session/tsconfig.json rename to types/easy-session/tsconfig.json diff --git a/easy-table/easy-table-tests.ts b/types/easy-table/easy-table-tests.ts similarity index 100% rename from easy-table/easy-table-tests.ts rename to types/easy-table/easy-table-tests.ts diff --git a/easy-table/index.d.ts b/types/easy-table/index.d.ts similarity index 100% rename from easy-table/index.d.ts rename to types/easy-table/index.d.ts diff --git a/easy-table/tsconfig.json b/types/easy-table/tsconfig.json similarity index 100% rename from easy-table/tsconfig.json rename to types/easy-table/tsconfig.json diff --git a/easy-x-headers/easy-x-headers-tests.ts b/types/easy-x-headers/easy-x-headers-tests.ts similarity index 100% rename from easy-x-headers/easy-x-headers-tests.ts rename to types/easy-x-headers/easy-x-headers-tests.ts diff --git a/easy-x-headers/index.d.ts b/types/easy-x-headers/index.d.ts similarity index 100% rename from easy-x-headers/index.d.ts rename to types/easy-x-headers/index.d.ts diff --git a/easy-x-headers/tsconfig.json b/types/easy-x-headers/tsconfig.json similarity index 100% rename from easy-x-headers/tsconfig.json rename to types/easy-x-headers/tsconfig.json diff --git a/easy-xapi-supertest/easy-xapi-supertest-tests.ts b/types/easy-xapi-supertest/easy-xapi-supertest-tests.ts similarity index 100% rename from easy-xapi-supertest/easy-xapi-supertest-tests.ts rename to types/easy-xapi-supertest/easy-xapi-supertest-tests.ts diff --git a/easy-xapi-supertest/index.d.ts b/types/easy-xapi-supertest/index.d.ts similarity index 100% rename from easy-xapi-supertest/index.d.ts rename to types/easy-xapi-supertest/index.d.ts diff --git a/easy-xapi-supertest/tsconfig.json b/types/easy-xapi-supertest/tsconfig.json similarity index 100% rename from easy-xapi-supertest/tsconfig.json rename to types/easy-xapi-supertest/tsconfig.json diff --git a/easy-xapi-utils/easy-xapi-utils-tests.ts b/types/easy-xapi-utils/easy-xapi-utils-tests.ts similarity index 100% rename from easy-xapi-utils/easy-xapi-utils-tests.ts rename to types/easy-xapi-utils/easy-xapi-utils-tests.ts diff --git a/easy-xapi-utils/index.d.ts b/types/easy-xapi-utils/index.d.ts similarity index 100% rename from easy-xapi-utils/index.d.ts rename to types/easy-xapi-utils/index.d.ts diff --git a/easy-xapi-utils/tsconfig.json b/types/easy-xapi-utils/tsconfig.json similarity index 100% rename from easy-xapi-utils/tsconfig.json rename to types/easy-xapi-utils/tsconfig.json diff --git a/easy-xapi/easy-xapi-tests.ts b/types/easy-xapi/easy-xapi-tests.ts similarity index 100% rename from easy-xapi/easy-xapi-tests.ts rename to types/easy-xapi/easy-xapi-tests.ts diff --git a/easy-xapi/index.d.ts b/types/easy-xapi/index.d.ts similarity index 100% rename from easy-xapi/index.d.ts rename to types/easy-xapi/index.d.ts diff --git a/easy-xapi/tsconfig.json b/types/easy-xapi/tsconfig.json similarity index 100% rename from easy-xapi/tsconfig.json rename to types/easy-xapi/tsconfig.json diff --git a/easystarjs/easystarjs-tests.ts b/types/easystarjs/easystarjs-tests.ts similarity index 100% rename from easystarjs/easystarjs-tests.ts rename to types/easystarjs/easystarjs-tests.ts diff --git a/easystarjs/index.d.ts b/types/easystarjs/index.d.ts similarity index 100% rename from easystarjs/index.d.ts rename to types/easystarjs/index.d.ts diff --git a/easystarjs/tsconfig.json b/types/easystarjs/tsconfig.json similarity index 100% rename from easystarjs/tsconfig.json rename to types/easystarjs/tsconfig.json diff --git a/echarts/index.d.ts b/types/echarts/index.d.ts similarity index 100% rename from echarts/index.d.ts rename to types/echarts/index.d.ts diff --git a/echarts/tsconfig.json b/types/echarts/tsconfig.json similarity index 100% rename from echarts/tsconfig.json rename to types/echarts/tsconfig.json diff --git a/ecurve/ecurve-tests.ts b/types/ecurve/ecurve-tests.ts similarity index 100% rename from ecurve/ecurve-tests.ts rename to types/ecurve/ecurve-tests.ts diff --git a/ecurve/index.d.ts b/types/ecurve/index.d.ts similarity index 100% rename from ecurve/index.d.ts rename to types/ecurve/index.d.ts diff --git a/ecurve/tsconfig.json b/types/ecurve/tsconfig.json similarity index 100% rename from ecurve/tsconfig.json rename to types/ecurve/tsconfig.json diff --git a/ecurve/tslint.json b/types/ecurve/tslint.json similarity index 100% rename from ecurve/tslint.json rename to types/ecurve/tslint.json diff --git a/egg.js/egg.js-tests.ts b/types/egg.js/egg.js-tests.ts similarity index 100% rename from egg.js/egg.js-tests.ts rename to types/egg.js/egg.js-tests.ts diff --git a/egg.js/index.d.ts b/types/egg.js/index.d.ts similarity index 100% rename from egg.js/index.d.ts rename to types/egg.js/index.d.ts diff --git a/egg.js/tsconfig.json b/types/egg.js/tsconfig.json similarity index 100% rename from egg.js/tsconfig.json rename to types/egg.js/tsconfig.json diff --git a/ej.web.all/ej.web.all-tests.ts b/types/ej.web.all/ej.web.all-tests.ts similarity index 100% rename from ej.web.all/ej.web.all-tests.ts rename to types/ej.web.all/ej.web.all-tests.ts diff --git a/ej.web.all/index.d.ts b/types/ej.web.all/index.d.ts similarity index 99% rename from ej.web.all/index.d.ts rename to types/ej.web.all/index.d.ts index b1c4261705..ca17c06c5a 100644 --- a/ej.web.all/index.d.ts +++ b/types/ej.web.all/index.d.ts @@ -65198,4 +65198,4 @@ data(key: "ejTreeMap"): ej.datavisualization.TreeMap; data(key: "ejTreeView"): ej.TreeView; data(key: "ejUploadbox"): ej.Uploadbox; data(key: "ejWaitingPopup"): ej.WaitingPopup; -} \ No newline at end of file +} diff --git a/ej.web.all/tsconfig.json b/types/ej.web.all/tsconfig.json similarity index 100% rename from ej.web.all/tsconfig.json rename to types/ej.web.all/tsconfig.json diff --git a/types/ej.web.all/tslint.json b/types/ej.web.all/tslint.json new file mode 100644 index 0000000000..845d9d8168 --- /dev/null +++ b/types/ej.web.all/tslint.json @@ -0,0 +1,9 @@ +{ + "extends": "../tslint.json", + "rules": { + "comment-format": false, + "no-consecutive-blank-lines": false, + "no-padding": false, + "no-redundant-modifiers": false + } +} diff --git a/ejs-locals/ejs-locals-tests.ts b/types/ejs-locals/ejs-locals-tests.ts similarity index 100% rename from ejs-locals/ejs-locals-tests.ts rename to types/ejs-locals/ejs-locals-tests.ts diff --git a/ejs-locals/index.d.ts b/types/ejs-locals/index.d.ts similarity index 100% rename from ejs-locals/index.d.ts rename to types/ejs-locals/index.d.ts diff --git a/ejs-locals/tsconfig.json b/types/ejs-locals/tsconfig.json similarity index 100% rename from ejs-locals/tsconfig.json rename to types/ejs-locals/tsconfig.json diff --git a/ejs/ejs-tests.ts b/types/ejs/ejs-tests.ts similarity index 100% rename from ejs/ejs-tests.ts rename to types/ejs/ejs-tests.ts diff --git a/ejs/index.d.ts b/types/ejs/index.d.ts similarity index 100% rename from ejs/index.d.ts rename to types/ejs/index.d.ts diff --git a/ejs/tsconfig.json b/types/ejs/tsconfig.json similarity index 100% rename from ejs/tsconfig.json rename to types/ejs/tsconfig.json diff --git a/ejson/ejson-tests.ts b/types/ejson/ejson-tests.ts similarity index 100% rename from ejson/ejson-tests.ts rename to types/ejson/ejson-tests.ts diff --git a/ejson/index.d.ts b/types/ejson/index.d.ts similarity index 100% rename from ejson/index.d.ts rename to types/ejson/index.d.ts diff --git a/ejson/tsconfig.json b/types/ejson/tsconfig.json similarity index 100% rename from ejson/tsconfig.json rename to types/ejson/tsconfig.json diff --git a/elastic.js/elastic.js-tests.ts b/types/elastic.js/elastic.js-tests.ts similarity index 100% rename from elastic.js/elastic.js-tests.ts rename to types/elastic.js/elastic.js-tests.ts diff --git a/elastic.js/index.d.ts b/types/elastic.js/index.d.ts similarity index 100% rename from elastic.js/index.d.ts rename to types/elastic.js/index.d.ts diff --git a/elastic.js/tsconfig.json b/types/elastic.js/tsconfig.json similarity index 100% rename from elastic.js/tsconfig.json rename to types/elastic.js/tsconfig.json diff --git a/elasticsearch/elasticsearch-tests.ts b/types/elasticsearch/elasticsearch-tests.ts similarity index 100% rename from elasticsearch/elasticsearch-tests.ts rename to types/elasticsearch/elasticsearch-tests.ts diff --git a/elasticsearch/index.d.ts b/types/elasticsearch/index.d.ts similarity index 100% rename from elasticsearch/index.d.ts rename to types/elasticsearch/index.d.ts diff --git a/elasticsearch/tsconfig.json b/types/elasticsearch/tsconfig.json similarity index 100% rename from elasticsearch/tsconfig.json rename to types/elasticsearch/tsconfig.json diff --git a/electron-builder/electron-builder-tests.ts b/types/electron-builder/electron-builder-tests.ts similarity index 100% rename from electron-builder/electron-builder-tests.ts rename to types/electron-builder/electron-builder-tests.ts diff --git a/electron-builder/index.d.ts b/types/electron-builder/index.d.ts similarity index 100% rename from electron-builder/index.d.ts rename to types/electron-builder/index.d.ts diff --git a/electron-builder/tsconfig.json b/types/electron-builder/tsconfig.json similarity index 100% rename from electron-builder/tsconfig.json rename to types/electron-builder/tsconfig.json diff --git a/electron-debug/electron-debug-tests.ts b/types/electron-debug/electron-debug-tests.ts similarity index 100% rename from electron-debug/electron-debug-tests.ts rename to types/electron-debug/electron-debug-tests.ts diff --git a/electron-debug/index.d.ts b/types/electron-debug/index.d.ts similarity index 100% rename from electron-debug/index.d.ts rename to types/electron-debug/index.d.ts diff --git a/electron-debug/tsconfig.json b/types/electron-debug/tsconfig.json similarity index 100% rename from electron-debug/tsconfig.json rename to types/electron-debug/tsconfig.json diff --git a/electron-devtools-installer/electron-devtools-installer-tests.ts b/types/electron-devtools-installer/electron-devtools-installer-tests.ts similarity index 100% rename from electron-devtools-installer/electron-devtools-installer-tests.ts rename to types/electron-devtools-installer/electron-devtools-installer-tests.ts diff --git a/electron-devtools-installer/index.d.ts b/types/electron-devtools-installer/index.d.ts similarity index 100% rename from electron-devtools-installer/index.d.ts rename to types/electron-devtools-installer/index.d.ts diff --git a/electron-devtools-installer/tsconfig.json b/types/electron-devtools-installer/tsconfig.json similarity index 100% rename from electron-devtools-installer/tsconfig.json rename to types/electron-devtools-installer/tsconfig.json diff --git a/electron-json-storage/electron-json-storage-tests.ts b/types/electron-json-storage/electron-json-storage-tests.ts similarity index 100% rename from electron-json-storage/electron-json-storage-tests.ts rename to types/electron-json-storage/electron-json-storage-tests.ts diff --git a/electron-json-storage/index.d.ts b/types/electron-json-storage/index.d.ts similarity index 100% rename from electron-json-storage/index.d.ts rename to types/electron-json-storage/index.d.ts diff --git a/electron-json-storage/tsconfig.json b/types/electron-json-storage/tsconfig.json similarity index 100% rename from electron-json-storage/tsconfig.json rename to types/electron-json-storage/tsconfig.json diff --git a/electron-notifications/electron-notifications-tests.ts b/types/electron-notifications/electron-notifications-tests.ts similarity index 100% rename from electron-notifications/electron-notifications-tests.ts rename to types/electron-notifications/electron-notifications-tests.ts diff --git a/electron-notifications/index.d.ts b/types/electron-notifications/index.d.ts similarity index 100% rename from electron-notifications/index.d.ts rename to types/electron-notifications/index.d.ts diff --git a/electron-notifications/tsconfig.json b/types/electron-notifications/tsconfig.json similarity index 100% rename from electron-notifications/tsconfig.json rename to types/electron-notifications/tsconfig.json diff --git a/electron-notify/electron-notify-tests.ts b/types/electron-notify/electron-notify-tests.ts similarity index 100% rename from electron-notify/electron-notify-tests.ts rename to types/electron-notify/electron-notify-tests.ts diff --git a/electron-notify/index.d.ts b/types/electron-notify/index.d.ts similarity index 100% rename from electron-notify/index.d.ts rename to types/electron-notify/index.d.ts diff --git a/electron-notify/tsconfig.json b/types/electron-notify/tsconfig.json similarity index 100% rename from electron-notify/tsconfig.json rename to types/electron-notify/tsconfig.json diff --git a/electron-packager/electron-packager-tests.ts b/types/electron-packager/electron-packager-tests.ts similarity index 100% rename from electron-packager/electron-packager-tests.ts rename to types/electron-packager/electron-packager-tests.ts diff --git a/electron-packager/index.d.ts b/types/electron-packager/index.d.ts similarity index 100% rename from electron-packager/index.d.ts rename to types/electron-packager/index.d.ts diff --git a/electron-packager/tsconfig.json b/types/electron-packager/tsconfig.json similarity index 100% rename from electron-packager/tsconfig.json rename to types/electron-packager/tsconfig.json diff --git a/electron-window-state/electron-window-state-tests.ts b/types/electron-window-state/electron-window-state-tests.ts similarity index 100% rename from electron-window-state/electron-window-state-tests.ts rename to types/electron-window-state/electron-window-state-tests.ts diff --git a/electron-window-state/index.d.ts b/types/electron-window-state/index.d.ts similarity index 100% rename from electron-window-state/index.d.ts rename to types/electron-window-state/index.d.ts diff --git a/electron-window-state/tsconfig.json b/types/electron-window-state/tsconfig.json similarity index 100% rename from electron-window-state/tsconfig.json rename to types/electron-window-state/tsconfig.json diff --git a/electron/.editorconfig b/types/electron/.editorconfig similarity index 100% rename from electron/.editorconfig rename to types/electron/.editorconfig diff --git a/electron/index.d.ts b/types/electron/index.d.ts similarity index 100% rename from electron/index.d.ts rename to types/electron/index.d.ts diff --git a/electron/test/index.ts b/types/electron/test/index.ts similarity index 100% rename from electron/test/index.ts rename to types/electron/test/index.ts diff --git a/electron/test/main.ts b/types/electron/test/main.ts similarity index 100% rename from electron/test/main.ts rename to types/electron/test/main.ts diff --git a/electron/test/renderer.ts b/types/electron/test/renderer.ts similarity index 100% rename from electron/test/renderer.ts rename to types/electron/test/renderer.ts diff --git a/electron/tsconfig.json b/types/electron/tsconfig.json similarity index 100% rename from electron/tsconfig.json rename to types/electron/tsconfig.json diff --git a/element-resize-event/element-resize-event-tests.ts b/types/element-resize-event/element-resize-event-tests.ts similarity index 100% rename from element-resize-event/element-resize-event-tests.ts rename to types/element-resize-event/element-resize-event-tests.ts diff --git a/element-resize-event/index.d.ts b/types/element-resize-event/index.d.ts similarity index 100% rename from element-resize-event/index.d.ts rename to types/element-resize-event/index.d.ts diff --git a/element-resize-event/tsconfig.json b/types/element-resize-event/tsconfig.json similarity index 100% rename from element-resize-event/tsconfig.json rename to types/element-resize-event/tsconfig.json diff --git a/elm/elm-tests.ts b/types/elm/elm-tests.ts similarity index 100% rename from elm/elm-tests.ts rename to types/elm/elm-tests.ts diff --git a/elm/index.d.ts b/types/elm/index.d.ts similarity index 100% rename from elm/index.d.ts rename to types/elm/index.d.ts diff --git a/elm/tsconfig.json b/types/elm/tsconfig.json similarity index 100% rename from elm/tsconfig.json rename to types/elm/tsconfig.json diff --git a/email-addresses/email-addresses-tests.ts b/types/email-addresses/email-addresses-tests.ts similarity index 100% rename from email-addresses/email-addresses-tests.ts rename to types/email-addresses/email-addresses-tests.ts diff --git a/email-addresses/index.d.ts b/types/email-addresses/index.d.ts similarity index 100% rename from email-addresses/index.d.ts rename to types/email-addresses/index.d.ts diff --git a/email-addresses/tsconfig.json b/types/email-addresses/tsconfig.json similarity index 100% rename from email-addresses/tsconfig.json rename to types/email-addresses/tsconfig.json diff --git a/email-templates/email-templates-tests.ts b/types/email-templates/email-templates-tests.ts similarity index 100% rename from email-templates/email-templates-tests.ts rename to types/email-templates/email-templates-tests.ts diff --git a/email-templates/index.d.ts b/types/email-templates/index.d.ts similarity index 100% rename from email-templates/index.d.ts rename to types/email-templates/index.d.ts diff --git a/email-templates/tsconfig.json b/types/email-templates/tsconfig.json similarity index 100% rename from email-templates/tsconfig.json rename to types/email-templates/tsconfig.json diff --git a/email-validator/email-validator-tests.ts b/types/email-validator/email-validator-tests.ts similarity index 100% rename from email-validator/email-validator-tests.ts rename to types/email-validator/email-validator-tests.ts diff --git a/email-validator/index.d.ts b/types/email-validator/index.d.ts similarity index 100% rename from email-validator/index.d.ts rename to types/email-validator/index.d.ts diff --git a/email-validator/tsconfig.json b/types/email-validator/tsconfig.json similarity index 100% rename from email-validator/tsconfig.json rename to types/email-validator/tsconfig.json diff --git a/ember/ember-tests.ts b/types/ember/ember-tests.ts similarity index 82% rename from ember/ember-tests.ts rename to types/ember/ember-tests.ts index 91e1f61f6f..99f00aae6f 100644 --- a/ember/ember-tests.ts +++ b/types/ember/ember-tests.ts @@ -1,4 +1,4 @@ -var App: any; +let App: any; App = Em.Application.create(); @@ -22,7 +22,7 @@ declare class MyPerson extends Em.Object { static createMan(): MyPerson; } -var Person1 = Em.Object.extend({ +const Person1 = Em.Object.extend({ say: (thing: string) => { alert(thing); } @@ -31,7 +31,7 @@ var Person1 = Em.Object.extend({ declare class MyPerson2 extends Em.Object { helloWorld(): void; } -var tom = Person1.create({ +const tom = Person1.create({ name: 'Tom Dale', helloWorld() { this.say('Hi my name is ' + this.get('name')); @@ -48,10 +48,9 @@ Person1.reopenClass({ } }); // ReSharper disable once DuplicatingLocalDeclaration -declare var Person1: typeof MyPerson; Person1.createMan().get('isMan'); -var person = Person1.create({ +const person = Person1.create({ firstName: 'Yehuda', lastName: 'Katz' }); @@ -63,13 +62,13 @@ App.todosController = Em.Object.create({ Em.Object.create({ isDone: false }) ], remaining: (function() { - var todos = this.get('todos'); + const todos = this.get('todos'); return todos.filterProperty('isDone', false).get('length'); }).property('todos.@each.isDone') }); -var todos = App.todosController.get('todos'); -var todo = todos.objectAt(0); +const todos = App.todosController.get('todos'); +let todo = todos.objectAt(0); todo.set('isDone', true); App.todosController.get('remaining'); todo = Em.Object.create({ isDone: false }); @@ -109,29 +108,29 @@ App.userController = Em.Object.create({ Handlebars.registerHelper('highlight', (property: string, options: any) => new Handlebars.SafeString('' + "some value" + '')); -var coolView = App.CoolView.create(); +const coolView = App.CoolView.create(); -var Person2 = Em.Object.extend({ +const Person2 = Em.Object.extend({ sayHello() { console.log('Hello from ' + this.get('name')); } }); -var people = [ +const people = [ Person2.create({ name: 'Juan' }), Person2.create({ name: 'Charles' }), Person2.create({ name: 'Majd' }) ]; people.invoke('sayHello'); -var arr = [Em.Object.create(), Em.Object.create()]; +const arr = [Em.Object.create(), Em.Object.create()]; arr.setEach('name', 'unknown'); arr.getEach('name'); -var Person3 = Em.Object.extend({ +const Person3 = Em.Object.extend({ name: null, isHappy: false }); -var people2 = [ +const people2 = [ Person3.create({ name: 'Yehuda', isHappy: true }), Person3.create({ name: 'Majd', isHappy: false }) ]; @@ -145,7 +144,7 @@ people2.everyProperty('isHappy', true); people2.someProperty('isHappy', true); // Examples taken from http://emberjs.com/api/classes/Em.RSVP.Promise.html -var promise = new Em.RSVP.Promise((resolve: Function, reject: Function) => { +const promise = new Em.RSVP.Promise((resolve: Function, reject: Function) => { // on success resolve('ok!'); @@ -159,15 +158,15 @@ promise.then((value: any) => { // on rejection }); -var mix1 = Ember.Mixin.create({ +const mix1 = Ember.Mixin.create({ foo: 1 }); -var mix2 = Ember.Mixin.create({ +const mix2 = Ember.Mixin.create({ bar: 2 }); -var component1 = Ember.Component.extend( mix1, mix2, { +const component1 = Ember.Component.extend( mix1, mix2, { lyft: Ember.inject.service(), cars: Ember.computed.readOnly('lyft.cars') }); diff --git a/ember/index.d.ts b/types/ember/index.d.ts similarity index 98% rename from ember/index.d.ts rename to types/ember/index.d.ts index dca7004163..1e014759cc 100644 --- a/ember/index.d.ts +++ b/types/ember/index.d.ts @@ -7,7 +7,6 @@ /// declare namespace EmberStates { - interface Transition { targetName: string; urlMethod: string; @@ -151,16 +150,13 @@ declare namespace EmberStates { */ followRedirects(): Ember.RSVP.Promise; } - } // Get an alias to the global Array type to use in inner scope below. type GlobalArray = T[]; declare namespace EmberTesting { - namespace Test { - class Adapter { asyncEnd(): void; asyncStart(): void; @@ -168,9 +164,7 @@ declare namespace EmberTesting { } class QUnitAdapter extends Adapter { } - } - } interface Function { @@ -349,13 +343,10 @@ interface EnumerableConfigurationOptions { type ItemIndexEnumerableCallbackTarget = (callback: ItemIndexEnumerableCallback, target?: any) => any[]; - type ItemIndexEnumerableCallback = (item: any, index: number, enumerable: Ember.Enumerable) => void; - type ReduceCallback = (previousValue: any, item: any, index: number, enumerable: Ember.Enumerable) => void; - interface TransitionsHash { contexts: any[]; exitStates: Ember.State[]; @@ -388,7 +379,7 @@ declare namespace Ember { Alias for jQuery. **/ // ReSharper disable once DuplicatingLocalDeclaration - var $: JQueryStatic; + const $: JQueryStatic; /** Creates an Ember.NativeArray from an Array like object. Does not modify the original object. Ember.A is not needed if Ember.EXTEND_PROTOTYPES is true (the default value). However, it is @@ -651,7 +642,7 @@ declare namespace Ember { removeObject(object: any): any; removeObjects(objects: Enumerable): MutableEnumberable; } - var BOOTED: boolean; + const BOOTED: boolean; /** Connects the properties of two objects so that whenever the value of one property changes, the other property will be changed also. @@ -967,17 +958,17 @@ declare namespace Ember { **/ class Descriptor { } namespace ENV { - export var EXTEND_PROTOTYPES: typeof Ember.EXTEND_PROTOTYPES; - export var LOG_BINDINGS: boolean; - export var LOG_STACKTRACE_ON_DEPRECATION: boolean; - export var LOG_VERSION: boolean; - export var MODEL_FACTORY_INJECTIONS: boolean; - export var RAISE_ON_DEPRECATION: boolean; + const EXTEND_PROTOTYPES: typeof Ember.EXTEND_PROTOTYPES; + const LOG_BINDINGS: boolean; + const LOG_STACKTRACE_ON_DEPRECATION: boolean; + const LOG_VERSION: boolean; + const MODEL_FACTORY_INJECTIONS: boolean; + const RAISE_ON_DEPRECATION: boolean; } namespace EXTEND_PROTOTYPES { - export var Array: boolean; - export var Function: boolean; - export var String: boolean; + const Array: boolean; + const Function: boolean; + const String: boolean; } /** This is the object instance returned when you get the @each property on an array. It uses @@ -1049,7 +1040,7 @@ declare namespace Ember { **/ // Restore this to 'typeof Error' when https://github.com/Microsoft/TypeScript/issues/983 is resolved // ReSharper disable once DuplicatingLocalDeclaration - var Error: any; // typeof Error; + const Error: any; // typeof Error; /** Handles delegating browser events to their corresponding Ember.Views. For example, when you click on a view, Ember.EventDispatcher ensures that that view's mouseDown method gets called. @@ -1082,12 +1073,12 @@ declare namespace Ember { one(name: string, target: any, method: Function): Evented; trigger(name: string, ...args: string[]): void; } - var FROZEN_ERROR: string; + const FROZEN_ERROR: string; class Freezable { freeze(): Freezable; isFrozen: boolean; } - var GUID_KEY: string; + const GUID_KEY: string; namespace Handlebars { function compile(string: string): Function; function compile(environment: any, options?: any, context?: any, asObject?: any): any; @@ -1104,7 +1095,7 @@ declare namespace Ember { } function parse(string: string): any; function print(ast: any): void; - var logger: typeof Ember.Logger; + const logger: typeof Ember.Logger; function log(level: string, str: string): void; } class HashLocation extends Object { @@ -1140,8 +1131,8 @@ declare namespace Ember { static isMethod: boolean; rootURL: string; } - var IS_BINDING: RegExp; - var inject: { + const IS_BINDING: RegExp; + const inject: { controller(name?: string): Controller; service(name?: string): Service; }; @@ -1158,15 +1149,15 @@ declare namespace Ember { subscribe(pattern: string, object: any): void; unsubscribe(subscriber: any): void; } - var K: Function; - var LOG_BINDINGS: boolean; - var LOG_STACKTRACE_ON_DEPRECATION: boolean; - var LOG_VERSION: boolean; + const K: Function; + const LOG_BINDINGS: boolean; + const LOG_STACKTRACE_ON_DEPRECATION: boolean; + const LOG_VERSION: boolean; class Location { create(options?: {}): any; registerImplementation(name: string, implementation: any): void; } - var Logger: { + const Logger: { assert(param: any): void; debug(...args: any[]): void; error(...args: any[]): void; @@ -1175,7 +1166,7 @@ declare namespace Ember { warn(...args: any[]): void; }; function MANDATORY_SETTER_FUNCTION(value: string): void; - var META_KEY: string; + const META_KEY: string; class Map { copy(): Map; static create(): Map; @@ -1305,7 +1296,7 @@ declare namespace Ember { hasEnumerableObservers: boolean; lastObject: any; } - var NAME_KEY: string; + const NAME_KEY: string; class Namespace extends Object { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; @@ -1425,7 +1416,7 @@ declare namespace Ember { static isClass: boolean; static isMethod: boolean; } - var ORDER_DEFINITION: string[]; + const ORDER_DEFINITION: string[]; class Object extends CoreObject implements Observable { addObserver: ModifyObserver; beginPropertyChanges(): Observable; @@ -1530,7 +1521,6 @@ declare namespace Ember { } class Promise implements Thenable { - /** Promise objects represent the eventual result of an asynchronous operation. The primary way of interacting with a promise is through its `then` method, which @@ -1591,7 +1581,6 @@ declare namespace Ember { the [routing guide](http://emberjs.com/guides/routing/) for documentation. */ class Route extends Object implements ActionHandlerMixin, Evented { - static isClass: boolean; static isMethod: boolean; @@ -1817,7 +1806,6 @@ declare namespace Ember { */ redirect(): EmberStates.Transition; - /** Refresh the model on this route and any child routes, firing the `beforeModel`, `model`, and `afterModel` hooks in a similar fashion @@ -2157,7 +2145,7 @@ declare namespace Ember { toggleProperty(keyName: string): boolean; /* /Observable */ } - var STRINGS: boolean; + const STRINGS: boolean; class State extends Object implements Evented { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; @@ -2236,7 +2224,7 @@ declare namespace Ember { function underscore(str: string): string; function w(str: string): string[]; } - var TEMPLATES: {}; + const TEMPLATES: {}; class TargetActionSupport { triggerAction(opts: {}): boolean; } @@ -2253,8 +2241,8 @@ declare namespace Ember { function registerHelper(name: string, helperMethod: Function): void; function registerAsyncHelper(name: string, helperMethod: Function): void; - var adapter: Object; - var QUnitAdapter: Object; + const adapter: Object; + const QUnitAdapter: Object; function registerWaiter(callback: Function): void; function registerWaiter(context: any, callback: Function): void; @@ -2325,18 +2313,18 @@ declare namespace Ember { bubbles: boolean; onEvent: string; } - var VERSION: string; + const VERSION: string; class ViewTargetActionSupport extends Mixin { target: any; actionContext: any; } - var ViewUtils: {}; // TODO: define interface + const ViewUtils: {}; // TODO: define interface function addListener(obj: any, eventName: string, target: Function | any, method: Function | string, once?: boolean): void; - var addObserver: ModifyObserver; + const addObserver: ModifyObserver; /** Ember.alias is deprecated. Please use Ember.aliasMethod or Ember.computed.alias instead. **/ - var alias: typeof deprecateFunc; + const alias: typeof deprecateFunc; function aliasMethod(methodName: string): Descriptor; function assert(desc: string, test: boolean): void; function beginPropertyChanges(): void; @@ -2346,7 +2334,7 @@ declare namespace Ember { function changeProperties(callback: Function, binding?: any): void; function compare(v: any, w: any): number; // ReSharper disable once DuplicatingLocalDeclaration - var computed: { + const computed: { (...args: any[]): ComputedProperty; alias(dependentKey: string): ComputedProperty; and(...args: string[]): ComputedProperty; @@ -2385,7 +2373,7 @@ declare namespace Ember { Ember.empty is deprecated. Please use Ember.isEmpty instead. **/ // ReSharper disable once DuplicatingLocalDeclaration - var empty: typeof deprecateFunc; + const empty: typeof deprecateFunc; function endPropertyChanges(): void; function finishChains(obj: any): void; function generateController(container: Container, controllerName: string, context: any): Controller; @@ -2394,7 +2382,7 @@ declare namespace Ember { /** getPath is deprecated since get now supports paths. **/ - var getPath: typeof deprecateFunc; + const getPath: typeof deprecateFunc; function getWithDefault(root: string, key: string, defaultValue: any): any; function guidFor(obj: any): string; function handleErrors(func: Function, context: any): any; @@ -2407,7 +2395,7 @@ declare namespace Ember { function isEmpty(obj: any): boolean; function isEqual(a: any, b: any): boolean; function isGlobalPath(path: string): boolean; - var isNamespace: boolean; + const isNamespace: boolean; function isNone(obj: any): boolean; function isPrototypeOf(obj: {}): boolean; function isWatching(obj: any, key: string): boolean; @@ -2416,7 +2404,7 @@ declare namespace Ember { function listenersFor(obj: any, eventName: string): any[]; function listenersUnion(obj: any, eventName: string, otherActions: any[]): void; // ReSharper disable once DuplicatingLocalDeclaration - var lookup: {}; // TODO: define interface + const lookup: {}; // TODO: define interface function makeArray(obj: any): any[]; function merge(original: any, updates: any): any; function meta(obj: any): {}; @@ -2424,14 +2412,14 @@ declare namespace Ember { /** Ember.none is deprecated. Please use Ember.isNone instead. **/ - var none: typeof deprecateFunc; + const none: typeof deprecateFunc; function observer(...args: any[]): Function; function observersFor(obj: any, path: string): any[]; function onLoad(name: string, callback: Function): void; - var onError: Error; + const onError: Error; function overrideChains(obj: any, keyName: string, m: any): boolean; // ReSharper disable once DuplicatingLocalDeclaration - var platform: { + const platform: { defineProperty: boolean; hasPropertyAccessors: boolean; }; @@ -2443,7 +2431,7 @@ declare namespace Ember { function removeObserver(obj: any, path: string, target: any, method: Function): any; function required(): Descriptor; function rewatch(obj: any): void; - var run: { + const run: { (method: Function): void; (target: any, method: Function): void; begin(): void; @@ -2466,7 +2454,7 @@ declare namespace Ember { /** setPath is deprecated since set now supports paths. **/ - var setPath: typeof deprecateFunc; + const setPath: typeof deprecateFunc; function setProperties(self: any, hash: {}): any; function subscribe(pattern: string, object: any): void; function toLocaleString(): string; @@ -2477,13 +2465,13 @@ declare namespace Ember { /** trySetPath has been renamed to trySet. **/ - var trySetPath: typeof deprecateFunc; + const trySetPath: typeof deprecateFunc; function typeOf(item: any): string; function unwatch(obj: any, keyPath: string): void; function unwatchKey(obj: any, keyName: string): void; function unwatchPath(obj: any, keyPath: string): void; // ReSharper disable once DuplicatingLocalDeclaration - var uuid: number; + const uuid: number; function valueOf(): {}; function warn(message: string, test?: boolean): void; function watch(obj: any, keyPath: string): void; @@ -2491,18 +2479,17 @@ declare namespace Ember { function watchPath(obj: any, keyPath: string): void; function watchedEvents(obj: {}): any[]; function wrap(func: Function, superFunc: Function): Function; - var _ContainerProxyMixin: Mixin; - var _RegistryProxyMixin: Mixin; + const _ContainerProxyMixin: Mixin; + const _RegistryProxyMixin: Mixin; function getOwner(object: any): any; function setOwner(object: any, owner: any): void; - var testing: boolean; - var MODEL_FACTORY_INJECTIONS: boolean; + const testing: boolean; + const MODEL_FACTORY_INJECTIONS: boolean; function assign(original: any, ...sources: any[]): any; } import Em = Ember; - /** * External ambient module - to allow "import Ember from 'ember';" to work correctly */ diff --git a/ember/tsconfig.json b/types/ember/tsconfig.json similarity index 100% rename from ember/tsconfig.json rename to types/ember/tsconfig.json diff --git a/ember/tslint.json b/types/ember/tslint.json similarity index 100% rename from ember/tslint.json rename to types/ember/tslint.json diff --git a/ember/v1/ember-tests.ts b/types/ember/v1/ember-tests.ts similarity index 100% rename from ember/v1/ember-tests.ts rename to types/ember/v1/ember-tests.ts diff --git a/ember/v1/index.d.ts b/types/ember/v1/index.d.ts similarity index 100% rename from ember/v1/index.d.ts rename to types/ember/v1/index.d.ts diff --git a/ember/v1/tsconfig.json b/types/ember/v1/tsconfig.json similarity index 100% rename from ember/v1/tsconfig.json rename to types/ember/v1/tsconfig.json diff --git a/emissary/emissary-tests.ts b/types/emissary/emissary-tests.ts similarity index 100% rename from emissary/emissary-tests.ts rename to types/emissary/emissary-tests.ts diff --git a/emissary/index.d.ts b/types/emissary/index.d.ts similarity index 100% rename from emissary/index.d.ts rename to types/emissary/index.d.ts diff --git a/emissary/tsconfig.json b/types/emissary/tsconfig.json similarity index 100% rename from emissary/tsconfig.json rename to types/emissary/tsconfig.json diff --git a/emojione/emojione-tests.ts b/types/emojione/emojione-tests.ts similarity index 100% rename from emojione/emojione-tests.ts rename to types/emojione/emojione-tests.ts diff --git a/emojione/index.d.ts b/types/emojione/index.d.ts similarity index 100% rename from emojione/index.d.ts rename to types/emojione/index.d.ts diff --git a/emojione/tsconfig.json b/types/emojione/tsconfig.json similarity index 100% rename from emojione/tsconfig.json rename to types/emojione/tsconfig.json diff --git a/emojione/tslint.json b/types/emojione/tslint.json similarity index 100% rename from emojione/tslint.json rename to types/emojione/tslint.json diff --git a/empower/empower-tests.ts b/types/empower/empower-tests.ts similarity index 100% rename from empower/empower-tests.ts rename to types/empower/empower-tests.ts diff --git a/empower/index.d.ts b/types/empower/index.d.ts similarity index 100% rename from empower/index.d.ts rename to types/empower/index.d.ts diff --git a/empower/tsconfig.json b/types/empower/tsconfig.json similarity index 100% rename from empower/tsconfig.json rename to types/empower/tsconfig.json diff --git a/emscripten/emscripten-tests.ts b/types/emscripten/emscripten-tests.ts similarity index 100% rename from emscripten/emscripten-tests.ts rename to types/emscripten/emscripten-tests.ts diff --git a/emscripten/index.d.ts b/types/emscripten/index.d.ts similarity index 100% rename from emscripten/index.d.ts rename to types/emscripten/index.d.ts diff --git a/emscripten/tsconfig.json b/types/emscripten/tsconfig.json similarity index 100% rename from emscripten/tsconfig.json rename to types/emscripten/tsconfig.json diff --git a/encoding-japanese/encoding-japanese-tests.ts b/types/encoding-japanese/encoding-japanese-tests.ts similarity index 100% rename from encoding-japanese/encoding-japanese-tests.ts rename to types/encoding-japanese/encoding-japanese-tests.ts diff --git a/encoding-japanese/index.d.ts b/types/encoding-japanese/index.d.ts similarity index 100% rename from encoding-japanese/index.d.ts rename to types/encoding-japanese/index.d.ts diff --git a/encoding-japanese/tsconfig.json b/types/encoding-japanese/tsconfig.json similarity index 100% rename from encoding-japanese/tsconfig.json rename to types/encoding-japanese/tsconfig.json diff --git a/enhanced-resolve/index.d.ts b/types/enhanced-resolve/index.d.ts similarity index 100% rename from enhanced-resolve/index.d.ts rename to types/enhanced-resolve/index.d.ts diff --git a/enhanced-resolve/lib/AliasFieldPlugin.d.ts b/types/enhanced-resolve/lib/AliasFieldPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/AliasFieldPlugin.d.ts rename to types/enhanced-resolve/lib/AliasFieldPlugin.d.ts diff --git a/enhanced-resolve/lib/AliasPlugin.d.ts b/types/enhanced-resolve/lib/AliasPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/AliasPlugin.d.ts rename to types/enhanced-resolve/lib/AliasPlugin.d.ts diff --git a/enhanced-resolve/lib/AppendPlugin.d.ts b/types/enhanced-resolve/lib/AppendPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/AppendPlugin.d.ts rename to types/enhanced-resolve/lib/AppendPlugin.d.ts diff --git a/enhanced-resolve/lib/CloneBasenamePlugin.d.ts b/types/enhanced-resolve/lib/CloneBasenamePlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/CloneBasenamePlugin.d.ts rename to types/enhanced-resolve/lib/CloneBasenamePlugin.d.ts diff --git a/enhanced-resolve/lib/ConcordExtensionsPlugin.d.ts b/types/enhanced-resolve/lib/ConcordExtensionsPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/ConcordExtensionsPlugin.d.ts rename to types/enhanced-resolve/lib/ConcordExtensionsPlugin.d.ts diff --git a/enhanced-resolve/lib/ConcordMainPlugin.d.ts b/types/enhanced-resolve/lib/ConcordMainPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/ConcordMainPlugin.d.ts rename to types/enhanced-resolve/lib/ConcordMainPlugin.d.ts diff --git a/enhanced-resolve/lib/ConcordModulesPlugin.d.ts b/types/enhanced-resolve/lib/ConcordModulesPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/ConcordModulesPlugin.d.ts rename to types/enhanced-resolve/lib/ConcordModulesPlugin.d.ts diff --git a/enhanced-resolve/lib/DescriptionFilePlugin.d.ts b/types/enhanced-resolve/lib/DescriptionFilePlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/DescriptionFilePlugin.d.ts rename to types/enhanced-resolve/lib/DescriptionFilePlugin.d.ts diff --git a/enhanced-resolve/lib/DescriptionFileUtils.d.ts b/types/enhanced-resolve/lib/DescriptionFileUtils.d.ts similarity index 100% rename from enhanced-resolve/lib/DescriptionFileUtils.d.ts rename to types/enhanced-resolve/lib/DescriptionFileUtils.d.ts diff --git a/enhanced-resolve/lib/DirectoryExistsPlugin.d.ts b/types/enhanced-resolve/lib/DirectoryExistsPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/DirectoryExistsPlugin.d.ts rename to types/enhanced-resolve/lib/DirectoryExistsPlugin.d.ts diff --git a/enhanced-resolve/lib/FileExistsPlugin.d.ts b/types/enhanced-resolve/lib/FileExistsPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/FileExistsPlugin.d.ts rename to types/enhanced-resolve/lib/FileExistsPlugin.d.ts diff --git a/enhanced-resolve/lib/FileKindPlugin.d.ts b/types/enhanced-resolve/lib/FileKindPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/FileKindPlugin.d.ts rename to types/enhanced-resolve/lib/FileKindPlugin.d.ts diff --git a/enhanced-resolve/lib/JoinRequestPlugin.d.ts b/types/enhanced-resolve/lib/JoinRequestPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/JoinRequestPlugin.d.ts rename to types/enhanced-resolve/lib/JoinRequestPlugin.d.ts diff --git a/enhanced-resolve/lib/LogInfoPlugin.d.ts b/types/enhanced-resolve/lib/LogInfoPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/LogInfoPlugin.d.ts rename to types/enhanced-resolve/lib/LogInfoPlugin.d.ts diff --git a/enhanced-resolve/lib/MainFieldPlugin.d.ts b/types/enhanced-resolve/lib/MainFieldPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/MainFieldPlugin.d.ts rename to types/enhanced-resolve/lib/MainFieldPlugin.d.ts diff --git a/enhanced-resolve/lib/ModuleAppendPlugin.d.ts b/types/enhanced-resolve/lib/ModuleAppendPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/ModuleAppendPlugin.d.ts rename to types/enhanced-resolve/lib/ModuleAppendPlugin.d.ts diff --git a/enhanced-resolve/lib/ModuleKindPlugin.d.ts b/types/enhanced-resolve/lib/ModuleKindPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/ModuleKindPlugin.d.ts rename to types/enhanced-resolve/lib/ModuleKindPlugin.d.ts diff --git a/enhanced-resolve/lib/ModulesInHierachicDirectoriesPlugin.d.ts b/types/enhanced-resolve/lib/ModulesInHierachicDirectoriesPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/ModulesInHierachicDirectoriesPlugin.d.ts rename to types/enhanced-resolve/lib/ModulesInHierachicDirectoriesPlugin.d.ts diff --git a/enhanced-resolve/lib/ModulesInRootPlugin.d.ts b/types/enhanced-resolve/lib/ModulesInRootPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/ModulesInRootPlugin.d.ts rename to types/enhanced-resolve/lib/ModulesInRootPlugin.d.ts diff --git a/enhanced-resolve/lib/NextPlugin.d.ts b/types/enhanced-resolve/lib/NextPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/NextPlugin.d.ts rename to types/enhanced-resolve/lib/NextPlugin.d.ts diff --git a/enhanced-resolve/lib/ParsePlugin.d.ts b/types/enhanced-resolve/lib/ParsePlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/ParsePlugin.d.ts rename to types/enhanced-resolve/lib/ParsePlugin.d.ts diff --git a/enhanced-resolve/lib/Resolver.d.ts b/types/enhanced-resolve/lib/Resolver.d.ts similarity index 100% rename from enhanced-resolve/lib/Resolver.d.ts rename to types/enhanced-resolve/lib/Resolver.d.ts diff --git a/enhanced-resolve/lib/ResultPlugin.d.ts b/types/enhanced-resolve/lib/ResultPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/ResultPlugin.d.ts rename to types/enhanced-resolve/lib/ResultPlugin.d.ts diff --git a/enhanced-resolve/lib/Storage.d.ts b/types/enhanced-resolve/lib/Storage.d.ts similarity index 100% rename from enhanced-resolve/lib/Storage.d.ts rename to types/enhanced-resolve/lib/Storage.d.ts diff --git a/enhanced-resolve/lib/SymlinkPlugin.d.ts b/types/enhanced-resolve/lib/SymlinkPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/SymlinkPlugin.d.ts rename to types/enhanced-resolve/lib/SymlinkPlugin.d.ts diff --git a/enhanced-resolve/lib/SyncAsyncFileSystemDecorator.d.ts b/types/enhanced-resolve/lib/SyncAsyncFileSystemDecorator.d.ts similarity index 100% rename from enhanced-resolve/lib/SyncAsyncFileSystemDecorator.d.ts rename to types/enhanced-resolve/lib/SyncAsyncFileSystemDecorator.d.ts diff --git a/enhanced-resolve/lib/TryNextPlugin.d.ts b/types/enhanced-resolve/lib/TryNextPlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/TryNextPlugin.d.ts rename to types/enhanced-resolve/lib/TryNextPlugin.d.ts diff --git a/enhanced-resolve/lib/UnsafeCachePlugin.d.ts b/types/enhanced-resolve/lib/UnsafeCachePlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/UnsafeCachePlugin.d.ts rename to types/enhanced-resolve/lib/UnsafeCachePlugin.d.ts diff --git a/enhanced-resolve/lib/UseFilePlugin.d.ts b/types/enhanced-resolve/lib/UseFilePlugin.d.ts similarity index 100% rename from enhanced-resolve/lib/UseFilePlugin.d.ts rename to types/enhanced-resolve/lib/UseFilePlugin.d.ts diff --git a/enhanced-resolve/lib/common-types.d.ts b/types/enhanced-resolve/lib/common-types.d.ts similarity index 100% rename from enhanced-resolve/lib/common-types.d.ts rename to types/enhanced-resolve/lib/common-types.d.ts diff --git a/enhanced-resolve/lib/concord.d.ts b/types/enhanced-resolve/lib/concord.d.ts similarity index 100% rename from enhanced-resolve/lib/concord.d.ts rename to types/enhanced-resolve/lib/concord.d.ts diff --git a/enhanced-resolve/lib/getPaths.d.ts b/types/enhanced-resolve/lib/getPaths.d.ts similarity index 100% rename from enhanced-resolve/lib/getPaths.d.ts rename to types/enhanced-resolve/lib/getPaths.d.ts diff --git a/enhanced-resolve/lib/globToRegExp.d.ts b/types/enhanced-resolve/lib/globToRegExp.d.ts similarity index 100% rename from enhanced-resolve/lib/globToRegExp.d.ts rename to types/enhanced-resolve/lib/globToRegExp.d.ts diff --git a/enhanced-resolve/test/index.ts b/types/enhanced-resolve/test/index.ts similarity index 100% rename from enhanced-resolve/test/index.ts rename to types/enhanced-resolve/test/index.ts diff --git a/enhanced-resolve/test/lib.ts b/types/enhanced-resolve/test/lib.ts similarity index 100% rename from enhanced-resolve/test/lib.ts rename to types/enhanced-resolve/test/lib.ts diff --git a/enhanced-resolve/tsconfig.json b/types/enhanced-resolve/tsconfig.json similarity index 100% rename from enhanced-resolve/tsconfig.json rename to types/enhanced-resolve/tsconfig.json diff --git a/ent/ent-tests.ts b/types/ent/ent-tests.ts similarity index 100% rename from ent/ent-tests.ts rename to types/ent/ent-tests.ts diff --git a/ent/index.d.ts b/types/ent/index.d.ts similarity index 100% rename from ent/index.d.ts rename to types/ent/index.d.ts diff --git a/ent/tsconfig.json b/types/ent/tsconfig.json similarity index 100% rename from ent/tsconfig.json rename to types/ent/tsconfig.json diff --git a/env-to-object/env-to-object-tests.ts b/types/env-to-object/env-to-object-tests.ts similarity index 100% rename from env-to-object/env-to-object-tests.ts rename to types/env-to-object/env-to-object-tests.ts diff --git a/env-to-object/index.d.ts b/types/env-to-object/index.d.ts similarity index 75% rename from env-to-object/index.d.ts rename to types/env-to-object/index.d.ts index 1ec7a3c994..8bbca83f48 100644 --- a/env-to-object/index.d.ts +++ b/types/env-to-object/index.d.ts @@ -4,11 +4,11 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace env { - export interface Mappings { + interface Mappings { [enviromentVariableName: string]: Mapping; } - export type Mapping = IntegerMapping | BooleanMapping | GenericMapping; + type Mapping = IntegerMapping | BooleanMapping | GenericMapping; interface GenericMapping { keypath: string; @@ -26,14 +26,14 @@ declare namespace env { strict: boolean; } - export interface Parsers { + interface Parsers { [parserName: string]: (str: string, opts: any) => any; } - export interface Options { + interface Options { parsers: Parsers; } } -declare function env(map: env.Mappings, options?: env.Options): any; +declare function env(map: env.Mappings, options?: env.Options): any; export = env; diff --git a/env-to-object/tsconfig.json b/types/env-to-object/tsconfig.json similarity index 100% rename from env-to-object/tsconfig.json rename to types/env-to-object/tsconfig.json diff --git a/env-to-object/tslint.json b/types/env-to-object/tslint.json similarity index 100% rename from env-to-object/tslint.json rename to types/env-to-object/tslint.json diff --git a/envify/envify-tests.ts b/types/envify/envify-tests.ts similarity index 100% rename from envify/envify-tests.ts rename to types/envify/envify-tests.ts diff --git a/envify/index.d.ts b/types/envify/index.d.ts similarity index 100% rename from envify/index.d.ts rename to types/envify/index.d.ts diff --git a/envify/tsconfig.json b/types/envify/tsconfig.json similarity index 100% rename from envify/tsconfig.json rename to types/envify/tsconfig.json diff --git a/enzyme/enzyme-tests.tsx b/types/enzyme/enzyme-tests.tsx similarity index 97% rename from enzyme/enzyme-tests.tsx rename to types/enzyme/enzyme-tests.tsx index 82a8dc9822..c7323766f7 100644 --- a/enzyme/enzyme-tests.tsx +++ b/types/enzyme/enzyme-tests.tsx @@ -37,6 +37,13 @@ namespace ShallowWrapperTest { elementWrapper: ShallowWrapper, {}>, statelessWrapper: ShallowWrapper; + function test_props_state_inferring() { + let wrapper: ShallowWrapper; + wrapper = shallow(); + wrapper.state().stateProperty; + wrapper.props().stringProp.toUpperCase(); + } + function test_shallow_options() { shallow(, { context: { @@ -337,6 +344,13 @@ namespace ReactWrapperTest { elementWrapper: ReactWrapper, {}>, statelessWrapper: ReactWrapper; + function test_prop_state_inferring() { + let wrapper: ReactWrapper; + wrapper = mount(); + wrapper.state().stateProperty; + wrapper.props().stringProp.toUpperCase(); + } + function test_unmount() { reactWrapper = reactWrapper.unmount(); } diff --git a/enzyme/index.d.ts b/types/enzyme/index.d.ts similarity index 99% rename from enzyme/index.d.ts rename to types/enzyme/index.d.ts index fc498ca78a..abb57e36ef 100644 --- a/enzyme/index.d.ts +++ b/types/enzyme/index.d.ts @@ -546,6 +546,7 @@ export interface MountRendererProps { * @param node * @param [options] */ +export function shallow

(node: ReactElement

, options?: ShallowRendererProps): ShallowWrapper; export function shallow(node: ReactElement

, options?: ShallowRendererProps): ShallowWrapper; /** @@ -553,6 +554,7 @@ export function shallow(node: ReactElement

, options?: ShallowRendererPr * @param node * @param [options] */ +export function mount

(node: ReactElement

, options?: MountRendererProps): ReactWrapper; export function mount(node: ReactElement

, options?: MountRendererProps): ReactWrapper; /** diff --git a/enzyme/tsconfig.json b/types/enzyme/tsconfig.json similarity index 100% rename from enzyme/tsconfig.json rename to types/enzyme/tsconfig.json diff --git a/enzyme/tslint.json b/types/enzyme/tslint.json similarity index 100% rename from enzyme/tslint.json rename to types/enzyme/tslint.json diff --git a/eonasdan-bootstrap-datetimepicker/eonasdan-bootstrap-datetimepicker-tests.ts b/types/eonasdan-bootstrap-datetimepicker/eonasdan-bootstrap-datetimepicker-tests.ts similarity index 100% rename from eonasdan-bootstrap-datetimepicker/eonasdan-bootstrap-datetimepicker-tests.ts rename to types/eonasdan-bootstrap-datetimepicker/eonasdan-bootstrap-datetimepicker-tests.ts diff --git a/eonasdan-bootstrap-datetimepicker/index.d.ts b/types/eonasdan-bootstrap-datetimepicker/index.d.ts similarity index 100% rename from eonasdan-bootstrap-datetimepicker/index.d.ts rename to types/eonasdan-bootstrap-datetimepicker/index.d.ts diff --git a/eonasdan-bootstrap-datetimepicker/package.json b/types/eonasdan-bootstrap-datetimepicker/package.json similarity index 100% rename from eonasdan-bootstrap-datetimepicker/package.json rename to types/eonasdan-bootstrap-datetimepicker/package.json diff --git a/eonasdan-bootstrap-datetimepicker/tsconfig.json b/types/eonasdan-bootstrap-datetimepicker/tsconfig.json similarity index 100% rename from eonasdan-bootstrap-datetimepicker/tsconfig.json rename to types/eonasdan-bootstrap-datetimepicker/tsconfig.json diff --git a/epiceditor/epiceditor-tests.ts b/types/epiceditor/epiceditor-tests.ts similarity index 100% rename from epiceditor/epiceditor-tests.ts rename to types/epiceditor/epiceditor-tests.ts diff --git a/epiceditor/index.d.ts b/types/epiceditor/index.d.ts similarity index 100% rename from epiceditor/index.d.ts rename to types/epiceditor/index.d.ts diff --git a/epiceditor/tsconfig.json b/types/epiceditor/tsconfig.json similarity index 100% rename from epiceditor/tsconfig.json rename to types/epiceditor/tsconfig.json diff --git a/epub/epub-tests.ts b/types/epub/epub-tests.ts similarity index 100% rename from epub/epub-tests.ts rename to types/epub/epub-tests.ts diff --git a/epub/index.d.ts b/types/epub/index.d.ts similarity index 100% rename from epub/index.d.ts rename to types/epub/index.d.ts diff --git a/epub/tsconfig.json b/types/epub/tsconfig.json similarity index 100% rename from epub/tsconfig.json rename to types/epub/tsconfig.json diff --git a/eq.js/eq.js-tests.ts b/types/eq.js/eq.js-tests.ts similarity index 100% rename from eq.js/eq.js-tests.ts rename to types/eq.js/eq.js-tests.ts diff --git a/eq.js/index.d.ts b/types/eq.js/index.d.ts similarity index 100% rename from eq.js/index.d.ts rename to types/eq.js/index.d.ts diff --git a/eq.js/tsconfig.json b/types/eq.js/tsconfig.json similarity index 100% rename from eq.js/tsconfig.json rename to types/eq.js/tsconfig.json diff --git a/error-stack-parser/error-stack-parser-tests.ts b/types/error-stack-parser/error-stack-parser-tests.ts similarity index 100% rename from error-stack-parser/error-stack-parser-tests.ts rename to types/error-stack-parser/error-stack-parser-tests.ts diff --git a/error-stack-parser/index.d.ts b/types/error-stack-parser/index.d.ts similarity index 100% rename from error-stack-parser/index.d.ts rename to types/error-stack-parser/index.d.ts diff --git a/error-stack-parser/tsconfig.json b/types/error-stack-parser/tsconfig.json similarity index 100% rename from error-stack-parser/tsconfig.json rename to types/error-stack-parser/tsconfig.json diff --git a/errorhandler/errorhandler-tests.ts b/types/errorhandler/errorhandler-tests.ts similarity index 100% rename from errorhandler/errorhandler-tests.ts rename to types/errorhandler/errorhandler-tests.ts diff --git a/errorhandler/index.d.ts b/types/errorhandler/index.d.ts similarity index 100% rename from errorhandler/index.d.ts rename to types/errorhandler/index.d.ts diff --git a/errorhandler/tsconfig.json b/types/errorhandler/tsconfig.json similarity index 100% rename from errorhandler/tsconfig.json rename to types/errorhandler/tsconfig.json diff --git a/es6-collections/es6-collections-tests.ts b/types/es6-collections/es6-collections-tests.ts similarity index 100% rename from es6-collections/es6-collections-tests.ts rename to types/es6-collections/es6-collections-tests.ts diff --git a/es6-collections/index.d.ts b/types/es6-collections/index.d.ts similarity index 100% rename from es6-collections/index.d.ts rename to types/es6-collections/index.d.ts diff --git a/es6-collections/tsconfig.json b/types/es6-collections/tsconfig.json similarity index 100% rename from es6-collections/tsconfig.json rename to types/es6-collections/tsconfig.json diff --git a/es6-error/es6-error-tests.ts b/types/es6-error/es6-error-tests.ts similarity index 100% rename from es6-error/es6-error-tests.ts rename to types/es6-error/es6-error-tests.ts diff --git a/es6-error/index.d.ts b/types/es6-error/index.d.ts similarity index 100% rename from es6-error/index.d.ts rename to types/es6-error/index.d.ts diff --git a/es6-error/tsconfig.json b/types/es6-error/tsconfig.json similarity index 100% rename from es6-error/tsconfig.json rename to types/es6-error/tsconfig.json diff --git a/es6-promise/es6-promise-tests.ts b/types/es6-promise/es6-promise-tests.ts similarity index 100% rename from es6-promise/es6-promise-tests.ts rename to types/es6-promise/es6-promise-tests.ts diff --git a/es6-promise/index.d.ts b/types/es6-promise/index.d.ts similarity index 100% rename from es6-promise/index.d.ts rename to types/es6-promise/index.d.ts diff --git a/es6-promise/tsconfig.json b/types/es6-promise/tsconfig.json similarity index 100% rename from es6-promise/tsconfig.json rename to types/es6-promise/tsconfig.json diff --git a/es6-shim/es6-shim-tests.ts b/types/es6-shim/es6-shim-tests.ts similarity index 100% rename from es6-shim/es6-shim-tests.ts rename to types/es6-shim/es6-shim-tests.ts diff --git a/es6-shim/index.d.ts b/types/es6-shim/index.d.ts similarity index 100% rename from es6-shim/index.d.ts rename to types/es6-shim/index.d.ts diff --git a/es6-shim/tsconfig.json b/types/es6-shim/tsconfig.json similarity index 100% rename from es6-shim/tsconfig.json rename to types/es6-shim/tsconfig.json diff --git a/es6-weak-map/es6-weak-map-tests.ts b/types/es6-weak-map/es6-weak-map-tests.ts similarity index 100% rename from es6-weak-map/es6-weak-map-tests.ts rename to types/es6-weak-map/es6-weak-map-tests.ts diff --git a/es6-weak-map/index.d.ts b/types/es6-weak-map/index.d.ts similarity index 100% rename from es6-weak-map/index.d.ts rename to types/es6-weak-map/index.d.ts diff --git a/es6-weak-map/tsconfig.json b/types/es6-weak-map/tsconfig.json similarity index 100% rename from es6-weak-map/tsconfig.json rename to types/es6-weak-map/tsconfig.json diff --git a/es6-weak-map/tslint.json b/types/es6-weak-map/tslint.json similarity index 100% rename from es6-weak-map/tslint.json rename to types/es6-weak-map/tslint.json diff --git a/escape-html/escape-html-tests.ts b/types/escape-html/escape-html-tests.ts similarity index 100% rename from escape-html/escape-html-tests.ts rename to types/escape-html/escape-html-tests.ts diff --git a/escape-html/index.d.ts b/types/escape-html/index.d.ts similarity index 100% rename from escape-html/index.d.ts rename to types/escape-html/index.d.ts diff --git a/escape-html/tsconfig.json b/types/escape-html/tsconfig.json similarity index 100% rename from escape-html/tsconfig.json rename to types/escape-html/tsconfig.json diff --git a/escape-latex/escape-latex-tests.ts b/types/escape-latex/escape-latex-tests.ts similarity index 100% rename from escape-latex/escape-latex-tests.ts rename to types/escape-latex/escape-latex-tests.ts diff --git a/escape-latex/index.d.ts b/types/escape-latex/index.d.ts similarity index 100% rename from escape-latex/index.d.ts rename to types/escape-latex/index.d.ts diff --git a/escape-latex/tsconfig.json b/types/escape-latex/tsconfig.json similarity index 100% rename from escape-latex/tsconfig.json rename to types/escape-latex/tsconfig.json diff --git a/escape-string-regexp/escape-string-regexp-tests.ts b/types/escape-string-regexp/escape-string-regexp-tests.ts similarity index 100% rename from escape-string-regexp/escape-string-regexp-tests.ts rename to types/escape-string-regexp/escape-string-regexp-tests.ts diff --git a/escape-string-regexp/index.d.ts b/types/escape-string-regexp/index.d.ts similarity index 100% rename from escape-string-regexp/index.d.ts rename to types/escape-string-regexp/index.d.ts diff --git a/escape-string-regexp/tsconfig.json b/types/escape-string-regexp/tsconfig.json similarity index 100% rename from escape-string-regexp/tsconfig.json rename to types/escape-string-regexp/tsconfig.json diff --git a/escodegen/escodegen-tests.ts b/types/escodegen/escodegen-tests.ts similarity index 100% rename from escodegen/escodegen-tests.ts rename to types/escodegen/escodegen-tests.ts diff --git a/escodegen/index.d.ts b/types/escodegen/index.d.ts similarity index 100% rename from escodegen/index.d.ts rename to types/escodegen/index.d.ts diff --git a/escodegen/tsconfig.json b/types/escodegen/tsconfig.json similarity index 100% rename from escodegen/tsconfig.json rename to types/escodegen/tsconfig.json diff --git a/esprima-walk/esprima-walk-tests.ts b/types/esprima-walk/esprima-walk-tests.ts similarity index 100% rename from esprima-walk/esprima-walk-tests.ts rename to types/esprima-walk/esprima-walk-tests.ts diff --git a/esprima-walk/index.d.ts b/types/esprima-walk/index.d.ts similarity index 100% rename from esprima-walk/index.d.ts rename to types/esprima-walk/index.d.ts diff --git a/esprima-walk/tsconfig.json b/types/esprima-walk/tsconfig.json similarity index 100% rename from esprima-walk/tsconfig.json rename to types/esprima-walk/tsconfig.json diff --git a/esprima/esprima-tests.ts b/types/esprima/esprima-tests.ts similarity index 100% rename from esprima/esprima-tests.ts rename to types/esprima/esprima-tests.ts diff --git a/esprima/index.d.ts b/types/esprima/index.d.ts similarity index 100% rename from esprima/index.d.ts rename to types/esprima/index.d.ts diff --git a/esprima/tsconfig.json b/types/esprima/tsconfig.json similarity index 100% rename from esprima/tsconfig.json rename to types/esprima/tsconfig.json diff --git a/estraverse/estraverse-tests.ts b/types/estraverse/estraverse-tests.ts similarity index 100% rename from estraverse/estraverse-tests.ts rename to types/estraverse/estraverse-tests.ts diff --git a/estraverse/index.d.ts b/types/estraverse/index.d.ts similarity index 100% rename from estraverse/index.d.ts rename to types/estraverse/index.d.ts diff --git a/estraverse/tsconfig.json b/types/estraverse/tsconfig.json similarity index 100% rename from estraverse/tsconfig.json rename to types/estraverse/tsconfig.json diff --git a/estree/UNUSED_FILES.txt b/types/estree/UNUSED_FILES.txt similarity index 100% rename from estree/UNUSED_FILES.txt rename to types/estree/UNUSED_FILES.txt diff --git a/estree/estree-tests.ts b/types/estree/estree-tests.ts similarity index 100% rename from estree/estree-tests.ts rename to types/estree/estree-tests.ts diff --git a/estree/flow.d.ts b/types/estree/flow.d.ts similarity index 100% rename from estree/flow.d.ts rename to types/estree/flow.d.ts diff --git a/estree/index.d.ts b/types/estree/index.d.ts similarity index 100% rename from estree/index.d.ts rename to types/estree/index.d.ts diff --git a/estree/tsconfig.json b/types/estree/tsconfig.json similarity index 100% rename from estree/tsconfig.json rename to types/estree/tsconfig.json diff --git a/evaporate/evaporate-tests.ts b/types/evaporate/evaporate-tests.ts similarity index 100% rename from evaporate/evaporate-tests.ts rename to types/evaporate/evaporate-tests.ts diff --git a/evaporate/index.d.ts b/types/evaporate/index.d.ts similarity index 100% rename from evaporate/index.d.ts rename to types/evaporate/index.d.ts diff --git a/evaporate/tsconfig.json b/types/evaporate/tsconfig.json similarity index 100% rename from evaporate/tsconfig.json rename to types/evaporate/tsconfig.json diff --git a/event-kit/.editorconfig b/types/event-kit/.editorconfig similarity index 100% rename from event-kit/.editorconfig rename to types/event-kit/.editorconfig diff --git a/event-kit/event-kit-tests.ts b/types/event-kit/event-kit-tests.ts similarity index 100% rename from event-kit/event-kit-tests.ts rename to types/event-kit/event-kit-tests.ts diff --git a/event-kit/index.d.ts b/types/event-kit/index.d.ts similarity index 100% rename from event-kit/index.d.ts rename to types/event-kit/index.d.ts diff --git a/event-kit/tsconfig.json b/types/event-kit/tsconfig.json similarity index 100% rename from event-kit/tsconfig.json rename to types/event-kit/tsconfig.json diff --git a/event-loop-lag/event-loop-lag-tests.ts b/types/event-loop-lag/event-loop-lag-tests.ts similarity index 100% rename from event-loop-lag/event-loop-lag-tests.ts rename to types/event-loop-lag/event-loop-lag-tests.ts diff --git a/event-loop-lag/index.d.ts b/types/event-loop-lag/index.d.ts similarity index 100% rename from event-loop-lag/index.d.ts rename to types/event-loop-lag/index.d.ts diff --git a/event-loop-lag/tsconfig.json b/types/event-loop-lag/tsconfig.json similarity index 100% rename from event-loop-lag/tsconfig.json rename to types/event-loop-lag/tsconfig.json diff --git a/event-stream/event-stream-tests.ts b/types/event-stream/event-stream-tests.ts similarity index 100% rename from event-stream/event-stream-tests.ts rename to types/event-stream/event-stream-tests.ts diff --git a/event-stream/index.d.ts b/types/event-stream/index.d.ts similarity index 100% rename from event-stream/index.d.ts rename to types/event-stream/index.d.ts diff --git a/event-stream/tsconfig.json b/types/event-stream/tsconfig.json similarity index 100% rename from event-stream/tsconfig.json rename to types/event-stream/tsconfig.json diff --git a/event-to-promise/event-to-promise-tests.ts b/types/event-to-promise/event-to-promise-tests.ts similarity index 100% rename from event-to-promise/event-to-promise-tests.ts rename to types/event-to-promise/event-to-promise-tests.ts diff --git a/event-to-promise/index.d.ts b/types/event-to-promise/index.d.ts similarity index 100% rename from event-to-promise/index.d.ts rename to types/event-to-promise/index.d.ts diff --git a/event-to-promise/tsconfig.json b/types/event-to-promise/tsconfig.json similarity index 100% rename from event-to-promise/tsconfig.json rename to types/event-to-promise/tsconfig.json diff --git a/eventemitter2/eventemitter2-tests.ts b/types/eventemitter2/eventemitter2-tests.ts similarity index 100% rename from eventemitter2/eventemitter2-tests.ts rename to types/eventemitter2/eventemitter2-tests.ts diff --git a/eventemitter2/index.d.ts b/types/eventemitter2/index.d.ts similarity index 100% rename from eventemitter2/index.d.ts rename to types/eventemitter2/index.d.ts diff --git a/eventemitter2/tsconfig.json b/types/eventemitter2/tsconfig.json similarity index 100% rename from eventemitter2/tsconfig.json rename to types/eventemitter2/tsconfig.json diff --git a/eventemitter3/eventemitter3-tests.ts b/types/eventemitter3/eventemitter3-tests.ts similarity index 100% rename from eventemitter3/eventemitter3-tests.ts rename to types/eventemitter3/eventemitter3-tests.ts diff --git a/eventemitter3/index.d.ts b/types/eventemitter3/index.d.ts similarity index 100% rename from eventemitter3/index.d.ts rename to types/eventemitter3/index.d.ts diff --git a/eventemitter3/tsconfig.json b/types/eventemitter3/tsconfig.json similarity index 100% rename from eventemitter3/tsconfig.json rename to types/eventemitter3/tsconfig.json diff --git a/evernote/evernote-tests.ts b/types/evernote/evernote-tests.ts similarity index 100% rename from evernote/evernote-tests.ts rename to types/evernote/evernote-tests.ts diff --git a/evernote/index.d.ts b/types/evernote/index.d.ts similarity index 100% rename from evernote/index.d.ts rename to types/evernote/index.d.ts diff --git a/evernote/tsconfig.json b/types/evernote/tsconfig.json similarity index 100% rename from evernote/tsconfig.json rename to types/evernote/tsconfig.json diff --git a/exit/exit-tests.ts b/types/exit/exit-tests.ts similarity index 100% rename from exit/exit-tests.ts rename to types/exit/exit-tests.ts diff --git a/exit/index.d.ts b/types/exit/index.d.ts similarity index 100% rename from exit/index.d.ts rename to types/exit/index.d.ts diff --git a/exit/tsconfig.json b/types/exit/tsconfig.json similarity index 100% rename from exit/tsconfig.json rename to types/exit/tsconfig.json diff --git a/exorcist/exorcist-tests.ts b/types/exorcist/exorcist-tests.ts similarity index 100% rename from exorcist/exorcist-tests.ts rename to types/exorcist/exorcist-tests.ts diff --git a/exorcist/index.d.ts b/types/exorcist/index.d.ts similarity index 100% rename from exorcist/index.d.ts rename to types/exorcist/index.d.ts diff --git a/exorcist/tsconfig.json b/types/exorcist/tsconfig.json similarity index 100% rename from exorcist/tsconfig.json rename to types/exorcist/tsconfig.json diff --git a/expect.js/expect.js-tests.ts b/types/expect.js/expect.js-tests.ts similarity index 100% rename from expect.js/expect.js-tests.ts rename to types/expect.js/expect.js-tests.ts diff --git a/expect.js/index.d.ts b/types/expect.js/index.d.ts similarity index 100% rename from expect.js/index.d.ts rename to types/expect.js/index.d.ts diff --git a/expect.js/tsconfig.json b/types/expect.js/tsconfig.json similarity index 100% rename from expect.js/tsconfig.json rename to types/expect.js/tsconfig.json diff --git a/expect/expect-tests.ts b/types/expect/expect-tests.ts similarity index 99% rename from expect/expect-tests.ts rename to types/expect/expect-tests.ts index 3e08e0d747..c4312d1ada 100644 --- a/expect/expect-tests.ts +++ b/types/expect/expect-tests.ts @@ -1,4 +1,3 @@ - /// import {Expectation, Extension, Spy, createSpy, isSpy, assert, spyOn, extend, restoreSpies} from 'expect'; diff --git a/expect/index.d.ts b/types/expect/index.d.ts similarity index 85% rename from expect/index.d.ts rename to types/expect/index.d.ts index 7b4e95e2b5..8e3422a4d9 100644 --- a/expect/index.d.ts +++ b/types/expect/index.d.ts @@ -4,11 +4,11 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace expect { - export type CompareValues = (a: T, b: T) => boolean; - export type Comparator = (target: {}, key: string) => boolean; - export type KeyType = string | number; + type CompareValues = (a: T, b: T) => boolean; + type Comparator = (target: {}, key: string) => boolean; + type KeyType = string | number; - export class Expectation { + class Expectation { constructor(actual: any); toExist(message?: string): Expectation; toBeTruthy(message?: string): Expectation; @@ -61,16 +61,16 @@ declare namespace expect { withArgs(...args: any[]): Expectation; } - export interface Extension { + interface Extension { [name: string]: (args?: any[]) => void; } - export interface Call { + interface Call { context: T; arguments: any[]; } - export interface Spy { + interface Spy { (...args: any[]): void; __isSpy: boolean; calls: Array>; @@ -84,14 +84,12 @@ declare namespace expect { reset(): void; } - - export function createSpy(fn?: (...args: any[]) => any, restore?: (...args: any[]) => any): Spy; - export function spyOn(object: T, methodName: string): Spy; - export function isSpy(object: {}): boolean; - export function restoreSpies(): void; - export function assert(condition: boolean, messageFormat: string, ...extraArgs: any[]): void; - export function extend(extension: Extension): void; - + function createSpy(fn?: (...args: any[]) => any, restore?: (...args: any[]) => any): Spy; + function spyOn(object: T, methodName: string): Spy; + function isSpy(object: {}): boolean; + function restoreSpies(): void; + function assert(condition: boolean, messageFormat: string, ...extraArgs: any[]): void; + function extend(extension: Extension): void; } declare function expect(actual: T): expect.Expectation; diff --git a/expect/tsconfig.json b/types/expect/tsconfig.json similarity index 100% rename from expect/tsconfig.json rename to types/expect/tsconfig.json diff --git a/expect/tslint.json b/types/expect/tslint.json similarity index 100% rename from expect/tslint.json rename to types/expect/tslint.json diff --git a/expectations/expectations-tests.ts b/types/expectations/expectations-tests.ts similarity index 100% rename from expectations/expectations-tests.ts rename to types/expectations/expectations-tests.ts diff --git a/expectations/index.d.ts b/types/expectations/index.d.ts similarity index 100% rename from expectations/index.d.ts rename to types/expectations/index.d.ts diff --git a/expectations/tsconfig.json b/types/expectations/tsconfig.json similarity index 100% rename from expectations/tsconfig.json rename to types/expectations/tsconfig.json diff --git a/expr-eval/expr-eval-tests.ts b/types/expr-eval/expr-eval-tests.ts similarity index 100% rename from expr-eval/expr-eval-tests.ts rename to types/expr-eval/expr-eval-tests.ts diff --git a/expr-eval/index.d.ts b/types/expr-eval/index.d.ts similarity index 100% rename from expr-eval/index.d.ts rename to types/expr-eval/index.d.ts diff --git a/expr-eval/tsconfig.json b/types/expr-eval/tsconfig.json similarity index 100% rename from expr-eval/tsconfig.json rename to types/expr-eval/tsconfig.json diff --git a/expr-eval/tslint.json b/types/expr-eval/tslint.json similarity index 100% rename from expr-eval/tslint.json rename to types/expr-eval/tslint.json diff --git a/express-brute-memcached/express-brute-memcached-tests.ts b/types/express-brute-memcached/express-brute-memcached-tests.ts similarity index 100% rename from express-brute-memcached/express-brute-memcached-tests.ts rename to types/express-brute-memcached/express-brute-memcached-tests.ts diff --git a/express-brute-memcached/index.d.ts b/types/express-brute-memcached/index.d.ts similarity index 100% rename from express-brute-memcached/index.d.ts rename to types/express-brute-memcached/index.d.ts diff --git a/express-brute-memcached/tsconfig.json b/types/express-brute-memcached/tsconfig.json similarity index 100% rename from express-brute-memcached/tsconfig.json rename to types/express-brute-memcached/tsconfig.json diff --git a/express-brute-mongo/express-brute-mongo-tests.ts b/types/express-brute-mongo/express-brute-mongo-tests.ts similarity index 100% rename from express-brute-mongo/express-brute-mongo-tests.ts rename to types/express-brute-mongo/express-brute-mongo-tests.ts diff --git a/express-brute-mongo/index.d.ts b/types/express-brute-mongo/index.d.ts similarity index 100% rename from express-brute-mongo/index.d.ts rename to types/express-brute-mongo/index.d.ts diff --git a/express-brute-mongo/tsconfig.json b/types/express-brute-mongo/tsconfig.json similarity index 100% rename from express-brute-mongo/tsconfig.json rename to types/express-brute-mongo/tsconfig.json diff --git a/express-brute/express-brute-tests.ts b/types/express-brute/express-brute-tests.ts similarity index 100% rename from express-brute/express-brute-tests.ts rename to types/express-brute/express-brute-tests.ts diff --git a/express-brute/index.d.ts b/types/express-brute/index.d.ts similarity index 100% rename from express-brute/index.d.ts rename to types/express-brute/index.d.ts diff --git a/express-brute/tsconfig.json b/types/express-brute/tsconfig.json similarity index 100% rename from express-brute/tsconfig.json rename to types/express-brute/tsconfig.json diff --git a/express-debug/express-debug-tests.ts b/types/express-debug/express-debug-tests.ts similarity index 100% rename from express-debug/express-debug-tests.ts rename to types/express-debug/express-debug-tests.ts diff --git a/express-debug/index.d.ts b/types/express-debug/index.d.ts similarity index 100% rename from express-debug/index.d.ts rename to types/express-debug/index.d.ts diff --git a/express-debug/tsconfig.json b/types/express-debug/tsconfig.json similarity index 100% rename from express-debug/tsconfig.json rename to types/express-debug/tsconfig.json diff --git a/express-domain-middleware/express-domain-middleware-tests.ts b/types/express-domain-middleware/express-domain-middleware-tests.ts similarity index 100% rename from express-domain-middleware/express-domain-middleware-tests.ts rename to types/express-domain-middleware/express-domain-middleware-tests.ts diff --git a/express-domain-middleware/index.d.ts b/types/express-domain-middleware/index.d.ts similarity index 100% rename from express-domain-middleware/index.d.ts rename to types/express-domain-middleware/index.d.ts diff --git a/express-domain-middleware/tsconfig.json b/types/express-domain-middleware/tsconfig.json similarity index 100% rename from express-domain-middleware/tsconfig.json rename to types/express-domain-middleware/tsconfig.json diff --git a/express-formidable/express-formidable-tests.ts b/types/express-formidable/express-formidable-tests.ts similarity index 100% rename from express-formidable/express-formidable-tests.ts rename to types/express-formidable/express-formidable-tests.ts diff --git a/express-formidable/index.d.ts b/types/express-formidable/index.d.ts similarity index 100% rename from express-formidable/index.d.ts rename to types/express-formidable/index.d.ts diff --git a/express-formidable/tsconfig.json b/types/express-formidable/tsconfig.json similarity index 100% rename from express-formidable/tsconfig.json rename to types/express-formidable/tsconfig.json diff --git a/express-graphql/express-graphql-tests.ts b/types/express-graphql/express-graphql-tests.ts similarity index 100% rename from express-graphql/express-graphql-tests.ts rename to types/express-graphql/express-graphql-tests.ts diff --git a/express-graphql/index.d.ts b/types/express-graphql/index.d.ts similarity index 100% rename from express-graphql/index.d.ts rename to types/express-graphql/index.d.ts diff --git a/express-graphql/tsconfig.json b/types/express-graphql/tsconfig.json similarity index 100% rename from express-graphql/tsconfig.json rename to types/express-graphql/tsconfig.json diff --git a/express-handlebars/express-handlebars-tests.ts b/types/express-handlebars/express-handlebars-tests.ts similarity index 100% rename from express-handlebars/express-handlebars-tests.ts rename to types/express-handlebars/express-handlebars-tests.ts diff --git a/express-handlebars/index.d.ts b/types/express-handlebars/index.d.ts similarity index 100% rename from express-handlebars/index.d.ts rename to types/express-handlebars/index.d.ts diff --git a/express-handlebars/tsconfig.json b/types/express-handlebars/tsconfig.json similarity index 100% rename from express-handlebars/tsconfig.json rename to types/express-handlebars/tsconfig.json diff --git a/express-jwt/express-jwt-tests.ts b/types/express-jwt/express-jwt-tests.ts similarity index 100% rename from express-jwt/express-jwt-tests.ts rename to types/express-jwt/express-jwt-tests.ts diff --git a/express-jwt/index.d.ts b/types/express-jwt/index.d.ts similarity index 100% rename from express-jwt/index.d.ts rename to types/express-jwt/index.d.ts diff --git a/express-jwt/tsconfig.json b/types/express-jwt/tsconfig.json similarity index 100% rename from express-jwt/tsconfig.json rename to types/express-jwt/tsconfig.json diff --git a/express-less/express-less-tests.ts b/types/express-less/express-less-tests.ts similarity index 100% rename from express-less/express-less-tests.ts rename to types/express-less/express-less-tests.ts diff --git a/express-less/index.d.ts b/types/express-less/index.d.ts similarity index 100% rename from express-less/index.d.ts rename to types/express-less/index.d.ts diff --git a/express-less/tsconfig.json b/types/express-less/tsconfig.json similarity index 100% rename from express-less/tsconfig.json rename to types/express-less/tsconfig.json diff --git a/express-minify/express-minify-tests.ts b/types/express-minify/express-minify-tests.ts similarity index 100% rename from express-minify/express-minify-tests.ts rename to types/express-minify/express-minify-tests.ts diff --git a/express-minify/index.d.ts b/types/express-minify/index.d.ts similarity index 100% rename from express-minify/index.d.ts rename to types/express-minify/index.d.ts diff --git a/express-minify/tsconfig.json b/types/express-minify/tsconfig.json similarity index 100% rename from express-minify/tsconfig.json rename to types/express-minify/tsconfig.json diff --git a/express-mung/express-mung-tests.ts b/types/express-mung/express-mung-tests.ts similarity index 100% rename from express-mung/express-mung-tests.ts rename to types/express-mung/express-mung-tests.ts diff --git a/express-mung/index.d.ts b/types/express-mung/index.d.ts similarity index 100% rename from express-mung/index.d.ts rename to types/express-mung/index.d.ts diff --git a/express-mung/tsconfig.json b/types/express-mung/tsconfig.json similarity index 100% rename from express-mung/tsconfig.json rename to types/express-mung/tsconfig.json diff --git a/express-myconnection/express-myconnection-tests.ts b/types/express-myconnection/express-myconnection-tests.ts similarity index 100% rename from express-myconnection/express-myconnection-tests.ts rename to types/express-myconnection/express-myconnection-tests.ts diff --git a/express-myconnection/index.d.ts b/types/express-myconnection/index.d.ts similarity index 100% rename from express-myconnection/index.d.ts rename to types/express-myconnection/index.d.ts diff --git a/express-myconnection/tsconfig.json b/types/express-myconnection/tsconfig.json similarity index 100% rename from express-myconnection/tsconfig.json rename to types/express-myconnection/tsconfig.json diff --git a/express-mysql-session/express-mysql-session-tests.ts b/types/express-mysql-session/express-mysql-session-tests.ts similarity index 100% rename from express-mysql-session/express-mysql-session-tests.ts rename to types/express-mysql-session/express-mysql-session-tests.ts diff --git a/express-mysql-session/index.d.ts b/types/express-mysql-session/index.d.ts similarity index 100% rename from express-mysql-session/index.d.ts rename to types/express-mysql-session/index.d.ts diff --git a/express-mysql-session/tsconfig.json b/types/express-mysql-session/tsconfig.json similarity index 100% rename from express-mysql-session/tsconfig.json rename to types/express-mysql-session/tsconfig.json diff --git a/express-mysql-session/tslint.json b/types/express-mysql-session/tslint.json similarity index 100% rename from express-mysql-session/tslint.json rename to types/express-mysql-session/tslint.json diff --git a/express-openapi/express-openapi-tests.ts b/types/express-openapi/express-openapi-tests.ts similarity index 100% rename from express-openapi/express-openapi-tests.ts rename to types/express-openapi/express-openapi-tests.ts diff --git a/express-openapi/index.d.ts b/types/express-openapi/index.d.ts similarity index 100% rename from express-openapi/index.d.ts rename to types/express-openapi/index.d.ts diff --git a/express-openapi/tsconfig.json b/types/express-openapi/tsconfig.json similarity index 100% rename from express-openapi/tsconfig.json rename to types/express-openapi/tsconfig.json diff --git a/express-partials/express-partials-tests.ts b/types/express-partials/express-partials-tests.ts similarity index 100% rename from express-partials/express-partials-tests.ts rename to types/express-partials/express-partials-tests.ts diff --git a/express-partials/index.d.ts b/types/express-partials/index.d.ts similarity index 100% rename from express-partials/index.d.ts rename to types/express-partials/index.d.ts diff --git a/express-partials/tsconfig.json b/types/express-partials/tsconfig.json similarity index 100% rename from express-partials/tsconfig.json rename to types/express-partials/tsconfig.json diff --git a/express-rate-limit/express-rate-limit-tests.ts b/types/express-rate-limit/express-rate-limit-tests.ts similarity index 84% rename from express-rate-limit/express-rate-limit-tests.ts rename to types/express-rate-limit/express-rate-limit-tests.ts index 761a6d23f8..624a2da10d 100644 --- a/express-rate-limit/express-rate-limit-tests.ts +++ b/types/express-rate-limit/express-rate-limit-tests.ts @@ -1,12 +1,12 @@ import RateLimit = require("express-rate-limit"); -var apiLimiter = new RateLimit({ +const apiLimiter = new RateLimit({ windowMs: 15 * 60 * 1000, // 15 minutes max: 100, delayMs: 0 // disabled }); -var createAccountLimiter = new RateLimit({ +const createAccountLimiter = new RateLimit({ windowMs: 60 * 60 * 1000, // 1 hour window delayAfter: 1, // begin slowing down responses after the first request delayMs: 3 * 1000, // slow down subsequent responses by 3 seconds per request @@ -20,6 +20,6 @@ class SomeStore implements RateLimit.Store { resetKey(key: string) { }; }; -var limiterWithStore = new RateLimit({ +const limiterWithStore = new RateLimit({ store: new SomeStore() }); diff --git a/express-rate-limit/index.d.ts b/types/express-rate-limit/index.d.ts similarity index 81% rename from express-rate-limit/index.d.ts rename to types/express-rate-limit/index.d.ts index 38ef8f8b29..ce09dbbf51 100644 --- a/express-rate-limit/index.d.ts +++ b/types/express-rate-limit/index.d.ts @@ -8,13 +8,13 @@ import express = require("express"); declare namespace RateLimit { type StoreIncrementCallback = (err?: {}, hits?: number) => void; - export interface Store { + interface Store { incr: (key: string, cb: StoreIncrementCallback) => void; resetAll: () => void; resetKey: (key: string) => void; } - export interface Options { + interface Options { delayAfter?: number; delayMs?: number; handlers?: () => any; @@ -29,9 +29,5 @@ declare namespace RateLimit { } } -interface RateLimitStatic { - new(options: RateLimit.Options): express.RequestHandler; -} - -declare var RateLimit: RateLimitStatic; +declare var RateLimit: new (options: RateLimit.Options) => express.RequestHandler; export = RateLimit; diff --git a/express-rate-limit/tsconfig.json b/types/express-rate-limit/tsconfig.json similarity index 100% rename from express-rate-limit/tsconfig.json rename to types/express-rate-limit/tsconfig.json diff --git a/express-rate-limit/tslint.json b/types/express-rate-limit/tslint.json similarity index 100% rename from express-rate-limit/tslint.json rename to types/express-rate-limit/tslint.json diff --git a/express-route-fs/express-route-fs-tests.ts b/types/express-route-fs/express-route-fs-tests.ts similarity index 100% rename from express-route-fs/express-route-fs-tests.ts rename to types/express-route-fs/express-route-fs-tests.ts diff --git a/express-route-fs/index.d.ts b/types/express-route-fs/index.d.ts similarity index 100% rename from express-route-fs/index.d.ts rename to types/express-route-fs/index.d.ts diff --git a/express-route-fs/tsconfig.json b/types/express-route-fs/tsconfig.json similarity index 100% rename from express-route-fs/tsconfig.json rename to types/express-route-fs/tsconfig.json diff --git a/express-serve-static-core/express-serve-static-core-tests.ts b/types/express-serve-static-core/express-serve-static-core-tests.ts similarity index 100% rename from express-serve-static-core/express-serve-static-core-tests.ts rename to types/express-serve-static-core/express-serve-static-core-tests.ts diff --git a/express-serve-static-core/index.d.ts b/types/express-serve-static-core/index.d.ts similarity index 99% rename from express-serve-static-core/index.d.ts rename to types/express-serve-static-core/index.d.ts index a4ce9612e7..a54481027d 100644 --- a/express-serve-static-core/index.d.ts +++ b/types/express-serve-static-core/index.d.ts @@ -96,6 +96,7 @@ interface IRouter extends RequestHandler { head: IRouterMatcher; checkout: IRouterMatcher; + connect: IRouterMatcher; copy: IRouterMatcher; lock: IRouterMatcher; merge: IRouterMatcher; @@ -104,6 +105,8 @@ interface IRouter extends RequestHandler { move: IRouterMatcher; "m-search": IRouterMatcher; notify: IRouterMatcher; + propfind: IRouterMatcher; + proppatch: IRouterMatcher; purge: IRouterMatcher; report: IRouterMatcher; search: IRouterMatcher; @@ -161,6 +164,8 @@ interface CookieOptions { path?: string; domain?: string; secure?: boolean | 'auto'; + encode?: (val: string) => void; + sameSite?: boolean | string; } interface Errback { (err: Error): void; } @@ -858,7 +863,7 @@ interface RequestParamHandler { (req: Request, res: Response, next: NextFunction, value: any, name: string): any; } -type ApplicaitonRequestHandler = IRouterHandler & IRouterMatcher & { +type ApplicationRequestHandler = IRouterHandler & IRouterMatcher & { (...handlers: RequestHandlerParams[]): T; }; @@ -1103,7 +1108,7 @@ interface Application extends IRouter, Express.Application { */ _router: any; - use: ApplicaitonRequestHandler; + use: ApplicationRequestHandler; } interface Express extends Application { diff --git a/express-serve-static-core/tsconfig.json b/types/express-serve-static-core/tsconfig.json similarity index 100% rename from express-serve-static-core/tsconfig.json rename to types/express-serve-static-core/tsconfig.json diff --git a/express-session/express-session-tests.ts b/types/express-session/express-session-tests.ts similarity index 100% rename from express-session/express-session-tests.ts rename to types/express-session/express-session-tests.ts diff --git a/express-session/index.d.ts b/types/express-session/index.d.ts similarity index 100% rename from express-session/index.d.ts rename to types/express-session/index.d.ts diff --git a/express-session/tsconfig.json b/types/express-session/tsconfig.json similarity index 100% rename from express-session/tsconfig.json rename to types/express-session/tsconfig.json diff --git a/express-unless/express-unless-tests.ts b/types/express-unless/express-unless-tests.ts similarity index 100% rename from express-unless/express-unless-tests.ts rename to types/express-unless/express-unless-tests.ts diff --git a/express-unless/index.d.ts b/types/express-unless/index.d.ts similarity index 100% rename from express-unless/index.d.ts rename to types/express-unless/index.d.ts diff --git a/express-unless/tsconfig.json b/types/express-unless/tsconfig.json similarity index 100% rename from express-unless/tsconfig.json rename to types/express-unless/tsconfig.json diff --git a/express-useragent/express-useragent-tests.ts b/types/express-useragent/express-useragent-tests.ts similarity index 100% rename from express-useragent/express-useragent-tests.ts rename to types/express-useragent/express-useragent-tests.ts diff --git a/express-useragent/index.d.ts b/types/express-useragent/index.d.ts similarity index 100% rename from express-useragent/index.d.ts rename to types/express-useragent/index.d.ts diff --git a/express-useragent/tsconfig.json b/types/express-useragent/tsconfig.json similarity index 100% rename from express-useragent/tsconfig.json rename to types/express-useragent/tsconfig.json diff --git a/express-validator/express-validator-tests.ts b/types/express-validator/express-validator-tests.ts similarity index 100% rename from express-validator/express-validator-tests.ts rename to types/express-validator/express-validator-tests.ts diff --git a/express-validator/index.d.ts b/types/express-validator/index.d.ts similarity index 100% rename from express-validator/index.d.ts rename to types/express-validator/index.d.ts diff --git a/express-validator/tsconfig.json b/types/express-validator/tsconfig.json similarity index 100% rename from express-validator/tsconfig.json rename to types/express-validator/tsconfig.json diff --git a/express/express-tests.ts b/types/express/express-tests.ts similarity index 100% rename from express/express-tests.ts rename to types/express/express-tests.ts diff --git a/express/index.d.ts b/types/express/index.d.ts similarity index 100% rename from express/index.d.ts rename to types/express/index.d.ts diff --git a/express/tsconfig.json b/types/express/tsconfig.json similarity index 100% rename from express/tsconfig.json rename to types/express/tsconfig.json diff --git a/extend/extend-tests.ts b/types/extend/extend-tests.ts similarity index 100% rename from extend/extend-tests.ts rename to types/extend/extend-tests.ts diff --git a/extend/index.d.ts b/types/extend/index.d.ts similarity index 100% rename from extend/index.d.ts rename to types/extend/index.d.ts diff --git a/extend/tsconfig.json b/types/extend/tsconfig.json similarity index 100% rename from extend/tsconfig.json rename to types/extend/tsconfig.json diff --git a/extended-listbox/extended-listbox-tests.ts b/types/extended-listbox/extended-listbox-tests.ts similarity index 100% rename from extended-listbox/extended-listbox-tests.ts rename to types/extended-listbox/extended-listbox-tests.ts diff --git a/extended-listbox/index.d.ts b/types/extended-listbox/index.d.ts similarity index 100% rename from extended-listbox/index.d.ts rename to types/extended-listbox/index.d.ts diff --git a/extended-listbox/tsconfig.json b/types/extended-listbox/tsconfig.json similarity index 100% rename from extended-listbox/tsconfig.json rename to types/extended-listbox/tsconfig.json diff --git a/extjs/extjs-tests.ts b/types/extjs/extjs-tests.ts similarity index 100% rename from extjs/extjs-tests.ts rename to types/extjs/extjs-tests.ts diff --git a/extjs/index.d.ts b/types/extjs/index.d.ts similarity index 100% rename from extjs/index.d.ts rename to types/extjs/index.d.ts diff --git a/extjs/tsconfig.json b/types/extjs/tsconfig.json similarity index 100% rename from extjs/tsconfig.json rename to types/extjs/tsconfig.json diff --git a/extract-text-webpack-plugin/extract-text-webpack-plugin-tests.ts b/types/extract-text-webpack-plugin/extract-text-webpack-plugin-tests.ts similarity index 100% rename from extract-text-webpack-plugin/extract-text-webpack-plugin-tests.ts rename to types/extract-text-webpack-plugin/extract-text-webpack-plugin-tests.ts diff --git a/extract-text-webpack-plugin/index.d.ts b/types/extract-text-webpack-plugin/index.d.ts similarity index 100% rename from extract-text-webpack-plugin/index.d.ts rename to types/extract-text-webpack-plugin/index.d.ts diff --git a/extract-text-webpack-plugin/tsconfig.json b/types/extract-text-webpack-plugin/tsconfig.json similarity index 100% rename from extract-text-webpack-plugin/tsconfig.json rename to types/extract-text-webpack-plugin/tsconfig.json diff --git a/extract-zip/extract-zip-tests.ts b/types/extract-zip/extract-zip-tests.ts similarity index 100% rename from extract-zip/extract-zip-tests.ts rename to types/extract-zip/extract-zip-tests.ts diff --git a/extract-zip/index.d.ts b/types/extract-zip/index.d.ts similarity index 94% rename from extract-zip/index.d.ts rename to types/extract-zip/index.d.ts index 52ce40094f..9edd2fcb31 100644 --- a/extract-zip/index.d.ts +++ b/types/extract-zip/index.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace extract { - export interface Options { + interface Options { dir?: string; defaultDirMode?: number; defaultFileMode?: number; diff --git a/extract-zip/tsconfig.json b/types/extract-zip/tsconfig.json similarity index 100% rename from extract-zip/tsconfig.json rename to types/extract-zip/tsconfig.json diff --git a/extract-zip/tslint.json b/types/extract-zip/tslint.json similarity index 100% rename from extract-zip/tslint.json rename to types/extract-zip/tslint.json diff --git a/eyes/eyes-tests.ts b/types/eyes/eyes-tests.ts similarity index 100% rename from eyes/eyes-tests.ts rename to types/eyes/eyes-tests.ts diff --git a/eyes/index.d.ts b/types/eyes/index.d.ts similarity index 100% rename from eyes/index.d.ts rename to types/eyes/index.d.ts diff --git a/eyes/tsconfig.json b/types/eyes/tsconfig.json similarity index 100% rename from eyes/tsconfig.json rename to types/eyes/tsconfig.json diff --git a/f1/f1-tests.ts b/types/f1/f1-tests.ts similarity index 100% rename from f1/f1-tests.ts rename to types/f1/f1-tests.ts diff --git a/f1/index.d.ts b/types/f1/index.d.ts similarity index 100% rename from f1/index.d.ts rename to types/f1/index.d.ts diff --git a/f1/tsconfig.json b/types/f1/tsconfig.json similarity index 100% rename from f1/tsconfig.json rename to types/f1/tsconfig.json diff --git a/f1/tslint.json b/types/f1/tslint.json similarity index 100% rename from f1/tslint.json rename to types/f1/tslint.json diff --git a/fabric/fabric-tests.ts b/types/fabric/fabric-tests.ts similarity index 78% rename from fabric/fabric-tests.ts rename to types/fabric/fabric-tests.ts index 923b29d896..e94b676104 100644 --- a/fabric/fabric-tests.ts +++ b/types/fabric/fabric-tests.ts @@ -1,7 +1,7 @@ import * as fabric from "fabric"; function sample1() { - var canvas = new fabric.Canvas('c', { + const canvas = new fabric.Canvas('c', { hoverCursor: 'pointer', selection: false, }); @@ -13,7 +13,7 @@ function sample1() { e.target.opacity = 1; }); - for (var i = 0, len = 15; i < len; i++) { + for (let i = 0; i < 15; i++) { fabric.Image.fromURL('../assets/ladybug.png', img => { img.set({ left: fabric.util.getRandomInt(0, 600), @@ -33,17 +33,16 @@ function sample1() { } function sample2() { - - var dot: fabric.Circle, i: number, - t1: number, t2: number, - startTimer = () => { - t1 = new Date().getTime(); - return t1; - }, - stopTimer = () => { - t2 = new Date().getTime(); - return t2 - t1; - }, + let dot: fabric.Circle, i: number; + let t1: number, t2: number; + const startTimer = () => { + t1 = new Date().getTime(); + return t1; + }; + const stopTimer = () => { + t2 = new Date().getTime(); + return t2 - t1; + }, getRandomInt = fabric.util.getRandomInt, rainbow = ["#ffcc66", "#ccff66", "#66ccff", "#ff6fcf", "#ff6666"], rainbowEnd = rainbow.length - 1; @@ -51,7 +50,7 @@ function sample2() { // // Rendering canvas #1 // - var canvas1 = new fabric.Canvas('c1', { backgroundColor: "#000" }), + const canvas1 = new fabric.Canvas('c1', { backgroundColor: "#000" }), results1 = document.getElementById('results-c1'); startTimer(); @@ -66,11 +65,10 @@ function sample2() { } results1.innerHTML = 'Regular rendering of 100 elements in ' + stopTimer() + 'ms'; - // // Rendering canvas #2 // - var canvas2 = new fabric.Canvas('c2', { backgroundColor: "#000", renderOnAddRemove: false }), + const canvas2 = new fabric.Canvas('c2', { backgroundColor: "#000", renderOnAddRemove: false }), results2 = document.getElementById('results-c2'); startTimer(); @@ -88,35 +86,34 @@ function sample2() { } function sample3() { - - var $: (id: string) => HTMLElement = (id: string) => document.getElementById(id); + const $: (id: string) => HTMLElement = (id: string) => document.getElementById(id); function applyFilter(index: number, filter: any) { - var obj: fabric.Image = canvas.getActiveObject(); + const obj: fabric.Image = canvas.getActiveObject(); obj.filters[index] = filter; obj.applyFilters(canvas.renderAll.bind(canvas)); } function applyFilterValue(index: number, prop: string, value: any) { - var obj: fabric.Image = canvas.getActiveObject(); + const obj: fabric.Image = canvas.getActiveObject(); if (obj.filters[index]) { obj.applyFilters(canvas.renderAll.bind(canvas)); } } - var canvas = new fabric.Canvas('c', { backgroundImage: '../lib/bg.png' }), + const canvas = new fabric.Canvas('c', { backgroundImage: '../lib/bg.png' }), f = fabric.Image.filters; canvas.on({ 'object:selected': () => { fabric.util.toArray(document.getElementsByTagName('input')).forEach(el => { el.disabled = false; }); - var filters = ['grayscale', 'invert', 'remove-white', 'sepia', 'sepia2', 'brightness', + const filters = ['grayscale', 'invert', 'remove-white', 'sepia', 'sepia2', 'brightness', 'noise', 'gradient-transparency', 'pixelate', 'blur', 'sharpen']; - for (var i = 0; i < filters.length; i++) { - var checkBox = $(filters[i]); - var image = canvas.getActiveObject(); + for (let i = 0; i < filters.length; i++) { + const checkBox = $(filters[i]); + const image = canvas.getActiveObject(); checkBox.checked = !!image.filters[i]; } }, @@ -126,7 +123,7 @@ function sample3() { }); fabric.Image.fromURL('../assets/printio.png', img => { - var oImg = img.set({ left: 300, top: 300, angle: -15 }).scale(0.9); + const oImg = img.set({ left: 300, top: 300, angle: -15 }).scale(0.9); canvas.add(oImg).renderAll(); canvas.setActiveObject(oImg); }); @@ -211,11 +208,10 @@ function sample3() { } function sample4() { + const canvas = new fabric.Canvas('c'); + const $: (id: string) => HTMLElement = id => document.getElementById(id); - var canvas = new fabric.Canvas('c'); - var $: (id: string) => HTMLElement = id => document.getElementById(id); - - var rect = new fabric.Rect({ + const rect = new fabric.Rect({ width: 100, height: 100, top: 150, @@ -225,32 +221,31 @@ function sample4() { canvas.add(rect); - var angleControl = $('angle-control'); + const angleControl = $('angle-control'); angleControl.onchange = function(this: HTMLInputElement) { rect.setAngle(+this.value).setCoords(); canvas.renderAll(); }; - var scaleControl = $('scale-control'); + const scaleControl = $('scale-control'); scaleControl.onchange = function(this: HTMLInputElement) { rect.scale(+this.value).setCoords(); canvas.renderAll(); }; - var topControl = $('top-control'); + const topControl = $('top-control'); topControl.onchange = function(this: HTMLInputElement) { rect.setTop(+this.value).setCoords(); canvas.renderAll(); }; - var leftControl = $('left-control'); + const leftControl = $('left-control'); leftControl.onchange = function(this: HTMLInputElement) { rect.setLeft(+this.value).setCoords(); canvas.renderAll(); }; function updateControls() { - scaleControl.value = rect.getScaleX().toString(); angleControl.value = rect.getAngle().toString(); leftControl.value = rect.getLeft().toString(); @@ -263,7 +258,6 @@ function sample4() { }); } - declare module "fabric" { export interface CircleWithLineInfos extends Circle { line1?: Line; @@ -274,8 +268,8 @@ declare module "fabric" { } function sample5() { - var makeCircle = (left: number, top: number, line1?: fabric.Line, line2?: fabric.Line, line3?: fabric.Line, line4?: fabric.Line): fabric.Circle => { - var c = new fabric.Circle({ + const makeCircle = (left: number, top: number, line1?: fabric.Line, line2?: fabric.Line, line3?: fabric.Line, line4?: fabric.Line): fabric.Circle => { + const c = new fabric.Circle({ left, top, strokeWidth: 5, @@ -300,9 +294,9 @@ function sample5() { }); } - var canvas = new fabric.Canvas('c', { selection: false }); + const canvas = new fabric.Canvas('c', { selection: false }); - var line = makeLine([250, 125, 250, 175]), + const line = makeLine([250, 125, 250, 175]), line2 = makeLine([250, 175, 250, 250]), line3 = makeLine([250, 250, 300, 350]), line4 = makeLine([250, 250, 200, 350]), @@ -322,7 +316,7 @@ function sample5() { ); canvas.on('object:moving', e => { - var p = e.target; + const p = e.target; p.line1 && p.line1.set({ 'x2': p.left, 'y2': p.top }); p.line2 && p.line2.set({ 'x1': p.left, 'y1': p.top }); p.line3 && p.line3.set({ 'x1': p.left, 'y1': p.top }); @@ -332,9 +326,9 @@ function sample5() { } function sample6() { - var canvas = new fabric.Canvas('c'); + const canvas = new fabric.Canvas('c'); fabric.loadSVGFromURL('../assets/135.svg', objects => { - var obj = objects[0].scale(0.25); + const obj = objects[0].scale(0.25); canvas.centerObject(obj); canvas.add(obj); @@ -344,17 +338,15 @@ function sample6() { canvas.add(obj.clone(() => { }).set({ left: 480, top: 400, angle: 15 })); canvas.on('mouse:move', options => { - var p = canvas.getPointer(options.e); + const p = canvas.getPointer(options.e); canvas.forEachObject(obj => { - var distX = Math.abs(p.x - obj.left), + const distX = Math.abs(p.x - obj.left), distY = Math.abs(p.y - obj.top), dist = Math.round(Math.sqrt(Math.pow(distX, 2) + Math.pow(distY, 2))); obj.setOpacity(1 / (dist / 20)); }); - }); - }); } @@ -365,22 +357,20 @@ declare module "fabric" { } function sample7() { - - var canvas = new fabric.Canvas('c', { selection: false }); + const canvas = new fabric.Canvas('c', { selection: false }); setInterval(() => { fabric.Image.fromURL('../assets/ladybug.png', obj => { - var img = obj; + const img = obj; img.set('left', fabric.util.getRandomInt(200, 600)).set('top', -50); img.movingLeft = !!Math.round(Math.random()); canvas.add(img); }); }, 1000); - - var animate = (function animate() { + const animate = (function animate() { canvas.forEachObject(obj => { - var img = obj; + const img = obj; img.left += (img.movingLeft ? -1 : 1); img.top += 1; if (img.left > 900 || img.top > 500) { @@ -397,7 +387,6 @@ function sample7() { } function sample8() { - function pad(str: string, length: number): string { while (str.length < length) { str = '0' + str; @@ -405,7 +394,7 @@ function sample8() { return str; } - var getRandomInt = fabric.util.getRandomInt; + const getRandomInt = fabric.util.getRandomInt; function getRandomColor() { return ( @@ -423,18 +412,18 @@ function sample8() { (fabric.Object.prototype as any).cornersize = 30; } - var canvas = new fabric.Canvas('canvas'); + const canvas = new fabric.Canvas('canvas'); // canvas.controlsAboveOverlay = true; function updateComplexity() { setTimeout(() => { - var element = document.getElementById('complexity').childNodes[1]; + const element = document.getElementById('complexity').childNodes[1]; element.innerHTML = ' ' + canvas.complexity(); }, 100); } document.getElementById('commands').onclick = (ev: any) => { - var ev: any = ev || window.event; + ev = ev || window.event; if (ev.preventDefault) { ev.preventDefault(); @@ -442,12 +431,12 @@ function sample8() { ev.returnValue = false; } - var element: any = ev.target || ev.srcElement; + let element: any = ev.target || ev.srcElement; if (element.nodeName.toLowerCase() === 'strong') { element = element.parentNode; } - var className = element.className, + const className = element.className, offset = 50, left = fabric.util.getRandomInt(0 + offset, 700 - offset), top = fabric.util.getRandomInt(0 + offset, 500 - offset), @@ -455,7 +444,6 @@ function sample8() { width = fabric.util.getRandomInt(30, 50), opacity = ((min: number, max: number) => Math.random() * (max - min) + min)(0.5, 1); - switch (className) { case 'rect': canvas.add(new fabric.Rect({ @@ -519,11 +507,11 @@ function sample8() { break; case 'shape': - var id: any = element.id; + const id: any = element.id; const match = /\d+$/.exec(id); if (match) { fabric.loadSVGFromURL('../assets/' + match[0] + '.svg', (objects, options) => { - var loadedObject = fabric.util.groupSVGElements(objects, options); + const loadedObject = fabric.util.groupSVGElements(objects, options); loadedObject.set({ left, @@ -552,13 +540,12 @@ function sample8() { }; document.getElementById('execute').onclick = () => { - var code = ( document.getElementById('canvas-console')).value; + const code = ( document.getElementById('canvas-console')).value; if (!(/^\s+$/).test(code)) { eval(code); // tslint:disable-line:no-eval } }; - document.getElementById('rasterize').onclick = () => { if (!fabric.Canvas.supports('toDataURL')) { alert('This browser doesn\'t provide means to serialize canvas to an image'); @@ -567,14 +554,14 @@ function sample8() { } }; - var removeSelectedEl = document.getElementById('remove-selected'); + const removeSelectedEl = document.getElementById('remove-selected'); removeSelectedEl.onclick = () => { - var activeObject = canvas.getActiveObject(), + const activeObject = canvas.getActiveObject(), activeGroup = canvas.getActiveGroup(); if (activeObject) { canvas.remove(activeObject); } else if (activeGroup) { - var objectsInGroup = activeGroup.getObjects(); + const objectsInGroup = activeGroup.getObjects(); canvas.discardActiveGroup(); objectsInGroup.forEach(object => { canvas.remove(object); @@ -582,9 +569,9 @@ function sample8() { } }; - var supportsInputOfType = (type: string) => { + const supportsInputOfType = (type: string) => { return () => { - var el = document.createElement('input'); + const el = document.createElement('input'); try { el.type = type; } catch (err) { } @@ -592,18 +579,18 @@ function sample8() { }; }; - var supportsSlider = supportsInputOfType('range'), + const supportsSlider = supportsInputOfType('range'), supportsColorpicker = supportsInputOfType('color'); if (supportsSlider()) { (() => { - var controls = document.getElementById('controls'); + const controls = document.getElementById('controls'); - var sliderLabel = document.createElement('label'); + const sliderLabel = document.createElement('label'); sliderLabel.htmlFor = 'opacity'; sliderLabel.innerHTML = 'Opacity: '; - var slider = document.createElement('input'); + const slider = document.createElement('input'); try { slider.type = 'range'; } catch (err) { } @@ -616,7 +603,7 @@ function sample8() { canvas.calcOffset(); slider.onchange = function() { - var activeObject = canvas.getActiveObject(), + const activeObject = canvas.getActiveObject(), activeGroup = canvas.getActiveGroup(); if (activeObject || activeGroup) { @@ -629,14 +616,14 @@ function sample8() { if (supportsColorpicker()) { (() => { - var controls = document.getElementById('controls'); + const controls = document.getElementById('controls'); - var label = document.createElement('label'); + const label = document.createElement('label'); label.htmlFor = 'color'; label.innerHTML = 'Color: '; label.style.marginLeft = '10px'; - var colorpicker = document.createElement('input'); + const colorpicker = document.createElement('input'); colorpicker.type = 'color'; colorpicker.id = 'color'; colorpicker.style.width = '40px'; @@ -647,7 +634,7 @@ function sample8() { canvas.calcOffset(); colorpicker.onchange = function() { - var activeObject = canvas.getActiveObject(), + const activeObject = canvas.getActiveObject(), activeGroup = canvas.getActiveGroup(); if (activeObject || activeGroup) { @@ -658,9 +645,9 @@ function sample8() { })(); } - var lockHorizontallyEl = document.getElementById('lock-horizontally'); + const lockHorizontallyEl = document.getElementById('lock-horizontally'); lockHorizontallyEl.onclick = () => { - var activeObject: any = canvas.getActiveObject(); + const activeObject: any = canvas.getActiveObject(); if (activeObject) { activeObject.lockMovementX = !activeObject.lockMovementX; lockHorizontallyEl.innerHTML = activeObject.lockMovementX @@ -669,9 +656,9 @@ function sample8() { } }; - var lockVerticallyEl = document.getElementById('lock-vertically'); + const lockVerticallyEl = document.getElementById('lock-vertically'); lockVerticallyEl.onclick = () => { - var activeObject: any = canvas.getActiveObject(); + const activeObject: any = canvas.getActiveObject(); if (activeObject) { activeObject.lockMovementY = !activeObject.lockMovementY; lockVerticallyEl.innerHTML = activeObject.lockMovementY @@ -680,9 +667,9 @@ function sample8() { } }; - var lockScalingXEl = document.getElementById('lock-scaling-x'); + const lockScalingXEl = document.getElementById('lock-scaling-x'); lockScalingXEl.onclick = () => { - var activeObject: any = canvas.getActiveObject(); + const activeObject: any = canvas.getActiveObject(); if (activeObject) { activeObject.lockScalingX = !activeObject.lockScalingX; lockScalingXEl.innerHTML = activeObject.lockScalingX @@ -691,9 +678,9 @@ function sample8() { } }; - var lockScalingYEl = document.getElementById('lock-scaling-y'); + const lockScalingYEl = document.getElementById('lock-scaling-y'); lockScalingYEl.onclick = () => { - var activeObject: any = canvas.getActiveObject(); + const activeObject: any = canvas.getActiveObject(); if (activeObject) { activeObject.lockScalingY = !activeObject.lockScalingY; lockScalingYEl.innerHTML = activeObject.lockScalingY @@ -702,9 +689,9 @@ function sample8() { } }; - var lockRotationEl = document.getElementById('lock-rotation'); + const lockRotationEl = document.getElementById('lock-rotation'); lockRotationEl.onclick = () => { - var activeObject: any = canvas.getActiveObject(); + const activeObject: any = canvas.getActiveObject(); if (activeObject) { activeObject.lockRotation = !activeObject.lockRotation; lockRotationEl.innerHTML = activeObject.lockRotation @@ -713,9 +700,9 @@ function sample8() { } }; - var gradientifyBtn = document.getElementById('gradientify'); + const gradientifyBtn = document.getElementById('gradientify'); - var activeObjectButtons = [ + const activeObjectButtons = [ lockHorizontallyEl, lockVerticallyEl, lockScalingXEl, @@ -725,16 +712,16 @@ function sample8() { gradientifyBtn ]; - var opacityEl = document.getElementById('opacity'); + const opacityEl = document.getElementById('opacity'); if (opacityEl) { activeObjectButtons.push(opacityEl); } - var colorEl = document.getElementById('color'); + const colorEl = document.getElementById('color'); if (colorEl) { activeObjectButtons.push(colorEl); } - for (var i = activeObjectButtons.length; i--; ) { + for (let i = activeObjectButtons.length; i--; ) { activeObjectButtons[i]; } @@ -742,9 +729,9 @@ function sample8() { canvas.on('group:selected', onObjectSelected); function onObjectSelected(e: fabric.IEvent) { - var selectedObject = e.target; + const selectedObject = e.target; - for (var i = activeObjectButtons.length; i--; ) { + for (let i = activeObjectButtons.length; i--; ) { activeObjectButtons[i]; } @@ -756,18 +743,18 @@ function sample8() { } canvas.on('selection:cleared', e => { - for (var i = activeObjectButtons.length; i--; ) { + for (let i = activeObjectButtons.length; i--; ) { activeObjectButtons[i]; } }); - var drawingModeEl = document.getElementById('drawing-mode'), + const drawingModeEl = document.getElementById('drawing-mode'), drawingOptionsEl = document.getElementById('drawing-mode-options'), drawingColorEl = document.getElementById('drawing-color'), drawingLineWidthEl = document.getElementById('drawing-line-width'); drawingModeEl.onclick = () => { - var canvasWithDrawingMode: any = canvas; + const canvasWithDrawingMode: any = canvas; canvasWithDrawingMode.isDrawingMode = !canvasWithDrawingMode.isDrawingMode; if (canvasWithDrawingMode.isDrawingMode) { drawingModeEl.innerHTML = 'Cancel drawing mode'; @@ -794,12 +781,11 @@ function sample8() { canvas.freeDrawingColor = drawingColorEl.value; canvas.freeDrawingLineWidth = parseInt(drawingLineWidthEl.value, 10) || 1; - - var text = 'Lorem ipsum dolor sit amet,\nconsectetur adipisicing elit,\nsed do eiusmod tempor incididunt\nut labore et dolore magna aliqua.\n' + + const text = 'Lorem ipsum dolor sit amet,\nconsectetur adipisicing elit,\nsed do eiusmod tempor incididunt\nut labore et dolore magna aliqua.\n' + 'Ut enim ad minim veniam,\nquis nostrud exercitation ullamco\nlaboris nisi ut aliquip ex ea commodo consequat.'; document.getElementById('add-text').onclick = () => { - var textSample = new fabric.Text(text.slice(0, getRandomInt(0, text.length)), { + const textSample = new fabric.Text(text.slice(0, getRandomInt(0, text.length)), { left: getRandomInt(350, 400), top: getRandomInt(350, 400), fontFamily: 'helvetica', @@ -813,13 +799,12 @@ function sample8() { updateComplexity(); }; - document.onkeydown = e => { - var obj = canvas.getActiveObject() || canvas.getActiveGroup(); + const obj = canvas.getActiveObject() || canvas.getActiveGroup(); if (obj && e.keyCode === 8) { // this is horrible. need to fix, so that unified interface can be used if (obj.type === 'group') { - // var groupObjects = obj.getObjects(); + // const groupObjects = obj.getObjects(); // canvas.discardActiveGroup(); // groupObjects.forEach(function(obj) { // canvas.remove(obj); @@ -842,7 +827,7 @@ function sample8() { } gradientifyBtn.onclick = () => { - var obj = canvas.getActiveObject(); + const obj = canvas.getActiveObject(); if (obj) { obj.setGradient("fill", { x2: (getRandomInt(0, 1) ? 0 : obj.width), @@ -856,17 +841,17 @@ function sample8() { } }; - var textEl = document.getElementById('text'); + const textEl = document.getElementById('text'); if (textEl) { textEl.onfocus = function() { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { this.value = ( activeObject).text; } }; textEl.onkeyup = function(e) { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject) { if (!this.value) { canvas.discardActiveObject(); @@ -878,11 +863,11 @@ function sample8() { }; } - var cmdUnderlineBtn = document.getElementById('text-cmd-underline'); + const cmdUnderlineBtn = document.getElementById('text-cmd-underline'); if (cmdUnderlineBtn) { activeObjectButtons.push(cmdUnderlineBtn); cmdUnderlineBtn.onclick = function() { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.textDecoration = (activeObject.textDecoration === 'underline' ? '' : 'underline'); this.className = activeObject.textDecoration ? 'selected' : ''; @@ -891,11 +876,11 @@ function sample8() { }; } - var cmdLinethroughBtn = document.getElementById('text-cmd-linethrough'); + const cmdLinethroughBtn = document.getElementById('text-cmd-linethrough'); if (cmdLinethroughBtn) { activeObjectButtons.push(cmdLinethroughBtn); cmdLinethroughBtn.onclick = function() { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.textDecoration = (activeObject.textDecoration === 'line-through' ? '' : 'line-through'); this.className = activeObject.textDecoration ? 'selected' : ''; @@ -904,11 +889,11 @@ function sample8() { }; } - var cmdOverlineBtn = document.getElementById('text-cmd-overline'); + const cmdOverlineBtn = document.getElementById('text-cmd-overline'); if (cmdOverlineBtn) { activeObjectButtons.push(cmdOverlineBtn); cmdOverlineBtn.onclick = function() { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.textDecoration = (activeObject.textDecoration === 'overline' ? '' : 'overline'); this.className = activeObject.textDecoration ? 'selected' : ''; @@ -917,11 +902,11 @@ function sample8() { }; } - var cmdBoldBtn = document.getElementById('text-cmd-bold'); + const cmdBoldBtn = document.getElementById('text-cmd-bold'); if (cmdBoldBtn) { activeObjectButtons.push(cmdBoldBtn); cmdBoldBtn.onclick = function() { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.fontWeight = (activeObject.fontWeight === 'bold' ? '' : 'bold'); this.className = activeObject.fontWeight ? 'selected' : ''; @@ -930,11 +915,11 @@ function sample8() { }; } - var cmdItalicBtn = document.getElementById('text-cmd-italic'); + const cmdItalicBtn = document.getElementById('text-cmd-italic'); if (cmdItalicBtn) { activeObjectButtons.push(cmdItalicBtn); cmdItalicBtn.onclick = function() { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.fontStyle = (activeObject.fontStyle === 'italic' ? '' : 'italic'); this.className = activeObject.fontStyle ? 'selected' : ''; @@ -943,11 +928,11 @@ function sample8() { }; } - var cmdShadowBtn = document.getElementById('text-cmd-shadow'); + const cmdShadowBtn = document.getElementById('text-cmd-shadow'); if (cmdShadowBtn) { activeObjectButtons.push(cmdShadowBtn); cmdShadowBtn.onclick = function() { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.shadow = !activeObject.shadow ? 'rgba(0,0,0,0.2) 2px 2px 10px' : ''; this.className = activeObject.shadow ? 'selected' : ''; @@ -956,11 +941,11 @@ function sample8() { }; } - var textAlignSwitch = document.getElementById('text-align'); + const textAlignSwitch = document.getElementById('text-align'); if (textAlignSwitch) { activeObjectButtons.push(textAlignSwitch); textAlignSwitch.onchange = function(this: HTMLInputElement) { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.textAlign = this.value.toLowerCase(); canvas.renderAll(); @@ -968,11 +953,11 @@ function sample8() { }; } - var fontFamilySwitch = document.getElementById('font-family'); + const fontFamilySwitch = document.getElementById('font-family'); if (fontFamilySwitch) { activeObjectButtons.push(fontFamilySwitch); fontFamilySwitch.onchange = function(this: HTMLInputElement) { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.fontFamily = this.value; canvas.renderAll(); @@ -980,10 +965,10 @@ function sample8() { }; } - var bgColorField = document.getElementById('text-bg-color'); + const bgColorField = document.getElementById('text-bg-color'); if (bgColorField) { bgColorField.onchange = function(this: HTMLInputElement) { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.backgroundColor = this.value; canvas.renderAll(); @@ -991,10 +976,10 @@ function sample8() { }; } - var strokeColorField = document.getElementById('text-stroke-color'); + const strokeColorField = document.getElementById('text-stroke-color'); if (strokeColorField) { strokeColorField.onchange = function(this: HTMLInputElement) { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.stroke = this.value; canvas.renderAll(); @@ -1004,9 +989,9 @@ function sample8() { if (supportsSlider) { (() => { - var container = document.getElementById('text-controls'); - var slider = document.createElement('input'); - var label = document.createElement('label'); + const container = document.getElementById('text-controls'); + const slider = document.createElement('input'); + const label = document.createElement('label'); label.innerHTML = 'Line height: '; try { slider.type = 'range'; } catch (err) { } slider.min = "0"; @@ -1017,7 +1002,7 @@ function sample8() { label.appendChild(slider); slider.title = "Line height"; slider.onchange = function() { - var activeObject = canvas.getActiveObject(); + const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.lineHeight = +this.value; canvas.renderAll(); @@ -1031,9 +1016,9 @@ function sample8() { } document.getElementById('load-svg').onclick = () => { - var svg = ( document.getElementById('svg-console')).value; + const svg = ( document.getElementById('svg-console')).value; fabric.loadSVGFromString(svg, (objects, options) => { - var obj = fabric.util.groupSVGElements(objects, options); + const obj = fabric.util.groupSVGElements(objects, options); canvas.add(obj).centerObject(obj).renderAll(); obj.setCoords(); }); @@ -1041,7 +1026,7 @@ function sample8() { } function sample9() { - var canvas = new fabric.Canvas('c'); + const canvas = new fabric.Canvas('c'); canvas.setBackgroundImage('yolo.jpg', () => { "a"; }, { opacity: 45 }); canvas.setBackgroundImage('yolo.jpg', () => { "a"; }); } diff --git a/fabric/index.d.ts b/types/fabric/index.d.ts similarity index 99% rename from fabric/index.d.ts rename to types/fabric/index.d.ts index 881be190bd..27a4188f52 100644 --- a/fabric/index.d.ts +++ b/types/fabric/index.d.ts @@ -5,8 +5,8 @@ export as namespace fabric; -export var isLikelyNode: boolean; -export var isTouchSupported: boolean; +export const isLikelyNode: boolean; +export const isTouchSupported: boolean; ///////////////////////////////////////////////////////////// // farbic Functions @@ -1289,7 +1289,6 @@ export class StaticCanvas { */ fxStraightenObject(object: Object): StaticCanvas - static EMPTY_JSON: string; /** * Provides a way to check support of some of the canvas methods @@ -2997,8 +2996,8 @@ interface IRectOptions extends IObjectOptions { * Vertical border radius */ ry?: number; - } + export interface Rect extends IRectOptions {} export class Rect extends Object { /** @@ -3950,8 +3949,8 @@ export class BaseBrush { * @param {Object|String} [options] Options object or string (e.g. "2px 2px 10px rgba(0,0,0,0.2)") */ setShadow(options: string|any): BaseBrush; - } + export class CircleBrush extends BaseBrush { /** * Width of a brush @@ -3969,6 +3968,7 @@ export class CircleBrush extends BaseBrush { */ addPoint(pointer: any): Point } + export class SprayBrush extends BaseBrush { /** * Width of a brush @@ -4147,7 +4147,6 @@ interface IUtilArc { * @param {Number} y3 */ getBoundsOfCurve(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, x3: number, y3: number): Point[]; - } interface IUtilDomEvent { @@ -4298,7 +4297,6 @@ interface IUtilClass { * (be careful modifying objects defined here as this would affect all instances) */ createClass(properties?: any): void; - } interface IUtilObject { @@ -4517,7 +4515,7 @@ interface IUtilMisc { isTransparent(ctx: CanvasRenderingContext2D, x: number, y: number, tolerance: number): boolean; } -export var util: IUtil; +export const util: IUtil; interface IUtil extends IUtilAnimation, IUtilArc, IObservable, IUtilDomEvent, IUtilDomMisc, IUtilDomRequest, IUtilDomStyle, IUtilClass, IUtilMisc { ease: IUtilAnimEase; diff --git a/fabric/tsconfig.json b/types/fabric/tsconfig.json similarity index 100% rename from fabric/tsconfig.json rename to types/fabric/tsconfig.json diff --git a/fabric/tslint.json b/types/fabric/tslint.json similarity index 100% rename from fabric/tslint.json rename to types/fabric/tslint.json diff --git a/facebook-js-sdk/facebook-js-sdk-tests.ts b/types/facebook-js-sdk/facebook-js-sdk-tests.ts similarity index 100% rename from facebook-js-sdk/facebook-js-sdk-tests.ts rename to types/facebook-js-sdk/facebook-js-sdk-tests.ts diff --git a/facebook-js-sdk/index.d.ts b/types/facebook-js-sdk/index.d.ts similarity index 100% rename from facebook-js-sdk/index.d.ts rename to types/facebook-js-sdk/index.d.ts diff --git a/facebook-js-sdk/tsconfig.json b/types/facebook-js-sdk/tsconfig.json similarity index 100% rename from facebook-js-sdk/tsconfig.json rename to types/facebook-js-sdk/tsconfig.json diff --git a/facebook-pixel/facebook-pixel-tests.ts b/types/facebook-pixel/facebook-pixel-tests.ts similarity index 100% rename from facebook-pixel/facebook-pixel-tests.ts rename to types/facebook-pixel/facebook-pixel-tests.ts diff --git a/facebook-pixel/index.d.ts b/types/facebook-pixel/index.d.ts similarity index 100% rename from facebook-pixel/index.d.ts rename to types/facebook-pixel/index.d.ts diff --git a/facebook-pixel/tsconfig.json b/types/facebook-pixel/tsconfig.json similarity index 100% rename from facebook-pixel/tsconfig.json rename to types/facebook-pixel/tsconfig.json diff --git a/faker/faker-tests.ts b/types/faker/faker-tests.ts similarity index 100% rename from faker/faker-tests.ts rename to types/faker/faker-tests.ts diff --git a/faker/index.d.ts b/types/faker/index.d.ts similarity index 100% rename from faker/index.d.ts rename to types/faker/index.d.ts diff --git a/faker/tsconfig.json b/types/faker/tsconfig.json similarity index 100% rename from faker/tsconfig.json rename to types/faker/tsconfig.json diff --git a/faker/v3/faker-tests.ts b/types/faker/v3/faker-tests.ts similarity index 100% rename from faker/v3/faker-tests.ts rename to types/faker/v3/faker-tests.ts diff --git a/faker/v3/index.d.ts b/types/faker/v3/index.d.ts similarity index 100% rename from faker/v3/index.d.ts rename to types/faker/v3/index.d.ts diff --git a/faker/v3/tsconfig.json b/types/faker/v3/tsconfig.json similarity index 100% rename from faker/v3/tsconfig.json rename to types/faker/v3/tsconfig.json diff --git a/falcor-express/falcor-express-tests.ts b/types/falcor-express/falcor-express-tests.ts similarity index 100% rename from falcor-express/falcor-express-tests.ts rename to types/falcor-express/falcor-express-tests.ts diff --git a/falcor-express/index.d.ts b/types/falcor-express/index.d.ts similarity index 100% rename from falcor-express/index.d.ts rename to types/falcor-express/index.d.ts diff --git a/falcor-express/tsconfig.json b/types/falcor-express/tsconfig.json similarity index 100% rename from falcor-express/tsconfig.json rename to types/falcor-express/tsconfig.json diff --git a/falcor-http-datasource/falcor-http-datasource-tests.ts b/types/falcor-http-datasource/falcor-http-datasource-tests.ts similarity index 100% rename from falcor-http-datasource/falcor-http-datasource-tests.ts rename to types/falcor-http-datasource/falcor-http-datasource-tests.ts diff --git a/falcor-http-datasource/index.d.ts b/types/falcor-http-datasource/index.d.ts similarity index 100% rename from falcor-http-datasource/index.d.ts rename to types/falcor-http-datasource/index.d.ts diff --git a/falcor-http-datasource/tsconfig.json b/types/falcor-http-datasource/tsconfig.json similarity index 100% rename from falcor-http-datasource/tsconfig.json rename to types/falcor-http-datasource/tsconfig.json diff --git a/falcor-json-graph/falcor-json-graph-tests.ts b/types/falcor-json-graph/falcor-json-graph-tests.ts similarity index 100% rename from falcor-json-graph/falcor-json-graph-tests.ts rename to types/falcor-json-graph/falcor-json-graph-tests.ts diff --git a/falcor-json-graph/index.d.ts b/types/falcor-json-graph/index.d.ts similarity index 100% rename from falcor-json-graph/index.d.ts rename to types/falcor-json-graph/index.d.ts diff --git a/falcor-json-graph/tsconfig.json b/types/falcor-json-graph/tsconfig.json similarity index 100% rename from falcor-json-graph/tsconfig.json rename to types/falcor-json-graph/tsconfig.json diff --git a/falcor-router/falcor-router-tests.ts b/types/falcor-router/falcor-router-tests.ts similarity index 55% rename from falcor-router/falcor-router-tests.ts rename to types/falcor-router/falcor-router-tests.ts index 5f5bdca0e4..7358ab2e02 100644 --- a/falcor-router/falcor-router-tests.ts +++ b/types/falcor-router/falcor-router-tests.ts @@ -2,6 +2,7 @@ import falcor = require('falcor'); import Router = require('falcor-router'); +import falcorJsonGraph = require('falcor-json-graph'); new Router([]); new Router([], {}); @@ -100,3 +101,76 @@ new Router([{ } }]); +new Router([{ + route: 'todos.new', + call(callpath, args) { + return {path: 'json.todosById.1234.name', value: 'Buy cheese'}; + } +}]); + +new Router([{ + route: 'todos.new', + call(callpath, args) { + return falcorJsonGraph.pathInvalidation('json.todos.length'); + } +}]); + +new Router([{ + route: 'todos.new', + call(callpath, args) { + return [ + falcorJsonGraph.pathInvalidation('json.todos.length'), + {path: 'json.todosById.1234.name', value: 'Buy cheese'} + ] + } +}]); + +new Router([{ + route: 'todos.new', + call(callpath, args) { + return new Promise((resolve, reject): void => { + resolve([ + falcorJsonGraph.pathInvalidation('json.todos.length'), + {path: 'json.todosById.1234.name', value: 'Buy cheese'} + ]); + }); + } +}]); + +new Router([{ + route: 'todos.new', + call(callpath, args) { + return { + paths: [['json', 'todosById', '1234', 'name']], + jsonGraph: { + json: { + todosById: { + 1234: { + name: 'Buy cheese' + } + } + } + } + }; + } +}]); + +new Router([{ + route: 'todos.new', + call(callpath, args) { + return new Promise((resolve, reject): void => { + resolve({ + paths: [['json', 'todosById', '1234', 'name']], + jsonGraph: { + json: { + todosById: { + 1234: { + name: 'Buy cheese' + } + } + } + } + }); + }); + } +}]); diff --git a/falcor-router/index.d.ts b/types/falcor-router/index.d.ts similarity index 81% rename from falcor-router/index.d.ts rename to types/falcor-router/index.d.ts index 659f45767f..daef26f379 100644 --- a/falcor-router/index.d.ts +++ b/types/falcor-router/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for falcor-router 0.4.0 // Project: https://github.com/Netflix/falcor-router -// Definitions by: Quramy +// Definitions by: Quramy , cdhgee // Definitions: https://github.com/borisyankov/DefinitelyTyped /// @@ -34,7 +34,7 @@ declare namespace FalcorRouter { type RoutePathSet = FalcorJsonGraph.PathSet; interface CallRoute extends Route { - call(callPath: RoutePathSet, args: Array): RouteResult | Promise; + call(callPath: RoutePathSet, args: Array): CallRouteResult | Promise; } interface GetRoute extends Route { @@ -47,6 +47,7 @@ declare namespace FalcorRouter { type RouteDefinition = GetRoute | SetRoute | CallRoute; type RouteResult = FalcorJsonGraph.PathValue | Array | FalcorJsonGraph.JSONEnvelope; + type CallRouteResult = FalcorJsonGraph.PathValue | FalcorJsonGraph.InvalidPath | Array | FalcorJsonGraph.JSONGraphEnvelope; interface RouterOptions { debug?: boolean; diff --git a/falcor-router/tsconfig.json b/types/falcor-router/tsconfig.json similarity index 100% rename from falcor-router/tsconfig.json rename to types/falcor-router/tsconfig.json diff --git a/falcor/index.d.ts b/types/falcor/index.d.ts similarity index 100% rename from falcor/index.d.ts rename to types/falcor/index.d.ts diff --git a/falcor/test/browser.ts b/types/falcor/test/browser.ts similarity index 100% rename from falcor/test/browser.ts rename to types/falcor/test/browser.ts diff --git a/falcor/test/index.ts b/types/falcor/test/index.ts similarity index 100% rename from falcor/test/index.ts rename to types/falcor/test/index.ts diff --git a/falcor/tsconfig.json b/types/falcor/tsconfig.json similarity index 100% rename from falcor/tsconfig.json rename to types/falcor/tsconfig.json diff --git a/falcor/tslint.json b/types/falcor/tslint.json similarity index 100% rename from falcor/tslint.json rename to types/falcor/tslint.json diff --git a/famous/famous-tests.ts b/types/famous/famous-tests.ts similarity index 100% rename from famous/famous-tests.ts rename to types/famous/famous-tests.ts diff --git a/famous/index.d.ts b/types/famous/index.d.ts similarity index 100% rename from famous/index.d.ts rename to types/famous/index.d.ts diff --git a/famous/tsconfig.json b/types/famous/tsconfig.json similarity index 100% rename from famous/tsconfig.json rename to types/famous/tsconfig.json diff --git a/fancybox/fancybox-tests.ts b/types/fancybox/fancybox-tests.ts similarity index 100% rename from fancybox/fancybox-tests.ts rename to types/fancybox/fancybox-tests.ts diff --git a/fancybox/index.d.ts b/types/fancybox/index.d.ts similarity index 100% rename from fancybox/index.d.ts rename to types/fancybox/index.d.ts diff --git a/fancybox/tsconfig.json b/types/fancybox/tsconfig.json similarity index 100% rename from fancybox/tsconfig.json rename to types/fancybox/tsconfig.json diff --git a/farbtastic/farbtastic-tests.ts b/types/farbtastic/farbtastic-tests.ts similarity index 100% rename from farbtastic/farbtastic-tests.ts rename to types/farbtastic/farbtastic-tests.ts diff --git a/farbtastic/index.d.ts b/types/farbtastic/index.d.ts similarity index 100% rename from farbtastic/index.d.ts rename to types/farbtastic/index.d.ts diff --git a/farbtastic/tsconfig.json b/types/farbtastic/tsconfig.json similarity index 100% rename from farbtastic/tsconfig.json rename to types/farbtastic/tsconfig.json diff --git a/fast-json-patch/fast-json-patch-tests.ts b/types/fast-json-patch/fast-json-patch-tests.ts similarity index 100% rename from fast-json-patch/fast-json-patch-tests.ts rename to types/fast-json-patch/fast-json-patch-tests.ts diff --git a/fast-json-patch/index.d.ts b/types/fast-json-patch/index.d.ts similarity index 100% rename from fast-json-patch/index.d.ts rename to types/fast-json-patch/index.d.ts diff --git a/fast-json-patch/tsconfig.json b/types/fast-json-patch/tsconfig.json similarity index 100% rename from fast-json-patch/tsconfig.json rename to types/fast-json-patch/tsconfig.json diff --git a/fast-levenshtein/fast-levenshtein-tests.ts b/types/fast-levenshtein/fast-levenshtein-tests.ts similarity index 100% rename from fast-levenshtein/fast-levenshtein-tests.ts rename to types/fast-levenshtein/fast-levenshtein-tests.ts diff --git a/fast-levenshtein/index.d.ts b/types/fast-levenshtein/index.d.ts similarity index 100% rename from fast-levenshtein/index.d.ts rename to types/fast-levenshtein/index.d.ts diff --git a/fast-levenshtein/tsconfig.json b/types/fast-levenshtein/tsconfig.json similarity index 100% rename from fast-levenshtein/tsconfig.json rename to types/fast-levenshtein/tsconfig.json diff --git a/fast-simplex-noise/fast-simplex-noise-tests.ts b/types/fast-simplex-noise/fast-simplex-noise-tests.ts similarity index 100% rename from fast-simplex-noise/fast-simplex-noise-tests.ts rename to types/fast-simplex-noise/fast-simplex-noise-tests.ts diff --git a/fast-simplex-noise/index.d.ts b/types/fast-simplex-noise/index.d.ts similarity index 100% rename from fast-simplex-noise/index.d.ts rename to types/fast-simplex-noise/index.d.ts diff --git a/fast-simplex-noise/tsconfig.json b/types/fast-simplex-noise/tsconfig.json similarity index 100% rename from fast-simplex-noise/tsconfig.json rename to types/fast-simplex-noise/tsconfig.json diff --git a/fast-stats/fast-stats-tests.ts b/types/fast-stats/fast-stats-tests.ts similarity index 100% rename from fast-stats/fast-stats-tests.ts rename to types/fast-stats/fast-stats-tests.ts diff --git a/fast-stats/index.d.ts b/types/fast-stats/index.d.ts similarity index 100% rename from fast-stats/index.d.ts rename to types/fast-stats/index.d.ts diff --git a/fast-stats/tsconfig.json b/types/fast-stats/tsconfig.json similarity index 100% rename from fast-stats/tsconfig.json rename to types/fast-stats/tsconfig.json diff --git a/fastclick/fastclick-tests.ts b/types/fastclick/fastclick-tests.ts similarity index 100% rename from fastclick/fastclick-tests.ts rename to types/fastclick/fastclick-tests.ts diff --git a/fastclick/index.d.ts b/types/fastclick/index.d.ts similarity index 100% rename from fastclick/index.d.ts rename to types/fastclick/index.d.ts diff --git a/fastclick/tsconfig.json b/types/fastclick/tsconfig.json similarity index 100% rename from fastclick/tsconfig.json rename to types/fastclick/tsconfig.json diff --git a/favico.js/favico.js-tests.ts b/types/favico.js/favico.js-tests.ts similarity index 100% rename from favico.js/favico.js-tests.ts rename to types/favico.js/favico.js-tests.ts diff --git a/favico.js/index.d.ts b/types/favico.js/index.d.ts similarity index 100% rename from favico.js/index.d.ts rename to types/favico.js/index.d.ts diff --git a/favico.js/tsconfig.json b/types/favico.js/tsconfig.json similarity index 100% rename from favico.js/tsconfig.json rename to types/favico.js/tsconfig.json diff --git a/fb/fb-tests.ts b/types/fb/fb-tests.ts similarity index 100% rename from fb/fb-tests.ts rename to types/fb/fb-tests.ts diff --git a/fb/index.d.ts b/types/fb/index.d.ts similarity index 100% rename from fb/index.d.ts rename to types/fb/index.d.ts diff --git a/fb/tsconfig.json b/types/fb/tsconfig.json similarity index 100% rename from fb/tsconfig.json rename to types/fb/tsconfig.json diff --git a/fbemitter/fbemitter-tests.ts b/types/fbemitter/fbemitter-tests.ts similarity index 100% rename from fbemitter/fbemitter-tests.ts rename to types/fbemitter/fbemitter-tests.ts diff --git a/fbemitter/index.d.ts b/types/fbemitter/index.d.ts similarity index 100% rename from fbemitter/index.d.ts rename to types/fbemitter/index.d.ts diff --git a/fbemitter/tsconfig.json b/types/fbemitter/tsconfig.json similarity index 100% rename from fbemitter/tsconfig.json rename to types/fbemitter/tsconfig.json diff --git a/featherlight/featherlight-tests.ts b/types/featherlight/featherlight-tests.ts similarity index 100% rename from featherlight/featherlight-tests.ts rename to types/featherlight/featherlight-tests.ts diff --git a/featherlight/index.d.ts b/types/featherlight/index.d.ts similarity index 100% rename from featherlight/index.d.ts rename to types/featherlight/index.d.ts diff --git a/featherlight/tsconfig.json b/types/featherlight/tsconfig.json similarity index 100% rename from featherlight/tsconfig.json rename to types/featherlight/tsconfig.json diff --git a/types/fetch-jsonp/fetch-jsonp-tests.ts b/types/fetch-jsonp/fetch-jsonp-tests.ts new file mode 100644 index 0000000000..058f47e70c --- /dev/null +++ b/types/fetch-jsonp/fetch-jsonp-tests.ts @@ -0,0 +1,48 @@ +import * as fetchJsonp from 'fetch-jsonp'; + +/* Taken from https://github.com/camsong/fetch-jsonp/blob/v1.0.2/README.md */ + +fetchJsonp('/users.jsonp') + .then(function(response) { + return response.json() + }).then(function(json) { + console.log('parsed json', json) + }).catch(function(ex) { + console.log('parsing failed', ex) + }) + +fetchJsonp('/users.jsonp', { + jsonpCallback: 'custom_callback' + }) + .then(function(response) { + return response.json() + }).then(function(json) { + console.log('parsed json', json) + }).catch(function(ex) { + console.log('parsing failed', ex) + }) + +fetchJsonp('/users.jsonp', { + timeout: 3000, + jsonpCallback: 'custom_callback' + }) + .then(function(response) { + return response.json() + }).then(function(json) { + console.log('parsed json', json) + }).catch(function(ex) { + console.log('parsing failed', ex) + }) + +// Taken from https://github.com/camsong/fetch-jsonp/blob/v1.0.2/examples/index.html +var result = fetchJsonp('http://www.flickr.com/services/feeds/photos_public.gne?format=json', { + jsonpCallback: 'jsoncallback', + timeout: 3000 +}) +result.then(function(response) { + return response.json() +}).then(function(json) { + document.body.innerHTML = JSON.stringify(json); +})['catch'](function(ex) { + document.body.innerHTML = 'failed:' + ex; +}) diff --git a/types/fetch-jsonp/index.d.ts b/types/fetch-jsonp/index.d.ts new file mode 100644 index 0000000000..e37094254e --- /dev/null +++ b/types/fetch-jsonp/index.d.ts @@ -0,0 +1,16 @@ +// Type definitions for fetch-jsonp 1.0 +// Project: https://github.com/camsong/fetch-jsonp +// Definitions by: Tanguy Krotoff +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +declare namespace fetchJsonp { + interface Options { + timeout?: number; + jsonpCallback?: string; + } +} + +declare function fetchJsonp(url: RequestInfo, options?: fetchJsonp.Options): Promise; + +export = fetchJsonp; diff --git a/types/fetch-jsonp/tsconfig.json b/types/fetch-jsonp/tsconfig.json new file mode 100644 index 0000000000..05c3f994ed --- /dev/null +++ b/types/fetch-jsonp/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "module": "commonjs", + "lib": ["es6", "dom"], + "noUnusedLocals": true, + "noUnusedParameters": true, + "strictNullChecks": true, + "noImplicitAny": true, + "noImplicitThis": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true + }, + "files": [ + "index.d.ts", + "fetch-jsonp-tests.ts" + ] +} diff --git a/types/fetch-jsonp/tslint.json b/types/fetch-jsonp/tslint.json new file mode 100644 index 0000000000..88bd9662f7 --- /dev/null +++ b/types/fetch-jsonp/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "../tslint.json", + "rules": { + "only-arrow-functions-2": false + } +} diff --git a/fetch-mock/fetch-mock-tests.ts b/types/fetch-mock/fetch-mock-tests.ts similarity index 100% rename from fetch-mock/fetch-mock-tests.ts rename to types/fetch-mock/fetch-mock-tests.ts diff --git a/fetch-mock/index.d.ts b/types/fetch-mock/index.d.ts similarity index 99% rename from fetch-mock/index.d.ts rename to types/fetch-mock/index.d.ts index 4d69096845..bda708ee55 100644 --- a/fetch-mock/index.d.ts +++ b/types/fetch-mock/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/wheresrhys/fetch-mock // Definitions by: Alexey Svetliakov , Tamir Duberstein , Risto Keravuori // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +// TypeScript Version: 2.2 type MockRequest = Request | RequestInit; diff --git a/fetch-mock/tsconfig.json b/types/fetch-mock/tsconfig.json similarity index 100% rename from fetch-mock/tsconfig.json rename to types/fetch-mock/tsconfig.json diff --git a/fetch-mock/tslint.json b/types/fetch-mock/tslint.json similarity index 100% rename from fetch-mock/tslint.json rename to types/fetch-mock/tslint.json diff --git a/fetch.io/fetch.io-tests.ts b/types/fetch.io/fetch.io-tests.ts similarity index 64% rename from fetch.io/fetch.io-tests.ts rename to types/fetch.io/fetch.io-tests.ts index 4e14a7a9a9..538da8e74b 100644 --- a/fetch.io/fetch.io-tests.ts +++ b/types/fetch.io/fetch.io-tests.ts @@ -1,60 +1,59 @@ +import Fetch from 'fetch.io'; -import Fetch from 'fetch.io' - -const request = new Fetch() +const request = new Fetch(); request .get('') .query({}) - .json() + .json(); request .delete('') - .json() + .json(); request .head('') - .json() + .json(); request .options('') - .json() + .json(); request .put('') - .json() + .json(); request .config('key', 'value') - .json() + .json(); request .config({key: 'value'}) - .json() + .json(); request .config('set', 'value') - .json() + .json(); request .set({key: 'value'}) - .json() + .json(); request .type('json') - .json() + .json(); request .get('') .query({}) - .text() + .text(); request .get('') .query({}) - .then(() => {}) + .then(() => {}); request .post('') .send({}) - .json() + .json(); diff --git a/types/fetch.io/index.d.ts b/types/fetch.io/index.d.ts new file mode 100644 index 0000000000..966925b68f --- /dev/null +++ b/types/fetch.io/index.d.ts @@ -0,0 +1,118 @@ +// Type definitions for fetch.io 3.1 +// Project: https://github.com/haoxins/fetch.io +// Definitions by: newraina +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +type TUrl = string; + +type TMethod = 'delete' | 'get' | 'head' | 'options' | 'post' | 'put'; + +interface Query { + [key: string]: number | boolean | string; +} + +interface Header { + [key: string]: string; +} + +interface Options extends RequestInit { + prefix?: string; + + query?: Query; + + header?: Header; + + beforeRequest?(url: TUrl, body: BodyInit): boolean; + + afterResponse?(res: Response): void; + + afterJSON?(body: any): void; +} + +declare class Request { + constructor(method: TMethod, url: TUrl, options: Options) + + /** + * HTTP delete method + */ + delete: (url: TUrl) => this; + + /** + * HTTP get method + */ + get: (url: TUrl) => this; + + /** + * HTTP head method + */ + head: (url: TUrl) => this; + + /** + * HTTP options method + */ + options: (url: TUrl) => this; + + /** + * HTTP post method + */ + post: (url: TUrl) => this; + + /** + * HTTP put method + */ + put: (url: TUrl) => this; + + /** + * Set Options + */ + config(key: string, value: any): this + + config(opts: {[key: string]: any}): this + + /** + * Set Header + */ + set(key: string, value: any): this + + set(opts: {[key: string]: any}): this + + /** + * Set Content-Type + */ + type(type: 'json' | 'form' | 'urlencoded'): this + + /** + * Add query string + */ + query(object: {[key: string]: any}): this + + /** + * Send data + */ + send(data: {[key: string]: any}): this + + /** + * ppend formData + */ + append(key: string, value: string): this + + /** + * Get Response directly + */ + then(resolve: (value?: Response) => void, reject?: (reason?: any) => void): Promise + + /** + * Make Response to JSON + */ + json(strict?: boolean): Promise + + /** + * Make Response to string + */ + text(): Promise +} + +export default class Fetch extends Request { + constructor(options?: Options) +} diff --git a/fetch.io/tsconfig.json b/types/fetch.io/tsconfig.json similarity index 100% rename from fetch.io/tsconfig.json rename to types/fetch.io/tsconfig.json diff --git a/fetch.io/tslint.json b/types/fetch.io/tslint.json similarity index 100% rename from fetch.io/tslint.json rename to types/fetch.io/tslint.json diff --git a/ffi/ffi-tests.ts b/types/ffi/ffi-tests.ts similarity index 100% rename from ffi/ffi-tests.ts rename to types/ffi/ffi-tests.ts diff --git a/ffi/index.d.ts b/types/ffi/index.d.ts similarity index 100% rename from ffi/index.d.ts rename to types/ffi/index.d.ts diff --git a/ffi/node-ffi-buffer.d.ts b/types/ffi/node-ffi-buffer.d.ts similarity index 100% rename from ffi/node-ffi-buffer.d.ts rename to types/ffi/node-ffi-buffer.d.ts diff --git a/ffi/tsconfig.json b/types/ffi/tsconfig.json similarity index 100% rename from ffi/tsconfig.json rename to types/ffi/tsconfig.json diff --git a/fhir/fhir-tests.ts b/types/fhir/fhir-tests.ts similarity index 100% rename from fhir/fhir-tests.ts rename to types/fhir/fhir-tests.ts diff --git a/fhir/index.d.ts b/types/fhir/index.d.ts similarity index 100% rename from fhir/index.d.ts rename to types/fhir/index.d.ts diff --git a/fhir/tsconfig.json b/types/fhir/tsconfig.json similarity index 100% rename from fhir/tsconfig.json rename to types/fhir/tsconfig.json diff --git a/fibers/fibers-tests.ts b/types/fibers/fibers-tests.ts similarity index 100% rename from fibers/fibers-tests.ts rename to types/fibers/fibers-tests.ts diff --git a/fibers/index.d.ts b/types/fibers/index.d.ts similarity index 100% rename from fibers/index.d.ts rename to types/fibers/index.d.ts diff --git a/fibers/tsconfig.json b/types/fibers/tsconfig.json similarity index 100% rename from fibers/tsconfig.json rename to types/fibers/tsconfig.json diff --git a/field/field-tests.ts b/types/field/field-tests.ts similarity index 100% rename from field/field-tests.ts rename to types/field/field-tests.ts diff --git a/field/index.d.ts b/types/field/index.d.ts similarity index 100% rename from field/index.d.ts rename to types/field/index.d.ts diff --git a/field/tsconfig.json b/types/field/tsconfig.json similarity index 100% rename from field/tsconfig.json rename to types/field/tsconfig.json diff --git a/file-saver/file-saver-tests.ts b/types/file-saver/file-saver-tests.ts similarity index 100% rename from file-saver/file-saver-tests.ts rename to types/file-saver/file-saver-tests.ts diff --git a/file-saver/index.d.ts b/types/file-saver/index.d.ts similarity index 100% rename from file-saver/index.d.ts rename to types/file-saver/index.d.ts diff --git a/file-saver/tsconfig.json b/types/file-saver/tsconfig.json similarity index 100% rename from file-saver/tsconfig.json rename to types/file-saver/tsconfig.json diff --git a/file-type/file-type-tests.ts b/types/file-type/file-type-tests.ts similarity index 100% rename from file-type/file-type-tests.ts rename to types/file-type/file-type-tests.ts diff --git a/file-type/index.d.ts b/types/file-type/index.d.ts similarity index 100% rename from file-type/index.d.ts rename to types/file-type/index.d.ts diff --git a/file-type/tsconfig.json b/types/file-type/tsconfig.json similarity index 100% rename from file-type/tsconfig.json rename to types/file-type/tsconfig.json diff --git a/file-url/file-url-tests.ts b/types/file-url/file-url-tests.ts similarity index 100% rename from file-url/file-url-tests.ts rename to types/file-url/file-url-tests.ts diff --git a/file-url/index.d.ts b/types/file-url/index.d.ts similarity index 100% rename from file-url/index.d.ts rename to types/file-url/index.d.ts diff --git a/file-url/tsconfig.json b/types/file-url/tsconfig.json similarity index 100% rename from file-url/tsconfig.json rename to types/file-url/tsconfig.json diff --git a/filesize/filesize-tests.ts b/types/filesize/filesize-tests.ts similarity index 100% rename from filesize/filesize-tests.ts rename to types/filesize/filesize-tests.ts diff --git a/filesize/index.d.ts b/types/filesize/index.d.ts similarity index 100% rename from filesize/index.d.ts rename to types/filesize/index.d.ts diff --git a/filesize/tsconfig.json b/types/filesize/tsconfig.json similarity index 100% rename from filesize/tsconfig.json rename to types/filesize/tsconfig.json diff --git a/filesystem/filesystem-tests.ts b/types/filesystem/filesystem-tests.ts similarity index 100% rename from filesystem/filesystem-tests.ts rename to types/filesystem/filesystem-tests.ts diff --git a/filesystem/index.d.ts b/types/filesystem/index.d.ts similarity index 100% rename from filesystem/index.d.ts rename to types/filesystem/index.d.ts diff --git a/filesystem/tsconfig.json b/types/filesystem/tsconfig.json similarity index 100% rename from filesystem/tsconfig.json rename to types/filesystem/tsconfig.json diff --git a/filewriter/filewriter-tests.ts b/types/filewriter/filewriter-tests.ts similarity index 100% rename from filewriter/filewriter-tests.ts rename to types/filewriter/filewriter-tests.ts diff --git a/filewriter/index.d.ts b/types/filewriter/index.d.ts similarity index 100% rename from filewriter/index.d.ts rename to types/filewriter/index.d.ts diff --git a/filewriter/tsconfig.json b/types/filewriter/tsconfig.json similarity index 100% rename from filewriter/tsconfig.json rename to types/filewriter/tsconfig.json diff --git a/fill-pdf/fill-pdf-tests.ts b/types/fill-pdf/fill-pdf-tests.ts similarity index 100% rename from fill-pdf/fill-pdf-tests.ts rename to types/fill-pdf/fill-pdf-tests.ts diff --git a/fill-pdf/index.d.ts b/types/fill-pdf/index.d.ts similarity index 100% rename from fill-pdf/index.d.ts rename to types/fill-pdf/index.d.ts diff --git a/fill-pdf/tsconfig.json b/types/fill-pdf/tsconfig.json similarity index 100% rename from fill-pdf/tsconfig.json rename to types/fill-pdf/tsconfig.json diff --git a/finalhandler/finalhandler-tests.ts b/types/finalhandler/finalhandler-tests.ts similarity index 100% rename from finalhandler/finalhandler-tests.ts rename to types/finalhandler/finalhandler-tests.ts diff --git a/finalhandler/index.d.ts b/types/finalhandler/index.d.ts similarity index 100% rename from finalhandler/index.d.ts rename to types/finalhandler/index.d.ts diff --git a/finalhandler/tsconfig.json b/types/finalhandler/tsconfig.json similarity index 100% rename from finalhandler/tsconfig.json rename to types/finalhandler/tsconfig.json diff --git a/finch/finch-tests.ts b/types/finch/finch-tests.ts similarity index 100% rename from finch/finch-tests.ts rename to types/finch/finch-tests.ts diff --git a/finch/index.d.ts b/types/finch/index.d.ts similarity index 100% rename from finch/index.d.ts rename to types/finch/index.d.ts diff --git a/finch/tsconfig.json b/types/finch/tsconfig.json similarity index 100% rename from finch/tsconfig.json rename to types/finch/tsconfig.json diff --git a/findup-sync/findup-sync-tests.ts b/types/findup-sync/findup-sync-tests.ts similarity index 100% rename from findup-sync/findup-sync-tests.ts rename to types/findup-sync/findup-sync-tests.ts diff --git a/findup-sync/index.d.ts b/types/findup-sync/index.d.ts similarity index 100% rename from findup-sync/index.d.ts rename to types/findup-sync/index.d.ts diff --git a/findup-sync/tsconfig.json b/types/findup-sync/tsconfig.json similarity index 100% rename from findup-sync/tsconfig.json rename to types/findup-sync/tsconfig.json diff --git a/fingerprintjs/fingerprintjs-tests.ts b/types/fingerprintjs/fingerprintjs-tests.ts similarity index 100% rename from fingerprintjs/fingerprintjs-tests.ts rename to types/fingerprintjs/fingerprintjs-tests.ts diff --git a/fingerprintjs/index.d.ts b/types/fingerprintjs/index.d.ts similarity index 100% rename from fingerprintjs/index.d.ts rename to types/fingerprintjs/index.d.ts diff --git a/fingerprintjs/tsconfig.json b/types/fingerprintjs/tsconfig.json similarity index 100% rename from fingerprintjs/tsconfig.json rename to types/fingerprintjs/tsconfig.json diff --git a/firebase-client/firebase-client-tests.ts b/types/firebase-client/firebase-client-tests.ts similarity index 100% rename from firebase-client/firebase-client-tests.ts rename to types/firebase-client/firebase-client-tests.ts diff --git a/firebase-client/index.d.ts b/types/firebase-client/index.d.ts similarity index 100% rename from firebase-client/index.d.ts rename to types/firebase-client/index.d.ts diff --git a/firebase-client/tsconfig.json b/types/firebase-client/tsconfig.json similarity index 100% rename from firebase-client/tsconfig.json rename to types/firebase-client/tsconfig.json diff --git a/firebase-token-generator/firebase-token-generator-tests.ts b/types/firebase-token-generator/firebase-token-generator-tests.ts similarity index 100% rename from firebase-token-generator/firebase-token-generator-tests.ts rename to types/firebase-token-generator/firebase-token-generator-tests.ts diff --git a/firebase-token-generator/index.d.ts b/types/firebase-token-generator/index.d.ts similarity index 100% rename from firebase-token-generator/index.d.ts rename to types/firebase-token-generator/index.d.ts diff --git a/firebase-token-generator/tsconfig.json b/types/firebase-token-generator/tsconfig.json similarity index 100% rename from firebase-token-generator/tsconfig.json rename to types/firebase-token-generator/tsconfig.json diff --git a/firebase/firebase-simplelogin.d.ts b/types/firebase/firebase-simplelogin.d.ts similarity index 100% rename from firebase/firebase-simplelogin.d.ts rename to types/firebase/firebase-simplelogin.d.ts diff --git a/firebase/index.d.ts b/types/firebase/index.d.ts similarity index 100% rename from firebase/index.d.ts rename to types/firebase/index.d.ts diff --git a/firebase/test/index.ts b/types/firebase/test/index.ts similarity index 100% rename from firebase/test/index.ts rename to types/firebase/test/index.ts diff --git a/firebase/test/simplelogin.ts b/types/firebase/test/simplelogin.ts similarity index 100% rename from firebase/test/simplelogin.ts rename to types/firebase/test/simplelogin.ts diff --git a/firebase/tsconfig.json b/types/firebase/tsconfig.json similarity index 100% rename from firebase/tsconfig.json rename to types/firebase/tsconfig.json diff --git a/firefox/firefox-tests.ts b/types/firefox/firefox-tests.ts similarity index 100% rename from firefox/firefox-tests.ts rename to types/firefox/firefox-tests.ts diff --git a/firefox/index.d.ts b/types/firefox/index.d.ts similarity index 100% rename from firefox/index.d.ts rename to types/firefox/index.d.ts diff --git a/firefox/tsconfig.json b/types/firefox/tsconfig.json similarity index 100% rename from firefox/tsconfig.json rename to types/firefox/tsconfig.json diff --git a/types/firmata/firmata-tests.ts b/types/firmata/firmata-tests.ts new file mode 100644 index 0000000000..5e1eab09cb --- /dev/null +++ b/types/firmata/firmata-tests.ts @@ -0,0 +1,42 @@ +import * as Board from 'firmata' + +function test_basic_board() +{ + let board = new Board(''); +} + +function test_board_with_callback() +{ + let board = new Board('', (error: any) => + { + board.pinMode(13, board.MODES.OUTPUT); + board.pinMode(12, Board.PIN_MODE.OUTPUT); + }); +} + +function test_board_with_listener() +{ + let board = new Board(''); + + board.on('ready', () => + { + board.pinMode(13, board.MODES.OUTPUT); + board.pinMode(12, Board.PIN_MODE.OUTPUT); + }); +} + +function test_class_extension() +{ + class MyBoard extends Board + { + Disconnect() + { + this.transport.close((error: any) => {}); + } + } + + let myBoard: MyBoard = new MyBoard('', () => + { + myBoard.Disconnect(); + }); +} \ No newline at end of file diff --git a/types/firmata/index.d.ts b/types/firmata/index.d.ts new file mode 100644 index 0000000000..4bda44d3f9 --- /dev/null +++ b/types/firmata/index.d.ts @@ -0,0 +1,303 @@ +// Type definitions for firmata.js 0.15 +// Project: https://github.com/firmata/firmata.js +// Definitions by: Troy W. +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as SerialPort from 'serialport' + +export = Board; + +/** + * Most of these are generated by observing https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js. + * + * This is a starting point that appeared to work fine for months within a project of my company, but I give no + * guarantee that it cannot be improved. + */ +declare class Board extends NodeJS.EventEmitter +{ + constructor(serialPort: string, callback?: (error: any) => void) + MODES: Board.PinModes; + STEPPER: Board.StepperConstants; + I2C_MODES: Board.I2cModes; + SERIAL_MODES: Board.SerialModes; + SERIAL_PORT_IDs: Board.SerialPortIds; + SERIAL_PIN_TYPES: Board.SerialPinTypes; + HIGH: Board.PIN_STATE; + LOW: Board.PIN_STATE; + pins: Board.Pins[]; + ports: number[]; + analogPins: number[]; + version: Board.Version; + firmware: Board.Firmware; + settings: Board.Settings; + protected transport: SerialPort; + reportVersion(callback: () => void): void + queryFirmware(callback: () => void): void + analogRead(pin: number, callback: (value: number) => void): void + analogWrite(pin: number, value: number): void + pwmWrite(pin: number, value: number): void + servoConfig(pin: number, min: number, max: number): void + servoWrite(pin: number, value: number): void + pinMode(pin: number, mode: Board.PIN_MODE): void + digitalWrite(pin: number, val: Board.PIN_STATE): void + digitalRead(pin: number, callback: (val: Board.PIN_STATE) => void): void + queryCapabilities(callback: () => void): void + queryAnalogMapping(callback: () => void): void + queryPinState(pin: number, callback: () => void): void + // TODO untested --- TWW + sendString(str: string): void + // TODO untested --- TWW + sendI2CConfig(delay: number): void + // TODO untested --- TWW + i2cConfig(options: number|{ delay: number }): void + // TODO untested --- TWW + sendI2CWriteRequest(slaveAddress: number, bytes: number[]): void + // TODO untested --- TWW + i2cWrite(address: number, register: number, inBytes: number[]): void + i2cWrite(address: number, data: number[]): void + // TODO untested --- TWW + i2cWriteReg(address: number, register: number, byte: number): void + // TODO untested --- TWW + sendI2CReadRequest(address: number, numBytes: number, callback: () => void): void + // TODO untested --- TWW + i2cRead(address: number, register: number, bytesToRead: number, callback: (data: number[]) => void): void + i2cRead(address: number, bytesToRead: number, callback: (data: number[]) => void): void + // TODO untested --- TWW + i2cStop(options: number|{ bus: number, address: number }): void + // TODO untested --- TWW + i2cReadOnce(address: number, register: number, bytesToRead: number, callback: (data: number[]) => void): void + i2cReadOnce(address: number, bytesToRead: number, callback: (data: number[]) => void): void + // TODO untested --- TWW + sendOneWireConfig(pin: number, enableParasiticPower: boolean): void + // TODO untested --- TWW + sendOneWireSearch(pin: number, callback: () => void): void + // TODO untested --- TWW + sendOneWireAlarmsSearch(pin: number, callback: () => void): void + // TODO untested --- TWW + sendOneWireRead(pin: number, device: number, numBytesToRead: number, callback: () => void): void + // TODO untested --- TWW + sendOneWireReset(pin: number): void + // TODO untested --- TWW + sendOneWireWrite(pin: number, device: number, data: number|number[]): void + // TODO untested --- TWW + sendOneWireDelay(pin: number, delay: number): void + // TODO untested --- TWW + sendOneWireWriteAndRead(pin: number, device: number, data: number|number[], numBytesToRead: number, + callback: (error?: Error, data?: number) => void): void + setSamplingInterval(interval: number): void + getSamplingInterval(): number + reportAnalogPin(pin: number, value: Board.REPORTING): void + reportDigitalPin(pin: number, value: Board.REPORTING): void + // TODO untested/incomplete --- TWW + pingRead(opts: any, callback: () => void): void + stepperConfig(deviceNum: number, type: number, stepsPerRev: number, dirOrMotor1Pin: number, + stepOrMotor2Pin: number, motor3Pin?: number, motor4Pin?: number): void + stepperStep(deviceNum: number, direction: Board.STEPPER_DIRECTION, steps: number, speed: number, + accel: number|((bool?: boolean) => void), decel?: number, callback?: (bool?: boolean) => void): void + // TODO untested --- TWW + serialConfig(options: { portId: Board.SERIAL_PORT_ID, baud: number, rxPin?: number, txPin?: number }): void + // TODO untested --- TWW + serialWrite(portId: Board.SERIAL_PORT_ID, inBytes: number[]): void + // TODO untested --- TWW + serialRead(portId: Board.SERIAL_PORT_ID, maxBytesToRead: number, callback: () => void): void + // TODO untested --- TWW + serialStop(portId: Board.SERIAL_PORT_ID): void + // TODO untested --- TWW + serialClose(portId: Board.SERIAL_PORT_ID): void + // TODO untested --- TWW + serialFlush(portId: Board.SERIAL_PORT_ID): void + // TODO untested --- TWW + serialListen(portId: Board.SERIAL_PORT_ID): void + // TODO untested --- TWW + sysexResponse(commandByte: number, handler: (data: number[]) => void): void + // TODO untested --- TWW + sysexCommand(message: number[]): void + reset(): void + static isAcceptablePort(port: Board.Port): boolean + static requestPort(callback: (error: any, port: Board.Port) => any): void + // TODO untested --- TWW + static encode(data: number[]): number[] + // TODO untested --- TWW + static decode(data: number[]): number[] + // TODO untested/incomplete --- TWW + protected _sendOneWireSearch(type: any, event: any, pin: number, callback: () => void): void + // TODO untested/incomplete --- TWW + protected _sendOneWireRequest(pin: number, subcommand: any, device: any, numBytesToRead: any, correlationId: any, + delay: number, dataToWrite: any, event: any, callback: () => void): void +} + +declare namespace Board +{ + export interface PinModes + { + INPUT: PIN_MODE, OUTPUT: PIN_MODE, ANALOG: PIN_MODE, PWM: PIN_MODE, SERVO: PIN_MODE, SHIFT: PIN_MODE, + I2C: PIN_MODE, ONEWIRE: PIN_MODE, STEPPER: PIN_MODE, SERIAL: PIN_MODE, PULLUP: PIN_MODE, IGNORE: PIN_MODE, + PING_READ: PIN_MODE, UNKOWN: PIN_MODE + } + + export interface StepperConstants + { + TYPE: { DRIVER: STEPPER_TYPE, TWO_WIRE: STEPPER_TYPE, FOUR_WIRE: STEPPER_TYPE }, + RUNSTATE: { + STOP: STEPPER_RUN_STATE, ACCEL: STEPPER_RUN_STATE, DECEL: STEPPER_RUN_STATE, RUN: STEPPER_RUN_STATE + }, + DIRECTION: { CCW: STEPPER_DIRECTION, CW: STEPPER_DIRECTION } + } + + // tslint:disable-next-line interface-name + export interface I2cModes + { + WRITE: I2C_MODE, READ: I2C_MODE, CONTINUOUS_READ: I2C_MODE, STOP_READING: I2C_MODE + } + + export interface SerialModes + { + CONTINUOUS_READ: SERIAL_MODE, STOP_READING: SERIAL_MODE + } + + export interface SerialPortIds + { + HW_SERIAL0: SERIAL_PORT_ID, HW_SERIAL1: SERIAL_PORT_ID, HW_SERIAL2: SERIAL_PORT_ID, + HW_SERIAL3: SERIAL_PORT_ID, SW_SERIAL0: SERIAL_PORT_ID, SW_SERIAL1: SERIAL_PORT_ID, + SW_SERIAL2: SERIAL_PORT_ID, SW_SERIAL3: SERIAL_PORT_ID, DEFAULT: SERIAL_PORT_ID, + } + + export interface SerialPinTypes + { + RES_RX0: SERIAL_PIN_TYPE, RES_TX0: SERIAL_PIN_TYPE, RES_RX1: SERIAL_PIN_TYPE, RES_TX1: SERIAL_PIN_TYPE, + RES_RX2: SERIAL_PIN_TYPE, RES_TX2: SERIAL_PIN_TYPE, RES_RX3: SERIAL_PIN_TYPE, RES_TX3: SERIAL_PIN_TYPE, + } + + export interface Pins + { + mode: PIN_MODE, + value: PIN_STATE|number, + supportedModes: PIN_MODE[], + analogChannel: number, + report: REPORTING, + state: PIN_STATE|PULLUP_STATE, // TODO not sure if this exists anymore... --- TWW + } + + export interface Firmware + { + name: string, + version: Version, + } + + export interface Settings + { + reportVersionTimeout: number, + samplingInterval: number, + serialport: { + baudRate: number, + bufferSize: number + } + } + + export interface Port + { + comName: string, + } + + export interface Version + { + major: number, + minor: number + } + + // TODO these enums could actually be non-const in the future (provides some benefits) --- TWW + // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L449-L464 + export const enum PIN_MODE { + INPUT = 0x00, + OUTPUT = 0x01, + ANALOG = 0x02, + PWM = 0x03, + SERVO = 0x04, + SHIFT = 0x05, + I2C = 0x06, + ONEWIRE = 0x07, + STEPPER = 0x08, + SERIAL = 0x0A, + PULLUP = 0x0B, + IGNORE = 0x7F, + PING_READ = 0x75, + UNKNOWN = 0x10, + } + + export const enum PIN_STATE { + LOW = 0, + HIGH = 1 + } + + export const enum REPORTING { + ON = 1, + OFF = 0, + } + + export const enum PULLUP_STATE { + ENABLED = 1, + DISABLED = 0, + } + + // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L474-L478 + export const enum STEPPER_TYPE { + DRIVER = 1, + TWO_WIRE = 2, + FOUR_WIRE = 4, + } + + // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L479-L484 + export const enum STEPPER_RUN_STATE { + STOP = 0, + ACCEL = 1, + DECEL = 2, + RUN = 3, + } + + // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L485-L488 + export const enum STEPPER_DIRECTION { + CCW = 0, + CW = 1, + } + + // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L466-L471 + export const enum I2C_MODE { + WRITE = 0, + READ = 1, + CONTINUOUS_READ = 2, + STOP_READING = 3 + } + + // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L491-L494 + export const enum SERIAL_MODE { + CONTINUOUS_READ = 0x00, + STOP_READING = 0x01, + } + + // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L497-L512 + export const enum SERIAL_PORT_ID { + HW_SERIAL0 = 0x00, + HW_SERIAL1 = 0x01, + HW_SERIAL2 = 0x02, + HW_SERIAL3 = 0x03, + SW_SERIAL0 = 0x08, + SW_SERIAL1 = 0x09, + SW_SERIAL2 = 0x10, + SW_SERIAL3 = 0x11, + DEFAULT = 0x08, + } + + // https://github.com/firmata/firmata.js/blob/v0.15.0/lib/firmata.js#L515-L524 + export const enum SERIAL_PIN_TYPE { + RES_RX0 = 0x00, + RES_TX0 = 0x01, + RES_RX1 = 0x02, + RES_TX1 = 0x03, + RES_RX2 = 0x04, + RES_TX2 = 0x05, + RES_RX3 = 0x06, + RES_TX3 = 0x07, + } +} \ No newline at end of file diff --git a/xmpp-jid/tsconfig.json b/types/firmata/tsconfig.json similarity index 93% rename from xmpp-jid/tsconfig.json rename to types/firmata/tsconfig.json index f4d02187a2..3b0d4b97cb 100644 --- a/xmpp-jid/tsconfig.json +++ b/types/firmata/tsconfig.json @@ -17,6 +17,6 @@ }, "files": [ "index.d.ts", - "xmpp-jid-tests.ts" + "firmata-tests.ts" ] } \ No newline at end of file diff --git a/gettext.js/tslint.json b/types/firmata/tslint.json similarity index 100% rename from gettext.js/tslint.json rename to types/firmata/tslint.json diff --git a/first-mate/.editorconfig b/types/first-mate/.editorconfig similarity index 100% rename from first-mate/.editorconfig rename to types/first-mate/.editorconfig diff --git a/first-mate/first-mate-tests.ts b/types/first-mate/first-mate-tests.ts similarity index 100% rename from first-mate/first-mate-tests.ts rename to types/first-mate/first-mate-tests.ts diff --git a/first-mate/index.d.ts b/types/first-mate/index.d.ts similarity index 100% rename from first-mate/index.d.ts rename to types/first-mate/index.d.ts diff --git a/first-mate/tsconfig.json b/types/first-mate/tsconfig.json similarity index 100% rename from first-mate/tsconfig.json rename to types/first-mate/tsconfig.json diff --git a/fixed-data-table/fixed-data-table-tests.tsx b/types/fixed-data-table/fixed-data-table-tests.tsx similarity index 100% rename from fixed-data-table/fixed-data-table-tests.tsx rename to types/fixed-data-table/fixed-data-table-tests.tsx diff --git a/fixed-data-table/index.d.ts b/types/fixed-data-table/index.d.ts similarity index 100% rename from fixed-data-table/index.d.ts rename to types/fixed-data-table/index.d.ts diff --git a/fixed-data-table/tsconfig.json b/types/fixed-data-table/tsconfig.json similarity index 100% rename from fixed-data-table/tsconfig.json rename to types/fixed-data-table/tsconfig.json diff --git a/flake-idgen/flake-idgen-tests.ts b/types/flake-idgen/flake-idgen-tests.ts similarity index 100% rename from flake-idgen/flake-idgen-tests.ts rename to types/flake-idgen/flake-idgen-tests.ts diff --git a/flake-idgen/index.d.ts b/types/flake-idgen/index.d.ts similarity index 100% rename from flake-idgen/index.d.ts rename to types/flake-idgen/index.d.ts diff --git a/flake-idgen/tsconfig.json b/types/flake-idgen/tsconfig.json similarity index 100% rename from flake-idgen/tsconfig.json rename to types/flake-idgen/tsconfig.json diff --git a/flat/flat-tests.ts b/types/flat/flat-tests.ts similarity index 100% rename from flat/flat-tests.ts rename to types/flat/flat-tests.ts diff --git a/flat/index.d.ts b/types/flat/index.d.ts similarity index 100% rename from flat/index.d.ts rename to types/flat/index.d.ts diff --git a/flat/tsconfig.json b/types/flat/tsconfig.json similarity index 100% rename from flat/tsconfig.json rename to types/flat/tsconfig.json diff --git a/flatpickr/flatpickr-tests.ts b/types/flatpickr/flatpickr-tests.ts similarity index 100% rename from flatpickr/flatpickr-tests.ts rename to types/flatpickr/flatpickr-tests.ts diff --git a/flatpickr/index.d.ts b/types/flatpickr/index.d.ts similarity index 100% rename from flatpickr/index.d.ts rename to types/flatpickr/index.d.ts diff --git a/flatpickr/tsconfig.json b/types/flatpickr/tsconfig.json similarity index 100% rename from flatpickr/tsconfig.json rename to types/flatpickr/tsconfig.json diff --git a/flatpickr/tslint.json b/types/flatpickr/tslint.json similarity index 100% rename from flatpickr/tslint.json rename to types/flatpickr/tslint.json diff --git a/flexslider/flexslider-tests.ts b/types/flexslider/flexslider-tests.ts similarity index 100% rename from flexslider/flexslider-tests.ts rename to types/flexslider/flexslider-tests.ts diff --git a/flexslider/index.d.ts b/types/flexslider/index.d.ts similarity index 100% rename from flexslider/index.d.ts rename to types/flexslider/index.d.ts diff --git a/flexslider/tsconfig.json b/types/flexslider/tsconfig.json similarity index 100% rename from flexslider/tsconfig.json rename to types/flexslider/tsconfig.json diff --git a/flickity/FlickityEvents.ts b/types/flickity/FlickityEvents.ts similarity index 100% rename from flickity/FlickityEvents.ts rename to types/flickity/FlickityEvents.ts diff --git a/flickity/UNUSED_FILES.txt b/types/flickity/UNUSED_FILES.txt similarity index 100% rename from flickity/UNUSED_FILES.txt rename to types/flickity/UNUSED_FILES.txt diff --git a/flickity/flickity-tests.ts b/types/flickity/flickity-tests.ts similarity index 100% rename from flickity/flickity-tests.ts rename to types/flickity/flickity-tests.ts diff --git a/flickity/index.d.ts b/types/flickity/index.d.ts similarity index 100% rename from flickity/index.d.ts rename to types/flickity/index.d.ts diff --git a/flickity/tsconfig.json b/types/flickity/tsconfig.json similarity index 100% rename from flickity/tsconfig.json rename to types/flickity/tsconfig.json diff --git a/flight/flight-tests.ts b/types/flight/flight-tests.ts similarity index 100% rename from flight/flight-tests.ts rename to types/flight/flight-tests.ts diff --git a/flight/index.d.ts b/types/flight/index.d.ts similarity index 100% rename from flight/index.d.ts rename to types/flight/index.d.ts diff --git a/flight/tsconfig.json b/types/flight/tsconfig.json similarity index 100% rename from flight/tsconfig.json rename to types/flight/tsconfig.json diff --git a/flightplan/flightplan-tests.ts b/types/flightplan/flightplan-tests.ts similarity index 100% rename from flightplan/flightplan-tests.ts rename to types/flightplan/flightplan-tests.ts diff --git a/flightplan/index.d.ts b/types/flightplan/index.d.ts similarity index 100% rename from flightplan/index.d.ts rename to types/flightplan/index.d.ts diff --git a/flightplan/tsconfig.json b/types/flightplan/tsconfig.json similarity index 100% rename from flightplan/tsconfig.json rename to types/flightplan/tsconfig.json diff --git a/flipsnap/flipsnap-tests.ts b/types/flipsnap/flipsnap-tests.ts similarity index 100% rename from flipsnap/flipsnap-tests.ts rename to types/flipsnap/flipsnap-tests.ts diff --git a/flipsnap/index.d.ts b/types/flipsnap/index.d.ts similarity index 100% rename from flipsnap/index.d.ts rename to types/flipsnap/index.d.ts diff --git a/flipsnap/tsconfig.json b/types/flipsnap/tsconfig.json similarity index 100% rename from flipsnap/tsconfig.json rename to types/flipsnap/tsconfig.json diff --git a/flot/index.d.ts b/types/flot/index.d.ts similarity index 100% rename from flot/index.d.ts rename to types/flot/index.d.ts diff --git a/flot/tsconfig.json b/types/flot/tsconfig.json similarity index 100% rename from flot/tsconfig.json rename to types/flot/tsconfig.json diff --git a/flowjs/flowjs-tests.ts b/types/flowjs/flowjs-tests.ts similarity index 100% rename from flowjs/flowjs-tests.ts rename to types/flowjs/flowjs-tests.ts diff --git a/flowjs/index.d.ts b/types/flowjs/index.d.ts similarity index 100% rename from flowjs/index.d.ts rename to types/flowjs/index.d.ts diff --git a/flowjs/tsconfig.json b/types/flowjs/tsconfig.json similarity index 100% rename from flowjs/tsconfig.json rename to types/flowjs/tsconfig.json diff --git a/fluent-ffmpeg/fluent-ffmpeg-tests.ts b/types/fluent-ffmpeg/fluent-ffmpeg-tests.ts similarity index 100% rename from fluent-ffmpeg/fluent-ffmpeg-tests.ts rename to types/fluent-ffmpeg/fluent-ffmpeg-tests.ts diff --git a/fluent-ffmpeg/index.d.ts b/types/fluent-ffmpeg/index.d.ts similarity index 100% rename from fluent-ffmpeg/index.d.ts rename to types/fluent-ffmpeg/index.d.ts diff --git a/fluent-ffmpeg/tsconfig.json b/types/fluent-ffmpeg/tsconfig.json similarity index 100% rename from fluent-ffmpeg/tsconfig.json rename to types/fluent-ffmpeg/tsconfig.json diff --git a/flux-standard-action/flux-standard-action-tests.ts b/types/flux-standard-action/flux-standard-action-tests.ts similarity index 100% rename from flux-standard-action/flux-standard-action-tests.ts rename to types/flux-standard-action/flux-standard-action-tests.ts diff --git a/flux-standard-action/index.d.ts b/types/flux-standard-action/index.d.ts similarity index 100% rename from flux-standard-action/index.d.ts rename to types/flux-standard-action/index.d.ts diff --git a/flux-standard-action/tsconfig.json b/types/flux-standard-action/tsconfig.json similarity index 100% rename from flux-standard-action/tsconfig.json rename to types/flux-standard-action/tsconfig.json diff --git a/flux/flux-tests.ts b/types/flux/flux-tests.ts similarity index 100% rename from flux/flux-tests.ts rename to types/flux/flux-tests.ts diff --git a/flux/index.d.ts b/types/flux/index.d.ts similarity index 100% rename from flux/index.d.ts rename to types/flux/index.d.ts diff --git a/flux/tsconfig.json b/types/flux/tsconfig.json similarity index 100% rename from flux/tsconfig.json rename to types/flux/tsconfig.json diff --git a/flux/utils/index.d.ts b/types/flux/utils/index.d.ts similarity index 100% rename from flux/utils/index.d.ts rename to types/flux/utils/index.d.ts diff --git a/fluxxor/fluxxor-tests.ts b/types/fluxxor/fluxxor-tests.ts similarity index 100% rename from fluxxor/fluxxor-tests.ts rename to types/fluxxor/fluxxor-tests.ts diff --git a/fluxxor/index.d.ts b/types/fluxxor/index.d.ts similarity index 100% rename from fluxxor/index.d.ts rename to types/fluxxor/index.d.ts diff --git a/fluxxor/tsconfig.json b/types/fluxxor/tsconfig.json similarity index 100% rename from fluxxor/tsconfig.json rename to types/fluxxor/tsconfig.json diff --git a/fontfaceobserver/fontfaceobserver-tests.ts b/types/fontfaceobserver/fontfaceobserver-tests.ts similarity index 100% rename from fontfaceobserver/fontfaceobserver-tests.ts rename to types/fontfaceobserver/fontfaceobserver-tests.ts diff --git a/fontfaceobserver/index.d.ts b/types/fontfaceobserver/index.d.ts similarity index 100% rename from fontfaceobserver/index.d.ts rename to types/fontfaceobserver/index.d.ts diff --git a/fontfaceobserver/tsconfig.json b/types/fontfaceobserver/tsconfig.json similarity index 100% rename from fontfaceobserver/tsconfig.json rename to types/fontfaceobserver/tsconfig.json diff --git a/fontoxml/fontoxml-tests.ts b/types/fontoxml/fontoxml-tests.ts similarity index 100% rename from fontoxml/fontoxml-tests.ts rename to types/fontoxml/fontoxml-tests.ts diff --git a/fontoxml/index.d.ts b/types/fontoxml/index.d.ts similarity index 100% rename from fontoxml/index.d.ts rename to types/fontoxml/index.d.ts diff --git a/fontoxml/tsconfig.json b/types/fontoxml/tsconfig.json similarity index 100% rename from fontoxml/tsconfig.json rename to types/fontoxml/tsconfig.json diff --git a/forever-monitor/forever-monitor-tests.ts b/types/forever-monitor/forever-monitor-tests.ts similarity index 100% rename from forever-monitor/forever-monitor-tests.ts rename to types/forever-monitor/forever-monitor-tests.ts diff --git a/forever-monitor/index.d.ts b/types/forever-monitor/index.d.ts similarity index 100% rename from forever-monitor/index.d.ts rename to types/forever-monitor/index.d.ts diff --git a/forever-monitor/tsconfig.json b/types/forever-monitor/tsconfig.json similarity index 100% rename from forever-monitor/tsconfig.json rename to types/forever-monitor/tsconfig.json diff --git a/forever-monitor/tslint.json b/types/forever-monitor/tslint.json similarity index 100% rename from forever-monitor/tslint.json rename to types/forever-monitor/tslint.json diff --git a/forge-di/forge-di-tests.ts b/types/forge-di/forge-di-tests.ts similarity index 100% rename from forge-di/forge-di-tests.ts rename to types/forge-di/forge-di-tests.ts diff --git a/forge-di/index.d.ts b/types/forge-di/index.d.ts similarity index 100% rename from forge-di/index.d.ts rename to types/forge-di/index.d.ts diff --git a/forge-di/tsconfig.json b/types/forge-di/tsconfig.json similarity index 100% rename from forge-di/tsconfig.json rename to types/forge-di/tsconfig.json diff --git a/form-data/form-data-tests.ts b/types/form-data/form-data-tests.ts similarity index 100% rename from form-data/form-data-tests.ts rename to types/form-data/form-data-tests.ts diff --git a/form-data/index.d.ts b/types/form-data/index.d.ts similarity index 100% rename from form-data/index.d.ts rename to types/form-data/index.d.ts diff --git a/form-data/tsconfig.json b/types/form-data/tsconfig.json similarity index 100% rename from form-data/tsconfig.json rename to types/form-data/tsconfig.json diff --git a/form-serializer/form-serializer-tests.ts b/types/form-serializer/form-serializer-tests.ts similarity index 100% rename from form-serializer/form-serializer-tests.ts rename to types/form-serializer/form-serializer-tests.ts diff --git a/form-serializer/index.d.ts b/types/form-serializer/index.d.ts similarity index 100% rename from form-serializer/index.d.ts rename to types/form-serializer/index.d.ts diff --git a/form-serializer/tsconfig.json b/types/form-serializer/tsconfig.json similarity index 100% rename from form-serializer/tsconfig.json rename to types/form-serializer/tsconfig.json diff --git a/format-unicorn/index.d.ts b/types/format-unicorn/index.d.ts similarity index 100% rename from format-unicorn/index.d.ts rename to types/format-unicorn/index.d.ts diff --git a/format-unicorn/safe.d.ts b/types/format-unicorn/safe.d.ts similarity index 100% rename from format-unicorn/safe.d.ts rename to types/format-unicorn/safe.d.ts diff --git a/format-unicorn/test/index.ts b/types/format-unicorn/test/index.ts similarity index 100% rename from format-unicorn/test/index.ts rename to types/format-unicorn/test/index.ts diff --git a/format-unicorn/test/safe.ts b/types/format-unicorn/test/safe.ts similarity index 100% rename from format-unicorn/test/safe.ts rename to types/format-unicorn/test/safe.ts diff --git a/format-unicorn/tsconfig.json b/types/format-unicorn/tsconfig.json similarity index 100% rename from format-unicorn/tsconfig.json rename to types/format-unicorn/tsconfig.json diff --git a/format-unicorn/tslint.json b/types/format-unicorn/tslint.json similarity index 100% rename from format-unicorn/tslint.json rename to types/format-unicorn/tslint.json diff --git a/formidable/formidable-tests.ts b/types/formidable/formidable-tests.ts similarity index 100% rename from formidable/formidable-tests.ts rename to types/formidable/formidable-tests.ts diff --git a/formidable/index.d.ts b/types/formidable/index.d.ts similarity index 100% rename from formidable/index.d.ts rename to types/formidable/index.d.ts diff --git a/formidable/tsconfig.json b/types/formidable/tsconfig.json similarity index 100% rename from formidable/tsconfig.json rename to types/formidable/tsconfig.json diff --git a/fossil-delta/fossil-delta-tests.ts b/types/fossil-delta/fossil-delta-tests.ts similarity index 100% rename from fossil-delta/fossil-delta-tests.ts rename to types/fossil-delta/fossil-delta-tests.ts diff --git a/fossil-delta/index.d.ts b/types/fossil-delta/index.d.ts similarity index 100% rename from fossil-delta/index.d.ts rename to types/fossil-delta/index.d.ts diff --git a/fossil-delta/tsconfig.json b/types/fossil-delta/tsconfig.json similarity index 100% rename from fossil-delta/tsconfig.json rename to types/fossil-delta/tsconfig.json diff --git a/foundation-sites/foundation-sites-tests.ts b/types/foundation-sites/foundation-sites-tests.ts similarity index 100% rename from foundation-sites/foundation-sites-tests.ts rename to types/foundation-sites/foundation-sites-tests.ts diff --git a/foundation-sites/index.d.ts b/types/foundation-sites/index.d.ts similarity index 100% rename from foundation-sites/index.d.ts rename to types/foundation-sites/index.d.ts diff --git a/foundation-sites/tsconfig.json b/types/foundation-sites/tsconfig.json similarity index 100% rename from foundation-sites/tsconfig.json rename to types/foundation-sites/tsconfig.json diff --git a/foundation/foundation-tests.ts b/types/foundation/foundation-tests.ts similarity index 100% rename from foundation/foundation-tests.ts rename to types/foundation/foundation-tests.ts diff --git a/foundation/index.d.ts b/types/foundation/index.d.ts similarity index 100% rename from foundation/index.d.ts rename to types/foundation/index.d.ts diff --git a/foundation/tsconfig.json b/types/foundation/tsconfig.json similarity index 100% rename from foundation/tsconfig.json rename to types/foundation/tsconfig.json diff --git a/fpsmeter/index.d.ts b/types/fpsmeter/index.d.ts similarity index 100% rename from fpsmeter/index.d.ts rename to types/fpsmeter/index.d.ts diff --git a/fpsmeter/tsconfig.json b/types/fpsmeter/tsconfig.json similarity index 100% rename from fpsmeter/tsconfig.json rename to types/fpsmeter/tsconfig.json diff --git a/freedom/UNUSED_FILES.txt b/types/freedom/UNUSED_FILES.txt similarity index 100% rename from freedom/UNUSED_FILES.txt rename to types/freedom/UNUSED_FILES.txt diff --git a/freedom/freedom-core-env.d.ts b/types/freedom/freedom-core-env.d.ts similarity index 100% rename from freedom/freedom-core-env.d.ts rename to types/freedom/freedom-core-env.d.ts diff --git a/freedom/freedom-module-env.d.ts b/types/freedom/freedom-module-env.d.ts similarity index 100% rename from freedom/freedom-module-env.d.ts rename to types/freedom/freedom-module-env.d.ts diff --git a/freedom/freedom-tests.ts b/types/freedom/freedom-tests.ts similarity index 100% rename from freedom/freedom-tests.ts rename to types/freedom/freedom-tests.ts diff --git a/freedom/index.d.ts b/types/freedom/index.d.ts similarity index 100% rename from freedom/index.d.ts rename to types/freedom/index.d.ts diff --git a/freedom/tsconfig.json b/types/freedom/tsconfig.json similarity index 100% rename from freedom/tsconfig.json rename to types/freedom/tsconfig.json diff --git a/freeport/freeport-tests.ts b/types/freeport/freeport-tests.ts similarity index 100% rename from freeport/freeport-tests.ts rename to types/freeport/freeport-tests.ts diff --git a/freeport/index.d.ts b/types/freeport/index.d.ts similarity index 100% rename from freeport/index.d.ts rename to types/freeport/index.d.ts diff --git a/freeport/tsconfig.json b/types/freeport/tsconfig.json similarity index 100% rename from freeport/tsconfig.json rename to types/freeport/tsconfig.json diff --git a/freeport/tslint.json b/types/freeport/tslint.json similarity index 100% rename from freeport/tslint.json rename to types/freeport/tslint.json diff --git a/from/from-tests.ts b/types/from/from-tests.ts similarity index 100% rename from from/from-tests.ts rename to types/from/from-tests.ts diff --git a/from/index.d.ts b/types/from/index.d.ts similarity index 100% rename from from/index.d.ts rename to types/from/index.d.ts diff --git a/from/tsconfig.json b/types/from/tsconfig.json similarity index 100% rename from from/tsconfig.json rename to types/from/tsconfig.json diff --git a/fromjs/fromjs-tests.ts b/types/fromjs/fromjs-tests.ts similarity index 100% rename from fromjs/fromjs-tests.ts rename to types/fromjs/fromjs-tests.ts diff --git a/fromjs/index.d.ts b/types/fromjs/index.d.ts similarity index 100% rename from fromjs/index.d.ts rename to types/fromjs/index.d.ts diff --git a/fromjs/tsconfig.json b/types/fromjs/tsconfig.json similarity index 100% rename from fromjs/tsconfig.json rename to types/fromjs/tsconfig.json diff --git a/fromnow/fromnow-tests.ts b/types/fromnow/fromnow-tests.ts similarity index 100% rename from fromnow/fromnow-tests.ts rename to types/fromnow/fromnow-tests.ts diff --git a/fromnow/index.d.ts b/types/fromnow/index.d.ts similarity index 100% rename from fromnow/index.d.ts rename to types/fromnow/index.d.ts diff --git a/fromnow/tsconfig.json b/types/fromnow/tsconfig.json similarity index 100% rename from fromnow/tsconfig.json rename to types/fromnow/tsconfig.json diff --git a/fs-ext/fs-ext-tests.ts b/types/fs-ext/fs-ext-tests.ts similarity index 100% rename from fs-ext/fs-ext-tests.ts rename to types/fs-ext/fs-ext-tests.ts diff --git a/fs-ext/index.d.ts b/types/fs-ext/index.d.ts similarity index 100% rename from fs-ext/index.d.ts rename to types/fs-ext/index.d.ts diff --git a/fs-ext/tsconfig.json b/types/fs-ext/tsconfig.json similarity index 100% rename from fs-ext/tsconfig.json rename to types/fs-ext/tsconfig.json diff --git a/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts b/types/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts similarity index 100% rename from fs-extra-promise-es6/fs-extra-promise-es6-tests.ts rename to types/fs-extra-promise-es6/fs-extra-promise-es6-tests.ts diff --git a/fs-extra-promise-es6/index.d.ts b/types/fs-extra-promise-es6/index.d.ts similarity index 100% rename from fs-extra-promise-es6/index.d.ts rename to types/fs-extra-promise-es6/index.d.ts diff --git a/fs-extra-promise-es6/tsconfig.json b/types/fs-extra-promise-es6/tsconfig.json similarity index 100% rename from fs-extra-promise-es6/tsconfig.json rename to types/fs-extra-promise-es6/tsconfig.json diff --git a/fs-extra-promise/fs-extra-promise-tests.ts b/types/fs-extra-promise/fs-extra-promise-tests.ts similarity index 100% rename from fs-extra-promise/fs-extra-promise-tests.ts rename to types/fs-extra-promise/fs-extra-promise-tests.ts diff --git a/fs-extra-promise/index.d.ts b/types/fs-extra-promise/index.d.ts similarity index 100% rename from fs-extra-promise/index.d.ts rename to types/fs-extra-promise/index.d.ts diff --git a/fs-extra-promise/tsconfig.json b/types/fs-extra-promise/tsconfig.json similarity index 100% rename from fs-extra-promise/tsconfig.json rename to types/fs-extra-promise/tsconfig.json diff --git a/fs-extra/fs-extra-tests.ts b/types/fs-extra/fs-extra-tests.ts similarity index 100% rename from fs-extra/fs-extra-tests.ts rename to types/fs-extra/fs-extra-tests.ts diff --git a/fs-extra/index.d.ts b/types/fs-extra/index.d.ts similarity index 100% rename from fs-extra/index.d.ts rename to types/fs-extra/index.d.ts diff --git a/fs-extra/tsconfig.json b/types/fs-extra/tsconfig.json similarity index 100% rename from fs-extra/tsconfig.json rename to types/fs-extra/tsconfig.json diff --git a/fs-finder/fs-finder-tests.ts b/types/fs-finder/fs-finder-tests.ts similarity index 100% rename from fs-finder/fs-finder-tests.ts rename to types/fs-finder/fs-finder-tests.ts diff --git a/fs-finder/index.d.ts b/types/fs-finder/index.d.ts similarity index 100% rename from fs-finder/index.d.ts rename to types/fs-finder/index.d.ts diff --git a/fs-finder/tsconfig.json b/types/fs-finder/tsconfig.json similarity index 100% rename from fs-finder/tsconfig.json rename to types/fs-finder/tsconfig.json diff --git a/fs-mock/fs-mock-tests.ts b/types/fs-mock/fs-mock-tests.ts similarity index 100% rename from fs-mock/fs-mock-tests.ts rename to types/fs-mock/fs-mock-tests.ts diff --git a/fs-mock/index.d.ts b/types/fs-mock/index.d.ts similarity index 100% rename from fs-mock/index.d.ts rename to types/fs-mock/index.d.ts diff --git a/fs-mock/tsconfig.json b/types/fs-mock/tsconfig.json similarity index 100% rename from fs-mock/tsconfig.json rename to types/fs-mock/tsconfig.json diff --git a/fs-promise/fs-promise-tests.ts b/types/fs-promise/fs-promise-tests.ts similarity index 100% rename from fs-promise/fs-promise-tests.ts rename to types/fs-promise/fs-promise-tests.ts diff --git a/fs-promise/index.d.ts b/types/fs-promise/index.d.ts similarity index 100% rename from fs-promise/index.d.ts rename to types/fs-promise/index.d.ts diff --git a/fs-promise/tsconfig.json b/types/fs-promise/tsconfig.json similarity index 100% rename from fs-promise/tsconfig.json rename to types/fs-promise/tsconfig.json diff --git a/fs-promise/tslint.json b/types/fs-promise/tslint.json similarity index 100% rename from fs-promise/tslint.json rename to types/fs-promise/tslint.json diff --git a/ftdomdelegate/ftdomdelegate-tests.ts b/types/ftdomdelegate/ftdomdelegate-tests.ts similarity index 100% rename from ftdomdelegate/ftdomdelegate-tests.ts rename to types/ftdomdelegate/ftdomdelegate-tests.ts diff --git a/ftdomdelegate/index.d.ts b/types/ftdomdelegate/index.d.ts similarity index 100% rename from ftdomdelegate/index.d.ts rename to types/ftdomdelegate/index.d.ts diff --git a/ftdomdelegate/tsconfig.json b/types/ftdomdelegate/tsconfig.json similarity index 100% rename from ftdomdelegate/tsconfig.json rename to types/ftdomdelegate/tsconfig.json diff --git a/ftp/ftp-tests.ts b/types/ftp/ftp-tests.ts similarity index 100% rename from ftp/ftp-tests.ts rename to types/ftp/ftp-tests.ts diff --git a/ftp/index.d.ts b/types/ftp/index.d.ts similarity index 100% rename from ftp/index.d.ts rename to types/ftp/index.d.ts diff --git a/ftp/tsconfig.json b/types/ftp/tsconfig.json similarity index 100% rename from ftp/tsconfig.json rename to types/ftp/tsconfig.json diff --git a/ftpd/ftpd-tests.ts b/types/ftpd/ftpd-tests.ts similarity index 100% rename from ftpd/ftpd-tests.ts rename to types/ftpd/ftpd-tests.ts diff --git a/ftpd/index.d.ts b/types/ftpd/index.d.ts similarity index 100% rename from ftpd/index.d.ts rename to types/ftpd/index.d.ts diff --git a/ftpd/tsconfig.json b/types/ftpd/tsconfig.json similarity index 100% rename from ftpd/tsconfig.json rename to types/ftpd/tsconfig.json diff --git a/fullcalendar/fullcalendar-tests.ts b/types/fullcalendar/fullcalendar-tests.ts similarity index 94% rename from fullcalendar/fullcalendar-tests.ts rename to types/fullcalendar/fullcalendar-tests.ts index 63328a9cef..4557a94eef 100644 --- a/fullcalendar/fullcalendar-tests.ts +++ b/types/fullcalendar/fullcalendar-tests.ts @@ -33,7 +33,6 @@ $('#calendar').fullCalendar({ $('#calendar').fullCalendar({ eventSources: [ - // source with no options "http://www.google.com/your_feed_url1/", @@ -84,15 +83,14 @@ $('#calendar').fullCalendar({ dragOpacity: .5 }); -var view = $('#calendar').fullCalendar('getView'); +const view = $('#calendar').fullCalendar('getView'); alert("The view's title is " + view.title); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ header: { @@ -148,15 +146,13 @@ $(document).ready(() => { } ] }); - }); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ header: { @@ -213,15 +209,13 @@ $(document).ready(() => { } ] }); - }); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ header: { @@ -267,15 +261,13 @@ $(document).ready(() => { } ] }); - }); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ editable: true, @@ -332,15 +324,13 @@ $(document).ready(() => { } ] }); - }); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ header: { @@ -386,7 +376,6 @@ $(document).ready(() => { } ] }); - }); $('#my-prev-button').click(() => { @@ -404,7 +393,7 @@ $('#my-today-button').click(() => { $('#calendar').fullCalendar('gotoDate', 1, 0, 1); $('#my-button').click(() => { - var d = $('#calendar').fullCalendar('getDate'); + const d = $('#calendar').fullCalendar('getDate'); alert("The current date of the calendar is " + d); }); @@ -429,7 +418,6 @@ $('#calendar').fullCalendar({ $('#calendar').fullCalendar({ dayClick(date, allDay, jsEvent, view) { - if (allDay) { alert('Clicked on the entire day: ' + date); } else { @@ -442,20 +430,17 @@ $('#calendar').fullCalendar({ // change the day's background color just for fun $(this).css('background-color', 'red'); - } }); $('#calendar').fullCalendar({ eventClick(calEvent, jsEvent, view) { - alert('Event: ' + calEvent.title); alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY); alert('View: ' + view.name); // change the border color just for fun $(this).css('border-color', 'red'); - } }); @@ -477,9 +462,7 @@ $('#calendar').fullCalendar({ }); $('#calendar').fullCalendar({ - eventSources: [ - // your event source { url: '/myfeed.php', @@ -496,13 +479,10 @@ $('#calendar').fullCalendar({ } // any other sources... - ] - }); $('#calendar').fullCalendar({ - events: { url: '/myfeed.php', type: 'POST', @@ -516,22 +496,17 @@ $('#calendar').fullCalendar({ color: 'yellow', // a non-ajax option textColor: 'black' // a non-ajax option } - }); $('#calendar').fullCalendar({ - events: { url: '/myfeed.php', cache: true } - }); $('#calendar').fullCalendar({ - eventSources: [ - // your event source { url: '/myfeed.php', // use the `url` property @@ -540,9 +515,7 @@ $('#calendar').fullCalendar({ } // any other sources... - ] - }); $('#calendar').fullCalendar({ @@ -569,9 +542,7 @@ $('#calendar').fullCalendar({ }); $('#calendar').fullCalendar({ - eventSources: [ - // your event source { events: [ // put the array in the `events` property @@ -594,9 +565,7 @@ $('#calendar').fullCalendar({ } // any other event sources... - ] - }); $('#calendar').fullCalendar({ @@ -610,7 +579,7 @@ $('#calendar').fullCalendar({ end: Math.round(end.toDate().getTime() / 1000) }, success(doc) { - var events: any[] = []; + const events: any[] = []; $(doc).find('event').each(() => { events.push({ title: $(this).attr('title'), @@ -624,9 +593,7 @@ $('#calendar').fullCalendar({ }); $('#calendar').fullCalendar({ - eventSources: [ - // your event source { events(start: moment.Moment, end: moment.Moment, timezone: string | boolean, callback: (events: FullCalendar.EventObject[]) => void) { @@ -635,11 +602,8 @@ $('#calendar').fullCalendar({ color: 'yellow', // an option! textColor: 'black' // an option! } - // any other sources... - ] - }); $('#calendar').fullCalendar({ @@ -651,11 +615,9 @@ $('#calendar').fullCalendar({ $('#calendar').fullCalendar({ eventClick(event, element) { - event.title = "CLICKED!"; $('#calendar').fullCalendar('updateEvent', event); - } }); @@ -712,11 +674,10 @@ $('#draggable1').draggable(); $('#draggable2').draggable(); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ theme: true, @@ -773,17 +734,15 @@ $(document).ready(() => { } ] }); - }); $(document).ready(() => { /* initialize the external events -----------------------------------------------------------------*/ $('#external-events div.external-event').each(() => { - // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/) // it doesn't need to have a start or end - var eventObject = { + const eventObject = { title: $.trim($(this).text()) // use the element's text as the event title }; @@ -796,7 +755,6 @@ $(document).ready(() => { revert: true, // will cause the event to go back to its revertDuration: 0 // original position after the drag }); - }); /* initialize the calendar -----------------------------------------------------------------*/ @@ -812,10 +770,10 @@ $(document).ready(() => { drop(date, allDay) { // this function is called when something is dropped // retrieve the dropped element's stored Event Object - var originalEventObject = $(this).data('eventObject'); + const originalEventObject = $(this).data('eventObject'); // we need to copy it, so that multiple events don't have a reference to the same object - var copiedEventObject: any = $.extend({}, originalEventObject); + const copiedEventObject: any = $.extend({}, originalEventObject); // assign it the date that was reported copiedEventObject.start = date; @@ -835,10 +793,10 @@ $(document).ready(() => { }); $(document).ready(() => { - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ theme: true, diff --git a/fullcalendar/index.d.ts b/types/fullcalendar/index.d.ts similarity index 100% rename from fullcalendar/index.d.ts rename to types/fullcalendar/index.d.ts diff --git a/fullcalendar/package.json b/types/fullcalendar/package.json similarity index 100% rename from fullcalendar/package.json rename to types/fullcalendar/package.json diff --git a/fullcalendar/tsconfig.json b/types/fullcalendar/tsconfig.json similarity index 100% rename from fullcalendar/tsconfig.json rename to types/fullcalendar/tsconfig.json diff --git a/fullcalendar/tslint.json b/types/fullcalendar/tslint.json similarity index 100% rename from fullcalendar/tslint.json rename to types/fullcalendar/tslint.json diff --git a/fullcalendar/v1/fullcalendar-tests.ts b/types/fullcalendar/v1/fullcalendar-tests.ts similarity index 94% rename from fullcalendar/v1/fullcalendar-tests.ts rename to types/fullcalendar/v1/fullcalendar-tests.ts index ede55bc0b1..c2c0da1948 100644 --- a/fullcalendar/v1/fullcalendar-tests.ts +++ b/types/fullcalendar/v1/fullcalendar-tests.ts @@ -30,7 +30,6 @@ $('#calendar').fullCalendar({ $('#calendar').fullCalendar({ eventSources: [ - // source with no options "http://www.google.com/your_feed_url1/", @@ -81,15 +80,14 @@ $('#calendar').fullCalendar({ dragOpacity: .5 }); -var view = $('#calendar').fullCalendar('getView'); +const view = $('#calendar').fullCalendar('getView'); alert("The view's title is " + view.title); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ header: { @@ -145,15 +143,13 @@ $(document).ready(() => { } ] }); - }); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ header: { @@ -210,15 +206,13 @@ $(document).ready(() => { } ] }); - }); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ header: { @@ -264,15 +258,13 @@ $(document).ready(() => { } ] }); - }); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ editable: true, @@ -329,15 +321,13 @@ $(document).ready(() => { } ] }); - }); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ header: { @@ -383,7 +373,6 @@ $(document).ready(() => { } ] }); - }); $('#my-prev-button').click(() => { @@ -401,7 +390,7 @@ $('#my-today-button').click(() => { $('#calendar').fullCalendar('gotoDate', 1, 0, 1); $('#my-button').click(() => { - var d = $('#calendar').fullCalendar('getDate'); + const d = $('#calendar').fullCalendar('getDate'); alert("The current date of the calendar is " + d); }); @@ -426,7 +415,6 @@ $('#calendar').fullCalendar({ $('#calendar').fullCalendar({ dayClick(date, allDay, jsEvent, view) { - if (allDay) { alert('Clicked on the entire day: ' + date); } else { @@ -439,20 +427,17 @@ $('#calendar').fullCalendar({ // change the day's background color just for fun $(this).css('background-color', 'red'); - } }); $('#calendar').fullCalendar({ eventClick(calEvent, jsEvent, view) { - alert('Event: ' + calEvent.title); alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY); alert('View: ' + view.name); // change the border color just for fun $(this).css('border-color', 'red'); - } }); @@ -474,9 +459,7 @@ $('#calendar').fullCalendar({ }); $('#calendar').fullCalendar({ - eventSources: [ - // your event source { url: '/myfeed.php', @@ -493,13 +476,10 @@ $('#calendar').fullCalendar({ } // any other sources... - ] - }); $('#calendar').fullCalendar({ - events: { url: '/myfeed.php', type: 'POST', @@ -513,22 +493,17 @@ $('#calendar').fullCalendar({ color: 'yellow', // a non-ajax option textColor: 'black' // a non-ajax option } - }); $('#calendar').fullCalendar({ - events: { url: '/myfeed.php', cache: true } - }); $('#calendar').fullCalendar({ - eventSources: [ - // your event source { url: '/myfeed.php', // use the `url` property @@ -537,9 +512,7 @@ $('#calendar').fullCalendar({ } // any other sources... - ] - }); $('#calendar').fullCalendar({ @@ -566,9 +539,7 @@ $('#calendar').fullCalendar({ }); $('#calendar').fullCalendar({ - eventSources: [ - // your event source { events: [ // put the array in the `events` property @@ -591,9 +562,7 @@ $('#calendar').fullCalendar({ } // any other event sources... - ] - }); $('#calendar').fullCalendar({ @@ -607,7 +576,7 @@ $('#calendar').fullCalendar({ end: Math.round(end.getTime() / 1000) }, success(doc) { - var events: any[] = []; + const events: any[] = []; $(doc).find('event').each(() => { events.push({ title: $(this).attr('title'), @@ -621,9 +590,7 @@ $('#calendar').fullCalendar({ }); $('#calendar').fullCalendar({ - eventSources: [ - // your event source { events(start: any, end: any, callback: any) { @@ -634,9 +601,7 @@ $('#calendar').fullCalendar({ } // any other sources... - ] - }); $('#calendar').fullCalendar({ @@ -648,11 +613,9 @@ $('#calendar').fullCalendar({ $('#calendar').fullCalendar({ eventClick(event, element) { - event.title = "CLICKED!"; $('#calendar').fullCalendar('updateEvent', event); - } }); @@ -709,11 +672,10 @@ $('#draggable1').draggable(); $('#draggable2').draggable(); $(document).ready(() => { - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); + const date = new Date(); + const d = date.getDate(); + const m = date.getMonth(); + const y = date.getFullYear(); $('#calendar').fullCalendar({ theme: true, @@ -770,17 +732,15 @@ $(document).ready(() => { } ] }); - }); $(document).ready(() => { /* initialize the external events -----------------------------------------------------------------*/ $('#external-events div.external-event').each(() => { - // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/) // it doesn't need to have a start or end - var eventObject = { + const eventObject = { title: $.trim($(this).text()) // use the element's text as the event title }; @@ -793,7 +753,6 @@ $(document).ready(() => { revert: true, // will cause the event to go back to its revertDuration: 0 // original position after the drag }); - }); /* initialize the calendar -----------------------------------------------------------------*/ @@ -809,10 +768,10 @@ $(document).ready(() => { drop(date, allDay) { // this function is called when something is dropped // retrieve the dropped element's stored Event Object - var originalEventObject = $(this).data('eventObject'); + const originalEventObject = $(this).data('eventObject'); // we need to copy it, so that multiple events don't have a reference to the same object - var copiedEventObject: any = $.extend({}, originalEventObject); + const copiedEventObject: any = $.extend({}, originalEventObject); // assign it the date that was reported copiedEventObject.start = date; diff --git a/fullcalendar/v1/index.d.ts b/types/fullcalendar/v1/index.d.ts similarity index 95% rename from fullcalendar/v1/index.d.ts rename to types/fullcalendar/v1/index.d.ts index 9f521ca8fc..4fcb41731b 100644 --- a/fullcalendar/v1/index.d.ts +++ b/types/fullcalendar/v1/index.d.ts @@ -8,8 +8,7 @@ import * as moment from "moment"; declare global { namespace FullCalendar { - export interface Calendar { - + interface Calendar { /** * Formats a Date object into a string. */ @@ -36,22 +35,21 @@ declare global { version: string; } - export interface BusinessHours { + interface BusinessHours { start: moment.Duration; end: moment.Duration; dow: number[]; } - export interface Timespan { + interface Timespan { start: moment.Moment; end: moment.Moment; } - export interface Options extends AgendaOptions, EventDraggingResizingOptions, DroppingExternalElementsOptions, SelectionOptions { - + interface Options extends AgendaOptions, EventDraggingResizingOptions, DroppingExternalElementsOptions, SelectionOptions { // General display - http://arshaw.com/fullcalendar/docs/display/ - header?: { + header?: { left: string; center: string; right: string; @@ -152,11 +150,9 @@ declare global { eventAfterRender?: (event: EventObject, element: HTMLDivElement, view: ViewObject) => void; eventAfterAllRender?: (view: ViewObject) => void; eventDestroy?: (event: EventObject, element: JQuery, view: ViewObject) => void; - - } - export interface ViewOptionHash { + interface ViewOptionHash { month?: any; week?: any; day?: any; @@ -172,7 +168,7 @@ declare global { /** * Agenda Options - http://arshaw.com/fullcalendar/docs/agenda/ */ - export interface AgendaOptions { + interface AgendaOptions { allDaySlot?: boolean; allDayText?: string; slotDuration?: moment.Duration; @@ -188,7 +184,7 @@ declare global { /* * Event Dragging & Resizing */ - export interface EventDraggingResizingOptions { + interface EventDraggingResizingOptions { editable?: boolean; eventStartEditable?: boolean; eventDurationEditable?: boolean; @@ -207,7 +203,7 @@ declare global { /* * Selection - http://arshaw.com/fullcalendar/docs/selection/ */ - export interface SelectionOptions { + interface SelectionOptions { selectable?: boolean; selectHelper?: boolean | ((start: moment.Moment, end: moment.Moment) => HTMLElement); unselectAuto?: boolean; @@ -218,14 +214,14 @@ declare global { unselect?: (view: ViewObject, jsEvent: Event) => void; } - export interface DroppingExternalElementsOptions { + interface DroppingExternalElementsOptions { droppable?: boolean; dropAccept?: string | ((draggable: any) => boolean); drop?: (date: moment.Moment, jsEvent: MouseEvent, ui: any) => void; eventReceive?: (event: EventObject) => void; } - export interface ButtonTextObject { + interface ButtonTextObject { prev?: string; next?: string; prevYear?: string; @@ -236,7 +232,7 @@ declare global { day?: string; } - export interface EventObject extends Timespan { + interface EventObject extends Timespan { id?: any; // String/number title: string; allDay?: boolean; @@ -251,15 +247,14 @@ declare global { rendering?: string; } - export interface ViewObject extends Timespan { + interface ViewObject extends Timespan { name: string; title: string; intervalStart: moment.Moment; intervalEnd: moment.Moment; } - export interface EventSource extends JQueryAjaxSettings { - + interface EventSource extends JQueryAjaxSettings { /** * This has one of the following types: * @@ -281,11 +276,9 @@ declare global { startParam?: string; endParam?: string; } - } interface JQuery { - /** * Get/Set option value */ diff --git a/fullcalendar/v1/package.json b/types/fullcalendar/v1/package.json similarity index 100% rename from fullcalendar/v1/package.json rename to types/fullcalendar/v1/package.json diff --git a/fullcalendar/v1/tsconfig.json b/types/fullcalendar/v1/tsconfig.json similarity index 100% rename from fullcalendar/v1/tsconfig.json rename to types/fullcalendar/v1/tsconfig.json diff --git a/fullcalendar/v1/tslint.json b/types/fullcalendar/v1/tslint.json similarity index 100% rename from fullcalendar/v1/tslint.json rename to types/fullcalendar/v1/tslint.json diff --git a/fullname/fullname-tests.ts b/types/fullname/fullname-tests.ts similarity index 100% rename from fullname/fullname-tests.ts rename to types/fullname/fullname-tests.ts diff --git a/fullname/index.d.ts b/types/fullname/index.d.ts similarity index 100% rename from fullname/index.d.ts rename to types/fullname/index.d.ts diff --git a/fullname/tsconfig.json b/types/fullname/tsconfig.json similarity index 100% rename from fullname/tsconfig.json rename to types/fullname/tsconfig.json diff --git a/fullpage.js/fullpage.js-tests.ts b/types/fullpage.js/fullpage.js-tests.ts similarity index 100% rename from fullpage.js/fullpage.js-tests.ts rename to types/fullpage.js/fullpage.js-tests.ts diff --git a/fullpage.js/index.d.ts b/types/fullpage.js/index.d.ts similarity index 100% rename from fullpage.js/index.d.ts rename to types/fullpage.js/index.d.ts diff --git a/fullpage.js/tsconfig.json b/types/fullpage.js/tsconfig.json similarity index 100% rename from fullpage.js/tsconfig.json rename to types/fullpage.js/tsconfig.json diff --git a/fuse/fuse-tests.ts b/types/fuse/fuse-tests.ts similarity index 100% rename from fuse/fuse-tests.ts rename to types/fuse/fuse-tests.ts diff --git a/fuse/index.d.ts b/types/fuse/index.d.ts similarity index 100% rename from fuse/index.d.ts rename to types/fuse/index.d.ts diff --git a/fuse/tsconfig.json b/types/fuse/tsconfig.json similarity index 100% rename from fuse/tsconfig.json rename to types/fuse/tsconfig.json diff --git a/fusioncharts/fusioncharts-tests.ts b/types/fusioncharts/fusioncharts-tests.ts similarity index 100% rename from fusioncharts/fusioncharts-tests.ts rename to types/fusioncharts/fusioncharts-tests.ts diff --git a/fusioncharts/fusioncharts.charts.d.ts b/types/fusioncharts/fusioncharts.charts.d.ts similarity index 100% rename from fusioncharts/fusioncharts.charts.d.ts rename to types/fusioncharts/fusioncharts.charts.d.ts diff --git a/fusioncharts/fusioncharts.gantt.d.ts b/types/fusioncharts/fusioncharts.gantt.d.ts similarity index 100% rename from fusioncharts/fusioncharts.gantt.d.ts rename to types/fusioncharts/fusioncharts.gantt.d.ts diff --git a/fusioncharts/fusioncharts.maps.d.ts b/types/fusioncharts/fusioncharts.maps.d.ts similarity index 100% rename from fusioncharts/fusioncharts.maps.d.ts rename to types/fusioncharts/fusioncharts.maps.d.ts diff --git a/fusioncharts/fusioncharts.powercharts.d.ts b/types/fusioncharts/fusioncharts.powercharts.d.ts similarity index 100% rename from fusioncharts/fusioncharts.powercharts.d.ts rename to types/fusioncharts/fusioncharts.powercharts.d.ts diff --git a/fusioncharts/fusioncharts.ssgrid.d.ts b/types/fusioncharts/fusioncharts.ssgrid.d.ts similarity index 100% rename from fusioncharts/fusioncharts.ssgrid.d.ts rename to types/fusioncharts/fusioncharts.ssgrid.d.ts diff --git a/fusioncharts/fusioncharts.treemap.d.ts b/types/fusioncharts/fusioncharts.treemap.d.ts similarity index 100% rename from fusioncharts/fusioncharts.treemap.d.ts rename to types/fusioncharts/fusioncharts.treemap.d.ts diff --git a/fusioncharts/fusioncharts.widgets.d.ts b/types/fusioncharts/fusioncharts.widgets.d.ts similarity index 100% rename from fusioncharts/fusioncharts.widgets.d.ts rename to types/fusioncharts/fusioncharts.widgets.d.ts diff --git a/fusioncharts/fusioncharts.zoomscatter.d.ts b/types/fusioncharts/fusioncharts.zoomscatter.d.ts similarity index 100% rename from fusioncharts/fusioncharts.zoomscatter.d.ts rename to types/fusioncharts/fusioncharts.zoomscatter.d.ts diff --git a/fusioncharts/index.d.ts b/types/fusioncharts/index.d.ts similarity index 100% rename from fusioncharts/index.d.ts rename to types/fusioncharts/index.d.ts diff --git a/fusioncharts/maps/fusioncharts.usa.d.ts b/types/fusioncharts/maps/fusioncharts.usa.d.ts similarity index 100% rename from fusioncharts/maps/fusioncharts.usa.d.ts rename to types/fusioncharts/maps/fusioncharts.usa.d.ts diff --git a/fusioncharts/maps/fusioncharts.world.d.ts b/types/fusioncharts/maps/fusioncharts.world.d.ts similarity index 100% rename from fusioncharts/maps/fusioncharts.world.d.ts rename to types/fusioncharts/maps/fusioncharts.world.d.ts diff --git a/fusioncharts/themes/fusioncharts.theme.carbon.d.ts b/types/fusioncharts/themes/fusioncharts.theme.carbon.d.ts similarity index 100% rename from fusioncharts/themes/fusioncharts.theme.carbon.d.ts rename to types/fusioncharts/themes/fusioncharts.theme.carbon.d.ts diff --git a/fusioncharts/themes/fusioncharts.theme.fint.d.ts b/types/fusioncharts/themes/fusioncharts.theme.fint.d.ts similarity index 100% rename from fusioncharts/themes/fusioncharts.theme.fint.d.ts rename to types/fusioncharts/themes/fusioncharts.theme.fint.d.ts diff --git a/fusioncharts/themes/fusioncharts.theme.ocean.d.ts b/types/fusioncharts/themes/fusioncharts.theme.ocean.d.ts similarity index 100% rename from fusioncharts/themes/fusioncharts.theme.ocean.d.ts rename to types/fusioncharts/themes/fusioncharts.theme.ocean.d.ts diff --git a/fusioncharts/themes/fusioncharts.theme.zune.d.ts b/types/fusioncharts/themes/fusioncharts.theme.zune.d.ts similarity index 100% rename from fusioncharts/themes/fusioncharts.theme.zune.d.ts rename to types/fusioncharts/themes/fusioncharts.theme.zune.d.ts diff --git a/fusioncharts/tsconfig.json b/types/fusioncharts/tsconfig.json similarity index 100% rename from fusioncharts/tsconfig.json rename to types/fusioncharts/tsconfig.json diff --git a/fusioncharts/tslint.json b/types/fusioncharts/tslint.json similarity index 100% rename from fusioncharts/tslint.json rename to types/fusioncharts/tslint.json diff --git a/fuzzaldrin-plus/fuzzaldrin-plus-tests.ts b/types/fuzzaldrin-plus/fuzzaldrin-plus-tests.ts similarity index 100% rename from fuzzaldrin-plus/fuzzaldrin-plus-tests.ts rename to types/fuzzaldrin-plus/fuzzaldrin-plus-tests.ts diff --git a/fuzzaldrin-plus/index.d.ts b/types/fuzzaldrin-plus/index.d.ts similarity index 100% rename from fuzzaldrin-plus/index.d.ts rename to types/fuzzaldrin-plus/index.d.ts diff --git a/fuzzaldrin-plus/tsconfig.json b/types/fuzzaldrin-plus/tsconfig.json similarity index 100% rename from fuzzaldrin-plus/tsconfig.json rename to types/fuzzaldrin-plus/tsconfig.json diff --git a/fuzzaldrin/index.d.ts b/types/fuzzaldrin/index.d.ts similarity index 100% rename from fuzzaldrin/index.d.ts rename to types/fuzzaldrin/index.d.ts diff --git a/fuzzaldrin/tsconfig.json b/types/fuzzaldrin/tsconfig.json similarity index 100% rename from fuzzaldrin/tsconfig.json rename to types/fuzzaldrin/tsconfig.json diff --git a/fuzzaldrin/tslint.json b/types/fuzzaldrin/tslint.json similarity index 100% rename from fuzzaldrin/tslint.json rename to types/fuzzaldrin/tslint.json diff --git a/fxn/index.d.ts b/types/fxn/index.d.ts similarity index 100% rename from fxn/index.d.ts rename to types/fxn/index.d.ts diff --git a/fxn/tsconfig.json b/types/fxn/tsconfig.json similarity index 100% rename from fxn/tsconfig.json rename to types/fxn/tsconfig.json diff --git a/gae.channel.api/gae.channel.api-tests.ts b/types/gae.channel.api/gae.channel.api-tests.ts similarity index 100% rename from gae.channel.api/gae.channel.api-tests.ts rename to types/gae.channel.api/gae.channel.api-tests.ts diff --git a/gae.channel.api/index.d.ts b/types/gae.channel.api/index.d.ts similarity index 100% rename from gae.channel.api/index.d.ts rename to types/gae.channel.api/index.d.ts diff --git a/gae.channel.api/tsconfig.json b/types/gae.channel.api/tsconfig.json similarity index 100% rename from gae.channel.api/tsconfig.json rename to types/gae.channel.api/tsconfig.json diff --git a/gamepad/gamepad-tests.ts b/types/gamepad/gamepad-tests.ts similarity index 100% rename from gamepad/gamepad-tests.ts rename to types/gamepad/gamepad-tests.ts diff --git a/gamepad/index.d.ts b/types/gamepad/index.d.ts similarity index 100% rename from gamepad/index.d.ts rename to types/gamepad/index.d.ts diff --git a/gamepad/tsconfig.json b/types/gamepad/tsconfig.json similarity index 100% rename from gamepad/tsconfig.json rename to types/gamepad/tsconfig.json diff --git a/gamequery/gamequery-tests.ts b/types/gamequery/gamequery-tests.ts similarity index 100% rename from gamequery/gamequery-tests.ts rename to types/gamequery/gamequery-tests.ts diff --git a/gamequery/index.d.ts b/types/gamequery/index.d.ts similarity index 100% rename from gamequery/index.d.ts rename to types/gamequery/index.d.ts diff --git a/gamequery/tsconfig.json b/types/gamequery/tsconfig.json similarity index 100% rename from gamequery/tsconfig.json rename to types/gamequery/tsconfig.json diff --git a/gandi-livedns/gandi-livedns-tests.ts b/types/gandi-livedns/gandi-livedns-tests.ts similarity index 100% rename from gandi-livedns/gandi-livedns-tests.ts rename to types/gandi-livedns/gandi-livedns-tests.ts diff --git a/gandi-livedns/index.d.ts b/types/gandi-livedns/index.d.ts similarity index 100% rename from gandi-livedns/index.d.ts rename to types/gandi-livedns/index.d.ts diff --git a/gandi-livedns/tsconfig.json b/types/gandi-livedns/tsconfig.json similarity index 100% rename from gandi-livedns/tsconfig.json rename to types/gandi-livedns/tsconfig.json diff --git a/gapi.analytics/gapi.analytics-tests.ts b/types/gapi.analytics/gapi.analytics-tests.ts similarity index 100% rename from gapi.analytics/gapi.analytics-tests.ts rename to types/gapi.analytics/gapi.analytics-tests.ts diff --git a/gapi.analytics/index.d.ts b/types/gapi.analytics/index.d.ts similarity index 100% rename from gapi.analytics/index.d.ts rename to types/gapi.analytics/index.d.ts diff --git a/gapi.analytics/tsconfig.json b/types/gapi.analytics/tsconfig.json similarity index 100% rename from gapi.analytics/tsconfig.json rename to types/gapi.analytics/tsconfig.json diff --git a/gapi.auth2/gapi.auth2-tests.ts b/types/gapi.auth2/gapi.auth2-tests.ts similarity index 100% rename from gapi.auth2/gapi.auth2-tests.ts rename to types/gapi.auth2/gapi.auth2-tests.ts diff --git a/gapi.auth2/index.d.ts b/types/gapi.auth2/index.d.ts similarity index 100% rename from gapi.auth2/index.d.ts rename to types/gapi.auth2/index.d.ts diff --git a/gapi.auth2/tsconfig.json b/types/gapi.auth2/tsconfig.json similarity index 100% rename from gapi.auth2/tsconfig.json rename to types/gapi.auth2/tsconfig.json diff --git a/gapi.calendar/gapi.calendar-tests.ts b/types/gapi.calendar/gapi.calendar-tests.ts similarity index 96% rename from gapi.calendar/gapi.calendar-tests.ts rename to types/gapi.calendar/gapi.calendar-tests.ts index 0438e5dc06..bd42483df5 100644 --- a/gapi.calendar/gapi.calendar-tests.ts +++ b/types/gapi.calendar/gapi.calendar-tests.ts @@ -1,152 +1,152 @@ -/* Example taken from Google Calendar API JavaScript Quickstart https://developers.google.com/google-apps/calendar/quickstart/js */ - -{ - // Your Client ID can be retrieved from your project in the Google - // Developer Console, https://console.developers.google.com - var CLIENT_ID = ''; - - var SCOPES = ["https://www.googleapis.com/auth/calendar.readonly"]; - - /** - * Check if current user has authorized this application. - */ - function checkAuth() { - gapi.auth.authorize( - { - 'client_id': CLIENT_ID, - 'scope': SCOPES.join(' '), - 'immediate': true - }, handleAuthResult); - } - - /** - * Handle response from authorization server. - * - * @param {Object} authResult Authorization result. - */ - function handleAuthResult(authResult: GoogleApiOAuth2TokenObject) { - var authorizeDiv = document.getElementById('authorize-div')!; - if (authResult && !authResult.error) { - // Hide auth UI, then load client library. - authorizeDiv.style.display = 'none'; - loadCalendarApi(); - } else { - // Show auth UI, allowing the user to initiate authorization by - // clicking authorize button. - authorizeDiv.style.display = 'inline'; - } - } - - /** - * Initiate auth flow in response to user clicking authorize button. - * - * @param {Event} event Button click event. - */ - function handleAuthClick(event: MouseEvent) { - gapi.auth.authorize( - {client_id: CLIENT_ID, scope: SCOPES, immediate: false}, - handleAuthResult); - return false; - } - - /** - * Load Google Calendar client library. List upcoming events - * once client library is loaded. - */ - function loadCalendarApi() { - gapi.client.load('calendar', 'v3', listUpcomingEvents); - } - - /** - * Print the summary and start datetime/date of the next ten events in - * the authorized user's calendar. If no events are found an - * appropriate message is printed. - */ - function listUpcomingEvents() { - var request = gapi.client.calendar.events.list({ - 'calendarId': 'primary', - 'timeMin': (new Date()).toISOString(), - 'showDeleted': false, - 'singleEvents': true, - 'maxResults': 10, - 'orderBy': 'startTime' - }); - - request.execute(function(resp) { - var events = resp.items; - appendPre('Upcoming events:'); - - if (events.length > 0) { - for (let i = 0; i < events.length; i++) { - var event = events[i]; - var when = event.start.dateTime; - if (!when) { - when = event.start.date; - } - appendPre(event.summary + ' (' + when + ')') - } - } else { - appendPre('No upcoming events found.'); - } - - }); - } - - /** - * Append a pre element to the body containing the given message - * as its text node. - * - * @param {string} message Text to be placed in pre element. - */ - function appendPre(message: string) { - var pre = document.getElementById('output')!; - var textContent = document.createTextNode(message + '\n'); - pre.appendChild(textContent); - } -} - -/* Example taken from https://developers.google.com/google-apps/calendar/v3/reference/events/insert#examples */ - -{ - // Refer to the JavaScript quickstart on how to setup the environment: - // https://developers.google.com/google-apps/calendar/quickstart/js - // Change the scope to 'https://www.googleapis.com/auth/calendar' and delete any - // stored credentials. - - const event = { - 'summary': 'Google I/O 2015', - 'location': '800 Howard St., San Francisco, CA 94103', - 'description': 'A chance to hear more about Google\'s developer products.', - 'start': { - 'dateTime': '2015-05-28T09:00:00-07:00', - 'timeZone': 'America/Los_Angeles' - }, - 'end': { - 'dateTime': '2015-05-28T17:00:00-07:00', - 'timeZone': 'America/Los_Angeles' - }, - 'recurrence': [ - 'RRULE:FREQ=DAILY;COUNT=2' - ], - 'attendees': [ - {'email': 'lpage@example.com'}, - {'email': 'sbrin@example.com'} - ], - 'reminders': { - 'useDefault': false, - 'overrides': [ - {'method': 'email', 'minutes': 24 * 60}, - {'method': 'popup', 'minutes': 10} - ] - } - }; - - var request = gapi.client.calendar.events.insert({ - 'calendarId': 'primary', - 'resource': event - }); - - request.execute(function(event) { - appendPre('Event created: ' + event.htmlLink); - }); -} +/* Example taken from Google Calendar API JavaScript Quickstart https://developers.google.com/google-apps/calendar/quickstart/js */ + +{ + // Your Client ID can be retrieved from your project in the Google + // Developer Console, https://console.developers.google.com + var CLIENT_ID = ''; + + var SCOPES = ["https://www.googleapis.com/auth/calendar.readonly"]; + + /** + * Check if current user has authorized this application. + */ + function checkAuth() { + gapi.auth.authorize( + { + 'client_id': CLIENT_ID, + 'scope': SCOPES.join(' '), + 'immediate': true + }, handleAuthResult); + } + + /** + * Handle response from authorization server. + * + * @param {Object} authResult Authorization result. + */ + function handleAuthResult(authResult: GoogleApiOAuth2TokenObject) { + var authorizeDiv = document.getElementById('authorize-div')!; + if (authResult && !authResult.error) { + // Hide auth UI, then load client library. + authorizeDiv.style.display = 'none'; + loadCalendarApi(); + } else { + // Show auth UI, allowing the user to initiate authorization by + // clicking authorize button. + authorizeDiv.style.display = 'inline'; + } + } + + /** + * Initiate auth flow in response to user clicking authorize button. + * + * @param {Event} event Button click event. + */ + function handleAuthClick(event: MouseEvent) { + gapi.auth.authorize( + {client_id: CLIENT_ID, scope: SCOPES, immediate: false}, + handleAuthResult); + return false; + } + + /** + * Load Google Calendar client library. List upcoming events + * once client library is loaded. + */ + function loadCalendarApi() { + gapi.client.load('calendar', 'v3', listUpcomingEvents); + } + + /** + * Print the summary and start datetime/date of the next ten events in + * the authorized user's calendar. If no events are found an + * appropriate message is printed. + */ + function listUpcomingEvents() { + var request = gapi.client.calendar.events.list({ + 'calendarId': 'primary', + 'timeMin': (new Date()).toISOString(), + 'showDeleted': false, + 'singleEvents': true, + 'maxResults': 10, + 'orderBy': 'startTime' + }); + + request.execute(function(resp) { + var events = resp.items; + appendPre('Upcoming events:'); + + if (events.length > 0) { + for (let i = 0; i < events.length; i++) { + var event = events[i]; + var when = event.start.dateTime; + if (!when) { + when = event.start.date; + } + appendPre(event.summary + ' (' + when + ')') + } + } else { + appendPre('No upcoming events found.'); + } + + }); + } + + /** + * Append a pre element to the body containing the given message + * as its text node. + * + * @param {string} message Text to be placed in pre element. + */ + function appendPre(message: string) { + var pre = document.getElementById('output')!; + var textContent = document.createTextNode(message + '\n'); + pre.appendChild(textContent); + } +} + +/* Example taken from https://developers.google.com/google-apps/calendar/v3/reference/events/insert#examples */ + +{ + // Refer to the JavaScript quickstart on how to setup the environment: + // https://developers.google.com/google-apps/calendar/quickstart/js + // Change the scope to 'https://www.googleapis.com/auth/calendar' and delete any + // stored credentials. + + const event = { + 'summary': 'Google I/O 2015', + 'location': '800 Howard St., San Francisco, CA 94103', + 'description': 'A chance to hear more about Google\'s developer products.', + 'start': { + 'dateTime': '2015-05-28T09:00:00-07:00', + 'timeZone': 'America/Los_Angeles' + }, + 'end': { + 'dateTime': '2015-05-28T17:00:00-07:00', + 'timeZone': 'America/Los_Angeles' + }, + 'recurrence': [ + 'RRULE:FREQ=DAILY;COUNT=2' + ], + 'attendees': [ + {'email': 'lpage@example.com'}, + {'email': 'sbrin@example.com'} + ], + 'reminders': { + 'useDefault': false, + 'overrides': [ + {'method': 'email', 'minutes': 24 * 60}, + {'method': 'popup', 'minutes': 10} + ] + } + }; + + var request = gapi.client.calendar.events.insert({ + 'calendarId': 'primary', + 'resource': event + }); + + request.execute(function(event) { + appendPre('Event created: ' + event.htmlLink); + }); +} diff --git a/gapi.calendar/index.d.ts b/types/gapi.calendar/index.d.ts similarity index 100% rename from gapi.calendar/index.d.ts rename to types/gapi.calendar/index.d.ts diff --git a/gapi.calendar/tsconfig.json b/types/gapi.calendar/tsconfig.json similarity index 100% rename from gapi.calendar/tsconfig.json rename to types/gapi.calendar/tsconfig.json diff --git a/gapi.pagespeedonline/index.d.ts b/types/gapi.pagespeedonline/index.d.ts similarity index 100% rename from gapi.pagespeedonline/index.d.ts rename to types/gapi.pagespeedonline/index.d.ts diff --git a/gapi.pagespeedonline/tsconfig.json b/types/gapi.pagespeedonline/tsconfig.json similarity index 100% rename from gapi.pagespeedonline/tsconfig.json rename to types/gapi.pagespeedonline/tsconfig.json diff --git a/gapi.people/gapi.people-tests.ts b/types/gapi.people/gapi.people-tests.ts similarity index 100% rename from gapi.people/gapi.people-tests.ts rename to types/gapi.people/gapi.people-tests.ts diff --git a/gapi.people/index.d.ts b/types/gapi.people/index.d.ts similarity index 100% rename from gapi.people/index.d.ts rename to types/gapi.people/index.d.ts diff --git a/gapi.people/tsconfig.json b/types/gapi.people/tsconfig.json similarity index 100% rename from gapi.people/tsconfig.json rename to types/gapi.people/tsconfig.json diff --git a/gapi.plus/gapi.plus-tests.ts b/types/gapi.plus/gapi.plus-tests.ts similarity index 100% rename from gapi.plus/gapi.plus-tests.ts rename to types/gapi.plus/gapi.plus-tests.ts diff --git a/gapi.plus/index.d.ts b/types/gapi.plus/index.d.ts similarity index 100% rename from gapi.plus/index.d.ts rename to types/gapi.plus/index.d.ts diff --git a/gapi.plus/tsconfig.json b/types/gapi.plus/tsconfig.json similarity index 100% rename from gapi.plus/tsconfig.json rename to types/gapi.plus/tsconfig.json diff --git a/gapi.translate/index.d.ts b/types/gapi.translate/index.d.ts similarity index 100% rename from gapi.translate/index.d.ts rename to types/gapi.translate/index.d.ts diff --git a/gapi.translate/tsconfig.json b/types/gapi.translate/tsconfig.json similarity index 100% rename from gapi.translate/tsconfig.json rename to types/gapi.translate/tsconfig.json diff --git a/gapi.urlshortener/index.d.ts b/types/gapi.urlshortener/index.d.ts similarity index 100% rename from gapi.urlshortener/index.d.ts rename to types/gapi.urlshortener/index.d.ts diff --git a/gapi.urlshortener/tsconfig.json b/types/gapi.urlshortener/tsconfig.json similarity index 100% rename from gapi.urlshortener/tsconfig.json rename to types/gapi.urlshortener/tsconfig.json diff --git a/gapi.youtube/index.d.ts b/types/gapi.youtube/index.d.ts similarity index 100% rename from gapi.youtube/index.d.ts rename to types/gapi.youtube/index.d.ts diff --git a/gapi.youtube/tsconfig.json b/types/gapi.youtube/tsconfig.json similarity index 100% rename from gapi.youtube/tsconfig.json rename to types/gapi.youtube/tsconfig.json diff --git a/gapi.youtubeanalytics/index.d.ts b/types/gapi.youtubeanalytics/index.d.ts similarity index 100% rename from gapi.youtubeanalytics/index.d.ts rename to types/gapi.youtubeanalytics/index.d.ts diff --git a/gapi.youtubeanalytics/tsconfig.json b/types/gapi.youtubeanalytics/tsconfig.json similarity index 100% rename from gapi.youtubeanalytics/tsconfig.json rename to types/gapi.youtubeanalytics/tsconfig.json diff --git a/gapi/gapi-tests.ts b/types/gapi/gapi-tests.ts similarity index 96% rename from gapi/gapi-tests.ts rename to types/gapi/gapi-tests.ts index 3c70b9850d..d5d8c032ca 100644 --- a/gapi/gapi-tests.ts +++ b/types/gapi/gapi-tests.ts @@ -1,97 +1,97 @@ -/// -/// - -/* Examples taken from https://developers.google.com/api-client-library/javascript/start/start-js */ - -{ - function start1() { - // 2. Initialize the JavaScript client library. - gapi.client.init({ - 'apiKey': 'YOUR_API_KEY', - 'discoveryDocs': ['https://people.googleapis.com/$discovery/rest'], - // clientId and scope are optional if auth is not required. - 'clientId': 'YOUR_WEB_CLIENT_ID.apps.googleusercontent.com', - 'scope': 'profile', - }).then(function() { - // 3. Initialize and make the API request. - return gapi.client.people.people.get({ - resourceName: 'people/me' - }); - }).then(function(response) { - console.log(response.result); - }, function(reason) { - console.log('Error: ' + reason.result.error.message); - }); - }; - // 1. Load the JavaScript client library. - gapi.load('client', start1); -} - -{ - function start2() { - // 2. Initialize the JavaScript client library. - gapi.client.init({ - 'apiKey': 'YOUR_API_KEY', - // clientId and scope are optional if auth is not required. - 'clientId': 'YOUR_WEB_CLIENT_ID.apps.googleusercontent.com', - 'scope': 'profile', - }).then(function() { - // 3. Initialize and make the API request. - return gapi.client.request({ - 'path': 'https://people.googleapis.com/v1/people/me', - }) - }).then(function(response) { - console.log(response.result); - }, function(reason) { - console.log('Error: ' + reason.result.error.message); - }); - }; - // 1. Load the JavaScript client library. - gapi.load('client', start2); -} - - -/* Examples taken from https://developers.google.com/api-client-library/javascript/features/promises */ - -gapi.client.request({'path': '/plus/v1/people', 'params': {'query': 'John'}}).then(function(response) { - // Handle response -}, function(reason) { - // Handle error -}); - -gapi.client.load('plus', 'v1').then(function() { - gapi.client.plus.people.search({'query': ''}).then(response => { }); -}); - -var personFetcher = { - results: [], - - // Why this: any? Check https://github.com/Microsoft/TypeScript/issues/10835 - - fetch: function(this: any, name: string) { - gapi.client.request({path: '/plus/v1/people', params:{query: name}}).then(function(this: any, response) { - this.results.push(response.result); - }, function(reason) { - console.error(name, 'was not fetched:', reason.result.error.message); - }, this); - } -}; -personFetcher.fetch('John'); - -gapi.client.request({ - 'path': 'plus/v1/people', - 'params': {'query': name} -}).execute(function(resp, rawResp) { - processResponse(resp); -}); - -gapi.client.request({ - 'path': 'plus/v1/people', - 'params': {'query': name} -}).then(function(resp) { - processResponse(resp.result); -}); - -function processResponse(response: any) { - // Stub -} +/// +/// + +/* Examples taken from https://developers.google.com/api-client-library/javascript/start/start-js */ + +{ + function start1() { + // 2. Initialize the JavaScript client library. + gapi.client.init({ + 'apiKey': 'YOUR_API_KEY', + 'discoveryDocs': ['https://people.googleapis.com/$discovery/rest'], + // clientId and scope are optional if auth is not required. + 'clientId': 'YOUR_WEB_CLIENT_ID.apps.googleusercontent.com', + 'scope': 'profile', + }).then(function() { + // 3. Initialize and make the API request. + return gapi.client.people.people.get({ + resourceName: 'people/me' + }); + }).then(function(response) { + console.log(response.result); + }, function(reason) { + console.log('Error: ' + reason.result.error.message); + }); + }; + // 1. Load the JavaScript client library. + gapi.load('client', start1); +} + +{ + function start2() { + // 2. Initialize the JavaScript client library. + gapi.client.init({ + 'apiKey': 'YOUR_API_KEY', + // clientId and scope are optional if auth is not required. + 'clientId': 'YOUR_WEB_CLIENT_ID.apps.googleusercontent.com', + 'scope': 'profile', + }).then(function() { + // 3. Initialize and make the API request. + return gapi.client.request({ + 'path': 'https://people.googleapis.com/v1/people/me', + }) + }).then(function(response) { + console.log(response.result); + }, function(reason) { + console.log('Error: ' + reason.result.error.message); + }); + }; + // 1. Load the JavaScript client library. + gapi.load('client', start2); +} + + +/* Examples taken from https://developers.google.com/api-client-library/javascript/features/promises */ + +gapi.client.request({'path': '/plus/v1/people', 'params': {'query': 'John'}}).then(function(response) { + // Handle response +}, function(reason) { + // Handle error +}); + +gapi.client.load('plus', 'v1').then(function() { + gapi.client.plus.people.search({'query': ''}).then(response => { }); +}); + +var personFetcher = { + results: [], + + // Why this: any? Check https://github.com/Microsoft/TypeScript/issues/10835 + + fetch: function(this: any, name: string) { + gapi.client.request({path: '/plus/v1/people', params:{query: name}}).then(function(this: any, response) { + this.results.push(response.result); + }, function(reason) { + console.error(name, 'was not fetched:', reason.result.error.message); + }, this); + } +}; +personFetcher.fetch('John'); + +gapi.client.request({ + 'path': 'plus/v1/people', + 'params': {'query': name} +}).execute(function(resp, rawResp) { + processResponse(resp); +}); + +gapi.client.request({ + 'path': 'plus/v1/people', + 'params': {'query': name} +}).then(function(resp) { + processResponse(resp.result); +}); + +function processResponse(response: any) { + // Stub +} diff --git a/gapi/index.d.ts b/types/gapi/index.d.ts similarity index 100% rename from gapi/index.d.ts rename to types/gapi/index.d.ts diff --git a/gapi/tsconfig.json b/types/gapi/tsconfig.json similarity index 100% rename from gapi/tsconfig.json rename to types/gapi/tsconfig.json diff --git a/gaussian/gaussian-tests.ts b/types/gaussian/gaussian-tests.ts similarity index 100% rename from gaussian/gaussian-tests.ts rename to types/gaussian/gaussian-tests.ts diff --git a/gaussian/index.d.ts b/types/gaussian/index.d.ts similarity index 98% rename from gaussian/index.d.ts rename to types/gaussian/index.d.ts index f0012597cb..fb34d74641 100644 --- a/gaussian/index.d.ts +++ b/types/gaussian/index.d.ts @@ -9,7 +9,7 @@ export = gaussian; export as namespace gaussian; declare namespace gaussian { - export interface Gaussian { + interface Gaussian { /** * the mean (μ) of the distribution */ diff --git a/gaussian/tsconfig.json b/types/gaussian/tsconfig.json similarity index 100% rename from gaussian/tsconfig.json rename to types/gaussian/tsconfig.json diff --git a/gaussian/tslint.json b/types/gaussian/tslint.json similarity index 100% rename from gaussian/tslint.json rename to types/gaussian/tslint.json diff --git a/generic-functions/generic-functions-tests.ts b/types/generic-functions/generic-functions-tests.ts similarity index 100% rename from generic-functions/generic-functions-tests.ts rename to types/generic-functions/generic-functions-tests.ts diff --git a/generic-functions/index.d.ts b/types/generic-functions/index.d.ts similarity index 100% rename from generic-functions/index.d.ts rename to types/generic-functions/index.d.ts diff --git a/generic-functions/tsconfig.json b/types/generic-functions/tsconfig.json similarity index 100% rename from generic-functions/tsconfig.json rename to types/generic-functions/tsconfig.json diff --git a/gently/gently-tests.ts b/types/gently/gently-tests.ts similarity index 100% rename from gently/gently-tests.ts rename to types/gently/gently-tests.ts diff --git a/gently/index.d.ts b/types/gently/index.d.ts similarity index 100% rename from gently/index.d.ts rename to types/gently/index.d.ts diff --git a/gently/tsconfig.json b/types/gently/tsconfig.json similarity index 100% rename from gently/tsconfig.json rename to types/gently/tsconfig.json diff --git a/geodesy/geodesy-tests.ts b/types/geodesy/geodesy-tests.ts similarity index 99% rename from geodesy/geodesy-tests.ts rename to types/geodesy/geodesy-tests.ts index 53c3b5c05c..e3ce4f627a 100644 --- a/geodesy/geodesy-tests.ts +++ b/types/geodesy/geodesy-tests.ts @@ -23,7 +23,6 @@ const zoneMgrs = mgrs.zone; mgrs.toString(); mgrs.toUtm(); - // Static Functions Mgrs.parse('31U DQ 48251 11932'); diff --git a/geodesy/index.d.ts b/types/geodesy/index.d.ts similarity index 93% rename from geodesy/index.d.ts rename to types/geodesy/index.d.ts index d5436f073d..12adb4d7c1 100644 --- a/geodesy/index.d.ts +++ b/types/geodesy/index.d.ts @@ -43,7 +43,7 @@ export interface Ellipsoids { Bessel1841: Ellipsoid; } -export declare class Mgrs { +export class Mgrs { zone: number; band: string; e100k: string; @@ -68,7 +68,7 @@ export declare class Mgrs { toString(digits?: 2 | 4 | 6 | 8 | 10): string; } -export declare class Utm { +export class Utm { zone: number; hemisphere: hemisphere; easting: number; @@ -91,11 +91,11 @@ export declare class Utm { toString(digits?: number): string; } -export declare namespace Dms { - export let separator: string; +export namespace Dms { + let separator: string; } -export declare class Dms { +export class Dms { static parseDMS(dmsStr: string): number; static toDMS(deg: number, format?: format, dp?: 0 | 2 | 4): string; static toLat(deg: number, format?: format, dp?: 0 | 2 | 4): string; @@ -104,7 +104,7 @@ export declare class Dms { static compassPoint(bearing: number, precision?: 1 | 2 | 3): string; } -export declare class Vector3d { +export class Vector3d { x: number; y: number; z: number; @@ -125,7 +125,7 @@ export declare class Vector3d { applyTransform(t: number[]): Vector3d; } -export declare class OsGridRef { +export class OsGridRef { easting: number; northing: number; constructor(easting: number, northing: number); @@ -135,7 +135,7 @@ export declare class OsGridRef { toString(digits?: number): string; } -export declare class LatLonEllipsoidal { +export class LatLonEllipsoidal { lat: number; lon: number; datum: Datum; diff --git a/geodesy/tsconfig.json b/types/geodesy/tsconfig.json similarity index 100% rename from geodesy/tsconfig.json rename to types/geodesy/tsconfig.json diff --git a/geodesy/tslint.json b/types/geodesy/tslint.json similarity index 100% rename from geodesy/tslint.json rename to types/geodesy/tslint.json diff --git a/geoip-lite/geoip-lite-tests.ts b/types/geoip-lite/geoip-lite-tests.ts similarity index 100% rename from geoip-lite/geoip-lite-tests.ts rename to types/geoip-lite/geoip-lite-tests.ts diff --git a/geoip-lite/index.d.ts b/types/geoip-lite/index.d.ts similarity index 100% rename from geoip-lite/index.d.ts rename to types/geoip-lite/index.d.ts diff --git a/geoip-lite/tsconfig.json b/types/geoip-lite/tsconfig.json similarity index 100% rename from geoip-lite/tsconfig.json rename to types/geoip-lite/tsconfig.json diff --git a/geojson/geojson-tests.ts b/types/geojson/geojson-tests.ts similarity index 100% rename from geojson/geojson-tests.ts rename to types/geojson/geojson-tests.ts diff --git a/geojson/index.d.ts b/types/geojson/index.d.ts similarity index 100% rename from geojson/index.d.ts rename to types/geojson/index.d.ts diff --git a/geojson/tsconfig.json b/types/geojson/tsconfig.json similarity index 100% rename from geojson/tsconfig.json rename to types/geojson/tsconfig.json diff --git a/geojson/tslint.json b/types/geojson/tslint.json similarity index 100% rename from geojson/tslint.json rename to types/geojson/tslint.json diff --git a/geojson2osm/geojson2osm-tests.ts b/types/geojson2osm/geojson2osm-tests.ts similarity index 100% rename from geojson2osm/geojson2osm-tests.ts rename to types/geojson2osm/geojson2osm-tests.ts diff --git a/geojson2osm/index.d.ts b/types/geojson2osm/index.d.ts similarity index 100% rename from geojson2osm/index.d.ts rename to types/geojson2osm/index.d.ts diff --git a/geojson2osm/tsconfig.json b/types/geojson2osm/tsconfig.json similarity index 100% rename from geojson2osm/tsconfig.json rename to types/geojson2osm/tsconfig.json diff --git a/geolib/geolib-tests.ts b/types/geolib/geolib-tests.ts similarity index 100% rename from geolib/geolib-tests.ts rename to types/geolib/geolib-tests.ts diff --git a/geolib/index.d.ts b/types/geolib/index.d.ts similarity index 95% rename from geolib/index.d.ts rename to types/geolib/index.d.ts index 69a6c99353..95779ab2c9 100644 --- a/geolib/index.d.ts +++ b/types/geolib/index.d.ts @@ -4,25 +4,25 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace geolib { - export interface PositionAsDecimal { + interface PositionAsDecimal { latitude: number; longitude: number; } - export interface PositionAsSexadecimal { + interface PositionAsSexadecimal { latitude: string; longitude: string; } - export interface PositionWithElevation extends PositionAsDecimal { + interface PositionWithElevation extends PositionAsDecimal { elevation?: number; } - export interface PositionInTime extends PositionAsDecimal { + interface PositionInTime extends PositionAsDecimal { time: number; } - export interface Bound { + interface Bound { minLat: number; maxLat: number; minLng: number; @@ -31,19 +31,19 @@ declare namespace geolib { maxElev?: number; } - export interface CompassDirection { + interface CompassDirection { rough: string; exact: string; } - export interface Distance { + interface Distance { latitude: number; longitude: number; distance: number; key: string; } - export interface SpeedOption { + interface SpeedOption { unit: string; } @@ -60,13 +60,11 @@ declare namespace geolib { */ function getDistanceSimple(start: PositionAsDecimal|PositionAsSexadecimal, end: PositionAsDecimal|PositionAsSexadecimal, accuracy?: number): number; - /** Calculates the geographical center of all points in a collection of geo coordinates * Takes an object or array of coordinates and calculates the center of it. */ function getCenter(coords: PositionAsDecimal[]): PositionAsDecimal; - /** Calculates the center of the bounds of geo coordinates. Takes an array of coordinates, * calculate the border of those, and gives back the center of that rectangle. On polygons * like political borders (eg. states), this may gives a closer result to human expectation, @@ -76,28 +74,24 @@ declare namespace geolib { */ function getCenterOfBounds(coords: PositionAsDecimal[]): PositionAsDecimal; - /** Calculates the bounds of geo coordinates. * * Returns maximum and minimum, latitude, longitude, and elevation (if provided) in form of an object */ function getBounds(coords: PositionWithElevation[]): Bound; - /** Checks whether a point is inside of a polygon or not. Note: the polygon coords must be in correct order! * * Returns true or false */ function isPointInside(latlng: PositionAsDecimal, polygon: PositionAsDecimal[]): boolean; - /** Similar to is point inside: checks whether a point is inside of a circle or not. * * Returns true or false */ function isPointInCircle(latlng: PositionAsDecimal, center: PositionAsDecimal, radius: number): boolean; - /** Gets rhumb line bearing of two points. Find out about the difference between rhumb line and great circle bearing on Wikipedia. * Rhumb line should be fine in most cases: http://en.wikipedia.org/wiki/Rhumb_line#General_and_mathematical_description Function * is heavily based on Doug Vanderweide's great PHP version (licensed under GPL 3.0) @@ -107,14 +101,12 @@ declare namespace geolib { */ function getRhumbLineBearing(originLL: PositionAsDecimal, destLL: PositionAsDecimal): number; - /** Gets great circle bearing of two points. See description of getRhumbLineBearing for more information. * * Returns calculated bearing as integer */ function getBearing(originLL: PositionAsDecimal, destLL: PositionAsDecimal): number; - /** Gets the compass direction from an origin coordinate (originLL) to a destination coordinate (destLL). * Bearing mode. Can be either circle or rhumbline (default). * @@ -122,15 +114,12 @@ declare namespace geolib { */ function getCompassDirection(originLL: PositionAsDecimal, destLL: PositionAsDecimal, bearingMode?: string): CompassDirection; - /** Sorts an object or array of coords by distance from a reference coordinate */ function orderByDistance(latlng: PositionAsDecimal, coords: PositionAsDecimal[]): Distance[]; - /** Finds the nearest coordinate to a reference coordinate. */ function findNearest(latlng: PositionAsDecimal, coords: PositionAsDecimal[], offset?: number, limit?: number): Distance[]; - /** Calculates the length of a collection of coordinates. * * Returns the length of the path in meters */ @@ -142,11 +131,9 @@ declare namespace geolib { */ function getSpeed(coords: PositionInTime[], option?: SpeedOption): number; - /** Calculates if given point lies in a line formed by start and end */ function isPointInLine(point: PositionAsDecimal, start: PositionAsDecimal, end: PositionAsDecimal): boolean; - /** Converts a given distance (in meters) to another unit. * distance distance to be converted (source must be in meter). unit can be one of: * - m (meter) @@ -161,11 +148,9 @@ declare namespace geolib { */ function convertUnit(unit: string, distance: number, round?: number): number; - /** Converts a sexagesimal coordinate to decimal format */ function sexagesimal2decimal(coord: string): number; - /** Converts a decimal coordinate to sexagesimal format */ function decimal2sexagesimal(coord: number): string; @@ -184,11 +169,9 @@ declare namespace geolib { */ function elevation(latlng: any): number; - /** Checks if a coordinate is already in decimal format and, if not, converts it to */ function useDecimal(latlng: string|number): number; - /** Computes the destination point given an initial point, a distance (in meters) and a bearing (in degrees). * If no radius is given it defaults to the mean earth radius of 6371000 meter. * diff --git a/geolib/tsconfig.json b/types/geolib/tsconfig.json similarity index 100% rename from geolib/tsconfig.json rename to types/geolib/tsconfig.json diff --git a/types/geolib/tslint.json b/types/geolib/tslint.json new file mode 100644 index 0000000000..d3631e8907 --- /dev/null +++ b/types/geolib/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "../tslint.json", + "rules": { + "no-useless-files": false + } +} diff --git a/geometry-dom/geometry-dom-tests.ts b/types/geometry-dom/geometry-dom-tests.ts similarity index 100% rename from geometry-dom/geometry-dom-tests.ts rename to types/geometry-dom/geometry-dom-tests.ts diff --git a/geometry-dom/index.d.ts b/types/geometry-dom/index.d.ts similarity index 100% rename from geometry-dom/index.d.ts rename to types/geometry-dom/index.d.ts diff --git a/geometry-dom/tsconfig.json b/types/geometry-dom/tsconfig.json similarity index 100% rename from geometry-dom/tsconfig.json rename to types/geometry-dom/tsconfig.json diff --git a/geopattern/geopattern-tests.ts b/types/geopattern/geopattern-tests.ts similarity index 100% rename from geopattern/geopattern-tests.ts rename to types/geopattern/geopattern-tests.ts diff --git a/geopattern/index.d.ts b/types/geopattern/index.d.ts similarity index 100% rename from geopattern/index.d.ts rename to types/geopattern/index.d.ts diff --git a/geopattern/tsconfig.json b/types/geopattern/tsconfig.json similarity index 100% rename from geopattern/tsconfig.json rename to types/geopattern/tsconfig.json diff --git a/geolib/tslint.json b/types/geopattern/tslint.json similarity index 100% rename from geolib/tslint.json rename to types/geopattern/tslint.json diff --git a/get-port/get-port-tests.ts b/types/get-port/get-port-tests.ts similarity index 100% rename from get-port/get-port-tests.ts rename to types/get-port/get-port-tests.ts diff --git a/get-port/index.d.ts b/types/get-port/index.d.ts similarity index 100% rename from get-port/index.d.ts rename to types/get-port/index.d.ts diff --git a/get-port/tsconfig.json b/types/get-port/tsconfig.json similarity index 100% rename from get-port/tsconfig.json rename to types/get-port/tsconfig.json diff --git a/get-stdin/get-stdin-tests.ts b/types/get-stdin/get-stdin-tests.ts similarity index 100% rename from get-stdin/get-stdin-tests.ts rename to types/get-stdin/get-stdin-tests.ts diff --git a/get-stdin/index.d.ts b/types/get-stdin/index.d.ts similarity index 88% rename from get-stdin/index.d.ts rename to types/get-stdin/index.d.ts index 9539b520b9..2d1b15ae98 100644 --- a/get-stdin/index.d.ts +++ b/types/get-stdin/index.d.ts @@ -7,7 +7,7 @@ declare function getStdin(): Promise; declare namespace getStdin { - export function buffer(): Promise; + function buffer(): Promise; } export = getStdin; diff --git a/get-stdin/tsconfig.json b/types/get-stdin/tsconfig.json similarity index 100% rename from get-stdin/tsconfig.json rename to types/get-stdin/tsconfig.json diff --git a/geopattern/tslint.json b/types/get-stdin/tslint.json similarity index 100% rename from geopattern/tslint.json rename to types/get-stdin/tslint.json diff --git a/gettext.js/gettext.js-tests.ts b/types/gettext.js/gettext.js-tests.ts similarity index 100% rename from gettext.js/gettext.js-tests.ts rename to types/gettext.js/gettext.js-tests.ts diff --git a/gettext.js/index.d.ts b/types/gettext.js/index.d.ts similarity index 100% rename from gettext.js/index.d.ts rename to types/gettext.js/index.d.ts diff --git a/gettext.js/tsconfig.json b/types/gettext.js/tsconfig.json similarity index 100% rename from gettext.js/tsconfig.json rename to types/gettext.js/tsconfig.json diff --git a/jmespath/tslint.json b/types/gettext.js/tslint.json similarity index 100% rename from jmespath/tslint.json rename to types/gettext.js/tslint.json diff --git a/gijgo/gijgo-tests.ts b/types/gijgo/gijgo-tests.ts similarity index 100% rename from gijgo/gijgo-tests.ts rename to types/gijgo/gijgo-tests.ts diff --git a/gijgo/index.d.ts b/types/gijgo/index.d.ts similarity index 100% rename from gijgo/index.d.ts rename to types/gijgo/index.d.ts diff --git a/gijgo/tsconfig.json b/types/gijgo/tsconfig.json similarity index 100% rename from gijgo/tsconfig.json rename to types/gijgo/tsconfig.json diff --git a/giraffe/giraffe-tests.ts b/types/giraffe/giraffe-tests.ts similarity index 100% rename from giraffe/giraffe-tests.ts rename to types/giraffe/giraffe-tests.ts diff --git a/giraffe/index.d.ts b/types/giraffe/index.d.ts similarity index 100% rename from giraffe/index.d.ts rename to types/giraffe/index.d.ts diff --git a/giraffe/tsconfig.json b/types/giraffe/tsconfig.json similarity index 100% rename from giraffe/tsconfig.json rename to types/giraffe/tsconfig.json diff --git a/git-config/git-config-tests.ts b/types/git-config/git-config-tests.ts similarity index 100% rename from git-config/git-config-tests.ts rename to types/git-config/git-config-tests.ts diff --git a/git-config/index.d.ts b/types/git-config/index.d.ts similarity index 100% rename from git-config/index.d.ts rename to types/git-config/index.d.ts diff --git a/git-config/tsconfig.json b/types/git-config/tsconfig.json similarity index 100% rename from git-config/tsconfig.json rename to types/git-config/tsconfig.json diff --git a/git-remote-origin-url/git-remote-origin-url-tests.ts b/types/git-remote-origin-url/git-remote-origin-url-tests.ts similarity index 100% rename from git-remote-origin-url/git-remote-origin-url-tests.ts rename to types/git-remote-origin-url/git-remote-origin-url-tests.ts diff --git a/git-remote-origin-url/index.d.ts b/types/git-remote-origin-url/index.d.ts similarity index 100% rename from git-remote-origin-url/index.d.ts rename to types/git-remote-origin-url/index.d.ts diff --git a/git-remote-origin-url/tsconfig.json b/types/git-remote-origin-url/tsconfig.json similarity index 100% rename from git-remote-origin-url/tsconfig.json rename to types/git-remote-origin-url/tsconfig.json diff --git a/get-stdin/tslint.json b/types/git-remote-origin-url/tslint.json similarity index 100% rename from get-stdin/tslint.json rename to types/git-remote-origin-url/tslint.json diff --git a/git/git-tests.ts b/types/git/git-tests.ts similarity index 100% rename from git/git-tests.ts rename to types/git/git-tests.ts diff --git a/git/index.d.ts b/types/git/index.d.ts similarity index 100% rename from git/index.d.ts rename to types/git/index.d.ts diff --git a/git/tsconfig.json b/types/git/tsconfig.json similarity index 100% rename from git/tsconfig.json rename to types/git/tsconfig.json diff --git a/github/github-tests.ts b/types/github/github-tests.ts similarity index 100% rename from github/github-tests.ts rename to types/github/github-tests.ts diff --git a/github/index.d.ts b/types/github/index.d.ts similarity index 100% rename from github/index.d.ts rename to types/github/index.d.ts diff --git a/github/tsconfig.json b/types/github/tsconfig.json similarity index 100% rename from github/tsconfig.json rename to types/github/tsconfig.json diff --git a/gl-matrix/gl-matrix-tests.ts b/types/gl-matrix/gl-matrix-tests.ts similarity index 100% rename from gl-matrix/gl-matrix-tests.ts rename to types/gl-matrix/gl-matrix-tests.ts diff --git a/gl-matrix/index.d.ts b/types/gl-matrix/index.d.ts similarity index 100% rename from gl-matrix/index.d.ts rename to types/gl-matrix/index.d.ts diff --git a/gl-matrix/tsconfig.json b/types/gl-matrix/tsconfig.json similarity index 100% rename from gl-matrix/tsconfig.json rename to types/gl-matrix/tsconfig.json diff --git a/gldatepicker/gldatepicker-tests.ts b/types/gldatepicker/gldatepicker-tests.ts similarity index 100% rename from gldatepicker/gldatepicker-tests.ts rename to types/gldatepicker/gldatepicker-tests.ts diff --git a/gldatepicker/index.d.ts b/types/gldatepicker/index.d.ts similarity index 100% rename from gldatepicker/index.d.ts rename to types/gldatepicker/index.d.ts diff --git a/gldatepicker/tsconfig.json b/types/gldatepicker/tsconfig.json similarity index 100% rename from gldatepicker/tsconfig.json rename to types/gldatepicker/tsconfig.json diff --git a/glidejs/glidejs-tests.ts b/types/glidejs/glidejs-tests.ts similarity index 100% rename from glidejs/glidejs-tests.ts rename to types/glidejs/glidejs-tests.ts diff --git a/glidejs/index.d.ts b/types/glidejs/index.d.ts similarity index 100% rename from glidejs/index.d.ts rename to types/glidejs/index.d.ts diff --git a/glidejs/tsconfig.json b/types/glidejs/tsconfig.json similarity index 100% rename from glidejs/tsconfig.json rename to types/glidejs/tsconfig.json diff --git a/glob-expand/glob-expand-tests.ts b/types/glob-expand/glob-expand-tests.ts similarity index 100% rename from glob-expand/glob-expand-tests.ts rename to types/glob-expand/glob-expand-tests.ts diff --git a/glob-expand/index.d.ts b/types/glob-expand/index.d.ts similarity index 100% rename from glob-expand/index.d.ts rename to types/glob-expand/index.d.ts diff --git a/glob-expand/tsconfig.json b/types/glob-expand/tsconfig.json similarity index 100% rename from glob-expand/tsconfig.json rename to types/glob-expand/tsconfig.json diff --git a/glob-stream/glob-stream-tests.ts b/types/glob-stream/glob-stream-tests.ts similarity index 100% rename from glob-stream/glob-stream-tests.ts rename to types/glob-stream/glob-stream-tests.ts diff --git a/glob-stream/index.d.ts b/types/glob-stream/index.d.ts similarity index 100% rename from glob-stream/index.d.ts rename to types/glob-stream/index.d.ts diff --git a/glob-stream/tsconfig.json b/types/glob-stream/tsconfig.json similarity index 100% rename from glob-stream/tsconfig.json rename to types/glob-stream/tsconfig.json diff --git a/glob/glob-tests.ts b/types/glob/glob-tests.ts similarity index 100% rename from glob/glob-tests.ts rename to types/glob/glob-tests.ts diff --git a/glob/index.d.ts b/types/glob/index.d.ts similarity index 100% rename from glob/index.d.ts rename to types/glob/index.d.ts diff --git a/glob/tsconfig.json b/types/glob/tsconfig.json similarity index 100% rename from glob/tsconfig.json rename to types/glob/tsconfig.json diff --git a/globalize-compiler/globalize-compiler-tests.ts b/types/globalize-compiler/globalize-compiler-tests.ts similarity index 100% rename from globalize-compiler/globalize-compiler-tests.ts rename to types/globalize-compiler/globalize-compiler-tests.ts diff --git a/globalize-compiler/index.d.ts b/types/globalize-compiler/index.d.ts similarity index 100% rename from globalize-compiler/index.d.ts rename to types/globalize-compiler/index.d.ts diff --git a/globalize-compiler/tsconfig.json b/types/globalize-compiler/tsconfig.json similarity index 100% rename from globalize-compiler/tsconfig.json rename to types/globalize-compiler/tsconfig.json diff --git a/globalize/globalize-tests.ts b/types/globalize/globalize-tests.ts similarity index 100% rename from globalize/globalize-tests.ts rename to types/globalize/globalize-tests.ts diff --git a/globalize/index.d.ts b/types/globalize/index.d.ts similarity index 100% rename from globalize/index.d.ts rename to types/globalize/index.d.ts diff --git a/globalize/tsconfig.json b/types/globalize/tsconfig.json similarity index 100% rename from globalize/tsconfig.json rename to types/globalize/tsconfig.json diff --git a/globule/globule-tests.ts b/types/globule/globule-tests.ts similarity index 100% rename from globule/globule-tests.ts rename to types/globule/globule-tests.ts diff --git a/globule/index.d.ts b/types/globule/index.d.ts similarity index 100% rename from globule/index.d.ts rename to types/globule/index.d.ts diff --git a/globule/tsconfig.json b/types/globule/tsconfig.json similarity index 100% rename from globule/tsconfig.json rename to types/globule/tsconfig.json diff --git a/git-remote-origin-url/tslint.json b/types/globule/tslint.json similarity index 100% rename from git-remote-origin-url/tslint.json rename to types/globule/tslint.json diff --git a/gm/gm-tests.ts b/types/gm/gm-tests.ts similarity index 100% rename from gm/gm-tests.ts rename to types/gm/gm-tests.ts diff --git a/gm/index.d.ts b/types/gm/index.d.ts similarity index 100% rename from gm/index.d.ts rename to types/gm/index.d.ts diff --git a/gm/tsconfig.json b/types/gm/tsconfig.json similarity index 100% rename from gm/tsconfig.json rename to types/gm/tsconfig.json diff --git a/go/go-tests.ts b/types/go/go-tests.ts similarity index 100% rename from go/go-tests.ts rename to types/go/go-tests.ts diff --git a/go/index.d.ts b/types/go/index.d.ts similarity index 100% rename from go/index.d.ts rename to types/go/index.d.ts diff --git a/go/tsconfig.json b/types/go/tsconfig.json similarity index 100% rename from go/tsconfig.json rename to types/go/tsconfig.json diff --git a/google-apps-script/NOTICE b/types/google-apps-script/NOTICE similarity index 100% rename from google-apps-script/NOTICE rename to types/google-apps-script/NOTICE diff --git a/google-apps-script/google-apps-script-tests.ts b/types/google-apps-script/google-apps-script-tests.ts similarity index 100% rename from google-apps-script/google-apps-script-tests.ts rename to types/google-apps-script/google-apps-script-tests.ts diff --git a/google-apps-script/google-apps-script.base.d.ts b/types/google-apps-script/google-apps-script.base.d.ts similarity index 100% rename from google-apps-script/google-apps-script.base.d.ts rename to types/google-apps-script/google-apps-script.base.d.ts diff --git a/google-apps-script/google-apps-script.cache.d.ts b/types/google-apps-script/google-apps-script.cache.d.ts similarity index 100% rename from google-apps-script/google-apps-script.cache.d.ts rename to types/google-apps-script/google-apps-script.cache.d.ts diff --git a/google-apps-script/google-apps-script.calendar.d.ts b/types/google-apps-script/google-apps-script.calendar.d.ts similarity index 100% rename from google-apps-script/google-apps-script.calendar.d.ts rename to types/google-apps-script/google-apps-script.calendar.d.ts diff --git a/google-apps-script/google-apps-script.charts.d.ts b/types/google-apps-script/google-apps-script.charts.d.ts similarity index 100% rename from google-apps-script/google-apps-script.charts.d.ts rename to types/google-apps-script/google-apps-script.charts.d.ts diff --git a/google-apps-script/google-apps-script.contacts.d.ts b/types/google-apps-script/google-apps-script.contacts.d.ts similarity index 100% rename from google-apps-script/google-apps-script.contacts.d.ts rename to types/google-apps-script/google-apps-script.contacts.d.ts diff --git a/google-apps-script/google-apps-script.content.d.ts b/types/google-apps-script/google-apps-script.content.d.ts similarity index 100% rename from google-apps-script/google-apps-script.content.d.ts rename to types/google-apps-script/google-apps-script.content.d.ts diff --git a/google-apps-script/google-apps-script.document.d.ts b/types/google-apps-script/google-apps-script.document.d.ts similarity index 100% rename from google-apps-script/google-apps-script.document.d.ts rename to types/google-apps-script/google-apps-script.document.d.ts diff --git a/google-apps-script/google-apps-script.drive.d.ts b/types/google-apps-script/google-apps-script.drive.d.ts similarity index 100% rename from google-apps-script/google-apps-script.drive.d.ts rename to types/google-apps-script/google-apps-script.drive.d.ts diff --git a/google-apps-script/google-apps-script.forms.d.ts b/types/google-apps-script/google-apps-script.forms.d.ts similarity index 100% rename from google-apps-script/google-apps-script.forms.d.ts rename to types/google-apps-script/google-apps-script.forms.d.ts diff --git a/google-apps-script/google-apps-script.gmail.d.ts b/types/google-apps-script/google-apps-script.gmail.d.ts similarity index 100% rename from google-apps-script/google-apps-script.gmail.d.ts rename to types/google-apps-script/google-apps-script.gmail.d.ts diff --git a/google-apps-script/google-apps-script.groups.d.ts b/types/google-apps-script/google-apps-script.groups.d.ts similarity index 100% rename from google-apps-script/google-apps-script.groups.d.ts rename to types/google-apps-script/google-apps-script.groups.d.ts diff --git a/google-apps-script/google-apps-script.html.d.ts b/types/google-apps-script/google-apps-script.html.d.ts similarity index 100% rename from google-apps-script/google-apps-script.html.d.ts rename to types/google-apps-script/google-apps-script.html.d.ts diff --git a/google-apps-script/google-apps-script.jdbc.d.ts b/types/google-apps-script/google-apps-script.jdbc.d.ts similarity index 100% rename from google-apps-script/google-apps-script.jdbc.d.ts rename to types/google-apps-script/google-apps-script.jdbc.d.ts diff --git a/google-apps-script/google-apps-script.language.d.ts b/types/google-apps-script/google-apps-script.language.d.ts similarity index 100% rename from google-apps-script/google-apps-script.language.d.ts rename to types/google-apps-script/google-apps-script.language.d.ts diff --git a/google-apps-script/google-apps-script.lock.d.ts b/types/google-apps-script/google-apps-script.lock.d.ts similarity index 100% rename from google-apps-script/google-apps-script.lock.d.ts rename to types/google-apps-script/google-apps-script.lock.d.ts diff --git a/google-apps-script/google-apps-script.mail.d.ts b/types/google-apps-script/google-apps-script.mail.d.ts similarity index 100% rename from google-apps-script/google-apps-script.mail.d.ts rename to types/google-apps-script/google-apps-script.mail.d.ts diff --git a/google-apps-script/google-apps-script.maps.d.ts b/types/google-apps-script/google-apps-script.maps.d.ts similarity index 100% rename from google-apps-script/google-apps-script.maps.d.ts rename to types/google-apps-script/google-apps-script.maps.d.ts diff --git a/google-apps-script/google-apps-script.optimization.d.ts b/types/google-apps-script/google-apps-script.optimization.d.ts similarity index 100% rename from google-apps-script/google-apps-script.optimization.d.ts rename to types/google-apps-script/google-apps-script.optimization.d.ts diff --git a/google-apps-script/google-apps-script.properties.d.ts b/types/google-apps-script/google-apps-script.properties.d.ts similarity index 100% rename from google-apps-script/google-apps-script.properties.d.ts rename to types/google-apps-script/google-apps-script.properties.d.ts diff --git a/google-apps-script/google-apps-script.script.d.ts b/types/google-apps-script/google-apps-script.script.d.ts similarity index 100% rename from google-apps-script/google-apps-script.script.d.ts rename to types/google-apps-script/google-apps-script.script.d.ts diff --git a/google-apps-script/google-apps-script.sites.d.ts b/types/google-apps-script/google-apps-script.sites.d.ts similarity index 100% rename from google-apps-script/google-apps-script.sites.d.ts rename to types/google-apps-script/google-apps-script.sites.d.ts diff --git a/google-apps-script/google-apps-script.spreadsheet.d.ts b/types/google-apps-script/google-apps-script.spreadsheet.d.ts similarity index 100% rename from google-apps-script/google-apps-script.spreadsheet.d.ts rename to types/google-apps-script/google-apps-script.spreadsheet.d.ts diff --git a/google-apps-script/google-apps-script.types.d.ts b/types/google-apps-script/google-apps-script.types.d.ts similarity index 100% rename from google-apps-script/google-apps-script.types.d.ts rename to types/google-apps-script/google-apps-script.types.d.ts diff --git a/google-apps-script/google-apps-script.ui.d.ts b/types/google-apps-script/google-apps-script.ui.d.ts similarity index 100% rename from google-apps-script/google-apps-script.ui.d.ts rename to types/google-apps-script/google-apps-script.ui.d.ts diff --git a/google-apps-script/google-apps-script.url-fetch.d.ts b/types/google-apps-script/google-apps-script.url-fetch.d.ts similarity index 100% rename from google-apps-script/google-apps-script.url-fetch.d.ts rename to types/google-apps-script/google-apps-script.url-fetch.d.ts diff --git a/google-apps-script/google-apps-script.utilities.d.ts b/types/google-apps-script/google-apps-script.utilities.d.ts similarity index 100% rename from google-apps-script/google-apps-script.utilities.d.ts rename to types/google-apps-script/google-apps-script.utilities.d.ts diff --git a/google-apps-script/google-apps-script.xml-service.d.ts b/types/google-apps-script/google-apps-script.xml-service.d.ts similarity index 100% rename from google-apps-script/google-apps-script.xml-service.d.ts rename to types/google-apps-script/google-apps-script.xml-service.d.ts diff --git a/google-apps-script/index.d.ts b/types/google-apps-script/index.d.ts similarity index 100% rename from google-apps-script/index.d.ts rename to types/google-apps-script/index.d.ts diff --git a/google-apps-script/tsconfig.json b/types/google-apps-script/tsconfig.json similarity index 100% rename from google-apps-script/tsconfig.json rename to types/google-apps-script/tsconfig.json diff --git a/google-closure-compiler/google-closure-compiler-tests.ts b/types/google-closure-compiler/google-closure-compiler-tests.ts similarity index 100% rename from google-closure-compiler/google-closure-compiler-tests.ts rename to types/google-closure-compiler/google-closure-compiler-tests.ts diff --git a/google-closure-compiler/index.d.ts b/types/google-closure-compiler/index.d.ts similarity index 100% rename from google-closure-compiler/index.d.ts rename to types/google-closure-compiler/index.d.ts diff --git a/google-closure-compiler/tsconfig.json b/types/google-closure-compiler/tsconfig.json similarity index 100% rename from google-closure-compiler/tsconfig.json rename to types/google-closure-compiler/tsconfig.json diff --git a/google-drive-realtime-api/google-drive-realtime-api-tests.ts b/types/google-drive-realtime-api/google-drive-realtime-api-tests.ts similarity index 100% rename from google-drive-realtime-api/google-drive-realtime-api-tests.ts rename to types/google-drive-realtime-api/google-drive-realtime-api-tests.ts diff --git a/google-drive-realtime-api/index.d.ts b/types/google-drive-realtime-api/index.d.ts similarity index 100% rename from google-drive-realtime-api/index.d.ts rename to types/google-drive-realtime-api/index.d.ts diff --git a/google-drive-realtime-api/tsconfig.json b/types/google-drive-realtime-api/tsconfig.json similarity index 100% rename from google-drive-realtime-api/tsconfig.json rename to types/google-drive-realtime-api/tsconfig.json diff --git a/google-earth/google-earth-tests.ts b/types/google-earth/google-earth-tests.ts similarity index 100% rename from google-earth/google-earth-tests.ts rename to types/google-earth/google-earth-tests.ts diff --git a/google-earth/index.d.ts b/types/google-earth/index.d.ts similarity index 100% rename from google-earth/index.d.ts rename to types/google-earth/index.d.ts diff --git a/google-earth/tsconfig.json b/types/google-earth/tsconfig.json similarity index 100% rename from google-earth/tsconfig.json rename to types/google-earth/tsconfig.json diff --git a/google-libphonenumber/google-libphonenumber-tests.ts b/types/google-libphonenumber/google-libphonenumber-tests.ts similarity index 100% rename from google-libphonenumber/google-libphonenumber-tests.ts rename to types/google-libphonenumber/google-libphonenumber-tests.ts diff --git a/google-libphonenumber/index.d.ts b/types/google-libphonenumber/index.d.ts similarity index 100% rename from google-libphonenumber/index.d.ts rename to types/google-libphonenumber/index.d.ts diff --git a/google-libphonenumber/tsconfig.json b/types/google-libphonenumber/tsconfig.json similarity index 100% rename from google-libphonenumber/tsconfig.json rename to types/google-libphonenumber/tsconfig.json diff --git a/google-maps/google-maps-tests.ts b/types/google-maps/google-maps-tests.ts similarity index 100% rename from google-maps/google-maps-tests.ts rename to types/google-maps/google-maps-tests.ts diff --git a/google-maps/index.d.ts b/types/google-maps/index.d.ts similarity index 100% rename from google-maps/index.d.ts rename to types/google-maps/index.d.ts diff --git a/google-maps/tsconfig.json b/types/google-maps/tsconfig.json similarity index 100% rename from google-maps/tsconfig.json rename to types/google-maps/tsconfig.json diff --git a/types/google-protobuf/google-protobuf-tests.ts b/types/google-protobuf/google-protobuf-tests.ts new file mode 100644 index 0000000000..809d8dfb7c --- /dev/null +++ b/types/google-protobuf/google-protobuf-tests.ts @@ -0,0 +1,524 @@ +import * as jspb from "./index"; + +import * as google_protobuf_compiler_plugin_pb from "./google/protobuf/compiler/plugin_pb"; +import * as google_protobuf_any_pb from "./google/protobuf/any_pb"; +import * as google_protobuf_api_pb from "./google/protobuf/api_pb"; +import * as google_protobuf_descriptor_pb from "./google/protobuf/descriptor_pb"; +import * as google_protobuf_duration_pb from "./google/protobuf/duration_pb"; +import * as google_protobuf_empty_pb from "./google/protobuf/empty_pb"; +import * as google_protobuf_field_mask_pb from "./google/protobuf/field_mask_pb"; +import * as google_protobuf_source_context_pb from "./google/protobuf/source_context_pb"; +import * as google_protobuf_struct_pb from "./google/protobuf/struct_pb"; +import * as google_protobuf_timestamp_pb from "./google/protobuf/timestamp_pb"; +import * as google_protobuf_type_pb from "./google/protobuf/type_pb"; +import * as google_protobuf_wrappers_pb from "./google/protobuf/wrappers_pb"; + +/* This is a typescript version of a simple generated class from a proto file that is shown below. In order to make + this ES5 JS file into TypeScript there have been quite a few modifications, but the same calls are made to the library + classes. + + // FILE: simple.proto + syntax = "proto3"; + + package examplecom; + + message MySimple { + string my_string = 1; + bool my_bool = 2; + repeated string some_labels = 3; + google.protobuf.compiler.CodeGeneratorRequest some_code_generator_request = 4; + google.protobuf.Any some_any = 5; + google.protobuf.Method some_method = 6; + google.protobuf.GeneratedCodeInfo some_generated_code_info = 7; + google.protobuf.Duration some_duration = 8; + google.protobuf.Empty some_empty = 9; + google.protobuf.FieldMask some_field_mask = 10; + google.protobuf.SourceContext some_source_context = 11; + google.protobuf.Struct some_struct = 12; + google.protobuf.Timestamp some_timestamp = 13; + google.protobuf.Type some_type = 14; + google.protobuf.DoubleValue some_double_value = 15; + } +*/ + +class MySimple extends jspb.Message { + constructor(opt_data?: any) { + super(); // This isn't actually called in the JS version of this file, but it's required by TS + jspb.Message.initialize(this, opt_data, 0, -1, MySimple.repeatedFields_, null); + }; + + static repeatedFields_ = [3]; + + toObject(opt_includeInstance?: boolean): {} { + return MySimple.toObject(opt_includeInstance || false, this); + }; + + static toObject(includeInstance: boolean, msg: MySimple): {} { + const obj = { + myString: jspb.Message.getFieldWithDefault(msg, 1, ""), + myBool: jspb.Message.getFieldWithDefault(msg, 2, false), + someLabelsList: jspb.Message.getField(msg, 3), + someCodeGeneratorRequest: google_protobuf_compiler_plugin_pb.CodeGeneratorRequest.toObject(includeInstance, msg.getSomeCodeGeneratorRequest()), + someAny: google_protobuf_any_pb.Any.toObject(includeInstance, msg.getSomeAny()), + someMethod: google_protobuf_api_pb.Method.toObject(includeInstance, msg.getSomeMethod()), + someGeneratedCodeInfo: google_protobuf_descriptor_pb.GeneratedCodeInfo.toObject(includeInstance, msg.getSomeGeneratedCodeInfo()), + someDuration: google_protobuf_duration_pb.Duration.toObject(includeInstance, msg.getSomeDuration()), + someEmpty: google_protobuf_empty_pb.Empty.toObject(includeInstance, msg.getSomeEmpty()), + someFieldMask: google_protobuf_field_mask_pb.FieldMask.toObject(includeInstance, msg.getSomeFieldMask()), + someSourceContext: google_protobuf_source_context_pb.SourceContext.toObject(includeInstance, msg.getSomeSourceContext()), + someStruct: google_protobuf_struct_pb.Struct.toObject(includeInstance, msg.getSomeStruct()), + someTimestamp: google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, msg.getSomeTimestamp()), + someType: google_protobuf_type_pb.Type.toObject(includeInstance, msg.getSomeType()), + someDoubleValue: google_protobuf_wrappers_pb.DoubleValue.toObject(includeInstance, msg.getSomeDoubleValue()), + }; + + if (includeInstance) { + // This is commented out because it's not valid in TS, but it's a simple append to an object + // obj['$jspbMessageInstance'] = msg; + } + return obj; + }; + + static deserializeBinary(bytes: Uint8Array): MySimple { + var reader = new jspb.BinaryReader(bytes); + var msg = new MySimple; + return MySimple.deserializeBinaryFromReader(msg, reader); + } + + static deserializeBinaryFromReader(msg: MySimple, reader: jspb.BinaryReader): MySimple { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value1 = /** @type {string} */ (reader.readString()); + msg.setMyString(value1); + break; + case 2: + var value2 = /** @type {boolean} */ (reader.readBool()); + msg.setMyBool(value2); + break; + case 3: + var value3 = /** @type {string} */ (reader.readString()); + msg.addSomeLabels(value3); + break; + case 4: + var value4 = new google_protobuf_compiler_plugin_pb.CodeGeneratorRequest; + reader.readMessage(value4, google_protobuf_compiler_plugin_pb.CodeGeneratorRequest.deserializeBinaryFromReader); + msg.setSomeCodeGeneratorRequest(value4); + break; + case 5: + var value5 = new google_protobuf_any_pb.Any; + reader.readMessage(value5, google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setSomeAny(value5); + break; + case 6: + var value6 = new google_protobuf_api_pb.Method; + reader.readMessage(value6, google_protobuf_api_pb.Method.deserializeBinaryFromReader); + msg.setSomeMethod(value6); + break; + case 7: + var value7 = new google_protobuf_descriptor_pb.GeneratedCodeInfo; + reader.readMessage(value7, google_protobuf_descriptor_pb.GeneratedCodeInfo.deserializeBinaryFromReader); + msg.setSomeGeneratedCodeInfo(value7); + break; + case 8: + var value8 = new google_protobuf_duration_pb.Duration; + reader.readMessage(value8, google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setSomeDuration(value8); + break; + case 9: + var value9 = new google_protobuf_empty_pb.Empty; + reader.readMessage(value9, google_protobuf_empty_pb.Empty.deserializeBinaryFromReader); + msg.setSomeEmpty(value9); + break; + case 10: + var value10 = new google_protobuf_field_mask_pb.FieldMask; + reader.readMessage(value10, google_protobuf_field_mask_pb.FieldMask.deserializeBinaryFromReader); + msg.setSomeFieldMask(value10); + break; + case 11: + var value11 = new google_protobuf_source_context_pb.SourceContext; + reader.readMessage(value11, google_protobuf_source_context_pb.SourceContext.deserializeBinaryFromReader); + msg.setSomeSourceContext(value11); + break; + case 12: + var value12 = new google_protobuf_struct_pb.Struct; + reader.readMessage(value12, google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setSomeStruct(value12); + break; + case 13: + var value13 = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value13, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setSomeTimestamp(value13); + break; + case 14: + var value14 = new google_protobuf_type_pb.Type; + reader.readMessage(value14, google_protobuf_type_pb.Type.deserializeBinaryFromReader); + msg.setSomeType(value14); + break; + case 15: + var value15 = new google_protobuf_wrappers_pb.DoubleValue; + reader.readMessage(value15, google_protobuf_wrappers_pb.DoubleValue.deserializeBinaryFromReader); + msg.setSomeDoubleValue(value15); + break; + default: + reader.skipField(); + break; + } + } + return msg; + } + + serializeBinary(): Uint8Array { + var writer = new jspb.BinaryWriter(); + MySimple.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + } + + static serializeBinaryToWriter(message: MySimple, writer: jspb.BinaryWriter) { + const f1 = message.getMyString(); + if (f1.length > 0) { + writer.writeString( + 1, + f1 + ); + } + const f2 = message.getMyBool(); + if (f2) { + writer.writeBool( + 2, + f2 + ); + } + const f3 = message.getSomeLabelsList(); + if (f3.length > 0) { + writer.writeRepeatedString( + 3, + f3 + ); + } + const f4 = message.getSomeCodeGeneratorRequest(); + if (f4 != null) { + writer.writeMessage( + 4, + f4, + google_protobuf_compiler_plugin_pb.CodeGeneratorRequest.serializeBinaryToWriter + ); + } + const f5 = message.getSomeAny(); + if (f5 != null) { + writer.writeMessage( + 5, + f5, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + const f6 = message.getSomeMethod(); + if (f6 != null) { + writer.writeMessage( + 6, + f6, + google_protobuf_api_pb.Method.serializeBinaryToWriter + ); + } + const f7 = message.getSomeGeneratedCodeInfo(); + if (f7 != null) { + writer.writeMessage( + 7, + f7, + google_protobuf_descriptor_pb.GeneratedCodeInfo.serializeBinaryToWriter + ); + } + const f8 = message.getSomeDuration(); + if (f8 != null) { + writer.writeMessage( + 8, + f8, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + const f9 = message.getSomeEmpty(); + if (f9 != null) { + writer.writeMessage( + 9, + f9, + google_protobuf_empty_pb.Empty.serializeBinaryToWriter + ); + } + const f10 = message.getSomeFieldMask(); + if (f10 != null) { + writer.writeMessage( + 10, + f10, + google_protobuf_field_mask_pb.FieldMask.serializeBinaryToWriter + ); + } + const f11 = message.getSomeSourceContext(); + if (f11 != null) { + writer.writeMessage( + 11, + f11, + google_protobuf_source_context_pb.SourceContext.serializeBinaryToWriter + ); + } + const f12 = message.getSomeStruct(); + if (f12 != null) { + writer.writeMessage( + 12, + f12, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } + const f13 = message.getSomeTimestamp(); + if (f13 != null) { + writer.writeMessage( + 13, + f13, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + const f14 = message.getSomeType(); + if (f14 != null) { + writer.writeMessage( + 14, + f14, + google_protobuf_type_pb.Type.serializeBinaryToWriter + ); + } + const f15 = message.getSomeDoubleValue(); + if (f15 != null) { + writer.writeMessage( + 15, + f15, + google_protobuf_wrappers_pb.DoubleValue.serializeBinaryToWriter + ); + } + } + + getMyString(): string { + return jspb.Message.getFieldWithDefault(this, 1, ""); + } + + setMyString(value: string) { + jspb.Message.setField(this, 1, value); + } + + getMyBool(): boolean { + return jspb.Message.getFieldWithDefault(this, 2, false); + } + + setMyBool(value: boolean) { + jspb.Message.setField(this, 2, value); + } + + getSomeLabelsList(): string[] { + return jspb.Message.getField(this, 3) as string[]; + } + + setSomeLabelsList(value: Array) { + jspb.Message.setField(this, 3, value || []); + } + + addSomeLabels(value: string, opt_index?: number) { + jspb.Message.addToRepeatedField(this, 3, value, opt_index); + } + + clearSomeLabelsList() { + this.setSomeLabelsList([]); + } + + getSomeCodeGeneratorRequest(): google_protobuf_compiler_plugin_pb.CodeGeneratorRequest { + return jspb.Message.getWrapperField(this, google_protobuf_compiler_plugin_pb.CodeGeneratorRequest, 4) as google_protobuf_compiler_plugin_pb.CodeGeneratorRequest; + } + + setSomeCodeGeneratorRequest(value?: google_protobuf_compiler_plugin_pb.CodeGeneratorRequest) { + jspb.Message.setWrapperField(this, 4, value); + } + + clearSomeCodeGeneratorRequest() { + this.setSomeCodeGeneratorRequest(undefined); + } + + hasSomeCodeGeneratorRequest(): boolean { + return jspb.Message.getField(this, 4) != null; + } + + getSomeAny(): google_protobuf_any_pb.Any { + return jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 5) as google_protobuf_any_pb.Any; + } + + setSomeAny(value?: google_protobuf_any_pb.Any) { + jspb.Message.setWrapperField(this, 5, value); + } + + clearSomeAny() { + this.setSomeAny(undefined); + } + + hasSomeAny(): boolean { + return jspb.Message.getField(this, 5) != null; + } + + getSomeMethod(): google_protobuf_api_pb.Method { + return jspb.Message.getWrapperField(this, google_protobuf_api_pb.Method, 6) as google_protobuf_api_pb.Method; + } + + setSomeMethod(value?: google_protobuf_api_pb.Method) { + jspb.Message.setWrapperField(this, 6, value); + } + + clearSomeMethod() { + this.setSomeMethod(undefined); + } + + hasSomeMethod(): boolean { + return jspb.Message.getField(this, 6) != null; + } + + getSomeGeneratedCodeInfo(): google_protobuf_descriptor_pb.GeneratedCodeInfo { + return jspb.Message.getWrapperField(this, google_protobuf_descriptor_pb.GeneratedCodeInfo, 7) as google_protobuf_descriptor_pb.GeneratedCodeInfo; + } + + setSomeGeneratedCodeInfo(value?: google_protobuf_descriptor_pb.GeneratedCodeInfo) { + jspb.Message.setWrapperField(this, 7, value); + } + + clearSomeGeneratedCodeInfo() { + this.setSomeGeneratedCodeInfo(undefined); + } + + hasSomeGeneratedCodeInfo(): boolean { + return jspb.Message.getField(this, 7) != null; + } + + getSomeDuration(): google_protobuf_duration_pb.Duration { + return jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 8) as google_protobuf_duration_pb.Duration; + } + + setSomeDuration(value?: google_protobuf_duration_pb.Duration) { + jspb.Message.setWrapperField(this, 8, value); + } + + clearSomeDuration() { + this.setSomeDuration(undefined); + } + + hasSomeDuration(): boolean { + return jspb.Message.getField(this, 8) != null; + } + + getSomeEmpty(): google_protobuf_empty_pb.Empty { + return jspb.Message.getWrapperField(this, google_protobuf_empty_pb.Empty, 9) as google_protobuf_empty_pb.Empty; + } + + setSomeEmpty(value?: google_protobuf_empty_pb.Empty) { + jspb.Message.setWrapperField(this, 9, value); + } + + clearSomeEmpty() { + this.setSomeEmpty(undefined); + } + + hasSomeEmpty(): boolean { + return jspb.Message.getField(this, 9) != null; + } + + getSomeFieldMask(): google_protobuf_field_mask_pb.FieldMask { + return jspb.Message.getWrapperField(this, google_protobuf_field_mask_pb.FieldMask, 10) as google_protobuf_field_mask_pb.FieldMask; + } + + setSomeFieldMask(value?: google_protobuf_field_mask_pb.FieldMask) { + jspb.Message.setWrapperField(this, 10, value); + } + + clearSomeFieldMask() { + this.setSomeFieldMask(undefined); + } + + hasSomeFieldMask(): boolean { + return jspb.Message.getField(this, 10) != null; + } + + getSomeSourceContext(): google_protobuf_source_context_pb.SourceContext { + return jspb.Message.getWrapperField(this, google_protobuf_source_context_pb.SourceContext, 11) as google_protobuf_source_context_pb.SourceContext; + } + + setSomeSourceContext(value?: google_protobuf_source_context_pb.SourceContext) { + jspb.Message.setWrapperField(this, 11, value); + } + + clearSomeSourceContext() { + this.setSomeSourceContext(undefined); + } + + hasSomeSourceContext(): boolean { + return jspb.Message.getField(this, 11) != null; + } + + getSomeStruct(): google_protobuf_struct_pb.Struct { + return jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 12) as google_protobuf_struct_pb.Struct; + } + + setSomeStruct(value?: google_protobuf_struct_pb.Struct) { + jspb.Message.setWrapperField(this, 12, value); + } + + clearSomeStruct() { + this.setSomeStruct(undefined); + } + + hasSomeStruct(): boolean { + return jspb.Message.getField(this, 12) != null; + } + + getSomeTimestamp(): google_protobuf_timestamp_pb.Timestamp { + return jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 13) as google_protobuf_timestamp_pb.Timestamp; + } + + setSomeTimestamp(value?: google_protobuf_timestamp_pb.Timestamp) { + jspb.Message.setWrapperField(this, 13, value); + } + + clearSomeTimestamp() { + this.setSomeTimestamp(undefined); + } + + hasSomeTimestamp(): boolean { + return jspb.Message.getField(this, 13) != null; + } + + getSomeType(): google_protobuf_type_pb.Type { + return jspb.Message.getWrapperField(this, google_protobuf_type_pb.Type, 14) as google_protobuf_type_pb.Type; + } + + setSomeType(value?: google_protobuf_type_pb.Type) { + jspb.Message.setWrapperField(this, 14, value); + } + + clearSomeType() { + this.setSomeType(undefined); + } + + hasSomeType(): boolean { + return jspb.Message.getField(this, 14) != null; + } + + getSomeDoubleValue(): google_protobuf_wrappers_pb.DoubleValue { + return jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.DoubleValue, 15) as google_protobuf_wrappers_pb.DoubleValue; + } + + setSomeDoubleValue(value?: google_protobuf_wrappers_pb.DoubleValue) { + jspb.Message.setWrapperField(this, 15, value); + } + + clearSomeDoubleValue() { + this.setSomeDoubleValue(undefined); + } + + hasSomeDoubleValue(): boolean { + return jspb.Message.getField(this, 15) != null; + } +}; diff --git a/types/google-protobuf/google/protobuf/any_pb.d.ts b/types/google-protobuf/google/protobuf/any_pb.d.ts new file mode 100644 index 0000000000..b1e275570a --- /dev/null +++ b/types/google-protobuf/google/protobuf/any_pb.d.ts @@ -0,0 +1,32 @@ +import * as jspb from "../../index"; + +export class Any extends jspb.Message { + getTypeUrl(): string; + setTypeUrl(value: string): void; + + getValue(): Uint8Array | string; + getValue_asU8(): Uint8Array; + getValue_asB64(): string; + setValue(value: Uint8Array | string): void; + + getTypeName(): string; + pack(serialized: Uint8Array, name: string, typeUrlPrefix?: string): void; + unpack(deserialize: (packed: Uint8Array) => T, name: string): T | null; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Any.AsObject; + static toObject(includeInstance: boolean, msg: Any): Any.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Any, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Any; + static deserializeBinaryFromReader(message: Any, reader: jspb.BinaryReader): Any; +} + +export namespace Any { + export type AsObject = { + typeUrl: string, + value: Uint8Array | string, + } +} + diff --git a/types/google-protobuf/google/protobuf/api_pb.d.ts b/types/google-protobuf/google/protobuf/api_pb.d.ts new file mode 100644 index 0000000000..a7ba91088c --- /dev/null +++ b/types/google-protobuf/google/protobuf/api_pb.d.ts @@ -0,0 +1,126 @@ +import * as jspb from "../../index"; +import * as google_protobuf_source_context_pb from "./source_context_pb"; +import * as google_protobuf_type_pb from "./type_pb"; + +export class Api extends jspb.Message { + getName(): string; + setName(value: string): void; + + clearMethodsList(): void; + getMethodsList(): Array; + setMethodsList(value: Array): void; + addMethods(value?: Method, index?: number): void; + + clearOptionsList(): void; + getOptionsList(): Array; + setOptionsList(value: Array): void; + addOptions(value?: google_protobuf_type_pb.Option, index?: number): void; + + getVersion(): string; + setVersion(value: string): void; + + hasSourceContext(): boolean; + clearSourceContext(): void; + getSourceContext(): google_protobuf_source_context_pb.SourceContext; + setSourceContext(value: google_protobuf_source_context_pb.SourceContext): void; + + clearMixinsList(): void; + getMixinsList(): Array; + setMixinsList(value: Array): void; + addMixins(value?: Mixin, index?: number): void; + + getSyntax(): google_protobuf_type_pb.Syntax; + setSyntax(value: google_protobuf_type_pb.Syntax): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Api.AsObject; + static toObject(includeInstance: boolean, msg: Api): Api.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Api, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Api; + static deserializeBinaryFromReader(message: Api, reader: jspb.BinaryReader): Api; +} + +export namespace Api { + export type AsObject = { + name: string, + methodsList: Array, + optionsList: Array, + version: string, + sourceContext: google_protobuf_source_context_pb.SourceContext.AsObject, + mixinsList: Array, + syntax: google_protobuf_type_pb.Syntax, + } +} + +export class Method extends jspb.Message { + getName(): string; + setName(value: string): void; + + getRequestTypeUrl(): string; + setRequestTypeUrl(value: string): void; + + getRequestStreaming(): boolean; + setRequestStreaming(value: boolean): void; + + getResponseTypeUrl(): string; + setResponseTypeUrl(value: string): void; + + getResponseStreaming(): boolean; + setResponseStreaming(value: boolean): void; + + clearOptionsList(): void; + getOptionsList(): Array; + setOptionsList(value: Array): void; + addOptions(value?: google_protobuf_type_pb.Option, index?: number): void; + + getSyntax(): google_protobuf_type_pb.Syntax; + setSyntax(value: google_protobuf_type_pb.Syntax): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Method.AsObject; + static toObject(includeInstance: boolean, msg: Method): Method.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Method, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Method; + static deserializeBinaryFromReader(message: Method, reader: jspb.BinaryReader): Method; +} + +export namespace Method { + export type AsObject = { + name: string, + requestTypeUrl: string, + requestStreaming: boolean, + responseTypeUrl: string, + responseStreaming: boolean, + optionsList: Array, + syntax: google_protobuf_type_pb.Syntax, + } +} + +export class Mixin extends jspb.Message { + getName(): string; + setName(value: string): void; + + getRoot(): string; + setRoot(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Mixin.AsObject; + static toObject(includeInstance: boolean, msg: Mixin): Mixin.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Mixin, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Mixin; + static deserializeBinaryFromReader(message: Mixin, reader: jspb.BinaryReader): Mixin; +} + +export namespace Mixin { + export type AsObject = { + name: string, + root: string, + } +} + diff --git a/types/google-protobuf/google/protobuf/compiler/plugin_pb.d.ts b/types/google-protobuf/google/protobuf/compiler/plugin_pb.d.ts new file mode 100644 index 0000000000..0e3491e702 --- /dev/null +++ b/types/google-protobuf/google/protobuf/compiler/plugin_pb.d.ts @@ -0,0 +1,145 @@ +import * as jspb from "../../../index"; +import * as google_protobuf_descriptor_pb from "../descriptor_pb"; + +export class Version extends jspb.Message { + hasMajor(): boolean; + clearMajor(): void; + getMajor(): number; + setMajor(value: number): void; + + hasMinor(): boolean; + clearMinor(): void; + getMinor(): number; + setMinor(value: number): void; + + hasPatch(): boolean; + clearPatch(): void; + getPatch(): number; + setPatch(value: number): void; + + hasSuffix(): boolean; + clearSuffix(): void; + getSuffix(): string; + setSuffix(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Version.AsObject; + static toObject(includeInstance: boolean, msg: Version): Version.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Version, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Version; + static deserializeBinaryFromReader(message: Version, reader: jspb.BinaryReader): Version; +} + +export namespace Version { + export type AsObject = { + major: number, + minor: number, + patch: number, + suffix: string, + } +} + +export class CodeGeneratorRequest extends jspb.Message { + clearFileToGenerateList(): void; + getFileToGenerateList(): Array; + setFileToGenerateList(value: Array): void; + addFileToGenerate(value: string, index?: number): void; + + hasParameter(): boolean; + clearParameter(): void; + getParameter(): string; + setParameter(value: string): void; + + clearProtoFileList(): void; + getProtoFileList(): Array; + setProtoFileList(value: Array): void; + addProtoFile(value?: google_protobuf_descriptor_pb.FileDescriptorProto, index?: number): void; + + hasCompilerVersion(): boolean; + clearCompilerVersion(): void; + getCompilerVersion(): Version; + setCompilerVersion(value: Version): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CodeGeneratorRequest.AsObject; + static toObject(includeInstance: boolean, msg: CodeGeneratorRequest): CodeGeneratorRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CodeGeneratorRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CodeGeneratorRequest; + static deserializeBinaryFromReader(message: CodeGeneratorRequest, reader: jspb.BinaryReader): CodeGeneratorRequest; +} + +export namespace CodeGeneratorRequest { + export type AsObject = { + fileToGenerateList: Array, + parameter: string, + protoFileList: Array, + compilerVersion: Version.AsObject, + } +} + +export class CodeGeneratorResponse extends jspb.Message { + hasError(): boolean; + clearError(): void; + getError(): string; + setError(value: string): void; + + clearFileList(): void; + getFileList(): Array; + setFileList(value: Array): void; + addFile(value?: CodeGeneratorResponse.File, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CodeGeneratorResponse.AsObject; + static toObject(includeInstance: boolean, msg: CodeGeneratorResponse): CodeGeneratorResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CodeGeneratorResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CodeGeneratorResponse; + static deserializeBinaryFromReader(message: CodeGeneratorResponse, reader: jspb.BinaryReader): CodeGeneratorResponse; +} + +export namespace CodeGeneratorResponse { + export type AsObject = { + error: string, + fileList: Array, + } + + export class File extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string; + setName(value: string): void; + + hasInsertionPoint(): boolean; + clearInsertionPoint(): void; + getInsertionPoint(): string; + setInsertionPoint(value: string): void; + + hasContent(): boolean; + clearContent(): void; + getContent(): string; + setContent(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): File.AsObject; + static toObject(includeInstance: boolean, msg: File): File.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: File, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): File; + static deserializeBinaryFromReader(message: File, reader: jspb.BinaryReader): File; + } + + export namespace File { + export type AsObject = { + name: string, + insertionPoint: string, + content: string, + } + } +} + diff --git a/types/google-protobuf/google/protobuf/descriptor_pb.d.ts b/types/google-protobuf/google/protobuf/descriptor_pb.d.ts new file mode 100644 index 0000000000..294cbab1dc --- /dev/null +++ b/types/google-protobuf/google/protobuf/descriptor_pb.d.ts @@ -0,0 +1,1131 @@ +import * as jspb from "../../index"; + +export class FileDescriptorSet extends jspb.Message { + clearFileList(): void; + getFileList(): Array; + setFileList(value: Array): void; + addFile(value?: FileDescriptorProto, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FileDescriptorSet.AsObject; + static toObject(includeInstance: boolean, msg: FileDescriptorSet): FileDescriptorSet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FileDescriptorSet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileDescriptorSet; + static deserializeBinaryFromReader(message: FileDescriptorSet, reader: jspb.BinaryReader): FileDescriptorSet; +} + +export namespace FileDescriptorSet { + export type AsObject = { + fileList: Array, + } +} + +export class FileDescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string; + setName(value: string): void; + + hasPackage(): boolean; + clearPackage(): void; + getPackage(): string; + setPackage(value: string): void; + + clearDependencyList(): void; + getDependencyList(): Array; + setDependencyList(value: Array): void; + addDependency(value: string, index?: number): void; + + clearPublicDependencyList(): void; + getPublicDependencyList(): Array; + setPublicDependencyList(value: Array): void; + addPublicDependency(value: number, index?: number): void; + + clearWeakDependencyList(): void; + getWeakDependencyList(): Array; + setWeakDependencyList(value: Array): void; + addWeakDependency(value: number, index?: number): void; + + clearMessageTypeList(): void; + getMessageTypeList(): Array; + setMessageTypeList(value: Array): void; + addMessageType(value?: DescriptorProto, index?: number): void; + + clearEnumTypeList(): void; + getEnumTypeList(): Array; + setEnumTypeList(value: Array): void; + addEnumType(value?: EnumDescriptorProto, index?: number): void; + + clearServiceList(): void; + getServiceList(): Array; + setServiceList(value: Array): void; + addService(value?: ServiceDescriptorProto, index?: number): void; + + clearExtensionList(): void; + getExtensionList(): Array; + setExtensionList(value: Array): void; + addExtension(value?: FieldDescriptorProto, index?: number): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): FileOptions; + setOptions(value: FileOptions): void; + + hasSourceCodeInfo(): boolean; + clearSourceCodeInfo(): void; + getSourceCodeInfo(): SourceCodeInfo; + setSourceCodeInfo(value: SourceCodeInfo): void; + + hasSyntax(): boolean; + clearSyntax(): void; + getSyntax(): string; + setSyntax(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FileDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: FileDescriptorProto): FileDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FileDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileDescriptorProto; + static deserializeBinaryFromReader(message: FileDescriptorProto, reader: jspb.BinaryReader): FileDescriptorProto; +} + +export namespace FileDescriptorProto { + export type AsObject = { + name: string, + package: string, + dependencyList: Array, + publicDependencyList: Array, + weakDependencyList: Array, + messageTypeList: Array, + enumTypeList: Array, + serviceList: Array, + extensionList: Array, + options: FileOptions.AsObject, + sourceCodeInfo: SourceCodeInfo.AsObject, + syntax: string, + } +} + +export class DescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string; + setName(value: string): void; + + clearFieldList(): void; + getFieldList(): Array; + setFieldList(value: Array): void; + addField(value?: FieldDescriptorProto, index?: number): void; + + clearExtensionList(): void; + getExtensionList(): Array; + setExtensionList(value: Array): void; + addExtension(value?: FieldDescriptorProto, index?: number): void; + + clearNestedTypeList(): void; + getNestedTypeList(): Array; + setNestedTypeList(value: Array): void; + addNestedType(value?: DescriptorProto, index?: number): void; + + clearEnumTypeList(): void; + getEnumTypeList(): Array; + setEnumTypeList(value: Array): void; + addEnumType(value?: EnumDescriptorProto, index?: number): void; + + clearExtensionRangeList(): void; + getExtensionRangeList(): Array; + setExtensionRangeList(value: Array): void; + addExtensionRange(value?: DescriptorProto.ExtensionRange, index?: number): void; + + clearOneofDeclList(): void; + getOneofDeclList(): Array; + setOneofDeclList(value: Array): void; + addOneofDecl(value?: OneofDescriptorProto, index?: number): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): MessageOptions; + setOptions(value: MessageOptions): void; + + clearReservedRangeList(): void; + getReservedRangeList(): Array; + setReservedRangeList(value: Array): void; + addReservedRange(value?: DescriptorProto.ReservedRange, index?: number): void; + + clearReservedNameList(): void; + getReservedNameList(): Array; + setReservedNameList(value: Array): void; + addReservedName(value: string, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: DescriptorProto): DescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DescriptorProto; + static deserializeBinaryFromReader(message: DescriptorProto, reader: jspb.BinaryReader): DescriptorProto; +} + +export namespace DescriptorProto { + export type AsObject = { + name: string, + fieldList: Array, + extensionList: Array, + nestedTypeList: Array, + enumTypeList: Array, + extensionRangeList: Array, + oneofDeclList: Array, + options: MessageOptions.AsObject, + reservedRangeList: Array, + reservedNameList: Array, + } + + export class ExtensionRange extends jspb.Message { + hasStart(): boolean; + clearStart(): void; + getStart(): number; + setStart(value: number): void; + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number; + setEnd(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExtensionRange.AsObject; + static toObject(includeInstance: boolean, msg: ExtensionRange): ExtensionRange.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExtensionRange, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExtensionRange; + static deserializeBinaryFromReader(message: ExtensionRange, reader: jspb.BinaryReader): ExtensionRange; + } + + export namespace ExtensionRange { + export type AsObject = { + start: number, + end: number, + } + } + + export class ReservedRange extends jspb.Message { + hasStart(): boolean; + clearStart(): void; + getStart(): number; + setStart(value: number): void; + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number; + setEnd(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ReservedRange.AsObject; + static toObject(includeInstance: boolean, msg: ReservedRange): ReservedRange.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ReservedRange, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ReservedRange; + static deserializeBinaryFromReader(message: ReservedRange, reader: jspb.BinaryReader): ReservedRange; + } + + export namespace ReservedRange { + export type AsObject = { + start: number, + end: number, + } + } +} + +export class FieldDescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string; + setName(value: string): void; + + hasNumber(): boolean; + clearNumber(): void; + getNumber(): number; + setNumber(value: number): void; + + hasLabel(): boolean; + clearLabel(): void; + getLabel(): FieldDescriptorProto.Label; + setLabel(value: FieldDescriptorProto.Label): void; + + hasType(): boolean; + clearType(): void; + getType(): FieldDescriptorProto.Type; + setType(value: FieldDescriptorProto.Type): void; + + hasTypeName(): boolean; + clearTypeName(): void; + getTypeName(): string; + setTypeName(value: string): void; + + hasExtendee(): boolean; + clearExtendee(): void; + getExtendee(): string; + setExtendee(value: string): void; + + hasDefaultValue(): boolean; + clearDefaultValue(): void; + getDefaultValue(): string; + setDefaultValue(value: string): void; + + hasOneofIndex(): boolean; + clearOneofIndex(): void; + getOneofIndex(): number; + setOneofIndex(value: number): void; + + hasJsonName(): boolean; + clearJsonName(): void; + getJsonName(): string; + setJsonName(value: string): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): FieldOptions; + setOptions(value: FieldOptions): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: FieldDescriptorProto): FieldDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldDescriptorProto; + static deserializeBinaryFromReader(message: FieldDescriptorProto, reader: jspb.BinaryReader): FieldDescriptorProto; +} + +export namespace FieldDescriptorProto { + export type AsObject = { + name: string, + number: number, + label: FieldDescriptorProto.Label, + type: FieldDescriptorProto.Type, + typeName: string, + extendee: string, + defaultValue: string, + oneofIndex: number, + jsonName: string, + options: FieldOptions.AsObject, + } + + export enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18, + } + export enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3, + } +} + +export class OneofDescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string; + setName(value: string): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): OneofOptions; + setOptions(value: OneofOptions): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OneofDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: OneofDescriptorProto): OneofDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OneofDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OneofDescriptorProto; + static deserializeBinaryFromReader(message: OneofDescriptorProto, reader: jspb.BinaryReader): OneofDescriptorProto; +} + +export namespace OneofDescriptorProto { + export type AsObject = { + name: string, + options: OneofOptions.AsObject, + } +} + +export class EnumDescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string; + setName(value: string): void; + + clearValueList(): void; + getValueList(): Array; + setValueList(value: Array): void; + addValue(value?: EnumValueDescriptorProto, index?: number): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): EnumOptions; + setOptions(value: EnumOptions): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: EnumDescriptorProto): EnumDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumDescriptorProto; + static deserializeBinaryFromReader(message: EnumDescriptorProto, reader: jspb.BinaryReader): EnumDescriptorProto; +} + +export namespace EnumDescriptorProto { + export type AsObject = { + name: string, + valueList: Array, + options: EnumOptions.AsObject, + } +} + +export class EnumValueDescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string; + setName(value: string): void; + + hasNumber(): boolean; + clearNumber(): void; + getNumber(): number; + setNumber(value: number): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): EnumValueOptions; + setOptions(value: EnumValueOptions): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumValueDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: EnumValueDescriptorProto): EnumValueDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumValueDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumValueDescriptorProto; + static deserializeBinaryFromReader(message: EnumValueDescriptorProto, reader: jspb.BinaryReader): EnumValueDescriptorProto; +} + +export namespace EnumValueDescriptorProto { + export type AsObject = { + name: string, + number: number, + options: EnumValueOptions.AsObject, + } +} + +export class ServiceDescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string; + setName(value: string): void; + + clearMethodList(): void; + getMethodList(): Array; + setMethodList(value: Array): void; + addMethod(value?: MethodDescriptorProto, index?: number): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): ServiceOptions; + setOptions(value: ServiceOptions): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ServiceDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: ServiceDescriptorProto): ServiceDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ServiceDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ServiceDescriptorProto; + static deserializeBinaryFromReader(message: ServiceDescriptorProto, reader: jspb.BinaryReader): ServiceDescriptorProto; +} + +export namespace ServiceDescriptorProto { + export type AsObject = { + name: string, + methodList: Array, + options: ServiceOptions.AsObject, + } +} + +export class MethodDescriptorProto extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): string; + setName(value: string): void; + + hasInputType(): boolean; + clearInputType(): void; + getInputType(): string; + setInputType(value: string): void; + + hasOutputType(): boolean; + clearOutputType(): void; + getOutputType(): string; + setOutputType(value: string): void; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): MethodOptions; + setOptions(value: MethodOptions): void; + + hasClientStreaming(): boolean; + clearClientStreaming(): void; + getClientStreaming(): boolean; + setClientStreaming(value: boolean): void; + + hasServerStreaming(): boolean; + clearServerStreaming(): void; + getServerStreaming(): boolean; + setServerStreaming(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MethodDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: MethodDescriptorProto): MethodDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MethodDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MethodDescriptorProto; + static deserializeBinaryFromReader(message: MethodDescriptorProto, reader: jspb.BinaryReader): MethodDescriptorProto; +} + +export namespace MethodDescriptorProto { + export type AsObject = { + name: string, + inputType: string, + outputType: string, + options: MethodOptions.AsObject, + clientStreaming: boolean, + serverStreaming: boolean, + } +} + +export class FileOptions extends jspb.Message { + hasJavaPackage(): boolean; + clearJavaPackage(): void; + getJavaPackage(): string; + setJavaPackage(value: string): void; + + hasJavaOuterClassname(): boolean; + clearJavaOuterClassname(): void; + getJavaOuterClassname(): string; + setJavaOuterClassname(value: string): void; + + hasJavaMultipleFiles(): boolean; + clearJavaMultipleFiles(): void; + getJavaMultipleFiles(): boolean; + setJavaMultipleFiles(value: boolean): void; + + hasJavaGenerateEqualsAndHash(): boolean; + clearJavaGenerateEqualsAndHash(): void; + getJavaGenerateEqualsAndHash(): boolean; + setJavaGenerateEqualsAndHash(value: boolean): void; + + hasJavaStringCheckUtf8(): boolean; + clearJavaStringCheckUtf8(): void; + getJavaStringCheckUtf8(): boolean; + setJavaStringCheckUtf8(value: boolean): void; + + hasOptimizeFor(): boolean; + clearOptimizeFor(): void; + getOptimizeFor(): FileOptions.OptimizeMode; + setOptimizeFor(value: FileOptions.OptimizeMode): void; + + hasGoPackage(): boolean; + clearGoPackage(): void; + getGoPackage(): string; + setGoPackage(value: string): void; + + hasCcGenericServices(): boolean; + clearCcGenericServices(): void; + getCcGenericServices(): boolean; + setCcGenericServices(value: boolean): void; + + hasJavaGenericServices(): boolean; + clearJavaGenericServices(): void; + getJavaGenericServices(): boolean; + setJavaGenericServices(value: boolean): void; + + hasPyGenericServices(): boolean; + clearPyGenericServices(): void; + getPyGenericServices(): boolean; + setPyGenericServices(value: boolean): void; + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean; + setDeprecated(value: boolean): void; + + hasCcEnableArenas(): boolean; + clearCcEnableArenas(): void; + getCcEnableArenas(): boolean; + setCcEnableArenas(value: boolean): void; + + hasObjcClassPrefix(): boolean; + clearObjcClassPrefix(): void; + getObjcClassPrefix(): string; + setObjcClassPrefix(value: string): void; + + hasCsharpNamespace(): boolean; + clearCsharpNamespace(): void; + getCsharpNamespace(): string; + setCsharpNamespace(value: string): void; + + hasSwiftPrefix(): boolean; + clearSwiftPrefix(): void; + getSwiftPrefix(): string; + setSwiftPrefix(value: string): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FileOptions.AsObject; + static toObject(includeInstance: boolean, msg: FileOptions): FileOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FileOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileOptions; + static deserializeBinaryFromReader(message: FileOptions, reader: jspb.BinaryReader): FileOptions; +} + +export namespace FileOptions { + export type AsObject = { + javaPackage: string, + javaOuterClassname: string, + javaMultipleFiles: boolean, + javaGenerateEqualsAndHash: boolean, + javaStringCheckUtf8: boolean, + optimizeFor: FileOptions.OptimizeMode, + goPackage: string, + ccGenericServices: boolean, + javaGenericServices: boolean, + pyGenericServices: boolean, + deprecated: boolean, + ccEnableArenas: boolean, + objcClassPrefix: string, + csharpNamespace: string, + swiftPrefix: string, + uninterpretedOptionList: Array, + } + + export enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3, + } +} + +export class MessageOptions extends jspb.Message { + hasMessageSetWireFormat(): boolean; + clearMessageSetWireFormat(): void; + getMessageSetWireFormat(): boolean; + setMessageSetWireFormat(value: boolean): void; + + hasNoStandardDescriptorAccessor(): boolean; + clearNoStandardDescriptorAccessor(): void; + getNoStandardDescriptorAccessor(): boolean; + setNoStandardDescriptorAccessor(value: boolean): void; + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean; + setDeprecated(value: boolean): void; + + hasMapEntry(): boolean; + clearMapEntry(): void; + getMapEntry(): boolean; + setMapEntry(value: boolean): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MessageOptions.AsObject; + static toObject(includeInstance: boolean, msg: MessageOptions): MessageOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MessageOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MessageOptions; + static deserializeBinaryFromReader(message: MessageOptions, reader: jspb.BinaryReader): MessageOptions; +} + +export namespace MessageOptions { + export type AsObject = { + messageSetWireFormat: boolean, + noStandardDescriptorAccessor: boolean, + deprecated: boolean, + mapEntry: boolean, + uninterpretedOptionList: Array, + } +} + +export class FieldOptions extends jspb.Message { + hasCtype(): boolean; + clearCtype(): void; + getCtype(): FieldOptions.CType; + setCtype(value: FieldOptions.CType): void; + + hasPacked(): boolean; + clearPacked(): void; + getPacked(): boolean; + setPacked(value: boolean): void; + + hasJstype(): boolean; + clearJstype(): void; + getJstype(): FieldOptions.JSType; + setJstype(value: FieldOptions.JSType): void; + + hasLazy(): boolean; + clearLazy(): void; + getLazy(): boolean; + setLazy(value: boolean): void; + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean; + setDeprecated(value: boolean): void; + + hasWeak(): boolean; + clearWeak(): void; + getWeak(): boolean; + setWeak(value: boolean): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldOptions.AsObject; + static toObject(includeInstance: boolean, msg: FieldOptions): FieldOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldOptions; + static deserializeBinaryFromReader(message: FieldOptions, reader: jspb.BinaryReader): FieldOptions; +} + +export namespace FieldOptions { + export type AsObject = { + ctype: FieldOptions.CType, + packed: boolean, + jstype: FieldOptions.JSType, + lazy: boolean, + deprecated: boolean, + weak: boolean, + uninterpretedOptionList: Array, + } + + export enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2, + } + export enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2, + } +} + +export class OneofOptions extends jspb.Message { + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OneofOptions.AsObject; + static toObject(includeInstance: boolean, msg: OneofOptions): OneofOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OneofOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OneofOptions; + static deserializeBinaryFromReader(message: OneofOptions, reader: jspb.BinaryReader): OneofOptions; +} + +export namespace OneofOptions { + export type AsObject = { + uninterpretedOptionList: Array, + } +} + +export class EnumOptions extends jspb.Message { + hasAllowAlias(): boolean; + clearAllowAlias(): void; + getAllowAlias(): boolean; + setAllowAlias(value: boolean): void; + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean; + setDeprecated(value: boolean): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumOptions.AsObject; + static toObject(includeInstance: boolean, msg: EnumOptions): EnumOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumOptions; + static deserializeBinaryFromReader(message: EnumOptions, reader: jspb.BinaryReader): EnumOptions; +} + +export namespace EnumOptions { + export type AsObject = { + allowAlias: boolean, + deprecated: boolean, + uninterpretedOptionList: Array, + } +} + +export class EnumValueOptions extends jspb.Message { + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean; + setDeprecated(value: boolean): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumValueOptions.AsObject; + static toObject(includeInstance: boolean, msg: EnumValueOptions): EnumValueOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumValueOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumValueOptions; + static deserializeBinaryFromReader(message: EnumValueOptions, reader: jspb.BinaryReader): EnumValueOptions; +} + +export namespace EnumValueOptions { + export type AsObject = { + deprecated: boolean, + uninterpretedOptionList: Array, + } +} + +export class ServiceOptions extends jspb.Message { + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean; + setDeprecated(value: boolean): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ServiceOptions.AsObject; + static toObject(includeInstance: boolean, msg: ServiceOptions): ServiceOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ServiceOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ServiceOptions; + static deserializeBinaryFromReader(message: ServiceOptions, reader: jspb.BinaryReader): ServiceOptions; +} + +export namespace ServiceOptions { + export type AsObject = { + deprecated: boolean, + uninterpretedOptionList: Array, + } +} + +export class MethodOptions extends jspb.Message { + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean; + setDeprecated(value: boolean): void; + + hasIdempotencyLevel(): boolean; + clearIdempotencyLevel(): void; + getIdempotencyLevel(): MethodOptions.IdempotencyLevel; + setIdempotencyLevel(value: MethodOptions.IdempotencyLevel): void; + + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): void; + addUninterpretedOption(value?: UninterpretedOption, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MethodOptions.AsObject; + static toObject(includeInstance: boolean, msg: MethodOptions): MethodOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MethodOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MethodOptions; + static deserializeBinaryFromReader(message: MethodOptions, reader: jspb.BinaryReader): MethodOptions; +} + +export namespace MethodOptions { + export type AsObject = { + deprecated: boolean, + idempotencyLevel: MethodOptions.IdempotencyLevel, + uninterpretedOptionList: Array, + } + + export enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2, + } +} + +export class UninterpretedOption extends jspb.Message { + clearNameList(): void; + getNameList(): Array; + setNameList(value: Array): void; + addName(value?: UninterpretedOption.NamePart, index?: number): void; + + hasIdentifierValue(): boolean; + clearIdentifierValue(): void; + getIdentifierValue(): string; + setIdentifierValue(value: string): void; + + hasPositiveIntValue(): boolean; + clearPositiveIntValue(): void; + getPositiveIntValue(): number; + setPositiveIntValue(value: number): void; + + hasNegativeIntValue(): boolean; + clearNegativeIntValue(): void; + getNegativeIntValue(): number; + setNegativeIntValue(value: number): void; + + hasDoubleValue(): boolean; + clearDoubleValue(): void; + getDoubleValue(): number; + setDoubleValue(value: number): void; + + hasStringValue(): boolean; + clearStringValue(): void; + getStringValue(): Uint8Array | string; + getStringValue_asU8(): Uint8Array; + getStringValue_asB64(): string; + setStringValue(value: Uint8Array | string): void; + + hasAggregateValue(): boolean; + clearAggregateValue(): void; + getAggregateValue(): string; + setAggregateValue(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UninterpretedOption.AsObject; + static toObject(includeInstance: boolean, msg: UninterpretedOption): UninterpretedOption.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UninterpretedOption, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UninterpretedOption; + static deserializeBinaryFromReader(message: UninterpretedOption, reader: jspb.BinaryReader): UninterpretedOption; +} + +export namespace UninterpretedOption { + export type AsObject = { + nameList: Array, + identifierValue: string, + positiveIntValue: number, + negativeIntValue: number, + doubleValue: number, + stringValue: Uint8Array | string, + aggregateValue: string, + } + + export class NamePart extends jspb.Message { + hasNamePart(): boolean; + clearNamePart(): void; + getNamePart(): string; + setNamePart(value: string): void; + + hasIsExtension(): boolean; + clearIsExtension(): void; + getIsExtension(): boolean; + setIsExtension(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NamePart.AsObject; + static toObject(includeInstance: boolean, msg: NamePart): NamePart.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NamePart, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NamePart; + static deserializeBinaryFromReader(message: NamePart, reader: jspb.BinaryReader): NamePart; + } + + export namespace NamePart { + export type AsObject = { + namePart: string, + isExtension: boolean, + } + } +} + +export class SourceCodeInfo extends jspb.Message { + clearLocationList(): void; + getLocationList(): Array; + setLocationList(value: Array): void; + addLocation(value?: SourceCodeInfo.Location, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SourceCodeInfo.AsObject; + static toObject(includeInstance: boolean, msg: SourceCodeInfo): SourceCodeInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SourceCodeInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SourceCodeInfo; + static deserializeBinaryFromReader(message: SourceCodeInfo, reader: jspb.BinaryReader): SourceCodeInfo; +} + +export namespace SourceCodeInfo { + export type AsObject = { + locationList: Array, + } + + export class Location extends jspb.Message { + clearPathList(): void; + getPathList(): Array; + setPathList(value: Array): void; + addPath(value: number, index?: number): void; + + clearSpanList(): void; + getSpanList(): Array; + setSpanList(value: Array): void; + addSpan(value: number, index?: number): void; + + hasLeadingComments(): boolean; + clearLeadingComments(): void; + getLeadingComments(): string; + setLeadingComments(value: string): void; + + hasTrailingComments(): boolean; + clearTrailingComments(): void; + getTrailingComments(): string; + setTrailingComments(value: string): void; + + clearLeadingDetachedCommentsList(): void; + getLeadingDetachedCommentsList(): Array; + setLeadingDetachedCommentsList(value: Array): void; + addLeadingDetachedComments(value: string, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Location.AsObject; + static toObject(includeInstance: boolean, msg: Location): Location.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Location, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Location; + static deserializeBinaryFromReader(message: Location, reader: jspb.BinaryReader): Location; + } + + export namespace Location { + export type AsObject = { + pathList: Array, + spanList: Array, + leadingComments: string, + trailingComments: string, + leadingDetachedCommentsList: Array, + } + } +} + +export class GeneratedCodeInfo extends jspb.Message { + clearAnnotationList(): void; + getAnnotationList(): Array; + setAnnotationList(value: Array): void; + addAnnotation(value?: GeneratedCodeInfo.Annotation, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GeneratedCodeInfo.AsObject; + static toObject(includeInstance: boolean, msg: GeneratedCodeInfo): GeneratedCodeInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GeneratedCodeInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GeneratedCodeInfo; + static deserializeBinaryFromReader(message: GeneratedCodeInfo, reader: jspb.BinaryReader): GeneratedCodeInfo; +} + +export namespace GeneratedCodeInfo { + export type AsObject = { + annotationList: Array, + } + + export class Annotation extends jspb.Message { + clearPathList(): void; + getPathList(): Array; + setPathList(value: Array): void; + addPath(value: number, index?: number): void; + + hasSourceFile(): boolean; + clearSourceFile(): void; + getSourceFile(): string; + setSourceFile(value: string): void; + + hasBegin(): boolean; + clearBegin(): void; + getBegin(): number; + setBegin(value: number): void; + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number; + setEnd(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Annotation.AsObject; + static toObject(includeInstance: boolean, msg: Annotation): Annotation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Annotation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Annotation; + static deserializeBinaryFromReader(message: Annotation, reader: jspb.BinaryReader): Annotation; + } + + export namespace Annotation { + export type AsObject = { + pathList: Array, + sourceFile: string, + begin: number, + end: number, + } + } +} + diff --git a/types/google-protobuf/google/protobuf/duration_pb.d.ts b/types/google-protobuf/google/protobuf/duration_pb.d.ts new file mode 100644 index 0000000000..29b39ae965 --- /dev/null +++ b/types/google-protobuf/google/protobuf/duration_pb.d.ts @@ -0,0 +1,26 @@ +import * as jspb from "../../index"; + +export class Duration extends jspb.Message { + getSeconds(): number; + setSeconds(value: number): void; + + getNanos(): number; + setNanos(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Duration.AsObject; + static toObject(includeInstance: boolean, msg: Duration): Duration.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Duration, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Duration; + static deserializeBinaryFromReader(message: Duration, reader: jspb.BinaryReader): Duration; +} + +export namespace Duration { + export type AsObject = { + seconds: number, + nanos: number, + } +} + diff --git a/types/google-protobuf/google/protobuf/empty_pb.d.ts b/types/google-protobuf/google/protobuf/empty_pb.d.ts new file mode 100644 index 0000000000..69de4641d9 --- /dev/null +++ b/types/google-protobuf/google/protobuf/empty_pb.d.ts @@ -0,0 +1,18 @@ +import * as jspb from "../../index"; + +export class Empty extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Empty.AsObject; + static toObject(includeInstance: boolean, msg: Empty): Empty.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Empty, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Empty; + static deserializeBinaryFromReader(message: Empty, reader: jspb.BinaryReader): Empty; +} + +export namespace Empty { + export type AsObject = { + } +} + diff --git a/types/google-protobuf/google/protobuf/field_mask_pb.d.ts b/types/google-protobuf/google/protobuf/field_mask_pb.d.ts new file mode 100644 index 0000000000..d0c4caf2aa --- /dev/null +++ b/types/google-protobuf/google/protobuf/field_mask_pb.d.ts @@ -0,0 +1,24 @@ +import * as jspb from "../../index"; + +export class FieldMask extends jspb.Message { + clearPathsList(): void; + getPathsList(): Array; + setPathsList(value: Array): void; + addPaths(value: string, index?: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldMask.AsObject; + static toObject(includeInstance: boolean, msg: FieldMask): FieldMask.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldMask, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldMask; + static deserializeBinaryFromReader(message: FieldMask, reader: jspb.BinaryReader): FieldMask; +} + +export namespace FieldMask { + export type AsObject = { + pathsList: Array, + } +} + diff --git a/types/google-protobuf/google/protobuf/source_context_pb.d.ts b/types/google-protobuf/google/protobuf/source_context_pb.d.ts new file mode 100644 index 0000000000..934b9a2636 --- /dev/null +++ b/types/google-protobuf/google/protobuf/source_context_pb.d.ts @@ -0,0 +1,22 @@ +import * as jspb from "../../index"; + +export class SourceContext extends jspb.Message { + getFileName(): string; + setFileName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SourceContext.AsObject; + static toObject(includeInstance: boolean, msg: SourceContext): SourceContext.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SourceContext, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SourceContext; + static deserializeBinaryFromReader(message: SourceContext, reader: jspb.BinaryReader): SourceContext; +} + +export namespace SourceContext { + export type AsObject = { + fileName: string, + } +} + diff --git a/types/google-protobuf/google/protobuf/struct_pb.d.ts b/types/google-protobuf/google/protobuf/struct_pb.d.ts new file mode 100644 index 0000000000..46c28ad1df --- /dev/null +++ b/types/google-protobuf/google/protobuf/struct_pb.d.ts @@ -0,0 +1,122 @@ +import * as jspb from "../../index"; + +export class Struct extends jspb.Message { + getFieldsMap(): jspb.Map; + clearFieldsMap(): void; + + toJavaScript(): {[key: string]: JavaScriptValue}; + static fromJavaScript(value: {[key: string]: JavaScriptValue}): Struct; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Struct.AsObject; + static toObject(includeInstance: boolean, msg: Struct): Struct.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Struct, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Struct; + static deserializeBinaryFromReader(message: Struct, reader: jspb.BinaryReader): Struct; +} + +export namespace Struct { + export type AsObject = { + fieldsMap: Array<[string, Value.AsObject]>, + } +} + +export class Value extends jspb.Message { + hasNullValue(): boolean; + clearNullValue(): void; + getNullValue(): NullValue; + setNullValue(value: NullValue): void; + + hasNumberValue(): boolean; + clearNumberValue(): void; + getNumberValue(): number; + setNumberValue(value: number): void; + + hasStringValue(): boolean; + clearStringValue(): void; + getStringValue(): string; + setStringValue(value: string): void; + + hasBoolValue(): boolean; + clearBoolValue(): void; + getBoolValue(): boolean; + setBoolValue(value: boolean): void; + + hasStructValue(): boolean; + clearStructValue(): void; + getStructValue(): Struct; + setStructValue(value: Struct): void; + + hasListValue(): boolean; + clearListValue(): void; + getListValue(): ListValue; + setListValue(value: ListValue): void; + + getKindCase(): Value.KindCase; + + toJavaScript(): JavaScriptValue; + static fromJavaScript(value: JavaScriptValue): Value; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Value.AsObject; + static toObject(includeInstance: boolean, msg: Value): Value.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Value, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Value; + static deserializeBinaryFromReader(message: Value, reader: jspb.BinaryReader): Value; +} + +export namespace Value { + export type AsObject = { + nullValue: NullValue, + numberValue: number, + stringValue: string, + boolValue: boolean, + structValue: Struct.AsObject, + listValue: ListValue.AsObject, + } + + export enum KindCase { + KIND_NOT_SET = 0, + NULL_VALUE = 1, + NUMBER_VALUE = 2, + STRING_VALUE = 3, + BOOL_VALUE = 4, + STRUCT_VALUE = 5, + LIST_VALUE = 6, + } +} + +export class ListValue extends jspb.Message { + clearValuesList(): void; + getValuesList(): Array; + setValuesList(value: Array): void; + addValues(value?: Value, index?: number): void; + + toJavaScript(): Array; + static fromJavaScript(value: Array): ListValue; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListValue.AsObject; + static toObject(includeInstance: boolean, msg: ListValue): ListValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListValue; + static deserializeBinaryFromReader(message: ListValue, reader: jspb.BinaryReader): ListValue; +} + +export namespace ListValue { + export type AsObject = { + valuesList: Array, + } +} + +export enum NullValue { + NULL_VALUE = 0, +} + +export type JavaScriptValue = null | number | string | boolean | Array | {}; diff --git a/types/google-protobuf/google/protobuf/timestamp_pb.d.ts b/types/google-protobuf/google/protobuf/timestamp_pb.d.ts new file mode 100644 index 0000000000..2fadf11ad2 --- /dev/null +++ b/types/google-protobuf/google/protobuf/timestamp_pb.d.ts @@ -0,0 +1,29 @@ +import * as jspb from "../../index"; + +export class Timestamp extends jspb.Message { + getSeconds(): number; + setSeconds(value: number): void; + + getNanos(): number; + setNanos(value: number): void; + + toDate(): Date; + fromDate(date: Date): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Timestamp.AsObject; + static toObject(includeInstance: boolean, msg: Timestamp): Timestamp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Timestamp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Timestamp; + static deserializeBinaryFromReader(message: Timestamp, reader: jspb.BinaryReader): Timestamp; +} + +export namespace Timestamp { + export type AsObject = { + seconds: number, + nanos: number, + } +} + diff --git a/types/google-protobuf/google/protobuf/type_pb.d.ts b/types/google-protobuf/google/protobuf/type_pb.d.ts new file mode 100644 index 0000000000..186bad8d36 --- /dev/null +++ b/types/google-protobuf/google/protobuf/type_pb.d.ts @@ -0,0 +1,240 @@ +import * as jspb from "../../index"; +import * as google_protobuf_any_pb from "./any_pb"; +import * as google_protobuf_source_context_pb from "./source_context_pb"; + +export class Type extends jspb.Message { + getName(): string; + setName(value: string): void; + + clearFieldsList(): void; + getFieldsList(): Array; + setFieldsList(value: Array): void; + addFields(value?: Field, index?: number): void; + + clearOneofsList(): void; + getOneofsList(): Array; + setOneofsList(value: Array): void; + addOneofs(value: string, index?: number): void; + + clearOptionsList(): void; + getOptionsList(): Array{this.props.data} + const url = "speakers/" + this.props.rowData.test + "/" + this.props.data; + return {this.props.data}; } } const StatelessFunctionComponent = (props: CustomColumnComponentProps) => { - var url = "speakers/" + props.rowData.test + "/" + props.data; - return {props.data} + const url = "speakers/" + props.rowData.test + "/" + props.data; + return {props.data}; }; -var columnMeta = [ +const columnMeta = [ { columnName: "name", order: 1, @@ -33,7 +33,7 @@ var columnMeta = [ customComponent: StatelessFunctionComponent }]; -var results: MyCustomResult[] = [ +const results: MyCustomResult[] = [ { name: 'David Hara', test: 'blah' @@ -44,7 +44,7 @@ var results: MyCustomResult[] = [ } ]; -var rowMetaData = { +const rowMetaData = { bodyCssClassName: (rowData: MyCustomResult) => { return rowData.test; } @@ -54,7 +54,7 @@ class CustomColumnComponentGrid extends React.Component { render() { type TypedGriddle = new () => Griddle; const TypedGriddle = Griddle as TypedGriddle; - + return ( { }; } -export default CustomColumnComponentGrid; \ No newline at end of file +export default CustomColumnComponentGrid; diff --git a/griddle-react/test/CustomFilterComponent.tsx b/types/griddle-react/test/CustomFilterComponent.tsx similarity index 82% rename from griddle-react/test/CustomFilterComponent.tsx rename to types/griddle-react/test/CustomFilterComponent.tsx index e7508887f5..3de40132f1 100644 --- a/griddle-react/test/CustomFilterComponent.tsx +++ b/types/griddle-react/test/CustomFilterComponent.tsx @@ -10,7 +10,6 @@ import Griddle, { CustomFilterComponentProps } from 'griddle-react'; const CustomFilterFunction = (items: ResultType[], query: string): ResultType[] => { return _.filter(items, (item) => { - let match = false; _.forIn(item, (value, key) => { if (String(value).toLowerCase().indexOf(query.toLowerCase()) >= 0) { @@ -53,30 +52,29 @@ interface ResultType { favoriteNumber: number; } -var someData: ResultType[] = [ +const someData: ResultType[] = [ { - "id": 0, - "name": "Mayer Leonard", - "city": "Kapowsin", - "state": "Hawaii", - "country": "United Kingdom", - "company": "Ovolo", - "favoriteNumber": 7 + id: 0, + name: "Mayer Leonard", + city: "Kapowsin", + state: "Hawaii", + country: "United Kingdom", + company: "Ovolo", + favoriteNumber: 7 }, { - "id": 1, - "name": "Koch Becker", - "city": "Johnsonburg", - "state": "New Jersey", - "country": "Madagascar", - "company": "Eventage", - "favoriteNumber": 2 + id: 1, + name: "Koch Becker", + city: "Johnsonburg", + state: "New Jersey", + country: "Madagascar", + company: "Eventage", + favoriteNumber: 2 } ]; class CustomFilterComponentGrid extends React.Component { render() { - type TypedGriddle = new () => Griddle; const TypedGriddle = Griddle as TypedGriddle; diff --git a/griddle-react/test/CustomHeaderComponent.tsx b/types/griddle-react/test/CustomHeaderComponent.tsx similarity index 79% rename from griddle-react/test/CustomHeaderComponent.tsx rename to types/griddle-react/test/CustomHeaderComponent.tsx index aed7d348aa..af9d1d6ea3 100644 --- a/griddle-react/test/CustomHeaderComponent.tsx +++ b/types/griddle-react/test/CustomHeaderComponent.tsx @@ -17,7 +17,7 @@ class HeaderComponent extends React.Component) { - this.props.filterByColumn(e.currentTarget.value, this.props.columnName) + this.props.filterByColumn(e.currentTarget.value, this.props.columnName); } render() { @@ -40,28 +40,28 @@ interface ResultType { favoriteNumber: number; } -var someData: ResultType[] = [ +const someData: ResultType[] = [ { - "id": 0, - "name": "Mayer Leonard", - "city": "Kapowsin", - "state": "Hawaii", - "country": "United Kingdom", - "company": "Ovolo", - "favoriteNumber": 7 + id: 0, + name: "Mayer Leonard", + city: "Kapowsin", + state: "Hawaii", + country: "United Kingdom", + company: "Ovolo", + favoriteNumber: 7 }, { - "id": 1, - "name": "Koch Becker", - "city": "Johnsonburg", - "state": "New Jersey", - "country": "Madagascar", - "company": "Eventage", - "favoriteNumber": 2 + id: 1, + name: "Koch Becker", + city: "Johnsonburg", + state: "New Jersey", + country: "Madagascar", + company: "Eventage", + favoriteNumber: 2 } ]; -var columnMeta: ColumnMetaData[] = [ +const columnMeta: Array> = [ { columnName: 'name', order: 1, @@ -82,7 +82,6 @@ var columnMeta: ColumnMetaData[] = [ class CustomHeaderComponentGrid extends React.Component { render() { - type TypedGriddle = new () => Griddle; const TypedGriddle = Griddle as TypedGriddle; diff --git a/griddle-react/griddle-react-tests.tsx b/types/griddle-react/test/index.tsx similarity index 73% rename from griddle-react/griddle-react-tests.tsx rename to types/griddle-react/test/index.tsx index 5f241feeb5..3e0b1c76ff 100644 --- a/griddle-react/griddle-react-tests.tsx +++ b/types/griddle-react/test/index.tsx @@ -7,28 +7,28 @@ Copyright (c) 2016 David Hara import * as React from 'react'; import { render } from 'react-dom'; import Griddle, { CustomColumnComponentProps } from 'griddle-react'; -import CustomColumnComponentGrid from './test/CustomColumnComponent'; -import CustomHeaderComponentGrid from './test/CustomHeaderComponent'; -import CustomFilterComponentGrid from './test/CustomFilterComponent'; +import CustomColumnComponentGrid from './CustomColumnComponent'; +import CustomHeaderComponentGrid from './CustomHeaderComponent'; +import CustomFilterComponentGrid from './CustomFilterComponent'; interface MyCustomResult { - name: string, - test: string + name: string; + test: string; } class LinkComponent extends React.Component, any> { render() { - var url = "speakers/" + this.props.rowData.test + "/" + this.props.data; - return {this.props.data} + const url = "speakers/" + this.props.rowData.test + "/" + this.props.data; + return {this.props.data}; } } const StatelessFunctionComponent = (props: CustomColumnComponentProps) => { - var url = "speakers/" + props.rowData.test + "/" + props.data; - return {props.data} + const url = "speakers/" + props.rowData.test + "/" + props.data; + return {props.data}; }; -var columnMeta = [ +const columnMeta = [ { columnName: "name", order: 1, @@ -37,7 +37,7 @@ var columnMeta = [ customComponent: StatelessFunctionComponent }]; -var results: MyCustomResult[] = [ +const results: MyCustomResult[] = [ { name: 'David Hara', test: 'blah' @@ -48,7 +48,7 @@ var results: MyCustomResult[] = [ } ]; -var rowMetaData = { +const rowMetaData = { bodyCssClassName: (rowData: MyCustomResult) => { return rowData.test; } diff --git a/griddle-react/tsconfig.json b/types/griddle-react/tsconfig.json similarity index 94% rename from griddle-react/tsconfig.json rename to types/griddle-react/tsconfig.json index 5dd6f9d98b..3de8b9abda 100644 --- a/griddle-react/tsconfig.json +++ b/types/griddle-react/tsconfig.json @@ -19,7 +19,7 @@ }, "files": [ "index.d.ts", - "griddle-react-tests.tsx", + "test/index.tsx", "test/CustomColumnComponent.tsx", "test/CustomFilterComponent.tsx", "test/CustomHeaderComponent.tsx" diff --git a/griddle-react/tslint.json b/types/griddle-react/tslint.json similarity index 100% rename from griddle-react/tslint.json rename to types/griddle-react/tslint.json diff --git a/gridfs-stream/gridfs-stream-tests.ts b/types/gridfs-stream/gridfs-stream-tests.ts similarity index 100% rename from gridfs-stream/gridfs-stream-tests.ts rename to types/gridfs-stream/gridfs-stream-tests.ts diff --git a/gridfs-stream/index.d.ts b/types/gridfs-stream/index.d.ts similarity index 100% rename from gridfs-stream/index.d.ts rename to types/gridfs-stream/index.d.ts diff --git a/gridfs-stream/tsconfig.json b/types/gridfs-stream/tsconfig.json similarity index 100% rename from gridfs-stream/tsconfig.json rename to types/gridfs-stream/tsconfig.json diff --git a/gridstack/gridstack-tests.ts b/types/gridstack/gridstack-tests.ts similarity index 55% rename from gridstack/gridstack-tests.ts rename to types/gridstack/gridstack-tests.ts index 96aa14b19f..9330d2019e 100644 --- a/gridstack/gridstack-tests.ts +++ b/types/gridstack/gridstack-tests.ts @@ -4,13 +4,17 @@ // Type definitions for Gridstack // Project: http://troolee.github.io/gridstack.js/ -// Definitions by: Pascal Senn +// Definitions by: Pascal Senn , Ricky Blankenaufulland // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped var options = { float: true }; -var gridstack:GridStack = $(document).gridstack(options); +var element: JQuery = $(document).gridstack(options); +var gridstack: GridStack = $(document).data("gridstack"); +var gsFromElement: GridStack = element.data("gridstack"); + +if (gridstack !== gsFromElement) throw Error('These should match!'); gridstack.addWidget("test", 1, 2, 3, 4, true); gridstack.batchUpdate(); diff --git a/gridstack/index.d.ts b/types/gridstack/index.d.ts similarity index 97% rename from gridstack/index.d.ts rename to types/gridstack/index.d.ts index 12c3600f6a..8d912e3a33 100644 --- a/gridstack/index.d.ts +++ b/types/gridstack/index.d.ts @@ -1,10 +1,11 @@ // Type definitions for Gridstack // Project: http://troolee.github.io/gridstack.js/ -// Definitions by: Pascal Senn +// Definitions by: Pascal Senn , Ricky Blankenaufulland // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped interface JQuery { - gridstack (options: IGridstackOptions):GridStack + gridstack (options: IGridstackOptions): JQuery; + data(key: "gridstack"): GridStack; } interface GridStack { diff --git a/gridstack/tsconfig.json b/types/gridstack/tsconfig.json similarity index 100% rename from gridstack/tsconfig.json rename to types/gridstack/tsconfig.json diff --git a/grunt/grunt-tests.ts b/types/grunt/grunt-tests.ts similarity index 100% rename from grunt/grunt-tests.ts rename to types/grunt/grunt-tests.ts diff --git a/grunt/index.d.ts b/types/grunt/index.d.ts similarity index 100% rename from grunt/index.d.ts rename to types/grunt/index.d.ts diff --git a/grunt/tsconfig.json b/types/grunt/tsconfig.json similarity index 100% rename from grunt/tsconfig.json rename to types/grunt/tsconfig.json diff --git a/gsap/Animation.d.ts b/types/gsap/Animation.d.ts similarity index 100% rename from gsap/Animation.d.ts rename to types/gsap/Animation.d.ts diff --git a/gsap/Ease.d.ts b/types/gsap/Ease.d.ts similarity index 100% rename from gsap/Ease.d.ts rename to types/gsap/Ease.d.ts diff --git a/gsap/Plugins.d.ts b/types/gsap/Plugins.d.ts similarity index 100% rename from gsap/Plugins.d.ts rename to types/gsap/Plugins.d.ts diff --git a/gsap/Timeline.d.ts b/types/gsap/Timeline.d.ts similarity index 100% rename from gsap/Timeline.d.ts rename to types/gsap/Timeline.d.ts diff --git a/gsap/Tween.d.ts b/types/gsap/Tween.d.ts similarity index 100% rename from gsap/Tween.d.ts rename to types/gsap/Tween.d.ts diff --git a/gsap/TweenConfig.d.ts b/types/gsap/TweenConfig.d.ts similarity index 100% rename from gsap/TweenConfig.d.ts rename to types/gsap/TweenConfig.d.ts diff --git a/gsap/gsap-tests.ts b/types/gsap/gsap-tests.ts similarity index 100% rename from gsap/gsap-tests.ts rename to types/gsap/gsap-tests.ts diff --git a/gsap/index.d.ts b/types/gsap/index.d.ts similarity index 100% rename from gsap/index.d.ts rename to types/gsap/index.d.ts diff --git a/gsap/tsconfig.json b/types/gsap/tsconfig.json similarity index 100% rename from gsap/tsconfig.json rename to types/gsap/tsconfig.json diff --git a/gsap/tslint.json b/types/gsap/tslint.json similarity index 100% rename from gsap/tslint.json rename to types/gsap/tslint.json diff --git a/gulp-angular-templatecache/gulp-angular-templatecache-tests.ts b/types/gulp-angular-templatecache/gulp-angular-templatecache-tests.ts similarity index 100% rename from gulp-angular-templatecache/gulp-angular-templatecache-tests.ts rename to types/gulp-angular-templatecache/gulp-angular-templatecache-tests.ts diff --git a/gulp-angular-templatecache/index.d.ts b/types/gulp-angular-templatecache/index.d.ts similarity index 100% rename from gulp-angular-templatecache/index.d.ts rename to types/gulp-angular-templatecache/index.d.ts diff --git a/gulp-angular-templatecache/tsconfig.json b/types/gulp-angular-templatecache/tsconfig.json similarity index 100% rename from gulp-angular-templatecache/tsconfig.json rename to types/gulp-angular-templatecache/tsconfig.json diff --git a/gulp-autoprefixer/gulp-autoprefixer-tests.ts b/types/gulp-autoprefixer/gulp-autoprefixer-tests.ts similarity index 100% rename from gulp-autoprefixer/gulp-autoprefixer-tests.ts rename to types/gulp-autoprefixer/gulp-autoprefixer-tests.ts diff --git a/gulp-autoprefixer/index.d.ts b/types/gulp-autoprefixer/index.d.ts similarity index 100% rename from gulp-autoprefixer/index.d.ts rename to types/gulp-autoprefixer/index.d.ts diff --git a/gulp-autoprefixer/tsconfig.json b/types/gulp-autoprefixer/tsconfig.json similarity index 100% rename from gulp-autoprefixer/tsconfig.json rename to types/gulp-autoprefixer/tsconfig.json diff --git a/gulp-babel/gulp-babel-tests.ts b/types/gulp-babel/gulp-babel-tests.ts similarity index 100% rename from gulp-babel/gulp-babel-tests.ts rename to types/gulp-babel/gulp-babel-tests.ts diff --git a/gulp-babel/index.d.ts b/types/gulp-babel/index.d.ts similarity index 100% rename from gulp-babel/index.d.ts rename to types/gulp-babel/index.d.ts diff --git a/gulp-babel/tsconfig.json b/types/gulp-babel/tsconfig.json similarity index 100% rename from gulp-babel/tsconfig.json rename to types/gulp-babel/tsconfig.json diff --git a/gulp-batch/gulp-batch-tests.ts b/types/gulp-batch/gulp-batch-tests.ts similarity index 100% rename from gulp-batch/gulp-batch-tests.ts rename to types/gulp-batch/gulp-batch-tests.ts diff --git a/gulp-batch/index.d.ts b/types/gulp-batch/index.d.ts similarity index 100% rename from gulp-batch/index.d.ts rename to types/gulp-batch/index.d.ts diff --git a/gulp-batch/tsconfig.json b/types/gulp-batch/tsconfig.json similarity index 100% rename from gulp-batch/tsconfig.json rename to types/gulp-batch/tsconfig.json diff --git a/graphql-relay/tslint.json b/types/gulp-batch/tslint.json similarity index 100% rename from graphql-relay/tslint.json rename to types/gulp-batch/tslint.json diff --git a/gulp-cache/gulp-cache-tests.ts b/types/gulp-cache/gulp-cache-tests.ts similarity index 100% rename from gulp-cache/gulp-cache-tests.ts rename to types/gulp-cache/gulp-cache-tests.ts diff --git a/gulp-cache/index.d.ts b/types/gulp-cache/index.d.ts similarity index 100% rename from gulp-cache/index.d.ts rename to types/gulp-cache/index.d.ts diff --git a/gulp-cache/tsconfig.json b/types/gulp-cache/tsconfig.json similarity index 100% rename from gulp-cache/tsconfig.json rename to types/gulp-cache/tsconfig.json diff --git a/gulp-cached/gulp-cached-tests.ts b/types/gulp-cached/gulp-cached-tests.ts similarity index 100% rename from gulp-cached/gulp-cached-tests.ts rename to types/gulp-cached/gulp-cached-tests.ts diff --git a/gulp-cached/index.d.ts b/types/gulp-cached/index.d.ts similarity index 100% rename from gulp-cached/index.d.ts rename to types/gulp-cached/index.d.ts diff --git a/gulp-cached/tsconfig.json b/types/gulp-cached/tsconfig.json similarity index 100% rename from gulp-cached/tsconfig.json rename to types/gulp-cached/tsconfig.json diff --git a/gulp-changed/gulp-changed-tests.ts b/types/gulp-changed/gulp-changed-tests.ts similarity index 100% rename from gulp-changed/gulp-changed-tests.ts rename to types/gulp-changed/gulp-changed-tests.ts diff --git a/gulp-changed/index.d.ts b/types/gulp-changed/index.d.ts similarity index 100% rename from gulp-changed/index.d.ts rename to types/gulp-changed/index.d.ts diff --git a/gulp-changed/tsconfig.json b/types/gulp-changed/tsconfig.json similarity index 100% rename from gulp-changed/tsconfig.json rename to types/gulp-changed/tsconfig.json diff --git a/gulp-cheerio/gulp-cheerio-tests.ts b/types/gulp-cheerio/gulp-cheerio-tests.ts similarity index 100% rename from gulp-cheerio/gulp-cheerio-tests.ts rename to types/gulp-cheerio/gulp-cheerio-tests.ts diff --git a/gulp-cheerio/index.d.ts b/types/gulp-cheerio/index.d.ts similarity index 100% rename from gulp-cheerio/index.d.ts rename to types/gulp-cheerio/index.d.ts diff --git a/gulp-cheerio/tsconfig.json b/types/gulp-cheerio/tsconfig.json similarity index 100% rename from gulp-cheerio/tsconfig.json rename to types/gulp-cheerio/tsconfig.json diff --git a/gulp-coffeeify/gulp-coffeeify-tests.ts b/types/gulp-coffeeify/gulp-coffeeify-tests.ts similarity index 100% rename from gulp-coffeeify/gulp-coffeeify-tests.ts rename to types/gulp-coffeeify/gulp-coffeeify-tests.ts diff --git a/gulp-coffeeify/index.d.ts b/types/gulp-coffeeify/index.d.ts similarity index 100% rename from gulp-coffeeify/index.d.ts rename to types/gulp-coffeeify/index.d.ts diff --git a/gulp-coffeeify/tsconfig.json b/types/gulp-coffeeify/tsconfig.json similarity index 100% rename from gulp-coffeeify/tsconfig.json rename to types/gulp-coffeeify/tsconfig.json diff --git a/gulp-coffeelint/gulp-coffeelint-tests.ts b/types/gulp-coffeelint/gulp-coffeelint-tests.ts similarity index 100% rename from gulp-coffeelint/gulp-coffeelint-tests.ts rename to types/gulp-coffeelint/gulp-coffeelint-tests.ts diff --git a/gulp-coffeelint/index.d.ts b/types/gulp-coffeelint/index.d.ts similarity index 100% rename from gulp-coffeelint/index.d.ts rename to types/gulp-coffeelint/index.d.ts diff --git a/gulp-coffeelint/tsconfig.json b/types/gulp-coffeelint/tsconfig.json similarity index 100% rename from gulp-coffeelint/tsconfig.json rename to types/gulp-coffeelint/tsconfig.json diff --git a/gulp-concat/gulp-concat-tests.ts b/types/gulp-concat/gulp-concat-tests.ts similarity index 100% rename from gulp-concat/gulp-concat-tests.ts rename to types/gulp-concat/gulp-concat-tests.ts diff --git a/gulp-concat/index.d.ts b/types/gulp-concat/index.d.ts similarity index 100% rename from gulp-concat/index.d.ts rename to types/gulp-concat/index.d.ts diff --git a/gulp-concat/tsconfig.json b/types/gulp-concat/tsconfig.json similarity index 100% rename from gulp-concat/tsconfig.json rename to types/gulp-concat/tsconfig.json diff --git a/gulp-copy/gulp-copy-tests.ts b/types/gulp-copy/gulp-copy-tests.ts similarity index 100% rename from gulp-copy/gulp-copy-tests.ts rename to types/gulp-copy/gulp-copy-tests.ts diff --git a/gulp-copy/index.d.ts b/types/gulp-copy/index.d.ts similarity index 100% rename from gulp-copy/index.d.ts rename to types/gulp-copy/index.d.ts diff --git a/gulp-copy/tsconfig.json b/types/gulp-copy/tsconfig.json similarity index 100% rename from gulp-copy/tsconfig.json rename to types/gulp-copy/tsconfig.json diff --git a/gulp-csso/gulp-csso-tests.ts b/types/gulp-csso/gulp-csso-tests.ts similarity index 100% rename from gulp-csso/gulp-csso-tests.ts rename to types/gulp-csso/gulp-csso-tests.ts diff --git a/gulp-csso/index.d.ts b/types/gulp-csso/index.d.ts similarity index 100% rename from gulp-csso/index.d.ts rename to types/gulp-csso/index.d.ts diff --git a/gulp-csso/tsconfig.json b/types/gulp-csso/tsconfig.json similarity index 100% rename from gulp-csso/tsconfig.json rename to types/gulp-csso/tsconfig.json diff --git a/gulp-debug/gulp-debug-tests.ts b/types/gulp-debug/gulp-debug-tests.ts similarity index 100% rename from gulp-debug/gulp-debug-tests.ts rename to types/gulp-debug/gulp-debug-tests.ts diff --git a/gulp-debug/index.d.ts b/types/gulp-debug/index.d.ts similarity index 100% rename from gulp-debug/index.d.ts rename to types/gulp-debug/index.d.ts diff --git a/gulp-debug/tsconfig.json b/types/gulp-debug/tsconfig.json similarity index 100% rename from gulp-debug/tsconfig.json rename to types/gulp-debug/tsconfig.json diff --git a/gulp-dtsm/gulp-dtsm-tests.ts b/types/gulp-dtsm/gulp-dtsm-tests.ts similarity index 100% rename from gulp-dtsm/gulp-dtsm-tests.ts rename to types/gulp-dtsm/gulp-dtsm-tests.ts diff --git a/gulp-dtsm/index.d.ts b/types/gulp-dtsm/index.d.ts similarity index 100% rename from gulp-dtsm/index.d.ts rename to types/gulp-dtsm/index.d.ts diff --git a/gulp-dtsm/tsconfig.json b/types/gulp-dtsm/tsconfig.json similarity index 100% rename from gulp-dtsm/tsconfig.json rename to types/gulp-dtsm/tsconfig.json diff --git a/gulp-espower/gulp-espower-tests.ts b/types/gulp-espower/gulp-espower-tests.ts similarity index 100% rename from gulp-espower/gulp-espower-tests.ts rename to types/gulp-espower/gulp-espower-tests.ts diff --git a/gulp-espower/index.d.ts b/types/gulp-espower/index.d.ts similarity index 100% rename from gulp-espower/index.d.ts rename to types/gulp-espower/index.d.ts diff --git a/gulp-espower/tsconfig.json b/types/gulp-espower/tsconfig.json similarity index 100% rename from gulp-espower/tsconfig.json rename to types/gulp-espower/tsconfig.json diff --git a/gulp-file-include/gulp-file-include-tests.ts b/types/gulp-file-include/gulp-file-include-tests.ts similarity index 100% rename from gulp-file-include/gulp-file-include-tests.ts rename to types/gulp-file-include/gulp-file-include-tests.ts diff --git a/gulp-file-include/index.d.ts b/types/gulp-file-include/index.d.ts similarity index 100% rename from gulp-file-include/index.d.ts rename to types/gulp-file-include/index.d.ts diff --git a/gulp-file-include/tsconfig.json b/types/gulp-file-include/tsconfig.json similarity index 100% rename from gulp-file-include/tsconfig.json rename to types/gulp-file-include/tsconfig.json diff --git a/gulp-filter/gulp-filter-tests.ts b/types/gulp-filter/gulp-filter-tests.ts similarity index 100% rename from gulp-filter/gulp-filter-tests.ts rename to types/gulp-filter/gulp-filter-tests.ts diff --git a/gulp-filter/index.d.ts b/types/gulp-filter/index.d.ts similarity index 100% rename from gulp-filter/index.d.ts rename to types/gulp-filter/index.d.ts diff --git a/gulp-filter/tsconfig.json b/types/gulp-filter/tsconfig.json similarity index 100% rename from gulp-filter/tsconfig.json rename to types/gulp-filter/tsconfig.json diff --git a/gulp-flatten/gulp-flatten-tests.ts b/types/gulp-flatten/gulp-flatten-tests.ts similarity index 100% rename from gulp-flatten/gulp-flatten-tests.ts rename to types/gulp-flatten/gulp-flatten-tests.ts diff --git a/gulp-flatten/index.d.ts b/types/gulp-flatten/index.d.ts similarity index 100% rename from gulp-flatten/index.d.ts rename to types/gulp-flatten/index.d.ts diff --git a/gulp-flatten/tsconfig.json b/types/gulp-flatten/tsconfig.json similarity index 100% rename from gulp-flatten/tsconfig.json rename to types/gulp-flatten/tsconfig.json diff --git a/gulp-gh-pages/gulp-gh-pages-tests.ts b/types/gulp-gh-pages/gulp-gh-pages-tests.ts similarity index 100% rename from gulp-gh-pages/gulp-gh-pages-tests.ts rename to types/gulp-gh-pages/gulp-gh-pages-tests.ts diff --git a/gulp-gh-pages/index.d.ts b/types/gulp-gh-pages/index.d.ts similarity index 100% rename from gulp-gh-pages/index.d.ts rename to types/gulp-gh-pages/index.d.ts diff --git a/gulp-gh-pages/tsconfig.json b/types/gulp-gh-pages/tsconfig.json similarity index 100% rename from gulp-gh-pages/tsconfig.json rename to types/gulp-gh-pages/tsconfig.json diff --git a/gulp-gzip/gulp-gzip-tests.ts b/types/gulp-gzip/gulp-gzip-tests.ts similarity index 100% rename from gulp-gzip/gulp-gzip-tests.ts rename to types/gulp-gzip/gulp-gzip-tests.ts diff --git a/gulp-gzip/index.d.ts b/types/gulp-gzip/index.d.ts similarity index 100% rename from gulp-gzip/index.d.ts rename to types/gulp-gzip/index.d.ts diff --git a/gulp-gzip/tsconfig.json b/types/gulp-gzip/tsconfig.json similarity index 100% rename from gulp-gzip/tsconfig.json rename to types/gulp-gzip/tsconfig.json diff --git a/gulp-help-doc/gulp-help-doc-tests.ts b/types/gulp-help-doc/gulp-help-doc-tests.ts similarity index 100% rename from gulp-help-doc/gulp-help-doc-tests.ts rename to types/gulp-help-doc/gulp-help-doc-tests.ts diff --git a/gulp-help-doc/index.d.ts b/types/gulp-help-doc/index.d.ts similarity index 100% rename from gulp-help-doc/index.d.ts rename to types/gulp-help-doc/index.d.ts diff --git a/gulp-help-doc/tsconfig.json b/types/gulp-help-doc/tsconfig.json similarity index 100% rename from gulp-help-doc/tsconfig.json rename to types/gulp-help-doc/tsconfig.json diff --git a/gulp-help/gulp-help-tests.ts b/types/gulp-help/gulp-help-tests.ts similarity index 100% rename from gulp-help/gulp-help-tests.ts rename to types/gulp-help/gulp-help-tests.ts diff --git a/gulp-help/index.d.ts b/types/gulp-help/index.d.ts similarity index 100% rename from gulp-help/index.d.ts rename to types/gulp-help/index.d.ts diff --git a/gulp-help/tsconfig.json b/types/gulp-help/tsconfig.json similarity index 100% rename from gulp-help/tsconfig.json rename to types/gulp-help/tsconfig.json diff --git a/gulp-html-replace/gulp-html-replace-tests.ts b/types/gulp-html-replace/gulp-html-replace-tests.ts similarity index 100% rename from gulp-html-replace/gulp-html-replace-tests.ts rename to types/gulp-html-replace/gulp-html-replace-tests.ts diff --git a/gulp-html-replace/index.d.ts b/types/gulp-html-replace/index.d.ts similarity index 100% rename from gulp-html-replace/index.d.ts rename to types/gulp-html-replace/index.d.ts diff --git a/gulp-html-replace/tsconfig.json b/types/gulp-html-replace/tsconfig.json similarity index 100% rename from gulp-html-replace/tsconfig.json rename to types/gulp-html-replace/tsconfig.json diff --git a/gulp-htmlmin/gulp-htmlmin-tests.ts b/types/gulp-htmlmin/gulp-htmlmin-tests.ts similarity index 100% rename from gulp-htmlmin/gulp-htmlmin-tests.ts rename to types/gulp-htmlmin/gulp-htmlmin-tests.ts diff --git a/gulp-htmlmin/index.d.ts b/types/gulp-htmlmin/index.d.ts similarity index 100% rename from gulp-htmlmin/index.d.ts rename to types/gulp-htmlmin/index.d.ts diff --git a/gulp-htmlmin/tsconfig.json b/types/gulp-htmlmin/tsconfig.json similarity index 100% rename from gulp-htmlmin/tsconfig.json rename to types/gulp-htmlmin/tsconfig.json diff --git a/gulp-if/gulp-if-tests.ts b/types/gulp-if/gulp-if-tests.ts similarity index 100% rename from gulp-if/gulp-if-tests.ts rename to types/gulp-if/gulp-if-tests.ts diff --git a/gulp-if/index.d.ts b/types/gulp-if/index.d.ts similarity index 100% rename from gulp-if/index.d.ts rename to types/gulp-if/index.d.ts diff --git a/gulp-if/tsconfig.json b/types/gulp-if/tsconfig.json similarity index 100% rename from gulp-if/tsconfig.json rename to types/gulp-if/tsconfig.json diff --git a/gulp-inject/gulp-inject-tests.ts b/types/gulp-inject/gulp-inject-tests.ts similarity index 100% rename from gulp-inject/gulp-inject-tests.ts rename to types/gulp-inject/gulp-inject-tests.ts diff --git a/gulp-inject/index.d.ts b/types/gulp-inject/index.d.ts similarity index 100% rename from gulp-inject/index.d.ts rename to types/gulp-inject/index.d.ts diff --git a/gulp-inject/tsconfig.json b/types/gulp-inject/tsconfig.json similarity index 100% rename from gulp-inject/tsconfig.json rename to types/gulp-inject/tsconfig.json diff --git a/gulp-insert/gulp-insert-tests.ts b/types/gulp-insert/gulp-insert-tests.ts similarity index 100% rename from gulp-insert/gulp-insert-tests.ts rename to types/gulp-insert/gulp-insert-tests.ts diff --git a/gulp-insert/index.d.ts b/types/gulp-insert/index.d.ts similarity index 100% rename from gulp-insert/index.d.ts rename to types/gulp-insert/index.d.ts diff --git a/gulp-insert/tsconfig.json b/types/gulp-insert/tsconfig.json similarity index 100% rename from gulp-insert/tsconfig.json rename to types/gulp-insert/tsconfig.json diff --git a/gulp-install/gulp-install-tests.ts b/types/gulp-install/gulp-install-tests.ts similarity index 100% rename from gulp-install/gulp-install-tests.ts rename to types/gulp-install/gulp-install-tests.ts diff --git a/gulp-install/index.d.ts b/types/gulp-install/index.d.ts similarity index 100% rename from gulp-install/index.d.ts rename to types/gulp-install/index.d.ts diff --git a/gulp-install/tsconfig.json b/types/gulp-install/tsconfig.json similarity index 100% rename from gulp-install/tsconfig.json rename to types/gulp-install/tsconfig.json diff --git a/gulp-istanbul/gulp-istanbul-tests.ts b/types/gulp-istanbul/gulp-istanbul-tests.ts similarity index 100% rename from gulp-istanbul/gulp-istanbul-tests.ts rename to types/gulp-istanbul/gulp-istanbul-tests.ts diff --git a/gulp-istanbul/index.d.ts b/types/gulp-istanbul/index.d.ts similarity index 100% rename from gulp-istanbul/index.d.ts rename to types/gulp-istanbul/index.d.ts diff --git a/gulp-istanbul/tsconfig.json b/types/gulp-istanbul/tsconfig.json similarity index 100% rename from gulp-istanbul/tsconfig.json rename to types/gulp-istanbul/tsconfig.json diff --git a/gulp-jade/gulp-jade-tests.ts b/types/gulp-jade/gulp-jade-tests.ts similarity index 100% rename from gulp-jade/gulp-jade-tests.ts rename to types/gulp-jade/gulp-jade-tests.ts diff --git a/gulp-jade/index.d.ts b/types/gulp-jade/index.d.ts similarity index 100% rename from gulp-jade/index.d.ts rename to types/gulp-jade/index.d.ts diff --git a/gulp-jade/tsconfig.json b/types/gulp-jade/tsconfig.json similarity index 100% rename from gulp-jade/tsconfig.json rename to types/gulp-jade/tsconfig.json diff --git a/gulp-jasmine-browser/gulp-jasmine-browser-tests.ts b/types/gulp-jasmine-browser/gulp-jasmine-browser-tests.ts similarity index 100% rename from gulp-jasmine-browser/gulp-jasmine-browser-tests.ts rename to types/gulp-jasmine-browser/gulp-jasmine-browser-tests.ts diff --git a/gulp-jasmine-browser/index.d.ts b/types/gulp-jasmine-browser/index.d.ts similarity index 100% rename from gulp-jasmine-browser/index.d.ts rename to types/gulp-jasmine-browser/index.d.ts diff --git a/gulp-jasmine-browser/tsconfig.json b/types/gulp-jasmine-browser/tsconfig.json similarity index 100% rename from gulp-jasmine-browser/tsconfig.json rename to types/gulp-jasmine-browser/tsconfig.json diff --git a/gulp-json-editor/gulp-json-editor-tests.ts b/types/gulp-json-editor/gulp-json-editor-tests.ts similarity index 100% rename from gulp-json-editor/gulp-json-editor-tests.ts rename to types/gulp-json-editor/gulp-json-editor-tests.ts diff --git a/gulp-json-editor/index.d.ts b/types/gulp-json-editor/index.d.ts similarity index 100% rename from gulp-json-editor/index.d.ts rename to types/gulp-json-editor/index.d.ts diff --git a/gulp-json-editor/tsconfig.json b/types/gulp-json-editor/tsconfig.json similarity index 100% rename from gulp-json-editor/tsconfig.json rename to types/gulp-json-editor/tsconfig.json diff --git a/gulp-jspm/gulp-jspm-tests.ts b/types/gulp-jspm/gulp-jspm-tests.ts similarity index 100% rename from gulp-jspm/gulp-jspm-tests.ts rename to types/gulp-jspm/gulp-jspm-tests.ts diff --git a/gulp-jspm/index.d.ts b/types/gulp-jspm/index.d.ts similarity index 100% rename from gulp-jspm/index.d.ts rename to types/gulp-jspm/index.d.ts diff --git a/gulp-jspm/tsconfig.json b/types/gulp-jspm/tsconfig.json similarity index 100% rename from gulp-jspm/tsconfig.json rename to types/gulp-jspm/tsconfig.json diff --git a/gulp-less/gulp-less-tests.ts b/types/gulp-less/gulp-less-tests.ts similarity index 100% rename from gulp-less/gulp-less-tests.ts rename to types/gulp-less/gulp-less-tests.ts diff --git a/gulp-less/index.d.ts b/types/gulp-less/index.d.ts similarity index 100% rename from gulp-less/index.d.ts rename to types/gulp-less/index.d.ts diff --git a/gulp-less/tsconfig.json b/types/gulp-less/tsconfig.json similarity index 100% rename from gulp-less/tsconfig.json rename to types/gulp-less/tsconfig.json diff --git a/gulp-load-plugins/gulp-load-plugins-tests.ts b/types/gulp-load-plugins/gulp-load-plugins-tests.ts similarity index 100% rename from gulp-load-plugins/gulp-load-plugins-tests.ts rename to types/gulp-load-plugins/gulp-load-plugins-tests.ts diff --git a/gulp-load-plugins/index.d.ts b/types/gulp-load-plugins/index.d.ts similarity index 100% rename from gulp-load-plugins/index.d.ts rename to types/gulp-load-plugins/index.d.ts diff --git a/gulp-load-plugins/tsconfig.json b/types/gulp-load-plugins/tsconfig.json similarity index 100% rename from gulp-load-plugins/tsconfig.json rename to types/gulp-load-plugins/tsconfig.json diff --git a/gulp-minify-css/gulp-minify-css-tests.ts b/types/gulp-minify-css/gulp-minify-css-tests.ts similarity index 100% rename from gulp-minify-css/gulp-minify-css-tests.ts rename to types/gulp-minify-css/gulp-minify-css-tests.ts diff --git a/gulp-minify-css/index.d.ts b/types/gulp-minify-css/index.d.ts similarity index 100% rename from gulp-minify-css/index.d.ts rename to types/gulp-minify-css/index.d.ts diff --git a/gulp-minify-css/tsconfig.json b/types/gulp-minify-css/tsconfig.json similarity index 100% rename from gulp-minify-css/tsconfig.json rename to types/gulp-minify-css/tsconfig.json diff --git a/gulp-minify-html/gulp-minify-html-tests.ts b/types/gulp-minify-html/gulp-minify-html-tests.ts similarity index 100% rename from gulp-minify-html/gulp-minify-html-tests.ts rename to types/gulp-minify-html/gulp-minify-html-tests.ts diff --git a/gulp-minify-html/index.d.ts b/types/gulp-minify-html/index.d.ts similarity index 100% rename from gulp-minify-html/index.d.ts rename to types/gulp-minify-html/index.d.ts diff --git a/gulp-minify-html/tsconfig.json b/types/gulp-minify-html/tsconfig.json similarity index 100% rename from gulp-minify-html/tsconfig.json rename to types/gulp-minify-html/tsconfig.json diff --git a/gulp-mocha/gulp-mocha-tests.ts b/types/gulp-mocha/gulp-mocha-tests.ts similarity index 100% rename from gulp-mocha/gulp-mocha-tests.ts rename to types/gulp-mocha/gulp-mocha-tests.ts diff --git a/gulp-mocha/index.d.ts b/types/gulp-mocha/index.d.ts similarity index 100% rename from gulp-mocha/index.d.ts rename to types/gulp-mocha/index.d.ts diff --git a/gulp-mocha/tsconfig.json b/types/gulp-mocha/tsconfig.json similarity index 100% rename from gulp-mocha/tsconfig.json rename to types/gulp-mocha/tsconfig.json diff --git a/gulp-newer/gulp-newer-tests.ts b/types/gulp-newer/gulp-newer-tests.ts similarity index 100% rename from gulp-newer/gulp-newer-tests.ts rename to types/gulp-newer/gulp-newer-tests.ts diff --git a/gulp-newer/index.d.ts b/types/gulp-newer/index.d.ts similarity index 100% rename from gulp-newer/index.d.ts rename to types/gulp-newer/index.d.ts diff --git a/gulp-newer/tsconfig.json b/types/gulp-newer/tsconfig.json similarity index 100% rename from gulp-newer/tsconfig.json rename to types/gulp-newer/tsconfig.json diff --git a/gulp-ng-annotate/gulp-ng-annotate-tests.ts b/types/gulp-ng-annotate/gulp-ng-annotate-tests.ts similarity index 100% rename from gulp-ng-annotate/gulp-ng-annotate-tests.ts rename to types/gulp-ng-annotate/gulp-ng-annotate-tests.ts diff --git a/gulp-ng-annotate/index.d.ts b/types/gulp-ng-annotate/index.d.ts similarity index 100% rename from gulp-ng-annotate/index.d.ts rename to types/gulp-ng-annotate/index.d.ts diff --git a/gulp-ng-annotate/tsconfig.json b/types/gulp-ng-annotate/tsconfig.json similarity index 100% rename from gulp-ng-annotate/tsconfig.json rename to types/gulp-ng-annotate/tsconfig.json diff --git a/gulp-nodemon/gulp-nodemon-tests.ts b/types/gulp-nodemon/gulp-nodemon-tests.ts similarity index 100% rename from gulp-nodemon/gulp-nodemon-tests.ts rename to types/gulp-nodemon/gulp-nodemon-tests.ts diff --git a/gulp-nodemon/index.d.ts b/types/gulp-nodemon/index.d.ts similarity index 100% rename from gulp-nodemon/index.d.ts rename to types/gulp-nodemon/index.d.ts diff --git a/gulp-nodemon/tsconfig.json b/types/gulp-nodemon/tsconfig.json similarity index 100% rename from gulp-nodemon/tsconfig.json rename to types/gulp-nodemon/tsconfig.json diff --git a/gulp-plumber/gulp-plumber-tests.ts b/types/gulp-plumber/gulp-plumber-tests.ts similarity index 100% rename from gulp-plumber/gulp-plumber-tests.ts rename to types/gulp-plumber/gulp-plumber-tests.ts diff --git a/gulp-plumber/index.d.ts b/types/gulp-plumber/index.d.ts similarity index 100% rename from gulp-plumber/index.d.ts rename to types/gulp-plumber/index.d.ts diff --git a/gulp-plumber/tsconfig.json b/types/gulp-plumber/tsconfig.json similarity index 100% rename from gulp-plumber/tsconfig.json rename to types/gulp-plumber/tsconfig.json diff --git a/gulp-protractor/gulp-protractor-tests.ts b/types/gulp-protractor/gulp-protractor-tests.ts similarity index 100% rename from gulp-protractor/gulp-protractor-tests.ts rename to types/gulp-protractor/gulp-protractor-tests.ts diff --git a/gulp-protractor/index.d.ts b/types/gulp-protractor/index.d.ts similarity index 100% rename from gulp-protractor/index.d.ts rename to types/gulp-protractor/index.d.ts diff --git a/gulp-protractor/tsconfig.json b/types/gulp-protractor/tsconfig.json similarity index 100% rename from gulp-protractor/tsconfig.json rename to types/gulp-protractor/tsconfig.json diff --git a/gulp-remember/gulp-remember-tests.ts b/types/gulp-remember/gulp-remember-tests.ts similarity index 100% rename from gulp-remember/gulp-remember-tests.ts rename to types/gulp-remember/gulp-remember-tests.ts diff --git a/gulp-remember/index.d.ts b/types/gulp-remember/index.d.ts similarity index 100% rename from gulp-remember/index.d.ts rename to types/gulp-remember/index.d.ts diff --git a/gulp-remember/tsconfig.json b/types/gulp-remember/tsconfig.json similarity index 100% rename from gulp-remember/tsconfig.json rename to types/gulp-remember/tsconfig.json diff --git a/gulp-rename/gulp-rename-tests.ts b/types/gulp-rename/gulp-rename-tests.ts similarity index 100% rename from gulp-rename/gulp-rename-tests.ts rename to types/gulp-rename/gulp-rename-tests.ts diff --git a/gulp-rename/index.d.ts b/types/gulp-rename/index.d.ts similarity index 100% rename from gulp-rename/index.d.ts rename to types/gulp-rename/index.d.ts diff --git a/gulp-rename/tsconfig.json b/types/gulp-rename/tsconfig.json similarity index 100% rename from gulp-rename/tsconfig.json rename to types/gulp-rename/tsconfig.json diff --git a/gulp-replace/gulp-replace-tests.ts b/types/gulp-replace/gulp-replace-tests.ts similarity index 100% rename from gulp-replace/gulp-replace-tests.ts rename to types/gulp-replace/gulp-replace-tests.ts diff --git a/gulp-replace/index.d.ts b/types/gulp-replace/index.d.ts similarity index 100% rename from gulp-replace/index.d.ts rename to types/gulp-replace/index.d.ts diff --git a/gulp-replace/tsconfig.json b/types/gulp-replace/tsconfig.json similarity index 100% rename from gulp-replace/tsconfig.json rename to types/gulp-replace/tsconfig.json diff --git a/gulp-rev-replace/gulp-rev-replace-tests.ts b/types/gulp-rev-replace/gulp-rev-replace-tests.ts similarity index 100% rename from gulp-rev-replace/gulp-rev-replace-tests.ts rename to types/gulp-rev-replace/gulp-rev-replace-tests.ts diff --git a/gulp-rev-replace/index.d.ts b/types/gulp-rev-replace/index.d.ts similarity index 100% rename from gulp-rev-replace/index.d.ts rename to types/gulp-rev-replace/index.d.ts diff --git a/gulp-rev-replace/tsconfig.json b/types/gulp-rev-replace/tsconfig.json similarity index 100% rename from gulp-rev-replace/tsconfig.json rename to types/gulp-rev-replace/tsconfig.json diff --git a/gulp-rev/gulp-rev-tests.ts b/types/gulp-rev/gulp-rev-tests.ts similarity index 100% rename from gulp-rev/gulp-rev-tests.ts rename to types/gulp-rev/gulp-rev-tests.ts diff --git a/gulp-rev/index.d.ts b/types/gulp-rev/index.d.ts similarity index 100% rename from gulp-rev/index.d.ts rename to types/gulp-rev/index.d.ts diff --git a/gulp-rev/tsconfig.json b/types/gulp-rev/tsconfig.json similarity index 100% rename from gulp-rev/tsconfig.json rename to types/gulp-rev/tsconfig.json diff --git a/gulp-ruby-sass/gulp-ruby-sass-tests.ts b/types/gulp-ruby-sass/gulp-ruby-sass-tests.ts similarity index 100% rename from gulp-ruby-sass/gulp-ruby-sass-tests.ts rename to types/gulp-ruby-sass/gulp-ruby-sass-tests.ts diff --git a/gulp-ruby-sass/index.d.ts b/types/gulp-ruby-sass/index.d.ts similarity index 100% rename from gulp-ruby-sass/index.d.ts rename to types/gulp-ruby-sass/index.d.ts diff --git a/gulp-ruby-sass/tsconfig.json b/types/gulp-ruby-sass/tsconfig.json similarity index 100% rename from gulp-ruby-sass/tsconfig.json rename to types/gulp-ruby-sass/tsconfig.json diff --git a/gulp-sass/gulp-sass-tests.ts b/types/gulp-sass/gulp-sass-tests.ts similarity index 100% rename from gulp-sass/gulp-sass-tests.ts rename to types/gulp-sass/gulp-sass-tests.ts diff --git a/gulp-sass/index.d.ts b/types/gulp-sass/index.d.ts similarity index 100% rename from gulp-sass/index.d.ts rename to types/gulp-sass/index.d.ts diff --git a/gulp-sass/tsconfig.json b/types/gulp-sass/tsconfig.json similarity index 100% rename from gulp-sass/tsconfig.json rename to types/gulp-sass/tsconfig.json diff --git a/gulp-shell/gulp-shell-tests.ts b/types/gulp-shell/gulp-shell-tests.ts similarity index 100% rename from gulp-shell/gulp-shell-tests.ts rename to types/gulp-shell/gulp-shell-tests.ts diff --git a/gulp-shell/index.d.ts b/types/gulp-shell/index.d.ts similarity index 100% rename from gulp-shell/index.d.ts rename to types/gulp-shell/index.d.ts diff --git a/gulp-shell/tsconfig.json b/types/gulp-shell/tsconfig.json similarity index 100% rename from gulp-shell/tsconfig.json rename to types/gulp-shell/tsconfig.json diff --git a/gulp-size/gulp-size-tests.ts b/types/gulp-size/gulp-size-tests.ts similarity index 100% rename from gulp-size/gulp-size-tests.ts rename to types/gulp-size/gulp-size-tests.ts diff --git a/gulp-size/index.d.ts b/types/gulp-size/index.d.ts similarity index 100% rename from gulp-size/index.d.ts rename to types/gulp-size/index.d.ts diff --git a/gulp-size/tsconfig.json b/types/gulp-size/tsconfig.json similarity index 100% rename from gulp-size/tsconfig.json rename to types/gulp-size/tsconfig.json diff --git a/gulp-sort/gulp-sort-tests.ts b/types/gulp-sort/gulp-sort-tests.ts similarity index 100% rename from gulp-sort/gulp-sort-tests.ts rename to types/gulp-sort/gulp-sort-tests.ts diff --git a/gulp-sort/index.d.ts b/types/gulp-sort/index.d.ts similarity index 100% rename from gulp-sort/index.d.ts rename to types/gulp-sort/index.d.ts diff --git a/gulp-sort/tsconfig.json b/types/gulp-sort/tsconfig.json similarity index 100% rename from gulp-sort/tsconfig.json rename to types/gulp-sort/tsconfig.json diff --git a/gulp-sourcemaps/gulp-sourcemaps-tests.ts b/types/gulp-sourcemaps/gulp-sourcemaps-tests.ts similarity index 100% rename from gulp-sourcemaps/gulp-sourcemaps-tests.ts rename to types/gulp-sourcemaps/gulp-sourcemaps-tests.ts diff --git a/gulp-sourcemaps/index.d.ts b/types/gulp-sourcemaps/index.d.ts similarity index 100% rename from gulp-sourcemaps/index.d.ts rename to types/gulp-sourcemaps/index.d.ts diff --git a/gulp-sourcemaps/tsconfig.json b/types/gulp-sourcemaps/tsconfig.json similarity index 100% rename from gulp-sourcemaps/tsconfig.json rename to types/gulp-sourcemaps/tsconfig.json diff --git a/gulp-strip-debug/gulp-strip-debug-tests.ts b/types/gulp-strip-debug/gulp-strip-debug-tests.ts similarity index 100% rename from gulp-strip-debug/gulp-strip-debug-tests.ts rename to types/gulp-strip-debug/gulp-strip-debug-tests.ts diff --git a/gulp-strip-debug/index.d.ts b/types/gulp-strip-debug/index.d.ts similarity index 100% rename from gulp-strip-debug/index.d.ts rename to types/gulp-strip-debug/index.d.ts diff --git a/gulp-strip-debug/tsconfig.json b/types/gulp-strip-debug/tsconfig.json similarity index 100% rename from gulp-strip-debug/tsconfig.json rename to types/gulp-strip-debug/tsconfig.json diff --git a/gulp-svg-sprite/gulp-svg-sprite-tests.ts b/types/gulp-svg-sprite/gulp-svg-sprite-tests.ts similarity index 100% rename from gulp-svg-sprite/gulp-svg-sprite-tests.ts rename to types/gulp-svg-sprite/gulp-svg-sprite-tests.ts diff --git a/gulp-svg-sprite/index.d.ts b/types/gulp-svg-sprite/index.d.ts similarity index 100% rename from gulp-svg-sprite/index.d.ts rename to types/gulp-svg-sprite/index.d.ts diff --git a/gulp-svg-sprite/tsconfig.json b/types/gulp-svg-sprite/tsconfig.json similarity index 100% rename from gulp-svg-sprite/tsconfig.json rename to types/gulp-svg-sprite/tsconfig.json diff --git a/gulp-task-listing/gulp-task-listing-tests.ts b/types/gulp-task-listing/gulp-task-listing-tests.ts similarity index 100% rename from gulp-task-listing/gulp-task-listing-tests.ts rename to types/gulp-task-listing/gulp-task-listing-tests.ts diff --git a/gulp-task-listing/index.d.ts b/types/gulp-task-listing/index.d.ts similarity index 100% rename from gulp-task-listing/index.d.ts rename to types/gulp-task-listing/index.d.ts diff --git a/gulp-task-listing/tsconfig.json b/types/gulp-task-listing/tsconfig.json similarity index 100% rename from gulp-task-listing/tsconfig.json rename to types/gulp-task-listing/tsconfig.json diff --git a/gulp-tsd/gulp-tsd-tests.ts b/types/gulp-tsd/gulp-tsd-tests.ts similarity index 100% rename from gulp-tsd/gulp-tsd-tests.ts rename to types/gulp-tsd/gulp-tsd-tests.ts diff --git a/gulp-tsd/index.d.ts b/types/gulp-tsd/index.d.ts similarity index 100% rename from gulp-tsd/index.d.ts rename to types/gulp-tsd/index.d.ts diff --git a/gulp-tsd/tsconfig.json b/types/gulp-tsd/tsconfig.json similarity index 100% rename from gulp-tsd/tsconfig.json rename to types/gulp-tsd/tsconfig.json diff --git a/gulp-tslint/gulp-tslint-tests.ts b/types/gulp-tslint/gulp-tslint-tests.ts similarity index 100% rename from gulp-tslint/gulp-tslint-tests.ts rename to types/gulp-tslint/gulp-tslint-tests.ts diff --git a/gulp-tslint/index.d.ts b/types/gulp-tslint/index.d.ts similarity index 100% rename from gulp-tslint/index.d.ts rename to types/gulp-tslint/index.d.ts diff --git a/gulp-tslint/tsconfig.json b/types/gulp-tslint/tsconfig.json similarity index 100% rename from gulp-tslint/tsconfig.json rename to types/gulp-tslint/tsconfig.json diff --git a/gulp-typedoc/gulp-typedoc-tests.ts b/types/gulp-typedoc/gulp-typedoc-tests.ts similarity index 100% rename from gulp-typedoc/gulp-typedoc-tests.ts rename to types/gulp-typedoc/gulp-typedoc-tests.ts diff --git a/gulp-typedoc/index.d.ts b/types/gulp-typedoc/index.d.ts similarity index 100% rename from gulp-typedoc/index.d.ts rename to types/gulp-typedoc/index.d.ts diff --git a/gulp-typedoc/tsconfig.json b/types/gulp-typedoc/tsconfig.json similarity index 100% rename from gulp-typedoc/tsconfig.json rename to types/gulp-typedoc/tsconfig.json diff --git a/gulp-typescript/gulp-typescript-tests.ts b/types/gulp-typescript/gulp-typescript-tests.ts similarity index 100% rename from gulp-typescript/gulp-typescript-tests.ts rename to types/gulp-typescript/gulp-typescript-tests.ts diff --git a/gulp-typescript/index.d.ts b/types/gulp-typescript/index.d.ts similarity index 100% rename from gulp-typescript/index.d.ts rename to types/gulp-typescript/index.d.ts diff --git a/gulp-typescript/tsconfig.json b/types/gulp-typescript/tsconfig.json similarity index 100% rename from gulp-typescript/tsconfig.json rename to types/gulp-typescript/tsconfig.json diff --git a/gulp-uglify/gulp-uglify-tests.ts b/types/gulp-uglify/gulp-uglify-tests.ts similarity index 100% rename from gulp-uglify/gulp-uglify-tests.ts rename to types/gulp-uglify/gulp-uglify-tests.ts diff --git a/gulp-uglify/index.d.ts b/types/gulp-uglify/index.d.ts similarity index 100% rename from gulp-uglify/index.d.ts rename to types/gulp-uglify/index.d.ts diff --git a/gulp-uglify/tsconfig.json b/types/gulp-uglify/tsconfig.json similarity index 100% rename from gulp-uglify/tsconfig.json rename to types/gulp-uglify/tsconfig.json diff --git a/gulp-useref/gulp-useref-tests.ts b/types/gulp-useref/gulp-useref-tests.ts similarity index 100% rename from gulp-useref/gulp-useref-tests.ts rename to types/gulp-useref/gulp-useref-tests.ts diff --git a/gulp-useref/index.d.ts b/types/gulp-useref/index.d.ts similarity index 100% rename from gulp-useref/index.d.ts rename to types/gulp-useref/index.d.ts diff --git a/gulp-useref/tsconfig.json b/types/gulp-useref/tsconfig.json similarity index 100% rename from gulp-useref/tsconfig.json rename to types/gulp-useref/tsconfig.json diff --git a/gulp-util/gulp-util-tests.ts b/types/gulp-util/gulp-util-tests.ts similarity index 100% rename from gulp-util/gulp-util-tests.ts rename to types/gulp-util/gulp-util-tests.ts diff --git a/gulp-util/index.d.ts b/types/gulp-util/index.d.ts similarity index 100% rename from gulp-util/index.d.ts rename to types/gulp-util/index.d.ts diff --git a/gulp-util/tsconfig.json b/types/gulp-util/tsconfig.json similarity index 100% rename from gulp-util/tsconfig.json rename to types/gulp-util/tsconfig.json diff --git a/gulp-watch/gulp-watch-tests.ts b/types/gulp-watch/gulp-watch-tests.ts similarity index 100% rename from gulp-watch/gulp-watch-tests.ts rename to types/gulp-watch/gulp-watch-tests.ts diff --git a/gulp-watch/index.d.ts b/types/gulp-watch/index.d.ts similarity index 100% rename from gulp-watch/index.d.ts rename to types/gulp-watch/index.d.ts diff --git a/gulp-watch/tsconfig.json b/types/gulp-watch/tsconfig.json similarity index 100% rename from gulp-watch/tsconfig.json rename to types/gulp-watch/tsconfig.json diff --git a/gulp/gulp-tests.ts b/types/gulp/gulp-tests.ts similarity index 100% rename from gulp/gulp-tests.ts rename to types/gulp/gulp-tests.ts diff --git a/gulp/index.d.ts b/types/gulp/index.d.ts similarity index 100% rename from gulp/index.d.ts rename to types/gulp/index.d.ts diff --git a/gulp/tsconfig.json b/types/gulp/tsconfig.json similarity index 100% rename from gulp/tsconfig.json rename to types/gulp/tsconfig.json diff --git a/halfred/halfred-tests.ts b/types/halfred/halfred-tests.ts similarity index 100% rename from halfred/halfred-tests.ts rename to types/halfred/halfred-tests.ts diff --git a/halfred/index.d.ts b/types/halfred/index.d.ts similarity index 100% rename from halfred/index.d.ts rename to types/halfred/index.d.ts diff --git a/halfred/tsconfig.json b/types/halfred/tsconfig.json similarity index 100% rename from halfred/tsconfig.json rename to types/halfred/tsconfig.json diff --git a/halogen/index.d.ts b/types/halogen/index.d.ts similarity index 100% rename from halogen/index.d.ts rename to types/halogen/index.d.ts diff --git a/halogen/test/clip-loader.tsx b/types/halogen/test/clip-loader.tsx similarity index 100% rename from halogen/test/clip-loader.tsx rename to types/halogen/test/clip-loader.tsx diff --git a/halogen/test/fade-loader.tsx b/types/halogen/test/fade-loader.tsx similarity index 100% rename from halogen/test/fade-loader.tsx rename to types/halogen/test/fade-loader.tsx diff --git a/halogen/test/pacman-loader.tsx b/types/halogen/test/pacman-loader.tsx similarity index 100% rename from halogen/test/pacman-loader.tsx rename to types/halogen/test/pacman-loader.tsx diff --git a/halogen/test/rotate-loader.tsx b/types/halogen/test/rotate-loader.tsx similarity index 100% rename from halogen/test/rotate-loader.tsx rename to types/halogen/test/rotate-loader.tsx diff --git a/halogen/tsconfig.json b/types/halogen/tsconfig.json similarity index 100% rename from halogen/tsconfig.json rename to types/halogen/tsconfig.json diff --git a/gulp-batch/tslint.json b/types/halogen/tslint.json similarity index 100% rename from gulp-batch/tslint.json rename to types/halogen/tslint.json diff --git a/hammerjs/hammerjs-tests.ts b/types/hammerjs/hammerjs-tests.ts similarity index 100% rename from hammerjs/hammerjs-tests.ts rename to types/hammerjs/hammerjs-tests.ts diff --git a/hammerjs/index.d.ts b/types/hammerjs/index.d.ts similarity index 100% rename from hammerjs/index.d.ts rename to types/hammerjs/index.d.ts diff --git a/hammerjs/tsconfig.json b/types/hammerjs/tsconfig.json similarity index 100% rename from hammerjs/tsconfig.json rename to types/hammerjs/tsconfig.json diff --git a/hammerjs/v1/hammerjs-tests.ts b/types/hammerjs/v1/hammerjs-tests.ts similarity index 100% rename from hammerjs/v1/hammerjs-tests.ts rename to types/hammerjs/v1/hammerjs-tests.ts diff --git a/hammerjs/v1/index.d.ts b/types/hammerjs/v1/index.d.ts similarity index 100% rename from hammerjs/v1/index.d.ts rename to types/hammerjs/v1/index.d.ts diff --git a/hammerjs/v1/tsconfig.json b/types/hammerjs/v1/tsconfig.json similarity index 100% rename from hammerjs/v1/tsconfig.json rename to types/hammerjs/v1/tsconfig.json diff --git a/handlebars/handlebars-tests.ts b/types/handlebars/handlebars-tests.ts similarity index 100% rename from handlebars/handlebars-tests.ts rename to types/handlebars/handlebars-tests.ts diff --git a/handlebars/index.d.ts b/types/handlebars/index.d.ts similarity index 100% rename from handlebars/index.d.ts rename to types/handlebars/index.d.ts diff --git a/handlebars/tsconfig.json b/types/handlebars/tsconfig.json similarity index 100% rename from handlebars/tsconfig.json rename to types/handlebars/tsconfig.json diff --git a/handlebars/v1/index.d.ts b/types/handlebars/v1/index.d.ts similarity index 100% rename from handlebars/v1/index.d.ts rename to types/handlebars/v1/index.d.ts diff --git a/handlebars/v1/tsconfig.json b/types/handlebars/v1/tsconfig.json similarity index 100% rename from handlebars/v1/tsconfig.json rename to types/handlebars/v1/tsconfig.json diff --git a/handsontable/handsontable-tests.ts b/types/handsontable/handsontable-tests.ts similarity index 98% rename from handsontable/handsontable-tests.ts rename to types/handsontable/handsontable-tests.ts index f744c10483..8ff99cc0b7 100644 --- a/handsontable/handsontable-tests.ts +++ b/types/handsontable/handsontable-tests.ts @@ -1,8 +1,6 @@ - - function test_HandsontableInit() { - var elem = document.createElement('div'); - var hot = new Handsontable(elem, { + const elem = document.createElement('div'); + const hot = new Handsontable(elem, { allowEmpty: true, allowInsertColumn: true, allowInsertRow: true, @@ -206,8 +204,8 @@ function test_HandsontableInit() { } function test_HandsontableMethods() { - var elem = document.createElement('div'); - var hot = new Handsontable(elem, {}); + const elem = document.createElement('div'); + const hot = new Handsontable(elem, {}); hot.addHook('foo', []); hot.addHookOnce('foo', []); hot.alter('foo', 123, 123, 'foo', true); @@ -298,4 +296,4 @@ class MyCustomHotPlugin extends Handsontable.plugins.BasePlugin { isEnabled(): boolean { return !!this.hot.getSettings().manualRowMove; } -} \ No newline at end of file +} diff --git a/handsontable/index.d.ts b/types/handsontable/index.d.ts similarity index 99% rename from handsontable/index.d.ts rename to types/handsontable/index.d.ts index e569ee58f7..ed2f0db27f 100644 --- a/handsontable/index.d.ts +++ b/types/handsontable/index.d.ts @@ -311,7 +311,6 @@ declare namespace ht { editor?: string | EditorConstructor; selectOptions?: any[]; width?: number; - } interface CellProperties { @@ -506,7 +505,7 @@ declare var Handsontable: { }; declare module "handsontable" { - export var Handsontable: { + const Handsontable: { new (element: Element, options: ht.Options): ht.Methods; plugins: ht.Plugins; hooks: ht.Hooks; diff --git a/handsontable/tsconfig.json b/types/handsontable/tsconfig.json similarity index 100% rename from handsontable/tsconfig.json rename to types/handsontable/tsconfig.json diff --git a/handsontable/tslint.json b/types/handsontable/tslint.json similarity index 100% rename from handsontable/tslint.json rename to types/handsontable/tslint.json diff --git a/hapi-auth-jwt2/hapi-auth-jwt2-tests.ts b/types/hapi-auth-jwt2/hapi-auth-jwt2-tests.ts similarity index 100% rename from hapi-auth-jwt2/hapi-auth-jwt2-tests.ts rename to types/hapi-auth-jwt2/hapi-auth-jwt2-tests.ts diff --git a/hapi-auth-jwt2/index.d.ts b/types/hapi-auth-jwt2/index.d.ts similarity index 100% rename from hapi-auth-jwt2/index.d.ts rename to types/hapi-auth-jwt2/index.d.ts diff --git a/hapi-auth-jwt2/tsconfig.json b/types/hapi-auth-jwt2/tsconfig.json similarity index 100% rename from hapi-auth-jwt2/tsconfig.json rename to types/hapi-auth-jwt2/tsconfig.json diff --git a/halogen/tslint.json b/types/hapi-auth-jwt2/tslint.json similarity index 100% rename from halogen/tslint.json rename to types/hapi-auth-jwt2/tslint.json diff --git a/hapi-decorators/hapi-decorators-tests.ts b/types/hapi-decorators/hapi-decorators-tests.ts similarity index 100% rename from hapi-decorators/hapi-decorators-tests.ts rename to types/hapi-decorators/hapi-decorators-tests.ts diff --git a/hapi-decorators/index.d.ts b/types/hapi-decorators/index.d.ts similarity index 100% rename from hapi-decorators/index.d.ts rename to types/hapi-decorators/index.d.ts diff --git a/hapi-decorators/tsconfig.json b/types/hapi-decorators/tsconfig.json similarity index 100% rename from hapi-decorators/tsconfig.json rename to types/hapi-decorators/tsconfig.json diff --git a/hapi/hapi-tests.ts b/types/hapi/hapi-tests.ts similarity index 100% rename from hapi/hapi-tests.ts rename to types/hapi/hapi-tests.ts diff --git a/hapi/index.d.ts b/types/hapi/index.d.ts similarity index 100% rename from hapi/index.d.ts rename to types/hapi/index.d.ts diff --git a/hapi/tsconfig.json b/types/hapi/tsconfig.json similarity index 100% rename from hapi/tsconfig.json rename to types/hapi/tsconfig.json diff --git a/hapi/v8/hapi-tests.ts b/types/hapi/v8/hapi-tests.ts similarity index 100% rename from hapi/v8/hapi-tests.ts rename to types/hapi/v8/hapi-tests.ts diff --git a/hapi/v8/index.d.ts b/types/hapi/v8/index.d.ts similarity index 100% rename from hapi/v8/index.d.ts rename to types/hapi/v8/index.d.ts diff --git a/hapi/v8/tsconfig.json b/types/hapi/v8/tsconfig.json similarity index 100% rename from hapi/v8/tsconfig.json rename to types/hapi/v8/tsconfig.json diff --git a/har-format/har-format-tests.ts b/types/har-format/har-format-tests.ts similarity index 100% rename from har-format/har-format-tests.ts rename to types/har-format/har-format-tests.ts diff --git a/har-format/index.d.ts b/types/har-format/index.d.ts similarity index 100% rename from har-format/index.d.ts rename to types/har-format/index.d.ts diff --git a/har-format/tsconfig.json b/types/har-format/tsconfig.json similarity index 100% rename from har-format/tsconfig.json rename to types/har-format/tsconfig.json diff --git a/hapi-auth-jwt2/tslint.json b/types/har-format/tslint.json similarity index 100% rename from hapi-auth-jwt2/tslint.json rename to types/har-format/tslint.json diff --git a/harmony-proxy/harmony-proxy-tests.ts b/types/harmony-proxy/harmony-proxy-tests.ts similarity index 100% rename from harmony-proxy/harmony-proxy-tests.ts rename to types/harmony-proxy/harmony-proxy-tests.ts diff --git a/harmony-proxy/index.d.ts b/types/harmony-proxy/index.d.ts similarity index 100% rename from harmony-proxy/index.d.ts rename to types/harmony-proxy/index.d.ts diff --git a/harmony-proxy/tsconfig.json b/types/harmony-proxy/tsconfig.json similarity index 100% rename from harmony-proxy/tsconfig.json rename to types/harmony-proxy/tsconfig.json diff --git a/hasher/hasher-tests.ts b/types/hasher/hasher-tests.ts similarity index 100% rename from hasher/hasher-tests.ts rename to types/hasher/hasher-tests.ts diff --git a/hasher/index.d.ts b/types/hasher/index.d.ts similarity index 100% rename from hasher/index.d.ts rename to types/hasher/index.d.ts diff --git a/hasher/tsconfig.json b/types/hasher/tsconfig.json similarity index 100% rename from hasher/tsconfig.json rename to types/hasher/tsconfig.json diff --git a/hashids/hashids-tests.ts b/types/hashids/hashids-tests.ts similarity index 100% rename from hashids/hashids-tests.ts rename to types/hashids/hashids-tests.ts diff --git a/hashids/index.d.ts b/types/hashids/index.d.ts similarity index 100% rename from hashids/index.d.ts rename to types/hashids/index.d.ts diff --git a/hashids/tsconfig.json b/types/hashids/tsconfig.json similarity index 100% rename from hashids/tsconfig.json rename to types/hashids/tsconfig.json diff --git a/hashmap/hashmap-tests.ts b/types/hashmap/hashmap-tests.ts similarity index 100% rename from hashmap/hashmap-tests.ts rename to types/hashmap/hashmap-tests.ts diff --git a/hashmap/index.d.ts b/types/hashmap/index.d.ts similarity index 100% rename from hashmap/index.d.ts rename to types/hashmap/index.d.ts diff --git a/hashmap/tsconfig.json b/types/hashmap/tsconfig.json similarity index 100% rename from hashmap/tsconfig.json rename to types/hashmap/tsconfig.json diff --git a/hashmap/v1/hashmap-tests.ts b/types/hashmap/v1/hashmap-tests.ts similarity index 100% rename from hashmap/v1/hashmap-tests.ts rename to types/hashmap/v1/hashmap-tests.ts diff --git a/hashmap/v1/index.d.ts b/types/hashmap/v1/index.d.ts similarity index 100% rename from hashmap/v1/index.d.ts rename to types/hashmap/v1/index.d.ts diff --git a/hashmap/v1/tsconfig.json b/types/hashmap/v1/tsconfig.json similarity index 100% rename from hashmap/v1/tsconfig.json rename to types/hashmap/v1/tsconfig.json diff --git a/hashset/hashset-tests.ts b/types/hashset/hashset-tests.ts similarity index 100% rename from hashset/hashset-tests.ts rename to types/hashset/hashset-tests.ts diff --git a/hashset/index.d.ts b/types/hashset/index.d.ts similarity index 100% rename from hashset/index.d.ts rename to types/hashset/index.d.ts diff --git a/hashset/tsconfig.json b/types/hashset/tsconfig.json similarity index 100% rename from hashset/tsconfig.json rename to types/hashset/tsconfig.json diff --git a/hashtable/hashtable-tests.ts b/types/hashtable/hashtable-tests.ts similarity index 100% rename from hashtable/hashtable-tests.ts rename to types/hashtable/hashtable-tests.ts diff --git a/hashtable/index.d.ts b/types/hashtable/index.d.ts similarity index 100% rename from hashtable/index.d.ts rename to types/hashtable/index.d.ts diff --git a/hashtable/tsconfig.json b/types/hashtable/tsconfig.json similarity index 100% rename from hashtable/tsconfig.json rename to types/hashtable/tsconfig.json diff --git a/he/he-tests.ts b/types/he/he-tests.ts similarity index 100% rename from he/he-tests.ts rename to types/he/he-tests.ts diff --git a/he/index.d.ts b/types/he/index.d.ts similarity index 100% rename from he/index.d.ts rename to types/he/index.d.ts diff --git a/he/tsconfig.json b/types/he/tsconfig.json similarity index 100% rename from he/tsconfig.json rename to types/he/tsconfig.json diff --git a/headroom/headroom-tests.ts b/types/headroom/headroom-tests.ts similarity index 100% rename from headroom/headroom-tests.ts rename to types/headroom/headroom-tests.ts diff --git a/headroom/index.d.ts b/types/headroom/index.d.ts similarity index 100% rename from headroom/index.d.ts rename to types/headroom/index.d.ts diff --git a/headroom/tsconfig.json b/types/headroom/tsconfig.json similarity index 100% rename from headroom/tsconfig.json rename to types/headroom/tsconfig.json diff --git a/heap/heap-tests.ts b/types/heap/heap-tests.ts similarity index 100% rename from heap/heap-tests.ts rename to types/heap/heap-tests.ts diff --git a/heap/index.d.ts b/types/heap/index.d.ts similarity index 100% rename from heap/index.d.ts rename to types/heap/index.d.ts diff --git a/heap/tsconfig.json b/types/heap/tsconfig.json similarity index 100% rename from heap/tsconfig.json rename to types/heap/tsconfig.json diff --git a/heatmap.js/heatmap.js-tests.ts b/types/heatmap.js/heatmap.js-tests.ts similarity index 100% rename from heatmap.js/heatmap.js-tests.ts rename to types/heatmap.js/heatmap.js-tests.ts diff --git a/heatmap.js/index.d.ts b/types/heatmap.js/index.d.ts similarity index 100% rename from heatmap.js/index.d.ts rename to types/heatmap.js/index.d.ts diff --git a/heatmap.js/package.json b/types/heatmap.js/package.json similarity index 100% rename from heatmap.js/package.json rename to types/heatmap.js/package.json diff --git a/heatmap.js/tsconfig.json b/types/heatmap.js/tsconfig.json similarity index 100% rename from heatmap.js/tsconfig.json rename to types/heatmap.js/tsconfig.json diff --git a/hellojs/hellojs-tests.ts b/types/hellojs/hellojs-tests.ts similarity index 100% rename from hellojs/hellojs-tests.ts rename to types/hellojs/hellojs-tests.ts diff --git a/hellojs/index.d.ts b/types/hellojs/index.d.ts similarity index 100% rename from hellojs/index.d.ts rename to types/hellojs/index.d.ts diff --git a/hellojs/tsconfig.json b/types/hellojs/tsconfig.json similarity index 100% rename from hellojs/tsconfig.json rename to types/hellojs/tsconfig.json diff --git a/hellosign-embedded/hellosign-embedded-tests.ts b/types/hellosign-embedded/hellosign-embedded-tests.ts similarity index 95% rename from hellosign-embedded/hellosign-embedded-tests.ts rename to types/hellosign-embedded/hellosign-embedded-tests.ts index 281bbef2ab..4ff618e812 100644 --- a/hellosign-embedded/hellosign-embedded-tests.ts +++ b/types/hellosign-embedded/hellosign-embedded-tests.ts @@ -1,3 +1,5 @@ +import { HelloSign } from 'hellosign-embedded'; + HelloSign.init('abc123'); // some options diff --git a/hellosign-embedded/index.d.ts b/types/hellosign-embedded/index.d.ts similarity index 99% rename from hellosign-embedded/index.d.ts rename to types/hellosign-embedded/index.d.ts index ec77a92b92..e7a94beaf0 100644 --- a/hellosign-embedded/index.d.ts +++ b/types/hellosign-embedded/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/HelloFax/hellosign-embedded // Definitions by: Brian Surowiec // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare module HelloSign { +export declare module HelloSign { interface SignedMessageEvent { event: 'signature_request_signed'; signature_id: string; @@ -268,3 +268,5 @@ declare module HelloSign { } declare var HelloSign: HelloSign.HelloSignStatic; + +export as namespace HelloSign; diff --git a/hellosign-embedded/tsconfig.json b/types/hellosign-embedded/tsconfig.json similarity index 100% rename from hellosign-embedded/tsconfig.json rename to types/hellosign-embedded/tsconfig.json diff --git a/helmet/helmet-tests.ts b/types/helmet/helmet-tests.ts similarity index 100% rename from helmet/helmet-tests.ts rename to types/helmet/helmet-tests.ts diff --git a/helmet/index.d.ts b/types/helmet/index.d.ts similarity index 100% rename from helmet/index.d.ts rename to types/helmet/index.d.ts diff --git a/helmet/tsconfig.json b/types/helmet/tsconfig.json similarity index 100% rename from helmet/tsconfig.json rename to types/helmet/tsconfig.json diff --git a/heremaps/heremaps-tests.ts b/types/heremaps/heremaps-tests.ts similarity index 100% rename from heremaps/heremaps-tests.ts rename to types/heremaps/heremaps-tests.ts diff --git a/heremaps/index.d.ts b/types/heremaps/index.d.ts similarity index 100% rename from heremaps/index.d.ts rename to types/heremaps/index.d.ts diff --git a/heremaps/tsconfig.json b/types/heremaps/tsconfig.json similarity index 100% rename from heremaps/tsconfig.json rename to types/heremaps/tsconfig.json diff --git a/highcharts-ng/highcharts-ng-tests.ts b/types/highcharts-ng/highcharts-ng-tests.ts similarity index 100% rename from highcharts-ng/highcharts-ng-tests.ts rename to types/highcharts-ng/highcharts-ng-tests.ts diff --git a/highcharts-ng/index.d.ts b/types/highcharts-ng/index.d.ts similarity index 100% rename from highcharts-ng/index.d.ts rename to types/highcharts-ng/index.d.ts diff --git a/highcharts-ng/tsconfig.json b/types/highcharts-ng/tsconfig.json similarity index 100% rename from highcharts-ng/tsconfig.json rename to types/highcharts-ng/tsconfig.json diff --git a/highcharts/highcharts-more.d.ts b/types/highcharts/highcharts-more.d.ts similarity index 100% rename from highcharts/highcharts-more.d.ts rename to types/highcharts/highcharts-more.d.ts diff --git a/highcharts/highstock.d.ts b/types/highcharts/highstock.d.ts similarity index 94% rename from highcharts/highstock.d.ts rename to types/highcharts/highstock.d.ts index bd7f0bffd4..35c1179ff1 100644 --- a/highcharts/highstock.d.ts +++ b/types/highcharts/highstock.d.ts @@ -30,10 +30,10 @@ declare namespace Highstock { } interface RangeSelectorButton { - type: string; //Defines the timespan, can be one of 'millisecond', 'second', 'minute', 'day', 'week', 'month', 'ytd' (year to date), 'year' and 'all'. + type: string; // Defines the timespan, can be one of 'millisecond', 'second', 'minute', 'day', 'week', 'month', 'ytd' (year to date), 'year' and 'all'. count?: number; text: string; - dataGrouping?: any; //not sure how this works + dataGrouping?: any; // not sure how this works } interface RangeSelectorOptions { @@ -97,7 +97,6 @@ declare namespace Highstock { } } - declare global { interface JQuery { highcharts(type: "StockChart"): Highstock.ChartObject; @@ -117,7 +116,6 @@ declare global { **/ highcharts(type: "StockChart", options: Highstock.Options, callback: (chart: Highstock.ChartObject) => void): JQuery; - highcharts(type: string): Highcharts.ChartObject; highcharts(type: string, options: Highcharts.Options): JQuery; highcharts(type: string, options: Highcharts.Options, callback: (chart: Highcharts.ChartObject) => void): JQuery; @@ -126,4 +124,4 @@ declare global { declare var Highstock: Highstock.Static; export = Highstock; -export as namespace Highstock; \ No newline at end of file +export as namespace Highstock; diff --git a/highcharts/index.d.ts b/types/highcharts/index.d.ts similarity index 97% rename from highcharts/index.d.ts rename to types/highcharts/index.d.ts index 968b5975fb..9fe60ef542 100644 --- a/highcharts/index.d.ts +++ b/types/highcharts/index.d.ts @@ -530,7 +530,9 @@ declare namespace Highcharts { */ gridLineColor?: string; /** - * The dash or dot style of the grid lines. For possible values, see {@http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/plotoptions/series-dashstyle-all/|this demonstration}. Defaults to Solid. + * The dash or dot style of the grid lines. For possible values, + * see {@http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/plotoptions/series-dashstyle-all/|this demonstration}. + * Defaults to Solid. * @since 1.2 */ gridLineDashStyle?: string; @@ -627,7 +629,8 @@ declare namespace Highcharts { */ minorGridLineColor?: string; /** - * The dash or dot style of the minor grid lines. For possible values, see {@link http://jsfiddle.net/gh/get/jquery/1.7.1/highslide-software/highcharts.com/tree/master/samples/highcharts/plotoptions/series-dashstyle-all/|this demonstration}. + * The dash or dot style of the minor grid lines. For possible values, + * see {@link http://jsfiddle.net/gh/get/jquery/1.7.1/highslide-software/highcharts.com/tree/master/samples/highcharts/plotoptions/series-dashstyle-all/|this demonstration}. * @default 'Solid' */ minorGridLineDashStyle?: string; @@ -3326,7 +3329,6 @@ declare namespace Highcharts { * The default action is to toggle the visibility of the point. This can be prevented by calling event.preventDefault(). */ legendItemClick?: (event: Event) => boolean | void; - } interface Halo { @@ -5315,7 +5317,7 @@ declare namespace Highcharts { interface CrosshairObject { color?: string | Gradient; width?: number; - dashStyle?: string; //Solid ShortDash ShortDot ShortDashDot ShortDashDotDot Dot Dash LongDash DashDot LongDashDot LongDashDotDot + dashStyle?: string; // Solid ShortDash ShortDot ShortDashDot ShortDashDotDot Dot Dash LongDash DashDot LongDashDot LongDashDotDot zIndex?: number; } @@ -5738,7 +5740,8 @@ declare namespace Highcharts { * @param {number} min The new minimum value * @param {number} max The new maximum value * @param {boolean} redraw Whether to redraw the chart or wait for an explicit call to chart.redraw(). - * @param {boolean | Animation} animation When true, the resize will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param {boolean | Animation} animation When true, the resize will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ setExtremes(min?: number, max?: number, redraw?: boolean, animation?: boolean | Animation, eventArguments?: any): void; @@ -5788,7 +5791,8 @@ declare namespace Highcharts { * @param {AxisOptions} options The Axis options, as documented under xAxis and yAxis. * @param [boolean] isX Whether it is an X axis or Y axis * @param [boolean] redraw Defaults to true. Whether to redraw the chart after the series is added. See the redraw() method. - * @param [boolean | Animation] animation Defaults to true. When true, the series' updating will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param [boolean | Animation] animation Defaults to true. When true, the series' updating will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. * @return {AxisObject} * @since 3.0 */ @@ -5836,14 +5840,20 @@ declare namespace Highcharts { /** * Exporting module required. Submit an SVG version of the chart to a server along with some parameters for * conversion. - * @param {ExportingOptions} options Exporting options. Out of the exporting options, the following options can be given as parameters to the exportChart method. All options default to the values given in the exporting config options. filename: the filename for the export without extension, url: the URL for the server module to do the conversion, width: the width of the PNG or JPEG image generated on the server, type: the MIME type of the converted image, sourceWidth: the width of the source (in-page) chart, sourceHeight: the height of the source chart. + * @param {ExportingOptions} options Exporting options. Out of the exporting options, the following options can be given as parameters to the exportChart method. + * All options default to the values given in the exporting config options. filename: the filename for the export without extension, + * url: the URL for the server module to do the conversion, width: the width of the PNG or JPEG image generated on the server, + * type: the MIME type of the converted image, sourceWidth: the width of the source (in-page) chart, sourceHeight: the height of the source chart. * @since 2.0 */ exportChart(options: ExportingOptions): void; /** * Exporting module required. Submit an SVG version of the chart to a server along with some parameters for * conversion. - * @param {ExportingOptions} options Exporting options. Out of the exporting options, the following options can be given as parameters to the exportChart method. All options default to the values given in the exporting config options. filename: the filename for the export without extension, url: the URL for the server module to do the conversion, width: the width of the PNG or JPEG image generated on the server, type: the MIME type of the converted image, sourceWidth: the width of the source (in-page) chart, sourceHeight: the height of the source chart. + * @param {ExportingOptions} options Exporting options. Out of the exporting options, the following options can be given as parameters to the exportChart method. + * All options default to the values given in the exporting config options. filename: the filename for the export without extension, + * url: the URL for the server module to do the conversion, width: the width of the PNG or JPEG image generated on the server, + * type: the MIME type of the converted image, sourceWidth: the width of the source (in-page) chart, sourceHeight: the height of the source chart. * @param {Options} chartOptions Additional chart options for the exported chart. For example a different background color can be added here. * @since 2.0 */ @@ -5881,7 +5891,8 @@ declare namespace Highcharts { get(id: string): AxisObject | SeriesObject | PointObject; /** * Exporting module required. Get an SVG string representing the chart. - * @param {Options} additionalOptions Chart options to add to the exported chart in addition to the options given for the original chart. For example if series.lineWidth should be greater in the exported chart than in the original, or the chart should have a different background color, this is added here. + * @param {Options} additionalOptions Chart options to add to the exported chart in addition to the options given for the original chart. + * For example if series.lineWidth should be greater in the exported chart than in the original, or the chart should have a different background color, this is added here. * @return {string} * @since 2.0 */ @@ -5922,7 +5933,8 @@ declare namespace Highcharts { * more than one operation on the chart before redrawing, for example add a number of points. In those cases it is a * waste of resources to redraw the chart for each new point added. So you add the points and call chart.redraw() * after. - * @param [boolean | Animation] animation Defaults to true. When true, the update will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param [boolean | Animation] animation Defaults to true. When true, the update will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ redraw(animation?: boolean | Animation): void; @@ -5942,7 +5954,8 @@ declare namespace Highcharts { * Resize the chart to a given width and height. * @param {number} width The new pixel width of the chart. * @param {number} height The new pixel height of the chart. - * @param {boolean | Animation} animation Defaults to true. When true, the resize will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param {boolean | Animation} animation Defaults to true. When true, the resize will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. */ setSize(width: number, height: number, animation?: boolean | Animation): void; /** @@ -6004,7 +6017,10 @@ declare namespace Highcharts { /** * This is the constructor for creating a new chart object. * @param {Options} options The chart options - * @param callback A function to execute when the chart object is finished loading and rendering. In most cases the chart is built in one thread, but in Internet Explorer version 8 or less the chart is sometimes initiated before the document is ready, and in these cases the chart object will not be finished directly after callingnew Highcharts.Chart(). As a consequence, code that relies on the newly built Chart object should always run in the callback. Defining a chart.event.load handler is equivalent. + * @param callback A function to execute when the chart object is finished loading and rendering. In most cases the chart is built in one thread, + * but in Internet Explorer version 8 or less the chart is sometimes initiated before the document is ready, + * and in these cases the chart object will not be finished directly after callingnew Highcharts.Chart(). + * s a consequence, code that relies on the newly built Chart object should always run in the callback. Defining a chart.event.load handler is equivalent. * @return {ChartObject} */ new (options: Options, callback: (chart: ChartObject) => void): ChartObject; @@ -6019,7 +6035,10 @@ declare namespace Highcharts { * This is the constructor for creating a new chart object. * @param {string|HTMLElement} renderTo The id or a reference to a DOM element where the chart should be rendered (since v4.2.0). * @param {Options} options The chart options - * @param callback A function to execute when the chart object is finished loading and rendering. In most cases the chart is built in one thread, but in Internet Explorer version 8 or less the chart is sometimes initiated before the document is ready, and in these cases the chart object will not be finished directly after callingnew Highcharts.Chart(). As a consequence, code that relies on the newly built Chart object should always run in the callback. Defining a chart.event.load handler is equivalent. + * @param callback A function to execute when the chart object is finished loading and rendering. In most cases the chart is built in one thread, + * but in Internet Explorer version 8 or less the chart is sometimes initiated before the document is ready, + * and in these cases the chart object will not be finished directly after callingnew Highcharts.Chart(). + * As a consequence, code that relies on the newly built Chart object should always run in the callback. Defining a chart.event.load handler is equivalent. * @return {ChartObject} */ new (renderTo: string | HTMLElement, options: Options, callback: (chart: ChartObject) => void): ChartObject; @@ -6042,7 +6061,8 @@ declare namespace Highcharts { * Apply numeric attributes to the SVG/VML element by animation. See Element.attr() for more information on setting * attributes. * @param {any} attributes A set of attributes to apply. - * @param {any} animation Optional animation parameters that are passed over to jQuery or other framework. Valid properties depend on the library, but options like duration, easing and complete are supported by jQuery. + * @param {any} animation Optional animation parameters that are passed over to jQuery or other framework. + * Valid properties depend on the library, but options like duration, easing and complete are supported by jQuery. * @return {ElementObject} * @since 2.0 */ @@ -6131,7 +6151,8 @@ declare namespace Highcharts { circle(centerX: number, centerY: number, radius: number): ElementObject; /** * Add an SVG/VML group. - * @param [string] name The name of the group. This will be used in the class name, which will be 'highcharts-'+ name. Other Element objects are added to the group by using the group as the first parameter in .add() for the wrappers + * @param [string] name The name of the group. This will be used in the class name, which will be 'highcharts-'+ name. + * Other Element objects are added to the group by using the group as the first parameter in .add() for the wrappers * @return {ElementObject} * @since 2.0 */ @@ -6159,7 +6180,8 @@ declare namespace Highcharts { * @param [number] anchorX If the shape has a pointer, like the chevron on a callout shape, anchorX is the x position to point to. * @param [number] anchorY If the shape has a pointer, like the chevron on a callout shape, anchorY is the y position to point to. * @param [boolean] useHTML Use HTML to render the text of the label. - * @param [boolean] baseline Whether the label should be vertically aligned by the text baseline, which makes it behave like the text element, or by the top left side, which makes it behave like a HTML div. + * @param [boolean] baseline Whether the label should be vertically aligned by the text baseline, which makes it behave like the text element, + * or by the top left side, which makes it behave like a HTML div. * @param [string] className A class name for the g element surrounding the label. * @return {ElementObject} * @since 2.0 @@ -6286,15 +6308,18 @@ declare namespace Highcharts { percentage: number; /** * Remove the point from the series. - * @param [boolean] redraw Defaults to true. Whether to redraw the chart after the point is removed.If doing more operations on the chart, it is a good idea to set redraw to false and call chart.redraw() after. - * @param [boolean|Animation] animation Defaults to true. When true, the graph's updating will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param [boolean] redraw Defaults to true. Whether to redraw the chart after the point is removed.If doing more operations on the chart, + * it is a good idea to set redraw to false and call chart.redraw() after. + * @param [boolean|Animation] animation Defaults to true. When true, the graph's updating will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ remove(redraw?: boolean, animation?: boolean | Animation): void; /** * Select or unselect the point. * @param [boolean] select When true, the point is selected. When false, the point is unselected. When null or undefined, the selection state is toggled. - * @param [boolean] accumulate When true, the selection is added to other selected points. When false, other selected points are deselected. Internally in Highcharts,selected points are accumulated on Control, Shift or Cmd clicking the point. + * @param [boolean] accumulate When true, the selection is added to other selected points. When false, other selected points are deselected. + * Internally in Highcharts,selected points are accumulated on Control, Shift or Cmd clicking the point. * @since 1.2.0 */ select(select?: boolean, accumulate?: boolean): void; @@ -6313,7 +6338,8 @@ declare namespace Highcharts { * is selected. * @param [boolean] sliced When true, the point is sliced out. When false, the point is set in. When null or undefined, the sliced state is toggled. * @param [boolean] redraw Defaults to true. Whether to redraw the chart after the point is altered. - * @param [boolean|Animation] animation Defaults to true. When true, the move will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param [boolean|Animation] animation Defaults to true. When true, the move will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ slice(sliced?: boolean, redraw?: boolean, animation?: boolean | Animation): void; @@ -6323,9 +6349,13 @@ declare namespace Highcharts { total: number; /** * Update the point with new values. - * @param {number|[number,number]|DataPoint} options The point options. Point options are handled as described under the series.data item for each series type. For example for a line series, if options is a single number, the point will be given that number as the main y value. If it is an array, it will be interpreted as x and y values respectively. If it is an object, advanced options are applied. - * @param [boolean] redraw Defaults to true. Whether to redraw the chart after the point is updated.If doing more operations on the chart, it is a good idea to set redraw to false and call chart.redraw() after. - * @param {boolean|Animation} animation Defaults to true. When true, the update will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param {number|[number,number]|DataPoint} options The point options. Point options are handled as described under the series.data item for each series type. + * For example for a line series, if options is a single number, the point will be given that number as the main y value. If it is an array, + * it will be interpreted as x and y values respectively. If it is an object, advanced options are applied. + * @param [boolean] redraw Defaults to true. Whether to redraw the chart after the point is updated.If doing more operations on the chart, + * it is a good idea to set redraw to false and call chart.redraw() after. + * @param {boolean|Animation} animation Defaults to true. When true, the update will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ update(options: number | [number, number] | DataPoint, redraw?: boolean, animation?: boolean | Animation): void; @@ -6359,10 +6389,14 @@ declare namespace Highcharts { /** * Add a point to the series after render time. The point can be added at the end, or by giving it an X value, to * the start or in the middle of the series. - * @param {number|[number,number]|DataPoint} The point options. If options is a single number, a point with that y value is appended to the series.If it is an array, it will be interpreted as x and y values respectively. If it is an object, advanced options as outlined under series.data are applied. - * @param [boolean=true] redraw - Whether to redraw the chart after the point is added. When adding more than one point, it is highly recommended that the redraw option be set to false, and instead chart.redraw() is explicitly called after the adding of points is finished. - * @param [boolean=false] shift - When shift is true, one point is shifted off the start of the series as one is appended to the end. Use this option for live charts monitoring a value over time. - * @param [(boolean|Animation)=false] animation - When shift is true, one point is shifted off the start of the series as one is appended to the end. Use this option for live charts monitoring a value over time. + * @param {number|[number,number]|DataPoint} The point options. If options is a single number, a point with that y value is appended to the series. + * If it is an array, it will be interpreted as x and y values respectively. If it is an object, advanced options as outlined under series.data are applied. + * @param [boolean=true] redraw - Whether to redraw the chart after the point is added. When adding more than one point, + * it is highly recommended that the redraw option be set to false, and instead chart.redraw() is explicitly called after the adding of points is finished. + * @param [boolean=false] shift - When shift is true, one point is shifted off the start of the series as one is appended to the end. + * Use this option for live charts monitoring a value over time. + * @param [(boolean|Animation)=false] animation - When shift is true, one point is shifted off the start of the series as one is appended to the end. + * Use this option for live charts monitoring a value over time. * @since 1.2.0 */ addPoint(options: number | [number, number] | DataPoint, redraw?: boolean, shift?: boolean, animation?: boolean | Animation): void; @@ -6394,7 +6428,8 @@ declare namespace Highcharts { options: IndividualSeriesOptions; /** * Remove the series from the chart. - * @param [boolean=true] redraw - Whether to redraw the chart after the series is removed.If doing more operations on the chart, it is a good idea to set redraw to false and call chart.redraw() after. + * @param [boolean=true] redraw - Whether to redraw the chart after the series is removed.If doing more operations on the chart, + * it is a good idea to set redraw to false and call chart.redraw() after. * @since 1.2.0 */ remove(redraw?: boolean): void; @@ -6402,8 +6437,10 @@ declare namespace Highcharts { * Remove a point from the series. Unlike the Point.remove method, this can also be done on a point that is not * instanciated because it is outside the view or subject to data grouping. * @param {number} index - The index of the point in the data array. - * @param [boolean=true] redraw - Whether to redraw the chart after the point is added. When adding more than one point, it is highly recommended that the redraw option be set to false, and instead chart.redraw() is explicitly called after the adding of points is finished. - * @param [boolean|Animation=true] animation - When true, the graph will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param [boolean=true] redraw - Whether to redraw the chart after the point is added. When adding more than one point, + * it is highly recommended that the redraw option be set to false, and instead chart.redraw() is explicitly called after the adding of points is finished. + * @param [boolean|Animation=true] animation - When true, the graph will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. * @since 4.1.0 */ removePoint(index: number, redraw?: boolean, animation?: boolean | Animation): void; @@ -6423,16 +6460,20 @@ declare namespace Highcharts { * Apply a new set of data to the series and optionally redraw it. Note that this method throws away all points and * creates new ones. For updating the values of existing points, use Point.update() instead. * @param {number[]|number[][]|DataPoint[]} data - Takes an array of data in the same format as described under seriesdata for the given series type. - * @param [boolean=true] redraw - Whether to redraw the chart after the series is altered.If doing more operations on the chart, it is a good idea to set redraw to false and call chart.redraw() after. - * @param [boolean|Animation] animation - When the updated data is the same length as the existing data, points will be updated by default, and animation visualizes how the points are changed. Set false to disable animation, or a configuration object to set duration or easing. - * @param [boolean] updatePoints - When the updated data is the same length as the existing data, points will be updated instead of replace. This option prevents this, and makes setData behave like it did prior to Highcharts 3.0.10. + * @param [boolean=true] redraw - Whether to redraw the chart after the series is altered.If doing more operations on the chart, + * it is a good idea to set redraw to false and call chart.redraw() after. + * @param [boolean|Animation] animation - When the updated data is the same length as the existing data, points will be updated by default, + * and animation visualizes how the points are changed. Set false to disable animation, or a configuration object to set duration or easing. + * @param [boolean] updatePoints - When the updated data is the same length as the existing data, points will be updated instead of replace. + * This option prevents this, and makes setData behave like it did prior to Highcharts 3.0.10. * @since 1.2.0 */ setData(data: number[] | number[][] | DataPoint[], redraw?: boolean, animation?: boolean | Animation, updatePoints?: boolean): void; /** * A utility function to show or hide the series with an optional redraw. * @param [boolean] visible - Whether to show or hide the series. If undefined, the visibility is toggled. - * @param [boolean=true] redraw - Whether to redraw the chart after the series is altered.If doing more operations on the chart, it is a good idea to set redraw to false and call chart.redraw() after. + * @param [boolean=true] redraw - Whether to redraw the chart after the series is altered.If doing more operations on the chart, + * it is a good idea to set redraw to false and call chart.redraw() after. * @since 1.2.0 */ setVisible(visible?: boolean, redraw?: boolean): void; @@ -6451,7 +6492,8 @@ declare namespace Highcharts { * elements from the series is removed, and it is initiated from scratch. Therefore, this method is more performance * expensive than some other utility methods like setData or setVisible. * @param {IndividualSeriesOptions} options New options that will be merged into the series' existing options. - * @param [boolean] redraw - Whether to redraw the chart after the series is altered. If doing more operations on the chart, it is a good idea to set redraw to false and call chart.redraw() after. + * @param [boolean] redraw - Whether to redraw the chart after the series is altered. If doing more operations on the chart, + * it is a good idea to set redraw to false and call chart.redraw() after. * @since 1.2.0 */ update(options: IndividualSeriesOptions, redraw?: boolean): void; diff --git a/highcharts/modules/boost.d.ts b/types/highcharts/modules/boost.d.ts similarity index 100% rename from highcharts/modules/boost.d.ts rename to types/highcharts/modules/boost.d.ts diff --git a/highcharts/modules/exporting.d.ts b/types/highcharts/modules/exporting.d.ts similarity index 100% rename from highcharts/modules/exporting.d.ts rename to types/highcharts/modules/exporting.d.ts diff --git a/types/highcharts/modules/map/index.d.ts b/types/highcharts/modules/map/index.d.ts new file mode 100644 index 0000000000..04d5a77aea --- /dev/null +++ b/types/highcharts/modules/map/index.d.ts @@ -0,0 +1,55 @@ +// Type definitions for Highmaps 4.2.7 +// Project: http://www.highcharts.com/products/highmaps +// Definitions by: Albert Ozimek +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as highcharts from 'highcharts'; +import * as geojson from 'geojson'; + +declare module 'highcharts' { + interface Static { + mapChart(renderTo: string | HTMLElement, options: MapOptions, callback?: (chart: highcharts.ChartObject) => void): highcharts.ChartObject; + } + + interface MapOptions { + chart?: highcharts.ChartOptions; + + legend?: highcharts.LegendOptions; + + mapNavigation?: Navigation; + + series?: MapSeriesOptions[]; + + colorAxis?: ColorAxis; + + title?: highcharts.TitleOptions; + } + + interface MapSeriesOptions { + data?: number[] | [number, number][] | [string, number][] | highcharts.DataPoint[]; + + dataLabels?: MapSeriesOptionsDataLabels; + + joinBy?: Array; + + mapData?: geojson.GeoJsonObject; + + name?: string; + + states?: MapSeriesOptionsStates; + + tooltip?: MapSeriesOptionsTooltip; + + type?: string; + } + + interface Navigation {} + + interface MapSeriesOptionsDataLabels {} + + interface MapSeriesOptionsStates {} + + interface MapSeriesOptionsTooltip {} + + interface ColorAxis {} +} diff --git a/highcharts/modules/no-data-to-display.d.ts b/types/highcharts/modules/no-data-to-display.d.ts similarity index 100% rename from highcharts/modules/no-data-to-display.d.ts rename to types/highcharts/modules/no-data-to-display.d.ts diff --git a/highcharts/modules/offline-exporting.d.ts b/types/highcharts/modules/offline-exporting.d.ts similarity index 100% rename from highcharts/modules/offline-exporting.d.ts rename to types/highcharts/modules/offline-exporting.d.ts diff --git a/highcharts/test/boost.ts b/types/highcharts/test/boost.ts similarity index 100% rename from highcharts/test/boost.ts rename to types/highcharts/test/boost.ts diff --git a/highcharts/test/exporting.ts b/types/highcharts/test/exporting.ts similarity index 100% rename from highcharts/test/exporting.ts rename to types/highcharts/test/exporting.ts diff --git a/highcharts/test/highstock.ts b/types/highcharts/test/highstock.ts similarity index 92% rename from highcharts/test/highstock.ts rename to types/highcharts/test/highstock.ts index ac7cb883f2..7fde17d3ce 100644 --- a/highcharts/test/highstock.ts +++ b/types/highcharts/test/highstock.ts @@ -1,11 +1,10 @@ /// import * as Highcharts from "highcharts"; -var someData = [1, 2, 3, 4, 5, 6, 7, 8, 9]; +const someData = [1, 2, 3, 4, 5, 6, 7, 8, 9]; -$(function () { +$(() => { $('#container').highcharts('StockChart', { - chart: { type: "arearange" }, @@ -55,7 +54,7 @@ $(function () { } }, - series: [{ + series: [ { name: 'USD to EUR', data: someData, lineColor: "blue" diff --git a/highcharts/test/index.ts b/types/highcharts/test/index.ts similarity index 83% rename from highcharts/test/index.ts rename to types/highcharts/test/index.ts index 316e2f42a6..622ebfa8be 100644 --- a/highcharts/test/index.ts +++ b/types/highcharts/test/index.ts @@ -15,14 +15,12 @@ function originalTests() { } }); - - var animate: Highcharts.Animation = { + const animate: Highcharts.Animation = { duration: 200, easing: "linear" }; - - var gradient: Highcharts.Gradient = { + const gradient: Highcharts.Gradient = { linearGradient: { x1: 0, y1: 0, @@ -33,16 +31,16 @@ function originalTests() { [0, 'rgb(255, 255, 255)'], [1, 'rgb(200, 200, 255)'] ] - } + }; - var color = "#fcfcff"; + const color = "#fcfcff"; - var chart1 = new Highcharts.Chart({ + const chart1 = new Highcharts.Chart({ chart: { renderTo: "container" }, xAxis: {}, - series: [{ + series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], type: "line", allowPointSelect: true @@ -54,9 +52,9 @@ function originalTests() { data: [1, 2, 3, 4, 5] }); - console.log((chart1.series[0].options).dashStyle); + console.log(( chart1.series[0].options).dashStyle); - var chart2 = new Highcharts.Chart({ + const chart2 = new Highcharts.Chart({ chart: { renderTo: 'container', width: 400, @@ -85,7 +83,7 @@ function originalTests() { legend: { enabled: false }, - series: [{ + series: [ { data: [ [550, 870], [738, 362], [719, 711], [547, 665], [595, 197], [332, 144], [581, 555], [196, 862], [6, 837], [400, 924], [888, 148], [785, 730], @@ -109,72 +107,72 @@ function originalTests() { }] }); - var div: HTMLDivElement; - var r = new Highcharts.Renderer(div, 20, 30); - var box = r.text("Hello", 10, 10).getBBox(); + const div: HTMLDivElement = null as any; + const r = new Highcharts.Renderer(div, 20, 30); + const box = r.text("Hello", 10, 10).getBBox(); - var highChartSettings: Highcharts.Options = { + const highChartSettings: Highcharts.Options = { chart: { width: 400, height: 400 }, xAxis: [{ }], - series: [{ + series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }] }; - var container = $("#container").highcharts(highChartSettings, (chart) => { + const container = $("#container").highcharts(highChartSettings, (chart) => { chart.series[0].setVisible(true, true); }); - var singleYAxisOptions: Highcharts.Options = { + const singleYAxisOptions: Highcharts.Options = { yAxis: {} }; - var multipleYAxisOptions: Highcharts.Options = { + const multipleYAxisOptions: Highcharts.Options = { yAxis: [{}, {}] }; - var renderToIdChart = new Highcharts.Chart("container", { + const renderToIdChart = new Highcharts.Chart("container", { xAxis: {}, - series: [{ + series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], type: "line", allowPointSelect: true }] }); - var renderToElementChart = new Highcharts.Chart(div, { + const renderToElementChart = new Highcharts.Chart(div, { xAxis: {}, - series: [{ + series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], type: "line", allowPointSelect: true }] }); - var createWithFunction = Highcharts.chart({ + const createWithFunction = Highcharts.chart({ xAxis: {}, - series: [{ + series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], type: "line", allowPointSelect: true }] }); - var createWithFunctionRenderToId = Highcharts.chart("container", { + const createWithFunctionRenderToId = Highcharts.chart("container", { xAxis: {}, - series: [{ + series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], type: "line", allowPointSelect: true }] }); - var createWithFunctionRenderToElement = Highcharts.chart(div, { + const createWithFunctionRenderToElement = Highcharts.chart(div, { xAxis: {}, - series: [{ + series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], type: "line", allowPointSelect: true @@ -183,7 +181,7 @@ function originalTests() { } function test_alldefaults() { - var options: Highcharts.Options = { + const options: Highcharts.Options = { chart: {}, credits: {}, data: {}, @@ -207,13 +205,13 @@ function test_alldefaults() { } function test_ChartOptions() { - var emptyChartOptions: Highcharts.ChartOptions = { + const emptyChartOptions: Highcharts.ChartOptions = { events: {}, options3d: {}, resetZoomButton: {} }; - var allValuesSet: Highcharts.ChartOptions = { + const allValuesSet: Highcharts.ChartOptions = { alignTicks: false, animation: { duration: 500, @@ -234,15 +232,15 @@ function test_ChartOptions() { className: "class", defaultSeriesType: "deprecated", events: { - addSeries: () => {}, - afterPrint: () => {}, - beforePrint: () => {}, - click: () => {}, - drilldown: () => {}, - drillup: () => {}, - load: () => {}, - redraw: () => {}, - selection: () => {} + addSeries: () => { }, + afterPrint: () => { }, + beforePrint: () => { }, + click: () => { }, + drilldown: () => { }, + drillup: () => { }, + load: () => { }, + redraw: () => { }, + selection: () => { } }, height: 200, ignoreHiddenSeries: true, @@ -320,7 +318,7 @@ function test_ChartOptions() { zoomType: "x" }; - //alignticks example + // alignticks example $('#container').highcharts({ chart: { alignTicks: true, @@ -350,8 +348,8 @@ function test_ChartOptions() { y: 70 }, tooltip: { - formatter: function () { - return '' + this.series.name + '
' + this.x + ': ' + this.y; + formatter() { + return ' ' + this.series.name + '
' + this.x + ': ' + this.y; } }, plotOptions: {}, @@ -378,9 +376,9 @@ function test_ChartOptions() { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }] }); - var i = 1; - $('#update').click(function () { - var chart = $('#container').highcharts(); + let i = 1; + $('#update').click(() => { + const chart = $('#container').highcharts(); chart.series[0].data[0].update(i % 2 ? 200 : 0); i += 1; }); @@ -410,8 +408,8 @@ function test_ChartOptions() { y: 70 }, tooltip: { - formatter: function () { - return `${this.series.name}
${this.x}: ${this.y}`; + formatter() { + return ` ${this.series.name}
${this.x}: ${this.y}`; } }, series: [{ @@ -448,8 +446,8 @@ function test_ChartOptions() { $('#container').highcharts({ chart: { events: { - addSeries: function () { - var label = (this).renderer.label('A series was added, about to redraw chart', 100, 120) + addSeries() { + const label = ( this).renderer.label('A series was added, about to redraw chart', 100, 120) .attr({ fill: Highcharts.getOptions().colors[0], padding: 10, @@ -461,7 +459,7 @@ function test_ChartOptions() { }) .add(); - setTimeout(function () { + setTimeout(() => { label.fadeOut(); }, 1000); } @@ -476,8 +474,8 @@ function test_ChartOptions() { }); // activate the button - $('#button').click(function () { - var chart = $('#container').highcharts(); + $('#button').click(() => { + const chart = $('#container').highcharts(); chart.addSeries({ data: [216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5] @@ -578,7 +576,7 @@ function test_ChartOptions() { } function test_CreditsOptions() { - var allDefaults: Highcharts.CreditsOptions = {}; + const allDefaults: Highcharts.CreditsOptions = {}; // custom url and text example $('#container').highcharts({ @@ -597,7 +595,7 @@ function test_CreditsOptions() { function test_Data() { // all defaults - var data: Highcharts.DataOptions = {}; + const data: Highcharts.DataOptions = {}; // data from table example $('#container').highcharts({ @@ -675,7 +673,7 @@ function test_Data() { } function test_Drilldown() { - var allDefaults: Highcharts.DrilldownOptions = {}; + const allDefaults: Highcharts.DrilldownOptions = {}; // multiseries drilldown example $('#container').highcharts({ @@ -693,7 +691,7 @@ function test_Drilldown() { } } }, - series: [{ + series: [ { name: '2010', data: [{ name: 'Republican', @@ -708,7 +706,7 @@ function test_Drilldown() { y: 4, drilldown: 'other-2010' }] - }, { + }, { name: '2014', data: [{ name: 'Republican', @@ -725,7 +723,7 @@ function test_Drilldown() { }] }], drilldown: { - series: [{ + series: [ { id: 'republican-2010', data: [ ['East', 4], @@ -733,7 +731,7 @@ function test_Drilldown() { ['North', 1], ['South', 4] ] - }, { + }, { id: 'democrats-2010', data: [ ['East', 6], @@ -741,7 +739,7 @@ function test_Drilldown() { ['North', 2], ['South', 4] ] - }, { + }, { id: 'other-2010', data: [ ['East', 2], @@ -749,7 +747,7 @@ function test_Drilldown() { ['North', 3], ['South', 2] ] - }, { + }, { id: 'republican-2014', data: [ ['East', 2], @@ -757,7 +755,7 @@ function test_Drilldown() { ['North', 1], ['South', 7] ] - }, { + }, { id: 'democrats-2014', data: [ ['East', 4], @@ -765,7 +763,7 @@ function test_Drilldown() { ['North', 5], ['South', 3] ] - }, { + }, { id: 'other-2014', data: [ ['East', 7], @@ -790,7 +788,7 @@ function test_Drilldown() { } } }, - series: [{ + series: [ { name: 'Things', colorByPoint: true, data: [{ @@ -858,7 +856,7 @@ function test_Drilldown() { } function test_Exporting() { - var allDefaults: Highcharts.ExportingOptions = {}; + const allDefaults: Highcharts.ExportingOptions = {}; // source size example $('#container').highcharts({ @@ -866,7 +864,7 @@ function test_Exporting() { text: 'Highcharts sourceWidth and sourceHeight demo' }, subtitle: { - text: 'The on-screen chart is 600x400.
The exported chart is 800x400
(sourceWidth and sourceHeight multiplied by scale)', + text: 'The on-screen chart is 600x400.
The exported chart is 800x400
(sourceWidth and sourceHeight multiplied by scale)', floating: true, align: 'left', x: 60, @@ -890,15 +888,15 @@ function test_Exporting() { } function test_Loading() { - var allDefaults: Highcharts.LoadingOptions = {}; + const allDefaults: Highcharts.LoadingOptions = {}; // examples // the button handler - var isLoading = false, - $button = $('#button'), - chart: Highcharts.ChartObject; + let isLoading = false; + const $button = $('#button'); + let chart: Highcharts.ChartObject; - $button.click(function () { + $button.click(() => { if (!isLoading) { chart.showLoading(); $button.html('Hide loading'); @@ -932,7 +930,7 @@ function test_Loading() { } function test_Navigation() { - var allDefaults: Highcharts.NavigationOptions = {}; + const allDefaults: Highcharts.NavigationOptions = {}; // examples $('#container').highcharts({ @@ -974,7 +972,7 @@ function test_Navigation() { } function test_NoData() { - var allDefaults: Highcharts.NoDataOptions = {}; + const allDefaults: Highcharts.NoDataOptions = {}; // example $('#container').highcharts({ @@ -1000,7 +998,7 @@ function test_NoData() { } function test_AreaOptions() { - var allDefaults: Highcharts.AreaChartSeriesOptions = {}; + const allDefaults: Highcharts.AreaChartSeriesOptions = {}; // examples $('#container').highcharts({ @@ -1016,7 +1014,7 @@ function test_AreaOptions() { linearGradient: [0, 0, 0, 300], stops: [ [0, Highcharts.getOptions().colors[0]], - [1, (Highcharts.Color(Highcharts.getOptions().colors[0])).setOpacity(0).get('rgba')] + [1, ( Highcharts.Color(Highcharts.getOptions().colors[0])).setOpacity(0).get('rgba')] ] }, fillOpacity: 0.1, @@ -1036,7 +1034,7 @@ function test_AreaOptions() { } function test_AreaRange() { - var allDefaults: Highcharts.AreaRangeChartSeriesOptions = {}; + const allDefaults: Highcharts.AreaRangeChartSeriesOptions = {}; // example $('#container').highcharts({ @@ -1044,27 +1042,26 @@ function test_AreaRange() { type: "arearange", zoomType: 'x' }, - series: [{ - data: (function (arr: number[], len: number) { - var i: number; - for (i = 0; i < len; i = i + 1) { + series: [ { + data: (((arr: number[], len: number) => { + for (let i = 0; i < len; i = i + 1) { arr.push(i); } return arr; - }([], 50)) + })([], 50)) }] }); - $('#setextremes').click(function () { + $('#setextremes').click(() => { $('#container').highcharts().xAxis[0].setExtremes(10, 15); }); - $('#unsetextremes').click(function () { + $('#unsetextremes').click(() => { $('#container').highcharts().xAxis[0].setExtremes(); }); // datalabels example - $.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=range.json&callback=?', function (data) { + $.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=range.json&callback=?', (data) => { // Shorten the data data = data.splice(181, 14); $('#container').highcharts({ @@ -1092,20 +1089,19 @@ function test_AreaRange() { }, series: [ { name: 'Temperatures', - data: data, + data, dataLabels: { enabled: true, yHigh: 20, yLow: -20 } }] - }); }); } function test_Bar() { - var allDefaults: Highcharts.BarChartSeriesOptions = {}; + const allDefaults: Highcharts.BarChartSeriesOptions = {}; $('#container').highcharts({ chart: { @@ -1173,8 +1169,8 @@ function test_Bar() { }); // grouping example - Highcharts.getOptions().colors = Highcharts.map(Highcharts.getOptions().colors, function (color: string) { - return (Highcharts.Color(color)) + Highcharts.getOptions().colors = Highcharts.map(Highcharts.getOptions().colors, (color: string) => { + return ( Highcharts.Color(color)) .setOpacity(0.5) .get('rgba'); }); @@ -1230,7 +1226,7 @@ function test_Bar() { } function test_BoxPlot() { - var allDefaults: Highcharts.BoxPlotChartSeriesOptions = {}; + const allDefaults: Highcharts.BoxPlotChartSeriesOptions = {}; // boxplot example $('#container').highcharts({ @@ -1282,7 +1278,7 @@ function test_BoxPlot() { } function test_Bubble() { - var allDefaults: Highcharts.BubbleChartSeriesOptions = {}; + const allDefaults: Highcharts.BubbleChartSeriesOptions = {}; // bubble example $('#container').highcharts({ @@ -1344,7 +1340,7 @@ function test_Bubble() { subtitle: { text: 'Size is computed by absolute value on negative bubbles' }, - series: [{ + series: [ { data: [ [-5, 0, -5], [-4, 0, -4], @@ -1365,19 +1361,19 @@ function test_Bubble() { } function test_Column() { - var allDefaults: Highcharts.ColumnChartSeriesOptions = {}; + const allDefaults: Highcharts.ColumnChartSeriesOptions = {}; // same options as bar chart } function test_ColumnRange() { - var allDefaults: Highcharts.ColumnRangeChartSeriesOptions = {}; + const allDefaults: Highcharts.ColumnRangeChartSeriesOptions = {}; // same options as bar chart and datalabels from arearange } function test_ErrorBar() { - var allDefaults: Highcharts.ErrorBarChartSeriesOptions = {}; + const allDefaults: Highcharts.ErrorBarChartSeriesOptions = {}; // error bar styling example $('#container').highcharts({ @@ -1401,7 +1397,7 @@ function test_ErrorBar() { tooltip: { shared: true }, - series: [{ + series: [ { name: 'Temperature', type: 'spline', data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6], @@ -1409,7 +1405,7 @@ function test_ErrorBar() { enabled: false }, tooltip: { - pointFormat: '{series.name}: {point.y:.1f}°C
' + pointFormat: ' {series.name} : {point.y:.1f}°C
' } }, { color: '#FF0000', @@ -1428,7 +1424,7 @@ function test_ErrorBar() { } function test_Funnel() { - var allDefaults: Highcharts.FunnelChartSeriesOptions = {}; + const allDefaults: Highcharts.FunnelChartSeriesOptions = {}; // funnel demo $('#container').highcharts({ @@ -1444,7 +1440,7 @@ function test_Funnel() { series: { dataLabels: { enabled: true, - format: '{point.name} ({point.y:,.0f})', + format: ' {point.name} ({point.y:,.0f})', color: 'black', softConnector: true }, @@ -1472,7 +1468,7 @@ function test_Funnel() { } function test_Gauge() { - var allDefaults: Highcharts.GaugeChartSeriesOptions = {}; + const allDefaults: Highcharts.GaugeChartSeriesOptions = {}; // example $('#container').highcharts({ @@ -1526,7 +1522,7 @@ function test_Gauge() { } function test_HeatMap() { - var allDefaults: Highcharts.HeatMapSeriesOptions = {}; + const allDefaults: Highcharts.HeatMapSeriesOptions = {}; // heatmap demo $('#container').highcharts({ @@ -1578,15 +1574,15 @@ function test_HeatMap() { borderWidth: 0, colsize: 24 * 36e5, // one day tooltip: { - headerFormat: 'Temperature
', - pointFormat: '{point.x:%e %b, %Y} {point.y}:00: {point.value} ℃' + headerFormat: 'Temperature
', + pointFormat: '{point.x:%e %b, %Y} {point.y}:00: {point.value} ℃ ' } }] }); } function test_Line() { - var allDefaults: Highcharts.LineChartSeriesOptions = {}; + const allDefaults: Highcharts.LineChartSeriesOptions = {}; // step example $('#container').highcharts({ @@ -1596,17 +1592,17 @@ function test_Line() { xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, - series: [{ + series: [ { data: [1, 2, 3, 4, null, 6, 7, null, 9], step: 'right', name: 'Right', linecap: 'round' - }, { + }, { data: [5, 6, 7, 8, null, 10, 11, null, 13], step: 'center', name: 'Center', linecap: 'round' - }, { + }, { data: [9, 10, 11, 12, null, 14, 15, null, 17], step: 'left', name: 'Left', @@ -1616,7 +1612,7 @@ function test_Line() { } function test_Pie() { - var allDefaults: Highcharts.PieChartSeriesOptions = {}; + const allDefaults: Highcharts.PieChartSeriesOptions = {}; // pie demo $('#container').highcharts({ @@ -1630,7 +1626,7 @@ function test_Pie() { text: 'Browser market shares January, 2015 to May, 2015' }, tooltip: { - pointFormat: '{series.name}: {point.percentage:.1f}%' + pointFormat: '{series.name}: {point.percentage:.1f}% ' }, plotOptions: { pie: { @@ -1639,14 +1635,14 @@ function test_Pie() { cursor: 'pointer', dataLabels: { enabled: true, - format: '{point.name}: {point.percentage:.1f} %', + format: ' {point.name} : {point.percentage:.1f} %', style: { color: 'black' } } } }, - series: [{ + series: [ { name: "Brands", colorByPoint: true, data: [{ @@ -1681,13 +1677,13 @@ function test_Pie() { plotShadow: false }, title: { - text: 'Browser
shares
2015', + text: 'Browser
shares
2015', align: 'center', verticalAlign: 'middle', y: 40 }, tooltip: { - pointFormat: '{series.name}: {point.percentage:.1f}%' + pointFormat: '{series.name}: {point.percentage:.1f}% ' }, plotOptions: { pie: { @@ -1705,16 +1701,16 @@ function test_Pie() { center: ['50%', '75%'] } }, - series: [{ + series: [ { type: 'pie', name: 'Browser share', innerSize: '50%', data: [ - ['Firefox', 10.38], - ['IE', 56.33], + ['Firefox', 10.38], + ['IE', 56.33], ['Chrome', 24.03], - ['Safari', 4.77], - ['Opera', 0.91], + ['Safari', 4.77], + ['Opera', 0.91], { name: 'Proprietary or Undetectable', y: 0.2, @@ -1747,17 +1743,17 @@ function test_Pie() { selected: true, sliced: true }, - ['IE7', 26.6], - ['IE6', 20], - ['Chrome', 3.1], - ['Other', 5.4] + ['IE7', 26.6], + ['IE6', 20], + ['Chrome', 3.1], + ['Other', 5.4] ] }] }); } function test_Polygon() { - var allDefaults: Highcharts.PolygonChartSeriesOptions = {}; + const allDefaults: Highcharts.PolygonChartSeriesOptions = {}; $('#container').highcharts({ chart: { @@ -1786,7 +1782,7 @@ function test_Polygon() { } function test_Pyramid() { - var allDefaults: Highcharts.PyramidChartSeriesOptions = {}; + const allDefaults: Highcharts.PyramidChartSeriesOptions = {}; // pyramid demo $('#container').highcharts({ @@ -1802,7 +1798,7 @@ function test_Pyramid() { pyramid: { dataLabels: { enabled: true, - format: '{point.name} ({point.y:,.0f})', + format: ' {point.name} ({point.y:,.0f})', color: 'black', softConnector: true } @@ -1814,21 +1810,21 @@ function test_Pyramid() { series: [{ name: 'Unique users', data: [ - ['Website visits', 15654], - ['Downloads', 4064], + ['Website visits', 15654], + ['Downloads', 4064], ['Requested price list', 1987], - ['Invoice sent', 976], - ['Finalized', 846] + ['Invoice sent', 976], + ['Finalized', 846] ] }] }); } function test_SolidGauge() { - var allDefaults: Highcharts.SolidGaugeChartSeriesOptions = {}; + const allDefaults: Highcharts.SolidGaugeChartSeriesOptions = {}; // partial solid gauge demo - var gaugeOptions: Highcharts.Options = { + const gaugeOptions: Highcharts.Options = { chart: { type: 'solidgauge' }, @@ -1848,13 +1844,13 @@ function test_SolidGauge() { tooltip: { enabled: false }, - colorAxis: { - stops: [ + colorAxis: { + stops: [ [0.1, '#55BF3B'], // green [0.5, '#DDDF0D'], // yellow [0.9, '#DF5353'] // red ] - }, + }, yAxis: { lineWidth: 0, minorTickInterval: null, @@ -1880,10 +1876,10 @@ function test_SolidGauge() { } function test_TreeMap() { - var allDefaults: Highcharts.TreeMapChartSeriesOptions = {}; + const allDefaults: Highcharts.TreeMapChartSeriesOptions = {}; // allowDrillToNode - var treeMap: Highcharts.TreeMapChartSeriesOptions = { + const treeMap: Highcharts.TreeMapChartSeriesOptions = { type: "treemap", layoutAlgorithm: 'squarified', allowDrillToNode: true, @@ -1932,10 +1928,10 @@ function test_TreeMap() { } function test_Waterfall() { - var allDefaults: Highcharts.WaterFallChartSeriesOptions = {}; + const allDefaults: Highcharts.WaterFallChartSeriesOptions = {}; // partial waterfall demo - var series: Highcharts.WaterFallChartSeriesOptions = { + const series: Highcharts.WaterFallChartSeriesOptions = { upColor: Highcharts.getOptions().colors[2], color: Highcharts.getOptions().colors[3], data: [{ @@ -1964,7 +1960,7 @@ function test_Waterfall() { }], dataLabels: { enabled: true, - formatter: function () { + formatter() { return Highcharts.numberFormat(this.y / 1000, 0, ',') + 'k'; }, style: { @@ -1978,9 +1974,9 @@ function test_Waterfall() { } function test_AxisOptions() { - var allDefaults: Highcharts.AxisOptions = {}; + const allDefaults: Highcharts.AxisOptions = {}; - var axis: Highcharts.AxisOptions = { + const axis: Highcharts.AxisOptions = { allowDecimals: false, alternateGridColor: '#000000', breaks: [{ @@ -1996,10 +1992,10 @@ function test_AxisOptions() { }, endOnTick: false, events: { - afterBreaks: () => {}, - afterSetExtremes: () => {}, - pointBreak: () => {}, - setExtremes: () => {} + afterBreaks: () => { }, + afterSetExtremes: () => { }, + pointBreak: () => { }, + setExtremes: () => { } }, floor: 0, gridLineColor: '#111111', @@ -2014,7 +2010,7 @@ function test_AxisOptions() { distance: 10, enabled: true, format: "format", - formatter: function() { return this.value; }, + formatter() { return this.value; }, maxStaggerLines: 5, overflow: false, padding: 10, @@ -2050,10 +2046,10 @@ function test_AxisOptions() { borderWidth: 2, color: 'gray', events: { - click: () => {}, - mouseover: () => {}, - mouseout: () => {}, - mousemove: () => {} + click: () => { }, + mouseover: () => { }, + mouseout: () => { }, + mousemove: () => { } }, from: 0, id: 'plotband1', @@ -2078,10 +2074,10 @@ function test_AxisOptions() { color: '#000000', dashStyle: 'Solid', events: { - click: () => {}, - mouseover: () => {}, - mouseout: () => {}, - mousemove: () => {} + click: () => { }, + mouseover: () => { }, + mouseout: () => { }, + mousemove: () => { } }, id: 'plotline1', label: { @@ -2111,7 +2107,7 @@ function test_AxisOptions() { tickLength: 10, tickPixelInterval: 100, tickPosition: 'outside', - tickPositioner: () => {}, + tickPositioner: () => { }, tickPositions: [0, 1, 2], tickWidth: 1, tickmarkPlacement: 'between', @@ -2133,7 +2129,7 @@ function test_AxisOptions() { } function test_AxisObject() { - var axis = $("#container").highcharts().xAxis[0]; + const axis = $("#container").highcharts().xAxis[0]; axis.addPlotBand({ from: 5.5, to: 7.5, @@ -2148,11 +2144,11 @@ function test_AxisObject() { id: 'plot-line-1' }); axis.removePlotLine('plot-line-1'); - var extremes = axis.getExtremes(); - console.log('dataMax: ' + extremes.dataMax + '
' + - 'dataMin: ' + extremes.dataMin + '
' + - 'max: ' + extremes.max + '
' + - 'min: ' + extremes.min + '
'); + const extremes = axis.getExtremes(); + console.log('dataMax: ' + extremes.dataMax + '
' + + 'dataMin: ' + extremes.dataMin + '
' + + 'max: ' + extremes.max + '
' + + 'min: ' + extremes.min + '
'); axis.remove(); axis.remove(false); axis.setCategories(['A', 'B', 'C']); @@ -2161,63 +2157,63 @@ function test_AxisObject() { axis.setExtremes(10, 20); axis.setExtremes(10, 20, false); axis.setExtremes(10, 20, false, false); - axis.setExtremes(10, 20, false, {duration: 50}); - axis.setTitle({text: 'text'}); - axis.setTitle({text: 'text'}, false); + axis.setExtremes(10, 20, false, { duration: 50 }); + axis.setTitle({ text: 'text' }); + axis.setTitle({ text: 'text' }, false); axis.toPixels(10); axis.toPixels(10, true); axis.toValue(10); axis.toValue(10, true); - axis.update({}); - axis.update({}, true); + axis.update( {}); + axis.update( {}, true); } function test_ChartObject() { - var chart = $("#container").highcharts(); - chart.addAxis({}); - chart.addAxis({}, true); - chart.addAxis({}, true, false); - chart.addAxis({}, true, true, false); - chart.addAxis({}, true, true, {duration: 50}); - chart.addSeries({}); - chart.addSeries({}, false); - chart.addSeries({}, false, false); - chart.addSeries({}, false, {duration: 50}); - chart.addSeriesAsDrilldown({}, {}); - var container = chart.container; + const chart = $("#container").highcharts(); + chart.addAxis( {}); + chart.addAxis( {}, true); + chart.addAxis( {}, true, false); + chart.addAxis( {}, true, true, false); + chart.addAxis( {}, true, true, { duration: 50 }); + chart.addSeries( {}); + chart.addSeries( {}, false); + chart.addSeries( {}, false, false); + chart.addSeries( {}, false, { duration: 50 }); + chart.addSeriesAsDrilldown( {}, {}); + const container = chart.container; console.log(container.id); chart.destroy(); chart.drillUp(); - chart.exportChart({}, {}); - chart.exportChartLocal({}, {}); - var object = chart.get('axisIdOrSeriesIdOrPointId'); - var svg1 = chart.getSVG(); - var svg2 = chart.getSVG({}); - var selectedPoints = chart.getSelectedPoints(); - var selectedSeries = chart.getSelectedSeries(); + chart.exportChart( {}, {}); + chart.exportChartLocal( {}, {}); + const object = chart.get('axisIdOrSeriesIdOrPointId'); + const svg1 = chart.getSVG(); + const svg2 = chart.getSVG( {}); + const selectedPoints = chart.getSelectedPoints(); + const selectedSeries = chart.getSelectedSeries(); chart.hideLoading(); - var options = chart.options; + const options = chart.options; chart.print(); chart.redraw(); chart.redraw(false); - chart.redraw({duration: 50, easing: 'fadeIn'}); + chart.redraw({ duration: 50, easing: 'fadeIn' }); chart.reflow(); - var series = chart.series; + const series = chart.series; chart.setSize(200, 200); chart.setSize(200, 200, false); - chart.setSize(200, 200, {duration: 50}); + chart.setSize(200, 200, { duration: 50 }); chart.setTitle({}, {}); chart.setTitle({}, {}, false); chart.showLoading(); chart.showLoading("Loading label"); - var firstXAxis = chart.xAxis[0]; - var firstYAxis = chart.yAxis[0]; - var legend = chart.legend; + const firstXAxis = chart.xAxis[0]; + const firstYAxis = chart.yAxis[0]; + const legend = chart.legend; } function test_ElementObject() { - var renderer = new Highcharts.Renderer($("#container")[0], 400, 400); - var group = renderer.g().add(); + const renderer = new Highcharts.Renderer($("#container")[0], 400, 400); + const group = renderer.g().add(); renderer .circle(200, 150, 100) .attr({ @@ -2226,7 +2222,7 @@ function test_ElementObject() { 'stroke-width': 1 }) .add(group); - var rect = renderer + const rect = renderer .rect(90, 150, 100, 100, 5) .attr({ fill: '#C5FFC5', @@ -2242,7 +2238,7 @@ function test_ElementObject() { 'stroke-width': 10 }); rect.destroy(); - var styledText = renderer + const styledText = renderer .text('Series 1', 140, 140) .attr({ rotation: -25 @@ -2252,42 +2248,42 @@ function test_ElementObject() { fontSize: '16px' }) .add(); - var bbox = styledText.getBBox(); - styledText.on('click', () => {}); + const bbox = styledText.getBBox(); + styledText.on('click', () => { }); group.toFront(); } function test_PointObject() { - var point = $('#container').highcharts().get('point1'); - var category = point.category; - var percentage = point.percentage; + const point = $('#container').highcharts().get('point1'); + const category = point.category; + const percentage = point.percentage; point.index; point.remove(); point.remove(false); - point.remove(false, {duration: 50}); + point.remove(false, { duration: 50 }); point.select(); point.select(false); point.select(false, true); - var isSelected = point.selected; - var series = point.series; + const isSelected = point.selected; + const series = point.series; point.slice(); point.slice(false); point.slice(false, false); point.slice(false, false, false); - point.slice(false, false, {duration: 50}); - var total = point.total; + point.slice(false, false, { duration: 50 }); + const total = point.total; point.update(0); point.update([0, 0]); point.update({}); point.update({}, false); point.update({}, false, false); - point.update({}, false, {duration: 50}); - var x = point.x; - var y = point.y; + point.update({}, false, { duration: 50 }); + const x = point.x; + const y = point.y; } function test_RendererObject() { - var renderer = $('#container').highcharts().renderer; + const renderer = $('#container').highcharts().renderer; renderer.arc(0, 0, 20, 10, 0, Math.PI); renderer.circle(0, 0, 100); renderer.g('groupName'); @@ -2299,48 +2295,48 @@ function test_RendererObject() { } function test_SeriesObject() { - var series = $('#container').highcharts().get('series1'); + const series = $('#container').highcharts().get('series1'); series.addPoint(0); series.addPoint([0, 0]); series.addPoint({}); series.addPoint({}, false); series.addPoint({}, false, true); series.addPoint({}, false, true, false); - series.addPoint({}, false, true, {duration: 50}); - var chart = series.chart; - var data = series.data; + series.addPoint({}, false, true, { duration: 50 }); + const chart = series.chart; + const data = series.data; series.hide(); - var name = series.name; - var options = series.options; + const name = series.name; + const options = series.options; series.remove(); series.remove(false); series.removePoint(0); series.removePoint(0, false); series.removePoint(0, false, false); - series.removePoint(0, false, {duration: 50}); + series.removePoint(0, false, { duration: 50 }); series.select(); series.select(true); - var isSelected = series.selected; + const isSelected = series.selected; series.setData([0, 1, 2]); series.setData([[0, 0], [1, 1], [2, 2]]); series.setData([{}, {}, {}]); series.setData([0, 1, 2], false); series.setData([0, 1, 2], false, false); - series.setData([0, 1, 2], false, {duration: 50}); + series.setData([0, 1, 2], false, { duration: 50 }); series.setData([0, 1, 2], false, false, false); series.setVisible(); series.setVisible(true); series.setVisible(true, false); series.show(); - var type = series.type; + const type = series.type; series.update({}); series.update({}, false); - var visible = series.visible; - var xAxis = series.xAxis; - var yAxis = series.yAxis; + const visible = series.visible; + const xAxis = series.xAxis; + const yAxis = series.yAxis; } function test_LegendObject() { - var legend = $('#container').highcharts().legend; + const legend = $('#container').highcharts().legend; legend.update({}); legend.update({}, false); } diff --git a/highcharts/test/more.ts b/types/highcharts/test/more.ts similarity index 100% rename from highcharts/test/more.ts rename to types/highcharts/test/more.ts diff --git a/types/highcharts/test/no-data-to-display.ts b/types/highcharts/test/no-data-to-display.ts new file mode 100644 index 0000000000..348d2a2ad7 --- /dev/null +++ b/types/highcharts/test/no-data-to-display.ts @@ -0,0 +1,8 @@ +function test_NoDataToDisplay() { + const chart = $("#container").highcharts(); + const chartHasData = chart.hasData(); + chart.hideNoData(); + chart.showNoData("Custom no data message"); +} + +HighchartsNoDataToDisplay(Highcharts); diff --git a/highcharts/test/offline-exporting.ts b/types/highcharts/test/offline-exporting.ts similarity index 100% rename from highcharts/test/offline-exporting.ts rename to types/highcharts/test/offline-exporting.ts diff --git a/highcharts/tsconfig.json b/types/highcharts/tsconfig.json similarity index 100% rename from highcharts/tsconfig.json rename to types/highcharts/tsconfig.json diff --git a/highcharts/tslint.json b/types/highcharts/tslint.json similarity index 100% rename from highcharts/tslint.json rename to types/highcharts/tslint.json diff --git a/highland/highland-tests.ts b/types/highland/highland-tests.ts similarity index 100% rename from highland/highland-tests.ts rename to types/highland/highland-tests.ts diff --git a/highland/index.d.ts b/types/highland/index.d.ts similarity index 100% rename from highland/index.d.ts rename to types/highland/index.d.ts diff --git a/highland/tsconfig.json b/types/highland/tsconfig.json similarity index 100% rename from highland/tsconfig.json rename to types/highland/tsconfig.json diff --git a/highlight.js/highlight.js-tests.ts b/types/highlight.js/highlight.js-tests.ts similarity index 100% rename from highlight.js/highlight.js-tests.ts rename to types/highlight.js/highlight.js-tests.ts diff --git a/highlight.js/index.d.ts b/types/highlight.js/index.d.ts similarity index 100% rename from highlight.js/index.d.ts rename to types/highlight.js/index.d.ts diff --git a/highlight.js/tsconfig.json b/types/highlight.js/tsconfig.json similarity index 100% rename from highlight.js/tsconfig.json rename to types/highlight.js/tsconfig.json diff --git a/highlight.js/v7/index.d.ts b/types/highlight.js/v7/index.d.ts similarity index 100% rename from highlight.js/v7/index.d.ts rename to types/highlight.js/v7/index.d.ts diff --git a/highlight.js/v7/tsconfig.json b/types/highlight.js/v7/tsconfig.json similarity index 100% rename from highlight.js/v7/tsconfig.json rename to types/highlight.js/v7/tsconfig.json diff --git a/hiredis/hiredis-tests.ts b/types/hiredis/hiredis-tests.ts similarity index 100% rename from hiredis/hiredis-tests.ts rename to types/hiredis/hiredis-tests.ts diff --git a/hiredis/index.d.ts b/types/hiredis/index.d.ts similarity index 100% rename from hiredis/index.d.ts rename to types/hiredis/index.d.ts diff --git a/hiredis/tsconfig.json b/types/hiredis/tsconfig.json similarity index 100% rename from hiredis/tsconfig.json rename to types/hiredis/tsconfig.json diff --git a/har-format/tslint.json b/types/hiredis/tslint.json similarity index 100% rename from har-format/tslint.json rename to types/hiredis/tslint.json diff --git a/history.js/history.js-tests.ts b/types/history.js/history.js-tests.ts similarity index 100% rename from history.js/history.js-tests.ts rename to types/history.js/history.js-tests.ts diff --git a/history.js/index.d.ts b/types/history.js/index.d.ts similarity index 100% rename from history.js/index.d.ts rename to types/history.js/index.d.ts diff --git a/history.js/tsconfig.json b/types/history.js/tsconfig.json similarity index 100% rename from history.js/tsconfig.json rename to types/history.js/tsconfig.json diff --git a/history/DOMUtils.d.ts b/types/history/DOMUtils.d.ts similarity index 100% rename from history/DOMUtils.d.ts rename to types/history/DOMUtils.d.ts diff --git a/history/ExecutionEnvironment.d.ts b/types/history/ExecutionEnvironment.d.ts similarity index 100% rename from history/ExecutionEnvironment.d.ts rename to types/history/ExecutionEnvironment.d.ts diff --git a/history/LocationUtils.d.ts b/types/history/LocationUtils.d.ts similarity index 100% rename from history/LocationUtils.d.ts rename to types/history/LocationUtils.d.ts diff --git a/history/PathUtils.d.ts b/types/history/PathUtils.d.ts similarity index 100% rename from history/PathUtils.d.ts rename to types/history/PathUtils.d.ts diff --git a/history/createBrowserHistory.d.ts b/types/history/createBrowserHistory.d.ts similarity index 100% rename from history/createBrowserHistory.d.ts rename to types/history/createBrowserHistory.d.ts diff --git a/history/createHashHistory.d.ts b/types/history/createHashHistory.d.ts similarity index 100% rename from history/createHashHistory.d.ts rename to types/history/createHashHistory.d.ts diff --git a/history/createMemoryHistory.d.ts b/types/history/createMemoryHistory.d.ts similarity index 100% rename from history/createMemoryHistory.d.ts rename to types/history/createMemoryHistory.d.ts diff --git a/history/createTransitionManager.d.ts b/types/history/createTransitionManager.d.ts similarity index 100% rename from history/createTransitionManager.d.ts rename to types/history/createTransitionManager.d.ts diff --git a/history/history-tests.ts b/types/history/history-tests.ts similarity index 100% rename from history/history-tests.ts rename to types/history/history-tests.ts diff --git a/history/index.d.ts b/types/history/index.d.ts similarity index 100% rename from history/index.d.ts rename to types/history/index.d.ts diff --git a/history/tsconfig.json b/types/history/tsconfig.json similarity index 100% rename from history/tsconfig.json rename to types/history/tsconfig.json diff --git a/history/v2/history-tests.ts b/types/history/v2/history-tests.ts similarity index 100% rename from history/v2/history-tests.ts rename to types/history/v2/history-tests.ts diff --git a/history/v2/index.d.ts b/types/history/v2/index.d.ts similarity index 100% rename from history/v2/index.d.ts rename to types/history/v2/index.d.ts diff --git a/history/v2/lib/DOMUtils.d.ts b/types/history/v2/lib/DOMUtils.d.ts similarity index 100% rename from history/v2/lib/DOMUtils.d.ts rename to types/history/v2/lib/DOMUtils.d.ts diff --git a/history/v2/lib/actions.d.ts b/types/history/v2/lib/actions.d.ts similarity index 100% rename from history/v2/lib/actions.d.ts rename to types/history/v2/lib/actions.d.ts diff --git a/history/v2/lib/createBrowserHistory.d.ts b/types/history/v2/lib/createBrowserHistory.d.ts similarity index 100% rename from history/v2/lib/createBrowserHistory.d.ts rename to types/history/v2/lib/createBrowserHistory.d.ts diff --git a/history/v2/lib/createHashHistory.d.ts b/types/history/v2/lib/createHashHistory.d.ts similarity index 100% rename from history/v2/lib/createHashHistory.d.ts rename to types/history/v2/lib/createHashHistory.d.ts diff --git a/history/v2/lib/createLocation.d.ts b/types/history/v2/lib/createLocation.d.ts similarity index 100% rename from history/v2/lib/createLocation.d.ts rename to types/history/v2/lib/createLocation.d.ts diff --git a/history/v2/lib/createMemoryHistory.d.ts b/types/history/v2/lib/createMemoryHistory.d.ts similarity index 100% rename from history/v2/lib/createMemoryHistory.d.ts rename to types/history/v2/lib/createMemoryHistory.d.ts diff --git a/history/v2/lib/useBasename.d.ts b/types/history/v2/lib/useBasename.d.ts similarity index 100% rename from history/v2/lib/useBasename.d.ts rename to types/history/v2/lib/useBasename.d.ts diff --git a/history/v2/lib/useBeforeUnload.d.ts b/types/history/v2/lib/useBeforeUnload.d.ts similarity index 100% rename from history/v2/lib/useBeforeUnload.d.ts rename to types/history/v2/lib/useBeforeUnload.d.ts diff --git a/history/v2/lib/useQueries.d.ts b/types/history/v2/lib/useQueries.d.ts similarity index 100% rename from history/v2/lib/useQueries.d.ts rename to types/history/v2/lib/useQueries.d.ts diff --git a/history/v2/tsconfig.json b/types/history/v2/tsconfig.json similarity index 100% rename from history/v2/tsconfig.json rename to types/history/v2/tsconfig.json diff --git a/history/v3/index.d.ts b/types/history/v3/index.d.ts similarity index 100% rename from history/v3/index.d.ts rename to types/history/v3/index.d.ts diff --git a/history/v3/lib/LocationUtils.d.ts b/types/history/v3/lib/LocationUtils.d.ts similarity index 100% rename from history/v3/lib/LocationUtils.d.ts rename to types/history/v3/lib/LocationUtils.d.ts diff --git a/history/v3/lib/actions.d.ts b/types/history/v3/lib/actions.d.ts similarity index 100% rename from history/v3/lib/actions.d.ts rename to types/history/v3/lib/actions.d.ts diff --git a/history/v3/lib/createBrowserHistory.d.ts b/types/history/v3/lib/createBrowserHistory.d.ts similarity index 100% rename from history/v3/lib/createBrowserHistory.d.ts rename to types/history/v3/lib/createBrowserHistory.d.ts diff --git a/history/v3/lib/createHashHistory.d.ts b/types/history/v3/lib/createHashHistory.d.ts similarity index 100% rename from history/v3/lib/createHashHistory.d.ts rename to types/history/v3/lib/createHashHistory.d.ts diff --git a/history/v3/lib/createLocation.d.ts b/types/history/v3/lib/createLocation.d.ts similarity index 100% rename from history/v3/lib/createLocation.d.ts rename to types/history/v3/lib/createLocation.d.ts diff --git a/history/v3/lib/createMemoryHistory.d.ts b/types/history/v3/lib/createMemoryHistory.d.ts similarity index 100% rename from history/v3/lib/createMemoryHistory.d.ts rename to types/history/v3/lib/createMemoryHistory.d.ts diff --git a/history/v3/lib/useBasename.d.ts b/types/history/v3/lib/useBasename.d.ts similarity index 100% rename from history/v3/lib/useBasename.d.ts rename to types/history/v3/lib/useBasename.d.ts diff --git a/history/v3/lib/useBeforeUnload.d.ts b/types/history/v3/lib/useBeforeUnload.d.ts similarity index 100% rename from history/v3/lib/useBeforeUnload.d.ts rename to types/history/v3/lib/useBeforeUnload.d.ts diff --git a/history/v3/lib/useQueries.d.ts b/types/history/v3/lib/useQueries.d.ts similarity index 100% rename from history/v3/lib/useQueries.d.ts rename to types/history/v3/lib/useQueries.d.ts diff --git a/history/v3/tsconfig.json b/types/history/v3/tsconfig.json similarity index 100% rename from history/v3/tsconfig.json rename to types/history/v3/tsconfig.json diff --git a/hoek/hoek-tests.ts b/types/hoek/hoek-tests.ts similarity index 100% rename from hoek/hoek-tests.ts rename to types/hoek/hoek-tests.ts diff --git a/hoek/index.d.ts b/types/hoek/index.d.ts similarity index 100% rename from hoek/index.d.ts rename to types/hoek/index.d.ts diff --git a/hoek/tsconfig.json b/types/hoek/tsconfig.json similarity index 100% rename from hoek/tsconfig.json rename to types/hoek/tsconfig.json diff --git a/hiredis/tslint.json b/types/hoek/tslint.json similarity index 100% rename from hiredis/tslint.json rename to types/hoek/tslint.json diff --git a/hooker/hooker-tests.ts b/types/hooker/hooker-tests.ts similarity index 100% rename from hooker/hooker-tests.ts rename to types/hooker/hooker-tests.ts diff --git a/hooker/index.d.ts b/types/hooker/index.d.ts similarity index 100% rename from hooker/index.d.ts rename to types/hooker/index.d.ts diff --git a/hooker/tsconfig.json b/types/hooker/tsconfig.json similarity index 100% rename from hooker/tsconfig.json rename to types/hooker/tsconfig.json diff --git a/hopscotch/hopscotch-tests.ts b/types/hopscotch/hopscotch-tests.ts similarity index 100% rename from hopscotch/hopscotch-tests.ts rename to types/hopscotch/hopscotch-tests.ts diff --git a/hopscotch/index.d.ts b/types/hopscotch/index.d.ts similarity index 100% rename from hopscotch/index.d.ts rename to types/hopscotch/index.d.ts diff --git a/hopscotch/tsconfig.json b/types/hopscotch/tsconfig.json similarity index 100% rename from hopscotch/tsconfig.json rename to types/hopscotch/tsconfig.json diff --git a/howler/howler-tests.ts b/types/howler/howler-tests.ts similarity index 100% rename from howler/howler-tests.ts rename to types/howler/howler-tests.ts diff --git a/howler/index.d.ts b/types/howler/index.d.ts similarity index 100% rename from howler/index.d.ts rename to types/howler/index.d.ts diff --git a/howler/tsconfig.json b/types/howler/tsconfig.json similarity index 100% rename from howler/tsconfig.json rename to types/howler/tsconfig.json diff --git a/html-entities/html-entities-tests.ts b/types/html-entities/html-entities-tests.ts similarity index 100% rename from html-entities/html-entities-tests.ts rename to types/html-entities/html-entities-tests.ts diff --git a/html-entities/index.d.ts b/types/html-entities/index.d.ts similarity index 100% rename from html-entities/index.d.ts rename to types/html-entities/index.d.ts diff --git a/html-entities/tsconfig.json b/types/html-entities/tsconfig.json similarity index 100% rename from html-entities/tsconfig.json rename to types/html-entities/tsconfig.json diff --git a/html-minifier/html-minifier-tests.ts b/types/html-minifier/html-minifier-tests.ts similarity index 100% rename from html-minifier/html-minifier-tests.ts rename to types/html-minifier/html-minifier-tests.ts diff --git a/html-minifier/index.d.ts b/types/html-minifier/index.d.ts similarity index 100% rename from html-minifier/index.d.ts rename to types/html-minifier/index.d.ts diff --git a/html-minifier/tsconfig.json b/types/html-minifier/tsconfig.json similarity index 100% rename from html-minifier/tsconfig.json rename to types/html-minifier/tsconfig.json diff --git a/html-pdf/html-pdf-tests.ts b/types/html-pdf/html-pdf-tests.ts similarity index 100% rename from html-pdf/html-pdf-tests.ts rename to types/html-pdf/html-pdf-tests.ts diff --git a/html-pdf/index.d.ts b/types/html-pdf/index.d.ts similarity index 100% rename from html-pdf/index.d.ts rename to types/html-pdf/index.d.ts diff --git a/html-pdf/tsconfig.json b/types/html-pdf/tsconfig.json similarity index 100% rename from html-pdf/tsconfig.json rename to types/html-pdf/tsconfig.json diff --git a/html-to-text/html-to-text-tests.ts b/types/html-to-text/html-to-text-tests.ts similarity index 100% rename from html-to-text/html-to-text-tests.ts rename to types/html-to-text/html-to-text-tests.ts diff --git a/html-to-text/index.d.ts b/types/html-to-text/index.d.ts similarity index 100% rename from html-to-text/index.d.ts rename to types/html-to-text/index.d.ts diff --git a/html-to-text/tsconfig.json b/types/html-to-text/tsconfig.json similarity index 100% rename from html-to-text/tsconfig.json rename to types/html-to-text/tsconfig.json diff --git a/html-webpack-plugin/html-webpack-plugin-tests.ts b/types/html-webpack-plugin/html-webpack-plugin-tests.ts similarity index 100% rename from html-webpack-plugin/html-webpack-plugin-tests.ts rename to types/html-webpack-plugin/html-webpack-plugin-tests.ts diff --git a/html-webpack-plugin/index.d.ts b/types/html-webpack-plugin/index.d.ts similarity index 100% rename from html-webpack-plugin/index.d.ts rename to types/html-webpack-plugin/index.d.ts diff --git a/html-webpack-plugin/tsconfig.json b/types/html-webpack-plugin/tsconfig.json similarity index 100% rename from html-webpack-plugin/tsconfig.json rename to types/html-webpack-plugin/tsconfig.json diff --git a/hoek/tslint.json b/types/html-webpack-plugin/tslint.json similarity index 100% rename from hoek/tslint.json rename to types/html-webpack-plugin/tslint.json diff --git a/html-webpack-template/html-webpack-template-tests.ts b/types/html-webpack-template/html-webpack-template-tests.ts similarity index 100% rename from html-webpack-template/html-webpack-template-tests.ts rename to types/html-webpack-template/html-webpack-template-tests.ts diff --git a/html-webpack-template/index.d.ts b/types/html-webpack-template/index.d.ts similarity index 100% rename from html-webpack-template/index.d.ts rename to types/html-webpack-template/index.d.ts diff --git a/html-webpack-template/tsconfig.json b/types/html-webpack-template/tsconfig.json similarity index 100% rename from html-webpack-template/tsconfig.json rename to types/html-webpack-template/tsconfig.json diff --git a/html-webpack-plugin/tslint.json b/types/html-webpack-template/tslint.json similarity index 100% rename from html-webpack-plugin/tslint.json rename to types/html-webpack-template/tslint.json diff --git a/html2canvas/html2canvas-tests.ts b/types/html2canvas/html2canvas-tests.ts similarity index 100% rename from html2canvas/html2canvas-tests.ts rename to types/html2canvas/html2canvas-tests.ts diff --git a/html2canvas/index.d.ts b/types/html2canvas/index.d.ts similarity index 100% rename from html2canvas/index.d.ts rename to types/html2canvas/index.d.ts diff --git a/html2canvas/tsconfig.json b/types/html2canvas/tsconfig.json similarity index 100% rename from html2canvas/tsconfig.json rename to types/html2canvas/tsconfig.json diff --git a/types/htmlescape/htmlescape-tests.ts b/types/htmlescape/htmlescape-tests.ts new file mode 100644 index 0000000000..c3e174787c --- /dev/null +++ b/types/htmlescape/htmlescape-tests.ts @@ -0,0 +1,8 @@ +import * as htmlescape from "htmlescape"; +import { sanitize } from "htmlescape"; + +// === '{"x":"a\\u0026\\u003c\\u003e\\u2028\\u2029"}' +htmlescape({ x: "a&<>\u2028\u2029" }); + +// === 'a&<>\\u2028\\u2029' +sanitize("a&<>\u2028\u2029"); diff --git a/types/htmlescape/index.d.ts b/types/htmlescape/index.d.ts new file mode 100644 index 0000000000..23b9425e16 --- /dev/null +++ b/types/htmlescape/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for htmlescape 1.1 +// Project: https://github.com/zertosh/htmlescape +// Definitions by: bouzuya +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function htmlescape(o: any): string; +declare namespace htmlescape { + function sanitize(s: string): string; +} + +export = htmlescape; +export as namespace htmlescape; diff --git a/async/tsconfig.json b/types/htmlescape/tsconfig.json similarity index 89% rename from async/tsconfig.json rename to types/htmlescape/tsconfig.json index 5b8f42c6d2..6ba5d9819a 100644 --- a/async/tsconfig.json +++ b/types/htmlescape/tsconfig.json @@ -17,7 +17,6 @@ }, "files": [ "index.d.ts", - "test/index.ts", - "test/explicit.ts" + "htmlescape-tests.ts" ] } diff --git a/html-webpack-template/tslint.json b/types/htmlescape/tslint.json similarity index 100% rename from html-webpack-template/tslint.json rename to types/htmlescape/tslint.json diff --git a/types/htmlhint/htmlhint-tests.ts b/types/htmlhint/htmlhint-tests.ts new file mode 100644 index 0000000000..2eecf5d60d --- /dev/null +++ b/types/htmlhint/htmlhint-tests.ts @@ -0,0 +1,18 @@ +import { HTMLHint, RuleSet } from "htmlhint"; + +const htmlHintRules: RuleSet = { + "tagname-lowercase": true, + "attr-lowercase": true, + "attr-value-double-quotes": true, + "doctype-first": true, + "tag-pair": true, + "spec-char-escape": true, + "id-unique": true, + "src-not-empty": true, + "attr-no-duplication": true, + "title-require": true, + "space-tab-mixed-disabled": "tab" +}; + +const result = HTMLHint.verify('', htmlHintRules); +const formatted = HTMLHint.format(result, { indent: 2 }); diff --git a/htmlhint/index.d.ts b/types/htmlhint/index.d.ts similarity index 95% rename from htmlhint/index.d.ts rename to types/htmlhint/index.d.ts index 7908eaaddb..0afcff80f1 100644 --- a/htmlhint/index.d.ts +++ b/types/htmlhint/index.d.ts @@ -23,7 +23,7 @@ export interface Rule { } export interface RuleSet { - [id: string]: boolean; + [id: string]: boolean | string; } export namespace HTMLHint { diff --git a/htmlhint/tsconfig.json b/types/htmlhint/tsconfig.json similarity index 100% rename from htmlhint/tsconfig.json rename to types/htmlhint/tsconfig.json diff --git a/htmlparser2/htmlparser2-tests.ts b/types/htmlparser2/htmlparser2-tests.ts similarity index 100% rename from htmlparser2/htmlparser2-tests.ts rename to types/htmlparser2/htmlparser2-tests.ts diff --git a/htmlparser2/index.d.ts b/types/htmlparser2/index.d.ts similarity index 100% rename from htmlparser2/index.d.ts rename to types/htmlparser2/index.d.ts diff --git a/htmlparser2/tsconfig.json b/types/htmlparser2/tsconfig.json similarity index 100% rename from htmlparser2/tsconfig.json rename to types/htmlparser2/tsconfig.json diff --git a/htmltojsx/htmltojsx-tests.ts b/types/htmltojsx/htmltojsx-tests.ts similarity index 100% rename from htmltojsx/htmltojsx-tests.ts rename to types/htmltojsx/htmltojsx-tests.ts diff --git a/htmltojsx/index.d.ts b/types/htmltojsx/index.d.ts similarity index 100% rename from htmltojsx/index.d.ts rename to types/htmltojsx/index.d.ts diff --git a/htmltojsx/tsconfig.json b/types/htmltojsx/tsconfig.json similarity index 100% rename from htmltojsx/tsconfig.json rename to types/htmltojsx/tsconfig.json diff --git a/http-assert/http-assert-tests.ts b/types/http-assert/http-assert-tests.ts similarity index 100% rename from http-assert/http-assert-tests.ts rename to types/http-assert/http-assert-tests.ts diff --git a/http-assert/index.d.ts b/types/http-assert/index.d.ts similarity index 100% rename from http-assert/index.d.ts rename to types/http-assert/index.d.ts diff --git a/http-assert/tsconfig.json b/types/http-assert/tsconfig.json similarity index 100% rename from http-assert/tsconfig.json rename to types/http-assert/tsconfig.json diff --git a/http-assert/tslint.json b/types/http-assert/tslint.json similarity index 100% rename from http-assert/tslint.json rename to types/http-assert/tslint.json diff --git a/types/http-codes/index.d.ts b/types/http-codes/index.d.ts new file mode 100644 index 0000000000..0be3973652 --- /dev/null +++ b/types/http-codes/index.d.ts @@ -0,0 +1,67 @@ +// Type definitions for http-codes 1.0 +// Project: https://github.com/flesler/node-http-codes +// Definitions by: Mohamed Hegazy +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export const ACCEPTED: number; +export const ALREADY_REPORTED: number; +export const BAD_GATEWAY: number; +export const BAD_REQUEST: number; +export const BANDWIDTH_LIMIT_EXCEEDED: number; +export const CONFLICT: number; +export const CONTINUE: number; +export const CREATED: number; +export const EXPECTATION_FAILED: number; +export const FAILED_DEPENDENCY: number; +export const FORBIDDEN: number; +export const FOUND: number; +export const GATEWAY_TIMEOUT: number; +export const GONE: number; +export const HTTP_VERSION_NOT_SUPPORTED: number; +export const IM_A_TEAPOT: number; +export const IM_USED: number; +export const INSUFFICIENT_STORAGE: number; +export const INTERNAL_SERVER_ERROR: number; +export const LENGTH_REQUIRED: number; +export const LOCKED: number; +export const LOOP_DETECTED: number; +export const METHOD_NOT_ALLOWED: number; +export const MISDIRECTED_REQUEST: number; +export const MOVED_PERMANENTLY: number; +export const MULTIPLE_CHOICES: number; +export const MULTI_STATUS: number; +export const NETWORK_AUTHENTICATION_REQUIRED: number; +export const NON_AUTHORITATIVE_INFORMATION: number; +export const NOT_ACCEPTABLE: number; +export const NOT_EXTENDED: number; +export const NOT_FOUND: number; +export const NOT_IMPLEMENTED: number; +export const NOT_MODIFIED: number; +export const NO_CONTENT: number; +export const OK: number; +export const PARTIAL_CONTENT: number; +export const PAYLOAD_TOO_LARGE: number; +export const PAYMENT_REQUIRED: number; +export const PERMANENT_REDIRECT: number; +export const PRECONDITION_FAILED: number; +export const PRECONDITION_REQUIRED: number; +export const PROCESSING: number; +export const PROXY_AUTHENTICATION_REQUIRED: number; +export const RANGE_NOT_SATISFIABLE: number; +export const REQUEST_HEADER_FIELDS_TOO_LARGE: number; +export const REQUEST_TIMEOUT: number; +export const RESET_CONTENT: number; +export const SEE_OTHER: number; +export const SERVICE_UNAVAILABLE: number; +export const SWITCHING_PROTOCOLS: number; +export const TEMPORARY_REDIRECT: number; +export const TOO_MANY_REQUESTS: number; +export const UNAUTHORIZED: number; +export const UNAVAILABLE_FOR_LEGAL_REASONS: number; +export const UNORDERED_COLLECTION: number; +export const UNPROCESSABLE_ENTITY: number; +export const UNSUPPORTED_MEDIA_TYPE: number; +export const UPGRADE_REQUIRED: number; +export const URI_TOO_LONG: number; +export const USE_PROXY: number; +export const VARIANT_ALSO_NEGOTIATES: number; diff --git a/http-codes/tsconfig.json b/types/http-codes/tsconfig.json similarity index 100% rename from http-codes/tsconfig.json rename to types/http-codes/tsconfig.json diff --git a/http-codes/tslint.json b/types/http-codes/tslint.json similarity index 100% rename from http-codes/tslint.json rename to types/http-codes/tslint.json diff --git a/http-errors/http-errors-tests.ts b/types/http-errors/http-errors-tests.ts similarity index 100% rename from http-errors/http-errors-tests.ts rename to types/http-errors/http-errors-tests.ts diff --git a/http-errors/index.d.ts b/types/http-errors/index.d.ts similarity index 100% rename from http-errors/index.d.ts rename to types/http-errors/index.d.ts diff --git a/http-errors/tsconfig.json b/types/http-errors/tsconfig.json similarity index 100% rename from http-errors/tsconfig.json rename to types/http-errors/tsconfig.json diff --git a/http-link-header/http-link-header-tests.ts b/types/http-link-header/http-link-header-tests.ts similarity index 100% rename from http-link-header/http-link-header-tests.ts rename to types/http-link-header/http-link-header-tests.ts diff --git a/http-link-header/index.d.ts b/types/http-link-header/index.d.ts similarity index 100% rename from http-link-header/index.d.ts rename to types/http-link-header/index.d.ts diff --git a/http-link-header/tsconfig.json b/types/http-link-header/tsconfig.json similarity index 100% rename from http-link-header/tsconfig.json rename to types/http-link-header/tsconfig.json diff --git a/http-link-header/tslint.json b/types/http-link-header/tslint.json similarity index 100% rename from http-link-header/tslint.json rename to types/http-link-header/tslint.json diff --git a/http-status-codes/http-status-codes-tests.ts b/types/http-status-codes/http-status-codes-tests.ts similarity index 100% rename from http-status-codes/http-status-codes-tests.ts rename to types/http-status-codes/http-status-codes-tests.ts diff --git a/http-status-codes/index.d.ts b/types/http-status-codes/index.d.ts similarity index 100% rename from http-status-codes/index.d.ts rename to types/http-status-codes/index.d.ts diff --git a/http-status-codes/tsconfig.json b/types/http-status-codes/tsconfig.json similarity index 100% rename from http-status-codes/tsconfig.json rename to types/http-status-codes/tsconfig.json diff --git a/http-status/http-status-tests.ts b/types/http-status/http-status-tests.ts similarity index 100% rename from http-status/http-status-tests.ts rename to types/http-status/http-status-tests.ts diff --git a/http-status/index.d.ts b/types/http-status/index.d.ts similarity index 100% rename from http-status/index.d.ts rename to types/http-status/index.d.ts diff --git a/http-status/tsconfig.json b/types/http-status/tsconfig.json similarity index 100% rename from http-status/tsconfig.json rename to types/http-status/tsconfig.json diff --git a/http-string-parser/http-string-parser-tests.ts b/types/http-string-parser/http-string-parser-tests.ts similarity index 100% rename from http-string-parser/http-string-parser-tests.ts rename to types/http-string-parser/http-string-parser-tests.ts diff --git a/http-string-parser/index.d.ts b/types/http-string-parser/index.d.ts similarity index 100% rename from http-string-parser/index.d.ts rename to types/http-string-parser/index.d.ts diff --git a/http-string-parser/tsconfig.json b/types/http-string-parser/tsconfig.json similarity index 100% rename from http-string-parser/tsconfig.json rename to types/http-string-parser/tsconfig.json diff --git a/httperr/httperr-tests.ts b/types/httperr/httperr-tests.ts similarity index 100% rename from httperr/httperr-tests.ts rename to types/httperr/httperr-tests.ts diff --git a/httperr/index.d.ts b/types/httperr/index.d.ts similarity index 100% rename from httperr/index.d.ts rename to types/httperr/index.d.ts diff --git a/httperr/tsconfig.json b/types/httperr/tsconfig.json similarity index 100% rename from httperr/tsconfig.json rename to types/httperr/tsconfig.json diff --git a/hubspot-pace/hubspot-pace-tests.ts b/types/hubspot-pace/hubspot-pace-tests.ts similarity index 100% rename from hubspot-pace/hubspot-pace-tests.ts rename to types/hubspot-pace/hubspot-pace-tests.ts diff --git a/hubspot-pace/index.d.ts b/types/hubspot-pace/index.d.ts similarity index 100% rename from hubspot-pace/index.d.ts rename to types/hubspot-pace/index.d.ts diff --git a/hubspot-pace/tsconfig.json b/types/hubspot-pace/tsconfig.json similarity index 100% rename from hubspot-pace/tsconfig.json rename to types/hubspot-pace/tsconfig.json diff --git a/humane/humane-tests.ts b/types/humane/humane-tests.ts similarity index 100% rename from humane/humane-tests.ts rename to types/humane/humane-tests.ts diff --git a/humane/index.d.ts b/types/humane/index.d.ts similarity index 100% rename from humane/index.d.ts rename to types/humane/index.d.ts diff --git a/humane/tsconfig.json b/types/humane/tsconfig.json similarity index 100% rename from humane/tsconfig.json rename to types/humane/tsconfig.json diff --git a/humanparser/humanparser-tests.ts b/types/humanparser/humanparser-tests.ts similarity index 100% rename from humanparser/humanparser-tests.ts rename to types/humanparser/humanparser-tests.ts diff --git a/humanparser/index.d.ts b/types/humanparser/index.d.ts similarity index 100% rename from humanparser/index.d.ts rename to types/humanparser/index.d.ts diff --git a/humanparser/tsconfig.json b/types/humanparser/tsconfig.json similarity index 100% rename from humanparser/tsconfig.json rename to types/humanparser/tsconfig.json diff --git a/humps/humps-tests.ts b/types/humps/humps-tests.ts similarity index 100% rename from humps/humps-tests.ts rename to types/humps/humps-tests.ts diff --git a/humps/index.d.ts b/types/humps/index.d.ts similarity index 100% rename from humps/index.d.ts rename to types/humps/index.d.ts diff --git a/humps/tsconfig.json b/types/humps/tsconfig.json similarity index 100% rename from humps/tsconfig.json rename to types/humps/tsconfig.json diff --git a/hyco-ws/hyco-ws-tests.ts b/types/hyco-ws/hyco-ws-tests.ts similarity index 100% rename from hyco-ws/hyco-ws-tests.ts rename to types/hyco-ws/hyco-ws-tests.ts diff --git a/hyco-ws/index.d.ts b/types/hyco-ws/index.d.ts similarity index 100% rename from hyco-ws/index.d.ts rename to types/hyco-ws/index.d.ts diff --git a/hyco-ws/tsconfig.json b/types/hyco-ws/tsconfig.json similarity index 100% rename from hyco-ws/tsconfig.json rename to types/hyco-ws/tsconfig.json diff --git a/hyco-ws/tslint.json b/types/hyco-ws/tslint.json similarity index 100% rename from hyco-ws/tslint.json rename to types/hyco-ws/tslint.json diff --git a/hyperscript/hyperscript-tests.ts b/types/hyperscript/hyperscript-tests.ts similarity index 100% rename from hyperscript/hyperscript-tests.ts rename to types/hyperscript/hyperscript-tests.ts diff --git a/hyperscript/index.d.ts b/types/hyperscript/index.d.ts similarity index 100% rename from hyperscript/index.d.ts rename to types/hyperscript/index.d.ts diff --git a/hyperscript/tsconfig.json b/types/hyperscript/tsconfig.json similarity index 100% rename from hyperscript/tsconfig.json rename to types/hyperscript/tsconfig.json diff --git a/hypertext-application-language/hypertext-application-language-tests.ts b/types/hypertext-application-language/hypertext-application-language-tests.ts similarity index 100% rename from hypertext-application-language/hypertext-application-language-tests.ts rename to types/hypertext-application-language/hypertext-application-language-tests.ts diff --git a/hypertext-application-language/index.d.ts b/types/hypertext-application-language/index.d.ts similarity index 100% rename from hypertext-application-language/index.d.ts rename to types/hypertext-application-language/index.d.ts diff --git a/hypertext-application-language/tsconfig.json b/types/hypertext-application-language/tsconfig.json similarity index 100% rename from hypertext-application-language/tsconfig.json rename to types/hypertext-application-language/tsconfig.json diff --git a/hystrixjs/hystrixjs-tests.ts b/types/hystrixjs/hystrixjs-tests.ts similarity index 100% rename from hystrixjs/hystrixjs-tests.ts rename to types/hystrixjs/hystrixjs-tests.ts diff --git a/hystrixjs/index.d.ts b/types/hystrixjs/index.d.ts similarity index 100% rename from hystrixjs/index.d.ts rename to types/hystrixjs/index.d.ts diff --git a/hystrixjs/tsconfig.json b/types/hystrixjs/tsconfig.json similarity index 100% rename from hystrixjs/tsconfig.json rename to types/hystrixjs/tsconfig.json diff --git a/i18n/i18n-tests.ts b/types/i18n/i18n-tests.ts similarity index 100% rename from i18n/i18n-tests.ts rename to types/i18n/i18n-tests.ts diff --git a/i18n/index.d.ts b/types/i18n/index.d.ts similarity index 100% rename from i18n/index.d.ts rename to types/i18n/index.d.ts diff --git a/i18n/tsconfig.json b/types/i18n/tsconfig.json similarity index 100% rename from i18n/tsconfig.json rename to types/i18n/tsconfig.json diff --git a/i18next-browser-languagedetector/i18next-browser-languagedetector-tests.ts b/types/i18next-browser-languagedetector/i18next-browser-languagedetector-tests.ts similarity index 100% rename from i18next-browser-languagedetector/i18next-browser-languagedetector-tests.ts rename to types/i18next-browser-languagedetector/i18next-browser-languagedetector-tests.ts diff --git a/i18next-browser-languagedetector/index.d.ts b/types/i18next-browser-languagedetector/index.d.ts similarity index 100% rename from i18next-browser-languagedetector/index.d.ts rename to types/i18next-browser-languagedetector/index.d.ts diff --git a/i18next-browser-languagedetector/tsconfig.json b/types/i18next-browser-languagedetector/tsconfig.json similarity index 100% rename from i18next-browser-languagedetector/tsconfig.json rename to types/i18next-browser-languagedetector/tsconfig.json diff --git a/i18next-express-middleware/i18next-express-middleware-tests.ts b/types/i18next-express-middleware/i18next-express-middleware-tests.ts similarity index 100% rename from i18next-express-middleware/i18next-express-middleware-tests.ts rename to types/i18next-express-middleware/i18next-express-middleware-tests.ts diff --git a/i18next-express-middleware/index.d.ts b/types/i18next-express-middleware/index.d.ts similarity index 100% rename from i18next-express-middleware/index.d.ts rename to types/i18next-express-middleware/index.d.ts diff --git a/i18next-express-middleware/tsconfig.json b/types/i18next-express-middleware/tsconfig.json similarity index 100% rename from i18next-express-middleware/tsconfig.json rename to types/i18next-express-middleware/tsconfig.json diff --git a/i18next-node-fs-backend/i18next-node-fs-backend-tests.ts b/types/i18next-node-fs-backend/i18next-node-fs-backend-tests.ts similarity index 100% rename from i18next-node-fs-backend/i18next-node-fs-backend-tests.ts rename to types/i18next-node-fs-backend/i18next-node-fs-backend-tests.ts diff --git a/i18next-node-fs-backend/index.d.ts b/types/i18next-node-fs-backend/index.d.ts similarity index 100% rename from i18next-node-fs-backend/index.d.ts rename to types/i18next-node-fs-backend/index.d.ts diff --git a/i18next-node-fs-backend/tsconfig.json b/types/i18next-node-fs-backend/tsconfig.json similarity index 100% rename from i18next-node-fs-backend/tsconfig.json rename to types/i18next-node-fs-backend/tsconfig.json diff --git a/i18next-sprintf-postprocessor/i18next-sprintf-postprocessor-tests.ts b/types/i18next-sprintf-postprocessor/i18next-sprintf-postprocessor-tests.ts similarity index 100% rename from i18next-sprintf-postprocessor/i18next-sprintf-postprocessor-tests.ts rename to types/i18next-sprintf-postprocessor/i18next-sprintf-postprocessor-tests.ts diff --git a/i18next-sprintf-postprocessor/index.d.ts b/types/i18next-sprintf-postprocessor/index.d.ts similarity index 100% rename from i18next-sprintf-postprocessor/index.d.ts rename to types/i18next-sprintf-postprocessor/index.d.ts diff --git a/i18next-sprintf-postprocessor/tsconfig.json b/types/i18next-sprintf-postprocessor/tsconfig.json similarity index 100% rename from i18next-sprintf-postprocessor/tsconfig.json rename to types/i18next-sprintf-postprocessor/tsconfig.json diff --git a/i18next-xhr-backend/i18next-xhr-backend-tests.ts b/types/i18next-xhr-backend/i18next-xhr-backend-tests.ts similarity index 100% rename from i18next-xhr-backend/i18next-xhr-backend-tests.ts rename to types/i18next-xhr-backend/i18next-xhr-backend-tests.ts diff --git a/i18next-xhr-backend/index.d.ts b/types/i18next-xhr-backend/index.d.ts similarity index 100% rename from i18next-xhr-backend/index.d.ts rename to types/i18next-xhr-backend/index.d.ts diff --git a/i18next-xhr-backend/tsconfig.json b/types/i18next-xhr-backend/tsconfig.json similarity index 100% rename from i18next-xhr-backend/tsconfig.json rename to types/i18next-xhr-backend/tsconfig.json diff --git a/i18next/i18next-tests.ts b/types/i18next/i18next-tests.ts similarity index 100% rename from i18next/i18next-tests.ts rename to types/i18next/i18next-tests.ts diff --git a/i18next/index.d.ts b/types/i18next/index.d.ts similarity index 100% rename from i18next/index.d.ts rename to types/i18next/index.d.ts diff --git a/i18next/tsconfig.json b/types/i18next/tsconfig.json similarity index 100% rename from i18next/tsconfig.json rename to types/i18next/tsconfig.json diff --git a/i2c-bus/i2c-bus-tests.ts b/types/i2c-bus/i2c-bus-tests.ts similarity index 100% rename from i2c-bus/i2c-bus-tests.ts rename to types/i2c-bus/i2c-bus-tests.ts diff --git a/i2c-bus/index.d.ts b/types/i2c-bus/index.d.ts similarity index 100% rename from i2c-bus/index.d.ts rename to types/i2c-bus/index.d.ts diff --git a/i2c-bus/tsconfig.json b/types/i2c-bus/tsconfig.json similarity index 100% rename from i2c-bus/tsconfig.json rename to types/i2c-bus/tsconfig.json diff --git a/iban/iban-tests.ts b/types/iban/iban-tests.ts similarity index 100% rename from iban/iban-tests.ts rename to types/iban/iban-tests.ts diff --git a/iban/index.d.ts b/types/iban/index.d.ts similarity index 100% rename from iban/index.d.ts rename to types/iban/index.d.ts diff --git a/iban/tsconfig.json b/types/iban/tsconfig.json similarity index 100% rename from iban/tsconfig.json rename to types/iban/tsconfig.json diff --git a/ibm-mobilefirst/ibm-mobilefirst-tests.ts b/types/ibm-mobilefirst/ibm-mobilefirst-tests.ts similarity index 100% rename from ibm-mobilefirst/ibm-mobilefirst-tests.ts rename to types/ibm-mobilefirst/ibm-mobilefirst-tests.ts diff --git a/ibm-mobilefirst/index.d.ts b/types/ibm-mobilefirst/index.d.ts similarity index 100% rename from ibm-mobilefirst/index.d.ts rename to types/ibm-mobilefirst/index.d.ts diff --git a/ibm-mobilefirst/tsconfig.json b/types/ibm-mobilefirst/tsconfig.json similarity index 100% rename from ibm-mobilefirst/tsconfig.json rename to types/ibm-mobilefirst/tsconfig.json diff --git a/icepick/icepick-tests.ts b/types/icepick/icepick-tests.ts similarity index 100% rename from icepick/icepick-tests.ts rename to types/icepick/icepick-tests.ts diff --git a/icepick/index.d.ts b/types/icepick/index.d.ts similarity index 100% rename from icepick/index.d.ts rename to types/icepick/index.d.ts diff --git a/icepick/tsconfig.json b/types/icepick/tsconfig.json similarity index 100% rename from icepick/tsconfig.json rename to types/icepick/tsconfig.json diff --git a/icheck/icheck-tests.ts b/types/icheck/icheck-tests.ts similarity index 100% rename from icheck/icheck-tests.ts rename to types/icheck/icheck-tests.ts diff --git a/icheck/index.d.ts b/types/icheck/index.d.ts similarity index 100% rename from icheck/index.d.ts rename to types/icheck/index.d.ts diff --git a/icheck/tsconfig.json b/types/icheck/tsconfig.json similarity index 100% rename from icheck/tsconfig.json rename to types/icheck/tsconfig.json diff --git a/iconv-lite/iconv-lite-tests.ts b/types/iconv-lite/iconv-lite-tests.ts similarity index 100% rename from iconv-lite/iconv-lite-tests.ts rename to types/iconv-lite/iconv-lite-tests.ts diff --git a/iconv-lite/index.d.ts b/types/iconv-lite/index.d.ts similarity index 100% rename from iconv-lite/index.d.ts rename to types/iconv-lite/index.d.ts diff --git a/iconv-lite/tsconfig.json b/types/iconv-lite/tsconfig.json similarity index 100% rename from iconv-lite/tsconfig.json rename to types/iconv-lite/tsconfig.json diff --git a/iconv/iconv-tests.ts b/types/iconv/iconv-tests.ts similarity index 100% rename from iconv/iconv-tests.ts rename to types/iconv/iconv-tests.ts diff --git a/iconv/index.d.ts b/types/iconv/index.d.ts similarity index 100% rename from iconv/index.d.ts rename to types/iconv/index.d.ts diff --git a/iconv/tsconfig.json b/types/iconv/tsconfig.json similarity index 100% rename from iconv/tsconfig.json rename to types/iconv/tsconfig.json diff --git a/ids/ids-tests.ts b/types/ids/ids-tests.ts similarity index 100% rename from ids/ids-tests.ts rename to types/ids/ids-tests.ts diff --git a/ids/index.d.ts b/types/ids/index.d.ts similarity index 100% rename from ids/index.d.ts rename to types/ids/index.d.ts diff --git a/ids/tsconfig.json b/types/ids/tsconfig.json similarity index 100% rename from ids/tsconfig.json rename to types/ids/tsconfig.json diff --git a/image-size/image-size-tests.ts b/types/image-size/image-size-tests.ts similarity index 100% rename from image-size/image-size-tests.ts rename to types/image-size/image-size-tests.ts diff --git a/image-size/index.d.ts b/types/image-size/index.d.ts similarity index 100% rename from image-size/index.d.ts rename to types/image-size/index.d.ts diff --git a/image-size/tsconfig.json b/types/image-size/tsconfig.json similarity index 100% rename from image-size/tsconfig.json rename to types/image-size/tsconfig.json diff --git a/imagemagick-native/imagemagick-native-tests.ts b/types/imagemagick-native/imagemagick-native-tests.ts similarity index 100% rename from imagemagick-native/imagemagick-native-tests.ts rename to types/imagemagick-native/imagemagick-native-tests.ts diff --git a/imagemagick-native/index.d.ts b/types/imagemagick-native/index.d.ts similarity index 100% rename from imagemagick-native/index.d.ts rename to types/imagemagick-native/index.d.ts diff --git a/imagemagick-native/tsconfig.json b/types/imagemagick-native/tsconfig.json similarity index 100% rename from imagemagick-native/tsconfig.json rename to types/imagemagick-native/tsconfig.json diff --git a/imagemagick/imagemagick-tests.ts b/types/imagemagick/imagemagick-tests.ts similarity index 100% rename from imagemagick/imagemagick-tests.ts rename to types/imagemagick/imagemagick-tests.ts diff --git a/imagemagick/index.d.ts b/types/imagemagick/index.d.ts similarity index 100% rename from imagemagick/index.d.ts rename to types/imagemagick/index.d.ts diff --git a/imagemagick/tsconfig.json b/types/imagemagick/tsconfig.json similarity index 100% rename from imagemagick/tsconfig.json rename to types/imagemagick/tsconfig.json diff --git a/imagemapster/imagemapster-tests.ts b/types/imagemapster/imagemapster-tests.ts similarity index 100% rename from imagemapster/imagemapster-tests.ts rename to types/imagemapster/imagemapster-tests.ts diff --git a/imagemapster/index.d.ts b/types/imagemapster/index.d.ts similarity index 100% rename from imagemapster/index.d.ts rename to types/imagemapster/index.d.ts diff --git a/imagemapster/tsconfig.json b/types/imagemapster/tsconfig.json similarity index 100% rename from imagemapster/tsconfig.json rename to types/imagemapster/tsconfig.json diff --git a/imagesloaded/imagesloaded-tests.ts b/types/imagesloaded/imagesloaded-tests.ts similarity index 100% rename from imagesloaded/imagesloaded-tests.ts rename to types/imagesloaded/imagesloaded-tests.ts diff --git a/imagesloaded/index.d.ts b/types/imagesloaded/index.d.ts similarity index 100% rename from imagesloaded/index.d.ts rename to types/imagesloaded/index.d.ts diff --git a/imagesloaded/tsconfig.json b/types/imagesloaded/tsconfig.json similarity index 100% rename from imagesloaded/tsconfig.json rename to types/imagesloaded/tsconfig.json diff --git a/imap-simple/imap-simple-tests.ts b/types/imap-simple/imap-simple-tests.ts similarity index 100% rename from imap-simple/imap-simple-tests.ts rename to types/imap-simple/imap-simple-tests.ts diff --git a/imap-simple/index.d.ts b/types/imap-simple/index.d.ts similarity index 100% rename from imap-simple/index.d.ts rename to types/imap-simple/index.d.ts diff --git a/imap-simple/tsconfig.json b/types/imap-simple/tsconfig.json similarity index 100% rename from imap-simple/tsconfig.json rename to types/imap-simple/tsconfig.json diff --git a/imap/imap-tests.ts b/types/imap/imap-tests.ts similarity index 100% rename from imap/imap-tests.ts rename to types/imap/imap-tests.ts diff --git a/imap/index.d.ts b/types/imap/index.d.ts similarity index 100% rename from imap/index.d.ts rename to types/imap/index.d.ts diff --git a/imap/tsconfig.json b/types/imap/tsconfig.json similarity index 100% rename from imap/tsconfig.json rename to types/imap/tsconfig.json diff --git a/imgur-rest-api/imgur-rest-api-tests.ts b/types/imgur-rest-api/imgur-rest-api-tests.ts similarity index 100% rename from imgur-rest-api/imgur-rest-api-tests.ts rename to types/imgur-rest-api/imgur-rest-api-tests.ts diff --git a/imgur-rest-api/index.d.ts b/types/imgur-rest-api/index.d.ts similarity index 100% rename from imgur-rest-api/index.d.ts rename to types/imgur-rest-api/index.d.ts diff --git a/imgur-rest-api/tsconfig.json b/types/imgur-rest-api/tsconfig.json similarity index 100% rename from imgur-rest-api/tsconfig.json rename to types/imgur-rest-api/tsconfig.json diff --git a/immutability-helper/immutability-helper-tests.ts b/types/immutability-helper/immutability-helper-tests.ts similarity index 100% rename from immutability-helper/immutability-helper-tests.ts rename to types/immutability-helper/immutability-helper-tests.ts diff --git a/immutability-helper/index.d.ts b/types/immutability-helper/index.d.ts similarity index 100% rename from immutability-helper/index.d.ts rename to types/immutability-helper/index.d.ts diff --git a/immutability-helper/tsconfig.json b/types/immutability-helper/tsconfig.json similarity index 100% rename from immutability-helper/tsconfig.json rename to types/immutability-helper/tsconfig.json diff --git a/impress/impress-tests.ts b/types/impress/impress-tests.ts similarity index 100% rename from impress/impress-tests.ts rename to types/impress/impress-tests.ts diff --git a/impress/index.d.ts b/types/impress/index.d.ts similarity index 100% rename from impress/index.d.ts rename to types/impress/index.d.ts diff --git a/impress/tsconfig.json b/types/impress/tsconfig.json similarity index 100% rename from impress/tsconfig.json rename to types/impress/tsconfig.json diff --git a/in-range/in-range-tests.ts b/types/in-range/in-range-tests.ts similarity index 100% rename from in-range/in-range-tests.ts rename to types/in-range/in-range-tests.ts diff --git a/in-range/index.d.ts b/types/in-range/index.d.ts similarity index 100% rename from in-range/index.d.ts rename to types/in-range/index.d.ts diff --git a/in-range/tsconfig.json b/types/in-range/tsconfig.json similarity index 100% rename from in-range/tsconfig.json rename to types/in-range/tsconfig.json diff --git a/in-range/tslint.json b/types/in-range/tslint.json similarity index 100% rename from in-range/tslint.json rename to types/in-range/tslint.json diff --git a/incremental-dom/incremental-dom-tests.ts b/types/incremental-dom/incremental-dom-tests.ts similarity index 100% rename from incremental-dom/incremental-dom-tests.ts rename to types/incremental-dom/incremental-dom-tests.ts diff --git a/incremental-dom/index.d.ts b/types/incremental-dom/index.d.ts similarity index 100% rename from incremental-dom/index.d.ts rename to types/incremental-dom/index.d.ts diff --git a/incremental-dom/tsconfig.json b/types/incremental-dom/tsconfig.json similarity index 100% rename from incremental-dom/tsconfig.json rename to types/incremental-dom/tsconfig.json diff --git a/indent-string/indent-string-tests.ts b/types/indent-string/indent-string-tests.ts similarity index 100% rename from indent-string/indent-string-tests.ts rename to types/indent-string/indent-string-tests.ts diff --git a/indent-string/index.d.ts b/types/indent-string/index.d.ts similarity index 100% rename from indent-string/index.d.ts rename to types/indent-string/index.d.ts diff --git a/indent-string/tsconfig.json b/types/indent-string/tsconfig.json similarity index 100% rename from indent-string/tsconfig.json rename to types/indent-string/tsconfig.json diff --git a/indent-string/tslint.json b/types/indent-string/tslint.json similarity index 100% rename from indent-string/tslint.json rename to types/indent-string/tslint.json diff --git a/inert/index.d.ts b/types/inert/index.d.ts similarity index 100% rename from inert/index.d.ts rename to types/inert/index.d.ts diff --git a/inert/inert-tests.ts b/types/inert/inert-tests.ts similarity index 100% rename from inert/inert-tests.ts rename to types/inert/inert-tests.ts diff --git a/inert/tsconfig.json b/types/inert/tsconfig.json similarity index 100% rename from inert/tsconfig.json rename to types/inert/tsconfig.json diff --git a/inert/tslint.json b/types/inert/tslint.json similarity index 100% rename from inert/tslint.json rename to types/inert/tslint.json diff --git a/inflected/index.d.ts b/types/inflected/index.d.ts similarity index 100% rename from inflected/index.d.ts rename to types/inflected/index.d.ts diff --git a/inflected/inflected-tests.ts b/types/inflected/inflected-tests.ts similarity index 100% rename from inflected/inflected-tests.ts rename to types/inflected/inflected-tests.ts diff --git a/inflected/tsconfig.json b/types/inflected/tsconfig.json similarity index 100% rename from inflected/tsconfig.json rename to types/inflected/tsconfig.json diff --git a/inflection/index.d.ts b/types/inflection/index.d.ts similarity index 100% rename from inflection/index.d.ts rename to types/inflection/index.d.ts diff --git a/inflection/inflection-tests.ts b/types/inflection/inflection-tests.ts similarity index 100% rename from inflection/inflection-tests.ts rename to types/inflection/inflection-tests.ts diff --git a/inflection/tsconfig.json b/types/inflection/tsconfig.json similarity index 100% rename from inflection/tsconfig.json rename to types/inflection/tsconfig.json diff --git a/inherits/index.d.ts b/types/inherits/index.d.ts similarity index 100% rename from inherits/index.d.ts rename to types/inherits/index.d.ts diff --git a/inherits/inherits-tests.ts b/types/inherits/inherits-tests.ts similarity index 100% rename from inherits/inherits-tests.ts rename to types/inherits/inherits-tests.ts diff --git a/inherits/tsconfig.json b/types/inherits/tsconfig.json similarity index 100% rename from inherits/tsconfig.json rename to types/inherits/tsconfig.json diff --git a/ini/index.d.ts b/types/ini/index.d.ts similarity index 100% rename from ini/index.d.ts rename to types/ini/index.d.ts diff --git a/ini/ini-tests.ts b/types/ini/ini-tests.ts similarity index 100% rename from ini/ini-tests.ts rename to types/ini/ini-tests.ts diff --git a/ini/tsconfig.json b/types/ini/tsconfig.json similarity index 100% rename from ini/tsconfig.json rename to types/ini/tsconfig.json diff --git a/iniparser/index.d.ts b/types/iniparser/index.d.ts similarity index 100% rename from iniparser/index.d.ts rename to types/iniparser/index.d.ts diff --git a/iniparser/iniparser-tests.ts b/types/iniparser/iniparser-tests.ts similarity index 100% rename from iniparser/iniparser-tests.ts rename to types/iniparser/iniparser-tests.ts diff --git a/iniparser/tsconfig.json b/types/iniparser/tsconfig.json similarity index 100% rename from iniparser/tsconfig.json rename to types/iniparser/tsconfig.json diff --git a/inline-css/index.d.ts b/types/inline-css/index.d.ts similarity index 100% rename from inline-css/index.d.ts rename to types/inline-css/index.d.ts diff --git a/inline-css/inline-css-tests.ts b/types/inline-css/inline-css-tests.ts similarity index 100% rename from inline-css/inline-css-tests.ts rename to types/inline-css/inline-css-tests.ts diff --git a/inline-css/tsconfig.json b/types/inline-css/tsconfig.json similarity index 100% rename from inline-css/tsconfig.json rename to types/inline-css/tsconfig.json diff --git a/inquirer/index.d.ts b/types/inquirer/index.d.ts similarity index 100% rename from inquirer/index.d.ts rename to types/inquirer/index.d.ts diff --git a/inquirer/inquirer-tests.ts b/types/inquirer/inquirer-tests.ts similarity index 100% rename from inquirer/inquirer-tests.ts rename to types/inquirer/inquirer-tests.ts diff --git a/inquirer/tsconfig.json b/types/inquirer/tsconfig.json similarity index 100% rename from inquirer/tsconfig.json rename to types/inquirer/tsconfig.json diff --git a/insight/index.d.ts b/types/insight/index.d.ts similarity index 100% rename from insight/index.d.ts rename to types/insight/index.d.ts diff --git a/insight/insight-tests.ts b/types/insight/insight-tests.ts similarity index 100% rename from insight/insight-tests.ts rename to types/insight/insight-tests.ts diff --git a/insight/tsconfig.json b/types/insight/tsconfig.json similarity index 100% rename from insight/tsconfig.json rename to types/insight/tsconfig.json diff --git a/interact.js/index.d.ts b/types/interact.js/index.d.ts similarity index 100% rename from interact.js/index.d.ts rename to types/interact.js/index.d.ts diff --git a/interact.js/interact.js-tests.ts b/types/interact.js/interact.js-tests.ts similarity index 100% rename from interact.js/interact.js-tests.ts rename to types/interact.js/interact.js-tests.ts diff --git a/interact.js/tsconfig.json b/types/interact.js/tsconfig.json similarity index 100% rename from interact.js/tsconfig.json rename to types/interact.js/tsconfig.json diff --git a/intercomjs/index.d.ts b/types/intercomjs/index.d.ts similarity index 100% rename from intercomjs/index.d.ts rename to types/intercomjs/index.d.ts diff --git a/intercomjs/intercomjs-tests.ts b/types/intercomjs/intercomjs-tests.ts similarity index 100% rename from intercomjs/intercomjs-tests.ts rename to types/intercomjs/intercomjs-tests.ts diff --git a/intercomjs/tsconfig.json b/types/intercomjs/tsconfig.json similarity index 100% rename from intercomjs/tsconfig.json rename to types/intercomjs/tsconfig.json diff --git a/intl-messageformat/index.d.ts b/types/intl-messageformat/index.d.ts similarity index 100% rename from intl-messageformat/index.d.ts rename to types/intl-messageformat/index.d.ts diff --git a/intl-messageformat/intl-messageformat-tests.ts b/types/intl-messageformat/intl-messageformat-tests.ts similarity index 100% rename from intl-messageformat/intl-messageformat-tests.ts rename to types/intl-messageformat/intl-messageformat-tests.ts diff --git a/intl-messageformat/tsconfig.json b/types/intl-messageformat/tsconfig.json similarity index 100% rename from intl-messageformat/tsconfig.json rename to types/intl-messageformat/tsconfig.json diff --git a/intl-messageformat/tslint.json b/types/intl-messageformat/tslint.json similarity index 100% rename from intl-messageformat/tslint.json rename to types/intl-messageformat/tslint.json diff --git a/intl-tel-input/index.d.ts b/types/intl-tel-input/index.d.ts similarity index 100% rename from intl-tel-input/index.d.ts rename to types/intl-tel-input/index.d.ts diff --git a/intl-tel-input/intl-tel-input-tests.ts b/types/intl-tel-input/intl-tel-input-tests.ts similarity index 100% rename from intl-tel-input/intl-tel-input-tests.ts rename to types/intl-tel-input/intl-tel-input-tests.ts diff --git a/intl-tel-input/tsconfig.json b/types/intl-tel-input/tsconfig.json similarity index 100% rename from intl-tel-input/tsconfig.json rename to types/intl-tel-input/tsconfig.json diff --git a/intro.js/index.d.ts b/types/intro.js/index.d.ts similarity index 100% rename from intro.js/index.d.ts rename to types/intro.js/index.d.ts diff --git a/intro.js/intro.js-tests.ts b/types/intro.js/intro.js-tests.ts similarity index 100% rename from intro.js/intro.js-tests.ts rename to types/intro.js/intro.js-tests.ts diff --git a/intro.js/tsconfig.json b/types/intro.js/tsconfig.json similarity index 100% rename from intro.js/tsconfig.json rename to types/intro.js/tsconfig.json diff --git a/invariant/index.d.ts b/types/invariant/index.d.ts similarity index 100% rename from invariant/index.d.ts rename to types/invariant/index.d.ts diff --git a/invariant/invariant-tests.ts b/types/invariant/invariant-tests.ts similarity index 100% rename from invariant/invariant-tests.ts rename to types/invariant/invariant-tests.ts diff --git a/invariant/tsconfig.json b/types/invariant/tsconfig.json similarity index 100% rename from invariant/tsconfig.json rename to types/invariant/tsconfig.json diff --git a/inversify-devtools/index.d.ts b/types/inversify-devtools/index.d.ts similarity index 100% rename from inversify-devtools/index.d.ts rename to types/inversify-devtools/index.d.ts diff --git a/inversify-devtools/inversify-devtools-tests.ts b/types/inversify-devtools/inversify-devtools-tests.ts similarity index 100% rename from inversify-devtools/inversify-devtools-tests.ts rename to types/inversify-devtools/inversify-devtools-tests.ts diff --git a/inversify-devtools/package.json b/types/inversify-devtools/package.json similarity index 100% rename from inversify-devtools/package.json rename to types/inversify-devtools/package.json diff --git a/inversify-devtools/tsconfig.json b/types/inversify-devtools/tsconfig.json similarity index 100% rename from inversify-devtools/tsconfig.json rename to types/inversify-devtools/tsconfig.json diff --git a/ion.rangeslider/index.d.ts b/types/ion.rangeslider/index.d.ts similarity index 100% rename from ion.rangeslider/index.d.ts rename to types/ion.rangeslider/index.d.ts diff --git a/ion.rangeslider/ion.rangeslider-tests.ts b/types/ion.rangeslider/ion.rangeslider-tests.ts similarity index 100% rename from ion.rangeslider/ion.rangeslider-tests.ts rename to types/ion.rangeslider/ion.rangeslider-tests.ts diff --git a/ion.rangeslider/tsconfig.json b/types/ion.rangeslider/tsconfig.json similarity index 100% rename from ion.rangeslider/tsconfig.json rename to types/ion.rangeslider/tsconfig.json diff --git a/ion.rangeslider/v1/index.d.ts b/types/ion.rangeslider/v1/index.d.ts similarity index 100% rename from ion.rangeslider/v1/index.d.ts rename to types/ion.rangeslider/v1/index.d.ts diff --git a/ion.rangeslider/v1/ion.rangeslider-tests.ts b/types/ion.rangeslider/v1/ion.rangeslider-tests.ts similarity index 100% rename from ion.rangeslider/v1/ion.rangeslider-tests.ts rename to types/ion.rangeslider/v1/ion.rangeslider-tests.ts diff --git a/ion.rangeslider/v1/tsconfig.json b/types/ion.rangeslider/v1/tsconfig.json similarity index 100% rename from ion.rangeslider/v1/tsconfig.json rename to types/ion.rangeslider/v1/tsconfig.json diff --git a/ionic/index.d.ts b/types/ionic/index.d.ts similarity index 100% rename from ionic/index.d.ts rename to types/ionic/index.d.ts diff --git a/ionic/ionic-tests.ts b/types/ionic/ionic-tests.ts similarity index 100% rename from ionic/ionic-tests.ts rename to types/ionic/ionic-tests.ts diff --git a/ionic/tsconfig.json b/types/ionic/tsconfig.json similarity index 100% rename from ionic/tsconfig.json rename to types/ionic/tsconfig.json diff --git a/ioredis/index.d.ts b/types/ioredis/index.d.ts similarity index 100% rename from ioredis/index.d.ts rename to types/ioredis/index.d.ts diff --git a/ioredis/ioredis-tests.ts b/types/ioredis/ioredis-tests.ts similarity index 100% rename from ioredis/ioredis-tests.ts rename to types/ioredis/ioredis-tests.ts diff --git a/ioredis/tsconfig.json b/types/ioredis/tsconfig.json similarity index 100% rename from ioredis/tsconfig.json rename to types/ioredis/tsconfig.json diff --git a/ip-regex/index.d.ts b/types/ip-regex/index.d.ts similarity index 100% rename from ip-regex/index.d.ts rename to types/ip-regex/index.d.ts diff --git a/ip-regex/ip-regex-tests.ts b/types/ip-regex/ip-regex-tests.ts similarity index 100% rename from ip-regex/ip-regex-tests.ts rename to types/ip-regex/ip-regex-tests.ts diff --git a/ip-regex/tsconfig.json b/types/ip-regex/tsconfig.json similarity index 100% rename from ip-regex/tsconfig.json rename to types/ip-regex/tsconfig.json diff --git a/ip-regex/tslint.json b/types/ip-regex/tslint.json similarity index 100% rename from ip-regex/tslint.json rename to types/ip-regex/tslint.json diff --git a/ip/index.d.ts b/types/ip/index.d.ts similarity index 100% rename from ip/index.d.ts rename to types/ip/index.d.ts diff --git a/ip/ip-tests.ts b/types/ip/ip-tests.ts similarity index 100% rename from ip/ip-tests.ts rename to types/ip/ip-tests.ts diff --git a/ip/tsconfig.json b/types/ip/tsconfig.json similarity index 100% rename from ip/tsconfig.json rename to types/ip/tsconfig.json diff --git a/irc/index.d.ts b/types/irc/index.d.ts similarity index 100% rename from irc/index.d.ts rename to types/irc/index.d.ts diff --git a/irc/irc-tests.ts b/types/irc/irc-tests.ts similarity index 100% rename from irc/irc-tests.ts rename to types/irc/irc-tests.ts diff --git a/irc/tsconfig.json b/types/irc/tsconfig.json similarity index 100% rename from irc/tsconfig.json rename to types/irc/tsconfig.json diff --git a/is-absolute-url/index.d.ts b/types/is-absolute-url/index.d.ts similarity index 100% rename from is-absolute-url/index.d.ts rename to types/is-absolute-url/index.d.ts diff --git a/is-absolute-url/is-absolute-url-tests.ts b/types/is-absolute-url/is-absolute-url-tests.ts similarity index 100% rename from is-absolute-url/is-absolute-url-tests.ts rename to types/is-absolute-url/is-absolute-url-tests.ts diff --git a/is-absolute-url/tsconfig.json b/types/is-absolute-url/tsconfig.json similarity index 100% rename from is-absolute-url/tsconfig.json rename to types/is-absolute-url/tsconfig.json diff --git a/is-absolute-url/tslint.json b/types/is-absolute-url/tslint.json similarity index 100% rename from is-absolute-url/tslint.json rename to types/is-absolute-url/tslint.json diff --git a/is-archive/index.d.ts b/types/is-archive/index.d.ts similarity index 100% rename from is-archive/index.d.ts rename to types/is-archive/index.d.ts diff --git a/is-archive/is-archive-tests.ts b/types/is-archive/is-archive-tests.ts similarity index 100% rename from is-archive/is-archive-tests.ts rename to types/is-archive/is-archive-tests.ts diff --git a/is-archive/tsconfig.json b/types/is-archive/tsconfig.json similarity index 100% rename from is-archive/tsconfig.json rename to types/is-archive/tsconfig.json diff --git a/is-archive/tslint.json b/types/is-archive/tslint.json similarity index 100% rename from is-archive/tslint.json rename to types/is-archive/tslint.json diff --git a/is-array/index.d.ts b/types/is-array/index.d.ts similarity index 100% rename from is-array/index.d.ts rename to types/is-array/index.d.ts diff --git a/is-array/is-array-tests.ts b/types/is-array/is-array-tests.ts similarity index 100% rename from is-array/is-array-tests.ts rename to types/is-array/is-array-tests.ts diff --git a/is-array/tsconfig.json b/types/is-array/tsconfig.json similarity index 100% rename from is-array/tsconfig.json rename to types/is-array/tsconfig.json diff --git a/is-array/tslint.json b/types/is-array/tslint.json similarity index 100% rename from is-array/tslint.json rename to types/is-array/tslint.json diff --git a/is-binary-path/index.d.ts b/types/is-binary-path/index.d.ts similarity index 100% rename from is-binary-path/index.d.ts rename to types/is-binary-path/index.d.ts diff --git a/is-binary-path/is-binary-path-tests.ts b/types/is-binary-path/is-binary-path-tests.ts similarity index 100% rename from is-binary-path/is-binary-path-tests.ts rename to types/is-binary-path/is-binary-path-tests.ts diff --git a/is-binary-path/tsconfig.json b/types/is-binary-path/tsconfig.json similarity index 100% rename from is-binary-path/tsconfig.json rename to types/is-binary-path/tsconfig.json diff --git a/is-binary-path/tslint.json b/types/is-binary-path/tslint.json similarity index 100% rename from is-binary-path/tslint.json rename to types/is-binary-path/tslint.json diff --git a/is-compressed/index.d.ts b/types/is-compressed/index.d.ts similarity index 100% rename from is-compressed/index.d.ts rename to types/is-compressed/index.d.ts diff --git a/is-compressed/is-compressed-tests.ts b/types/is-compressed/is-compressed-tests.ts similarity index 100% rename from is-compressed/is-compressed-tests.ts rename to types/is-compressed/is-compressed-tests.ts diff --git a/is-compressed/tsconfig.json b/types/is-compressed/tsconfig.json similarity index 100% rename from is-compressed/tsconfig.json rename to types/is-compressed/tsconfig.json diff --git a/is-compressed/tslint.json b/types/is-compressed/tslint.json similarity index 100% rename from is-compressed/tslint.json rename to types/is-compressed/tslint.json diff --git a/is-finite/index.d.ts b/types/is-finite/index.d.ts similarity index 100% rename from is-finite/index.d.ts rename to types/is-finite/index.d.ts diff --git a/is-finite/tsconfig.json b/types/is-finite/tsconfig.json similarity index 100% rename from is-finite/tsconfig.json rename to types/is-finite/tsconfig.json diff --git a/is-finite/tslint.json b/types/is-finite/tslint.json similarity index 100% rename from is-finite/tslint.json rename to types/is-finite/tslint.json diff --git a/is-my-json-valid/index.d.ts b/types/is-my-json-valid/index.d.ts similarity index 100% rename from is-my-json-valid/index.d.ts rename to types/is-my-json-valid/index.d.ts diff --git a/is-my-json-valid/is-my-json-valid-tests.ts b/types/is-my-json-valid/is-my-json-valid-tests.ts similarity index 100% rename from is-my-json-valid/is-my-json-valid-tests.ts rename to types/is-my-json-valid/is-my-json-valid-tests.ts diff --git a/is-my-json-valid/tsconfig.json b/types/is-my-json-valid/tsconfig.json similarity index 100% rename from is-my-json-valid/tsconfig.json rename to types/is-my-json-valid/tsconfig.json diff --git a/is-path-cwd/index.d.ts b/types/is-path-cwd/index.d.ts similarity index 100% rename from is-path-cwd/index.d.ts rename to types/is-path-cwd/index.d.ts diff --git a/is-path-cwd/is-path-cwd-tests.ts b/types/is-path-cwd/is-path-cwd-tests.ts similarity index 100% rename from is-path-cwd/is-path-cwd-tests.ts rename to types/is-path-cwd/is-path-cwd-tests.ts diff --git a/is-path-cwd/tsconfig.json b/types/is-path-cwd/tsconfig.json similarity index 100% rename from is-path-cwd/tsconfig.json rename to types/is-path-cwd/tsconfig.json diff --git a/is-path-cwd/tslint.json b/types/is-path-cwd/tslint.json similarity index 100% rename from is-path-cwd/tslint.json rename to types/is-path-cwd/tslint.json diff --git a/is-path-in-cwd/index.d.ts b/types/is-path-in-cwd/index.d.ts similarity index 100% rename from is-path-in-cwd/index.d.ts rename to types/is-path-in-cwd/index.d.ts diff --git a/is-path-in-cwd/tsconfig.json b/types/is-path-in-cwd/tsconfig.json similarity index 100% rename from is-path-in-cwd/tsconfig.json rename to types/is-path-in-cwd/tsconfig.json diff --git a/is-path-in-cwd/tslint.json b/types/is-path-in-cwd/tslint.json similarity index 100% rename from is-path-in-cwd/tslint.json rename to types/is-path-in-cwd/tslint.json diff --git a/is-plain-object/index.d.ts b/types/is-plain-object/index.d.ts similarity index 100% rename from is-plain-object/index.d.ts rename to types/is-plain-object/index.d.ts diff --git a/is-plain-object/is-plain-object-tests.ts b/types/is-plain-object/is-plain-object-tests.ts similarity index 100% rename from is-plain-object/is-plain-object-tests.ts rename to types/is-plain-object/is-plain-object-tests.ts diff --git a/is-plain-object/tsconfig.json b/types/is-plain-object/tsconfig.json similarity index 100% rename from is-plain-object/tsconfig.json rename to types/is-plain-object/tsconfig.json diff --git a/is-promise/index.d.ts b/types/is-promise/index.d.ts similarity index 100% rename from is-promise/index.d.ts rename to types/is-promise/index.d.ts diff --git a/is-promise/is-promise-tests.ts b/types/is-promise/is-promise-tests.ts similarity index 100% rename from is-promise/is-promise-tests.ts rename to types/is-promise/is-promise-tests.ts diff --git a/is-promise/tsconfig.json b/types/is-promise/tsconfig.json similarity index 100% rename from is-promise/tsconfig.json rename to types/is-promise/tsconfig.json diff --git a/is-relative-url/index.d.ts b/types/is-relative-url/index.d.ts similarity index 100% rename from is-relative-url/index.d.ts rename to types/is-relative-url/index.d.ts diff --git a/is-relative-url/is-relative-url-tests.ts b/types/is-relative-url/is-relative-url-tests.ts similarity index 100% rename from is-relative-url/is-relative-url-tests.ts rename to types/is-relative-url/is-relative-url-tests.ts diff --git a/is-relative-url/tsconfig.json b/types/is-relative-url/tsconfig.json similarity index 100% rename from is-relative-url/tsconfig.json rename to types/is-relative-url/tsconfig.json diff --git a/is-relative-url/tslint.json b/types/is-relative-url/tslint.json similarity index 100% rename from is-relative-url/tslint.json rename to types/is-relative-url/tslint.json diff --git a/is-root-path/index.d.ts b/types/is-root-path/index.d.ts similarity index 100% rename from is-root-path/index.d.ts rename to types/is-root-path/index.d.ts diff --git a/is-root-path/is-root-path-tests.ts b/types/is-root-path/is-root-path-tests.ts similarity index 100% rename from is-root-path/is-root-path-tests.ts rename to types/is-root-path/is-root-path-tests.ts diff --git a/is-root-path/tsconfig.json b/types/is-root-path/tsconfig.json similarity index 100% rename from is-root-path/tsconfig.json rename to types/is-root-path/tsconfig.json diff --git a/is-root-path/tslint.json b/types/is-root-path/tslint.json similarity index 100% rename from is-root-path/tslint.json rename to types/is-root-path/tslint.json diff --git a/is-root/index.d.ts b/types/is-root/index.d.ts similarity index 100% rename from is-root/index.d.ts rename to types/is-root/index.d.ts diff --git a/is-root/is-root-tests.ts b/types/is-root/is-root-tests.ts similarity index 100% rename from is-root/is-root-tests.ts rename to types/is-root/is-root-tests.ts diff --git a/is-root/tsconfig.json b/types/is-root/tsconfig.json similarity index 100% rename from is-root/tsconfig.json rename to types/is-root/tsconfig.json diff --git a/is-root/tslint.json b/types/is-root/tslint.json similarity index 100% rename from is-root/tslint.json rename to types/is-root/tslint.json diff --git a/is-text-path/index.d.ts b/types/is-text-path/index.d.ts similarity index 100% rename from is-text-path/index.d.ts rename to types/is-text-path/index.d.ts diff --git a/is-text-path/is-text-path-tests.ts b/types/is-text-path/is-text-path-tests.ts similarity index 100% rename from is-text-path/is-text-path-tests.ts rename to types/is-text-path/is-text-path-tests.ts diff --git a/is-text-path/tsconfig.json b/types/is-text-path/tsconfig.json similarity index 100% rename from is-text-path/tsconfig.json rename to types/is-text-path/tsconfig.json diff --git a/is-text-path/tslint.json b/types/is-text-path/tslint.json similarity index 100% rename from is-text-path/tslint.json rename to types/is-text-path/tslint.json diff --git a/is-url/index.d.ts b/types/is-url/index.d.ts similarity index 100% rename from is-url/index.d.ts rename to types/is-url/index.d.ts diff --git a/is-url/is-url-tests.ts b/types/is-url/is-url-tests.ts similarity index 100% rename from is-url/is-url-tests.ts rename to types/is-url/is-url-tests.ts diff --git a/is-url/tsconfig.json b/types/is-url/tsconfig.json similarity index 100% rename from is-url/tsconfig.json rename to types/is-url/tsconfig.json diff --git a/is-windows/index.d.ts b/types/is-windows/index.d.ts similarity index 100% rename from is-windows/index.d.ts rename to types/is-windows/index.d.ts diff --git a/is-windows/is-windows-tests.ts b/types/is-windows/is-windows-tests.ts similarity index 100% rename from is-windows/is-windows-tests.ts rename to types/is-windows/is-windows-tests.ts diff --git a/is-windows/tsconfig.json b/types/is-windows/tsconfig.json similarity index 100% rename from is-windows/tsconfig.json rename to types/is-windows/tsconfig.json diff --git a/is-windows/tslint.json b/types/is-windows/tslint.json similarity index 100% rename from is-windows/tslint.json rename to types/is-windows/tslint.json diff --git a/is/index.d.ts b/types/is/index.d.ts similarity index 100% rename from is/index.d.ts rename to types/is/index.d.ts diff --git a/is/is-tests.ts b/types/is/is-tests.ts similarity index 100% rename from is/is-tests.ts rename to types/is/is-tests.ts diff --git a/is/tsconfig.json b/types/is/tsconfig.json similarity index 100% rename from is/tsconfig.json rename to types/is/tsconfig.json diff --git a/isbn-utils/index.d.ts b/types/isbn-utils/index.d.ts similarity index 100% rename from isbn-utils/index.d.ts rename to types/isbn-utils/index.d.ts diff --git a/isbn-utils/isbn-utils-tests.ts b/types/isbn-utils/isbn-utils-tests.ts similarity index 100% rename from isbn-utils/isbn-utils-tests.ts rename to types/isbn-utils/isbn-utils-tests.ts diff --git a/isbn-utils/tsconfig.json b/types/isbn-utils/tsconfig.json similarity index 100% rename from isbn-utils/tsconfig.json rename to types/isbn-utils/tsconfig.json diff --git a/isbn-utils/tslint.json b/types/isbn-utils/tslint.json similarity index 100% rename from isbn-utils/tslint.json rename to types/isbn-utils/tslint.json diff --git a/iscroll/UNUSED_FILES.txt b/types/iscroll/UNUSED_FILES.txt similarity index 100% rename from iscroll/UNUSED_FILES.txt rename to types/iscroll/UNUSED_FILES.txt diff --git a/iscroll/index.d.ts b/types/iscroll/index.d.ts similarity index 100% rename from iscroll/index.d.ts rename to types/iscroll/index.d.ts diff --git a/iscroll/iscroll-lite.d.ts b/types/iscroll/iscroll-lite.d.ts similarity index 100% rename from iscroll/iscroll-lite.d.ts rename to types/iscroll/iscroll-lite.d.ts diff --git a/iscroll/iscroll-tests.ts b/types/iscroll/iscroll-tests.ts similarity index 100% rename from iscroll/iscroll-tests.ts rename to types/iscroll/iscroll-tests.ts diff --git a/iscroll/tsconfig.json b/types/iscroll/tsconfig.json similarity index 100% rename from iscroll/tsconfig.json rename to types/iscroll/tsconfig.json diff --git a/iscroll/v4/UNUSED_FILES.txt b/types/iscroll/v4/UNUSED_FILES.txt similarity index 100% rename from iscroll/v4/UNUSED_FILES.txt rename to types/iscroll/v4/UNUSED_FILES.txt diff --git a/iscroll/v4/index.d.ts b/types/iscroll/v4/index.d.ts similarity index 100% rename from iscroll/v4/index.d.ts rename to types/iscroll/v4/index.d.ts diff --git a/iscroll/v4/iscroll-lite.d.ts b/types/iscroll/v4/iscroll-lite.d.ts similarity index 100% rename from iscroll/v4/iscroll-lite.d.ts rename to types/iscroll/v4/iscroll-lite.d.ts diff --git a/iscroll/v4/iscroll-tests.ts b/types/iscroll/v4/iscroll-tests.ts similarity index 100% rename from iscroll/v4/iscroll-tests.ts rename to types/iscroll/v4/iscroll-tests.ts diff --git a/iscroll/v4/tsconfig.json b/types/iscroll/v4/tsconfig.json similarity index 100% rename from iscroll/v4/tsconfig.json rename to types/iscroll/v4/tsconfig.json diff --git a/iso8601-localizer/index.d.ts b/types/iso8601-localizer/index.d.ts similarity index 100% rename from iso8601-localizer/index.d.ts rename to types/iso8601-localizer/index.d.ts diff --git a/iso8601-localizer/iso8601-localizer-tests.ts b/types/iso8601-localizer/iso8601-localizer-tests.ts similarity index 100% rename from iso8601-localizer/iso8601-localizer-tests.ts rename to types/iso8601-localizer/iso8601-localizer-tests.ts diff --git a/iso8601-localizer/tsconfig.json b/types/iso8601-localizer/tsconfig.json similarity index 100% rename from iso8601-localizer/tsconfig.json rename to types/iso8601-localizer/tsconfig.json diff --git a/isomorphic-fetch/index.d.ts b/types/isomorphic-fetch/index.d.ts similarity index 100% rename from isomorphic-fetch/index.d.ts rename to types/isomorphic-fetch/index.d.ts diff --git a/isomorphic-fetch/isomorphic-fetch-tests.ts b/types/isomorphic-fetch/isomorphic-fetch-tests.ts similarity index 100% rename from isomorphic-fetch/isomorphic-fetch-tests.ts rename to types/isomorphic-fetch/isomorphic-fetch-tests.ts diff --git a/isomorphic-fetch/tsconfig.json b/types/isomorphic-fetch/tsconfig.json similarity index 100% rename from isomorphic-fetch/tsconfig.json rename to types/isomorphic-fetch/tsconfig.json diff --git a/istanbul-middleware/index.d.ts b/types/istanbul-middleware/index.d.ts similarity index 100% rename from istanbul-middleware/index.d.ts rename to types/istanbul-middleware/index.d.ts diff --git a/istanbul-middleware/istanbul-middleware-tests.ts b/types/istanbul-middleware/istanbul-middleware-tests.ts similarity index 100% rename from istanbul-middleware/istanbul-middleware-tests.ts rename to types/istanbul-middleware/istanbul-middleware-tests.ts diff --git a/istanbul-middleware/tsconfig.json b/types/istanbul-middleware/tsconfig.json similarity index 100% rename from istanbul-middleware/tsconfig.json rename to types/istanbul-middleware/tsconfig.json diff --git a/istanbul/index.d.ts b/types/istanbul/index.d.ts similarity index 100% rename from istanbul/index.d.ts rename to types/istanbul/index.d.ts diff --git a/istanbul/istanbul-tests.ts b/types/istanbul/istanbul-tests.ts similarity index 100% rename from istanbul/istanbul-tests.ts rename to types/istanbul/istanbul-tests.ts diff --git a/istanbul/tsconfig.json b/types/istanbul/tsconfig.json similarity index 100% rename from istanbul/tsconfig.json rename to types/istanbul/tsconfig.json diff --git a/ityped/index.d.ts b/types/ityped/index.d.ts similarity index 100% rename from ityped/index.d.ts rename to types/ityped/index.d.ts diff --git a/ityped/ityped-tests.ts b/types/ityped/ityped-tests.ts similarity index 100% rename from ityped/ityped-tests.ts rename to types/ityped/ityped-tests.ts diff --git a/ityped/tsconfig.json b/types/ityped/tsconfig.json similarity index 100% rename from ityped/tsconfig.json rename to types/ityped/tsconfig.json diff --git a/ityped/tslint.json b/types/ityped/tslint.json similarity index 100% rename from ityped/tslint.json rename to types/ityped/tslint.json diff --git a/ix.js/index.d.ts b/types/ix.js/index.d.ts similarity index 100% rename from ix.js/index.d.ts rename to types/ix.js/index.d.ts diff --git a/ix.js/l2o.d.ts b/types/ix.js/l2o.d.ts similarity index 100% rename from ix.js/l2o.d.ts rename to types/ix.js/l2o.d.ts diff --git a/ix.js/test/index.ts b/types/ix.js/test/index.ts similarity index 100% rename from ix.js/test/index.ts rename to types/ix.js/test/index.ts diff --git a/ix.js/test/l2o.ts b/types/ix.js/test/l2o.ts similarity index 100% rename from ix.js/test/l2o.ts rename to types/ix.js/test/l2o.ts diff --git a/ix.js/tsconfig.json b/types/ix.js/tsconfig.json similarity index 100% rename from ix.js/tsconfig.json rename to types/ix.js/tsconfig.json diff --git a/jade/index.d.ts b/types/jade/index.d.ts similarity index 100% rename from jade/index.d.ts rename to types/jade/index.d.ts diff --git a/jade/jade-tests.ts b/types/jade/jade-tests.ts similarity index 100% rename from jade/jade-tests.ts rename to types/jade/jade-tests.ts diff --git a/jade/tsconfig.json b/types/jade/tsconfig.json similarity index 100% rename from jade/tsconfig.json rename to types/jade/tsconfig.json diff --git a/jake/index.d.ts b/types/jake/index.d.ts similarity index 100% rename from jake/index.d.ts rename to types/jake/index.d.ts diff --git a/jake/jake-tests.ts b/types/jake/jake-tests.ts similarity index 100% rename from jake/jake-tests.ts rename to types/jake/jake-tests.ts diff --git a/jake/tsconfig.json b/types/jake/tsconfig.json similarity index 100% rename from jake/tsconfig.json rename to types/jake/tsconfig.json diff --git a/jalaali-js/index.d.ts b/types/jalaali-js/index.d.ts similarity index 100% rename from jalaali-js/index.d.ts rename to types/jalaali-js/index.d.ts diff --git a/jalaali-js/jalaali-js-tests.ts b/types/jalaali-js/jalaali-js-tests.ts similarity index 100% rename from jalaali-js/jalaali-js-tests.ts rename to types/jalaali-js/jalaali-js-tests.ts diff --git a/jalaali-js/tsconfig.json b/types/jalaali-js/tsconfig.json similarity index 100% rename from jalaali-js/tsconfig.json rename to types/jalaali-js/tsconfig.json diff --git a/jalaali-js/tslint.json b/types/jalaali-js/tslint.json similarity index 100% rename from jalaali-js/tslint.json rename to types/jalaali-js/tslint.json diff --git a/japanese-holidays/index.d.ts b/types/japanese-holidays/index.d.ts similarity index 100% rename from japanese-holidays/index.d.ts rename to types/japanese-holidays/index.d.ts diff --git a/japanese-holidays/japanese-holidays-tests.ts b/types/japanese-holidays/japanese-holidays-tests.ts similarity index 100% rename from japanese-holidays/japanese-holidays-tests.ts rename to types/japanese-holidays/japanese-holidays-tests.ts diff --git a/japanese-holidays/tsconfig.json b/types/japanese-holidays/tsconfig.json similarity index 100% rename from japanese-holidays/tsconfig.json rename to types/japanese-holidays/tsconfig.json diff --git a/japanese-holidays/tslint.json b/types/japanese-holidays/tslint.json similarity index 100% rename from japanese-holidays/tslint.json rename to types/japanese-holidays/tslint.json diff --git a/jasmine-ajax/index.d.ts b/types/jasmine-ajax/index.d.ts similarity index 98% rename from jasmine-ajax/index.d.ts rename to types/jasmine-ajax/index.d.ts index 6ec4020d00..4e227add1b 100644 --- a/jasmine-ajax/index.d.ts +++ b/types/jasmine-ajax/index.d.ts @@ -84,5 +84,5 @@ declare class MockAjax { } declare namespace jasmine { - export var Ajax: MockAjax; + const Ajax: MockAjax; } diff --git a/jasmine-ajax/jasmine-ajax-tests.ts b/types/jasmine-ajax/jasmine-ajax-tests.ts similarity index 89% rename from jasmine-ajax/jasmine-ajax-tests.ts rename to types/jasmine-ajax/jasmine-ajax-tests.ts index d94b205d13..96b7020577 100644 --- a/jasmine-ajax/jasmine-ajax-tests.ts +++ b/types/jasmine-ajax/jasmine-ajax-tests.ts @@ -5,12 +5,11 @@ /// - declare function getJasmineRequireObj(); describe('StubTracker', () => { beforeEach(() => { - var Constructor = getJasmineRequireObj().AjaxStubTracker(); + const Constructor = getJasmineRequireObj().AjaxStubTracker(); this.tracker = new Constructor(); }); @@ -19,21 +18,21 @@ describe('StubTracker', () => { }); it('finds an added stub', () => { - var stub = { matches: () => true }; + const stub = { matches: () => true }; this.tracker.addStub(stub); expect(this.tracker.findStub()).toBe(stub); }); it('skips an added stub that does not match', () => { - var stub = { matches: () => false }; + const stub = { matches: () => false }; this.tracker.addStub(stub); expect(this.tracker.findStub()).toBeUndefined(); }); it('passes url, data, and method to the stub', () => { - var stub = { matches: jasmine.createSpy('matches') }; + const stub = { matches: jasmine.createSpy('matches') }; this.tracker.addStub(stub); this.tracker.findStub('url', 'data', 'method'); @@ -42,7 +41,7 @@ describe('StubTracker', () => { }); it('can clear out all stubs', () => { - var stub = { matches: jasmine.createSpy('matches') }; + const stub = { matches: jasmine.createSpy('matches') }; this.tracker.addStub(stub); this.tracker.findStub(); @@ -58,9 +57,9 @@ describe('StubTracker', () => { }); it('uses the most recently added stub that matches', () => { - var stub1 = { matches: () => true }; - var stub2 = { matches: () => false }; - var stub3 = { matches: () => false }; + const stub1 = { matches: () => true }; + const stub2 = { matches: () => false }; + const stub3 = { matches: () => false }; this.tracker.addStub(stub1); this.tracker.addStub(stub2); @@ -74,9 +73,9 @@ describe('FakeRequest', () => { beforeEach(() => { this.requestTracker = { track: jasmine.createSpy('trackRequest') }; this.stubTracker = { findStub() { } }; - var parserInstance = this.parserInstance = jasmine.createSpy('parse'); + const parserInstance = this.parserInstance = jasmine.createSpy('parse'); this.paramParser = { findParser: () => ({ parse: parserInstance }) }; - var eventBus = this.fakeEventBus = { + const eventBus = this.fakeEventBus = { addEventListener: jasmine.createSpy('addEventListener'), trigger: jasmine.createSpy('trigger'), removeEventListener: jasmine.createSpy('removeEventListener') @@ -95,15 +94,15 @@ describe('FakeRequest', () => { }); it('extends from the global XMLHttpRequest', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); expect(request.extraAttribute).toEqual('my cool attribute'); }); it('skips XMLHttpRequest attributes that IE does not want copied', () => { // use real window here so it will correctly go red on IE if it breaks - var FakeRequest = getJasmineRequireObj().AjaxFakeRequest(this.eventBusFactory)(window, this.requestTracker, this.stubTracker, this.paramParser); - var request = new FakeRequest(); + const FakeRequest = getJasmineRequireObj().AjaxFakeRequest(this.eventBusFactory)(window, this.requestTracker, this.stubTracker, this.paramParser); + const request = new FakeRequest(); expect(request.responseBody).toBeUndefined(); expect(request.responseXML).toBeUndefined(); @@ -111,20 +110,20 @@ describe('FakeRequest', () => { }); it('tracks the request', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); expect(this.requestTracker.track).toHaveBeenCalledWith(request); }); it('has default request headers and override mime type', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); expect(request.requestHeaders).toEqual({}); expect(request.overriddenMimeType).toBeNull(); }); it('saves request information when opened', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open('METHOD', 'URL', 'ignore_async', 'USERNAME', 'PASSWORD'); expect(request.method).toEqual('METHOD'); @@ -134,7 +133,7 @@ describe('FakeRequest', () => { }); it('saves an override mime type', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.overrideMimeType('application/text; charset: utf-8'); @@ -142,7 +141,7 @@ describe('FakeRequest', () => { }); it('saves request headers', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.setRequestHeader('X-Header-1', 'value1'); request.setRequestHeader('X-Header-2', 'value2'); @@ -154,7 +153,7 @@ describe('FakeRequest', () => { }); it('combines request headers with the same header name', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.setRequestHeader('X-Header', 'value1'); request.setRequestHeader('X-Header', 'value2'); @@ -163,7 +162,7 @@ describe('FakeRequest', () => { }); it('finds the content-type request header', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.setRequestHeader('ContEnt-tYPe', 'application/text+xml'); @@ -248,9 +247,9 @@ describe('FakeRequest', () => { this.request.send(); this.fakeEventBus.trigger.calls.reset(); - var request = this.request; - var events = []; - var headers = [ + const request = this.request; + const events = []; + const headers = [ { name: 'X-Header', value: 'foo' } ]; @@ -284,7 +283,7 @@ describe('FakeRequest', () => { this.request.open(); this.request.send(); this.request.respondWith({}); - var request = this.request; + const request = this.request; expect(() => { request.responseTimeout(); @@ -295,7 +294,7 @@ describe('FakeRequest', () => { this.request.open(); this.request.send(); this.request.respondWith({}); - var request = this.request; + const request = this.request; expect(() => { request.respondWith({}); @@ -306,7 +305,7 @@ describe('FakeRequest', () => { this.request.open(); this.request.send(); this.request.respondWith({}); - var request = this.request; + const request = this.request; expect(() => { request.responseError({}); @@ -335,7 +334,7 @@ describe('FakeRequest', () => { this.request.ontimeout = jasmine.createSpy('timeout'); this.request.onloadend = jasmine.createSpy('loadend'); - var args = this.fakeEventBus.addEventListener.calls.allArgs(); + const args = this.fakeEventBus.addEventListener.calls.allArgs(); for (const [eventName, busCallback] of args) { busCallback(); expect(this.request['on' + eventName]).toHaveBeenCalled(); @@ -462,10 +461,10 @@ describe('FakeRequest', () => { }); it('ticks the jasmine clock on timeout', () => { - var clock = { tick: jasmine.createSpy('tick') }; + const clock = { tick: jasmine.createSpy('tick') }; spyOn(jasmine, 'clock').and.returnValue(clock); - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -475,13 +474,13 @@ describe('FakeRequest', () => { }); it('has an initial status of null', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); expect(request.status).toBeNull(); }); it('has an aborted status', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.abort(); @@ -490,7 +489,7 @@ describe('FakeRequest', () => { }); it('has a status from the response', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -501,7 +500,7 @@ describe('FakeRequest', () => { }); it('has a statusText from the response', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -512,7 +511,7 @@ describe('FakeRequest', () => { }); it('saves off any data sent to the server', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send('foo=bar&baz=quux'); @@ -520,7 +519,7 @@ describe('FakeRequest', () => { }); it('parses data sent to the server', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send('foo=bar&baz=quux'); @@ -530,7 +529,7 @@ describe('FakeRequest', () => { }); it('skips parsing if no data was sent', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -539,7 +538,7 @@ describe('FakeRequest', () => { }); it('saves responseText', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -549,7 +548,7 @@ describe('FakeRequest', () => { }); it('defaults responseText if none is given', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -559,7 +558,7 @@ describe('FakeRequest', () => { }); it('retrieves individual response headers', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -574,7 +573,7 @@ describe('FakeRequest', () => { }); it('retrieves individual response headers case-insensitively', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -589,7 +588,7 @@ describe('FakeRequest', () => { }); it('retrieves a combined response header', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -605,11 +604,11 @@ describe('FakeRequest', () => { }); it("doesn't pollute the response headers of other XHRs", () => { - var request1 = new this.FakeRequest(); + const request1 = new this.FakeRequest(); request1.open(); request1.send(); - var request2 = new this.FakeRequest(); + const request2 = new this.FakeRequest(); request2.open(); request2.send(); @@ -621,7 +620,7 @@ describe('FakeRequest', () => { }); it('retrieves all response headers', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -638,7 +637,7 @@ describe('FakeRequest', () => { }); it('sets the content-type header to the specified contentType when no other headers are supplied', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -649,7 +648,7 @@ describe('FakeRequest', () => { }); it('sets a default content-type header if no contentType and headers are supplied', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -660,7 +659,7 @@ describe('FakeRequest', () => { }); it('has no responseXML by default', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -670,7 +669,7 @@ describe('FakeRequest', () => { }); it('parses a text/xml document into responseXML', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -687,7 +686,7 @@ describe('FakeRequest', () => { }); it('parses an application/xml document into responseXML', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -704,7 +703,7 @@ describe('FakeRequest', () => { }); it('parses a custom blah+xml document into responseXML', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -721,7 +720,7 @@ describe('FakeRequest', () => { }); it('defaults the response attribute to the responseText', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -731,7 +730,7 @@ describe('FakeRequest', () => { }); it('has a text response when the responseType is blank', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -741,7 +740,7 @@ describe('FakeRequest', () => { }); it('has a text response when the responseType is text', () => { - var request = new this.FakeRequest(); + const request = new this.FakeRequest(); request.open(); request.send(); @@ -751,16 +750,15 @@ describe('FakeRequest', () => { }); }); - describe("Jasmine Mock Ajax (for toplevel)", () => { - var request, anotherRequest, response; - var success, error, complete; - var client, onreadystatechange; - var sharedContext: any = {}; - var fakeGlobal, mockAjax; + let request, anotherRequest, response; + let success, error, complete; + let client, onreadystatechange; + const sharedContext: any = {}; + let fakeGlobal, mockAjax; beforeEach(() => { - var fakeXMLHttpRequest = jasmine.createSpy('realFakeXMLHttpRequest'); + const fakeXMLHttpRequest = jasmine.createSpy('realFakeXMLHttpRequest'); fakeGlobal = { XMLHttpRequest: fakeXMLHttpRequest, DOMParser: window['DOMParser'], @@ -832,7 +830,6 @@ describe("Jasmine Mock Ajax (for toplevel)", () => { }); describe("mockAjax.requests.mostRecent()", () => { - describe("when there is one request queued", () => { it("should return the request", () => { expect(mockAjax.requests.mostRecent()).toEqual(request); @@ -921,7 +918,7 @@ describe("Jasmine Mock Ajax (for toplevel)", () => { client.send(); request = mockAjax.requests.mostRecent(); - var responseObject = { status: 200, statusText: "OK", contentType: "application/json", responseText: '{"foo":"bar"}', responseType: "json" }; + const responseObject = { status: 200, statusText: "OK", contentType: "application/json", responseText: '{"foo":"bar"}', responseType: "json" }; request.respondWith(responseObject); @@ -948,7 +945,7 @@ describe("Jasmine Mock Ajax (for toplevel)", () => { }); it("should return a JavaScript object for XHR2 response", () => { - var responseText = sharedContext.responseText; + const responseText = sharedContext.responseText; expect(success.calls.mostRecent().args[0]).toEqual(responseText); expect(response.responseText).toEqual(responseText); @@ -967,7 +964,7 @@ describe("Jasmine Mock Ajax (for toplevel)", () => { client.send(); request = mockAjax.requests.mostRecent(); - var responseObject = { status: 200, statusText: "OK", contentType: "application/json", responseText: '{"foo":"bar"}', responseType: 'json' }; + const responseObject = { status: 200, statusText: "OK", contentType: "application/json", responseText: '{"foo":"bar"}', responseType: 'json' }; request.respondWith(responseObject); @@ -982,7 +979,7 @@ describe("Jasmine Mock Ajax (for toplevel)", () => { }); it("should return the provided override for the XHR2 response", () => { - var responseText = sharedContext.responseText; + const responseText = sharedContext.responseText; expect(response.responseText).toEqual(responseText); expect(response.response).toEqual({ foo: "bar" }); @@ -999,7 +996,7 @@ describe("Jasmine Mock Ajax (for toplevel)", () => { client.send(); request = mockAjax.requests.mostRecent(); - var responseObject = { + const responseObject = { status: 200, statusText: "OK", responseText: '["foo"]', responseHeaders: { 'X-Header1': 'header 1 value', 'X-Header2': 'header 2 value', @@ -1033,7 +1030,7 @@ describe("Jasmine Mock Ajax (for toplevel)", () => { client.send(); request = mockAjax.requests.mostRecent(); - var responseObject = { + const responseObject = { status: 200, statusText: "OK", responseText: '["foo"]', responseHeaders: [ { name: 'X-Header', value: 'header value 1' }, { name: 'X-Header', value: 'header value 2' } @@ -1201,10 +1198,9 @@ describe("Jasmine Mock Ajax (for toplevel)", () => { }); }); - function sharedAjaxResponseBehaviorForZepto_Success(context) { describe("the success response", () => { - var xhr; + let xhr; beforeEach(() => { xhr = context.responseCallback.calls.mostRecent().args[2]; }); @@ -1218,7 +1214,7 @@ function sharedAjaxResponseBehaviorForZepto_Success(context) { }); it("should have the expected xhr2 response", () => { - var expected = context.response || context.responseType === 'json' ? JSON.parse(context.responseText) : context.responseText; + const expected = context.response || context.responseType === 'json' ? JSON.parse(context.responseText) : context.responseText; expect(xhr.response).toEqual(expected); }); @@ -1234,7 +1230,7 @@ function sharedAjaxResponseBehaviorForZepto_Success(context) { function sharedAjaxResponseBehaviorForZepto_Failure(context) { describe("the failure response", () => { - var xhr; + let xhr; beforeEach(() => { xhr = context.responseCallback.calls.mostRecent().args[0]; }); @@ -1248,7 +1244,7 @@ function sharedAjaxResponseBehaviorForZepto_Failure(context) { }); it("should have the expected xhr2 response", () => { - var expected = context.response || xhr.responseType === 'json' ? JSON.parse(xhr.responseText) : xhr.responseText; + const expected = context.response || xhr.responseType === 'json' ? JSON.parse(xhr.responseText) : xhr.responseText; expect(xhr.response).toEqual(expected); }); @@ -1264,13 +1260,13 @@ function sharedAjaxResponseBehaviorForZepto_Failure(context) { describe('ParamParser', () => { beforeEach(() => { - var Constructor = getJasmineRequireObj().AjaxParamParser(); + const Constructor = getJasmineRequireObj().AjaxParamParser(); expect(Constructor).toEqual(jasmine.any(Function)); this.parser = new Constructor(); }); it('has a default parser', () => { - var parser = this.parser.findParser({ contentType: () => { } }), + const parser = this.parser.findParser({ contentType: () => { } }), parsed = parser.parse('3+stooges=shemp&3+stooges=larry%20%26%20moe%20%26%20curly&some%3Dthing=else+entirely'); expect(parsed).toEqual({ @@ -1280,7 +1276,7 @@ describe('ParamParser', () => { }); it('should detect and parse json', () => { - var data = { + const data = { foo: 'bar', baz: ['q', 'u', 'u', 'x'], nested: { @@ -1296,7 +1292,7 @@ describe('ParamParser', () => { }); it('should parse json with further qualifiers on content-type', () => { - var data = { + const data = { foo: 'bar', baz: ['q', 'u', 'u', 'x'], nested: { @@ -1312,14 +1308,14 @@ describe('ParamParser', () => { }); it('should have custom parsers take precedence', () => { - var custom = { + const custom = { test: jasmine.createSpy('test').and.returnValue(true), parse: jasmine.createSpy('parse').and.returnValue('parsedFormat') }; this.parser.add(custom); - var parser = this.parser.findParser({ contentType: () => { } }), + const parser = this.parser.findParser({ contentType: () => { } }), parsed = parser.parse('custom_format'); expect(parsed).toEqual('parsedFormat'); @@ -1328,14 +1324,14 @@ describe('ParamParser', () => { }); it('should skip custom parsers that do not match', () => { - var custom = { + const custom = { test: jasmine.createSpy('test').and.returnValue(false), parse: jasmine.createSpy('parse').and.returnValue('parsedFormat') }; this.parser.add(custom); - var parser = this.parser.findParser({ contentType: () => { } }), + const parser = this.parser.findParser({ contentType: () => { } }), parsed = parser.parse('custom_format'); expect(parsed).toEqual({ custom_format: ['undefined'] }); @@ -1344,14 +1340,14 @@ describe('ParamParser', () => { }); it('removes custom parsers when reset', () => { - var custom = { + const custom = { test: jasmine.createSpy('test').and.returnValue(true), parse: jasmine.createSpy('parse').and.returnValue('parsedFormat') }; this.parser.add(custom); - var parser = this.parser.findParser({ contentType: () => { } }), + let parser = this.parser.findParser({ contentType: () => { } }), parsed = parser.parse('custom_format'); expect(parsed).toEqual('parsedFormat'); @@ -1389,31 +1385,31 @@ describe('RequestStub', () => { }); it('matches just by exact url', () => { - var stub = new this.RequestStub('www.example.com/foo'); + const stub = new this.RequestStub('www.example.com/foo'); expect(stub)['toMatchRequest']('www.example.com/foo'); }); it('does not match if the url differs', () => { - var stub = new this.RequestStub('www.example.com/foo'); + const stub = new this.RequestStub('www.example.com/foo'); expect(stub).not['toMatchRequest']('www.example.com/bar'); }); it('matches unordered query params', () => { - var stub = new this.RequestStub('www.example.com?foo=bar&baz=quux'); + const stub = new this.RequestStub('www.example.com?foo=bar&baz=quux'); expect(stub)['toMatchRequest']('www.example.com?baz=quux&foo=bar'); }); it('requires all specified query params to be there', () => { - var stub = new this.RequestStub('www.example.com?foo=bar&baz=quux'); + const stub = new this.RequestStub('www.example.com?foo=bar&baz=quux'); expect(stub).not['toMatchRequest']('www.example.com?foo=bar'); }); it('can match the url with a RegExp', () => { - var stub = new this.RequestStub(/ba[rz]/); + const stub = new this.RequestStub(/ba[rz]/); expect(stub)['toMatchRequest']('bar'); expect(stub)['toMatchRequest']('baz'); @@ -1421,7 +1417,7 @@ describe('RequestStub', () => { }); it('requires the method to match if supplied', () => { - var stub = new this.RequestStub('www.example.com/foo', null, 'POST'); + const stub = new this.RequestStub('www.example.com/foo', null, 'POST'); expect(stub).not['toMatchRequest']('www.example.com/foo'); expect(stub).not['toMatchRequest']('www.example.com/foo', null, 'GET'); @@ -1429,7 +1425,7 @@ describe('RequestStub', () => { }); it('requires the data submitted to match if supplied', () => { - var stub = new this.RequestStub('/foo', 'foo=bar&baz=quux'); + const stub = new this.RequestStub('/foo', 'foo=bar&baz=quux'); expect(stub)['toMatchRequest']('/foo', 'baz=quux&foo=bar'); expect(stub).not['toMatchRequest']('/foo', 'foo=bar'); @@ -1438,7 +1434,7 @@ describe('RequestStub', () => { describe('RequestTracker', () => { beforeEach(() => { - var Constructor = getJasmineRequireObj().AjaxRequestTracker(); + const Constructor = getJasmineRequireObj().AjaxRequestTracker(); this.tracker = new Constructor(); }); @@ -1511,7 +1507,7 @@ describe('RequestTracker', () => { this.tracker.track({ url: 'bar' }); this.tracker.track({ url: 'baz' }); - var func = request => request.url === 'bar'; + const func = request => request.url === 'bar'; expect(this.tracker.filter(func)).toEqual([{ url: 'bar' }]); }); @@ -1527,7 +1523,7 @@ describe('EventBus', () => { }); it('calls an event listener', () => { - var callback = jasmine.createSpy('callback'); + const callback = jasmine.createSpy('callback'); this.bus.addEventListener('foo', callback); this.bus.trigger('foo'); @@ -1536,7 +1532,7 @@ describe('EventBus', () => { }); it('calls an event listener with additional arguments', () => { - var callback = jasmine.createSpy('callback'); + const callback = jasmine.createSpy('callback'); this.bus.addEventListener('foo', callback); this.bus.trigger('foo', 'bar'); @@ -1545,7 +1541,7 @@ describe('EventBus', () => { }); it('only triggers callbacks for the specified event', () => { - var fooCallback = jasmine.createSpy('foo'), + const fooCallback = jasmine.createSpy('foo'), barCallback = jasmine.createSpy('bar'); this.bus.addEventListener('foo', fooCallback); @@ -1558,8 +1554,8 @@ describe('EventBus', () => { }); it('calls all the callbacks for the specified event', () => { - var callback1 = jasmine.createSpy('callback'); - var callback2 = jasmine.createSpy('otherCallback'); + const callback1 = jasmine.createSpy('callback'); + const callback2 = jasmine.createSpy('otherCallback'); this.bus.addEventListener('foo', callback1); this.bus.addEventListener('foo', callback2); @@ -1571,14 +1567,14 @@ describe('EventBus', () => { }); it('works if there are no callbacks for the event', () => { - var bus = this.bus; + const bus = this.bus; expect(() => { bus.trigger('notActuallyThere'); }).not.toThrow(); }); it('does not call listeners that have been removed', () => { - var callback = jasmine.createSpy('callback'); + const callback = jasmine.createSpy('callback'); this.bus.addEventListener('foo', callback); this.bus.removeEventListener('foo', callback); @@ -1588,8 +1584,8 @@ describe('EventBus', () => { }); it('only removes the specified callback', () => { - var callback1 = jasmine.createSpy('callback'); - var callback2 = jasmine.createSpy('otherCallback'); + const callback1 = jasmine.createSpy('callback'); + const callback2 = jasmine.createSpy('otherCallback'); this.bus.addEventListener('foo', callback1); this.bus.addEventListener('foo', callback2); @@ -1603,12 +1599,12 @@ describe('EventBus', () => { }); describe("Webmock style mocking", () => { - var successSpy, errorSpy, response, fakeGlobal, mockAjax; + let successSpy, response, fakeGlobal, mockAjax; - var sendRequest = function(fakeGlobal, url?, method?) { + const sendRequest = function(fakeGlobal, url?, method?) { url = url || "http://example.com/someApi"; method = method || 'GET'; - var xhr = new fakeGlobal.XMLHttpRequest(); + const xhr = new fakeGlobal.XMLHttpRequest(); xhr.onreadystatechange = args => { if (this.readyState === (this.DONE || 4)) { // IE 8 doesn't support DONE response = this; @@ -1681,15 +1677,15 @@ describe("Webmock style mocking", () => { }); describe("withMock", () => { - var sendRequest = fakeGlobal => { - var xhr = new fakeGlobal.XMLHttpRequest(); + const sendRequest = fakeGlobal => { + const xhr = new fakeGlobal.XMLHttpRequest(); xhr.open("GET", "http://example.com/someApi"); xhr.send(); }; it("installs the mock for passed in function, and uninstalls when complete", () => { - var xmlHttpRequest = jasmine.createSpyObj('XMLHttpRequest', ['open', 'send']), + const xmlHttpRequest = jasmine.createSpyObj('XMLHttpRequest', ['open', 'send']), xmlHttpRequestCtor = spyOn(window as any, 'XMLHttpRequest').and.returnValue(xmlHttpRequest), fakeGlobal = { XMLHttpRequest: xmlHttpRequestCtor }, mockAjax = new MockAjax(fakeGlobal); @@ -1704,7 +1700,7 @@ describe("withMock", () => { }); it("properly uninstalls when the passed in function throws", () => { - var xmlHttpRequest = jasmine.createSpyObj('XMLHttpRequest', ['open', 'send']), + const xmlHttpRequest = jasmine.createSpyObj('XMLHttpRequest', ['open', 'send']), xmlHttpRequestCtor = spyOn(window as any, 'XMLHttpRequest').and.returnValue(xmlHttpRequest), fakeGlobal = { XMLHttpRequest: xmlHttpRequestCtor }, mockAjax = new MockAjax(fakeGlobal); @@ -1722,7 +1718,7 @@ describe("withMock", () => { describe("mockAjax", () => { it("throws an error if installed multiple times", () => { - var fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), + const fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), fakeGlobal = { XMLHttpRequest: fakeXmlHttpRequest }, mockAjax = new MockAjax(fakeGlobal); @@ -1735,7 +1731,7 @@ describe("mockAjax", () => { }); it("does not throw an error if uninstalled between installs", () => { - var fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), + const fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), fakeGlobal = { XMLHttpRequest: fakeXmlHttpRequest }, mockAjax = new MockAjax(fakeGlobal); @@ -1749,7 +1745,7 @@ describe("mockAjax", () => { }); it("does not replace XMLHttpRequest until it is installed", () => { - var fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), + const fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), fakeGlobal = { XMLHttpRequest: fakeXmlHttpRequest }, mockAjax = new MockAjax(fakeGlobal); @@ -1763,7 +1759,7 @@ describe("mockAjax", () => { }); it("replaces the global XMLHttpRequest on uninstall", () => { - var fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), + const fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), fakeGlobal = { XMLHttpRequest: fakeXmlHttpRequest }, mockAjax = new MockAjax(fakeGlobal); @@ -1775,7 +1771,7 @@ describe("mockAjax", () => { }); it("clears requests and stubs upon uninstall", () => { - var fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), + const fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), fakeGlobal = { XMLHttpRequest: fakeXmlHttpRequest }, mockAjax = new MockAjax(fakeGlobal); @@ -1794,24 +1790,24 @@ describe("mockAjax", () => { }); it("allows the httpRequest to be retrieved", () => { - var fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), + const fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), fakeGlobal = { XMLHttpRequest: fakeXmlHttpRequest }, mockAjax = new MockAjax(fakeGlobal); mockAjax.install(); - var request = new ( fakeGlobal.XMLHttpRequest)(); + const request = new ( fakeGlobal.XMLHttpRequest)(); expect(mockAjax.requests.count()).toBe(1); expect(mockAjax.requests.mostRecent()).toBe(request); }); it("allows the httpRequests to be cleared", () => { - var fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), + const fakeXmlHttpRequest = jasmine.createSpy('fakeXmlHttpRequest'), fakeGlobal = { XMLHttpRequest: fakeXmlHttpRequest }, mockAjax = new MockAjax(fakeGlobal); mockAjax.install(); - var request = new ( fakeGlobal.XMLHttpRequest)(); + const request = new ( fakeGlobal.XMLHttpRequest)(); expect(mockAjax.requests.mostRecent()).toBe(request); mockAjax.requests.reset(); diff --git a/jasmine-ajax/tsconfig.json b/types/jasmine-ajax/tsconfig.json similarity index 100% rename from jasmine-ajax/tsconfig.json rename to types/jasmine-ajax/tsconfig.json diff --git a/jasmine-ajax/tslint.json b/types/jasmine-ajax/tslint.json similarity index 100% rename from jasmine-ajax/tslint.json rename to types/jasmine-ajax/tslint.json diff --git a/jasmine-data_driven_tests/index.d.ts b/types/jasmine-data_driven_tests/index.d.ts similarity index 100% rename from jasmine-data_driven_tests/index.d.ts rename to types/jasmine-data_driven_tests/index.d.ts diff --git a/jasmine-data_driven_tests/jasmine-data_driven_tests-tests.ts b/types/jasmine-data_driven_tests/jasmine-data_driven_tests-tests.ts similarity index 100% rename from jasmine-data_driven_tests/jasmine-data_driven_tests-tests.ts rename to types/jasmine-data_driven_tests/jasmine-data_driven_tests-tests.ts diff --git a/jasmine-data_driven_tests/tsconfig.json b/types/jasmine-data_driven_tests/tsconfig.json similarity index 100% rename from jasmine-data_driven_tests/tsconfig.json rename to types/jasmine-data_driven_tests/tsconfig.json diff --git a/jasmine-data_driven_tests/tslint.json b/types/jasmine-data_driven_tests/tslint.json similarity index 100% rename from jasmine-data_driven_tests/tslint.json rename to types/jasmine-data_driven_tests/tslint.json diff --git a/jasmine-es6-promise-matchers/index.d.ts b/types/jasmine-es6-promise-matchers/index.d.ts similarity index 100% rename from jasmine-es6-promise-matchers/index.d.ts rename to types/jasmine-es6-promise-matchers/index.d.ts diff --git a/jasmine-es6-promise-matchers/jasmine-es6-promise-matchers-tests.ts b/types/jasmine-es6-promise-matchers/jasmine-es6-promise-matchers-tests.ts similarity index 100% rename from jasmine-es6-promise-matchers/jasmine-es6-promise-matchers-tests.ts rename to types/jasmine-es6-promise-matchers/jasmine-es6-promise-matchers-tests.ts diff --git a/jasmine-es6-promise-matchers/tsconfig.json b/types/jasmine-es6-promise-matchers/tsconfig.json similarity index 100% rename from jasmine-es6-promise-matchers/tsconfig.json rename to types/jasmine-es6-promise-matchers/tsconfig.json diff --git a/jasmine-expect/index.d.ts b/types/jasmine-expect/index.d.ts similarity index 100% rename from jasmine-expect/index.d.ts rename to types/jasmine-expect/index.d.ts diff --git a/jasmine-expect/jasmine-expect-tests.ts b/types/jasmine-expect/jasmine-expect-tests.ts similarity index 100% rename from jasmine-expect/jasmine-expect-tests.ts rename to types/jasmine-expect/jasmine-expect-tests.ts diff --git a/jasmine-expect/tsconfig.json b/types/jasmine-expect/tsconfig.json similarity index 100% rename from jasmine-expect/tsconfig.json rename to types/jasmine-expect/tsconfig.json diff --git a/jasmine-fixture/index.d.ts b/types/jasmine-fixture/index.d.ts similarity index 100% rename from jasmine-fixture/index.d.ts rename to types/jasmine-fixture/index.d.ts diff --git a/jasmine-fixture/jasmine-fixture-tests.ts b/types/jasmine-fixture/jasmine-fixture-tests.ts similarity index 100% rename from jasmine-fixture/jasmine-fixture-tests.ts rename to types/jasmine-fixture/jasmine-fixture-tests.ts diff --git a/jasmine-fixture/tsconfig.json b/types/jasmine-fixture/tsconfig.json similarity index 100% rename from jasmine-fixture/tsconfig.json rename to types/jasmine-fixture/tsconfig.json diff --git a/jasmine-fixture/tslint.json b/types/jasmine-fixture/tslint.json similarity index 100% rename from jasmine-fixture/tslint.json rename to types/jasmine-fixture/tslint.json diff --git a/jasmine-jquery/index.d.ts b/types/jasmine-jquery/index.d.ts similarity index 100% rename from jasmine-jquery/index.d.ts rename to types/jasmine-jquery/index.d.ts diff --git a/jasmine-jquery/jasmine-jquery-tests.ts b/types/jasmine-jquery/jasmine-jquery-tests.ts similarity index 100% rename from jasmine-jquery/jasmine-jquery-tests.ts rename to types/jasmine-jquery/jasmine-jquery-tests.ts diff --git a/jasmine-jquery/tsconfig.json b/types/jasmine-jquery/tsconfig.json similarity index 100% rename from jasmine-jquery/tsconfig.json rename to types/jasmine-jquery/tsconfig.json diff --git a/jasmine-matchers/index.d.ts b/types/jasmine-matchers/index.d.ts similarity index 100% rename from jasmine-matchers/index.d.ts rename to types/jasmine-matchers/index.d.ts diff --git a/jasmine-matchers/jasmine-matchers-tests.ts b/types/jasmine-matchers/jasmine-matchers-tests.ts similarity index 100% rename from jasmine-matchers/jasmine-matchers-tests.ts rename to types/jasmine-matchers/jasmine-matchers-tests.ts diff --git a/jasmine-matchers/tsconfig.json b/types/jasmine-matchers/tsconfig.json similarity index 100% rename from jasmine-matchers/tsconfig.json rename to types/jasmine-matchers/tsconfig.json diff --git a/jasmine-node/index.d.ts b/types/jasmine-node/index.d.ts similarity index 100% rename from jasmine-node/index.d.ts rename to types/jasmine-node/index.d.ts diff --git a/jasmine-node/jasmine-node-tests.ts b/types/jasmine-node/jasmine-node-tests.ts similarity index 100% rename from jasmine-node/jasmine-node-tests.ts rename to types/jasmine-node/jasmine-node-tests.ts diff --git a/jasmine-node/tsconfig.json b/types/jasmine-node/tsconfig.json similarity index 100% rename from jasmine-node/tsconfig.json rename to types/jasmine-node/tsconfig.json diff --git a/jasmine-promise-matchers/index.d.ts b/types/jasmine-promise-matchers/index.d.ts similarity index 100% rename from jasmine-promise-matchers/index.d.ts rename to types/jasmine-promise-matchers/index.d.ts diff --git a/jasmine-promise-matchers/jasmine-promise-matchers-tests.ts b/types/jasmine-promise-matchers/jasmine-promise-matchers-tests.ts similarity index 100% rename from jasmine-promise-matchers/jasmine-promise-matchers-tests.ts rename to types/jasmine-promise-matchers/jasmine-promise-matchers-tests.ts diff --git a/jasmine-promise-matchers/tsconfig.json b/types/jasmine-promise-matchers/tsconfig.json similarity index 100% rename from jasmine-promise-matchers/tsconfig.json rename to types/jasmine-promise-matchers/tsconfig.json diff --git a/jasmine/index.d.ts b/types/jasmine/index.d.ts similarity index 100% rename from jasmine/index.d.ts rename to types/jasmine/index.d.ts diff --git a/jasmine/jasmine-tests.ts b/types/jasmine/jasmine-tests.ts similarity index 100% rename from jasmine/jasmine-tests.ts rename to types/jasmine/jasmine-tests.ts diff --git a/jasmine/tsconfig.json b/types/jasmine/tsconfig.json similarity index 100% rename from jasmine/tsconfig.json rename to types/jasmine/tsconfig.json diff --git a/jasmine/v1/index.d.ts b/types/jasmine/v1/index.d.ts similarity index 100% rename from jasmine/v1/index.d.ts rename to types/jasmine/v1/index.d.ts diff --git a/jasmine/v1/jasmine-tests.ts b/types/jasmine/v1/jasmine-tests.ts similarity index 100% rename from jasmine/v1/jasmine-tests.ts rename to types/jasmine/v1/jasmine-tests.ts diff --git a/jasmine/v1/tsconfig.json b/types/jasmine/v1/tsconfig.json similarity index 100% rename from jasmine/v1/tsconfig.json rename to types/jasmine/v1/tsconfig.json diff --git a/jasminewd2/index.d.ts b/types/jasminewd2/index.d.ts similarity index 100% rename from jasminewd2/index.d.ts rename to types/jasminewd2/index.d.ts diff --git a/jasminewd2/jasminewd2-tests.ts b/types/jasminewd2/jasminewd2-tests.ts similarity index 100% rename from jasminewd2/jasminewd2-tests.ts rename to types/jasminewd2/jasminewd2-tests.ts diff --git a/jasminewd2/tsconfig.json b/types/jasminewd2/tsconfig.json similarity index 100% rename from jasminewd2/tsconfig.json rename to types/jasminewd2/tsconfig.json diff --git a/jasminewd2/tslint.json b/types/jasminewd2/tslint.json similarity index 100% rename from jasminewd2/tslint.json rename to types/jasminewd2/tslint.json diff --git a/java-applet/index.d.ts b/types/java-applet/index.d.ts similarity index 100% rename from java-applet/index.d.ts rename to types/java-applet/index.d.ts diff --git a/java-applet/java-applet-tests.ts b/types/java-applet/java-applet-tests.ts similarity index 100% rename from java-applet/java-applet-tests.ts rename to types/java-applet/java-applet-tests.ts diff --git a/java-applet/tsconfig.json b/types/java-applet/tsconfig.json similarity index 100% rename from java-applet/tsconfig.json rename to types/java-applet/tsconfig.json diff --git a/java/index.d.ts b/types/java/index.d.ts similarity index 100% rename from java/index.d.ts rename to types/java/index.d.ts diff --git a/java/java-tests.ts b/types/java/java-tests.ts similarity index 100% rename from java/java-tests.ts rename to types/java/java-tests.ts diff --git a/java/tsconfig.json b/types/java/tsconfig.json similarity index 100% rename from java/tsconfig.json rename to types/java/tsconfig.json diff --git a/javascript-astar/index.d.ts b/types/javascript-astar/index.d.ts similarity index 100% rename from javascript-astar/index.d.ts rename to types/javascript-astar/index.d.ts diff --git a/javascript-astar/javascript-astar-tests.ts b/types/javascript-astar/javascript-astar-tests.ts similarity index 100% rename from javascript-astar/javascript-astar-tests.ts rename to types/javascript-astar/javascript-astar-tests.ts diff --git a/javascript-astar/tsconfig.json b/types/javascript-astar/tsconfig.json similarity index 100% rename from javascript-astar/tsconfig.json rename to types/javascript-astar/tsconfig.json diff --git a/javascript-bignum/index.d.ts b/types/javascript-bignum/index.d.ts similarity index 100% rename from javascript-bignum/index.d.ts rename to types/javascript-bignum/index.d.ts diff --git a/javascript-bignum/javascript-bignum-tests.ts b/types/javascript-bignum/javascript-bignum-tests.ts similarity index 100% rename from javascript-bignum/javascript-bignum-tests.ts rename to types/javascript-bignum/javascript-bignum-tests.ts diff --git a/javascript-bignum/tsconfig.json b/types/javascript-bignum/tsconfig.json similarity index 100% rename from javascript-bignum/tsconfig.json rename to types/javascript-bignum/tsconfig.json diff --git a/javascript-obfuscator/index.d.ts b/types/javascript-obfuscator/index.d.ts similarity index 100% rename from javascript-obfuscator/index.d.ts rename to types/javascript-obfuscator/index.d.ts diff --git a/javascript-obfuscator/javascript-obfuscator-tests.ts b/types/javascript-obfuscator/javascript-obfuscator-tests.ts similarity index 100% rename from javascript-obfuscator/javascript-obfuscator-tests.ts rename to types/javascript-obfuscator/javascript-obfuscator-tests.ts diff --git a/javascript-obfuscator/tsconfig.json b/types/javascript-obfuscator/tsconfig.json similarity index 100% rename from javascript-obfuscator/tsconfig.json rename to types/javascript-obfuscator/tsconfig.json diff --git a/jbinary/index.d.ts b/types/jbinary/index.d.ts similarity index 100% rename from jbinary/index.d.ts rename to types/jbinary/index.d.ts diff --git a/jbinary/jbinary-tests.ts b/types/jbinary/jbinary-tests.ts similarity index 100% rename from jbinary/jbinary-tests.ts rename to types/jbinary/jbinary-tests.ts diff --git a/jbinary/tsconfig.json b/types/jbinary/tsconfig.json similarity index 100% rename from jbinary/tsconfig.json rename to types/jbinary/tsconfig.json diff --git a/jcanvas/index.d.ts b/types/jcanvas/index.d.ts similarity index 100% rename from jcanvas/index.d.ts rename to types/jcanvas/index.d.ts diff --git a/jcanvas/jcanvas-tests.ts b/types/jcanvas/jcanvas-tests.ts similarity index 100% rename from jcanvas/jcanvas-tests.ts rename to types/jcanvas/jcanvas-tests.ts diff --git a/jcanvas/tsconfig.json b/types/jcanvas/tsconfig.json similarity index 100% rename from jcanvas/tsconfig.json rename to types/jcanvas/tsconfig.json diff --git a/jdataview/index.d.ts b/types/jdataview/index.d.ts similarity index 100% rename from jdataview/index.d.ts rename to types/jdataview/index.d.ts diff --git a/jdataview/jdataview-tests.ts b/types/jdataview/jdataview-tests.ts similarity index 100% rename from jdataview/jdataview-tests.ts rename to types/jdataview/jdataview-tests.ts diff --git a/jdataview/tsconfig.json b/types/jdataview/tsconfig.json similarity index 100% rename from jdataview/tsconfig.json rename to types/jdataview/tsconfig.json diff --git a/jdenticon/index.d.ts b/types/jdenticon/index.d.ts similarity index 100% rename from jdenticon/index.d.ts rename to types/jdenticon/index.d.ts diff --git a/jdenticon/jdenticon-tests.ts b/types/jdenticon/jdenticon-tests.ts similarity index 100% rename from jdenticon/jdenticon-tests.ts rename to types/jdenticon/jdenticon-tests.ts diff --git a/jdenticon/tsconfig.json b/types/jdenticon/tsconfig.json similarity index 100% rename from jdenticon/tsconfig.json rename to types/jdenticon/tsconfig.json diff --git a/jee-jsf/index.d.ts b/types/jee-jsf/index.d.ts similarity index 100% rename from jee-jsf/index.d.ts rename to types/jee-jsf/index.d.ts diff --git a/jee-jsf/jee-jsf-tests.ts b/types/jee-jsf/jee-jsf-tests.ts similarity index 100% rename from jee-jsf/jee-jsf-tests.ts rename to types/jee-jsf/jee-jsf-tests.ts diff --git a/jee-jsf/tsconfig.json b/types/jee-jsf/tsconfig.json similarity index 100% rename from jee-jsf/tsconfig.json rename to types/jee-jsf/tsconfig.json diff --git a/jenkins/index.d.ts b/types/jenkins/index.d.ts similarity index 99% rename from jenkins/index.d.ts rename to types/jenkins/index.d.ts index 5db91893a6..027cc8e0cf 100644 --- a/jenkins/index.d.ts +++ b/types/jenkins/index.d.ts @@ -65,7 +65,7 @@ declare namespace create { }; } - export interface JenkinsPromisifiedAPI { + interface JenkinsPromisifiedAPI { info(): Promise; build: { get(name: string, n: number): Promise; diff --git a/jenkins/jenkins-tests.ts b/types/jenkins/jenkins-tests.ts similarity index 96% rename from jenkins/jenkins-tests.ts rename to types/jenkins/jenkins-tests.ts index 0b409a4b87..98b30d4b73 100644 --- a/jenkins/jenkins-tests.ts +++ b/types/jenkins/jenkins-tests.ts @@ -20,7 +20,7 @@ jenkins.build.log('example', 1, (err, data) => { console.log('log', data); }); -var log = jenkins.build.logStream('example', 1); +const log = jenkins.build.logStream('example', 1); log.on('data', (text: string) => { process.stdout.write(text); @@ -202,4 +202,4 @@ jenkins.view.remove('example', 'jobExample', (err) => { const jenkins2 = J({ baseUrl: 'http://user:pass@localhost:8080', crumbIssuer: true, promisify: true }); jenkins2.info().then(info => console.log(info)); -jenkins2.job.exists('example').then(exists => { var b: boolean = exists; }); +jenkins2.job.exists('example').then(exists => { const b: boolean = exists; }); diff --git a/jenkins/tsconfig.json b/types/jenkins/tsconfig.json similarity index 100% rename from jenkins/tsconfig.json rename to types/jenkins/tsconfig.json diff --git a/jenkins/tslint.json b/types/jenkins/tslint.json similarity index 100% rename from jenkins/tslint.json rename to types/jenkins/tslint.json diff --git a/jest/index.d.ts b/types/jest/index.d.ts old mode 100755 new mode 100644 similarity index 100% rename from jest/index.d.ts rename to types/jest/index.d.ts diff --git a/jest/jest-tests.ts b/types/jest/jest-tests.ts similarity index 100% rename from jest/jest-tests.ts rename to types/jest/jest-tests.ts diff --git a/jest/tsconfig.json b/types/jest/tsconfig.json similarity index 100% rename from jest/tsconfig.json rename to types/jest/tsconfig.json diff --git a/jest/v16/index.d.ts b/types/jest/v16/index.d.ts similarity index 100% rename from jest/v16/index.d.ts rename to types/jest/v16/index.d.ts diff --git a/jest/v16/jest-tests.ts b/types/jest/v16/jest-tests.ts similarity index 100% rename from jest/v16/jest-tests.ts rename to types/jest/v16/jest-tests.ts diff --git a/jest/v16/tsconfig.json b/types/jest/v16/tsconfig.json similarity index 100% rename from jest/v16/tsconfig.json rename to types/jest/v16/tsconfig.json diff --git a/jfp/index.d.ts b/types/jfp/index.d.ts similarity index 100% rename from jfp/index.d.ts rename to types/jfp/index.d.ts diff --git a/jfp/jfp-tests.ts b/types/jfp/jfp-tests.ts similarity index 100% rename from jfp/jfp-tests.ts rename to types/jfp/jfp-tests.ts diff --git a/jfp/tsconfig.json b/types/jfp/tsconfig.json similarity index 100% rename from jfp/tsconfig.json rename to types/jfp/tsconfig.json diff --git a/jfs/index.d.ts b/types/jfs/index.d.ts similarity index 90% rename from jfs/index.d.ts rename to types/jfs/index.d.ts index ba6edb26bc..8383f58981 100644 --- a/jfs/index.d.ts +++ b/types/jfs/index.d.ts @@ -7,21 +7,21 @@ declare const JsonFileStore: JsonFileStore.JsonFileStore; declare namespace JsonFileStore { - export interface Storable { + interface Storable { [key: string]: any; } - export interface Options { + interface Options { type?: 'single' | 'memory'; pretty?: boolean; saveId?: boolean | string; } - export interface JsonFileStore { + interface JsonFileStore { new (name?: string, opts?: Options): Instance; } - export interface Instance { + interface Instance { save(id: K, o: V, cb?: (err?: Error, id?: K) => void): void; save(o: V, cb?: (err?: Error, id?: string) => void): void; diff --git a/jfs/jfs-tests.ts b/types/jfs/jfs-tests.ts similarity index 96% rename from jfs/jfs-tests.ts rename to types/jfs/jfs-tests.ts index d53d1305a2..e736e3b668 100644 --- a/jfs/jfs-tests.ts +++ b/types/jfs/jfs-tests.ts @@ -33,7 +33,7 @@ db.all((err, objs) => { }); // get all synchronously -var objs = db.allSync(); +const objs = db.allSync(); // delete by ID db.delete('foo', err => { diff --git a/jfs/tsconfig.json b/types/jfs/tsconfig.json similarity index 100% rename from jfs/tsconfig.json rename to types/jfs/tsconfig.json diff --git a/jfs/tslint.json b/types/jfs/tslint.json similarity index 100% rename from jfs/tslint.json rename to types/jfs/tslint.json diff --git a/jimp/index.d.ts b/types/jimp/index.d.ts similarity index 100% rename from jimp/index.d.ts rename to types/jimp/index.d.ts diff --git a/jimp/jimp-tests.ts b/types/jimp/jimp-tests.ts similarity index 100% rename from jimp/jimp-tests.ts rename to types/jimp/jimp-tests.ts diff --git a/jimp/tsconfig.json b/types/jimp/tsconfig.json similarity index 100% rename from jimp/tsconfig.json rename to types/jimp/tsconfig.json diff --git a/jimp/tslint.json b/types/jimp/tslint.json similarity index 100% rename from jimp/tslint.json rename to types/jimp/tslint.json diff --git a/jjv/index.d.ts b/types/jjv/index.d.ts similarity index 100% rename from jjv/index.d.ts rename to types/jjv/index.d.ts diff --git a/jjv/jjv-tests.ts b/types/jjv/jjv-tests.ts similarity index 100% rename from jjv/jjv-tests.ts rename to types/jjv/jjv-tests.ts diff --git a/jjv/tsconfig.json b/types/jjv/tsconfig.json similarity index 100% rename from jjv/tsconfig.json rename to types/jjv/tsconfig.json diff --git a/jjve/index.d.ts b/types/jjve/index.d.ts similarity index 100% rename from jjve/index.d.ts rename to types/jjve/index.d.ts diff --git a/jjve/jjve-tests.ts b/types/jjve/jjve-tests.ts similarity index 100% rename from jjve/jjve-tests.ts rename to types/jjve/jjve-tests.ts diff --git a/jjve/tsconfig.json b/types/jjve/tsconfig.json similarity index 100% rename from jjve/tsconfig.json rename to types/jjve/tsconfig.json diff --git a/jmespath/index.d.ts b/types/jmespath/index.d.ts similarity index 100% rename from jmespath/index.d.ts rename to types/jmespath/index.d.ts diff --git a/types/jmespath/jmespath-tests.ts b/types/jmespath/jmespath-tests.ts new file mode 100644 index 0000000000..b254a503b4 --- /dev/null +++ b/types/jmespath/jmespath-tests.ts @@ -0,0 +1,6 @@ +import jmespath = require("jmespath"); + +const a = jmespath.search({foo: {bar: {baz: [0, 1, 2, 3, 4]}}}, "foo.bar.baz[2]"); +const b = jmespath.search({foo: {bar: {baz: [0, 1, 2, 3, 4]}}}, "foo.bar"); +const c = jmespath.search({foo: [{first: "a", last: "b"}, {first: "c", last: "d"}]}, "foo[*].first"); +const d = jmespath.search({foo: [{age: 20}, {age: 25}, {age: 30}, {age: 35}, {age: 40}]}, "foo[?age > `30`]"); diff --git a/jmespath/tsconfig.json b/types/jmespath/tsconfig.json similarity index 100% rename from jmespath/tsconfig.json rename to types/jmespath/tsconfig.json diff --git a/line-by-line/tslint.json b/types/jmespath/tslint.json similarity index 100% rename from line-by-line/tslint.json rename to types/jmespath/tslint.json diff --git a/jodata/index.d.ts b/types/jodata/index.d.ts similarity index 100% rename from jodata/index.d.ts rename to types/jodata/index.d.ts diff --git a/jodata/jodata-tests.ts b/types/jodata/jodata-tests.ts similarity index 100% rename from jodata/jodata-tests.ts rename to types/jodata/jodata-tests.ts diff --git a/jodata/tsconfig.json b/types/jodata/tsconfig.json similarity index 100% rename from jodata/tsconfig.json rename to types/jodata/tsconfig.json diff --git a/johnny-five/index.d.ts b/types/johnny-five/index.d.ts similarity index 100% rename from johnny-five/index.d.ts rename to types/johnny-five/index.d.ts diff --git a/johnny-five/johnny-five-tests.ts b/types/johnny-five/johnny-five-tests.ts similarity index 100% rename from johnny-five/johnny-five-tests.ts rename to types/johnny-five/johnny-five-tests.ts diff --git a/johnny-five/tsconfig.json b/types/johnny-five/tsconfig.json similarity index 100% rename from johnny-five/tsconfig.json rename to types/johnny-five/tsconfig.json diff --git a/joi/index.d.ts b/types/joi/index.d.ts similarity index 100% rename from joi/index.d.ts rename to types/joi/index.d.ts diff --git a/joi/joi-tests.ts b/types/joi/joi-tests.ts similarity index 100% rename from joi/joi-tests.ts rename to types/joi/joi-tests.ts diff --git a/joi/tsconfig.json b/types/joi/tsconfig.json similarity index 100% rename from joi/tsconfig.json rename to types/joi/tsconfig.json diff --git a/joi/v6/index.d.ts b/types/joi/v6/index.d.ts similarity index 100% rename from joi/v6/index.d.ts rename to types/joi/v6/index.d.ts diff --git a/joi/v6/joi-tests.ts b/types/joi/v6/joi-tests.ts similarity index 100% rename from joi/v6/joi-tests.ts rename to types/joi/v6/joi-tests.ts diff --git a/joi/v6/tsconfig.json b/types/joi/v6/tsconfig.json similarity index 100% rename from joi/v6/tsconfig.json rename to types/joi/v6/tsconfig.json diff --git a/jointjs/README.md b/types/jointjs/README.md similarity index 100% rename from jointjs/README.md rename to types/jointjs/README.md diff --git a/types/jointjs/index.d.ts b/types/jointjs/index.d.ts new file mode 100644 index 0000000000..5ce0f187f0 --- /dev/null +++ b/types/jointjs/index.d.ts @@ -0,0 +1,897 @@ +// Type definitions for Joint JS 1.0.1 +// Project: http://www.jointjs.com/ +// Definitions by: Aidan Reel , David Durman , Ewout Van Gossum , Federico Caselli , Chris Moran +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// typings: https://github.com/CaselIT/typings-jointjs + +/// + +import * as Backbone from "backbone"; + +export as namespace joint; + +export var g: any; +export var V: any; + +export namespace dia { + interface Size { + width: number; + height: number; + } + + interface Point { + x: number; + y: number; + } + + interface BBox extends Point, Size { } + + interface TranslateOptions { + restrictedArea?: BBox; + transition?: TransitionOptions; + } + + interface TransitionOptions { + delay?: number; + duration?: number; + timingFunction?: (t: number) => number; + valueFunction?: (a: any, b: any) => (t: number) => any; + } + + interface DfsBfsOptions { + inbound?: boolean; + outbound?: boolean; + deep?: boolean; + } + + interface ExploreOptions { + breadthFirst?: boolean; + deep?: boolean; + } + + class Graph extends Backbone.Model { + constructor(attributes?: any, options?: { cellNamespace: any }); + addCell(cell: Cell | Cell[]): this; + addCells(cells: Cell[]): this; + resetCells(cells: Cell[], options?: any): this; + getCell(id: string): Cell; + getElements(): Element[]; + getLinks(): Link[]; + getCells(): Cell[]; + getFirstCell(): Cell; + getLastCell(): Cell; + getConnectedLinks(element: Cell, options?: { inbound?: boolean, outbound?: boolean, deep?: boolean }): Link[]; + disconnectLinks(cell: Cell, options?: any): void; + removeLinks(cell: Cell, options?: any): void; + translate(tx: number, ty?: number, options?: TranslateOptions): void; + cloneCells(cells: Cell[]): { [id: string]: Cell }; + getSubgraph(cells: Cell[], options?: { deep?: boolean }): Cell[]; + cloneSubgraph(cells: Cell[], options?: { deep?: boolean }): { [id: string]: Cell }; + dfs(element: Element, iteratee: (element: Element, distance: number) => boolean, options?: DfsBfsOptions, visited?: Object, distance?: number): void; + bfs(element: Element, iteratee: (element: Element, distance: number) => boolean, options?: DfsBfsOptions): void; + search(element: Element, iteratee: (element: Element, distance: number) => boolean, options?: { breadthFirst?: boolean }): void; + getSuccessors(element: Element, options?: ExploreOptions): Element[]; + getPredecessors(element: Element, options?: ExploreOptions): Element[]; + isSuccessor(elementA: Element, elementB: Element): boolean; + isPredecessor(elementA: Element, elementB: Element): boolean; + isSource(element: Element): boolean; + isSink(element: Element): boolean; + getSources(): Element[]; + getSinks(): Element[]; + getNeighbors(element: Element, options?: DfsBfsOptions): Element[]; + isNeighbor(elementA: Element, elementB: Element, options?: { inbound?: boolean, outbound?: boolean; }): boolean; + getCommonAncestor(...cells: Cell[]): Element; + toJSON(): any; + fromJSON(json: any, options?: any): this; + clear(options?: any): this; + findModelsFromPoint(rect: BBox): Element[]; + findModelsUnderElement(element: Element, options?: { searchBy?: 'bbox' | 'center' | 'origin' | 'corner' | 'topRight' | 'bottomLeft' }): Element[]; + getBBox(elements: Element[], options?: any): BBox; + toGraphLib(): any; // graphlib graph object + findModelsInArea(rect: BBox, options?: any): BBox | boolean; + getCellsBBox(cells: Cell[], options?: any): BBox; + getInboundEdges(node: string): Object; + getOutboundEdges(node: string): Object; + hasActiveBatch(name?: string): number | boolean; + maxZIndex(): number; + removeCells(cells: Cell[], options?: any): this; + resize(width: number, height: number, options?: number): this; + resizeCells(width: number, height: number, cells: Cell[], options?: number): this; + set(key: Object | string, value: any, options?: any): this; + startBatch(name: string, data?: Object): any; + stopBatch(name: string, data?: Object): any; + } + + class Cell extends Backbone.Model { + id: string; + toJSON(): any; + remove(options?: { disconnectLinks?: boolean }): this; + toFront(options?: { deep?: boolean }): this; + toBack(options?: { deep?: boolean }): this; + getAncestors(): Cell[]; + isEmbeddedIn(element: Element, options?: { deep: boolean }): boolean; + prop(key: string): any; + prop(object: any): this; + prop(key: string, value: any, options?: any): this; + removeProp(path: string, options?: any): this; + attr(key: string): any; + attr(object: SVGAttributes): this; + attr(key: string, value: any): this; + clone(): Cell; + clone(opt: { deep?: boolean }): Cell | Cell[]; + removeAttr(path: string | string[], options?: any): this; + transition(path: string, value?: any, options?: TransitionOptions, delim?: string): number; + getTransitions(): string[]; + stopTransitions(path?: string, delim?: string): this; + addTo(graph: Graph, options?: any): this; + isLink(): boolean; + embed(cell: Cell, options?: any): this; + findView(paper: Paper): CellView; + getEmbeddedCells(options?: any): Cell[]; + initialize(options?: any): void; + isElement(): boolean; + isEmbedded(): boolean; + processPorts(): void; + startBatch(name: string, options?: any): this; + stopBatch(name: string, options?: any): this; + unembed(cell: Cell, options?: any): this; + } + + type Padding = number | { + top?: number; + right?: number; + bottom?: number; + left?: number + }; + + class Element extends Cell { + translate(tx: number, ty?: number, options?: TranslateOptions): this; + position(options?: { parentRelative: boolean }): Point; + position(x: number, y: number, options?: { parentRelative?: boolean }): this; + resize(width: number, height: number, options?: { direction?: 'left' | 'right' | 'top' | 'bottom' | 'top-right' | 'top-left' | 'bottom-left' | 'bottom-right' }): this; + rotate(deg: number, absolute?: boolean, origin?: Point): this; + embed(cell: Cell): this; + unembed(cell: Cell): this; + getEmbeddedCells(options?: ExploreOptions): Cell[]; + fitEmbeds(options?: { deep?: boolean, padding?: Padding }): this; + getBBox(options?: any): BBox; + findView(paper: Paper): ElementView; + isElement(): boolean; + scale(scaleX: number, scaleY: number, origin?: Point, options?: any): this; + addPort(port: any, opt?: any): this; + addPorts(ports: any[], opt?: any): this; + removePort(port: any, opt?: any): this; + hasPorts(): boolean; + hasPort(id: string): boolean; + getPorts(): any[]; + getPort(id: string): any; + getPortIndex(port: any): number; + portProp(portId: string, path: any, value?: any, opt?: any): joint.dia.Element; + } + + interface CSSSelector { + [key: string]: string | number | Object; // Object added to support special attributes like filter http://jointjs.com/api#SpecialAttributes:filter + } + + interface SVGAttributes { + [selector: string]: CSSSelector; + } + + interface CellAttributes { + [key: string]: any; + } + + interface TextAttrs extends SVGAttributes { + text?: { + [key: string]: string | number; + text?: string; + }; + } + + interface Label { + position: number; + attrs?: TextAttrs; + } + interface LinkAttributes extends CellAttributes { + source?: Point | { id: string, selector?: string, port?: string }; + target?: Point | { id: string, selector?: string, port?: string }; + labels?: Label[]; + vertices?: Point[]; + smooth?: boolean; + attrs?: TextAttrs; + z?: number; + } + + class Link extends Cell { + markup: string; + labelMarkup: string; + toolMakup: string; + vertexMarkup: string; + arrowHeadMarkup: string; + + constructor(attributes?: LinkAttributes, options?: Object); + disconnect(): this; + label(index?: number): any; + label(index: number, value: Label): this; + reparent(options?: any): Element; + findView(paper: Paper): LinkView; + getSourceElement(): Element; + getTargetElement(): Element; + hasLoop(options?: { deep?: boolean }): boolean; + applyToPoints(fn: Function, options?: any): this; + getRelationshipAncestor(): Element; + isLink(): boolean; + isRelationshipEmbeddedIn(element: Element): boolean; + scale(sx: number, sy: number, origin: Point, optionts?: any): this; + translate(tx: number, ty: number, options?: any): this; + } + + interface ManhattanRouterArgs { + excludeTypes?: string[]; + excludeEnds?: 'source' | 'target'; + startDirections?: ['left' | 'right' | 'top' | 'bottom']; + endDirections?: ['left' | 'right' | 'top' | 'bottom']; + } + + interface PaperOptions extends Backbone.ViewOptions { + el?: string | JQuery | HTMLElement; + width?: number; + height?: number; + origin?: Point; + gridSize?: number; + perpendicularLinks?: boolean; + elementView?: (element: Element) => ElementView | ElementView; + linkView?: (link: Link) => LinkView | LinkView; + defaultLink?: ((cellView: CellView, magnet: SVGElement) => Link) | Link; + defaultRouter?: ((vertices: Point[], args: Object, linkView: LinkView) => Point[]) | { name: string, args?: ManhattanRouterArgs }; + defaultConnector?: ((sourcePoint: Point, targetPoint: Point, vertices: Point[], args: Object, linkView: LinkView) => string) | { name: string, args?: { radius?: number } }; + interactive?: ((cellView: CellView, event: string) => boolean) | boolean | { vertexAdd?: boolean, vertexMove?: boolean, vertexRemove?: boolean, arrowheadMove?: boolean }; + validateMagnet?: (cellView: CellView, magnet: SVGElement) => boolean; + validateConnection?: (cellViewS: CellView, magnetS: SVGElement, cellViewT: CellView, magnetT: SVGElement, end: 'source' | 'target', linkView: LinkView) => boolean; + linkConnectionPoint?: (linkView: LinkView, view: ElementView, magnet: SVGElement, reference: Point) => Point; + snapLinks?: boolean | { radius: number }; + linkPinning?: boolean; + markAvailable?: boolean; + async?: boolean | { batchZise: number }; + embeddingMode?: boolean; + validateEmbedding?: (childView: ElementView, parentView: ElementView) => boolean; + restrictTranslate?: ((elementView: ElementView) => BBox) | boolean; + guard?: (evt: Event, view: CellView) => boolean; + multiLinks?: boolean; + cellViewNamespace?: Object; + /** useful undocumented option */ + clickThreshold?: number; + highlighting?: any; + } + + interface ScaleContentOptions { + padding?: number; + preserveAspectRatio?: boolean; + minScale?: number; + minScaleX?: number; + minScaleY?: number; + maxScale?: number; + maxScaleX?: number; + maxScaleY?: number; + scaleGrid?: number; + fittingBBox?: BBox; + } + + interface FitToContentOptions { + gridWidth?: number; + gridHeight?: number; + padding?: Padding; + allowNewOrigin?: 'negative' | 'positive' | 'any'; + minWidth?: number; + minHeight?: number; + maxWidth?: number; + maxHeight?: number; + } + + class Paper extends Backbone.View { + constructor(options?: PaperOptions); + options: PaperOptions; + svg: SVGElement; + viewport: SVGGElement; + defs: SVGDefsElement; + setDimensions(width: number, height: number): void; + setOrigin(x: number, y: number): void; + scale(sx: number, sy?: number, ox?: number, oy?: number): this; + findView(element: any): CellView; + findViewByModel(model: Cell | string): CellView; + findViewsFromPoint(point: Point): ElementView[]; + findViewsInArea(rect: BBox, options?: { strict?: boolean }): CellView[]; + fitToContent(options?: FitToContentOptions): void; + scaleContentToFit(options?: ScaleContentOptions): void; + getContentBBox(): BBox; + clientToLocalPoint(p: Point): Point; + + rotate(deg: number, ox?: number, oy?: number): Paper; // @todo not released yet though it's in the source code already + + afterRenderViews(): void; + asyncRenderViews(cells: Cell[], options?: any): void; + beforeRenderViews(cells: Cell[]): Cell[]; + cellMouseout(evt: Event): void; + cellMouseover(evt: Event): void; + clearGrid(): this; + contextmenu(evt: Event): void; + createViewForModel(cell: Cell): CellView; + drawGrid(options?: any): this; + fitToContent(gridWidth?: number, gridHeight?: number, padding?: number, options?: any): void; + getArea(): BBox; + getDefaultLink(cellView: CellView, magnet: HTMLElement): Link; + getModelById(id: string): Cell; + getRestrictedArea(): BBox; + guard(evt: Event, view: CellView): boolean; + linkAllowed(linkViewOrModel: LinkView | Link): boolean; + mouseclick(evt: Event): void; + mousedblclick(evt: Event): void; + mousewheel(evt: Event): void; + onCellAdded(cell: Cell, graph: Graph, options: Object): void; + onCellHighlight(cellView: CellView, magnetEl: HTMLElement, options?: any): void; + onCellUnhighlight(cellView: CellView, magnetEl: HTMLElement, options?: any): void; + onRemove(): void; + pointerdown(evt: Event): void; + pointermove(evt: Event): void; + pointerup(evt: Event): void; + remove(): this; + removeView(cell: Cell): CellView; + removeViews(): void; + renderView(cell: Cell): CellView; + resetViews(cellsCollection: Cell[], options: any): void; + resolveHighlighter(options?: any): boolean | Object; + setGridSize(gridSize: number): this; + setInteractivity(value: any): void; + snapToGrid(p: Point): Point; + sortViews(): void; + } + + + interface GradientOptions { + type: 'linearGradient' | 'radialGradient'; + stops: Array<{ + offset: string; + color: string; + opacity?: number; + }>; + } + class CellViewGeneric extends Backbone.View { + getBBox(options?: { useModelGeometry?: boolean }): BBox; + highlight(el?: any, options?: any): this; + unhighlight(el?: any, options?: any): this; + applyFilter(selector: string | HTMLElement, filter: Object): void; + applyGradient(selector: string | HTMLElement, attr: 'fill' | 'stroke', gradient: GradientOptions): void; + can(feature: string): boolean; + findBySelector(selector: string): JQuery; + findMagnet(el: any): HTMLElement; + getSelector(el: HTMLElement, prevSelector: string): string; + getStrokeBBox(el: any): BBox; // string|HTMLElement|Vectorizer + mouseout(evt: Event): void; + mouseover(evt: Event): void; + mousewheel(evt: Event, x: number, y: number, delta: number): void + notify(eventName: string): void; + onChangeAttrs(cell: Cell, attrs: Backbone.ViewOptions, options?: any): this; + onSetTheme(oldTheme: string, newTheme: string): void; + pointerclick(evt: Event, x: number, y: number): void; + pointerdblclick(evt: Event, x: number, y: number): void; + pointerdown(evt: Event, x: number, y: number): void; + pointermove(evt: Event, x: number, y: number): void; + pointerup(evt: Event, x: number, y: number): void; + remove(): this; + setInteractivity(value: any): void; + setTheme(theme: string, options?: any): this; + } + + class CellView extends CellViewGeneric { } + + interface ElementViewAttributes { + style?: string; + text?: string; + html?: string; + "ref-x"?: string | number; + "ref-y"?: string | number; + "ref-dx"?: number; + "ref-dy"?: number; + "ref-width"?: string | number; + "ref-height"?: string | number; + ref?: string; + "x-alignment"?: 'middle' | 'right' | number; + "y-alignment"?: 'middle' | 'bottom' | number; + port?: string; + } + class ElementView extends CellViewGeneric { + scale(sx: number, sy: number): void; // @todo Documented in source but not released + finalizeEmbedding(options?: any): void; + getBBox(options?: any): BBox; + pointerdown(evt: Event, x: number, y: number): void; + pointermove(evt: Event, x: number, y: number): void; + pointerup(evt: Event, x: number, y: number): void; + positionRelative(vel: any, bbox: BBox, attributes: ElementViewAttributes, nodesBySelector?: Object): void; // Vectorizer + prepareEmbedding(options?: any): void; + processEmbedding(options?: any): void; + render(): this; + renderMarkup(): void; + resize(): void; + rotate(): void; + translate(model: Backbone.Model, changes?: any, options?: any): void; + update(cell: Cell, renderingOnlyAttrs?: Object): void; + } + + class LinkView extends CellViewGeneric { + options: { + shortLinkLength?: number, + doubleLinkTools?: boolean, + longLinkLength?: number, + linkToolsOffset?: number, + doubleLinkToolsOffset?: number, + sampleInterval: number + }; + getConnectionLength(): number; + sendToken(token: SVGElement, duration?: number, callback?: () => void): void; + addVertex(vertex: Point): number; + getPointAtLength(length: number): Point; // Marked as public api in source but not in the documents + createWatcher(endType: { id: string }): Function; + findRoute(oldVertices: Point[]): Point[]; + getConnectionPoint(end: 'source' | 'target', selectorOrPoint: Element | Point, referenceSelectorOrPoint: Element | Point): Point; + getPathData(vertices: Point[]): any; + onEndModelChange(endType: 'source' | 'target', endModel?: Element, opt?: any): void; + onLabelsChange(): void; + onSourceChange(cell: Cell, sourceEnd: { id: string }, options: any): void; + onTargetChange(cell: Cell, targetEnd: { id: string }, options: any): void; + onToolsChange(): void; + onVerticesChange(cell: Cell, changed: any, options: any): void; + pointerdown(evt: Event, x: number, y: number): void; + pointermove(evt: Event, x: number, y: number): void; + pointerup(evt: Event, x: number, y: number): void; + removeVertex(idx: number): this; + render(): this; + renderArrowheadMarkers(): this; + renderLabels(): this; + renderTools(): this; + renderVertexMarkers(): this; + startArrowheadMove(end: 'source' | 'target', options?: any): void; + startListening(): void; + update(model: any, attributes: any, options?: any): this; + updateArrowheadMarkers(): this; + updateAttributes(): void; + updateConnection(options?: any): void; + updateLabelPositions(): this; + updateToolsPosition(): this; + } +} + +export namespace ui { } + +export namespace shapes { + interface GenericAttributes extends dia.CellAttributes { + position?: dia.Point; + size?: dia.Size; + angle?: number; + attrs?: T; + } + interface ShapeAttrs extends dia.CSSSelector { + fill?: string; + stroke?: string; + r?: string | number; + rx?: string | number; + ry?: string | number; + cx?: string | number; + cy?: string | number; + height?: string | number; + width?: string | number; + transform?: string; + points?: string; + 'stroke-width'?: string | number; + 'ref-x'?: string | number; + 'ref-y'?: string | number; + ref?: string + } + + namespace basic { + class Generic extends dia.Element { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface RectAttrs extends dia.TextAttrs { + rect?: ShapeAttrs; + } + class Rect extends Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Text extends Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface CircleAttrs extends dia.TextAttrs { + circle?: ShapeAttrs; + } + class Circle extends Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface EllipseAttrs extends dia.TextAttrs { + ellipse?: ShapeAttrs; + } + class Ellipse extends Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface PolygonAttrs extends dia.TextAttrs { + polygon?: ShapeAttrs; + } + class Polygon extends Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface PolylineAttrs extends dia.TextAttrs { + polyline?: ShapeAttrs; + } + class Polyline extends Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Image extends Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface PathAttrs extends dia.TextAttrs { + path?: ShapeAttrs; + } + class Path extends Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface RhombusAttrs extends dia.TextAttrs { + path?: ShapeAttrs; + } + class Rhombus extends Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface TextBlockAttrs extends dia.TextAttrs { + rect?: ShapeAttrs; + } + class TextBlock extends Generic { + constructor(attributes?: GenericAttributes, options?: Object); + updateSize(cell: dia.Cell, size: dia.Size): void; + updateContent(cell: dia.Cell, content: string): void; + } + } + + namespace chess { + class KingWhite extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class KingBlack extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class QueenWhite extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class QueenBlack extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class RookWhite extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class RookBlack extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class BishopWhite extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class BishopBlack extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class KnightWhite extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class KnightBlack extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class PawnWhite extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class PawnBlack extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + } + + namespace devs { + interface ModelAttributes extends GenericAttributes { + inPorts?: string[]; + outPorts?: string[]; + ports?: Object; + } + class Model extends basic.Generic { + constructor(attributes?: ModelAttributes, options?: Object); + changeInGroup(properties: any, opt?: any): boolean; + changeOutGroup(properties: any, opt?: any): boolean; + createPortItem(group: string, port: string): any; + createPortItems(group: string, ports: string[]): any[]; + addOutPort(port: string, opt?: any): this; + addInPort(port: string, opt?: any): this; + removeOutPort(port: string, opt?: any): this; + removeInPort(port: string, opt?: any): this; + } + class Coupled extends Model { + constructor(attributes?: ModelAttributes, options?: Object); + } + class Atomic extends Model { + constructor(attributes?: ModelAttributes, options?: Object); + } + class Link extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); + } + } + + namespace erd { + class Entity extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class WeakEntity extends Entity { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Relationship extends dia.Element { + constructor(attributes?: GenericAttributes, options?: Object); + } + class IdentifyingRelationship extends Relationship { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface AttributeAttrs extends dia.TextAttrs { + ellipse?: ShapeAttrs; + } + class Attribute extends dia.Element { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Multivalued extends Attribute { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Derived extends Attribute { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Key extends Attribute { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Normal extends Attribute { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface ISAAttrs extends dia.Element { + polygon?: ShapeAttrs; + } + class ISA extends dia.Element { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Line extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); + cardinality(value: string | number): void; + } + } + + namespace fsa { + class State extends basic.Circle { + constructor(attributes?: GenericAttributes, options?: Object); + } + class StartState extends dia.Element { + constructor(attributes?: GenericAttributes, options?: Object); + } + class EndState extends dia.Element { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Arrow extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); + } + } + + namespace logic { + interface LogicAttrs extends ShapeAttrs { + ref?: string; + 'ref-x'?: number | string; + 'ref-dx'?: number | string; + 'ref-y'?: number | string; + 'ref-dy'?: number | string; + magnet?: boolean; + 'class'?: string; + port?: string; + } + interface IOAttrs extends dia.TextAttrs { + circle?: LogicAttrs; + } + class Gate extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class IO extends Gate { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Input extends IO { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Output extends IO { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Gate11 extends Gate { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Gate21 extends Gate { + constructor(attributes?: GenericAttributes, options?: Object); + } + interface Image { + 'xlink:href'?: string; + } + interface ImageAttrs extends LogicAttrs { + image?: Image; + } + class Repeater extends Gate11 { + constructor(attributes?: GenericAttributes, options?: Object); + operation(input: any): any; + } + class Note extends Gate11 { + constructor(attributes?: GenericAttributes, options?: Object); + operation(input: any): boolean; + } + class Or extends Gate21 { + constructor(attributes?: GenericAttributes, options?: Object); + operation(input1: any, input2: any): boolean; + } + class And extends Gate21 { + constructor(attributes?: GenericAttributes, options?: Object); + operation(input1: any, input2: any): boolean; + } + class Nor extends Gate21 { + constructor(attributes?: GenericAttributes, options?: Object); + operation(input1: any, input2: any): boolean; + } + class Nand extends Gate21 { + constructor(attributes?: GenericAttributes, options?: Object); + operation(input1: any, input2: any): boolean; + } + class Xor extends Gate21 { + constructor(attributes?: GenericAttributes, options?: Object); + operation(input1: any, input2: any): boolean; + } + class Xnor extends Gate21 { + constructor(attributes?: GenericAttributes, options?: Object); + operation(input1: any, input2: any): boolean; + } + interface WireArgs extends dia.LinkAttributes { + router?: Object; + connector?: Object; + } + class Wire extends dia.Link { + constructor(attributes?: WireArgs, options?: Object); + } + } + + namespace org { + interface MemberAttrs { + rect?: ShapeAttrs; + image?: ShapeAttrs; + } + class Member extends dia.Element { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Arrow extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); + } + } + + namespace pn { + class Place extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class PlaceView extends dia.ElementView { + renderTokens(): void; + } + class Transition extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Link extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); + } + } + + namespace uml { + interface ClassAttributes extends GenericAttributes { + name: string[]; + attributes: string[]; + methods: string[]; + } + class Class extends basic.Generic { + constructor(attributes?: ClassAttributes, options?: Object); + getClassName(): string[]; + updateRectangles(): void; + } + class ClassView extends dia.ElementView { + } + class Abstract extends Class { + constructor(attributes?: ClassAttributes, options?: Object); + } + class AbstractView extends ClassView { + constructor(attributes?: ClassAttributes, options?: Object); + } + class Interface extends Class { + constructor(attributes?: ClassAttributes, options?: Object); + } + class InterfaceView extends ClassView { + constructor(attributes?: ClassAttributes, options?: Object); + } + class Generalization extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); + } + class Implementation extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); + } + class Aggregation extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); + } + class Composition extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); + } + class Association extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); + } + interface StateAttributes extends GenericAttributes { + events?: string[]; + } + class State extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + updateName(): void; + updateEvents(): void; + updatePath(): void; + } + class StartState extends basic.Circle { + constructor(attributes?: GenericAttributes, options?: Object); + } + class EndState extends basic.Generic { + constructor(attributes?: GenericAttributes, options?: Object); + } + class Transition extends dia.Link { + constructor(attributes?: dia.LinkAttributes, options?: Object); + } + } +} + +export namespace util { + + namespace format { + export function number(specifier: string, value: number): string; + } + + export function uuid(): string; + export function guid(obj?: Object): string; + export function nextFrame(callback: () => void, context?: Object): number; + export function cancelFrame(requestId: number): void; + export function flattenObject(object: Object, delim: string, stop: (node: any) => boolean): any; + export function getByPath(object: Object, path: string, delim: string): any; + export function setByPath(object: Object, path: string, value: Object, delim: string): any; + export function unsetByPath(object: Object, path: string, delim: string): any; + export function breakText(text: string, size: dia.Size, attrs?: dia.SVGAttributes, options?: { svgDocument?: SVGElement }): string; + export function normalizeSides(box: number | { x?: number, y?: number, height?: number, width?: number }): dia.BBox; + export function getElementBBox(el: Element): dia.BBox; + export function setAttributesBySelector(el: Element, attrs: dia.SVGAttributes): void; + export function sortElements(elements: Element[] | string | JQuery, comparator: (a: Element, b: Element) => number): Element[]; + export function shapePerimeterConnectionPoint(linkView: dia.LinkView, view: dia.ElementView, magnet: SVGElement, ref: dia.Point): dia.Point; + export function imageToDataUri(url: string, callback: (err: Error, dataUri: string) => void): void; + + // Not documented but used in examples + /** @deprecated use lodash _.defaultsDeep */ + export function deepSupplement(objects: any, defaultIndicator?: any): any; + + // Private functions + /** @deprecated use lodash _.assign */ + export function mixin(objects: any[]): any; + /** @deprecated use lodash _.defaults */ + export function supplement(objects: any[]): any; + /** @deprecated use lodash _.mixin */ + export function deepMixin(objects: any[]): any; +} + +export namespace layout { + + interface LayoutOptions { + nodeSep?: number; + edgeSep?: number; + rankSep?: number; + rankDir?: 'TB' | 'BT' | 'LR' | 'RL'; + marginX?: number; + marginY?: number; + resizeCluster?: boolean; + setPosition?: (element: dia.Element, position: dia.BBox) => void; + setLinkVertices?: (link: dia.Link, vertices: Position[]) => void; + } + + class DirectedGraph { + static layout(graph: dia.Graph | dia.Cell[], options?: LayoutOptions): dia.BBox; + } +} diff --git a/jointjs/tsconfig.json b/types/jointjs/tsconfig.json similarity index 100% rename from jointjs/tsconfig.json rename to types/jointjs/tsconfig.json diff --git a/jpm/index.d.ts b/types/jpm/index.d.ts similarity index 100% rename from jpm/index.d.ts rename to types/jpm/index.d.ts diff --git a/jpm/jpm-tests.ts b/types/jpm/jpm-tests.ts similarity index 100% rename from jpm/jpm-tests.ts rename to types/jpm/jpm-tests.ts diff --git a/jpm/tsconfig.json b/types/jpm/tsconfig.json similarity index 100% rename from jpm/tsconfig.json rename to types/jpm/tsconfig.json diff --git a/jqgrid/index.d.ts b/types/jqgrid/index.d.ts similarity index 100% rename from jqgrid/index.d.ts rename to types/jqgrid/index.d.ts diff --git a/jqgrid/jqgrid-tests.ts b/types/jqgrid/jqgrid-tests.ts similarity index 100% rename from jqgrid/jqgrid-tests.ts rename to types/jqgrid/jqgrid-tests.ts diff --git a/jqgrid/tsconfig.json b/types/jqgrid/tsconfig.json similarity index 100% rename from jqgrid/tsconfig.json rename to types/jqgrid/tsconfig.json diff --git a/jqrangeslider/index.d.ts b/types/jqrangeslider/index.d.ts similarity index 100% rename from jqrangeslider/index.d.ts rename to types/jqrangeslider/index.d.ts diff --git a/jqrangeslider/jqrangeslider-tests.ts b/types/jqrangeslider/jqrangeslider-tests.ts similarity index 100% rename from jqrangeslider/jqrangeslider-tests.ts rename to types/jqrangeslider/jqrangeslider-tests.ts diff --git a/jqrangeslider/tsconfig.json b/types/jqrangeslider/tsconfig.json similarity index 100% rename from jqrangeslider/tsconfig.json rename to types/jqrangeslider/tsconfig.json diff --git a/jquery-ajax-chain/index.d.ts b/types/jquery-ajax-chain/index.d.ts similarity index 100% rename from jquery-ajax-chain/index.d.ts rename to types/jquery-ajax-chain/index.d.ts diff --git a/jquery-ajax-chain/jquery-ajax-chain-tests.ts b/types/jquery-ajax-chain/jquery-ajax-chain-tests.ts similarity index 100% rename from jquery-ajax-chain/jquery-ajax-chain-tests.ts rename to types/jquery-ajax-chain/jquery-ajax-chain-tests.ts diff --git a/jquery-ajax-chain/tsconfig.json b/types/jquery-ajax-chain/tsconfig.json similarity index 100% rename from jquery-ajax-chain/tsconfig.json rename to types/jquery-ajax-chain/tsconfig.json diff --git a/jquery-alertable/index.d.ts b/types/jquery-alertable/index.d.ts similarity index 100% rename from jquery-alertable/index.d.ts rename to types/jquery-alertable/index.d.ts diff --git a/jquery-alertable/jquery-alertable-tests.ts b/types/jquery-alertable/jquery-alertable-tests.ts similarity index 100% rename from jquery-alertable/jquery-alertable-tests.ts rename to types/jquery-alertable/jquery-alertable-tests.ts diff --git a/jquery-alertable/tsconfig.json b/types/jquery-alertable/tsconfig.json similarity index 100% rename from jquery-alertable/tsconfig.json rename to types/jquery-alertable/tsconfig.json diff --git a/jquery-backstretch/index.d.ts b/types/jquery-backstretch/index.d.ts similarity index 100% rename from jquery-backstretch/index.d.ts rename to types/jquery-backstretch/index.d.ts diff --git a/jquery-backstretch/jquery-backstretch-tests.ts b/types/jquery-backstretch/jquery-backstretch-tests.ts similarity index 100% rename from jquery-backstretch/jquery-backstretch-tests.ts rename to types/jquery-backstretch/jquery-backstretch-tests.ts diff --git a/jquery-backstretch/tsconfig.json b/types/jquery-backstretch/tsconfig.json similarity index 100% rename from jquery-backstretch/tsconfig.json rename to types/jquery-backstretch/tsconfig.json diff --git a/jquery-cropbox/index.d.ts b/types/jquery-cropbox/index.d.ts similarity index 100% rename from jquery-cropbox/index.d.ts rename to types/jquery-cropbox/index.d.ts diff --git a/jquery-cropbox/jquery-cropbox-tests.ts b/types/jquery-cropbox/jquery-cropbox-tests.ts similarity index 100% rename from jquery-cropbox/jquery-cropbox-tests.ts rename to types/jquery-cropbox/jquery-cropbox-tests.ts diff --git a/jquery-cropbox/tsconfig.json b/types/jquery-cropbox/tsconfig.json similarity index 100% rename from jquery-cropbox/tsconfig.json rename to types/jquery-cropbox/tsconfig.json diff --git a/jquery-deparam/index.d.ts b/types/jquery-deparam/index.d.ts similarity index 100% rename from jquery-deparam/index.d.ts rename to types/jquery-deparam/index.d.ts diff --git a/jquery-deparam/jquery-deparam-tests.ts b/types/jquery-deparam/jquery-deparam-tests.ts similarity index 100% rename from jquery-deparam/jquery-deparam-tests.ts rename to types/jquery-deparam/jquery-deparam-tests.ts diff --git a/jquery-deparam/tsconfig.json b/types/jquery-deparam/tsconfig.json similarity index 100% rename from jquery-deparam/tsconfig.json rename to types/jquery-deparam/tsconfig.json diff --git a/jquery-easy-loading/index.d.ts b/types/jquery-easy-loading/index.d.ts similarity index 100% rename from jquery-easy-loading/index.d.ts rename to types/jquery-easy-loading/index.d.ts diff --git a/jquery-easy-loading/jquery-easy-loading-tests.ts b/types/jquery-easy-loading/jquery-easy-loading-tests.ts similarity index 100% rename from jquery-easy-loading/jquery-easy-loading-tests.ts rename to types/jquery-easy-loading/jquery-easy-loading-tests.ts diff --git a/jquery-easy-loading/tsconfig.json b/types/jquery-easy-loading/tsconfig.json similarity index 100% rename from jquery-easy-loading/tsconfig.json rename to types/jquery-easy-loading/tsconfig.json diff --git a/jquery-fullscreen/index.d.ts b/types/jquery-fullscreen/index.d.ts similarity index 100% rename from jquery-fullscreen/index.d.ts rename to types/jquery-fullscreen/index.d.ts diff --git a/jquery-fullscreen/jquery-fullscreen-tests.ts b/types/jquery-fullscreen/jquery-fullscreen-tests.ts similarity index 100% rename from jquery-fullscreen/jquery-fullscreen-tests.ts rename to types/jquery-fullscreen/jquery-fullscreen-tests.ts diff --git a/jquery-fullscreen/tsconfig.json b/types/jquery-fullscreen/tsconfig.json similarity index 100% rename from jquery-fullscreen/tsconfig.json rename to types/jquery-fullscreen/tsconfig.json diff --git a/jquery-galleria/index.d.ts b/types/jquery-galleria/index.d.ts similarity index 100% rename from jquery-galleria/index.d.ts rename to types/jquery-galleria/index.d.ts diff --git a/jquery-galleria/jquery-galleria-tests.ts b/types/jquery-galleria/jquery-galleria-tests.ts similarity index 100% rename from jquery-galleria/jquery-galleria-tests.ts rename to types/jquery-galleria/jquery-galleria-tests.ts diff --git a/jquery-galleria/tsconfig.json b/types/jquery-galleria/tsconfig.json similarity index 100% rename from jquery-galleria/tsconfig.json rename to types/jquery-galleria/tsconfig.json diff --git a/jquery-handsontable/index.d.ts b/types/jquery-handsontable/index.d.ts similarity index 100% rename from jquery-handsontable/index.d.ts rename to types/jquery-handsontable/index.d.ts diff --git a/jquery-handsontable/jquery-handsontable-tests.ts b/types/jquery-handsontable/jquery-handsontable-tests.ts similarity index 100% rename from jquery-handsontable/jquery-handsontable-tests.ts rename to types/jquery-handsontable/jquery-handsontable-tests.ts diff --git a/jquery-handsontable/tsconfig.json b/types/jquery-handsontable/tsconfig.json similarity index 100% rename from jquery-handsontable/tsconfig.json rename to types/jquery-handsontable/tsconfig.json diff --git a/jquery-jsonrpcclient/index.d.ts b/types/jquery-jsonrpcclient/index.d.ts similarity index 100% rename from jquery-jsonrpcclient/index.d.ts rename to types/jquery-jsonrpcclient/index.d.ts diff --git a/jquery-jsonrpcclient/jquery-jsonrpcclient-tests.ts b/types/jquery-jsonrpcclient/jquery-jsonrpcclient-tests.ts similarity index 100% rename from jquery-jsonrpcclient/jquery-jsonrpcclient-tests.ts rename to types/jquery-jsonrpcclient/jquery-jsonrpcclient-tests.ts diff --git a/jquery-jsonrpcclient/tsconfig.json b/types/jquery-jsonrpcclient/tsconfig.json similarity index 100% rename from jquery-jsonrpcclient/tsconfig.json rename to types/jquery-jsonrpcclient/tsconfig.json diff --git a/jquery-knob/index.d.ts b/types/jquery-knob/index.d.ts similarity index 100% rename from jquery-knob/index.d.ts rename to types/jquery-knob/index.d.ts diff --git a/jquery-knob/jquery-knob-tests.ts b/types/jquery-knob/jquery-knob-tests.ts similarity index 100% rename from jquery-knob/jquery-knob-tests.ts rename to types/jquery-knob/jquery-knob-tests.ts diff --git a/jquery-knob/tsconfig.json b/types/jquery-knob/tsconfig.json similarity index 100% rename from jquery-knob/tsconfig.json rename to types/jquery-knob/tsconfig.json diff --git a/jquery-mask-plugin/index.d.ts b/types/jquery-mask-plugin/index.d.ts similarity index 99% rename from jquery-mask-plugin/index.d.ts rename to types/jquery-mask-plugin/index.d.ts index 61f3a69359..270828856f 100644 --- a/jquery-mask-plugin/index.d.ts +++ b/types/jquery-mask-plugin/index.d.ts @@ -6,7 +6,6 @@ /// declare namespace jQueryMask { - interface Invalid { p: number; v: string; @@ -42,11 +41,9 @@ declare namespace jQueryMask { [key: string]: Pattern | {} | undefined; placeholder?: string; } - } interface JQuery { - /** * Applies the mask to the matching selector elements. * @param mask should be a string or a function. @@ -72,4 +69,4 @@ interface JQuery { * @returns Masked value. */ masked(value: string): string; -} \ No newline at end of file +} diff --git a/jquery-mask-plugin/jquery-mask-plugin-tests.ts b/types/jquery-mask-plugin/jquery-mask-plugin-tests.ts similarity index 98% rename from jquery-mask-plugin/jquery-mask-plugin-tests.ts rename to types/jquery-mask-plugin/jquery-mask-plugin-tests.ts index 36362eccf7..310cec421b 100644 --- a/jquery-mask-plugin/jquery-mask-plugin-tests.ts +++ b/types/jquery-mask-plugin/jquery-mask-plugin-tests.ts @@ -1,4 +1,3 @@ - // basic usage $(document).ready(() => { $('.date').mask('00/00/0000'); @@ -53,7 +52,7 @@ let options: jQueryMask.Options = { console.log('cep changed! ', cep); }, onInvalid(val: Object, e: Event, f: JQuery, invalid: jQueryMask.Invalid[], options: jQueryMask.Options) { - var error = invalid[0]; + const error = invalid[0]; console.log("Digit: ", error.v, " is invalid for the position: ", error.p, ". We expect something like: ", error.e); } }; @@ -116,4 +115,4 @@ $('.date').unmask(); $('.date').cleanVal(); // Getting a masked value programmatically -$('.date').masked('19840807'); \ No newline at end of file +$('.date').masked('19840807'); diff --git a/jquery-mask-plugin/tsconfig.json b/types/jquery-mask-plugin/tsconfig.json similarity index 100% rename from jquery-mask-plugin/tsconfig.json rename to types/jquery-mask-plugin/tsconfig.json diff --git a/jquery-mask-plugin/tslint.json b/types/jquery-mask-plugin/tslint.json similarity index 100% rename from jquery-mask-plugin/tslint.json rename to types/jquery-mask-plugin/tslint.json diff --git a/jquery-mockjax/index.d.ts b/types/jquery-mockjax/index.d.ts similarity index 100% rename from jquery-mockjax/index.d.ts rename to types/jquery-mockjax/index.d.ts diff --git a/jquery-mockjax/jquery-mockjax-tests.ts b/types/jquery-mockjax/jquery-mockjax-tests.ts similarity index 100% rename from jquery-mockjax/jquery-mockjax-tests.ts rename to types/jquery-mockjax/jquery-mockjax-tests.ts diff --git a/jquery-mockjax/tsconfig.json b/types/jquery-mockjax/tsconfig.json similarity index 100% rename from jquery-mockjax/tsconfig.json rename to types/jquery-mockjax/tsconfig.json diff --git a/jquery-mousewheel/index.d.ts b/types/jquery-mousewheel/index.d.ts similarity index 100% rename from jquery-mousewheel/index.d.ts rename to types/jquery-mousewheel/index.d.ts diff --git a/jquery-mousewheel/jquery-mousewheel-tests.ts b/types/jquery-mousewheel/jquery-mousewheel-tests.ts similarity index 100% rename from jquery-mousewheel/jquery-mousewheel-tests.ts rename to types/jquery-mousewheel/jquery-mousewheel-tests.ts diff --git a/jquery-mousewheel/tsconfig.json b/types/jquery-mousewheel/tsconfig.json similarity index 100% rename from jquery-mousewheel/tsconfig.json rename to types/jquery-mousewheel/tsconfig.json diff --git a/jquery-param/index.d.ts b/types/jquery-param/index.d.ts similarity index 100% rename from jquery-param/index.d.ts rename to types/jquery-param/index.d.ts diff --git a/jquery-param/jquery-param-tests.ts b/types/jquery-param/jquery-param-tests.ts similarity index 100% rename from jquery-param/jquery-param-tests.ts rename to types/jquery-param/jquery-param-tests.ts diff --git a/jquery-param/tsconfig.json b/types/jquery-param/tsconfig.json similarity index 100% rename from jquery-param/tsconfig.json rename to types/jquery-param/tsconfig.json diff --git a/jquery-sortable/index.d.ts b/types/jquery-sortable/index.d.ts similarity index 100% rename from jquery-sortable/index.d.ts rename to types/jquery-sortable/index.d.ts diff --git a/jquery-sortable/jquery-sortable-tests.ts b/types/jquery-sortable/jquery-sortable-tests.ts similarity index 100% rename from jquery-sortable/jquery-sortable-tests.ts rename to types/jquery-sortable/jquery-sortable-tests.ts diff --git a/jquery-sortable/tsconfig.json b/types/jquery-sortable/tsconfig.json similarity index 100% rename from jquery-sortable/tsconfig.json rename to types/jquery-sortable/tsconfig.json diff --git a/jquery-steps/index.d.ts b/types/jquery-steps/index.d.ts similarity index 100% rename from jquery-steps/index.d.ts rename to types/jquery-steps/index.d.ts diff --git a/jquery-steps/jquery-steps-tests.ts b/types/jquery-steps/jquery-steps-tests.ts similarity index 100% rename from jquery-steps/jquery-steps-tests.ts rename to types/jquery-steps/jquery-steps-tests.ts diff --git a/jquery-steps/tsconfig.json b/types/jquery-steps/tsconfig.json similarity index 100% rename from jquery-steps/tsconfig.json rename to types/jquery-steps/tsconfig.json diff --git a/jquery-timeentry/index.d.ts b/types/jquery-timeentry/index.d.ts similarity index 100% rename from jquery-timeentry/index.d.ts rename to types/jquery-timeentry/index.d.ts diff --git a/jquery-timeentry/jquery-timeentry-tests.ts b/types/jquery-timeentry/jquery-timeentry-tests.ts similarity index 100% rename from jquery-timeentry/jquery-timeentry-tests.ts rename to types/jquery-timeentry/jquery-timeentry-tests.ts diff --git a/jquery-timeentry/tsconfig.json b/types/jquery-timeentry/tsconfig.json similarity index 100% rename from jquery-timeentry/tsconfig.json rename to types/jquery-timeentry/tsconfig.json diff --git a/jquery-toastmessage-plugin/index.d.ts b/types/jquery-toastmessage-plugin/index.d.ts similarity index 98% rename from jquery-toastmessage-plugin/index.d.ts rename to types/jquery-toastmessage-plugin/index.d.ts index 2666ecbd0b..6ca6816e21 100644 --- a/jquery-toastmessage-plugin/index.d.ts +++ b/types/jquery-toastmessage-plugin/index.d.ts @@ -5,7 +5,7 @@ /// -declare interface JQuery { +interface JQuery { toastmessage: JQueryToastmessage.ToastmessageStatic; } @@ -54,4 +54,4 @@ declare namespace JQueryToastmessage { /** callback function when the toastmessage is closed @default null */ close?: () => void; } -} \ No newline at end of file +} diff --git a/types/jquery-toastmessage-plugin/jquery-toastmessage-plugin-tests.ts b/types/jquery-toastmessage-plugin/jquery-toastmessage-plugin-tests.ts new file mode 100644 index 0000000000..ae096da350 --- /dev/null +++ b/types/jquery-toastmessage-plugin/jquery-toastmessage-plugin-tests.ts @@ -0,0 +1,85 @@ +/* code examples from documentation */ + +$().toastmessage('showNoticeToast', 'some message here'); +$().toastmessage('showSuccessToast', "some message here"); +$().toastmessage('showWarningToast', "some message here"); +$().toastmessage('showErrorToast', "some message here"); + +// user configured toastmessage: +const toastObject = $().toastmessage('showToast', { + text: 'Hello World', + sticky: true, + position: 'top-right', + type: 'success', + close() { console.log("toast is closed ..."); } +}); + +$().toastmessage('removeToast', toastObject); + +// reconfiguring the toasts as sticky +$().toastmessage({sticky : true}); + +// saving the newly created toast into a variable +const myToast = $().toastmessage('showNoticeToast', 'some message here'); + +// removing the toast +$().toastmessage('removeToast', myToast); + +// user configuration of all toastmessages to come: +$().toastmessage({ + text: 'Hello World', + sticky: true, + position: 'top-right', + type: 'success', + close() { console.log("toast is closed ..."); } +}); + +$().toastmessage({ + inEffectDuration: 600, // in effect duration in miliseconds + stayTime: 3000, // time in miliseconds before the item has to disappear + text: '', // content of the item + sticky: false, // should the toast item sticky or not? + type: 'notice', // notice, warning, error, success + position: 'top-right', // top-left, top-center, top-right, middle-left, middle-center, middle-right + // Position of the toast container holding different toast. + // Position can be set only once at the very first call, + // changing the position after the first call does nothing + closeText: '', // text which will be shown as close button, + // set to '' when you want to introduce an image via css + close: undefined // callback function when the toastmessage is closed +}); + +/* code examples from tests */ + +$('.toast-container').remove(); + +$().toastmessage('showSuccessToast', "SUCCESS"); +$().toastmessage('showNoticeToast', "NOTICE"); +$().toastmessage('showWarningToast', "WARNING"); +$().toastmessage('showErrorToast', "ERROR"); +$().toastmessage({ + sticky: true, + position: 'top-right', + closeText: '' +}); +$().toastmessage('showToast', { + text: 'Success Dialog', + type: 'success' +}); +$().toastmessage('showToast', { + text: 'Success Dialog', + sticky: true, + position: 'top-right', + type: 'success', + closeText: '', + close() {} +}); +const toast = $().toastmessage('showToast', { + text: 'Success Dialog', + sticky: true, + position: 'top-right', + type: 'success', + closeText: '', + close() {} +}); +$().toastmessage('removeToast', toast, { close() {} }); diff --git a/jquery-toastmessage-plugin/tsconfig.json b/types/jquery-toastmessage-plugin/tsconfig.json similarity index 100% rename from jquery-toastmessage-plugin/tsconfig.json rename to types/jquery-toastmessage-plugin/tsconfig.json diff --git a/jquery-toastmessage-plugin/tslint.json b/types/jquery-toastmessage-plugin/tslint.json similarity index 100% rename from jquery-toastmessage-plugin/tslint.json rename to types/jquery-toastmessage-plugin/tslint.json diff --git a/jquery-truncate-html/index.d.ts b/types/jquery-truncate-html/index.d.ts similarity index 100% rename from jquery-truncate-html/index.d.ts rename to types/jquery-truncate-html/index.d.ts diff --git a/jquery-truncate-html/jquery-truncate-html-tests.ts b/types/jquery-truncate-html/jquery-truncate-html-tests.ts similarity index 100% rename from jquery-truncate-html/jquery-truncate-html-tests.ts rename to types/jquery-truncate-html/jquery-truncate-html-tests.ts diff --git a/jquery-truncate-html/tsconfig.json b/types/jquery-truncate-html/tsconfig.json similarity index 100% rename from jquery-truncate-html/tsconfig.json rename to types/jquery-truncate-html/tsconfig.json diff --git a/jquery-urlparam/index.d.ts b/types/jquery-urlparam/index.d.ts similarity index 100% rename from jquery-urlparam/index.d.ts rename to types/jquery-urlparam/index.d.ts diff --git a/jquery-urlparam/jquery-urlparam-tests.ts b/types/jquery-urlparam/jquery-urlparam-tests.ts similarity index 100% rename from jquery-urlparam/jquery-urlparam-tests.ts rename to types/jquery-urlparam/jquery-urlparam-tests.ts diff --git a/jquery-urlparam/tsconfig.json b/types/jquery-urlparam/tsconfig.json similarity index 100% rename from jquery-urlparam/tsconfig.json rename to types/jquery-urlparam/tsconfig.json diff --git a/jquery-validation-unobtrusive/index.d.ts b/types/jquery-validation-unobtrusive/index.d.ts similarity index 100% rename from jquery-validation-unobtrusive/index.d.ts rename to types/jquery-validation-unobtrusive/index.d.ts diff --git a/jquery-validation-unobtrusive/jquery-validation-unobtrusive-tests.ts b/types/jquery-validation-unobtrusive/jquery-validation-unobtrusive-tests.ts similarity index 100% rename from jquery-validation-unobtrusive/jquery-validation-unobtrusive-tests.ts rename to types/jquery-validation-unobtrusive/jquery-validation-unobtrusive-tests.ts diff --git a/jquery-validation-unobtrusive/tsconfig.json b/types/jquery-validation-unobtrusive/tsconfig.json similarity index 100% rename from jquery-validation-unobtrusive/tsconfig.json rename to types/jquery-validation-unobtrusive/tsconfig.json diff --git a/jquery.address/index.d.ts b/types/jquery.address/index.d.ts similarity index 100% rename from jquery.address/index.d.ts rename to types/jquery.address/index.d.ts diff --git a/jquery.address/tsconfig.json b/types/jquery.address/tsconfig.json similarity index 100% rename from jquery.address/tsconfig.json rename to types/jquery.address/tsconfig.json diff --git a/jquery.ajaxfile/index.d.ts b/types/jquery.ajaxfile/index.d.ts similarity index 100% rename from jquery.ajaxfile/index.d.ts rename to types/jquery.ajaxfile/index.d.ts diff --git a/jquery.ajaxfile/jquery.ajaxfile-tests.ts b/types/jquery.ajaxfile/jquery.ajaxfile-tests.ts similarity index 100% rename from jquery.ajaxfile/jquery.ajaxfile-tests.ts rename to types/jquery.ajaxfile/jquery.ajaxfile-tests.ts diff --git a/jquery.ajaxfile/tsconfig.json b/types/jquery.ajaxfile/tsconfig.json similarity index 100% rename from jquery.ajaxfile/tsconfig.json rename to types/jquery.ajaxfile/tsconfig.json diff --git a/jquery.are-you-sure/index.d.ts b/types/jquery.are-you-sure/index.d.ts similarity index 100% rename from jquery.are-you-sure/index.d.ts rename to types/jquery.are-you-sure/index.d.ts diff --git a/jquery.are-you-sure/jquery.are-you-sure-tests.ts b/types/jquery.are-you-sure/jquery.are-you-sure-tests.ts similarity index 100% rename from jquery.are-you-sure/jquery.are-you-sure-tests.ts rename to types/jquery.are-you-sure/jquery.are-you-sure-tests.ts diff --git a/jquery.are-you-sure/tsconfig.json b/types/jquery.are-you-sure/tsconfig.json similarity index 100% rename from jquery.are-you-sure/tsconfig.json rename to types/jquery.are-you-sure/tsconfig.json diff --git a/jquery.autosize/index.d.ts b/types/jquery.autosize/index.d.ts similarity index 100% rename from jquery.autosize/index.d.ts rename to types/jquery.autosize/index.d.ts diff --git a/jquery.autosize/jquery.autosize-tests.ts b/types/jquery.autosize/jquery.autosize-tests.ts similarity index 100% rename from jquery.autosize/jquery.autosize-tests.ts rename to types/jquery.autosize/jquery.autosize-tests.ts diff --git a/jquery.autosize/tsconfig.json b/types/jquery.autosize/tsconfig.json similarity index 100% rename from jquery.autosize/tsconfig.json rename to types/jquery.autosize/tsconfig.json diff --git a/jquery.base64/index.d.ts b/types/jquery.base64/index.d.ts similarity index 100% rename from jquery.base64/index.d.ts rename to types/jquery.base64/index.d.ts diff --git a/jquery.base64/jquery.base64-tests.ts b/types/jquery.base64/jquery.base64-tests.ts similarity index 100% rename from jquery.base64/jquery.base64-tests.ts rename to types/jquery.base64/jquery.base64-tests.ts diff --git a/jquery.base64/tsconfig.json b/types/jquery.base64/tsconfig.json similarity index 100% rename from jquery.base64/tsconfig.json rename to types/jquery.base64/tsconfig.json diff --git a/jquery.bbq/index.d.ts b/types/jquery.bbq/index.d.ts similarity index 100% rename from jquery.bbq/index.d.ts rename to types/jquery.bbq/index.d.ts diff --git a/jquery.bbq/jquery.bbq-tests.ts b/types/jquery.bbq/jquery.bbq-tests.ts similarity index 100% rename from jquery.bbq/jquery.bbq-tests.ts rename to types/jquery.bbq/jquery.bbq-tests.ts diff --git a/jquery.bbq/tsconfig.json b/types/jquery.bbq/tsconfig.json similarity index 100% rename from jquery.bbq/tsconfig.json rename to types/jquery.bbq/tsconfig.json diff --git a/jquery.blockui/index.d.ts b/types/jquery.blockui/index.d.ts similarity index 100% rename from jquery.blockui/index.d.ts rename to types/jquery.blockui/index.d.ts diff --git a/jquery.blockui/jquery.blockui-tests.ts b/types/jquery.blockui/jquery.blockui-tests.ts similarity index 100% rename from jquery.blockui/jquery.blockui-tests.ts rename to types/jquery.blockui/jquery.blockui-tests.ts diff --git a/jquery.blockui/tsconfig.json b/types/jquery.blockui/tsconfig.json similarity index 100% rename from jquery.blockui/tsconfig.json rename to types/jquery.blockui/tsconfig.json diff --git a/jquery.bootstrap.wizard/index.d.ts b/types/jquery.bootstrap.wizard/index.d.ts similarity index 100% rename from jquery.bootstrap.wizard/index.d.ts rename to types/jquery.bootstrap.wizard/index.d.ts diff --git a/jquery.bootstrap.wizard/tsconfig.json b/types/jquery.bootstrap.wizard/tsconfig.json similarity index 100% rename from jquery.bootstrap.wizard/tsconfig.json rename to types/jquery.bootstrap.wizard/tsconfig.json diff --git a/jquery.cleditor/index.d.ts b/types/jquery.cleditor/index.d.ts similarity index 100% rename from jquery.cleditor/index.d.ts rename to types/jquery.cleditor/index.d.ts diff --git a/jquery.cleditor/jquery.cleditor-tests.ts b/types/jquery.cleditor/jquery.cleditor-tests.ts similarity index 100% rename from jquery.cleditor/jquery.cleditor-tests.ts rename to types/jquery.cleditor/jquery.cleditor-tests.ts diff --git a/jquery.cleditor/tsconfig.json b/types/jquery.cleditor/tsconfig.json similarity index 100% rename from jquery.cleditor/tsconfig.json rename to types/jquery.cleditor/tsconfig.json diff --git a/jquery.clientsidelogging/index.d.ts b/types/jquery.clientsidelogging/index.d.ts similarity index 100% rename from jquery.clientsidelogging/index.d.ts rename to types/jquery.clientsidelogging/index.d.ts diff --git a/jquery.clientsidelogging/jquery.clientsidelogging-tests.ts b/types/jquery.clientsidelogging/jquery.clientsidelogging-tests.ts similarity index 100% rename from jquery.clientsidelogging/jquery.clientsidelogging-tests.ts rename to types/jquery.clientsidelogging/jquery.clientsidelogging-tests.ts diff --git a/jquery.clientsidelogging/tsconfig.json b/types/jquery.clientsidelogging/tsconfig.json similarity index 100% rename from jquery.clientsidelogging/tsconfig.json rename to types/jquery.clientsidelogging/tsconfig.json diff --git a/jquery.color/index.d.ts b/types/jquery.color/index.d.ts similarity index 100% rename from jquery.color/index.d.ts rename to types/jquery.color/index.d.ts diff --git a/jquery.color/jquery.color-tests.ts b/types/jquery.color/jquery.color-tests.ts similarity index 100% rename from jquery.color/jquery.color-tests.ts rename to types/jquery.color/jquery.color-tests.ts diff --git a/jquery.color/tsconfig.json b/types/jquery.color/tsconfig.json similarity index 100% rename from jquery.color/tsconfig.json rename to types/jquery.color/tsconfig.json diff --git a/jquery.colorbox/index.d.ts b/types/jquery.colorbox/index.d.ts similarity index 100% rename from jquery.colorbox/index.d.ts rename to types/jquery.colorbox/index.d.ts diff --git a/jquery.colorbox/jquery.colorbox-tests.ts b/types/jquery.colorbox/jquery.colorbox-tests.ts similarity index 100% rename from jquery.colorbox/jquery.colorbox-tests.ts rename to types/jquery.colorbox/jquery.colorbox-tests.ts diff --git a/jquery.colorbox/tsconfig.json b/types/jquery.colorbox/tsconfig.json similarity index 100% rename from jquery.colorbox/tsconfig.json rename to types/jquery.colorbox/tsconfig.json diff --git a/jquery.colorpicker/index.d.ts b/types/jquery.colorpicker/index.d.ts similarity index 100% rename from jquery.colorpicker/index.d.ts rename to types/jquery.colorpicker/index.d.ts diff --git a/jquery.colorpicker/jquery.colorpicker-tests.ts b/types/jquery.colorpicker/jquery.colorpicker-tests.ts similarity index 100% rename from jquery.colorpicker/jquery.colorpicker-tests.ts rename to types/jquery.colorpicker/jquery.colorpicker-tests.ts diff --git a/jquery.colorpicker/tsconfig.json b/types/jquery.colorpicker/tsconfig.json similarity index 100% rename from jquery.colorpicker/tsconfig.json rename to types/jquery.colorpicker/tsconfig.json diff --git a/jquery.contextmenu/index.d.ts b/types/jquery.contextmenu/index.d.ts similarity index 100% rename from jquery.contextmenu/index.d.ts rename to types/jquery.contextmenu/index.d.ts diff --git a/jquery.contextmenu/jquery.contextmenu-tests.ts b/types/jquery.contextmenu/jquery.contextmenu-tests.ts similarity index 100% rename from jquery.contextmenu/jquery.contextmenu-tests.ts rename to types/jquery.contextmenu/jquery.contextmenu-tests.ts diff --git a/jquery.contextmenu/tsconfig.json b/types/jquery.contextmenu/tsconfig.json similarity index 100% rename from jquery.contextmenu/tsconfig.json rename to types/jquery.contextmenu/tsconfig.json diff --git a/jquery.cookie/index.d.ts b/types/jquery.cookie/index.d.ts similarity index 100% rename from jquery.cookie/index.d.ts rename to types/jquery.cookie/index.d.ts diff --git a/jquery.cookie/jquery.cookie-tests.ts b/types/jquery.cookie/jquery.cookie-tests.ts similarity index 100% rename from jquery.cookie/jquery.cookie-tests.ts rename to types/jquery.cookie/jquery.cookie-tests.ts diff --git a/jquery.cookie/tsconfig.json b/types/jquery.cookie/tsconfig.json similarity index 100% rename from jquery.cookie/tsconfig.json rename to types/jquery.cookie/tsconfig.json diff --git a/jquery.customselect/index.d.ts b/types/jquery.customselect/index.d.ts similarity index 100% rename from jquery.customselect/index.d.ts rename to types/jquery.customselect/index.d.ts diff --git a/jquery.customselect/jquery.customselect-tests.ts b/types/jquery.customselect/jquery.customselect-tests.ts similarity index 100% rename from jquery.customselect/jquery.customselect-tests.ts rename to types/jquery.customselect/jquery.customselect-tests.ts diff --git a/jquery.customselect/tsconfig.json b/types/jquery.customselect/tsconfig.json similarity index 100% rename from jquery.customselect/tsconfig.json rename to types/jquery.customselect/tsconfig.json diff --git a/jquery.cycle/index.d.ts b/types/jquery.cycle/index.d.ts similarity index 100% rename from jquery.cycle/index.d.ts rename to types/jquery.cycle/index.d.ts diff --git a/jquery.cycle/jquery.cycle-tests.ts b/types/jquery.cycle/jquery.cycle-tests.ts similarity index 100% rename from jquery.cycle/jquery.cycle-tests.ts rename to types/jquery.cycle/jquery.cycle-tests.ts diff --git a/jquery.cycle/tsconfig.json b/types/jquery.cycle/tsconfig.json similarity index 100% rename from jquery.cycle/tsconfig.json rename to types/jquery.cycle/tsconfig.json diff --git a/jquery.cycle2/index.d.ts b/types/jquery.cycle2/index.d.ts similarity index 100% rename from jquery.cycle2/index.d.ts rename to types/jquery.cycle2/index.d.ts diff --git a/jquery.cycle2/jquery.cycle2-tests.ts b/types/jquery.cycle2/jquery.cycle2-tests.ts similarity index 100% rename from jquery.cycle2/jquery.cycle2-tests.ts rename to types/jquery.cycle2/jquery.cycle2-tests.ts diff --git a/jquery.cycle2/tsconfig.json b/types/jquery.cycle2/tsconfig.json similarity index 100% rename from jquery.cycle2/tsconfig.json rename to types/jquery.cycle2/tsconfig.json diff --git a/jquery.dropotron/index.d.ts b/types/jquery.dropotron/index.d.ts similarity index 100% rename from jquery.dropotron/index.d.ts rename to types/jquery.dropotron/index.d.ts diff --git a/jquery.dropotron/jquery.dropotron-tests.ts b/types/jquery.dropotron/jquery.dropotron-tests.ts similarity index 100% rename from jquery.dropotron/jquery.dropotron-tests.ts rename to types/jquery.dropotron/jquery.dropotron-tests.ts diff --git a/jquery.dropotron/tsconfig.json b/types/jquery.dropotron/tsconfig.json similarity index 100% rename from jquery.dropotron/tsconfig.json rename to types/jquery.dropotron/tsconfig.json diff --git a/jquery.dynatree/index.d.ts b/types/jquery.dynatree/index.d.ts similarity index 100% rename from jquery.dynatree/index.d.ts rename to types/jquery.dynatree/index.d.ts diff --git a/jquery.dynatree/jquery.dynatree-tests.ts b/types/jquery.dynatree/jquery.dynatree-tests.ts similarity index 100% rename from jquery.dynatree/jquery.dynatree-tests.ts rename to types/jquery.dynatree/jquery.dynatree-tests.ts diff --git a/jquery.dynatree/tsconfig.json b/types/jquery.dynatree/tsconfig.json similarity index 100% rename from jquery.dynatree/tsconfig.json rename to types/jquery.dynatree/tsconfig.json diff --git a/jquery.elang/index.d.ts b/types/jquery.elang/index.d.ts similarity index 100% rename from jquery.elang/index.d.ts rename to types/jquery.elang/index.d.ts diff --git a/jquery.elang/tsconfig.json b/types/jquery.elang/tsconfig.json similarity index 100% rename from jquery.elang/tsconfig.json rename to types/jquery.elang/tsconfig.json diff --git a/jquery.fancytree/index.d.ts b/types/jquery.fancytree/index.d.ts similarity index 100% rename from jquery.fancytree/index.d.ts rename to types/jquery.fancytree/index.d.ts diff --git a/jquery.fancytree/jquery.fancytree-tests.ts b/types/jquery.fancytree/jquery.fancytree-tests.ts similarity index 100% rename from jquery.fancytree/jquery.fancytree-tests.ts rename to types/jquery.fancytree/jquery.fancytree-tests.ts diff --git a/jquery.fancytree/tsconfig.json b/types/jquery.fancytree/tsconfig.json similarity index 100% rename from jquery.fancytree/tsconfig.json rename to types/jquery.fancytree/tsconfig.json diff --git a/jquery.fileupload/index.d.ts b/types/jquery.fileupload/index.d.ts similarity index 100% rename from jquery.fileupload/index.d.ts rename to types/jquery.fileupload/index.d.ts diff --git a/jquery.fileupload/jquery.fileupload-tests.ts b/types/jquery.fileupload/jquery.fileupload-tests.ts similarity index 100% rename from jquery.fileupload/jquery.fileupload-tests.ts rename to types/jquery.fileupload/jquery.fileupload-tests.ts diff --git a/jquery.fileupload/tsconfig.json b/types/jquery.fileupload/tsconfig.json similarity index 100% rename from jquery.fileupload/tsconfig.json rename to types/jquery.fileupload/tsconfig.json diff --git a/jquery.finger/index.d.ts b/types/jquery.finger/index.d.ts similarity index 100% rename from jquery.finger/index.d.ts rename to types/jquery.finger/index.d.ts diff --git a/jquery.finger/jquery.finger-tests.ts b/types/jquery.finger/jquery.finger-tests.ts similarity index 100% rename from jquery.finger/jquery.finger-tests.ts rename to types/jquery.finger/jquery.finger-tests.ts diff --git a/jquery.finger/tsconfig.json b/types/jquery.finger/tsconfig.json similarity index 100% rename from jquery.finger/tsconfig.json rename to types/jquery.finger/tsconfig.json diff --git a/jquery.flagstrap/index.d.ts b/types/jquery.flagstrap/index.d.ts similarity index 100% rename from jquery.flagstrap/index.d.ts rename to types/jquery.flagstrap/index.d.ts diff --git a/jquery.flagstrap/jquery.flagstrap-tests.ts b/types/jquery.flagstrap/jquery.flagstrap-tests.ts similarity index 100% rename from jquery.flagstrap/jquery.flagstrap-tests.ts rename to types/jquery.flagstrap/jquery.flagstrap-tests.ts diff --git a/jquery.flagstrap/tsconfig.json b/types/jquery.flagstrap/tsconfig.json similarity index 100% rename from jquery.flagstrap/tsconfig.json rename to types/jquery.flagstrap/tsconfig.json diff --git a/jquery.form/index.d.ts b/types/jquery.form/index.d.ts similarity index 100% rename from jquery.form/index.d.ts rename to types/jquery.form/index.d.ts diff --git a/jquery.form/jquery.form-tests.ts b/types/jquery.form/jquery.form-tests.ts similarity index 100% rename from jquery.form/jquery.form-tests.ts rename to types/jquery.form/jquery.form-tests.ts diff --git a/jquery.form/tsconfig.json b/types/jquery.form/tsconfig.json similarity index 100% rename from jquery.form/tsconfig.json rename to types/jquery.form/tsconfig.json diff --git a/jquery.fullscreen/index.d.ts b/types/jquery.fullscreen/index.d.ts similarity index 100% rename from jquery.fullscreen/index.d.ts rename to types/jquery.fullscreen/index.d.ts diff --git a/jquery.fullscreen/jquery.fullscreen-tests.ts b/types/jquery.fullscreen/jquery.fullscreen-tests.ts similarity index 100% rename from jquery.fullscreen/jquery.fullscreen-tests.ts rename to types/jquery.fullscreen/jquery.fullscreen-tests.ts diff --git a/jquery.fullscreen/tsconfig.json b/types/jquery.fullscreen/tsconfig.json similarity index 100% rename from jquery.fullscreen/tsconfig.json rename to types/jquery.fullscreen/tsconfig.json diff --git a/jquery.gridster/index.d.ts b/types/jquery.gridster/index.d.ts similarity index 100% rename from jquery.gridster/index.d.ts rename to types/jquery.gridster/index.d.ts diff --git a/jquery.gridster/jquery.gridster-tests.ts b/types/jquery.gridster/jquery.gridster-tests.ts similarity index 100% rename from jquery.gridster/jquery.gridster-tests.ts rename to types/jquery.gridster/jquery.gridster-tests.ts diff --git a/jquery.gridster/tsconfig.json b/types/jquery.gridster/tsconfig.json similarity index 100% rename from jquery.gridster/tsconfig.json rename to types/jquery.gridster/tsconfig.json diff --git a/jquery.highlight-bartaz/index.d.ts b/types/jquery.highlight-bartaz/index.d.ts similarity index 100% rename from jquery.highlight-bartaz/index.d.ts rename to types/jquery.highlight-bartaz/index.d.ts diff --git a/jquery.highlight-bartaz/jquery.highlight-bartaz-tests.ts b/types/jquery.highlight-bartaz/jquery.highlight-bartaz-tests.ts similarity index 100% rename from jquery.highlight-bartaz/jquery.highlight-bartaz-tests.ts rename to types/jquery.highlight-bartaz/jquery.highlight-bartaz-tests.ts diff --git a/jquery.highlight-bartaz/tsconfig.json b/types/jquery.highlight-bartaz/tsconfig.json similarity index 100% rename from jquery.highlight-bartaz/tsconfig.json rename to types/jquery.highlight-bartaz/tsconfig.json diff --git a/jquery.jnotify/index.d.ts b/types/jquery.jnotify/index.d.ts similarity index 100% rename from jquery.jnotify/index.d.ts rename to types/jquery.jnotify/index.d.ts diff --git a/jquery.jnotify/jquery.jnotify-tests.ts b/types/jquery.jnotify/jquery.jnotify-tests.ts similarity index 100% rename from jquery.jnotify/jquery.jnotify-tests.ts rename to types/jquery.jnotify/jquery.jnotify-tests.ts diff --git a/jquery.jnotify/tsconfig.json b/types/jquery.jnotify/tsconfig.json similarity index 100% rename from jquery.jnotify/tsconfig.json rename to types/jquery.jnotify/tsconfig.json diff --git a/jquery.joyride/index.d.ts b/types/jquery.joyride/index.d.ts similarity index 100% rename from jquery.joyride/index.d.ts rename to types/jquery.joyride/index.d.ts diff --git a/jquery.joyride/jquery.joyride-tests.ts b/types/jquery.joyride/jquery.joyride-tests.ts similarity index 100% rename from jquery.joyride/jquery.joyride-tests.ts rename to types/jquery.joyride/jquery.joyride-tests.ts diff --git a/jquery.joyride/tsconfig.json b/types/jquery.joyride/tsconfig.json similarity index 100% rename from jquery.joyride/tsconfig.json rename to types/jquery.joyride/tsconfig.json diff --git a/jquery.jsignature/index.d.ts b/types/jquery.jsignature/index.d.ts similarity index 100% rename from jquery.jsignature/index.d.ts rename to types/jquery.jsignature/index.d.ts diff --git a/jquery.jsignature/jquery.jsignature-tests.ts b/types/jquery.jsignature/jquery.jsignature-tests.ts similarity index 100% rename from jquery.jsignature/jquery.jsignature-tests.ts rename to types/jquery.jsignature/jquery.jsignature-tests.ts diff --git a/jquery.jsignature/tsconfig.json b/types/jquery.jsignature/tsconfig.json similarity index 100% rename from jquery.jsignature/tsconfig.json rename to types/jquery.jsignature/tsconfig.json diff --git a/jquery.leanmodal/index.d.ts b/types/jquery.leanmodal/index.d.ts similarity index 100% rename from jquery.leanmodal/index.d.ts rename to types/jquery.leanmodal/index.d.ts diff --git a/jquery.leanmodal/jquery.leanmodal-tests.ts b/types/jquery.leanmodal/jquery.leanmodal-tests.ts similarity index 100% rename from jquery.leanmodal/jquery.leanmodal-tests.ts rename to types/jquery.leanmodal/jquery.leanmodal-tests.ts diff --git a/jquery.leanmodal/tsconfig.json b/types/jquery.leanmodal/tsconfig.json similarity index 100% rename from jquery.leanmodal/tsconfig.json rename to types/jquery.leanmodal/tsconfig.json diff --git a/jquery.livestampjs/index.d.ts b/types/jquery.livestampjs/index.d.ts similarity index 100% rename from jquery.livestampjs/index.d.ts rename to types/jquery.livestampjs/index.d.ts diff --git a/jquery.livestampjs/jquery.livestampjs-tests.ts b/types/jquery.livestampjs/jquery.livestampjs-tests.ts similarity index 100% rename from jquery.livestampjs/jquery.livestampjs-tests.ts rename to types/jquery.livestampjs/jquery.livestampjs-tests.ts diff --git a/jquery.livestampjs/package.json b/types/jquery.livestampjs/package.json similarity index 100% rename from jquery.livestampjs/package.json rename to types/jquery.livestampjs/package.json diff --git a/jquery.livestampjs/tsconfig.json b/types/jquery.livestampjs/tsconfig.json similarity index 100% rename from jquery.livestampjs/tsconfig.json rename to types/jquery.livestampjs/tsconfig.json diff --git a/jquery.menuaim/index.d.ts b/types/jquery.menuaim/index.d.ts similarity index 100% rename from jquery.menuaim/index.d.ts rename to types/jquery.menuaim/index.d.ts diff --git a/jquery.menuaim/jquery.menuaim-tests.ts b/types/jquery.menuaim/jquery.menuaim-tests.ts similarity index 100% rename from jquery.menuaim/jquery.menuaim-tests.ts rename to types/jquery.menuaim/jquery.menuaim-tests.ts diff --git a/jquery.menuaim/tsconfig.json b/types/jquery.menuaim/tsconfig.json similarity index 100% rename from jquery.menuaim/tsconfig.json rename to types/jquery.menuaim/tsconfig.json diff --git a/jquery.mmenu/index.d.ts b/types/jquery.mmenu/index.d.ts similarity index 100% rename from jquery.mmenu/index.d.ts rename to types/jquery.mmenu/index.d.ts diff --git a/jquery.mmenu/jquery.mmenu-tests.ts b/types/jquery.mmenu/jquery.mmenu-tests.ts similarity index 100% rename from jquery.mmenu/jquery.mmenu-tests.ts rename to types/jquery.mmenu/jquery.mmenu-tests.ts diff --git a/jquery.mmenu/tsconfig.json b/types/jquery.mmenu/tsconfig.json similarity index 100% rename from jquery.mmenu/tsconfig.json rename to types/jquery.mmenu/tsconfig.json diff --git a/jquery.notifybar/index.d.ts b/types/jquery.notifybar/index.d.ts similarity index 100% rename from jquery.notifybar/index.d.ts rename to types/jquery.notifybar/index.d.ts diff --git a/jquery.notifybar/jquery.notifybar-tests.ts b/types/jquery.notifybar/jquery.notifybar-tests.ts similarity index 100% rename from jquery.notifybar/jquery.notifybar-tests.ts rename to types/jquery.notifybar/jquery.notifybar-tests.ts diff --git a/jquery.notifybar/tsconfig.json b/types/jquery.notifybar/tsconfig.json similarity index 100% rename from jquery.notifybar/tsconfig.json rename to types/jquery.notifybar/tsconfig.json diff --git a/jquery.noty/index.d.ts b/types/jquery.noty/index.d.ts similarity index 100% rename from jquery.noty/index.d.ts rename to types/jquery.noty/index.d.ts diff --git a/jquery.noty/tsconfig.json b/types/jquery.noty/tsconfig.json similarity index 100% rename from jquery.noty/tsconfig.json rename to types/jquery.noty/tsconfig.json diff --git a/jquery.payment/index.d.ts b/types/jquery.payment/index.d.ts similarity index 100% rename from jquery.payment/index.d.ts rename to types/jquery.payment/index.d.ts diff --git a/jquery.payment/jquery.payment-tests.ts b/types/jquery.payment/jquery.payment-tests.ts similarity index 100% rename from jquery.payment/jquery.payment-tests.ts rename to types/jquery.payment/jquery.payment-tests.ts diff --git a/jquery.payment/tsconfig.json b/types/jquery.payment/tsconfig.json similarity index 100% rename from jquery.payment/tsconfig.json rename to types/jquery.payment/tsconfig.json diff --git a/jquery.pjax.falsandtru/index.d.ts b/types/jquery.pjax.falsandtru/index.d.ts similarity index 100% rename from jquery.pjax.falsandtru/index.d.ts rename to types/jquery.pjax.falsandtru/index.d.ts diff --git a/jquery.pjax.falsandtru/jquery.pjax.falsandtru-tests.ts b/types/jquery.pjax.falsandtru/jquery.pjax.falsandtru-tests.ts similarity index 100% rename from jquery.pjax.falsandtru/jquery.pjax.falsandtru-tests.ts rename to types/jquery.pjax.falsandtru/jquery.pjax.falsandtru-tests.ts diff --git a/jquery.pjax.falsandtru/tsconfig.json b/types/jquery.pjax.falsandtru/tsconfig.json similarity index 100% rename from jquery.pjax.falsandtru/tsconfig.json rename to types/jquery.pjax.falsandtru/tsconfig.json diff --git a/jquery.pjax/index.d.ts b/types/jquery.pjax/index.d.ts similarity index 100% rename from jquery.pjax/index.d.ts rename to types/jquery.pjax/index.d.ts diff --git a/jquery.pjax/jquery.pjax-tests.ts b/types/jquery.pjax/jquery.pjax-tests.ts similarity index 100% rename from jquery.pjax/jquery.pjax-tests.ts rename to types/jquery.pjax/jquery.pjax-tests.ts diff --git a/jquery.pjax/tsconfig.json b/types/jquery.pjax/tsconfig.json similarity index 100% rename from jquery.pjax/tsconfig.json rename to types/jquery.pjax/tsconfig.json diff --git a/jquery.placeholder/index.d.ts b/types/jquery.placeholder/index.d.ts similarity index 100% rename from jquery.placeholder/index.d.ts rename to types/jquery.placeholder/index.d.ts diff --git a/jquery.placeholder/jquery.placeholder-tests.ts b/types/jquery.placeholder/jquery.placeholder-tests.ts similarity index 100% rename from jquery.placeholder/jquery.placeholder-tests.ts rename to types/jquery.placeholder/jquery.placeholder-tests.ts diff --git a/jquery.placeholder/tsconfig.json b/types/jquery.placeholder/tsconfig.json similarity index 100% rename from jquery.placeholder/tsconfig.json rename to types/jquery.placeholder/tsconfig.json diff --git a/jquery.pnotify/index.d.ts b/types/jquery.pnotify/index.d.ts similarity index 100% rename from jquery.pnotify/index.d.ts rename to types/jquery.pnotify/index.d.ts diff --git a/jquery.pnotify/jquery.pnotify-tests.ts b/types/jquery.pnotify/jquery.pnotify-tests.ts similarity index 100% rename from jquery.pnotify/jquery.pnotify-tests.ts rename to types/jquery.pnotify/jquery.pnotify-tests.ts diff --git a/jquery.pnotify/tsconfig.json b/types/jquery.pnotify/tsconfig.json similarity index 100% rename from jquery.pnotify/tsconfig.json rename to types/jquery.pnotify/tsconfig.json diff --git a/jquery.postmessage/index.d.ts b/types/jquery.postmessage/index.d.ts similarity index 100% rename from jquery.postmessage/index.d.ts rename to types/jquery.postmessage/index.d.ts diff --git a/jquery.postmessage/jquery.postmessage-tests.ts b/types/jquery.postmessage/jquery.postmessage-tests.ts similarity index 100% rename from jquery.postmessage/jquery.postmessage-tests.ts rename to types/jquery.postmessage/jquery.postmessage-tests.ts diff --git a/jquery.postmessage/tsconfig.json b/types/jquery.postmessage/tsconfig.json similarity index 100% rename from jquery.postmessage/tsconfig.json rename to types/jquery.postmessage/tsconfig.json diff --git a/jquery.prettyphoto/index.d.ts b/types/jquery.prettyphoto/index.d.ts similarity index 100% rename from jquery.prettyphoto/index.d.ts rename to types/jquery.prettyphoto/index.d.ts diff --git a/jquery.prettyphoto/jquery.prettyphoto-tests.ts b/types/jquery.prettyphoto/jquery.prettyphoto-tests.ts similarity index 100% rename from jquery.prettyphoto/jquery.prettyphoto-tests.ts rename to types/jquery.prettyphoto/jquery.prettyphoto-tests.ts diff --git a/jquery.prettyphoto/tsconfig.json b/types/jquery.prettyphoto/tsconfig.json similarity index 100% rename from jquery.prettyphoto/tsconfig.json rename to types/jquery.prettyphoto/tsconfig.json diff --git a/jquery.qrcode/index.d.ts b/types/jquery.qrcode/index.d.ts similarity index 100% rename from jquery.qrcode/index.d.ts rename to types/jquery.qrcode/index.d.ts diff --git a/jquery.qrcode/jquery.qrcode-tests.ts b/types/jquery.qrcode/jquery.qrcode-tests.ts similarity index 100% rename from jquery.qrcode/jquery.qrcode-tests.ts rename to types/jquery.qrcode/jquery.qrcode-tests.ts diff --git a/jquery.qrcode/tsconfig.json b/types/jquery.qrcode/tsconfig.json similarity index 100% rename from jquery.qrcode/tsconfig.json rename to types/jquery.qrcode/tsconfig.json diff --git a/jquery.rateit/index.d.ts b/types/jquery.rateit/index.d.ts similarity index 100% rename from jquery.rateit/index.d.ts rename to types/jquery.rateit/index.d.ts diff --git a/jquery.rateit/jquery.rateit-tests.ts b/types/jquery.rateit/jquery.rateit-tests.ts similarity index 100% rename from jquery.rateit/jquery.rateit-tests.ts rename to types/jquery.rateit/jquery.rateit-tests.ts diff --git a/jquery.rateit/tsconfig.json b/types/jquery.rateit/tsconfig.json similarity index 100% rename from jquery.rateit/tsconfig.json rename to types/jquery.rateit/tsconfig.json diff --git a/jquery.rowgrid/index.d.ts b/types/jquery.rowgrid/index.d.ts similarity index 100% rename from jquery.rowgrid/index.d.ts rename to types/jquery.rowgrid/index.d.ts diff --git a/jquery.rowgrid/jquery.rowgrid-tests.ts b/types/jquery.rowgrid/jquery.rowgrid-tests.ts similarity index 100% rename from jquery.rowgrid/jquery.rowgrid-tests.ts rename to types/jquery.rowgrid/jquery.rowgrid-tests.ts diff --git a/jquery.rowgrid/tsconfig.json b/types/jquery.rowgrid/tsconfig.json similarity index 100% rename from jquery.rowgrid/tsconfig.json rename to types/jquery.rowgrid/tsconfig.json diff --git a/jquery.scrollto/index.d.ts b/types/jquery.scrollto/index.d.ts similarity index 100% rename from jquery.scrollto/index.d.ts rename to types/jquery.scrollto/index.d.ts diff --git a/jquery.scrollto/jquery.scrollto-tests.ts b/types/jquery.scrollto/jquery.scrollto-tests.ts similarity index 100% rename from jquery.scrollto/jquery.scrollto-tests.ts rename to types/jquery.scrollto/jquery.scrollto-tests.ts diff --git a/jquery.scrollto/tsconfig.json b/types/jquery.scrollto/tsconfig.json similarity index 100% rename from jquery.scrollto/tsconfig.json rename to types/jquery.scrollto/tsconfig.json diff --git a/jquery.simplemodal/index.d.ts b/types/jquery.simplemodal/index.d.ts similarity index 100% rename from jquery.simplemodal/index.d.ts rename to types/jquery.simplemodal/index.d.ts diff --git a/jquery.simplemodal/jquery.simplemodal-tests.ts b/types/jquery.simplemodal/jquery.simplemodal-tests.ts similarity index 100% rename from jquery.simplemodal/jquery.simplemodal-tests.ts rename to types/jquery.simplemodal/jquery.simplemodal-tests.ts diff --git a/jquery.simplemodal/tsconfig.json b/types/jquery.simplemodal/tsconfig.json similarity index 100% rename from jquery.simplemodal/tsconfig.json rename to types/jquery.simplemodal/tsconfig.json diff --git a/jquery.simplepagination/index.d.ts b/types/jquery.simplepagination/index.d.ts similarity index 100% rename from jquery.simplepagination/index.d.ts rename to types/jquery.simplepagination/index.d.ts diff --git a/jquery.simplepagination/jquery.simplepagination-tests.ts b/types/jquery.simplepagination/jquery.simplepagination-tests.ts similarity index 100% rename from jquery.simplepagination/jquery.simplepagination-tests.ts rename to types/jquery.simplepagination/jquery.simplepagination-tests.ts diff --git a/jquery.simplepagination/tsconfig.json b/types/jquery.simplepagination/tsconfig.json similarity index 100% rename from jquery.simplepagination/tsconfig.json rename to types/jquery.simplepagination/tsconfig.json diff --git a/jquery.simulate/index.d.ts b/types/jquery.simulate/index.d.ts similarity index 100% rename from jquery.simulate/index.d.ts rename to types/jquery.simulate/index.d.ts diff --git a/jquery.simulate/jquery.simulate-tests.ts b/types/jquery.simulate/jquery.simulate-tests.ts similarity index 100% rename from jquery.simulate/jquery.simulate-tests.ts rename to types/jquery.simulate/jquery.simulate-tests.ts diff --git a/jquery.simulate/tsconfig.json b/types/jquery.simulate/tsconfig.json similarity index 100% rename from jquery.simulate/tsconfig.json rename to types/jquery.simulate/tsconfig.json diff --git a/jquery.slimscroll/index.d.ts b/types/jquery.slimscroll/index.d.ts similarity index 100% rename from jquery.slimscroll/index.d.ts rename to types/jquery.slimscroll/index.d.ts diff --git a/jquery.slimscroll/jquery.slimscroll-tests.ts b/types/jquery.slimscroll/jquery.slimscroll-tests.ts similarity index 100% rename from jquery.slimscroll/jquery.slimscroll-tests.ts rename to types/jquery.slimscroll/jquery.slimscroll-tests.ts diff --git a/jquery.slimscroll/tsconfig.json b/types/jquery.slimscroll/tsconfig.json similarity index 100% rename from jquery.slimscroll/tsconfig.json rename to types/jquery.slimscroll/tsconfig.json diff --git a/jquery.soap/index.d.ts b/types/jquery.soap/index.d.ts similarity index 100% rename from jquery.soap/index.d.ts rename to types/jquery.soap/index.d.ts diff --git a/jquery.soap/jquery.soap-tests.ts b/types/jquery.soap/jquery.soap-tests.ts similarity index 100% rename from jquery.soap/jquery.soap-tests.ts rename to types/jquery.soap/jquery.soap-tests.ts diff --git a/jquery.soap/tsconfig.json b/types/jquery.soap/tsconfig.json similarity index 100% rename from jquery.soap/tsconfig.json rename to types/jquery.soap/tsconfig.json diff --git a/jquery.sortelements/index.d.ts b/types/jquery.sortelements/index.d.ts similarity index 100% rename from jquery.sortelements/index.d.ts rename to types/jquery.sortelements/index.d.ts diff --git a/jquery.sortelements/tsconfig.json b/types/jquery.sortelements/tsconfig.json similarity index 100% rename from jquery.sortelements/tsconfig.json rename to types/jquery.sortelements/tsconfig.json diff --git a/jquery.superlink/index.d.ts b/types/jquery.superlink/index.d.ts similarity index 100% rename from jquery.superlink/index.d.ts rename to types/jquery.superlink/index.d.ts diff --git a/jquery.superlink/tsconfig.json b/types/jquery.superlink/tsconfig.json similarity index 100% rename from jquery.superlink/tsconfig.json rename to types/jquery.superlink/tsconfig.json diff --git a/jquery.tagsmanager/index.d.ts b/types/jquery.tagsmanager/index.d.ts similarity index 100% rename from jquery.tagsmanager/index.d.ts rename to types/jquery.tagsmanager/index.d.ts diff --git a/jquery.tagsmanager/jquery.tagsmanager-tests.ts b/types/jquery.tagsmanager/jquery.tagsmanager-tests.ts similarity index 100% rename from jquery.tagsmanager/jquery.tagsmanager-tests.ts rename to types/jquery.tagsmanager/jquery.tagsmanager-tests.ts diff --git a/jquery.tagsmanager/tsconfig.json b/types/jquery.tagsmanager/tsconfig.json similarity index 100% rename from jquery.tagsmanager/tsconfig.json rename to types/jquery.tagsmanager/tsconfig.json diff --git a/jquery.tile/index.d.ts b/types/jquery.tile/index.d.ts similarity index 100% rename from jquery.tile/index.d.ts rename to types/jquery.tile/index.d.ts diff --git a/jquery.tile/jquery.tile-tests.ts b/types/jquery.tile/jquery.tile-tests.ts similarity index 100% rename from jquery.tile/jquery.tile-tests.ts rename to types/jquery.tile/jquery.tile-tests.ts diff --git a/jquery.tile/tsconfig.json b/types/jquery.tile/tsconfig.json similarity index 100% rename from jquery.tile/tsconfig.json rename to types/jquery.tile/tsconfig.json diff --git a/jquery.timeago/index.d.ts b/types/jquery.timeago/index.d.ts similarity index 100% rename from jquery.timeago/index.d.ts rename to types/jquery.timeago/index.d.ts diff --git a/jquery.timeago/jquery.timeago-tests.ts b/types/jquery.timeago/jquery.timeago-tests.ts similarity index 100% rename from jquery.timeago/jquery.timeago-tests.ts rename to types/jquery.timeago/jquery.timeago-tests.ts diff --git a/jquery.timeago/tsconfig.json b/types/jquery.timeago/tsconfig.json similarity index 100% rename from jquery.timeago/tsconfig.json rename to types/jquery.timeago/tsconfig.json diff --git a/jquery.timepicker/index.d.ts b/types/jquery.timepicker/index.d.ts similarity index 100% rename from jquery.timepicker/index.d.ts rename to types/jquery.timepicker/index.d.ts diff --git a/jquery.timepicker/jquery.timepicker-tests.ts b/types/jquery.timepicker/jquery.timepicker-tests.ts similarity index 100% rename from jquery.timepicker/jquery.timepicker-tests.ts rename to types/jquery.timepicker/jquery.timepicker-tests.ts diff --git a/jquery.timepicker/tsconfig.json b/types/jquery.timepicker/tsconfig.json similarity index 100% rename from jquery.timepicker/tsconfig.json rename to types/jquery.timepicker/tsconfig.json diff --git a/jquery.timer/index.d.ts b/types/jquery.timer/index.d.ts similarity index 100% rename from jquery.timer/index.d.ts rename to types/jquery.timer/index.d.ts diff --git a/jquery.timer/jquery.timer-tests.ts b/types/jquery.timer/jquery.timer-tests.ts similarity index 100% rename from jquery.timer/jquery.timer-tests.ts rename to types/jquery.timer/jquery.timer-tests.ts diff --git a/jquery.timer/tsconfig.json b/types/jquery.timer/tsconfig.json similarity index 100% rename from jquery.timer/tsconfig.json rename to types/jquery.timer/tsconfig.json diff --git a/jquery.tinycarousel/index.d.ts b/types/jquery.tinycarousel/index.d.ts similarity index 100% rename from jquery.tinycarousel/index.d.ts rename to types/jquery.tinycarousel/index.d.ts diff --git a/jquery.tinycarousel/jquery.tinycarousel-tests.ts b/types/jquery.tinycarousel/jquery.tinycarousel-tests.ts similarity index 100% rename from jquery.tinycarousel/jquery.tinycarousel-tests.ts rename to types/jquery.tinycarousel/jquery.tinycarousel-tests.ts diff --git a/jquery.tinycarousel/tsconfig.json b/types/jquery.tinycarousel/tsconfig.json similarity index 100% rename from jquery.tinycarousel/tsconfig.json rename to types/jquery.tinycarousel/tsconfig.json diff --git a/jquery.tinyscrollbar/index.d.ts b/types/jquery.tinyscrollbar/index.d.ts similarity index 100% rename from jquery.tinyscrollbar/index.d.ts rename to types/jquery.tinyscrollbar/index.d.ts diff --git a/jquery.tinyscrollbar/jquery.tinyscrollbar-tests.ts b/types/jquery.tinyscrollbar/jquery.tinyscrollbar-tests.ts similarity index 100% rename from jquery.tinyscrollbar/jquery.tinyscrollbar-tests.ts rename to types/jquery.tinyscrollbar/jquery.tinyscrollbar-tests.ts diff --git a/jquery.tinyscrollbar/tsconfig.json b/types/jquery.tinyscrollbar/tsconfig.json similarity index 100% rename from jquery.tinyscrollbar/tsconfig.json rename to types/jquery.tinyscrollbar/tsconfig.json diff --git a/jquery.tipsy/index.d.ts b/types/jquery.tipsy/index.d.ts similarity index 100% rename from jquery.tipsy/index.d.ts rename to types/jquery.tipsy/index.d.ts diff --git a/jquery.tipsy/jquery.tipsy-tests.ts b/types/jquery.tipsy/jquery.tipsy-tests.ts similarity index 100% rename from jquery.tipsy/jquery.tipsy-tests.ts rename to types/jquery.tipsy/jquery.tipsy-tests.ts diff --git a/jquery.tipsy/tsconfig.json b/types/jquery.tipsy/tsconfig.json similarity index 100% rename from jquery.tipsy/tsconfig.json rename to types/jquery.tipsy/tsconfig.json diff --git a/jquery.tools/index.d.ts b/types/jquery.tools/index.d.ts similarity index 99% rename from jquery.tools/index.d.ts rename to types/jquery.tools/index.d.ts index e511a961fd..fa1bc80cb4 100644 --- a/jquery.tools/index.d.ts +++ b/types/jquery.tools/index.d.ts @@ -3,16 +3,15 @@ // Definitions by: Joe Skeen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - /// -declare interface JQuery { +interface JQuery { overlay(opts?: JQueryTools.overlay.OverlayOptions): JQuery; overlay(opts?: JQueryTools.overlay.OverlayOptions): T; data(key: 'overlay'): JQueryTools.overlay.Overlay; } -declare interface JQueryStatic { +interface JQueryStatic { tools: JQueryTools.ToolsStatic; } diff --git a/jquery.tools/jquery.tools-tests.ts b/types/jquery.tools/jquery.tools-tests.ts similarity index 92% rename from jquery.tools/jquery.tools-tests.ts rename to types/jquery.tools/jquery.tools-tests.ts index 443425e76b..5092b49bff 100644 --- a/jquery.tools/jquery.tools-tests.ts +++ b/types/jquery.tools/jquery.tools-tests.ts @@ -2,7 +2,7 @@ $("img[rel]").overlay(); - var triggers = $(".modalInput").overlay({ + const triggers = $(".modalInput").overlay({   // some mask tweaks suitable for modal dialogs mask: { @@ -14,10 +14,10 @@ closeOnClick: false }); - var buttons = $("#yesno button").click(function(this: JQuery, e: JQueryEventObject) { + const buttons = $("#yesno button").click(function(this: JQuery, e: JQueryEventObject) {   // get user input - var yes = buttons.index(this) === 0; + const yes = buttons.index(this) === 0;   // do something with the answer triggers.eq(0).html("You clicked " + (yes ? "yes" : "no")); @@ -42,7 +42,7 @@ $("#prompt form").submit(function(this: JQuery, e: JQueryEventObject) { triggers.data('overlay').close();   // get user input - var input = $("input", this).val(); + const input = $("input", this).val();   // do something with the answer triggers.eq(1).html(input); @@ -101,7 +101,7 @@ $(function() {   onBeforeLoad() { // grab wrapper element inside content - var wrap = this.getOverlay().find(".contentWrap"); + const wrap = this.getOverlay().find(".contentWrap");   // load the page specified in the trigger wrap.load(this.getTrigger().attr("href")); @@ -112,7 +112,7 @@ $(function() { $(() => { // positions for each overlay - var positions = [ + const positions = [ [0, 530], [400, 20], [400, 530], @@ -143,7 +143,7 @@ $(() => { $.tools.overlay.addEffect("drop", function(css, done) {   // use Overlay API to gain access to crucial elements - var conf = this.getConf(), + const conf = this.getConf(), overlay = this.getOverlay();   // determine initial position for the overlay diff --git a/jquery.tools/tsconfig.json b/types/jquery.tools/tsconfig.json similarity index 100% rename from jquery.tools/tsconfig.json rename to types/jquery.tools/tsconfig.json diff --git a/jquery.tools/tslint.json b/types/jquery.tools/tslint.json similarity index 100% rename from jquery.tools/tslint.json rename to types/jquery.tools/tslint.json diff --git a/jquery.tooltipster/index.d.ts b/types/jquery.tooltipster/index.d.ts similarity index 100% rename from jquery.tooltipster/index.d.ts rename to types/jquery.tooltipster/index.d.ts diff --git a/jquery.tooltipster/jquery.tooltipster-tests.ts b/types/jquery.tooltipster/jquery.tooltipster-tests.ts similarity index 100% rename from jquery.tooltipster/jquery.tooltipster-tests.ts rename to types/jquery.tooltipster/jquery.tooltipster-tests.ts diff --git a/jquery.tooltipster/tsconfig.json b/types/jquery.tooltipster/tsconfig.json similarity index 100% rename from jquery.tooltipster/tsconfig.json rename to types/jquery.tooltipster/tsconfig.json diff --git a/jquery.total-storage/index.d.ts b/types/jquery.total-storage/index.d.ts similarity index 100% rename from jquery.total-storage/index.d.ts rename to types/jquery.total-storage/index.d.ts diff --git a/jquery.total-storage/jquery.total-storage-tests.ts b/types/jquery.total-storage/jquery.total-storage-tests.ts similarity index 100% rename from jquery.total-storage/jquery.total-storage-tests.ts rename to types/jquery.total-storage/jquery.total-storage-tests.ts diff --git a/jquery.total-storage/tsconfig.json b/types/jquery.total-storage/tsconfig.json similarity index 100% rename from jquery.total-storage/tsconfig.json rename to types/jquery.total-storage/tsconfig.json diff --git a/jquery.transit/index.d.ts b/types/jquery.transit/index.d.ts similarity index 100% rename from jquery.transit/index.d.ts rename to types/jquery.transit/index.d.ts diff --git a/jquery.transit/jquery.transit-tests.ts b/types/jquery.transit/jquery.transit-tests.ts similarity index 100% rename from jquery.transit/jquery.transit-tests.ts rename to types/jquery.transit/jquery.transit-tests.ts diff --git a/jquery.transit/tsconfig.json b/types/jquery.transit/tsconfig.json similarity index 100% rename from jquery.transit/tsconfig.json rename to types/jquery.transit/tsconfig.json diff --git a/jquery.ui.datetimepicker/index.d.ts b/types/jquery.ui.datetimepicker/index.d.ts similarity index 100% rename from jquery.ui.datetimepicker/index.d.ts rename to types/jquery.ui.datetimepicker/index.d.ts diff --git a/jquery.ui.datetimepicker/jquery.ui.datetimepicker-tests.ts b/types/jquery.ui.datetimepicker/jquery.ui.datetimepicker-tests.ts similarity index 100% rename from jquery.ui.datetimepicker/jquery.ui.datetimepicker-tests.ts rename to types/jquery.ui.datetimepicker/jquery.ui.datetimepicker-tests.ts diff --git a/jquery.ui.datetimepicker/tsconfig.json b/types/jquery.ui.datetimepicker/tsconfig.json similarity index 100% rename from jquery.ui.datetimepicker/tsconfig.json rename to types/jquery.ui.datetimepicker/tsconfig.json diff --git a/jquery.ui.layout/index.d.ts b/types/jquery.ui.layout/index.d.ts similarity index 100% rename from jquery.ui.layout/index.d.ts rename to types/jquery.ui.layout/index.d.ts diff --git a/jquery.ui.layout/tsconfig.json b/types/jquery.ui.layout/tsconfig.json similarity index 100% rename from jquery.ui.layout/tsconfig.json rename to types/jquery.ui.layout/tsconfig.json diff --git a/jquery.uniform/index.d.ts b/types/jquery.uniform/index.d.ts similarity index 100% rename from jquery.uniform/index.d.ts rename to types/jquery.uniform/index.d.ts diff --git a/jquery.uniform/jquery.uniform-tests.ts b/types/jquery.uniform/jquery.uniform-tests.ts similarity index 100% rename from jquery.uniform/jquery.uniform-tests.ts rename to types/jquery.uniform/jquery.uniform-tests.ts diff --git a/jquery.uniform/tsconfig.json b/types/jquery.uniform/tsconfig.json similarity index 100% rename from jquery.uniform/tsconfig.json rename to types/jquery.uniform/tsconfig.json diff --git a/jquery.validation/index.d.ts b/types/jquery.validation/index.d.ts similarity index 100% rename from jquery.validation/index.d.ts rename to types/jquery.validation/index.d.ts diff --git a/jquery.validation/jquery.validation-tests.ts b/types/jquery.validation/jquery.validation-tests.ts similarity index 100% rename from jquery.validation/jquery.validation-tests.ts rename to types/jquery.validation/jquery.validation-tests.ts diff --git a/jquery.validation/tsconfig.json b/types/jquery.validation/tsconfig.json similarity index 100% rename from jquery.validation/tsconfig.json rename to types/jquery.validation/tsconfig.json diff --git a/jquery.watermark/index.d.ts b/types/jquery.watermark/index.d.ts similarity index 100% rename from jquery.watermark/index.d.ts rename to types/jquery.watermark/index.d.ts diff --git a/jquery.watermark/jquery.watermark-tests.ts b/types/jquery.watermark/jquery.watermark-tests.ts similarity index 100% rename from jquery.watermark/jquery.watermark-tests.ts rename to types/jquery.watermark/jquery.watermark-tests.ts diff --git a/jquery.watermark/tsconfig.json b/types/jquery.watermark/tsconfig.json similarity index 100% rename from jquery.watermark/tsconfig.json rename to types/jquery.watermark/tsconfig.json diff --git a/jquery.window/index.d.ts b/types/jquery.window/index.d.ts similarity index 100% rename from jquery.window/index.d.ts rename to types/jquery.window/index.d.ts diff --git a/jquery.window/jquery.window-tests.ts b/types/jquery.window/jquery.window-tests.ts similarity index 100% rename from jquery.window/jquery.window-tests.ts rename to types/jquery.window/jquery.window-tests.ts diff --git a/jquery.window/tsconfig.json b/types/jquery.window/tsconfig.json similarity index 100% rename from jquery.window/tsconfig.json rename to types/jquery.window/tsconfig.json diff --git a/jquery/index.d.ts b/types/jquery/index.d.ts similarity index 100% rename from jquery/index.d.ts rename to types/jquery/index.d.ts diff --git a/jquery/jquery-tests.ts b/types/jquery/jquery-tests.ts similarity index 100% rename from jquery/jquery-tests.ts rename to types/jquery/jquery-tests.ts diff --git a/jquery/tsconfig.json b/types/jquery/tsconfig.json similarity index 100% rename from jquery/tsconfig.json rename to types/jquery/tsconfig.json diff --git a/jquerymobile/index.d.ts b/types/jquerymobile/index.d.ts similarity index 100% rename from jquerymobile/index.d.ts rename to types/jquerymobile/index.d.ts diff --git a/jquerymobile/jquerymobile-tests.ts b/types/jquerymobile/jquerymobile-tests.ts similarity index 100% rename from jquerymobile/jquerymobile-tests.ts rename to types/jquerymobile/jquerymobile-tests.ts diff --git a/jquerymobile/tsconfig.json b/types/jquerymobile/tsconfig.json similarity index 100% rename from jquerymobile/tsconfig.json rename to types/jquerymobile/tsconfig.json diff --git a/jqueryui/index.d.ts b/types/jqueryui/index.d.ts similarity index 100% rename from jqueryui/index.d.ts rename to types/jqueryui/index.d.ts diff --git a/jqueryui/jqueryui-tests.ts b/types/jqueryui/jqueryui-tests.ts similarity index 100% rename from jqueryui/jqueryui-tests.ts rename to types/jqueryui/jqueryui-tests.ts diff --git a/jqueryui/tsconfig.json b/types/jqueryui/tsconfig.json similarity index 100% rename from jqueryui/tsconfig.json rename to types/jqueryui/tsconfig.json diff --git a/js-base64/index.d.ts b/types/js-base64/index.d.ts similarity index 100% rename from js-base64/index.d.ts rename to types/js-base64/index.d.ts diff --git a/js-base64/js-base64-tests.ts b/types/js-base64/js-base64-tests.ts similarity index 100% rename from js-base64/js-base64-tests.ts rename to types/js-base64/js-base64-tests.ts diff --git a/js-base64/tsconfig.json b/types/js-base64/tsconfig.json similarity index 100% rename from js-base64/tsconfig.json rename to types/js-base64/tsconfig.json diff --git a/js-beautify/index.d.ts b/types/js-beautify/index.d.ts similarity index 100% rename from js-beautify/index.d.ts rename to types/js-beautify/index.d.ts diff --git a/js-beautify/js-beautify-tests.ts b/types/js-beautify/js-beautify-tests.ts similarity index 100% rename from js-beautify/js-beautify-tests.ts rename to types/js-beautify/js-beautify-tests.ts diff --git a/js-beautify/tsconfig.json b/types/js-beautify/tsconfig.json similarity index 100% rename from js-beautify/tsconfig.json rename to types/js-beautify/tsconfig.json diff --git a/js-clipper/index.d.ts b/types/js-clipper/index.d.ts similarity index 100% rename from js-clipper/index.d.ts rename to types/js-clipper/index.d.ts diff --git a/js-clipper/js-clipper-tests.ts b/types/js-clipper/js-clipper-tests.ts similarity index 100% rename from js-clipper/js-clipper-tests.ts rename to types/js-clipper/js-clipper-tests.ts diff --git a/js-clipper/tsconfig.json b/types/js-clipper/tsconfig.json similarity index 100% rename from js-clipper/tsconfig.json rename to types/js-clipper/tsconfig.json diff --git a/js-combinatorics/index.d.ts b/types/js-combinatorics/index.d.ts similarity index 100% rename from js-combinatorics/index.d.ts rename to types/js-combinatorics/index.d.ts diff --git a/js-combinatorics/js-combinatorics-tests.ts b/types/js-combinatorics/js-combinatorics-tests.ts similarity index 100% rename from js-combinatorics/js-combinatorics-tests.ts rename to types/js-combinatorics/js-combinatorics-tests.ts diff --git a/js-combinatorics/tsconfig.json b/types/js-combinatorics/tsconfig.json similarity index 100% rename from js-combinatorics/tsconfig.json rename to types/js-combinatorics/tsconfig.json diff --git a/js-cookie/index.d.ts b/types/js-cookie/index.d.ts similarity index 100% rename from js-cookie/index.d.ts rename to types/js-cookie/index.d.ts diff --git a/js-cookie/js-cookie-tests.ts b/types/js-cookie/js-cookie-tests.ts similarity index 100% rename from js-cookie/js-cookie-tests.ts rename to types/js-cookie/js-cookie-tests.ts diff --git a/js-cookie/tsconfig.json b/types/js-cookie/tsconfig.json similarity index 100% rename from js-cookie/tsconfig.json rename to types/js-cookie/tsconfig.json diff --git a/js-data-angular/index.d.ts b/types/js-data-angular/index.d.ts similarity index 100% rename from js-data-angular/index.d.ts rename to types/js-data-angular/index.d.ts diff --git a/js-data-angular/js-data-angular-tests.ts b/types/js-data-angular/js-data-angular-tests.ts similarity index 100% rename from js-data-angular/js-data-angular-tests.ts rename to types/js-data-angular/js-data-angular-tests.ts diff --git a/js-data-angular/tsconfig.json b/types/js-data-angular/tsconfig.json similarity index 100% rename from js-data-angular/tsconfig.json rename to types/js-data-angular/tsconfig.json diff --git a/js-data-http/index.d.ts b/types/js-data-http/index.d.ts similarity index 98% rename from js-data-http/index.d.ts rename to types/js-data-http/index.d.ts index 2fa9c0e09a..2a2fafcedb 100644 --- a/js-data-http/index.d.ts +++ b/types/js-data-http/index.d.ts @@ -6,7 +6,6 @@ import * as JSData from 'js-data'; declare module 'js-data' { - interface DSHttpAdapterOptions { serialize?: (resourceName: string, data: any) => any; deserialize?: (resourceName: string, data: any) => any; @@ -27,7 +26,6 @@ declare module 'js-data' { } interface DSHttpAdapter extends IDSAdapter { - new(options?: DSHttpAdapterOptions): DSHttpAdapter; defaults: DSHttpAdapterOptions; @@ -44,4 +42,4 @@ declare module 'js-data' { declare var DSHttpAdapter: JSData.DSHttpAdapter; export = DSHttpAdapter; -export as namespace DSHttpAdapter; \ No newline at end of file +export as namespace DSHttpAdapter; diff --git a/js-data-http/js-data-http-tests.ts b/types/js-data-http/js-data-http-tests.ts similarity index 95% rename from js-data-http/js-data-http-tests.ts rename to types/js-data-http/js-data-http-tests.ts index d98cdd642a..082d34a71f 100644 --- a/js-data-http/js-data-http-tests.ts +++ b/types/js-data-http/js-data-http-tests.ts @@ -3,14 +3,14 @@ import DSHttpAdapter = require("js-data-http"); declare var axios: any; -var adapter = new DSHttpAdapter(); -var store = new JSData.DS(); +const adapter = new DSHttpAdapter(); +const store = new JSData.DS(); store.registerAdapter('http', adapter, { default: true }); adapter.defaults.basePath = '/api'; adapter.http = axios; -var ADocument: JSData.DSResourceDefinition = store.defineResource('document'); +const ADocument: JSData.DSResourceDefinition = store.defineResource('document'); ADocument.inject({ id: 5, author: 'John' }); @@ -79,9 +79,9 @@ adapter.GET('/user/1').then(data => { data.config; // {...} }); -var User: JSData.DSResourceDefinition = store.defineResource('user'); +const User: JSData.DSResourceDefinition = store.defineResource('user'); -var params: any = { +let params: any = { age: { '>': 30 } @@ -119,7 +119,7 @@ ADocument.find(5).then((document: any) => { ADocument.get(document.id); // { id: 5, author: 'John Anderson' } }); -var params: any = { +params = { author: 'John' }; diff --git a/js-data-http/tsconfig.json b/types/js-data-http/tsconfig.json similarity index 100% rename from js-data-http/tsconfig.json rename to types/js-data-http/tsconfig.json diff --git a/js-data-http/tslint.json b/types/js-data-http/tslint.json similarity index 100% rename from js-data-http/tslint.json rename to types/js-data-http/tslint.json diff --git a/js-data/index.d.ts b/types/js-data/index.d.ts similarity index 100% rename from js-data/index.d.ts rename to types/js-data/index.d.ts diff --git a/js-data/js-data-tests.ts b/types/js-data/js-data-tests.ts similarity index 100% rename from js-data/js-data-tests.ts rename to types/js-data/js-data-tests.ts diff --git a/js-data/tsconfig.json b/types/js-data/tsconfig.json similarity index 100% rename from js-data/tsconfig.json rename to types/js-data/tsconfig.json diff --git a/js-data/v1/index.d.ts b/types/js-data/v1/index.d.ts similarity index 100% rename from js-data/v1/index.d.ts rename to types/js-data/v1/index.d.ts diff --git a/js-data/v1/js-data-tests.ts b/types/js-data/v1/js-data-tests.ts similarity index 100% rename from js-data/v1/js-data-tests.ts rename to types/js-data/v1/js-data-tests.ts diff --git a/js-data/v1/tsconfig.json b/types/js-data/v1/tsconfig.json similarity index 100% rename from js-data/v1/tsconfig.json rename to types/js-data/v1/tsconfig.json diff --git a/js-fixtures/index.d.ts b/types/js-fixtures/index.d.ts similarity index 100% rename from js-fixtures/index.d.ts rename to types/js-fixtures/index.d.ts diff --git a/js-fixtures/js-fixtures-tests.ts b/types/js-fixtures/js-fixtures-tests.ts similarity index 100% rename from js-fixtures/js-fixtures-tests.ts rename to types/js-fixtures/js-fixtures-tests.ts diff --git a/js-fixtures/tsconfig.json b/types/js-fixtures/tsconfig.json similarity index 100% rename from js-fixtures/tsconfig.json rename to types/js-fixtures/tsconfig.json diff --git a/js-git/index.d.ts b/types/js-git/index.d.ts similarity index 100% rename from js-git/index.d.ts rename to types/js-git/index.d.ts diff --git a/js-git/js-git-tests.ts b/types/js-git/js-git-tests.ts similarity index 100% rename from js-git/js-git-tests.ts rename to types/js-git/js-git-tests.ts diff --git a/js-git/tsconfig.json b/types/js-git/tsconfig.json similarity index 100% rename from js-git/tsconfig.json rename to types/js-git/tsconfig.json diff --git a/js-md5/index.d.ts b/types/js-md5/index.d.ts similarity index 100% rename from js-md5/index.d.ts rename to types/js-md5/index.d.ts diff --git a/js-md5/js-md5-tests.ts b/types/js-md5/js-md5-tests.ts similarity index 100% rename from js-md5/js-md5-tests.ts rename to types/js-md5/js-md5-tests.ts diff --git a/js-md5/tsconfig.json b/types/js-md5/tsconfig.json similarity index 100% rename from js-md5/tsconfig.json rename to types/js-md5/tsconfig.json diff --git a/js-md5/tslint.json b/types/js-md5/tslint.json similarity index 100% rename from js-md5/tslint.json rename to types/js-md5/tslint.json diff --git a/js-priority-queue/index.d.ts b/types/js-priority-queue/index.d.ts similarity index 100% rename from js-priority-queue/index.d.ts rename to types/js-priority-queue/index.d.ts diff --git a/js-priority-queue/js-priority-queue-tests.ts b/types/js-priority-queue/js-priority-queue-tests.ts similarity index 100% rename from js-priority-queue/js-priority-queue-tests.ts rename to types/js-priority-queue/js-priority-queue-tests.ts diff --git a/js-priority-queue/tsconfig.json b/types/js-priority-queue/tsconfig.json similarity index 100% rename from js-priority-queue/tsconfig.json rename to types/js-priority-queue/tsconfig.json diff --git a/js-quantities/index.d.ts b/types/js-quantities/index.d.ts similarity index 98% rename from js-quantities/index.d.ts rename to types/js-quantities/index.d.ts index 5d4a8df304..ab76433c0d 100644 --- a/js-quantities/index.d.ts +++ b/types/js-quantities/index.d.ts @@ -5,7 +5,7 @@ declare const Qty: Qty.Type; -declare interface Qty { +interface Qty { readonly numerator: string[]; readonly denominator: string[]; readonly scalar: number; @@ -39,7 +39,6 @@ declare interface Qty { } declare namespace Qty { - interface Type { (value: Source): Qty; (value: number, unit: string): Qty; diff --git a/js-quantities/js-quantities-tests.ts b/types/js-quantities/js-quantities-tests.ts similarity index 88% rename from js-quantities/js-quantities-tests.ts rename to types/js-quantities/js-quantities-tests.ts index ed69816dc3..e7734e7520 100644 --- a/js-quantities/js-quantities-tests.ts +++ b/types/js-quantities/js-quantities-tests.ts @@ -84,13 +84,13 @@ Qty('10ohm').inverse(); // '.1/ohm' (not '.1S', although they are equivalent) // however, the 'to' command will convert between inverses also Qty('10ohm').to('S'); // '.1S' -var convert = Qty.swiftConverter('m/h', 'ft/s'); // Configures converter +const convert = Qty.swiftConverter('m/h', 'ft/s'); // Configures converter // Converting single value -var converted = convert(2500); // => 2.278.. +const converted = convert(2500); // => 2.278.. // Converting large array of values -var convertedSerie = convert([2500, 5000]); // => [2.278.., 4.556.., ...] +const convertedSerie = convert([2500, 5000]); // => [2.278.., 4.556.., ...] qty1.eq(qty2); // => true if both quantities are equal (1m == 100cm => true) qty1.same(qty2); // => true if both quantities are same (1m == 100cm => false) @@ -138,10 +138,10 @@ qty = Qty('1.1234 m'); qty.format(); // same units, default formatter => '1.234 m' qty.format('cm'); // converted to 'cm', default formatter => '123.45 cm' -var configurableRoundingFormatter = (maxDecimals: number) => { +const configurableRoundingFormatter = (maxDecimals: number) => { return (scalar: number, units: string) => { - var pow = Math.pow(10, maxDecimals); - var rounded = Math.round(scalar * pow) / pow; + const pow = Math.pow(10, maxDecimals); + const rounded = Math.round(scalar * pow) / pow; return rounded + ' ' + units; }; @@ -200,13 +200,13 @@ describe("js-quantities", () => { describe("initialization", () => { it("should create unit only", () => { - var qty = Qty("m"); + const qty = Qty("m"); expect(qty.numerator).toEqual([""]); expect(qty.scalar).toBe(1); }); it("should create unitless", () => { - var qty = Qty("1"); + let qty = Qty("1"); expect(qty.toFloat()).toBe(1); expect(qty.numerator).toEqual(["<1>"]); expect(qty.denominator).toEqual(["<1>"]); @@ -217,21 +217,21 @@ describe("js-quantities", () => { }); it("should create unitless from numbers", () => { - var qty = Qty(1.5); + const qty = Qty(1.5); expect(qty.toFloat()).toBe(1.5); expect(qty.numerator).toEqual(["<1>"]); expect(qty.denominator).toEqual(["<1>"]); }); it("should create from numbers with explicit units", () => { - var qty = Qty(1.5, "m"); + const qty = Qty(1.5, "m"); expect(qty.scalar).toBe(1.5); expect(qty.numerator).toEqual([""]); expect(qty.denominator).toEqual(["<1>"]); }); it("temperatures should have base unit in kelvin", () => { - var qty = Qty("1 tempK").toBase(); + let qty = Qty("1 tempK").toBase(); expect(qty.scalar).toBe(1); expect(qty.units()).toBe("tempK"); @@ -249,7 +249,7 @@ describe("js-quantities", () => { }); it("temperature degrees should have base unit in kelvin", () => { - var qty = Qty("1 degK").toBase(); + let qty = Qty("1 degK").toBase(); expect(qty.scalar).toBe(1); expect(qty.units()).toBe("degK"); @@ -272,7 +272,7 @@ describe("js-quantities", () => { expect(() => { Qty("-459.68 tempF"); }).toThrow("Temperatures must not be less than absolute zero"); expect(() => { Qty("-1 tempR"); }).toThrow("Temperatures must not be less than absolute zero"); - var qty = Qty("1 tempK"); + let qty = Qty("1 tempK"); expect(() => { qty.mul("-1"); }).toThrow("Temperatures must not be less than absolute zero"); qty = Qty("0 tempK"); @@ -289,28 +289,28 @@ describe("js-quantities", () => { }); it("should create simple", () => { - var qty = Qty("1m"); + const qty = Qty("1m"); expect(qty.scalar).toBe(1); expect(qty.numerator).toEqual([""]); expect(qty.denominator).toEqual(["<1>"]); }); it("should create negative", () => { - var qty = Qty("-1m"); + const qty = Qty("-1m"); expect(qty.scalar).toBe(-1); expect(qty.numerator).toEqual([""]); expect(qty.denominator).toEqual(["<1>"]); }); it("should create compound", () => { - var qty = Qty("1 N*m"); + const qty = Qty("1 N*m"); expect(qty.scalar).toBe(1); expect(qty.numerator).toEqual(["", ""]); expect(qty.denominator).toEqual(["<1>"]); }); it("should create pressure units in term of height of water", () => { - var qty = Qty("1 inH2O"); + let qty = Qty("1 inH2O"); expect(qty.scalar).toBe(1); expect(qty.numerator).toEqual([""]); @@ -320,14 +320,14 @@ describe("js-quantities", () => { }); it("should create with denominator", () => { - var qty = Qty("1 m/s"); + const qty = Qty("1 m/s"); expect(qty.scalar).toBe(1); expect(qty.numerator).toEqual([""]); expect(qty.denominator).toEqual([""]); }); it("should create with denominator only", () => { - var qty = Qty("1 /s"); + let qty = Qty("1 /s"); expect(qty.scalar).toBe(1); expect(qty.numerator).toEqual(["<1>"]); expect(qty.denominator).toEqual([""]); @@ -344,7 +344,7 @@ describe("js-quantities", () => { }); it("should create with powers", () => { - var qty = Qty("1 m^2/s^2"); + let qty = Qty("1 m^2/s^2"); expect(qty.scalar).toBe(1); expect(qty.numerator).toEqual(["", ""]); expect(qty.denominator).toEqual(["", ""]); @@ -359,14 +359,14 @@ describe("js-quantities", () => { }); it("should create with zero power", () => { - var qty = Qty("1 m^0"); + const qty = Qty("1 m^0"); expect(qty.scalar).toBe(1); expect(qty.numerator).toEqual(["<1>"]); expect(qty.denominator).toEqual(["<1>"]); }); it("should create with negative powers", () => { - var qty = Qty("1 m^2 s^-2"); + const qty = Qty("1 m^2 s^-2"); expect(qty.scalar).toBe(1); expect(qty.numerator).toEqual(["", ""]); expect(qty.denominator).toEqual(["", ""]); @@ -374,26 +374,26 @@ describe("js-quantities", () => { }); it("should accept powers without ^ syntax (simple)", () => { - var qty1 = Qty("1 m2"); - var qty2 = Qty("1 m^2"); + const qty1 = Qty("1 m2"); + const qty2 = Qty("1 m^2"); expect(qty1.eq(qty2)).toBe(true); }); it("should accept powers without ^ syntax (negative power)", () => { - var qty1 = Qty("1 m-2"); - var qty2 = Qty("1 m^-2"); + const qty1 = Qty("1 m-2"); + const qty2 = Qty("1 m^-2"); expect(qty1.eq(qty2)).toBe(true); }); it("should accept powers without ^ syntax (compound)", () => { - var qty1 = Qty("1 m^2 kg^2 J^2/s^2"); - var qty2 = Qty("1 m2 kg2 J2/s2"); + const qty1 = Qty("1 m^2 kg^2 J^2/s^2"); + const qty2 = Qty("1 m2 kg2 J2/s2"); expect(qty1.eq(qty2)).toBe(true); }); it("should accept powers without ^ syntax (compound and negative power)", () => { - var qty1 = Qty("1 m^2 kg^2 J^2 s^-2"); - var qty2 = Qty("1 m2 kg2 J2 s-2"); + const qty1 = Qty("1 m^2 kg^2 J^2 s^-2"); + const qty2 = Qty("1 m2 kg2 J2 s-2"); expect(qty1.eq(qty2)).toBe(true); }); @@ -424,7 +424,7 @@ describe("js-quantities", () => { }); it("should set baseScalar", () => { - var qty = Qty("0.018 MPa"); + let qty = Qty("0.018 MPa"); expect(qty.baseScalar).toBe(18000); qty = Qty("66 cm3"); @@ -432,8 +432,8 @@ describe("js-quantities", () => { }); it("should keep init value as is", () => { - var initValue = " 66 cm3 "; - var qty = Qty(initValue); + const initValue = " 66 cm3 "; + const qty = Qty(initValue); expect(qty.initValue).toEqual(initValue); }); @@ -443,7 +443,7 @@ describe("js-quantities", () => { }); it("should allow whitespaces between sign and scalar", () => { - var qty = Qty("- 1m"); + const qty = Qty("- 1m"); expect(qty.scalar).toEqual(-1); expect(qty.units()).toEqual("m"); @@ -457,23 +457,23 @@ describe("js-quantities", () => { describe("isCompatible", () => { it("should return true with compatible quantities", () => { - var qty1 = Qty("1 m*kg/s"); - var qty2 = Qty("1 in*pound/min"); + const qty1 = Qty("1 m*kg/s"); + let qty2 = Qty("1 in*pound/min"); expect(qty1.isCompatible(qty2)).toBe(true); qty2 = Qty("1 in/min"); expect(qty1.isCompatible(qty2)).toBe(false); }); it("should return true with dimensionless quantities", () => { - var qty1 = Qty("1"); - var qty2 = Qty("2"); + const qty1 = Qty("1"); + const qty2 = Qty("2"); expect(qty1.isCompatible(qty2)).toBe(true); }); }); describe("conversion", () => { it("should convert to base units", () => { - var qty = Qty("100 cm"); + let qty = Qty("100 cm"); expect(qty.toBase().scalar).toBe(1); expect(qty.toBase().units()).toBe("m"); qty = Qty("10 cm"); @@ -485,7 +485,7 @@ describe("js-quantities", () => { }); it("should convert to compatible units", () => { - var qty = Qty("10 cm"); + let qty = Qty("10 cm"); expect(qty.to("ft").scalar).toBe(Qty.divSafe(0.1, 0.3048)); qty = Qty("2m^3"); expect(qty.to("l").scalar).toBe(2000); @@ -518,7 +518,7 @@ describe("js-quantities", () => { }); it("should convert temperatures to compatible units", () => { - var qty = Qty("0 tempK"); + let qty = Qty("0 tempK"); expect(qty.to("tempC").scalar).toBe(-273.15); qty = Qty("0 tempF"); @@ -532,7 +532,7 @@ describe("js-quantities", () => { }); it("should convert temperature degrees to compatible units", () => { - var qty = Qty("0 degK"); + let qty = Qty("0 degK"); expect(qty.to("degC").scalar).toBe(0); qty = Qty("1 degK/s"); @@ -547,7 +547,7 @@ describe("js-quantities", () => { it("should convert temperature degrees to temperatures", () => { // according to ruby-units, deg -> temp conversion adds the degress to 0 kelvin before converting - var qty = Qty("100 degC"); + let qty = Qty("100 degC"); expect(qty.to("tempC").scalar).toBeCloseTo(-173.15, 10); qty = Qty("273.15 degC"); @@ -559,7 +559,7 @@ describe("js-quantities", () => { it("should convert temperatures to temperature degrees", () => { // according to ruby-units, temp -> deg conversion always uses the 0 relative degrees - var qty = Qty("100 tempC"); + let qty = Qty("100 tempC"); expect(qty.to("degC").scalar).toBe(100); qty = Qty("0 tempK"); @@ -576,8 +576,8 @@ describe("js-quantities", () => { }); it("should calculate inverses", () => { - var qty = Qty("1 ohm"); - var result = qty.to("siemens"); + let qty = Qty("1 ohm"); + let result = qty.to("siemens"); expect(result.scalar).toBe(1); expect(result.kind()).toBe("conductance"); @@ -611,7 +611,7 @@ describe("js-quantities", () => { }); it("should return itself if target units are the same", () => { - var qty = Qty("123 cm3"); + let qty = Qty("123 cm3"); expect(qty.to("cm3")).toBe(qty); expect(qty.to("cm^3")).toBe(qty); @@ -621,7 +621,7 @@ describe("js-quantities", () => { }); it("should be cached", () => { - var qty = Qty("100 m"), + const qty = Qty("100 m"), converted = qty.to("ft"); expect(qty.to("ft") === converted).toBe(true); @@ -630,16 +630,16 @@ describe("js-quantities", () => { describe("comparison", () => { it("should return true when comparing equal quantities", () => { - var qty1 = Qty("1cm"); - var qty2 = Qty("10mm"); + const qty1 = Qty("1cm"); + const qty2 = Qty("10mm"); expect(qty1.eq(qty2)).toBe(true); }); it("should compare compatible quantities", () => { - var qty1 = Qty("1cm"); - var qty2 = Qty("1mm"); - var qty3 = Qty("10mm"); - var qty4 = Qty("28A"); + const qty1 = Qty("1cm"); + const qty2 = Qty("1mm"); + const qty3 = Qty("10mm"); + const qty4 = Qty("28A"); expect(qty1.compareTo(qty2)).toBe(1); expect(qty2.compareTo(qty1)).toBe(-1); expect(qty1.compareTo(qty3)).toBe(0); @@ -654,21 +654,20 @@ describe("js-quantities", () => { }); it("should compare identical quantities", () => { - var qty1 = Qty("1cm"); - var qty2 = Qty("1cm"); - var qty3 = Qty("10mm"); + const qty1 = Qty("1cm"); + const qty2 = Qty("1cm"); + const qty3 = Qty("10mm"); expect(qty1.same(qty2)).toBe(true); expect(qty1.same(qty3)).toBe(false); }); it("should accept strings as parameter", () => { - var qty = Qty("1 cm"); + const qty = Qty("1 cm"); expect(qty.lt("0.5 cm")).toBe(false); expect(qty.lte("1 cm")).toBe(true); expect(qty.gte("3 mm")).toBe(true); expect(qty.gt("5 m")).toBe(false); }); - }); describe("non-ASCII character", () => { @@ -692,16 +691,15 @@ describe("js-quantities", () => { }); describe("math", () => { - it("should add quantities", () => { - var qty1 = Qty("2.5m"); - var qty2 = Qty("3m"); + const qty1 = Qty("2.5m"); + let qty2 = Qty("3m"); expect(qty1.add(qty2).scalar).toBe(5.5); expect(qty1.add("3m").scalar).toBe(5.5); qty2 = Qty("3cm"); - var result = qty1.add(qty2); + let result = qty1.add(qty2); expect(result.scalar).toBe(2.53); expect(result.units()).toBe("m"); @@ -716,15 +714,15 @@ describe("js-quantities", () => { }); it("should fail to add unlike quantities", () => { - var qty1 = Qty("3m"); - var qty2 = Qty("2s"); + const qty1 = Qty("3m"); + const qty2 = Qty("2s"); expect(() => { qty1.add(qty2); }).toThrow("Incompatible units"); expect(() => { qty2.add(qty1); }).toThrow("Incompatible units"); }); it("should fail to add inverse quantities", () => { - var qty1 = Qty("10S"); - var qty2 = qty1.inverse(); + let qty1 = Qty("10S"); + let qty2 = qty1.inverse(); expect(() => { qty1.add(qty2); }).toThrow("Incompatible units"); expect(() => { qty2.add(qty1); }).toThrow("Incompatible units"); @@ -735,15 +733,15 @@ describe("js-quantities", () => { }); it("should subtract quantities", () => { - var qty1 = Qty("2.5m"); - var qty2 = Qty("3m"); + const qty1 = Qty("2.5m"); + let qty2 = Qty("3m"); expect(qty1.sub(qty2).scalar).toBe(-0.5); expect(qty1.sub("2m").scalar).toBe(0.5); expect(qty1.sub("-2m").scalar).toBe(4.5); qty2 = Qty("3cm"); - var result = qty1.sub(qty2); + let result = qty1.sub(qty2); expect(result.scalar).toBe(2.47); expect(result.units()).toBe("m"); @@ -753,15 +751,15 @@ describe("js-quantities", () => { }); it("should fail to subtract unlike quantities", () => { - var qty1 = Qty("3m"); - var qty2 = Qty("2s"); + const qty1 = Qty("3m"); + const qty2 = Qty("2s"); expect(() => { qty1.sub(qty2); }).toThrow("Incompatible units"); expect(() => { qty2.sub(qty1); }).toThrow("Incompatible units"); }); it("should fail to subtract inverse quantities", () => { - var qty1 = Qty("10S"); - var qty2 = qty1.inverse(); + let qty1 = Qty("10S"); + let qty2 = qty1.inverse(); expect(() => { qty1.sub(qty2); }).toThrow("Incompatible units"); expect(() => { qty2.sub(qty1); }).toThrow("Incompatible units"); @@ -772,9 +770,9 @@ describe("js-quantities", () => { }); it("should multiply quantities", () => { - var qty1 = Qty("2.5m"); - var qty2 = Qty("3m"); - var result = qty1.mul(qty2); + const qty1 = Qty("2.5m"); + let qty2 = Qty("3m"); + let result = qty1.mul(qty2); expect(result.scalar).toBe(7.5); expect(result.units()).toBe("m2"); expect(result.kind()).toBe("area"); @@ -807,10 +805,10 @@ describe("js-quantities", () => { }); it("should multiply unlike quantities", () => { - var qty1 = Qty("2.5 m"); - var qty2 = Qty("3 N"); + let qty1 = Qty("2.5 m"); + let qty2 = Qty("3 N"); - var result = qty1.mul(qty2); + let result = qty1.mul(qty2); expect(result.scalar).toBe(7.5); qty1 = Qty("2.5 m^2"); @@ -822,11 +820,11 @@ describe("js-quantities", () => { }); it("should multiply inverse quantities", () => { - var qty1 = Qty("10S"); - var qty2 = Qty(".5S").inverse(); // 2/S - var qty3 = qty1.inverse(); // .1/S + const qty1 = Qty("10S"); + const qty2 = Qty(".5S").inverse(); // 2/S + const qty3 = qty1.inverse(); // .1/S - var result = qty1.mul(qty2); + let result = qty1.mul(qty2); expect(result.scalar).toBe(20); expect(result.isUnitless()).toBe(true); expect(result.units()).toBe(""); @@ -848,20 +846,20 @@ describe("js-quantities", () => { }); it("should divide quantities", () => { - var qty1 = Qty("2.5m"); - var qty2 = Qty("3m"); - var qty3 = Qty("0m"); + const qty1 = Qty("2.5m"); + const qty2 = Qty("3m"); + const qty3 = Qty("0m"); expect(() => { qty1.div(qty3); }).toThrow("Divide by zero"); expect(() => { qty1.div(0); }).toThrow("Divide by zero"); expect(qty3.div(qty1).scalar).toBe(0); - var result = qty1.div(qty2); + let result = qty1.div(qty2); expect(result.scalar).toBe(2.5 / 3); expect(result.units()).toBe(""); expect(result.kind()).toBe("unitless"); - var qty4 = Qty("3cm"); + const qty4 = Qty("3cm"); result = qty1.div(qty4); expect(result.scalar).toBe(2.5 / 0.03); expect(result.units()).toBe(""); @@ -876,20 +874,20 @@ describe("js-quantities", () => { }); it("should divide unlike quantities", () => { - var qty1 = Qty("7.5kg"); - var qty2 = Qty("2.5m^2"); + const qty1 = Qty("7.5kg"); + const qty2 = Qty("2.5m^2"); - var result = qty1.div(qty2); + const result = qty1.div(qty2); expect(result.scalar).toBe(3); expect(result.units()).toBe("kg/m2"); }); it("should divide inverse quantities", () => { - var qty1 = Qty("10 S"); - var qty2 = Qty(".5 S").inverse(); // 2/S - var qty3 = qty1.inverse(); // .1/S + const qty1 = Qty("10 S"); + const qty2 = Qty(".5 S").inverse(); // 2/S + const qty3 = qty1.inverse(); // .1/S - var result = qty1.div(qty2); + let result = qty1.div(qty2); expect(result.scalar).toBe(5); expect(result.units()).toBe("S2"); @@ -905,18 +903,16 @@ describe("js-quantities", () => { expect(result.scalar).toBe(0.01); expect(result.units()).toBe("1/S2"); }); - }); describe("math with temperatures", () => { - it("should add temperature degrees", () => { - var qty = Qty("2degC"); + let qty = Qty("2degC"); expect(qty.add("3degF").scalar).toBeCloseTo(11 / 3, 10); expect(qty.add("-1degC").scalar).toBe(1); qty = Qty("2 degC"); - var result = qty.add("2 degF"); + let result = qty.add("2 degF"); expect(result.scalar).toBe(28 / 9); expect(result.units()).toBe("degC"); @@ -932,14 +928,14 @@ describe("js-quantities", () => { }); it("should not add two temperatures", () => { - var qty = Qty("2tempC"); + const qty = Qty("2tempC"); expect(() => { qty.add("1 tempF"); }).toThrow("Cannot add two temperatures"); expect(() => { qty.add("1 tempC"); }).toThrow("Cannot add two temperatures"); }); it("should add temperatures to degrees", () => { - var qty = Qty("2degC"); - var result = qty.add("3tempF"); + let qty = Qty("2degC"); + let result = qty.add("3tempF"); expect(result.scalar).toBe(33 / 5); expect(result.units()).toBe("tempF"); @@ -954,33 +950,33 @@ describe("js-quantities", () => { }); it("should subtract degrees from degrees", () => { - var qty = Qty("2degC"); + const qty = Qty("2degC"); expect(qty.sub("1.5degK").scalar).toBe(0.5); expect(qty.sub("-2degC").scalar).toBe(4); expect(qty.sub("1degF").scalar).toBe(2 - 5 / 9); expect(qty.sub("-1degC").scalar).toBe(3); - var result = qty.sub("degC"); + const result = qty.sub("degC"); expect(result.scalar).toBe(1); expect(result.units()).toBe("degC"); }); it("should subtract degrees from temperatures", () => { - var qty = Qty("2tempC"); + const qty = Qty("2tempC"); expect(qty.sub("1.5degK").scalar).toBe(0.5); expect(qty.sub("-2degC").scalar).toBe(4); expect(qty.sub("1degF").scalar).toBe(2 - 5 / 9); expect(qty.sub("-1degC").scalar).toBe(3); - var result = qty.sub("degC"); + const result = qty.sub("degC"); expect(result.scalar).toBe(1); expect(result.units()).toBe("tempC"); }); it("should subtract temperatures from temperatures", () => { - var qty = Qty("2tempC"); + const qty = Qty("2tempC"); - var result = qty.sub("1.5tempK"); + let result = qty.sub("1.5tempK"); expect(result.scalar).toBe(273.65); expect(result.units()).toBe("degC"); @@ -994,14 +990,14 @@ describe("js-quantities", () => { }); it("should not subtract temperatures from degrees", () => { - var qty = Qty("2degC"); + const qty = Qty("2degC"); expect(() => { qty.sub("1 tempF"); }).toThrow("Cannot subtract a temperature from a differential degree unit"); expect(() => { qty.sub("1 tempC"); }).toThrow("Cannot subtract a temperature from a differential degree unit"); }); it("should multiply temperature degrees", () => { - var qty = Qty("2degF"); - var result = qty.mul(3); + let qty = Qty("2degF"); + let result = qty.mul(3); expect(result.scalar).toBe(6); expect(result.units()).toBe("degF"); @@ -1022,12 +1018,12 @@ describe("js-quantities", () => { }); it("should not multiply temperatures except by scalar", () => { - var qty = Qty("2tempF"); + const qty = Qty("2tempF"); expect(() => { qty.mul("1 tempC"); }).toThrow("Cannot multiply by temperatures"); expect(() => { qty.mul("1 degC"); }).toThrow("Cannot multiply by temperatures"); expect(() => { Qty("1 tempC*s"); }).toThrow("Cannot multiply by temperatures"); - var result = qty.mul(2); + let result = qty.mul(2); expect(result.scalar).toBe(4); expect(result.units()).toBe("tempF"); @@ -1037,10 +1033,10 @@ describe("js-quantities", () => { }); it("should multiply temperature degrees with unlike quantities", () => { - var qty1 = Qty("2.5 degF"); - var qty2 = Qty("3 m"); + let qty1 = Qty("2.5 degF"); + let qty2 = Qty("3 m"); - var result = qty1.mul(qty2); + let result = qty1.mul(qty2); expect(result.scalar).toBe(7.5); qty1 = Qty("2.5 degF"); @@ -1052,23 +1048,23 @@ describe("js-quantities", () => { }); it("should divide temperature degrees with unlike quantities", () => { - var qty1 = Qty("7.5degF"); - var qty2 = Qty("2.5m^2"); + const qty1 = Qty("7.5degF"); + const qty2 = Qty("2.5m^2"); - var result = qty1.div(qty2); + const result = qty1.div(qty2); expect(result.scalar).toBe(3); expect(result.units()).toBe("degF/m2"); }); it("should divide temperature degree quantities", () => { - var qty = Qty("2.5 degF"); + const qty = Qty("2.5 degF"); expect(() => { qty.div("0 degF"); }).toThrow("Divide by zero"); expect(() => { qty.div(0); }).toThrow("Divide by zero"); expect(Qty("0 degF").div(qty).scalar).toBe(0); expect(Qty("0 degF").div(qty).units()).toBe(""); - var result = qty.div("3 degF"); + let result = qty.div("3 degF"); expect(result.scalar).toBe(2.5 / 3); expect(result.units()).toBe(""); expect(result.kind()).toBe("unitless"); @@ -1094,11 +1090,10 @@ describe("js-quantities", () => { // inverse is division: 1/x expect(() => { Qty("tempF").inverse(); }).toThrow("Cannot divide with temperatures"); - var result = Qty("4 tempF").div(2); + const result = Qty("4 tempF").div(2); expect(result.scalar).toBe(2); expect(result.units()).toBe("tempF"); }); - }); describe("errors", () => { @@ -1112,16 +1107,15 @@ describe("js-quantities", () => { }); describe("utility methods", () => { - it("should accept string as parameter for compatibility tests", () => { - var qty = Qty("1 mm"); + const qty = Qty("1 mm"); expect(qty.isCompatible("2 mm")).toBe(true); expect(qty.isCompatible("2 mm^3")).toBe(false); }); it("should return kind", () => { - var qty = Qty("1 mm"); + let qty = Qty("1 mm"); expect(qty.kind()).toBe("length"); qty = Qty("1 N"); @@ -1129,7 +1123,7 @@ describe("js-quantities", () => { }); it("should know if a quantity is in base units", () => { - var qty = Qty("100 cm"); + let qty = Qty("100 cm"); expect(qty.isBase()).toBe(false); qty = Qty("1m"); @@ -1137,7 +1131,7 @@ describe("js-quantities", () => { }); it("should return unit part of quantities", () => { - var qty = Qty("1"); + let qty = Qty("1"); expect(qty.units()).toBe(""); qty = Qty("1 /s"); expect(qty.units()).toBe("1/s"); @@ -1152,12 +1146,11 @@ describe("js-quantities", () => { qty = Qty("1 cm^2*J^3/s^2*A^2"); expect(qty.units()).toBe("cm2*J3/s2*A2"); }); - }); describe("toString", () => { it("should generate readable human output", () => { - var qty = Qty("2m"); + let qty = Qty("2m"); expect(qty.toString()).toBe("2 m"); expect(qty.toString("cm")).toBe("200 cm"); expect(qty.toString("km")).toBe("0.002 km"); @@ -1176,7 +1169,7 @@ describe("js-quantities", () => { }); it("should round readable human output when max decimals is specified", () => { - var qty = (Qty("2m")).div(3); + let qty = Qty("2m").div(3); expect(qty.toString("cm", 2)).toBe("66.67 cm"); qty = Qty("2.8m"); @@ -1187,14 +1180,14 @@ describe("js-quantities", () => { }); it("should round to max decimals", () => { - var qty = (Qty("2.987654321 m")); + const qty = Qty("2.987654321 m"); expect(qty.toString(3)).toBe("2.988 m"); expect(qty.toString(0)).toBe("3 m"); }); it("should round according to precision passed as quantity", () => { - var qty = Qty("5.17 ft"); + const qty = Qty("5.17 ft"); expect(qty.toString(Qty("ft"))).toBe("5 ft"); expect(qty.toString(Qty("2 ft"))).toBe("6 ft"); @@ -1206,49 +1199,48 @@ describe("js-quantities", () => { }); it("should return same output with successive calls", () => { - var qty = Qty("123 cm3"); + const qty = Qty("123 cm3"); expect(qty.toString("cm3", 0)).toBe("123 cm3"); expect(qty.toString("cm3", 0)).toBe("123 cm3"); }); it("should return identical output when called with no parameters or same units", () => { - var qty = Qty("123 cm3"); + const qty = Qty("123 cm3"); expect(qty.toString()).toBe(qty.toString("cm3")); }); - }); describe("format", () => { describe("provided default formatter", () => { it("should be applied to output", () => { - var qty = (Qty("2.987654321 m")); + const qty = Qty("2.987654321 m"); expect(qty.format()).toBe("2.987654321 m"); }); }); describe("custom formatter", () => { - var roundingFormatter = (maxDecimals: number) => { + const roundingFormatter = (maxDecimals: number) => { return (scalar: number, units: string) => { - var pow = Math.pow(10, maxDecimals); - var rounded = Math.round(scalar * pow) / pow; + const pow = Math.pow(10, maxDecimals); + const rounded = Math.round(scalar * pow) / pow; return rounded + " " + units; }; }; it("should be applied to output", () => { - var qty = (Qty("2.987654321 m")); + const qty = Qty("2.987654321 m"); expect(qty.format(roundingFormatter(3))).toBe("2.988 m"); expect(qty.format(roundingFormatter(0))).toBe("3 m"); }); it("should be applied after conversion to target units", () => { - var qty = (Qty("2m")).div(3); + let qty = Qty("2m").div(3); expect(qty.format("cm", roundingFormatter(2))).toBe("66.67 cm"); - var intRoundingFormatter = roundingFormatter(0); + const intRoundingFormatter = roundingFormatter(0); qty = Qty("2.8m"); expect(qty.format("m", intRoundingFormatter)).toBe("3 m"); expect(qty.format("cm", intRoundingFormatter)).toBe("280 cm"); @@ -1257,7 +1249,7 @@ describe("js-quantities", () => { }); describe("globally set as default formatter", () => { - var previousFormatter: Qty.Formatter; + let previousFormatter: Qty.Formatter; beforeEach(() => { previousFormatter = Qty.formatter; @@ -1270,7 +1262,7 @@ describe("js-quantities", () => { }); it("should be applied when no formatter is passed", () => { - var qty = (Qty("2.987654321 m")); + const qty = Qty("2.987654321 m"); expect(qty.format()).toBe("2.988 m"); }); @@ -1280,7 +1272,7 @@ describe("js-quantities", () => { describe("precision rounding", () => { it("should round according to precision passed as quantity with same units", () => { - var qty = Qty("5.17 ft"); + const qty = Qty("5.17 ft"); expect(qty.toPrec(Qty("ft")).toString()).toBe("5 ft"); expect(qty.toPrec(Qty("2 ft")).toString()).toBe("6 ft"); @@ -1294,7 +1286,7 @@ describe("js-quantities", () => { }); it("should allow string as precision parameter", () => { - var qty = Qty("5.17 ft"); + const qty = Qty("5.17 ft"); expect(qty.toPrec("ft").toString()).toBe("5 ft"); expect(qty.toPrec("0.5 ft").toString()).toBe("5 ft"); @@ -1302,7 +1294,7 @@ describe("js-quantities", () => { }); it("should round according to precision passed as quantity with different prefixes", () => { - var qty = Qty("6.3782 m"); + const qty = Qty("6.3782 m"); expect(qty.toPrec(Qty("dm")).toString()).toBe("6.4 m"); expect(qty.toPrec(Qty("cm")).toString()).toBe("6.38 m"); @@ -1312,7 +1304,7 @@ describe("js-quantities", () => { }); it("should round according to precision passed as quantity with different compatible units", () => { - var qty = Qty("1.146 MPa"); + let qty = Qty("1.146 MPa"); expect(qty.toPrec(Qty("0.1 bar")).toString()).toBe("1.15 MPa"); expect(qty.toPrec(Qty("0.01 MPa")).toString()).toBe("1.15 MPa"); expect(qty.toPrec(Qty("dbar")).toString()).toBe("1.15 MPa"); @@ -1371,25 +1363,25 @@ describe("js-quantities", () => { it("should convert value", () => { // TODO Same test but with m/h -> ft/s triggers rounding issue // (For the sake of speed, converter does not check and fix rounding issues) - var converter = Qty.swiftConverter("m/h", "m/s"); + const converter = Qty.swiftConverter("m/h", "m/s"); expect(converter(2500)).toEqual(Qty("2500 m/h").to("m/s").scalar); }); it("should returned value unchanged when units are identical", () => { - var converter = Qty.swiftConverter("m/h", "m/h"); + const converter = Qty.swiftConverter("m/h", "m/h"); expect(converter(2500)).toEqual(2500); }); it("should convert temperatures", () => { - var converter = Qty.swiftConverter("tempF", "tempC"); + const converter = Qty.swiftConverter("tempF", "tempC"); expect(converter(32)).toEqual(0); }); it("should convert degrees", () => { - var converter = Qty.swiftConverter("degC", "degF"); + const converter = Qty.swiftConverter("degC", "degF"); expect(converter(10)).toEqual(18); }); @@ -1397,7 +1389,7 @@ describe("js-quantities", () => { describe("array of values", () => { it("should be converted", () => { - var converter = Qty.swiftConverter("MPa", "bar"), + const converter = Qty.swiftConverter("MPa", "bar"), values = [250, 10, 15], expected = [2500, 100, 150]; @@ -1413,8 +1405,8 @@ describe("js-quantities", () => { }); it("should not contain duplicate kind names", () => { - var kinds = Qty.getKinds(); - var map: { [key: string]: number } = {}; + const kinds = Qty.getKinds(); + const map: { [key: string]: number } = {}; kinds.forEach(kind => { map[kind] = 1; }); @@ -1500,14 +1492,14 @@ describe("js-quantities", () => { }); it('should not be defined as base unit', () => { - var qty = Qty("F"); + const qty = Qty("F"); expect(qty.isBase()).toBe(false); expect(qty.toBase().units()).toEqual("s4*A2/m2*kg"); }); it('should be parsed when prefixed', () => { - var qty = Qty("100 nF"); + const qty = Qty("100 nF"); expect(qty.eq(Qty("100 F").div(1e9))).toBe(true); expect(qty.baseScalar).toEqual(1e-7); diff --git a/js-quantities/tsconfig.json b/types/js-quantities/tsconfig.json similarity index 100% rename from js-quantities/tsconfig.json rename to types/js-quantities/tsconfig.json diff --git a/js-quantities/tslint.json b/types/js-quantities/tslint.json similarity index 100% rename from js-quantities/tslint.json rename to types/js-quantities/tslint.json diff --git a/js-schema/index.d.ts b/types/js-schema/index.d.ts similarity index 100% rename from js-schema/index.d.ts rename to types/js-schema/index.d.ts diff --git a/js-schema/js-schema-tests.ts b/types/js-schema/js-schema-tests.ts similarity index 100% rename from js-schema/js-schema-tests.ts rename to types/js-schema/js-schema-tests.ts diff --git a/js-schema/tsconfig.json b/types/js-schema/tsconfig.json similarity index 100% rename from js-schema/tsconfig.json rename to types/js-schema/tsconfig.json diff --git a/js-url/index.d.ts b/types/js-url/index.d.ts similarity index 100% rename from js-url/index.d.ts rename to types/js-url/index.d.ts diff --git a/js-url/js-url-tests.ts b/types/js-url/js-url-tests.ts similarity index 100% rename from js-url/js-url-tests.ts rename to types/js-url/js-url-tests.ts diff --git a/js-url/tsconfig.json b/types/js-url/tsconfig.json similarity index 100% rename from js-url/tsconfig.json rename to types/js-url/tsconfig.json diff --git a/js-yaml/index.d.ts b/types/js-yaml/index.d.ts similarity index 100% rename from js-yaml/index.d.ts rename to types/js-yaml/index.d.ts diff --git a/js-yaml/js-yaml-tests.ts b/types/js-yaml/js-yaml-tests.ts similarity index 100% rename from js-yaml/js-yaml-tests.ts rename to types/js-yaml/js-yaml-tests.ts diff --git a/js-yaml/tsconfig.json b/types/js-yaml/tsconfig.json similarity index 100% rename from js-yaml/tsconfig.json rename to types/js-yaml/tsconfig.json diff --git a/jsbn/index.d.ts b/types/jsbn/index.d.ts similarity index 100% rename from jsbn/index.d.ts rename to types/jsbn/index.d.ts diff --git a/jsbn/jsbn-tests.ts b/types/jsbn/jsbn-tests.ts similarity index 100% rename from jsbn/jsbn-tests.ts rename to types/jsbn/jsbn-tests.ts diff --git a/jsbn/tsconfig.json b/types/jsbn/tsconfig.json similarity index 100% rename from jsbn/tsconfig.json rename to types/jsbn/tsconfig.json diff --git a/jscrollpane/index.d.ts b/types/jscrollpane/index.d.ts similarity index 100% rename from jscrollpane/index.d.ts rename to types/jscrollpane/index.d.ts diff --git a/jscrollpane/tsconfig.json b/types/jscrollpane/tsconfig.json similarity index 100% rename from jscrollpane/tsconfig.json rename to types/jscrollpane/tsconfig.json diff --git a/jsdeferred/index.d.ts b/types/jsdeferred/index.d.ts similarity index 100% rename from jsdeferred/index.d.ts rename to types/jsdeferred/index.d.ts diff --git a/jsdeferred/jsdeferred-tests.ts b/types/jsdeferred/jsdeferred-tests.ts similarity index 100% rename from jsdeferred/jsdeferred-tests.ts rename to types/jsdeferred/jsdeferred-tests.ts diff --git a/jsdeferred/tsconfig.json b/types/jsdeferred/tsconfig.json similarity index 100% rename from jsdeferred/tsconfig.json rename to types/jsdeferred/tsconfig.json diff --git a/jsdom/index.d.ts b/types/jsdom/index.d.ts similarity index 100% rename from jsdom/index.d.ts rename to types/jsdom/index.d.ts diff --git a/jsdom/jsdom-tests.ts b/types/jsdom/jsdom-tests.ts similarity index 100% rename from jsdom/jsdom-tests.ts rename to types/jsdom/jsdom-tests.ts diff --git a/jsdom/tsconfig.json b/types/jsdom/tsconfig.json similarity index 100% rename from jsdom/tsconfig.json rename to types/jsdom/tsconfig.json diff --git a/jsen/index.d.ts b/types/jsen/index.d.ts similarity index 100% rename from jsen/index.d.ts rename to types/jsen/index.d.ts diff --git a/jsen/jsen-tests.ts b/types/jsen/jsen-tests.ts similarity index 100% rename from jsen/jsen-tests.ts rename to types/jsen/jsen-tests.ts diff --git a/jsen/tsconfig.json b/types/jsen/tsconfig.json similarity index 100% rename from jsen/tsconfig.json rename to types/jsen/tsconfig.json diff --git a/jsend/index.d.ts b/types/jsend/index.d.ts similarity index 100% rename from jsend/index.d.ts rename to types/jsend/index.d.ts diff --git a/jsend/jsend-tests.ts b/types/jsend/jsend-tests.ts similarity index 100% rename from jsend/jsend-tests.ts rename to types/jsend/jsend-tests.ts diff --git a/jsend/tsconfig.json b/types/jsend/tsconfig.json similarity index 100% rename from jsend/tsconfig.json rename to types/jsend/tsconfig.json diff --git a/jsesc/index.d.ts b/types/jsesc/index.d.ts similarity index 100% rename from jsesc/index.d.ts rename to types/jsesc/index.d.ts diff --git a/jsesc/jsesc-tests.ts b/types/jsesc/jsesc-tests.ts similarity index 100% rename from jsesc/jsesc-tests.ts rename to types/jsesc/jsesc-tests.ts diff --git a/jsesc/tsconfig.json b/types/jsesc/tsconfig.json similarity index 100% rename from jsesc/tsconfig.json rename to types/jsesc/tsconfig.json diff --git a/jsfl/index.d.ts b/types/jsfl/index.d.ts similarity index 100% rename from jsfl/index.d.ts rename to types/jsfl/index.d.ts diff --git a/jsfl/tsconfig.json b/types/jsfl/tsconfig.json similarity index 100% rename from jsfl/tsconfig.json rename to types/jsfl/tsconfig.json diff --git a/jsfl/xJSFL.d.ts b/types/jsfl/xJSFL.d.ts similarity index 100% rename from jsfl/xJSFL.d.ts rename to types/jsfl/xJSFL.d.ts diff --git a/jshamcrest/index.d.ts b/types/jshamcrest/index.d.ts similarity index 100% rename from jshamcrest/index.d.ts rename to types/jshamcrest/index.d.ts diff --git a/jshamcrest/jshamcrest-tests.ts b/types/jshamcrest/jshamcrest-tests.ts similarity index 100% rename from jshamcrest/jshamcrest-tests.ts rename to types/jshamcrest/jshamcrest-tests.ts diff --git a/jshamcrest/tsconfig.json b/types/jshamcrest/tsconfig.json similarity index 100% rename from jshamcrest/tsconfig.json rename to types/jshamcrest/tsconfig.json diff --git a/jsmockito/index.d.ts b/types/jsmockito/index.d.ts similarity index 100% rename from jsmockito/index.d.ts rename to types/jsmockito/index.d.ts diff --git a/jsmockito/jsmockito-tests.ts b/types/jsmockito/jsmockito-tests.ts similarity index 100% rename from jsmockito/jsmockito-tests.ts rename to types/jsmockito/jsmockito-tests.ts diff --git a/jsmockito/tsconfig.json b/types/jsmockito/tsconfig.json similarity index 100% rename from jsmockito/tsconfig.json rename to types/jsmockito/tsconfig.json diff --git a/jsnlog/index.d.ts b/types/jsnlog/index.d.ts similarity index 86% rename from jsnlog/index.d.ts rename to types/jsnlog/index.d.ts index e252d5cf36..4d1c707b4f 100644 --- a/jsnlog/index.d.ts +++ b/types/jsnlog/index.d.ts @@ -25,7 +25,6 @@ // JSNLog. declare namespace JL { - interface JSNLogOptions { enabled?: boolean; maxMessages?: number; @@ -88,7 +87,6 @@ declare namespace JL { declare function __jsnlog_configure(jsnlog: any): void; - // Ambient declaration of the JL function itself declare function JL(loggerName?: string): JL.JSNLogLogger; @@ -97,20 +95,20 @@ declare function JL(loggerName?: string): JL.JSNLogLogger; // overload ambient declarations with non-ambient declarations. declare namespace JL { - export function setOptions(options: JSNLogOptions): void; - export function createAjaxAppender(appenderName: string): JSNLogAjaxAppender; - export function createConsoleAppender(appenderName: string): JSNLogConsoleAppender; + function setOptions(options: JSNLogOptions): void; + function createAjaxAppender(appenderName: string): JSNLogAjaxAppender; + function createConsoleAppender(appenderName: string): JSNLogConsoleAppender; - export class Exception { + class Exception { constructor(data: any, inner?: any); } - export function getOffLevel(): number; - export function getTraceLevel(): number; - export function getDebugLevel(): number; - export function getInfoLevel(): number; - export function getWarnLevel(): number; - export function getErrorLevel(): number; - export function getFatalLevel(): number; - export function getAllLevel(): number; + function getOffLevel(): number; + function getTraceLevel(): number; + function getDebugLevel(): number; + function getInfoLevel(): number; + function getWarnLevel(): number; + function getErrorLevel(): number; + function getFatalLevel(): number; + function getAllLevel(): number; } diff --git a/jsnlog/jsnlog-tests.ts b/types/jsnlog/jsnlog-tests.ts similarity index 71% rename from jsnlog/jsnlog-tests.ts rename to types/jsnlog/jsnlog-tests.ts index c988234394..c7610aba78 100644 --- a/jsnlog/jsnlog-tests.ts +++ b/types/jsnlog/jsnlog-tests.ts @@ -1,16 +1,14 @@ - - // ---------------------------------------------------------- // JL -var offLevel: number = JL.getOffLevel(); -var traceLevel: number = JL.getTraceLevel(); -var debugLevel: number = JL.getDebugLevel(); -var infoLevel: number = JL.getInfoLevel(); -var warnLevel: number = JL.getWarnLevel(); -var errorLevel: number = JL.getErrorLevel(); -var fatalLevel: number = JL.getFatalLevel(); -var allLevel: number = JL.getAllLevel(); +const offLevel: number = JL.getOffLevel(); +const traceLevel: number = JL.getTraceLevel(); +const debugLevel: number = JL.getDebugLevel(); +const infoLevel: number = JL.getInfoLevel(); +const warnLevel: number = JL.getWarnLevel(); +const errorLevel: number = JL.getErrorLevel(); +const fatalLevel: number = JL.getFatalLevel(); +const allLevel: number = JL.getAllLevel(); JL.setOptions({ enabled: true, @@ -25,12 +23,12 @@ JL.setOptions({ // ---------------------------------------------------------- // Exception -var e = new JL.Exception("i is too small!"); +const e = new JL.Exception("i is too small!"); // ---------------------------------------------------------- // Ajax Appender -var ajaxAppender1: JL.JSNLogAjaxAppender = JL.createAjaxAppender('ajaxAppender'); +const ajaxAppender1: JL.JSNLogAjaxAppender = JL.createAjaxAppender('ajaxAppender'); ajaxAppender1.setOptions({ level: 5000, @@ -48,7 +46,7 @@ ajaxAppender1.setOptions({ // ---------------------------------------------------------- // Console Appender -var consoleAppender1: JL.JSNLogConsoleAppender = JL.createConsoleAppender('consoleAppender'); +const consoleAppender1: JL.JSNLogConsoleAppender = JL.createConsoleAppender('consoleAppender'); consoleAppender1.setOptions({ level: 5000, @@ -61,13 +59,12 @@ consoleAppender1.setOptions({ batchSize: 2 }); - // ---------------------------------------------------------- // Loggers -var logger1: JL.JSNLogLogger = JL('mylogger'); +const logger1: JL.JSNLogLogger = JL('mylogger'); -var exception = {}; +const exception = {}; logger1.trace('log message').debug({ x: 1, y: 2}); logger1.info(() => 5); @@ -85,4 +82,3 @@ logger1.setOptions({ appenders: [ ajaxAppender1, consoleAppender1 ], onceOnly: [ 'regex1', 'regex2' ] }); - diff --git a/jsnlog/tsconfig.json b/types/jsnlog/tsconfig.json similarity index 100% rename from jsnlog/tsconfig.json rename to types/jsnlog/tsconfig.json diff --git a/jsnlog/tslint.json b/types/jsnlog/tslint.json similarity index 100% rename from jsnlog/tslint.json rename to types/jsnlog/tslint.json diff --git a/jsnox/index.d.ts b/types/jsnox/index.d.ts similarity index 100% rename from jsnox/index.d.ts rename to types/jsnox/index.d.ts diff --git a/jsnox/jsnox-tests.ts b/types/jsnox/jsnox-tests.ts similarity index 100% rename from jsnox/jsnox-tests.ts rename to types/jsnox/jsnox-tests.ts diff --git a/jsnox/tsconfig.json b/types/jsnox/tsconfig.json similarity index 100% rename from jsnox/tsconfig.json rename to types/jsnox/tsconfig.json diff --git a/json-editor/index.d.ts b/types/json-editor/index.d.ts similarity index 100% rename from json-editor/index.d.ts rename to types/json-editor/index.d.ts diff --git a/json-editor/json-editor-tests.ts b/types/json-editor/json-editor-tests.ts similarity index 100% rename from json-editor/json-editor-tests.ts rename to types/json-editor/json-editor-tests.ts diff --git a/json-editor/tsconfig.json b/types/json-editor/tsconfig.json similarity index 100% rename from json-editor/tsconfig.json rename to types/json-editor/tsconfig.json diff --git a/json-merge-patch/index.d.ts b/types/json-merge-patch/index.d.ts similarity index 100% rename from json-merge-patch/index.d.ts rename to types/json-merge-patch/index.d.ts diff --git a/json-merge-patch/json-merge-patch-tests.ts b/types/json-merge-patch/json-merge-patch-tests.ts similarity index 100% rename from json-merge-patch/json-merge-patch-tests.ts rename to types/json-merge-patch/json-merge-patch-tests.ts diff --git a/json-merge-patch/tsconfig.json b/types/json-merge-patch/tsconfig.json similarity index 100% rename from json-merge-patch/tsconfig.json rename to types/json-merge-patch/tsconfig.json diff --git a/json-patch/index.d.ts b/types/json-patch/index.d.ts similarity index 100% rename from json-patch/index.d.ts rename to types/json-patch/index.d.ts diff --git a/json-patch/json-patch-tests.ts b/types/json-patch/json-patch-tests.ts similarity index 100% rename from json-patch/json-patch-tests.ts rename to types/json-patch/json-patch-tests.ts diff --git a/json-patch/tsconfig.json b/types/json-patch/tsconfig.json similarity index 100% rename from json-patch/tsconfig.json rename to types/json-patch/tsconfig.json diff --git a/json-pointer/index.d.ts b/types/json-pointer/index.d.ts similarity index 100% rename from json-pointer/index.d.ts rename to types/json-pointer/index.d.ts diff --git a/json-pointer/json-pointer-tests.ts b/types/json-pointer/json-pointer-tests.ts similarity index 100% rename from json-pointer/json-pointer-tests.ts rename to types/json-pointer/json-pointer-tests.ts diff --git a/json-pointer/tsconfig.json b/types/json-pointer/tsconfig.json similarity index 100% rename from json-pointer/tsconfig.json rename to types/json-pointer/tsconfig.json diff --git a/json-socket/index.d.ts b/types/json-socket/index.d.ts similarity index 100% rename from json-socket/index.d.ts rename to types/json-socket/index.d.ts diff --git a/json-socket/json-socket-tests.ts b/types/json-socket/json-socket-tests.ts similarity index 100% rename from json-socket/json-socket-tests.ts rename to types/json-socket/json-socket-tests.ts diff --git a/json-socket/tsconfig.json b/types/json-socket/tsconfig.json similarity index 100% rename from json-socket/tsconfig.json rename to types/json-socket/tsconfig.json diff --git a/json-stable-stringify/index.d.ts b/types/json-stable-stringify/index.d.ts similarity index 100% rename from json-stable-stringify/index.d.ts rename to types/json-stable-stringify/index.d.ts diff --git a/json-stable-stringify/json-stable-stringify-tests.ts b/types/json-stable-stringify/json-stable-stringify-tests.ts similarity index 100% rename from json-stable-stringify/json-stable-stringify-tests.ts rename to types/json-stable-stringify/json-stable-stringify-tests.ts diff --git a/json-stable-stringify/tsconfig.json b/types/json-stable-stringify/tsconfig.json similarity index 100% rename from json-stable-stringify/tsconfig.json rename to types/json-stable-stringify/tsconfig.json diff --git a/json-stable-stringify/tslint.json b/types/json-stable-stringify/tslint.json similarity index 100% rename from json-stable-stringify/tslint.json rename to types/json-stable-stringify/tslint.json diff --git a/json5/index.d.ts b/types/json5/index.d.ts similarity index 100% rename from json5/index.d.ts rename to types/json5/index.d.ts diff --git a/json5/json5-tests.ts b/types/json5/json5-tests.ts similarity index 100% rename from json5/json5-tests.ts rename to types/json5/json5-tests.ts diff --git a/json5/tsconfig.json b/types/json5/tsconfig.json similarity index 100% rename from json5/tsconfig.json rename to types/json5/tsconfig.json diff --git a/jsoneditor/index.d.ts b/types/jsoneditor/index.d.ts similarity index 100% rename from jsoneditor/index.d.ts rename to types/jsoneditor/index.d.ts diff --git a/jsoneditor/jsoneditor-tests.ts b/types/jsoneditor/jsoneditor-tests.ts similarity index 100% rename from jsoneditor/jsoneditor-tests.ts rename to types/jsoneditor/jsoneditor-tests.ts diff --git a/jsoneditor/tsconfig.json b/types/jsoneditor/tsconfig.json similarity index 100% rename from jsoneditor/tsconfig.json rename to types/jsoneditor/tsconfig.json diff --git a/jsoneditoronline/index.d.ts b/types/jsoneditoronline/index.d.ts similarity index 100% rename from jsoneditoronline/index.d.ts rename to types/jsoneditoronline/index.d.ts diff --git a/jsoneditoronline/jsoneditoronline-tests.ts b/types/jsoneditoronline/jsoneditoronline-tests.ts similarity index 100% rename from jsoneditoronline/jsoneditoronline-tests.ts rename to types/jsoneditoronline/jsoneditoronline-tests.ts diff --git a/jsoneditoronline/tsconfig.json b/types/jsoneditoronline/tsconfig.json similarity index 100% rename from jsoneditoronline/tsconfig.json rename to types/jsoneditoronline/tsconfig.json diff --git a/jsonminify/index.d.ts b/types/jsonminify/index.d.ts similarity index 100% rename from jsonminify/index.d.ts rename to types/jsonminify/index.d.ts diff --git a/jsonminify/jsonminify-tests.ts b/types/jsonminify/jsonminify-tests.ts similarity index 100% rename from jsonminify/jsonminify-tests.ts rename to types/jsonminify/jsonminify-tests.ts diff --git a/jsonminify/tsconfig.json b/types/jsonminify/tsconfig.json similarity index 100% rename from jsonminify/tsconfig.json rename to types/jsonminify/tsconfig.json diff --git a/jsonnet/index.d.ts b/types/jsonnet/index.d.ts similarity index 100% rename from jsonnet/index.d.ts rename to types/jsonnet/index.d.ts diff --git a/jsonnet/jsonnet-tests.ts b/types/jsonnet/jsonnet-tests.ts similarity index 100% rename from jsonnet/jsonnet-tests.ts rename to types/jsonnet/jsonnet-tests.ts diff --git a/jsonnet/tsconfig.json b/types/jsonnet/tsconfig.json similarity index 100% rename from jsonnet/tsconfig.json rename to types/jsonnet/tsconfig.json diff --git a/jsonpath/index.d.ts b/types/jsonpath/index.d.ts similarity index 100% rename from jsonpath/index.d.ts rename to types/jsonpath/index.d.ts diff --git a/jsonpath/jsonpath-tests.ts b/types/jsonpath/jsonpath-tests.ts similarity index 100% rename from jsonpath/jsonpath-tests.ts rename to types/jsonpath/jsonpath-tests.ts diff --git a/jsonpath/tsconfig.json b/types/jsonpath/tsconfig.json similarity index 100% rename from jsonpath/tsconfig.json rename to types/jsonpath/tsconfig.json diff --git a/jsonrpc-serializer/index.d.ts b/types/jsonrpc-serializer/index.d.ts similarity index 100% rename from jsonrpc-serializer/index.d.ts rename to types/jsonrpc-serializer/index.d.ts diff --git a/jsonrpc-serializer/jsonrpc-serializer-tests.ts b/types/jsonrpc-serializer/jsonrpc-serializer-tests.ts similarity index 100% rename from jsonrpc-serializer/jsonrpc-serializer-tests.ts rename to types/jsonrpc-serializer/jsonrpc-serializer-tests.ts diff --git a/jsonrpc-serializer/tsconfig.json b/types/jsonrpc-serializer/tsconfig.json similarity index 100% rename from jsonrpc-serializer/tsconfig.json rename to types/jsonrpc-serializer/tsconfig.json diff --git a/jsonrpc-serializer/tslint.json b/types/jsonrpc-serializer/tslint.json similarity index 100% rename from jsonrpc-serializer/tslint.json rename to types/jsonrpc-serializer/tslint.json diff --git a/jsonstream/index.d.ts b/types/jsonstream/index.d.ts similarity index 100% rename from jsonstream/index.d.ts rename to types/jsonstream/index.d.ts diff --git a/jsonstream/jsonstream-tests.ts b/types/jsonstream/jsonstream-tests.ts similarity index 100% rename from jsonstream/jsonstream-tests.ts rename to types/jsonstream/jsonstream-tests.ts diff --git a/jsonstream/tsconfig.json b/types/jsonstream/tsconfig.json similarity index 100% rename from jsonstream/tsconfig.json rename to types/jsonstream/tsconfig.json diff --git a/jsonwebtoken/index.d.ts b/types/jsonwebtoken/index.d.ts similarity index 100% rename from jsonwebtoken/index.d.ts rename to types/jsonwebtoken/index.d.ts diff --git a/jsonwebtoken/jsonwebtoken-tests.ts b/types/jsonwebtoken/jsonwebtoken-tests.ts similarity index 100% rename from jsonwebtoken/jsonwebtoken-tests.ts rename to types/jsonwebtoken/jsonwebtoken-tests.ts diff --git a/jsonwebtoken/tsconfig.json b/types/jsonwebtoken/tsconfig.json similarity index 100% rename from jsonwebtoken/tsconfig.json rename to types/jsonwebtoken/tsconfig.json diff --git a/jspdf/index.d.ts b/types/jspdf/index.d.ts similarity index 100% rename from jspdf/index.d.ts rename to types/jspdf/index.d.ts diff --git a/jspdf/jspdf-tests.ts b/types/jspdf/jspdf-tests.ts similarity index 100% rename from jspdf/jspdf-tests.ts rename to types/jspdf/jspdf-tests.ts diff --git a/jspdf/tsconfig.json b/types/jspdf/tsconfig.json similarity index 100% rename from jspdf/tsconfig.json rename to types/jspdf/tsconfig.json diff --git a/jsplumb/index.d.ts b/types/jsplumb/index.d.ts similarity index 100% rename from jsplumb/index.d.ts rename to types/jsplumb/index.d.ts diff --git a/jsplumb/tsconfig.json b/types/jsplumb/tsconfig.json similarity index 100% rename from jsplumb/tsconfig.json rename to types/jsplumb/tsconfig.json diff --git a/jsrender/index.d.ts b/types/jsrender/index.d.ts similarity index 100% rename from jsrender/index.d.ts rename to types/jsrender/index.d.ts diff --git a/jsrender/jsrender-tests.ts b/types/jsrender/jsrender-tests.ts similarity index 100% rename from jsrender/jsrender-tests.ts rename to types/jsrender/jsrender-tests.ts diff --git a/jsrender/tsconfig.json b/types/jsrender/tsconfig.json similarity index 100% rename from jsrender/tsconfig.json rename to types/jsrender/tsconfig.json diff --git a/jss/index.d.ts b/types/jss/index.d.ts similarity index 100% rename from jss/index.d.ts rename to types/jss/index.d.ts diff --git a/jss/jss-tests.ts b/types/jss/jss-tests.ts similarity index 100% rename from jss/jss-tests.ts rename to types/jss/jss-tests.ts diff --git a/jss/tsconfig.json b/types/jss/tsconfig.json similarity index 100% rename from jss/tsconfig.json rename to types/jss/tsconfig.json diff --git a/jssha/index.d.ts b/types/jssha/index.d.ts similarity index 100% rename from jssha/index.d.ts rename to types/jssha/index.d.ts diff --git a/jssha/jssha-tests.ts b/types/jssha/jssha-tests.ts similarity index 100% rename from jssha/jssha-tests.ts rename to types/jssha/jssha-tests.ts diff --git a/jssha/tsconfig.json b/types/jssha/tsconfig.json similarity index 100% rename from jssha/tsconfig.json rename to types/jssha/tsconfig.json diff --git a/jstimezonedetect/index.d.ts b/types/jstimezonedetect/index.d.ts similarity index 100% rename from jstimezonedetect/index.d.ts rename to types/jstimezonedetect/index.d.ts diff --git a/jstimezonedetect/jstimezonedetect-tests.ts b/types/jstimezonedetect/jstimezonedetect-tests.ts similarity index 100% rename from jstimezonedetect/jstimezonedetect-tests.ts rename to types/jstimezonedetect/jstimezonedetect-tests.ts diff --git a/jstimezonedetect/tsconfig.json b/types/jstimezonedetect/tsconfig.json similarity index 100% rename from jstimezonedetect/tsconfig.json rename to types/jstimezonedetect/tsconfig.json diff --git a/jstorage/index.d.ts b/types/jstorage/index.d.ts similarity index 100% rename from jstorage/index.d.ts rename to types/jstorage/index.d.ts diff --git a/jstorage/jstorage-tests.ts b/types/jstorage/jstorage-tests.ts similarity index 100% rename from jstorage/jstorage-tests.ts rename to types/jstorage/jstorage-tests.ts diff --git a/jstorage/tsconfig.json b/types/jstorage/tsconfig.json similarity index 100% rename from jstorage/tsconfig.json rename to types/jstorage/tsconfig.json diff --git a/jstree/index.d.ts b/types/jstree/index.d.ts similarity index 100% rename from jstree/index.d.ts rename to types/jstree/index.d.ts diff --git a/jstree/jstree-tests.ts b/types/jstree/jstree-tests.ts similarity index 100% rename from jstree/jstree-tests.ts rename to types/jstree/jstree-tests.ts diff --git a/jstree/tsconfig.json b/types/jstree/tsconfig.json similarity index 100% rename from jstree/tsconfig.json rename to types/jstree/tsconfig.json diff --git a/jsts/index.d.ts b/types/jsts/index.d.ts similarity index 100% rename from jsts/index.d.ts rename to types/jsts/index.d.ts diff --git a/jsts/jsts-tests.ts b/types/jsts/jsts-tests.ts similarity index 100% rename from jsts/jsts-tests.ts rename to types/jsts/jsts-tests.ts diff --git a/jsts/tsconfig.json b/types/jsts/tsconfig.json similarity index 100% rename from jsts/tsconfig.json rename to types/jsts/tsconfig.json diff --git a/jsuite/index.d.ts b/types/jsuite/index.d.ts similarity index 100% rename from jsuite/index.d.ts rename to types/jsuite/index.d.ts diff --git a/jsuite/tsconfig.json b/types/jsuite/tsconfig.json similarity index 100% rename from jsuite/tsconfig.json rename to types/jsuite/tsconfig.json diff --git a/jsuri/index.d.ts b/types/jsuri/index.d.ts similarity index 100% rename from jsuri/index.d.ts rename to types/jsuri/index.d.ts diff --git a/jsuri/jsuri-tests.ts b/types/jsuri/jsuri-tests.ts similarity index 100% rename from jsuri/jsuri-tests.ts rename to types/jsuri/jsuri-tests.ts diff --git a/jsuri/tsconfig.json b/types/jsuri/tsconfig.json similarity index 100% rename from jsuri/tsconfig.json rename to types/jsuri/tsconfig.json diff --git a/jsurl/index.d.ts b/types/jsurl/index.d.ts similarity index 100% rename from jsurl/index.d.ts rename to types/jsurl/index.d.ts diff --git a/jsurl/jsurl-tests.ts b/types/jsurl/jsurl-tests.ts similarity index 100% rename from jsurl/jsurl-tests.ts rename to types/jsurl/jsurl-tests.ts diff --git a/jsurl/tsconfig.json b/types/jsurl/tsconfig.json similarity index 100% rename from jsurl/tsconfig.json rename to types/jsurl/tsconfig.json diff --git a/jsx-chai/index.d.ts b/types/jsx-chai/index.d.ts similarity index 100% rename from jsx-chai/index.d.ts rename to types/jsx-chai/index.d.ts diff --git a/jsx-chai/jsx-chai-tests.ts b/types/jsx-chai/jsx-chai-tests.ts similarity index 100% rename from jsx-chai/jsx-chai-tests.ts rename to types/jsx-chai/jsx-chai-tests.ts diff --git a/jsx-chai/tsconfig.json b/types/jsx-chai/tsconfig.json similarity index 100% rename from jsx-chai/tsconfig.json rename to types/jsx-chai/tsconfig.json diff --git a/jszip/index.d.ts b/types/jszip/index.d.ts similarity index 100% rename from jszip/index.d.ts rename to types/jszip/index.d.ts diff --git a/jszip/jszip-tests.ts b/types/jszip/jszip-tests.ts similarity index 100% rename from jszip/jszip-tests.ts rename to types/jszip/jszip-tests.ts diff --git a/jszip/tsconfig.json b/types/jszip/tsconfig.json similarity index 100% rename from jszip/tsconfig.json rename to types/jszip/tsconfig.json diff --git a/jug/index.d.ts b/types/jug/index.d.ts similarity index 100% rename from jug/index.d.ts rename to types/jug/index.d.ts diff --git a/jug/jug-tests.ts b/types/jug/jug-tests.ts similarity index 100% rename from jug/jug-tests.ts rename to types/jug/jug-tests.ts diff --git a/jug/tsconfig.json b/types/jug/tsconfig.json similarity index 100% rename from jug/tsconfig.json rename to types/jug/tsconfig.json diff --git a/jui-core/index.d.ts b/types/jui-core/index.d.ts similarity index 99% rename from jui-core/index.d.ts rename to types/jui-core/index.d.ts index 0f1184c0a3..6d15361d8e 100644 --- a/jui-core/index.d.ts +++ b/types/jui-core/index.d.ts @@ -132,7 +132,6 @@ interface UtilBase { */ typeCheck(typeName: string, value: any): boolean; - typeCheckObj(uiObj: any, list: any): void; /** @@ -318,7 +317,6 @@ interface UtilBase { inArray(target: any, list: any[]): number; - trim(text: string): string; ready: ((...args: any[]) => void); @@ -398,7 +396,6 @@ interface JuiStatic { */ add(uiIns: any): void; - /** * @method emit * Generates a custom event to an applicable component @@ -443,7 +440,6 @@ interface UICollection { } interface UICore { - tpl?: any; event?: any; @@ -543,7 +539,6 @@ interface UICore { //noinspection TypeScriptUnresolvedVariable export interface UIEvent extends UICore { - root?: any; /** @@ -809,7 +804,6 @@ interface UtilMath { matrix3d(a: T[], b: T[]): T[]; inverseMatrix3d(a: any[]): any[]; - } export interface UtilScaleOrdinal extends Function { diff --git a/jui-core/jui-core-tests.ts b/types/jui-core/jui-core-tests.ts similarity index 84% rename from jui-core/jui-core-tests.ts rename to types/jui-core/jui-core-tests.ts index c0677926e6..a5d4f23bcb 100644 --- a/jui-core/jui-core-tests.ts +++ b/types/jui-core/jui-core-tests.ts @@ -1,4 +1,4 @@ -import {jui, UtilColor, UtilBase} from "./index"; +import {jui, UtilColor, UtilBase} from "jui-core"; jui.ready(["util.color"], (color: UtilColor) => { console.log(color.rgb("#ff0000")); diff --git a/jui-core/tsconfig.json b/types/jui-core/tsconfig.json similarity index 100% rename from jui-core/tsconfig.json rename to types/jui-core/tsconfig.json diff --git a/jui-core/tslint.json b/types/jui-core/tslint.json similarity index 100% rename from jui-core/tslint.json rename to types/jui-core/tslint.json diff --git a/jui-grid/index.d.ts b/types/jui-grid/index.d.ts similarity index 99% rename from jui-grid/index.d.ts rename to types/jui-grid/index.d.ts index 0fee7cc271..31b3ca2b51 100644 --- a/jui-grid/index.d.ts +++ b/types/jui-grid/index.d.ts @@ -232,7 +232,6 @@ export interface GridTable extends UIEvent { * Determines whether to use the move function when you fire row draggable event. */ moveRow?: boolean, - }): this; root?: any; @@ -612,9 +611,7 @@ export interface GridTable extends UIEvent { } export interface GridXTable extends UIEvent { - (selector: any, options?: { - - }): this; + (selector: any, options?: {}): this; render(isTree?: boolean): void; diff --git a/jui-grid/jui-grid-tests.ts b/types/jui-grid/jui-grid-tests.ts similarity index 95% rename from jui-grid/jui-grid-tests.ts rename to types/jui-grid/jui-grid-tests.ts index 1fb65c4b97..2609e94021 100644 --- a/jui-grid/jui-grid-tests.ts +++ b/types/jui-grid/jui-grid-tests.ts @@ -1,8 +1,7 @@ /// import {jui} from 'jui-core'; -import {GridTable, GridXTable, GridRow} from "./index"; - +import {GridTable, GridXTable, GridRow} from "jui-grid"; jui.ready([ "grid.table" ], (table: GridTable) => { const table_1: GridTable = table("#table_1", { @@ -41,7 +40,7 @@ jui.ready([ "grid.table" ], (table: GridTable) => { ]); const table_3_submit: Function = (index: number) => { - var name = $(table_3.root).find(".name").val(), + const name = $(table_3.root).find(".name").val(), age = $(table_3.root).find(".age").val(), location = $(table_3.root).find(".location").val(); @@ -52,7 +51,7 @@ jui.ready([ "grid.table" ], (table: GridTable) => { }); jui.ready([ "grid.xtable" ], (xtable: GridXTable) => { - var page = 1; + let page = 1; const xtable_2: GridXTable = xtable("#xtable_2", { fields: [ "name", "age", "location" ], @@ -63,9 +62,9 @@ jui.ready([ "grid.xtable" ], (xtable: GridXTable) => { }); const xtable_2_submit: Function = () => { - var result: any[] = []; + const result: any[] = []; - for (var i = 0; i < 1000000; i++) { + for (let i = 0; i < 1000000; i++) { result.push({ name: "Alvin" + i, age: Math.floor(Math.random() * 100) + 1, location: "LA" }); } @@ -81,7 +80,6 @@ jui.ready([ "grid.xtable" ], (xtable: GridXTable) => { }; }); - jui.ready([ "grid.xtable" ], (xtable: GridXTable) => { const xtable_4: GridXTable = xtable("#xtable_4", { fields: [ "name", "age", "location" ], @@ -130,9 +128,9 @@ jui.ready([ "grid.xtable" ], (xtable: GridXTable) => { }); const xtable_6_submit: Function = () => { - var result: any[] = []; + const result: any[] = []; - for (var i = 0; i < 1000000; i++) { + for (let i = 0; i < 1000000; i++) { result.push({ name: "Alvin" + i, age: Math.floor(Math.random() * 100) + 1, location: "LA" }); } @@ -178,5 +176,4 @@ jui.ready([ "grid.xtable" ], (xtable: GridXTable) => { { index: "0.5", type: "fold", data: { url: "/sitemap.xml", count: 10 } }, { index: "0.6", type: "fold", data: { url: "/package.json", count: 5 } } ]); - }); diff --git a/jui-grid/tsconfig.json b/types/jui-grid/tsconfig.json similarity index 100% rename from jui-grid/tsconfig.json rename to types/jui-grid/tsconfig.json diff --git a/jui-grid/tslint.json b/types/jui-grid/tslint.json similarity index 100% rename from jui-grid/tslint.json rename to types/jui-grid/tslint.json diff --git a/jui/index.d.ts b/types/jui/index.d.ts similarity index 99% rename from jui/index.d.ts rename to types/jui/index.d.ts index c1dec57e39..24e5ed215c 100644 --- a/jui/index.d.ts +++ b/types/jui/index.d.ts @@ -6,7 +6,6 @@ import {UIEvent} from 'jui-core'; export interface UIAccordion extends UIEvent { - (selector: any, options?: { tpl?: any, event?: any, @@ -91,10 +90,8 @@ export interface UIColorPicker { getColor(type: string): string|{}; setColor(value: string|{}): void; - } - export interface UICombo { (selector: any, options?: { tpl?: any, @@ -201,7 +198,6 @@ export interface UICombo { reload(): void; } - export interface UIDatePicker { (selector: any, options?: { tpl?: any, @@ -399,7 +395,6 @@ export interface UIDropdown { reload(): void; } - export interface UIModal { (selector: any, options?: { tpl?: any, @@ -460,7 +455,6 @@ export interface UIModal { resize(): void; } - export interface UINotify { (selector: any, options?: { tpl?: any, @@ -611,7 +605,6 @@ export interface UIProgress { setStriped(isStriped: boolean): void; setValue(v: number): void; getValue(): number; - } export interface UIProperty { @@ -716,7 +709,6 @@ export interface UISlider { tooltip?: boolean, format?: string, progress?: boolean - }): this; /** @@ -750,10 +742,8 @@ export interface UISlider { * @return {Number} value */ getToValue(): number; - } - export interface UISplitter { (selector: any, options?: { tpl?: any, @@ -849,7 +839,6 @@ export interface UISwitch { } export interface UITab { - (selector: any, options?: { tpl?: any, event?: any, @@ -1011,7 +1000,6 @@ export interface UITooltip { * Sets the content of a tooltip (referring to the title properties in markup) */ title?: string, - }): this; /** diff --git a/jui/jui-tests.ts b/types/jui/jui-tests.ts similarity index 99% rename from jui/jui-tests.ts rename to types/jui/jui-tests.ts index 8a7a5d03f4..5cc6dd93f2 100644 --- a/jui/jui-tests.ts +++ b/types/jui/jui-tests.ts @@ -118,5 +118,4 @@ jui.ready([ }); console.log(selectInstance.getValue()); - }); diff --git a/jui/tsconfig.json b/types/jui/tsconfig.json similarity index 100% rename from jui/tsconfig.json rename to types/jui/tsconfig.json diff --git a/jui/tslint.json b/types/jui/tslint.json similarity index 100% rename from jui/tslint.json rename to types/jui/tslint.json diff --git a/types/jump.js/index.d.ts b/types/jump.js/index.d.ts new file mode 100644 index 0000000000..111c41d59a --- /dev/null +++ b/types/jump.js/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for jump.js 1.0 +// Project: https://github.com/callmecavs/jump.js +// Definitions by: rhysd +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = jump; + +declare function jump(target: string | Element | number, opts?: jump.Options): void; + +declare namespace jump { + type TransitionFunc = (t: number, b: number, c: number, d: number) => number; + interface Options { + duration?: number; + offset?: number; + callback?: () => void; + easing?: TransitionFunc; + a11y?: boolean; + } +} diff --git a/jump.js/jump.js-tests.ts b/types/jump.js/jump.js-tests.ts similarity index 100% rename from jump.js/jump.js-tests.ts rename to types/jump.js/jump.js-tests.ts diff --git a/jump.js/tsconfig.json b/types/jump.js/tsconfig.json similarity index 100% rename from jump.js/tsconfig.json rename to types/jump.js/tsconfig.json diff --git a/jump.js/tslint.json b/types/jump.js/tslint.json similarity index 100% rename from jump.js/tslint.json rename to types/jump.js/tslint.json diff --git a/jwplayer/index.d.ts b/types/jwplayer/index.d.ts similarity index 100% rename from jwplayer/index.d.ts rename to types/jwplayer/index.d.ts diff --git a/jwplayer/tsconfig.json b/types/jwplayer/tsconfig.json similarity index 100% rename from jwplayer/tsconfig.json rename to types/jwplayer/tsconfig.json diff --git a/jwt-client/index.d.ts b/types/jwt-client/index.d.ts similarity index 100% rename from jwt-client/index.d.ts rename to types/jwt-client/index.d.ts diff --git a/jwt-client/jwt-client-tests.ts b/types/jwt-client/jwt-client-tests.ts similarity index 100% rename from jwt-client/jwt-client-tests.ts rename to types/jwt-client/jwt-client-tests.ts diff --git a/jwt-client/tsconfig.json b/types/jwt-client/tsconfig.json similarity index 100% rename from jwt-client/tsconfig.json rename to types/jwt-client/tsconfig.json diff --git a/jwt-decode/index.d.ts b/types/jwt-decode/index.d.ts similarity index 100% rename from jwt-decode/index.d.ts rename to types/jwt-decode/index.d.ts diff --git a/jwt-decode/jwt-decode-tests.ts b/types/jwt-decode/jwt-decode-tests.ts similarity index 100% rename from jwt-decode/jwt-decode-tests.ts rename to types/jwt-decode/jwt-decode-tests.ts diff --git a/jwt-decode/tsconfig.json b/types/jwt-decode/tsconfig.json similarity index 100% rename from jwt-decode/tsconfig.json rename to types/jwt-decode/tsconfig.json diff --git a/jwt-simple/index.d.ts b/types/jwt-simple/index.d.ts similarity index 100% rename from jwt-simple/index.d.ts rename to types/jwt-simple/index.d.ts diff --git a/jwt-simple/jwt-simple-tests.ts b/types/jwt-simple/jwt-simple-tests.ts similarity index 100% rename from jwt-simple/jwt-simple-tests.ts rename to types/jwt-simple/jwt-simple-tests.ts diff --git a/jwt-simple/tsconfig.json b/types/jwt-simple/tsconfig.json similarity index 100% rename from jwt-simple/tsconfig.json rename to types/jwt-simple/tsconfig.json diff --git a/kafka-node/index.d.ts b/types/kafka-node/index.d.ts similarity index 90% rename from kafka-node/index.d.ts rename to types/kafka-node/index.d.ts index a9992ccc52..7523f88c6f 100644 --- a/kafka-node/index.d.ts +++ b/types/kafka-node/index.d.ts @@ -63,7 +63,7 @@ export declare class HighLevelConsumer { close(force: boolean, cb: () => any): void; } -export declare class ConsumerGroup { +export declare class ConsumerGroup extends HighLevelConsumer { constructor(options: ConsumerGroupOptions, topics: string[]); on(eventName: string, cb: (message: string) => any): void; on(eventName: string, cb: (error: any) => any): void; @@ -131,11 +131,22 @@ export interface ConsumerGroupOptions { ssl?: boolean; id: string; groupId: string; - sessionTimeout: number; - protocol: Array<"roundrobin" | "range" | CustomPartitionAssignmentProtocol>; - fromOffset: "earliest" | "latest" | "none"; - migrateHLC: false; - migrateRolling: true; + sessionTimeout?: number; + protocol?: Array<"roundrobin" | "range" | CustomPartitionAssignmentProtocol>; + fromOffset?: "earliest" | "latest" | "none"; + migrateHLC?: boolean; + migrateRolling?: boolean; + autoCommit?: boolean; + autoCommitIntervalMs?: number; + fetchMaxWaitMs?: number; + paused?: boolean; + maxNumSegments?: number; + fetchMinBytes?: number; + fetchMaxBytes?: number; + retries?: number; + retryFactor?: number; + retryMinTimeout?: number; + connectOnReady?: boolean; } export interface Topic { diff --git a/kafka-node/kafka-node-tests.ts b/types/kafka-node/kafka-node-tests.ts similarity index 100% rename from kafka-node/kafka-node-tests.ts rename to types/kafka-node/kafka-node-tests.ts diff --git a/kafka-node/tsconfig.json b/types/kafka-node/tsconfig.json similarity index 100% rename from kafka-node/tsconfig.json rename to types/kafka-node/tsconfig.json diff --git a/karma-chai-sinon/index.d.ts b/types/karma-chai-sinon/index.d.ts similarity index 100% rename from karma-chai-sinon/index.d.ts rename to types/karma-chai-sinon/index.d.ts diff --git a/karma-chai-sinon/karma-chai-sinon-tests.ts b/types/karma-chai-sinon/karma-chai-sinon-tests.ts similarity index 100% rename from karma-chai-sinon/karma-chai-sinon-tests.ts rename to types/karma-chai-sinon/karma-chai-sinon-tests.ts diff --git a/karma-chai-sinon/tsconfig.json b/types/karma-chai-sinon/tsconfig.json similarity index 100% rename from karma-chai-sinon/tsconfig.json rename to types/karma-chai-sinon/tsconfig.json diff --git a/karma-coverage/index.d.ts b/types/karma-coverage/index.d.ts similarity index 100% rename from karma-coverage/index.d.ts rename to types/karma-coverage/index.d.ts diff --git a/karma-coverage/karma-coverage-tests.ts b/types/karma-coverage/karma-coverage-tests.ts similarity index 100% rename from karma-coverage/karma-coverage-tests.ts rename to types/karma-coverage/karma-coverage-tests.ts diff --git a/karma-coverage/tsconfig.json b/types/karma-coverage/tsconfig.json similarity index 100% rename from karma-coverage/tsconfig.json rename to types/karma-coverage/tsconfig.json diff --git a/karma-fixture/index.d.ts b/types/karma-fixture/index.d.ts similarity index 100% rename from karma-fixture/index.d.ts rename to types/karma-fixture/index.d.ts diff --git a/karma-fixture/karma-fixture-tests.ts b/types/karma-fixture/karma-fixture-tests.ts similarity index 100% rename from karma-fixture/karma-fixture-tests.ts rename to types/karma-fixture/karma-fixture-tests.ts diff --git a/karma-fixture/tsconfig.json b/types/karma-fixture/tsconfig.json similarity index 100% rename from karma-fixture/tsconfig.json rename to types/karma-fixture/tsconfig.json diff --git a/karma-jasmine/index.d.ts b/types/karma-jasmine/index.d.ts similarity index 100% rename from karma-jasmine/index.d.ts rename to types/karma-jasmine/index.d.ts diff --git a/karma-jasmine/karma-jasmine-tests.ts b/types/karma-jasmine/karma-jasmine-tests.ts similarity index 100% rename from karma-jasmine/karma-jasmine-tests.ts rename to types/karma-jasmine/karma-jasmine-tests.ts diff --git a/karma-jasmine/tsconfig.json b/types/karma-jasmine/tsconfig.json similarity index 100% rename from karma-jasmine/tsconfig.json rename to types/karma-jasmine/tsconfig.json diff --git a/karma/index.d.ts b/types/karma/index.d.ts similarity index 100% rename from karma/index.d.ts rename to types/karma/index.d.ts diff --git a/karma/karma-tests.ts b/types/karma/karma-tests.ts similarity index 100% rename from karma/karma-tests.ts rename to types/karma/karma-tests.ts diff --git a/karma/tsconfig.json b/types/karma/tsconfig.json similarity index 100% rename from karma/tsconfig.json rename to types/karma/tsconfig.json diff --git a/katex/index.d.ts b/types/katex/index.d.ts similarity index 100% rename from katex/index.d.ts rename to types/katex/index.d.ts diff --git a/katex/katex-tests.ts b/types/katex/katex-tests.ts similarity index 100% rename from katex/katex-tests.ts rename to types/katex/katex-tests.ts diff --git a/katex/tsconfig.json b/types/katex/tsconfig.json similarity index 100% rename from katex/tsconfig.json rename to types/katex/tsconfig.json diff --git a/kcors/index.d.ts b/types/kcors/index.d.ts similarity index 70% rename from kcors/index.d.ts rename to types/kcors/index.d.ts index e2618f63cb..e4e9e53fa6 100644 --- a/kcors/index.d.ts +++ b/types/kcors/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for kcors 2.2 // Project: https://github.com/koajs/cors -// Definitions by: Xavier Stouder +// Definitions by: Xavier Stouder , Izayoi Ko // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import * as Koa from "koa"; @@ -10,10 +10,10 @@ export = cors; declare namespace cors { interface Options { - origin?: (req: Koa.Request) => string | string; + origin?: ((req: Koa.Request) => string) | string; allowMethods?: string[] | string; exposeHeaders?: string[] | string; - allowHeaders: string[] | string; + allowHeaders?: string[] | string; maxAge?: number | string; credentials?: boolean; keepHeadersOnError?: boolean; diff --git a/kcors/kcors-tests.ts b/types/kcors/kcors-tests.ts similarity index 100% rename from kcors/kcors-tests.ts rename to types/kcors/kcors-tests.ts diff --git a/kcors/tsconfig.json b/types/kcors/tsconfig.json similarity index 100% rename from kcors/tsconfig.json rename to types/kcors/tsconfig.json diff --git a/kcors/tslint.json b/types/kcors/tslint.json similarity index 100% rename from kcors/tslint.json rename to types/kcors/tslint.json diff --git a/kefir/index.d.ts b/types/kefir/index.d.ts similarity index 100% rename from kefir/index.d.ts rename to types/kefir/index.d.ts diff --git a/kefir/kefir-tests.ts b/types/kefir/kefir-tests.ts similarity index 100% rename from kefir/kefir-tests.ts rename to types/kefir/kefir-tests.ts diff --git a/kefir/tsconfig.json b/types/kefir/tsconfig.json similarity index 100% rename from kefir/tsconfig.json rename to types/kefir/tsconfig.json diff --git a/kendo-ui/index.d.ts b/types/kendo-ui/index.d.ts similarity index 100% rename from kendo-ui/index.d.ts rename to types/kendo-ui/index.d.ts diff --git a/kendo-ui/kendo-ui-tests.ts b/types/kendo-ui/kendo-ui-tests.ts similarity index 100% rename from kendo-ui/kendo-ui-tests.ts rename to types/kendo-ui/kendo-ui-tests.ts diff --git a/kendo-ui/tsconfig.json b/types/kendo-ui/tsconfig.json similarity index 100% rename from kendo-ui/tsconfig.json rename to types/kendo-ui/tsconfig.json diff --git a/keyboardjs/index.d.ts b/types/keyboardjs/index.d.ts similarity index 100% rename from keyboardjs/index.d.ts rename to types/keyboardjs/index.d.ts diff --git a/keyboardjs/tsconfig.json b/types/keyboardjs/tsconfig.json similarity index 100% rename from keyboardjs/tsconfig.json rename to types/keyboardjs/tsconfig.json diff --git a/keycloak-js/index.d.ts b/types/keycloak-js/index.d.ts similarity index 94% rename from keycloak-js/index.d.ts rename to types/keycloak-js/index.d.ts index 540084d6fd..9f7e817df1 100644 --- a/keycloak-js/index.d.ts +++ b/types/keycloak-js/index.d.ts @@ -14,13 +14,13 @@ export = Keycloak; declare function Keycloak(config?: string|{}): Keycloak.KeycloakInstance; declare namespace Keycloak { - export type KeycloakAdapterName = 'cordova'|'default'; - export type KeycloakOnLoad = 'login-required'|'check-sso'; - export type KeycloakResponseMode = 'query'|'fragment'; - export type KeycloakResponseType = 'code'|'id_token token'|'code id_token token'; - export type KeycloakFlow = 'standard'|'implicit'|'hybrid'; + type KeycloakAdapterName = 'cordova'|'default'; + type KeycloakOnLoad = 'login-required'|'check-sso'; + type KeycloakResponseMode = 'query'|'fragment'; + type KeycloakResponseType = 'code'|'id_token token'|'code id_token token'; + type KeycloakFlow = 'standard'|'implicit'|'hybrid'; - export interface KeycloakInitOptions { + interface KeycloakInitOptions { /** * @private Undocumented. */ @@ -81,7 +81,7 @@ declare namespace Keycloak { flow?: KeycloakFlow; } - export interface KeycloakLoginOptions { + interface KeycloakLoginOptions { /** * @private Undocumented. */ @@ -131,9 +131,9 @@ declare namespace Keycloak { locale?: string; } - export type KeycloakPromiseCallback = (result: T) => void; + type KeycloakPromiseCallback = (result: T) => void; - export interface KeycloakPromise { + interface KeycloakPromise { /** * Function to call if the promised action succeeds. */ @@ -145,12 +145,12 @@ declare namespace Keycloak { error(callback: KeycloakPromiseCallback): KeycloakPromise; } - export interface KeycloakError { + interface KeycloakError { error: string; error_description: string; } - export interface KeycloakAdapter { + interface KeycloakAdapter { login(options?: KeycloakLoginOptions): KeycloakPromise; logout(options?: any): KeycloakPromise; register(options?: KeycloakLoginOptions): KeycloakPromise; @@ -158,7 +158,7 @@ declare namespace Keycloak { redirectUri(options: { redirectUri: string; }, encodeHash: boolean): string; } - export interface KeycloakProfile { + interface KeycloakProfile { id?: string; username?: string; email?: string; @@ -176,7 +176,7 @@ declare namespace Keycloak { * A client for the Keycloak authentication server. * @see {@link https://keycloak.gitbooks.io/securing-client-applications-guide/content/topics/oidc/javascript-adapter.html|Keycloak JS adapter documentation} */ - export interface KeycloakInstance { + interface KeycloakInstance { /** * Is true if the user is authenticated, false otherwise. */ diff --git a/keycloak-js/keycloak-authz.d.ts b/types/keycloak-js/keycloak-authz.d.ts similarity index 92% rename from keycloak-js/keycloak-authz.d.ts rename to types/keycloak-js/keycloak-authz.d.ts index 4db057ad97..b15c505257 100644 --- a/keycloak-js/keycloak-authz.d.ts +++ b/types/keycloak-js/keycloak-authz.d.ts @@ -11,11 +11,11 @@ export = KeycloakAuthorization; declare function KeycloakAuthorization(keycloak: Keycloak.KeycloakInstance): KeycloakAuthorization.KeycloakAuthorizationInstance; declare namespace KeycloakAuthorization { - export interface KeycloakAuthorizationPromise { + interface KeycloakAuthorizationPromise { then(onGrant: (rpt: string) => void, onDeny: () => void, onError: () => void): void; } - export interface KeycloakAuthorizationInstance { + interface KeycloakAuthorizationInstance { rpt: any; config: { rpt_endpoint: string }; diff --git a/keycloak-js/keycloak-js-tests.ts b/types/keycloak-js/keycloak-js-tests.ts similarity index 100% rename from keycloak-js/keycloak-js-tests.ts rename to types/keycloak-js/keycloak-js-tests.ts diff --git a/keycloak-js/tsconfig.json b/types/keycloak-js/tsconfig.json similarity index 100% rename from keycloak-js/tsconfig.json rename to types/keycloak-js/tsconfig.json diff --git a/keycloak-js/tslint.json b/types/keycloak-js/tslint.json similarity index 100% rename from keycloak-js/tslint.json rename to types/keycloak-js/tslint.json diff --git a/keygrip/index.d.ts b/types/keygrip/index.d.ts similarity index 89% rename from keygrip/index.d.ts rename to types/keygrip/index.d.ts index b5929aaec6..4c858839c9 100644 --- a/keygrip/index.d.ts +++ b/types/keygrip/index.d.ts @@ -3,13 +3,13 @@ // Definitions by: jKey Lu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare interface Keygrip { +interface Keygrip { sign(data: any): string; verify(data: any, digest: string): boolean; index(data: any, digest: string): number; } -declare interface KeygripFunction { +interface KeygripFunction { new (keys: string[], algorithm?: string, encoding?: string): Keygrip; (keys: string[], algorithm?: string, encoding?: string): Keygrip; } diff --git a/keygrip/keygrip-tests.ts b/types/keygrip/keygrip-tests.ts similarity index 100% rename from keygrip/keygrip-tests.ts rename to types/keygrip/keygrip-tests.ts diff --git a/keygrip/tsconfig.json b/types/keygrip/tsconfig.json similarity index 100% rename from keygrip/tsconfig.json rename to types/keygrip/tsconfig.json diff --git a/keygrip/tslint.json b/types/keygrip/tslint.json similarity index 100% rename from keygrip/tslint.json rename to types/keygrip/tslint.json diff --git a/keymaster/index.d.ts b/types/keymaster/index.d.ts similarity index 100% rename from keymaster/index.d.ts rename to types/keymaster/index.d.ts diff --git a/keymaster/keymaster-tests.ts b/types/keymaster/keymaster-tests.ts similarity index 100% rename from keymaster/keymaster-tests.ts rename to types/keymaster/keymaster-tests.ts diff --git a/keymaster/tsconfig.json b/types/keymaster/tsconfig.json similarity index 100% rename from keymaster/tsconfig.json rename to types/keymaster/tsconfig.json diff --git a/keymirror/index.d.ts b/types/keymirror/index.d.ts similarity index 100% rename from keymirror/index.d.ts rename to types/keymirror/index.d.ts diff --git a/keymirror/keymirror-tests.ts b/types/keymirror/keymirror-tests.ts similarity index 100% rename from keymirror/keymirror-tests.ts rename to types/keymirror/keymirror-tests.ts diff --git a/keymirror/tsconfig.json b/types/keymirror/tsconfig.json similarity index 100% rename from keymirror/tsconfig.json rename to types/keymirror/tsconfig.json diff --git a/keypress/index.d.ts b/types/keypress/index.d.ts similarity index 100% rename from keypress/index.d.ts rename to types/keypress/index.d.ts diff --git a/keypress/keypress-tests.ts b/types/keypress/keypress-tests.ts similarity index 100% rename from keypress/keypress-tests.ts rename to types/keypress/keypress-tests.ts diff --git a/keypress/tsconfig.json b/types/keypress/tsconfig.json similarity index 100% rename from keypress/tsconfig.json rename to types/keypress/tsconfig.json diff --git a/keytar/index.d.ts b/types/keytar/index.d.ts similarity index 100% rename from keytar/index.d.ts rename to types/keytar/index.d.ts diff --git a/keytar/keytar-tests.ts b/types/keytar/keytar-tests.ts similarity index 100% rename from keytar/keytar-tests.ts rename to types/keytar/keytar-tests.ts diff --git a/keytar/tsconfig.json b/types/keytar/tsconfig.json similarity index 100% rename from keytar/tsconfig.json rename to types/keytar/tsconfig.json diff --git a/kii-cloud-sdk/index.d.ts b/types/kii-cloud-sdk/index.d.ts similarity index 99% rename from kii-cloud-sdk/index.d.ts rename to types/kii-cloud-sdk/index.d.ts index 8dec3a94c8..0879b355bd 100644 --- a/kii-cloud-sdk/index.d.ts +++ b/types/kii-cloud-sdk/index.d.ts @@ -15,7 +15,7 @@ declare namespace KiiCloud { KiiACLSendMessageToTopic, } - export enum KiiSite { + enum KiiSite { US, JP, CN, @@ -24,7 +24,7 @@ declare namespace KiiCloud { EU } - export enum KiiAnalyticsSite { + enum KiiAnalyticsSite { US, JP, CN, @@ -207,7 +207,7 @@ declare namespace KiiCloud { /** * The main SDK class */ - export class Kii { + class Kii { /** * Kii SDK Build Number * @@ -673,7 +673,7 @@ declare namespace KiiCloud { /** * Represents a KiiACL object */ - export class KiiACL { + class KiiACL { /** * Get the list of active ACLs associated with this object from the server * @@ -809,7 +809,7 @@ declare namespace KiiCloud { /** * Represents a KiiACLEntry object */ - export class KiiACLEntry { + class KiiACLEntry { /** * The action that is being permitted/restricted. Possible values: *

@@ -898,7 +898,7 @@ declare namespace KiiCloud { /** * The main SDK class */ - export class KiiAnalytics { + class KiiAnalytics { /** * Retrieve the current app ID * @@ -1107,7 +1107,7 @@ declare namespace KiiCloud { * * When retrieving ACL from an object, test for this class to determine the subject type. */ - export class KiiAnonymousUser { + class KiiAnonymousUser { /** * Returns the ID of Anonymous user. */ @@ -1119,7 +1119,7 @@ declare namespace KiiCloud { * * When retrieving ACL from an object, test for this class to determine the subject type. Example: */ - export class KiiAnyAuthenticatedUser { + class KiiAnyAuthenticatedUser { /** * Returns the ID of AuthenticatedUser user. */ @@ -1136,7 +1136,7 @@ declare namespace KiiCloud { * * Application administrator context. Entities obtained from this class will be manipulated by application admin. */ - export class KiiAppAdminContext { + class KiiAppAdminContext { /** * Creates a reference to a bucket operated by app admin. *

The bucket will be created/accessed within this app's scope @@ -1983,7 +1983,7 @@ declare namespace KiiCloud { /** * Represents a KiiBucket object */ - export class KiiBucket { + class KiiBucket { /** * The name of this bucket * @@ -2332,7 +2332,7 @@ declare namespace KiiCloud { /** * Represents a KiiClause expression object */ - export class KiiClause { + class KiiClause { /** * Create a KiiClause with the AND operator concatenating multiple KiiClause objects * @@ -2542,7 +2542,7 @@ declare namespace KiiCloud { /** * A Parser for error string or error object returned by SDK. */ - export class KiiErrorParser { + class KiiErrorParser { /** * Parse an error string or error object returned by SDK. * @@ -2574,7 +2574,7 @@ declare namespace KiiCloud { /** * Represents Geo Point. */ - export class KiiGeoPoint { + class KiiGeoPoint { /** * Return the latitide of this point. */ @@ -2607,7 +2607,7 @@ declare namespace KiiCloud { /** * Represents a KiiGroup object */ - export class KiiGroup { + class KiiGroup { /** * * @@ -3310,7 +3310,7 @@ declare namespace KiiCloud { /** * Represents a KiiObject object */ - export class KiiObject { + class KiiObject { /** * Get the UUID of the given object, assigned by the server * @@ -4160,7 +4160,7 @@ declare namespace KiiCloud { /** * Represents a KiiPushInstallation object */ - export class KiiPushInstallation { + class KiiPushInstallation { /** * Register the id issued by GCM to the Kii cloud for current logged in user. * @@ -4315,7 +4315,7 @@ declare namespace KiiCloud { /** * Builder of push message */ - export class KiiPushMessageBuilder { + class KiiPushMessageBuilder { /** * instantiate builder with push message data. * By default all push channels (gcm, apns, jpush, mqtt) is enabled. @@ -4591,7 +4591,7 @@ declare namespace KiiCloud { /** * Represents a KiiPushSubscription. */ - export class KiiPushSubscription { + class KiiPushSubscription { /** * Subscribe to bucket or topic. * @@ -4770,7 +4770,7 @@ declare namespace KiiCloud { /** * Represents a KiiQuery object */ - export class KiiQuery { + class KiiQuery { /** * Get the limit of the current query * @@ -4826,7 +4826,7 @@ declare namespace KiiCloud { /** * Represents a server side code entry in KiiCloud. */ - export class KiiServerCodeEntry { + class KiiServerCodeEntry { /** * Execute this server code entry.
* If argument is an empty object or not type of Object, callbacks.failure or reject callback of promise will be called.
@@ -4911,7 +4911,7 @@ declare namespace KiiCloud { /** * Represents a server side code execution result in KiiCloud. */ - export class KiiServerCodeExecResult { + class KiiServerCodeExecResult { /** * Get calculated number of executed steps. * @@ -4930,7 +4930,7 @@ declare namespace KiiCloud { /** * Represents a KiiSocialConnect object */ - export class KiiSocialConnect { + class KiiSocialConnect { /** * * @@ -5533,7 +5533,7 @@ declare namespace KiiCloud { /** * Represents a Thing object */ - export class KiiThing { + class KiiThing { /** * of this thing. * For details refer to {@link KiiThing.register} @@ -6446,7 +6446,7 @@ declare namespace KiiCloud { /** * represents a KiiThingContext object */ - export class KiiThingContext { + class KiiThingContext { /** * Creates a reference to a bucket in App scope operated by thing. * @@ -6608,7 +6608,7 @@ declare namespace KiiCloud { /** * Represents a Topic object. */ - export class KiiTopic { + class KiiTopic { /** * get name of this topic * @@ -6814,7 +6814,7 @@ declare namespace KiiCloud { /** * Represents a KiiUser object */ - export class KiiUser { + class KiiUser { /** * * @@ -8657,7 +8657,7 @@ declare namespace KiiCloud { /** * Represents a KiiUser builder */ - export class KiiUserBuilder { + class KiiUserBuilder { /** * Create a KiiUser builder with identifier. * diff --git a/kii-cloud-sdk/kii-cloud-sdk-tests.ts b/types/kii-cloud-sdk/kii-cloud-sdk-tests.ts similarity index 76% rename from kii-cloud-sdk/kii-cloud-sdk-tests.ts rename to types/kii-cloud-sdk/kii-cloud-sdk-tests.ts index 40abd1e8d4..bd25adeeb0 100644 --- a/kii-cloud-sdk/kii-cloud-sdk-tests.ts +++ b/types/kii-cloud-sdk/kii-cloud-sdk-tests.ts @@ -1,9 +1,7 @@ - - function main() { Kii.initializeWithSite("abc", "def", KiiSite.JP); - var user = KiiUser.userWithUsername("name", "password"); + const user = KiiUser.userWithUsername("name", "password"); user.register({ success(user: KiiUser) { @@ -27,18 +25,18 @@ function main() { }); user.setLocale("en"); - var locale: string = user.getLocale(); + const locale: string = user.getLocale(); - var anotherUser: KiiUser = KiiUserBuilder + const anotherUser: KiiUser = KiiUserBuilder .builderWithIdentifier("id", "password") .setEmailAddress("mail@example.org") .build(); - var bucket = Kii.bucketWithName("foo"); - var clause1 = KiiClause.lessThan("x", 1); - var clause2 = KiiClause.greaterThan("y", 1); - var clause3 = KiiClause.and(clause1, clause2); - var query = KiiQuery.queryWithClause(clause3); + const bucket = Kii.bucketWithName("foo"); + const clause1 = KiiClause.lessThan("x", 1); + const clause2 = KiiClause.greaterThan("y", 1); + const clause3 = KiiClause.and(clause1, clause2); + const query = KiiQuery.queryWithClause(clause3); bucket.executeQuery(query, { success: (query: KiiQuery, @@ -51,10 +49,10 @@ function main() { bucket.executeQuery(query) .then((params: [KiiQuery, KiiObject[], KiiQuery]) => { - var [query, results, nextQuery] = params; + const [query, results, nextQuery] = params; }); - var object = bucket.createObject(); + const object = bucket.createObject(); object.set("foo", 1); @@ -93,11 +91,11 @@ function main() { KiiThing.loadWithVendorThingID("thing ID") .then((thing) => { - var isOnline: boolean = thing.isOnline(); - var onlineStatusModifiedAt: Date = thing.getOnlineStatusModifiedAt(); + const isOnline: boolean = thing.isOnline(); + const onlineStatusModifiedAt: Date = thing.getOnlineStatusModifiedAt(); }); - var error = KiiErrorParser.parse(""); + const error = KiiErrorParser.parse(""); error.code.toLowerCase(); } diff --git a/kii-cloud-sdk/tsconfig.json b/types/kii-cloud-sdk/tsconfig.json similarity index 100% rename from kii-cloud-sdk/tsconfig.json rename to types/kii-cloud-sdk/tsconfig.json diff --git a/kii-cloud-sdk/tslint.json b/types/kii-cloud-sdk/tslint.json similarity index 100% rename from kii-cloud-sdk/tslint.json rename to types/kii-cloud-sdk/tslint.json diff --git a/kik-browser/index.d.ts b/types/kik-browser/index.d.ts similarity index 100% rename from kik-browser/index.d.ts rename to types/kik-browser/index.d.ts diff --git a/kik-browser/kik-browser-tests.ts b/types/kik-browser/kik-browser-tests.ts similarity index 100% rename from kik-browser/kik-browser-tests.ts rename to types/kik-browser/kik-browser-tests.ts diff --git a/kik-browser/tsconfig.json b/types/kik-browser/tsconfig.json similarity index 100% rename from kik-browser/tsconfig.json rename to types/kik-browser/tsconfig.json diff --git a/kineticjs/index.d.ts b/types/kineticjs/index.d.ts similarity index 100% rename from kineticjs/index.d.ts rename to types/kineticjs/index.d.ts diff --git a/kineticjs/kineticjs-tests.ts b/types/kineticjs/kineticjs-tests.ts similarity index 100% rename from kineticjs/kineticjs-tests.ts rename to types/kineticjs/kineticjs-tests.ts diff --git a/kineticjs/tsconfig.json b/types/kineticjs/tsconfig.json similarity index 100% rename from kineticjs/tsconfig.json rename to types/kineticjs/tsconfig.json diff --git a/klaw-sync/index.d.ts b/types/klaw-sync/index.d.ts similarity index 100% rename from klaw-sync/index.d.ts rename to types/klaw-sync/index.d.ts diff --git a/klaw-sync/klaw-sync-tests.ts b/types/klaw-sync/klaw-sync-tests.ts similarity index 100% rename from klaw-sync/klaw-sync-tests.ts rename to types/klaw-sync/klaw-sync-tests.ts diff --git a/klaw-sync/tsconfig.json b/types/klaw-sync/tsconfig.json similarity index 100% rename from klaw-sync/tsconfig.json rename to types/klaw-sync/tsconfig.json diff --git a/klaw-sync/tslint.json b/types/klaw-sync/tslint.json similarity index 100% rename from klaw-sync/tslint.json rename to types/klaw-sync/tslint.json diff --git a/klaw/index.d.ts b/types/klaw/index.d.ts similarity index 100% rename from klaw/index.d.ts rename to types/klaw/index.d.ts diff --git a/klaw/klaw-tests.ts b/types/klaw/klaw-tests.ts similarity index 100% rename from klaw/klaw-tests.ts rename to types/klaw/klaw-tests.ts diff --git a/klaw/tsconfig.json b/types/klaw/tsconfig.json similarity index 100% rename from klaw/tsconfig.json rename to types/klaw/tsconfig.json diff --git a/knex/index.d.ts b/types/knex/index.d.ts similarity index 99% rename from knex/index.d.ts rename to types/knex/index.d.ts index 15ff365756..ec5fecf95a 100644 --- a/knex/index.d.ts +++ b/types/knex/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/tgriesser/knex // Definitions by: Qubo , Baronfel // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.2 /// /// diff --git a/knex/knex-tests.ts b/types/knex/knex-tests.ts similarity index 100% rename from knex/knex-tests.ts rename to types/knex/knex-tests.ts diff --git a/knex/tsconfig.json b/types/knex/tsconfig.json similarity index 100% rename from knex/tsconfig.json rename to types/knex/tsconfig.json diff --git a/knockback/index.d.ts b/types/knockback/index.d.ts similarity index 100% rename from knockback/index.d.ts rename to types/knockback/index.d.ts diff --git a/knockback/tsconfig.json b/types/knockback/tsconfig.json similarity index 100% rename from knockback/tsconfig.json rename to types/knockback/tsconfig.json diff --git a/knockout-amd-helpers/index.d.ts b/types/knockout-amd-helpers/index.d.ts similarity index 100% rename from knockout-amd-helpers/index.d.ts rename to types/knockout-amd-helpers/index.d.ts diff --git a/knockout-amd-helpers/knockout-amd-helpers-tests.ts b/types/knockout-amd-helpers/knockout-amd-helpers-tests.ts similarity index 100% rename from knockout-amd-helpers/knockout-amd-helpers-tests.ts rename to types/knockout-amd-helpers/knockout-amd-helpers-tests.ts diff --git a/knockout-amd-helpers/tsconfig.json b/types/knockout-amd-helpers/tsconfig.json similarity index 100% rename from knockout-amd-helpers/tsconfig.json rename to types/knockout-amd-helpers/tsconfig.json diff --git a/knockout-paging/index.d.ts b/types/knockout-paging/index.d.ts similarity index 100% rename from knockout-paging/index.d.ts rename to types/knockout-paging/index.d.ts diff --git a/knockout-paging/knockout-paging-tests.ts b/types/knockout-paging/knockout-paging-tests.ts similarity index 100% rename from knockout-paging/knockout-paging-tests.ts rename to types/knockout-paging/knockout-paging-tests.ts diff --git a/knockout-paging/tsconfig.json b/types/knockout-paging/tsconfig.json similarity index 100% rename from knockout-paging/tsconfig.json rename to types/knockout-paging/tsconfig.json diff --git a/knockout-pre-rendered/index.d.ts b/types/knockout-pre-rendered/index.d.ts similarity index 100% rename from knockout-pre-rendered/index.d.ts rename to types/knockout-pre-rendered/index.d.ts diff --git a/knockout-pre-rendered/knockout-pre-rendered-tests.ts b/types/knockout-pre-rendered/knockout-pre-rendered-tests.ts similarity index 100% rename from knockout-pre-rendered/knockout-pre-rendered-tests.ts rename to types/knockout-pre-rendered/knockout-pre-rendered-tests.ts diff --git a/knockout-pre-rendered/tsconfig.json b/types/knockout-pre-rendered/tsconfig.json similarity index 100% rename from knockout-pre-rendered/tsconfig.json rename to types/knockout-pre-rendered/tsconfig.json diff --git a/knockout-secure-binding/index.d.ts b/types/knockout-secure-binding/index.d.ts similarity index 100% rename from knockout-secure-binding/index.d.ts rename to types/knockout-secure-binding/index.d.ts diff --git a/knockout-secure-binding/knockout-secure-binding-tests.ts b/types/knockout-secure-binding/knockout-secure-binding-tests.ts similarity index 100% rename from knockout-secure-binding/knockout-secure-binding-tests.ts rename to types/knockout-secure-binding/knockout-secure-binding-tests.ts diff --git a/knockout-secure-binding/tsconfig.json b/types/knockout-secure-binding/tsconfig.json similarity index 100% rename from knockout-secure-binding/tsconfig.json rename to types/knockout-secure-binding/tsconfig.json diff --git a/knockout-transformations/index.d.ts b/types/knockout-transformations/index.d.ts similarity index 100% rename from knockout-transformations/index.d.ts rename to types/knockout-transformations/index.d.ts diff --git a/knockout-transformations/knockout-transformations-tests.ts b/types/knockout-transformations/knockout-transformations-tests.ts similarity index 100% rename from knockout-transformations/knockout-transformations-tests.ts rename to types/knockout-transformations/knockout-transformations-tests.ts diff --git a/knockout-transformations/tsconfig.json b/types/knockout-transformations/tsconfig.json similarity index 100% rename from knockout-transformations/tsconfig.json rename to types/knockout-transformations/tsconfig.json diff --git a/knockout.deferred.updates/index.d.ts b/types/knockout.deferred.updates/index.d.ts similarity index 100% rename from knockout.deferred.updates/index.d.ts rename to types/knockout.deferred.updates/index.d.ts diff --git a/knockout.deferred.updates/knockout.deferred.updates-tests.ts b/types/knockout.deferred.updates/knockout.deferred.updates-tests.ts similarity index 100% rename from knockout.deferred.updates/knockout.deferred.updates-tests.ts rename to types/knockout.deferred.updates/knockout.deferred.updates-tests.ts diff --git a/knockout.deferred.updates/tsconfig.json b/types/knockout.deferred.updates/tsconfig.json similarity index 100% rename from knockout.deferred.updates/tsconfig.json rename to types/knockout.deferred.updates/tsconfig.json diff --git a/knockout.editables/index.d.ts b/types/knockout.editables/index.d.ts similarity index 100% rename from knockout.editables/index.d.ts rename to types/knockout.editables/index.d.ts diff --git a/knockout.editables/tsconfig.json b/types/knockout.editables/tsconfig.json similarity index 100% rename from knockout.editables/tsconfig.json rename to types/knockout.editables/tsconfig.json diff --git a/knockout.es5/index.d.ts b/types/knockout.es5/index.d.ts similarity index 100% rename from knockout.es5/index.d.ts rename to types/knockout.es5/index.d.ts diff --git a/knockout.es5/knockout.es5-tests.ts b/types/knockout.es5/knockout.es5-tests.ts similarity index 100% rename from knockout.es5/knockout.es5-tests.ts rename to types/knockout.es5/knockout.es5-tests.ts diff --git a/knockout.es5/tsconfig.json b/types/knockout.es5/tsconfig.json similarity index 100% rename from knockout.es5/tsconfig.json rename to types/knockout.es5/tsconfig.json diff --git a/knockout.kogrid/index.d.ts b/types/knockout.kogrid/index.d.ts similarity index 100% rename from knockout.kogrid/index.d.ts rename to types/knockout.kogrid/index.d.ts diff --git a/knockout.kogrid/knockout.kogrid-tests.ts b/types/knockout.kogrid/knockout.kogrid-tests.ts similarity index 100% rename from knockout.kogrid/knockout.kogrid-tests.ts rename to types/knockout.kogrid/knockout.kogrid-tests.ts diff --git a/knockout.kogrid/tsconfig.json b/types/knockout.kogrid/tsconfig.json similarity index 100% rename from knockout.kogrid/tsconfig.json rename to types/knockout.kogrid/tsconfig.json diff --git a/knockout.mapper/index.d.ts b/types/knockout.mapper/index.d.ts similarity index 100% rename from knockout.mapper/index.d.ts rename to types/knockout.mapper/index.d.ts diff --git a/knockout.mapper/tsconfig.json b/types/knockout.mapper/tsconfig.json similarity index 100% rename from knockout.mapper/tsconfig.json rename to types/knockout.mapper/tsconfig.json diff --git a/knockout.mapping/index.d.ts b/types/knockout.mapping/index.d.ts similarity index 100% rename from knockout.mapping/index.d.ts rename to types/knockout.mapping/index.d.ts diff --git a/knockout.mapping/knockout.mapping-tests.ts b/types/knockout.mapping/knockout.mapping-tests.ts similarity index 100% rename from knockout.mapping/knockout.mapping-tests.ts rename to types/knockout.mapping/knockout.mapping-tests.ts diff --git a/knockout.mapping/tsconfig.json b/types/knockout.mapping/tsconfig.json similarity index 100% rename from knockout.mapping/tsconfig.json rename to types/knockout.mapping/tsconfig.json diff --git a/knockout.postbox/index.d.ts b/types/knockout.postbox/index.d.ts similarity index 100% rename from knockout.postbox/index.d.ts rename to types/knockout.postbox/index.d.ts diff --git a/knockout.postbox/tsconfig.json b/types/knockout.postbox/tsconfig.json similarity index 100% rename from knockout.postbox/tsconfig.json rename to types/knockout.postbox/tsconfig.json diff --git a/knockout.projections/index.d.ts b/types/knockout.projections/index.d.ts similarity index 100% rename from knockout.projections/index.d.ts rename to types/knockout.projections/index.d.ts diff --git a/knockout.projections/knockout.projections-tests.ts b/types/knockout.projections/knockout.projections-tests.ts similarity index 100% rename from knockout.projections/knockout.projections-tests.ts rename to types/knockout.projections/knockout.projections-tests.ts diff --git a/knockout.projections/tsconfig.json b/types/knockout.projections/tsconfig.json similarity index 100% rename from knockout.projections/tsconfig.json rename to types/knockout.projections/tsconfig.json diff --git a/knockout.punches/index.d.ts b/types/knockout.punches/index.d.ts similarity index 100% rename from knockout.punches/index.d.ts rename to types/knockout.punches/index.d.ts diff --git a/knockout.punches/knockout.punches-tests.ts b/types/knockout.punches/knockout.punches-tests.ts similarity index 100% rename from knockout.punches/knockout.punches-tests.ts rename to types/knockout.punches/knockout.punches-tests.ts diff --git a/knockout.punches/tsconfig.json b/types/knockout.punches/tsconfig.json similarity index 100% rename from knockout.punches/tsconfig.json rename to types/knockout.punches/tsconfig.json diff --git a/knockout.rx/index.d.ts b/types/knockout.rx/index.d.ts similarity index 100% rename from knockout.rx/index.d.ts rename to types/knockout.rx/index.d.ts diff --git a/knockout.rx/knockout.rx-tests.ts b/types/knockout.rx/knockout.rx-tests.ts similarity index 100% rename from knockout.rx/knockout.rx-tests.ts rename to types/knockout.rx/knockout.rx-tests.ts diff --git a/knockout.rx/tsconfig.json b/types/knockout.rx/tsconfig.json similarity index 100% rename from knockout.rx/tsconfig.json rename to types/knockout.rx/tsconfig.json diff --git a/knockout.validation/index.d.ts b/types/knockout.validation/index.d.ts similarity index 100% rename from knockout.validation/index.d.ts rename to types/knockout.validation/index.d.ts diff --git a/knockout.validation/tsconfig.json b/types/knockout.validation/tsconfig.json similarity index 100% rename from knockout.validation/tsconfig.json rename to types/knockout.validation/tsconfig.json diff --git a/knockout.viewmodel/index.d.ts b/types/knockout.viewmodel/index.d.ts similarity index 100% rename from knockout.viewmodel/index.d.ts rename to types/knockout.viewmodel/index.d.ts diff --git a/knockout.viewmodel/tsconfig.json b/types/knockout.viewmodel/tsconfig.json similarity index 100% rename from knockout.viewmodel/tsconfig.json rename to types/knockout.viewmodel/tsconfig.json diff --git a/knockout/index.d.ts b/types/knockout/index.d.ts similarity index 100% rename from knockout/index.d.ts rename to types/knockout/index.d.ts diff --git a/knockout/test/index.ts b/types/knockout/test/index.ts similarity index 100% rename from knockout/test/index.ts rename to types/knockout/test/index.ts diff --git a/knockout/test/templatingBehaviors.ts b/types/knockout/test/templatingBehaviors.ts similarity index 100% rename from knockout/test/templatingBehaviors.ts rename to types/knockout/test/templatingBehaviors.ts diff --git a/knockout/tsconfig.json b/types/knockout/tsconfig.json similarity index 100% rename from knockout/tsconfig.json rename to types/knockout/tsconfig.json diff --git a/knockstrap/index.d.ts b/types/knockstrap/index.d.ts similarity index 100% rename from knockstrap/index.d.ts rename to types/knockstrap/index.d.ts diff --git a/knockstrap/knockstrap-tests.ts b/types/knockstrap/knockstrap-tests.ts similarity index 100% rename from knockstrap/knockstrap-tests.ts rename to types/knockstrap/knockstrap-tests.ts diff --git a/knockstrap/tsconfig.json b/types/knockstrap/tsconfig.json similarity index 100% rename from knockstrap/tsconfig.json rename to types/knockstrap/tsconfig.json diff --git a/knuddels-userapps-api/index.d.ts b/types/knuddels-userapps-api/index.d.ts similarity index 98% rename from knuddels-userapps-api/index.d.ts rename to types/knuddels-userapps-api/index.d.ts index 52183f832f..98eb30e054 100644 --- a/knuddels-userapps-api/index.d.ts +++ b/types/knuddels-userapps-api/index.d.ts @@ -7,21 +7,25 @@ interface Json { [x: string]: string | number | boolean | Date | Json | JsonArray; } +// tslint:disable-next-line no-empty-interface interface JsonArray extends Array { } // serializable objects (for persistence) type KnuddelsSerializable = string | number | boolean | User | BotUser; interface KnuddelsJson { [x: string]: string | number | boolean | Date | KnuddelsJson | KnuddelsJsonArray | KnuddelsSerializable; } +// tslint:disable-next-line no-empty-interface interface KnuddelsJsonArray extends Array { } // "data" that may be send between apps and between server and client type KnuddelsEvent = string | Json | KnuddelsEventArray; +// tslint:disable-next-line no-empty-interface interface KnuddelsEventArray extends Array { } + /** * App ist die abstrakte Klasse einer konkreten App, die ein Entwickler schreiben kann. * Im eigenen Javascript-Code muss eine Variable mit dem Namen App vorhanden sein, damit eine App lauffähig ist. */ -declare interface App { +interface App { /** * Dieses Methode wird aufgerufen, sobald ein Nutzer versucht den Channel zu betreten. * Die App kann nun entscheiden, ob der Nutzer den Channel betreten darf. @@ -533,9 +537,15 @@ declare class BotUser extends User { * Hat ein Channelbesitzer eine gewisse Menge Schulden angesammelt, so schalten wir alle Apps in diesem Channel ab. *
Es können nur Knuddel transferiert werden zu Nutzern mit UserType.Human. */ - transferKnuddel(receivingUserOrAccount: (User|KnuddelAccount), knuddelAmount: KnuddelAmount, - parameters?: { displayReasonText?: string; transferDisplayType?: KnuddelTransferDisplayType; - onSuccess?: () => void; onError?: (message: string) => void; }): void; + transferKnuddel( + receivingUserOrAccount: User | KnuddelAccount, + knuddelAmount: KnuddelAmount, + parameters?: { + displayReasonText?: string; + transferDisplayType?: KnuddelTransferDisplayType; + onSuccess?: () => void; + onError?: (message: string) => void; + }): void; } /** @@ -869,8 +879,8 @@ declare class Client { /** * Klasse, mit der clientseitige Farbobjekte erstellt werden können. */ -declare module Client { - export class Color { +declare namespace Client { + class Color { /** * Erzeugt ein Color-Objekt mit RGB-Werten. */ @@ -901,8 +911,8 @@ declare module Client { /** * Klasse, die es ermöglicht ein Event via Client/dispatchEvent:method zu versenden. */ -declare module Client { - export class Event { +declare namespace Client { + class Event { /** * Erzeugt ein Event. */ @@ -913,8 +923,8 @@ declare module Client { /** * Klasse, die es ermöglicht den Inhalte zu steuern, die im Bereich liegen, der das HTML User Interface hostet. */ -declare module Client { - export class HostFrame { +declare namespace Client { + class HostFrame { /** * Setzt den Titel der Seite im gezoomten Modus (nur Android). */ @@ -1960,7 +1970,7 @@ declare class SingleDiceResult { /** * Diese Dokumentation beschreibt, welche Erweiterungen am serverseitigen String-Objekt vorgenommen wurden. */ -declare interface String { +interface String { /** * Die Methode liefert den String zurück, auf dem sie aufgerufen wurde mit KCode escaped. */ @@ -2454,8 +2464,9 @@ declare class UserAccess { * Loopt über alle zugreifbaren User sortiert nach Registrierzeitpunkt und * führt für jeden User das übergebene Callback aus. */ - eachAccessibleUser(callback: (user: User, index: number, accessibleUserCount: number, key?: string) => boolean, - parameters?: { onStart?: (accessibleUserCount: number, key?: string) => void; + eachAccessibleUser( + callback: (user: User, index: number, accessibleUserCount: number, key?: string) => boolean, + parameters?: { onStart?: (accessibleUserCount: number, key?: string) => void; onEnd?: (accessibleUserCount: number, key?: string) => void; }): void; } @@ -2570,9 +2581,17 @@ declare class UserPersistenceNumbers { * Ruft eine Funktion für alle Nutzer auf, die einen bestimmten key in der UserPersistence gesetzt haben. * Hierbei greifen die übergebenen Filter. */ - static each(key: string, callback: { user: User; value: number; index: number; totalCount: number; key: string; }, - parameters?: { ascending?: boolean; minimumValue?: number; maximumValue?: number; maximumCount?: number; - onStart?: (totalCount: number, key: string) => void; onEnd?: (totalCount: number, key: string) => void; }): void; + static each( + key: string, + callback: { user: User; value: number; index: number; totalCount: number; key: string; }, + parameters?: { + ascending?: boolean; + minimumValue?: number; + maximumValue?: number; + maximumCount?: number; + onStart?: (totalCount: number, key: string) => void; + onEnd?: (totalCount: number, key: string) => void; + }): void; /** * Liefert alle keys, die für User in der Persistence * gespeichert wurden. @@ -2689,4 +2708,3 @@ declare class VideoChannelData { */ getStreamingVideoUsers(): User[]; } - diff --git a/knuddels-userapps-api/knuddels-userapps-api-tests.ts b/types/knuddels-userapps-api/knuddels-userapps-api-tests.ts similarity index 84% rename from knuddels-userapps-api/knuddels-userapps-api-tests.ts rename to types/knuddels-userapps-api/knuddels-userapps-api-tests.ts index a940b7f19b..dadd8b93b6 100644 --- a/knuddels-userapps-api/knuddels-userapps-api-tests.ts +++ b/types/knuddels-userapps-api/knuddels-userapps-api-tests.ts @@ -1,5 +1,4 @@ class Server implements App { - private usersPlaying: { [nick: string]: number } = {}; private isShuttingDown: boolean = false; @@ -10,7 +9,7 @@ class Server implements App { KnuddelsServer.getChannel() .getOnlineUsers(UserType.Human) .forEach((user) => { - this.onUserJoined(user) + this.onUserJoined(user); }); }; @@ -22,7 +21,7 @@ class Server implements App { }; onUserLeft(user: User) { - if (this.usersPlaying[user.getNick()] == 1) { + if (this.usersPlaying[user.getNick()] === 1) { KnuddelsServer.getDefaultBotUser() .transferKnuddel(user, new KnuddelAmount(1), 'Du hast den Channel verlassen.'); @@ -34,7 +33,7 @@ class Server implements App { if (!this.isShuttingDown) { this.isShuttingDown = true; - for (let key in this.usersPlaying) { + for (const key in this.usersPlaying) { const userId = KnuddelsServer.getUserAccess() .getUserId(key); const user = KnuddelsServer.getUserAccess() @@ -58,14 +57,13 @@ class Server implements App { if (!sender.canSendAppContent(this.appContent)) { knuddelTransfer.reject('Sorry, mit diesem Gerät kannst du gerade nicht spielen.'); } else if (sender.isChannelOwner() && knuddelTransfer.getKnuddelAmount() - .asNumber() != 1) { + .asNumber() !== 1) { knuddelTransfer.accept(); } else if (this.isShuttingDown) { knuddelTransfer.reject('Du App nimmt gerade keine neuen Spieler an.'); } else if (this.usersPlaying[sender.getNick()]) { knuddelTransfer.reject('Du spielst bereits.'); - } else if (knuddelTransfer.getKnuddelAmount() - .asNumber() != 1) { + } else if (knuddelTransfer.getKnuddelAmount().asNumber() !== 1) { const botNick = KnuddelsServer.getDefaultBotUser() .getNick() .escapeKCode(); @@ -76,7 +74,7 @@ class Server implements App { }; onKnuddelReceived(user: User, receiver: User, knuddelAmount: KnuddelAmount) { - if (knuddelAmount.asNumber() == 1) { + if (knuddelAmount.asNumber() === 1) { this.usersPlaying[user.getNick()] = 1; user.sendAppContent(this.appContent); } else { @@ -85,27 +83,23 @@ class Server implements App { }; onEventReceived(user: User, key: string, data: string) { - if (key == 'selectedEntry' && this.usersPlaying[user.getNick()] == 1) { + if (key === 'selectedEntry' && this.usersPlaying[user.getNick()] === 1) { this.usersPlaying[user.getNick()] = 2; setTimeout(() => { - - let doorNumber = parseInt(data[data.length - 1], 10); - - let winningDoorNumber = RandomOperations.nextInt(0, 2) + 1; - - let hasWon = winningDoorNumber == doorNumber; - - let text = hasWon + const doorNumber = parseInt(data[data.length - 1], 10); + const winningDoorNumber = RandomOperations.nextInt(0, 2) + 1; + const hasWon = winningDoorNumber === doorNumber; + const text = hasWon ? 'Richtig getippt' : 'Knapp daneben'; user.getAppContentSession(AppViewMode.Overlay) .getAppContent() .sendEvent('openDoor', { - 'door': doorNumber, - 'winningDoor': winningDoorNumber, - 'text': text, + door: doorNumber, + winningDoor: winningDoorNumber, + text, }); if (hasWon) { @@ -127,7 +121,6 @@ class Server implements App { }, 1500); } }; - } declare let App: Server; // tell the compiler that "App" will be available diff --git a/knuddels-userapps-api/tsconfig.json b/types/knuddels-userapps-api/tsconfig.json similarity index 100% rename from knuddels-userapps-api/tsconfig.json rename to types/knuddels-userapps-api/tsconfig.json diff --git a/knuddels-userapps-api/tslint.json b/types/knuddels-userapps-api/tslint.json similarity index 100% rename from knuddels-userapps-api/tslint.json rename to types/knuddels-userapps-api/tslint.json diff --git a/ko.plus/index.d.ts b/types/ko.plus/index.d.ts similarity index 100% rename from ko.plus/index.d.ts rename to types/ko.plus/index.d.ts diff --git a/ko.plus/ko.plus-tests.ts b/types/ko.plus/ko.plus-tests.ts similarity index 100% rename from ko.plus/ko.plus-tests.ts rename to types/ko.plus/ko.plus-tests.ts diff --git a/ko.plus/tsconfig.json b/types/ko.plus/tsconfig.json similarity index 100% rename from ko.plus/tsconfig.json rename to types/ko.plus/tsconfig.json diff --git a/koa-basic-auth/index.d.ts b/types/koa-basic-auth/index.d.ts similarity index 99% rename from koa-basic-auth/index.d.ts rename to types/koa-basic-auth/index.d.ts index 2cbf888606..0fff3bb731 100644 --- a/koa-basic-auth/index.d.ts +++ b/types/koa-basic-auth/index.d.ts @@ -6,11 +6,8 @@ import * as Koa from "koa"; declare function auth(opts: { - name: string; - pass: string; - }): Koa.Middleware; export = auth; diff --git a/koa-basic-auth/koa-basic-auth-tests.ts b/types/koa-basic-auth/koa-basic-auth-tests.ts similarity index 100% rename from koa-basic-auth/koa-basic-auth-tests.ts rename to types/koa-basic-auth/koa-basic-auth-tests.ts diff --git a/koa-basic-auth/tsconfig.json b/types/koa-basic-auth/tsconfig.json similarity index 100% rename from koa-basic-auth/tsconfig.json rename to types/koa-basic-auth/tsconfig.json diff --git a/koa-basic-auth/tslint.json b/types/koa-basic-auth/tslint.json similarity index 100% rename from koa-basic-auth/tslint.json rename to types/koa-basic-auth/tslint.json diff --git a/koa-bodyparser/index.d.ts b/types/koa-bodyparser/index.d.ts similarity index 100% rename from koa-bodyparser/index.d.ts rename to types/koa-bodyparser/index.d.ts diff --git a/koa-bodyparser/koa-bodyparser-tests.ts b/types/koa-bodyparser/koa-bodyparser-tests.ts similarity index 100% rename from koa-bodyparser/koa-bodyparser-tests.ts rename to types/koa-bodyparser/koa-bodyparser-tests.ts diff --git a/koa-bodyparser/tsconfig.json b/types/koa-bodyparser/tsconfig.json similarity index 100% rename from koa-bodyparser/tsconfig.json rename to types/koa-bodyparser/tsconfig.json diff --git a/types/koa-cache-control/index.d.ts b/types/koa-cache-control/index.d.ts new file mode 100644 index 0000000000..19329fcfec --- /dev/null +++ b/types/koa-cache-control/index.d.ts @@ -0,0 +1,23 @@ +// Type definitions for koa-cache-control 2.0 +// Project: https://github.com/DaMouse404/koa-cache-control +// Definitions by: Peter Safranek +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as Koa from "koa"; + +declare function cacheControl(options?: { + private?: boolean; + public?: boolean; + noStore?: boolean; + noCache?: boolean; + noTransform?: boolean; + mustRevalidate?: boolean; + staleIfError?: number; + staleWhileRevalidate?: number; + maxAge?: number; + sMaxAge?: number; +}): Koa.Middleware; + +declare namespace cacheControl {} + +export = cacheControl; diff --git a/types/koa-cache-control/koa-cache-control-tests.ts b/types/koa-cache-control/koa-cache-control-tests.ts new file mode 100644 index 0000000000..c99f4fe862 --- /dev/null +++ b/types/koa-cache-control/koa-cache-control-tests.ts @@ -0,0 +1,19 @@ +import * as Koa from "koa"; +import * as cacheControl from "koa-cache-control"; + +const app = new Koa(); + +app.use(cacheControl()); +app.use(cacheControl({})); +app.use(cacheControl({ + private: true, + public: true, + noStore: true, + noCache: true, + noTransform: true, + mustRevalidate: true, + staleIfError: 0, + staleWhileRevalidate: 0, + maxAge: 0, + sMaxAge: 0, +})); diff --git a/types/koa-cache-control/tsconfig.json b/types/koa-cache-control/tsconfig.json new file mode 100644 index 0000000000..ae4aea7b85 --- /dev/null +++ b/types/koa-cache-control/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "koa-cache-control-tests.ts" + ] +} diff --git a/types/koa-cache-control/tslint.json b/types/koa-cache-control/tslint.json new file mode 100644 index 0000000000..eb88e553a5 --- /dev/null +++ b/types/koa-cache-control/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "../tslint.json", + + "noImplicitAny": "true", + "noImplicitThis": "true", + "strictNullChecks": "true" +} diff --git a/koa-compose/index.d.ts b/types/koa-compose/index.d.ts similarity index 82% rename from koa-compose/index.d.ts rename to types/koa-compose/index.d.ts index 6e466b9d28..a1037f187c 100644 --- a/koa-compose/index.d.ts +++ b/types/koa-compose/index.d.ts @@ -8,7 +8,7 @@ declare function compose(middleware: Array>): compose.C declare namespace compose { type Middleware = (context: T, next: () => Promise) => any; - type ComposedMiddleware = (context: T, next?: Middleware) => Promise; + type ComposedMiddleware = (context: T, next?: () => Promise) => Promise; } export = compose; diff --git a/types/koa-compose/koa-compose-tests.ts b/types/koa-compose/koa-compose-tests.ts new file mode 100644 index 0000000000..cb7b78b397 --- /dev/null +++ b/types/koa-compose/koa-compose-tests.ts @@ -0,0 +1,15 @@ + +import compose = require('koa-compose'); + +var fn1: compose.Middleware = (context: any, next: () => Promise): Promise => + Promise + .resolve(console.log('in fn1')) + .then(() => next()); + +var fn2: compose.Middleware = (context: any, next: () => Promise): Promise => + Promise + .resolve(console.log('in fn2')) + .then(() => next()); + + +var fn = compose([fn1, fn2]); \ No newline at end of file diff --git a/koa-compose/tsconfig.json b/types/koa-compose/tsconfig.json similarity index 100% rename from koa-compose/tsconfig.json rename to types/koa-compose/tsconfig.json diff --git a/massive/tslint.json b/types/koa-compose/tslint.json similarity index 100% rename from massive/tslint.json rename to types/koa-compose/tslint.json diff --git a/koa-compress/index.d.ts b/types/koa-compress/index.d.ts similarity index 100% rename from koa-compress/index.d.ts rename to types/koa-compress/index.d.ts diff --git a/koa-compress/koa-compress-tests.ts b/types/koa-compress/koa-compress-tests.ts similarity index 100% rename from koa-compress/koa-compress-tests.ts rename to types/koa-compress/koa-compress-tests.ts diff --git a/koa-compress/tsconfig.json b/types/koa-compress/tsconfig.json similarity index 100% rename from koa-compress/tsconfig.json rename to types/koa-compress/tsconfig.json diff --git a/koa-favicon/index.d.ts b/types/koa-favicon/index.d.ts similarity index 100% rename from koa-favicon/index.d.ts rename to types/koa-favicon/index.d.ts diff --git a/koa-favicon/koa-favicon-tests.ts b/types/koa-favicon/koa-favicon-tests.ts similarity index 100% rename from koa-favicon/koa-favicon-tests.ts rename to types/koa-favicon/koa-favicon-tests.ts diff --git a/koa-favicon/tsconfig.json b/types/koa-favicon/tsconfig.json similarity index 100% rename from koa-favicon/tsconfig.json rename to types/koa-favicon/tsconfig.json diff --git a/koa-hbs/index.d.ts b/types/koa-hbs/index.d.ts similarity index 100% rename from koa-hbs/index.d.ts rename to types/koa-hbs/index.d.ts diff --git a/koa-hbs/koa-hbs-tests.ts b/types/koa-hbs/koa-hbs-tests.ts similarity index 100% rename from koa-hbs/koa-hbs-tests.ts rename to types/koa-hbs/koa-hbs-tests.ts diff --git a/koa-hbs/tsconfig.json b/types/koa-hbs/tsconfig.json similarity index 100% rename from koa-hbs/tsconfig.json rename to types/koa-hbs/tsconfig.json diff --git a/koa-json-error/index.d.ts b/types/koa-json-error/index.d.ts similarity index 100% rename from koa-json-error/index.d.ts rename to types/koa-json-error/index.d.ts diff --git a/koa-json-error/koa-json-error-tests.ts b/types/koa-json-error/koa-json-error-tests.ts similarity index 96% rename from koa-json-error/koa-json-error-tests.ts rename to types/koa-json-error/koa-json-error-tests.ts index 77a13a1f64..31779f7bd9 100644 --- a/koa-json-error/koa-json-error-tests.ts +++ b/types/koa-json-error/koa-json-error-tests.ts @@ -5,4 +5,4 @@ const app = new Koa(); app.use(error({ preFormat: err => Object.assign({}, err) -})); \ No newline at end of file +})); diff --git a/koa-json-error/tsconfig.json b/types/koa-json-error/tsconfig.json similarity index 100% rename from koa-json-error/tsconfig.json rename to types/koa-json-error/tsconfig.json diff --git a/koa-json-error/tslint.json b/types/koa-json-error/tslint.json similarity index 100% rename from koa-json-error/tslint.json rename to types/koa-json-error/tslint.json diff --git a/koa-json/index.d.ts b/types/koa-json/index.d.ts similarity index 100% rename from koa-json/index.d.ts rename to types/koa-json/index.d.ts diff --git a/koa-json/koa-json-tests.ts b/types/koa-json/koa-json-tests.ts similarity index 100% rename from koa-json/koa-json-tests.ts rename to types/koa-json/koa-json-tests.ts diff --git a/koa-json/tsconfig.json b/types/koa-json/tsconfig.json similarity index 100% rename from koa-json/tsconfig.json rename to types/koa-json/tsconfig.json diff --git a/koa-jwt/index.d.ts b/types/koa-jwt/index.d.ts similarity index 94% rename from koa-jwt/index.d.ts rename to types/koa-jwt/index.d.ts index e2a4435aef..ba60bd8e61 100644 --- a/koa-jwt/index.d.ts +++ b/types/koa-jwt/index.d.ts @@ -10,7 +10,7 @@ export = jwt; declare function jwt(options: jwt.Options): Koa.Middleware; declare namespace jwt { - export interface Options { + interface Options { secret: string | Buffer; key?: string; getToken?: (opts: jwt.Options) => string; diff --git a/koa-jwt/koa-jwt-tests.ts b/types/koa-jwt/koa-jwt-tests.ts similarity index 88% rename from koa-jwt/koa-jwt-tests.ts rename to types/koa-jwt/koa-jwt-tests.ts index 793bf50872..88bd75e739 100644 --- a/koa-jwt/koa-jwt-tests.ts +++ b/types/koa-jwt/koa-jwt-tests.ts @@ -1,7 +1,7 @@ import koa = require('koa'); import jwt = require('koa-jwt'); -var app = new koa(); +const app = new koa(); app.use(jwt({ secret: 'some-secret-key' diff --git a/koa-jwt/tsconfig.json b/types/koa-jwt/tsconfig.json similarity index 100% rename from koa-jwt/tsconfig.json rename to types/koa-jwt/tsconfig.json diff --git a/koa-jwt/tslint.json b/types/koa-jwt/tslint.json similarity index 100% rename from koa-jwt/tslint.json rename to types/koa-jwt/tslint.json diff --git a/koa-logger/index.d.ts b/types/koa-logger/index.d.ts similarity index 100% rename from koa-logger/index.d.ts rename to types/koa-logger/index.d.ts diff --git a/koa-logger/koa-logger-tests.ts b/types/koa-logger/koa-logger-tests.ts similarity index 100% rename from koa-logger/koa-logger-tests.ts rename to types/koa-logger/koa-logger-tests.ts diff --git a/koa-logger/tsconfig.json b/types/koa-logger/tsconfig.json similarity index 100% rename from koa-logger/tsconfig.json rename to types/koa-logger/tsconfig.json diff --git a/koa-mount/index.d.ts b/types/koa-mount/index.d.ts similarity index 100% rename from koa-mount/index.d.ts rename to types/koa-mount/index.d.ts diff --git a/koa-mount/koa-mount-tests.ts b/types/koa-mount/koa-mount-tests.ts similarity index 100% rename from koa-mount/koa-mount-tests.ts rename to types/koa-mount/koa-mount-tests.ts diff --git a/koa-mount/tsconfig.json b/types/koa-mount/tsconfig.json similarity index 100% rename from koa-mount/tsconfig.json rename to types/koa-mount/tsconfig.json diff --git a/koa-passport/index.d.ts b/types/koa-passport/index.d.ts similarity index 100% rename from koa-passport/index.d.ts rename to types/koa-passport/index.d.ts diff --git a/koa-passport/koa-passport-tests.ts b/types/koa-passport/koa-passport-tests.ts similarity index 100% rename from koa-passport/koa-passport-tests.ts rename to types/koa-passport/koa-passport-tests.ts diff --git a/koa-passport/tsconfig.json b/types/koa-passport/tsconfig.json similarity index 100% rename from koa-passport/tsconfig.json rename to types/koa-passport/tsconfig.json diff --git a/koa-pug/index.d.ts b/types/koa-pug/index.d.ts similarity index 86% rename from koa-pug/index.d.ts rename to types/koa-pug/index.d.ts index 836d7c88fe..f478072953 100644 --- a/koa-pug/index.d.ts +++ b/types/koa-pug/index.d.ts @@ -5,19 +5,16 @@ import * as koa from "koa"; - export = Pug; - /** main module */ declare class Pug { constructor(options?: Pug.PugOptions); use(app: koa): void; } - declare namespace Pug { - export interface PugOptions { + interface PugOptions { viewPath?: string; pretty?: boolean; compileDebug?: boolean; @@ -28,14 +25,12 @@ declare namespace Pug { basedir?: string; app?: koa; } - export interface PugCtxOptions extends PugOptions { + interface PugCtxOptions extends PugOptions { fromString: boolean; } - export interface PugLocals { [str: string]: any; } + interface PugLocals { [str: string]: any; } } - - /** plugin */ declare module 'koa' { interface Context { diff --git a/koa-pug/koa-pug-tests.ts b/types/koa-pug/koa-pug-tests.ts similarity index 100% rename from koa-pug/koa-pug-tests.ts rename to types/koa-pug/koa-pug-tests.ts diff --git a/koa-pug/tsconfig.json b/types/koa-pug/tsconfig.json similarity index 100% rename from koa-pug/tsconfig.json rename to types/koa-pug/tsconfig.json diff --git a/types/koa-pug/tslint.json b/types/koa-pug/tslint.json new file mode 100644 index 0000000000..d3631e8907 --- /dev/null +++ b/types/koa-pug/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "../tslint.json", + "rules": { + "no-useless-files": false + } +} diff --git a/koa-router/index.d.ts b/types/koa-router/index.d.ts similarity index 97% rename from koa-router/index.d.ts rename to types/koa-router/index.d.ts index 8d78591165..f93c983bb0 100644 --- a/koa-router/index.d.ts +++ b/types/koa-router/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for koa-router v7.x // Project: https://github.com/alexmingoia/koa-router/ -// Definitions by: Jerry Chin +// Definitions by: Jerry Chin , Pavel Ivanov // Definitions: https://github.com/hellopao/DefinitelyTyped /* =================== USAGE =================== @@ -13,6 +13,12 @@ import * as Koa from "koa"; +declare module "koa" { + interface Context { + params: any; + } +} + declare module Layer { export interface ILayerOptions { diff --git a/koa-router/koa-router-tests.ts b/types/koa-router/koa-router-tests.ts similarity index 100% rename from koa-router/koa-router-tests.ts rename to types/koa-router/koa-router-tests.ts diff --git a/koa-router/tsconfig.json b/types/koa-router/tsconfig.json similarity index 100% rename from koa-router/tsconfig.json rename to types/koa-router/tsconfig.json diff --git a/koa-send/index.d.ts b/types/koa-send/index.d.ts similarity index 100% rename from koa-send/index.d.ts rename to types/koa-send/index.d.ts diff --git a/koa-send/koa-send-tests.ts b/types/koa-send/koa-send-tests.ts similarity index 100% rename from koa-send/koa-send-tests.ts rename to types/koa-send/koa-send-tests.ts diff --git a/koa-send/tsconfig.json b/types/koa-send/tsconfig.json similarity index 100% rename from koa-send/tsconfig.json rename to types/koa-send/tsconfig.json diff --git a/koa-session-minimal/index.d.ts b/types/koa-session-minimal/index.d.ts similarity index 100% rename from koa-session-minimal/index.d.ts rename to types/koa-session-minimal/index.d.ts diff --git a/koa-session-minimal/koa-session-minimal-tests.ts b/types/koa-session-minimal/koa-session-minimal-tests.ts similarity index 100% rename from koa-session-minimal/koa-session-minimal-tests.ts rename to types/koa-session-minimal/koa-session-minimal-tests.ts diff --git a/koa-session-minimal/tsconfig.json b/types/koa-session-minimal/tsconfig.json similarity index 100% rename from koa-session-minimal/tsconfig.json rename to types/koa-session-minimal/tsconfig.json diff --git a/koa-static/index.d.ts b/types/koa-static/index.d.ts similarity index 100% rename from koa-static/index.d.ts rename to types/koa-static/index.d.ts diff --git a/koa-static/koa-static-tests.ts b/types/koa-static/koa-static-tests.ts similarity index 100% rename from koa-static/koa-static-tests.ts rename to types/koa-static/koa-static-tests.ts diff --git a/koa-static/tsconfig.json b/types/koa-static/tsconfig.json similarity index 100% rename from koa-static/tsconfig.json rename to types/koa-static/tsconfig.json diff --git a/koa/index.d.ts b/types/koa/index.d.ts similarity index 100% rename from koa/index.d.ts rename to types/koa/index.d.ts diff --git a/koa/koa-tests.ts b/types/koa/koa-tests.ts similarity index 100% rename from koa/koa-tests.ts rename to types/koa/koa-tests.ts diff --git a/koa/tsconfig.json b/types/koa/tsconfig.json similarity index 100% rename from koa/tsconfig.json rename to types/koa/tsconfig.json diff --git a/kolite/index.d.ts b/types/kolite/index.d.ts similarity index 100% rename from kolite/index.d.ts rename to types/kolite/index.d.ts diff --git a/kolite/knockout.activity.d.ts b/types/kolite/knockout.activity.d.ts similarity index 100% rename from kolite/knockout.activity.d.ts rename to types/kolite/knockout.activity.d.ts diff --git a/kolite/knockout.command.d.ts b/types/kolite/knockout.command.d.ts similarity index 100% rename from kolite/knockout.command.d.ts rename to types/kolite/knockout.command.d.ts diff --git a/kolite/knockout.dirtyFlag.d.ts b/types/kolite/knockout.dirtyFlag.d.ts similarity index 100% rename from kolite/knockout.dirtyFlag.d.ts rename to types/kolite/knockout.dirtyFlag.d.ts diff --git a/kolite/kolite-tests.ts b/types/kolite/kolite-tests.ts similarity index 100% rename from kolite/kolite-tests.ts rename to types/kolite/kolite-tests.ts diff --git a/kolite/tsconfig.json b/types/kolite/tsconfig.json similarity index 100% rename from kolite/tsconfig.json rename to types/kolite/tsconfig.json diff --git a/konami.js/index.d.ts b/types/konami.js/index.d.ts similarity index 100% rename from konami.js/index.d.ts rename to types/konami.js/index.d.ts diff --git a/konami.js/konami.js-tests.ts b/types/konami.js/konami.js-tests.ts similarity index 100% rename from konami.js/konami.js-tests.ts rename to types/konami.js/konami.js-tests.ts diff --git a/konami.js/tsconfig.json b/types/konami.js/tsconfig.json similarity index 100% rename from konami.js/tsconfig.json rename to types/konami.js/tsconfig.json diff --git a/kramed/index.d.ts b/types/kramed/index.d.ts similarity index 99% rename from kramed/index.d.ts rename to types/kramed/index.d.ts index 41984f9dc5..c7cc41b7e6 100644 --- a/kramed/index.d.ts +++ b/types/kramed/index.d.ts @@ -157,4 +157,4 @@ export interface KramedOptions { smartypants?: boolean; } -export declare var kramed: KramedStatic; \ No newline at end of file +export const kramed: KramedStatic; diff --git a/types/kramed/kramed-tests.ts b/types/kramed/kramed-tests.ts new file mode 100644 index 0000000000..2ec7ea833b --- /dev/null +++ b/types/kramed/kramed-tests.ts @@ -0,0 +1,40 @@ +import { KramedOptions, kramed, KramedParser, KramedStatic, KramedRenderer } from 'kramed'; + +const options: KramedOptions = { + gfm: true, + tables: true, + breaks: false, + pedantic: false, + sanitize: true, + smartLists: true, + silent: false, + highlight(code: string, lang: string) { + return ''; + }, + langPrefix: 'lang-', + smartypants: false, + renderer: new kramed.Renderer() +}; + +function callback() { + 'callback called'; +} + +kramed.setOptions(options); + +kramed('i am using __kramdown__.'); +kramed('i am using __kramdown__.', options); +kramed('i am using __kramdown__.', callback); +kramed('i am using __kramdown__.', options, callback); + +kramed.parse('i am using __kramdown__.'); +kramed.parse('i am using __kramdown__.', options); +kramed.parse('i am using __kramdown__.', callback); +kramed.parse('i am using __kramdown__.', options, callback); + +const text = 'something'; +const tokens = kramed.lexer(text, options); +kramed.parser(tokens); + +const renderer = new kramed.Renderer(); +renderer.heading = (text, level, raw) => text + level.toString() + raw; diff --git a/kramed/tsconfig.json b/types/kramed/tsconfig.json similarity index 89% rename from kramed/tsconfig.json rename to types/kramed/tsconfig.json index 50f51102f7..dec874decf 100644 --- a/kramed/tsconfig.json +++ b/types/kramed/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/koa-pug/tslint.json b/types/kramed/tslint.json similarity index 100% rename from koa-pug/tslint.json rename to types/kramed/tslint.json diff --git a/kue/index.d.ts b/types/kue/index.d.ts similarity index 100% rename from kue/index.d.ts rename to types/kue/index.d.ts diff --git a/kue/kue-tests.ts b/types/kue/kue-tests.ts similarity index 100% rename from kue/kue-tests.ts rename to types/kue/kue-tests.ts diff --git a/kue/tsconfig.json b/types/kue/tsconfig.json similarity index 100% rename from kue/tsconfig.json rename to types/kue/tsconfig.json diff --git a/kuromoji/index.d.ts b/types/kuromoji/index.d.ts similarity index 100% rename from kuromoji/index.d.ts rename to types/kuromoji/index.d.ts diff --git a/kuromoji/kuromoji-tests.ts b/types/kuromoji/kuromoji-tests.ts similarity index 100% rename from kuromoji/kuromoji-tests.ts rename to types/kuromoji/kuromoji-tests.ts diff --git a/kuromoji/tsconfig.json b/types/kuromoji/tsconfig.json similarity index 100% rename from kuromoji/tsconfig.json rename to types/kuromoji/tsconfig.json diff --git a/lab/index.d.ts b/types/lab/index.d.ts similarity index 100% rename from lab/index.d.ts rename to types/lab/index.d.ts diff --git a/lab/lab-tests.ts b/types/lab/lab-tests.ts similarity index 100% rename from lab/lab-tests.ts rename to types/lab/lab-tests.ts diff --git a/lab/tsconfig.json b/types/lab/tsconfig.json similarity index 100% rename from lab/tsconfig.json rename to types/lab/tsconfig.json diff --git a/ladda/index.d.ts b/types/ladda/index.d.ts similarity index 100% rename from ladda/index.d.ts rename to types/ladda/index.d.ts diff --git a/ladda/ladda-tests.ts b/types/ladda/ladda-tests.ts similarity index 100% rename from ladda/ladda-tests.ts rename to types/ladda/ladda-tests.ts diff --git a/ladda/tsconfig.json b/types/ladda/tsconfig.json similarity index 100% rename from ladda/tsconfig.json rename to types/ladda/tsconfig.json diff --git a/later/index.d.ts b/types/later/index.d.ts similarity index 100% rename from later/index.d.ts rename to types/later/index.d.ts diff --git a/later/later-tests.ts b/types/later/later-tests.ts similarity index 100% rename from later/later-tests.ts rename to types/later/later-tests.ts diff --git a/later/tsconfig.json b/types/later/tsconfig.json similarity index 100% rename from later/tsconfig.json rename to types/later/tsconfig.json diff --git a/kramed/tslint.json b/types/later/tslint.json similarity index 100% rename from kramed/tslint.json rename to types/later/tslint.json diff --git a/latinize/index.d.ts b/types/latinize/index.d.ts similarity index 100% rename from latinize/index.d.ts rename to types/latinize/index.d.ts diff --git a/latinize/latinize-tests.ts b/types/latinize/latinize-tests.ts similarity index 100% rename from latinize/latinize-tests.ts rename to types/latinize/latinize-tests.ts diff --git a/latinize/tsconfig.json b/types/latinize/tsconfig.json similarity index 100% rename from latinize/tsconfig.json rename to types/latinize/tsconfig.json diff --git a/launchpad/index.d.ts b/types/launchpad/index.d.ts similarity index 100% rename from launchpad/index.d.ts rename to types/launchpad/index.d.ts diff --git a/launchpad/launchpad-tests.ts b/types/launchpad/launchpad-tests.ts similarity index 100% rename from launchpad/launchpad-tests.ts rename to types/launchpad/launchpad-tests.ts diff --git a/launchpad/tsconfig.json b/types/launchpad/tsconfig.json similarity index 100% rename from launchpad/tsconfig.json rename to types/launchpad/tsconfig.json diff --git a/lazy.js/index.d.ts b/types/lazy.js/index.d.ts similarity index 100% rename from lazy.js/index.d.ts rename to types/lazy.js/index.d.ts diff --git a/lazy.js/lazy.js-tests.ts b/types/lazy.js/lazy.js-tests.ts similarity index 100% rename from lazy.js/lazy.js-tests.ts rename to types/lazy.js/lazy.js-tests.ts diff --git a/lazy.js/tsconfig.json b/types/lazy.js/tsconfig.json similarity index 100% rename from lazy.js/tsconfig.json rename to types/lazy.js/tsconfig.json diff --git a/lazypipe/index.d.ts b/types/lazypipe/index.d.ts similarity index 100% rename from lazypipe/index.d.ts rename to types/lazypipe/index.d.ts diff --git a/lazypipe/lazypipe-tests.ts b/types/lazypipe/lazypipe-tests.ts similarity index 100% rename from lazypipe/lazypipe-tests.ts rename to types/lazypipe/lazypipe-tests.ts diff --git a/lazypipe/tsconfig.json b/types/lazypipe/tsconfig.json similarity index 100% rename from lazypipe/tsconfig.json rename to types/lazypipe/tsconfig.json diff --git a/ldapjs/index.d.ts b/types/ldapjs/index.d.ts similarity index 100% rename from ldapjs/index.d.ts rename to types/ldapjs/index.d.ts diff --git a/ldapjs/ldapjs-tests.ts b/types/ldapjs/ldapjs-tests.ts similarity index 100% rename from ldapjs/ldapjs-tests.ts rename to types/ldapjs/ldapjs-tests.ts diff --git a/ldapjs/tsconfig.json b/types/ldapjs/tsconfig.json similarity index 100% rename from ldapjs/tsconfig.json rename to types/ldapjs/tsconfig.json diff --git a/ldclient-js/index.d.ts b/types/ldclient-js/index.d.ts similarity index 100% rename from ldclient-js/index.d.ts rename to types/ldclient-js/index.d.ts diff --git a/ldclient-js/ldclient-js-tests.ts b/types/ldclient-js/ldclient-js-tests.ts similarity index 100% rename from ldclient-js/ldclient-js-tests.ts rename to types/ldclient-js/ldclient-js-tests.ts diff --git a/ldclient-js/tsconfig.json b/types/ldclient-js/tsconfig.json similarity index 100% rename from ldclient-js/tsconfig.json rename to types/ldclient-js/tsconfig.json diff --git a/leadfoot/index.d.ts b/types/leadfoot/index.d.ts similarity index 100% rename from leadfoot/index.d.ts rename to types/leadfoot/index.d.ts diff --git a/leadfoot/leadfoot-tests.ts b/types/leadfoot/leadfoot-tests.ts similarity index 100% rename from leadfoot/leadfoot-tests.ts rename to types/leadfoot/leadfoot-tests.ts diff --git a/leadfoot/tsconfig.json b/types/leadfoot/tsconfig.json similarity index 100% rename from leadfoot/tsconfig.json rename to types/leadfoot/tsconfig.json diff --git a/leaflet-curve/index.d.ts b/types/leaflet-curve/index.d.ts similarity index 100% rename from leaflet-curve/index.d.ts rename to types/leaflet-curve/index.d.ts diff --git a/leaflet-curve/leaflet-curve-tests.ts b/types/leaflet-curve/leaflet-curve-tests.ts similarity index 100% rename from leaflet-curve/leaflet-curve-tests.ts rename to types/leaflet-curve/leaflet-curve-tests.ts diff --git a/leaflet-curve/package.json b/types/leaflet-curve/package.json similarity index 100% rename from leaflet-curve/package.json rename to types/leaflet-curve/package.json diff --git a/leaflet-curve/tsconfig.json b/types/leaflet-curve/tsconfig.json similarity index 100% rename from leaflet-curve/tsconfig.json rename to types/leaflet-curve/tsconfig.json diff --git a/leaflet-draw/index.d.ts b/types/leaflet-draw/index.d.ts similarity index 81% rename from leaflet-draw/index.d.ts rename to types/leaflet-draw/index.d.ts index 3e2963f18b..300c97b80f 100644 --- a/leaflet-draw/index.d.ts +++ b/types/leaflet-draw/index.d.ts @@ -6,14 +6,12 @@ /// declare namespace L { - export interface MapOptions { + interface MapOptions { drawControl?: boolean; } namespace Control { - - export interface DrawConstructorOptions { - + interface DrawConstructorOptions { /** * The initial position of the control (one of the map corners). * @@ -34,11 +32,9 @@ declare namespace L { * Default value: false */ edit: EditOptions; - } - export interface DrawOptions { - + interface DrawOptions { /** * Polyline draw handler options. Set to false to disable handler. * @@ -75,8 +71,7 @@ declare namespace L { marker?: DrawOptions.MarkerOptions; } - export interface EditOptions { - + interface EditOptions { /** * This is the FeatureGroup that stores all editable shapes. * THIS IS REQUIRED FOR THE EDIT TOOLBAR TO WORK @@ -100,21 +95,17 @@ declare namespace L { remove?: DrawOptions.DeleteHandlerOptions; } - export interface Draw extends Control { + interface Draw extends Control { setDrawingOptions(options: DrawOptions): void; } - export class Draw { + class Draw { constructor(options?: DrawConstructorOptions); } - } - namespace DrawOptions { - - export interface PolylineOptions { - + interface PolylineOptions { /** * Determines if line segments can cross. * @@ -165,8 +156,7 @@ declare namespace L { repeatMode?: boolean; } - export interface PolygonOptions extends PolylineOptions { - + interface PolygonOptions extends PolylineOptions { /** * Show the area of the drawn polygon in m², ha or km². * The area is only approximate and become less accurate the larger the polygon is. @@ -176,8 +166,7 @@ declare namespace L { showArea?: boolean; } - export interface RectangleOptions { - + interface RectangleOptions { /** * The options used when drawing the rectangle on the map. * @@ -193,8 +182,7 @@ declare namespace L { repeatMode?: boolean; } - export interface CircleOptions { - + interface CircleOptions { /** * The options used when drawing the circle on the map. * @@ -210,8 +198,7 @@ declare namespace L { repeatMode?: boolean; } - export interface MarkerOptions { - + interface MarkerOptions { /** * TThe icon displayed when drawing a marker. * @@ -234,7 +221,7 @@ declare namespace L { repeatMode?: boolean; } - export interface EditHandlerOptions { + interface EditHandlerOptions { /** * The path options for how the layers will look while in edit mode. * If this is set to null the editable path options will not be set. @@ -244,37 +231,30 @@ declare namespace L { selectedPathOptions?: L.PathOptions; } - export interface DeleteHandlerOptions { + interface DeleteHandlerOptions { } - } namespace Draw { - namespace Event { - - export const CREATED: string; - export const EDITED: string; - export const DELETED: string; - export const DRAWSTART: string; - export const DRAWSTOP: string; - export const DRAWVERTEX: string; - export const EDITSTART: string; - export const EDITMOVE: string; - export const EDITRESIZE: string; - export const EDITVERTEX: string; - export const EDITSTOP: string; - export const DELETESTART: string; - export const DELETESTOP: string; - + const CREATED: string; + const EDITED: string; + const DELETED: string; + const DRAWSTART: string; + const DRAWSTOP: string; + const DRAWVERTEX: string; + const EDITSTART: string; + const EDITMOVE: string; + const EDITRESIZE: string; + const EDITVERTEX: string; + const EDITSTOP: string; + const DELETESTART: string; + const DELETESTOP: string; } - } namespace DrawEvents { - - export interface Created { - + interface Created { /** * Layer that was just created. */ @@ -286,8 +266,7 @@ declare namespace L { layerType: string; } - export interface Edited { - + interface Edited { /** * List of all layers just edited on the map. */ @@ -297,52 +276,49 @@ declare namespace L { /** * Triggered when layers have been removed (and saved) from the FeatureGroup. */ - export interface Deleted { - + interface Deleted { /** * List of all layers just removed from the map. */ layers: LayerGroup; } - export interface DrawStart { - + interface DrawStart { /** * The type of layer this is. One of: polyline, polygon, rectangle, circle, marker */ layerType: string; } - export interface DrawStop { - + interface DrawStop { /** * The type of layer this is. One of: polyline, polygon, rectangle, circle, marker */ layerType: string; } - export interface EditStart { + interface EditStart { /** * The type of edit this is. One of: edit */ handler: string; } - export interface EditStop { + interface EditStop { /** * The type of edit this is. One of: edit */ handler: string; } - export interface DeleteStart { + interface DeleteStart { /** * The type of edit this is. One of: remove */ handler: string; } - export interface DeleteStop { + interface DeleteStop { /** * The type of edit this is. One of: remove */ @@ -351,15 +327,14 @@ declare namespace L { } namespace GeometryUtil { - /** * Returns the area of a polygon drawn with leaflet.draw */ - export function geodesicArea(coordinates: L.LatLngLiteral[]): number; + function geodesicArea(coordinates: L.LatLngLiteral[]): number; /** * Returns a readable area string in yards or metric */ - export function readableArea(area: number, isMetric: boolean): string; + function readableArea(area: number, isMetric: boolean): string; } } diff --git a/leaflet-draw/leaflet-draw-tests.ts b/types/leaflet-draw/leaflet-draw-tests.ts similarity index 84% rename from leaflet-draw/leaflet-draw-tests.ts rename to types/leaflet-draw/leaflet-draw-tests.ts index 8ad6e2a804..9729747851 100644 --- a/leaflet-draw/leaflet-draw-tests.ts +++ b/types/leaflet-draw/leaflet-draw-tests.ts @@ -1,12 +1,12 @@ -var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', +const osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', osmAttrib = '© OpenStreetMap contributors', osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}), map = L.map('map', {layers: [osm], center: L.latLng(-37.7772, 175.2756), zoom: 15 }); -var drawnItems = L.featureGroup(); +const drawnItems = L.featureGroup(); map.addLayer(drawnItems); -var drawControl = new L.Control.Draw({ +const drawControl = new L.Control.Draw({ position: 'topleft' , draw: { polygon: { @@ -36,8 +36,8 @@ var drawControl = new L.Control.Draw({ map.addControl(drawControl); map.on('draw:created', (e: any) => { - var drawEvent = (e as L.DrawEvents.Created); - var type = drawEvent.layerType, + const drawEvent = e as L.DrawEvents.Created; + const type = drawEvent.layerType, layer = drawEvent.layer; drawnItems.addLayer(layer); diff --git a/leaflet-draw/tsconfig.json b/types/leaflet-draw/tsconfig.json similarity index 100% rename from leaflet-draw/tsconfig.json rename to types/leaflet-draw/tsconfig.json diff --git a/leaflet-draw/tslint.json b/types/leaflet-draw/tslint.json similarity index 100% rename from leaflet-draw/tslint.json rename to types/leaflet-draw/tslint.json diff --git a/leaflet-editable/index.d.ts b/types/leaflet-editable/index.d.ts similarity index 100% rename from leaflet-editable/index.d.ts rename to types/leaflet-editable/index.d.ts diff --git a/leaflet-editable/leaflet-editable-tests.ts b/types/leaflet-editable/leaflet-editable-tests.ts similarity index 100% rename from leaflet-editable/leaflet-editable-tests.ts rename to types/leaflet-editable/leaflet-editable-tests.ts diff --git a/leaflet-editable/package.json b/types/leaflet-editable/package.json similarity index 100% rename from leaflet-editable/package.json rename to types/leaflet-editable/package.json diff --git a/leaflet-editable/tsconfig.json b/types/leaflet-editable/tsconfig.json similarity index 100% rename from leaflet-editable/tsconfig.json rename to types/leaflet-editable/tsconfig.json diff --git a/leaflet-geocoder-mapzen/index.d.ts b/types/leaflet-geocoder-mapzen/index.d.ts similarity index 100% rename from leaflet-geocoder-mapzen/index.d.ts rename to types/leaflet-geocoder-mapzen/index.d.ts diff --git a/leaflet-geocoder-mapzen/leaflet-geocoder-mapzen-tests.ts b/types/leaflet-geocoder-mapzen/leaflet-geocoder-mapzen-tests.ts similarity index 100% rename from leaflet-geocoder-mapzen/leaflet-geocoder-mapzen-tests.ts rename to types/leaflet-geocoder-mapzen/leaflet-geocoder-mapzen-tests.ts diff --git a/leaflet-geocoder-mapzen/package.json b/types/leaflet-geocoder-mapzen/package.json similarity index 100% rename from leaflet-geocoder-mapzen/package.json rename to types/leaflet-geocoder-mapzen/package.json diff --git a/leaflet-geocoder-mapzen/tsconfig.json b/types/leaflet-geocoder-mapzen/tsconfig.json similarity index 100% rename from leaflet-geocoder-mapzen/tsconfig.json rename to types/leaflet-geocoder-mapzen/tsconfig.json diff --git a/types/leaflet-imageoverlay-rotated/index.d.ts b/types/leaflet-imageoverlay-rotated/index.d.ts new file mode 100644 index 0000000000..a60a1d4b37 --- /dev/null +++ b/types/leaflet-imageoverlay-rotated/index.d.ts @@ -0,0 +1,26 @@ +// Type definitions for leaflet-imageoverlay-rotated 0.1 +// Project: https://github.com/IvanSanchez/Leaflet.ImageOverlay.Rotated +// Definitions by: Thomas Kleinke +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace L { + namespace ImageOverlay { + interface Rotated extends L.ImageOverlay { + reposition( + topleft: L.LatLngExpression, + topright: L.LatLngExpression, + bottomleft: L.LatLngExpression): void; + } + } + + namespace imageOverlay { + function rotated( + imgSrc: string | HTMLImageElement | HTMLCanvasElement, + topleft: L.LatLngExpression, + topright: L.LatLngExpression, + bottomleft: L.LatLngExpression, + options?: L.ImageOverlayOptions): L.ImageOverlay.Rotated; + } +} diff --git a/types/leaflet-imageoverlay-rotated/leaflet-imageoverlay-rotated-tests.ts b/types/leaflet-imageoverlay-rotated/leaflet-imageoverlay-rotated-tests.ts new file mode 100644 index 0000000000..50db445f79 --- /dev/null +++ b/types/leaflet-imageoverlay-rotated/leaflet-imageoverlay-rotated-tests.ts @@ -0,0 +1,10 @@ +const topleft = L.latLng(40.52256691873593, -3.7743186950683594); +const topright = L.latLng(40.5210255066156, -3.7734764814376835); +const bottomleft = L.latLng(40.52180437272552, -3.7768453359603886); + +const overlay = L.imageOverlay.rotated("image.jpg", topleft, topright, bottomleft, { + opacity: 0.5, + interactive: true +}); + +overlay.reposition(topleft, topright, bottomleft); diff --git a/leaflet-imageoverlay-rotated/tsconfig.json b/types/leaflet-imageoverlay-rotated/tsconfig.json similarity index 100% rename from leaflet-imageoverlay-rotated/tsconfig.json rename to types/leaflet-imageoverlay-rotated/tsconfig.json diff --git a/later/tslint.json b/types/leaflet-imageoverlay-rotated/tslint.json similarity index 100% rename from later/tslint.json rename to types/leaflet-imageoverlay-rotated/tslint.json diff --git a/leaflet-label/index.d.ts b/types/leaflet-label/index.d.ts similarity index 98% rename from leaflet-label/index.d.ts rename to types/leaflet-label/index.d.ts index 879f456e2d..da3fafd1a1 100644 --- a/leaflet-label/index.d.ts +++ b/types/leaflet-label/index.d.ts @@ -68,7 +68,7 @@ declare global { new(options?: LabelOptions): Label; } - var Label: LabelStatic; + const Label: LabelStatic; interface Label extends IEventPowered

Hello Html

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

Hello World

', null, () => { + console.log('Success!!'); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // writeRtf + fin.desktop.System.Clipboard.writeRtf('Hello World!', null, () => { + console.log('Success!!'); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // writeText + fin.desktop.System.Clipboard.writeText('Hello World', null, () => { + console.log('Success!!'); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); +} + +function test_window() { + let finWindow: fin.OpenFinWindow; + // constructor + finWindow = new fin.desktop.Window({ + name: "childWindow", + url: "child.html", + defaultWidth: 320, + defaultHeight: 320, + defaultTop: 10, + defaultLeft: 300, + frame: false, + resizable: false, + state: "normal" + }, function () { + var _win = finWindow.getNativeWindow(); + _win.addEventListener("DOMContentLoaded", function () { finWindow.show(); }); + }, function (error) { + console.log("Error creating window:", error); + }); + // getCurrent + finWindow = fin.desktop.Window.getCurrent(); + // getNativeWindow + let nativeWindow: Window; + nativeWindow = finWindow.getNativeWindow(); + // getParentApplication + let parentApp: fin.OpenFinApplication; + parentApp = finWindow.getParentApplication(); + // getParentWindow + let parentFinWindow: fin.OpenFinWindow; + parentFinWindow = finWindow.getParentWindow(); + // wrap + finWindow = fin.desktop.Window.wrap("uuid", "name"); + // addEventListener + finWindow.addEventListener("bounds-changed", function (event) { + console.log("The window has been moved or resized"); + }, function () { + console.log("The registration was successful"); + }, function (reason) { + console.log("failure:" + reason); + }); + // animate + finWindow.animate({ + opacity: { + opacity: 0.15, + duration: 1000 + }, + position: { + left: 10, + top: 10, + duration: 3000 + } + }, { + interrupt: false + }, function (evt) { + // Callback will only fire after both "opacity" and "position" have finished animating. + }); + // authenticate + finWindow.addEventListener('auth-requested', evt => { + finWindow.authenticate('userName', 'P@assw0rd', () => { }, (reason, err) => { + console.log("failure:", err); + }); + }); + // blur + finWindow.blur(); + // bringToFront + finWindow.bringToFront(); + // close + finWindow.close(); + // disableFrame + finWindow.disableFrame(); + // enableFrame + finWindow.enableFrame(); + // flash + finWindow.flash(); + // focus + finWindow.focus(); + // getBounds + finWindow.getBounds(function (bounds) { + console.log("top: " + bounds.top + + "left: " + bounds.left + + "height: " + bounds.height + + "width: " + bounds.width); + }); + // getOptions + finWindow.getOptions(function (options) { + console.log(options); + }); + // getSnapshot + finWindow.getSnapshot(function (base64Snapshot) { + console.log("data:image/png;base64," + base64Snapshot); + }); + // getState + finWindow.getState(function (state) { + console.log("state: " + state); + }); + // getZoomLevel + finWindow.getZoomLevel(function (level) { + console.log("zoom level: " + level); + }, function (error) { + console.log('error:', error); + }); + // hide + finWindow.hide(); + // isShowing + finWindow.isShowing(function (showing) { + console.log("the window is " + (showing ? "showing" : "hidden")); + }); + // joinGroup + let secondWindow = new fin.desktop.Window({ + url: "http://www.openfin.co", + name: "secondWindow", + autoShow: true + }, function () { + // When mainWindow moves or is moved, secondWindow moves by the same amount + secondWindow.joinGroup(finWindow); + }); + // leaveGroup + secondWindow = new fin.desktop.Window({ + url: "http://www.openfin.co", + name: "secondWindow", + autoShow: true + }, function () { + // When finWindow moves or is moved, secondWindow moves by the same amount + secondWindow.joinGroup(finWindow, function () { + //once we are in the group, lets leave it. + secondWindow.leaveGroup(); + }); + }); + // maximize + finWindow.maximize(); + // mergeGroups + { + let finWindowOne = new fin.desktop.Window({ + url: "http://www.openfin.co", + name: "finWindowOne", + autoShow: true + }); + let finWindowTwo = new fin.desktop.Window({ + url: "http://www.openfin.co", + name: "finWindowTwo", + autoShow: true + }); + let finWindowThree = new fin.desktop.Window({ + url: "http://www.openfin.co", + name: "finWindowThree", + autoShow: true + }); + let finWindowFour = new fin.desktop.Window({ + url: "http://www.openfin.co", + name: "finWindowFour", + autoShow: true + }); + // When finWindowOne moves or is moved, finWindowTwo moves by the same amount + finWindowOne.joinGroup(finWindowTwo); + // When finWindowThree moves or is moved, finWindowFour moves by the same amount + finWindowThree.joinGroup(finWindowFour); + // finWindowOne, finWindowTwo, finWindowThree, and finWindowFour now move together in the same group + finWindowOne.mergeGroups(finWindowThree); + } + // minimize + finWindow.minimize(); + // moveBy + finWindow.moveBy(10, 10); + // moveTo + finWindow.moveTo(100, 200); + // removeEventListener + let aRegisteredListener = (event: fin.WindowBaseEvent) => { }; + finWindow.removeEventListener("bounds-changed", aRegisteredListener); + // resizeBy + finWindow.resizeBy(10, 10, "top-right"); + // resizeTo + finWindow.resizeTo(10, 10, "top-right"); + // restore + finWindow.restore(); + // setAsForeground + finWindow.setAsForeground(); + // setBounds + finWindow.setBounds(100, 200, 400, 400); + // setZoomLevel + finWindow.setZoomLevel(10); + // show + finWindow.show(); + // showAt + finWindow.showAt(10, 10, false); + // stopFlashing + finWindow.stopFlashing(); + // updateOptions + finWindow.updateOptions({ + frame: false, + maxWidth: 500 + }); +} \ No newline at end of file diff --git a/types/openfin/v16/tsconfig.json b/types/openfin/v16/tsconfig.json new file mode 100644 index 0000000000..88e1dbe7fa --- /dev/null +++ b/types/openfin/v16/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "paths": { + "openfin": [ + "openfin/v16" + ] + }, + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "openfin-tests.ts" + ] +} diff --git a/types/openfin/v16/tslint.json b/types/openfin/v16/tslint.json new file mode 100644 index 0000000000..c5090ea20a --- /dev/null +++ b/types/openfin/v16/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tslint.json", + "rules": { + "max-line-length": false, + "only-arrow-functions-2": false + } +} \ No newline at end of file diff --git a/openjscad/index.d.ts b/types/openjscad/index.d.ts similarity index 100% rename from openjscad/index.d.ts rename to types/openjscad/index.d.ts diff --git a/openjscad/openjscad-tests.ts b/types/openjscad/openjscad-tests.ts similarity index 100% rename from openjscad/openjscad-tests.ts rename to types/openjscad/openjscad-tests.ts diff --git a/openjscad/tsconfig.json b/types/openjscad/tsconfig.json similarity index 100% rename from openjscad/tsconfig.json rename to types/openjscad/tsconfig.json diff --git a/openlayers/index.d.ts b/types/openlayers/index.d.ts similarity index 100% rename from openlayers/index.d.ts rename to types/openlayers/index.d.ts diff --git a/openlayers/openlayers-tests.ts b/types/openlayers/openlayers-tests.ts similarity index 100% rename from openlayers/openlayers-tests.ts rename to types/openlayers/openlayers-tests.ts diff --git a/openlayers/tsconfig.json b/types/openlayers/tsconfig.json similarity index 100% rename from openlayers/tsconfig.json rename to types/openlayers/tsconfig.json diff --git a/openlayers/v2/index.d.ts b/types/openlayers/v2/index.d.ts similarity index 100% rename from openlayers/v2/index.d.ts rename to types/openlayers/v2/index.d.ts diff --git a/openlayers/v2/tsconfig.json b/types/openlayers/v2/tsconfig.json similarity index 100% rename from openlayers/v2/tsconfig.json rename to types/openlayers/v2/tsconfig.json diff --git a/openpgp/index.d.ts b/types/openpgp/index.d.ts similarity index 100% rename from openpgp/index.d.ts rename to types/openpgp/index.d.ts diff --git a/openpgp/openpgp-tests.ts b/types/openpgp/openpgp-tests.ts similarity index 100% rename from openpgp/openpgp-tests.ts rename to types/openpgp/openpgp-tests.ts diff --git a/openpgp/tsconfig.json b/types/openpgp/tsconfig.json similarity index 100% rename from openpgp/tsconfig.json rename to types/openpgp/tsconfig.json diff --git a/opentok/index.d.ts b/types/opentok/index.d.ts similarity index 100% rename from opentok/index.d.ts rename to types/opentok/index.d.ts diff --git a/opentok/opentok-tests.ts b/types/opentok/opentok-tests.ts similarity index 100% rename from opentok/opentok-tests.ts rename to types/opentok/opentok-tests.ts diff --git a/opentok/tsconfig.json b/types/opentok/tsconfig.json similarity index 100% rename from opentok/tsconfig.json rename to types/opentok/tsconfig.json diff --git a/opentype.js/index.d.ts b/types/opentype.js/index.d.ts similarity index 100% rename from opentype.js/index.d.ts rename to types/opentype.js/index.d.ts diff --git a/opentype.js/opentype.js-tests.ts b/types/opentype.js/opentype.js-tests.ts similarity index 100% rename from opentype.js/opentype.js-tests.ts rename to types/opentype.js/opentype.js-tests.ts diff --git a/opentype.js/tsconfig.json b/types/opentype.js/tsconfig.json similarity index 100% rename from opentype.js/tsconfig.json rename to types/opentype.js/tsconfig.json diff --git a/openui5/index.d.ts b/types/openui5/index.d.ts similarity index 100% rename from openui5/index.d.ts rename to types/openui5/index.d.ts diff --git a/openui5/jquery.sap.d.ts b/types/openui5/jquery.sap.d.ts similarity index 100% rename from openui5/jquery.sap.d.ts rename to types/openui5/jquery.sap.d.ts diff --git a/openui5/openui5-tests.ts b/types/openui5/openui5-tests.ts similarity index 100% rename from openui5/openui5-tests.ts rename to types/openui5/openui5-tests.ts diff --git a/openui5/sap.m.d.ts b/types/openui5/sap.m.d.ts similarity index 100% rename from openui5/sap.m.d.ts rename to types/openui5/sap.m.d.ts diff --git a/openui5/sap.ui.d.ts b/types/openui5/sap.ui.d.ts similarity index 100% rename from openui5/sap.ui.d.ts rename to types/openui5/sap.ui.d.ts diff --git a/openui5/tsconfig.json b/types/openui5/tsconfig.json similarity index 100% rename from openui5/tsconfig.json rename to types/openui5/tsconfig.json diff --git a/opn/index.d.ts b/types/opn/index.d.ts similarity index 100% rename from opn/index.d.ts rename to types/opn/index.d.ts diff --git a/opn/opn-tests.ts b/types/opn/opn-tests.ts similarity index 100% rename from opn/opn-tests.ts rename to types/opn/opn-tests.ts diff --git a/opn/tsconfig.json b/types/opn/tsconfig.json similarity index 100% rename from opn/tsconfig.json rename to types/opn/tsconfig.json diff --git a/optics-agent/index.d.ts b/types/optics-agent/index.d.ts similarity index 100% rename from optics-agent/index.d.ts rename to types/optics-agent/index.d.ts diff --git a/optics-agent/optics-agent-tests.ts b/types/optics-agent/optics-agent-tests.ts similarity index 100% rename from optics-agent/optics-agent-tests.ts rename to types/optics-agent/optics-agent-tests.ts diff --git a/optics-agent/tsconfig.json b/types/optics-agent/tsconfig.json similarity index 100% rename from optics-agent/tsconfig.json rename to types/optics-agent/tsconfig.json diff --git a/optics-agent/tslint.json b/types/optics-agent/tslint.json similarity index 100% rename from optics-agent/tslint.json rename to types/optics-agent/tslint.json diff --git a/optimist/index.d.ts b/types/optimist/index.d.ts similarity index 100% rename from optimist/index.d.ts rename to types/optimist/index.d.ts diff --git a/optimist/optimist-tests.ts b/types/optimist/optimist-tests.ts similarity index 100% rename from optimist/optimist-tests.ts rename to types/optimist/optimist-tests.ts diff --git a/optimist/tsconfig.json b/types/optimist/tsconfig.json similarity index 100% rename from optimist/tsconfig.json rename to types/optimist/tsconfig.json diff --git a/optimize-css-assets-webpack-plugin/index.d.ts b/types/optimize-css-assets-webpack-plugin/index.d.ts similarity index 95% rename from optimize-css-assets-webpack-plugin/index.d.ts rename to types/optimize-css-assets-webpack-plugin/index.d.ts index af484b05d2..b16d384d72 100644 --- a/optimize-css-assets-webpack-plugin/index.d.ts +++ b/types/optimize-css-assets-webpack-plugin/index.d.ts @@ -8,14 +8,12 @@ import { Plugin } from 'webpack'; export = OptimizeCssAssetsPlugin; declare namespace OptimizeCssAssetsPlugin { - - export interface Options { + interface Options { assetNameRegExp?: RegExp; cssProcessor?: any; cssProcessorOptions?: any; canPrint?: boolean; } - } declare class OptimizeCssAssetsPlugin extends Plugin { diff --git a/optimize-css-assets-webpack-plugin/optimize-css-assets-webpack-plugin-tests.ts b/types/optimize-css-assets-webpack-plugin/optimize-css-assets-webpack-plugin-tests.ts similarity index 100% rename from optimize-css-assets-webpack-plugin/optimize-css-assets-webpack-plugin-tests.ts rename to types/optimize-css-assets-webpack-plugin/optimize-css-assets-webpack-plugin-tests.ts diff --git a/optimize-css-assets-webpack-plugin/tsconfig.json b/types/optimize-css-assets-webpack-plugin/tsconfig.json similarity index 100% rename from optimize-css-assets-webpack-plugin/tsconfig.json rename to types/optimize-css-assets-webpack-plugin/tsconfig.json diff --git a/optimize-css-assets-webpack-plugin/tslint.json b/types/optimize-css-assets-webpack-plugin/tslint.json similarity index 100% rename from optimize-css-assets-webpack-plugin/tslint.json rename to types/optimize-css-assets-webpack-plugin/tslint.json diff --git a/ora/index.d.ts b/types/ora/index.d.ts similarity index 100% rename from ora/index.d.ts rename to types/ora/index.d.ts diff --git a/ora/ora-tests.ts b/types/ora/ora-tests.ts similarity index 100% rename from ora/ora-tests.ts rename to types/ora/ora-tests.ts diff --git a/ora/tsconfig.json b/types/ora/tsconfig.json similarity index 100% rename from ora/tsconfig.json rename to types/ora/tsconfig.json diff --git a/oracledb/index.d.ts b/types/oracledb/index.d.ts similarity index 100% rename from oracledb/index.d.ts rename to types/oracledb/index.d.ts diff --git a/oracledb/oracledb-tests.ts b/types/oracledb/oracledb-tests.ts similarity index 100% rename from oracledb/oracledb-tests.ts rename to types/oracledb/oracledb-tests.ts diff --git a/oracledb/tsconfig.json b/types/oracledb/tsconfig.json similarity index 100% rename from oracledb/tsconfig.json rename to types/oracledb/tsconfig.json diff --git a/orchestrator/index.d.ts b/types/orchestrator/index.d.ts similarity index 100% rename from orchestrator/index.d.ts rename to types/orchestrator/index.d.ts diff --git a/orchestrator/orchestrator-tests.ts b/types/orchestrator/orchestrator-tests.ts similarity index 100% rename from orchestrator/orchestrator-tests.ts rename to types/orchestrator/orchestrator-tests.ts diff --git a/orchestrator/tsconfig.json b/types/orchestrator/tsconfig.json similarity index 100% rename from orchestrator/tsconfig.json rename to types/orchestrator/tsconfig.json diff --git a/orientjs/index.d.ts b/types/orientjs/index.d.ts similarity index 100% rename from orientjs/index.d.ts rename to types/orientjs/index.d.ts diff --git a/orientjs/orientjs-tests.ts b/types/orientjs/orientjs-tests.ts similarity index 100% rename from orientjs/orientjs-tests.ts rename to types/orientjs/orientjs-tests.ts diff --git a/orientjs/tsconfig.json b/types/orientjs/tsconfig.json similarity index 100% rename from orientjs/tsconfig.json rename to types/orientjs/tsconfig.json diff --git a/os-homedir/index.d.ts b/types/os-homedir/index.d.ts similarity index 100% rename from os-homedir/index.d.ts rename to types/os-homedir/index.d.ts diff --git a/os-homedir/tsconfig.json b/types/os-homedir/tsconfig.json similarity index 100% rename from os-homedir/tsconfig.json rename to types/os-homedir/tsconfig.json diff --git a/os-homedir/tslint.json b/types/os-homedir/tslint.json similarity index 100% rename from os-homedir/tslint.json rename to types/os-homedir/tslint.json diff --git a/os-locale/index.d.ts b/types/os-locale/index.d.ts similarity index 100% rename from os-locale/index.d.ts rename to types/os-locale/index.d.ts diff --git a/os-locale/os-locale-tests.ts b/types/os-locale/os-locale-tests.ts similarity index 100% rename from os-locale/os-locale-tests.ts rename to types/os-locale/os-locale-tests.ts diff --git a/os-locale/tsconfig.json b/types/os-locale/tsconfig.json similarity index 100% rename from os-locale/tsconfig.json rename to types/os-locale/tsconfig.json diff --git a/os-tmpdir/index.d.ts b/types/os-tmpdir/index.d.ts similarity index 100% rename from os-tmpdir/index.d.ts rename to types/os-tmpdir/index.d.ts diff --git a/os-tmpdir/tsconfig.json b/types/os-tmpdir/tsconfig.json similarity index 100% rename from os-tmpdir/tsconfig.json rename to types/os-tmpdir/tsconfig.json diff --git a/os-tmpdir/tslint.json b/types/os-tmpdir/tslint.json similarity index 100% rename from os-tmpdir/tslint.json rename to types/os-tmpdir/tslint.json diff --git a/osmtogeojson/index.d.ts b/types/osmtogeojson/index.d.ts similarity index 100% rename from osmtogeojson/index.d.ts rename to types/osmtogeojson/index.d.ts diff --git a/osmtogeojson/osmtogeojson-tests.ts b/types/osmtogeojson/osmtogeojson-tests.ts similarity index 100% rename from osmtogeojson/osmtogeojson-tests.ts rename to types/osmtogeojson/osmtogeojson-tests.ts diff --git a/osmtogeojson/tsconfig.json b/types/osmtogeojson/tsconfig.json similarity index 100% rename from osmtogeojson/tsconfig.json rename to types/osmtogeojson/tsconfig.json diff --git a/owlcarousel/index.d.ts b/types/owlcarousel/index.d.ts similarity index 100% rename from owlcarousel/index.d.ts rename to types/owlcarousel/index.d.ts diff --git a/owlcarousel/owlcarousel-tests.ts b/types/owlcarousel/owlcarousel-tests.ts similarity index 100% rename from owlcarousel/owlcarousel-tests.ts rename to types/owlcarousel/owlcarousel-tests.ts diff --git a/owlcarousel/tsconfig.json b/types/owlcarousel/tsconfig.json similarity index 100% rename from owlcarousel/tsconfig.json rename to types/owlcarousel/tsconfig.json diff --git a/p-defer/index.d.ts b/types/p-defer/index.d.ts similarity index 100% rename from p-defer/index.d.ts rename to types/p-defer/index.d.ts diff --git a/p-defer/p-defer-tests.ts b/types/p-defer/p-defer-tests.ts similarity index 100% rename from p-defer/p-defer-tests.ts rename to types/p-defer/p-defer-tests.ts diff --git a/p-defer/tsconfig.json b/types/p-defer/tsconfig.json similarity index 100% rename from p-defer/tsconfig.json rename to types/p-defer/tsconfig.json diff --git a/p-defer/tslint.json b/types/p-defer/tslint.json similarity index 100% rename from p-defer/tslint.json rename to types/p-defer/tslint.json diff --git a/p2/index.d.ts b/types/p2/index.d.ts similarity index 100% rename from p2/index.d.ts rename to types/p2/index.d.ts diff --git a/p2/p2-tests.ts b/types/p2/p2-tests.ts similarity index 100% rename from p2/p2-tests.ts rename to types/p2/p2-tests.ts diff --git a/p2/tsconfig.json b/types/p2/tsconfig.json similarity index 100% rename from p2/tsconfig.json rename to types/p2/tsconfig.json diff --git a/packery/index.d.ts b/types/packery/index.d.ts similarity index 100% rename from packery/index.d.ts rename to types/packery/index.d.ts diff --git a/packery/packery-tests.ts b/types/packery/packery-tests.ts similarity index 100% rename from packery/packery-tests.ts rename to types/packery/packery-tests.ts diff --git a/packery/tsconfig.json b/types/packery/tsconfig.json similarity index 100% rename from packery/tsconfig.json rename to types/packery/tsconfig.json diff --git a/pad/index.d.ts b/types/pad/index.d.ts similarity index 100% rename from pad/index.d.ts rename to types/pad/index.d.ts diff --git a/pad/pad-tests.ts b/types/pad/pad-tests.ts similarity index 100% rename from pad/pad-tests.ts rename to types/pad/pad-tests.ts diff --git a/pad/tsconfig.json b/types/pad/tsconfig.json similarity index 100% rename from pad/tsconfig.json rename to types/pad/tsconfig.json diff --git a/pad/tslint.json b/types/pad/tslint.json similarity index 100% rename from pad/tslint.json rename to types/pad/tslint.json diff --git a/page-icon/index.d.ts b/types/page-icon/index.d.ts similarity index 100% rename from page-icon/index.d.ts rename to types/page-icon/index.d.ts diff --git a/page-icon/page-icon-tests.ts b/types/page-icon/page-icon-tests.ts similarity index 100% rename from page-icon/page-icon-tests.ts rename to types/page-icon/page-icon-tests.ts diff --git a/page-icon/tsconfig.json b/types/page-icon/tsconfig.json similarity index 100% rename from page-icon/tsconfig.json rename to types/page-icon/tsconfig.json diff --git a/page/index.d.ts b/types/page/index.d.ts similarity index 100% rename from page/index.d.ts rename to types/page/index.d.ts diff --git a/page/page-tests.ts b/types/page/page-tests.ts similarity index 100% rename from page/page-tests.ts rename to types/page/page-tests.ts diff --git a/page/tsconfig.json b/types/page/tsconfig.json similarity index 100% rename from page/tsconfig.json rename to types/page/tsconfig.json diff --git a/pako/index.d.ts b/types/pako/index.d.ts similarity index 100% rename from pako/index.d.ts rename to types/pako/index.d.ts diff --git a/pako/pako-tests.ts b/types/pako/pako-tests.ts similarity index 100% rename from pako/pako-tests.ts rename to types/pako/pako-tests.ts diff --git a/pako/tsconfig.json b/types/pako/tsconfig.json similarity index 100% rename from pako/tsconfig.json rename to types/pako/tsconfig.json diff --git a/papaparse/index.d.ts b/types/papaparse/index.d.ts similarity index 100% rename from papaparse/index.d.ts rename to types/papaparse/index.d.ts diff --git a/papaparse/papaparse-tests.ts b/types/papaparse/papaparse-tests.ts similarity index 100% rename from papaparse/papaparse-tests.ts rename to types/papaparse/papaparse-tests.ts diff --git a/papaparse/tsconfig.json b/types/papaparse/tsconfig.json similarity index 100% rename from papaparse/tsconfig.json rename to types/papaparse/tsconfig.json diff --git a/paper/index.d.ts b/types/paper/index.d.ts similarity index 100% rename from paper/index.d.ts rename to types/paper/index.d.ts diff --git a/paper/paper-tests.ts b/types/paper/paper-tests.ts similarity index 100% rename from paper/paper-tests.ts rename to types/paper/paper-tests.ts diff --git a/paper/tsconfig.json b/types/paper/tsconfig.json similarity index 100% rename from paper/tsconfig.json rename to types/paper/tsconfig.json diff --git a/paralleljs/index.d.ts b/types/paralleljs/index.d.ts similarity index 100% rename from paralleljs/index.d.ts rename to types/paralleljs/index.d.ts diff --git a/paralleljs/paralleljs-tests.ts b/types/paralleljs/paralleljs-tests.ts similarity index 100% rename from paralleljs/paralleljs-tests.ts rename to types/paralleljs/paralleljs-tests.ts diff --git a/paralleljs/tsconfig.json b/types/paralleljs/tsconfig.json similarity index 100% rename from paralleljs/tsconfig.json rename to types/paralleljs/tsconfig.json diff --git a/parse-glob/index.d.ts b/types/parse-glob/index.d.ts similarity index 100% rename from parse-glob/index.d.ts rename to types/parse-glob/index.d.ts diff --git a/parse-glob/parse-glob-tests.ts b/types/parse-glob/parse-glob-tests.ts similarity index 100% rename from parse-glob/parse-glob-tests.ts rename to types/parse-glob/parse-glob-tests.ts diff --git a/parse-glob/tsconfig.json b/types/parse-glob/tsconfig.json similarity index 100% rename from parse-glob/tsconfig.json rename to types/parse-glob/tsconfig.json diff --git a/parse-mockdb/index.d.ts b/types/parse-mockdb/index.d.ts similarity index 100% rename from parse-mockdb/index.d.ts rename to types/parse-mockdb/index.d.ts diff --git a/parse-mockdb/parse-mockdb-tests.ts b/types/parse-mockdb/parse-mockdb-tests.ts similarity index 100% rename from parse-mockdb/parse-mockdb-tests.ts rename to types/parse-mockdb/parse-mockdb-tests.ts diff --git a/parse-mockdb/tsconfig.json b/types/parse-mockdb/tsconfig.json similarity index 100% rename from parse-mockdb/tsconfig.json rename to types/parse-mockdb/tsconfig.json diff --git a/parse-torrent-file/index.d.ts b/types/parse-torrent-file/index.d.ts similarity index 75% rename from parse-torrent-file/index.d.ts rename to types/parse-torrent-file/index.d.ts index cd0837938a..85cdf13700 100644 --- a/parse-torrent-file/index.d.ts +++ b/types/parse-torrent-file/index.d.ts @@ -5,10 +5,13 @@ /// -declare const ParseTorrentFile: ParseTorrentFile.ParseTorrentFile; +declare function ParseTorrentFile(torrent: Buffer | ParseTorrentFile.Torrent): ParseTorrentFile.Instance; declare namespace ParseTorrentFile { - export interface TorrentInfo { + function decode(torrent: Buffer | Torrent): Instance; + function encode(parsed: Instance): Buffer; + + interface TorrentInfo { 'name.utf-8'?: string; name?: string; files?: File[]; @@ -17,7 +20,7 @@ declare namespace ParseTorrentFile { private?: boolean; } - export interface Torrent { + interface Torrent { info?: TorrentInfo; 'creation date'?: number; 'created by'?: string; @@ -27,20 +30,14 @@ declare namespace ParseTorrentFile { 'url-list'?: Buffer; } - export interface ParseTorrentFile { - (torrent: Buffer | Torrent): Instance; - decode(torrent: Buffer | Torrent): Instance; - encode(parsed: Instance): Buffer; - } - - export interface ParsedFile { + interface ParsedFile { path: string; name: string; length: number; offset: number; } - export interface Instance extends Object { + interface Instance extends Object { info?: TorrentInfo; infoBuffer?: Buffer; infoHash?: string; diff --git a/parse-torrent-file/parse-torrent-file-tests.ts b/types/parse-torrent-file/parse-torrent-file-tests.ts similarity index 99% rename from parse-torrent-file/parse-torrent-file-tests.ts rename to types/parse-torrent-file/parse-torrent-file-tests.ts index 4a6b6a1dae..a981c0bc81 100644 --- a/parse-torrent-file/parse-torrent-file-tests.ts +++ b/types/parse-torrent-file/parse-torrent-file-tests.ts @@ -9,4 +9,3 @@ try { // the torrent file was corrupt console.error(e); } - diff --git a/parse-torrent-file/tsconfig.json b/types/parse-torrent-file/tsconfig.json similarity index 100% rename from parse-torrent-file/tsconfig.json rename to types/parse-torrent-file/tsconfig.json diff --git a/parse-torrent-file/tslint.json b/types/parse-torrent-file/tslint.json similarity index 100% rename from parse-torrent-file/tslint.json rename to types/parse-torrent-file/tslint.json diff --git a/parse-torrent/index.d.ts b/types/parse-torrent/index.d.ts similarity index 92% rename from parse-torrent/index.d.ts rename to types/parse-torrent/index.d.ts index e256cfd2ed..c6bd901976 100644 --- a/parse-torrent/index.d.ts +++ b/types/parse-torrent/index.d.ts @@ -11,7 +11,6 @@ import * as ParseTorrentFile from 'parse-torrent-file'; declare const ParseTorrent: ParseTorrent.ParseTorrent; declare namespace ParseTorrent { - interface ParseTorrent { (torrent: string): MagnetUri.Instance; (torrent: Buffer): MagnetUri.Instance | ParseTorrentFile.Instance; @@ -23,13 +22,12 @@ declare namespace ParseTorrent { remote(torrent: string | Buffer | Instance | MagnetUri.Instance | ParseTorrentFile.Instance | Blob, cb?: (err: Error, torrent?: Instance) => void): void; } - export interface Instance extends MagnetUri.Instance, ParseTorrentFile.Instance { + interface Instance extends MagnetUri.Instance, ParseTorrentFile.Instance { infoHash: string; name?: string; announce?: string[]; urlList?: string[]; } - } export = ParseTorrent; diff --git a/parse-torrent/parse-torrent-tests.ts b/types/parse-torrent/parse-torrent-tests.ts similarity index 98% rename from parse-torrent/parse-torrent-tests.ts rename to types/parse-torrent/parse-torrent-tests.ts index 46d8b9e923..24d00dbe98 100644 --- a/parse-torrent/parse-torrent-tests.ts +++ b/types/parse-torrent/parse-torrent-tests.ts @@ -77,11 +77,11 @@ parseTorrent(fs.readFileSync(__dirname + '/torrents/leaves.torrent')); // '56dcc242d03293e9446cf5e457d8eb3d9588fd90', // 'c698de9b0dad92980906c026d8c1408fa08fe4ec' ] } -var uri = parseTorrent.toMagnetURI({ +const uri = parseTorrent.toMagnetURI({ infoHash: 'd2474e86c95b19b8bcfdb92bc12c9d44667cfa36', }); -var buf = parseTorrent.toTorrentFile({ +const buf = parseTorrent.toTorrentFile({ infoHash: 'd2474e86c95b19b8bcfdb92bc12c9d44667cfa36', }); @@ -89,4 +89,3 @@ parseTorrent.remote('d2474e86c95b19b8bcfdb92bc12c9d44667cfa36', (err, parsedTorr // if (err) throw err // console.log(parsedTorrent) }); - diff --git a/parse-torrent/tsconfig.json b/types/parse-torrent/tsconfig.json similarity index 100% rename from parse-torrent/tsconfig.json rename to types/parse-torrent/tsconfig.json diff --git a/parse-torrent/tslint.json b/types/parse-torrent/tslint.json similarity index 100% rename from parse-torrent/tslint.json rename to types/parse-torrent/tslint.json diff --git a/parse-unit/index.d.ts b/types/parse-unit/index.d.ts similarity index 100% rename from parse-unit/index.d.ts rename to types/parse-unit/index.d.ts diff --git a/parse-unit/parse-unit-tests.ts b/types/parse-unit/parse-unit-tests.ts similarity index 100% rename from parse-unit/parse-unit-tests.ts rename to types/parse-unit/parse-unit-tests.ts diff --git a/parse-unit/tsconfig.json b/types/parse-unit/tsconfig.json similarity index 100% rename from parse-unit/tsconfig.json rename to types/parse-unit/tsconfig.json diff --git a/parse-unit/tslint.json b/types/parse-unit/tslint.json similarity index 100% rename from parse-unit/tslint.json rename to types/parse-unit/tslint.json diff --git a/parse/index.d.ts b/types/parse/index.d.ts similarity index 100% rename from parse/index.d.ts rename to types/parse/index.d.ts diff --git a/parse/parse-tests.ts b/types/parse/parse-tests.ts similarity index 100% rename from parse/parse-tests.ts rename to types/parse/parse-tests.ts diff --git a/parse/tsconfig.json b/types/parse/tsconfig.json similarity index 100% rename from parse/tsconfig.json rename to types/parse/tsconfig.json diff --git a/parse5/index.d.ts b/types/parse5/index.d.ts similarity index 100% rename from parse5/index.d.ts rename to types/parse5/index.d.ts diff --git a/parse5/parse5-tests.ts b/types/parse5/parse5-tests.ts similarity index 100% rename from parse5/parse5-tests.ts rename to types/parse5/parse5-tests.ts diff --git a/parse5/tsconfig.json b/types/parse5/tsconfig.json similarity index 100% rename from parse5/tsconfig.json rename to types/parse5/tsconfig.json diff --git a/parseurl/index.d.ts b/types/parseurl/index.d.ts similarity index 100% rename from parseurl/index.d.ts rename to types/parseurl/index.d.ts diff --git a/parseurl/parseurl-tests.ts b/types/parseurl/parseurl-tests.ts similarity index 100% rename from parseurl/parseurl-tests.ts rename to types/parseurl/parseurl-tests.ts diff --git a/parseurl/tsconfig.json b/types/parseurl/tsconfig.json similarity index 100% rename from parseurl/tsconfig.json rename to types/parseurl/tsconfig.json diff --git a/parseurl/tslint.json b/types/parseurl/tslint.json similarity index 100% rename from parseurl/tslint.json rename to types/parseurl/tslint.json diff --git a/parsimmon/index.d.ts b/types/parsimmon/index.d.ts similarity index 100% rename from parsimmon/index.d.ts rename to types/parsimmon/index.d.ts diff --git a/parsimmon/parsimmon-tests.ts b/types/parsimmon/parsimmon-tests.ts similarity index 100% rename from parsimmon/parsimmon-tests.ts rename to types/parsimmon/parsimmon-tests.ts diff --git a/parsimmon/tsconfig.json b/types/parsimmon/tsconfig.json similarity index 100% rename from parsimmon/tsconfig.json rename to types/parsimmon/tsconfig.json diff --git a/parsimmon/tslint.json b/types/parsimmon/tslint.json similarity index 100% rename from parsimmon/tslint.json rename to types/parsimmon/tslint.json diff --git a/passport-anonymous/index.d.ts b/types/passport-anonymous/index.d.ts similarity index 100% rename from passport-anonymous/index.d.ts rename to types/passport-anonymous/index.d.ts diff --git a/passport-anonymous/passport-anonymous-tests.ts b/types/passport-anonymous/passport-anonymous-tests.ts similarity index 100% rename from passport-anonymous/passport-anonymous-tests.ts rename to types/passport-anonymous/passport-anonymous-tests.ts diff --git a/passport-anonymous/tsconfig.json b/types/passport-anonymous/tsconfig.json similarity index 100% rename from passport-anonymous/tsconfig.json rename to types/passport-anonymous/tsconfig.json diff --git a/passport-anonymous/tslint.json b/types/passport-anonymous/tslint.json similarity index 100% rename from passport-anonymous/tslint.json rename to types/passport-anonymous/tslint.json diff --git a/passport-beam/index.d.ts b/types/passport-beam/index.d.ts similarity index 100% rename from passport-beam/index.d.ts rename to types/passport-beam/index.d.ts diff --git a/passport-beam/passport-beam-tests.ts b/types/passport-beam/passport-beam-tests.ts similarity index 100% rename from passport-beam/passport-beam-tests.ts rename to types/passport-beam/passport-beam-tests.ts diff --git a/passport-beam/tsconfig.json b/types/passport-beam/tsconfig.json similarity index 100% rename from passport-beam/tsconfig.json rename to types/passport-beam/tsconfig.json diff --git a/passport-facebook-token/index.d.ts b/types/passport-facebook-token/index.d.ts similarity index 100% rename from passport-facebook-token/index.d.ts rename to types/passport-facebook-token/index.d.ts diff --git a/passport-facebook-token/passport-facebook-token-tests.ts b/types/passport-facebook-token/passport-facebook-token-tests.ts similarity index 100% rename from passport-facebook-token/passport-facebook-token-tests.ts rename to types/passport-facebook-token/passport-facebook-token-tests.ts diff --git a/passport-facebook-token/tsconfig.json b/types/passport-facebook-token/tsconfig.json similarity index 100% rename from passport-facebook-token/tsconfig.json rename to types/passport-facebook-token/tsconfig.json diff --git a/passport-facebook/index.d.ts b/types/passport-facebook/index.d.ts similarity index 100% rename from passport-facebook/index.d.ts rename to types/passport-facebook/index.d.ts diff --git a/passport-facebook/passport-facebook-tests.ts b/types/passport-facebook/passport-facebook-tests.ts similarity index 100% rename from passport-facebook/passport-facebook-tests.ts rename to types/passport-facebook/passport-facebook-tests.ts diff --git a/passport-facebook/tsconfig.json b/types/passport-facebook/tsconfig.json similarity index 100% rename from passport-facebook/tsconfig.json rename to types/passport-facebook/tsconfig.json diff --git a/passport-google-oauth/index.d.ts b/types/passport-google-oauth/index.d.ts similarity index 100% rename from passport-google-oauth/index.d.ts rename to types/passport-google-oauth/index.d.ts diff --git a/passport-google-oauth/passport-google-oauth-tests.ts b/types/passport-google-oauth/passport-google-oauth-tests.ts similarity index 100% rename from passport-google-oauth/passport-google-oauth-tests.ts rename to types/passport-google-oauth/passport-google-oauth-tests.ts diff --git a/passport-google-oauth/tsconfig.json b/types/passport-google-oauth/tsconfig.json similarity index 100% rename from passport-google-oauth/tsconfig.json rename to types/passport-google-oauth/tsconfig.json diff --git a/passport-http-bearer/index.d.ts b/types/passport-http-bearer/index.d.ts similarity index 100% rename from passport-http-bearer/index.d.ts rename to types/passport-http-bearer/index.d.ts diff --git a/passport-http-bearer/passport-http-bearer-tests.ts b/types/passport-http-bearer/passport-http-bearer-tests.ts similarity index 100% rename from passport-http-bearer/passport-http-bearer-tests.ts rename to types/passport-http-bearer/passport-http-bearer-tests.ts diff --git a/passport-http-bearer/tsconfig.json b/types/passport-http-bearer/tsconfig.json similarity index 100% rename from passport-http-bearer/tsconfig.json rename to types/passport-http-bearer/tsconfig.json diff --git a/passport-http/index.d.ts b/types/passport-http/index.d.ts similarity index 100% rename from passport-http/index.d.ts rename to types/passport-http/index.d.ts diff --git a/passport-http/passport-http-tests.ts b/types/passport-http/passport-http-tests.ts similarity index 100% rename from passport-http/passport-http-tests.ts rename to types/passport-http/passport-http-tests.ts diff --git a/passport-http/tsconfig.json b/types/passport-http/tsconfig.json similarity index 100% rename from passport-http/tsconfig.json rename to types/passport-http/tsconfig.json diff --git a/passport-jwt/index.d.ts b/types/passport-jwt/index.d.ts similarity index 100% rename from passport-jwt/index.d.ts rename to types/passport-jwt/index.d.ts diff --git a/passport-jwt/passport-jwt-tests.ts b/types/passport-jwt/passport-jwt-tests.ts similarity index 100% rename from passport-jwt/passport-jwt-tests.ts rename to types/passport-jwt/passport-jwt-tests.ts diff --git a/passport-jwt/tsconfig.json b/types/passport-jwt/tsconfig.json similarity index 100% rename from passport-jwt/tsconfig.json rename to types/passport-jwt/tsconfig.json diff --git a/passport-local-mongoose/index.d.ts b/types/passport-local-mongoose/index.d.ts similarity index 100% rename from passport-local-mongoose/index.d.ts rename to types/passport-local-mongoose/index.d.ts diff --git a/passport-local-mongoose/passport-local-mongoose-tests.ts b/types/passport-local-mongoose/passport-local-mongoose-tests.ts similarity index 100% rename from passport-local-mongoose/passport-local-mongoose-tests.ts rename to types/passport-local-mongoose/passport-local-mongoose-tests.ts diff --git a/passport-local-mongoose/tsconfig.json b/types/passport-local-mongoose/tsconfig.json similarity index 100% rename from passport-local-mongoose/tsconfig.json rename to types/passport-local-mongoose/tsconfig.json diff --git a/passport-local/index.d.ts b/types/passport-local/index.d.ts similarity index 100% rename from passport-local/index.d.ts rename to types/passport-local/index.d.ts diff --git a/passport-local/passport-local-tests.ts b/types/passport-local/passport-local-tests.ts similarity index 100% rename from passport-local/passport-local-tests.ts rename to types/passport-local/passport-local-tests.ts diff --git a/passport-local/tsconfig.json b/types/passport-local/tsconfig.json similarity index 100% rename from passport-local/tsconfig.json rename to types/passport-local/tsconfig.json diff --git a/passport-oauth2-client-password/index.d.ts b/types/passport-oauth2-client-password/index.d.ts similarity index 100% rename from passport-oauth2-client-password/index.d.ts rename to types/passport-oauth2-client-password/index.d.ts diff --git a/passport-oauth2-client-password/passport-oauth2-client-password-tests.ts b/types/passport-oauth2-client-password/passport-oauth2-client-password-tests.ts similarity index 100% rename from passport-oauth2-client-password/passport-oauth2-client-password-tests.ts rename to types/passport-oauth2-client-password/passport-oauth2-client-password-tests.ts diff --git a/passport-oauth2-client-password/tsconfig.json b/types/passport-oauth2-client-password/tsconfig.json similarity index 100% rename from passport-oauth2-client-password/tsconfig.json rename to types/passport-oauth2-client-password/tsconfig.json diff --git a/passport-strategy/index.d.ts b/types/passport-strategy/index.d.ts similarity index 100% rename from passport-strategy/index.d.ts rename to types/passport-strategy/index.d.ts diff --git a/passport-strategy/passport-strategy-tests.ts b/types/passport-strategy/passport-strategy-tests.ts similarity index 100% rename from passport-strategy/passport-strategy-tests.ts rename to types/passport-strategy/passport-strategy-tests.ts diff --git a/passport-strategy/tsconfig.json b/types/passport-strategy/tsconfig.json similarity index 100% rename from passport-strategy/tsconfig.json rename to types/passport-strategy/tsconfig.json diff --git a/passport-twitter/index.d.ts b/types/passport-twitter/index.d.ts similarity index 100% rename from passport-twitter/index.d.ts rename to types/passport-twitter/index.d.ts diff --git a/passport-twitter/passport-twitter-tests.ts b/types/passport-twitter/passport-twitter-tests.ts similarity index 100% rename from passport-twitter/passport-twitter-tests.ts rename to types/passport-twitter/passport-twitter-tests.ts diff --git a/passport-twitter/tsconfig.json b/types/passport-twitter/tsconfig.json similarity index 100% rename from passport-twitter/tsconfig.json rename to types/passport-twitter/tsconfig.json diff --git a/passport/index.d.ts b/types/passport/index.d.ts similarity index 100% rename from passport/index.d.ts rename to types/passport/index.d.ts diff --git a/passport/passport-tests.ts b/types/passport/passport-tests.ts similarity index 100% rename from passport/passport-tests.ts rename to types/passport/passport-tests.ts diff --git a/passport/tsconfig.json b/types/passport/tsconfig.json similarity index 100% rename from passport/tsconfig.json rename to types/passport/tsconfig.json diff --git a/password-hash/index.d.ts b/types/password-hash/index.d.ts similarity index 100% rename from password-hash/index.d.ts rename to types/password-hash/index.d.ts diff --git a/password-hash/password-hash-tests.ts b/types/password-hash/password-hash-tests.ts similarity index 100% rename from password-hash/password-hash-tests.ts rename to types/password-hash/password-hash-tests.ts diff --git a/password-hash/tsconfig.json b/types/password-hash/tsconfig.json similarity index 100% rename from password-hash/tsconfig.json rename to types/password-hash/tsconfig.json diff --git a/path-exists/index.d.ts b/types/path-exists/index.d.ts similarity index 100% rename from path-exists/index.d.ts rename to types/path-exists/index.d.ts diff --git a/path-exists/path-exists-tests.ts b/types/path-exists/path-exists-tests.ts similarity index 100% rename from path-exists/path-exists-tests.ts rename to types/path-exists/path-exists-tests.ts diff --git a/path-exists/tsconfig.json b/types/path-exists/tsconfig.json similarity index 100% rename from path-exists/tsconfig.json rename to types/path-exists/tsconfig.json diff --git a/path-is-absolute/index.d.ts b/types/path-is-absolute/index.d.ts similarity index 100% rename from path-is-absolute/index.d.ts rename to types/path-is-absolute/index.d.ts diff --git a/path-is-absolute/path-is-absolute-tests.ts b/types/path-is-absolute/path-is-absolute-tests.ts similarity index 100% rename from path-is-absolute/path-is-absolute-tests.ts rename to types/path-is-absolute/path-is-absolute-tests.ts diff --git a/path-is-absolute/tsconfig.json b/types/path-is-absolute/tsconfig.json similarity index 100% rename from path-is-absolute/tsconfig.json rename to types/path-is-absolute/tsconfig.json diff --git a/path-is-absolute/tslint.json b/types/path-is-absolute/tslint.json similarity index 100% rename from path-is-absolute/tslint.json rename to types/path-is-absolute/tslint.json diff --git a/path-parse/index.d.ts b/types/path-parse/index.d.ts similarity index 100% rename from path-parse/index.d.ts rename to types/path-parse/index.d.ts diff --git a/path-parse/path-parse-tests.ts b/types/path-parse/path-parse-tests.ts similarity index 100% rename from path-parse/path-parse-tests.ts rename to types/path-parse/path-parse-tests.ts diff --git a/path-parse/tsconfig.json b/types/path-parse/tsconfig.json similarity index 100% rename from path-parse/tsconfig.json rename to types/path-parse/tsconfig.json diff --git a/path-to-regexp/index.d.ts b/types/path-to-regexp/index.d.ts similarity index 100% rename from path-to-regexp/index.d.ts rename to types/path-to-regexp/index.d.ts diff --git a/path-to-regexp/path-to-regexp-tests.ts b/types/path-to-regexp/path-to-regexp-tests.ts similarity index 100% rename from path-to-regexp/path-to-regexp-tests.ts rename to types/path-to-regexp/path-to-regexp-tests.ts diff --git a/path-to-regexp/tsconfig.json b/types/path-to-regexp/tsconfig.json similarity index 100% rename from path-to-regexp/tsconfig.json rename to types/path-to-regexp/tsconfig.json diff --git a/pathfinding/index.d.ts b/types/pathfinding/index.d.ts similarity index 100% rename from pathfinding/index.d.ts rename to types/pathfinding/index.d.ts diff --git a/pathfinding/pathfinding-tests.ts b/types/pathfinding/pathfinding-tests.ts similarity index 100% rename from pathfinding/pathfinding-tests.ts rename to types/pathfinding/pathfinding-tests.ts diff --git a/pathfinding/tsconfig.json b/types/pathfinding/tsconfig.json similarity index 100% rename from pathfinding/tsconfig.json rename to types/pathfinding/tsconfig.json diff --git a/pathjs/index.d.ts b/types/pathjs/index.d.ts similarity index 100% rename from pathjs/index.d.ts rename to types/pathjs/index.d.ts diff --git a/pathjs/pathjs-tests.ts b/types/pathjs/pathjs-tests.ts similarity index 100% rename from pathjs/pathjs-tests.ts rename to types/pathjs/pathjs-tests.ts diff --git a/pathjs/tsconfig.json b/types/pathjs/tsconfig.json similarity index 100% rename from pathjs/tsconfig.json rename to types/pathjs/tsconfig.json diff --git a/pathwatcher/index.d.ts b/types/pathwatcher/index.d.ts similarity index 100% rename from pathwatcher/index.d.ts rename to types/pathwatcher/index.d.ts diff --git a/pathwatcher/pathwatcher-tests.ts b/types/pathwatcher/pathwatcher-tests.ts similarity index 100% rename from pathwatcher/pathwatcher-tests.ts rename to types/pathwatcher/pathwatcher-tests.ts diff --git a/pathwatcher/tsconfig.json b/types/pathwatcher/tsconfig.json similarity index 100% rename from pathwatcher/tsconfig.json rename to types/pathwatcher/tsconfig.json diff --git a/payment/index.d.ts b/types/payment/index.d.ts similarity index 97% rename from payment/index.d.ts rename to types/payment/index.d.ts index 33edc3ebe3..fbd3f5ba65 100644 --- a/payment/index.d.ts +++ b/types/payment/index.d.ts @@ -24,7 +24,7 @@ interface Fns { * * Validates number * * Validates length to 4 */ - validateCardCVC(cvc: string, type: string): boolean; + validateCardCVC(cvc: string, type?: string): boolean; /** * Returns a card type. Either: * * visa diff --git a/payment/payment-tests.ts b/types/payment/payment-tests.ts similarity index 100% rename from payment/payment-tests.ts rename to types/payment/payment-tests.ts diff --git a/payment/tsconfig.json b/types/payment/tsconfig.json similarity index 100% rename from payment/tsconfig.json rename to types/payment/tsconfig.json diff --git a/payment/tslint.json b/types/payment/tslint.json similarity index 100% rename from payment/tslint.json rename to types/payment/tslint.json diff --git a/paypal-cordova-plugin/index.d.ts b/types/paypal-cordova-plugin/index.d.ts similarity index 100% rename from paypal-cordova-plugin/index.d.ts rename to types/paypal-cordova-plugin/index.d.ts diff --git a/paypal-cordova-plugin/paypal-cordova-plugin-tests.ts b/types/paypal-cordova-plugin/paypal-cordova-plugin-tests.ts similarity index 100% rename from paypal-cordova-plugin/paypal-cordova-plugin-tests.ts rename to types/paypal-cordova-plugin/paypal-cordova-plugin-tests.ts diff --git a/paypal-cordova-plugin/tsconfig.json b/types/paypal-cordova-plugin/tsconfig.json similarity index 100% rename from paypal-cordova-plugin/tsconfig.json rename to types/paypal-cordova-plugin/tsconfig.json diff --git a/pbf/index.d.ts b/types/pbf/index.d.ts similarity index 100% rename from pbf/index.d.ts rename to types/pbf/index.d.ts diff --git a/pbf/pbf-tests.ts b/types/pbf/pbf-tests.ts similarity index 100% rename from pbf/pbf-tests.ts rename to types/pbf/pbf-tests.ts diff --git a/pbf/tsconfig.json b/types/pbf/tsconfig.json similarity index 100% rename from pbf/tsconfig.json rename to types/pbf/tsconfig.json diff --git a/pbf/tslint.json b/types/pbf/tslint.json similarity index 100% rename from pbf/tslint.json rename to types/pbf/tslint.json diff --git a/pdf/index.d.ts b/types/pdf/index.d.ts similarity index 100% rename from pdf/index.d.ts rename to types/pdf/index.d.ts diff --git a/pdf/pdf-tests.ts b/types/pdf/pdf-tests.ts similarity index 100% rename from pdf/pdf-tests.ts rename to types/pdf/pdf-tests.ts diff --git a/pdf/tsconfig.json b/types/pdf/tsconfig.json similarity index 100% rename from pdf/tsconfig.json rename to types/pdf/tsconfig.json diff --git a/pdfkit/index.d.ts b/types/pdfkit/index.d.ts similarity index 100% rename from pdfkit/index.d.ts rename to types/pdfkit/index.d.ts diff --git a/pdfkit/pdfkit-tests.ts b/types/pdfkit/pdfkit-tests.ts similarity index 100% rename from pdfkit/pdfkit-tests.ts rename to types/pdfkit/pdfkit-tests.ts diff --git a/pdfkit/tsconfig.json b/types/pdfkit/tsconfig.json similarity index 100% rename from pdfkit/tsconfig.json rename to types/pdfkit/tsconfig.json diff --git a/pdfobject/index.d.ts b/types/pdfobject/index.d.ts similarity index 100% rename from pdfobject/index.d.ts rename to types/pdfobject/index.d.ts diff --git a/pdfobject/pdfobject-tests.ts b/types/pdfobject/pdfobject-tests.ts similarity index 100% rename from pdfobject/pdfobject-tests.ts rename to types/pdfobject/pdfobject-tests.ts diff --git a/pdfobject/tsconfig.json b/types/pdfobject/tsconfig.json similarity index 100% rename from pdfobject/tsconfig.json rename to types/pdfobject/tsconfig.json diff --git a/pebblekitjs/index.d.ts b/types/pebblekitjs/index.d.ts similarity index 100% rename from pebblekitjs/index.d.ts rename to types/pebblekitjs/index.d.ts diff --git a/pebblekitjs/pebblekitjs-tests.ts b/types/pebblekitjs/pebblekitjs-tests.ts similarity index 100% rename from pebblekitjs/pebblekitjs-tests.ts rename to types/pebblekitjs/pebblekitjs-tests.ts diff --git a/pebblekitjs/tsconfig.json b/types/pebblekitjs/tsconfig.json similarity index 100% rename from pebblekitjs/tsconfig.json rename to types/pebblekitjs/tsconfig.json diff --git a/peerjs/index.d.ts b/types/peerjs/index.d.ts similarity index 100% rename from peerjs/index.d.ts rename to types/peerjs/index.d.ts diff --git a/peerjs/peerjs-tests.ts b/types/peerjs/peerjs-tests.ts similarity index 100% rename from peerjs/peerjs-tests.ts rename to types/peerjs/peerjs-tests.ts diff --git a/peerjs/tsconfig.json b/types/peerjs/tsconfig.json similarity index 100% rename from peerjs/tsconfig.json rename to types/peerjs/tsconfig.json diff --git a/pegjs/index.d.ts b/types/pegjs/index.d.ts similarity index 100% rename from pegjs/index.d.ts rename to types/pegjs/index.d.ts diff --git a/pegjs/pegjs-tests.ts b/types/pegjs/pegjs-tests.ts similarity index 100% rename from pegjs/pegjs-tests.ts rename to types/pegjs/pegjs-tests.ts diff --git a/pegjs/tsconfig.json b/types/pegjs/tsconfig.json similarity index 100% rename from pegjs/tsconfig.json rename to types/pegjs/tsconfig.json diff --git a/pem/index.d.ts b/types/pem/index.d.ts similarity index 100% rename from pem/index.d.ts rename to types/pem/index.d.ts diff --git a/pem/pem-tests.ts b/types/pem/pem-tests.ts similarity index 100% rename from pem/pem-tests.ts rename to types/pem/pem-tests.ts diff --git a/pem/tsconfig.json b/types/pem/tsconfig.json similarity index 100% rename from pem/tsconfig.json rename to types/pem/tsconfig.json diff --git a/pem/tslint.json b/types/pem/tslint.json similarity index 100% rename from pem/tslint.json rename to types/pem/tslint.json diff --git a/perfect-scrollbar/index.d.ts b/types/perfect-scrollbar/index.d.ts similarity index 100% rename from perfect-scrollbar/index.d.ts rename to types/perfect-scrollbar/index.d.ts diff --git a/perfect-scrollbar/perfect-scrollbar-tests.ts b/types/perfect-scrollbar/perfect-scrollbar-tests.ts similarity index 100% rename from perfect-scrollbar/perfect-scrollbar-tests.ts rename to types/perfect-scrollbar/perfect-scrollbar-tests.ts diff --git a/perfect-scrollbar/tsconfig.json b/types/perfect-scrollbar/tsconfig.json similarity index 100% rename from perfect-scrollbar/tsconfig.json rename to types/perfect-scrollbar/tsconfig.json diff --git a/persona/index.d.ts b/types/persona/index.d.ts similarity index 100% rename from persona/index.d.ts rename to types/persona/index.d.ts diff --git a/persona/persona-tests.ts b/types/persona/persona-tests.ts similarity index 100% rename from persona/persona-tests.ts rename to types/persona/persona-tests.ts diff --git a/persona/tsconfig.json b/types/persona/tsconfig.json similarity index 100% rename from persona/tsconfig.json rename to types/persona/tsconfig.json diff --git a/pg-pool/index.d.ts b/types/pg-pool/index.d.ts similarity index 100% rename from pg-pool/index.d.ts rename to types/pg-pool/index.d.ts diff --git a/pg-pool/pg-pool-tests.ts b/types/pg-pool/pg-pool-tests.ts similarity index 100% rename from pg-pool/pg-pool-tests.ts rename to types/pg-pool/pg-pool-tests.ts diff --git a/pg-pool/tsconfig.json b/types/pg-pool/tsconfig.json similarity index 100% rename from pg-pool/tsconfig.json rename to types/pg-pool/tsconfig.json diff --git a/pg-promise/index.d.ts b/types/pg-promise/index.d.ts similarity index 100% rename from pg-promise/index.d.ts rename to types/pg-promise/index.d.ts diff --git a/pg-promise/tsconfig.json b/types/pg-promise/tsconfig.json similarity index 100% rename from pg-promise/tsconfig.json rename to types/pg-promise/tsconfig.json diff --git a/pg-query-stream/index.d.ts b/types/pg-query-stream/index.d.ts similarity index 81% rename from pg-query-stream/index.d.ts rename to types/pg-query-stream/index.d.ts index 1a7a694a6a..34331358e7 100644 --- a/pg-query-stream/index.d.ts +++ b/types/pg-query-stream/index.d.ts @@ -3,6 +3,10 @@ // Definitions by: António Marques // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// + +import stream = require("stream"); + declare namespace QueryStream { interface Options { highWaterMark?: number; @@ -10,7 +14,7 @@ declare namespace QueryStream { } } -declare class QueryStream { +declare class QueryStream extends stream.Readable { batchSize: number; text: string; values?: any[]; diff --git a/pg-query-stream/pg-query-stream-tests.ts b/types/pg-query-stream/pg-query-stream-tests.ts similarity index 100% rename from pg-query-stream/pg-query-stream-tests.ts rename to types/pg-query-stream/pg-query-stream-tests.ts diff --git a/pg-query-stream/tsconfig.json b/types/pg-query-stream/tsconfig.json similarity index 100% rename from pg-query-stream/tsconfig.json rename to types/pg-query-stream/tsconfig.json diff --git a/pg-query-stream/tslint.json b/types/pg-query-stream/tslint.json similarity index 100% rename from pg-query-stream/tslint.json rename to types/pg-query-stream/tslint.json diff --git a/pg-types/index.d.ts b/types/pg-types/index.d.ts similarity index 100% rename from pg-types/index.d.ts rename to types/pg-types/index.d.ts diff --git a/pg-types/package.json b/types/pg-types/package.json similarity index 100% rename from pg-types/package.json rename to types/pg-types/package.json diff --git a/pg-types/pg-types-tests.ts b/types/pg-types/pg-types-tests.ts similarity index 100% rename from pg-types/pg-types-tests.ts rename to types/pg-types/pg-types-tests.ts diff --git a/pg-types/tsconfig.json b/types/pg-types/tsconfig.json similarity index 100% rename from pg-types/tsconfig.json rename to types/pg-types/tsconfig.json diff --git a/pg/index.d.ts b/types/pg/index.d.ts similarity index 98% rename from pg/index.d.ts rename to types/pg/index.d.ts index ca3d6c0105..75d075700c 100644 --- a/pg/index.d.ts +++ b/types/pg/index.d.ts @@ -89,6 +89,7 @@ export declare class Client extends events.EventEmitter { end(callback?: (err: Error) => void): void; release(): void; + query(queryStream: QueryConfig & stream.Readable): stream.Readable; query(queryTextOrConfig: string | QueryConfig): Promise; query(queryText: string, values: any[]): Promise; diff --git a/pg/pg-tests.ts b/types/pg/pg-tests.ts similarity index 100% rename from pg/pg-tests.ts rename to types/pg/pg-tests.ts diff --git a/pg/tsconfig.json b/types/pg/tsconfig.json similarity index 100% rename from pg/tsconfig.json rename to types/pg/tsconfig.json diff --git a/pgwmodal/index.d.ts b/types/pgwmodal/index.d.ts similarity index 100% rename from pgwmodal/index.d.ts rename to types/pgwmodal/index.d.ts diff --git a/pgwmodal/pgwmodal-tests.ts b/types/pgwmodal/pgwmodal-tests.ts similarity index 100% rename from pgwmodal/pgwmodal-tests.ts rename to types/pgwmodal/pgwmodal-tests.ts diff --git a/pgwmodal/tsconfig.json b/types/pgwmodal/tsconfig.json similarity index 100% rename from pgwmodal/tsconfig.json rename to types/pgwmodal/tsconfig.json diff --git a/phantom/index.d.ts b/types/phantom/index.d.ts similarity index 99% rename from phantom/index.d.ts rename to types/phantom/index.d.ts index da6d270467..bd337dc624 100644 --- a/phantom/index.d.ts +++ b/types/phantom/index.d.ts @@ -47,7 +47,7 @@ export interface ICookie { path: string, httponly?: boolean, secure?: boolean, - expires?: Date + expires?: string } export interface IPaperSizeOptions { diff --git a/phantom/phantom-tests.ts b/types/phantom/phantom-tests.ts similarity index 100% rename from phantom/phantom-tests.ts rename to types/phantom/phantom-tests.ts diff --git a/phantom/tsconfig.json b/types/phantom/tsconfig.json similarity index 100% rename from phantom/tsconfig.json rename to types/phantom/tsconfig.json diff --git a/phantomcss/index.d.ts b/types/phantomcss/index.d.ts similarity index 100% rename from phantomcss/index.d.ts rename to types/phantomcss/index.d.ts diff --git a/phantomcss/phantomcss-tests.ts b/types/phantomcss/phantomcss-tests.ts similarity index 100% rename from phantomcss/phantomcss-tests.ts rename to types/phantomcss/phantomcss-tests.ts diff --git a/phantomcss/tsconfig.json b/types/phantomcss/tsconfig.json similarity index 100% rename from phantomcss/tsconfig.json rename to types/phantomcss/tsconfig.json diff --git a/phantomjs/index.d.ts b/types/phantomjs/index.d.ts similarity index 100% rename from phantomjs/index.d.ts rename to types/phantomjs/index.d.ts diff --git a/phantomjs/tsconfig.json b/types/phantomjs/tsconfig.json similarity index 100% rename from phantomjs/tsconfig.json rename to types/phantomjs/tsconfig.json diff --git a/phoenix/index.d.ts b/types/phoenix/index.d.ts similarity index 100% rename from phoenix/index.d.ts rename to types/phoenix/index.d.ts diff --git a/phoenix/phoenix-tests.ts b/types/phoenix/phoenix-tests.ts similarity index 100% rename from phoenix/phoenix-tests.ts rename to types/phoenix/phoenix-tests.ts diff --git a/phoenix/tsconfig.json b/types/phoenix/tsconfig.json similarity index 100% rename from phoenix/tsconfig.json rename to types/phoenix/tsconfig.json diff --git a/phone-formatter/index.d.ts b/types/phone-formatter/index.d.ts similarity index 100% rename from phone-formatter/index.d.ts rename to types/phone-formatter/index.d.ts diff --git a/phone-formatter/phone-formatter-tests.ts b/types/phone-formatter/phone-formatter-tests.ts similarity index 100% rename from phone-formatter/phone-formatter-tests.ts rename to types/phone-formatter/phone-formatter-tests.ts diff --git a/phone-formatter/tsconfig.json b/types/phone-formatter/tsconfig.json similarity index 100% rename from phone-formatter/tsconfig.json rename to types/phone-formatter/tsconfig.json diff --git a/phone/index.d.ts b/types/phone/index.d.ts similarity index 100% rename from phone/index.d.ts rename to types/phone/index.d.ts diff --git a/phone/phone-tests.ts b/types/phone/phone-tests.ts similarity index 100% rename from phone/phone-tests.ts rename to types/phone/phone-tests.ts diff --git a/phone/tsconfig.json b/types/phone/tsconfig.json similarity index 100% rename from phone/tsconfig.json rename to types/phone/tsconfig.json diff --git a/phonegap-facebook-plugin/index.d.ts b/types/phonegap-facebook-plugin/index.d.ts similarity index 100% rename from phonegap-facebook-plugin/index.d.ts rename to types/phonegap-facebook-plugin/index.d.ts diff --git a/phonegap-facebook-plugin/phonegap-facebook-plugin-tests.ts b/types/phonegap-facebook-plugin/phonegap-facebook-plugin-tests.ts similarity index 100% rename from phonegap-facebook-plugin/phonegap-facebook-plugin-tests.ts rename to types/phonegap-facebook-plugin/phonegap-facebook-plugin-tests.ts diff --git a/phonegap-facebook-plugin/tsconfig.json b/types/phonegap-facebook-plugin/tsconfig.json similarity index 100% rename from phonegap-facebook-plugin/tsconfig.json rename to types/phonegap-facebook-plugin/tsconfig.json diff --git a/phonegap-nfc/index.d.ts b/types/phonegap-nfc/index.d.ts similarity index 100% rename from phonegap-nfc/index.d.ts rename to types/phonegap-nfc/index.d.ts diff --git a/phonegap-nfc/phonegap-nfc-tests.ts b/types/phonegap-nfc/phonegap-nfc-tests.ts similarity index 100% rename from phonegap-nfc/phonegap-nfc-tests.ts rename to types/phonegap-nfc/phonegap-nfc-tests.ts diff --git a/phonegap-nfc/tsconfig.json b/types/phonegap-nfc/tsconfig.json similarity index 100% rename from phonegap-nfc/tsconfig.json rename to types/phonegap-nfc/tsconfig.json diff --git a/phonegap-plugin-barcodescanner/index.d.ts b/types/phonegap-plugin-barcodescanner/index.d.ts similarity index 100% rename from phonegap-plugin-barcodescanner/index.d.ts rename to types/phonegap-plugin-barcodescanner/index.d.ts diff --git a/phonegap-plugin-barcodescanner/phonegap-plugin-barcodescanner-tests.ts b/types/phonegap-plugin-barcodescanner/phonegap-plugin-barcodescanner-tests.ts similarity index 100% rename from phonegap-plugin-barcodescanner/phonegap-plugin-barcodescanner-tests.ts rename to types/phonegap-plugin-barcodescanner/phonegap-plugin-barcodescanner-tests.ts diff --git a/phonegap-plugin-barcodescanner/tsconfig.json b/types/phonegap-plugin-barcodescanner/tsconfig.json similarity index 100% rename from phonegap-plugin-barcodescanner/tsconfig.json rename to types/phonegap-plugin-barcodescanner/tsconfig.json diff --git a/phonegap-plugin-push/index.d.ts b/types/phonegap-plugin-push/index.d.ts similarity index 100% rename from phonegap-plugin-push/index.d.ts rename to types/phonegap-plugin-push/index.d.ts diff --git a/phonegap-plugin-push/phonegap-plugin-push-tests.ts b/types/phonegap-plugin-push/phonegap-plugin-push-tests.ts similarity index 100% rename from phonegap-plugin-push/phonegap-plugin-push-tests.ts rename to types/phonegap-plugin-push/phonegap-plugin-push-tests.ts diff --git a/phonegap-plugin-push/tsconfig.json b/types/phonegap-plugin-push/tsconfig.json similarity index 100% rename from phonegap-plugin-push/tsconfig.json rename to types/phonegap-plugin-push/tsconfig.json diff --git a/phonegap/index.d.ts b/types/phonegap/index.d.ts similarity index 100% rename from phonegap/index.d.ts rename to types/phonegap/index.d.ts diff --git a/phonegap/phonegap-tests.ts b/types/phonegap/phonegap-tests.ts similarity index 100% rename from phonegap/phonegap-tests.ts rename to types/phonegap/phonegap-tests.ts diff --git a/phonegap/tsconfig.json b/types/phonegap/tsconfig.json similarity index 100% rename from phonegap/tsconfig.json rename to types/phonegap/tsconfig.json diff --git a/phonon/index.d.ts b/types/phonon/index.d.ts similarity index 100% rename from phonon/index.d.ts rename to types/phonon/index.d.ts diff --git a/phonon/phonon-tests.ts b/types/phonon/phonon-tests.ts similarity index 100% rename from phonon/phonon-tests.ts rename to types/phonon/phonon-tests.ts diff --git a/phonon/tsconfig.json b/types/phonon/tsconfig.json similarity index 100% rename from phonon/tsconfig.json rename to types/phonon/tsconfig.json diff --git a/phonon/tslint.json b/types/phonon/tslint.json similarity index 100% rename from phonon/tslint.json rename to types/phonon/tslint.json diff --git a/photonui/index.d.ts b/types/photonui/index.d.ts similarity index 100% rename from photonui/index.d.ts rename to types/photonui/index.d.ts diff --git a/photonui/photonui-tests.ts b/types/photonui/photonui-tests.ts similarity index 100% rename from photonui/photonui-tests.ts rename to types/photonui/photonui-tests.ts diff --git a/photonui/tsconfig.json b/types/photonui/tsconfig.json similarity index 100% rename from photonui/tsconfig.json rename to types/photonui/tsconfig.json diff --git a/photoswipe/index.d.ts b/types/photoswipe/index.d.ts similarity index 100% rename from photoswipe/index.d.ts rename to types/photoswipe/index.d.ts diff --git a/photoswipe/photoswipe-tests.ts b/types/photoswipe/photoswipe-tests.ts similarity index 100% rename from photoswipe/photoswipe-tests.ts rename to types/photoswipe/photoswipe-tests.ts diff --git a/photoswipe/tsconfig.json b/types/photoswipe/tsconfig.json similarity index 100% rename from photoswipe/tsconfig.json rename to types/photoswipe/tsconfig.json diff --git a/physijs/index.d.ts b/types/physijs/index.d.ts similarity index 100% rename from physijs/index.d.ts rename to types/physijs/index.d.ts diff --git a/physijs/test/body.ts b/types/physijs/test/body.ts similarity index 100% rename from physijs/test/body.ts rename to types/physijs/test/body.ts diff --git a/physijs/test/collisions.ts b/types/physijs/test/collisions.ts similarity index 100% rename from physijs/test/collisions.ts rename to types/physijs/test/collisions.ts diff --git a/physijs/test/compound.ts b/types/physijs/test/compound.ts similarity index 100% rename from physijs/test/compound.ts rename to types/physijs/test/compound.ts diff --git a/physijs/test/constraints_car.ts b/types/physijs/test/constraints_car.ts similarity index 100% rename from physijs/test/constraints_car.ts rename to types/physijs/test/constraints_car.ts diff --git a/physijs/test/heightfield.ts b/types/physijs/test/heightfield.ts similarity index 100% rename from physijs/test/heightfield.ts rename to types/physijs/test/heightfield.ts diff --git a/physijs/test/jenga.ts b/types/physijs/test/jenga.ts similarity index 100% rename from physijs/test/jenga.ts rename to types/physijs/test/jenga.ts diff --git a/physijs/test/memorytest-compound.ts b/types/physijs/test/memorytest-compound.ts similarity index 100% rename from physijs/test/memorytest-compound.ts rename to types/physijs/test/memorytest-compound.ts diff --git a/physijs/test/memorytest-convex.ts b/types/physijs/test/memorytest-convex.ts similarity index 100% rename from physijs/test/memorytest-convex.ts rename to types/physijs/test/memorytest-convex.ts diff --git a/physijs/test/memorytest.ts b/types/physijs/test/memorytest.ts similarity index 100% rename from physijs/test/memorytest.ts rename to types/physijs/test/memorytest.ts diff --git a/physijs/test/shapes.ts b/types/physijs/test/shapes.ts similarity index 100% rename from physijs/test/shapes.ts rename to types/physijs/test/shapes.ts diff --git a/physijs/test/vehicle.ts b/types/physijs/test/vehicle.ts similarity index 100% rename from physijs/test/vehicle.ts rename to types/physijs/test/vehicle.ts diff --git a/physijs/tsconfig.json b/types/physijs/tsconfig.json similarity index 100% rename from physijs/tsconfig.json rename to types/physijs/tsconfig.json diff --git a/pi-spi/index.d.ts b/types/pi-spi/index.d.ts similarity index 100% rename from pi-spi/index.d.ts rename to types/pi-spi/index.d.ts diff --git a/pi-spi/pi-spi-tests.ts b/types/pi-spi/pi-spi-tests.ts similarity index 100% rename from pi-spi/pi-spi-tests.ts rename to types/pi-spi/pi-spi-tests.ts diff --git a/pi-spi/tsconfig.json b/types/pi-spi/tsconfig.json similarity index 100% rename from pi-spi/tsconfig.json rename to types/pi-spi/tsconfig.json diff --git a/pickadate/index.d.ts b/types/pickadate/index.d.ts similarity index 100% rename from pickadate/index.d.ts rename to types/pickadate/index.d.ts diff --git a/pickadate/pickadate-tests.ts b/types/pickadate/pickadate-tests.ts similarity index 100% rename from pickadate/pickadate-tests.ts rename to types/pickadate/pickadate-tests.ts diff --git a/pickadate/tsconfig.json b/types/pickadate/tsconfig.json similarity index 100% rename from pickadate/tsconfig.json rename to types/pickadate/tsconfig.json diff --git a/pify/index.d.ts b/types/pify/index.d.ts similarity index 100% rename from pify/index.d.ts rename to types/pify/index.d.ts diff --git a/pify/pify-tests.ts b/types/pify/pify-tests.ts similarity index 100% rename from pify/pify-tests.ts rename to types/pify/pify-tests.ts diff --git a/pify/tsconfig.json b/types/pify/tsconfig.json similarity index 100% rename from pify/tsconfig.json rename to types/pify/tsconfig.json diff --git a/pikaday-time/index.d.ts b/types/pikaday-time/index.d.ts similarity index 100% rename from pikaday-time/index.d.ts rename to types/pikaday-time/index.d.ts diff --git a/pikaday-time/package.json b/types/pikaday-time/package.json similarity index 100% rename from pikaday-time/package.json rename to types/pikaday-time/package.json diff --git a/pikaday-time/pikaday-time-tests.ts b/types/pikaday-time/pikaday-time-tests.ts similarity index 100% rename from pikaday-time/pikaday-time-tests.ts rename to types/pikaday-time/pikaday-time-tests.ts diff --git a/pikaday-time/tsconfig.json b/types/pikaday-time/tsconfig.json similarity index 100% rename from pikaday-time/tsconfig.json rename to types/pikaday-time/tsconfig.json diff --git a/pikaday-time/tslint.json b/types/pikaday-time/tslint.json similarity index 100% rename from pikaday-time/tslint.json rename to types/pikaday-time/tslint.json diff --git a/pikaday/index.d.ts b/types/pikaday/index.d.ts similarity index 100% rename from pikaday/index.d.ts rename to types/pikaday/index.d.ts diff --git a/pikaday/package.json b/types/pikaday/package.json similarity index 100% rename from pikaday/package.json rename to types/pikaday/package.json diff --git a/pikaday/pikaday-tests.ts b/types/pikaday/pikaday-tests.ts similarity index 100% rename from pikaday/pikaday-tests.ts rename to types/pikaday/pikaday-tests.ts diff --git a/pikaday/tsconfig.json b/types/pikaday/tsconfig.json similarity index 100% rename from pikaday/tsconfig.json rename to types/pikaday/tsconfig.json diff --git a/pinkyswear/index.d.ts b/types/pinkyswear/index.d.ts similarity index 100% rename from pinkyswear/index.d.ts rename to types/pinkyswear/index.d.ts diff --git a/pinkyswear/pinkyswear-tests.ts b/types/pinkyswear/pinkyswear-tests.ts similarity index 100% rename from pinkyswear/pinkyswear-tests.ts rename to types/pinkyswear/pinkyswear-tests.ts diff --git a/pinkyswear/tsconfig.json b/types/pinkyswear/tsconfig.json similarity index 100% rename from pinkyswear/tsconfig.json rename to types/pinkyswear/tsconfig.json diff --git a/pino/index.d.ts b/types/pino/index.d.ts similarity index 100% rename from pino/index.d.ts rename to types/pino/index.d.ts diff --git a/pino/pino-tests.ts b/types/pino/pino-tests.ts similarity index 100% rename from pino/pino-tests.ts rename to types/pino/pino-tests.ts diff --git a/pino/tsconfig.json b/types/pino/tsconfig.json similarity index 100% rename from pino/tsconfig.json rename to types/pino/tsconfig.json diff --git a/pinterest-sdk/index.d.ts b/types/pinterest-sdk/index.d.ts similarity index 100% rename from pinterest-sdk/index.d.ts rename to types/pinterest-sdk/index.d.ts diff --git a/pinterest-sdk/pinterest-sdk-tests.ts b/types/pinterest-sdk/pinterest-sdk-tests.ts similarity index 100% rename from pinterest-sdk/pinterest-sdk-tests.ts rename to types/pinterest-sdk/pinterest-sdk-tests.ts diff --git a/pinterest-sdk/tsconfig.json b/types/pinterest-sdk/tsconfig.json similarity index 100% rename from pinterest-sdk/tsconfig.json rename to types/pinterest-sdk/tsconfig.json diff --git a/piwik-tracker/index.d.ts b/types/piwik-tracker/index.d.ts similarity index 100% rename from piwik-tracker/index.d.ts rename to types/piwik-tracker/index.d.ts diff --git a/piwik-tracker/piwik-tracker-tests.ts b/types/piwik-tracker/piwik-tracker-tests.ts similarity index 100% rename from piwik-tracker/piwik-tracker-tests.ts rename to types/piwik-tracker/piwik-tracker-tests.ts diff --git a/piwik-tracker/tsconfig.json b/types/piwik-tracker/tsconfig.json similarity index 100% rename from piwik-tracker/tsconfig.json rename to types/piwik-tracker/tsconfig.json diff --git a/pixi.js/index.d.ts b/types/pixi.js/index.d.ts similarity index 100% rename from pixi.js/index.d.ts rename to types/pixi.js/index.d.ts diff --git a/pixi.js/pixi.js-tests.ts b/types/pixi.js/pixi.js-tests.ts similarity index 100% rename from pixi.js/pixi.js-tests.ts rename to types/pixi.js/pixi.js-tests.ts diff --git a/pixi.js/tsconfig.json b/types/pixi.js/tsconfig.json similarity index 100% rename from pixi.js/tsconfig.json rename to types/pixi.js/tsconfig.json diff --git a/pixi.js/tslint.json b/types/pixi.js/tslint.json similarity index 100% rename from pixi.js/tslint.json rename to types/pixi.js/tslint.json diff --git a/pkcs11js/index.d.ts b/types/pkcs11js/index.d.ts similarity index 100% rename from pkcs11js/index.d.ts rename to types/pkcs11js/index.d.ts diff --git a/pkcs11js/pkcs11js-tests.ts b/types/pkcs11js/pkcs11js-tests.ts similarity index 100% rename from pkcs11js/pkcs11js-tests.ts rename to types/pkcs11js/pkcs11js-tests.ts diff --git a/pkcs11js/tsconfig.json b/types/pkcs11js/tsconfig.json similarity index 100% rename from pkcs11js/tsconfig.json rename to types/pkcs11js/tsconfig.json diff --git a/pkijs/index.d.ts b/types/pkijs/index.d.ts similarity index 100% rename from pkijs/index.d.ts rename to types/pkijs/index.d.ts diff --git a/pkijs/pkijs-tests.ts b/types/pkijs/pkijs-tests.ts similarity index 100% rename from pkijs/pkijs-tests.ts rename to types/pkijs/pkijs-tests.ts diff --git a/pkijs/tsconfig.json b/types/pkijs/tsconfig.json similarity index 100% rename from pkijs/tsconfig.json rename to types/pkijs/tsconfig.json diff --git a/platform/index.d.ts b/types/platform/index.d.ts similarity index 52% rename from platform/index.d.ts rename to types/platform/index.d.ts index c02615b932..fd995a085e 100644 --- a/platform/index.d.ts +++ b/types/platform/index.d.ts @@ -1,10 +1,9 @@ -// Type definitions for Platform 1.0.0 +// Type definitions for Platform 1.3 // Project: https://github.com/bestiejs/platform.js // Definitions by: Jake Hickman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -interface PlatformStatic { +declare interface Platform { description?: string; layout?: string; manufacturer?: string; @@ -13,18 +12,19 @@ interface PlatformStatic { product?: string; ua?: string; version?: string; - os?: PlatformOS; - parse?(ua: string): PlatformStatic; + os?: { + architecture?: number; + family?: string; + version?: string; + toString(): string; + }; + parse?(ua: string): Platform; toString?(): string; } -interface PlatformOS { - architecture?: number; //platform's docs say this is a string, but their code doesn't agree - family?: string; - version?: string; - toString(): string; +declare var platform: Platform; + +declare module "platform" { + export = platform; } -declare var platform: PlatformStatic; - - diff --git a/platform/platform-tests.ts b/types/platform/platform-tests.ts similarity index 64% rename from platform/platform-tests.ts rename to types/platform/platform-tests.ts index ce24ada335..65433ffb13 100644 --- a/platform/platform-tests.ts +++ b/types/platform/platform-tests.ts @@ -1,11 +1,8 @@ - - -interface ITestContainer { - [name: string]: PlatformStatic; +interface TestContainer { + [name: string]: Platform; } - -var tests: ITestContainer = { +var tests: TestContainer = { 'Chrome Mobile 16.0.912.77 on Android 4.0.3': { description: "Chrome Mobile 16.0.912.77 on Android 4.0.3", layout: "WebKit", @@ -40,41 +37,36 @@ var tests: ITestContainer = { function runTests() { - var t: PlatformStatic; - var p: PlatformStatic; + var t: Platform; + var p: Platform; var x: string; var px: any; var res: boolean; var onFalse: (name: string) => () => any; - for (var n in tests) { - + for (const [n, value] of Object.entries(tests)) { t = tests[n]; p = platform.parse(t.ua); - onFalse = (name: string) => { return () => { console.log('\tfailed on prop "' + name + '" for "' + n + '"'); - } - } + }; + }; console.log('Starting tests for: ' + n); - falsy(() => { return t.description === p.description }, onFalse('description')); - falsy(() => { return t.layout === p.layout }, onFalse('layout')); - falsy(() => { return t.name === p.name }, onFalse('name')); - falsy(() => { return t.prerelease === p.prerelease }, onFalse('prerelease')); - falsy(() => { return t.ua === p.ua }, onFalse('ua')); - falsy(() => { return t.version === p.version }, onFalse('version')); - - falsy(() => { return t.os.architecture === p.os.architecture }, onFalse('os.architecture')); - falsy(() => { return t.os.family === p.os.family }, onFalse('os.family')); - falsy(() => { return t.os.version === p.os.version }, onFalse('os.version')); + falsy(() => t.description === p.description, onFalse('description')); + falsy(() => t.layout === p.layout, onFalse('layout')); + falsy(() => t.name === p.name, onFalse('name')); + falsy(() => t.prerelease === p.prerelease, onFalse('prerelease')); + falsy(() => t.ua === p.ua, onFalse('ua')); + falsy(() => t.version === p.version, onFalse('version')); + falsy(() => t.os.architecture === p.os.architecture, onFalse('os.architecture')); + falsy(() => t.os.family === p.os.family, onFalse('os.family')); + falsy(() => t.os.version === p.os.version, onFalse('os.version')); console.log('Finished tests for: ' + n); - - } } diff --git a/platform/tsconfig.json b/types/platform/tsconfig.json similarity index 95% rename from platform/tsconfig.json rename to types/platform/tsconfig.json index c7a29f12be..2efb10866a 100644 --- a/platform/tsconfig.json +++ b/types/platform/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6", + "es2017", "dom" ], "noImplicitAny": true, diff --git a/playerframework/index.d.ts b/types/playerframework/index.d.ts similarity index 100% rename from playerframework/index.d.ts rename to types/playerframework/index.d.ts diff --git a/playerframework/playerframework-tests.ts b/types/playerframework/playerframework-tests.ts similarity index 100% rename from playerframework/playerframework-tests.ts rename to types/playerframework/playerframework-tests.ts diff --git a/playerframework/tsconfig.json b/types/playerframework/tsconfig.json similarity index 100% rename from playerframework/tsconfig.json rename to types/playerframework/tsconfig.json diff --git a/pleasejs/index.d.ts b/types/pleasejs/index.d.ts similarity index 100% rename from pleasejs/index.d.ts rename to types/pleasejs/index.d.ts diff --git a/pleasejs/pleasejs-tests.ts b/types/pleasejs/pleasejs-tests.ts similarity index 100% rename from pleasejs/pleasejs-tests.ts rename to types/pleasejs/pleasejs-tests.ts diff --git a/pleasejs/tsconfig.json b/types/pleasejs/tsconfig.json similarity index 100% rename from pleasejs/tsconfig.json rename to types/pleasejs/tsconfig.json diff --git a/plotly.js/index.d.ts b/types/plotly.js/index.d.ts similarity index 100% rename from plotly.js/index.d.ts rename to types/plotly.js/index.d.ts diff --git a/plotly.js/plotly.js-tests.ts b/types/plotly.js/plotly.js-tests.ts similarity index 100% rename from plotly.js/plotly.js-tests.ts rename to types/plotly.js/plotly.js-tests.ts diff --git a/plotly.js/tsconfig.json b/types/plotly.js/tsconfig.json similarity index 100% rename from plotly.js/tsconfig.json rename to types/plotly.js/tsconfig.json diff --git a/plottable/index.d.ts b/types/plottable/index.d.ts similarity index 100% rename from plottable/index.d.ts rename to types/plottable/index.d.ts diff --git a/plottable/plottable-tests.ts b/types/plottable/plottable-tests.ts similarity index 100% rename from plottable/plottable-tests.ts rename to types/plottable/plottable-tests.ts diff --git a/plottable/tsconfig.json b/types/plottable/tsconfig.json similarity index 100% rename from plottable/tsconfig.json rename to types/plottable/tsconfig.json diff --git a/plugapi/index.d.ts b/types/plugapi/index.d.ts similarity index 100% rename from plugapi/index.d.ts rename to types/plugapi/index.d.ts diff --git a/plugapi/plugapi-tests.ts b/types/plugapi/plugapi-tests.ts similarity index 100% rename from plugapi/plugapi-tests.ts rename to types/plugapi/plugapi-tests.ts diff --git a/plugapi/tsconfig.json b/types/plugapi/tsconfig.json similarity index 100% rename from plugapi/tsconfig.json rename to types/plugapi/tsconfig.json diff --git a/plugapi/tslint.json b/types/plugapi/tslint.json similarity index 100% rename from plugapi/tslint.json rename to types/plugapi/tslint.json diff --git a/plupload/index.d.ts b/types/plupload/index.d.ts similarity index 100% rename from plupload/index.d.ts rename to types/plupload/index.d.ts diff --git a/plupload/plupload-tests.ts b/types/plupload/plupload-tests.ts similarity index 100% rename from plupload/plupload-tests.ts rename to types/plupload/plupload-tests.ts diff --git a/plupload/tsconfig.json b/types/plupload/tsconfig.json similarity index 100% rename from plupload/tsconfig.json rename to types/plupload/tsconfig.json diff --git a/pluralize/index.d.ts b/types/pluralize/index.d.ts similarity index 100% rename from pluralize/index.d.ts rename to types/pluralize/index.d.ts diff --git a/pluralize/pluralize-tests.ts b/types/pluralize/pluralize-tests.ts similarity index 100% rename from pluralize/pluralize-tests.ts rename to types/pluralize/pluralize-tests.ts diff --git a/pluralize/tsconfig.json b/types/pluralize/tsconfig.json similarity index 100% rename from pluralize/tsconfig.json rename to types/pluralize/tsconfig.json diff --git a/png-async/index.d.ts b/types/png-async/index.d.ts similarity index 100% rename from png-async/index.d.ts rename to types/png-async/index.d.ts diff --git a/png-async/png-async-tests.ts b/types/png-async/png-async-tests.ts similarity index 100% rename from png-async/png-async-tests.ts rename to types/png-async/png-async-tests.ts diff --git a/png-async/tsconfig.json b/types/png-async/tsconfig.json similarity index 100% rename from png-async/tsconfig.json rename to types/png-async/tsconfig.json diff --git a/pngjs2/index.d.ts b/types/pngjs2/index.d.ts similarity index 100% rename from pngjs2/index.d.ts rename to types/pngjs2/index.d.ts diff --git a/pngjs2/pngjs2-tests.ts b/types/pngjs2/pngjs2-tests.ts similarity index 100% rename from pngjs2/pngjs2-tests.ts rename to types/pngjs2/pngjs2-tests.ts diff --git a/pngjs2/tsconfig.json b/types/pngjs2/tsconfig.json similarity index 100% rename from pngjs2/tsconfig.json rename to types/pngjs2/tsconfig.json diff --git a/podcast/index.d.ts b/types/podcast/index.d.ts similarity index 100% rename from podcast/index.d.ts rename to types/podcast/index.d.ts diff --git a/podcast/podcast-tests.ts b/types/podcast/podcast-tests.ts similarity index 100% rename from podcast/podcast-tests.ts rename to types/podcast/podcast-tests.ts diff --git a/podcast/tsconfig.json b/types/podcast/tsconfig.json similarity index 100% rename from podcast/tsconfig.json rename to types/podcast/tsconfig.json diff --git a/point-in-polygon/index.d.ts b/types/point-in-polygon/index.d.ts similarity index 100% rename from point-in-polygon/index.d.ts rename to types/point-in-polygon/index.d.ts diff --git a/point-in-polygon/point-in-polygon-tests.ts b/types/point-in-polygon/point-in-polygon-tests.ts similarity index 100% rename from point-in-polygon/point-in-polygon-tests.ts rename to types/point-in-polygon/point-in-polygon-tests.ts diff --git a/point-in-polygon/tsconfig.json b/types/point-in-polygon/tsconfig.json similarity index 100% rename from point-in-polygon/tsconfig.json rename to types/point-in-polygon/tsconfig.json diff --git a/polylabel/index.d.ts b/types/polylabel/index.d.ts similarity index 100% rename from polylabel/index.d.ts rename to types/polylabel/index.d.ts diff --git a/polylabel/polylabel-tests.ts b/types/polylabel/polylabel-tests.ts similarity index 100% rename from polylabel/polylabel-tests.ts rename to types/polylabel/polylabel-tests.ts diff --git a/polylabel/tsconfig.json b/types/polylabel/tsconfig.json similarity index 100% rename from polylabel/tsconfig.json rename to types/polylabel/tsconfig.json diff --git a/polyline/index.d.ts b/types/polyline/index.d.ts similarity index 100% rename from polyline/index.d.ts rename to types/polyline/index.d.ts diff --git a/polyline/polyline-tests.ts b/types/polyline/polyline-tests.ts similarity index 100% rename from polyline/polyline-tests.ts rename to types/polyline/polyline-tests.ts diff --git a/polyline/tsconfig.json b/types/polyline/tsconfig.json similarity index 100% rename from polyline/tsconfig.json rename to types/polyline/tsconfig.json diff --git a/polymer-ts/index.d.ts b/types/polymer-ts/index.d.ts similarity index 100% rename from polymer-ts/index.d.ts rename to types/polymer-ts/index.d.ts diff --git a/polymer-ts/polymer-ts-tests.ts b/types/polymer-ts/polymer-ts-tests.ts similarity index 100% rename from polymer-ts/polymer-ts-tests.ts rename to types/polymer-ts/polymer-ts-tests.ts diff --git a/polymer-ts/tsconfig.json b/types/polymer-ts/tsconfig.json similarity index 100% rename from polymer-ts/tsconfig.json rename to types/polymer-ts/tsconfig.json diff --git a/polymer/index.d.ts b/types/polymer/index.d.ts similarity index 100% rename from polymer/index.d.ts rename to types/polymer/index.d.ts diff --git a/polymer/polymer-tests.ts b/types/polymer/polymer-tests.ts similarity index 100% rename from polymer/polymer-tests.ts rename to types/polymer/polymer-tests.ts diff --git a/polymer/tsconfig.json b/types/polymer/tsconfig.json similarity index 100% rename from polymer/tsconfig.json rename to types/polymer/tsconfig.json diff --git a/popcorn/index.d.ts b/types/popcorn/index.d.ts similarity index 100% rename from popcorn/index.d.ts rename to types/popcorn/index.d.ts diff --git a/popcorn/tsconfig.json b/types/popcorn/tsconfig.json similarity index 100% rename from popcorn/tsconfig.json rename to types/popcorn/tsconfig.json diff --git a/popper.js/index.d.ts b/types/popper.js/index.d.ts similarity index 100% rename from popper.js/index.d.ts rename to types/popper.js/index.d.ts diff --git a/popper.js/popper.js-tests.ts b/types/popper.js/popper.js-tests.ts similarity index 100% rename from popper.js/popper.js-tests.ts rename to types/popper.js/popper.js-tests.ts diff --git a/popper.js/tsconfig.json b/types/popper.js/tsconfig.json similarity index 100% rename from popper.js/tsconfig.json rename to types/popper.js/tsconfig.json diff --git a/postal/index.d.ts b/types/postal/index.d.ts similarity index 100% rename from postal/index.d.ts rename to types/postal/index.d.ts diff --git a/postal/postal-tests.ts b/types/postal/postal-tests.ts similarity index 100% rename from postal/postal-tests.ts rename to types/postal/postal-tests.ts diff --git a/postal/tsconfig.json b/types/postal/tsconfig.json similarity index 100% rename from postal/tsconfig.json rename to types/postal/tsconfig.json diff --git a/postal/v0/index.d.ts b/types/postal/v0/index.d.ts similarity index 100% rename from postal/v0/index.d.ts rename to types/postal/v0/index.d.ts diff --git a/postal/v0/tsconfig.json b/types/postal/v0/tsconfig.json similarity index 100% rename from postal/v0/tsconfig.json rename to types/postal/v0/tsconfig.json diff --git a/pouch-redux-middleware/index.d.ts b/types/pouch-redux-middleware/index.d.ts similarity index 100% rename from pouch-redux-middleware/index.d.ts rename to types/pouch-redux-middleware/index.d.ts diff --git a/pouch-redux-middleware/package.json b/types/pouch-redux-middleware/package.json similarity index 100% rename from pouch-redux-middleware/package.json rename to types/pouch-redux-middleware/package.json diff --git a/pouch-redux-middleware/pouch-redux-middleware-tests.ts b/types/pouch-redux-middleware/pouch-redux-middleware-tests.ts similarity index 100% rename from pouch-redux-middleware/pouch-redux-middleware-tests.ts rename to types/pouch-redux-middleware/pouch-redux-middleware-tests.ts diff --git a/pouch-redux-middleware/tsconfig.json b/types/pouch-redux-middleware/tsconfig.json similarity index 100% rename from pouch-redux-middleware/tsconfig.json rename to types/pouch-redux-middleware/tsconfig.json diff --git a/pouchdb-adapter-fruitdown/index.d.ts b/types/pouchdb-adapter-fruitdown/index.d.ts similarity index 100% rename from pouchdb-adapter-fruitdown/index.d.ts rename to types/pouchdb-adapter-fruitdown/index.d.ts diff --git a/pouchdb-adapter-fruitdown/pouchdb-adapter-fruitdown-tests.ts b/types/pouchdb-adapter-fruitdown/pouchdb-adapter-fruitdown-tests.ts similarity index 100% rename from pouchdb-adapter-fruitdown/pouchdb-adapter-fruitdown-tests.ts rename to types/pouchdb-adapter-fruitdown/pouchdb-adapter-fruitdown-tests.ts diff --git a/pouchdb-adapter-fruitdown/tsconfig.json b/types/pouchdb-adapter-fruitdown/tsconfig.json similarity index 100% rename from pouchdb-adapter-fruitdown/tsconfig.json rename to types/pouchdb-adapter-fruitdown/tsconfig.json diff --git a/pouchdb-adapter-http/index.d.ts b/types/pouchdb-adapter-http/index.d.ts similarity index 100% rename from pouchdb-adapter-http/index.d.ts rename to types/pouchdb-adapter-http/index.d.ts diff --git a/pouchdb-adapter-http/pouchdb-adapter-http-tests.ts b/types/pouchdb-adapter-http/pouchdb-adapter-http-tests.ts similarity index 100% rename from pouchdb-adapter-http/pouchdb-adapter-http-tests.ts rename to types/pouchdb-adapter-http/pouchdb-adapter-http-tests.ts diff --git a/pouchdb-adapter-http/tsconfig.json b/types/pouchdb-adapter-http/tsconfig.json similarity index 100% rename from pouchdb-adapter-http/tsconfig.json rename to types/pouchdb-adapter-http/tsconfig.json diff --git a/pouchdb-adapter-idb/index.d.ts b/types/pouchdb-adapter-idb/index.d.ts similarity index 100% rename from pouchdb-adapter-idb/index.d.ts rename to types/pouchdb-adapter-idb/index.d.ts diff --git a/pouchdb-adapter-idb/pouchdb-adapter-idb-tests.ts b/types/pouchdb-adapter-idb/pouchdb-adapter-idb-tests.ts similarity index 100% rename from pouchdb-adapter-idb/pouchdb-adapter-idb-tests.ts rename to types/pouchdb-adapter-idb/pouchdb-adapter-idb-tests.ts diff --git a/pouchdb-adapter-idb/tsconfig.json b/types/pouchdb-adapter-idb/tsconfig.json similarity index 100% rename from pouchdb-adapter-idb/tsconfig.json rename to types/pouchdb-adapter-idb/tsconfig.json diff --git a/pouchdb-adapter-leveldb/index.d.ts b/types/pouchdb-adapter-leveldb/index.d.ts similarity index 100% rename from pouchdb-adapter-leveldb/index.d.ts rename to types/pouchdb-adapter-leveldb/index.d.ts diff --git a/pouchdb-adapter-leveldb/pouchdb-adapter-leveldb-tests.ts b/types/pouchdb-adapter-leveldb/pouchdb-adapter-leveldb-tests.ts similarity index 100% rename from pouchdb-adapter-leveldb/pouchdb-adapter-leveldb-tests.ts rename to types/pouchdb-adapter-leveldb/pouchdb-adapter-leveldb-tests.ts diff --git a/pouchdb-adapter-leveldb/tsconfig.json b/types/pouchdb-adapter-leveldb/tsconfig.json similarity index 100% rename from pouchdb-adapter-leveldb/tsconfig.json rename to types/pouchdb-adapter-leveldb/tsconfig.json diff --git a/pouchdb-adapter-localstorage/index.d.ts b/types/pouchdb-adapter-localstorage/index.d.ts similarity index 100% rename from pouchdb-adapter-localstorage/index.d.ts rename to types/pouchdb-adapter-localstorage/index.d.ts diff --git a/pouchdb-adapter-localstorage/pouchdb-adapter-localstorage-tests.ts b/types/pouchdb-adapter-localstorage/pouchdb-adapter-localstorage-tests.ts similarity index 100% rename from pouchdb-adapter-localstorage/pouchdb-adapter-localstorage-tests.ts rename to types/pouchdb-adapter-localstorage/pouchdb-adapter-localstorage-tests.ts diff --git a/pouchdb-adapter-localstorage/tsconfig.json b/types/pouchdb-adapter-localstorage/tsconfig.json similarity index 100% rename from pouchdb-adapter-localstorage/tsconfig.json rename to types/pouchdb-adapter-localstorage/tsconfig.json diff --git a/pouchdb-adapter-memory/index.d.ts b/types/pouchdb-adapter-memory/index.d.ts similarity index 100% rename from pouchdb-adapter-memory/index.d.ts rename to types/pouchdb-adapter-memory/index.d.ts diff --git a/pouchdb-adapter-memory/pouchdb-adapter-memory-tests.ts b/types/pouchdb-adapter-memory/pouchdb-adapter-memory-tests.ts similarity index 100% rename from pouchdb-adapter-memory/pouchdb-adapter-memory-tests.ts rename to types/pouchdb-adapter-memory/pouchdb-adapter-memory-tests.ts diff --git a/pouchdb-adapter-memory/tsconfig.json b/types/pouchdb-adapter-memory/tsconfig.json similarity index 100% rename from pouchdb-adapter-memory/tsconfig.json rename to types/pouchdb-adapter-memory/tsconfig.json diff --git a/pouchdb-adapter-node-websql/index.d.ts b/types/pouchdb-adapter-node-websql/index.d.ts similarity index 100% rename from pouchdb-adapter-node-websql/index.d.ts rename to types/pouchdb-adapter-node-websql/index.d.ts diff --git a/pouchdb-adapter-node-websql/pouchdb-adapter-node-websql-tests.ts b/types/pouchdb-adapter-node-websql/pouchdb-adapter-node-websql-tests.ts similarity index 100% rename from pouchdb-adapter-node-websql/pouchdb-adapter-node-websql-tests.ts rename to types/pouchdb-adapter-node-websql/pouchdb-adapter-node-websql-tests.ts diff --git a/pouchdb-adapter-node-websql/tsconfig.json b/types/pouchdb-adapter-node-websql/tsconfig.json similarity index 100% rename from pouchdb-adapter-node-websql/tsconfig.json rename to types/pouchdb-adapter-node-websql/tsconfig.json diff --git a/pouchdb-adapter-websql/index.d.ts b/types/pouchdb-adapter-websql/index.d.ts similarity index 100% rename from pouchdb-adapter-websql/index.d.ts rename to types/pouchdb-adapter-websql/index.d.ts diff --git a/pouchdb-adapter-websql/pouchdb-adapter-websql-tests.ts b/types/pouchdb-adapter-websql/pouchdb-adapter-websql-tests.ts similarity index 100% rename from pouchdb-adapter-websql/pouchdb-adapter-websql-tests.ts rename to types/pouchdb-adapter-websql/pouchdb-adapter-websql-tests.ts diff --git a/pouchdb-adapter-websql/tsconfig.json b/types/pouchdb-adapter-websql/tsconfig.json similarity index 100% rename from pouchdb-adapter-websql/tsconfig.json rename to types/pouchdb-adapter-websql/tsconfig.json diff --git a/pouchdb-browser/index.d.ts b/types/pouchdb-browser/index.d.ts similarity index 100% rename from pouchdb-browser/index.d.ts rename to types/pouchdb-browser/index.d.ts diff --git a/pouchdb-browser/pouchdb-browser-tests.ts b/types/pouchdb-browser/pouchdb-browser-tests.ts similarity index 100% rename from pouchdb-browser/pouchdb-browser-tests.ts rename to types/pouchdb-browser/pouchdb-browser-tests.ts diff --git a/pouchdb-browser/tsconfig.json b/types/pouchdb-browser/tsconfig.json similarity index 100% rename from pouchdb-browser/tsconfig.json rename to types/pouchdb-browser/tsconfig.json diff --git a/pouchdb-core/index.d.ts b/types/pouchdb-core/index.d.ts similarity index 100% rename from pouchdb-core/index.d.ts rename to types/pouchdb-core/index.d.ts diff --git a/pouchdb-core/pouchdb-core-tests.ts b/types/pouchdb-core/pouchdb-core-tests.ts similarity index 100% rename from pouchdb-core/pouchdb-core-tests.ts rename to types/pouchdb-core/pouchdb-core-tests.ts diff --git a/pouchdb-core/tsconfig.json b/types/pouchdb-core/tsconfig.json similarity index 100% rename from pouchdb-core/tsconfig.json rename to types/pouchdb-core/tsconfig.json diff --git a/pouchdb-find/index.d.ts b/types/pouchdb-find/index.d.ts similarity index 100% rename from pouchdb-find/index.d.ts rename to types/pouchdb-find/index.d.ts diff --git a/pouchdb-find/pouchdb-find-tests.ts b/types/pouchdb-find/pouchdb-find-tests.ts similarity index 100% rename from pouchdb-find/pouchdb-find-tests.ts rename to types/pouchdb-find/pouchdb-find-tests.ts diff --git a/pouchdb-find/tsconfig.json b/types/pouchdb-find/tsconfig.json similarity index 100% rename from pouchdb-find/tsconfig.json rename to types/pouchdb-find/tsconfig.json diff --git a/pouchdb-http/index.d.ts b/types/pouchdb-http/index.d.ts similarity index 100% rename from pouchdb-http/index.d.ts rename to types/pouchdb-http/index.d.ts diff --git a/pouchdb-http/pouchdb-http-tests.ts b/types/pouchdb-http/pouchdb-http-tests.ts similarity index 100% rename from pouchdb-http/pouchdb-http-tests.ts rename to types/pouchdb-http/pouchdb-http-tests.ts diff --git a/pouchdb-http/tsconfig.json b/types/pouchdb-http/tsconfig.json similarity index 100% rename from pouchdb-http/tsconfig.json rename to types/pouchdb-http/tsconfig.json diff --git a/pouchdb-mapreduce/index.d.ts b/types/pouchdb-mapreduce/index.d.ts similarity index 100% rename from pouchdb-mapreduce/index.d.ts rename to types/pouchdb-mapreduce/index.d.ts diff --git a/pouchdb-mapreduce/pouchdb-mapreduce-tests.ts b/types/pouchdb-mapreduce/pouchdb-mapreduce-tests.ts similarity index 100% rename from pouchdb-mapreduce/pouchdb-mapreduce-tests.ts rename to types/pouchdb-mapreduce/pouchdb-mapreduce-tests.ts diff --git a/pouchdb-mapreduce/tsconfig.json b/types/pouchdb-mapreduce/tsconfig.json similarity index 100% rename from pouchdb-mapreduce/tsconfig.json rename to types/pouchdb-mapreduce/tsconfig.json diff --git a/pouchdb-node/index.d.ts b/types/pouchdb-node/index.d.ts similarity index 100% rename from pouchdb-node/index.d.ts rename to types/pouchdb-node/index.d.ts diff --git a/pouchdb-node/pouchdb-node-tests.ts b/types/pouchdb-node/pouchdb-node-tests.ts similarity index 100% rename from pouchdb-node/pouchdb-node-tests.ts rename to types/pouchdb-node/pouchdb-node-tests.ts diff --git a/pouchdb-node/tsconfig.json b/types/pouchdb-node/tsconfig.json similarity index 100% rename from pouchdb-node/tsconfig.json rename to types/pouchdb-node/tsconfig.json diff --git a/pouchdb-replication/index.d.ts b/types/pouchdb-replication/index.d.ts similarity index 100% rename from pouchdb-replication/index.d.ts rename to types/pouchdb-replication/index.d.ts diff --git a/pouchdb-replication/pouchdb-replication-tests.ts b/types/pouchdb-replication/pouchdb-replication-tests.ts similarity index 100% rename from pouchdb-replication/pouchdb-replication-tests.ts rename to types/pouchdb-replication/pouchdb-replication-tests.ts diff --git a/pouchdb-replication/tsconfig.json b/types/pouchdb-replication/tsconfig.json similarity index 100% rename from pouchdb-replication/tsconfig.json rename to types/pouchdb-replication/tsconfig.json diff --git a/pouchdb-upsert/index.d.ts b/types/pouchdb-upsert/index.d.ts similarity index 100% rename from pouchdb-upsert/index.d.ts rename to types/pouchdb-upsert/index.d.ts diff --git a/pouchdb-upsert/pouchdb-upsert-tests.ts b/types/pouchdb-upsert/pouchdb-upsert-tests.ts similarity index 100% rename from pouchdb-upsert/pouchdb-upsert-tests.ts rename to types/pouchdb-upsert/pouchdb-upsert-tests.ts diff --git a/pouchdb-upsert/tsconfig.json b/types/pouchdb-upsert/tsconfig.json similarity index 100% rename from pouchdb-upsert/tsconfig.json rename to types/pouchdb-upsert/tsconfig.json diff --git a/pouchdb/index.d.ts b/types/pouchdb/index.d.ts similarity index 100% rename from pouchdb/index.d.ts rename to types/pouchdb/index.d.ts diff --git a/pouchdb/pouchdb-tests.ts b/types/pouchdb/pouchdb-tests.ts similarity index 100% rename from pouchdb/pouchdb-tests.ts rename to types/pouchdb/pouchdb-tests.ts diff --git a/pouchdb/tsconfig.json b/types/pouchdb/tsconfig.json similarity index 100% rename from pouchdb/tsconfig.json rename to types/pouchdb/tsconfig.json diff --git a/power-assert-formatter/index.d.ts b/types/power-assert-formatter/index.d.ts similarity index 100% rename from power-assert-formatter/index.d.ts rename to types/power-assert-formatter/index.d.ts diff --git a/power-assert-formatter/power-assert-formatter-tests.ts b/types/power-assert-formatter/power-assert-formatter-tests.ts similarity index 100% rename from power-assert-formatter/power-assert-formatter-tests.ts rename to types/power-assert-formatter/power-assert-formatter-tests.ts diff --git a/power-assert-formatter/tsconfig.json b/types/power-assert-formatter/tsconfig.json similarity index 100% rename from power-assert-formatter/tsconfig.json rename to types/power-assert-formatter/tsconfig.json diff --git a/power-assert/index.d.ts b/types/power-assert/index.d.ts similarity index 100% rename from power-assert/index.d.ts rename to types/power-assert/index.d.ts diff --git a/power-assert/power-assert-tests.ts b/types/power-assert/power-assert-tests.ts similarity index 100% rename from power-assert/power-assert-tests.ts rename to types/power-assert/power-assert-tests.ts diff --git a/power-assert/tsconfig.json b/types/power-assert/tsconfig.json similarity index 100% rename from power-assert/tsconfig.json rename to types/power-assert/tsconfig.json diff --git a/precise/index.d.ts b/types/precise/index.d.ts similarity index 100% rename from precise/index.d.ts rename to types/precise/index.d.ts diff --git a/precise/precise-tests.ts b/types/precise/precise-tests.ts similarity index 100% rename from precise/precise-tests.ts rename to types/precise/precise-tests.ts diff --git a/precise/tsconfig.json b/types/precise/tsconfig.json similarity index 100% rename from precise/tsconfig.json rename to types/precise/tsconfig.json diff --git a/precond/index.d.ts b/types/precond/index.d.ts similarity index 100% rename from precond/index.d.ts rename to types/precond/index.d.ts diff --git a/precond/precond-tests.ts b/types/precond/precond-tests.ts similarity index 100% rename from precond/precond-tests.ts rename to types/precond/precond-tests.ts diff --git a/precond/tsconfig.json b/types/precond/tsconfig.json similarity index 100% rename from precond/tsconfig.json rename to types/precond/tsconfig.json diff --git a/preloadjs/index.d.ts b/types/preloadjs/index.d.ts similarity index 100% rename from preloadjs/index.d.ts rename to types/preloadjs/index.d.ts diff --git a/preloadjs/tsconfig.json b/types/preloadjs/tsconfig.json similarity index 100% rename from preloadjs/tsconfig.json rename to types/preloadjs/tsconfig.json diff --git a/prelude-ls/index.d.ts b/types/prelude-ls/index.d.ts similarity index 100% rename from prelude-ls/index.d.ts rename to types/prelude-ls/index.d.ts diff --git a/prelude-ls/prelude-ls-tests.ts b/types/prelude-ls/prelude-ls-tests.ts similarity index 100% rename from prelude-ls/prelude-ls-tests.ts rename to types/prelude-ls/prelude-ls-tests.ts diff --git a/prelude-ls/tsconfig.json b/types/prelude-ls/tsconfig.json similarity index 100% rename from prelude-ls/tsconfig.json rename to types/prelude-ls/tsconfig.json diff --git a/prettyjson/index.d.ts b/types/prettyjson/index.d.ts similarity index 100% rename from prettyjson/index.d.ts rename to types/prettyjson/index.d.ts diff --git a/prettyjson/prettyjson-tests.ts b/types/prettyjson/prettyjson-tests.ts similarity index 100% rename from prettyjson/prettyjson-tests.ts rename to types/prettyjson/prettyjson-tests.ts diff --git a/prettyjson/tsconfig.json b/types/prettyjson/tsconfig.json similarity index 100% rename from prettyjson/tsconfig.json rename to types/prettyjson/tsconfig.json diff --git a/printf/index.d.ts b/types/printf/index.d.ts similarity index 100% rename from printf/index.d.ts rename to types/printf/index.d.ts diff --git a/printf/printf-tests.ts b/types/printf/printf-tests.ts similarity index 100% rename from printf/printf-tests.ts rename to types/printf/printf-tests.ts diff --git a/printf/tsconfig.json b/types/printf/tsconfig.json similarity index 100% rename from printf/tsconfig.json rename to types/printf/tsconfig.json diff --git a/printf/tslint.json b/types/printf/tslint.json similarity index 100% rename from printf/tslint.json rename to types/printf/tslint.json diff --git a/priorityqueuejs/index.d.ts b/types/priorityqueuejs/index.d.ts similarity index 100% rename from priorityqueuejs/index.d.ts rename to types/priorityqueuejs/index.d.ts diff --git a/priorityqueuejs/priorityqueuejs-tests.ts b/types/priorityqueuejs/priorityqueuejs-tests.ts similarity index 100% rename from priorityqueuejs/priorityqueuejs-tests.ts rename to types/priorityqueuejs/priorityqueuejs-tests.ts diff --git a/priorityqueuejs/tsconfig.json b/types/priorityqueuejs/tsconfig.json similarity index 100% rename from priorityqueuejs/tsconfig.json rename to types/priorityqueuejs/tsconfig.json diff --git a/types/prismjs/index.d.ts b/types/prismjs/index.d.ts new file mode 100644 index 0000000000..531dfe9b8f --- /dev/null +++ b/types/prismjs/index.d.ts @@ -0,0 +1,217 @@ +// Type definitions for prism 1.6 +// Project: http://prismjs.com/ +// Definitions by: Erik Lieben , Andre Wiggins +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export as namespace Prism; + +/** + * @deprecated Use the Prism namespace directly directly + */ +export as namespace PrismJS; + +export const util: Util; +export const languages: Languages; +export const plugins: any; +export const hooks: Hooks; + +/** + * This is the most high-level function in Prism’s API. It fetches all the elements that have a .language-xxxx class and + * then calls Prism.highlightElement() on each one of them. + * + * @param {boolean} async Whether to use Web Workers to improve performance and avoid blocking the UI when highlighting + * very large chunks of code. False by default. + * @param {Function} callback An optional callback to be invoked after the highlighting is done. Mostly useful when async + * is true, since in that case, the highlighting is done asynchronously. + */ +export function highlightAll(async: boolean, callback?: (element: Element) => void): void; + +/** + * Highlights the code inside a single element. + * + * @param {Elment} element The element containing the code. It must have a class of language-xxxx to be processed, + * where xxxx is a valid language identifier. + * @param {boolean} async Whether to use Web Workers to improve performance and avoid blocking the UI when + * highlighting very large chunks of code. False by default. + * @param {Function} callback An optional callback to be invoked after the highlighting is done. + * Mostly useful when async is true, since in that case, the highlighting is done asynchronously. + */ +export function highlightElement(element: Element, async: boolean, callback?: (element: Element) => void): void; + + +/** + * Low-level function, only use if you know what you’re doing. It accepts a string of text as input and the language + * definitions to use, and returns a string with the HTML produced. + * + * @param {string} text A string with the code to be highlighted. + * @param {LanguageDefinition} grammer - An object containing the tokens to use. Usually a language definition like + * Prism.languages.markup + * @param {LanguageDefinition} language + * @returns {string} The highlighted HTML + */ +export function highlight(text: string, grammer: LanguageDefinition, language?: LanguageDefinition): string; + +/** + * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input and the + * language definitions to use, and returns an array with the tokenized code. When the language definition includes + * nested tokens, the function is called recursively on each of these tokens. This method could be useful in other + * contexts as well, as a very crude parser. + * + * @param {string} text A string with the code to be highlighted. + * @param {LanguageDefinition} grammar An object containing the tokens to use. Usually a language definition like + * Prism.languages.markup + * @returns {Array} An array of strings, tokens (class Prism.Token) and other arrays. + */ +export function tokenize(text: string, grammar: LanguageDefinition): Array; + +export function fileHighlight(): void; + +interface Environment { + element?: Element; + language?: LanguageDefinition; + grammar?: any; + code?: any; + highlightedCode?: any; + type?: string; + content?: string; + tag?: string; + classes?: string[]; + attributes?: any; + parent?: Element; +} + +interface Identifier { + value: number; +} + +interface Util { + /** Encode raw strings in tokens in preparation to display as HTML */ + encode(tokens: TokenNode): TokenNode; + + /** Determine the type of the object */ + type(o: any): string; + + /** Get the unique id of this object or give it one if it does not have one */ + objId(obj: any): Identifier; + + /** Deep clone a language definition (e.g. to extend it) */ + clone(o: LanguageDefinition): LanguageDefinition; +} + +interface LanguageDefinition { + keyword?: RegExp | LanguageDefinition; + number?: RegExp | LanguageDefinition; + function?: RegExp | LanguageDefinition; + string?: RegExp | LanguageDefinition; + boolean?: RegExp | LanguageDefinition; + operator?: RegExp | LanguageDefinition; + punctuation?: RegExp | LanguageDefinition; + atrule?: RegExp | LanguageDefinition; + url?: RegExp | LanguageDefinition; + selector?: RegExp | LanguageDefinition; + property?: RegExp | LanguageDefinition; + important?: RegExp | LanguageDefinition; + style?: RegExp | LanguageDefinition; + + /** + * This option can be used to define one or more aliases for the matched token. The result will be, that the styles + * of the token and its aliases are combined. This can be useful, to combine the styling of a well known token, + * which is already supported by most of the themes, with a semantically correct token name. The option can be + * set to a string literal or an array of string literals. In the following example the token name latex-equation + * is not supported by any theme, but it will be highlighted the same as a string. + */ + alias?: string; + + pattern?: RegExp; + + /** + * This option mitigates JavaScript’s lack of lookbehind. When set to true, the first capturing group in the regex + * pattern is discarded when matching this token, so it effectively behaves as if it was lookbehind + */ + lookbehind?: boolean; + + /** + * This property accepts another object literal, with tokens that are allowed to be nested in this token. + * This makes it easier to define certain languages. However, keep in mind that they’re slower and if coded poorly, + * can even result in infinite recursion. For an example of nested tokens, check out the Markup language definition + */ + inside?: LanguageDefinition; + + /** + * Accepts an object literal with tokens and appends them to the end of the current object literal. + */ + rest?: Token[]; +} + +interface Languages { + + /** Get a defined language's definition */ + [key: string]: LanguageDefinition; + + /** + * Extend a language definition + * @param id The language definition to extend + * @param redef The new language definition to extend the original + */ + extend(id: string, redef: LanguageDefinition): LanguageDefinition; + + /** + * Insert a token before another token in a language literal + * As this needs to recreate the object (we cannot actually insert before keys in object literals), + * we cannot just provide an object, we need anobject and a key. + * @param inside The key (or language id) of the parent + * @param before The key to insert before. If not provided, the function appends instead. + * @param insert Object with the key/value pairs to insert + * @param root The object that contains `inside`. If equal to Prism.languages, it can be omitted. + */ + insertBefore(inside: string, before: string, insert: LanguageDefinition, root: LanguageDefinition): any; +} + +type HookCallback = (env: Environment) => void; +type AvailableHooks = "before-highlightall" + | "before-sanity-check" + | "before-highlight" + | "before-insert" + | "after-highlight" + | "complete" + | "wrap"; + +interface Hooks { + all: Array void>>; + + add(name: AvailableHooks | string, callback: HookCallback): void; + + run(name: AvailableHooks | string, env: Environment): void; +} + +type TokenNode = Token | string | Array; + +export class Token { + /** + * Given a token or string input, convert it to highlighted HTML + * @param type The token(s) to stringify + * @param language The language definition that understands the given token(s) + * @param parent The parent element element to pass into hook callbacks + * @returns The HTML that represents the given token(s) + */ + static stringify(token: TokenNode, language: LanguageDefinition, parent: HTMLPreElement): string; + + /** + * The constructor for the Prism Token class + * @param type The type of the token + * @param content The contents of the token + * @param alias Aliases for the current token (added as classes to this token's HTML) + * @param matchedStr The matched string that generated this token + * @param greedy Value that determines whether or not this token was generated using a greedy parsing algorithm + */ + constructor(type: string, content: TokenNode, alias: any, matchedStr: string, greedy: boolean); + + /** The type of the token */ + type: string; + + /** The content of the token */ + content: TokenNode; + + /** Other names for this token (added as classes to this token's HTML) */ + alias: string; +} diff --git a/types/prismjs/prismjs-tests.ts b/types/prismjs/prismjs-tests.ts new file mode 100644 index 0000000000..137dad7ece --- /dev/null +++ b/types/prismjs/prismjs-tests.ts @@ -0,0 +1,24 @@ +var element = document.createElement("code"); +var callback = (element: Element) => console.log(element); + +Prism.highlightElement(element, false, callback); +Prism.highlightElement(element, false); +Prism.highlightAll(true, callback); +Prism.highlightAll(true); + +const hookCallback: Prism.HookCallback = env => null; +Prism.hooks.add("before-highlightall", hookCallback); +Prism.hooks.add("future-hook", hookCallback); + +var language = "js"; +var tokens = Prism.tokenize("var n = 1;", Prism.languages[language]); +(function visit(token: Prism.TokenNode): Prism.TokenNode { + if (typeof token === "string") { + return token; + } else if (Array.isArray(token)) { + return token.map(visit) as Prism.TokenNode; + } else { + token.alias += "visited"; + return token; + } +})(tokens); diff --git a/prismjs/tsconfig.json b/types/prismjs/tsconfig.json similarity index 92% rename from prismjs/tsconfig.json rename to types/prismjs/tsconfig.json index b01a635b30..0bd8440986 100644 --- a/prismjs/tsconfig.json +++ b/types/prismjs/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -20,4 +20,4 @@ "index.d.ts", "prismjs-tests.ts" ] -} \ No newline at end of file +} diff --git a/progressbar/tslint.json b/types/prismjs/tslint.json similarity index 100% rename from progressbar/tslint.json rename to types/prismjs/tslint.json diff --git a/progress/index.d.ts b/types/progress/index.d.ts similarity index 100% rename from progress/index.d.ts rename to types/progress/index.d.ts diff --git a/progress/progress-tests.ts b/types/progress/progress-tests.ts similarity index 100% rename from progress/progress-tests.ts rename to types/progress/progress-tests.ts diff --git a/progress/tsconfig.json b/types/progress/tsconfig.json similarity index 100% rename from progress/tsconfig.json rename to types/progress/tsconfig.json diff --git a/progressbar/index.d.ts b/types/progressbar/index.d.ts similarity index 100% rename from progressbar/index.d.ts rename to types/progressbar/index.d.ts diff --git a/progressbar/progressbar-tests.ts b/types/progressbar/progressbar-tests.ts similarity index 100% rename from progressbar/progressbar-tests.ts rename to types/progressbar/progressbar-tests.ts diff --git a/progressbar/tsconfig.json b/types/progressbar/tsconfig.json similarity index 100% rename from progressbar/tsconfig.json rename to types/progressbar/tsconfig.json diff --git a/promised-temp/tslint.json b/types/progressbar/tslint.json similarity index 100% rename from promised-temp/tslint.json rename to types/progressbar/tslint.json diff --git a/progressjs/index.d.ts b/types/progressjs/index.d.ts similarity index 100% rename from progressjs/index.d.ts rename to types/progressjs/index.d.ts diff --git a/progressjs/progressjs-tests.ts b/types/progressjs/progressjs-tests.ts similarity index 100% rename from progressjs/progressjs-tests.ts rename to types/progressjs/progressjs-tests.ts diff --git a/progressjs/tsconfig.json b/types/progressjs/tsconfig.json similarity index 100% rename from progressjs/tsconfig.json rename to types/progressjs/tsconfig.json diff --git a/proj4/index.d.ts b/types/proj4/index.d.ts similarity index 100% rename from proj4/index.d.ts rename to types/proj4/index.d.ts diff --git a/proj4/proj4-tests.ts b/types/proj4/proj4-tests.ts similarity index 100% rename from proj4/proj4-tests.ts rename to types/proj4/proj4-tests.ts diff --git a/proj4/tsconfig.json b/types/proj4/tsconfig.json similarity index 100% rename from proj4/tsconfig.json rename to types/proj4/tsconfig.json diff --git a/sitemap2/tslint.json b/types/proj4/tslint.json similarity index 100% rename from sitemap2/tslint.json rename to types/proj4/tslint.json diff --git a/project-oxford/index.d.ts b/types/project-oxford/index.d.ts similarity index 100% rename from project-oxford/index.d.ts rename to types/project-oxford/index.d.ts diff --git a/project-oxford/project-oxford-tests.ts b/types/project-oxford/project-oxford-tests.ts similarity index 100% rename from project-oxford/project-oxford-tests.ts rename to types/project-oxford/project-oxford-tests.ts diff --git a/project-oxford/tsconfig.json b/types/project-oxford/tsconfig.json similarity index 100% rename from project-oxford/tsconfig.json rename to types/project-oxford/tsconfig.json diff --git a/promise-pg/index.d.ts b/types/promise-pg/index.d.ts similarity index 100% rename from promise-pg/index.d.ts rename to types/promise-pg/index.d.ts diff --git a/promise-pg/promise-pg-tests.ts b/types/promise-pg/promise-pg-tests.ts similarity index 100% rename from promise-pg/promise-pg-tests.ts rename to types/promise-pg/promise-pg-tests.ts diff --git a/promise-pg/tsconfig.json b/types/promise-pg/tsconfig.json similarity index 100% rename from promise-pg/tsconfig.json rename to types/promise-pg/tsconfig.json diff --git a/promise-polyfill/index.d.ts b/types/promise-polyfill/index.d.ts similarity index 100% rename from promise-polyfill/index.d.ts rename to types/promise-polyfill/index.d.ts diff --git a/promise-polyfill/promise-polyfill-tests.ts b/types/promise-polyfill/promise-polyfill-tests.ts similarity index 100% rename from promise-polyfill/promise-polyfill-tests.ts rename to types/promise-polyfill/promise-polyfill-tests.ts diff --git a/promise-polyfill/tsconfig.json b/types/promise-polyfill/tsconfig.json similarity index 100% rename from promise-polyfill/tsconfig.json rename to types/promise-polyfill/tsconfig.json diff --git a/promise-pool/index.d.ts b/types/promise-pool/index.d.ts similarity index 100% rename from promise-pool/index.d.ts rename to types/promise-pool/index.d.ts diff --git a/promise-pool/promise-pool-tests.ts b/types/promise-pool/promise-pool-tests.ts similarity index 100% rename from promise-pool/promise-pool-tests.ts rename to types/promise-pool/promise-pool-tests.ts diff --git a/promise-pool/tsconfig.json b/types/promise-pool/tsconfig.json similarity index 100% rename from promise-pool/tsconfig.json rename to types/promise-pool/tsconfig.json diff --git a/promise.prototype.finally/index.d.ts b/types/promise.prototype.finally/index.d.ts similarity index 100% rename from promise.prototype.finally/index.d.ts rename to types/promise.prototype.finally/index.d.ts diff --git a/promise.prototype.finally/promise.prototype.finally-tests.ts b/types/promise.prototype.finally/promise.prototype.finally-tests.ts similarity index 100% rename from promise.prototype.finally/promise.prototype.finally-tests.ts rename to types/promise.prototype.finally/promise.prototype.finally-tests.ts diff --git a/promise.prototype.finally/tsconfig.json b/types/promise.prototype.finally/tsconfig.json similarity index 100% rename from promise.prototype.finally/tsconfig.json rename to types/promise.prototype.finally/tsconfig.json diff --git a/promise/index.d.ts b/types/promise/index.d.ts similarity index 100% rename from promise/index.d.ts rename to types/promise/index.d.ts diff --git a/promise/promise-tests.ts b/types/promise/promise-tests.ts similarity index 100% rename from promise/promise-tests.ts rename to types/promise/promise-tests.ts diff --git a/promise/tsconfig.json b/types/promise/tsconfig.json similarity index 100% rename from promise/tsconfig.json rename to types/promise/tsconfig.json diff --git a/promised-temp/index.d.ts b/types/promised-temp/index.d.ts similarity index 100% rename from promised-temp/index.d.ts rename to types/promised-temp/index.d.ts diff --git a/promised-temp/package.json b/types/promised-temp/package.json similarity index 100% rename from promised-temp/package.json rename to types/promised-temp/package.json diff --git a/promised-temp/promised-temp-tests.ts b/types/promised-temp/promised-temp-tests.ts similarity index 100% rename from promised-temp/promised-temp-tests.ts rename to types/promised-temp/promised-temp-tests.ts diff --git a/promised-temp/tsconfig.json b/types/promised-temp/tsconfig.json similarity index 100% rename from promised-temp/tsconfig.json rename to types/promised-temp/tsconfig.json diff --git a/protractor-browser-logs/tslint.json b/types/promised-temp/tslint.json similarity index 100% rename from protractor-browser-logs/tslint.json rename to types/promised-temp/tslint.json diff --git a/promisify-node/index.d.ts b/types/promisify-node/index.d.ts similarity index 100% rename from promisify-node/index.d.ts rename to types/promisify-node/index.d.ts diff --git a/promisify-node/promisify-node-tests.ts b/types/promisify-node/promisify-node-tests.ts similarity index 100% rename from promisify-node/promisify-node-tests.ts rename to types/promisify-node/promisify-node-tests.ts diff --git a/promisify-node/tsconfig.json b/types/promisify-node/tsconfig.json similarity index 100% rename from promisify-node/tsconfig.json rename to types/promisify-node/tsconfig.json diff --git a/promisify-supertest/index.d.ts b/types/promisify-supertest/index.d.ts similarity index 100% rename from promisify-supertest/index.d.ts rename to types/promisify-supertest/index.d.ts diff --git a/promisify-supertest/promisify-supertest-tests.ts b/types/promisify-supertest/promisify-supertest-tests.ts similarity index 100% rename from promisify-supertest/promisify-supertest-tests.ts rename to types/promisify-supertest/promisify-supertest-tests.ts diff --git a/promisify-supertest/tsconfig.json b/types/promisify-supertest/tsconfig.json similarity index 100% rename from promisify-supertest/tsconfig.json rename to types/promisify-supertest/tsconfig.json diff --git a/prompt-sync-history/index.d.ts b/types/prompt-sync-history/index.d.ts similarity index 100% rename from prompt-sync-history/index.d.ts rename to types/prompt-sync-history/index.d.ts diff --git a/prompt-sync-history/prompt-sync-history-tests.ts b/types/prompt-sync-history/prompt-sync-history-tests.ts similarity index 100% rename from prompt-sync-history/prompt-sync-history-tests.ts rename to types/prompt-sync-history/prompt-sync-history-tests.ts diff --git a/prompt-sync-history/tsconfig.json b/types/prompt-sync-history/tsconfig.json similarity index 100% rename from prompt-sync-history/tsconfig.json rename to types/prompt-sync-history/tsconfig.json diff --git a/prompt-sync/index.d.ts b/types/prompt-sync/index.d.ts similarity index 100% rename from prompt-sync/index.d.ts rename to types/prompt-sync/index.d.ts diff --git a/prompt-sync/prompt-sync-tests.ts b/types/prompt-sync/prompt-sync-tests.ts similarity index 100% rename from prompt-sync/prompt-sync-tests.ts rename to types/prompt-sync/prompt-sync-tests.ts diff --git a/prompt-sync/tsconfig.json b/types/prompt-sync/tsconfig.json similarity index 100% rename from prompt-sync/tsconfig.json rename to types/prompt-sync/tsconfig.json diff --git a/promptly/index.d.ts b/types/promptly/index.d.ts similarity index 100% rename from promptly/index.d.ts rename to types/promptly/index.d.ts diff --git a/promptly/promptly-tests.ts b/types/promptly/promptly-tests.ts similarity index 100% rename from promptly/promptly-tests.ts rename to types/promptly/promptly-tests.ts diff --git a/promptly/tsconfig.json b/types/promptly/tsconfig.json similarity index 100% rename from promptly/tsconfig.json rename to types/promptly/tsconfig.json diff --git a/prosemirror-collab/index.d.ts b/types/prosemirror-collab/index.d.ts similarity index 100% rename from prosemirror-collab/index.d.ts rename to types/prosemirror-collab/index.d.ts diff --git a/prosemirror-collab/prosemirror-collab-tests.ts b/types/prosemirror-collab/prosemirror-collab-tests.ts similarity index 100% rename from prosemirror-collab/prosemirror-collab-tests.ts rename to types/prosemirror-collab/prosemirror-collab-tests.ts diff --git a/prosemirror-collab/tsconfig.json b/types/prosemirror-collab/tsconfig.json similarity index 100% rename from prosemirror-collab/tsconfig.json rename to types/prosemirror-collab/tsconfig.json diff --git a/prosemirror-commands/index.d.ts b/types/prosemirror-commands/index.d.ts similarity index 100% rename from prosemirror-commands/index.d.ts rename to types/prosemirror-commands/index.d.ts diff --git a/prosemirror-commands/prosemirror-commands-tests.ts b/types/prosemirror-commands/prosemirror-commands-tests.ts similarity index 100% rename from prosemirror-commands/prosemirror-commands-tests.ts rename to types/prosemirror-commands/prosemirror-commands-tests.ts diff --git a/prosemirror-commands/tsconfig.json b/types/prosemirror-commands/tsconfig.json similarity index 100% rename from prosemirror-commands/tsconfig.json rename to types/prosemirror-commands/tsconfig.json diff --git a/prosemirror-history/index.d.ts b/types/prosemirror-history/index.d.ts similarity index 100% rename from prosemirror-history/index.d.ts rename to types/prosemirror-history/index.d.ts diff --git a/prosemirror-history/prosemirror-history-tests.ts b/types/prosemirror-history/prosemirror-history-tests.ts similarity index 100% rename from prosemirror-history/prosemirror-history-tests.ts rename to types/prosemirror-history/prosemirror-history-tests.ts diff --git a/prosemirror-history/tsconfig.json b/types/prosemirror-history/tsconfig.json similarity index 100% rename from prosemirror-history/tsconfig.json rename to types/prosemirror-history/tsconfig.json diff --git a/prosemirror-inputrules/index.d.ts b/types/prosemirror-inputrules/index.d.ts similarity index 100% rename from prosemirror-inputrules/index.d.ts rename to types/prosemirror-inputrules/index.d.ts diff --git a/prosemirror-inputrules/prosemirror-inputrules-tests.ts b/types/prosemirror-inputrules/prosemirror-inputrules-tests.ts similarity index 100% rename from prosemirror-inputrules/prosemirror-inputrules-tests.ts rename to types/prosemirror-inputrules/prosemirror-inputrules-tests.ts diff --git a/prosemirror-inputrules/tsconfig.json b/types/prosemirror-inputrules/tsconfig.json similarity index 100% rename from prosemirror-inputrules/tsconfig.json rename to types/prosemirror-inputrules/tsconfig.json diff --git a/prosemirror-keymap/index.d.ts b/types/prosemirror-keymap/index.d.ts similarity index 100% rename from prosemirror-keymap/index.d.ts rename to types/prosemirror-keymap/index.d.ts diff --git a/prosemirror-keymap/prosemirror-keymap-tests.ts b/types/prosemirror-keymap/prosemirror-keymap-tests.ts similarity index 100% rename from prosemirror-keymap/prosemirror-keymap-tests.ts rename to types/prosemirror-keymap/prosemirror-keymap-tests.ts diff --git a/prosemirror-keymap/tsconfig.json b/types/prosemirror-keymap/tsconfig.json similarity index 100% rename from prosemirror-keymap/tsconfig.json rename to types/prosemirror-keymap/tsconfig.json diff --git a/prosemirror-menu/index.d.ts b/types/prosemirror-menu/index.d.ts similarity index 100% rename from prosemirror-menu/index.d.ts rename to types/prosemirror-menu/index.d.ts diff --git a/prosemirror-menu/prosemirror-menu-tests.ts b/types/prosemirror-menu/prosemirror-menu-tests.ts similarity index 100% rename from prosemirror-menu/prosemirror-menu-tests.ts rename to types/prosemirror-menu/prosemirror-menu-tests.ts diff --git a/prosemirror-menu/tsconfig.json b/types/prosemirror-menu/tsconfig.json similarity index 100% rename from prosemirror-menu/tsconfig.json rename to types/prosemirror-menu/tsconfig.json diff --git a/prosemirror-model/index.d.ts b/types/prosemirror-model/index.d.ts similarity index 100% rename from prosemirror-model/index.d.ts rename to types/prosemirror-model/index.d.ts diff --git a/prosemirror-model/prosemirror-model-tests.ts b/types/prosemirror-model/prosemirror-model-tests.ts similarity index 100% rename from prosemirror-model/prosemirror-model-tests.ts rename to types/prosemirror-model/prosemirror-model-tests.ts diff --git a/prosemirror-model/tsconfig.json b/types/prosemirror-model/tsconfig.json similarity index 100% rename from prosemirror-model/tsconfig.json rename to types/prosemirror-model/tsconfig.json diff --git a/prosemirror-state/index.d.ts b/types/prosemirror-state/index.d.ts similarity index 100% rename from prosemirror-state/index.d.ts rename to types/prosemirror-state/index.d.ts diff --git a/prosemirror-state/prosemirror-state-tests.ts b/types/prosemirror-state/prosemirror-state-tests.ts similarity index 100% rename from prosemirror-state/prosemirror-state-tests.ts rename to types/prosemirror-state/prosemirror-state-tests.ts diff --git a/prosemirror-state/tsconfig.json b/types/prosemirror-state/tsconfig.json similarity index 100% rename from prosemirror-state/tsconfig.json rename to types/prosemirror-state/tsconfig.json diff --git a/prosemirror-transform/index.d.ts b/types/prosemirror-transform/index.d.ts similarity index 100% rename from prosemirror-transform/index.d.ts rename to types/prosemirror-transform/index.d.ts diff --git a/prosemirror-transform/prosemirror-transform-tests.ts b/types/prosemirror-transform/prosemirror-transform-tests.ts similarity index 100% rename from prosemirror-transform/prosemirror-transform-tests.ts rename to types/prosemirror-transform/prosemirror-transform-tests.ts diff --git a/prosemirror-transform/tsconfig.json b/types/prosemirror-transform/tsconfig.json similarity index 100% rename from prosemirror-transform/tsconfig.json rename to types/prosemirror-transform/tsconfig.json diff --git a/prosemirror-view/index.d.ts b/types/prosemirror-view/index.d.ts similarity index 100% rename from prosemirror-view/index.d.ts rename to types/prosemirror-view/index.d.ts diff --git a/prosemirror-view/prosemirror-view-tests.ts b/types/prosemirror-view/prosemirror-view-tests.ts similarity index 100% rename from prosemirror-view/prosemirror-view-tests.ts rename to types/prosemirror-view/prosemirror-view-tests.ts diff --git a/prosemirror-view/tsconfig.json b/types/prosemirror-view/tsconfig.json similarity index 100% rename from prosemirror-view/tsconfig.json rename to types/prosemirror-view/tsconfig.json diff --git a/protobufjs/index.d.ts b/types/protobufjs/index.d.ts similarity index 100% rename from protobufjs/index.d.ts rename to types/protobufjs/index.d.ts diff --git a/protobufjs/protobufjs-tests.ts b/types/protobufjs/protobufjs-tests.ts similarity index 100% rename from protobufjs/protobufjs-tests.ts rename to types/protobufjs/protobufjs-tests.ts diff --git a/protobufjs/tsconfig.json b/types/protobufjs/tsconfig.json similarity index 100% rename from protobufjs/tsconfig.json rename to types/protobufjs/tsconfig.json diff --git a/protractor-browser-logs/index.d.ts b/types/protractor-browser-logs/index.d.ts similarity index 100% rename from protractor-browser-logs/index.d.ts rename to types/protractor-browser-logs/index.d.ts diff --git a/protractor-browser-logs/package.json b/types/protractor-browser-logs/package.json similarity index 100% rename from protractor-browser-logs/package.json rename to types/protractor-browser-logs/package.json diff --git a/protractor-browser-logs/protractor-browser-logs-tests.ts b/types/protractor-browser-logs/protractor-browser-logs-tests.ts similarity index 100% rename from protractor-browser-logs/protractor-browser-logs-tests.ts rename to types/protractor-browser-logs/protractor-browser-logs-tests.ts diff --git a/protractor-browser-logs/tsconfig.json b/types/protractor-browser-logs/tsconfig.json similarity index 100% rename from protractor-browser-logs/tsconfig.json rename to types/protractor-browser-logs/tsconfig.json diff --git a/pulltorefreshjs/tslint.json b/types/protractor-browser-logs/tslint.json similarity index 100% rename from pulltorefreshjs/tslint.json rename to types/protractor-browser-logs/tslint.json diff --git a/protractor-helpers/index.d.ts b/types/protractor-helpers/index.d.ts similarity index 100% rename from protractor-helpers/index.d.ts rename to types/protractor-helpers/index.d.ts diff --git a/protractor-helpers/package.json b/types/protractor-helpers/package.json similarity index 100% rename from protractor-helpers/package.json rename to types/protractor-helpers/package.json diff --git a/protractor-helpers/protractor-helpers-tests.ts b/types/protractor-helpers/protractor-helpers-tests.ts similarity index 100% rename from protractor-helpers/protractor-helpers-tests.ts rename to types/protractor-helpers/protractor-helpers-tests.ts diff --git a/protractor-helpers/tsconfig.json b/types/protractor-helpers/tsconfig.json similarity index 100% rename from protractor-helpers/tsconfig.json rename to types/protractor-helpers/tsconfig.json diff --git a/protractor-http-mock/index.d.ts b/types/protractor-http-mock/index.d.ts similarity index 100% rename from protractor-http-mock/index.d.ts rename to types/protractor-http-mock/index.d.ts diff --git a/protractor-http-mock/package.json b/types/protractor-http-mock/package.json similarity index 100% rename from protractor-http-mock/package.json rename to types/protractor-http-mock/package.json diff --git a/protractor-http-mock/protractor-http-mock-tests.ts b/types/protractor-http-mock/protractor-http-mock-tests.ts similarity index 100% rename from protractor-http-mock/protractor-http-mock-tests.ts rename to types/protractor-http-mock/protractor-http-mock-tests.ts diff --git a/protractor-http-mock/tsconfig.json b/types/protractor-http-mock/tsconfig.json similarity index 100% rename from protractor-http-mock/tsconfig.json rename to types/protractor-http-mock/tsconfig.json diff --git a/proxyquire/index.d.ts b/types/proxyquire/index.d.ts similarity index 100% rename from proxyquire/index.d.ts rename to types/proxyquire/index.d.ts diff --git a/proxyquire/proxyquire-tests.ts b/types/proxyquire/proxyquire-tests.ts similarity index 100% rename from proxyquire/proxyquire-tests.ts rename to types/proxyquire/proxyquire-tests.ts diff --git a/proxyquire/tsconfig.json b/types/proxyquire/tsconfig.json similarity index 100% rename from proxyquire/tsconfig.json rename to types/proxyquire/tsconfig.json diff --git a/pty.js/index.d.ts b/types/pty.js/index.d.ts similarity index 100% rename from pty.js/index.d.ts rename to types/pty.js/index.d.ts diff --git a/pty.js/pty.js-tests.ts b/types/pty.js/pty.js-tests.ts similarity index 100% rename from pty.js/pty.js-tests.ts rename to types/pty.js/pty.js-tests.ts diff --git a/pty.js/tsconfig.json b/types/pty.js/tsconfig.json similarity index 100% rename from pty.js/tsconfig.json rename to types/pty.js/tsconfig.json diff --git a/pubsub-js/index.d.ts b/types/pubsub-js/index.d.ts similarity index 100% rename from pubsub-js/index.d.ts rename to types/pubsub-js/index.d.ts diff --git a/pubsub-js/pubsub-js-tests.ts b/types/pubsub-js/pubsub-js-tests.ts similarity index 100% rename from pubsub-js/pubsub-js-tests.ts rename to types/pubsub-js/pubsub-js-tests.ts diff --git a/pubsub-js/tsconfig.json b/types/pubsub-js/tsconfig.json similarity index 100% rename from pubsub-js/tsconfig.json rename to types/pubsub-js/tsconfig.json diff --git a/pug/index.d.ts b/types/pug/index.d.ts similarity index 100% rename from pug/index.d.ts rename to types/pug/index.d.ts diff --git a/pug/pug-tests.ts b/types/pug/pug-tests.ts similarity index 100% rename from pug/pug-tests.ts rename to types/pug/pug-tests.ts diff --git a/pug/tsconfig.json b/types/pug/tsconfig.json similarity index 100% rename from pug/tsconfig.json rename to types/pug/tsconfig.json diff --git a/pulltorefreshjs/index.d.ts b/types/pulltorefreshjs/index.d.ts similarity index 100% rename from pulltorefreshjs/index.d.ts rename to types/pulltorefreshjs/index.d.ts diff --git a/pulltorefreshjs/pulltorefreshjs-tests.ts b/types/pulltorefreshjs/pulltorefreshjs-tests.ts similarity index 100% rename from pulltorefreshjs/pulltorefreshjs-tests.ts rename to types/pulltorefreshjs/pulltorefreshjs-tests.ts diff --git a/pulltorefreshjs/tsconfig.json b/types/pulltorefreshjs/tsconfig.json similarity index 100% rename from pulltorefreshjs/tsconfig.json rename to types/pulltorefreshjs/tsconfig.json diff --git a/pump/tslint.json b/types/pulltorefreshjs/tslint.json similarity index 100% rename from pump/tslint.json rename to types/pulltorefreshjs/tslint.json diff --git a/pump/index.d.ts b/types/pump/index.d.ts similarity index 100% rename from pump/index.d.ts rename to types/pump/index.d.ts diff --git a/pump/pump-tests.ts b/types/pump/pump-tests.ts similarity index 100% rename from pump/pump-tests.ts rename to types/pump/pump-tests.ts diff --git a/pump/tsconfig.json b/types/pump/tsconfig.json similarity index 100% rename from pump/tsconfig.json rename to types/pump/tsconfig.json diff --git a/python-shell/tslint.json b/types/pump/tslint.json similarity index 100% rename from python-shell/tslint.json rename to types/pump/tslint.json diff --git a/pure-render-decorator/index.d.ts b/types/pure-render-decorator/index.d.ts similarity index 100% rename from pure-render-decorator/index.d.ts rename to types/pure-render-decorator/index.d.ts diff --git a/pure-render-decorator/pure-render-decorator-tests.ts b/types/pure-render-decorator/pure-render-decorator-tests.ts similarity index 100% rename from pure-render-decorator/pure-render-decorator-tests.ts rename to types/pure-render-decorator/pure-render-decorator-tests.ts diff --git a/pure-render-decorator/tsconfig.json b/types/pure-render-decorator/tsconfig.json similarity index 100% rename from pure-render-decorator/tsconfig.json rename to types/pure-render-decorator/tsconfig.json diff --git a/purl/index.d.ts b/types/purl/index.d.ts similarity index 100% rename from purl/index.d.ts rename to types/purl/index.d.ts diff --git a/purl/purl-jquery.d.ts b/types/purl/purl-jquery.d.ts similarity index 100% rename from purl/purl-jquery.d.ts rename to types/purl/purl-jquery.d.ts diff --git a/purl/tsconfig.json b/types/purl/tsconfig.json similarity index 100% rename from purl/tsconfig.json rename to types/purl/tsconfig.json diff --git a/pusher-js/index.d.ts b/types/pusher-js/index.d.ts similarity index 99% rename from pusher-js/index.d.ts rename to types/pusher-js/index.d.ts index ea097ff95f..0a9f3470b0 100644 --- a/pusher-js/index.d.ts +++ b/types/pusher-js/index.d.ts @@ -145,6 +145,7 @@ declare namespace pusher { key: string; options: any; //TODO: Timeline.js state: string; + socket_id: string; connection: any; //TODO: Type this encrypted: boolean; timeline: any; //TODO: Type this diff --git a/pusher-js/pusher-js-tests.ts b/types/pusher-js/pusher-js-tests.ts similarity index 100% rename from pusher-js/pusher-js-tests.ts rename to types/pusher-js/pusher-js-tests.ts diff --git a/pusher-js/tsconfig.json b/types/pusher-js/tsconfig.json similarity index 100% rename from pusher-js/tsconfig.json rename to types/pusher-js/tsconfig.json diff --git a/pvutils/index.d.ts b/types/pvutils/index.d.ts similarity index 100% rename from pvutils/index.d.ts rename to types/pvutils/index.d.ts diff --git a/pvutils/pvutils-tests.ts b/types/pvutils/pvutils-tests.ts similarity index 100% rename from pvutils/pvutils-tests.ts rename to types/pvutils/pvutils-tests.ts diff --git a/pvutils/tsconfig.json b/types/pvutils/tsconfig.json similarity index 100% rename from pvutils/tsconfig.json rename to types/pvutils/tsconfig.json diff --git a/python-shell/index.d.ts b/types/python-shell/index.d.ts similarity index 100% rename from python-shell/index.d.ts rename to types/python-shell/index.d.ts diff --git a/python-shell/python-shell-tests.ts b/types/python-shell/python-shell-tests.ts similarity index 100% rename from python-shell/python-shell-tests.ts rename to types/python-shell/python-shell-tests.ts diff --git a/python-shell/tsconfig.json b/types/python-shell/tsconfig.json similarity index 100% rename from python-shell/tsconfig.json rename to types/python-shell/tsconfig.json diff --git a/qrcode.react/tslint.json b/types/python-shell/tslint.json similarity index 100% rename from qrcode.react/tslint.json rename to types/python-shell/tslint.json diff --git a/q-io/index.d.ts b/types/q-io/index.d.ts similarity index 100% rename from q-io/index.d.ts rename to types/q-io/index.d.ts diff --git a/q-io/q-io-tests.ts b/types/q-io/q-io-tests.ts similarity index 100% rename from q-io/q-io-tests.ts rename to types/q-io/q-io-tests.ts diff --git a/q-io/tsconfig.json b/types/q-io/tsconfig.json similarity index 100% rename from q-io/tsconfig.json rename to types/q-io/tsconfig.json diff --git a/q-retry/index.d.ts b/types/q-retry/index.d.ts similarity index 100% rename from q-retry/index.d.ts rename to types/q-retry/index.d.ts diff --git a/q-retry/q-retry-tests.ts b/types/q-retry/q-retry-tests.ts similarity index 100% rename from q-retry/q-retry-tests.ts rename to types/q-retry/q-retry-tests.ts diff --git a/q-retry/tsconfig.json b/types/q-retry/tsconfig.json similarity index 100% rename from q-retry/tsconfig.json rename to types/q-retry/tsconfig.json diff --git a/q/index.d.ts b/types/q/index.d.ts similarity index 100% rename from q/index.d.ts rename to types/q/index.d.ts diff --git a/q/q-tests.ts b/types/q/q-tests.ts similarity index 100% rename from q/q-tests.ts rename to types/q/q-tests.ts diff --git a/q/tsconfig.json b/types/q/tsconfig.json similarity index 100% rename from q/tsconfig.json rename to types/q/tsconfig.json diff --git a/q/v0/index.d.ts b/types/q/v0/index.d.ts similarity index 100% rename from q/v0/index.d.ts rename to types/q/v0/index.d.ts diff --git a/q/v0/q-tests.ts b/types/q/v0/q-tests.ts similarity index 100% rename from q/v0/q-tests.ts rename to types/q/v0/q-tests.ts diff --git a/q/v0/tsconfig.json b/types/q/v0/tsconfig.json similarity index 100% rename from q/v0/tsconfig.json rename to types/q/v0/tsconfig.json diff --git a/qlik-visualizationextensions/index.d.ts b/types/qlik-visualizationextensions/index.d.ts similarity index 100% rename from qlik-visualizationextensions/index.d.ts rename to types/qlik-visualizationextensions/index.d.ts diff --git a/qlik-visualizationextensions/qlik-visualizationextensions-tests.ts b/types/qlik-visualizationextensions/qlik-visualizationextensions-tests.ts similarity index 100% rename from qlik-visualizationextensions/qlik-visualizationextensions-tests.ts rename to types/qlik-visualizationextensions/qlik-visualizationextensions-tests.ts diff --git a/qlik-visualizationextensions/tsconfig.json b/types/qlik-visualizationextensions/tsconfig.json similarity index 100% rename from qlik-visualizationextensions/tsconfig.json rename to types/qlik-visualizationextensions/tsconfig.json diff --git a/qlik-visualizationextensions/tslint.json b/types/qlik-visualizationextensions/tslint.json similarity index 100% rename from qlik-visualizationextensions/tslint.json rename to types/qlik-visualizationextensions/tslint.json diff --git a/qrcode-generator/index.d.ts b/types/qrcode-generator/index.d.ts similarity index 100% rename from qrcode-generator/index.d.ts rename to types/qrcode-generator/index.d.ts diff --git a/qrcode-generator/qrcode-generator-tests.ts b/types/qrcode-generator/qrcode-generator-tests.ts similarity index 100% rename from qrcode-generator/qrcode-generator-tests.ts rename to types/qrcode-generator/qrcode-generator-tests.ts diff --git a/qrcode-generator/tsconfig.json b/types/qrcode-generator/tsconfig.json similarity index 100% rename from qrcode-generator/tsconfig.json rename to types/qrcode-generator/tsconfig.json diff --git a/qrcode.react/index.d.ts b/types/qrcode.react/index.d.ts similarity index 100% rename from qrcode.react/index.d.ts rename to types/qrcode.react/index.d.ts diff --git a/qrcode.react/qrcode.react-tests.tsx b/types/qrcode.react/qrcode.react-tests.tsx similarity index 100% rename from qrcode.react/qrcode.react-tests.tsx rename to types/qrcode.react/qrcode.react-tests.tsx diff --git a/qrcode.react/tsconfig.json b/types/qrcode.react/tsconfig.json similarity index 100% rename from qrcode.react/tsconfig.json rename to types/qrcode.react/tsconfig.json diff --git a/random-seed/tslint.json b/types/qrcode.react/tslint.json similarity index 100% rename from random-seed/tslint.json rename to types/qrcode.react/tslint.json diff --git a/qrcode/index.d.ts b/types/qrcode/index.d.ts similarity index 100% rename from qrcode/index.d.ts rename to types/qrcode/index.d.ts diff --git a/qrcode/qrcode-tests.ts b/types/qrcode/qrcode-tests.ts similarity index 100% rename from qrcode/qrcode-tests.ts rename to types/qrcode/qrcode-tests.ts diff --git a/qrcode/tsconfig.json b/types/qrcode/tsconfig.json similarity index 100% rename from qrcode/tsconfig.json rename to types/qrcode/tsconfig.json diff --git a/qs/index.d.ts b/types/qs/index.d.ts similarity index 89% rename from qs/index.d.ts rename to types/qs/index.d.ts index c23c02f871..400cc7a1e4 100644 --- a/qs/index.d.ts +++ b/types/qs/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for qs 6.2.0 // Project: https://github.com/hapijs/qs -// Definitions by: Roman Korneev , Leon Yu +// Definitions by: Roman Korneev , Leon Yu , +// Belinda Teh // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export = QueryString; @@ -16,6 +17,7 @@ declare namespace QueryString { filter?: Array | ((prefix: string, value: any) => any); arrayFormat?: 'indices' | 'brackets' | 'repeat'; indices?: boolean; + sort?: (a: any, b: any) => number; } interface IParseOptions { diff --git a/types/qs/qs-tests.ts b/types/qs/qs-tests.ts new file mode 100644 index 0000000000..f3e5ca3230 --- /dev/null +++ b/types/qs/qs-tests.ts @@ -0,0 +1,256 @@ +import qs = require('qs'); +import * as assert from "power-assert"; + +qs.stringify({ a: 'b' }); +qs.stringify({ a: 'b', c: 'd' }, { delimiter: '&' }); + +qs.parse('a=b'); +qs.parse('a=b&c=d', { delimiter: '&' }); + +() => { + var obj = qs.parse('a=c'); + assert.deepEqual(obj, { a: 'c' }); + + var str = qs.stringify(obj); + assert.equal(str, 'a=c'); +} + +() => { + var plainObject = qs.parse('a[hasOwnProperty]=b', { plainObjects: true }); + assert.deepEqual(plainObject, { a: { hasOwnProperty: 'b' } }); +} + +() => { + var protoObject = qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }); + assert.deepEqual(protoObject, { a: { hasOwnProperty: 'b' } }); +} + +() => { + assert.deepEqual(qs.parse('a%5Bb%5D=c'), { + a: { b: 'c' } + }); +} + +() => { + assert.deepEqual(qs.parse('foo[bar][baz]=foobarbaz'), { + foo: { + bar: { + baz: 'foobarbaz' + } + } + }); +} + +() => { + var expected = { + a: { + b: { + c: { + d: { + e: { + f: { + '[g][h][i]': 'j' + } + } + } + } + } + } + }; + var string = 'a[b][c][d][e][f][g][h][i]=j'; + assert.deepEqual(qs.parse(string), expected); +} + +() => { + var deep = qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 }); + assert.deepEqual(deep, { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } }); +} + +() => { + var limited = qs.parse('a=b&c=d', { parameterLimit: 1 }); + assert.deepEqual(limited, { a: 'b' }); +} + +() => { + var delimited = qs.parse('a=b;c=d', { delimiter: ';' }); + assert.deepEqual(delimited, { a: 'b', c: 'd' }); +} + +() => { + var regexed = qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ }); + assert.deepEqual(regexed, { a: 'b', c: 'd', e: 'f' }); +} + +() => { + var withDots = qs.parse('a.b=c', { allowDots: true }); + assert.deepEqual(withDots, { a: { b: 'c' } }); +} + +() => { + var withArray = qs.parse('a[]=b&a[]=c'); + assert.deepEqual(withArray, { a: ['b', 'c'] }); +} + +() => { + var withIndexes = qs.parse('a[1]=c&a[0]=b'); + assert.deepEqual(withIndexes, { a: ['b', 'c'] }); +} + +() => { + var noSparse = qs.parse('a[1]=b&a[15]=c'); + assert.deepEqual(noSparse, { a: ['b', 'c'] }); +} + +() => { + var withEmptyString = qs.parse('a[]=&a[]=b'); + assert.deepEqual(withEmptyString, { a: ['', 'b'] }); + + var withIndexedEmptyString = qs.parse('a[0]=b&a[1]=&a[2]=c'); + assert.deepEqual(withIndexedEmptyString, { a: ['b', '', 'c'] }); +} + +() => { + var withMaxIndex = qs.parse('a[100]=b'); + assert.deepEqual(withMaxIndex, { a: { '100': 'b' } }); +} + +() => { + var withArrayLimit = qs.parse('a[1]=b', { arrayLimit: 0 }); + assert.deepEqual(withArrayLimit, { a: { '1': 'b' } }); +} + +() => { + var noParsingArrays = qs.parse('a[]=b', { parseArrays: false }); + assert.deepEqual(noParsingArrays, { a: { '0': 'b' } }); +} + +() => { + var mixedNotation = qs.parse('a[0]=b&a[b]=c'); + assert.deepEqual(mixedNotation, { a: { '0': 'b', b: 'c' } }); +} + +() => { + var arraysOfObjects = qs.parse('a[][b]=c'); + assert.deepEqual(arraysOfObjects, { a: [{ b: 'c' }] }); +} + +() => { + assert.equal(qs.stringify({ a: 'b' }), 'a=b'); + assert.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); +} + +() => { + var unencoded = qs.stringify({ a: { b: 'c' } }, { encode: false }); + assert.equal(unencoded, 'a[b]=c'); +} + +() => { + var encoded = qs.stringify({ a: { b: 'c' } }, { + encoder: function (str) { + // Passed in values `a`, `b`, `c` + return // Return encoded string + } + }) +} + +() => { + var decoded = qs.parse('x=z', { + decoder: function (str) { + // Passed in values `x`, `z` + return // Return decoded string + } + }) +} + +() => { + qs.stringify({ a: ['b', 'c', 'd'] }); + // 'a[0]=b&a[1]=c&a[2]=d' +} + +() => { + qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }); + // 'a=b&a=c&a=d' +} + +() => { + qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }) + // 'a[0]=b&a[1]=c' + qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }) + // 'a[]=b&a[]=c' + qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }) + // 'a=b&a=c' +} + +() => { + assert.equal(qs.stringify({ a: '' }), 'a='); +} + +() => { + assert.equal(qs.stringify({ a: null, b: undefined }), 'a='); +} + +() => { + assert.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); +} + +() => { + qs.stringify({ a: 'b', c: 'd', e: { f: new Date(123), g: [2] } }, { filter: function (prefix, value) { + if (prefix == 'b') { + // Return an `undefined` value to omit a property. + return; + } + if (prefix == 'e[f]') { + return value.getTime(); + } + if (prefix == 'e[g][0]') { + return value * 2; + } + return value; + } }); + // 'a=b&c=d&e[f]=123&e[g][0]=4' + qs.stringify({ a: 'b', c: 'd', e: 'f' }, { filter: ['a', 'e'] }); + // 'a=b&e=f' + qs.stringify({ a: ['b', 'c', 'd'], e: 'f' }, { filter: ['a', 0, 2] }); +} + +() => { + var withNull = qs.stringify({ a: null, b: '' }); + assert.equal(withNull, 'a=&b='); +} + +() => { + var equalsInsensitive = qs.parse('a&b='); + assert.deepEqual(equalsInsensitive, { a: '', b: '' }); +} + +() => { + var strictNull = qs.stringify({ a: null, b: '' }, { strictNullHandling: true }); + assert.equal(strictNull, 'a&b='); +} + +() => { + var parsedStrictNull = qs.parse('a&b=', { strictNullHandling: true }); + assert.deepEqual(parsedStrictNull, { a: null, b: '' }); +} + +() => { + var nullsSkipped = qs.stringify({ a: 'b', c: null }, { skipNulls: true }); + assert.equal(nullsSkipped, 'a=b'); +} + +() => { + var encoder = () => {}; + var shiftJISEncoded = qs.stringify({ a: 'こんにちは!' }, { encoder: encoder }); + assert.equal(shiftJISEncoded, 'a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I'); +} + +() => { + var decoder = () => {}; + var obj = qs.parse('a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I', { decoder: decoder }); + assert.deepEqual(obj, { a: 'こんにちは!' }); +} + +() => { + var sorted = qs.stringify({ a: 1, c: 3, b: 2 }, { sort: (a, b) => a.localeCompare(b) }) + assert.equal(sorted, 'a=1&b=2&c=3') +} diff --git a/qs/tsconfig.json b/types/qs/tsconfig.json similarity index 100% rename from qs/tsconfig.json rename to types/qs/tsconfig.json diff --git a/qtip2/index.d.ts b/types/qtip2/index.d.ts similarity index 100% rename from qtip2/index.d.ts rename to types/qtip2/index.d.ts diff --git a/qtip2/qtip2-tests.ts b/types/qtip2/qtip2-tests.ts similarity index 100% rename from qtip2/qtip2-tests.ts rename to types/qtip2/qtip2-tests.ts diff --git a/qtip2/tsconfig.json b/types/qtip2/tsconfig.json similarity index 100% rename from qtip2/tsconfig.json rename to types/qtip2/tsconfig.json diff --git a/query-string/index.d.ts b/types/query-string/index.d.ts similarity index 57% rename from query-string/index.d.ts rename to types/query-string/index.d.ts index dcc9bfafb5..4021bb524b 100644 --- a/query-string/index.d.ts +++ b/types/query-string/index.d.ts @@ -1,26 +1,34 @@ -// Type definitions for query-string v3.0.0 +// Type definitions for query-string 4.3 // Project: https://github.com/sindresorhus/query-string -// Definitions by: Sam Verschueren +// Definitions by: Sam Verschueren , Tanguy Krotoff // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 declare module "query-string" { - - interface StringifyOptions { strict?: boolean; encode?: boolean; } + interface ParseOptions { + arrayFormat?: 'bracket' | 'index' | 'none'; + } /** * Parse a query string into an object. * Leading ? or # are ignored, so you can pass location.search or location.hash directly. * @param str */ - export function parse(str: string): { [key: string]: string | string[] | null }; + export function parse(str: string, options?: ParseOptions): any; + + interface StringifyOptions { + strict?: boolean; + encode?: boolean; + arrayFormat?: 'bracket' | 'index' | 'none'; + } /** * Stringify an object into a query string, sorting the keys. * * @param obj */ - export function stringify(obj: any, options?: StringifyOptions): string; + export function stringify(obj: object, options?: StringifyOptions): string; /** * Extract a query string from a URL that can be passed into .parse(). diff --git a/types/query-string/query-string-tests.ts b/types/query-string/query-string-tests.ts new file mode 100644 index 0000000000..32dd186c83 --- /dev/null +++ b/types/query-string/query-string-tests.ts @@ -0,0 +1,34 @@ +import * as queryString from 'query-string'; + +namespace stringify_tests { + let result: string; + // test obj + result = queryString.stringify({ + str: 'bar', + strArray: ['baz'], + num: 123, + numArray: [456], + bool: true, + boolArray: [false] + }); + + // test options + result = queryString.stringify({ foo: 'bar' }, { strict: false }); + result = queryString.stringify({ foo: 'bar' }, { encode: false }); + result = queryString.stringify({ foo: 'bar' }, { strict: false, encode: false }); +} + +namespace parse_tests { + let fooBar: { foo: 'bar' }; + fooBar = queryString.parse('?foo=bar'); + fooBar = queryString.parse('#foo=bar'); + + let fooBarBaz: { foo: ['bar', 'baz'] }; + fooBarBaz = queryString.parse('&foo=bar&foo=baz'); +} + +namespace extract_tests { + let result: string; + result = queryString.extract('http://foo.bar/?abc=def&hij=klm'); + result = queryString.extract('http://foo.bar/?foo=bar'); +} diff --git a/query-string/tsconfig.json b/types/query-string/tsconfig.json similarity index 100% rename from query-string/tsconfig.json rename to types/query-string/tsconfig.json diff --git a/types/query-string/tslint.json b/types/query-string/tslint.json new file mode 100644 index 0000000000..cfdf2986e5 --- /dev/null +++ b/types/query-string/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "../tslint.json", + "rules": { + "no-single-declare-module": false + } +} diff --git a/quill/index.d.ts b/types/quill/index.d.ts similarity index 100% rename from quill/index.d.ts rename to types/quill/index.d.ts diff --git a/quill/quill-tests.ts b/types/quill/quill-tests.ts similarity index 100% rename from quill/quill-tests.ts rename to types/quill/quill-tests.ts diff --git a/quill/tsconfig.json b/types/quill/tsconfig.json similarity index 100% rename from quill/tsconfig.json rename to types/quill/tsconfig.json diff --git a/quixote/index.d.ts b/types/quixote/index.d.ts similarity index 100% rename from quixote/index.d.ts rename to types/quixote/index.d.ts diff --git a/quixote/quixote-tests.ts b/types/quixote/quixote-tests.ts similarity index 100% rename from quixote/quixote-tests.ts rename to types/quixote/quixote-tests.ts diff --git a/quixote/tsconfig.json b/types/quixote/tsconfig.json similarity index 100% rename from quixote/tsconfig.json rename to types/quixote/tsconfig.json diff --git a/qunit/index.d.ts b/types/qunit/index.d.ts similarity index 100% rename from qunit/index.d.ts rename to types/qunit/index.d.ts diff --git a/qunit/qunit-tests.ts b/types/qunit/qunit-tests.ts similarity index 100% rename from qunit/qunit-tests.ts rename to types/qunit/qunit-tests.ts diff --git a/qunit/tsconfig.json b/types/qunit/tsconfig.json similarity index 100% rename from qunit/tsconfig.json rename to types/qunit/tsconfig.json diff --git a/qunit/v1/index.d.ts b/types/qunit/v1/index.d.ts similarity index 100% rename from qunit/v1/index.d.ts rename to types/qunit/v1/index.d.ts diff --git a/qunit/v1/qunit-tests.ts b/types/qunit/v1/qunit-tests.ts similarity index 100% rename from qunit/v1/qunit-tests.ts rename to types/qunit/v1/qunit-tests.ts diff --git a/qunit/v1/tsconfig.json b/types/qunit/v1/tsconfig.json similarity index 100% rename from qunit/v1/tsconfig.json rename to types/qunit/v1/tsconfig.json diff --git a/quoted-printable/index.d.ts b/types/quoted-printable/index.d.ts similarity index 100% rename from quoted-printable/index.d.ts rename to types/quoted-printable/index.d.ts diff --git a/quoted-printable/quoted-printable-tests.ts b/types/quoted-printable/quoted-printable-tests.ts similarity index 100% rename from quoted-printable/quoted-printable-tests.ts rename to types/quoted-printable/quoted-printable-tests.ts diff --git a/quoted-printable/tsconfig.json b/types/quoted-printable/tsconfig.json similarity index 100% rename from quoted-printable/tsconfig.json rename to types/quoted-printable/tsconfig.json diff --git a/qwest/index.d.ts b/types/qwest/index.d.ts similarity index 100% rename from qwest/index.d.ts rename to types/qwest/index.d.ts diff --git a/qwest/qwest-tests.ts b/types/qwest/qwest-tests.ts similarity index 100% rename from qwest/qwest-tests.ts rename to types/qwest/qwest-tests.ts diff --git a/qwest/tsconfig.json b/types/qwest/tsconfig.json similarity index 100% rename from qwest/tsconfig.json rename to types/qwest/tsconfig.json diff --git a/rabbit.js/index.d.ts b/types/rabbit.js/index.d.ts similarity index 100% rename from rabbit.js/index.d.ts rename to types/rabbit.js/index.d.ts diff --git a/rabbit.js/rabbit.js-tests.ts b/types/rabbit.js/rabbit.js-tests.ts similarity index 100% rename from rabbit.js/rabbit.js-tests.ts rename to types/rabbit.js/rabbit.js-tests.ts diff --git a/rabbit.js/tsconfig.json b/types/rabbit.js/tsconfig.json similarity index 100% rename from rabbit.js/tsconfig.json rename to types/rabbit.js/tsconfig.json diff --git a/ractive/index.d.ts b/types/ractive/index.d.ts similarity index 100% rename from ractive/index.d.ts rename to types/ractive/index.d.ts diff --git a/ractive/ractive-tests.ts b/types/ractive/ractive-tests.ts similarity index 100% rename from ractive/ractive-tests.ts rename to types/ractive/ractive-tests.ts diff --git a/ractive/tsconfig.json b/types/ractive/tsconfig.json similarity index 100% rename from ractive/tsconfig.json rename to types/ractive/tsconfig.json diff --git a/radium/index.d.ts b/types/radium/index.d.ts similarity index 100% rename from radium/index.d.ts rename to types/radium/index.d.ts diff --git a/radium/radium-tests.tsx b/types/radium/radium-tests.tsx similarity index 100% rename from radium/radium-tests.tsx rename to types/radium/radium-tests.tsx diff --git a/radium/tsconfig.json b/types/radium/tsconfig.json similarity index 100% rename from radium/tsconfig.json rename to types/radium/tsconfig.json diff --git a/radius/index.d.ts b/types/radius/index.d.ts similarity index 100% rename from radius/index.d.ts rename to types/radius/index.d.ts diff --git a/radius/radius-tests.ts b/types/radius/radius-tests.ts similarity index 100% rename from radius/radius-tests.ts rename to types/radius/radius-tests.ts diff --git a/radius/tsconfig.json b/types/radius/tsconfig.json similarity index 100% rename from radius/tsconfig.json rename to types/radius/tsconfig.json diff --git a/ramda/index.d.ts b/types/ramda/index.d.ts similarity index 98% rename from ramda/index.d.ts rename to types/ramda/index.d.ts index 3e79c3cd4c..aa84cad395 100644 --- a/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -8,6 +8,8 @@ declare var R: R.Static; declare namespace R { type Ord = number | string | boolean; + type Path = (number | string)[]; + interface ListIterator { (value: T, index: number, list: T[]): TResult; } @@ -221,9 +223,9 @@ declare namespace R { * Makes a shallow clone of an object, setting or overriding the nodes required to create the given path, and * placing the specific value at the tail end of that path. */ - assocPath(path: string[], val: T, obj: U): U; - assocPath(path: string[]): (val: T, obj: U) => U; - assocPath(path: string[], val: T): (obj: U) => U; + assocPath(path: Path, val: T, obj: U): U; + assocPath(path: Path, val: T): (obj: U) => U; + assocPath(path: Path): CurriedFunction2; /** * Wraps a function of any arity (including nullary) in a function that accepts exactly 2 @@ -439,8 +441,8 @@ declare namespace R { /** * Makes a shallow clone of an object, omitting the property at the given path. */ - dissocPath(path: string[], obj: any): T; - dissocPath(path: string[]): (obj: any) => T; + dissocPath(path: Path, obj: any): T; + dissocPath(path: Path): (obj: any) => T; /** * Divides two numbers. Equivalent to a / b. @@ -838,7 +840,7 @@ declare namespace R { * Returns a lens whose focus is the specified path. * See also view, set, over. */ - lensPath(path: string[]): Lens; + lensPath(path: Path): Lens; /** * lensProp creates a lens that will focus on property k of the source object. @@ -1129,26 +1131,24 @@ declare namespace R { /** * Retrieve the value at a given path. */ - path(path: string[], obj: any): T; - path(path: string[]): (obj: any) => T; + path(path: Path, obj: any): T; + path(path: Path): (obj: any) => T; /** * Determines whether a nested path on an object has a specific value, * in `R.equals` terms. Most likely used to filter a list. */ - pathEq(path: string[], val: any, obj: any): boolean; - pathEq(path: string[], val: any): (obj: any) => boolean; - pathEq(path: string[]): (val: any, obj: any) => boolean; - pathEq(path: string[]): (val: any) => (obj: any) => boolean; + pathEq(path: Path, val: any, obj: any): boolean; + pathEq(path: Path, val: any): (obj: any) => boolean; + pathEq(path: Path): CurriedFunction2; /** * If the given, non-null object has a value at the given path, returns the value at that path. * Otherwise returns the provided default value. */ - pathOr(d: T, p: string[], obj: any): T|any; - pathOr(d: T, p: string[]): (obj: any) => T|any; - pathOr(d: T): (p: string[], obj: any) => T|any; - + pathOr(d: T, p: Path, obj: any): T|any; + pathOr(d: T, p: Path): (obj: any) => T|any; + pathOr(d: T): CurriedFunction2; /** * Returns a partial copy of an object containing only the keys specified. If the key does not exist, the diff --git a/ramda/ramda-tests.ts b/types/ramda/ramda-tests.ts similarity index 96% rename from ramda/ramda-tests.ts rename to types/ramda/ramda-tests.ts index e42ae16c63..13aeb222f7 100644 --- a/ramda/ramda-tests.ts +++ b/types/ramda/ramda-tests.ts @@ -491,6 +491,14 @@ R.times(i, 5); R.findLastIndex((x: number) => x === 1, [1, 2, 3]); } () => { + const testPath = ['x', 0, 'y']; + const testObj = {x: [{y: 2, z: 3}, {y: 4, z: 5}]}; + + R.pathEq(testPath, 2, testObj); // => true + R.pathEq(testPath, 2)(testObj); // => true + R.pathEq(testPath)(2)(testObj); // => true + R.pathEq(testPath)(2, testObj); // => true + var user1 = { address: { zipCode: 90210 } }; var user2 = { address: { zipCode: 55555 } }; var user3 = { name: 'Bob' }; @@ -1028,9 +1036,13 @@ type Pair = KeyValuePair } () => { - const a = R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}} - const b = R.assocPath(['a', 'b', 'c'])(42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}} - const c = R.assocPath(['a', 'b', 'c'], 42)({a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}} + const testPath = ['x', 0, 'y']; + const testObj = {x: [{y: 2, z: 3}, {y: 4, z: 5}]}; + + R.assocPath(testPath, 42, testObj); //=> {x: [{y: 42, z: 3}, {y: 4, z: 5}]} + R.assocPath(testPath, 42)(testObj); //=> {x: [{y: 42, z: 3}, {y: 4, z: 5}]} + R.assocPath(testPath)(42)(testObj); //=> {x: [{y: 42, z: 3}, {y: 4, z: 5}]} + R.assocPath(testPath)(42, testObj); //=> {x: [{y: 42, z: 3}, {y: 4, z: 5}]} } () => { @@ -1038,6 +1050,12 @@ type Pair = KeyValuePair // optionally specify return type const a2 = R.dissocPath<{a :{ b: number}}>(['a', 'b', 'c'], {a: {b: {c: 42}}}); //=> {a: {b: {}}} const a3 = R.dissocPath(['a', 'b', 'c'])({a: {b: {c: 42}}}); //=> {a: {b: {}}} + + const testPath = ['x', 0, 'y']; + const testObj = {x: [{y: 2, z: 3}, {y: 4, z: 5}]}; + + R.dissocPath(testPath, testObj); //=> {x: [{z: 3}, {y: 4, z: 5}]} + R.dissocPath(testPath)(testObj); //=> {x: [{z: 3}, {y: 4, z: 5}]} } () => { @@ -1163,11 +1181,12 @@ class Rectangle { } () => { - const xyLens = R.lensPath(['x', 'y']); + const xyLens = R.lensPath(['x', 0, 'y']); + const testObj = {x: [{y: 2, z: 3}, {y: 4, z: 5}]}; - R.view(xyLens, {x: {y: 2, z: 3}}); //=> 2 - R.set(xyLens, 4, {x: {y: 2, z: 3}}); //=> {x: {y: 4, z: 3}} - R.over(xyLens, R.negate, {x: {y: 2, z: 3}}); //=> {x: {y: -2, z: 3}} + R.view(xyLens, testObj); //=> 2 + R.set(xyLens, 4, testObj); //=> {x: [{y: 4, z: 3}, {y: 4, z: 5}]} + R.over(xyLens, R.negate, testObj); //=> {x: [{y: -2, z: 3}, {y: 4, z: 5}]} } () => { @@ -1242,10 +1261,15 @@ class Rectangle { } () => { - const a1 = R.pathOr('N/A', ['a', 'b'], {a: {b: 2}}); //=> 2 - const a2 = R.pathOr('N/A', ['a', 'b'])({a: {b: 2}}); //=> 2 - const a3 = R.pathOr('N/A', ['a', 'b'], {c: {b: 2}}); //=> "N/A" - const a4 = R.pathOr({c:2})(['a', 'b'], {c: {b: 2}}); //=> "N/A" + const orValue = 'N/A'; + const testPath = ['x', 0, 'y']; + const testObj = {x: [{y: 2, z: 3}, {y: 4, z: 5}]}; + + R.pathOr(orValue, testPath, testObj); //=> 2 + R.pathOr(orValue, testPath)(testObj); //=> 2 + R.pathOr(orValue)(testPath)(testObj); //=> 2 + R.pathOr(orValue)(testPath, testObj); //=> 2 + R.pathOr(orValue, testPath, {c: {b: 2}}); //=> "N/A" } () => { @@ -1586,8 +1610,11 @@ matchPhrases(['foo', 'bar', 'baz']); } () => { - R.path(['a', 'b'], {a: {b: 2}}); //=> 2 - R.path(['a', 'b'])({a: {b: 2}}); //=> 2 + const testPath = ['x', 0, 'y']; + const testObj = {x: [{y: 2, z: 3}, {y: 4, z: 5}]}; + + R.path(testPath, testObj); //=> 2 + R.path(testPath)(testObj); //=> 2 } () => { diff --git a/ramda/tsconfig.json b/types/ramda/tsconfig.json similarity index 100% rename from ramda/tsconfig.json rename to types/ramda/tsconfig.json diff --git a/random-js/index.d.ts b/types/random-js/index.d.ts similarity index 100% rename from random-js/index.d.ts rename to types/random-js/index.d.ts diff --git a/random-js/random-js-tests.ts b/types/random-js/random-js-tests.ts similarity index 100% rename from random-js/random-js-tests.ts rename to types/random-js/random-js-tests.ts diff --git a/random-js/tsconfig.json b/types/random-js/tsconfig.json similarity index 100% rename from random-js/tsconfig.json rename to types/random-js/tsconfig.json diff --git a/random-seed/index.d.ts b/types/random-seed/index.d.ts similarity index 100% rename from random-seed/index.d.ts rename to types/random-seed/index.d.ts diff --git a/random-seed/random-seed-tests.ts b/types/random-seed/random-seed-tests.ts similarity index 100% rename from random-seed/random-seed-tests.ts rename to types/random-seed/random-seed-tests.ts diff --git a/random-seed/tsconfig.json b/types/random-seed/tsconfig.json similarity index 100% rename from random-seed/tsconfig.json rename to types/random-seed/tsconfig.json diff --git a/range-parser/tslint.json b/types/random-seed/tslint.json similarity index 100% rename from range-parser/tslint.json rename to types/random-seed/tslint.json diff --git a/random-string/index.d.ts b/types/random-string/index.d.ts similarity index 100% rename from random-string/index.d.ts rename to types/random-string/index.d.ts diff --git a/random-string/random-string-tests.ts b/types/random-string/random-string-tests.ts similarity index 100% rename from random-string/random-string-tests.ts rename to types/random-string/random-string-tests.ts diff --git a/random-string/tsconfig.json b/types/random-string/tsconfig.json similarity index 100% rename from random-string/tsconfig.json rename to types/random-string/tsconfig.json diff --git a/randomcolor/index.d.ts b/types/randomcolor/index.d.ts similarity index 100% rename from randomcolor/index.d.ts rename to types/randomcolor/index.d.ts diff --git a/randomcolor/randomcolor-tests.ts b/types/randomcolor/randomcolor-tests.ts similarity index 100% rename from randomcolor/randomcolor-tests.ts rename to types/randomcolor/randomcolor-tests.ts diff --git a/randomcolor/tsconfig.json b/types/randomcolor/tsconfig.json similarity index 100% rename from randomcolor/tsconfig.json rename to types/randomcolor/tsconfig.json diff --git a/randomstring/index.d.ts b/types/randomstring/index.d.ts similarity index 100% rename from randomstring/index.d.ts rename to types/randomstring/index.d.ts diff --git a/randomstring/randomstring-tests.ts b/types/randomstring/randomstring-tests.ts similarity index 100% rename from randomstring/randomstring-tests.ts rename to types/randomstring/randomstring-tests.ts diff --git a/randomstring/tsconfig.json b/types/randomstring/tsconfig.json similarity index 100% rename from randomstring/tsconfig.json rename to types/randomstring/tsconfig.json diff --git a/range-parser/index.d.ts b/types/range-parser/index.d.ts similarity index 100% rename from range-parser/index.d.ts rename to types/range-parser/index.d.ts diff --git a/range-parser/range-parser-tests.ts b/types/range-parser/range-parser-tests.ts similarity index 100% rename from range-parser/range-parser-tests.ts rename to types/range-parser/range-parser-tests.ts diff --git a/range-parser/tsconfig.json b/types/range-parser/tsconfig.json similarity index 100% rename from range-parser/tsconfig.json rename to types/range-parser/tsconfig.json diff --git a/raw-body/tslint.json b/types/range-parser/tslint.json similarity index 100% rename from raw-body/tslint.json rename to types/range-parser/tslint.json diff --git a/rangy/index.d.ts b/types/rangy/index.d.ts similarity index 100% rename from rangy/index.d.ts rename to types/rangy/index.d.ts diff --git a/rangy/rangy-tests.ts b/types/rangy/rangy-tests.ts similarity index 100% rename from rangy/rangy-tests.ts rename to types/rangy/rangy-tests.ts diff --git a/rangy/tsconfig.json b/types/rangy/tsconfig.json similarity index 100% rename from rangy/tsconfig.json rename to types/rangy/tsconfig.json diff --git a/rangyinputs/index.d.ts b/types/rangyinputs/index.d.ts similarity index 100% rename from rangyinputs/index.d.ts rename to types/rangyinputs/index.d.ts diff --git a/rangyinputs/rangyinputs-tests.ts b/types/rangyinputs/rangyinputs-tests.ts similarity index 100% rename from rangyinputs/rangyinputs-tests.ts rename to types/rangyinputs/rangyinputs-tests.ts diff --git a/rangyinputs/tsconfig.json b/types/rangyinputs/tsconfig.json similarity index 100% rename from rangyinputs/tsconfig.json rename to types/rangyinputs/tsconfig.json diff --git a/raphael/index.d.ts b/types/raphael/index.d.ts similarity index 100% rename from raphael/index.d.ts rename to types/raphael/index.d.ts diff --git a/raphael/raphael-tests.ts b/types/raphael/raphael-tests.ts similarity index 100% rename from raphael/raphael-tests.ts rename to types/raphael/raphael-tests.ts diff --git a/raphael/tsconfig.json b/types/raphael/tsconfig.json similarity index 100% rename from raphael/tsconfig.json rename to types/raphael/tsconfig.json diff --git a/rappid/README.md b/types/rappid/README.md similarity index 100% rename from rappid/README.md rename to types/rappid/README.md diff --git a/types/rappid/index.d.ts b/types/rappid/index.d.ts new file mode 100644 index 0000000000..d70023e055 --- /dev/null +++ b/types/rappid/index.d.ts @@ -0,0 +1,40 @@ +// Type definitions for Rappid 1.5 +// Project: http://jointjs.com/about-rappid +// Definitions by: Ewout Van Gossum +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as joint from 'jointjs'; +import * as Backbone from "backbone"; + +export as namespace joint; + +export namespace ui { + interface Handle { + name: string; + position: string; + icon: string; + } + + class SelectionView extends Backbone.Model { + paper: joint.dia.Paper; + graph: joint.dia.Graph; + model: Backbone.Collection; + + constructor(opt: { + paper: joint.dia.Paper; + graph: joint.dia.Graph; + model: Backbone.Collection + }); + + createSelectionBox(cellView: joint.dia.CellView): void; + destroySelectionBox(cellView: joint.dia.CellView): void; + startSelecting(evt: any): void; + cancelSelection(): void; + + addHandle(handle: Handle): void; + removeHandle(name: string): void; + changeHandle(name: string, handle: Handle): void; + } +} diff --git a/rappid/tsconfig.json b/types/rappid/tsconfig.json similarity index 100% rename from rappid/tsconfig.json rename to types/rappid/tsconfig.json diff --git a/ratelimiter/index.d.ts b/types/ratelimiter/index.d.ts similarity index 100% rename from ratelimiter/index.d.ts rename to types/ratelimiter/index.d.ts diff --git a/ratelimiter/ratelimiter-tests.ts b/types/ratelimiter/ratelimiter-tests.ts similarity index 100% rename from ratelimiter/ratelimiter-tests.ts rename to types/ratelimiter/ratelimiter-tests.ts diff --git a/ratelimiter/tsconfig.json b/types/ratelimiter/tsconfig.json similarity index 100% rename from ratelimiter/tsconfig.json rename to types/ratelimiter/tsconfig.json diff --git a/raty/index.d.ts b/types/raty/index.d.ts similarity index 100% rename from raty/index.d.ts rename to types/raty/index.d.ts diff --git a/raty/raty-tests.ts b/types/raty/raty-tests.ts similarity index 100% rename from raty/raty-tests.ts rename to types/raty/raty-tests.ts diff --git a/raty/tsconfig.json b/types/raty/tsconfig.json similarity index 100% rename from raty/tsconfig.json rename to types/raty/tsconfig.json diff --git a/raw-body/index.d.ts b/types/raw-body/index.d.ts similarity index 100% rename from raw-body/index.d.ts rename to types/raw-body/index.d.ts diff --git a/raw-body/raw-body-tests.ts b/types/raw-body/raw-body-tests.ts similarity index 100% rename from raw-body/raw-body-tests.ts rename to types/raw-body/raw-body-tests.ts diff --git a/raw-body/tsconfig.json b/types/raw-body/tsconfig.json similarity index 100% rename from raw-body/tsconfig.json rename to types/raw-body/tsconfig.json diff --git a/rc-tree/tslint.json b/types/raw-body/tslint.json similarity index 100% rename from rc-tree/tslint.json rename to types/raw-body/tslint.json diff --git a/raygun4js/index.d.ts b/types/raygun4js/index.d.ts similarity index 100% rename from raygun4js/index.d.ts rename to types/raygun4js/index.d.ts diff --git a/raygun4js/raygun4js-tests.ts b/types/raygun4js/raygun4js-tests.ts similarity index 100% rename from raygun4js/raygun4js-tests.ts rename to types/raygun4js/raygun4js-tests.ts diff --git a/raygun4js/tsconfig.json b/types/raygun4js/tsconfig.json similarity index 100% rename from raygun4js/tsconfig.json rename to types/raygun4js/tsconfig.json diff --git a/rbush/index.d.ts b/types/rbush/index.d.ts similarity index 100% rename from rbush/index.d.ts rename to types/rbush/index.d.ts diff --git a/rbush/rbush-tests.ts b/types/rbush/rbush-tests.ts similarity index 100% rename from rbush/rbush-tests.ts rename to types/rbush/rbush-tests.ts diff --git a/rbush/tsconfig.json b/types/rbush/tsconfig.json similarity index 100% rename from rbush/tsconfig.json rename to types/rbush/tsconfig.json diff --git a/rc-select/index.d.ts b/types/rc-select/index.d.ts similarity index 100% rename from rc-select/index.d.ts rename to types/rc-select/index.d.ts diff --git a/rc-select/rc-select-tests.ts b/types/rc-select/rc-select-tests.ts similarity index 100% rename from rc-select/rc-select-tests.ts rename to types/rc-select/rc-select-tests.ts diff --git a/rc-select/tsconfig.json b/types/rc-select/tsconfig.json similarity index 100% rename from rc-select/tsconfig.json rename to types/rc-select/tsconfig.json diff --git a/rc-slider/README.md b/types/rc-slider/README.md similarity index 100% rename from rc-slider/README.md rename to types/rc-slider/README.md diff --git a/rc-slider/index.d.ts b/types/rc-slider/index.d.ts similarity index 100% rename from rc-slider/index.d.ts rename to types/rc-slider/index.d.ts diff --git a/rc-slider/rc-slider-tests.tsx b/types/rc-slider/rc-slider-tests.tsx similarity index 100% rename from rc-slider/rc-slider-tests.tsx rename to types/rc-slider/rc-slider-tests.tsx diff --git a/rc-slider/tsconfig.json b/types/rc-slider/tsconfig.json similarity index 100% rename from rc-slider/tsconfig.json rename to types/rc-slider/tsconfig.json diff --git a/rc-slider/tslint.json b/types/rc-slider/tslint.json similarity index 100% rename from rc-slider/tslint.json rename to types/rc-slider/tslint.json diff --git a/rc-tooltip/index.d.ts b/types/rc-tooltip/index.d.ts similarity index 100% rename from rc-tooltip/index.d.ts rename to types/rc-tooltip/index.d.ts diff --git a/rc-tooltip/rc-tooltip-tests.tsx b/types/rc-tooltip/rc-tooltip-tests.tsx similarity index 100% rename from rc-tooltip/rc-tooltip-tests.tsx rename to types/rc-tooltip/rc-tooltip-tests.tsx diff --git a/rc-tooltip/tsconfig.json b/types/rc-tooltip/tsconfig.json similarity index 100% rename from rc-tooltip/tsconfig.json rename to types/rc-tooltip/tsconfig.json diff --git a/rc-tree/index.d.ts b/types/rc-tree/index.d.ts similarity index 100% rename from rc-tree/index.d.ts rename to types/rc-tree/index.d.ts diff --git a/rc-tree/rc-tree-tests.tsx b/types/rc-tree/rc-tree-tests.tsx similarity index 100% rename from rc-tree/rc-tree-tests.tsx rename to types/rc-tree/rc-tree-tests.tsx diff --git a/rc-tree/tsconfig.json b/types/rc-tree/tsconfig.json similarity index 100% rename from rc-tree/tsconfig.json rename to types/rc-tree/tsconfig.json diff --git a/react-autosuggest/tslint.json b/types/rc-tree/tslint.json similarity index 100% rename from react-autosuggest/tslint.json rename to types/rc-tree/tslint.json diff --git a/rc/index.d.ts b/types/rc/index.d.ts similarity index 100% rename from rc/index.d.ts rename to types/rc/index.d.ts diff --git a/rc/rc-tests.ts b/types/rc/rc-tests.ts similarity index 100% rename from rc/rc-tests.ts rename to types/rc/rc-tests.ts diff --git a/rc/tsconfig.json b/types/rc/tsconfig.json similarity index 100% rename from rc/tsconfig.json rename to types/rc/tsconfig.json diff --git a/rcloader/index.d.ts b/types/rcloader/index.d.ts similarity index 100% rename from rcloader/index.d.ts rename to types/rcloader/index.d.ts diff --git a/rcloader/rcloader-tests.ts b/types/rcloader/rcloader-tests.ts similarity index 100% rename from rcloader/rcloader-tests.ts rename to types/rcloader/rcloader-tests.ts diff --git a/rcloader/tsconfig.json b/types/rcloader/tsconfig.json similarity index 100% rename from rcloader/tsconfig.json rename to types/rcloader/tsconfig.json diff --git a/react-addons-create-fragment/index.d.ts b/types/react-addons-create-fragment/index.d.ts similarity index 100% rename from react-addons-create-fragment/index.d.ts rename to types/react-addons-create-fragment/index.d.ts diff --git a/react-addons-create-fragment/tsconfig.json b/types/react-addons-create-fragment/tsconfig.json similarity index 100% rename from react-addons-create-fragment/tsconfig.json rename to types/react-addons-create-fragment/tsconfig.json diff --git a/react-addons-css-transition-group/index.d.ts b/types/react-addons-css-transition-group/index.d.ts similarity index 100% rename from react-addons-css-transition-group/index.d.ts rename to types/react-addons-css-transition-group/index.d.ts diff --git a/react-addons-css-transition-group/tsconfig.json b/types/react-addons-css-transition-group/tsconfig.json similarity index 100% rename from react-addons-css-transition-group/tsconfig.json rename to types/react-addons-css-transition-group/tsconfig.json diff --git a/react-addons-linked-state-mixin/index.d.ts b/types/react-addons-linked-state-mixin/index.d.ts similarity index 100% rename from react-addons-linked-state-mixin/index.d.ts rename to types/react-addons-linked-state-mixin/index.d.ts diff --git a/react-addons-linked-state-mixin/tsconfig.json b/types/react-addons-linked-state-mixin/tsconfig.json similarity index 100% rename from react-addons-linked-state-mixin/tsconfig.json rename to types/react-addons-linked-state-mixin/tsconfig.json diff --git a/react-addons-perf/index.d.ts b/types/react-addons-perf/index.d.ts similarity index 100% rename from react-addons-perf/index.d.ts rename to types/react-addons-perf/index.d.ts diff --git a/react-addons-perf/tsconfig.json b/types/react-addons-perf/tsconfig.json similarity index 100% rename from react-addons-perf/tsconfig.json rename to types/react-addons-perf/tsconfig.json diff --git a/react-addons-pure-render-mixin/index.d.ts b/types/react-addons-pure-render-mixin/index.d.ts similarity index 100% rename from react-addons-pure-render-mixin/index.d.ts rename to types/react-addons-pure-render-mixin/index.d.ts diff --git a/react-addons-pure-render-mixin/tsconfig.json b/types/react-addons-pure-render-mixin/tsconfig.json similarity index 100% rename from react-addons-pure-render-mixin/tsconfig.json rename to types/react-addons-pure-render-mixin/tsconfig.json diff --git a/react-addons-shallow-compare/index.d.ts b/types/react-addons-shallow-compare/index.d.ts similarity index 100% rename from react-addons-shallow-compare/index.d.ts rename to types/react-addons-shallow-compare/index.d.ts diff --git a/react-addons-shallow-compare/react-addons-shallow-compare-tests.tsx b/types/react-addons-shallow-compare/react-addons-shallow-compare-tests.tsx similarity index 100% rename from react-addons-shallow-compare/react-addons-shallow-compare-tests.tsx rename to types/react-addons-shallow-compare/react-addons-shallow-compare-tests.tsx diff --git a/react-addons-shallow-compare/tsconfig.json b/types/react-addons-shallow-compare/tsconfig.json similarity index 100% rename from react-addons-shallow-compare/tsconfig.json rename to types/react-addons-shallow-compare/tsconfig.json diff --git a/react-addons-test-utils/index.d.ts b/types/react-addons-test-utils/index.d.ts similarity index 100% rename from react-addons-test-utils/index.d.ts rename to types/react-addons-test-utils/index.d.ts diff --git a/react-addons-test-utils/tsconfig.json b/types/react-addons-test-utils/tsconfig.json similarity index 100% rename from react-addons-test-utils/tsconfig.json rename to types/react-addons-test-utils/tsconfig.json diff --git a/react-addons-transition-group/index.d.ts b/types/react-addons-transition-group/index.d.ts similarity index 100% rename from react-addons-transition-group/index.d.ts rename to types/react-addons-transition-group/index.d.ts diff --git a/react-addons-transition-group/tsconfig.json b/types/react-addons-transition-group/tsconfig.json similarity index 100% rename from react-addons-transition-group/tsconfig.json rename to types/react-addons-transition-group/tsconfig.json diff --git a/react-addons-update/index.d.ts b/types/react-addons-update/index.d.ts similarity index 100% rename from react-addons-update/index.d.ts rename to types/react-addons-update/index.d.ts diff --git a/react-addons-update/tsconfig.json b/types/react-addons-update/tsconfig.json similarity index 100% rename from react-addons-update/tsconfig.json rename to types/react-addons-update/tsconfig.json diff --git a/react-autosuggest/index.d.ts b/types/react-autosuggest/index.d.ts similarity index 100% rename from react-autosuggest/index.d.ts rename to types/react-autosuggest/index.d.ts diff --git a/react-autosuggest/react-autosuggest-tests.tsx b/types/react-autosuggest/react-autosuggest-tests.tsx similarity index 82% rename from react-autosuggest/react-autosuggest-tests.tsx rename to types/react-autosuggest/react-autosuggest-tests.tsx index f5ecaedc63..1488163ba0 100644 --- a/react-autosuggest/react-autosuggest-tests.tsx +++ b/types/react-autosuggest/react-autosuggest-tests.tsx @@ -5,19 +5,19 @@ import Autosuggest = require('react-autosuggest'); // endregion interface Language { - name : string; - year : number; + name: string; + year: number; } // https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expression // s#Using_Special_Characters -function escapeRegexCharacters(str : string) : string { +function escapeRegexCharacters(str: string): string { return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); } export class ReactAutosuggestBasicTest extends React.Component { // region Fields - static languages : Language[] = [ + static languages: Language[] = [ { name: 'C', year: 1972 @@ -63,7 +63,7 @@ export class ReactAutosuggestBasicTest extends React.Component { } ]; // endregion region Constructor - constructor(props : any) { + constructor(props: any) { super(props); this.state = { @@ -72,7 +72,7 @@ export class ReactAutosuggestBasicTest extends React.Component { }; } // endregion region Rendering methods - render() : JSX.Element { + render(): JSX.Element { const {value, suggestions} = this.state; const inputProps = { placeholder: `Type 'c'`, @@ -101,25 +101,25 @@ export class ReactAutosuggestBasicTest extends React.Component { theme={theme}/>; } - protected onSuggestionsSelected(event : React.FormEvent, data : Autosuggest.SuggestionSelectedEventData) : void { + protected onSuggestionsSelected(event: React.FormEvent, data: Autosuggest.SuggestionSelectedEventData): void { alert(`Selected language is ${data.suggestion.name} (${data.suggestion.year}).`); } - protected renderSuggestion(suggestion : Language) : JSX.Element { + protected renderSuggestion(suggestion: Language): JSX.Element { return {suggestion.name}; } // endregion region Event handlers - protected onChange(event : React.FormEvent, {newValue, method} : any) : void { + protected onChange(event: React.FormEvent, {newValue, method}: any): void { this.setState({value: newValue}); } - protected onSuggestionsFetchRequested({value}: any) : void { + protected onSuggestionsFetchRequested({value}: any): void { this.setState({ suggestions: this.getSuggestions(value) }); } // endregion region Helper methods - protected getSuggestions(value: string) : Language[] { + protected getSuggestions(value: string): Language[] { const escapedValue = escapeRegexCharacters(value.trim()); if (escapedValue === '') { @@ -133,7 +133,7 @@ export class ReactAutosuggestBasicTest extends React.Component { .filter(language => regex.test(language.name)); } - protected getSuggestionValue(suggestion: Language) : string {return suggestion.name;} + protected getSuggestionValue(suggestion: Language): string { return suggestion.name; } // endregion } @@ -141,13 +141,13 @@ ReactDOM.render( , document.getElementById('app')); interface LanguageGroup { - title : string; - languages : Language[]; + title: string; + languages: Language[]; } -export class ReactAutosuggestMultipleTest extends React.Component { +export class ReactAutosuggestMultipleTest extends React.Component { // region Fields - static languages : LanguageGroup[] = [ + static languages: LanguageGroup[] = [ { title: '1970s', languages: [ @@ -218,7 +218,7 @@ export class ReactAutosuggestMultipleTest extends React.Component { } ]; // endregion region Constructor - constructor(props : any) { + constructor(props: any) { super(props); this.state = { @@ -227,7 +227,7 @@ export class ReactAutosuggestMultipleTest extends React.Component { }; } // endregion region Rendering methods - render() : JSX.Element { + render(): JSX.Element { const {value, suggestions} = this.state; const inputProps = { placeholder: `Type 'c'`, @@ -251,31 +251,31 @@ export class ReactAutosuggestMultipleTest extends React.Component { inputProps={inputProps}/>; } - protected onSuggestionSelected(event : React.FormEvent, data : Autosuggest.SuggestionSelectedEventData) : void { + protected onSuggestionSelected(event: React.FormEvent, data: Autosuggest.SuggestionSelectedEventData): void { const language = data.suggestion as Language; alert(`Selected language is ${language.name} (${language.year}).`); } - protected renderSuggestion(suggestion : Language) : JSX.Element { + protected renderSuggestion(suggestion: Language): JSX.Element { return {suggestion.name}; } - protected renderSectionTitle(section : LanguageGroup) : JSX.Element { + protected renderSectionTitle(section: LanguageGroup): JSX.Element { return {section.title}; } // endregion region Event handlers - protected onChange(event : React.FormEvent, {newValue, method} : any) : void { + protected onChange(event: React.FormEvent, {newValue, method}: any): void { this.setState({value: newValue}); } - protected onSuggestionsFetchRequested({value} : any) : void { + protected onSuggestionsFetchRequested({value}: any): void { this.setState({ suggestions: this.getSuggestions(value) }); } // endregion region Helper methods - protected getSuggestions(value : string) : LanguageGroup[] { + protected getSuggestions(value: string): LanguageGroup[] { const escapedValue = escapeRegexCharacters(value.trim()); if (escapedValue === '') { @@ -297,11 +297,11 @@ export class ReactAutosuggestMultipleTest extends React.Component { .filter(section => section.languages.length > 0); } - protected getSuggestionValue(suggestion : Language) { + protected getSuggestionValue(suggestion: Language) { return suggestion.name; } - protected getSectionSuggestions(section : LanguageGroup) { + protected getSectionSuggestions(section: LanguageGroup) { return section.languages; } // endregion @@ -311,14 +311,14 @@ ReactDOM.render( , document.getElementById('app')); interface Person { - first : string; - last : string; - twitter : string; + first: string; + last: string; + twitter: string; } -export class ReactAutosuggestCustomTest extends React.Component { +export class ReactAutosuggestCustomTest extends React.Component { // region Fields - static people : Person[] = [ + static people: Person[] = [ { first: 'Charlie', last: 'Brown', @@ -338,7 +338,7 @@ export class ReactAutosuggestCustomTest extends React.Component { } ]; // endregion region Constructor - constructor(props : any) { + constructor(props: any) { super(props); this.state = { @@ -347,7 +347,7 @@ export class ReactAutosuggestCustomTest extends React.Component { }; } // endregion region Rendering methods - render() : JSX.Element { + render(): JSX.Element { const {value, suggestions} = this.state; const inputProps = { placeholder: "Type 'c'", @@ -365,12 +365,12 @@ export class ReactAutosuggestCustomTest extends React.Component { inputProps={inputProps}/>; } - protected renderSuggestion(suggestion : Person, {value, valueBeforeUpDown} : any) : JSX.Element { + protected renderSuggestion(suggestion: Person, {value, valueBeforeUpDown}: any): JSX.Element { const suggestionText = `${suggestion.first} ${suggestion.last}`; const query = (valueBeforeUpDown || value).trim(); const parts = suggestionText .split(' ') - .map((part : string) => { + .map((part: string) => { return { highlight: (Math.ceil(Math.random() * 10)) % 2, text: part @@ -391,17 +391,17 @@ export class ReactAutosuggestCustomTest extends React.Component { ; } // endregion region Event handlers - protected onChange(event : React.FormEvent, {newValue, method} : any) : void { + protected onChange(event: React.FormEvent, {newValue, method}: any): void { this.setState({value: newValue}); } - protected onSuggestionsFetchRequested({value} : any) : void { + protected onSuggestionsFetchRequested({value}: any): void { this.setState({ suggestions: this.getSuggestions(value) }); } // endregion region Helper methods - protected getSuggestions(value : string) : Person[] { + protected getSuggestions(value: string): Person[] { const escapedValue = escapeRegexCharacters(value.trim()); if (escapedValue === '') { @@ -415,7 +415,7 @@ export class ReactAutosuggestCustomTest extends React.Component { .filter(person => regex.test(this.getSuggestionValue(person))); } - protected getSuggestionValue(suggestion : Person) : string {return `${suggestion.first} ${suggestion.last}`;} + protected getSuggestionValue(suggestion: Person): string { return `${suggestion.first} ${suggestion.last}`; } // endregion } diff --git a/react-autosuggest/tsconfig.json b/types/react-autosuggest/tsconfig.json similarity index 100% rename from react-autosuggest/tsconfig.json rename to types/react-autosuggest/tsconfig.json diff --git a/react-body-classname/tslint.json b/types/react-autosuggest/tslint.json similarity index 100% rename from react-body-classname/tslint.json rename to types/react-autosuggest/tslint.json diff --git a/react-big-calendar/index.d.ts b/types/react-big-calendar/index.d.ts similarity index 100% rename from react-big-calendar/index.d.ts rename to types/react-big-calendar/index.d.ts diff --git a/react-big-calendar/react-big-calendar-tests.tsx b/types/react-big-calendar/react-big-calendar-tests.tsx similarity index 100% rename from react-big-calendar/react-big-calendar-tests.tsx rename to types/react-big-calendar/react-big-calendar-tests.tsx diff --git a/react-big-calendar/tsconfig.json b/types/react-big-calendar/tsconfig.json similarity index 100% rename from react-big-calendar/tsconfig.json rename to types/react-big-calendar/tsconfig.json diff --git a/react-body-classname/index.d.ts b/types/react-body-classname/index.d.ts similarity index 100% rename from react-body-classname/index.d.ts rename to types/react-body-classname/index.d.ts diff --git a/react-body-classname/react-body-classname-tests.tsx b/types/react-body-classname/react-body-classname-tests.tsx similarity index 100% rename from react-body-classname/react-body-classname-tests.tsx rename to types/react-body-classname/react-body-classname-tests.tsx diff --git a/react-body-classname/tsconfig.json b/types/react-body-classname/tsconfig.json similarity index 100% rename from react-body-classname/tsconfig.json rename to types/react-body-classname/tsconfig.json diff --git a/react-bootstrap-date-picker/tslint.json b/types/react-body-classname/tslint.json similarity index 100% rename from react-bootstrap-date-picker/tslint.json rename to types/react-body-classname/tslint.json diff --git a/react-bootstrap-date-picker/index.d.ts b/types/react-bootstrap-date-picker/index.d.ts similarity index 100% rename from react-bootstrap-date-picker/index.d.ts rename to types/react-bootstrap-date-picker/index.d.ts diff --git a/react-bootstrap-date-picker/react-bootstrap-date-picker-tests.tsx b/types/react-bootstrap-date-picker/react-bootstrap-date-picker-tests.tsx similarity index 100% rename from react-bootstrap-date-picker/react-bootstrap-date-picker-tests.tsx rename to types/react-bootstrap-date-picker/react-bootstrap-date-picker-tests.tsx diff --git a/react-bootstrap-date-picker/tsconfig.json b/types/react-bootstrap-date-picker/tsconfig.json similarity index 100% rename from react-bootstrap-date-picker/tsconfig.json rename to types/react-bootstrap-date-picker/tsconfig.json diff --git a/react-color/tslint.json b/types/react-bootstrap-date-picker/tslint.json similarity index 100% rename from react-color/tslint.json rename to types/react-bootstrap-date-picker/tslint.json diff --git a/react-bootstrap-daterangepicker/index.d.ts b/types/react-bootstrap-daterangepicker/index.d.ts similarity index 100% rename from react-bootstrap-daterangepicker/index.d.ts rename to types/react-bootstrap-daterangepicker/index.d.ts diff --git a/react-bootstrap-daterangepicker/react-bootstrap-daterangepicker-tests.ts b/types/react-bootstrap-daterangepicker/react-bootstrap-daterangepicker-tests.ts similarity index 100% rename from react-bootstrap-daterangepicker/react-bootstrap-daterangepicker-tests.ts rename to types/react-bootstrap-daterangepicker/react-bootstrap-daterangepicker-tests.ts diff --git a/react-bootstrap-daterangepicker/react-bootstrap-daterangepicker-tests.tsx b/types/react-bootstrap-daterangepicker/react-bootstrap-daterangepicker-tests.tsx similarity index 100% rename from react-bootstrap-daterangepicker/react-bootstrap-daterangepicker-tests.tsx rename to types/react-bootstrap-daterangepicker/react-bootstrap-daterangepicker-tests.tsx diff --git a/react-bootstrap-daterangepicker/tsconfig.json b/types/react-bootstrap-daterangepicker/tsconfig.json similarity index 100% rename from react-bootstrap-daterangepicker/tsconfig.json rename to types/react-bootstrap-daterangepicker/tsconfig.json diff --git a/react-bootstrap-table/index.d.ts b/types/react-bootstrap-table/index.d.ts similarity index 97% rename from react-bootstrap-table/index.d.ts rename to types/react-bootstrap-table/index.d.ts index 9adfacf8c8..bd2a356d91 100644 --- a/react-bootstrap-table/index.d.ts +++ b/types/react-bootstrap-table/index.d.ts @@ -448,7 +448,7 @@ export interface TableHeaderColumnProps extends Props { /** The field of data you want to show on column. */ - dataField: string; + dataField?: string; /** Use isKey to tell table which column is unique. This is same as keyField in Tips: You need choose one configuration to set key field: isKey or keyField in @@ -462,6 +462,11 @@ export interface TableHeaderColumnProps extends Props { Set align in column, value is left, center, right, start and end. */ dataAlign?: DataAlignType; + + /** + * Alignment of text in the column header. + */ + headerAlign?: DataAlignType; /** True to enable table sorting. Default is disabled. */ @@ -550,10 +555,32 @@ export interface TableHeaderColumnProps extends Props { filter?: Filter; onSort?: Function; + + /** + * Header for column in generated CSV file + */ + csvHeader?: string; csvFormat?: Function; columnTitle?: boolean; sort?: SortOrder; formatExtraData?: any; + + /** + * Row in the header on which this header column present. + */ + row?: number; + + /** + * Indicates how many rows this column takes. + * Default: 1 + */ + rowSpan?: number; + + /** + * Indicates how many columns this column takes. + * Default: 1 + */ + colSpan?: number; } export interface Editable { type?: string;//edit type, avaiable value is textarea, select, checkbox diff --git a/react-bootstrap-table/react-bootstrap-table-tests.tsx b/types/react-bootstrap-table/react-bootstrap-table-tests.tsx similarity index 65% rename from react-bootstrap-table/react-bootstrap-table-tests.tsx rename to types/react-bootstrap-table/react-bootstrap-table-tests.tsx index 2151f14c78..0b5d58166c 100644 --- a/react-bootstrap-table/react-bootstrap-table-tests.tsx +++ b/types/react-bootstrap-table/react-bootstrap-table-tests.tsx @@ -80,3 +80,32 @@ class CustomFilter extends React.Component { ); } } + +// Adopted from https://github.com/AllenFang/react-bootstrap-table/blob/master/examples/js/column-header-span/column-header-span-complex.js +export default class ColumnHeaderSpanComplex extends React.Component { + render() { + const selectRow = { + mode: 'checkbox', + bgColor: 'rgb(238, 193, 213)' + }; + + const cellEdit = { + mode: 'click', + blurToSave: true + }; + return ( + + ID + Product + name + price + Coupon + In stock + Customer + name + order + + ); + } +} diff --git a/react-bootstrap-table/tsconfig.json b/types/react-bootstrap-table/tsconfig.json similarity index 100% rename from react-bootstrap-table/tsconfig.json rename to types/react-bootstrap-table/tsconfig.json diff --git a/react-bootstrap/index.d.ts b/types/react-bootstrap/index.d.ts similarity index 99% rename from react-bootstrap/index.d.ts rename to types/react-bootstrap/index.d.ts index 500babd6cf..167001a4dc 100644 --- a/react-bootstrap/index.d.ts +++ b/types/react-bootstrap/index.d.ts @@ -964,8 +964,10 @@ declare namespace ReactBootstrap { // interface FormControlProps extends React.HTMLProps { bsClass?: string; + bsSize?: Sizes; componentClass?: React.ReactType; id?: string; + inputRef?: (instance: HTMLInputElement) => void; type?: string; } interface FormControlClass extends React.ClassicComponentClass { diff --git a/react-bootstrap/react-bootstrap-tests.tsx b/types/react-bootstrap/react-bootstrap-tests.tsx similarity index 100% rename from react-bootstrap/react-bootstrap-tests.tsx rename to types/react-bootstrap/react-bootstrap-tests.tsx diff --git a/react-bootstrap/tsconfig.json b/types/react-bootstrap/tsconfig.json similarity index 100% rename from react-bootstrap/tsconfig.json rename to types/react-bootstrap/tsconfig.json diff --git a/react-breadcrumbs/index.d.ts b/types/react-breadcrumbs/index.d.ts similarity index 100% rename from react-breadcrumbs/index.d.ts rename to types/react-breadcrumbs/index.d.ts diff --git a/react-breadcrumbs/react-breadcrumbs-tests.tsx b/types/react-breadcrumbs/react-breadcrumbs-tests.tsx similarity index 100% rename from react-breadcrumbs/react-breadcrumbs-tests.tsx rename to types/react-breadcrumbs/react-breadcrumbs-tests.tsx diff --git a/react-breadcrumbs/tsconfig.json b/types/react-breadcrumbs/tsconfig.json similarity index 100% rename from react-breadcrumbs/tsconfig.json rename to types/react-breadcrumbs/tsconfig.json diff --git a/react-bytesize-icons/index.d.ts b/types/react-bytesize-icons/index.d.ts similarity index 100% rename from react-bytesize-icons/index.d.ts rename to types/react-bytesize-icons/index.d.ts diff --git a/react-bytesize-icons/react-bytesize-icons-tests.tsx b/types/react-bytesize-icons/react-bytesize-icons-tests.tsx similarity index 100% rename from react-bytesize-icons/react-bytesize-icons-tests.tsx rename to types/react-bytesize-icons/react-bytesize-icons-tests.tsx diff --git a/react-bytesize-icons/tsconfig.json b/types/react-bytesize-icons/tsconfig.json similarity index 100% rename from react-bytesize-icons/tsconfig.json rename to types/react-bytesize-icons/tsconfig.json diff --git a/react-calendar-timeline/index.d.ts b/types/react-calendar-timeline/index.d.ts similarity index 100% rename from react-calendar-timeline/index.d.ts rename to types/react-calendar-timeline/index.d.ts diff --git a/react-calendar-timeline/react-calendar-timeline-tests.tsx b/types/react-calendar-timeline/react-calendar-timeline-tests.tsx similarity index 100% rename from react-calendar-timeline/react-calendar-timeline-tests.tsx rename to types/react-calendar-timeline/react-calendar-timeline-tests.tsx diff --git a/react-calendar-timeline/tsconfig.json b/types/react-calendar-timeline/tsconfig.json similarity index 100% rename from react-calendar-timeline/tsconfig.json rename to types/react-calendar-timeline/tsconfig.json diff --git a/react-codemirror/index.d.ts b/types/react-codemirror/index.d.ts similarity index 100% rename from react-codemirror/index.d.ts rename to types/react-codemirror/index.d.ts diff --git a/react-codemirror/react-codemirror-tests.tsx b/types/react-codemirror/react-codemirror-tests.tsx similarity index 100% rename from react-codemirror/react-codemirror-tests.tsx rename to types/react-codemirror/react-codemirror-tests.tsx diff --git a/react-codemirror/tsconfig.json b/types/react-codemirror/tsconfig.json similarity index 100% rename from react-codemirror/tsconfig.json rename to types/react-codemirror/tsconfig.json diff --git a/react-color/index.d.ts b/types/react-color/index.d.ts similarity index 100% rename from react-color/index.d.ts rename to types/react-color/index.d.ts diff --git a/react-color/lib/components/alpha/Alpha.d.ts b/types/react-color/lib/components/alpha/Alpha.d.ts similarity index 100% rename from react-color/lib/components/alpha/Alpha.d.ts rename to types/react-color/lib/components/alpha/Alpha.d.ts diff --git a/react-color/lib/components/block/Block.d.ts b/types/react-color/lib/components/block/Block.d.ts similarity index 100% rename from react-color/lib/components/block/Block.d.ts rename to types/react-color/lib/components/block/Block.d.ts diff --git a/react-color/lib/components/chrome/Chrome.d.ts b/types/react-color/lib/components/chrome/Chrome.d.ts similarity index 100% rename from react-color/lib/components/chrome/Chrome.d.ts rename to types/react-color/lib/components/chrome/Chrome.d.ts diff --git a/react-color/lib/components/circle/Circle.d.ts b/types/react-color/lib/components/circle/Circle.d.ts similarity index 100% rename from react-color/lib/components/circle/Circle.d.ts rename to types/react-color/lib/components/circle/Circle.d.ts diff --git a/react-color/lib/components/common/Alpha.d.ts b/types/react-color/lib/components/common/Alpha.d.ts similarity index 100% rename from react-color/lib/components/common/Alpha.d.ts rename to types/react-color/lib/components/common/Alpha.d.ts diff --git a/react-color/lib/components/common/Checkboard.d.ts b/types/react-color/lib/components/common/Checkboard.d.ts similarity index 100% rename from react-color/lib/components/common/Checkboard.d.ts rename to types/react-color/lib/components/common/Checkboard.d.ts diff --git a/react-color/lib/components/common/ColorWrap.d.ts b/types/react-color/lib/components/common/ColorWrap.d.ts similarity index 100% rename from react-color/lib/components/common/ColorWrap.d.ts rename to types/react-color/lib/components/common/ColorWrap.d.ts diff --git a/react-color/lib/components/common/EditableInput.d.ts b/types/react-color/lib/components/common/EditableInput.d.ts similarity index 100% rename from react-color/lib/components/common/EditableInput.d.ts rename to types/react-color/lib/components/common/EditableInput.d.ts diff --git a/react-color/lib/components/common/Hue.d.ts b/types/react-color/lib/components/common/Hue.d.ts similarity index 100% rename from react-color/lib/components/common/Hue.d.ts rename to types/react-color/lib/components/common/Hue.d.ts diff --git a/react-color/lib/components/common/Saturation.d.ts b/types/react-color/lib/components/common/Saturation.d.ts similarity index 100% rename from react-color/lib/components/common/Saturation.d.ts rename to types/react-color/lib/components/common/Saturation.d.ts diff --git a/react-color/lib/components/common/index.d.ts b/types/react-color/lib/components/common/index.d.ts similarity index 100% rename from react-color/lib/components/common/index.d.ts rename to types/react-color/lib/components/common/index.d.ts diff --git a/react-color/lib/components/compact/Compact.d.ts b/types/react-color/lib/components/compact/Compact.d.ts similarity index 100% rename from react-color/lib/components/compact/Compact.d.ts rename to types/react-color/lib/components/compact/Compact.d.ts diff --git a/react-color/lib/components/github/Github.d.ts b/types/react-color/lib/components/github/Github.d.ts similarity index 100% rename from react-color/lib/components/github/Github.d.ts rename to types/react-color/lib/components/github/Github.d.ts diff --git a/react-color/lib/components/hue/Hue.d.ts b/types/react-color/lib/components/hue/Hue.d.ts similarity index 100% rename from react-color/lib/components/hue/Hue.d.ts rename to types/react-color/lib/components/hue/Hue.d.ts diff --git a/react-color/lib/components/material/Material.d.ts b/types/react-color/lib/components/material/Material.d.ts similarity index 100% rename from react-color/lib/components/material/Material.d.ts rename to types/react-color/lib/components/material/Material.d.ts diff --git a/react-color/lib/components/photoshop/Photoshop.d.ts b/types/react-color/lib/components/photoshop/Photoshop.d.ts similarity index 100% rename from react-color/lib/components/photoshop/Photoshop.d.ts rename to types/react-color/lib/components/photoshop/Photoshop.d.ts diff --git a/react-color/lib/components/sketch/Sketch.d.ts b/types/react-color/lib/components/sketch/Sketch.d.ts similarity index 100% rename from react-color/lib/components/sketch/Sketch.d.ts rename to types/react-color/lib/components/sketch/Sketch.d.ts diff --git a/react-color/lib/components/slider/Slider.d.ts b/types/react-color/lib/components/slider/Slider.d.ts similarity index 100% rename from react-color/lib/components/slider/Slider.d.ts rename to types/react-color/lib/components/slider/Slider.d.ts diff --git a/react-color/lib/components/swatches/Swatches.d.ts b/types/react-color/lib/components/swatches/Swatches.d.ts similarity index 100% rename from react-color/lib/components/swatches/Swatches.d.ts rename to types/react-color/lib/components/swatches/Swatches.d.ts diff --git a/react-color/lib/components/twitter/Twitter.d.ts b/types/react-color/lib/components/twitter/Twitter.d.ts similarity index 100% rename from react-color/lib/components/twitter/Twitter.d.ts rename to types/react-color/lib/components/twitter/Twitter.d.ts diff --git a/react-color/react-color-tests.tsx b/types/react-color/react-color-tests.tsx similarity index 100% rename from react-color/react-color-tests.tsx rename to types/react-color/react-color-tests.tsx diff --git a/react-color/tsconfig.json b/types/react-color/tsconfig.json similarity index 100% rename from react-color/tsconfig.json rename to types/react-color/tsconfig.json diff --git a/react-copy-to-clipboard/tslint.json b/types/react-color/tslint.json similarity index 100% rename from react-copy-to-clipboard/tslint.json rename to types/react-color/tslint.json diff --git a/react-copy-to-clipboard/index.d.ts b/types/react-copy-to-clipboard/index.d.ts similarity index 100% rename from react-copy-to-clipboard/index.d.ts rename to types/react-copy-to-clipboard/index.d.ts diff --git a/react-copy-to-clipboard/react-copy-to-clipboard-tests.tsx b/types/react-copy-to-clipboard/react-copy-to-clipboard-tests.tsx similarity index 100% rename from react-copy-to-clipboard/react-copy-to-clipboard-tests.tsx rename to types/react-copy-to-clipboard/react-copy-to-clipboard-tests.tsx diff --git a/react-copy-to-clipboard/tsconfig.json b/types/react-copy-to-clipboard/tsconfig.json similarity index 100% rename from react-copy-to-clipboard/tsconfig.json rename to types/react-copy-to-clipboard/tsconfig.json diff --git a/react-dnd-html5-backend/tslint.json b/types/react-copy-to-clipboard/tslint.json similarity index 100% rename from react-dnd-html5-backend/tslint.json rename to types/react-copy-to-clipboard/tslint.json diff --git a/react-cropper/index.d.ts b/types/react-cropper/index.d.ts similarity index 100% rename from react-cropper/index.d.ts rename to types/react-cropper/index.d.ts diff --git a/react-cropper/react-cropper-tests.tsx b/types/react-cropper/react-cropper-tests.tsx similarity index 100% rename from react-cropper/react-cropper-tests.tsx rename to types/react-cropper/react-cropper-tests.tsx diff --git a/react-cropper/tsconfig.json b/types/react-cropper/tsconfig.json similarity index 100% rename from react-cropper/tsconfig.json rename to types/react-cropper/tsconfig.json diff --git a/react-css-modules/index.d.ts b/types/react-css-modules/index.d.ts similarity index 100% rename from react-css-modules/index.d.ts rename to types/react-css-modules/index.d.ts diff --git a/react-css-modules/react-css-modules-tests.tsx b/types/react-css-modules/react-css-modules-tests.tsx similarity index 100% rename from react-css-modules/react-css-modules-tests.tsx rename to types/react-css-modules/react-css-modules-tests.tsx diff --git a/react-css-modules/tsconfig.json b/types/react-css-modules/tsconfig.json similarity index 100% rename from react-css-modules/tsconfig.json rename to types/react-css-modules/tsconfig.json diff --git a/react-css-transition-replace/index.d.ts b/types/react-css-transition-replace/index.d.ts similarity index 100% rename from react-css-transition-replace/index.d.ts rename to types/react-css-transition-replace/index.d.ts diff --git a/react-css-transition-replace/react-css-transition-replace-tests.tsx b/types/react-css-transition-replace/react-css-transition-replace-tests.tsx similarity index 100% rename from react-css-transition-replace/react-css-transition-replace-tests.tsx rename to types/react-css-transition-replace/react-css-transition-replace-tests.tsx diff --git a/react-css-transition-replace/tsconfig.json b/types/react-css-transition-replace/tsconfig.json similarity index 100% rename from react-css-transition-replace/tsconfig.json rename to types/react-css-transition-replace/tsconfig.json diff --git a/react-custom-scrollbars/index.d.ts b/types/react-custom-scrollbars/index.d.ts similarity index 100% rename from react-custom-scrollbars/index.d.ts rename to types/react-custom-scrollbars/index.d.ts diff --git a/react-custom-scrollbars/react-custom-scrollbars-tests.tsx b/types/react-custom-scrollbars/react-custom-scrollbars-tests.tsx similarity index 100% rename from react-custom-scrollbars/react-custom-scrollbars-tests.tsx rename to types/react-custom-scrollbars/react-custom-scrollbars-tests.tsx diff --git a/react-custom-scrollbars/tsconfig.json b/types/react-custom-scrollbars/tsconfig.json similarity index 100% rename from react-custom-scrollbars/tsconfig.json rename to types/react-custom-scrollbars/tsconfig.json diff --git a/react-data-grid/index.d.ts b/types/react-data-grid/index.d.ts similarity index 100% rename from react-data-grid/index.d.ts rename to types/react-data-grid/index.d.ts diff --git a/react-data-grid/react-data-grid-tests.tsx b/types/react-data-grid/react-data-grid-tests.tsx similarity index 100% rename from react-data-grid/react-data-grid-tests.tsx rename to types/react-data-grid/react-data-grid-tests.tsx diff --git a/react-data-grid/tsconfig.json b/types/react-data-grid/tsconfig.json similarity index 100% rename from react-data-grid/tsconfig.json rename to types/react-data-grid/tsconfig.json diff --git a/react-datagrid/index.d.ts b/types/react-datagrid/index.d.ts similarity index 100% rename from react-datagrid/index.d.ts rename to types/react-datagrid/index.d.ts diff --git a/react-datagrid/react-datagrid-tests.tsx b/types/react-datagrid/react-datagrid-tests.tsx similarity index 100% rename from react-datagrid/react-datagrid-tests.tsx rename to types/react-datagrid/react-datagrid-tests.tsx diff --git a/react-datagrid/tsconfig.json b/types/react-datagrid/tsconfig.json similarity index 100% rename from react-datagrid/tsconfig.json rename to types/react-datagrid/tsconfig.json diff --git a/react-datepicker/index.d.ts b/types/react-datepicker/index.d.ts similarity index 100% rename from react-datepicker/index.d.ts rename to types/react-datepicker/index.d.ts diff --git a/react-datepicker/package.json b/types/react-datepicker/package.json similarity index 100% rename from react-datepicker/package.json rename to types/react-datepicker/package.json diff --git a/react-datepicker/react-datepicker-tests.tsx b/types/react-datepicker/react-datepicker-tests.tsx similarity index 100% rename from react-datepicker/react-datepicker-tests.tsx rename to types/react-datepicker/react-datepicker-tests.tsx diff --git a/react-datepicker/tsconfig.json b/types/react-datepicker/tsconfig.json similarity index 100% rename from react-datepicker/tsconfig.json rename to types/react-datepicker/tsconfig.json diff --git a/react-daterange-picker/index.d.ts b/types/react-daterange-picker/index.d.ts similarity index 100% rename from react-daterange-picker/index.d.ts rename to types/react-daterange-picker/index.d.ts diff --git a/react-daterange-picker/react-daterange-picker-tests.tsx b/types/react-daterange-picker/react-daterange-picker-tests.tsx similarity index 100% rename from react-daterange-picker/react-daterange-picker-tests.tsx rename to types/react-daterange-picker/react-daterange-picker-tests.tsx diff --git a/react-daterange-picker/tsconfig.json b/types/react-daterange-picker/tsconfig.json similarity index 100% rename from react-daterange-picker/tsconfig.json rename to types/react-daterange-picker/tsconfig.json diff --git a/react-dates/index.d.ts b/types/react-dates/index.d.ts similarity index 99% rename from react-dates/index.d.ts rename to types/react-dates/index.d.ts index e3ca801887..863bb6e453 100644 --- a/react-dates/index.d.ts +++ b/types/react-dates/index.d.ts @@ -18,7 +18,7 @@ declare namespace momentPropTypes{ declare namespace ReactDates{ type AnchorDirectionShape = 'left' | 'right'; - type FocusedInputShape = 'startDate' | 'endDate'; + type FocusedInputShape = 'startDate' | 'endDate' | null; type OrientationShape = 'horizontal' | 'vertical'; type ScrollableOrientationShape = 'horizontal' | 'vertical' | 'verticalScrollable'; diff --git a/react-dates/package.json b/types/react-dates/package.json similarity index 100% rename from react-dates/package.json rename to types/react-dates/package.json diff --git a/react-dates/react-dates-tests.tsx b/types/react-dates/react-dates-tests.tsx similarity index 100% rename from react-dates/react-dates-tests.tsx rename to types/react-dates/react-dates-tests.tsx diff --git a/react-dates/tsconfig.json b/types/react-dates/tsconfig.json similarity index 100% rename from react-dates/tsconfig.json rename to types/react-dates/tsconfig.json diff --git a/types/react-day-picker/index.d.ts b/types/react-day-picker/index.d.ts new file mode 100644 index 0000000000..be90f72d07 --- /dev/null +++ b/types/react-day-picker/index.d.ts @@ -0,0 +1,167 @@ +// Type definitions for react-day-picker 5.2 +// Project: https://github.com/gpbl/react-day-picker +// Definitions by: Giampaolo Bellavite , Jason Killian +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +import * as React from 'react'; + +declare namespace DayPicker { + export interface LocaleUtils { + formatDay(day: Date, locale: string): string; + formatMonthTitle(month: Date, locale: string): string; + formatWeekdayLong(weekday: number, locale: string): string; + formatWeekdayShort(weekday: number, locale: string): string; + getFirstDayOfWeek(locale: string): number; + getMonths(locale: string): [string, string, string, string, string, string, string, string, string, string, string, string]; + } + + export interface DateUtils { + addMonths(d: Date, n: number): Date; + clone(d: Date): Date; + isSameDay(d1: Date, d2: Date): Date; + isPastDay(d: Date): boolean; + isFutureDay(d: Date): boolean; + isDayBetween(day: Date, begin: Date, end: Date): boolean; + addDayToRange(day: Date, range: RangeModifier): RangeModifier; + isDayInRange(day: Date, range: RangeModifier): boolean; + } + + export interface CaptionElementProps { + date: Date; + classNames: ClassNames, + localeUtils: LocaleUtils; + locale: string; + months: undefined; + onClick?: React.MouseEventHandler; + } + + export interface NavbarElementProps { + className: string; + classNames: ClassNames; + previousMonth: Date; + nextMonth: Date; + showPreviousButton: boolean; + showNextButton: boolean; + onPreviousClick(callback?: () => void): void; + onNextClick(callback?: () => void): void; + dir?: string; + labels: { previousMonth: string; nextMonth: string; }; + localeUtils: LocaleUtils; + locale: string; + } + + export interface WeekdayElementProps { + weekday: number; + className: string; + localeUtils: LocaleUtils; + locale: string; + } + + export interface ClassNames { + container: string; + interactionDisabled: string; + navBar: string; + navButtonPrev: string; + navButtonNext: string; + + month: string; + caption: string; + weekdays: string; + weekdaysRow: string; + weekday: string; + body: string; + week: string; + day: string; + + today: string; + selected: string; + disabled: string; + outside: string; + } + + export interface RangeModifier { + from: Date; + to: Date; + } + export interface BeforeModifier { + before: Date; + } + export interface AfterModifier { + after: Date; + } + export interface FunctionModifier { + (date: Date): boolean; + } + export type Modifier = Date | RangeModifier | BeforeModifier | AfterModifier | FunctionModifier; + + export interface Modifiers { + today: Modifier | Modifier[]; + outside: Modifier | Modifier[]; + [other: string]: Modifier | Modifier[] | undefined; + } + + export interface Props { + canChangeMonth?: boolean; + captionElement?: React.ReactElement> | + React.ComponentClass | + React.SFC; + className?: string; + classNames?: ClassNames; + containerProps?: React.HTMLAttributes; + disabledDays?: Modifier | Modifier[]; + enableOutsideDays?: boolean; + firstDayOfWeek?: number; + fixedWeeks?: boolean; + fromMonth?: Date; + initialMonth?: Date; + labels?: { previousMonth: string; nextMonth: string; }; + locale?: string; + localeUtils?: LocaleUtils; + modifiers?: Partial; + month?: Date; + months?: [string, string, string, string, string, string, string, string, string, string, string, string]; + navbarElement?: React.ReactElement> | + React.ComponentClass | + React.SFC; + numberOfMonths?: number; + onBlur?(e: React.FocusEvent): void; + onCaptionClick?(month: Date, e: React.MouseEvent): void; + onDayClick?(day: Date, modifiers: Modifiers, e: React.MouseEvent): void; + onDayKeyDown?(day: Date, modifiers: Modifiers, e: React.KeyboardEvent): void; + onDayMouseEnter?(day: Date, modifiers: Modifiers, e: React.MouseEvent): void; + onDayMouseLeave?(day: Date, modifiers: Modifiers, e: React.MouseEvent): void; + onDayTouchEnd?(day: Date, modifiers: Modifiers, e: React.TouchEvent): void; + onDayTouchStart?(day: Date, modifiers: Modifiers, e: React.TouchEvent): void; + onFocus?(e: React.FocusEvent): void; + onKeyDown?(e: React.KeyboardEvent): void; + onMonthChange?(month: Date): void; + pagedNavigation?: boolean; + renderDay?(date: Date, modifiers: Modifiers): React.ReactNode; + reverseMonths?: boolean; + selectedDays?: Modifier | Modifier[]; + toMonth?: Date; + weekdayElement?: React.ReactElement> | + React.ComponentClass | + React.SFC; + weekdaysLong?: [string, string, string, string, string, string, string]; + weekdaysShort?: [string, string, string, string, string, string, string]; + } + const VERSION: string; + const LocaleUtils: DayPicker.LocaleUtils; + const DateUtils: DayPicker.DateUtils; +} + +declare class DayPicker extends React.Component { + showMonth(month: Date): void; + + showPreviousMonth(): void; + + showNextMonth(): void; + + showPreviousYear(): void; + + showNextYear(): void; +} + +export = DayPicker; diff --git a/types/react-day-picker/react-day-picker-tests.tsx b/types/react-day-picker/react-day-picker-tests.tsx new file mode 100644 index 0000000000..8c2755f9b5 --- /dev/null +++ b/types/react-day-picker/react-day-picker-tests.tsx @@ -0,0 +1,52 @@ +import * as React from 'react'; +import DayPicker = require('react-day-picker'); + +function isSunday(day: Date) { + return day.getDay() === 0; +} + +function MyComponent() { + return ( + + ); +} +DayPicker.DateUtils.clone(new Date()); +DayPicker.DateUtils.isDayInRange(new Date(), { from: new Date(), to: new Date(2050) }); + +interface MyCaptionProps extends DayPicker.CaptionElementProps { +} +class Caption extends React.Component { + render() { + const { date, locale, localeUtils, onClick } = this.props; + + if (!date || !localeUtils || !onClick || typeof locale === 'undefined') { + return null; + } + + return ( +
+ { localeUtils.formatMonthTitle(date, locale) } +
+ ); + } +} + + + +type CaptionElementProps = Partial; +class CaptionElement extends React.Component { + render() { + const { date, locale, localeUtils, onClick } = this.props; + if (!date || !locale || !localeUtils || !onClick) { + return
; + } + return ( +
+ { localeUtils.formatMonthTitle(date, locale) } +
+ ) + } +} + }/> diff --git a/types/react-day-picker/tsconfig.json b/types/react-day-picker/tsconfig.json new file mode 100644 index 0000000000..823be84e03 --- /dev/null +++ b/types/react-day-picker/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "jsx": "react", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-day-picker-tests.tsx" + ] +} diff --git a/types/react-day-picker/tslint.json b/types/react-day-picker/tslint.json new file mode 100644 index 0000000000..ec365f164b --- /dev/null +++ b/types/react-day-picker/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} diff --git a/react-dnd-html5-backend/index.d.ts b/types/react-dnd-html5-backend/index.d.ts similarity index 100% rename from react-dnd-html5-backend/index.d.ts rename to types/react-dnd-html5-backend/index.d.ts diff --git a/react-dnd-html5-backend/react-dnd-html5-backend-tests.ts b/types/react-dnd-html5-backend/react-dnd-html5-backend-tests.ts similarity index 100% rename from react-dnd-html5-backend/react-dnd-html5-backend-tests.ts rename to types/react-dnd-html5-backend/react-dnd-html5-backend-tests.ts diff --git a/react-dnd-html5-backend/tsconfig.json b/types/react-dnd-html5-backend/tsconfig.json similarity index 100% rename from react-dnd-html5-backend/tsconfig.json rename to types/react-dnd-html5-backend/tsconfig.json diff --git a/react-event-listener/tslint.json b/types/react-dnd-html5-backend/tslint.json similarity index 100% rename from react-event-listener/tslint.json rename to types/react-dnd-html5-backend/tslint.json diff --git a/react-dnd/index.d.ts b/types/react-dnd/index.d.ts similarity index 100% rename from react-dnd/index.d.ts rename to types/react-dnd/index.d.ts diff --git a/react-dnd/react-dnd-tests.ts b/types/react-dnd/react-dnd-tests.ts similarity index 100% rename from react-dnd/react-dnd-tests.ts rename to types/react-dnd/react-dnd-tests.ts diff --git a/react-dnd/tsconfig.json b/types/react-dnd/tsconfig.json similarity index 100% rename from react-dnd/tsconfig.json rename to types/react-dnd/tsconfig.json diff --git a/react-dom/index.d.ts b/types/react-dom/index.d.ts similarity index 100% rename from react-dom/index.d.ts rename to types/react-dom/index.d.ts diff --git a/react-dom/server.d.ts b/types/react-dom/server.d.ts similarity index 100% rename from react-dom/server.d.ts rename to types/react-dom/server.d.ts diff --git a/react-dom/tsconfig.json b/types/react-dom/tsconfig.json similarity index 100% rename from react-dom/tsconfig.json rename to types/react-dom/tsconfig.json diff --git a/react-dropzone/index.d.ts b/types/react-dropzone/index.d.ts similarity index 100% rename from react-dropzone/index.d.ts rename to types/react-dropzone/index.d.ts diff --git a/react-dropzone/react-dropzone-tests.tsx b/types/react-dropzone/react-dropzone-tests.tsx similarity index 100% rename from react-dropzone/react-dropzone-tests.tsx rename to types/react-dropzone/react-dropzone-tests.tsx diff --git a/react-dropzone/tsconfig.json b/types/react-dropzone/tsconfig.json similarity index 100% rename from react-dropzone/tsconfig.json rename to types/react-dropzone/tsconfig.json diff --git a/react-easy-chart/index.d.ts b/types/react-easy-chart/index.d.ts similarity index 100% rename from react-easy-chart/index.d.ts rename to types/react-easy-chart/index.d.ts diff --git a/react-easy-chart/react-easy-chart-tests.tsx b/types/react-easy-chart/react-easy-chart-tests.tsx similarity index 100% rename from react-easy-chart/react-easy-chart-tests.tsx rename to types/react-easy-chart/react-easy-chart-tests.tsx diff --git a/react-easy-chart/tsconfig.json b/types/react-easy-chart/tsconfig.json similarity index 100% rename from react-easy-chart/tsconfig.json rename to types/react-easy-chart/tsconfig.json diff --git a/react-event-listener/index.d.ts b/types/react-event-listener/index.d.ts similarity index 100% rename from react-event-listener/index.d.ts rename to types/react-event-listener/index.d.ts diff --git a/react-event-listener/react-event-listener-tests.tsx b/types/react-event-listener/react-event-listener-tests.tsx similarity index 100% rename from react-event-listener/react-event-listener-tests.tsx rename to types/react-event-listener/react-event-listener-tests.tsx diff --git a/react-event-listener/tsconfig.json b/types/react-event-listener/tsconfig.json similarity index 100% rename from react-event-listener/tsconfig.json rename to types/react-event-listener/tsconfig.json diff --git a/react-fa/tslint.json b/types/react-event-listener/tslint.json similarity index 100% rename from react-fa/tslint.json rename to types/react-event-listener/tslint.json diff --git a/react-fa/index.d.ts b/types/react-fa/index.d.ts similarity index 100% rename from react-fa/index.d.ts rename to types/react-fa/index.d.ts diff --git a/react-fa/react-fa-tests.tsx b/types/react-fa/react-fa-tests.tsx similarity index 100% rename from react-fa/react-fa-tests.tsx rename to types/react-fa/react-fa-tests.tsx diff --git a/react-fa/tsconfig.json b/types/react-fa/tsconfig.json similarity index 100% rename from react-fa/tsconfig.json rename to types/react-fa/tsconfig.json diff --git a/react-facebook-login/tslint.json b/types/react-fa/tslint.json similarity index 100% rename from react-facebook-login/tslint.json rename to types/react-fa/tslint.json diff --git a/react-facebook-login/index.d.ts b/types/react-facebook-login/index.d.ts similarity index 100% rename from react-facebook-login/index.d.ts rename to types/react-facebook-login/index.d.ts diff --git a/react-facebook-login/react-facebook-login-tests.tsx b/types/react-facebook-login/react-facebook-login-tests.tsx similarity index 100% rename from react-facebook-login/react-facebook-login-tests.tsx rename to types/react-facebook-login/react-facebook-login-tests.tsx diff --git a/react-facebook-login/tsconfig.json b/types/react-facebook-login/tsconfig.json similarity index 100% rename from react-facebook-login/tsconfig.json rename to types/react-facebook-login/tsconfig.json diff --git a/react-ga/tslint.json b/types/react-facebook-login/tslint.json similarity index 100% rename from react-ga/tslint.json rename to types/react-facebook-login/tslint.json diff --git a/react-file-input/index.d.ts b/types/react-file-input/index.d.ts similarity index 100% rename from react-file-input/index.d.ts rename to types/react-file-input/index.d.ts diff --git a/react-file-input/react-file-input-tests.tsx b/types/react-file-input/react-file-input-tests.tsx similarity index 100% rename from react-file-input/react-file-input-tests.tsx rename to types/react-file-input/react-file-input-tests.tsx diff --git a/react-file-input/tsconfig.json b/types/react-file-input/tsconfig.json similarity index 100% rename from react-file-input/tsconfig.json rename to types/react-file-input/tsconfig.json diff --git a/react-file-reader-input/index.d.ts b/types/react-file-reader-input/index.d.ts similarity index 100% rename from react-file-reader-input/index.d.ts rename to types/react-file-reader-input/index.d.ts diff --git a/react-file-reader-input/react-file-reader-input-tests.tsx b/types/react-file-reader-input/react-file-reader-input-tests.tsx similarity index 100% rename from react-file-reader-input/react-file-reader-input-tests.tsx rename to types/react-file-reader-input/react-file-reader-input-tests.tsx diff --git a/react-file-reader-input/tsconfig.json b/types/react-file-reader-input/tsconfig.json similarity index 100% rename from react-file-reader-input/tsconfig.json rename to types/react-file-reader-input/tsconfig.json diff --git a/react-flex/index.d.ts b/types/react-flex/index.d.ts similarity index 100% rename from react-flex/index.d.ts rename to types/react-flex/index.d.ts diff --git a/react-flex/react-flex-tests.tsx b/types/react-flex/react-flex-tests.tsx similarity index 100% rename from react-flex/react-flex-tests.tsx rename to types/react-flex/react-flex-tests.tsx diff --git a/react-flex/tsconfig.json b/types/react-flex/tsconfig.json similarity index 100% rename from react-flex/tsconfig.json rename to types/react-flex/tsconfig.json diff --git a/react-flexr/index.d.ts b/types/react-flexr/index.d.ts similarity index 100% rename from react-flexr/index.d.ts rename to types/react-flexr/index.d.ts diff --git a/react-flexr/react-flexr-tests.tsx b/types/react-flexr/react-flexr-tests.tsx similarity index 100% rename from react-flexr/react-flexr-tests.tsx rename to types/react-flexr/react-flexr-tests.tsx diff --git a/react-flexr/tsconfig.json b/types/react-flexr/tsconfig.json similarity index 100% rename from react-flexr/tsconfig.json rename to types/react-flexr/tsconfig.json diff --git a/react-fontawesome/index.d.ts b/types/react-fontawesome/index.d.ts similarity index 100% rename from react-fontawesome/index.d.ts rename to types/react-fontawesome/index.d.ts diff --git a/react-fontawesome/react-fontawesome-tests.tsx b/types/react-fontawesome/react-fontawesome-tests.tsx similarity index 100% rename from react-fontawesome/react-fontawesome-tests.tsx rename to types/react-fontawesome/react-fontawesome-tests.tsx diff --git a/react-fontawesome/tsconfig.json b/types/react-fontawesome/tsconfig.json similarity index 100% rename from react-fontawesome/tsconfig.json rename to types/react-fontawesome/tsconfig.json diff --git a/react-ga/index.d.ts b/types/react-ga/index.d.ts similarity index 100% rename from react-ga/index.d.ts rename to types/react-ga/index.d.ts diff --git a/react-ga/react-ga-tests.tsx b/types/react-ga/react-ga-tests.tsx similarity index 100% rename from react-ga/react-ga-tests.tsx rename to types/react-ga/react-ga-tests.tsx diff --git a/react-ga/tsconfig.json b/types/react-ga/tsconfig.json similarity index 100% rename from react-ga/tsconfig.json rename to types/react-ga/tsconfig.json diff --git a/react-gravatar/tslint.json b/types/react-ga/tslint.json similarity index 100% rename from react-gravatar/tslint.json rename to types/react-ga/tslint.json diff --git a/react-gravatar/index.d.ts b/types/react-gravatar/index.d.ts similarity index 100% rename from react-gravatar/index.d.ts rename to types/react-gravatar/index.d.ts diff --git a/react-gravatar/react-gravatar-tests.tsx b/types/react-gravatar/react-gravatar-tests.tsx similarity index 100% rename from react-gravatar/react-gravatar-tests.tsx rename to types/react-gravatar/react-gravatar-tests.tsx diff --git a/react-gravatar/tsconfig.json b/types/react-gravatar/tsconfig.json similarity index 100% rename from react-gravatar/tsconfig.json rename to types/react-gravatar/tsconfig.json diff --git a/react-highlight-words/tslint.json b/types/react-gravatar/tslint.json similarity index 100% rename from react-highlight-words/tslint.json rename to types/react-gravatar/tslint.json diff --git a/react-helmet/index.d.ts b/types/react-helmet/index.d.ts similarity index 100% rename from react-helmet/index.d.ts rename to types/react-helmet/index.d.ts diff --git a/react-helmet/react-helmet-tests.tsx b/types/react-helmet/react-helmet-tests.tsx similarity index 100% rename from react-helmet/react-helmet-tests.tsx rename to types/react-helmet/react-helmet-tests.tsx diff --git a/react-helmet/tsconfig.json b/types/react-helmet/tsconfig.json similarity index 100% rename from react-helmet/tsconfig.json rename to types/react-helmet/tsconfig.json diff --git a/react-highlight-words/index.d.ts b/types/react-highlight-words/index.d.ts similarity index 100% rename from react-highlight-words/index.d.ts rename to types/react-highlight-words/index.d.ts diff --git a/react-highlight-words/react-highlight-words-tests.tsx b/types/react-highlight-words/react-highlight-words-tests.tsx similarity index 100% rename from react-highlight-words/react-highlight-words-tests.tsx rename to types/react-highlight-words/react-highlight-words-tests.tsx diff --git a/react-highlight-words/tsconfig.json b/types/react-highlight-words/tsconfig.json similarity index 100% rename from react-highlight-words/tsconfig.json rename to types/react-highlight-words/tsconfig.json diff --git a/react-highlighter/tslint.json b/types/react-highlight-words/tslint.json similarity index 100% rename from react-highlighter/tslint.json rename to types/react-highlight-words/tslint.json diff --git a/react-highlighter/index.d.ts b/types/react-highlighter/index.d.ts similarity index 100% rename from react-highlighter/index.d.ts rename to types/react-highlighter/index.d.ts diff --git a/react-highlighter/react-highlighter-tests.tsx b/types/react-highlighter/react-highlighter-tests.tsx similarity index 100% rename from react-highlighter/react-highlighter-tests.tsx rename to types/react-highlighter/react-highlighter-tests.tsx diff --git a/react-highlighter/tsconfig.json b/types/react-highlighter/tsconfig.json similarity index 100% rename from react-highlighter/tsconfig.json rename to types/react-highlighter/tsconfig.json diff --git a/react-icon-base/tslint.json b/types/react-highlighter/tslint.json similarity index 100% rename from react-icon-base/tslint.json rename to types/react-highlighter/tslint.json diff --git a/react-holder/index.d.ts b/types/react-holder/index.d.ts similarity index 100% rename from react-holder/index.d.ts rename to types/react-holder/index.d.ts diff --git a/react-holder/react-holder-tests.tsx b/types/react-holder/react-holder-tests.tsx similarity index 100% rename from react-holder/react-holder-tests.tsx rename to types/react-holder/react-holder-tests.tsx diff --git a/react-holder/tsconfig.json b/types/react-holder/tsconfig.json similarity index 100% rename from react-holder/tsconfig.json rename to types/react-holder/tsconfig.json diff --git a/react-hot-loader/index.d.ts b/types/react-hot-loader/index.d.ts similarity index 100% rename from react-hot-loader/index.d.ts rename to types/react-hot-loader/index.d.ts diff --git a/react-hot-loader/react-hot-loader-tests.tsx b/types/react-hot-loader/react-hot-loader-tests.tsx similarity index 100% rename from react-hot-loader/react-hot-loader-tests.tsx rename to types/react-hot-loader/react-hot-loader-tests.tsx diff --git a/react-hot-loader/tsconfig.json b/types/react-hot-loader/tsconfig.json similarity index 100% rename from react-hot-loader/tsconfig.json rename to types/react-hot-loader/tsconfig.json diff --git a/react-i18next/index.d.ts b/types/react-i18next/index.d.ts similarity index 100% rename from react-i18next/index.d.ts rename to types/react-i18next/index.d.ts diff --git a/react-i18next/react-i18next-tests.tsx b/types/react-i18next/react-i18next-tests.tsx similarity index 100% rename from react-i18next/react-i18next-tests.tsx rename to types/react-i18next/react-i18next-tests.tsx diff --git a/react-i18next/tsconfig.json b/types/react-i18next/tsconfig.json similarity index 100% rename from react-i18next/tsconfig.json rename to types/react-i18next/tsconfig.json diff --git a/react-icon-base/index.d.ts b/types/react-icon-base/index.d.ts similarity index 100% rename from react-icon-base/index.d.ts rename to types/react-icon-base/index.d.ts diff --git a/react-icon-base/react-icon-base-tests.tsx b/types/react-icon-base/react-icon-base-tests.tsx similarity index 100% rename from react-icon-base/react-icon-base-tests.tsx rename to types/react-icon-base/react-icon-base-tests.tsx diff --git a/react-icon-base/tsconfig.json b/types/react-icon-base/tsconfig.json similarity index 100% rename from react-icon-base/tsconfig.json rename to types/react-icon-base/tsconfig.json diff --git a/react-icons/tslint.json b/types/react-icon-base/tslint.json similarity index 100% rename from react-icons/tslint.json rename to types/react-icon-base/tslint.json diff --git a/react-icons/fa/500px.d.ts b/types/react-icons/fa/500px.d.ts similarity index 100% rename from react-icons/fa/500px.d.ts rename to types/react-icons/fa/500px.d.ts diff --git a/react-icons/fa/adjust.d.ts b/types/react-icons/fa/adjust.d.ts similarity index 100% rename from react-icons/fa/adjust.d.ts rename to types/react-icons/fa/adjust.d.ts diff --git a/react-icons/fa/adn.d.ts b/types/react-icons/fa/adn.d.ts similarity index 100% rename from react-icons/fa/adn.d.ts rename to types/react-icons/fa/adn.d.ts diff --git a/react-icons/fa/align-center.d.ts b/types/react-icons/fa/align-center.d.ts similarity index 100% rename from react-icons/fa/align-center.d.ts rename to types/react-icons/fa/align-center.d.ts diff --git a/react-icons/fa/align-justify.d.ts b/types/react-icons/fa/align-justify.d.ts similarity index 100% rename from react-icons/fa/align-justify.d.ts rename to types/react-icons/fa/align-justify.d.ts diff --git a/react-icons/fa/align-left.d.ts b/types/react-icons/fa/align-left.d.ts similarity index 100% rename from react-icons/fa/align-left.d.ts rename to types/react-icons/fa/align-left.d.ts diff --git a/react-icons/fa/align-right.d.ts b/types/react-icons/fa/align-right.d.ts similarity index 100% rename from react-icons/fa/align-right.d.ts rename to types/react-icons/fa/align-right.d.ts diff --git a/react-icons/fa/amazon.d.ts b/types/react-icons/fa/amazon.d.ts similarity index 100% rename from react-icons/fa/amazon.d.ts rename to types/react-icons/fa/amazon.d.ts diff --git a/react-icons/fa/ambulance.d.ts b/types/react-icons/fa/ambulance.d.ts similarity index 100% rename from react-icons/fa/ambulance.d.ts rename to types/react-icons/fa/ambulance.d.ts diff --git a/react-icons/fa/american-sign-language-interpreting.d.ts b/types/react-icons/fa/american-sign-language-interpreting.d.ts similarity index 100% rename from react-icons/fa/american-sign-language-interpreting.d.ts rename to types/react-icons/fa/american-sign-language-interpreting.d.ts diff --git a/react-icons/fa/anchor.d.ts b/types/react-icons/fa/anchor.d.ts similarity index 100% rename from react-icons/fa/anchor.d.ts rename to types/react-icons/fa/anchor.d.ts diff --git a/react-icons/fa/android.d.ts b/types/react-icons/fa/android.d.ts similarity index 100% rename from react-icons/fa/android.d.ts rename to types/react-icons/fa/android.d.ts diff --git a/react-icons/fa/angellist.d.ts b/types/react-icons/fa/angellist.d.ts similarity index 100% rename from react-icons/fa/angellist.d.ts rename to types/react-icons/fa/angellist.d.ts diff --git a/react-icons/fa/angle-double-down.d.ts b/types/react-icons/fa/angle-double-down.d.ts similarity index 100% rename from react-icons/fa/angle-double-down.d.ts rename to types/react-icons/fa/angle-double-down.d.ts diff --git a/react-icons/fa/angle-double-left.d.ts b/types/react-icons/fa/angle-double-left.d.ts similarity index 100% rename from react-icons/fa/angle-double-left.d.ts rename to types/react-icons/fa/angle-double-left.d.ts diff --git a/react-icons/fa/angle-double-right.d.ts b/types/react-icons/fa/angle-double-right.d.ts similarity index 100% rename from react-icons/fa/angle-double-right.d.ts rename to types/react-icons/fa/angle-double-right.d.ts diff --git a/react-icons/fa/angle-double-up.d.ts b/types/react-icons/fa/angle-double-up.d.ts similarity index 100% rename from react-icons/fa/angle-double-up.d.ts rename to types/react-icons/fa/angle-double-up.d.ts diff --git a/react-icons/fa/angle-down.d.ts b/types/react-icons/fa/angle-down.d.ts similarity index 100% rename from react-icons/fa/angle-down.d.ts rename to types/react-icons/fa/angle-down.d.ts diff --git a/react-icons/fa/angle-left.d.ts b/types/react-icons/fa/angle-left.d.ts similarity index 100% rename from react-icons/fa/angle-left.d.ts rename to types/react-icons/fa/angle-left.d.ts diff --git a/react-icons/fa/angle-right.d.ts b/types/react-icons/fa/angle-right.d.ts similarity index 100% rename from react-icons/fa/angle-right.d.ts rename to types/react-icons/fa/angle-right.d.ts diff --git a/react-icons/fa/angle-up.d.ts b/types/react-icons/fa/angle-up.d.ts similarity index 100% rename from react-icons/fa/angle-up.d.ts rename to types/react-icons/fa/angle-up.d.ts diff --git a/react-icons/fa/apple.d.ts b/types/react-icons/fa/apple.d.ts similarity index 100% rename from react-icons/fa/apple.d.ts rename to types/react-icons/fa/apple.d.ts diff --git a/react-icons/fa/archive.d.ts b/types/react-icons/fa/archive.d.ts similarity index 100% rename from react-icons/fa/archive.d.ts rename to types/react-icons/fa/archive.d.ts diff --git a/react-icons/fa/area-chart.d.ts b/types/react-icons/fa/area-chart.d.ts similarity index 100% rename from react-icons/fa/area-chart.d.ts rename to types/react-icons/fa/area-chart.d.ts diff --git a/react-icons/fa/arrow-circle-down.d.ts b/types/react-icons/fa/arrow-circle-down.d.ts similarity index 100% rename from react-icons/fa/arrow-circle-down.d.ts rename to types/react-icons/fa/arrow-circle-down.d.ts diff --git a/react-icons/fa/arrow-circle-left.d.ts b/types/react-icons/fa/arrow-circle-left.d.ts similarity index 100% rename from react-icons/fa/arrow-circle-left.d.ts rename to types/react-icons/fa/arrow-circle-left.d.ts diff --git a/react-icons/fa/arrow-circle-o-down.d.ts b/types/react-icons/fa/arrow-circle-o-down.d.ts similarity index 100% rename from react-icons/fa/arrow-circle-o-down.d.ts rename to types/react-icons/fa/arrow-circle-o-down.d.ts diff --git a/react-icons/fa/arrow-circle-o-left.d.ts b/types/react-icons/fa/arrow-circle-o-left.d.ts similarity index 100% rename from react-icons/fa/arrow-circle-o-left.d.ts rename to types/react-icons/fa/arrow-circle-o-left.d.ts diff --git a/react-icons/fa/arrow-circle-o-right.d.ts b/types/react-icons/fa/arrow-circle-o-right.d.ts similarity index 100% rename from react-icons/fa/arrow-circle-o-right.d.ts rename to types/react-icons/fa/arrow-circle-o-right.d.ts diff --git a/react-icons/fa/arrow-circle-o-up.d.ts b/types/react-icons/fa/arrow-circle-o-up.d.ts similarity index 100% rename from react-icons/fa/arrow-circle-o-up.d.ts rename to types/react-icons/fa/arrow-circle-o-up.d.ts diff --git a/react-icons/fa/arrow-circle-right.d.ts b/types/react-icons/fa/arrow-circle-right.d.ts similarity index 100% rename from react-icons/fa/arrow-circle-right.d.ts rename to types/react-icons/fa/arrow-circle-right.d.ts diff --git a/react-icons/fa/arrow-circle-up.d.ts b/types/react-icons/fa/arrow-circle-up.d.ts similarity index 100% rename from react-icons/fa/arrow-circle-up.d.ts rename to types/react-icons/fa/arrow-circle-up.d.ts diff --git a/react-icons/fa/arrow-down.d.ts b/types/react-icons/fa/arrow-down.d.ts similarity index 100% rename from react-icons/fa/arrow-down.d.ts rename to types/react-icons/fa/arrow-down.d.ts diff --git a/react-icons/fa/arrow-left.d.ts b/types/react-icons/fa/arrow-left.d.ts similarity index 100% rename from react-icons/fa/arrow-left.d.ts rename to types/react-icons/fa/arrow-left.d.ts diff --git a/react-icons/fa/arrow-right.d.ts b/types/react-icons/fa/arrow-right.d.ts similarity index 100% rename from react-icons/fa/arrow-right.d.ts rename to types/react-icons/fa/arrow-right.d.ts diff --git a/react-icons/fa/arrow-up.d.ts b/types/react-icons/fa/arrow-up.d.ts similarity index 100% rename from react-icons/fa/arrow-up.d.ts rename to types/react-icons/fa/arrow-up.d.ts diff --git a/react-icons/fa/arrows-alt.d.ts b/types/react-icons/fa/arrows-alt.d.ts similarity index 100% rename from react-icons/fa/arrows-alt.d.ts rename to types/react-icons/fa/arrows-alt.d.ts diff --git a/react-icons/fa/arrows-h.d.ts b/types/react-icons/fa/arrows-h.d.ts similarity index 100% rename from react-icons/fa/arrows-h.d.ts rename to types/react-icons/fa/arrows-h.d.ts diff --git a/react-icons/fa/arrows-v.d.ts b/types/react-icons/fa/arrows-v.d.ts similarity index 100% rename from react-icons/fa/arrows-v.d.ts rename to types/react-icons/fa/arrows-v.d.ts diff --git a/react-icons/fa/arrows.d.ts b/types/react-icons/fa/arrows.d.ts similarity index 100% rename from react-icons/fa/arrows.d.ts rename to types/react-icons/fa/arrows.d.ts diff --git a/react-icons/fa/assistive-listening-systems.d.ts b/types/react-icons/fa/assistive-listening-systems.d.ts similarity index 100% rename from react-icons/fa/assistive-listening-systems.d.ts rename to types/react-icons/fa/assistive-listening-systems.d.ts diff --git a/react-icons/fa/asterisk.d.ts b/types/react-icons/fa/asterisk.d.ts similarity index 100% rename from react-icons/fa/asterisk.d.ts rename to types/react-icons/fa/asterisk.d.ts diff --git a/react-icons/fa/at.d.ts b/types/react-icons/fa/at.d.ts similarity index 100% rename from react-icons/fa/at.d.ts rename to types/react-icons/fa/at.d.ts diff --git a/react-icons/fa/audio-description.d.ts b/types/react-icons/fa/audio-description.d.ts similarity index 100% rename from react-icons/fa/audio-description.d.ts rename to types/react-icons/fa/audio-description.d.ts diff --git a/react-icons/fa/automobile.d.ts b/types/react-icons/fa/automobile.d.ts similarity index 100% rename from react-icons/fa/automobile.d.ts rename to types/react-icons/fa/automobile.d.ts diff --git a/react-icons/fa/backward.d.ts b/types/react-icons/fa/backward.d.ts similarity index 100% rename from react-icons/fa/backward.d.ts rename to types/react-icons/fa/backward.d.ts diff --git a/react-icons/fa/balance-scale.d.ts b/types/react-icons/fa/balance-scale.d.ts similarity index 100% rename from react-icons/fa/balance-scale.d.ts rename to types/react-icons/fa/balance-scale.d.ts diff --git a/react-icons/fa/ban.d.ts b/types/react-icons/fa/ban.d.ts similarity index 100% rename from react-icons/fa/ban.d.ts rename to types/react-icons/fa/ban.d.ts diff --git a/react-icons/fa/bank.d.ts b/types/react-icons/fa/bank.d.ts similarity index 100% rename from react-icons/fa/bank.d.ts rename to types/react-icons/fa/bank.d.ts diff --git a/react-icons/fa/bar-chart.d.ts b/types/react-icons/fa/bar-chart.d.ts similarity index 100% rename from react-icons/fa/bar-chart.d.ts rename to types/react-icons/fa/bar-chart.d.ts diff --git a/react-icons/fa/barcode.d.ts b/types/react-icons/fa/barcode.d.ts similarity index 100% rename from react-icons/fa/barcode.d.ts rename to types/react-icons/fa/barcode.d.ts diff --git a/react-icons/fa/bars.d.ts b/types/react-icons/fa/bars.d.ts similarity index 100% rename from react-icons/fa/bars.d.ts rename to types/react-icons/fa/bars.d.ts diff --git a/react-icons/fa/battery-0.d.ts b/types/react-icons/fa/battery-0.d.ts similarity index 100% rename from react-icons/fa/battery-0.d.ts rename to types/react-icons/fa/battery-0.d.ts diff --git a/react-icons/fa/battery-1.d.ts b/types/react-icons/fa/battery-1.d.ts similarity index 100% rename from react-icons/fa/battery-1.d.ts rename to types/react-icons/fa/battery-1.d.ts diff --git a/react-icons/fa/battery-2.d.ts b/types/react-icons/fa/battery-2.d.ts similarity index 100% rename from react-icons/fa/battery-2.d.ts rename to types/react-icons/fa/battery-2.d.ts diff --git a/react-icons/fa/battery-3.d.ts b/types/react-icons/fa/battery-3.d.ts similarity index 100% rename from react-icons/fa/battery-3.d.ts rename to types/react-icons/fa/battery-3.d.ts diff --git a/react-icons/fa/battery-4.d.ts b/types/react-icons/fa/battery-4.d.ts similarity index 100% rename from react-icons/fa/battery-4.d.ts rename to types/react-icons/fa/battery-4.d.ts diff --git a/react-icons/fa/bed.d.ts b/types/react-icons/fa/bed.d.ts similarity index 100% rename from react-icons/fa/bed.d.ts rename to types/react-icons/fa/bed.d.ts diff --git a/react-icons/fa/beer.d.ts b/types/react-icons/fa/beer.d.ts similarity index 100% rename from react-icons/fa/beer.d.ts rename to types/react-icons/fa/beer.d.ts diff --git a/react-icons/fa/behance-square.d.ts b/types/react-icons/fa/behance-square.d.ts similarity index 100% rename from react-icons/fa/behance-square.d.ts rename to types/react-icons/fa/behance-square.d.ts diff --git a/react-icons/fa/behance.d.ts b/types/react-icons/fa/behance.d.ts similarity index 100% rename from react-icons/fa/behance.d.ts rename to types/react-icons/fa/behance.d.ts diff --git a/react-icons/fa/bell-o.d.ts b/types/react-icons/fa/bell-o.d.ts similarity index 100% rename from react-icons/fa/bell-o.d.ts rename to types/react-icons/fa/bell-o.d.ts diff --git a/react-icons/fa/bell-slash-o.d.ts b/types/react-icons/fa/bell-slash-o.d.ts similarity index 100% rename from react-icons/fa/bell-slash-o.d.ts rename to types/react-icons/fa/bell-slash-o.d.ts diff --git a/react-icons/fa/bell-slash.d.ts b/types/react-icons/fa/bell-slash.d.ts similarity index 100% rename from react-icons/fa/bell-slash.d.ts rename to types/react-icons/fa/bell-slash.d.ts diff --git a/react-icons/fa/bell.d.ts b/types/react-icons/fa/bell.d.ts similarity index 100% rename from react-icons/fa/bell.d.ts rename to types/react-icons/fa/bell.d.ts diff --git a/react-icons/fa/bicycle.d.ts b/types/react-icons/fa/bicycle.d.ts similarity index 100% rename from react-icons/fa/bicycle.d.ts rename to types/react-icons/fa/bicycle.d.ts diff --git a/react-icons/fa/binoculars.d.ts b/types/react-icons/fa/binoculars.d.ts similarity index 100% rename from react-icons/fa/binoculars.d.ts rename to types/react-icons/fa/binoculars.d.ts diff --git a/react-icons/fa/birthday-cake.d.ts b/types/react-icons/fa/birthday-cake.d.ts similarity index 100% rename from react-icons/fa/birthday-cake.d.ts rename to types/react-icons/fa/birthday-cake.d.ts diff --git a/react-icons/fa/bitbucket-square.d.ts b/types/react-icons/fa/bitbucket-square.d.ts similarity index 100% rename from react-icons/fa/bitbucket-square.d.ts rename to types/react-icons/fa/bitbucket-square.d.ts diff --git a/react-icons/fa/bitbucket.d.ts b/types/react-icons/fa/bitbucket.d.ts similarity index 100% rename from react-icons/fa/bitbucket.d.ts rename to types/react-icons/fa/bitbucket.d.ts diff --git a/react-icons/fa/bitcoin.d.ts b/types/react-icons/fa/bitcoin.d.ts similarity index 100% rename from react-icons/fa/bitcoin.d.ts rename to types/react-icons/fa/bitcoin.d.ts diff --git a/react-icons/fa/black-tie.d.ts b/types/react-icons/fa/black-tie.d.ts similarity index 100% rename from react-icons/fa/black-tie.d.ts rename to types/react-icons/fa/black-tie.d.ts diff --git a/react-icons/fa/blind.d.ts b/types/react-icons/fa/blind.d.ts similarity index 100% rename from react-icons/fa/blind.d.ts rename to types/react-icons/fa/blind.d.ts diff --git a/react-icons/fa/bluetooth-b.d.ts b/types/react-icons/fa/bluetooth-b.d.ts similarity index 100% rename from react-icons/fa/bluetooth-b.d.ts rename to types/react-icons/fa/bluetooth-b.d.ts diff --git a/react-icons/fa/bluetooth.d.ts b/types/react-icons/fa/bluetooth.d.ts similarity index 100% rename from react-icons/fa/bluetooth.d.ts rename to types/react-icons/fa/bluetooth.d.ts diff --git a/react-icons/fa/bold.d.ts b/types/react-icons/fa/bold.d.ts similarity index 100% rename from react-icons/fa/bold.d.ts rename to types/react-icons/fa/bold.d.ts diff --git a/react-icons/fa/bolt.d.ts b/types/react-icons/fa/bolt.d.ts similarity index 100% rename from react-icons/fa/bolt.d.ts rename to types/react-icons/fa/bolt.d.ts diff --git a/react-icons/fa/bomb.d.ts b/types/react-icons/fa/bomb.d.ts similarity index 100% rename from react-icons/fa/bomb.d.ts rename to types/react-icons/fa/bomb.d.ts diff --git a/react-icons/fa/book.d.ts b/types/react-icons/fa/book.d.ts similarity index 100% rename from react-icons/fa/book.d.ts rename to types/react-icons/fa/book.d.ts diff --git a/react-icons/fa/bookmark-o.d.ts b/types/react-icons/fa/bookmark-o.d.ts similarity index 100% rename from react-icons/fa/bookmark-o.d.ts rename to types/react-icons/fa/bookmark-o.d.ts diff --git a/react-icons/fa/bookmark.d.ts b/types/react-icons/fa/bookmark.d.ts similarity index 100% rename from react-icons/fa/bookmark.d.ts rename to types/react-icons/fa/bookmark.d.ts diff --git a/react-icons/fa/braille.d.ts b/types/react-icons/fa/braille.d.ts similarity index 100% rename from react-icons/fa/braille.d.ts rename to types/react-icons/fa/braille.d.ts diff --git a/react-icons/fa/briefcase.d.ts b/types/react-icons/fa/briefcase.d.ts similarity index 100% rename from react-icons/fa/briefcase.d.ts rename to types/react-icons/fa/briefcase.d.ts diff --git a/react-icons/fa/bug.d.ts b/types/react-icons/fa/bug.d.ts similarity index 100% rename from react-icons/fa/bug.d.ts rename to types/react-icons/fa/bug.d.ts diff --git a/react-icons/fa/building-o.d.ts b/types/react-icons/fa/building-o.d.ts similarity index 100% rename from react-icons/fa/building-o.d.ts rename to types/react-icons/fa/building-o.d.ts diff --git a/react-icons/fa/building.d.ts b/types/react-icons/fa/building.d.ts similarity index 100% rename from react-icons/fa/building.d.ts rename to types/react-icons/fa/building.d.ts diff --git a/react-icons/fa/bullhorn.d.ts b/types/react-icons/fa/bullhorn.d.ts similarity index 100% rename from react-icons/fa/bullhorn.d.ts rename to types/react-icons/fa/bullhorn.d.ts diff --git a/react-icons/fa/bullseye.d.ts b/types/react-icons/fa/bullseye.d.ts similarity index 100% rename from react-icons/fa/bullseye.d.ts rename to types/react-icons/fa/bullseye.d.ts diff --git a/react-icons/fa/bus.d.ts b/types/react-icons/fa/bus.d.ts similarity index 100% rename from react-icons/fa/bus.d.ts rename to types/react-icons/fa/bus.d.ts diff --git a/react-icons/fa/buysellads.d.ts b/types/react-icons/fa/buysellads.d.ts similarity index 100% rename from react-icons/fa/buysellads.d.ts rename to types/react-icons/fa/buysellads.d.ts diff --git a/react-icons/fa/cab.d.ts b/types/react-icons/fa/cab.d.ts similarity index 100% rename from react-icons/fa/cab.d.ts rename to types/react-icons/fa/cab.d.ts diff --git a/react-icons/fa/calculator.d.ts b/types/react-icons/fa/calculator.d.ts similarity index 100% rename from react-icons/fa/calculator.d.ts rename to types/react-icons/fa/calculator.d.ts diff --git a/react-icons/fa/calendar-check-o.d.ts b/types/react-icons/fa/calendar-check-o.d.ts similarity index 100% rename from react-icons/fa/calendar-check-o.d.ts rename to types/react-icons/fa/calendar-check-o.d.ts diff --git a/react-icons/fa/calendar-minus-o.d.ts b/types/react-icons/fa/calendar-minus-o.d.ts similarity index 100% rename from react-icons/fa/calendar-minus-o.d.ts rename to types/react-icons/fa/calendar-minus-o.d.ts diff --git a/react-icons/fa/calendar-o.d.ts b/types/react-icons/fa/calendar-o.d.ts similarity index 100% rename from react-icons/fa/calendar-o.d.ts rename to types/react-icons/fa/calendar-o.d.ts diff --git a/react-icons/fa/calendar-plus-o.d.ts b/types/react-icons/fa/calendar-plus-o.d.ts similarity index 100% rename from react-icons/fa/calendar-plus-o.d.ts rename to types/react-icons/fa/calendar-plus-o.d.ts diff --git a/react-icons/fa/calendar-times-o.d.ts b/types/react-icons/fa/calendar-times-o.d.ts similarity index 100% rename from react-icons/fa/calendar-times-o.d.ts rename to types/react-icons/fa/calendar-times-o.d.ts diff --git a/react-icons/fa/calendar.d.ts b/types/react-icons/fa/calendar.d.ts similarity index 100% rename from react-icons/fa/calendar.d.ts rename to types/react-icons/fa/calendar.d.ts diff --git a/react-icons/fa/camera-retro.d.ts b/types/react-icons/fa/camera-retro.d.ts similarity index 100% rename from react-icons/fa/camera-retro.d.ts rename to types/react-icons/fa/camera-retro.d.ts diff --git a/react-icons/fa/camera.d.ts b/types/react-icons/fa/camera.d.ts similarity index 100% rename from react-icons/fa/camera.d.ts rename to types/react-icons/fa/camera.d.ts diff --git a/react-icons/fa/caret-down.d.ts b/types/react-icons/fa/caret-down.d.ts similarity index 100% rename from react-icons/fa/caret-down.d.ts rename to types/react-icons/fa/caret-down.d.ts diff --git a/react-icons/fa/caret-left.d.ts b/types/react-icons/fa/caret-left.d.ts similarity index 100% rename from react-icons/fa/caret-left.d.ts rename to types/react-icons/fa/caret-left.d.ts diff --git a/react-icons/fa/caret-right.d.ts b/types/react-icons/fa/caret-right.d.ts similarity index 100% rename from react-icons/fa/caret-right.d.ts rename to types/react-icons/fa/caret-right.d.ts diff --git a/react-icons/fa/caret-square-o-down.d.ts b/types/react-icons/fa/caret-square-o-down.d.ts similarity index 100% rename from react-icons/fa/caret-square-o-down.d.ts rename to types/react-icons/fa/caret-square-o-down.d.ts diff --git a/react-icons/fa/caret-square-o-left.d.ts b/types/react-icons/fa/caret-square-o-left.d.ts similarity index 100% rename from react-icons/fa/caret-square-o-left.d.ts rename to types/react-icons/fa/caret-square-o-left.d.ts diff --git a/react-icons/fa/caret-square-o-right.d.ts b/types/react-icons/fa/caret-square-o-right.d.ts similarity index 100% rename from react-icons/fa/caret-square-o-right.d.ts rename to types/react-icons/fa/caret-square-o-right.d.ts diff --git a/react-icons/fa/caret-square-o-up.d.ts b/types/react-icons/fa/caret-square-o-up.d.ts similarity index 100% rename from react-icons/fa/caret-square-o-up.d.ts rename to types/react-icons/fa/caret-square-o-up.d.ts diff --git a/react-icons/fa/caret-up.d.ts b/types/react-icons/fa/caret-up.d.ts similarity index 100% rename from react-icons/fa/caret-up.d.ts rename to types/react-icons/fa/caret-up.d.ts diff --git a/react-icons/fa/cart-arrow-down.d.ts b/types/react-icons/fa/cart-arrow-down.d.ts similarity index 100% rename from react-icons/fa/cart-arrow-down.d.ts rename to types/react-icons/fa/cart-arrow-down.d.ts diff --git a/react-icons/fa/cart-plus.d.ts b/types/react-icons/fa/cart-plus.d.ts similarity index 100% rename from react-icons/fa/cart-plus.d.ts rename to types/react-icons/fa/cart-plus.d.ts diff --git a/react-icons/fa/cc-amex.d.ts b/types/react-icons/fa/cc-amex.d.ts similarity index 100% rename from react-icons/fa/cc-amex.d.ts rename to types/react-icons/fa/cc-amex.d.ts diff --git a/react-icons/fa/cc-diners-club.d.ts b/types/react-icons/fa/cc-diners-club.d.ts similarity index 100% rename from react-icons/fa/cc-diners-club.d.ts rename to types/react-icons/fa/cc-diners-club.d.ts diff --git a/react-icons/fa/cc-discover.d.ts b/types/react-icons/fa/cc-discover.d.ts similarity index 100% rename from react-icons/fa/cc-discover.d.ts rename to types/react-icons/fa/cc-discover.d.ts diff --git a/react-icons/fa/cc-jcb.d.ts b/types/react-icons/fa/cc-jcb.d.ts similarity index 100% rename from react-icons/fa/cc-jcb.d.ts rename to types/react-icons/fa/cc-jcb.d.ts diff --git a/react-icons/fa/cc-mastercard.d.ts b/types/react-icons/fa/cc-mastercard.d.ts similarity index 100% rename from react-icons/fa/cc-mastercard.d.ts rename to types/react-icons/fa/cc-mastercard.d.ts diff --git a/react-icons/fa/cc-paypal.d.ts b/types/react-icons/fa/cc-paypal.d.ts similarity index 100% rename from react-icons/fa/cc-paypal.d.ts rename to types/react-icons/fa/cc-paypal.d.ts diff --git a/react-icons/fa/cc-stripe.d.ts b/types/react-icons/fa/cc-stripe.d.ts similarity index 100% rename from react-icons/fa/cc-stripe.d.ts rename to types/react-icons/fa/cc-stripe.d.ts diff --git a/react-icons/fa/cc-visa.d.ts b/types/react-icons/fa/cc-visa.d.ts similarity index 100% rename from react-icons/fa/cc-visa.d.ts rename to types/react-icons/fa/cc-visa.d.ts diff --git a/react-icons/fa/cc.d.ts b/types/react-icons/fa/cc.d.ts similarity index 100% rename from react-icons/fa/cc.d.ts rename to types/react-icons/fa/cc.d.ts diff --git a/react-icons/fa/certificate.d.ts b/types/react-icons/fa/certificate.d.ts similarity index 100% rename from react-icons/fa/certificate.d.ts rename to types/react-icons/fa/certificate.d.ts diff --git a/react-icons/fa/chain-broken.d.ts b/types/react-icons/fa/chain-broken.d.ts similarity index 100% rename from react-icons/fa/chain-broken.d.ts rename to types/react-icons/fa/chain-broken.d.ts diff --git a/react-icons/fa/chain.d.ts b/types/react-icons/fa/chain.d.ts similarity index 100% rename from react-icons/fa/chain.d.ts rename to types/react-icons/fa/chain.d.ts diff --git a/react-icons/fa/check-circle-o.d.ts b/types/react-icons/fa/check-circle-o.d.ts similarity index 100% rename from react-icons/fa/check-circle-o.d.ts rename to types/react-icons/fa/check-circle-o.d.ts diff --git a/react-icons/fa/check-circle.d.ts b/types/react-icons/fa/check-circle.d.ts similarity index 100% rename from react-icons/fa/check-circle.d.ts rename to types/react-icons/fa/check-circle.d.ts diff --git a/react-icons/fa/check-square-o.d.ts b/types/react-icons/fa/check-square-o.d.ts similarity index 100% rename from react-icons/fa/check-square-o.d.ts rename to types/react-icons/fa/check-square-o.d.ts diff --git a/react-icons/fa/check-square.d.ts b/types/react-icons/fa/check-square.d.ts similarity index 100% rename from react-icons/fa/check-square.d.ts rename to types/react-icons/fa/check-square.d.ts diff --git a/react-icons/fa/check.d.ts b/types/react-icons/fa/check.d.ts similarity index 100% rename from react-icons/fa/check.d.ts rename to types/react-icons/fa/check.d.ts diff --git a/react-icons/fa/chevron-circle-down.d.ts b/types/react-icons/fa/chevron-circle-down.d.ts similarity index 100% rename from react-icons/fa/chevron-circle-down.d.ts rename to types/react-icons/fa/chevron-circle-down.d.ts diff --git a/react-icons/fa/chevron-circle-left.d.ts b/types/react-icons/fa/chevron-circle-left.d.ts similarity index 100% rename from react-icons/fa/chevron-circle-left.d.ts rename to types/react-icons/fa/chevron-circle-left.d.ts diff --git a/react-icons/fa/chevron-circle-right.d.ts b/types/react-icons/fa/chevron-circle-right.d.ts similarity index 100% rename from react-icons/fa/chevron-circle-right.d.ts rename to types/react-icons/fa/chevron-circle-right.d.ts diff --git a/react-icons/fa/chevron-circle-up.d.ts b/types/react-icons/fa/chevron-circle-up.d.ts similarity index 100% rename from react-icons/fa/chevron-circle-up.d.ts rename to types/react-icons/fa/chevron-circle-up.d.ts diff --git a/react-icons/fa/chevron-down.d.ts b/types/react-icons/fa/chevron-down.d.ts similarity index 100% rename from react-icons/fa/chevron-down.d.ts rename to types/react-icons/fa/chevron-down.d.ts diff --git a/react-icons/fa/chevron-left.d.ts b/types/react-icons/fa/chevron-left.d.ts similarity index 100% rename from react-icons/fa/chevron-left.d.ts rename to types/react-icons/fa/chevron-left.d.ts diff --git a/react-icons/fa/chevron-right.d.ts b/types/react-icons/fa/chevron-right.d.ts similarity index 100% rename from react-icons/fa/chevron-right.d.ts rename to types/react-icons/fa/chevron-right.d.ts diff --git a/react-icons/fa/chevron-up.d.ts b/types/react-icons/fa/chevron-up.d.ts similarity index 100% rename from react-icons/fa/chevron-up.d.ts rename to types/react-icons/fa/chevron-up.d.ts diff --git a/react-icons/fa/child.d.ts b/types/react-icons/fa/child.d.ts similarity index 100% rename from react-icons/fa/child.d.ts rename to types/react-icons/fa/child.d.ts diff --git a/react-icons/fa/chrome.d.ts b/types/react-icons/fa/chrome.d.ts similarity index 100% rename from react-icons/fa/chrome.d.ts rename to types/react-icons/fa/chrome.d.ts diff --git a/react-icons/fa/circle-o-notch.d.ts b/types/react-icons/fa/circle-o-notch.d.ts similarity index 100% rename from react-icons/fa/circle-o-notch.d.ts rename to types/react-icons/fa/circle-o-notch.d.ts diff --git a/react-icons/fa/circle-o.d.ts b/types/react-icons/fa/circle-o.d.ts similarity index 100% rename from react-icons/fa/circle-o.d.ts rename to types/react-icons/fa/circle-o.d.ts diff --git a/react-icons/fa/circle-thin.d.ts b/types/react-icons/fa/circle-thin.d.ts similarity index 100% rename from react-icons/fa/circle-thin.d.ts rename to types/react-icons/fa/circle-thin.d.ts diff --git a/react-icons/fa/circle.d.ts b/types/react-icons/fa/circle.d.ts similarity index 100% rename from react-icons/fa/circle.d.ts rename to types/react-icons/fa/circle.d.ts diff --git a/react-icons/fa/clipboard.d.ts b/types/react-icons/fa/clipboard.d.ts similarity index 100% rename from react-icons/fa/clipboard.d.ts rename to types/react-icons/fa/clipboard.d.ts diff --git a/react-icons/fa/clock-o.d.ts b/types/react-icons/fa/clock-o.d.ts similarity index 100% rename from react-icons/fa/clock-o.d.ts rename to types/react-icons/fa/clock-o.d.ts diff --git a/react-icons/fa/clone.d.ts b/types/react-icons/fa/clone.d.ts similarity index 100% rename from react-icons/fa/clone.d.ts rename to types/react-icons/fa/clone.d.ts diff --git a/react-icons/fa/close.d.ts b/types/react-icons/fa/close.d.ts similarity index 100% rename from react-icons/fa/close.d.ts rename to types/react-icons/fa/close.d.ts diff --git a/react-icons/fa/cloud-download.d.ts b/types/react-icons/fa/cloud-download.d.ts similarity index 100% rename from react-icons/fa/cloud-download.d.ts rename to types/react-icons/fa/cloud-download.d.ts diff --git a/react-icons/fa/cloud-upload.d.ts b/types/react-icons/fa/cloud-upload.d.ts similarity index 100% rename from react-icons/fa/cloud-upload.d.ts rename to types/react-icons/fa/cloud-upload.d.ts diff --git a/react-icons/fa/cloud.d.ts b/types/react-icons/fa/cloud.d.ts similarity index 100% rename from react-icons/fa/cloud.d.ts rename to types/react-icons/fa/cloud.d.ts diff --git a/react-icons/fa/cny.d.ts b/types/react-icons/fa/cny.d.ts similarity index 100% rename from react-icons/fa/cny.d.ts rename to types/react-icons/fa/cny.d.ts diff --git a/react-icons/fa/code-fork.d.ts b/types/react-icons/fa/code-fork.d.ts similarity index 100% rename from react-icons/fa/code-fork.d.ts rename to types/react-icons/fa/code-fork.d.ts diff --git a/react-icons/fa/code.d.ts b/types/react-icons/fa/code.d.ts similarity index 100% rename from react-icons/fa/code.d.ts rename to types/react-icons/fa/code.d.ts diff --git a/react-icons/fa/codepen.d.ts b/types/react-icons/fa/codepen.d.ts similarity index 100% rename from react-icons/fa/codepen.d.ts rename to types/react-icons/fa/codepen.d.ts diff --git a/react-icons/fa/codiepie.d.ts b/types/react-icons/fa/codiepie.d.ts similarity index 100% rename from react-icons/fa/codiepie.d.ts rename to types/react-icons/fa/codiepie.d.ts diff --git a/react-icons/fa/coffee.d.ts b/types/react-icons/fa/coffee.d.ts similarity index 100% rename from react-icons/fa/coffee.d.ts rename to types/react-icons/fa/coffee.d.ts diff --git a/react-icons/fa/cog.d.ts b/types/react-icons/fa/cog.d.ts similarity index 100% rename from react-icons/fa/cog.d.ts rename to types/react-icons/fa/cog.d.ts diff --git a/react-icons/fa/cogs.d.ts b/types/react-icons/fa/cogs.d.ts similarity index 100% rename from react-icons/fa/cogs.d.ts rename to types/react-icons/fa/cogs.d.ts diff --git a/react-icons/fa/columns.d.ts b/types/react-icons/fa/columns.d.ts similarity index 100% rename from react-icons/fa/columns.d.ts rename to types/react-icons/fa/columns.d.ts diff --git a/react-icons/fa/comment-o.d.ts b/types/react-icons/fa/comment-o.d.ts similarity index 100% rename from react-icons/fa/comment-o.d.ts rename to types/react-icons/fa/comment-o.d.ts diff --git a/react-icons/fa/comment.d.ts b/types/react-icons/fa/comment.d.ts similarity index 100% rename from react-icons/fa/comment.d.ts rename to types/react-icons/fa/comment.d.ts diff --git a/react-icons/fa/commenting-o.d.ts b/types/react-icons/fa/commenting-o.d.ts similarity index 100% rename from react-icons/fa/commenting-o.d.ts rename to types/react-icons/fa/commenting-o.d.ts diff --git a/react-icons/fa/commenting.d.ts b/types/react-icons/fa/commenting.d.ts similarity index 100% rename from react-icons/fa/commenting.d.ts rename to types/react-icons/fa/commenting.d.ts diff --git a/react-icons/fa/comments-o.d.ts b/types/react-icons/fa/comments-o.d.ts similarity index 100% rename from react-icons/fa/comments-o.d.ts rename to types/react-icons/fa/comments-o.d.ts diff --git a/react-icons/fa/comments.d.ts b/types/react-icons/fa/comments.d.ts similarity index 100% rename from react-icons/fa/comments.d.ts rename to types/react-icons/fa/comments.d.ts diff --git a/react-icons/fa/compass.d.ts b/types/react-icons/fa/compass.d.ts similarity index 100% rename from react-icons/fa/compass.d.ts rename to types/react-icons/fa/compass.d.ts diff --git a/react-icons/fa/compress.d.ts b/types/react-icons/fa/compress.d.ts similarity index 100% rename from react-icons/fa/compress.d.ts rename to types/react-icons/fa/compress.d.ts diff --git a/react-icons/fa/connectdevelop.d.ts b/types/react-icons/fa/connectdevelop.d.ts similarity index 100% rename from react-icons/fa/connectdevelop.d.ts rename to types/react-icons/fa/connectdevelop.d.ts diff --git a/react-icons/fa/contao.d.ts b/types/react-icons/fa/contao.d.ts similarity index 100% rename from react-icons/fa/contao.d.ts rename to types/react-icons/fa/contao.d.ts diff --git a/react-icons/fa/copy.d.ts b/types/react-icons/fa/copy.d.ts similarity index 100% rename from react-icons/fa/copy.d.ts rename to types/react-icons/fa/copy.d.ts diff --git a/react-icons/fa/copyright.d.ts b/types/react-icons/fa/copyright.d.ts similarity index 100% rename from react-icons/fa/copyright.d.ts rename to types/react-icons/fa/copyright.d.ts diff --git a/react-icons/fa/creative-commons.d.ts b/types/react-icons/fa/creative-commons.d.ts similarity index 100% rename from react-icons/fa/creative-commons.d.ts rename to types/react-icons/fa/creative-commons.d.ts diff --git a/react-icons/fa/credit-card-alt.d.ts b/types/react-icons/fa/credit-card-alt.d.ts similarity index 100% rename from react-icons/fa/credit-card-alt.d.ts rename to types/react-icons/fa/credit-card-alt.d.ts diff --git a/react-icons/fa/credit-card.d.ts b/types/react-icons/fa/credit-card.d.ts similarity index 100% rename from react-icons/fa/credit-card.d.ts rename to types/react-icons/fa/credit-card.d.ts diff --git a/react-icons/fa/crop.d.ts b/types/react-icons/fa/crop.d.ts similarity index 100% rename from react-icons/fa/crop.d.ts rename to types/react-icons/fa/crop.d.ts diff --git a/react-icons/fa/crosshairs.d.ts b/types/react-icons/fa/crosshairs.d.ts similarity index 100% rename from react-icons/fa/crosshairs.d.ts rename to types/react-icons/fa/crosshairs.d.ts diff --git a/react-icons/fa/css3.d.ts b/types/react-icons/fa/css3.d.ts similarity index 100% rename from react-icons/fa/css3.d.ts rename to types/react-icons/fa/css3.d.ts diff --git a/react-icons/fa/cube.d.ts b/types/react-icons/fa/cube.d.ts similarity index 100% rename from react-icons/fa/cube.d.ts rename to types/react-icons/fa/cube.d.ts diff --git a/react-icons/fa/cubes.d.ts b/types/react-icons/fa/cubes.d.ts similarity index 100% rename from react-icons/fa/cubes.d.ts rename to types/react-icons/fa/cubes.d.ts diff --git a/react-icons/fa/cut.d.ts b/types/react-icons/fa/cut.d.ts similarity index 100% rename from react-icons/fa/cut.d.ts rename to types/react-icons/fa/cut.d.ts diff --git a/react-icons/fa/cutlery.d.ts b/types/react-icons/fa/cutlery.d.ts similarity index 100% rename from react-icons/fa/cutlery.d.ts rename to types/react-icons/fa/cutlery.d.ts diff --git a/react-icons/fa/dashboard.d.ts b/types/react-icons/fa/dashboard.d.ts similarity index 100% rename from react-icons/fa/dashboard.d.ts rename to types/react-icons/fa/dashboard.d.ts diff --git a/react-icons/fa/dashcube.d.ts b/types/react-icons/fa/dashcube.d.ts similarity index 100% rename from react-icons/fa/dashcube.d.ts rename to types/react-icons/fa/dashcube.d.ts diff --git a/react-icons/fa/database.d.ts b/types/react-icons/fa/database.d.ts similarity index 100% rename from react-icons/fa/database.d.ts rename to types/react-icons/fa/database.d.ts diff --git a/react-icons/fa/deaf.d.ts b/types/react-icons/fa/deaf.d.ts similarity index 100% rename from react-icons/fa/deaf.d.ts rename to types/react-icons/fa/deaf.d.ts diff --git a/react-icons/fa/dedent.d.ts b/types/react-icons/fa/dedent.d.ts similarity index 100% rename from react-icons/fa/dedent.d.ts rename to types/react-icons/fa/dedent.d.ts diff --git a/react-icons/fa/delicious.d.ts b/types/react-icons/fa/delicious.d.ts similarity index 100% rename from react-icons/fa/delicious.d.ts rename to types/react-icons/fa/delicious.d.ts diff --git a/react-icons/fa/desktop.d.ts b/types/react-icons/fa/desktop.d.ts similarity index 100% rename from react-icons/fa/desktop.d.ts rename to types/react-icons/fa/desktop.d.ts diff --git a/react-icons/fa/deviantart.d.ts b/types/react-icons/fa/deviantart.d.ts similarity index 100% rename from react-icons/fa/deviantart.d.ts rename to types/react-icons/fa/deviantart.d.ts diff --git a/react-icons/fa/diamond.d.ts b/types/react-icons/fa/diamond.d.ts similarity index 100% rename from react-icons/fa/diamond.d.ts rename to types/react-icons/fa/diamond.d.ts diff --git a/react-icons/fa/digg.d.ts b/types/react-icons/fa/digg.d.ts similarity index 100% rename from react-icons/fa/digg.d.ts rename to types/react-icons/fa/digg.d.ts diff --git a/react-icons/fa/dollar.d.ts b/types/react-icons/fa/dollar.d.ts similarity index 100% rename from react-icons/fa/dollar.d.ts rename to types/react-icons/fa/dollar.d.ts diff --git a/react-icons/fa/dot-circle-o.d.ts b/types/react-icons/fa/dot-circle-o.d.ts similarity index 100% rename from react-icons/fa/dot-circle-o.d.ts rename to types/react-icons/fa/dot-circle-o.d.ts diff --git a/react-icons/fa/download.d.ts b/types/react-icons/fa/download.d.ts similarity index 100% rename from react-icons/fa/download.d.ts rename to types/react-icons/fa/download.d.ts diff --git a/react-icons/fa/dribbble.d.ts b/types/react-icons/fa/dribbble.d.ts similarity index 100% rename from react-icons/fa/dribbble.d.ts rename to types/react-icons/fa/dribbble.d.ts diff --git a/react-icons/fa/dropbox.d.ts b/types/react-icons/fa/dropbox.d.ts similarity index 100% rename from react-icons/fa/dropbox.d.ts rename to types/react-icons/fa/dropbox.d.ts diff --git a/react-icons/fa/drupal.d.ts b/types/react-icons/fa/drupal.d.ts similarity index 100% rename from react-icons/fa/drupal.d.ts rename to types/react-icons/fa/drupal.d.ts diff --git a/react-icons/fa/edge.d.ts b/types/react-icons/fa/edge.d.ts similarity index 100% rename from react-icons/fa/edge.d.ts rename to types/react-icons/fa/edge.d.ts diff --git a/react-icons/fa/edit.d.ts b/types/react-icons/fa/edit.d.ts similarity index 100% rename from react-icons/fa/edit.d.ts rename to types/react-icons/fa/edit.d.ts diff --git a/react-icons/fa/eject.d.ts b/types/react-icons/fa/eject.d.ts similarity index 100% rename from react-icons/fa/eject.d.ts rename to types/react-icons/fa/eject.d.ts diff --git a/react-icons/fa/ellipsis-h.d.ts b/types/react-icons/fa/ellipsis-h.d.ts similarity index 100% rename from react-icons/fa/ellipsis-h.d.ts rename to types/react-icons/fa/ellipsis-h.d.ts diff --git a/react-icons/fa/ellipsis-v.d.ts b/types/react-icons/fa/ellipsis-v.d.ts similarity index 100% rename from react-icons/fa/ellipsis-v.d.ts rename to types/react-icons/fa/ellipsis-v.d.ts diff --git a/react-icons/fa/empire.d.ts b/types/react-icons/fa/empire.d.ts similarity index 100% rename from react-icons/fa/empire.d.ts rename to types/react-icons/fa/empire.d.ts diff --git a/react-icons/fa/envelope-o.d.ts b/types/react-icons/fa/envelope-o.d.ts similarity index 100% rename from react-icons/fa/envelope-o.d.ts rename to types/react-icons/fa/envelope-o.d.ts diff --git a/react-icons/fa/envelope-square.d.ts b/types/react-icons/fa/envelope-square.d.ts similarity index 100% rename from react-icons/fa/envelope-square.d.ts rename to types/react-icons/fa/envelope-square.d.ts diff --git a/react-icons/fa/envelope.d.ts b/types/react-icons/fa/envelope.d.ts similarity index 100% rename from react-icons/fa/envelope.d.ts rename to types/react-icons/fa/envelope.d.ts diff --git a/react-icons/fa/envira.d.ts b/types/react-icons/fa/envira.d.ts similarity index 100% rename from react-icons/fa/envira.d.ts rename to types/react-icons/fa/envira.d.ts diff --git a/react-icons/fa/eraser.d.ts b/types/react-icons/fa/eraser.d.ts similarity index 100% rename from react-icons/fa/eraser.d.ts rename to types/react-icons/fa/eraser.d.ts diff --git a/react-icons/fa/eur.d.ts b/types/react-icons/fa/eur.d.ts similarity index 100% rename from react-icons/fa/eur.d.ts rename to types/react-icons/fa/eur.d.ts diff --git a/react-icons/fa/exchange.d.ts b/types/react-icons/fa/exchange.d.ts similarity index 100% rename from react-icons/fa/exchange.d.ts rename to types/react-icons/fa/exchange.d.ts diff --git a/react-icons/fa/exclamation-circle.d.ts b/types/react-icons/fa/exclamation-circle.d.ts similarity index 100% rename from react-icons/fa/exclamation-circle.d.ts rename to types/react-icons/fa/exclamation-circle.d.ts diff --git a/react-icons/fa/exclamation-triangle.d.ts b/types/react-icons/fa/exclamation-triangle.d.ts similarity index 100% rename from react-icons/fa/exclamation-triangle.d.ts rename to types/react-icons/fa/exclamation-triangle.d.ts diff --git a/react-icons/fa/exclamation.d.ts b/types/react-icons/fa/exclamation.d.ts similarity index 100% rename from react-icons/fa/exclamation.d.ts rename to types/react-icons/fa/exclamation.d.ts diff --git a/react-icons/fa/expand.d.ts b/types/react-icons/fa/expand.d.ts similarity index 100% rename from react-icons/fa/expand.d.ts rename to types/react-icons/fa/expand.d.ts diff --git a/react-icons/fa/expeditedssl.d.ts b/types/react-icons/fa/expeditedssl.d.ts similarity index 100% rename from react-icons/fa/expeditedssl.d.ts rename to types/react-icons/fa/expeditedssl.d.ts diff --git a/react-icons/fa/external-link-square.d.ts b/types/react-icons/fa/external-link-square.d.ts similarity index 100% rename from react-icons/fa/external-link-square.d.ts rename to types/react-icons/fa/external-link-square.d.ts diff --git a/react-icons/fa/external-link.d.ts b/types/react-icons/fa/external-link.d.ts similarity index 100% rename from react-icons/fa/external-link.d.ts rename to types/react-icons/fa/external-link.d.ts diff --git a/react-icons/fa/eye-slash.d.ts b/types/react-icons/fa/eye-slash.d.ts similarity index 100% rename from react-icons/fa/eye-slash.d.ts rename to types/react-icons/fa/eye-slash.d.ts diff --git a/react-icons/fa/eye.d.ts b/types/react-icons/fa/eye.d.ts similarity index 100% rename from react-icons/fa/eye.d.ts rename to types/react-icons/fa/eye.d.ts diff --git a/react-icons/fa/eyedropper.d.ts b/types/react-icons/fa/eyedropper.d.ts similarity index 100% rename from react-icons/fa/eyedropper.d.ts rename to types/react-icons/fa/eyedropper.d.ts diff --git a/react-icons/fa/facebook-official.d.ts b/types/react-icons/fa/facebook-official.d.ts similarity index 100% rename from react-icons/fa/facebook-official.d.ts rename to types/react-icons/fa/facebook-official.d.ts diff --git a/react-icons/fa/facebook-square.d.ts b/types/react-icons/fa/facebook-square.d.ts similarity index 100% rename from react-icons/fa/facebook-square.d.ts rename to types/react-icons/fa/facebook-square.d.ts diff --git a/react-icons/fa/facebook.d.ts b/types/react-icons/fa/facebook.d.ts similarity index 100% rename from react-icons/fa/facebook.d.ts rename to types/react-icons/fa/facebook.d.ts diff --git a/react-icons/fa/fast-backward.d.ts b/types/react-icons/fa/fast-backward.d.ts similarity index 100% rename from react-icons/fa/fast-backward.d.ts rename to types/react-icons/fa/fast-backward.d.ts diff --git a/react-icons/fa/fast-forward.d.ts b/types/react-icons/fa/fast-forward.d.ts similarity index 100% rename from react-icons/fa/fast-forward.d.ts rename to types/react-icons/fa/fast-forward.d.ts diff --git a/react-icons/fa/fax.d.ts b/types/react-icons/fa/fax.d.ts similarity index 100% rename from react-icons/fa/fax.d.ts rename to types/react-icons/fa/fax.d.ts diff --git a/react-icons/fa/feed.d.ts b/types/react-icons/fa/feed.d.ts similarity index 100% rename from react-icons/fa/feed.d.ts rename to types/react-icons/fa/feed.d.ts diff --git a/react-icons/fa/female.d.ts b/types/react-icons/fa/female.d.ts similarity index 100% rename from react-icons/fa/female.d.ts rename to types/react-icons/fa/female.d.ts diff --git a/react-icons/fa/fighter-jet.d.ts b/types/react-icons/fa/fighter-jet.d.ts similarity index 100% rename from react-icons/fa/fighter-jet.d.ts rename to types/react-icons/fa/fighter-jet.d.ts diff --git a/react-icons/fa/file-archive-o.d.ts b/types/react-icons/fa/file-archive-o.d.ts similarity index 100% rename from react-icons/fa/file-archive-o.d.ts rename to types/react-icons/fa/file-archive-o.d.ts diff --git a/react-icons/fa/file-audio-o.d.ts b/types/react-icons/fa/file-audio-o.d.ts similarity index 100% rename from react-icons/fa/file-audio-o.d.ts rename to types/react-icons/fa/file-audio-o.d.ts diff --git a/react-icons/fa/file-code-o.d.ts b/types/react-icons/fa/file-code-o.d.ts similarity index 100% rename from react-icons/fa/file-code-o.d.ts rename to types/react-icons/fa/file-code-o.d.ts diff --git a/react-icons/fa/file-excel-o.d.ts b/types/react-icons/fa/file-excel-o.d.ts similarity index 100% rename from react-icons/fa/file-excel-o.d.ts rename to types/react-icons/fa/file-excel-o.d.ts diff --git a/react-icons/fa/file-image-o.d.ts b/types/react-icons/fa/file-image-o.d.ts similarity index 100% rename from react-icons/fa/file-image-o.d.ts rename to types/react-icons/fa/file-image-o.d.ts diff --git a/react-icons/fa/file-movie-o.d.ts b/types/react-icons/fa/file-movie-o.d.ts similarity index 100% rename from react-icons/fa/file-movie-o.d.ts rename to types/react-icons/fa/file-movie-o.d.ts diff --git a/react-icons/fa/file-o.d.ts b/types/react-icons/fa/file-o.d.ts similarity index 100% rename from react-icons/fa/file-o.d.ts rename to types/react-icons/fa/file-o.d.ts diff --git a/react-icons/fa/file-pdf-o.d.ts b/types/react-icons/fa/file-pdf-o.d.ts similarity index 100% rename from react-icons/fa/file-pdf-o.d.ts rename to types/react-icons/fa/file-pdf-o.d.ts diff --git a/react-icons/fa/file-powerpoint-o.d.ts b/types/react-icons/fa/file-powerpoint-o.d.ts similarity index 100% rename from react-icons/fa/file-powerpoint-o.d.ts rename to types/react-icons/fa/file-powerpoint-o.d.ts diff --git a/react-icons/fa/file-text-o.d.ts b/types/react-icons/fa/file-text-o.d.ts similarity index 100% rename from react-icons/fa/file-text-o.d.ts rename to types/react-icons/fa/file-text-o.d.ts diff --git a/react-icons/fa/file-text.d.ts b/types/react-icons/fa/file-text.d.ts similarity index 100% rename from react-icons/fa/file-text.d.ts rename to types/react-icons/fa/file-text.d.ts diff --git a/react-icons/fa/file-word-o.d.ts b/types/react-icons/fa/file-word-o.d.ts similarity index 100% rename from react-icons/fa/file-word-o.d.ts rename to types/react-icons/fa/file-word-o.d.ts diff --git a/react-icons/fa/file.d.ts b/types/react-icons/fa/file.d.ts similarity index 100% rename from react-icons/fa/file.d.ts rename to types/react-icons/fa/file.d.ts diff --git a/react-icons/fa/film.d.ts b/types/react-icons/fa/film.d.ts similarity index 100% rename from react-icons/fa/film.d.ts rename to types/react-icons/fa/film.d.ts diff --git a/react-icons/fa/filter.d.ts b/types/react-icons/fa/filter.d.ts similarity index 100% rename from react-icons/fa/filter.d.ts rename to types/react-icons/fa/filter.d.ts diff --git a/react-icons/fa/fire-extinguisher.d.ts b/types/react-icons/fa/fire-extinguisher.d.ts similarity index 100% rename from react-icons/fa/fire-extinguisher.d.ts rename to types/react-icons/fa/fire-extinguisher.d.ts diff --git a/react-icons/fa/fire.d.ts b/types/react-icons/fa/fire.d.ts similarity index 100% rename from react-icons/fa/fire.d.ts rename to types/react-icons/fa/fire.d.ts diff --git a/react-icons/fa/firefox.d.ts b/types/react-icons/fa/firefox.d.ts similarity index 100% rename from react-icons/fa/firefox.d.ts rename to types/react-icons/fa/firefox.d.ts diff --git a/react-icons/fa/flag-checkered.d.ts b/types/react-icons/fa/flag-checkered.d.ts similarity index 100% rename from react-icons/fa/flag-checkered.d.ts rename to types/react-icons/fa/flag-checkered.d.ts diff --git a/react-icons/fa/flag-o.d.ts b/types/react-icons/fa/flag-o.d.ts similarity index 100% rename from react-icons/fa/flag-o.d.ts rename to types/react-icons/fa/flag-o.d.ts diff --git a/react-icons/fa/flag.d.ts b/types/react-icons/fa/flag.d.ts similarity index 100% rename from react-icons/fa/flag.d.ts rename to types/react-icons/fa/flag.d.ts diff --git a/react-icons/fa/flask.d.ts b/types/react-icons/fa/flask.d.ts similarity index 100% rename from react-icons/fa/flask.d.ts rename to types/react-icons/fa/flask.d.ts diff --git a/react-icons/fa/flickr.d.ts b/types/react-icons/fa/flickr.d.ts similarity index 100% rename from react-icons/fa/flickr.d.ts rename to types/react-icons/fa/flickr.d.ts diff --git a/react-icons/fa/floppy-o.d.ts b/types/react-icons/fa/floppy-o.d.ts similarity index 100% rename from react-icons/fa/floppy-o.d.ts rename to types/react-icons/fa/floppy-o.d.ts diff --git a/react-icons/fa/folder-o.d.ts b/types/react-icons/fa/folder-o.d.ts similarity index 100% rename from react-icons/fa/folder-o.d.ts rename to types/react-icons/fa/folder-o.d.ts diff --git a/react-icons/fa/folder-open-o.d.ts b/types/react-icons/fa/folder-open-o.d.ts similarity index 100% rename from react-icons/fa/folder-open-o.d.ts rename to types/react-icons/fa/folder-open-o.d.ts diff --git a/react-icons/fa/folder-open.d.ts b/types/react-icons/fa/folder-open.d.ts similarity index 100% rename from react-icons/fa/folder-open.d.ts rename to types/react-icons/fa/folder-open.d.ts diff --git a/react-icons/fa/folder.d.ts b/types/react-icons/fa/folder.d.ts similarity index 100% rename from react-icons/fa/folder.d.ts rename to types/react-icons/fa/folder.d.ts diff --git a/react-icons/fa/font.d.ts b/types/react-icons/fa/font.d.ts similarity index 100% rename from react-icons/fa/font.d.ts rename to types/react-icons/fa/font.d.ts diff --git a/react-icons/fa/fonticons.d.ts b/types/react-icons/fa/fonticons.d.ts similarity index 100% rename from react-icons/fa/fonticons.d.ts rename to types/react-icons/fa/fonticons.d.ts diff --git a/react-icons/fa/fort-awesome.d.ts b/types/react-icons/fa/fort-awesome.d.ts similarity index 100% rename from react-icons/fa/fort-awesome.d.ts rename to types/react-icons/fa/fort-awesome.d.ts diff --git a/react-icons/fa/forumbee.d.ts b/types/react-icons/fa/forumbee.d.ts similarity index 100% rename from react-icons/fa/forumbee.d.ts rename to types/react-icons/fa/forumbee.d.ts diff --git a/react-icons/fa/forward.d.ts b/types/react-icons/fa/forward.d.ts similarity index 100% rename from react-icons/fa/forward.d.ts rename to types/react-icons/fa/forward.d.ts diff --git a/react-icons/fa/foursquare.d.ts b/types/react-icons/fa/foursquare.d.ts similarity index 100% rename from react-icons/fa/foursquare.d.ts rename to types/react-icons/fa/foursquare.d.ts diff --git a/react-icons/fa/frown-o.d.ts b/types/react-icons/fa/frown-o.d.ts similarity index 100% rename from react-icons/fa/frown-o.d.ts rename to types/react-icons/fa/frown-o.d.ts diff --git a/react-icons/fa/futbol-o.d.ts b/types/react-icons/fa/futbol-o.d.ts similarity index 100% rename from react-icons/fa/futbol-o.d.ts rename to types/react-icons/fa/futbol-o.d.ts diff --git a/react-icons/fa/gamepad.d.ts b/types/react-icons/fa/gamepad.d.ts similarity index 100% rename from react-icons/fa/gamepad.d.ts rename to types/react-icons/fa/gamepad.d.ts diff --git a/react-icons/fa/gavel.d.ts b/types/react-icons/fa/gavel.d.ts similarity index 100% rename from react-icons/fa/gavel.d.ts rename to types/react-icons/fa/gavel.d.ts diff --git a/react-icons/fa/gbp.d.ts b/types/react-icons/fa/gbp.d.ts similarity index 100% rename from react-icons/fa/gbp.d.ts rename to types/react-icons/fa/gbp.d.ts diff --git a/react-icons/fa/genderless.d.ts b/types/react-icons/fa/genderless.d.ts similarity index 100% rename from react-icons/fa/genderless.d.ts rename to types/react-icons/fa/genderless.d.ts diff --git a/react-icons/fa/get-pocket.d.ts b/types/react-icons/fa/get-pocket.d.ts similarity index 100% rename from react-icons/fa/get-pocket.d.ts rename to types/react-icons/fa/get-pocket.d.ts diff --git a/react-icons/fa/gg-circle.d.ts b/types/react-icons/fa/gg-circle.d.ts similarity index 100% rename from react-icons/fa/gg-circle.d.ts rename to types/react-icons/fa/gg-circle.d.ts diff --git a/react-icons/fa/gg.d.ts b/types/react-icons/fa/gg.d.ts similarity index 100% rename from react-icons/fa/gg.d.ts rename to types/react-icons/fa/gg.d.ts diff --git a/react-icons/fa/gift.d.ts b/types/react-icons/fa/gift.d.ts similarity index 100% rename from react-icons/fa/gift.d.ts rename to types/react-icons/fa/gift.d.ts diff --git a/react-icons/fa/git-square.d.ts b/types/react-icons/fa/git-square.d.ts similarity index 100% rename from react-icons/fa/git-square.d.ts rename to types/react-icons/fa/git-square.d.ts diff --git a/react-icons/fa/git.d.ts b/types/react-icons/fa/git.d.ts similarity index 100% rename from react-icons/fa/git.d.ts rename to types/react-icons/fa/git.d.ts diff --git a/react-icons/fa/github-alt.d.ts b/types/react-icons/fa/github-alt.d.ts similarity index 100% rename from react-icons/fa/github-alt.d.ts rename to types/react-icons/fa/github-alt.d.ts diff --git a/react-icons/fa/github-square.d.ts b/types/react-icons/fa/github-square.d.ts similarity index 100% rename from react-icons/fa/github-square.d.ts rename to types/react-icons/fa/github-square.d.ts diff --git a/react-icons/fa/github.d.ts b/types/react-icons/fa/github.d.ts similarity index 100% rename from react-icons/fa/github.d.ts rename to types/react-icons/fa/github.d.ts diff --git a/react-icons/fa/gitlab.d.ts b/types/react-icons/fa/gitlab.d.ts similarity index 100% rename from react-icons/fa/gitlab.d.ts rename to types/react-icons/fa/gitlab.d.ts diff --git a/react-icons/fa/gittip.d.ts b/types/react-icons/fa/gittip.d.ts similarity index 100% rename from react-icons/fa/gittip.d.ts rename to types/react-icons/fa/gittip.d.ts diff --git a/react-icons/fa/glass.d.ts b/types/react-icons/fa/glass.d.ts similarity index 100% rename from react-icons/fa/glass.d.ts rename to types/react-icons/fa/glass.d.ts diff --git a/react-icons/fa/glide-g.d.ts b/types/react-icons/fa/glide-g.d.ts similarity index 100% rename from react-icons/fa/glide-g.d.ts rename to types/react-icons/fa/glide-g.d.ts diff --git a/react-icons/fa/glide.d.ts b/types/react-icons/fa/glide.d.ts similarity index 100% rename from react-icons/fa/glide.d.ts rename to types/react-icons/fa/glide.d.ts diff --git a/react-icons/fa/globe.d.ts b/types/react-icons/fa/globe.d.ts similarity index 100% rename from react-icons/fa/globe.d.ts rename to types/react-icons/fa/globe.d.ts diff --git a/react-icons/fa/google-plus-square.d.ts b/types/react-icons/fa/google-plus-square.d.ts similarity index 100% rename from react-icons/fa/google-plus-square.d.ts rename to types/react-icons/fa/google-plus-square.d.ts diff --git a/react-icons/fa/google-plus.d.ts b/types/react-icons/fa/google-plus.d.ts similarity index 100% rename from react-icons/fa/google-plus.d.ts rename to types/react-icons/fa/google-plus.d.ts diff --git a/react-icons/fa/google-wallet.d.ts b/types/react-icons/fa/google-wallet.d.ts similarity index 100% rename from react-icons/fa/google-wallet.d.ts rename to types/react-icons/fa/google-wallet.d.ts diff --git a/react-icons/fa/google.d.ts b/types/react-icons/fa/google.d.ts similarity index 100% rename from react-icons/fa/google.d.ts rename to types/react-icons/fa/google.d.ts diff --git a/react-icons/fa/graduation-cap.d.ts b/types/react-icons/fa/graduation-cap.d.ts similarity index 100% rename from react-icons/fa/graduation-cap.d.ts rename to types/react-icons/fa/graduation-cap.d.ts diff --git a/react-icons/fa/group.d.ts b/types/react-icons/fa/group.d.ts similarity index 100% rename from react-icons/fa/group.d.ts rename to types/react-icons/fa/group.d.ts diff --git a/react-icons/fa/h-square.d.ts b/types/react-icons/fa/h-square.d.ts similarity index 100% rename from react-icons/fa/h-square.d.ts rename to types/react-icons/fa/h-square.d.ts diff --git a/react-icons/fa/hacker-news.d.ts b/types/react-icons/fa/hacker-news.d.ts similarity index 100% rename from react-icons/fa/hacker-news.d.ts rename to types/react-icons/fa/hacker-news.d.ts diff --git a/react-icons/fa/hand-grab-o.d.ts b/types/react-icons/fa/hand-grab-o.d.ts similarity index 100% rename from react-icons/fa/hand-grab-o.d.ts rename to types/react-icons/fa/hand-grab-o.d.ts diff --git a/react-icons/fa/hand-lizard-o.d.ts b/types/react-icons/fa/hand-lizard-o.d.ts similarity index 100% rename from react-icons/fa/hand-lizard-o.d.ts rename to types/react-icons/fa/hand-lizard-o.d.ts diff --git a/react-icons/fa/hand-o-down.d.ts b/types/react-icons/fa/hand-o-down.d.ts similarity index 100% rename from react-icons/fa/hand-o-down.d.ts rename to types/react-icons/fa/hand-o-down.d.ts diff --git a/react-icons/fa/hand-o-left.d.ts b/types/react-icons/fa/hand-o-left.d.ts similarity index 100% rename from react-icons/fa/hand-o-left.d.ts rename to types/react-icons/fa/hand-o-left.d.ts diff --git a/react-icons/fa/hand-o-right.d.ts b/types/react-icons/fa/hand-o-right.d.ts similarity index 100% rename from react-icons/fa/hand-o-right.d.ts rename to types/react-icons/fa/hand-o-right.d.ts diff --git a/react-icons/fa/hand-o-up.d.ts b/types/react-icons/fa/hand-o-up.d.ts similarity index 100% rename from react-icons/fa/hand-o-up.d.ts rename to types/react-icons/fa/hand-o-up.d.ts diff --git a/react-icons/fa/hand-paper-o.d.ts b/types/react-icons/fa/hand-paper-o.d.ts similarity index 100% rename from react-icons/fa/hand-paper-o.d.ts rename to types/react-icons/fa/hand-paper-o.d.ts diff --git a/react-icons/fa/hand-peace-o.d.ts b/types/react-icons/fa/hand-peace-o.d.ts similarity index 100% rename from react-icons/fa/hand-peace-o.d.ts rename to types/react-icons/fa/hand-peace-o.d.ts diff --git a/react-icons/fa/hand-pointer-o.d.ts b/types/react-icons/fa/hand-pointer-o.d.ts similarity index 100% rename from react-icons/fa/hand-pointer-o.d.ts rename to types/react-icons/fa/hand-pointer-o.d.ts diff --git a/react-icons/fa/hand-scissors-o.d.ts b/types/react-icons/fa/hand-scissors-o.d.ts similarity index 100% rename from react-icons/fa/hand-scissors-o.d.ts rename to types/react-icons/fa/hand-scissors-o.d.ts diff --git a/react-icons/fa/hand-spock-o.d.ts b/types/react-icons/fa/hand-spock-o.d.ts similarity index 100% rename from react-icons/fa/hand-spock-o.d.ts rename to types/react-icons/fa/hand-spock-o.d.ts diff --git a/react-icons/fa/hashtag.d.ts b/types/react-icons/fa/hashtag.d.ts similarity index 100% rename from react-icons/fa/hashtag.d.ts rename to types/react-icons/fa/hashtag.d.ts diff --git a/react-icons/fa/hdd-o.d.ts b/types/react-icons/fa/hdd-o.d.ts similarity index 100% rename from react-icons/fa/hdd-o.d.ts rename to types/react-icons/fa/hdd-o.d.ts diff --git a/react-icons/fa/header.d.ts b/types/react-icons/fa/header.d.ts similarity index 100% rename from react-icons/fa/header.d.ts rename to types/react-icons/fa/header.d.ts diff --git a/react-icons/fa/headphones.d.ts b/types/react-icons/fa/headphones.d.ts similarity index 100% rename from react-icons/fa/headphones.d.ts rename to types/react-icons/fa/headphones.d.ts diff --git a/react-icons/fa/heart-o.d.ts b/types/react-icons/fa/heart-o.d.ts similarity index 100% rename from react-icons/fa/heart-o.d.ts rename to types/react-icons/fa/heart-o.d.ts diff --git a/react-icons/fa/heart.d.ts b/types/react-icons/fa/heart.d.ts similarity index 100% rename from react-icons/fa/heart.d.ts rename to types/react-icons/fa/heart.d.ts diff --git a/react-icons/fa/heartbeat.d.ts b/types/react-icons/fa/heartbeat.d.ts similarity index 100% rename from react-icons/fa/heartbeat.d.ts rename to types/react-icons/fa/heartbeat.d.ts diff --git a/react-icons/fa/history.d.ts b/types/react-icons/fa/history.d.ts similarity index 100% rename from react-icons/fa/history.d.ts rename to types/react-icons/fa/history.d.ts diff --git a/react-icons/fa/home.d.ts b/types/react-icons/fa/home.d.ts similarity index 100% rename from react-icons/fa/home.d.ts rename to types/react-icons/fa/home.d.ts diff --git a/react-icons/fa/hospital-o.d.ts b/types/react-icons/fa/hospital-o.d.ts similarity index 100% rename from react-icons/fa/hospital-o.d.ts rename to types/react-icons/fa/hospital-o.d.ts diff --git a/react-icons/fa/hourglass-1.d.ts b/types/react-icons/fa/hourglass-1.d.ts similarity index 100% rename from react-icons/fa/hourglass-1.d.ts rename to types/react-icons/fa/hourglass-1.d.ts diff --git a/react-icons/fa/hourglass-2.d.ts b/types/react-icons/fa/hourglass-2.d.ts similarity index 100% rename from react-icons/fa/hourglass-2.d.ts rename to types/react-icons/fa/hourglass-2.d.ts diff --git a/react-icons/fa/hourglass-3.d.ts b/types/react-icons/fa/hourglass-3.d.ts similarity index 100% rename from react-icons/fa/hourglass-3.d.ts rename to types/react-icons/fa/hourglass-3.d.ts diff --git a/react-icons/fa/hourglass-o.d.ts b/types/react-icons/fa/hourglass-o.d.ts similarity index 100% rename from react-icons/fa/hourglass-o.d.ts rename to types/react-icons/fa/hourglass-o.d.ts diff --git a/react-icons/fa/hourglass.d.ts b/types/react-icons/fa/hourglass.d.ts similarity index 100% rename from react-icons/fa/hourglass.d.ts rename to types/react-icons/fa/hourglass.d.ts diff --git a/react-icons/fa/houzz.d.ts b/types/react-icons/fa/houzz.d.ts similarity index 100% rename from react-icons/fa/houzz.d.ts rename to types/react-icons/fa/houzz.d.ts diff --git a/react-icons/fa/html5.d.ts b/types/react-icons/fa/html5.d.ts similarity index 100% rename from react-icons/fa/html5.d.ts rename to types/react-icons/fa/html5.d.ts diff --git a/react-icons/fa/i-cursor.d.ts b/types/react-icons/fa/i-cursor.d.ts similarity index 100% rename from react-icons/fa/i-cursor.d.ts rename to types/react-icons/fa/i-cursor.d.ts diff --git a/react-icons/fa/ils.d.ts b/types/react-icons/fa/ils.d.ts similarity index 100% rename from react-icons/fa/ils.d.ts rename to types/react-icons/fa/ils.d.ts diff --git a/react-icons/fa/image.d.ts b/types/react-icons/fa/image.d.ts similarity index 100% rename from react-icons/fa/image.d.ts rename to types/react-icons/fa/image.d.ts diff --git a/react-icons/fa/inbox.d.ts b/types/react-icons/fa/inbox.d.ts similarity index 100% rename from react-icons/fa/inbox.d.ts rename to types/react-icons/fa/inbox.d.ts diff --git a/react-icons/fa/indent.d.ts b/types/react-icons/fa/indent.d.ts similarity index 100% rename from react-icons/fa/indent.d.ts rename to types/react-icons/fa/indent.d.ts diff --git a/react-icons/fa/index.d.ts b/types/react-icons/fa/index.d.ts similarity index 100% rename from react-icons/fa/index.d.ts rename to types/react-icons/fa/index.d.ts diff --git a/react-icons/fa/industry.d.ts b/types/react-icons/fa/industry.d.ts similarity index 100% rename from react-icons/fa/industry.d.ts rename to types/react-icons/fa/industry.d.ts diff --git a/react-icons/fa/info-circle.d.ts b/types/react-icons/fa/info-circle.d.ts similarity index 100% rename from react-icons/fa/info-circle.d.ts rename to types/react-icons/fa/info-circle.d.ts diff --git a/react-icons/fa/info.d.ts b/types/react-icons/fa/info.d.ts similarity index 100% rename from react-icons/fa/info.d.ts rename to types/react-icons/fa/info.d.ts diff --git a/react-icons/fa/inr.d.ts b/types/react-icons/fa/inr.d.ts similarity index 100% rename from react-icons/fa/inr.d.ts rename to types/react-icons/fa/inr.d.ts diff --git a/react-icons/fa/instagram.d.ts b/types/react-icons/fa/instagram.d.ts similarity index 100% rename from react-icons/fa/instagram.d.ts rename to types/react-icons/fa/instagram.d.ts diff --git a/react-icons/fa/internet-explorer.d.ts b/types/react-icons/fa/internet-explorer.d.ts similarity index 100% rename from react-icons/fa/internet-explorer.d.ts rename to types/react-icons/fa/internet-explorer.d.ts diff --git a/react-icons/fa/intersex.d.ts b/types/react-icons/fa/intersex.d.ts similarity index 100% rename from react-icons/fa/intersex.d.ts rename to types/react-icons/fa/intersex.d.ts diff --git a/react-icons/fa/ioxhost.d.ts b/types/react-icons/fa/ioxhost.d.ts similarity index 100% rename from react-icons/fa/ioxhost.d.ts rename to types/react-icons/fa/ioxhost.d.ts diff --git a/react-icons/fa/italic.d.ts b/types/react-icons/fa/italic.d.ts similarity index 100% rename from react-icons/fa/italic.d.ts rename to types/react-icons/fa/italic.d.ts diff --git a/react-icons/fa/joomla.d.ts b/types/react-icons/fa/joomla.d.ts similarity index 100% rename from react-icons/fa/joomla.d.ts rename to types/react-icons/fa/joomla.d.ts diff --git a/react-icons/fa/jsfiddle.d.ts b/types/react-icons/fa/jsfiddle.d.ts similarity index 100% rename from react-icons/fa/jsfiddle.d.ts rename to types/react-icons/fa/jsfiddle.d.ts diff --git a/react-icons/fa/key.d.ts b/types/react-icons/fa/key.d.ts similarity index 100% rename from react-icons/fa/key.d.ts rename to types/react-icons/fa/key.d.ts diff --git a/react-icons/fa/keyboard-o.d.ts b/types/react-icons/fa/keyboard-o.d.ts similarity index 100% rename from react-icons/fa/keyboard-o.d.ts rename to types/react-icons/fa/keyboard-o.d.ts diff --git a/react-icons/fa/krw.d.ts b/types/react-icons/fa/krw.d.ts similarity index 100% rename from react-icons/fa/krw.d.ts rename to types/react-icons/fa/krw.d.ts diff --git a/react-icons/fa/language.d.ts b/types/react-icons/fa/language.d.ts similarity index 100% rename from react-icons/fa/language.d.ts rename to types/react-icons/fa/language.d.ts diff --git a/react-icons/fa/laptop.d.ts b/types/react-icons/fa/laptop.d.ts similarity index 100% rename from react-icons/fa/laptop.d.ts rename to types/react-icons/fa/laptop.d.ts diff --git a/react-icons/fa/lastfm-square.d.ts b/types/react-icons/fa/lastfm-square.d.ts similarity index 100% rename from react-icons/fa/lastfm-square.d.ts rename to types/react-icons/fa/lastfm-square.d.ts diff --git a/react-icons/fa/lastfm.d.ts b/types/react-icons/fa/lastfm.d.ts similarity index 100% rename from react-icons/fa/lastfm.d.ts rename to types/react-icons/fa/lastfm.d.ts diff --git a/react-icons/fa/leaf.d.ts b/types/react-icons/fa/leaf.d.ts similarity index 100% rename from react-icons/fa/leaf.d.ts rename to types/react-icons/fa/leaf.d.ts diff --git a/react-icons/fa/leanpub.d.ts b/types/react-icons/fa/leanpub.d.ts similarity index 100% rename from react-icons/fa/leanpub.d.ts rename to types/react-icons/fa/leanpub.d.ts diff --git a/react-icons/fa/lemon-o.d.ts b/types/react-icons/fa/lemon-o.d.ts similarity index 100% rename from react-icons/fa/lemon-o.d.ts rename to types/react-icons/fa/lemon-o.d.ts diff --git a/react-icons/fa/level-down.d.ts b/types/react-icons/fa/level-down.d.ts similarity index 100% rename from react-icons/fa/level-down.d.ts rename to types/react-icons/fa/level-down.d.ts diff --git a/react-icons/fa/level-up.d.ts b/types/react-icons/fa/level-up.d.ts similarity index 100% rename from react-icons/fa/level-up.d.ts rename to types/react-icons/fa/level-up.d.ts diff --git a/react-icons/fa/life-bouy.d.ts b/types/react-icons/fa/life-bouy.d.ts similarity index 100% rename from react-icons/fa/life-bouy.d.ts rename to types/react-icons/fa/life-bouy.d.ts diff --git a/react-icons/fa/lightbulb-o.d.ts b/types/react-icons/fa/lightbulb-o.d.ts similarity index 100% rename from react-icons/fa/lightbulb-o.d.ts rename to types/react-icons/fa/lightbulb-o.d.ts diff --git a/react-icons/fa/line-chart.d.ts b/types/react-icons/fa/line-chart.d.ts similarity index 100% rename from react-icons/fa/line-chart.d.ts rename to types/react-icons/fa/line-chart.d.ts diff --git a/react-icons/fa/linkedin-square.d.ts b/types/react-icons/fa/linkedin-square.d.ts similarity index 100% rename from react-icons/fa/linkedin-square.d.ts rename to types/react-icons/fa/linkedin-square.d.ts diff --git a/react-icons/fa/linkedin.d.ts b/types/react-icons/fa/linkedin.d.ts similarity index 100% rename from react-icons/fa/linkedin.d.ts rename to types/react-icons/fa/linkedin.d.ts diff --git a/react-icons/fa/linux.d.ts b/types/react-icons/fa/linux.d.ts similarity index 100% rename from react-icons/fa/linux.d.ts rename to types/react-icons/fa/linux.d.ts diff --git a/react-icons/fa/list-alt.d.ts b/types/react-icons/fa/list-alt.d.ts similarity index 100% rename from react-icons/fa/list-alt.d.ts rename to types/react-icons/fa/list-alt.d.ts diff --git a/react-icons/fa/list-ol.d.ts b/types/react-icons/fa/list-ol.d.ts similarity index 100% rename from react-icons/fa/list-ol.d.ts rename to types/react-icons/fa/list-ol.d.ts diff --git a/react-icons/fa/list-ul.d.ts b/types/react-icons/fa/list-ul.d.ts similarity index 100% rename from react-icons/fa/list-ul.d.ts rename to types/react-icons/fa/list-ul.d.ts diff --git a/react-icons/fa/list.d.ts b/types/react-icons/fa/list.d.ts similarity index 100% rename from react-icons/fa/list.d.ts rename to types/react-icons/fa/list.d.ts diff --git a/react-icons/fa/location-arrow.d.ts b/types/react-icons/fa/location-arrow.d.ts similarity index 100% rename from react-icons/fa/location-arrow.d.ts rename to types/react-icons/fa/location-arrow.d.ts diff --git a/react-icons/fa/lock.d.ts b/types/react-icons/fa/lock.d.ts similarity index 100% rename from react-icons/fa/lock.d.ts rename to types/react-icons/fa/lock.d.ts diff --git a/react-icons/fa/long-arrow-down.d.ts b/types/react-icons/fa/long-arrow-down.d.ts similarity index 100% rename from react-icons/fa/long-arrow-down.d.ts rename to types/react-icons/fa/long-arrow-down.d.ts diff --git a/react-icons/fa/long-arrow-left.d.ts b/types/react-icons/fa/long-arrow-left.d.ts similarity index 100% rename from react-icons/fa/long-arrow-left.d.ts rename to types/react-icons/fa/long-arrow-left.d.ts diff --git a/react-icons/fa/long-arrow-right.d.ts b/types/react-icons/fa/long-arrow-right.d.ts similarity index 100% rename from react-icons/fa/long-arrow-right.d.ts rename to types/react-icons/fa/long-arrow-right.d.ts diff --git a/react-icons/fa/long-arrow-up.d.ts b/types/react-icons/fa/long-arrow-up.d.ts similarity index 100% rename from react-icons/fa/long-arrow-up.d.ts rename to types/react-icons/fa/long-arrow-up.d.ts diff --git a/react-icons/fa/low-vision.d.ts b/types/react-icons/fa/low-vision.d.ts similarity index 100% rename from react-icons/fa/low-vision.d.ts rename to types/react-icons/fa/low-vision.d.ts diff --git a/react-icons/fa/magic.d.ts b/types/react-icons/fa/magic.d.ts similarity index 100% rename from react-icons/fa/magic.d.ts rename to types/react-icons/fa/magic.d.ts diff --git a/react-icons/fa/magnet.d.ts b/types/react-icons/fa/magnet.d.ts similarity index 100% rename from react-icons/fa/magnet.d.ts rename to types/react-icons/fa/magnet.d.ts diff --git a/react-icons/fa/mail-forward.d.ts b/types/react-icons/fa/mail-forward.d.ts similarity index 100% rename from react-icons/fa/mail-forward.d.ts rename to types/react-icons/fa/mail-forward.d.ts diff --git a/react-icons/fa/mail-reply-all.d.ts b/types/react-icons/fa/mail-reply-all.d.ts similarity index 100% rename from react-icons/fa/mail-reply-all.d.ts rename to types/react-icons/fa/mail-reply-all.d.ts diff --git a/react-icons/fa/mail-reply.d.ts b/types/react-icons/fa/mail-reply.d.ts similarity index 100% rename from react-icons/fa/mail-reply.d.ts rename to types/react-icons/fa/mail-reply.d.ts diff --git a/react-icons/fa/male.d.ts b/types/react-icons/fa/male.d.ts similarity index 100% rename from react-icons/fa/male.d.ts rename to types/react-icons/fa/male.d.ts diff --git a/react-icons/fa/map-marker.d.ts b/types/react-icons/fa/map-marker.d.ts similarity index 100% rename from react-icons/fa/map-marker.d.ts rename to types/react-icons/fa/map-marker.d.ts diff --git a/react-icons/fa/map-o.d.ts b/types/react-icons/fa/map-o.d.ts similarity index 100% rename from react-icons/fa/map-o.d.ts rename to types/react-icons/fa/map-o.d.ts diff --git a/react-icons/fa/map-pin.d.ts b/types/react-icons/fa/map-pin.d.ts similarity index 100% rename from react-icons/fa/map-pin.d.ts rename to types/react-icons/fa/map-pin.d.ts diff --git a/react-icons/fa/map-signs.d.ts b/types/react-icons/fa/map-signs.d.ts similarity index 100% rename from react-icons/fa/map-signs.d.ts rename to types/react-icons/fa/map-signs.d.ts diff --git a/react-icons/fa/map.d.ts b/types/react-icons/fa/map.d.ts similarity index 100% rename from react-icons/fa/map.d.ts rename to types/react-icons/fa/map.d.ts diff --git a/react-icons/fa/mars-double.d.ts b/types/react-icons/fa/mars-double.d.ts similarity index 100% rename from react-icons/fa/mars-double.d.ts rename to types/react-icons/fa/mars-double.d.ts diff --git a/react-icons/fa/mars-stroke-h.d.ts b/types/react-icons/fa/mars-stroke-h.d.ts similarity index 100% rename from react-icons/fa/mars-stroke-h.d.ts rename to types/react-icons/fa/mars-stroke-h.d.ts diff --git a/react-icons/fa/mars-stroke-v.d.ts b/types/react-icons/fa/mars-stroke-v.d.ts similarity index 100% rename from react-icons/fa/mars-stroke-v.d.ts rename to types/react-icons/fa/mars-stroke-v.d.ts diff --git a/react-icons/fa/mars-stroke.d.ts b/types/react-icons/fa/mars-stroke.d.ts similarity index 100% rename from react-icons/fa/mars-stroke.d.ts rename to types/react-icons/fa/mars-stroke.d.ts diff --git a/react-icons/fa/mars.d.ts b/types/react-icons/fa/mars.d.ts similarity index 100% rename from react-icons/fa/mars.d.ts rename to types/react-icons/fa/mars.d.ts diff --git a/react-icons/fa/maxcdn.d.ts b/types/react-icons/fa/maxcdn.d.ts similarity index 100% rename from react-icons/fa/maxcdn.d.ts rename to types/react-icons/fa/maxcdn.d.ts diff --git a/react-icons/fa/meanpath.d.ts b/types/react-icons/fa/meanpath.d.ts similarity index 100% rename from react-icons/fa/meanpath.d.ts rename to types/react-icons/fa/meanpath.d.ts diff --git a/react-icons/fa/medium.d.ts b/types/react-icons/fa/medium.d.ts similarity index 100% rename from react-icons/fa/medium.d.ts rename to types/react-icons/fa/medium.d.ts diff --git a/react-icons/fa/medkit.d.ts b/types/react-icons/fa/medkit.d.ts similarity index 100% rename from react-icons/fa/medkit.d.ts rename to types/react-icons/fa/medkit.d.ts diff --git a/react-icons/fa/meh-o.d.ts b/types/react-icons/fa/meh-o.d.ts similarity index 100% rename from react-icons/fa/meh-o.d.ts rename to types/react-icons/fa/meh-o.d.ts diff --git a/react-icons/fa/mercury.d.ts b/types/react-icons/fa/mercury.d.ts similarity index 100% rename from react-icons/fa/mercury.d.ts rename to types/react-icons/fa/mercury.d.ts diff --git a/react-icons/fa/microphone-slash.d.ts b/types/react-icons/fa/microphone-slash.d.ts similarity index 100% rename from react-icons/fa/microphone-slash.d.ts rename to types/react-icons/fa/microphone-slash.d.ts diff --git a/react-icons/fa/microphone.d.ts b/types/react-icons/fa/microphone.d.ts similarity index 100% rename from react-icons/fa/microphone.d.ts rename to types/react-icons/fa/microphone.d.ts diff --git a/react-icons/fa/minus-circle.d.ts b/types/react-icons/fa/minus-circle.d.ts similarity index 100% rename from react-icons/fa/minus-circle.d.ts rename to types/react-icons/fa/minus-circle.d.ts diff --git a/react-icons/fa/minus-square-o.d.ts b/types/react-icons/fa/minus-square-o.d.ts similarity index 100% rename from react-icons/fa/minus-square-o.d.ts rename to types/react-icons/fa/minus-square-o.d.ts diff --git a/react-icons/fa/minus-square.d.ts b/types/react-icons/fa/minus-square.d.ts similarity index 100% rename from react-icons/fa/minus-square.d.ts rename to types/react-icons/fa/minus-square.d.ts diff --git a/react-icons/fa/minus.d.ts b/types/react-icons/fa/minus.d.ts similarity index 100% rename from react-icons/fa/minus.d.ts rename to types/react-icons/fa/minus.d.ts diff --git a/react-icons/fa/mixcloud.d.ts b/types/react-icons/fa/mixcloud.d.ts similarity index 100% rename from react-icons/fa/mixcloud.d.ts rename to types/react-icons/fa/mixcloud.d.ts diff --git a/react-icons/fa/mobile.d.ts b/types/react-icons/fa/mobile.d.ts similarity index 100% rename from react-icons/fa/mobile.d.ts rename to types/react-icons/fa/mobile.d.ts diff --git a/react-icons/fa/modx.d.ts b/types/react-icons/fa/modx.d.ts similarity index 100% rename from react-icons/fa/modx.d.ts rename to types/react-icons/fa/modx.d.ts diff --git a/react-icons/fa/money.d.ts b/types/react-icons/fa/money.d.ts similarity index 100% rename from react-icons/fa/money.d.ts rename to types/react-icons/fa/money.d.ts diff --git a/react-icons/fa/moon-o.d.ts b/types/react-icons/fa/moon-o.d.ts similarity index 100% rename from react-icons/fa/moon-o.d.ts rename to types/react-icons/fa/moon-o.d.ts diff --git a/react-icons/fa/motorcycle.d.ts b/types/react-icons/fa/motorcycle.d.ts similarity index 100% rename from react-icons/fa/motorcycle.d.ts rename to types/react-icons/fa/motorcycle.d.ts diff --git a/react-icons/fa/mouse-pointer.d.ts b/types/react-icons/fa/mouse-pointer.d.ts similarity index 100% rename from react-icons/fa/mouse-pointer.d.ts rename to types/react-icons/fa/mouse-pointer.d.ts diff --git a/react-icons/fa/music.d.ts b/types/react-icons/fa/music.d.ts similarity index 100% rename from react-icons/fa/music.d.ts rename to types/react-icons/fa/music.d.ts diff --git a/react-icons/fa/neuter.d.ts b/types/react-icons/fa/neuter.d.ts similarity index 100% rename from react-icons/fa/neuter.d.ts rename to types/react-icons/fa/neuter.d.ts diff --git a/react-icons/fa/newspaper-o.d.ts b/types/react-icons/fa/newspaper-o.d.ts similarity index 100% rename from react-icons/fa/newspaper-o.d.ts rename to types/react-icons/fa/newspaper-o.d.ts diff --git a/react-icons/fa/object-group.d.ts b/types/react-icons/fa/object-group.d.ts similarity index 100% rename from react-icons/fa/object-group.d.ts rename to types/react-icons/fa/object-group.d.ts diff --git a/react-icons/fa/object-ungroup.d.ts b/types/react-icons/fa/object-ungroup.d.ts similarity index 100% rename from react-icons/fa/object-ungroup.d.ts rename to types/react-icons/fa/object-ungroup.d.ts diff --git a/react-icons/fa/odnoklassniki-square.d.ts b/types/react-icons/fa/odnoklassniki-square.d.ts similarity index 100% rename from react-icons/fa/odnoklassniki-square.d.ts rename to types/react-icons/fa/odnoklassniki-square.d.ts diff --git a/react-icons/fa/odnoklassniki.d.ts b/types/react-icons/fa/odnoklassniki.d.ts similarity index 100% rename from react-icons/fa/odnoklassniki.d.ts rename to types/react-icons/fa/odnoklassniki.d.ts diff --git a/react-icons/fa/opencart.d.ts b/types/react-icons/fa/opencart.d.ts similarity index 100% rename from react-icons/fa/opencart.d.ts rename to types/react-icons/fa/opencart.d.ts diff --git a/react-icons/fa/openid.d.ts b/types/react-icons/fa/openid.d.ts similarity index 100% rename from react-icons/fa/openid.d.ts rename to types/react-icons/fa/openid.d.ts diff --git a/react-icons/fa/opera.d.ts b/types/react-icons/fa/opera.d.ts similarity index 100% rename from react-icons/fa/opera.d.ts rename to types/react-icons/fa/opera.d.ts diff --git a/react-icons/fa/optin-monster.d.ts b/types/react-icons/fa/optin-monster.d.ts similarity index 100% rename from react-icons/fa/optin-monster.d.ts rename to types/react-icons/fa/optin-monster.d.ts diff --git a/react-icons/fa/pagelines.d.ts b/types/react-icons/fa/pagelines.d.ts similarity index 100% rename from react-icons/fa/pagelines.d.ts rename to types/react-icons/fa/pagelines.d.ts diff --git a/react-icons/fa/paint-brush.d.ts b/types/react-icons/fa/paint-brush.d.ts similarity index 100% rename from react-icons/fa/paint-brush.d.ts rename to types/react-icons/fa/paint-brush.d.ts diff --git a/react-icons/fa/paper-plane-o.d.ts b/types/react-icons/fa/paper-plane-o.d.ts similarity index 100% rename from react-icons/fa/paper-plane-o.d.ts rename to types/react-icons/fa/paper-plane-o.d.ts diff --git a/react-icons/fa/paper-plane.d.ts b/types/react-icons/fa/paper-plane.d.ts similarity index 100% rename from react-icons/fa/paper-plane.d.ts rename to types/react-icons/fa/paper-plane.d.ts diff --git a/react-icons/fa/paperclip.d.ts b/types/react-icons/fa/paperclip.d.ts similarity index 100% rename from react-icons/fa/paperclip.d.ts rename to types/react-icons/fa/paperclip.d.ts diff --git a/react-icons/fa/paragraph.d.ts b/types/react-icons/fa/paragraph.d.ts similarity index 100% rename from react-icons/fa/paragraph.d.ts rename to types/react-icons/fa/paragraph.d.ts diff --git a/react-icons/fa/pause-circle-o.d.ts b/types/react-icons/fa/pause-circle-o.d.ts similarity index 100% rename from react-icons/fa/pause-circle-o.d.ts rename to types/react-icons/fa/pause-circle-o.d.ts diff --git a/react-icons/fa/pause-circle.d.ts b/types/react-icons/fa/pause-circle.d.ts similarity index 100% rename from react-icons/fa/pause-circle.d.ts rename to types/react-icons/fa/pause-circle.d.ts diff --git a/react-icons/fa/pause.d.ts b/types/react-icons/fa/pause.d.ts similarity index 100% rename from react-icons/fa/pause.d.ts rename to types/react-icons/fa/pause.d.ts diff --git a/react-icons/fa/paw.d.ts b/types/react-icons/fa/paw.d.ts similarity index 100% rename from react-icons/fa/paw.d.ts rename to types/react-icons/fa/paw.d.ts diff --git a/react-icons/fa/paypal.d.ts b/types/react-icons/fa/paypal.d.ts similarity index 100% rename from react-icons/fa/paypal.d.ts rename to types/react-icons/fa/paypal.d.ts diff --git a/react-icons/fa/pencil-square.d.ts b/types/react-icons/fa/pencil-square.d.ts similarity index 100% rename from react-icons/fa/pencil-square.d.ts rename to types/react-icons/fa/pencil-square.d.ts diff --git a/react-icons/fa/pencil.d.ts b/types/react-icons/fa/pencil.d.ts similarity index 100% rename from react-icons/fa/pencil.d.ts rename to types/react-icons/fa/pencil.d.ts diff --git a/react-icons/fa/percent.d.ts b/types/react-icons/fa/percent.d.ts similarity index 100% rename from react-icons/fa/percent.d.ts rename to types/react-icons/fa/percent.d.ts diff --git a/react-icons/fa/phone-square.d.ts b/types/react-icons/fa/phone-square.d.ts similarity index 100% rename from react-icons/fa/phone-square.d.ts rename to types/react-icons/fa/phone-square.d.ts diff --git a/react-icons/fa/phone.d.ts b/types/react-icons/fa/phone.d.ts similarity index 100% rename from react-icons/fa/phone.d.ts rename to types/react-icons/fa/phone.d.ts diff --git a/react-icons/fa/pie-chart.d.ts b/types/react-icons/fa/pie-chart.d.ts similarity index 100% rename from react-icons/fa/pie-chart.d.ts rename to types/react-icons/fa/pie-chart.d.ts diff --git a/react-icons/fa/pied-piper-alt.d.ts b/types/react-icons/fa/pied-piper-alt.d.ts similarity index 100% rename from react-icons/fa/pied-piper-alt.d.ts rename to types/react-icons/fa/pied-piper-alt.d.ts diff --git a/react-icons/fa/pied-piper.d.ts b/types/react-icons/fa/pied-piper.d.ts similarity index 100% rename from react-icons/fa/pied-piper.d.ts rename to types/react-icons/fa/pied-piper.d.ts diff --git a/react-icons/fa/pinterest-p.d.ts b/types/react-icons/fa/pinterest-p.d.ts similarity index 100% rename from react-icons/fa/pinterest-p.d.ts rename to types/react-icons/fa/pinterest-p.d.ts diff --git a/react-icons/fa/pinterest-square.d.ts b/types/react-icons/fa/pinterest-square.d.ts similarity index 100% rename from react-icons/fa/pinterest-square.d.ts rename to types/react-icons/fa/pinterest-square.d.ts diff --git a/react-icons/fa/pinterest.d.ts b/types/react-icons/fa/pinterest.d.ts similarity index 100% rename from react-icons/fa/pinterest.d.ts rename to types/react-icons/fa/pinterest.d.ts diff --git a/react-icons/fa/plane.d.ts b/types/react-icons/fa/plane.d.ts similarity index 100% rename from react-icons/fa/plane.d.ts rename to types/react-icons/fa/plane.d.ts diff --git a/react-icons/fa/play-circle-o.d.ts b/types/react-icons/fa/play-circle-o.d.ts similarity index 100% rename from react-icons/fa/play-circle-o.d.ts rename to types/react-icons/fa/play-circle-o.d.ts diff --git a/react-icons/fa/play-circle.d.ts b/types/react-icons/fa/play-circle.d.ts similarity index 100% rename from react-icons/fa/play-circle.d.ts rename to types/react-icons/fa/play-circle.d.ts diff --git a/react-icons/fa/play.d.ts b/types/react-icons/fa/play.d.ts similarity index 100% rename from react-icons/fa/play.d.ts rename to types/react-icons/fa/play.d.ts diff --git a/react-icons/fa/plug.d.ts b/types/react-icons/fa/plug.d.ts similarity index 100% rename from react-icons/fa/plug.d.ts rename to types/react-icons/fa/plug.d.ts diff --git a/react-icons/fa/plus-circle.d.ts b/types/react-icons/fa/plus-circle.d.ts similarity index 100% rename from react-icons/fa/plus-circle.d.ts rename to types/react-icons/fa/plus-circle.d.ts diff --git a/react-icons/fa/plus-square-o.d.ts b/types/react-icons/fa/plus-square-o.d.ts similarity index 100% rename from react-icons/fa/plus-square-o.d.ts rename to types/react-icons/fa/plus-square-o.d.ts diff --git a/react-icons/fa/plus-square.d.ts b/types/react-icons/fa/plus-square.d.ts similarity index 100% rename from react-icons/fa/plus-square.d.ts rename to types/react-icons/fa/plus-square.d.ts diff --git a/react-icons/fa/plus.d.ts b/types/react-icons/fa/plus.d.ts similarity index 100% rename from react-icons/fa/plus.d.ts rename to types/react-icons/fa/plus.d.ts diff --git a/react-icons/fa/power-off.d.ts b/types/react-icons/fa/power-off.d.ts similarity index 100% rename from react-icons/fa/power-off.d.ts rename to types/react-icons/fa/power-off.d.ts diff --git a/react-icons/fa/print.d.ts b/types/react-icons/fa/print.d.ts similarity index 100% rename from react-icons/fa/print.d.ts rename to types/react-icons/fa/print.d.ts diff --git a/react-icons/fa/product-hunt.d.ts b/types/react-icons/fa/product-hunt.d.ts similarity index 100% rename from react-icons/fa/product-hunt.d.ts rename to types/react-icons/fa/product-hunt.d.ts diff --git a/react-icons/fa/puzzle-piece.d.ts b/types/react-icons/fa/puzzle-piece.d.ts similarity index 100% rename from react-icons/fa/puzzle-piece.d.ts rename to types/react-icons/fa/puzzle-piece.d.ts diff --git a/react-icons/fa/qq.d.ts b/types/react-icons/fa/qq.d.ts similarity index 100% rename from react-icons/fa/qq.d.ts rename to types/react-icons/fa/qq.d.ts diff --git a/react-icons/fa/qrcode.d.ts b/types/react-icons/fa/qrcode.d.ts similarity index 100% rename from react-icons/fa/qrcode.d.ts rename to types/react-icons/fa/qrcode.d.ts diff --git a/react-icons/fa/question-circle-o.d.ts b/types/react-icons/fa/question-circle-o.d.ts similarity index 100% rename from react-icons/fa/question-circle-o.d.ts rename to types/react-icons/fa/question-circle-o.d.ts diff --git a/react-icons/fa/question-circle.d.ts b/types/react-icons/fa/question-circle.d.ts similarity index 100% rename from react-icons/fa/question-circle.d.ts rename to types/react-icons/fa/question-circle.d.ts diff --git a/react-icons/fa/question.d.ts b/types/react-icons/fa/question.d.ts similarity index 100% rename from react-icons/fa/question.d.ts rename to types/react-icons/fa/question.d.ts diff --git a/react-icons/fa/quote-left.d.ts b/types/react-icons/fa/quote-left.d.ts similarity index 100% rename from react-icons/fa/quote-left.d.ts rename to types/react-icons/fa/quote-left.d.ts diff --git a/react-icons/fa/quote-right.d.ts b/types/react-icons/fa/quote-right.d.ts similarity index 100% rename from react-icons/fa/quote-right.d.ts rename to types/react-icons/fa/quote-right.d.ts diff --git a/react-icons/fa/ra.d.ts b/types/react-icons/fa/ra.d.ts similarity index 100% rename from react-icons/fa/ra.d.ts rename to types/react-icons/fa/ra.d.ts diff --git a/react-icons/fa/random.d.ts b/types/react-icons/fa/random.d.ts similarity index 100% rename from react-icons/fa/random.d.ts rename to types/react-icons/fa/random.d.ts diff --git a/react-icons/fa/recycle.d.ts b/types/react-icons/fa/recycle.d.ts similarity index 100% rename from react-icons/fa/recycle.d.ts rename to types/react-icons/fa/recycle.d.ts diff --git a/react-icons/fa/reddit-alien.d.ts b/types/react-icons/fa/reddit-alien.d.ts similarity index 100% rename from react-icons/fa/reddit-alien.d.ts rename to types/react-icons/fa/reddit-alien.d.ts diff --git a/react-icons/fa/reddit-square.d.ts b/types/react-icons/fa/reddit-square.d.ts similarity index 100% rename from react-icons/fa/reddit-square.d.ts rename to types/react-icons/fa/reddit-square.d.ts diff --git a/react-icons/fa/reddit.d.ts b/types/react-icons/fa/reddit.d.ts similarity index 100% rename from react-icons/fa/reddit.d.ts rename to types/react-icons/fa/reddit.d.ts diff --git a/react-icons/fa/refresh.d.ts b/types/react-icons/fa/refresh.d.ts similarity index 100% rename from react-icons/fa/refresh.d.ts rename to types/react-icons/fa/refresh.d.ts diff --git a/react-icons/fa/registered.d.ts b/types/react-icons/fa/registered.d.ts similarity index 100% rename from react-icons/fa/registered.d.ts rename to types/react-icons/fa/registered.d.ts diff --git a/react-icons/fa/renren.d.ts b/types/react-icons/fa/renren.d.ts similarity index 100% rename from react-icons/fa/renren.d.ts rename to types/react-icons/fa/renren.d.ts diff --git a/react-icons/fa/repeat.d.ts b/types/react-icons/fa/repeat.d.ts similarity index 100% rename from react-icons/fa/repeat.d.ts rename to types/react-icons/fa/repeat.d.ts diff --git a/react-icons/fa/retweet.d.ts b/types/react-icons/fa/retweet.d.ts similarity index 100% rename from react-icons/fa/retweet.d.ts rename to types/react-icons/fa/retweet.d.ts diff --git a/react-icons/fa/road.d.ts b/types/react-icons/fa/road.d.ts similarity index 100% rename from react-icons/fa/road.d.ts rename to types/react-icons/fa/road.d.ts diff --git a/react-icons/fa/rocket.d.ts b/types/react-icons/fa/rocket.d.ts similarity index 100% rename from react-icons/fa/rocket.d.ts rename to types/react-icons/fa/rocket.d.ts diff --git a/react-icons/fa/rotate-left.d.ts b/types/react-icons/fa/rotate-left.d.ts similarity index 100% rename from react-icons/fa/rotate-left.d.ts rename to types/react-icons/fa/rotate-left.d.ts diff --git a/react-icons/fa/rouble.d.ts b/types/react-icons/fa/rouble.d.ts similarity index 100% rename from react-icons/fa/rouble.d.ts rename to types/react-icons/fa/rouble.d.ts diff --git a/react-icons/fa/rss-square.d.ts b/types/react-icons/fa/rss-square.d.ts similarity index 100% rename from react-icons/fa/rss-square.d.ts rename to types/react-icons/fa/rss-square.d.ts diff --git a/react-icons/fa/safari.d.ts b/types/react-icons/fa/safari.d.ts similarity index 100% rename from react-icons/fa/safari.d.ts rename to types/react-icons/fa/safari.d.ts diff --git a/react-icons/fa/scribd.d.ts b/types/react-icons/fa/scribd.d.ts similarity index 100% rename from react-icons/fa/scribd.d.ts rename to types/react-icons/fa/scribd.d.ts diff --git a/react-icons/fa/search-minus.d.ts b/types/react-icons/fa/search-minus.d.ts similarity index 100% rename from react-icons/fa/search-minus.d.ts rename to types/react-icons/fa/search-minus.d.ts diff --git a/react-icons/fa/search-plus.d.ts b/types/react-icons/fa/search-plus.d.ts similarity index 100% rename from react-icons/fa/search-plus.d.ts rename to types/react-icons/fa/search-plus.d.ts diff --git a/react-icons/fa/search.d.ts b/types/react-icons/fa/search.d.ts similarity index 100% rename from react-icons/fa/search.d.ts rename to types/react-icons/fa/search.d.ts diff --git a/react-icons/fa/sellsy.d.ts b/types/react-icons/fa/sellsy.d.ts similarity index 100% rename from react-icons/fa/sellsy.d.ts rename to types/react-icons/fa/sellsy.d.ts diff --git a/react-icons/fa/server.d.ts b/types/react-icons/fa/server.d.ts similarity index 100% rename from react-icons/fa/server.d.ts rename to types/react-icons/fa/server.d.ts diff --git a/react-icons/fa/share-alt-square.d.ts b/types/react-icons/fa/share-alt-square.d.ts similarity index 100% rename from react-icons/fa/share-alt-square.d.ts rename to types/react-icons/fa/share-alt-square.d.ts diff --git a/react-icons/fa/share-alt.d.ts b/types/react-icons/fa/share-alt.d.ts similarity index 100% rename from react-icons/fa/share-alt.d.ts rename to types/react-icons/fa/share-alt.d.ts diff --git a/react-icons/fa/share-square-o.d.ts b/types/react-icons/fa/share-square-o.d.ts similarity index 100% rename from react-icons/fa/share-square-o.d.ts rename to types/react-icons/fa/share-square-o.d.ts diff --git a/react-icons/fa/share-square.d.ts b/types/react-icons/fa/share-square.d.ts similarity index 100% rename from react-icons/fa/share-square.d.ts rename to types/react-icons/fa/share-square.d.ts diff --git a/react-icons/fa/shield.d.ts b/types/react-icons/fa/shield.d.ts similarity index 100% rename from react-icons/fa/shield.d.ts rename to types/react-icons/fa/shield.d.ts diff --git a/react-icons/fa/ship.d.ts b/types/react-icons/fa/ship.d.ts similarity index 100% rename from react-icons/fa/ship.d.ts rename to types/react-icons/fa/ship.d.ts diff --git a/react-icons/fa/shirtsinbulk.d.ts b/types/react-icons/fa/shirtsinbulk.d.ts similarity index 100% rename from react-icons/fa/shirtsinbulk.d.ts rename to types/react-icons/fa/shirtsinbulk.d.ts diff --git a/react-icons/fa/shopping-bag.d.ts b/types/react-icons/fa/shopping-bag.d.ts similarity index 100% rename from react-icons/fa/shopping-bag.d.ts rename to types/react-icons/fa/shopping-bag.d.ts diff --git a/react-icons/fa/shopping-basket.d.ts b/types/react-icons/fa/shopping-basket.d.ts similarity index 100% rename from react-icons/fa/shopping-basket.d.ts rename to types/react-icons/fa/shopping-basket.d.ts diff --git a/react-icons/fa/shopping-cart.d.ts b/types/react-icons/fa/shopping-cart.d.ts similarity index 100% rename from react-icons/fa/shopping-cart.d.ts rename to types/react-icons/fa/shopping-cart.d.ts diff --git a/react-icons/fa/sign-in.d.ts b/types/react-icons/fa/sign-in.d.ts similarity index 100% rename from react-icons/fa/sign-in.d.ts rename to types/react-icons/fa/sign-in.d.ts diff --git a/react-icons/fa/sign-language.d.ts b/types/react-icons/fa/sign-language.d.ts similarity index 100% rename from react-icons/fa/sign-language.d.ts rename to types/react-icons/fa/sign-language.d.ts diff --git a/react-icons/fa/sign-out.d.ts b/types/react-icons/fa/sign-out.d.ts similarity index 100% rename from react-icons/fa/sign-out.d.ts rename to types/react-icons/fa/sign-out.d.ts diff --git a/react-icons/fa/signal.d.ts b/types/react-icons/fa/signal.d.ts similarity index 100% rename from react-icons/fa/signal.d.ts rename to types/react-icons/fa/signal.d.ts diff --git a/react-icons/fa/simplybuilt.d.ts b/types/react-icons/fa/simplybuilt.d.ts similarity index 100% rename from react-icons/fa/simplybuilt.d.ts rename to types/react-icons/fa/simplybuilt.d.ts diff --git a/react-icons/fa/sitemap.d.ts b/types/react-icons/fa/sitemap.d.ts similarity index 100% rename from react-icons/fa/sitemap.d.ts rename to types/react-icons/fa/sitemap.d.ts diff --git a/react-icons/fa/skyatlas.d.ts b/types/react-icons/fa/skyatlas.d.ts similarity index 100% rename from react-icons/fa/skyatlas.d.ts rename to types/react-icons/fa/skyatlas.d.ts diff --git a/react-icons/fa/skype.d.ts b/types/react-icons/fa/skype.d.ts similarity index 100% rename from react-icons/fa/skype.d.ts rename to types/react-icons/fa/skype.d.ts diff --git a/react-icons/fa/slack.d.ts b/types/react-icons/fa/slack.d.ts similarity index 100% rename from react-icons/fa/slack.d.ts rename to types/react-icons/fa/slack.d.ts diff --git a/react-icons/fa/sliders.d.ts b/types/react-icons/fa/sliders.d.ts similarity index 100% rename from react-icons/fa/sliders.d.ts rename to types/react-icons/fa/sliders.d.ts diff --git a/react-icons/fa/slideshare.d.ts b/types/react-icons/fa/slideshare.d.ts similarity index 100% rename from react-icons/fa/slideshare.d.ts rename to types/react-icons/fa/slideshare.d.ts diff --git a/react-icons/fa/smile-o.d.ts b/types/react-icons/fa/smile-o.d.ts similarity index 100% rename from react-icons/fa/smile-o.d.ts rename to types/react-icons/fa/smile-o.d.ts diff --git a/react-icons/fa/snapchat-ghost.d.ts b/types/react-icons/fa/snapchat-ghost.d.ts similarity index 100% rename from react-icons/fa/snapchat-ghost.d.ts rename to types/react-icons/fa/snapchat-ghost.d.ts diff --git a/react-icons/fa/snapchat-square.d.ts b/types/react-icons/fa/snapchat-square.d.ts similarity index 100% rename from react-icons/fa/snapchat-square.d.ts rename to types/react-icons/fa/snapchat-square.d.ts diff --git a/react-icons/fa/snapchat.d.ts b/types/react-icons/fa/snapchat.d.ts similarity index 100% rename from react-icons/fa/snapchat.d.ts rename to types/react-icons/fa/snapchat.d.ts diff --git a/react-icons/fa/sort-alpha-asc.d.ts b/types/react-icons/fa/sort-alpha-asc.d.ts similarity index 100% rename from react-icons/fa/sort-alpha-asc.d.ts rename to types/react-icons/fa/sort-alpha-asc.d.ts diff --git a/react-icons/fa/sort-alpha-desc.d.ts b/types/react-icons/fa/sort-alpha-desc.d.ts similarity index 100% rename from react-icons/fa/sort-alpha-desc.d.ts rename to types/react-icons/fa/sort-alpha-desc.d.ts diff --git a/react-icons/fa/sort-amount-asc.d.ts b/types/react-icons/fa/sort-amount-asc.d.ts similarity index 100% rename from react-icons/fa/sort-amount-asc.d.ts rename to types/react-icons/fa/sort-amount-asc.d.ts diff --git a/react-icons/fa/sort-amount-desc.d.ts b/types/react-icons/fa/sort-amount-desc.d.ts similarity index 100% rename from react-icons/fa/sort-amount-desc.d.ts rename to types/react-icons/fa/sort-amount-desc.d.ts diff --git a/react-icons/fa/sort-asc.d.ts b/types/react-icons/fa/sort-asc.d.ts similarity index 100% rename from react-icons/fa/sort-asc.d.ts rename to types/react-icons/fa/sort-asc.d.ts diff --git a/react-icons/fa/sort-desc.d.ts b/types/react-icons/fa/sort-desc.d.ts similarity index 100% rename from react-icons/fa/sort-desc.d.ts rename to types/react-icons/fa/sort-desc.d.ts diff --git a/react-icons/fa/sort-numeric-asc.d.ts b/types/react-icons/fa/sort-numeric-asc.d.ts similarity index 100% rename from react-icons/fa/sort-numeric-asc.d.ts rename to types/react-icons/fa/sort-numeric-asc.d.ts diff --git a/react-icons/fa/sort-numeric-desc.d.ts b/types/react-icons/fa/sort-numeric-desc.d.ts similarity index 100% rename from react-icons/fa/sort-numeric-desc.d.ts rename to types/react-icons/fa/sort-numeric-desc.d.ts diff --git a/react-icons/fa/sort.d.ts b/types/react-icons/fa/sort.d.ts similarity index 100% rename from react-icons/fa/sort.d.ts rename to types/react-icons/fa/sort.d.ts diff --git a/react-icons/fa/soundcloud.d.ts b/types/react-icons/fa/soundcloud.d.ts similarity index 100% rename from react-icons/fa/soundcloud.d.ts rename to types/react-icons/fa/soundcloud.d.ts diff --git a/react-icons/fa/space-shuttle.d.ts b/types/react-icons/fa/space-shuttle.d.ts similarity index 100% rename from react-icons/fa/space-shuttle.d.ts rename to types/react-icons/fa/space-shuttle.d.ts diff --git a/react-icons/fa/spinner.d.ts b/types/react-icons/fa/spinner.d.ts similarity index 100% rename from react-icons/fa/spinner.d.ts rename to types/react-icons/fa/spinner.d.ts diff --git a/react-icons/fa/spoon.d.ts b/types/react-icons/fa/spoon.d.ts similarity index 100% rename from react-icons/fa/spoon.d.ts rename to types/react-icons/fa/spoon.d.ts diff --git a/react-icons/fa/spotify.d.ts b/types/react-icons/fa/spotify.d.ts similarity index 100% rename from react-icons/fa/spotify.d.ts rename to types/react-icons/fa/spotify.d.ts diff --git a/react-icons/fa/square-o.d.ts b/types/react-icons/fa/square-o.d.ts similarity index 100% rename from react-icons/fa/square-o.d.ts rename to types/react-icons/fa/square-o.d.ts diff --git a/react-icons/fa/square.d.ts b/types/react-icons/fa/square.d.ts similarity index 100% rename from react-icons/fa/square.d.ts rename to types/react-icons/fa/square.d.ts diff --git a/react-icons/fa/stack-exchange.d.ts b/types/react-icons/fa/stack-exchange.d.ts similarity index 100% rename from react-icons/fa/stack-exchange.d.ts rename to types/react-icons/fa/stack-exchange.d.ts diff --git a/react-icons/fa/stack-overflow.d.ts b/types/react-icons/fa/stack-overflow.d.ts similarity index 100% rename from react-icons/fa/stack-overflow.d.ts rename to types/react-icons/fa/stack-overflow.d.ts diff --git a/react-icons/fa/star-half-empty.d.ts b/types/react-icons/fa/star-half-empty.d.ts similarity index 100% rename from react-icons/fa/star-half-empty.d.ts rename to types/react-icons/fa/star-half-empty.d.ts diff --git a/react-icons/fa/star-half.d.ts b/types/react-icons/fa/star-half.d.ts similarity index 100% rename from react-icons/fa/star-half.d.ts rename to types/react-icons/fa/star-half.d.ts diff --git a/react-icons/fa/star-o.d.ts b/types/react-icons/fa/star-o.d.ts similarity index 100% rename from react-icons/fa/star-o.d.ts rename to types/react-icons/fa/star-o.d.ts diff --git a/react-icons/fa/star.d.ts b/types/react-icons/fa/star.d.ts similarity index 100% rename from react-icons/fa/star.d.ts rename to types/react-icons/fa/star.d.ts diff --git a/react-icons/fa/steam-square.d.ts b/types/react-icons/fa/steam-square.d.ts similarity index 100% rename from react-icons/fa/steam-square.d.ts rename to types/react-icons/fa/steam-square.d.ts diff --git a/react-icons/fa/steam.d.ts b/types/react-icons/fa/steam.d.ts similarity index 100% rename from react-icons/fa/steam.d.ts rename to types/react-icons/fa/steam.d.ts diff --git a/react-icons/fa/step-backward.d.ts b/types/react-icons/fa/step-backward.d.ts similarity index 100% rename from react-icons/fa/step-backward.d.ts rename to types/react-icons/fa/step-backward.d.ts diff --git a/react-icons/fa/step-forward.d.ts b/types/react-icons/fa/step-forward.d.ts similarity index 100% rename from react-icons/fa/step-forward.d.ts rename to types/react-icons/fa/step-forward.d.ts diff --git a/react-icons/fa/stethoscope.d.ts b/types/react-icons/fa/stethoscope.d.ts similarity index 100% rename from react-icons/fa/stethoscope.d.ts rename to types/react-icons/fa/stethoscope.d.ts diff --git a/react-icons/fa/sticky-note-o.d.ts b/types/react-icons/fa/sticky-note-o.d.ts similarity index 100% rename from react-icons/fa/sticky-note-o.d.ts rename to types/react-icons/fa/sticky-note-o.d.ts diff --git a/react-icons/fa/sticky-note.d.ts b/types/react-icons/fa/sticky-note.d.ts similarity index 100% rename from react-icons/fa/sticky-note.d.ts rename to types/react-icons/fa/sticky-note.d.ts diff --git a/react-icons/fa/stop-circle-o.d.ts b/types/react-icons/fa/stop-circle-o.d.ts similarity index 100% rename from react-icons/fa/stop-circle-o.d.ts rename to types/react-icons/fa/stop-circle-o.d.ts diff --git a/react-icons/fa/stop-circle.d.ts b/types/react-icons/fa/stop-circle.d.ts similarity index 100% rename from react-icons/fa/stop-circle.d.ts rename to types/react-icons/fa/stop-circle.d.ts diff --git a/react-icons/fa/stop.d.ts b/types/react-icons/fa/stop.d.ts similarity index 100% rename from react-icons/fa/stop.d.ts rename to types/react-icons/fa/stop.d.ts diff --git a/react-icons/fa/street-view.d.ts b/types/react-icons/fa/street-view.d.ts similarity index 100% rename from react-icons/fa/street-view.d.ts rename to types/react-icons/fa/street-view.d.ts diff --git a/react-icons/fa/strikethrough.d.ts b/types/react-icons/fa/strikethrough.d.ts similarity index 100% rename from react-icons/fa/strikethrough.d.ts rename to types/react-icons/fa/strikethrough.d.ts diff --git a/react-icons/fa/stumbleupon-circle.d.ts b/types/react-icons/fa/stumbleupon-circle.d.ts similarity index 100% rename from react-icons/fa/stumbleupon-circle.d.ts rename to types/react-icons/fa/stumbleupon-circle.d.ts diff --git a/react-icons/fa/stumbleupon.d.ts b/types/react-icons/fa/stumbleupon.d.ts similarity index 100% rename from react-icons/fa/stumbleupon.d.ts rename to types/react-icons/fa/stumbleupon.d.ts diff --git a/react-icons/fa/subscript.d.ts b/types/react-icons/fa/subscript.d.ts similarity index 100% rename from react-icons/fa/subscript.d.ts rename to types/react-icons/fa/subscript.d.ts diff --git a/react-icons/fa/subway.d.ts b/types/react-icons/fa/subway.d.ts similarity index 100% rename from react-icons/fa/subway.d.ts rename to types/react-icons/fa/subway.d.ts diff --git a/react-icons/fa/suitcase.d.ts b/types/react-icons/fa/suitcase.d.ts similarity index 100% rename from react-icons/fa/suitcase.d.ts rename to types/react-icons/fa/suitcase.d.ts diff --git a/react-icons/fa/sun-o.d.ts b/types/react-icons/fa/sun-o.d.ts similarity index 100% rename from react-icons/fa/sun-o.d.ts rename to types/react-icons/fa/sun-o.d.ts diff --git a/react-icons/fa/superscript.d.ts b/types/react-icons/fa/superscript.d.ts similarity index 100% rename from react-icons/fa/superscript.d.ts rename to types/react-icons/fa/superscript.d.ts diff --git a/react-icons/fa/table.d.ts b/types/react-icons/fa/table.d.ts similarity index 100% rename from react-icons/fa/table.d.ts rename to types/react-icons/fa/table.d.ts diff --git a/react-icons/fa/tablet.d.ts b/types/react-icons/fa/tablet.d.ts similarity index 100% rename from react-icons/fa/tablet.d.ts rename to types/react-icons/fa/tablet.d.ts diff --git a/react-icons/fa/tag.d.ts b/types/react-icons/fa/tag.d.ts similarity index 100% rename from react-icons/fa/tag.d.ts rename to types/react-icons/fa/tag.d.ts diff --git a/react-icons/fa/tags.d.ts b/types/react-icons/fa/tags.d.ts similarity index 100% rename from react-icons/fa/tags.d.ts rename to types/react-icons/fa/tags.d.ts diff --git a/react-icons/fa/tasks.d.ts b/types/react-icons/fa/tasks.d.ts similarity index 100% rename from react-icons/fa/tasks.d.ts rename to types/react-icons/fa/tasks.d.ts diff --git a/react-icons/fa/television.d.ts b/types/react-icons/fa/television.d.ts similarity index 100% rename from react-icons/fa/television.d.ts rename to types/react-icons/fa/television.d.ts diff --git a/react-icons/fa/tencent-weibo.d.ts b/types/react-icons/fa/tencent-weibo.d.ts similarity index 100% rename from react-icons/fa/tencent-weibo.d.ts rename to types/react-icons/fa/tencent-weibo.d.ts diff --git a/react-icons/fa/terminal.d.ts b/types/react-icons/fa/terminal.d.ts similarity index 100% rename from react-icons/fa/terminal.d.ts rename to types/react-icons/fa/terminal.d.ts diff --git a/react-icons/fa/text-height.d.ts b/types/react-icons/fa/text-height.d.ts similarity index 100% rename from react-icons/fa/text-height.d.ts rename to types/react-icons/fa/text-height.d.ts diff --git a/react-icons/fa/text-width.d.ts b/types/react-icons/fa/text-width.d.ts similarity index 100% rename from react-icons/fa/text-width.d.ts rename to types/react-icons/fa/text-width.d.ts diff --git a/react-icons/fa/th-large.d.ts b/types/react-icons/fa/th-large.d.ts similarity index 100% rename from react-icons/fa/th-large.d.ts rename to types/react-icons/fa/th-large.d.ts diff --git a/react-icons/fa/th-list.d.ts b/types/react-icons/fa/th-list.d.ts similarity index 100% rename from react-icons/fa/th-list.d.ts rename to types/react-icons/fa/th-list.d.ts diff --git a/react-icons/fa/th.d.ts b/types/react-icons/fa/th.d.ts similarity index 100% rename from react-icons/fa/th.d.ts rename to types/react-icons/fa/th.d.ts diff --git a/react-icons/fa/thumb-tack.d.ts b/types/react-icons/fa/thumb-tack.d.ts similarity index 100% rename from react-icons/fa/thumb-tack.d.ts rename to types/react-icons/fa/thumb-tack.d.ts diff --git a/react-icons/fa/thumbs-down.d.ts b/types/react-icons/fa/thumbs-down.d.ts similarity index 100% rename from react-icons/fa/thumbs-down.d.ts rename to types/react-icons/fa/thumbs-down.d.ts diff --git a/react-icons/fa/thumbs-o-down.d.ts b/types/react-icons/fa/thumbs-o-down.d.ts similarity index 100% rename from react-icons/fa/thumbs-o-down.d.ts rename to types/react-icons/fa/thumbs-o-down.d.ts diff --git a/react-icons/fa/thumbs-o-up.d.ts b/types/react-icons/fa/thumbs-o-up.d.ts similarity index 100% rename from react-icons/fa/thumbs-o-up.d.ts rename to types/react-icons/fa/thumbs-o-up.d.ts diff --git a/react-icons/fa/thumbs-up.d.ts b/types/react-icons/fa/thumbs-up.d.ts similarity index 100% rename from react-icons/fa/thumbs-up.d.ts rename to types/react-icons/fa/thumbs-up.d.ts diff --git a/react-icons/fa/ticket.d.ts b/types/react-icons/fa/ticket.d.ts similarity index 100% rename from react-icons/fa/ticket.d.ts rename to types/react-icons/fa/ticket.d.ts diff --git a/react-icons/fa/times-circle-o.d.ts b/types/react-icons/fa/times-circle-o.d.ts similarity index 100% rename from react-icons/fa/times-circle-o.d.ts rename to types/react-icons/fa/times-circle-o.d.ts diff --git a/react-icons/fa/times-circle.d.ts b/types/react-icons/fa/times-circle.d.ts similarity index 100% rename from react-icons/fa/times-circle.d.ts rename to types/react-icons/fa/times-circle.d.ts diff --git a/react-icons/fa/tint.d.ts b/types/react-icons/fa/tint.d.ts similarity index 100% rename from react-icons/fa/tint.d.ts rename to types/react-icons/fa/tint.d.ts diff --git a/react-icons/fa/toggle-off.d.ts b/types/react-icons/fa/toggle-off.d.ts similarity index 100% rename from react-icons/fa/toggle-off.d.ts rename to types/react-icons/fa/toggle-off.d.ts diff --git a/react-icons/fa/toggle-on.d.ts b/types/react-icons/fa/toggle-on.d.ts similarity index 100% rename from react-icons/fa/toggle-on.d.ts rename to types/react-icons/fa/toggle-on.d.ts diff --git a/react-icons/fa/trademark.d.ts b/types/react-icons/fa/trademark.d.ts similarity index 100% rename from react-icons/fa/trademark.d.ts rename to types/react-icons/fa/trademark.d.ts diff --git a/react-icons/fa/train.d.ts b/types/react-icons/fa/train.d.ts similarity index 100% rename from react-icons/fa/train.d.ts rename to types/react-icons/fa/train.d.ts diff --git a/react-icons/fa/transgender-alt.d.ts b/types/react-icons/fa/transgender-alt.d.ts similarity index 100% rename from react-icons/fa/transgender-alt.d.ts rename to types/react-icons/fa/transgender-alt.d.ts diff --git a/react-icons/fa/trash-o.d.ts b/types/react-icons/fa/trash-o.d.ts similarity index 100% rename from react-icons/fa/trash-o.d.ts rename to types/react-icons/fa/trash-o.d.ts diff --git a/react-icons/fa/trash.d.ts b/types/react-icons/fa/trash.d.ts similarity index 100% rename from react-icons/fa/trash.d.ts rename to types/react-icons/fa/trash.d.ts diff --git a/react-icons/fa/tree.d.ts b/types/react-icons/fa/tree.d.ts similarity index 100% rename from react-icons/fa/tree.d.ts rename to types/react-icons/fa/tree.d.ts diff --git a/react-icons/fa/trello.d.ts b/types/react-icons/fa/trello.d.ts similarity index 100% rename from react-icons/fa/trello.d.ts rename to types/react-icons/fa/trello.d.ts diff --git a/react-icons/fa/tripadvisor.d.ts b/types/react-icons/fa/tripadvisor.d.ts similarity index 100% rename from react-icons/fa/tripadvisor.d.ts rename to types/react-icons/fa/tripadvisor.d.ts diff --git a/react-icons/fa/trophy.d.ts b/types/react-icons/fa/trophy.d.ts similarity index 100% rename from react-icons/fa/trophy.d.ts rename to types/react-icons/fa/trophy.d.ts diff --git a/react-icons/fa/truck.d.ts b/types/react-icons/fa/truck.d.ts similarity index 100% rename from react-icons/fa/truck.d.ts rename to types/react-icons/fa/truck.d.ts diff --git a/react-icons/fa/try.d.ts b/types/react-icons/fa/try.d.ts similarity index 100% rename from react-icons/fa/try.d.ts rename to types/react-icons/fa/try.d.ts diff --git a/react-icons/fa/tty.d.ts b/types/react-icons/fa/tty.d.ts similarity index 100% rename from react-icons/fa/tty.d.ts rename to types/react-icons/fa/tty.d.ts diff --git a/react-icons/fa/tumblr-square.d.ts b/types/react-icons/fa/tumblr-square.d.ts similarity index 100% rename from react-icons/fa/tumblr-square.d.ts rename to types/react-icons/fa/tumblr-square.d.ts diff --git a/react-icons/fa/tumblr.d.ts b/types/react-icons/fa/tumblr.d.ts similarity index 100% rename from react-icons/fa/tumblr.d.ts rename to types/react-icons/fa/tumblr.d.ts diff --git a/react-icons/fa/twitch.d.ts b/types/react-icons/fa/twitch.d.ts similarity index 100% rename from react-icons/fa/twitch.d.ts rename to types/react-icons/fa/twitch.d.ts diff --git a/react-icons/fa/twitter-square.d.ts b/types/react-icons/fa/twitter-square.d.ts similarity index 100% rename from react-icons/fa/twitter-square.d.ts rename to types/react-icons/fa/twitter-square.d.ts diff --git a/react-icons/fa/twitter.d.ts b/types/react-icons/fa/twitter.d.ts similarity index 100% rename from react-icons/fa/twitter.d.ts rename to types/react-icons/fa/twitter.d.ts diff --git a/react-icons/fa/umbrella.d.ts b/types/react-icons/fa/umbrella.d.ts similarity index 100% rename from react-icons/fa/umbrella.d.ts rename to types/react-icons/fa/umbrella.d.ts diff --git a/react-icons/fa/underline.d.ts b/types/react-icons/fa/underline.d.ts similarity index 100% rename from react-icons/fa/underline.d.ts rename to types/react-icons/fa/underline.d.ts diff --git a/react-icons/fa/universal-access.d.ts b/types/react-icons/fa/universal-access.d.ts similarity index 100% rename from react-icons/fa/universal-access.d.ts rename to types/react-icons/fa/universal-access.d.ts diff --git a/react-icons/fa/unlock-alt.d.ts b/types/react-icons/fa/unlock-alt.d.ts similarity index 100% rename from react-icons/fa/unlock-alt.d.ts rename to types/react-icons/fa/unlock-alt.d.ts diff --git a/react-icons/fa/unlock.d.ts b/types/react-icons/fa/unlock.d.ts similarity index 100% rename from react-icons/fa/unlock.d.ts rename to types/react-icons/fa/unlock.d.ts diff --git a/react-icons/fa/upload.d.ts b/types/react-icons/fa/upload.d.ts similarity index 100% rename from react-icons/fa/upload.d.ts rename to types/react-icons/fa/upload.d.ts diff --git a/react-icons/fa/usb.d.ts b/types/react-icons/fa/usb.d.ts similarity index 100% rename from react-icons/fa/usb.d.ts rename to types/react-icons/fa/usb.d.ts diff --git a/react-icons/fa/user-md.d.ts b/types/react-icons/fa/user-md.d.ts similarity index 100% rename from react-icons/fa/user-md.d.ts rename to types/react-icons/fa/user-md.d.ts diff --git a/react-icons/fa/user-plus.d.ts b/types/react-icons/fa/user-plus.d.ts similarity index 100% rename from react-icons/fa/user-plus.d.ts rename to types/react-icons/fa/user-plus.d.ts diff --git a/react-icons/fa/user-secret.d.ts b/types/react-icons/fa/user-secret.d.ts similarity index 100% rename from react-icons/fa/user-secret.d.ts rename to types/react-icons/fa/user-secret.d.ts diff --git a/react-icons/fa/user-times.d.ts b/types/react-icons/fa/user-times.d.ts similarity index 100% rename from react-icons/fa/user-times.d.ts rename to types/react-icons/fa/user-times.d.ts diff --git a/react-icons/fa/user.d.ts b/types/react-icons/fa/user.d.ts similarity index 100% rename from react-icons/fa/user.d.ts rename to types/react-icons/fa/user.d.ts diff --git a/react-icons/fa/venus-double.d.ts b/types/react-icons/fa/venus-double.d.ts similarity index 100% rename from react-icons/fa/venus-double.d.ts rename to types/react-icons/fa/venus-double.d.ts diff --git a/react-icons/fa/venus-mars.d.ts b/types/react-icons/fa/venus-mars.d.ts similarity index 100% rename from react-icons/fa/venus-mars.d.ts rename to types/react-icons/fa/venus-mars.d.ts diff --git a/react-icons/fa/venus.d.ts b/types/react-icons/fa/venus.d.ts similarity index 100% rename from react-icons/fa/venus.d.ts rename to types/react-icons/fa/venus.d.ts diff --git a/react-icons/fa/viacoin.d.ts b/types/react-icons/fa/viacoin.d.ts similarity index 100% rename from react-icons/fa/viacoin.d.ts rename to types/react-icons/fa/viacoin.d.ts diff --git a/react-icons/fa/viadeo-square.d.ts b/types/react-icons/fa/viadeo-square.d.ts similarity index 100% rename from react-icons/fa/viadeo-square.d.ts rename to types/react-icons/fa/viadeo-square.d.ts diff --git a/react-icons/fa/viadeo.d.ts b/types/react-icons/fa/viadeo.d.ts similarity index 100% rename from react-icons/fa/viadeo.d.ts rename to types/react-icons/fa/viadeo.d.ts diff --git a/react-icons/fa/video-camera.d.ts b/types/react-icons/fa/video-camera.d.ts similarity index 100% rename from react-icons/fa/video-camera.d.ts rename to types/react-icons/fa/video-camera.d.ts diff --git a/react-icons/fa/vimeo-square.d.ts b/types/react-icons/fa/vimeo-square.d.ts similarity index 100% rename from react-icons/fa/vimeo-square.d.ts rename to types/react-icons/fa/vimeo-square.d.ts diff --git a/react-icons/fa/vimeo.d.ts b/types/react-icons/fa/vimeo.d.ts similarity index 100% rename from react-icons/fa/vimeo.d.ts rename to types/react-icons/fa/vimeo.d.ts diff --git a/react-icons/fa/vine.d.ts b/types/react-icons/fa/vine.d.ts similarity index 100% rename from react-icons/fa/vine.d.ts rename to types/react-icons/fa/vine.d.ts diff --git a/react-icons/fa/vk.d.ts b/types/react-icons/fa/vk.d.ts similarity index 100% rename from react-icons/fa/vk.d.ts rename to types/react-icons/fa/vk.d.ts diff --git a/react-icons/fa/volume-control-phone.d.ts b/types/react-icons/fa/volume-control-phone.d.ts similarity index 100% rename from react-icons/fa/volume-control-phone.d.ts rename to types/react-icons/fa/volume-control-phone.d.ts diff --git a/react-icons/fa/volume-down.d.ts b/types/react-icons/fa/volume-down.d.ts similarity index 100% rename from react-icons/fa/volume-down.d.ts rename to types/react-icons/fa/volume-down.d.ts diff --git a/react-icons/fa/volume-off.d.ts b/types/react-icons/fa/volume-off.d.ts similarity index 100% rename from react-icons/fa/volume-off.d.ts rename to types/react-icons/fa/volume-off.d.ts diff --git a/react-icons/fa/volume-up.d.ts b/types/react-icons/fa/volume-up.d.ts similarity index 100% rename from react-icons/fa/volume-up.d.ts rename to types/react-icons/fa/volume-up.d.ts diff --git a/react-icons/fa/wechat.d.ts b/types/react-icons/fa/wechat.d.ts similarity index 100% rename from react-icons/fa/wechat.d.ts rename to types/react-icons/fa/wechat.d.ts diff --git a/react-icons/fa/weibo.d.ts b/types/react-icons/fa/weibo.d.ts similarity index 100% rename from react-icons/fa/weibo.d.ts rename to types/react-icons/fa/weibo.d.ts diff --git a/react-icons/fa/whatsapp.d.ts b/types/react-icons/fa/whatsapp.d.ts similarity index 100% rename from react-icons/fa/whatsapp.d.ts rename to types/react-icons/fa/whatsapp.d.ts diff --git a/react-icons/fa/wheelchair-alt.d.ts b/types/react-icons/fa/wheelchair-alt.d.ts similarity index 100% rename from react-icons/fa/wheelchair-alt.d.ts rename to types/react-icons/fa/wheelchair-alt.d.ts diff --git a/react-icons/fa/wheelchair.d.ts b/types/react-icons/fa/wheelchair.d.ts similarity index 100% rename from react-icons/fa/wheelchair.d.ts rename to types/react-icons/fa/wheelchair.d.ts diff --git a/react-icons/fa/wifi.d.ts b/types/react-icons/fa/wifi.d.ts similarity index 100% rename from react-icons/fa/wifi.d.ts rename to types/react-icons/fa/wifi.d.ts diff --git a/react-icons/fa/wikipedia-w.d.ts b/types/react-icons/fa/wikipedia-w.d.ts similarity index 100% rename from react-icons/fa/wikipedia-w.d.ts rename to types/react-icons/fa/wikipedia-w.d.ts diff --git a/react-icons/fa/windows.d.ts b/types/react-icons/fa/windows.d.ts similarity index 100% rename from react-icons/fa/windows.d.ts rename to types/react-icons/fa/windows.d.ts diff --git a/react-icons/fa/wordpress.d.ts b/types/react-icons/fa/wordpress.d.ts similarity index 100% rename from react-icons/fa/wordpress.d.ts rename to types/react-icons/fa/wordpress.d.ts diff --git a/react-icons/fa/wpbeginner.d.ts b/types/react-icons/fa/wpbeginner.d.ts similarity index 100% rename from react-icons/fa/wpbeginner.d.ts rename to types/react-icons/fa/wpbeginner.d.ts diff --git a/react-icons/fa/wpforms.d.ts b/types/react-icons/fa/wpforms.d.ts similarity index 100% rename from react-icons/fa/wpforms.d.ts rename to types/react-icons/fa/wpforms.d.ts diff --git a/react-icons/fa/wrench.d.ts b/types/react-icons/fa/wrench.d.ts similarity index 100% rename from react-icons/fa/wrench.d.ts rename to types/react-icons/fa/wrench.d.ts diff --git a/react-icons/fa/xing-square.d.ts b/types/react-icons/fa/xing-square.d.ts similarity index 100% rename from react-icons/fa/xing-square.d.ts rename to types/react-icons/fa/xing-square.d.ts diff --git a/react-icons/fa/xing.d.ts b/types/react-icons/fa/xing.d.ts similarity index 100% rename from react-icons/fa/xing.d.ts rename to types/react-icons/fa/xing.d.ts diff --git a/react-icons/fa/y-combinator.d.ts b/types/react-icons/fa/y-combinator.d.ts similarity index 100% rename from react-icons/fa/y-combinator.d.ts rename to types/react-icons/fa/y-combinator.d.ts diff --git a/react-icons/fa/yahoo.d.ts b/types/react-icons/fa/yahoo.d.ts similarity index 100% rename from react-icons/fa/yahoo.d.ts rename to types/react-icons/fa/yahoo.d.ts diff --git a/react-icons/fa/yelp.d.ts b/types/react-icons/fa/yelp.d.ts similarity index 100% rename from react-icons/fa/yelp.d.ts rename to types/react-icons/fa/yelp.d.ts diff --git a/react-icons/fa/youtube-play.d.ts b/types/react-icons/fa/youtube-play.d.ts similarity index 100% rename from react-icons/fa/youtube-play.d.ts rename to types/react-icons/fa/youtube-play.d.ts diff --git a/react-icons/fa/youtube-square.d.ts b/types/react-icons/fa/youtube-square.d.ts similarity index 100% rename from react-icons/fa/youtube-square.d.ts rename to types/react-icons/fa/youtube-square.d.ts diff --git a/react-icons/fa/youtube.d.ts b/types/react-icons/fa/youtube.d.ts similarity index 100% rename from react-icons/fa/youtube.d.ts rename to types/react-icons/fa/youtube.d.ts diff --git a/react-icons/go/alert.d.ts b/types/react-icons/go/alert.d.ts similarity index 100% rename from react-icons/go/alert.d.ts rename to types/react-icons/go/alert.d.ts diff --git a/react-icons/go/alignment-align.d.ts b/types/react-icons/go/alignment-align.d.ts similarity index 100% rename from react-icons/go/alignment-align.d.ts rename to types/react-icons/go/alignment-align.d.ts diff --git a/react-icons/go/alignment-aligned-to.d.ts b/types/react-icons/go/alignment-aligned-to.d.ts similarity index 100% rename from react-icons/go/alignment-aligned-to.d.ts rename to types/react-icons/go/alignment-aligned-to.d.ts diff --git a/react-icons/go/alignment-unalign.d.ts b/types/react-icons/go/alignment-unalign.d.ts similarity index 100% rename from react-icons/go/alignment-unalign.d.ts rename to types/react-icons/go/alignment-unalign.d.ts diff --git a/react-icons/go/arrow-down.d.ts b/types/react-icons/go/arrow-down.d.ts similarity index 100% rename from react-icons/go/arrow-down.d.ts rename to types/react-icons/go/arrow-down.d.ts diff --git a/react-icons/go/arrow-left.d.ts b/types/react-icons/go/arrow-left.d.ts similarity index 100% rename from react-icons/go/arrow-left.d.ts rename to types/react-icons/go/arrow-left.d.ts diff --git a/react-icons/go/arrow-right.d.ts b/types/react-icons/go/arrow-right.d.ts similarity index 100% rename from react-icons/go/arrow-right.d.ts rename to types/react-icons/go/arrow-right.d.ts diff --git a/react-icons/go/arrow-small-down.d.ts b/types/react-icons/go/arrow-small-down.d.ts similarity index 100% rename from react-icons/go/arrow-small-down.d.ts rename to types/react-icons/go/arrow-small-down.d.ts diff --git a/react-icons/go/arrow-small-left.d.ts b/types/react-icons/go/arrow-small-left.d.ts similarity index 100% rename from react-icons/go/arrow-small-left.d.ts rename to types/react-icons/go/arrow-small-left.d.ts diff --git a/react-icons/go/arrow-small-right.d.ts b/types/react-icons/go/arrow-small-right.d.ts similarity index 100% rename from react-icons/go/arrow-small-right.d.ts rename to types/react-icons/go/arrow-small-right.d.ts diff --git a/react-icons/go/arrow-small-up.d.ts b/types/react-icons/go/arrow-small-up.d.ts similarity index 100% rename from react-icons/go/arrow-small-up.d.ts rename to types/react-icons/go/arrow-small-up.d.ts diff --git a/react-icons/go/arrow-up.d.ts b/types/react-icons/go/arrow-up.d.ts similarity index 100% rename from react-icons/go/arrow-up.d.ts rename to types/react-icons/go/arrow-up.d.ts diff --git a/react-icons/go/beer.d.ts b/types/react-icons/go/beer.d.ts similarity index 100% rename from react-icons/go/beer.d.ts rename to types/react-icons/go/beer.d.ts diff --git a/react-icons/go/book.d.ts b/types/react-icons/go/book.d.ts similarity index 100% rename from react-icons/go/book.d.ts rename to types/react-icons/go/book.d.ts diff --git a/react-icons/go/bookmark.d.ts b/types/react-icons/go/bookmark.d.ts similarity index 100% rename from react-icons/go/bookmark.d.ts rename to types/react-icons/go/bookmark.d.ts diff --git a/react-icons/go/briefcase.d.ts b/types/react-icons/go/briefcase.d.ts similarity index 100% rename from react-icons/go/briefcase.d.ts rename to types/react-icons/go/briefcase.d.ts diff --git a/react-icons/go/broadcast.d.ts b/types/react-icons/go/broadcast.d.ts similarity index 100% rename from react-icons/go/broadcast.d.ts rename to types/react-icons/go/broadcast.d.ts diff --git a/react-icons/go/browser.d.ts b/types/react-icons/go/browser.d.ts similarity index 100% rename from react-icons/go/browser.d.ts rename to types/react-icons/go/browser.d.ts diff --git a/react-icons/go/bug.d.ts b/types/react-icons/go/bug.d.ts similarity index 100% rename from react-icons/go/bug.d.ts rename to types/react-icons/go/bug.d.ts diff --git a/react-icons/go/calendar.d.ts b/types/react-icons/go/calendar.d.ts similarity index 100% rename from react-icons/go/calendar.d.ts rename to types/react-icons/go/calendar.d.ts diff --git a/react-icons/go/check.d.ts b/types/react-icons/go/check.d.ts similarity index 100% rename from react-icons/go/check.d.ts rename to types/react-icons/go/check.d.ts diff --git a/react-icons/go/checklist.d.ts b/types/react-icons/go/checklist.d.ts similarity index 100% rename from react-icons/go/checklist.d.ts rename to types/react-icons/go/checklist.d.ts diff --git a/react-icons/go/chevron-down.d.ts b/types/react-icons/go/chevron-down.d.ts similarity index 100% rename from react-icons/go/chevron-down.d.ts rename to types/react-icons/go/chevron-down.d.ts diff --git a/react-icons/go/chevron-left.d.ts b/types/react-icons/go/chevron-left.d.ts similarity index 100% rename from react-icons/go/chevron-left.d.ts rename to types/react-icons/go/chevron-left.d.ts diff --git a/react-icons/go/chevron-right.d.ts b/types/react-icons/go/chevron-right.d.ts similarity index 100% rename from react-icons/go/chevron-right.d.ts rename to types/react-icons/go/chevron-right.d.ts diff --git a/react-icons/go/chevron-up.d.ts b/types/react-icons/go/chevron-up.d.ts similarity index 100% rename from react-icons/go/chevron-up.d.ts rename to types/react-icons/go/chevron-up.d.ts diff --git a/react-icons/go/circle-slash.d.ts b/types/react-icons/go/circle-slash.d.ts similarity index 100% rename from react-icons/go/circle-slash.d.ts rename to types/react-icons/go/circle-slash.d.ts diff --git a/react-icons/go/circuit-board.d.ts b/types/react-icons/go/circuit-board.d.ts similarity index 100% rename from react-icons/go/circuit-board.d.ts rename to types/react-icons/go/circuit-board.d.ts diff --git a/react-icons/go/clippy.d.ts b/types/react-icons/go/clippy.d.ts similarity index 100% rename from react-icons/go/clippy.d.ts rename to types/react-icons/go/clippy.d.ts diff --git a/react-icons/go/clock.d.ts b/types/react-icons/go/clock.d.ts similarity index 100% rename from react-icons/go/clock.d.ts rename to types/react-icons/go/clock.d.ts diff --git a/react-icons/go/cloud-download.d.ts b/types/react-icons/go/cloud-download.d.ts similarity index 100% rename from react-icons/go/cloud-download.d.ts rename to types/react-icons/go/cloud-download.d.ts diff --git a/react-icons/go/cloud-upload.d.ts b/types/react-icons/go/cloud-upload.d.ts similarity index 100% rename from react-icons/go/cloud-upload.d.ts rename to types/react-icons/go/cloud-upload.d.ts diff --git a/react-icons/go/code.d.ts b/types/react-icons/go/code.d.ts similarity index 100% rename from react-icons/go/code.d.ts rename to types/react-icons/go/code.d.ts diff --git a/react-icons/go/color-mode.d.ts b/types/react-icons/go/color-mode.d.ts similarity index 100% rename from react-icons/go/color-mode.d.ts rename to types/react-icons/go/color-mode.d.ts diff --git a/react-icons/go/comment-discussion.d.ts b/types/react-icons/go/comment-discussion.d.ts similarity index 100% rename from react-icons/go/comment-discussion.d.ts rename to types/react-icons/go/comment-discussion.d.ts diff --git a/react-icons/go/comment.d.ts b/types/react-icons/go/comment.d.ts similarity index 100% rename from react-icons/go/comment.d.ts rename to types/react-icons/go/comment.d.ts diff --git a/react-icons/go/credit-card.d.ts b/types/react-icons/go/credit-card.d.ts similarity index 100% rename from react-icons/go/credit-card.d.ts rename to types/react-icons/go/credit-card.d.ts diff --git a/react-icons/go/dash.d.ts b/types/react-icons/go/dash.d.ts similarity index 100% rename from react-icons/go/dash.d.ts rename to types/react-icons/go/dash.d.ts diff --git a/react-icons/go/dashboard.d.ts b/types/react-icons/go/dashboard.d.ts similarity index 100% rename from react-icons/go/dashboard.d.ts rename to types/react-icons/go/dashboard.d.ts diff --git a/react-icons/go/database.d.ts b/types/react-icons/go/database.d.ts similarity index 100% rename from react-icons/go/database.d.ts rename to types/react-icons/go/database.d.ts diff --git a/react-icons/go/device-camera-video.d.ts b/types/react-icons/go/device-camera-video.d.ts similarity index 100% rename from react-icons/go/device-camera-video.d.ts rename to types/react-icons/go/device-camera-video.d.ts diff --git a/react-icons/go/device-camera.d.ts b/types/react-icons/go/device-camera.d.ts similarity index 100% rename from react-icons/go/device-camera.d.ts rename to types/react-icons/go/device-camera.d.ts diff --git a/react-icons/go/device-desktop.d.ts b/types/react-icons/go/device-desktop.d.ts similarity index 100% rename from react-icons/go/device-desktop.d.ts rename to types/react-icons/go/device-desktop.d.ts diff --git a/react-icons/go/device-mobile.d.ts b/types/react-icons/go/device-mobile.d.ts similarity index 100% rename from react-icons/go/device-mobile.d.ts rename to types/react-icons/go/device-mobile.d.ts diff --git a/react-icons/go/diff-added.d.ts b/types/react-icons/go/diff-added.d.ts similarity index 100% rename from react-icons/go/diff-added.d.ts rename to types/react-icons/go/diff-added.d.ts diff --git a/react-icons/go/diff-ignored.d.ts b/types/react-icons/go/diff-ignored.d.ts similarity index 100% rename from react-icons/go/diff-ignored.d.ts rename to types/react-icons/go/diff-ignored.d.ts diff --git a/react-icons/go/diff-modified.d.ts b/types/react-icons/go/diff-modified.d.ts similarity index 100% rename from react-icons/go/diff-modified.d.ts rename to types/react-icons/go/diff-modified.d.ts diff --git a/react-icons/go/diff-removed.d.ts b/types/react-icons/go/diff-removed.d.ts similarity index 100% rename from react-icons/go/diff-removed.d.ts rename to types/react-icons/go/diff-removed.d.ts diff --git a/react-icons/go/diff-renamed.d.ts b/types/react-icons/go/diff-renamed.d.ts similarity index 100% rename from react-icons/go/diff-renamed.d.ts rename to types/react-icons/go/diff-renamed.d.ts diff --git a/react-icons/go/diff.d.ts b/types/react-icons/go/diff.d.ts similarity index 100% rename from react-icons/go/diff.d.ts rename to types/react-icons/go/diff.d.ts diff --git a/react-icons/go/ellipsis.d.ts b/types/react-icons/go/ellipsis.d.ts similarity index 100% rename from react-icons/go/ellipsis.d.ts rename to types/react-icons/go/ellipsis.d.ts diff --git a/react-icons/go/eye.d.ts b/types/react-icons/go/eye.d.ts similarity index 100% rename from react-icons/go/eye.d.ts rename to types/react-icons/go/eye.d.ts diff --git a/react-icons/go/file-binary.d.ts b/types/react-icons/go/file-binary.d.ts similarity index 100% rename from react-icons/go/file-binary.d.ts rename to types/react-icons/go/file-binary.d.ts diff --git a/react-icons/go/file-code.d.ts b/types/react-icons/go/file-code.d.ts similarity index 100% rename from react-icons/go/file-code.d.ts rename to types/react-icons/go/file-code.d.ts diff --git a/react-icons/go/file-directory.d.ts b/types/react-icons/go/file-directory.d.ts similarity index 100% rename from react-icons/go/file-directory.d.ts rename to types/react-icons/go/file-directory.d.ts diff --git a/react-icons/go/file-media.d.ts b/types/react-icons/go/file-media.d.ts similarity index 100% rename from react-icons/go/file-media.d.ts rename to types/react-icons/go/file-media.d.ts diff --git a/react-icons/go/file-pdf.d.ts b/types/react-icons/go/file-pdf.d.ts similarity index 100% rename from react-icons/go/file-pdf.d.ts rename to types/react-icons/go/file-pdf.d.ts diff --git a/react-icons/go/file-submodule.d.ts b/types/react-icons/go/file-submodule.d.ts similarity index 100% rename from react-icons/go/file-submodule.d.ts rename to types/react-icons/go/file-submodule.d.ts diff --git a/react-icons/go/file-symlink-directory.d.ts b/types/react-icons/go/file-symlink-directory.d.ts similarity index 100% rename from react-icons/go/file-symlink-directory.d.ts rename to types/react-icons/go/file-symlink-directory.d.ts diff --git a/react-icons/go/file-symlink-file.d.ts b/types/react-icons/go/file-symlink-file.d.ts similarity index 100% rename from react-icons/go/file-symlink-file.d.ts rename to types/react-icons/go/file-symlink-file.d.ts diff --git a/react-icons/go/file-text.d.ts b/types/react-icons/go/file-text.d.ts similarity index 100% rename from react-icons/go/file-text.d.ts rename to types/react-icons/go/file-text.d.ts diff --git a/react-icons/go/file-zip.d.ts b/types/react-icons/go/file-zip.d.ts similarity index 100% rename from react-icons/go/file-zip.d.ts rename to types/react-icons/go/file-zip.d.ts diff --git a/react-icons/go/flame.d.ts b/types/react-icons/go/flame.d.ts similarity index 100% rename from react-icons/go/flame.d.ts rename to types/react-icons/go/flame.d.ts diff --git a/react-icons/go/fold.d.ts b/types/react-icons/go/fold.d.ts similarity index 100% rename from react-icons/go/fold.d.ts rename to types/react-icons/go/fold.d.ts diff --git a/react-icons/go/gear.d.ts b/types/react-icons/go/gear.d.ts similarity index 100% rename from react-icons/go/gear.d.ts rename to types/react-icons/go/gear.d.ts diff --git a/react-icons/go/gift.d.ts b/types/react-icons/go/gift.d.ts similarity index 100% rename from react-icons/go/gift.d.ts rename to types/react-icons/go/gift.d.ts diff --git a/react-icons/go/gist-secret.d.ts b/types/react-icons/go/gist-secret.d.ts similarity index 100% rename from react-icons/go/gist-secret.d.ts rename to types/react-icons/go/gist-secret.d.ts diff --git a/react-icons/go/gist.d.ts b/types/react-icons/go/gist.d.ts similarity index 100% rename from react-icons/go/gist.d.ts rename to types/react-icons/go/gist.d.ts diff --git a/react-icons/go/git-branch.d.ts b/types/react-icons/go/git-branch.d.ts similarity index 100% rename from react-icons/go/git-branch.d.ts rename to types/react-icons/go/git-branch.d.ts diff --git a/react-icons/go/git-commit.d.ts b/types/react-icons/go/git-commit.d.ts similarity index 100% rename from react-icons/go/git-commit.d.ts rename to types/react-icons/go/git-commit.d.ts diff --git a/react-icons/go/git-compare.d.ts b/types/react-icons/go/git-compare.d.ts similarity index 100% rename from react-icons/go/git-compare.d.ts rename to types/react-icons/go/git-compare.d.ts diff --git a/react-icons/go/git-merge.d.ts b/types/react-icons/go/git-merge.d.ts similarity index 100% rename from react-icons/go/git-merge.d.ts rename to types/react-icons/go/git-merge.d.ts diff --git a/react-icons/go/git-pull-request.d.ts b/types/react-icons/go/git-pull-request.d.ts similarity index 100% rename from react-icons/go/git-pull-request.d.ts rename to types/react-icons/go/git-pull-request.d.ts diff --git a/react-icons/go/globe.d.ts b/types/react-icons/go/globe.d.ts similarity index 100% rename from react-icons/go/globe.d.ts rename to types/react-icons/go/globe.d.ts diff --git a/react-icons/go/graph.d.ts b/types/react-icons/go/graph.d.ts similarity index 100% rename from react-icons/go/graph.d.ts rename to types/react-icons/go/graph.d.ts diff --git a/react-icons/go/heart.d.ts b/types/react-icons/go/heart.d.ts similarity index 100% rename from react-icons/go/heart.d.ts rename to types/react-icons/go/heart.d.ts diff --git a/react-icons/go/history.d.ts b/types/react-icons/go/history.d.ts similarity index 100% rename from react-icons/go/history.d.ts rename to types/react-icons/go/history.d.ts diff --git a/react-icons/go/home.d.ts b/types/react-icons/go/home.d.ts similarity index 100% rename from react-icons/go/home.d.ts rename to types/react-icons/go/home.d.ts diff --git a/react-icons/go/horizontal-rule.d.ts b/types/react-icons/go/horizontal-rule.d.ts similarity index 100% rename from react-icons/go/horizontal-rule.d.ts rename to types/react-icons/go/horizontal-rule.d.ts diff --git a/react-icons/go/hourglass.d.ts b/types/react-icons/go/hourglass.d.ts similarity index 100% rename from react-icons/go/hourglass.d.ts rename to types/react-icons/go/hourglass.d.ts diff --git a/react-icons/go/hubot.d.ts b/types/react-icons/go/hubot.d.ts similarity index 100% rename from react-icons/go/hubot.d.ts rename to types/react-icons/go/hubot.d.ts diff --git a/react-icons/go/inbox.d.ts b/types/react-icons/go/inbox.d.ts similarity index 100% rename from react-icons/go/inbox.d.ts rename to types/react-icons/go/inbox.d.ts diff --git a/react-icons/go/index.d.ts b/types/react-icons/go/index.d.ts similarity index 100% rename from react-icons/go/index.d.ts rename to types/react-icons/go/index.d.ts diff --git a/react-icons/go/info.d.ts b/types/react-icons/go/info.d.ts similarity index 100% rename from react-icons/go/info.d.ts rename to types/react-icons/go/info.d.ts diff --git a/react-icons/go/issue-closed.d.ts b/types/react-icons/go/issue-closed.d.ts similarity index 100% rename from react-icons/go/issue-closed.d.ts rename to types/react-icons/go/issue-closed.d.ts diff --git a/react-icons/go/issue-opened.d.ts b/types/react-icons/go/issue-opened.d.ts similarity index 100% rename from react-icons/go/issue-opened.d.ts rename to types/react-icons/go/issue-opened.d.ts diff --git a/react-icons/go/issue-reopened.d.ts b/types/react-icons/go/issue-reopened.d.ts similarity index 100% rename from react-icons/go/issue-reopened.d.ts rename to types/react-icons/go/issue-reopened.d.ts diff --git a/react-icons/go/jersey.d.ts b/types/react-icons/go/jersey.d.ts similarity index 100% rename from react-icons/go/jersey.d.ts rename to types/react-icons/go/jersey.d.ts diff --git a/react-icons/go/jump-down.d.ts b/types/react-icons/go/jump-down.d.ts similarity index 100% rename from react-icons/go/jump-down.d.ts rename to types/react-icons/go/jump-down.d.ts diff --git a/react-icons/go/jump-left.d.ts b/types/react-icons/go/jump-left.d.ts similarity index 100% rename from react-icons/go/jump-left.d.ts rename to types/react-icons/go/jump-left.d.ts diff --git a/react-icons/go/jump-right.d.ts b/types/react-icons/go/jump-right.d.ts similarity index 100% rename from react-icons/go/jump-right.d.ts rename to types/react-icons/go/jump-right.d.ts diff --git a/react-icons/go/jump-up.d.ts b/types/react-icons/go/jump-up.d.ts similarity index 100% rename from react-icons/go/jump-up.d.ts rename to types/react-icons/go/jump-up.d.ts diff --git a/react-icons/go/key.d.ts b/types/react-icons/go/key.d.ts similarity index 100% rename from react-icons/go/key.d.ts rename to types/react-icons/go/key.d.ts diff --git a/react-icons/go/keyboard.d.ts b/types/react-icons/go/keyboard.d.ts similarity index 100% rename from react-icons/go/keyboard.d.ts rename to types/react-icons/go/keyboard.d.ts diff --git a/react-icons/go/law.d.ts b/types/react-icons/go/law.d.ts similarity index 100% rename from react-icons/go/law.d.ts rename to types/react-icons/go/law.d.ts diff --git a/react-icons/go/light-bulb.d.ts b/types/react-icons/go/light-bulb.d.ts similarity index 100% rename from react-icons/go/light-bulb.d.ts rename to types/react-icons/go/light-bulb.d.ts diff --git a/react-icons/go/link-external.d.ts b/types/react-icons/go/link-external.d.ts similarity index 100% rename from react-icons/go/link-external.d.ts rename to types/react-icons/go/link-external.d.ts diff --git a/react-icons/go/link.d.ts b/types/react-icons/go/link.d.ts similarity index 100% rename from react-icons/go/link.d.ts rename to types/react-icons/go/link.d.ts diff --git a/react-icons/go/list-ordered.d.ts b/types/react-icons/go/list-ordered.d.ts similarity index 100% rename from react-icons/go/list-ordered.d.ts rename to types/react-icons/go/list-ordered.d.ts diff --git a/react-icons/go/list-unordered.d.ts b/types/react-icons/go/list-unordered.d.ts similarity index 100% rename from react-icons/go/list-unordered.d.ts rename to types/react-icons/go/list-unordered.d.ts diff --git a/react-icons/go/location.d.ts b/types/react-icons/go/location.d.ts similarity index 100% rename from react-icons/go/location.d.ts rename to types/react-icons/go/location.d.ts diff --git a/react-icons/go/lock.d.ts b/types/react-icons/go/lock.d.ts similarity index 100% rename from react-icons/go/lock.d.ts rename to types/react-icons/go/lock.d.ts diff --git a/react-icons/go/logo-github.d.ts b/types/react-icons/go/logo-github.d.ts similarity index 100% rename from react-icons/go/logo-github.d.ts rename to types/react-icons/go/logo-github.d.ts diff --git a/react-icons/go/mail-read.d.ts b/types/react-icons/go/mail-read.d.ts similarity index 100% rename from react-icons/go/mail-read.d.ts rename to types/react-icons/go/mail-read.d.ts diff --git a/react-icons/go/mail-reply.d.ts b/types/react-icons/go/mail-reply.d.ts similarity index 100% rename from react-icons/go/mail-reply.d.ts rename to types/react-icons/go/mail-reply.d.ts diff --git a/react-icons/go/mail.d.ts b/types/react-icons/go/mail.d.ts similarity index 100% rename from react-icons/go/mail.d.ts rename to types/react-icons/go/mail.d.ts diff --git a/react-icons/go/mark-github.d.ts b/types/react-icons/go/mark-github.d.ts similarity index 100% rename from react-icons/go/mark-github.d.ts rename to types/react-icons/go/mark-github.d.ts diff --git a/react-icons/go/markdown.d.ts b/types/react-icons/go/markdown.d.ts similarity index 100% rename from react-icons/go/markdown.d.ts rename to types/react-icons/go/markdown.d.ts diff --git a/react-icons/go/megaphone.d.ts b/types/react-icons/go/megaphone.d.ts similarity index 100% rename from react-icons/go/megaphone.d.ts rename to types/react-icons/go/megaphone.d.ts diff --git a/react-icons/go/mention.d.ts b/types/react-icons/go/mention.d.ts similarity index 100% rename from react-icons/go/mention.d.ts rename to types/react-icons/go/mention.d.ts diff --git a/react-icons/go/microscope.d.ts b/types/react-icons/go/microscope.d.ts similarity index 100% rename from react-icons/go/microscope.d.ts rename to types/react-icons/go/microscope.d.ts diff --git a/react-icons/go/milestone.d.ts b/types/react-icons/go/milestone.d.ts similarity index 100% rename from react-icons/go/milestone.d.ts rename to types/react-icons/go/milestone.d.ts diff --git a/react-icons/go/mirror.d.ts b/types/react-icons/go/mirror.d.ts similarity index 100% rename from react-icons/go/mirror.d.ts rename to types/react-icons/go/mirror.d.ts diff --git a/react-icons/go/mortar-board.d.ts b/types/react-icons/go/mortar-board.d.ts similarity index 100% rename from react-icons/go/mortar-board.d.ts rename to types/react-icons/go/mortar-board.d.ts diff --git a/react-icons/go/move-down.d.ts b/types/react-icons/go/move-down.d.ts similarity index 100% rename from react-icons/go/move-down.d.ts rename to types/react-icons/go/move-down.d.ts diff --git a/react-icons/go/move-left.d.ts b/types/react-icons/go/move-left.d.ts similarity index 100% rename from react-icons/go/move-left.d.ts rename to types/react-icons/go/move-left.d.ts diff --git a/react-icons/go/move-right.d.ts b/types/react-icons/go/move-right.d.ts similarity index 100% rename from react-icons/go/move-right.d.ts rename to types/react-icons/go/move-right.d.ts diff --git a/react-icons/go/move-up.d.ts b/types/react-icons/go/move-up.d.ts similarity index 100% rename from react-icons/go/move-up.d.ts rename to types/react-icons/go/move-up.d.ts diff --git a/react-icons/go/mute.d.ts b/types/react-icons/go/mute.d.ts similarity index 100% rename from react-icons/go/mute.d.ts rename to types/react-icons/go/mute.d.ts diff --git a/react-icons/go/no-newline.d.ts b/types/react-icons/go/no-newline.d.ts similarity index 100% rename from react-icons/go/no-newline.d.ts rename to types/react-icons/go/no-newline.d.ts diff --git a/react-icons/go/octoface.d.ts b/types/react-icons/go/octoface.d.ts similarity index 100% rename from react-icons/go/octoface.d.ts rename to types/react-icons/go/octoface.d.ts diff --git a/react-icons/go/organization.d.ts b/types/react-icons/go/organization.d.ts similarity index 100% rename from react-icons/go/organization.d.ts rename to types/react-icons/go/organization.d.ts diff --git a/react-icons/go/package.d.ts b/types/react-icons/go/package.d.ts similarity index 100% rename from react-icons/go/package.d.ts rename to types/react-icons/go/package.d.ts diff --git a/react-icons/go/paintcan.d.ts b/types/react-icons/go/paintcan.d.ts similarity index 100% rename from react-icons/go/paintcan.d.ts rename to types/react-icons/go/paintcan.d.ts diff --git a/react-icons/go/pencil.d.ts b/types/react-icons/go/pencil.d.ts similarity index 100% rename from react-icons/go/pencil.d.ts rename to types/react-icons/go/pencil.d.ts diff --git a/react-icons/go/person.d.ts b/types/react-icons/go/person.d.ts similarity index 100% rename from react-icons/go/person.d.ts rename to types/react-icons/go/person.d.ts diff --git a/react-icons/go/pin.d.ts b/types/react-icons/go/pin.d.ts similarity index 100% rename from react-icons/go/pin.d.ts rename to types/react-icons/go/pin.d.ts diff --git a/react-icons/go/playback-fast-forward.d.ts b/types/react-icons/go/playback-fast-forward.d.ts similarity index 100% rename from react-icons/go/playback-fast-forward.d.ts rename to types/react-icons/go/playback-fast-forward.d.ts diff --git a/react-icons/go/playback-pause.d.ts b/types/react-icons/go/playback-pause.d.ts similarity index 100% rename from react-icons/go/playback-pause.d.ts rename to types/react-icons/go/playback-pause.d.ts diff --git a/react-icons/go/playback-play.d.ts b/types/react-icons/go/playback-play.d.ts similarity index 100% rename from react-icons/go/playback-play.d.ts rename to types/react-icons/go/playback-play.d.ts diff --git a/react-icons/go/playback-rewind.d.ts b/types/react-icons/go/playback-rewind.d.ts similarity index 100% rename from react-icons/go/playback-rewind.d.ts rename to types/react-icons/go/playback-rewind.d.ts diff --git a/react-icons/go/plug.d.ts b/types/react-icons/go/plug.d.ts similarity index 100% rename from react-icons/go/plug.d.ts rename to types/react-icons/go/plug.d.ts diff --git a/react-icons/go/plus.d.ts b/types/react-icons/go/plus.d.ts similarity index 100% rename from react-icons/go/plus.d.ts rename to types/react-icons/go/plus.d.ts diff --git a/react-icons/go/podium.d.ts b/types/react-icons/go/podium.d.ts similarity index 100% rename from react-icons/go/podium.d.ts rename to types/react-icons/go/podium.d.ts diff --git a/react-icons/go/primitive-dot.d.ts b/types/react-icons/go/primitive-dot.d.ts similarity index 100% rename from react-icons/go/primitive-dot.d.ts rename to types/react-icons/go/primitive-dot.d.ts diff --git a/react-icons/go/primitive-square.d.ts b/types/react-icons/go/primitive-square.d.ts similarity index 100% rename from react-icons/go/primitive-square.d.ts rename to types/react-icons/go/primitive-square.d.ts diff --git a/react-icons/go/pulse.d.ts b/types/react-icons/go/pulse.d.ts similarity index 100% rename from react-icons/go/pulse.d.ts rename to types/react-icons/go/pulse.d.ts diff --git a/react-icons/go/puzzle.d.ts b/types/react-icons/go/puzzle.d.ts similarity index 100% rename from react-icons/go/puzzle.d.ts rename to types/react-icons/go/puzzle.d.ts diff --git a/react-icons/go/question.d.ts b/types/react-icons/go/question.d.ts similarity index 100% rename from react-icons/go/question.d.ts rename to types/react-icons/go/question.d.ts diff --git a/react-icons/go/quote.d.ts b/types/react-icons/go/quote.d.ts similarity index 100% rename from react-icons/go/quote.d.ts rename to types/react-icons/go/quote.d.ts diff --git a/react-icons/go/radio-tower.d.ts b/types/react-icons/go/radio-tower.d.ts similarity index 100% rename from react-icons/go/radio-tower.d.ts rename to types/react-icons/go/radio-tower.d.ts diff --git a/react-icons/go/repo-clone.d.ts b/types/react-icons/go/repo-clone.d.ts similarity index 100% rename from react-icons/go/repo-clone.d.ts rename to types/react-icons/go/repo-clone.d.ts diff --git a/react-icons/go/repo-force-push.d.ts b/types/react-icons/go/repo-force-push.d.ts similarity index 100% rename from react-icons/go/repo-force-push.d.ts rename to types/react-icons/go/repo-force-push.d.ts diff --git a/react-icons/go/repo-forked.d.ts b/types/react-icons/go/repo-forked.d.ts similarity index 100% rename from react-icons/go/repo-forked.d.ts rename to types/react-icons/go/repo-forked.d.ts diff --git a/react-icons/go/repo-pull.d.ts b/types/react-icons/go/repo-pull.d.ts similarity index 100% rename from react-icons/go/repo-pull.d.ts rename to types/react-icons/go/repo-pull.d.ts diff --git a/react-icons/go/repo-push.d.ts b/types/react-icons/go/repo-push.d.ts similarity index 100% rename from react-icons/go/repo-push.d.ts rename to types/react-icons/go/repo-push.d.ts diff --git a/react-icons/go/repo.d.ts b/types/react-icons/go/repo.d.ts similarity index 100% rename from react-icons/go/repo.d.ts rename to types/react-icons/go/repo.d.ts diff --git a/react-icons/go/rocket.d.ts b/types/react-icons/go/rocket.d.ts similarity index 100% rename from react-icons/go/rocket.d.ts rename to types/react-icons/go/rocket.d.ts diff --git a/react-icons/go/rss.d.ts b/types/react-icons/go/rss.d.ts similarity index 100% rename from react-icons/go/rss.d.ts rename to types/react-icons/go/rss.d.ts diff --git a/react-icons/go/ruby.d.ts b/types/react-icons/go/ruby.d.ts similarity index 100% rename from react-icons/go/ruby.d.ts rename to types/react-icons/go/ruby.d.ts diff --git a/react-icons/go/screen-full.d.ts b/types/react-icons/go/screen-full.d.ts similarity index 100% rename from react-icons/go/screen-full.d.ts rename to types/react-icons/go/screen-full.d.ts diff --git a/react-icons/go/screen-normal.d.ts b/types/react-icons/go/screen-normal.d.ts similarity index 100% rename from react-icons/go/screen-normal.d.ts rename to types/react-icons/go/screen-normal.d.ts diff --git a/react-icons/go/search.d.ts b/types/react-icons/go/search.d.ts similarity index 100% rename from react-icons/go/search.d.ts rename to types/react-icons/go/search.d.ts diff --git a/react-icons/go/server.d.ts b/types/react-icons/go/server.d.ts similarity index 100% rename from react-icons/go/server.d.ts rename to types/react-icons/go/server.d.ts diff --git a/react-icons/go/settings.d.ts b/types/react-icons/go/settings.d.ts similarity index 100% rename from react-icons/go/settings.d.ts rename to types/react-icons/go/settings.d.ts diff --git a/react-icons/go/sign-in.d.ts b/types/react-icons/go/sign-in.d.ts similarity index 100% rename from react-icons/go/sign-in.d.ts rename to types/react-icons/go/sign-in.d.ts diff --git a/react-icons/go/sign-out.d.ts b/types/react-icons/go/sign-out.d.ts similarity index 100% rename from react-icons/go/sign-out.d.ts rename to types/react-icons/go/sign-out.d.ts diff --git a/react-icons/go/split.d.ts b/types/react-icons/go/split.d.ts similarity index 100% rename from react-icons/go/split.d.ts rename to types/react-icons/go/split.d.ts diff --git a/react-icons/go/squirrel.d.ts b/types/react-icons/go/squirrel.d.ts similarity index 100% rename from react-icons/go/squirrel.d.ts rename to types/react-icons/go/squirrel.d.ts diff --git a/react-icons/go/star.d.ts b/types/react-icons/go/star.d.ts similarity index 100% rename from react-icons/go/star.d.ts rename to types/react-icons/go/star.d.ts diff --git a/react-icons/go/steps.d.ts b/types/react-icons/go/steps.d.ts similarity index 100% rename from react-icons/go/steps.d.ts rename to types/react-icons/go/steps.d.ts diff --git a/react-icons/go/stop.d.ts b/types/react-icons/go/stop.d.ts similarity index 100% rename from react-icons/go/stop.d.ts rename to types/react-icons/go/stop.d.ts diff --git a/react-icons/go/sync.d.ts b/types/react-icons/go/sync.d.ts similarity index 100% rename from react-icons/go/sync.d.ts rename to types/react-icons/go/sync.d.ts diff --git a/react-icons/go/tag.d.ts b/types/react-icons/go/tag.d.ts similarity index 100% rename from react-icons/go/tag.d.ts rename to types/react-icons/go/tag.d.ts diff --git a/react-icons/go/telescope.d.ts b/types/react-icons/go/telescope.d.ts similarity index 100% rename from react-icons/go/telescope.d.ts rename to types/react-icons/go/telescope.d.ts diff --git a/react-icons/go/terminal.d.ts b/types/react-icons/go/terminal.d.ts similarity index 100% rename from react-icons/go/terminal.d.ts rename to types/react-icons/go/terminal.d.ts diff --git a/react-icons/go/three-bars.d.ts b/types/react-icons/go/three-bars.d.ts similarity index 100% rename from react-icons/go/three-bars.d.ts rename to types/react-icons/go/three-bars.d.ts diff --git a/react-icons/go/tools.d.ts b/types/react-icons/go/tools.d.ts similarity index 100% rename from react-icons/go/tools.d.ts rename to types/react-icons/go/tools.d.ts diff --git a/react-icons/go/trashcan.d.ts b/types/react-icons/go/trashcan.d.ts similarity index 100% rename from react-icons/go/trashcan.d.ts rename to types/react-icons/go/trashcan.d.ts diff --git a/react-icons/go/triangle-down.d.ts b/types/react-icons/go/triangle-down.d.ts similarity index 100% rename from react-icons/go/triangle-down.d.ts rename to types/react-icons/go/triangle-down.d.ts diff --git a/react-icons/go/triangle-left.d.ts b/types/react-icons/go/triangle-left.d.ts similarity index 100% rename from react-icons/go/triangle-left.d.ts rename to types/react-icons/go/triangle-left.d.ts diff --git a/react-icons/go/triangle-right.d.ts b/types/react-icons/go/triangle-right.d.ts similarity index 100% rename from react-icons/go/triangle-right.d.ts rename to types/react-icons/go/triangle-right.d.ts diff --git a/react-icons/go/triangle-up.d.ts b/types/react-icons/go/triangle-up.d.ts similarity index 100% rename from react-icons/go/triangle-up.d.ts rename to types/react-icons/go/triangle-up.d.ts diff --git a/react-icons/go/unfold.d.ts b/types/react-icons/go/unfold.d.ts similarity index 100% rename from react-icons/go/unfold.d.ts rename to types/react-icons/go/unfold.d.ts diff --git a/react-icons/go/unmute.d.ts b/types/react-icons/go/unmute.d.ts similarity index 100% rename from react-icons/go/unmute.d.ts rename to types/react-icons/go/unmute.d.ts diff --git a/react-icons/go/versions.d.ts b/types/react-icons/go/versions.d.ts similarity index 100% rename from react-icons/go/versions.d.ts rename to types/react-icons/go/versions.d.ts diff --git a/react-icons/go/x.d.ts b/types/react-icons/go/x.d.ts similarity index 100% rename from react-icons/go/x.d.ts rename to types/react-icons/go/x.d.ts diff --git a/react-icons/go/zap.d.ts b/types/react-icons/go/zap.d.ts similarity index 100% rename from react-icons/go/zap.d.ts rename to types/react-icons/go/zap.d.ts diff --git a/react-icons/index.d.ts b/types/react-icons/index.d.ts similarity index 100% rename from react-icons/index.d.ts rename to types/react-icons/index.d.ts diff --git a/react-icons/io/alert-circled.d.ts b/types/react-icons/io/alert-circled.d.ts similarity index 100% rename from react-icons/io/alert-circled.d.ts rename to types/react-icons/io/alert-circled.d.ts diff --git a/react-icons/io/alert.d.ts b/types/react-icons/io/alert.d.ts similarity index 100% rename from react-icons/io/alert.d.ts rename to types/react-icons/io/alert.d.ts diff --git a/react-icons/io/android-add-circle.d.ts b/types/react-icons/io/android-add-circle.d.ts similarity index 100% rename from react-icons/io/android-add-circle.d.ts rename to types/react-icons/io/android-add-circle.d.ts diff --git a/react-icons/io/android-add.d.ts b/types/react-icons/io/android-add.d.ts similarity index 100% rename from react-icons/io/android-add.d.ts rename to types/react-icons/io/android-add.d.ts diff --git a/react-icons/io/android-alarm-clock.d.ts b/types/react-icons/io/android-alarm-clock.d.ts similarity index 100% rename from react-icons/io/android-alarm-clock.d.ts rename to types/react-icons/io/android-alarm-clock.d.ts diff --git a/react-icons/io/android-alert.d.ts b/types/react-icons/io/android-alert.d.ts similarity index 100% rename from react-icons/io/android-alert.d.ts rename to types/react-icons/io/android-alert.d.ts diff --git a/react-icons/io/android-apps.d.ts b/types/react-icons/io/android-apps.d.ts similarity index 100% rename from react-icons/io/android-apps.d.ts rename to types/react-icons/io/android-apps.d.ts diff --git a/react-icons/io/android-archive.d.ts b/types/react-icons/io/android-archive.d.ts similarity index 100% rename from react-icons/io/android-archive.d.ts rename to types/react-icons/io/android-archive.d.ts diff --git a/react-icons/io/android-arrow-back.d.ts b/types/react-icons/io/android-arrow-back.d.ts similarity index 100% rename from react-icons/io/android-arrow-back.d.ts rename to types/react-icons/io/android-arrow-back.d.ts diff --git a/react-icons/io/android-arrow-down.d.ts b/types/react-icons/io/android-arrow-down.d.ts similarity index 100% rename from react-icons/io/android-arrow-down.d.ts rename to types/react-icons/io/android-arrow-down.d.ts diff --git a/react-icons/io/android-arrow-dropdown-circle.d.ts b/types/react-icons/io/android-arrow-dropdown-circle.d.ts similarity index 100% rename from react-icons/io/android-arrow-dropdown-circle.d.ts rename to types/react-icons/io/android-arrow-dropdown-circle.d.ts diff --git a/react-icons/io/android-arrow-dropdown.d.ts b/types/react-icons/io/android-arrow-dropdown.d.ts similarity index 100% rename from react-icons/io/android-arrow-dropdown.d.ts rename to types/react-icons/io/android-arrow-dropdown.d.ts diff --git a/react-icons/io/android-arrow-dropleft-circle.d.ts b/types/react-icons/io/android-arrow-dropleft-circle.d.ts similarity index 100% rename from react-icons/io/android-arrow-dropleft-circle.d.ts rename to types/react-icons/io/android-arrow-dropleft-circle.d.ts diff --git a/react-icons/io/android-arrow-dropleft.d.ts b/types/react-icons/io/android-arrow-dropleft.d.ts similarity index 100% rename from react-icons/io/android-arrow-dropleft.d.ts rename to types/react-icons/io/android-arrow-dropleft.d.ts diff --git a/react-icons/io/android-arrow-dropright-circle.d.ts b/types/react-icons/io/android-arrow-dropright-circle.d.ts similarity index 100% rename from react-icons/io/android-arrow-dropright-circle.d.ts rename to types/react-icons/io/android-arrow-dropright-circle.d.ts diff --git a/react-icons/io/android-arrow-dropright.d.ts b/types/react-icons/io/android-arrow-dropright.d.ts similarity index 100% rename from react-icons/io/android-arrow-dropright.d.ts rename to types/react-icons/io/android-arrow-dropright.d.ts diff --git a/react-icons/io/android-arrow-dropup-circle.d.ts b/types/react-icons/io/android-arrow-dropup-circle.d.ts similarity index 100% rename from react-icons/io/android-arrow-dropup-circle.d.ts rename to types/react-icons/io/android-arrow-dropup-circle.d.ts diff --git a/react-icons/io/android-arrow-dropup.d.ts b/types/react-icons/io/android-arrow-dropup.d.ts similarity index 100% rename from react-icons/io/android-arrow-dropup.d.ts rename to types/react-icons/io/android-arrow-dropup.d.ts diff --git a/react-icons/io/android-arrow-forward.d.ts b/types/react-icons/io/android-arrow-forward.d.ts similarity index 100% rename from react-icons/io/android-arrow-forward.d.ts rename to types/react-icons/io/android-arrow-forward.d.ts diff --git a/react-icons/io/android-arrow-up.d.ts b/types/react-icons/io/android-arrow-up.d.ts similarity index 100% rename from react-icons/io/android-arrow-up.d.ts rename to types/react-icons/io/android-arrow-up.d.ts diff --git a/react-icons/io/android-attach.d.ts b/types/react-icons/io/android-attach.d.ts similarity index 100% rename from react-icons/io/android-attach.d.ts rename to types/react-icons/io/android-attach.d.ts diff --git a/react-icons/io/android-bar.d.ts b/types/react-icons/io/android-bar.d.ts similarity index 100% rename from react-icons/io/android-bar.d.ts rename to types/react-icons/io/android-bar.d.ts diff --git a/react-icons/io/android-bicycle.d.ts b/types/react-icons/io/android-bicycle.d.ts similarity index 100% rename from react-icons/io/android-bicycle.d.ts rename to types/react-icons/io/android-bicycle.d.ts diff --git a/react-icons/io/android-boat.d.ts b/types/react-icons/io/android-boat.d.ts similarity index 100% rename from react-icons/io/android-boat.d.ts rename to types/react-icons/io/android-boat.d.ts diff --git a/react-icons/io/android-bookmark.d.ts b/types/react-icons/io/android-bookmark.d.ts similarity index 100% rename from react-icons/io/android-bookmark.d.ts rename to types/react-icons/io/android-bookmark.d.ts diff --git a/react-icons/io/android-bulb.d.ts b/types/react-icons/io/android-bulb.d.ts similarity index 100% rename from react-icons/io/android-bulb.d.ts rename to types/react-icons/io/android-bulb.d.ts diff --git a/react-icons/io/android-bus.d.ts b/types/react-icons/io/android-bus.d.ts similarity index 100% rename from react-icons/io/android-bus.d.ts rename to types/react-icons/io/android-bus.d.ts diff --git a/react-icons/io/android-calendar.d.ts b/types/react-icons/io/android-calendar.d.ts similarity index 100% rename from react-icons/io/android-calendar.d.ts rename to types/react-icons/io/android-calendar.d.ts diff --git a/react-icons/io/android-call.d.ts b/types/react-icons/io/android-call.d.ts similarity index 100% rename from react-icons/io/android-call.d.ts rename to types/react-icons/io/android-call.d.ts diff --git a/react-icons/io/android-camera.d.ts b/types/react-icons/io/android-camera.d.ts similarity index 100% rename from react-icons/io/android-camera.d.ts rename to types/react-icons/io/android-camera.d.ts diff --git a/react-icons/io/android-cancel.d.ts b/types/react-icons/io/android-cancel.d.ts similarity index 100% rename from react-icons/io/android-cancel.d.ts rename to types/react-icons/io/android-cancel.d.ts diff --git a/react-icons/io/android-car.d.ts b/types/react-icons/io/android-car.d.ts similarity index 100% rename from react-icons/io/android-car.d.ts rename to types/react-icons/io/android-car.d.ts diff --git a/react-icons/io/android-cart.d.ts b/types/react-icons/io/android-cart.d.ts similarity index 100% rename from react-icons/io/android-cart.d.ts rename to types/react-icons/io/android-cart.d.ts diff --git a/react-icons/io/android-chat.d.ts b/types/react-icons/io/android-chat.d.ts similarity index 100% rename from react-icons/io/android-chat.d.ts rename to types/react-icons/io/android-chat.d.ts diff --git a/react-icons/io/android-checkbox-blank.d.ts b/types/react-icons/io/android-checkbox-blank.d.ts similarity index 100% rename from react-icons/io/android-checkbox-blank.d.ts rename to types/react-icons/io/android-checkbox-blank.d.ts diff --git a/react-icons/io/android-checkbox-outline-blank.d.ts b/types/react-icons/io/android-checkbox-outline-blank.d.ts similarity index 100% rename from react-icons/io/android-checkbox-outline-blank.d.ts rename to types/react-icons/io/android-checkbox-outline-blank.d.ts diff --git a/react-icons/io/android-checkbox-outline.d.ts b/types/react-icons/io/android-checkbox-outline.d.ts similarity index 100% rename from react-icons/io/android-checkbox-outline.d.ts rename to types/react-icons/io/android-checkbox-outline.d.ts diff --git a/react-icons/io/android-checkbox.d.ts b/types/react-icons/io/android-checkbox.d.ts similarity index 100% rename from react-icons/io/android-checkbox.d.ts rename to types/react-icons/io/android-checkbox.d.ts diff --git a/react-icons/io/android-checkmark-circle.d.ts b/types/react-icons/io/android-checkmark-circle.d.ts similarity index 100% rename from react-icons/io/android-checkmark-circle.d.ts rename to types/react-icons/io/android-checkmark-circle.d.ts diff --git a/react-icons/io/android-clipboard.d.ts b/types/react-icons/io/android-clipboard.d.ts similarity index 100% rename from react-icons/io/android-clipboard.d.ts rename to types/react-icons/io/android-clipboard.d.ts diff --git a/react-icons/io/android-close.d.ts b/types/react-icons/io/android-close.d.ts similarity index 100% rename from react-icons/io/android-close.d.ts rename to types/react-icons/io/android-close.d.ts diff --git a/react-icons/io/android-cloud-circle.d.ts b/types/react-icons/io/android-cloud-circle.d.ts similarity index 100% rename from react-icons/io/android-cloud-circle.d.ts rename to types/react-icons/io/android-cloud-circle.d.ts diff --git a/react-icons/io/android-cloud-done.d.ts b/types/react-icons/io/android-cloud-done.d.ts similarity index 100% rename from react-icons/io/android-cloud-done.d.ts rename to types/react-icons/io/android-cloud-done.d.ts diff --git a/react-icons/io/android-cloud-outline.d.ts b/types/react-icons/io/android-cloud-outline.d.ts similarity index 100% rename from react-icons/io/android-cloud-outline.d.ts rename to types/react-icons/io/android-cloud-outline.d.ts diff --git a/react-icons/io/android-cloud.d.ts b/types/react-icons/io/android-cloud.d.ts similarity index 100% rename from react-icons/io/android-cloud.d.ts rename to types/react-icons/io/android-cloud.d.ts diff --git a/react-icons/io/android-color-palette.d.ts b/types/react-icons/io/android-color-palette.d.ts similarity index 100% rename from react-icons/io/android-color-palette.d.ts rename to types/react-icons/io/android-color-palette.d.ts diff --git a/react-icons/io/android-compass.d.ts b/types/react-icons/io/android-compass.d.ts similarity index 100% rename from react-icons/io/android-compass.d.ts rename to types/react-icons/io/android-compass.d.ts diff --git a/react-icons/io/android-contact.d.ts b/types/react-icons/io/android-contact.d.ts similarity index 100% rename from react-icons/io/android-contact.d.ts rename to types/react-icons/io/android-contact.d.ts diff --git a/react-icons/io/android-contacts.d.ts b/types/react-icons/io/android-contacts.d.ts similarity index 100% rename from react-icons/io/android-contacts.d.ts rename to types/react-icons/io/android-contacts.d.ts diff --git a/react-icons/io/android-contract.d.ts b/types/react-icons/io/android-contract.d.ts similarity index 100% rename from react-icons/io/android-contract.d.ts rename to types/react-icons/io/android-contract.d.ts diff --git a/react-icons/io/android-create.d.ts b/types/react-icons/io/android-create.d.ts similarity index 100% rename from react-icons/io/android-create.d.ts rename to types/react-icons/io/android-create.d.ts diff --git a/react-icons/io/android-delete.d.ts b/types/react-icons/io/android-delete.d.ts similarity index 100% rename from react-icons/io/android-delete.d.ts rename to types/react-icons/io/android-delete.d.ts diff --git a/react-icons/io/android-desktop.d.ts b/types/react-icons/io/android-desktop.d.ts similarity index 100% rename from react-icons/io/android-desktop.d.ts rename to types/react-icons/io/android-desktop.d.ts diff --git a/react-icons/io/android-document.d.ts b/types/react-icons/io/android-document.d.ts similarity index 100% rename from react-icons/io/android-document.d.ts rename to types/react-icons/io/android-document.d.ts diff --git a/react-icons/io/android-done-all.d.ts b/types/react-icons/io/android-done-all.d.ts similarity index 100% rename from react-icons/io/android-done-all.d.ts rename to types/react-icons/io/android-done-all.d.ts diff --git a/react-icons/io/android-done.d.ts b/types/react-icons/io/android-done.d.ts similarity index 100% rename from react-icons/io/android-done.d.ts rename to types/react-icons/io/android-done.d.ts diff --git a/react-icons/io/android-download.d.ts b/types/react-icons/io/android-download.d.ts similarity index 100% rename from react-icons/io/android-download.d.ts rename to types/react-icons/io/android-download.d.ts diff --git a/react-icons/io/android-drafts.d.ts b/types/react-icons/io/android-drafts.d.ts similarity index 100% rename from react-icons/io/android-drafts.d.ts rename to types/react-icons/io/android-drafts.d.ts diff --git a/react-icons/io/android-exit.d.ts b/types/react-icons/io/android-exit.d.ts similarity index 100% rename from react-icons/io/android-exit.d.ts rename to types/react-icons/io/android-exit.d.ts diff --git a/react-icons/io/android-expand.d.ts b/types/react-icons/io/android-expand.d.ts similarity index 100% rename from react-icons/io/android-expand.d.ts rename to types/react-icons/io/android-expand.d.ts diff --git a/react-icons/io/android-favorite-outline.d.ts b/types/react-icons/io/android-favorite-outline.d.ts similarity index 100% rename from react-icons/io/android-favorite-outline.d.ts rename to types/react-icons/io/android-favorite-outline.d.ts diff --git a/react-icons/io/android-favorite.d.ts b/types/react-icons/io/android-favorite.d.ts similarity index 100% rename from react-icons/io/android-favorite.d.ts rename to types/react-icons/io/android-favorite.d.ts diff --git a/react-icons/io/android-film.d.ts b/types/react-icons/io/android-film.d.ts similarity index 100% rename from react-icons/io/android-film.d.ts rename to types/react-icons/io/android-film.d.ts diff --git a/react-icons/io/android-folder-open.d.ts b/types/react-icons/io/android-folder-open.d.ts similarity index 100% rename from react-icons/io/android-folder-open.d.ts rename to types/react-icons/io/android-folder-open.d.ts diff --git a/react-icons/io/android-folder.d.ts b/types/react-icons/io/android-folder.d.ts similarity index 100% rename from react-icons/io/android-folder.d.ts rename to types/react-icons/io/android-folder.d.ts diff --git a/react-icons/io/android-funnel.d.ts b/types/react-icons/io/android-funnel.d.ts similarity index 100% rename from react-icons/io/android-funnel.d.ts rename to types/react-icons/io/android-funnel.d.ts diff --git a/react-icons/io/android-globe.d.ts b/types/react-icons/io/android-globe.d.ts similarity index 100% rename from react-icons/io/android-globe.d.ts rename to types/react-icons/io/android-globe.d.ts diff --git a/react-icons/io/android-hand.d.ts b/types/react-icons/io/android-hand.d.ts similarity index 100% rename from react-icons/io/android-hand.d.ts rename to types/react-icons/io/android-hand.d.ts diff --git a/react-icons/io/android-hangout.d.ts b/types/react-icons/io/android-hangout.d.ts similarity index 100% rename from react-icons/io/android-hangout.d.ts rename to types/react-icons/io/android-hangout.d.ts diff --git a/react-icons/io/android-happy.d.ts b/types/react-icons/io/android-happy.d.ts similarity index 100% rename from react-icons/io/android-happy.d.ts rename to types/react-icons/io/android-happy.d.ts diff --git a/react-icons/io/android-home.d.ts b/types/react-icons/io/android-home.d.ts similarity index 100% rename from react-icons/io/android-home.d.ts rename to types/react-icons/io/android-home.d.ts diff --git a/react-icons/io/android-image.d.ts b/types/react-icons/io/android-image.d.ts similarity index 100% rename from react-icons/io/android-image.d.ts rename to types/react-icons/io/android-image.d.ts diff --git a/react-icons/io/android-laptop.d.ts b/types/react-icons/io/android-laptop.d.ts similarity index 100% rename from react-icons/io/android-laptop.d.ts rename to types/react-icons/io/android-laptop.d.ts diff --git a/react-icons/io/android-list.d.ts b/types/react-icons/io/android-list.d.ts similarity index 100% rename from react-icons/io/android-list.d.ts rename to types/react-icons/io/android-list.d.ts diff --git a/react-icons/io/android-locate.d.ts b/types/react-icons/io/android-locate.d.ts similarity index 100% rename from react-icons/io/android-locate.d.ts rename to types/react-icons/io/android-locate.d.ts diff --git a/react-icons/io/android-lock.d.ts b/types/react-icons/io/android-lock.d.ts similarity index 100% rename from react-icons/io/android-lock.d.ts rename to types/react-icons/io/android-lock.d.ts diff --git a/react-icons/io/android-mail.d.ts b/types/react-icons/io/android-mail.d.ts similarity index 100% rename from react-icons/io/android-mail.d.ts rename to types/react-icons/io/android-mail.d.ts diff --git a/react-icons/io/android-map.d.ts b/types/react-icons/io/android-map.d.ts similarity index 100% rename from react-icons/io/android-map.d.ts rename to types/react-icons/io/android-map.d.ts diff --git a/react-icons/io/android-menu.d.ts b/types/react-icons/io/android-menu.d.ts similarity index 100% rename from react-icons/io/android-menu.d.ts rename to types/react-icons/io/android-menu.d.ts diff --git a/react-icons/io/android-microphone-off.d.ts b/types/react-icons/io/android-microphone-off.d.ts similarity index 100% rename from react-icons/io/android-microphone-off.d.ts rename to types/react-icons/io/android-microphone-off.d.ts diff --git a/react-icons/io/android-microphone.d.ts b/types/react-icons/io/android-microphone.d.ts similarity index 100% rename from react-icons/io/android-microphone.d.ts rename to types/react-icons/io/android-microphone.d.ts diff --git a/react-icons/io/android-more-horizontal.d.ts b/types/react-icons/io/android-more-horizontal.d.ts similarity index 100% rename from react-icons/io/android-more-horizontal.d.ts rename to types/react-icons/io/android-more-horizontal.d.ts diff --git a/react-icons/io/android-more-vertical.d.ts b/types/react-icons/io/android-more-vertical.d.ts similarity index 100% rename from react-icons/io/android-more-vertical.d.ts rename to types/react-icons/io/android-more-vertical.d.ts diff --git a/react-icons/io/android-navigate.d.ts b/types/react-icons/io/android-navigate.d.ts similarity index 100% rename from react-icons/io/android-navigate.d.ts rename to types/react-icons/io/android-navigate.d.ts diff --git a/react-icons/io/android-notifications-none.d.ts b/types/react-icons/io/android-notifications-none.d.ts similarity index 100% rename from react-icons/io/android-notifications-none.d.ts rename to types/react-icons/io/android-notifications-none.d.ts diff --git a/react-icons/io/android-notifications-off.d.ts b/types/react-icons/io/android-notifications-off.d.ts similarity index 100% rename from react-icons/io/android-notifications-off.d.ts rename to types/react-icons/io/android-notifications-off.d.ts diff --git a/react-icons/io/android-notifications.d.ts b/types/react-icons/io/android-notifications.d.ts similarity index 100% rename from react-icons/io/android-notifications.d.ts rename to types/react-icons/io/android-notifications.d.ts diff --git a/react-icons/io/android-open.d.ts b/types/react-icons/io/android-open.d.ts similarity index 100% rename from react-icons/io/android-open.d.ts rename to types/react-icons/io/android-open.d.ts diff --git a/react-icons/io/android-options.d.ts b/types/react-icons/io/android-options.d.ts similarity index 100% rename from react-icons/io/android-options.d.ts rename to types/react-icons/io/android-options.d.ts diff --git a/react-icons/io/android-people.d.ts b/types/react-icons/io/android-people.d.ts similarity index 100% rename from react-icons/io/android-people.d.ts rename to types/react-icons/io/android-people.d.ts diff --git a/react-icons/io/android-person-add.d.ts b/types/react-icons/io/android-person-add.d.ts similarity index 100% rename from react-icons/io/android-person-add.d.ts rename to types/react-icons/io/android-person-add.d.ts diff --git a/react-icons/io/android-person.d.ts b/types/react-icons/io/android-person.d.ts similarity index 100% rename from react-icons/io/android-person.d.ts rename to types/react-icons/io/android-person.d.ts diff --git a/react-icons/io/android-phone-landscape.d.ts b/types/react-icons/io/android-phone-landscape.d.ts similarity index 100% rename from react-icons/io/android-phone-landscape.d.ts rename to types/react-icons/io/android-phone-landscape.d.ts diff --git a/react-icons/io/android-phone-portrait.d.ts b/types/react-icons/io/android-phone-portrait.d.ts similarity index 100% rename from react-icons/io/android-phone-portrait.d.ts rename to types/react-icons/io/android-phone-portrait.d.ts diff --git a/react-icons/io/android-pin.d.ts b/types/react-icons/io/android-pin.d.ts similarity index 100% rename from react-icons/io/android-pin.d.ts rename to types/react-icons/io/android-pin.d.ts diff --git a/react-icons/io/android-plane.d.ts b/types/react-icons/io/android-plane.d.ts similarity index 100% rename from react-icons/io/android-plane.d.ts rename to types/react-icons/io/android-plane.d.ts diff --git a/react-icons/io/android-playstore.d.ts b/types/react-icons/io/android-playstore.d.ts similarity index 100% rename from react-icons/io/android-playstore.d.ts rename to types/react-icons/io/android-playstore.d.ts diff --git a/react-icons/io/android-print.d.ts b/types/react-icons/io/android-print.d.ts similarity index 100% rename from react-icons/io/android-print.d.ts rename to types/react-icons/io/android-print.d.ts diff --git a/react-icons/io/android-radio-button-off.d.ts b/types/react-icons/io/android-radio-button-off.d.ts similarity index 100% rename from react-icons/io/android-radio-button-off.d.ts rename to types/react-icons/io/android-radio-button-off.d.ts diff --git a/react-icons/io/android-radio-button-on.d.ts b/types/react-icons/io/android-radio-button-on.d.ts similarity index 100% rename from react-icons/io/android-radio-button-on.d.ts rename to types/react-icons/io/android-radio-button-on.d.ts diff --git a/react-icons/io/android-refresh.d.ts b/types/react-icons/io/android-refresh.d.ts similarity index 100% rename from react-icons/io/android-refresh.d.ts rename to types/react-icons/io/android-refresh.d.ts diff --git a/react-icons/io/android-remove-circle.d.ts b/types/react-icons/io/android-remove-circle.d.ts similarity index 100% rename from react-icons/io/android-remove-circle.d.ts rename to types/react-icons/io/android-remove-circle.d.ts diff --git a/react-icons/io/android-remove.d.ts b/types/react-icons/io/android-remove.d.ts similarity index 100% rename from react-icons/io/android-remove.d.ts rename to types/react-icons/io/android-remove.d.ts diff --git a/react-icons/io/android-restaurant.d.ts b/types/react-icons/io/android-restaurant.d.ts similarity index 100% rename from react-icons/io/android-restaurant.d.ts rename to types/react-icons/io/android-restaurant.d.ts diff --git a/react-icons/io/android-sad.d.ts b/types/react-icons/io/android-sad.d.ts similarity index 100% rename from react-icons/io/android-sad.d.ts rename to types/react-icons/io/android-sad.d.ts diff --git a/react-icons/io/android-search.d.ts b/types/react-icons/io/android-search.d.ts similarity index 100% rename from react-icons/io/android-search.d.ts rename to types/react-icons/io/android-search.d.ts diff --git a/react-icons/io/android-send.d.ts b/types/react-icons/io/android-send.d.ts similarity index 100% rename from react-icons/io/android-send.d.ts rename to types/react-icons/io/android-send.d.ts diff --git a/react-icons/io/android-settings.d.ts b/types/react-icons/io/android-settings.d.ts similarity index 100% rename from react-icons/io/android-settings.d.ts rename to types/react-icons/io/android-settings.d.ts diff --git a/react-icons/io/android-share-alt.d.ts b/types/react-icons/io/android-share-alt.d.ts similarity index 100% rename from react-icons/io/android-share-alt.d.ts rename to types/react-icons/io/android-share-alt.d.ts diff --git a/react-icons/io/android-share.d.ts b/types/react-icons/io/android-share.d.ts similarity index 100% rename from react-icons/io/android-share.d.ts rename to types/react-icons/io/android-share.d.ts diff --git a/react-icons/io/android-star-half.d.ts b/types/react-icons/io/android-star-half.d.ts similarity index 100% rename from react-icons/io/android-star-half.d.ts rename to types/react-icons/io/android-star-half.d.ts diff --git a/react-icons/io/android-star-outline.d.ts b/types/react-icons/io/android-star-outline.d.ts similarity index 100% rename from react-icons/io/android-star-outline.d.ts rename to types/react-icons/io/android-star-outline.d.ts diff --git a/react-icons/io/android-star.d.ts b/types/react-icons/io/android-star.d.ts similarity index 100% rename from react-icons/io/android-star.d.ts rename to types/react-icons/io/android-star.d.ts diff --git a/react-icons/io/android-stopwatch.d.ts b/types/react-icons/io/android-stopwatch.d.ts similarity index 100% rename from react-icons/io/android-stopwatch.d.ts rename to types/react-icons/io/android-stopwatch.d.ts diff --git a/react-icons/io/android-subway.d.ts b/types/react-icons/io/android-subway.d.ts similarity index 100% rename from react-icons/io/android-subway.d.ts rename to types/react-icons/io/android-subway.d.ts diff --git a/react-icons/io/android-sunny.d.ts b/types/react-icons/io/android-sunny.d.ts similarity index 100% rename from react-icons/io/android-sunny.d.ts rename to types/react-icons/io/android-sunny.d.ts diff --git a/react-icons/io/android-sync.d.ts b/types/react-icons/io/android-sync.d.ts similarity index 100% rename from react-icons/io/android-sync.d.ts rename to types/react-icons/io/android-sync.d.ts diff --git a/react-icons/io/android-textsms.d.ts b/types/react-icons/io/android-textsms.d.ts similarity index 100% rename from react-icons/io/android-textsms.d.ts rename to types/react-icons/io/android-textsms.d.ts diff --git a/react-icons/io/android-time.d.ts b/types/react-icons/io/android-time.d.ts similarity index 100% rename from react-icons/io/android-time.d.ts rename to types/react-icons/io/android-time.d.ts diff --git a/react-icons/io/android-train.d.ts b/types/react-icons/io/android-train.d.ts similarity index 100% rename from react-icons/io/android-train.d.ts rename to types/react-icons/io/android-train.d.ts diff --git a/react-icons/io/android-unlock.d.ts b/types/react-icons/io/android-unlock.d.ts similarity index 100% rename from react-icons/io/android-unlock.d.ts rename to types/react-icons/io/android-unlock.d.ts diff --git a/react-icons/io/android-upload.d.ts b/types/react-icons/io/android-upload.d.ts similarity index 100% rename from react-icons/io/android-upload.d.ts rename to types/react-icons/io/android-upload.d.ts diff --git a/react-icons/io/android-volume-down.d.ts b/types/react-icons/io/android-volume-down.d.ts similarity index 100% rename from react-icons/io/android-volume-down.d.ts rename to types/react-icons/io/android-volume-down.d.ts diff --git a/react-icons/io/android-volume-mute.d.ts b/types/react-icons/io/android-volume-mute.d.ts similarity index 100% rename from react-icons/io/android-volume-mute.d.ts rename to types/react-icons/io/android-volume-mute.d.ts diff --git a/react-icons/io/android-volume-off.d.ts b/types/react-icons/io/android-volume-off.d.ts similarity index 100% rename from react-icons/io/android-volume-off.d.ts rename to types/react-icons/io/android-volume-off.d.ts diff --git a/react-icons/io/android-volume-up.d.ts b/types/react-icons/io/android-volume-up.d.ts similarity index 100% rename from react-icons/io/android-volume-up.d.ts rename to types/react-icons/io/android-volume-up.d.ts diff --git a/react-icons/io/android-walk.d.ts b/types/react-icons/io/android-walk.d.ts similarity index 100% rename from react-icons/io/android-walk.d.ts rename to types/react-icons/io/android-walk.d.ts diff --git a/react-icons/io/android-warning.d.ts b/types/react-icons/io/android-warning.d.ts similarity index 100% rename from react-icons/io/android-warning.d.ts rename to types/react-icons/io/android-warning.d.ts diff --git a/react-icons/io/android-watch.d.ts b/types/react-icons/io/android-watch.d.ts similarity index 100% rename from react-icons/io/android-watch.d.ts rename to types/react-icons/io/android-watch.d.ts diff --git a/react-icons/io/android-wifi.d.ts b/types/react-icons/io/android-wifi.d.ts similarity index 100% rename from react-icons/io/android-wifi.d.ts rename to types/react-icons/io/android-wifi.d.ts diff --git a/react-icons/io/aperture.d.ts b/types/react-icons/io/aperture.d.ts similarity index 100% rename from react-icons/io/aperture.d.ts rename to types/react-icons/io/aperture.d.ts diff --git a/react-icons/io/archive.d.ts b/types/react-icons/io/archive.d.ts similarity index 100% rename from react-icons/io/archive.d.ts rename to types/react-icons/io/archive.d.ts diff --git a/react-icons/io/arrow-down-a.d.ts b/types/react-icons/io/arrow-down-a.d.ts similarity index 100% rename from react-icons/io/arrow-down-a.d.ts rename to types/react-icons/io/arrow-down-a.d.ts diff --git a/react-icons/io/arrow-down-b.d.ts b/types/react-icons/io/arrow-down-b.d.ts similarity index 100% rename from react-icons/io/arrow-down-b.d.ts rename to types/react-icons/io/arrow-down-b.d.ts diff --git a/react-icons/io/arrow-down-c.d.ts b/types/react-icons/io/arrow-down-c.d.ts similarity index 100% rename from react-icons/io/arrow-down-c.d.ts rename to types/react-icons/io/arrow-down-c.d.ts diff --git a/react-icons/io/arrow-expand.d.ts b/types/react-icons/io/arrow-expand.d.ts similarity index 100% rename from react-icons/io/arrow-expand.d.ts rename to types/react-icons/io/arrow-expand.d.ts diff --git a/react-icons/io/arrow-graph-down-left.d.ts b/types/react-icons/io/arrow-graph-down-left.d.ts similarity index 100% rename from react-icons/io/arrow-graph-down-left.d.ts rename to types/react-icons/io/arrow-graph-down-left.d.ts diff --git a/react-icons/io/arrow-graph-down-right.d.ts b/types/react-icons/io/arrow-graph-down-right.d.ts similarity index 100% rename from react-icons/io/arrow-graph-down-right.d.ts rename to types/react-icons/io/arrow-graph-down-right.d.ts diff --git a/react-icons/io/arrow-graph-up-left.d.ts b/types/react-icons/io/arrow-graph-up-left.d.ts similarity index 100% rename from react-icons/io/arrow-graph-up-left.d.ts rename to types/react-icons/io/arrow-graph-up-left.d.ts diff --git a/react-icons/io/arrow-graph-up-right.d.ts b/types/react-icons/io/arrow-graph-up-right.d.ts similarity index 100% rename from react-icons/io/arrow-graph-up-right.d.ts rename to types/react-icons/io/arrow-graph-up-right.d.ts diff --git a/react-icons/io/arrow-left-a.d.ts b/types/react-icons/io/arrow-left-a.d.ts similarity index 100% rename from react-icons/io/arrow-left-a.d.ts rename to types/react-icons/io/arrow-left-a.d.ts diff --git a/react-icons/io/arrow-left-b.d.ts b/types/react-icons/io/arrow-left-b.d.ts similarity index 100% rename from react-icons/io/arrow-left-b.d.ts rename to types/react-icons/io/arrow-left-b.d.ts diff --git a/react-icons/io/arrow-left-c.d.ts b/types/react-icons/io/arrow-left-c.d.ts similarity index 100% rename from react-icons/io/arrow-left-c.d.ts rename to types/react-icons/io/arrow-left-c.d.ts diff --git a/react-icons/io/arrow-move.d.ts b/types/react-icons/io/arrow-move.d.ts similarity index 100% rename from react-icons/io/arrow-move.d.ts rename to types/react-icons/io/arrow-move.d.ts diff --git a/react-icons/io/arrow-resize.d.ts b/types/react-icons/io/arrow-resize.d.ts similarity index 100% rename from react-icons/io/arrow-resize.d.ts rename to types/react-icons/io/arrow-resize.d.ts diff --git a/react-icons/io/arrow-return-left.d.ts b/types/react-icons/io/arrow-return-left.d.ts similarity index 100% rename from react-icons/io/arrow-return-left.d.ts rename to types/react-icons/io/arrow-return-left.d.ts diff --git a/react-icons/io/arrow-return-right.d.ts b/types/react-icons/io/arrow-return-right.d.ts similarity index 100% rename from react-icons/io/arrow-return-right.d.ts rename to types/react-icons/io/arrow-return-right.d.ts diff --git a/react-icons/io/arrow-right-a.d.ts b/types/react-icons/io/arrow-right-a.d.ts similarity index 100% rename from react-icons/io/arrow-right-a.d.ts rename to types/react-icons/io/arrow-right-a.d.ts diff --git a/react-icons/io/arrow-right-b.d.ts b/types/react-icons/io/arrow-right-b.d.ts similarity index 100% rename from react-icons/io/arrow-right-b.d.ts rename to types/react-icons/io/arrow-right-b.d.ts diff --git a/react-icons/io/arrow-right-c.d.ts b/types/react-icons/io/arrow-right-c.d.ts similarity index 100% rename from react-icons/io/arrow-right-c.d.ts rename to types/react-icons/io/arrow-right-c.d.ts diff --git a/react-icons/io/arrow-shrink.d.ts b/types/react-icons/io/arrow-shrink.d.ts similarity index 100% rename from react-icons/io/arrow-shrink.d.ts rename to types/react-icons/io/arrow-shrink.d.ts diff --git a/react-icons/io/arrow-swap.d.ts b/types/react-icons/io/arrow-swap.d.ts similarity index 100% rename from react-icons/io/arrow-swap.d.ts rename to types/react-icons/io/arrow-swap.d.ts diff --git a/react-icons/io/arrow-up-a.d.ts b/types/react-icons/io/arrow-up-a.d.ts similarity index 100% rename from react-icons/io/arrow-up-a.d.ts rename to types/react-icons/io/arrow-up-a.d.ts diff --git a/react-icons/io/arrow-up-b.d.ts b/types/react-icons/io/arrow-up-b.d.ts similarity index 100% rename from react-icons/io/arrow-up-b.d.ts rename to types/react-icons/io/arrow-up-b.d.ts diff --git a/react-icons/io/arrow-up-c.d.ts b/types/react-icons/io/arrow-up-c.d.ts similarity index 100% rename from react-icons/io/arrow-up-c.d.ts rename to types/react-icons/io/arrow-up-c.d.ts diff --git a/react-icons/io/asterisk.d.ts b/types/react-icons/io/asterisk.d.ts similarity index 100% rename from react-icons/io/asterisk.d.ts rename to types/react-icons/io/asterisk.d.ts diff --git a/react-icons/io/at.d.ts b/types/react-icons/io/at.d.ts similarity index 100% rename from react-icons/io/at.d.ts rename to types/react-icons/io/at.d.ts diff --git a/react-icons/io/backspace-outline.d.ts b/types/react-icons/io/backspace-outline.d.ts similarity index 100% rename from react-icons/io/backspace-outline.d.ts rename to types/react-icons/io/backspace-outline.d.ts diff --git a/react-icons/io/backspace.d.ts b/types/react-icons/io/backspace.d.ts similarity index 100% rename from react-icons/io/backspace.d.ts rename to types/react-icons/io/backspace.d.ts diff --git a/react-icons/io/bag.d.ts b/types/react-icons/io/bag.d.ts similarity index 100% rename from react-icons/io/bag.d.ts rename to types/react-icons/io/bag.d.ts diff --git a/react-icons/io/battery-charging.d.ts b/types/react-icons/io/battery-charging.d.ts similarity index 100% rename from react-icons/io/battery-charging.d.ts rename to types/react-icons/io/battery-charging.d.ts diff --git a/react-icons/io/battery-empty.d.ts b/types/react-icons/io/battery-empty.d.ts similarity index 100% rename from react-icons/io/battery-empty.d.ts rename to types/react-icons/io/battery-empty.d.ts diff --git a/react-icons/io/battery-full.d.ts b/types/react-icons/io/battery-full.d.ts similarity index 100% rename from react-icons/io/battery-full.d.ts rename to types/react-icons/io/battery-full.d.ts diff --git a/react-icons/io/battery-half.d.ts b/types/react-icons/io/battery-half.d.ts similarity index 100% rename from react-icons/io/battery-half.d.ts rename to types/react-icons/io/battery-half.d.ts diff --git a/react-icons/io/battery-low.d.ts b/types/react-icons/io/battery-low.d.ts similarity index 100% rename from react-icons/io/battery-low.d.ts rename to types/react-icons/io/battery-low.d.ts diff --git a/react-icons/io/beaker.d.ts b/types/react-icons/io/beaker.d.ts similarity index 100% rename from react-icons/io/beaker.d.ts rename to types/react-icons/io/beaker.d.ts diff --git a/react-icons/io/beer.d.ts b/types/react-icons/io/beer.d.ts similarity index 100% rename from react-icons/io/beer.d.ts rename to types/react-icons/io/beer.d.ts diff --git a/react-icons/io/bluetooth.d.ts b/types/react-icons/io/bluetooth.d.ts similarity index 100% rename from react-icons/io/bluetooth.d.ts rename to types/react-icons/io/bluetooth.d.ts diff --git a/react-icons/io/bonfire.d.ts b/types/react-icons/io/bonfire.d.ts similarity index 100% rename from react-icons/io/bonfire.d.ts rename to types/react-icons/io/bonfire.d.ts diff --git a/react-icons/io/bookmark.d.ts b/types/react-icons/io/bookmark.d.ts similarity index 100% rename from react-icons/io/bookmark.d.ts rename to types/react-icons/io/bookmark.d.ts diff --git a/react-icons/io/bowtie.d.ts b/types/react-icons/io/bowtie.d.ts similarity index 100% rename from react-icons/io/bowtie.d.ts rename to types/react-icons/io/bowtie.d.ts diff --git a/react-icons/io/briefcase.d.ts b/types/react-icons/io/briefcase.d.ts similarity index 100% rename from react-icons/io/briefcase.d.ts rename to types/react-icons/io/briefcase.d.ts diff --git a/react-icons/io/bug.d.ts b/types/react-icons/io/bug.d.ts similarity index 100% rename from react-icons/io/bug.d.ts rename to types/react-icons/io/bug.d.ts diff --git a/react-icons/io/calculator.d.ts b/types/react-icons/io/calculator.d.ts similarity index 100% rename from react-icons/io/calculator.d.ts rename to types/react-icons/io/calculator.d.ts diff --git a/react-icons/io/calendar.d.ts b/types/react-icons/io/calendar.d.ts similarity index 100% rename from react-icons/io/calendar.d.ts rename to types/react-icons/io/calendar.d.ts diff --git a/react-icons/io/camera.d.ts b/types/react-icons/io/camera.d.ts similarity index 100% rename from react-icons/io/camera.d.ts rename to types/react-icons/io/camera.d.ts diff --git a/react-icons/io/card.d.ts b/types/react-icons/io/card.d.ts similarity index 100% rename from react-icons/io/card.d.ts rename to types/react-icons/io/card.d.ts diff --git a/react-icons/io/cash.d.ts b/types/react-icons/io/cash.d.ts similarity index 100% rename from react-icons/io/cash.d.ts rename to types/react-icons/io/cash.d.ts diff --git a/react-icons/io/chatbox-working.d.ts b/types/react-icons/io/chatbox-working.d.ts similarity index 100% rename from react-icons/io/chatbox-working.d.ts rename to types/react-icons/io/chatbox-working.d.ts diff --git a/react-icons/io/chatbox.d.ts b/types/react-icons/io/chatbox.d.ts similarity index 100% rename from react-icons/io/chatbox.d.ts rename to types/react-icons/io/chatbox.d.ts diff --git a/react-icons/io/chatboxes.d.ts b/types/react-icons/io/chatboxes.d.ts similarity index 100% rename from react-icons/io/chatboxes.d.ts rename to types/react-icons/io/chatboxes.d.ts diff --git a/react-icons/io/chatbubble-working.d.ts b/types/react-icons/io/chatbubble-working.d.ts similarity index 100% rename from react-icons/io/chatbubble-working.d.ts rename to types/react-icons/io/chatbubble-working.d.ts diff --git a/react-icons/io/chatbubble.d.ts b/types/react-icons/io/chatbubble.d.ts similarity index 100% rename from react-icons/io/chatbubble.d.ts rename to types/react-icons/io/chatbubble.d.ts diff --git a/react-icons/io/chatbubbles.d.ts b/types/react-icons/io/chatbubbles.d.ts similarity index 100% rename from react-icons/io/chatbubbles.d.ts rename to types/react-icons/io/chatbubbles.d.ts diff --git a/react-icons/io/checkmark-circled.d.ts b/types/react-icons/io/checkmark-circled.d.ts similarity index 100% rename from react-icons/io/checkmark-circled.d.ts rename to types/react-icons/io/checkmark-circled.d.ts diff --git a/react-icons/io/checkmark-round.d.ts b/types/react-icons/io/checkmark-round.d.ts similarity index 100% rename from react-icons/io/checkmark-round.d.ts rename to types/react-icons/io/checkmark-round.d.ts diff --git a/react-icons/io/checkmark.d.ts b/types/react-icons/io/checkmark.d.ts similarity index 100% rename from react-icons/io/checkmark.d.ts rename to types/react-icons/io/checkmark.d.ts diff --git a/react-icons/io/chevron-down.d.ts b/types/react-icons/io/chevron-down.d.ts similarity index 100% rename from react-icons/io/chevron-down.d.ts rename to types/react-icons/io/chevron-down.d.ts diff --git a/react-icons/io/chevron-left.d.ts b/types/react-icons/io/chevron-left.d.ts similarity index 100% rename from react-icons/io/chevron-left.d.ts rename to types/react-icons/io/chevron-left.d.ts diff --git a/react-icons/io/chevron-right.d.ts b/types/react-icons/io/chevron-right.d.ts similarity index 100% rename from react-icons/io/chevron-right.d.ts rename to types/react-icons/io/chevron-right.d.ts diff --git a/react-icons/io/chevron-up.d.ts b/types/react-icons/io/chevron-up.d.ts similarity index 100% rename from react-icons/io/chevron-up.d.ts rename to types/react-icons/io/chevron-up.d.ts diff --git a/react-icons/io/clipboard.d.ts b/types/react-icons/io/clipboard.d.ts similarity index 100% rename from react-icons/io/clipboard.d.ts rename to types/react-icons/io/clipboard.d.ts diff --git a/react-icons/io/clock.d.ts b/types/react-icons/io/clock.d.ts similarity index 100% rename from react-icons/io/clock.d.ts rename to types/react-icons/io/clock.d.ts diff --git a/react-icons/io/close-circled.d.ts b/types/react-icons/io/close-circled.d.ts similarity index 100% rename from react-icons/io/close-circled.d.ts rename to types/react-icons/io/close-circled.d.ts diff --git a/react-icons/io/close-round.d.ts b/types/react-icons/io/close-round.d.ts similarity index 100% rename from react-icons/io/close-round.d.ts rename to types/react-icons/io/close-round.d.ts diff --git a/react-icons/io/close.d.ts b/types/react-icons/io/close.d.ts similarity index 100% rename from react-icons/io/close.d.ts rename to types/react-icons/io/close.d.ts diff --git a/react-icons/io/closed-captioning.d.ts b/types/react-icons/io/closed-captioning.d.ts similarity index 100% rename from react-icons/io/closed-captioning.d.ts rename to types/react-icons/io/closed-captioning.d.ts diff --git a/react-icons/io/cloud.d.ts b/types/react-icons/io/cloud.d.ts similarity index 100% rename from react-icons/io/cloud.d.ts rename to types/react-icons/io/cloud.d.ts diff --git a/react-icons/io/code-download.d.ts b/types/react-icons/io/code-download.d.ts similarity index 100% rename from react-icons/io/code-download.d.ts rename to types/react-icons/io/code-download.d.ts diff --git a/react-icons/io/code-working.d.ts b/types/react-icons/io/code-working.d.ts similarity index 100% rename from react-icons/io/code-working.d.ts rename to types/react-icons/io/code-working.d.ts diff --git a/react-icons/io/code.d.ts b/types/react-icons/io/code.d.ts similarity index 100% rename from react-icons/io/code.d.ts rename to types/react-icons/io/code.d.ts diff --git a/react-icons/io/coffee.d.ts b/types/react-icons/io/coffee.d.ts similarity index 100% rename from react-icons/io/coffee.d.ts rename to types/react-icons/io/coffee.d.ts diff --git a/react-icons/io/compass.d.ts b/types/react-icons/io/compass.d.ts similarity index 100% rename from react-icons/io/compass.d.ts rename to types/react-icons/io/compass.d.ts diff --git a/react-icons/io/compose.d.ts b/types/react-icons/io/compose.d.ts similarity index 100% rename from react-icons/io/compose.d.ts rename to types/react-icons/io/compose.d.ts diff --git a/react-icons/io/connectbars.d.ts b/types/react-icons/io/connectbars.d.ts similarity index 100% rename from react-icons/io/connectbars.d.ts rename to types/react-icons/io/connectbars.d.ts diff --git a/react-icons/io/contrast.d.ts b/types/react-icons/io/contrast.d.ts similarity index 100% rename from react-icons/io/contrast.d.ts rename to types/react-icons/io/contrast.d.ts diff --git a/react-icons/io/crop.d.ts b/types/react-icons/io/crop.d.ts similarity index 100% rename from react-icons/io/crop.d.ts rename to types/react-icons/io/crop.d.ts diff --git a/react-icons/io/cube.d.ts b/types/react-icons/io/cube.d.ts similarity index 100% rename from react-icons/io/cube.d.ts rename to types/react-icons/io/cube.d.ts diff --git a/react-icons/io/disc.d.ts b/types/react-icons/io/disc.d.ts similarity index 100% rename from react-icons/io/disc.d.ts rename to types/react-icons/io/disc.d.ts diff --git a/react-icons/io/document-text.d.ts b/types/react-icons/io/document-text.d.ts similarity index 100% rename from react-icons/io/document-text.d.ts rename to types/react-icons/io/document-text.d.ts diff --git a/react-icons/io/document.d.ts b/types/react-icons/io/document.d.ts similarity index 100% rename from react-icons/io/document.d.ts rename to types/react-icons/io/document.d.ts diff --git a/react-icons/io/drag.d.ts b/types/react-icons/io/drag.d.ts similarity index 100% rename from react-icons/io/drag.d.ts rename to types/react-icons/io/drag.d.ts diff --git a/react-icons/io/earth.d.ts b/types/react-icons/io/earth.d.ts similarity index 100% rename from react-icons/io/earth.d.ts rename to types/react-icons/io/earth.d.ts diff --git a/react-icons/io/easel.d.ts b/types/react-icons/io/easel.d.ts similarity index 100% rename from react-icons/io/easel.d.ts rename to types/react-icons/io/easel.d.ts diff --git a/react-icons/io/edit.d.ts b/types/react-icons/io/edit.d.ts similarity index 100% rename from react-icons/io/edit.d.ts rename to types/react-icons/io/edit.d.ts diff --git a/react-icons/io/egg.d.ts b/types/react-icons/io/egg.d.ts similarity index 100% rename from react-icons/io/egg.d.ts rename to types/react-icons/io/egg.d.ts diff --git a/react-icons/io/eject.d.ts b/types/react-icons/io/eject.d.ts similarity index 100% rename from react-icons/io/eject.d.ts rename to types/react-icons/io/eject.d.ts diff --git a/react-icons/io/email-unread.d.ts b/types/react-icons/io/email-unread.d.ts similarity index 100% rename from react-icons/io/email-unread.d.ts rename to types/react-icons/io/email-unread.d.ts diff --git a/react-icons/io/email.d.ts b/types/react-icons/io/email.d.ts similarity index 100% rename from react-icons/io/email.d.ts rename to types/react-icons/io/email.d.ts diff --git a/react-icons/io/erlenmeyer-flask-bubbles.d.ts b/types/react-icons/io/erlenmeyer-flask-bubbles.d.ts similarity index 100% rename from react-icons/io/erlenmeyer-flask-bubbles.d.ts rename to types/react-icons/io/erlenmeyer-flask-bubbles.d.ts diff --git a/react-icons/io/erlenmeyer-flask.d.ts b/types/react-icons/io/erlenmeyer-flask.d.ts similarity index 100% rename from react-icons/io/erlenmeyer-flask.d.ts rename to types/react-icons/io/erlenmeyer-flask.d.ts diff --git a/react-icons/io/eye-disabled.d.ts b/types/react-icons/io/eye-disabled.d.ts similarity index 100% rename from react-icons/io/eye-disabled.d.ts rename to types/react-icons/io/eye-disabled.d.ts diff --git a/react-icons/io/eye.d.ts b/types/react-icons/io/eye.d.ts similarity index 100% rename from react-icons/io/eye.d.ts rename to types/react-icons/io/eye.d.ts diff --git a/react-icons/io/female.d.ts b/types/react-icons/io/female.d.ts similarity index 100% rename from react-icons/io/female.d.ts rename to types/react-icons/io/female.d.ts diff --git a/react-icons/io/filing.d.ts b/types/react-icons/io/filing.d.ts similarity index 100% rename from react-icons/io/filing.d.ts rename to types/react-icons/io/filing.d.ts diff --git a/react-icons/io/film-marker.d.ts b/types/react-icons/io/film-marker.d.ts similarity index 100% rename from react-icons/io/film-marker.d.ts rename to types/react-icons/io/film-marker.d.ts diff --git a/react-icons/io/fireball.d.ts b/types/react-icons/io/fireball.d.ts similarity index 100% rename from react-icons/io/fireball.d.ts rename to types/react-icons/io/fireball.d.ts diff --git a/react-icons/io/flag.d.ts b/types/react-icons/io/flag.d.ts similarity index 100% rename from react-icons/io/flag.d.ts rename to types/react-icons/io/flag.d.ts diff --git a/react-icons/io/flame.d.ts b/types/react-icons/io/flame.d.ts similarity index 100% rename from react-icons/io/flame.d.ts rename to types/react-icons/io/flame.d.ts diff --git a/react-icons/io/flash-off.d.ts b/types/react-icons/io/flash-off.d.ts similarity index 100% rename from react-icons/io/flash-off.d.ts rename to types/react-icons/io/flash-off.d.ts diff --git a/react-icons/io/flash.d.ts b/types/react-icons/io/flash.d.ts similarity index 100% rename from react-icons/io/flash.d.ts rename to types/react-icons/io/flash.d.ts diff --git a/react-icons/io/folder.d.ts b/types/react-icons/io/folder.d.ts similarity index 100% rename from react-icons/io/folder.d.ts rename to types/react-icons/io/folder.d.ts diff --git a/react-icons/io/fork-repo.d.ts b/types/react-icons/io/fork-repo.d.ts similarity index 100% rename from react-icons/io/fork-repo.d.ts rename to types/react-icons/io/fork-repo.d.ts diff --git a/react-icons/io/fork.d.ts b/types/react-icons/io/fork.d.ts similarity index 100% rename from react-icons/io/fork.d.ts rename to types/react-icons/io/fork.d.ts diff --git a/react-icons/io/forward.d.ts b/types/react-icons/io/forward.d.ts similarity index 100% rename from react-icons/io/forward.d.ts rename to types/react-icons/io/forward.d.ts diff --git a/react-icons/io/funnel.d.ts b/types/react-icons/io/funnel.d.ts similarity index 100% rename from react-icons/io/funnel.d.ts rename to types/react-icons/io/funnel.d.ts diff --git a/react-icons/io/gear-a.d.ts b/types/react-icons/io/gear-a.d.ts similarity index 100% rename from react-icons/io/gear-a.d.ts rename to types/react-icons/io/gear-a.d.ts diff --git a/react-icons/io/gear-b.d.ts b/types/react-icons/io/gear-b.d.ts similarity index 100% rename from react-icons/io/gear-b.d.ts rename to types/react-icons/io/gear-b.d.ts diff --git a/react-icons/io/grid.d.ts b/types/react-icons/io/grid.d.ts similarity index 100% rename from react-icons/io/grid.d.ts rename to types/react-icons/io/grid.d.ts diff --git a/react-icons/io/hammer.d.ts b/types/react-icons/io/hammer.d.ts similarity index 100% rename from react-icons/io/hammer.d.ts rename to types/react-icons/io/hammer.d.ts diff --git a/react-icons/io/happy-outline.d.ts b/types/react-icons/io/happy-outline.d.ts similarity index 100% rename from react-icons/io/happy-outline.d.ts rename to types/react-icons/io/happy-outline.d.ts diff --git a/react-icons/io/happy.d.ts b/types/react-icons/io/happy.d.ts similarity index 100% rename from react-icons/io/happy.d.ts rename to types/react-icons/io/happy.d.ts diff --git a/react-icons/io/headphone.d.ts b/types/react-icons/io/headphone.d.ts similarity index 100% rename from react-icons/io/headphone.d.ts rename to types/react-icons/io/headphone.d.ts diff --git a/react-icons/io/heart-broken.d.ts b/types/react-icons/io/heart-broken.d.ts similarity index 100% rename from react-icons/io/heart-broken.d.ts rename to types/react-icons/io/heart-broken.d.ts diff --git a/react-icons/io/heart.d.ts b/types/react-icons/io/heart.d.ts similarity index 100% rename from react-icons/io/heart.d.ts rename to types/react-icons/io/heart.d.ts diff --git a/react-icons/io/help-buoy.d.ts b/types/react-icons/io/help-buoy.d.ts similarity index 100% rename from react-icons/io/help-buoy.d.ts rename to types/react-icons/io/help-buoy.d.ts diff --git a/react-icons/io/help-circled.d.ts b/types/react-icons/io/help-circled.d.ts similarity index 100% rename from react-icons/io/help-circled.d.ts rename to types/react-icons/io/help-circled.d.ts diff --git a/react-icons/io/help.d.ts b/types/react-icons/io/help.d.ts similarity index 100% rename from react-icons/io/help.d.ts rename to types/react-icons/io/help.d.ts diff --git a/react-icons/io/home.d.ts b/types/react-icons/io/home.d.ts similarity index 100% rename from react-icons/io/home.d.ts rename to types/react-icons/io/home.d.ts diff --git a/react-icons/io/icecream.d.ts b/types/react-icons/io/icecream.d.ts similarity index 100% rename from react-icons/io/icecream.d.ts rename to types/react-icons/io/icecream.d.ts diff --git a/react-icons/io/image.d.ts b/types/react-icons/io/image.d.ts similarity index 100% rename from react-icons/io/image.d.ts rename to types/react-icons/io/image.d.ts diff --git a/react-icons/io/images.d.ts b/types/react-icons/io/images.d.ts similarity index 100% rename from react-icons/io/images.d.ts rename to types/react-icons/io/images.d.ts diff --git a/react-icons/io/index.d.ts b/types/react-icons/io/index.d.ts similarity index 100% rename from react-icons/io/index.d.ts rename to types/react-icons/io/index.d.ts diff --git a/react-icons/io/informatcircled.d.ts b/types/react-icons/io/informatcircled.d.ts similarity index 100% rename from react-icons/io/informatcircled.d.ts rename to types/react-icons/io/informatcircled.d.ts diff --git a/react-icons/io/information.d.ts b/types/react-icons/io/information.d.ts similarity index 100% rename from react-icons/io/information.d.ts rename to types/react-icons/io/information.d.ts diff --git a/react-icons/io/ionic.d.ts b/types/react-icons/io/ionic.d.ts similarity index 100% rename from react-icons/io/ionic.d.ts rename to types/react-icons/io/ionic.d.ts diff --git a/react-icons/io/ios-alarm-outline.d.ts b/types/react-icons/io/ios-alarm-outline.d.ts similarity index 100% rename from react-icons/io/ios-alarm-outline.d.ts rename to types/react-icons/io/ios-alarm-outline.d.ts diff --git a/react-icons/io/ios-alarm.d.ts b/types/react-icons/io/ios-alarm.d.ts similarity index 100% rename from react-icons/io/ios-alarm.d.ts rename to types/react-icons/io/ios-alarm.d.ts diff --git a/react-icons/io/ios-albums-outline.d.ts b/types/react-icons/io/ios-albums-outline.d.ts similarity index 100% rename from react-icons/io/ios-albums-outline.d.ts rename to types/react-icons/io/ios-albums-outline.d.ts diff --git a/react-icons/io/ios-albums.d.ts b/types/react-icons/io/ios-albums.d.ts similarity index 100% rename from react-icons/io/ios-albums.d.ts rename to types/react-icons/io/ios-albums.d.ts diff --git a/react-icons/io/ios-americanfootball-outline.d.ts b/types/react-icons/io/ios-americanfootball-outline.d.ts similarity index 100% rename from react-icons/io/ios-americanfootball-outline.d.ts rename to types/react-icons/io/ios-americanfootball-outline.d.ts diff --git a/react-icons/io/ios-americanfootball.d.ts b/types/react-icons/io/ios-americanfootball.d.ts similarity index 100% rename from react-icons/io/ios-americanfootball.d.ts rename to types/react-icons/io/ios-americanfootball.d.ts diff --git a/react-icons/io/ios-analytics-outline.d.ts b/types/react-icons/io/ios-analytics-outline.d.ts similarity index 100% rename from react-icons/io/ios-analytics-outline.d.ts rename to types/react-icons/io/ios-analytics-outline.d.ts diff --git a/react-icons/io/ios-analytics.d.ts b/types/react-icons/io/ios-analytics.d.ts similarity index 100% rename from react-icons/io/ios-analytics.d.ts rename to types/react-icons/io/ios-analytics.d.ts diff --git a/react-icons/io/ios-arrow-back.d.ts b/types/react-icons/io/ios-arrow-back.d.ts similarity index 100% rename from react-icons/io/ios-arrow-back.d.ts rename to types/react-icons/io/ios-arrow-back.d.ts diff --git a/react-icons/io/ios-arrow-down.d.ts b/types/react-icons/io/ios-arrow-down.d.ts similarity index 100% rename from react-icons/io/ios-arrow-down.d.ts rename to types/react-icons/io/ios-arrow-down.d.ts diff --git a/react-icons/io/ios-arrow-forward.d.ts b/types/react-icons/io/ios-arrow-forward.d.ts similarity index 100% rename from react-icons/io/ios-arrow-forward.d.ts rename to types/react-icons/io/ios-arrow-forward.d.ts diff --git a/react-icons/io/ios-arrow-left.d.ts b/types/react-icons/io/ios-arrow-left.d.ts similarity index 100% rename from react-icons/io/ios-arrow-left.d.ts rename to types/react-icons/io/ios-arrow-left.d.ts diff --git a/react-icons/io/ios-arrow-right.d.ts b/types/react-icons/io/ios-arrow-right.d.ts similarity index 100% rename from react-icons/io/ios-arrow-right.d.ts rename to types/react-icons/io/ios-arrow-right.d.ts diff --git a/react-icons/io/ios-arrow-thin-down.d.ts b/types/react-icons/io/ios-arrow-thin-down.d.ts similarity index 100% rename from react-icons/io/ios-arrow-thin-down.d.ts rename to types/react-icons/io/ios-arrow-thin-down.d.ts diff --git a/react-icons/io/ios-arrow-thin-left.d.ts b/types/react-icons/io/ios-arrow-thin-left.d.ts similarity index 100% rename from react-icons/io/ios-arrow-thin-left.d.ts rename to types/react-icons/io/ios-arrow-thin-left.d.ts diff --git a/react-icons/io/ios-arrow-thin-right.d.ts b/types/react-icons/io/ios-arrow-thin-right.d.ts similarity index 100% rename from react-icons/io/ios-arrow-thin-right.d.ts rename to types/react-icons/io/ios-arrow-thin-right.d.ts diff --git a/react-icons/io/ios-arrow-thin-up.d.ts b/types/react-icons/io/ios-arrow-thin-up.d.ts similarity index 100% rename from react-icons/io/ios-arrow-thin-up.d.ts rename to types/react-icons/io/ios-arrow-thin-up.d.ts diff --git a/react-icons/io/ios-arrow-up.d.ts b/types/react-icons/io/ios-arrow-up.d.ts similarity index 100% rename from react-icons/io/ios-arrow-up.d.ts rename to types/react-icons/io/ios-arrow-up.d.ts diff --git a/react-icons/io/ios-at-outline.d.ts b/types/react-icons/io/ios-at-outline.d.ts similarity index 100% rename from react-icons/io/ios-at-outline.d.ts rename to types/react-icons/io/ios-at-outline.d.ts diff --git a/react-icons/io/ios-at.d.ts b/types/react-icons/io/ios-at.d.ts similarity index 100% rename from react-icons/io/ios-at.d.ts rename to types/react-icons/io/ios-at.d.ts diff --git a/react-icons/io/ios-barcode-outline.d.ts b/types/react-icons/io/ios-barcode-outline.d.ts similarity index 100% rename from react-icons/io/ios-barcode-outline.d.ts rename to types/react-icons/io/ios-barcode-outline.d.ts diff --git a/react-icons/io/ios-barcode.d.ts b/types/react-icons/io/ios-barcode.d.ts similarity index 100% rename from react-icons/io/ios-barcode.d.ts rename to types/react-icons/io/ios-barcode.d.ts diff --git a/react-icons/io/ios-baseball-outline.d.ts b/types/react-icons/io/ios-baseball-outline.d.ts similarity index 100% rename from react-icons/io/ios-baseball-outline.d.ts rename to types/react-icons/io/ios-baseball-outline.d.ts diff --git a/react-icons/io/ios-baseball.d.ts b/types/react-icons/io/ios-baseball.d.ts similarity index 100% rename from react-icons/io/ios-baseball.d.ts rename to types/react-icons/io/ios-baseball.d.ts diff --git a/react-icons/io/ios-basketball-outline.d.ts b/types/react-icons/io/ios-basketball-outline.d.ts similarity index 100% rename from react-icons/io/ios-basketball-outline.d.ts rename to types/react-icons/io/ios-basketball-outline.d.ts diff --git a/react-icons/io/ios-basketball.d.ts b/types/react-icons/io/ios-basketball.d.ts similarity index 100% rename from react-icons/io/ios-basketball.d.ts rename to types/react-icons/io/ios-basketball.d.ts diff --git a/react-icons/io/ios-bell-outline.d.ts b/types/react-icons/io/ios-bell-outline.d.ts similarity index 100% rename from react-icons/io/ios-bell-outline.d.ts rename to types/react-icons/io/ios-bell-outline.d.ts diff --git a/react-icons/io/ios-bell.d.ts b/types/react-icons/io/ios-bell.d.ts similarity index 100% rename from react-icons/io/ios-bell.d.ts rename to types/react-icons/io/ios-bell.d.ts diff --git a/react-icons/io/ios-body-outline.d.ts b/types/react-icons/io/ios-body-outline.d.ts similarity index 100% rename from react-icons/io/ios-body-outline.d.ts rename to types/react-icons/io/ios-body-outline.d.ts diff --git a/react-icons/io/ios-body.d.ts b/types/react-icons/io/ios-body.d.ts similarity index 100% rename from react-icons/io/ios-body.d.ts rename to types/react-icons/io/ios-body.d.ts diff --git a/react-icons/io/ios-bolt-outline.d.ts b/types/react-icons/io/ios-bolt-outline.d.ts similarity index 100% rename from react-icons/io/ios-bolt-outline.d.ts rename to types/react-icons/io/ios-bolt-outline.d.ts diff --git a/react-icons/io/ios-bolt.d.ts b/types/react-icons/io/ios-bolt.d.ts similarity index 100% rename from react-icons/io/ios-bolt.d.ts rename to types/react-icons/io/ios-bolt.d.ts diff --git a/react-icons/io/ios-book-outline.d.ts b/types/react-icons/io/ios-book-outline.d.ts similarity index 100% rename from react-icons/io/ios-book-outline.d.ts rename to types/react-icons/io/ios-book-outline.d.ts diff --git a/react-icons/io/ios-book.d.ts b/types/react-icons/io/ios-book.d.ts similarity index 100% rename from react-icons/io/ios-book.d.ts rename to types/react-icons/io/ios-book.d.ts diff --git a/react-icons/io/ios-bookmarks-outline.d.ts b/types/react-icons/io/ios-bookmarks-outline.d.ts similarity index 100% rename from react-icons/io/ios-bookmarks-outline.d.ts rename to types/react-icons/io/ios-bookmarks-outline.d.ts diff --git a/react-icons/io/ios-bookmarks.d.ts b/types/react-icons/io/ios-bookmarks.d.ts similarity index 100% rename from react-icons/io/ios-bookmarks.d.ts rename to types/react-icons/io/ios-bookmarks.d.ts diff --git a/react-icons/io/ios-box-outline.d.ts b/types/react-icons/io/ios-box-outline.d.ts similarity index 100% rename from react-icons/io/ios-box-outline.d.ts rename to types/react-icons/io/ios-box-outline.d.ts diff --git a/react-icons/io/ios-box.d.ts b/types/react-icons/io/ios-box.d.ts similarity index 100% rename from react-icons/io/ios-box.d.ts rename to types/react-icons/io/ios-box.d.ts diff --git a/react-icons/io/ios-briefcase-outline.d.ts b/types/react-icons/io/ios-briefcase-outline.d.ts similarity index 100% rename from react-icons/io/ios-briefcase-outline.d.ts rename to types/react-icons/io/ios-briefcase-outline.d.ts diff --git a/react-icons/io/ios-briefcase.d.ts b/types/react-icons/io/ios-briefcase.d.ts similarity index 100% rename from react-icons/io/ios-briefcase.d.ts rename to types/react-icons/io/ios-briefcase.d.ts diff --git a/react-icons/io/ios-browsers-outline.d.ts b/types/react-icons/io/ios-browsers-outline.d.ts similarity index 100% rename from react-icons/io/ios-browsers-outline.d.ts rename to types/react-icons/io/ios-browsers-outline.d.ts diff --git a/react-icons/io/ios-browsers.d.ts b/types/react-icons/io/ios-browsers.d.ts similarity index 100% rename from react-icons/io/ios-browsers.d.ts rename to types/react-icons/io/ios-browsers.d.ts diff --git a/react-icons/io/ios-calculator-outline.d.ts b/types/react-icons/io/ios-calculator-outline.d.ts similarity index 100% rename from react-icons/io/ios-calculator-outline.d.ts rename to types/react-icons/io/ios-calculator-outline.d.ts diff --git a/react-icons/io/ios-calculator.d.ts b/types/react-icons/io/ios-calculator.d.ts similarity index 100% rename from react-icons/io/ios-calculator.d.ts rename to types/react-icons/io/ios-calculator.d.ts diff --git a/react-icons/io/ios-calendar-outline.d.ts b/types/react-icons/io/ios-calendar-outline.d.ts similarity index 100% rename from react-icons/io/ios-calendar-outline.d.ts rename to types/react-icons/io/ios-calendar-outline.d.ts diff --git a/react-icons/io/ios-calendar.d.ts b/types/react-icons/io/ios-calendar.d.ts similarity index 100% rename from react-icons/io/ios-calendar.d.ts rename to types/react-icons/io/ios-calendar.d.ts diff --git a/react-icons/io/ios-camera-outline.d.ts b/types/react-icons/io/ios-camera-outline.d.ts similarity index 100% rename from react-icons/io/ios-camera-outline.d.ts rename to types/react-icons/io/ios-camera-outline.d.ts diff --git a/react-icons/io/ios-camera.d.ts b/types/react-icons/io/ios-camera.d.ts similarity index 100% rename from react-icons/io/ios-camera.d.ts rename to types/react-icons/io/ios-camera.d.ts diff --git a/react-icons/io/ios-cart-outline.d.ts b/types/react-icons/io/ios-cart-outline.d.ts similarity index 100% rename from react-icons/io/ios-cart-outline.d.ts rename to types/react-icons/io/ios-cart-outline.d.ts diff --git a/react-icons/io/ios-cart.d.ts b/types/react-icons/io/ios-cart.d.ts similarity index 100% rename from react-icons/io/ios-cart.d.ts rename to types/react-icons/io/ios-cart.d.ts diff --git a/react-icons/io/ios-chatboxes-outline.d.ts b/types/react-icons/io/ios-chatboxes-outline.d.ts similarity index 100% rename from react-icons/io/ios-chatboxes-outline.d.ts rename to types/react-icons/io/ios-chatboxes-outline.d.ts diff --git a/react-icons/io/ios-chatboxes.d.ts b/types/react-icons/io/ios-chatboxes.d.ts similarity index 100% rename from react-icons/io/ios-chatboxes.d.ts rename to types/react-icons/io/ios-chatboxes.d.ts diff --git a/react-icons/io/ios-chatbubble-outline.d.ts b/types/react-icons/io/ios-chatbubble-outline.d.ts similarity index 100% rename from react-icons/io/ios-chatbubble-outline.d.ts rename to types/react-icons/io/ios-chatbubble-outline.d.ts diff --git a/react-icons/io/ios-chatbubble.d.ts b/types/react-icons/io/ios-chatbubble.d.ts similarity index 100% rename from react-icons/io/ios-chatbubble.d.ts rename to types/react-icons/io/ios-chatbubble.d.ts diff --git a/react-icons/io/ios-checkmark-empty.d.ts b/types/react-icons/io/ios-checkmark-empty.d.ts similarity index 100% rename from react-icons/io/ios-checkmark-empty.d.ts rename to types/react-icons/io/ios-checkmark-empty.d.ts diff --git a/react-icons/io/ios-checkmark-outline.d.ts b/types/react-icons/io/ios-checkmark-outline.d.ts similarity index 100% rename from react-icons/io/ios-checkmark-outline.d.ts rename to types/react-icons/io/ios-checkmark-outline.d.ts diff --git a/react-icons/io/ios-checkmark.d.ts b/types/react-icons/io/ios-checkmark.d.ts similarity index 100% rename from react-icons/io/ios-checkmark.d.ts rename to types/react-icons/io/ios-checkmark.d.ts diff --git a/react-icons/io/ios-circle-filled.d.ts b/types/react-icons/io/ios-circle-filled.d.ts similarity index 100% rename from react-icons/io/ios-circle-filled.d.ts rename to types/react-icons/io/ios-circle-filled.d.ts diff --git a/react-icons/io/ios-circle-outline.d.ts b/types/react-icons/io/ios-circle-outline.d.ts similarity index 100% rename from react-icons/io/ios-circle-outline.d.ts rename to types/react-icons/io/ios-circle-outline.d.ts diff --git a/react-icons/io/ios-clock-outline.d.ts b/types/react-icons/io/ios-clock-outline.d.ts similarity index 100% rename from react-icons/io/ios-clock-outline.d.ts rename to types/react-icons/io/ios-clock-outline.d.ts diff --git a/react-icons/io/ios-clock.d.ts b/types/react-icons/io/ios-clock.d.ts similarity index 100% rename from react-icons/io/ios-clock.d.ts rename to types/react-icons/io/ios-clock.d.ts diff --git a/react-icons/io/ios-close-empty.d.ts b/types/react-icons/io/ios-close-empty.d.ts similarity index 100% rename from react-icons/io/ios-close-empty.d.ts rename to types/react-icons/io/ios-close-empty.d.ts diff --git a/react-icons/io/ios-close-outline.d.ts b/types/react-icons/io/ios-close-outline.d.ts similarity index 100% rename from react-icons/io/ios-close-outline.d.ts rename to types/react-icons/io/ios-close-outline.d.ts diff --git a/react-icons/io/ios-close.d.ts b/types/react-icons/io/ios-close.d.ts similarity index 100% rename from react-icons/io/ios-close.d.ts rename to types/react-icons/io/ios-close.d.ts diff --git a/react-icons/io/ios-cloud-download-outline.d.ts b/types/react-icons/io/ios-cloud-download-outline.d.ts similarity index 100% rename from react-icons/io/ios-cloud-download-outline.d.ts rename to types/react-icons/io/ios-cloud-download-outline.d.ts diff --git a/react-icons/io/ios-cloud-download.d.ts b/types/react-icons/io/ios-cloud-download.d.ts similarity index 100% rename from react-icons/io/ios-cloud-download.d.ts rename to types/react-icons/io/ios-cloud-download.d.ts diff --git a/react-icons/io/ios-cloud-outline.d.ts b/types/react-icons/io/ios-cloud-outline.d.ts similarity index 100% rename from react-icons/io/ios-cloud-outline.d.ts rename to types/react-icons/io/ios-cloud-outline.d.ts diff --git a/react-icons/io/ios-cloud-upload-outline.d.ts b/types/react-icons/io/ios-cloud-upload-outline.d.ts similarity index 100% rename from react-icons/io/ios-cloud-upload-outline.d.ts rename to types/react-icons/io/ios-cloud-upload-outline.d.ts diff --git a/react-icons/io/ios-cloud-upload.d.ts b/types/react-icons/io/ios-cloud-upload.d.ts similarity index 100% rename from react-icons/io/ios-cloud-upload.d.ts rename to types/react-icons/io/ios-cloud-upload.d.ts diff --git a/react-icons/io/ios-cloud.d.ts b/types/react-icons/io/ios-cloud.d.ts similarity index 100% rename from react-icons/io/ios-cloud.d.ts rename to types/react-icons/io/ios-cloud.d.ts diff --git a/react-icons/io/ios-cloudy-night-outline.d.ts b/types/react-icons/io/ios-cloudy-night-outline.d.ts similarity index 100% rename from react-icons/io/ios-cloudy-night-outline.d.ts rename to types/react-icons/io/ios-cloudy-night-outline.d.ts diff --git a/react-icons/io/ios-cloudy-night.d.ts b/types/react-icons/io/ios-cloudy-night.d.ts similarity index 100% rename from react-icons/io/ios-cloudy-night.d.ts rename to types/react-icons/io/ios-cloudy-night.d.ts diff --git a/react-icons/io/ios-cloudy-outline.d.ts b/types/react-icons/io/ios-cloudy-outline.d.ts similarity index 100% rename from react-icons/io/ios-cloudy-outline.d.ts rename to types/react-icons/io/ios-cloudy-outline.d.ts diff --git a/react-icons/io/ios-cloudy.d.ts b/types/react-icons/io/ios-cloudy.d.ts similarity index 100% rename from react-icons/io/ios-cloudy.d.ts rename to types/react-icons/io/ios-cloudy.d.ts diff --git a/react-icons/io/ios-cog-outline.d.ts b/types/react-icons/io/ios-cog-outline.d.ts similarity index 100% rename from react-icons/io/ios-cog-outline.d.ts rename to types/react-icons/io/ios-cog-outline.d.ts diff --git a/react-icons/io/ios-cog.d.ts b/types/react-icons/io/ios-cog.d.ts similarity index 100% rename from react-icons/io/ios-cog.d.ts rename to types/react-icons/io/ios-cog.d.ts diff --git a/react-icons/io/ios-color-filter-outline.d.ts b/types/react-icons/io/ios-color-filter-outline.d.ts similarity index 100% rename from react-icons/io/ios-color-filter-outline.d.ts rename to types/react-icons/io/ios-color-filter-outline.d.ts diff --git a/react-icons/io/ios-color-filter.d.ts b/types/react-icons/io/ios-color-filter.d.ts similarity index 100% rename from react-icons/io/ios-color-filter.d.ts rename to types/react-icons/io/ios-color-filter.d.ts diff --git a/react-icons/io/ios-color-wand-outline.d.ts b/types/react-icons/io/ios-color-wand-outline.d.ts similarity index 100% rename from react-icons/io/ios-color-wand-outline.d.ts rename to types/react-icons/io/ios-color-wand-outline.d.ts diff --git a/react-icons/io/ios-color-wand.d.ts b/types/react-icons/io/ios-color-wand.d.ts similarity index 100% rename from react-icons/io/ios-color-wand.d.ts rename to types/react-icons/io/ios-color-wand.d.ts diff --git a/react-icons/io/ios-compose-outline.d.ts b/types/react-icons/io/ios-compose-outline.d.ts similarity index 100% rename from react-icons/io/ios-compose-outline.d.ts rename to types/react-icons/io/ios-compose-outline.d.ts diff --git a/react-icons/io/ios-compose.d.ts b/types/react-icons/io/ios-compose.d.ts similarity index 100% rename from react-icons/io/ios-compose.d.ts rename to types/react-icons/io/ios-compose.d.ts diff --git a/react-icons/io/ios-contact-outline.d.ts b/types/react-icons/io/ios-contact-outline.d.ts similarity index 100% rename from react-icons/io/ios-contact-outline.d.ts rename to types/react-icons/io/ios-contact-outline.d.ts diff --git a/react-icons/io/ios-contact.d.ts b/types/react-icons/io/ios-contact.d.ts similarity index 100% rename from react-icons/io/ios-contact.d.ts rename to types/react-icons/io/ios-contact.d.ts diff --git a/react-icons/io/ios-copy-outline.d.ts b/types/react-icons/io/ios-copy-outline.d.ts similarity index 100% rename from react-icons/io/ios-copy-outline.d.ts rename to types/react-icons/io/ios-copy-outline.d.ts diff --git a/react-icons/io/ios-copy.d.ts b/types/react-icons/io/ios-copy.d.ts similarity index 100% rename from react-icons/io/ios-copy.d.ts rename to types/react-icons/io/ios-copy.d.ts diff --git a/react-icons/io/ios-crop-strong.d.ts b/types/react-icons/io/ios-crop-strong.d.ts similarity index 100% rename from react-icons/io/ios-crop-strong.d.ts rename to types/react-icons/io/ios-crop-strong.d.ts diff --git a/react-icons/io/ios-crop.d.ts b/types/react-icons/io/ios-crop.d.ts similarity index 100% rename from react-icons/io/ios-crop.d.ts rename to types/react-icons/io/ios-crop.d.ts diff --git a/react-icons/io/ios-download-outline.d.ts b/types/react-icons/io/ios-download-outline.d.ts similarity index 100% rename from react-icons/io/ios-download-outline.d.ts rename to types/react-icons/io/ios-download-outline.d.ts diff --git a/react-icons/io/ios-download.d.ts b/types/react-icons/io/ios-download.d.ts similarity index 100% rename from react-icons/io/ios-download.d.ts rename to types/react-icons/io/ios-download.d.ts diff --git a/react-icons/io/ios-drag.d.ts b/types/react-icons/io/ios-drag.d.ts similarity index 100% rename from react-icons/io/ios-drag.d.ts rename to types/react-icons/io/ios-drag.d.ts diff --git a/react-icons/io/ios-email-outline.d.ts b/types/react-icons/io/ios-email-outline.d.ts similarity index 100% rename from react-icons/io/ios-email-outline.d.ts rename to types/react-icons/io/ios-email-outline.d.ts diff --git a/react-icons/io/ios-email.d.ts b/types/react-icons/io/ios-email.d.ts similarity index 100% rename from react-icons/io/ios-email.d.ts rename to types/react-icons/io/ios-email.d.ts diff --git a/react-icons/io/ios-eye-outline.d.ts b/types/react-icons/io/ios-eye-outline.d.ts similarity index 100% rename from react-icons/io/ios-eye-outline.d.ts rename to types/react-icons/io/ios-eye-outline.d.ts diff --git a/react-icons/io/ios-eye.d.ts b/types/react-icons/io/ios-eye.d.ts similarity index 100% rename from react-icons/io/ios-eye.d.ts rename to types/react-icons/io/ios-eye.d.ts diff --git a/react-icons/io/ios-fastforward-outline.d.ts b/types/react-icons/io/ios-fastforward-outline.d.ts similarity index 100% rename from react-icons/io/ios-fastforward-outline.d.ts rename to types/react-icons/io/ios-fastforward-outline.d.ts diff --git a/react-icons/io/ios-fastforward.d.ts b/types/react-icons/io/ios-fastforward.d.ts similarity index 100% rename from react-icons/io/ios-fastforward.d.ts rename to types/react-icons/io/ios-fastforward.d.ts diff --git a/react-icons/io/ios-filing-outline.d.ts b/types/react-icons/io/ios-filing-outline.d.ts similarity index 100% rename from react-icons/io/ios-filing-outline.d.ts rename to types/react-icons/io/ios-filing-outline.d.ts diff --git a/react-icons/io/ios-filing.d.ts b/types/react-icons/io/ios-filing.d.ts similarity index 100% rename from react-icons/io/ios-filing.d.ts rename to types/react-icons/io/ios-filing.d.ts diff --git a/react-icons/io/ios-film-outline.d.ts b/types/react-icons/io/ios-film-outline.d.ts similarity index 100% rename from react-icons/io/ios-film-outline.d.ts rename to types/react-icons/io/ios-film-outline.d.ts diff --git a/react-icons/io/ios-film.d.ts b/types/react-icons/io/ios-film.d.ts similarity index 100% rename from react-icons/io/ios-film.d.ts rename to types/react-icons/io/ios-film.d.ts diff --git a/react-icons/io/ios-flag-outline.d.ts b/types/react-icons/io/ios-flag-outline.d.ts similarity index 100% rename from react-icons/io/ios-flag-outline.d.ts rename to types/react-icons/io/ios-flag-outline.d.ts diff --git a/react-icons/io/ios-flag.d.ts b/types/react-icons/io/ios-flag.d.ts similarity index 100% rename from react-icons/io/ios-flag.d.ts rename to types/react-icons/io/ios-flag.d.ts diff --git a/react-icons/io/ios-flame-outline.d.ts b/types/react-icons/io/ios-flame-outline.d.ts similarity index 100% rename from react-icons/io/ios-flame-outline.d.ts rename to types/react-icons/io/ios-flame-outline.d.ts diff --git a/react-icons/io/ios-flame.d.ts b/types/react-icons/io/ios-flame.d.ts similarity index 100% rename from react-icons/io/ios-flame.d.ts rename to types/react-icons/io/ios-flame.d.ts diff --git a/react-icons/io/ios-flask-outline.d.ts b/types/react-icons/io/ios-flask-outline.d.ts similarity index 100% rename from react-icons/io/ios-flask-outline.d.ts rename to types/react-icons/io/ios-flask-outline.d.ts diff --git a/react-icons/io/ios-flask.d.ts b/types/react-icons/io/ios-flask.d.ts similarity index 100% rename from react-icons/io/ios-flask.d.ts rename to types/react-icons/io/ios-flask.d.ts diff --git a/react-icons/io/ios-flower-outline.d.ts b/types/react-icons/io/ios-flower-outline.d.ts similarity index 100% rename from react-icons/io/ios-flower-outline.d.ts rename to types/react-icons/io/ios-flower-outline.d.ts diff --git a/react-icons/io/ios-flower.d.ts b/types/react-icons/io/ios-flower.d.ts similarity index 100% rename from react-icons/io/ios-flower.d.ts rename to types/react-icons/io/ios-flower.d.ts diff --git a/react-icons/io/ios-folder-outline.d.ts b/types/react-icons/io/ios-folder-outline.d.ts similarity index 100% rename from react-icons/io/ios-folder-outline.d.ts rename to types/react-icons/io/ios-folder-outline.d.ts diff --git a/react-icons/io/ios-folder.d.ts b/types/react-icons/io/ios-folder.d.ts similarity index 100% rename from react-icons/io/ios-folder.d.ts rename to types/react-icons/io/ios-folder.d.ts diff --git a/react-icons/io/ios-football-outline.d.ts b/types/react-icons/io/ios-football-outline.d.ts similarity index 100% rename from react-icons/io/ios-football-outline.d.ts rename to types/react-icons/io/ios-football-outline.d.ts diff --git a/react-icons/io/ios-football.d.ts b/types/react-icons/io/ios-football.d.ts similarity index 100% rename from react-icons/io/ios-football.d.ts rename to types/react-icons/io/ios-football.d.ts diff --git a/react-icons/io/ios-game-controller-a-outline.d.ts b/types/react-icons/io/ios-game-controller-a-outline.d.ts similarity index 100% rename from react-icons/io/ios-game-controller-a-outline.d.ts rename to types/react-icons/io/ios-game-controller-a-outline.d.ts diff --git a/react-icons/io/ios-game-controller-a.d.ts b/types/react-icons/io/ios-game-controller-a.d.ts similarity index 100% rename from react-icons/io/ios-game-controller-a.d.ts rename to types/react-icons/io/ios-game-controller-a.d.ts diff --git a/react-icons/io/ios-game-controller-b-outline.d.ts b/types/react-icons/io/ios-game-controller-b-outline.d.ts similarity index 100% rename from react-icons/io/ios-game-controller-b-outline.d.ts rename to types/react-icons/io/ios-game-controller-b-outline.d.ts diff --git a/react-icons/io/ios-game-controller-b.d.ts b/types/react-icons/io/ios-game-controller-b.d.ts similarity index 100% rename from react-icons/io/ios-game-controller-b.d.ts rename to types/react-icons/io/ios-game-controller-b.d.ts diff --git a/react-icons/io/ios-gear-outline.d.ts b/types/react-icons/io/ios-gear-outline.d.ts similarity index 100% rename from react-icons/io/ios-gear-outline.d.ts rename to types/react-icons/io/ios-gear-outline.d.ts diff --git a/react-icons/io/ios-gear.d.ts b/types/react-icons/io/ios-gear.d.ts similarity index 100% rename from react-icons/io/ios-gear.d.ts rename to types/react-icons/io/ios-gear.d.ts diff --git a/react-icons/io/ios-glasses-outline.d.ts b/types/react-icons/io/ios-glasses-outline.d.ts similarity index 100% rename from react-icons/io/ios-glasses-outline.d.ts rename to types/react-icons/io/ios-glasses-outline.d.ts diff --git a/react-icons/io/ios-glasses.d.ts b/types/react-icons/io/ios-glasses.d.ts similarity index 100% rename from react-icons/io/ios-glasses.d.ts rename to types/react-icons/io/ios-glasses.d.ts diff --git a/react-icons/io/ios-grid-view-outline.d.ts b/types/react-icons/io/ios-grid-view-outline.d.ts similarity index 100% rename from react-icons/io/ios-grid-view-outline.d.ts rename to types/react-icons/io/ios-grid-view-outline.d.ts diff --git a/react-icons/io/ios-grid-view.d.ts b/types/react-icons/io/ios-grid-view.d.ts similarity index 100% rename from react-icons/io/ios-grid-view.d.ts rename to types/react-icons/io/ios-grid-view.d.ts diff --git a/react-icons/io/ios-heart-outline.d.ts b/types/react-icons/io/ios-heart-outline.d.ts similarity index 100% rename from react-icons/io/ios-heart-outline.d.ts rename to types/react-icons/io/ios-heart-outline.d.ts diff --git a/react-icons/io/ios-heart.d.ts b/types/react-icons/io/ios-heart.d.ts similarity index 100% rename from react-icons/io/ios-heart.d.ts rename to types/react-icons/io/ios-heart.d.ts diff --git a/react-icons/io/ios-help-empty.d.ts b/types/react-icons/io/ios-help-empty.d.ts similarity index 100% rename from react-icons/io/ios-help-empty.d.ts rename to types/react-icons/io/ios-help-empty.d.ts diff --git a/react-icons/io/ios-help-outline.d.ts b/types/react-icons/io/ios-help-outline.d.ts similarity index 100% rename from react-icons/io/ios-help-outline.d.ts rename to types/react-icons/io/ios-help-outline.d.ts diff --git a/react-icons/io/ios-help.d.ts b/types/react-icons/io/ios-help.d.ts similarity index 100% rename from react-icons/io/ios-help.d.ts rename to types/react-icons/io/ios-help.d.ts diff --git a/react-icons/io/ios-home-outline.d.ts b/types/react-icons/io/ios-home-outline.d.ts similarity index 100% rename from react-icons/io/ios-home-outline.d.ts rename to types/react-icons/io/ios-home-outline.d.ts diff --git a/react-icons/io/ios-home.d.ts b/types/react-icons/io/ios-home.d.ts similarity index 100% rename from react-icons/io/ios-home.d.ts rename to types/react-icons/io/ios-home.d.ts diff --git a/react-icons/io/ios-infinite-outline.d.ts b/types/react-icons/io/ios-infinite-outline.d.ts similarity index 100% rename from react-icons/io/ios-infinite-outline.d.ts rename to types/react-icons/io/ios-infinite-outline.d.ts diff --git a/react-icons/io/ios-infinite.d.ts b/types/react-icons/io/ios-infinite.d.ts similarity index 100% rename from react-icons/io/ios-infinite.d.ts rename to types/react-icons/io/ios-infinite.d.ts diff --git a/react-icons/io/ios-informatempty.d.ts b/types/react-icons/io/ios-informatempty.d.ts similarity index 100% rename from react-icons/io/ios-informatempty.d.ts rename to types/react-icons/io/ios-informatempty.d.ts diff --git a/react-icons/io/ios-information.d.ts b/types/react-icons/io/ios-information.d.ts similarity index 100% rename from react-icons/io/ios-information.d.ts rename to types/react-icons/io/ios-information.d.ts diff --git a/react-icons/io/ios-informatoutline.d.ts b/types/react-icons/io/ios-informatoutline.d.ts similarity index 100% rename from react-icons/io/ios-informatoutline.d.ts rename to types/react-icons/io/ios-informatoutline.d.ts diff --git a/react-icons/io/ios-ionic-outline.d.ts b/types/react-icons/io/ios-ionic-outline.d.ts similarity index 100% rename from react-icons/io/ios-ionic-outline.d.ts rename to types/react-icons/io/ios-ionic-outline.d.ts diff --git a/react-icons/io/ios-keypad-outline.d.ts b/types/react-icons/io/ios-keypad-outline.d.ts similarity index 100% rename from react-icons/io/ios-keypad-outline.d.ts rename to types/react-icons/io/ios-keypad-outline.d.ts diff --git a/react-icons/io/ios-keypad.d.ts b/types/react-icons/io/ios-keypad.d.ts similarity index 100% rename from react-icons/io/ios-keypad.d.ts rename to types/react-icons/io/ios-keypad.d.ts diff --git a/react-icons/io/ios-lightbulb-outline.d.ts b/types/react-icons/io/ios-lightbulb-outline.d.ts similarity index 100% rename from react-icons/io/ios-lightbulb-outline.d.ts rename to types/react-icons/io/ios-lightbulb-outline.d.ts diff --git a/react-icons/io/ios-lightbulb.d.ts b/types/react-icons/io/ios-lightbulb.d.ts similarity index 100% rename from react-icons/io/ios-lightbulb.d.ts rename to types/react-icons/io/ios-lightbulb.d.ts diff --git a/react-icons/io/ios-list-outline.d.ts b/types/react-icons/io/ios-list-outline.d.ts similarity index 100% rename from react-icons/io/ios-list-outline.d.ts rename to types/react-icons/io/ios-list-outline.d.ts diff --git a/react-icons/io/ios-list.d.ts b/types/react-icons/io/ios-list.d.ts similarity index 100% rename from react-icons/io/ios-list.d.ts rename to types/react-icons/io/ios-list.d.ts diff --git a/react-icons/io/ios-location.d.ts b/types/react-icons/io/ios-location.d.ts similarity index 100% rename from react-icons/io/ios-location.d.ts rename to types/react-icons/io/ios-location.d.ts diff --git a/react-icons/io/ios-locatoutline.d.ts b/types/react-icons/io/ios-locatoutline.d.ts similarity index 100% rename from react-icons/io/ios-locatoutline.d.ts rename to types/react-icons/io/ios-locatoutline.d.ts diff --git a/react-icons/io/ios-locked-outline.d.ts b/types/react-icons/io/ios-locked-outline.d.ts similarity index 100% rename from react-icons/io/ios-locked-outline.d.ts rename to types/react-icons/io/ios-locked-outline.d.ts diff --git a/react-icons/io/ios-locked.d.ts b/types/react-icons/io/ios-locked.d.ts similarity index 100% rename from react-icons/io/ios-locked.d.ts rename to types/react-icons/io/ios-locked.d.ts diff --git a/react-icons/io/ios-loop-strong.d.ts b/types/react-icons/io/ios-loop-strong.d.ts similarity index 100% rename from react-icons/io/ios-loop-strong.d.ts rename to types/react-icons/io/ios-loop-strong.d.ts diff --git a/react-icons/io/ios-loop.d.ts b/types/react-icons/io/ios-loop.d.ts similarity index 100% rename from react-icons/io/ios-loop.d.ts rename to types/react-icons/io/ios-loop.d.ts diff --git a/react-icons/io/ios-medical-outline.d.ts b/types/react-icons/io/ios-medical-outline.d.ts similarity index 100% rename from react-icons/io/ios-medical-outline.d.ts rename to types/react-icons/io/ios-medical-outline.d.ts diff --git a/react-icons/io/ios-medical.d.ts b/types/react-icons/io/ios-medical.d.ts similarity index 100% rename from react-icons/io/ios-medical.d.ts rename to types/react-icons/io/ios-medical.d.ts diff --git a/react-icons/io/ios-medkit-outline.d.ts b/types/react-icons/io/ios-medkit-outline.d.ts similarity index 100% rename from react-icons/io/ios-medkit-outline.d.ts rename to types/react-icons/io/ios-medkit-outline.d.ts diff --git a/react-icons/io/ios-medkit.d.ts b/types/react-icons/io/ios-medkit.d.ts similarity index 100% rename from react-icons/io/ios-medkit.d.ts rename to types/react-icons/io/ios-medkit.d.ts diff --git a/react-icons/io/ios-mic-off.d.ts b/types/react-icons/io/ios-mic-off.d.ts similarity index 100% rename from react-icons/io/ios-mic-off.d.ts rename to types/react-icons/io/ios-mic-off.d.ts diff --git a/react-icons/io/ios-mic-outline.d.ts b/types/react-icons/io/ios-mic-outline.d.ts similarity index 100% rename from react-icons/io/ios-mic-outline.d.ts rename to types/react-icons/io/ios-mic-outline.d.ts diff --git a/react-icons/io/ios-mic.d.ts b/types/react-icons/io/ios-mic.d.ts similarity index 100% rename from react-icons/io/ios-mic.d.ts rename to types/react-icons/io/ios-mic.d.ts diff --git a/react-icons/io/ios-minus-empty.d.ts b/types/react-icons/io/ios-minus-empty.d.ts similarity index 100% rename from react-icons/io/ios-minus-empty.d.ts rename to types/react-icons/io/ios-minus-empty.d.ts diff --git a/react-icons/io/ios-minus-outline.d.ts b/types/react-icons/io/ios-minus-outline.d.ts similarity index 100% rename from react-icons/io/ios-minus-outline.d.ts rename to types/react-icons/io/ios-minus-outline.d.ts diff --git a/react-icons/io/ios-minus.d.ts b/types/react-icons/io/ios-minus.d.ts similarity index 100% rename from react-icons/io/ios-minus.d.ts rename to types/react-icons/io/ios-minus.d.ts diff --git a/react-icons/io/ios-monitor-outline.d.ts b/types/react-icons/io/ios-monitor-outline.d.ts similarity index 100% rename from react-icons/io/ios-monitor-outline.d.ts rename to types/react-icons/io/ios-monitor-outline.d.ts diff --git a/react-icons/io/ios-monitor.d.ts b/types/react-icons/io/ios-monitor.d.ts similarity index 100% rename from react-icons/io/ios-monitor.d.ts rename to types/react-icons/io/ios-monitor.d.ts diff --git a/react-icons/io/ios-moon-outline.d.ts b/types/react-icons/io/ios-moon-outline.d.ts similarity index 100% rename from react-icons/io/ios-moon-outline.d.ts rename to types/react-icons/io/ios-moon-outline.d.ts diff --git a/react-icons/io/ios-moon.d.ts b/types/react-icons/io/ios-moon.d.ts similarity index 100% rename from react-icons/io/ios-moon.d.ts rename to types/react-icons/io/ios-moon.d.ts diff --git a/react-icons/io/ios-more-outline.d.ts b/types/react-icons/io/ios-more-outline.d.ts similarity index 100% rename from react-icons/io/ios-more-outline.d.ts rename to types/react-icons/io/ios-more-outline.d.ts diff --git a/react-icons/io/ios-more.d.ts b/types/react-icons/io/ios-more.d.ts similarity index 100% rename from react-icons/io/ios-more.d.ts rename to types/react-icons/io/ios-more.d.ts diff --git a/react-icons/io/ios-musical-note.d.ts b/types/react-icons/io/ios-musical-note.d.ts similarity index 100% rename from react-icons/io/ios-musical-note.d.ts rename to types/react-icons/io/ios-musical-note.d.ts diff --git a/react-icons/io/ios-musical-notes.d.ts b/types/react-icons/io/ios-musical-notes.d.ts similarity index 100% rename from react-icons/io/ios-musical-notes.d.ts rename to types/react-icons/io/ios-musical-notes.d.ts diff --git a/react-icons/io/ios-navigate-outline.d.ts b/types/react-icons/io/ios-navigate-outline.d.ts similarity index 100% rename from react-icons/io/ios-navigate-outline.d.ts rename to types/react-icons/io/ios-navigate-outline.d.ts diff --git a/react-icons/io/ios-navigate.d.ts b/types/react-icons/io/ios-navigate.d.ts similarity index 100% rename from react-icons/io/ios-navigate.d.ts rename to types/react-icons/io/ios-navigate.d.ts diff --git a/react-icons/io/ios-nutrition.d.ts b/types/react-icons/io/ios-nutrition.d.ts similarity index 100% rename from react-icons/io/ios-nutrition.d.ts rename to types/react-icons/io/ios-nutrition.d.ts diff --git a/react-icons/io/ios-nutritoutline.d.ts b/types/react-icons/io/ios-nutritoutline.d.ts similarity index 100% rename from react-icons/io/ios-nutritoutline.d.ts rename to types/react-icons/io/ios-nutritoutline.d.ts diff --git a/react-icons/io/ios-paper-outline.d.ts b/types/react-icons/io/ios-paper-outline.d.ts similarity index 100% rename from react-icons/io/ios-paper-outline.d.ts rename to types/react-icons/io/ios-paper-outline.d.ts diff --git a/react-icons/io/ios-paper.d.ts b/types/react-icons/io/ios-paper.d.ts similarity index 100% rename from react-icons/io/ios-paper.d.ts rename to types/react-icons/io/ios-paper.d.ts diff --git a/react-icons/io/ios-paperplane-outline.d.ts b/types/react-icons/io/ios-paperplane-outline.d.ts similarity index 100% rename from react-icons/io/ios-paperplane-outline.d.ts rename to types/react-icons/io/ios-paperplane-outline.d.ts diff --git a/react-icons/io/ios-paperplane.d.ts b/types/react-icons/io/ios-paperplane.d.ts similarity index 100% rename from react-icons/io/ios-paperplane.d.ts rename to types/react-icons/io/ios-paperplane.d.ts diff --git a/react-icons/io/ios-partlysunny-outline.d.ts b/types/react-icons/io/ios-partlysunny-outline.d.ts similarity index 100% rename from react-icons/io/ios-partlysunny-outline.d.ts rename to types/react-icons/io/ios-partlysunny-outline.d.ts diff --git a/react-icons/io/ios-partlysunny.d.ts b/types/react-icons/io/ios-partlysunny.d.ts similarity index 100% rename from react-icons/io/ios-partlysunny.d.ts rename to types/react-icons/io/ios-partlysunny.d.ts diff --git a/react-icons/io/ios-pause-outline.d.ts b/types/react-icons/io/ios-pause-outline.d.ts similarity index 100% rename from react-icons/io/ios-pause-outline.d.ts rename to types/react-icons/io/ios-pause-outline.d.ts diff --git a/react-icons/io/ios-pause.d.ts b/types/react-icons/io/ios-pause.d.ts similarity index 100% rename from react-icons/io/ios-pause.d.ts rename to types/react-icons/io/ios-pause.d.ts diff --git a/react-icons/io/ios-paw-outline.d.ts b/types/react-icons/io/ios-paw-outline.d.ts similarity index 100% rename from react-icons/io/ios-paw-outline.d.ts rename to types/react-icons/io/ios-paw-outline.d.ts diff --git a/react-icons/io/ios-paw.d.ts b/types/react-icons/io/ios-paw.d.ts similarity index 100% rename from react-icons/io/ios-paw.d.ts rename to types/react-icons/io/ios-paw.d.ts diff --git a/react-icons/io/ios-people-outline.d.ts b/types/react-icons/io/ios-people-outline.d.ts similarity index 100% rename from react-icons/io/ios-people-outline.d.ts rename to types/react-icons/io/ios-people-outline.d.ts diff --git a/react-icons/io/ios-people.d.ts b/types/react-icons/io/ios-people.d.ts similarity index 100% rename from react-icons/io/ios-people.d.ts rename to types/react-icons/io/ios-people.d.ts diff --git a/react-icons/io/ios-person-outline.d.ts b/types/react-icons/io/ios-person-outline.d.ts similarity index 100% rename from react-icons/io/ios-person-outline.d.ts rename to types/react-icons/io/ios-person-outline.d.ts diff --git a/react-icons/io/ios-person.d.ts b/types/react-icons/io/ios-person.d.ts similarity index 100% rename from react-icons/io/ios-person.d.ts rename to types/react-icons/io/ios-person.d.ts diff --git a/react-icons/io/ios-personadd-outline.d.ts b/types/react-icons/io/ios-personadd-outline.d.ts similarity index 100% rename from react-icons/io/ios-personadd-outline.d.ts rename to types/react-icons/io/ios-personadd-outline.d.ts diff --git a/react-icons/io/ios-personadd.d.ts b/types/react-icons/io/ios-personadd.d.ts similarity index 100% rename from react-icons/io/ios-personadd.d.ts rename to types/react-icons/io/ios-personadd.d.ts diff --git a/react-icons/io/ios-photos-outline.d.ts b/types/react-icons/io/ios-photos-outline.d.ts similarity index 100% rename from react-icons/io/ios-photos-outline.d.ts rename to types/react-icons/io/ios-photos-outline.d.ts diff --git a/react-icons/io/ios-photos.d.ts b/types/react-icons/io/ios-photos.d.ts similarity index 100% rename from react-icons/io/ios-photos.d.ts rename to types/react-icons/io/ios-photos.d.ts diff --git a/react-icons/io/ios-pie-outline.d.ts b/types/react-icons/io/ios-pie-outline.d.ts similarity index 100% rename from react-icons/io/ios-pie-outline.d.ts rename to types/react-icons/io/ios-pie-outline.d.ts diff --git a/react-icons/io/ios-pie.d.ts b/types/react-icons/io/ios-pie.d.ts similarity index 100% rename from react-icons/io/ios-pie.d.ts rename to types/react-icons/io/ios-pie.d.ts diff --git a/react-icons/io/ios-pint-outline.d.ts b/types/react-icons/io/ios-pint-outline.d.ts similarity index 100% rename from react-icons/io/ios-pint-outline.d.ts rename to types/react-icons/io/ios-pint-outline.d.ts diff --git a/react-icons/io/ios-pint.d.ts b/types/react-icons/io/ios-pint.d.ts similarity index 100% rename from react-icons/io/ios-pint.d.ts rename to types/react-icons/io/ios-pint.d.ts diff --git a/react-icons/io/ios-play-outline.d.ts b/types/react-icons/io/ios-play-outline.d.ts similarity index 100% rename from react-icons/io/ios-play-outline.d.ts rename to types/react-icons/io/ios-play-outline.d.ts diff --git a/react-icons/io/ios-play.d.ts b/types/react-icons/io/ios-play.d.ts similarity index 100% rename from react-icons/io/ios-play.d.ts rename to types/react-icons/io/ios-play.d.ts diff --git a/react-icons/io/ios-plus-empty.d.ts b/types/react-icons/io/ios-plus-empty.d.ts similarity index 100% rename from react-icons/io/ios-plus-empty.d.ts rename to types/react-icons/io/ios-plus-empty.d.ts diff --git a/react-icons/io/ios-plus-outline.d.ts b/types/react-icons/io/ios-plus-outline.d.ts similarity index 100% rename from react-icons/io/ios-plus-outline.d.ts rename to types/react-icons/io/ios-plus-outline.d.ts diff --git a/react-icons/io/ios-plus.d.ts b/types/react-icons/io/ios-plus.d.ts similarity index 100% rename from react-icons/io/ios-plus.d.ts rename to types/react-icons/io/ios-plus.d.ts diff --git a/react-icons/io/ios-pricetag-outline.d.ts b/types/react-icons/io/ios-pricetag-outline.d.ts similarity index 100% rename from react-icons/io/ios-pricetag-outline.d.ts rename to types/react-icons/io/ios-pricetag-outline.d.ts diff --git a/react-icons/io/ios-pricetag.d.ts b/types/react-icons/io/ios-pricetag.d.ts similarity index 100% rename from react-icons/io/ios-pricetag.d.ts rename to types/react-icons/io/ios-pricetag.d.ts diff --git a/react-icons/io/ios-pricetags-outline.d.ts b/types/react-icons/io/ios-pricetags-outline.d.ts similarity index 100% rename from react-icons/io/ios-pricetags-outline.d.ts rename to types/react-icons/io/ios-pricetags-outline.d.ts diff --git a/react-icons/io/ios-pricetags.d.ts b/types/react-icons/io/ios-pricetags.d.ts similarity index 100% rename from react-icons/io/ios-pricetags.d.ts rename to types/react-icons/io/ios-pricetags.d.ts diff --git a/react-icons/io/ios-printer-outline.d.ts b/types/react-icons/io/ios-printer-outline.d.ts similarity index 100% rename from react-icons/io/ios-printer-outline.d.ts rename to types/react-icons/io/ios-printer-outline.d.ts diff --git a/react-icons/io/ios-printer.d.ts b/types/react-icons/io/ios-printer.d.ts similarity index 100% rename from react-icons/io/ios-printer.d.ts rename to types/react-icons/io/ios-printer.d.ts diff --git a/react-icons/io/ios-pulse-strong.d.ts b/types/react-icons/io/ios-pulse-strong.d.ts similarity index 100% rename from react-icons/io/ios-pulse-strong.d.ts rename to types/react-icons/io/ios-pulse-strong.d.ts diff --git a/react-icons/io/ios-pulse.d.ts b/types/react-icons/io/ios-pulse.d.ts similarity index 100% rename from react-icons/io/ios-pulse.d.ts rename to types/react-icons/io/ios-pulse.d.ts diff --git a/react-icons/io/ios-rainy-outline.d.ts b/types/react-icons/io/ios-rainy-outline.d.ts similarity index 100% rename from react-icons/io/ios-rainy-outline.d.ts rename to types/react-icons/io/ios-rainy-outline.d.ts diff --git a/react-icons/io/ios-rainy.d.ts b/types/react-icons/io/ios-rainy.d.ts similarity index 100% rename from react-icons/io/ios-rainy.d.ts rename to types/react-icons/io/ios-rainy.d.ts diff --git a/react-icons/io/ios-recording-outline.d.ts b/types/react-icons/io/ios-recording-outline.d.ts similarity index 100% rename from react-icons/io/ios-recording-outline.d.ts rename to types/react-icons/io/ios-recording-outline.d.ts diff --git a/react-icons/io/ios-recording.d.ts b/types/react-icons/io/ios-recording.d.ts similarity index 100% rename from react-icons/io/ios-recording.d.ts rename to types/react-icons/io/ios-recording.d.ts diff --git a/react-icons/io/ios-redo-outline.d.ts b/types/react-icons/io/ios-redo-outline.d.ts similarity index 100% rename from react-icons/io/ios-redo-outline.d.ts rename to types/react-icons/io/ios-redo-outline.d.ts diff --git a/react-icons/io/ios-redo.d.ts b/types/react-icons/io/ios-redo.d.ts similarity index 100% rename from react-icons/io/ios-redo.d.ts rename to types/react-icons/io/ios-redo.d.ts diff --git a/react-icons/io/ios-refresh-empty.d.ts b/types/react-icons/io/ios-refresh-empty.d.ts similarity index 100% rename from react-icons/io/ios-refresh-empty.d.ts rename to types/react-icons/io/ios-refresh-empty.d.ts diff --git a/react-icons/io/ios-refresh-outline.d.ts b/types/react-icons/io/ios-refresh-outline.d.ts similarity index 100% rename from react-icons/io/ios-refresh-outline.d.ts rename to types/react-icons/io/ios-refresh-outline.d.ts diff --git a/react-icons/io/ios-refresh.d.ts b/types/react-icons/io/ios-refresh.d.ts similarity index 100% rename from react-icons/io/ios-refresh.d.ts rename to types/react-icons/io/ios-refresh.d.ts diff --git a/react-icons/io/ios-reload.d.ts b/types/react-icons/io/ios-reload.d.ts similarity index 100% rename from react-icons/io/ios-reload.d.ts rename to types/react-icons/io/ios-reload.d.ts diff --git a/react-icons/io/ios-reverse-camera-outline.d.ts b/types/react-icons/io/ios-reverse-camera-outline.d.ts similarity index 100% rename from react-icons/io/ios-reverse-camera-outline.d.ts rename to types/react-icons/io/ios-reverse-camera-outline.d.ts diff --git a/react-icons/io/ios-reverse-camera.d.ts b/types/react-icons/io/ios-reverse-camera.d.ts similarity index 100% rename from react-icons/io/ios-reverse-camera.d.ts rename to types/react-icons/io/ios-reverse-camera.d.ts diff --git a/react-icons/io/ios-rewind-outline.d.ts b/types/react-icons/io/ios-rewind-outline.d.ts similarity index 100% rename from react-icons/io/ios-rewind-outline.d.ts rename to types/react-icons/io/ios-rewind-outline.d.ts diff --git a/react-icons/io/ios-rewind.d.ts b/types/react-icons/io/ios-rewind.d.ts similarity index 100% rename from react-icons/io/ios-rewind.d.ts rename to types/react-icons/io/ios-rewind.d.ts diff --git a/react-icons/io/ios-rose-outline.d.ts b/types/react-icons/io/ios-rose-outline.d.ts similarity index 100% rename from react-icons/io/ios-rose-outline.d.ts rename to types/react-icons/io/ios-rose-outline.d.ts diff --git a/react-icons/io/ios-rose.d.ts b/types/react-icons/io/ios-rose.d.ts similarity index 100% rename from react-icons/io/ios-rose.d.ts rename to types/react-icons/io/ios-rose.d.ts diff --git a/react-icons/io/ios-search-strong.d.ts b/types/react-icons/io/ios-search-strong.d.ts similarity index 100% rename from react-icons/io/ios-search-strong.d.ts rename to types/react-icons/io/ios-search-strong.d.ts diff --git a/react-icons/io/ios-search.d.ts b/types/react-icons/io/ios-search.d.ts similarity index 100% rename from react-icons/io/ios-search.d.ts rename to types/react-icons/io/ios-search.d.ts diff --git a/react-icons/io/ios-settings-strong.d.ts b/types/react-icons/io/ios-settings-strong.d.ts similarity index 100% rename from react-icons/io/ios-settings-strong.d.ts rename to types/react-icons/io/ios-settings-strong.d.ts diff --git a/react-icons/io/ios-settings.d.ts b/types/react-icons/io/ios-settings.d.ts similarity index 100% rename from react-icons/io/ios-settings.d.ts rename to types/react-icons/io/ios-settings.d.ts diff --git a/react-icons/io/ios-shuffle-strong.d.ts b/types/react-icons/io/ios-shuffle-strong.d.ts similarity index 100% rename from react-icons/io/ios-shuffle-strong.d.ts rename to types/react-icons/io/ios-shuffle-strong.d.ts diff --git a/react-icons/io/ios-shuffle.d.ts b/types/react-icons/io/ios-shuffle.d.ts similarity index 100% rename from react-icons/io/ios-shuffle.d.ts rename to types/react-icons/io/ios-shuffle.d.ts diff --git a/react-icons/io/ios-skipbackward-outline.d.ts b/types/react-icons/io/ios-skipbackward-outline.d.ts similarity index 100% rename from react-icons/io/ios-skipbackward-outline.d.ts rename to types/react-icons/io/ios-skipbackward-outline.d.ts diff --git a/react-icons/io/ios-skipbackward.d.ts b/types/react-icons/io/ios-skipbackward.d.ts similarity index 100% rename from react-icons/io/ios-skipbackward.d.ts rename to types/react-icons/io/ios-skipbackward.d.ts diff --git a/react-icons/io/ios-skipforward-outline.d.ts b/types/react-icons/io/ios-skipforward-outline.d.ts similarity index 100% rename from react-icons/io/ios-skipforward-outline.d.ts rename to types/react-icons/io/ios-skipforward-outline.d.ts diff --git a/react-icons/io/ios-skipforward.d.ts b/types/react-icons/io/ios-skipforward.d.ts similarity index 100% rename from react-icons/io/ios-skipforward.d.ts rename to types/react-icons/io/ios-skipforward.d.ts diff --git a/react-icons/io/ios-snowy.d.ts b/types/react-icons/io/ios-snowy.d.ts similarity index 100% rename from react-icons/io/ios-snowy.d.ts rename to types/react-icons/io/ios-snowy.d.ts diff --git a/react-icons/io/ios-speedometer-outline.d.ts b/types/react-icons/io/ios-speedometer-outline.d.ts similarity index 100% rename from react-icons/io/ios-speedometer-outline.d.ts rename to types/react-icons/io/ios-speedometer-outline.d.ts diff --git a/react-icons/io/ios-speedometer.d.ts b/types/react-icons/io/ios-speedometer.d.ts similarity index 100% rename from react-icons/io/ios-speedometer.d.ts rename to types/react-icons/io/ios-speedometer.d.ts diff --git a/react-icons/io/ios-star-half.d.ts b/types/react-icons/io/ios-star-half.d.ts similarity index 100% rename from react-icons/io/ios-star-half.d.ts rename to types/react-icons/io/ios-star-half.d.ts diff --git a/react-icons/io/ios-star-outline.d.ts b/types/react-icons/io/ios-star-outline.d.ts similarity index 100% rename from react-icons/io/ios-star-outline.d.ts rename to types/react-icons/io/ios-star-outline.d.ts diff --git a/react-icons/io/ios-star.d.ts b/types/react-icons/io/ios-star.d.ts similarity index 100% rename from react-icons/io/ios-star.d.ts rename to types/react-icons/io/ios-star.d.ts diff --git a/react-icons/io/ios-stopwatch-outline.d.ts b/types/react-icons/io/ios-stopwatch-outline.d.ts similarity index 100% rename from react-icons/io/ios-stopwatch-outline.d.ts rename to types/react-icons/io/ios-stopwatch-outline.d.ts diff --git a/react-icons/io/ios-stopwatch.d.ts b/types/react-icons/io/ios-stopwatch.d.ts similarity index 100% rename from react-icons/io/ios-stopwatch.d.ts rename to types/react-icons/io/ios-stopwatch.d.ts diff --git a/react-icons/io/ios-sunny-outline.d.ts b/types/react-icons/io/ios-sunny-outline.d.ts similarity index 100% rename from react-icons/io/ios-sunny-outline.d.ts rename to types/react-icons/io/ios-sunny-outline.d.ts diff --git a/react-icons/io/ios-sunny.d.ts b/types/react-icons/io/ios-sunny.d.ts similarity index 100% rename from react-icons/io/ios-sunny.d.ts rename to types/react-icons/io/ios-sunny.d.ts diff --git a/react-icons/io/ios-telephone-outline.d.ts b/types/react-icons/io/ios-telephone-outline.d.ts similarity index 100% rename from react-icons/io/ios-telephone-outline.d.ts rename to types/react-icons/io/ios-telephone-outline.d.ts diff --git a/react-icons/io/ios-telephone.d.ts b/types/react-icons/io/ios-telephone.d.ts similarity index 100% rename from react-icons/io/ios-telephone.d.ts rename to types/react-icons/io/ios-telephone.d.ts diff --git a/react-icons/io/ios-tennisball-outline.d.ts b/types/react-icons/io/ios-tennisball-outline.d.ts similarity index 100% rename from react-icons/io/ios-tennisball-outline.d.ts rename to types/react-icons/io/ios-tennisball-outline.d.ts diff --git a/react-icons/io/ios-tennisball.d.ts b/types/react-icons/io/ios-tennisball.d.ts similarity index 100% rename from react-icons/io/ios-tennisball.d.ts rename to types/react-icons/io/ios-tennisball.d.ts diff --git a/react-icons/io/ios-thunderstorm-outline.d.ts b/types/react-icons/io/ios-thunderstorm-outline.d.ts similarity index 100% rename from react-icons/io/ios-thunderstorm-outline.d.ts rename to types/react-icons/io/ios-thunderstorm-outline.d.ts diff --git a/react-icons/io/ios-thunderstorm.d.ts b/types/react-icons/io/ios-thunderstorm.d.ts similarity index 100% rename from react-icons/io/ios-thunderstorm.d.ts rename to types/react-icons/io/ios-thunderstorm.d.ts diff --git a/react-icons/io/ios-time-outline.d.ts b/types/react-icons/io/ios-time-outline.d.ts similarity index 100% rename from react-icons/io/ios-time-outline.d.ts rename to types/react-icons/io/ios-time-outline.d.ts diff --git a/react-icons/io/ios-time.d.ts b/types/react-icons/io/ios-time.d.ts similarity index 100% rename from react-icons/io/ios-time.d.ts rename to types/react-icons/io/ios-time.d.ts diff --git a/react-icons/io/ios-timer-outline.d.ts b/types/react-icons/io/ios-timer-outline.d.ts similarity index 100% rename from react-icons/io/ios-timer-outline.d.ts rename to types/react-icons/io/ios-timer-outline.d.ts diff --git a/react-icons/io/ios-timer.d.ts b/types/react-icons/io/ios-timer.d.ts similarity index 100% rename from react-icons/io/ios-timer.d.ts rename to types/react-icons/io/ios-timer.d.ts diff --git a/react-icons/io/ios-toggle-outline.d.ts b/types/react-icons/io/ios-toggle-outline.d.ts similarity index 100% rename from react-icons/io/ios-toggle-outline.d.ts rename to types/react-icons/io/ios-toggle-outline.d.ts diff --git a/react-icons/io/ios-toggle.d.ts b/types/react-icons/io/ios-toggle.d.ts similarity index 100% rename from react-icons/io/ios-toggle.d.ts rename to types/react-icons/io/ios-toggle.d.ts diff --git a/react-icons/io/ios-trash-outline.d.ts b/types/react-icons/io/ios-trash-outline.d.ts similarity index 100% rename from react-icons/io/ios-trash-outline.d.ts rename to types/react-icons/io/ios-trash-outline.d.ts diff --git a/react-icons/io/ios-trash.d.ts b/types/react-icons/io/ios-trash.d.ts similarity index 100% rename from react-icons/io/ios-trash.d.ts rename to types/react-icons/io/ios-trash.d.ts diff --git a/react-icons/io/ios-undo-outline.d.ts b/types/react-icons/io/ios-undo-outline.d.ts similarity index 100% rename from react-icons/io/ios-undo-outline.d.ts rename to types/react-icons/io/ios-undo-outline.d.ts diff --git a/react-icons/io/ios-undo.d.ts b/types/react-icons/io/ios-undo.d.ts similarity index 100% rename from react-icons/io/ios-undo.d.ts rename to types/react-icons/io/ios-undo.d.ts diff --git a/react-icons/io/ios-unlocked-outline.d.ts b/types/react-icons/io/ios-unlocked-outline.d.ts similarity index 100% rename from react-icons/io/ios-unlocked-outline.d.ts rename to types/react-icons/io/ios-unlocked-outline.d.ts diff --git a/react-icons/io/ios-unlocked.d.ts b/types/react-icons/io/ios-unlocked.d.ts similarity index 100% rename from react-icons/io/ios-unlocked.d.ts rename to types/react-icons/io/ios-unlocked.d.ts diff --git a/react-icons/io/ios-upload-outline.d.ts b/types/react-icons/io/ios-upload-outline.d.ts similarity index 100% rename from react-icons/io/ios-upload-outline.d.ts rename to types/react-icons/io/ios-upload-outline.d.ts diff --git a/react-icons/io/ios-upload.d.ts b/types/react-icons/io/ios-upload.d.ts similarity index 100% rename from react-icons/io/ios-upload.d.ts rename to types/react-icons/io/ios-upload.d.ts diff --git a/react-icons/io/ios-videocam-outline.d.ts b/types/react-icons/io/ios-videocam-outline.d.ts similarity index 100% rename from react-icons/io/ios-videocam-outline.d.ts rename to types/react-icons/io/ios-videocam-outline.d.ts diff --git a/react-icons/io/ios-videocam.d.ts b/types/react-icons/io/ios-videocam.d.ts similarity index 100% rename from react-icons/io/ios-videocam.d.ts rename to types/react-icons/io/ios-videocam.d.ts diff --git a/react-icons/io/ios-volume-high.d.ts b/types/react-icons/io/ios-volume-high.d.ts similarity index 100% rename from react-icons/io/ios-volume-high.d.ts rename to types/react-icons/io/ios-volume-high.d.ts diff --git a/react-icons/io/ios-volume-low.d.ts b/types/react-icons/io/ios-volume-low.d.ts similarity index 100% rename from react-icons/io/ios-volume-low.d.ts rename to types/react-icons/io/ios-volume-low.d.ts diff --git a/react-icons/io/ios-wineglass-outline.d.ts b/types/react-icons/io/ios-wineglass-outline.d.ts similarity index 100% rename from react-icons/io/ios-wineglass-outline.d.ts rename to types/react-icons/io/ios-wineglass-outline.d.ts diff --git a/react-icons/io/ios-wineglass.d.ts b/types/react-icons/io/ios-wineglass.d.ts similarity index 100% rename from react-icons/io/ios-wineglass.d.ts rename to types/react-icons/io/ios-wineglass.d.ts diff --git a/react-icons/io/ios-world-outline.d.ts b/types/react-icons/io/ios-world-outline.d.ts similarity index 100% rename from react-icons/io/ios-world-outline.d.ts rename to types/react-icons/io/ios-world-outline.d.ts diff --git a/react-icons/io/ios-world.d.ts b/types/react-icons/io/ios-world.d.ts similarity index 100% rename from react-icons/io/ios-world.d.ts rename to types/react-icons/io/ios-world.d.ts diff --git a/react-icons/io/ipad.d.ts b/types/react-icons/io/ipad.d.ts similarity index 100% rename from react-icons/io/ipad.d.ts rename to types/react-icons/io/ipad.d.ts diff --git a/react-icons/io/iphone.d.ts b/types/react-icons/io/iphone.d.ts similarity index 100% rename from react-icons/io/iphone.d.ts rename to types/react-icons/io/iphone.d.ts diff --git a/react-icons/io/ipod.d.ts b/types/react-icons/io/ipod.d.ts similarity index 100% rename from react-icons/io/ipod.d.ts rename to types/react-icons/io/ipod.d.ts diff --git a/react-icons/io/jet.d.ts b/types/react-icons/io/jet.d.ts similarity index 100% rename from react-icons/io/jet.d.ts rename to types/react-icons/io/jet.d.ts diff --git a/react-icons/io/key.d.ts b/types/react-icons/io/key.d.ts similarity index 100% rename from react-icons/io/key.d.ts rename to types/react-icons/io/key.d.ts diff --git a/react-icons/io/knife.d.ts b/types/react-icons/io/knife.d.ts similarity index 100% rename from react-icons/io/knife.d.ts rename to types/react-icons/io/knife.d.ts diff --git a/react-icons/io/laptop.d.ts b/types/react-icons/io/laptop.d.ts similarity index 100% rename from react-icons/io/laptop.d.ts rename to types/react-icons/io/laptop.d.ts diff --git a/react-icons/io/leaf.d.ts b/types/react-icons/io/leaf.d.ts similarity index 100% rename from react-icons/io/leaf.d.ts rename to types/react-icons/io/leaf.d.ts diff --git a/react-icons/io/levels.d.ts b/types/react-icons/io/levels.d.ts similarity index 100% rename from react-icons/io/levels.d.ts rename to types/react-icons/io/levels.d.ts diff --git a/react-icons/io/lightbulb.d.ts b/types/react-icons/io/lightbulb.d.ts similarity index 100% rename from react-icons/io/lightbulb.d.ts rename to types/react-icons/io/lightbulb.d.ts diff --git a/react-icons/io/link.d.ts b/types/react-icons/io/link.d.ts similarity index 100% rename from react-icons/io/link.d.ts rename to types/react-icons/io/link.d.ts diff --git a/react-icons/io/load-a.d.ts b/types/react-icons/io/load-a.d.ts similarity index 100% rename from react-icons/io/load-a.d.ts rename to types/react-icons/io/load-a.d.ts diff --git a/react-icons/io/load-b.d.ts b/types/react-icons/io/load-b.d.ts similarity index 100% rename from react-icons/io/load-b.d.ts rename to types/react-icons/io/load-b.d.ts diff --git a/react-icons/io/load-c.d.ts b/types/react-icons/io/load-c.d.ts similarity index 100% rename from react-icons/io/load-c.d.ts rename to types/react-icons/io/load-c.d.ts diff --git a/react-icons/io/load-d.d.ts b/types/react-icons/io/load-d.d.ts similarity index 100% rename from react-icons/io/load-d.d.ts rename to types/react-icons/io/load-d.d.ts diff --git a/react-icons/io/location.d.ts b/types/react-icons/io/location.d.ts similarity index 100% rename from react-icons/io/location.d.ts rename to types/react-icons/io/location.d.ts diff --git a/react-icons/io/lock-combination.d.ts b/types/react-icons/io/lock-combination.d.ts similarity index 100% rename from react-icons/io/lock-combination.d.ts rename to types/react-icons/io/lock-combination.d.ts diff --git a/react-icons/io/locked.d.ts b/types/react-icons/io/locked.d.ts similarity index 100% rename from react-icons/io/locked.d.ts rename to types/react-icons/io/locked.d.ts diff --git a/react-icons/io/log-in.d.ts b/types/react-icons/io/log-in.d.ts similarity index 100% rename from react-icons/io/log-in.d.ts rename to types/react-icons/io/log-in.d.ts diff --git a/react-icons/io/log-out.d.ts b/types/react-icons/io/log-out.d.ts similarity index 100% rename from react-icons/io/log-out.d.ts rename to types/react-icons/io/log-out.d.ts diff --git a/react-icons/io/loop.d.ts b/types/react-icons/io/loop.d.ts similarity index 100% rename from react-icons/io/loop.d.ts rename to types/react-icons/io/loop.d.ts diff --git a/react-icons/io/magnet.d.ts b/types/react-icons/io/magnet.d.ts similarity index 100% rename from react-icons/io/magnet.d.ts rename to types/react-icons/io/magnet.d.ts diff --git a/react-icons/io/male.d.ts b/types/react-icons/io/male.d.ts similarity index 100% rename from react-icons/io/male.d.ts rename to types/react-icons/io/male.d.ts diff --git a/react-icons/io/man.d.ts b/types/react-icons/io/man.d.ts similarity index 100% rename from react-icons/io/man.d.ts rename to types/react-icons/io/man.d.ts diff --git a/react-icons/io/map.d.ts b/types/react-icons/io/map.d.ts similarity index 100% rename from react-icons/io/map.d.ts rename to types/react-icons/io/map.d.ts diff --git a/react-icons/io/medkit.d.ts b/types/react-icons/io/medkit.d.ts similarity index 100% rename from react-icons/io/medkit.d.ts rename to types/react-icons/io/medkit.d.ts diff --git a/react-icons/io/merge.d.ts b/types/react-icons/io/merge.d.ts similarity index 100% rename from react-icons/io/merge.d.ts rename to types/react-icons/io/merge.d.ts diff --git a/react-icons/io/mic-a.d.ts b/types/react-icons/io/mic-a.d.ts similarity index 100% rename from react-icons/io/mic-a.d.ts rename to types/react-icons/io/mic-a.d.ts diff --git a/react-icons/io/mic-b.d.ts b/types/react-icons/io/mic-b.d.ts similarity index 100% rename from react-icons/io/mic-b.d.ts rename to types/react-icons/io/mic-b.d.ts diff --git a/react-icons/io/mic-c.d.ts b/types/react-icons/io/mic-c.d.ts similarity index 100% rename from react-icons/io/mic-c.d.ts rename to types/react-icons/io/mic-c.d.ts diff --git a/react-icons/io/minus-circled.d.ts b/types/react-icons/io/minus-circled.d.ts similarity index 100% rename from react-icons/io/minus-circled.d.ts rename to types/react-icons/io/minus-circled.d.ts diff --git a/react-icons/io/minus-round.d.ts b/types/react-icons/io/minus-round.d.ts similarity index 100% rename from react-icons/io/minus-round.d.ts rename to types/react-icons/io/minus-round.d.ts diff --git a/react-icons/io/minus.d.ts b/types/react-icons/io/minus.d.ts similarity index 100% rename from react-icons/io/minus.d.ts rename to types/react-icons/io/minus.d.ts diff --git a/react-icons/io/model-s.d.ts b/types/react-icons/io/model-s.d.ts similarity index 100% rename from react-icons/io/model-s.d.ts rename to types/react-icons/io/model-s.d.ts diff --git a/react-icons/io/monitor.d.ts b/types/react-icons/io/monitor.d.ts similarity index 100% rename from react-icons/io/monitor.d.ts rename to types/react-icons/io/monitor.d.ts diff --git a/react-icons/io/more.d.ts b/types/react-icons/io/more.d.ts similarity index 100% rename from react-icons/io/more.d.ts rename to types/react-icons/io/more.d.ts diff --git a/react-icons/io/mouse.d.ts b/types/react-icons/io/mouse.d.ts similarity index 100% rename from react-icons/io/mouse.d.ts rename to types/react-icons/io/mouse.d.ts diff --git a/react-icons/io/music-note.d.ts b/types/react-icons/io/music-note.d.ts similarity index 100% rename from react-icons/io/music-note.d.ts rename to types/react-icons/io/music-note.d.ts diff --git a/react-icons/io/navicon-round.d.ts b/types/react-icons/io/navicon-round.d.ts similarity index 100% rename from react-icons/io/navicon-round.d.ts rename to types/react-icons/io/navicon-round.d.ts diff --git a/react-icons/io/navicon.d.ts b/types/react-icons/io/navicon.d.ts similarity index 100% rename from react-icons/io/navicon.d.ts rename to types/react-icons/io/navicon.d.ts diff --git a/react-icons/io/navigate.d.ts b/types/react-icons/io/navigate.d.ts similarity index 100% rename from react-icons/io/navigate.d.ts rename to types/react-icons/io/navigate.d.ts diff --git a/react-icons/io/network.d.ts b/types/react-icons/io/network.d.ts similarity index 100% rename from react-icons/io/network.d.ts rename to types/react-icons/io/network.d.ts diff --git a/react-icons/io/no-smoking.d.ts b/types/react-icons/io/no-smoking.d.ts similarity index 100% rename from react-icons/io/no-smoking.d.ts rename to types/react-icons/io/no-smoking.d.ts diff --git a/react-icons/io/nuclear.d.ts b/types/react-icons/io/nuclear.d.ts similarity index 100% rename from react-icons/io/nuclear.d.ts rename to types/react-icons/io/nuclear.d.ts diff --git a/react-icons/io/outlet.d.ts b/types/react-icons/io/outlet.d.ts similarity index 100% rename from react-icons/io/outlet.d.ts rename to types/react-icons/io/outlet.d.ts diff --git a/react-icons/io/paintbrush.d.ts b/types/react-icons/io/paintbrush.d.ts similarity index 100% rename from react-icons/io/paintbrush.d.ts rename to types/react-icons/io/paintbrush.d.ts diff --git a/react-icons/io/paintbucket.d.ts b/types/react-icons/io/paintbucket.d.ts similarity index 100% rename from react-icons/io/paintbucket.d.ts rename to types/react-icons/io/paintbucket.d.ts diff --git a/react-icons/io/paper-airplane.d.ts b/types/react-icons/io/paper-airplane.d.ts similarity index 100% rename from react-icons/io/paper-airplane.d.ts rename to types/react-icons/io/paper-airplane.d.ts diff --git a/react-icons/io/paperclip.d.ts b/types/react-icons/io/paperclip.d.ts similarity index 100% rename from react-icons/io/paperclip.d.ts rename to types/react-icons/io/paperclip.d.ts diff --git a/react-icons/io/pause.d.ts b/types/react-icons/io/pause.d.ts similarity index 100% rename from react-icons/io/pause.d.ts rename to types/react-icons/io/pause.d.ts diff --git a/react-icons/io/person-add.d.ts b/types/react-icons/io/person-add.d.ts similarity index 100% rename from react-icons/io/person-add.d.ts rename to types/react-icons/io/person-add.d.ts diff --git a/react-icons/io/person-stalker.d.ts b/types/react-icons/io/person-stalker.d.ts similarity index 100% rename from react-icons/io/person-stalker.d.ts rename to types/react-icons/io/person-stalker.d.ts diff --git a/react-icons/io/person.d.ts b/types/react-icons/io/person.d.ts similarity index 100% rename from react-icons/io/person.d.ts rename to types/react-icons/io/person.d.ts diff --git a/react-icons/io/pie-graph.d.ts b/types/react-icons/io/pie-graph.d.ts similarity index 100% rename from react-icons/io/pie-graph.d.ts rename to types/react-icons/io/pie-graph.d.ts diff --git a/react-icons/io/pin.d.ts b/types/react-icons/io/pin.d.ts similarity index 100% rename from react-icons/io/pin.d.ts rename to types/react-icons/io/pin.d.ts diff --git a/react-icons/io/pinpoint.d.ts b/types/react-icons/io/pinpoint.d.ts similarity index 100% rename from react-icons/io/pinpoint.d.ts rename to types/react-icons/io/pinpoint.d.ts diff --git a/react-icons/io/pizza.d.ts b/types/react-icons/io/pizza.d.ts similarity index 100% rename from react-icons/io/pizza.d.ts rename to types/react-icons/io/pizza.d.ts diff --git a/react-icons/io/plane.d.ts b/types/react-icons/io/plane.d.ts similarity index 100% rename from react-icons/io/plane.d.ts rename to types/react-icons/io/plane.d.ts diff --git a/react-icons/io/planet.d.ts b/types/react-icons/io/planet.d.ts similarity index 100% rename from react-icons/io/planet.d.ts rename to types/react-icons/io/planet.d.ts diff --git a/react-icons/io/play.d.ts b/types/react-icons/io/play.d.ts similarity index 100% rename from react-icons/io/play.d.ts rename to types/react-icons/io/play.d.ts diff --git a/react-icons/io/playstation.d.ts b/types/react-icons/io/playstation.d.ts similarity index 100% rename from react-icons/io/playstation.d.ts rename to types/react-icons/io/playstation.d.ts diff --git a/react-icons/io/plus-circled.d.ts b/types/react-icons/io/plus-circled.d.ts similarity index 100% rename from react-icons/io/plus-circled.d.ts rename to types/react-icons/io/plus-circled.d.ts diff --git a/react-icons/io/plus-round.d.ts b/types/react-icons/io/plus-round.d.ts similarity index 100% rename from react-icons/io/plus-round.d.ts rename to types/react-icons/io/plus-round.d.ts diff --git a/react-icons/io/plus.d.ts b/types/react-icons/io/plus.d.ts similarity index 100% rename from react-icons/io/plus.d.ts rename to types/react-icons/io/plus.d.ts diff --git a/react-icons/io/podium.d.ts b/types/react-icons/io/podium.d.ts similarity index 100% rename from react-icons/io/podium.d.ts rename to types/react-icons/io/podium.d.ts diff --git a/react-icons/io/pound.d.ts b/types/react-icons/io/pound.d.ts similarity index 100% rename from react-icons/io/pound.d.ts rename to types/react-icons/io/pound.d.ts diff --git a/react-icons/io/power.d.ts b/types/react-icons/io/power.d.ts similarity index 100% rename from react-icons/io/power.d.ts rename to types/react-icons/io/power.d.ts diff --git a/react-icons/io/pricetag.d.ts b/types/react-icons/io/pricetag.d.ts similarity index 100% rename from react-icons/io/pricetag.d.ts rename to types/react-icons/io/pricetag.d.ts diff --git a/react-icons/io/pricetags.d.ts b/types/react-icons/io/pricetags.d.ts similarity index 100% rename from react-icons/io/pricetags.d.ts rename to types/react-icons/io/pricetags.d.ts diff --git a/react-icons/io/printer.d.ts b/types/react-icons/io/printer.d.ts similarity index 100% rename from react-icons/io/printer.d.ts rename to types/react-icons/io/printer.d.ts diff --git a/react-icons/io/pull-request.d.ts b/types/react-icons/io/pull-request.d.ts similarity index 100% rename from react-icons/io/pull-request.d.ts rename to types/react-icons/io/pull-request.d.ts diff --git a/react-icons/io/qr-scanner.d.ts b/types/react-icons/io/qr-scanner.d.ts similarity index 100% rename from react-icons/io/qr-scanner.d.ts rename to types/react-icons/io/qr-scanner.d.ts diff --git a/react-icons/io/quote.d.ts b/types/react-icons/io/quote.d.ts similarity index 100% rename from react-icons/io/quote.d.ts rename to types/react-icons/io/quote.d.ts diff --git a/react-icons/io/radio-waves.d.ts b/types/react-icons/io/radio-waves.d.ts similarity index 100% rename from react-icons/io/radio-waves.d.ts rename to types/react-icons/io/radio-waves.d.ts diff --git a/react-icons/io/record.d.ts b/types/react-icons/io/record.d.ts similarity index 100% rename from react-icons/io/record.d.ts rename to types/react-icons/io/record.d.ts diff --git a/react-icons/io/refresh.d.ts b/types/react-icons/io/refresh.d.ts similarity index 100% rename from react-icons/io/refresh.d.ts rename to types/react-icons/io/refresh.d.ts diff --git a/react-icons/io/reply-all.d.ts b/types/react-icons/io/reply-all.d.ts similarity index 100% rename from react-icons/io/reply-all.d.ts rename to types/react-icons/io/reply-all.d.ts diff --git a/react-icons/io/reply.d.ts b/types/react-icons/io/reply.d.ts similarity index 100% rename from react-icons/io/reply.d.ts rename to types/react-icons/io/reply.d.ts diff --git a/react-icons/io/ribbon-a.d.ts b/types/react-icons/io/ribbon-a.d.ts similarity index 100% rename from react-icons/io/ribbon-a.d.ts rename to types/react-icons/io/ribbon-a.d.ts diff --git a/react-icons/io/ribbon-b.d.ts b/types/react-icons/io/ribbon-b.d.ts similarity index 100% rename from react-icons/io/ribbon-b.d.ts rename to types/react-icons/io/ribbon-b.d.ts diff --git a/react-icons/io/sad-outline.d.ts b/types/react-icons/io/sad-outline.d.ts similarity index 100% rename from react-icons/io/sad-outline.d.ts rename to types/react-icons/io/sad-outline.d.ts diff --git a/react-icons/io/sad.d.ts b/types/react-icons/io/sad.d.ts similarity index 100% rename from react-icons/io/sad.d.ts rename to types/react-icons/io/sad.d.ts diff --git a/react-icons/io/scissors.d.ts b/types/react-icons/io/scissors.d.ts similarity index 100% rename from react-icons/io/scissors.d.ts rename to types/react-icons/io/scissors.d.ts diff --git a/react-icons/io/search.d.ts b/types/react-icons/io/search.d.ts similarity index 100% rename from react-icons/io/search.d.ts rename to types/react-icons/io/search.d.ts diff --git a/react-icons/io/settings.d.ts b/types/react-icons/io/settings.d.ts similarity index 100% rename from react-icons/io/settings.d.ts rename to types/react-icons/io/settings.d.ts diff --git a/react-icons/io/share.d.ts b/types/react-icons/io/share.d.ts similarity index 100% rename from react-icons/io/share.d.ts rename to types/react-icons/io/share.d.ts diff --git a/react-icons/io/shuffle.d.ts b/types/react-icons/io/shuffle.d.ts similarity index 100% rename from react-icons/io/shuffle.d.ts rename to types/react-icons/io/shuffle.d.ts diff --git a/react-icons/io/skip-backward.d.ts b/types/react-icons/io/skip-backward.d.ts similarity index 100% rename from react-icons/io/skip-backward.d.ts rename to types/react-icons/io/skip-backward.d.ts diff --git a/react-icons/io/skip-forward.d.ts b/types/react-icons/io/skip-forward.d.ts similarity index 100% rename from react-icons/io/skip-forward.d.ts rename to types/react-icons/io/skip-forward.d.ts diff --git a/react-icons/io/social-android-outline.d.ts b/types/react-icons/io/social-android-outline.d.ts similarity index 100% rename from react-icons/io/social-android-outline.d.ts rename to types/react-icons/io/social-android-outline.d.ts diff --git a/react-icons/io/social-android.d.ts b/types/react-icons/io/social-android.d.ts similarity index 100% rename from react-icons/io/social-android.d.ts rename to types/react-icons/io/social-android.d.ts diff --git a/react-icons/io/social-angular-outline.d.ts b/types/react-icons/io/social-angular-outline.d.ts similarity index 100% rename from react-icons/io/social-angular-outline.d.ts rename to types/react-icons/io/social-angular-outline.d.ts diff --git a/react-icons/io/social-angular.d.ts b/types/react-icons/io/social-angular.d.ts similarity index 100% rename from react-icons/io/social-angular.d.ts rename to types/react-icons/io/social-angular.d.ts diff --git a/react-icons/io/social-apple-outline.d.ts b/types/react-icons/io/social-apple-outline.d.ts similarity index 100% rename from react-icons/io/social-apple-outline.d.ts rename to types/react-icons/io/social-apple-outline.d.ts diff --git a/react-icons/io/social-apple.d.ts b/types/react-icons/io/social-apple.d.ts similarity index 100% rename from react-icons/io/social-apple.d.ts rename to types/react-icons/io/social-apple.d.ts diff --git a/react-icons/io/social-bitcoin-outline.d.ts b/types/react-icons/io/social-bitcoin-outline.d.ts similarity index 100% rename from react-icons/io/social-bitcoin-outline.d.ts rename to types/react-icons/io/social-bitcoin-outline.d.ts diff --git a/react-icons/io/social-bitcoin.d.ts b/types/react-icons/io/social-bitcoin.d.ts similarity index 100% rename from react-icons/io/social-bitcoin.d.ts rename to types/react-icons/io/social-bitcoin.d.ts diff --git a/react-icons/io/social-buffer-outline.d.ts b/types/react-icons/io/social-buffer-outline.d.ts similarity index 100% rename from react-icons/io/social-buffer-outline.d.ts rename to types/react-icons/io/social-buffer-outline.d.ts diff --git a/react-icons/io/social-buffer.d.ts b/types/react-icons/io/social-buffer.d.ts similarity index 100% rename from react-icons/io/social-buffer.d.ts rename to types/react-icons/io/social-buffer.d.ts diff --git a/react-icons/io/social-chrome-outline.d.ts b/types/react-icons/io/social-chrome-outline.d.ts similarity index 100% rename from react-icons/io/social-chrome-outline.d.ts rename to types/react-icons/io/social-chrome-outline.d.ts diff --git a/react-icons/io/social-chrome.d.ts b/types/react-icons/io/social-chrome.d.ts similarity index 100% rename from react-icons/io/social-chrome.d.ts rename to types/react-icons/io/social-chrome.d.ts diff --git a/react-icons/io/social-codepen-outline.d.ts b/types/react-icons/io/social-codepen-outline.d.ts similarity index 100% rename from react-icons/io/social-codepen-outline.d.ts rename to types/react-icons/io/social-codepen-outline.d.ts diff --git a/react-icons/io/social-codepen.d.ts b/types/react-icons/io/social-codepen.d.ts similarity index 100% rename from react-icons/io/social-codepen.d.ts rename to types/react-icons/io/social-codepen.d.ts diff --git a/react-icons/io/social-css3-outline.d.ts b/types/react-icons/io/social-css3-outline.d.ts similarity index 100% rename from react-icons/io/social-css3-outline.d.ts rename to types/react-icons/io/social-css3-outline.d.ts diff --git a/react-icons/io/social-css3.d.ts b/types/react-icons/io/social-css3.d.ts similarity index 100% rename from react-icons/io/social-css3.d.ts rename to types/react-icons/io/social-css3.d.ts diff --git a/react-icons/io/social-designernews-outline.d.ts b/types/react-icons/io/social-designernews-outline.d.ts similarity index 100% rename from react-icons/io/social-designernews-outline.d.ts rename to types/react-icons/io/social-designernews-outline.d.ts diff --git a/react-icons/io/social-designernews.d.ts b/types/react-icons/io/social-designernews.d.ts similarity index 100% rename from react-icons/io/social-designernews.d.ts rename to types/react-icons/io/social-designernews.d.ts diff --git a/react-icons/io/social-dribbble-outline.d.ts b/types/react-icons/io/social-dribbble-outline.d.ts similarity index 100% rename from react-icons/io/social-dribbble-outline.d.ts rename to types/react-icons/io/social-dribbble-outline.d.ts diff --git a/react-icons/io/social-dribbble.d.ts b/types/react-icons/io/social-dribbble.d.ts similarity index 100% rename from react-icons/io/social-dribbble.d.ts rename to types/react-icons/io/social-dribbble.d.ts diff --git a/react-icons/io/social-dropbox-outline.d.ts b/types/react-icons/io/social-dropbox-outline.d.ts similarity index 100% rename from react-icons/io/social-dropbox-outline.d.ts rename to types/react-icons/io/social-dropbox-outline.d.ts diff --git a/react-icons/io/social-dropbox.d.ts b/types/react-icons/io/social-dropbox.d.ts similarity index 100% rename from react-icons/io/social-dropbox.d.ts rename to types/react-icons/io/social-dropbox.d.ts diff --git a/react-icons/io/social-euro-outline.d.ts b/types/react-icons/io/social-euro-outline.d.ts similarity index 100% rename from react-icons/io/social-euro-outline.d.ts rename to types/react-icons/io/social-euro-outline.d.ts diff --git a/react-icons/io/social-euro.d.ts b/types/react-icons/io/social-euro.d.ts similarity index 100% rename from react-icons/io/social-euro.d.ts rename to types/react-icons/io/social-euro.d.ts diff --git a/react-icons/io/social-facebook-outline.d.ts b/types/react-icons/io/social-facebook-outline.d.ts similarity index 100% rename from react-icons/io/social-facebook-outline.d.ts rename to types/react-icons/io/social-facebook-outline.d.ts diff --git a/react-icons/io/social-facebook.d.ts b/types/react-icons/io/social-facebook.d.ts similarity index 100% rename from react-icons/io/social-facebook.d.ts rename to types/react-icons/io/social-facebook.d.ts diff --git a/react-icons/io/social-foursquare-outline.d.ts b/types/react-icons/io/social-foursquare-outline.d.ts similarity index 100% rename from react-icons/io/social-foursquare-outline.d.ts rename to types/react-icons/io/social-foursquare-outline.d.ts diff --git a/react-icons/io/social-foursquare.d.ts b/types/react-icons/io/social-foursquare.d.ts similarity index 100% rename from react-icons/io/social-foursquare.d.ts rename to types/react-icons/io/social-foursquare.d.ts diff --git a/react-icons/io/social-freebsd-devil.d.ts b/types/react-icons/io/social-freebsd-devil.d.ts similarity index 100% rename from react-icons/io/social-freebsd-devil.d.ts rename to types/react-icons/io/social-freebsd-devil.d.ts diff --git a/react-icons/io/social-github-outline.d.ts b/types/react-icons/io/social-github-outline.d.ts similarity index 100% rename from react-icons/io/social-github-outline.d.ts rename to types/react-icons/io/social-github-outline.d.ts diff --git a/react-icons/io/social-github.d.ts b/types/react-icons/io/social-github.d.ts similarity index 100% rename from react-icons/io/social-github.d.ts rename to types/react-icons/io/social-github.d.ts diff --git a/react-icons/io/social-google-outline.d.ts b/types/react-icons/io/social-google-outline.d.ts similarity index 100% rename from react-icons/io/social-google-outline.d.ts rename to types/react-icons/io/social-google-outline.d.ts diff --git a/react-icons/io/social-google.d.ts b/types/react-icons/io/social-google.d.ts similarity index 100% rename from react-icons/io/social-google.d.ts rename to types/react-icons/io/social-google.d.ts diff --git a/react-icons/io/social-googleplus-outline.d.ts b/types/react-icons/io/social-googleplus-outline.d.ts similarity index 100% rename from react-icons/io/social-googleplus-outline.d.ts rename to types/react-icons/io/social-googleplus-outline.d.ts diff --git a/react-icons/io/social-googleplus.d.ts b/types/react-icons/io/social-googleplus.d.ts similarity index 100% rename from react-icons/io/social-googleplus.d.ts rename to types/react-icons/io/social-googleplus.d.ts diff --git a/react-icons/io/social-hackernews-outline.d.ts b/types/react-icons/io/social-hackernews-outline.d.ts similarity index 100% rename from react-icons/io/social-hackernews-outline.d.ts rename to types/react-icons/io/social-hackernews-outline.d.ts diff --git a/react-icons/io/social-hackernews.d.ts b/types/react-icons/io/social-hackernews.d.ts similarity index 100% rename from react-icons/io/social-hackernews.d.ts rename to types/react-icons/io/social-hackernews.d.ts diff --git a/react-icons/io/social-html5-outline.d.ts b/types/react-icons/io/social-html5-outline.d.ts similarity index 100% rename from react-icons/io/social-html5-outline.d.ts rename to types/react-icons/io/social-html5-outline.d.ts diff --git a/react-icons/io/social-html5.d.ts b/types/react-icons/io/social-html5.d.ts similarity index 100% rename from react-icons/io/social-html5.d.ts rename to types/react-icons/io/social-html5.d.ts diff --git a/react-icons/io/social-instagram-outline.d.ts b/types/react-icons/io/social-instagram-outline.d.ts similarity index 100% rename from react-icons/io/social-instagram-outline.d.ts rename to types/react-icons/io/social-instagram-outline.d.ts diff --git a/react-icons/io/social-instagram.d.ts b/types/react-icons/io/social-instagram.d.ts similarity index 100% rename from react-icons/io/social-instagram.d.ts rename to types/react-icons/io/social-instagram.d.ts diff --git a/react-icons/io/social-javascript-outline.d.ts b/types/react-icons/io/social-javascript-outline.d.ts similarity index 100% rename from react-icons/io/social-javascript-outline.d.ts rename to types/react-icons/io/social-javascript-outline.d.ts diff --git a/react-icons/io/social-javascript.d.ts b/types/react-icons/io/social-javascript.d.ts similarity index 100% rename from react-icons/io/social-javascript.d.ts rename to types/react-icons/io/social-javascript.d.ts diff --git a/react-icons/io/social-linkedin-outline.d.ts b/types/react-icons/io/social-linkedin-outline.d.ts similarity index 100% rename from react-icons/io/social-linkedin-outline.d.ts rename to types/react-icons/io/social-linkedin-outline.d.ts diff --git a/react-icons/io/social-linkedin.d.ts b/types/react-icons/io/social-linkedin.d.ts similarity index 100% rename from react-icons/io/social-linkedin.d.ts rename to types/react-icons/io/social-linkedin.d.ts diff --git a/react-icons/io/social-markdown.d.ts b/types/react-icons/io/social-markdown.d.ts similarity index 100% rename from react-icons/io/social-markdown.d.ts rename to types/react-icons/io/social-markdown.d.ts diff --git a/react-icons/io/social-nodejs.d.ts b/types/react-icons/io/social-nodejs.d.ts similarity index 100% rename from react-icons/io/social-nodejs.d.ts rename to types/react-icons/io/social-nodejs.d.ts diff --git a/react-icons/io/social-octocat.d.ts b/types/react-icons/io/social-octocat.d.ts similarity index 100% rename from react-icons/io/social-octocat.d.ts rename to types/react-icons/io/social-octocat.d.ts diff --git a/react-icons/io/social-pinterest-outline.d.ts b/types/react-icons/io/social-pinterest-outline.d.ts similarity index 100% rename from react-icons/io/social-pinterest-outline.d.ts rename to types/react-icons/io/social-pinterest-outline.d.ts diff --git a/react-icons/io/social-pinterest.d.ts b/types/react-icons/io/social-pinterest.d.ts similarity index 100% rename from react-icons/io/social-pinterest.d.ts rename to types/react-icons/io/social-pinterest.d.ts diff --git a/react-icons/io/social-python.d.ts b/types/react-icons/io/social-python.d.ts similarity index 100% rename from react-icons/io/social-python.d.ts rename to types/react-icons/io/social-python.d.ts diff --git a/react-icons/io/social-reddit-outline.d.ts b/types/react-icons/io/social-reddit-outline.d.ts similarity index 100% rename from react-icons/io/social-reddit-outline.d.ts rename to types/react-icons/io/social-reddit-outline.d.ts diff --git a/react-icons/io/social-reddit.d.ts b/types/react-icons/io/social-reddit.d.ts similarity index 100% rename from react-icons/io/social-reddit.d.ts rename to types/react-icons/io/social-reddit.d.ts diff --git a/react-icons/io/social-rss-outline.d.ts b/types/react-icons/io/social-rss-outline.d.ts similarity index 100% rename from react-icons/io/social-rss-outline.d.ts rename to types/react-icons/io/social-rss-outline.d.ts diff --git a/react-icons/io/social-rss.d.ts b/types/react-icons/io/social-rss.d.ts similarity index 100% rename from react-icons/io/social-rss.d.ts rename to types/react-icons/io/social-rss.d.ts diff --git a/react-icons/io/social-sass.d.ts b/types/react-icons/io/social-sass.d.ts similarity index 100% rename from react-icons/io/social-sass.d.ts rename to types/react-icons/io/social-sass.d.ts diff --git a/react-icons/io/social-skype-outline.d.ts b/types/react-icons/io/social-skype-outline.d.ts similarity index 100% rename from react-icons/io/social-skype-outline.d.ts rename to types/react-icons/io/social-skype-outline.d.ts diff --git a/react-icons/io/social-skype.d.ts b/types/react-icons/io/social-skype.d.ts similarity index 100% rename from react-icons/io/social-skype.d.ts rename to types/react-icons/io/social-skype.d.ts diff --git a/react-icons/io/social-snapchat-outline.d.ts b/types/react-icons/io/social-snapchat-outline.d.ts similarity index 100% rename from react-icons/io/social-snapchat-outline.d.ts rename to types/react-icons/io/social-snapchat-outline.d.ts diff --git a/react-icons/io/social-snapchat.d.ts b/types/react-icons/io/social-snapchat.d.ts similarity index 100% rename from react-icons/io/social-snapchat.d.ts rename to types/react-icons/io/social-snapchat.d.ts diff --git a/react-icons/io/social-tumblr-outline.d.ts b/types/react-icons/io/social-tumblr-outline.d.ts similarity index 100% rename from react-icons/io/social-tumblr-outline.d.ts rename to types/react-icons/io/social-tumblr-outline.d.ts diff --git a/react-icons/io/social-tumblr.d.ts b/types/react-icons/io/social-tumblr.d.ts similarity index 100% rename from react-icons/io/social-tumblr.d.ts rename to types/react-icons/io/social-tumblr.d.ts diff --git a/react-icons/io/social-tux.d.ts b/types/react-icons/io/social-tux.d.ts similarity index 100% rename from react-icons/io/social-tux.d.ts rename to types/react-icons/io/social-tux.d.ts diff --git a/react-icons/io/social-twitch-outline.d.ts b/types/react-icons/io/social-twitch-outline.d.ts similarity index 100% rename from react-icons/io/social-twitch-outline.d.ts rename to types/react-icons/io/social-twitch-outline.d.ts diff --git a/react-icons/io/social-twitch.d.ts b/types/react-icons/io/social-twitch.d.ts similarity index 100% rename from react-icons/io/social-twitch.d.ts rename to types/react-icons/io/social-twitch.d.ts diff --git a/react-icons/io/social-twitter-outline.d.ts b/types/react-icons/io/social-twitter-outline.d.ts similarity index 100% rename from react-icons/io/social-twitter-outline.d.ts rename to types/react-icons/io/social-twitter-outline.d.ts diff --git a/react-icons/io/social-twitter.d.ts b/types/react-icons/io/social-twitter.d.ts similarity index 100% rename from react-icons/io/social-twitter.d.ts rename to types/react-icons/io/social-twitter.d.ts diff --git a/react-icons/io/social-usd-outline.d.ts b/types/react-icons/io/social-usd-outline.d.ts similarity index 100% rename from react-icons/io/social-usd-outline.d.ts rename to types/react-icons/io/social-usd-outline.d.ts diff --git a/react-icons/io/social-usd.d.ts b/types/react-icons/io/social-usd.d.ts similarity index 100% rename from react-icons/io/social-usd.d.ts rename to types/react-icons/io/social-usd.d.ts diff --git a/react-icons/io/social-vimeo-outline.d.ts b/types/react-icons/io/social-vimeo-outline.d.ts similarity index 100% rename from react-icons/io/social-vimeo-outline.d.ts rename to types/react-icons/io/social-vimeo-outline.d.ts diff --git a/react-icons/io/social-vimeo.d.ts b/types/react-icons/io/social-vimeo.d.ts similarity index 100% rename from react-icons/io/social-vimeo.d.ts rename to types/react-icons/io/social-vimeo.d.ts diff --git a/react-icons/io/social-whatsapp-outline.d.ts b/types/react-icons/io/social-whatsapp-outline.d.ts similarity index 100% rename from react-icons/io/social-whatsapp-outline.d.ts rename to types/react-icons/io/social-whatsapp-outline.d.ts diff --git a/react-icons/io/social-whatsapp.d.ts b/types/react-icons/io/social-whatsapp.d.ts similarity index 100% rename from react-icons/io/social-whatsapp.d.ts rename to types/react-icons/io/social-whatsapp.d.ts diff --git a/react-icons/io/social-windows-outline.d.ts b/types/react-icons/io/social-windows-outline.d.ts similarity index 100% rename from react-icons/io/social-windows-outline.d.ts rename to types/react-icons/io/social-windows-outline.d.ts diff --git a/react-icons/io/social-windows.d.ts b/types/react-icons/io/social-windows.d.ts similarity index 100% rename from react-icons/io/social-windows.d.ts rename to types/react-icons/io/social-windows.d.ts diff --git a/react-icons/io/social-wordpress-outline.d.ts b/types/react-icons/io/social-wordpress-outline.d.ts similarity index 100% rename from react-icons/io/social-wordpress-outline.d.ts rename to types/react-icons/io/social-wordpress-outline.d.ts diff --git a/react-icons/io/social-wordpress.d.ts b/types/react-icons/io/social-wordpress.d.ts similarity index 100% rename from react-icons/io/social-wordpress.d.ts rename to types/react-icons/io/social-wordpress.d.ts diff --git a/react-icons/io/social-yahoo-outline.d.ts b/types/react-icons/io/social-yahoo-outline.d.ts similarity index 100% rename from react-icons/io/social-yahoo-outline.d.ts rename to types/react-icons/io/social-yahoo-outline.d.ts diff --git a/react-icons/io/social-yahoo.d.ts b/types/react-icons/io/social-yahoo.d.ts similarity index 100% rename from react-icons/io/social-yahoo.d.ts rename to types/react-icons/io/social-yahoo.d.ts diff --git a/react-icons/io/social-yen-outline.d.ts b/types/react-icons/io/social-yen-outline.d.ts similarity index 100% rename from react-icons/io/social-yen-outline.d.ts rename to types/react-icons/io/social-yen-outline.d.ts diff --git a/react-icons/io/social-yen.d.ts b/types/react-icons/io/social-yen.d.ts similarity index 100% rename from react-icons/io/social-yen.d.ts rename to types/react-icons/io/social-yen.d.ts diff --git a/react-icons/io/social-youtube-outline.d.ts b/types/react-icons/io/social-youtube-outline.d.ts similarity index 100% rename from react-icons/io/social-youtube-outline.d.ts rename to types/react-icons/io/social-youtube-outline.d.ts diff --git a/react-icons/io/social-youtube.d.ts b/types/react-icons/io/social-youtube.d.ts similarity index 100% rename from react-icons/io/social-youtube.d.ts rename to types/react-icons/io/social-youtube.d.ts diff --git a/react-icons/io/soup-can-outline.d.ts b/types/react-icons/io/soup-can-outline.d.ts similarity index 100% rename from react-icons/io/soup-can-outline.d.ts rename to types/react-icons/io/soup-can-outline.d.ts diff --git a/react-icons/io/soup-can.d.ts b/types/react-icons/io/soup-can.d.ts similarity index 100% rename from react-icons/io/soup-can.d.ts rename to types/react-icons/io/soup-can.d.ts diff --git a/react-icons/io/speakerphone.d.ts b/types/react-icons/io/speakerphone.d.ts similarity index 100% rename from react-icons/io/speakerphone.d.ts rename to types/react-icons/io/speakerphone.d.ts diff --git a/react-icons/io/speedometer.d.ts b/types/react-icons/io/speedometer.d.ts similarity index 100% rename from react-icons/io/speedometer.d.ts rename to types/react-icons/io/speedometer.d.ts diff --git a/react-icons/io/spoon.d.ts b/types/react-icons/io/spoon.d.ts similarity index 100% rename from react-icons/io/spoon.d.ts rename to types/react-icons/io/spoon.d.ts diff --git a/react-icons/io/star.d.ts b/types/react-icons/io/star.d.ts similarity index 100% rename from react-icons/io/star.d.ts rename to types/react-icons/io/star.d.ts diff --git a/react-icons/io/stats-bars.d.ts b/types/react-icons/io/stats-bars.d.ts similarity index 100% rename from react-icons/io/stats-bars.d.ts rename to types/react-icons/io/stats-bars.d.ts diff --git a/react-icons/io/steam.d.ts b/types/react-icons/io/steam.d.ts similarity index 100% rename from react-icons/io/steam.d.ts rename to types/react-icons/io/steam.d.ts diff --git a/react-icons/io/stop.d.ts b/types/react-icons/io/stop.d.ts similarity index 100% rename from react-icons/io/stop.d.ts rename to types/react-icons/io/stop.d.ts diff --git a/react-icons/io/thermometer.d.ts b/types/react-icons/io/thermometer.d.ts similarity index 100% rename from react-icons/io/thermometer.d.ts rename to types/react-icons/io/thermometer.d.ts diff --git a/react-icons/io/thumbsdown.d.ts b/types/react-icons/io/thumbsdown.d.ts similarity index 100% rename from react-icons/io/thumbsdown.d.ts rename to types/react-icons/io/thumbsdown.d.ts diff --git a/react-icons/io/thumbsup.d.ts b/types/react-icons/io/thumbsup.d.ts similarity index 100% rename from react-icons/io/thumbsup.d.ts rename to types/react-icons/io/thumbsup.d.ts diff --git a/react-icons/io/toggle-filled.d.ts b/types/react-icons/io/toggle-filled.d.ts similarity index 100% rename from react-icons/io/toggle-filled.d.ts rename to types/react-icons/io/toggle-filled.d.ts diff --git a/react-icons/io/toggle.d.ts b/types/react-icons/io/toggle.d.ts similarity index 100% rename from react-icons/io/toggle.d.ts rename to types/react-icons/io/toggle.d.ts diff --git a/react-icons/io/transgender.d.ts b/types/react-icons/io/transgender.d.ts similarity index 100% rename from react-icons/io/transgender.d.ts rename to types/react-icons/io/transgender.d.ts diff --git a/react-icons/io/trash-a.d.ts b/types/react-icons/io/trash-a.d.ts similarity index 100% rename from react-icons/io/trash-a.d.ts rename to types/react-icons/io/trash-a.d.ts diff --git a/react-icons/io/trash-b.d.ts b/types/react-icons/io/trash-b.d.ts similarity index 100% rename from react-icons/io/trash-b.d.ts rename to types/react-icons/io/trash-b.d.ts diff --git a/react-icons/io/trophy.d.ts b/types/react-icons/io/trophy.d.ts similarity index 100% rename from react-icons/io/trophy.d.ts rename to types/react-icons/io/trophy.d.ts diff --git a/react-icons/io/tshirt-outline.d.ts b/types/react-icons/io/tshirt-outline.d.ts similarity index 100% rename from react-icons/io/tshirt-outline.d.ts rename to types/react-icons/io/tshirt-outline.d.ts diff --git a/react-icons/io/tshirt.d.ts b/types/react-icons/io/tshirt.d.ts similarity index 100% rename from react-icons/io/tshirt.d.ts rename to types/react-icons/io/tshirt.d.ts diff --git a/react-icons/io/umbrella.d.ts b/types/react-icons/io/umbrella.d.ts similarity index 100% rename from react-icons/io/umbrella.d.ts rename to types/react-icons/io/umbrella.d.ts diff --git a/react-icons/io/university.d.ts b/types/react-icons/io/university.d.ts similarity index 100% rename from react-icons/io/university.d.ts rename to types/react-icons/io/university.d.ts diff --git a/react-icons/io/unlocked.d.ts b/types/react-icons/io/unlocked.d.ts similarity index 100% rename from react-icons/io/unlocked.d.ts rename to types/react-icons/io/unlocked.d.ts diff --git a/react-icons/io/upload.d.ts b/types/react-icons/io/upload.d.ts similarity index 100% rename from react-icons/io/upload.d.ts rename to types/react-icons/io/upload.d.ts diff --git a/react-icons/io/usb.d.ts b/types/react-icons/io/usb.d.ts similarity index 100% rename from react-icons/io/usb.d.ts rename to types/react-icons/io/usb.d.ts diff --git a/react-icons/io/videocamera.d.ts b/types/react-icons/io/videocamera.d.ts similarity index 100% rename from react-icons/io/videocamera.d.ts rename to types/react-icons/io/videocamera.d.ts diff --git a/react-icons/io/volume-high.d.ts b/types/react-icons/io/volume-high.d.ts similarity index 100% rename from react-icons/io/volume-high.d.ts rename to types/react-icons/io/volume-high.d.ts diff --git a/react-icons/io/volume-low.d.ts b/types/react-icons/io/volume-low.d.ts similarity index 100% rename from react-icons/io/volume-low.d.ts rename to types/react-icons/io/volume-low.d.ts diff --git a/react-icons/io/volume-medium.d.ts b/types/react-icons/io/volume-medium.d.ts similarity index 100% rename from react-icons/io/volume-medium.d.ts rename to types/react-icons/io/volume-medium.d.ts diff --git a/react-icons/io/volume-mute.d.ts b/types/react-icons/io/volume-mute.d.ts similarity index 100% rename from react-icons/io/volume-mute.d.ts rename to types/react-icons/io/volume-mute.d.ts diff --git a/react-icons/io/wand.d.ts b/types/react-icons/io/wand.d.ts similarity index 100% rename from react-icons/io/wand.d.ts rename to types/react-icons/io/wand.d.ts diff --git a/react-icons/io/waterdrop.d.ts b/types/react-icons/io/waterdrop.d.ts similarity index 100% rename from react-icons/io/waterdrop.d.ts rename to types/react-icons/io/waterdrop.d.ts diff --git a/react-icons/io/wifi.d.ts b/types/react-icons/io/wifi.d.ts similarity index 100% rename from react-icons/io/wifi.d.ts rename to types/react-icons/io/wifi.d.ts diff --git a/react-icons/io/wineglass.d.ts b/types/react-icons/io/wineglass.d.ts similarity index 100% rename from react-icons/io/wineglass.d.ts rename to types/react-icons/io/wineglass.d.ts diff --git a/react-icons/io/woman.d.ts b/types/react-icons/io/woman.d.ts similarity index 100% rename from react-icons/io/woman.d.ts rename to types/react-icons/io/woman.d.ts diff --git a/react-icons/io/wrench.d.ts b/types/react-icons/io/wrench.d.ts similarity index 100% rename from react-icons/io/wrench.d.ts rename to types/react-icons/io/wrench.d.ts diff --git a/react-icons/io/xbox.d.ts b/types/react-icons/io/xbox.d.ts similarity index 100% rename from react-icons/io/xbox.d.ts rename to types/react-icons/io/xbox.d.ts diff --git a/react-icons/md/3d-rotation.d.ts b/types/react-icons/md/3d-rotation.d.ts similarity index 100% rename from react-icons/md/3d-rotation.d.ts rename to types/react-icons/md/3d-rotation.d.ts diff --git a/react-icons/md/ac-unit.d.ts b/types/react-icons/md/ac-unit.d.ts similarity index 100% rename from react-icons/md/ac-unit.d.ts rename to types/react-icons/md/ac-unit.d.ts diff --git a/react-icons/md/access-alarm.d.ts b/types/react-icons/md/access-alarm.d.ts similarity index 100% rename from react-icons/md/access-alarm.d.ts rename to types/react-icons/md/access-alarm.d.ts diff --git a/react-icons/md/access-alarms.d.ts b/types/react-icons/md/access-alarms.d.ts similarity index 100% rename from react-icons/md/access-alarms.d.ts rename to types/react-icons/md/access-alarms.d.ts diff --git a/react-icons/md/access-time.d.ts b/types/react-icons/md/access-time.d.ts similarity index 100% rename from react-icons/md/access-time.d.ts rename to types/react-icons/md/access-time.d.ts diff --git a/react-icons/md/accessibility.d.ts b/types/react-icons/md/accessibility.d.ts similarity index 100% rename from react-icons/md/accessibility.d.ts rename to types/react-icons/md/accessibility.d.ts diff --git a/react-icons/md/accessible.d.ts b/types/react-icons/md/accessible.d.ts similarity index 100% rename from react-icons/md/accessible.d.ts rename to types/react-icons/md/accessible.d.ts diff --git a/react-icons/md/account-balance-wallet.d.ts b/types/react-icons/md/account-balance-wallet.d.ts similarity index 100% rename from react-icons/md/account-balance-wallet.d.ts rename to types/react-icons/md/account-balance-wallet.d.ts diff --git a/react-icons/md/account-balance.d.ts b/types/react-icons/md/account-balance.d.ts similarity index 100% rename from react-icons/md/account-balance.d.ts rename to types/react-icons/md/account-balance.d.ts diff --git a/react-icons/md/account-box.d.ts b/types/react-icons/md/account-box.d.ts similarity index 100% rename from react-icons/md/account-box.d.ts rename to types/react-icons/md/account-box.d.ts diff --git a/react-icons/md/account-circle.d.ts b/types/react-icons/md/account-circle.d.ts similarity index 100% rename from react-icons/md/account-circle.d.ts rename to types/react-icons/md/account-circle.d.ts diff --git a/react-icons/md/adb.d.ts b/types/react-icons/md/adb.d.ts similarity index 100% rename from react-icons/md/adb.d.ts rename to types/react-icons/md/adb.d.ts diff --git a/react-icons/md/add-a-photo.d.ts b/types/react-icons/md/add-a-photo.d.ts similarity index 100% rename from react-icons/md/add-a-photo.d.ts rename to types/react-icons/md/add-a-photo.d.ts diff --git a/react-icons/md/add-alarm.d.ts b/types/react-icons/md/add-alarm.d.ts similarity index 100% rename from react-icons/md/add-alarm.d.ts rename to types/react-icons/md/add-alarm.d.ts diff --git a/react-icons/md/add-alert.d.ts b/types/react-icons/md/add-alert.d.ts similarity index 100% rename from react-icons/md/add-alert.d.ts rename to types/react-icons/md/add-alert.d.ts diff --git a/react-icons/md/add-box.d.ts b/types/react-icons/md/add-box.d.ts similarity index 100% rename from react-icons/md/add-box.d.ts rename to types/react-icons/md/add-box.d.ts diff --git a/react-icons/md/add-circle-outline.d.ts b/types/react-icons/md/add-circle-outline.d.ts similarity index 100% rename from react-icons/md/add-circle-outline.d.ts rename to types/react-icons/md/add-circle-outline.d.ts diff --git a/react-icons/md/add-circle.d.ts b/types/react-icons/md/add-circle.d.ts similarity index 100% rename from react-icons/md/add-circle.d.ts rename to types/react-icons/md/add-circle.d.ts diff --git a/react-icons/md/add-location.d.ts b/types/react-icons/md/add-location.d.ts similarity index 100% rename from react-icons/md/add-location.d.ts rename to types/react-icons/md/add-location.d.ts diff --git a/react-icons/md/add-shopping-cart.d.ts b/types/react-icons/md/add-shopping-cart.d.ts similarity index 100% rename from react-icons/md/add-shopping-cart.d.ts rename to types/react-icons/md/add-shopping-cart.d.ts diff --git a/react-icons/md/add-to-photos.d.ts b/types/react-icons/md/add-to-photos.d.ts similarity index 100% rename from react-icons/md/add-to-photos.d.ts rename to types/react-icons/md/add-to-photos.d.ts diff --git a/react-icons/md/add-to-queue.d.ts b/types/react-icons/md/add-to-queue.d.ts similarity index 100% rename from react-icons/md/add-to-queue.d.ts rename to types/react-icons/md/add-to-queue.d.ts diff --git a/react-icons/md/add.d.ts b/types/react-icons/md/add.d.ts similarity index 100% rename from react-icons/md/add.d.ts rename to types/react-icons/md/add.d.ts diff --git a/react-icons/md/adjust.d.ts b/types/react-icons/md/adjust.d.ts similarity index 100% rename from react-icons/md/adjust.d.ts rename to types/react-icons/md/adjust.d.ts diff --git a/react-icons/md/airline-seat-flat-angled.d.ts b/types/react-icons/md/airline-seat-flat-angled.d.ts similarity index 100% rename from react-icons/md/airline-seat-flat-angled.d.ts rename to types/react-icons/md/airline-seat-flat-angled.d.ts diff --git a/react-icons/md/airline-seat-flat.d.ts b/types/react-icons/md/airline-seat-flat.d.ts similarity index 100% rename from react-icons/md/airline-seat-flat.d.ts rename to types/react-icons/md/airline-seat-flat.d.ts diff --git a/react-icons/md/airline-seat-individual-suite.d.ts b/types/react-icons/md/airline-seat-individual-suite.d.ts similarity index 100% rename from react-icons/md/airline-seat-individual-suite.d.ts rename to types/react-icons/md/airline-seat-individual-suite.d.ts diff --git a/react-icons/md/airline-seat-legroom-extra.d.ts b/types/react-icons/md/airline-seat-legroom-extra.d.ts similarity index 100% rename from react-icons/md/airline-seat-legroom-extra.d.ts rename to types/react-icons/md/airline-seat-legroom-extra.d.ts diff --git a/react-icons/md/airline-seat-legroom-normal.d.ts b/types/react-icons/md/airline-seat-legroom-normal.d.ts similarity index 100% rename from react-icons/md/airline-seat-legroom-normal.d.ts rename to types/react-icons/md/airline-seat-legroom-normal.d.ts diff --git a/react-icons/md/airline-seat-legroom-reduced.d.ts b/types/react-icons/md/airline-seat-legroom-reduced.d.ts similarity index 100% rename from react-icons/md/airline-seat-legroom-reduced.d.ts rename to types/react-icons/md/airline-seat-legroom-reduced.d.ts diff --git a/react-icons/md/airline-seat-recline-extra.d.ts b/types/react-icons/md/airline-seat-recline-extra.d.ts similarity index 100% rename from react-icons/md/airline-seat-recline-extra.d.ts rename to types/react-icons/md/airline-seat-recline-extra.d.ts diff --git a/react-icons/md/airline-seat-recline-normal.d.ts b/types/react-icons/md/airline-seat-recline-normal.d.ts similarity index 100% rename from react-icons/md/airline-seat-recline-normal.d.ts rename to types/react-icons/md/airline-seat-recline-normal.d.ts diff --git a/react-icons/md/airplanemode-active.d.ts b/types/react-icons/md/airplanemode-active.d.ts similarity index 100% rename from react-icons/md/airplanemode-active.d.ts rename to types/react-icons/md/airplanemode-active.d.ts diff --git a/react-icons/md/airplanemode-inactive.d.ts b/types/react-icons/md/airplanemode-inactive.d.ts similarity index 100% rename from react-icons/md/airplanemode-inactive.d.ts rename to types/react-icons/md/airplanemode-inactive.d.ts diff --git a/react-icons/md/airplay.d.ts b/types/react-icons/md/airplay.d.ts similarity index 100% rename from react-icons/md/airplay.d.ts rename to types/react-icons/md/airplay.d.ts diff --git a/react-icons/md/airport-shuttle.d.ts b/types/react-icons/md/airport-shuttle.d.ts similarity index 100% rename from react-icons/md/airport-shuttle.d.ts rename to types/react-icons/md/airport-shuttle.d.ts diff --git a/react-icons/md/alarm-add.d.ts b/types/react-icons/md/alarm-add.d.ts similarity index 100% rename from react-icons/md/alarm-add.d.ts rename to types/react-icons/md/alarm-add.d.ts diff --git a/react-icons/md/alarm-off.d.ts b/types/react-icons/md/alarm-off.d.ts similarity index 100% rename from react-icons/md/alarm-off.d.ts rename to types/react-icons/md/alarm-off.d.ts diff --git a/react-icons/md/alarm-on.d.ts b/types/react-icons/md/alarm-on.d.ts similarity index 100% rename from react-icons/md/alarm-on.d.ts rename to types/react-icons/md/alarm-on.d.ts diff --git a/react-icons/md/alarm.d.ts b/types/react-icons/md/alarm.d.ts similarity index 100% rename from react-icons/md/alarm.d.ts rename to types/react-icons/md/alarm.d.ts diff --git a/react-icons/md/album.d.ts b/types/react-icons/md/album.d.ts similarity index 100% rename from react-icons/md/album.d.ts rename to types/react-icons/md/album.d.ts diff --git a/react-icons/md/all-inclusive.d.ts b/types/react-icons/md/all-inclusive.d.ts similarity index 100% rename from react-icons/md/all-inclusive.d.ts rename to types/react-icons/md/all-inclusive.d.ts diff --git a/react-icons/md/all-out.d.ts b/types/react-icons/md/all-out.d.ts similarity index 100% rename from react-icons/md/all-out.d.ts rename to types/react-icons/md/all-out.d.ts diff --git a/react-icons/md/android.d.ts b/types/react-icons/md/android.d.ts similarity index 100% rename from react-icons/md/android.d.ts rename to types/react-icons/md/android.d.ts diff --git a/react-icons/md/announcement.d.ts b/types/react-icons/md/announcement.d.ts similarity index 100% rename from react-icons/md/announcement.d.ts rename to types/react-icons/md/announcement.d.ts diff --git a/react-icons/md/apps.d.ts b/types/react-icons/md/apps.d.ts similarity index 100% rename from react-icons/md/apps.d.ts rename to types/react-icons/md/apps.d.ts diff --git a/react-icons/md/archive.d.ts b/types/react-icons/md/archive.d.ts similarity index 100% rename from react-icons/md/archive.d.ts rename to types/react-icons/md/archive.d.ts diff --git a/react-icons/md/arrow-back.d.ts b/types/react-icons/md/arrow-back.d.ts similarity index 100% rename from react-icons/md/arrow-back.d.ts rename to types/react-icons/md/arrow-back.d.ts diff --git a/react-icons/md/arrow-downward.d.ts b/types/react-icons/md/arrow-downward.d.ts similarity index 100% rename from react-icons/md/arrow-downward.d.ts rename to types/react-icons/md/arrow-downward.d.ts diff --git a/react-icons/md/arrow-drop-down-circle.d.ts b/types/react-icons/md/arrow-drop-down-circle.d.ts similarity index 100% rename from react-icons/md/arrow-drop-down-circle.d.ts rename to types/react-icons/md/arrow-drop-down-circle.d.ts diff --git a/react-icons/md/arrow-drop-down.d.ts b/types/react-icons/md/arrow-drop-down.d.ts similarity index 100% rename from react-icons/md/arrow-drop-down.d.ts rename to types/react-icons/md/arrow-drop-down.d.ts diff --git a/react-icons/md/arrow-drop-up.d.ts b/types/react-icons/md/arrow-drop-up.d.ts similarity index 100% rename from react-icons/md/arrow-drop-up.d.ts rename to types/react-icons/md/arrow-drop-up.d.ts diff --git a/react-icons/md/arrow-forward.d.ts b/types/react-icons/md/arrow-forward.d.ts similarity index 100% rename from react-icons/md/arrow-forward.d.ts rename to types/react-icons/md/arrow-forward.d.ts diff --git a/react-icons/md/arrow-upward.d.ts b/types/react-icons/md/arrow-upward.d.ts similarity index 100% rename from react-icons/md/arrow-upward.d.ts rename to types/react-icons/md/arrow-upward.d.ts diff --git a/react-icons/md/art-track.d.ts b/types/react-icons/md/art-track.d.ts similarity index 100% rename from react-icons/md/art-track.d.ts rename to types/react-icons/md/art-track.d.ts diff --git a/react-icons/md/aspect-ratio.d.ts b/types/react-icons/md/aspect-ratio.d.ts similarity index 100% rename from react-icons/md/aspect-ratio.d.ts rename to types/react-icons/md/aspect-ratio.d.ts diff --git a/react-icons/md/assessment.d.ts b/types/react-icons/md/assessment.d.ts similarity index 100% rename from react-icons/md/assessment.d.ts rename to types/react-icons/md/assessment.d.ts diff --git a/react-icons/md/assignment-ind.d.ts b/types/react-icons/md/assignment-ind.d.ts similarity index 100% rename from react-icons/md/assignment-ind.d.ts rename to types/react-icons/md/assignment-ind.d.ts diff --git a/react-icons/md/assignment-late.d.ts b/types/react-icons/md/assignment-late.d.ts similarity index 100% rename from react-icons/md/assignment-late.d.ts rename to types/react-icons/md/assignment-late.d.ts diff --git a/react-icons/md/assignment-return.d.ts b/types/react-icons/md/assignment-return.d.ts similarity index 100% rename from react-icons/md/assignment-return.d.ts rename to types/react-icons/md/assignment-return.d.ts diff --git a/react-icons/md/assignment-returned.d.ts b/types/react-icons/md/assignment-returned.d.ts similarity index 100% rename from react-icons/md/assignment-returned.d.ts rename to types/react-icons/md/assignment-returned.d.ts diff --git a/react-icons/md/assignment-turned-in.d.ts b/types/react-icons/md/assignment-turned-in.d.ts similarity index 100% rename from react-icons/md/assignment-turned-in.d.ts rename to types/react-icons/md/assignment-turned-in.d.ts diff --git a/react-icons/md/assignment.d.ts b/types/react-icons/md/assignment.d.ts similarity index 100% rename from react-icons/md/assignment.d.ts rename to types/react-icons/md/assignment.d.ts diff --git a/react-icons/md/assistant-photo.d.ts b/types/react-icons/md/assistant-photo.d.ts similarity index 100% rename from react-icons/md/assistant-photo.d.ts rename to types/react-icons/md/assistant-photo.d.ts diff --git a/react-icons/md/assistant.d.ts b/types/react-icons/md/assistant.d.ts similarity index 100% rename from react-icons/md/assistant.d.ts rename to types/react-icons/md/assistant.d.ts diff --git a/react-icons/md/attach-file.d.ts b/types/react-icons/md/attach-file.d.ts similarity index 100% rename from react-icons/md/attach-file.d.ts rename to types/react-icons/md/attach-file.d.ts diff --git a/react-icons/md/attach-money.d.ts b/types/react-icons/md/attach-money.d.ts similarity index 100% rename from react-icons/md/attach-money.d.ts rename to types/react-icons/md/attach-money.d.ts diff --git a/react-icons/md/attachment.d.ts b/types/react-icons/md/attachment.d.ts similarity index 100% rename from react-icons/md/attachment.d.ts rename to types/react-icons/md/attachment.d.ts diff --git a/react-icons/md/audiotrack.d.ts b/types/react-icons/md/audiotrack.d.ts similarity index 100% rename from react-icons/md/audiotrack.d.ts rename to types/react-icons/md/audiotrack.d.ts diff --git a/react-icons/md/autorenew.d.ts b/types/react-icons/md/autorenew.d.ts similarity index 100% rename from react-icons/md/autorenew.d.ts rename to types/react-icons/md/autorenew.d.ts diff --git a/react-icons/md/av-timer.d.ts b/types/react-icons/md/av-timer.d.ts similarity index 100% rename from react-icons/md/av-timer.d.ts rename to types/react-icons/md/av-timer.d.ts diff --git a/react-icons/md/backspace.d.ts b/types/react-icons/md/backspace.d.ts similarity index 100% rename from react-icons/md/backspace.d.ts rename to types/react-icons/md/backspace.d.ts diff --git a/react-icons/md/backup.d.ts b/types/react-icons/md/backup.d.ts similarity index 100% rename from react-icons/md/backup.d.ts rename to types/react-icons/md/backup.d.ts diff --git a/react-icons/md/battery-alert.d.ts b/types/react-icons/md/battery-alert.d.ts similarity index 100% rename from react-icons/md/battery-alert.d.ts rename to types/react-icons/md/battery-alert.d.ts diff --git a/react-icons/md/battery-charging-full.d.ts b/types/react-icons/md/battery-charging-full.d.ts similarity index 100% rename from react-icons/md/battery-charging-full.d.ts rename to types/react-icons/md/battery-charging-full.d.ts diff --git a/react-icons/md/battery-full.d.ts b/types/react-icons/md/battery-full.d.ts similarity index 100% rename from react-icons/md/battery-full.d.ts rename to types/react-icons/md/battery-full.d.ts diff --git a/react-icons/md/battery-std.d.ts b/types/react-icons/md/battery-std.d.ts similarity index 100% rename from react-icons/md/battery-std.d.ts rename to types/react-icons/md/battery-std.d.ts diff --git a/react-icons/md/battery-unknown.d.ts b/types/react-icons/md/battery-unknown.d.ts similarity index 100% rename from react-icons/md/battery-unknown.d.ts rename to types/react-icons/md/battery-unknown.d.ts diff --git a/react-icons/md/beach-access.d.ts b/types/react-icons/md/beach-access.d.ts similarity index 100% rename from react-icons/md/beach-access.d.ts rename to types/react-icons/md/beach-access.d.ts diff --git a/react-icons/md/beenhere.d.ts b/types/react-icons/md/beenhere.d.ts similarity index 100% rename from react-icons/md/beenhere.d.ts rename to types/react-icons/md/beenhere.d.ts diff --git a/react-icons/md/block.d.ts b/types/react-icons/md/block.d.ts similarity index 100% rename from react-icons/md/block.d.ts rename to types/react-icons/md/block.d.ts diff --git a/react-icons/md/bluetooth-audio.d.ts b/types/react-icons/md/bluetooth-audio.d.ts similarity index 100% rename from react-icons/md/bluetooth-audio.d.ts rename to types/react-icons/md/bluetooth-audio.d.ts diff --git a/react-icons/md/bluetooth-connected.d.ts b/types/react-icons/md/bluetooth-connected.d.ts similarity index 100% rename from react-icons/md/bluetooth-connected.d.ts rename to types/react-icons/md/bluetooth-connected.d.ts diff --git a/react-icons/md/bluetooth-disabled.d.ts b/types/react-icons/md/bluetooth-disabled.d.ts similarity index 100% rename from react-icons/md/bluetooth-disabled.d.ts rename to types/react-icons/md/bluetooth-disabled.d.ts diff --git a/react-icons/md/bluetooth-searching.d.ts b/types/react-icons/md/bluetooth-searching.d.ts similarity index 100% rename from react-icons/md/bluetooth-searching.d.ts rename to types/react-icons/md/bluetooth-searching.d.ts diff --git a/react-icons/md/bluetooth.d.ts b/types/react-icons/md/bluetooth.d.ts similarity index 100% rename from react-icons/md/bluetooth.d.ts rename to types/react-icons/md/bluetooth.d.ts diff --git a/react-icons/md/blur-circular.d.ts b/types/react-icons/md/blur-circular.d.ts similarity index 100% rename from react-icons/md/blur-circular.d.ts rename to types/react-icons/md/blur-circular.d.ts diff --git a/react-icons/md/blur-linear.d.ts b/types/react-icons/md/blur-linear.d.ts similarity index 100% rename from react-icons/md/blur-linear.d.ts rename to types/react-icons/md/blur-linear.d.ts diff --git a/react-icons/md/blur-off.d.ts b/types/react-icons/md/blur-off.d.ts similarity index 100% rename from react-icons/md/blur-off.d.ts rename to types/react-icons/md/blur-off.d.ts diff --git a/react-icons/md/blur-on.d.ts b/types/react-icons/md/blur-on.d.ts similarity index 100% rename from react-icons/md/blur-on.d.ts rename to types/react-icons/md/blur-on.d.ts diff --git a/react-icons/md/book.d.ts b/types/react-icons/md/book.d.ts similarity index 100% rename from react-icons/md/book.d.ts rename to types/react-icons/md/book.d.ts diff --git a/react-icons/md/bookmark-outline.d.ts b/types/react-icons/md/bookmark-outline.d.ts similarity index 100% rename from react-icons/md/bookmark-outline.d.ts rename to types/react-icons/md/bookmark-outline.d.ts diff --git a/react-icons/md/bookmark.d.ts b/types/react-icons/md/bookmark.d.ts similarity index 100% rename from react-icons/md/bookmark.d.ts rename to types/react-icons/md/bookmark.d.ts diff --git a/react-icons/md/border-all.d.ts b/types/react-icons/md/border-all.d.ts similarity index 100% rename from react-icons/md/border-all.d.ts rename to types/react-icons/md/border-all.d.ts diff --git a/react-icons/md/border-bottom.d.ts b/types/react-icons/md/border-bottom.d.ts similarity index 100% rename from react-icons/md/border-bottom.d.ts rename to types/react-icons/md/border-bottom.d.ts diff --git a/react-icons/md/border-clear.d.ts b/types/react-icons/md/border-clear.d.ts similarity index 100% rename from react-icons/md/border-clear.d.ts rename to types/react-icons/md/border-clear.d.ts diff --git a/react-icons/md/border-color.d.ts b/types/react-icons/md/border-color.d.ts similarity index 100% rename from react-icons/md/border-color.d.ts rename to types/react-icons/md/border-color.d.ts diff --git a/react-icons/md/border-horizontal.d.ts b/types/react-icons/md/border-horizontal.d.ts similarity index 100% rename from react-icons/md/border-horizontal.d.ts rename to types/react-icons/md/border-horizontal.d.ts diff --git a/react-icons/md/border-inner.d.ts b/types/react-icons/md/border-inner.d.ts similarity index 100% rename from react-icons/md/border-inner.d.ts rename to types/react-icons/md/border-inner.d.ts diff --git a/react-icons/md/border-left.d.ts b/types/react-icons/md/border-left.d.ts similarity index 100% rename from react-icons/md/border-left.d.ts rename to types/react-icons/md/border-left.d.ts diff --git a/react-icons/md/border-outer.d.ts b/types/react-icons/md/border-outer.d.ts similarity index 100% rename from react-icons/md/border-outer.d.ts rename to types/react-icons/md/border-outer.d.ts diff --git a/react-icons/md/border-right.d.ts b/types/react-icons/md/border-right.d.ts similarity index 100% rename from react-icons/md/border-right.d.ts rename to types/react-icons/md/border-right.d.ts diff --git a/react-icons/md/border-style.d.ts b/types/react-icons/md/border-style.d.ts similarity index 100% rename from react-icons/md/border-style.d.ts rename to types/react-icons/md/border-style.d.ts diff --git a/react-icons/md/border-top.d.ts b/types/react-icons/md/border-top.d.ts similarity index 100% rename from react-icons/md/border-top.d.ts rename to types/react-icons/md/border-top.d.ts diff --git a/react-icons/md/border-vertical.d.ts b/types/react-icons/md/border-vertical.d.ts similarity index 100% rename from react-icons/md/border-vertical.d.ts rename to types/react-icons/md/border-vertical.d.ts diff --git a/react-icons/md/branding-watermark.d.ts b/types/react-icons/md/branding-watermark.d.ts similarity index 100% rename from react-icons/md/branding-watermark.d.ts rename to types/react-icons/md/branding-watermark.d.ts diff --git a/react-icons/md/brightness-1.d.ts b/types/react-icons/md/brightness-1.d.ts similarity index 100% rename from react-icons/md/brightness-1.d.ts rename to types/react-icons/md/brightness-1.d.ts diff --git a/react-icons/md/brightness-2.d.ts b/types/react-icons/md/brightness-2.d.ts similarity index 100% rename from react-icons/md/brightness-2.d.ts rename to types/react-icons/md/brightness-2.d.ts diff --git a/react-icons/md/brightness-3.d.ts b/types/react-icons/md/brightness-3.d.ts similarity index 100% rename from react-icons/md/brightness-3.d.ts rename to types/react-icons/md/brightness-3.d.ts diff --git a/react-icons/md/brightness-4.d.ts b/types/react-icons/md/brightness-4.d.ts similarity index 100% rename from react-icons/md/brightness-4.d.ts rename to types/react-icons/md/brightness-4.d.ts diff --git a/react-icons/md/brightness-5.d.ts b/types/react-icons/md/brightness-5.d.ts similarity index 100% rename from react-icons/md/brightness-5.d.ts rename to types/react-icons/md/brightness-5.d.ts diff --git a/react-icons/md/brightness-6.d.ts b/types/react-icons/md/brightness-6.d.ts similarity index 100% rename from react-icons/md/brightness-6.d.ts rename to types/react-icons/md/brightness-6.d.ts diff --git a/react-icons/md/brightness-7.d.ts b/types/react-icons/md/brightness-7.d.ts similarity index 100% rename from react-icons/md/brightness-7.d.ts rename to types/react-icons/md/brightness-7.d.ts diff --git a/react-icons/md/brightness-auto.d.ts b/types/react-icons/md/brightness-auto.d.ts similarity index 100% rename from react-icons/md/brightness-auto.d.ts rename to types/react-icons/md/brightness-auto.d.ts diff --git a/react-icons/md/brightness-high.d.ts b/types/react-icons/md/brightness-high.d.ts similarity index 100% rename from react-icons/md/brightness-high.d.ts rename to types/react-icons/md/brightness-high.d.ts diff --git a/react-icons/md/brightness-low.d.ts b/types/react-icons/md/brightness-low.d.ts similarity index 100% rename from react-icons/md/brightness-low.d.ts rename to types/react-icons/md/brightness-low.d.ts diff --git a/react-icons/md/brightness-medium.d.ts b/types/react-icons/md/brightness-medium.d.ts similarity index 100% rename from react-icons/md/brightness-medium.d.ts rename to types/react-icons/md/brightness-medium.d.ts diff --git a/react-icons/md/broken-image.d.ts b/types/react-icons/md/broken-image.d.ts similarity index 100% rename from react-icons/md/broken-image.d.ts rename to types/react-icons/md/broken-image.d.ts diff --git a/react-icons/md/brush.d.ts b/types/react-icons/md/brush.d.ts similarity index 100% rename from react-icons/md/brush.d.ts rename to types/react-icons/md/brush.d.ts diff --git a/react-icons/md/bubble-chart.d.ts b/types/react-icons/md/bubble-chart.d.ts similarity index 100% rename from react-icons/md/bubble-chart.d.ts rename to types/react-icons/md/bubble-chart.d.ts diff --git a/react-icons/md/bug-report.d.ts b/types/react-icons/md/bug-report.d.ts similarity index 100% rename from react-icons/md/bug-report.d.ts rename to types/react-icons/md/bug-report.d.ts diff --git a/react-icons/md/build.d.ts b/types/react-icons/md/build.d.ts similarity index 100% rename from react-icons/md/build.d.ts rename to types/react-icons/md/build.d.ts diff --git a/react-icons/md/burst-mode.d.ts b/types/react-icons/md/burst-mode.d.ts similarity index 100% rename from react-icons/md/burst-mode.d.ts rename to types/react-icons/md/burst-mode.d.ts diff --git a/react-icons/md/business-center.d.ts b/types/react-icons/md/business-center.d.ts similarity index 100% rename from react-icons/md/business-center.d.ts rename to types/react-icons/md/business-center.d.ts diff --git a/react-icons/md/business.d.ts b/types/react-icons/md/business.d.ts similarity index 100% rename from react-icons/md/business.d.ts rename to types/react-icons/md/business.d.ts diff --git a/react-icons/md/cached.d.ts b/types/react-icons/md/cached.d.ts similarity index 100% rename from react-icons/md/cached.d.ts rename to types/react-icons/md/cached.d.ts diff --git a/react-icons/md/cake.d.ts b/types/react-icons/md/cake.d.ts similarity index 100% rename from react-icons/md/cake.d.ts rename to types/react-icons/md/cake.d.ts diff --git a/react-icons/md/call-end.d.ts b/types/react-icons/md/call-end.d.ts similarity index 100% rename from react-icons/md/call-end.d.ts rename to types/react-icons/md/call-end.d.ts diff --git a/react-icons/md/call-made.d.ts b/types/react-icons/md/call-made.d.ts similarity index 100% rename from react-icons/md/call-made.d.ts rename to types/react-icons/md/call-made.d.ts diff --git a/react-icons/md/call-merge.d.ts b/types/react-icons/md/call-merge.d.ts similarity index 100% rename from react-icons/md/call-merge.d.ts rename to types/react-icons/md/call-merge.d.ts diff --git a/react-icons/md/call-missed-outgoing.d.ts b/types/react-icons/md/call-missed-outgoing.d.ts similarity index 100% rename from react-icons/md/call-missed-outgoing.d.ts rename to types/react-icons/md/call-missed-outgoing.d.ts diff --git a/react-icons/md/call-missed.d.ts b/types/react-icons/md/call-missed.d.ts similarity index 100% rename from react-icons/md/call-missed.d.ts rename to types/react-icons/md/call-missed.d.ts diff --git a/react-icons/md/call-received.d.ts b/types/react-icons/md/call-received.d.ts similarity index 100% rename from react-icons/md/call-received.d.ts rename to types/react-icons/md/call-received.d.ts diff --git a/react-icons/md/call-split.d.ts b/types/react-icons/md/call-split.d.ts similarity index 100% rename from react-icons/md/call-split.d.ts rename to types/react-icons/md/call-split.d.ts diff --git a/react-icons/md/call-to-action.d.ts b/types/react-icons/md/call-to-action.d.ts similarity index 100% rename from react-icons/md/call-to-action.d.ts rename to types/react-icons/md/call-to-action.d.ts diff --git a/react-icons/md/call.d.ts b/types/react-icons/md/call.d.ts similarity index 100% rename from react-icons/md/call.d.ts rename to types/react-icons/md/call.d.ts diff --git a/react-icons/md/camera-alt.d.ts b/types/react-icons/md/camera-alt.d.ts similarity index 100% rename from react-icons/md/camera-alt.d.ts rename to types/react-icons/md/camera-alt.d.ts diff --git a/react-icons/md/camera-enhance.d.ts b/types/react-icons/md/camera-enhance.d.ts similarity index 100% rename from react-icons/md/camera-enhance.d.ts rename to types/react-icons/md/camera-enhance.d.ts diff --git a/react-icons/md/camera-front.d.ts b/types/react-icons/md/camera-front.d.ts similarity index 100% rename from react-icons/md/camera-front.d.ts rename to types/react-icons/md/camera-front.d.ts diff --git a/react-icons/md/camera-rear.d.ts b/types/react-icons/md/camera-rear.d.ts similarity index 100% rename from react-icons/md/camera-rear.d.ts rename to types/react-icons/md/camera-rear.d.ts diff --git a/react-icons/md/camera-roll.d.ts b/types/react-icons/md/camera-roll.d.ts similarity index 100% rename from react-icons/md/camera-roll.d.ts rename to types/react-icons/md/camera-roll.d.ts diff --git a/react-icons/md/camera.d.ts b/types/react-icons/md/camera.d.ts similarity index 100% rename from react-icons/md/camera.d.ts rename to types/react-icons/md/camera.d.ts diff --git a/react-icons/md/cancel.d.ts b/types/react-icons/md/cancel.d.ts similarity index 100% rename from react-icons/md/cancel.d.ts rename to types/react-icons/md/cancel.d.ts diff --git a/react-icons/md/card-giftcard.d.ts b/types/react-icons/md/card-giftcard.d.ts similarity index 100% rename from react-icons/md/card-giftcard.d.ts rename to types/react-icons/md/card-giftcard.d.ts diff --git a/react-icons/md/card-membership.d.ts b/types/react-icons/md/card-membership.d.ts similarity index 100% rename from react-icons/md/card-membership.d.ts rename to types/react-icons/md/card-membership.d.ts diff --git a/react-icons/md/card-travel.d.ts b/types/react-icons/md/card-travel.d.ts similarity index 100% rename from react-icons/md/card-travel.d.ts rename to types/react-icons/md/card-travel.d.ts diff --git a/react-icons/md/casino.d.ts b/types/react-icons/md/casino.d.ts similarity index 100% rename from react-icons/md/casino.d.ts rename to types/react-icons/md/casino.d.ts diff --git a/react-icons/md/cast-connected.d.ts b/types/react-icons/md/cast-connected.d.ts similarity index 100% rename from react-icons/md/cast-connected.d.ts rename to types/react-icons/md/cast-connected.d.ts diff --git a/react-icons/md/cast.d.ts b/types/react-icons/md/cast.d.ts similarity index 100% rename from react-icons/md/cast.d.ts rename to types/react-icons/md/cast.d.ts diff --git a/react-icons/md/center-focus-strong.d.ts b/types/react-icons/md/center-focus-strong.d.ts similarity index 100% rename from react-icons/md/center-focus-strong.d.ts rename to types/react-icons/md/center-focus-strong.d.ts diff --git a/react-icons/md/center-focus-weak.d.ts b/types/react-icons/md/center-focus-weak.d.ts similarity index 100% rename from react-icons/md/center-focus-weak.d.ts rename to types/react-icons/md/center-focus-weak.d.ts diff --git a/react-icons/md/change-history.d.ts b/types/react-icons/md/change-history.d.ts similarity index 100% rename from react-icons/md/change-history.d.ts rename to types/react-icons/md/change-history.d.ts diff --git a/react-icons/md/chat-bubble-outline.d.ts b/types/react-icons/md/chat-bubble-outline.d.ts similarity index 100% rename from react-icons/md/chat-bubble-outline.d.ts rename to types/react-icons/md/chat-bubble-outline.d.ts diff --git a/react-icons/md/chat-bubble.d.ts b/types/react-icons/md/chat-bubble.d.ts similarity index 100% rename from react-icons/md/chat-bubble.d.ts rename to types/react-icons/md/chat-bubble.d.ts diff --git a/react-icons/md/chat.d.ts b/types/react-icons/md/chat.d.ts similarity index 100% rename from react-icons/md/chat.d.ts rename to types/react-icons/md/chat.d.ts diff --git a/react-icons/md/check-box-outline-blank.d.ts b/types/react-icons/md/check-box-outline-blank.d.ts similarity index 100% rename from react-icons/md/check-box-outline-blank.d.ts rename to types/react-icons/md/check-box-outline-blank.d.ts diff --git a/react-icons/md/check-box.d.ts b/types/react-icons/md/check-box.d.ts similarity index 100% rename from react-icons/md/check-box.d.ts rename to types/react-icons/md/check-box.d.ts diff --git a/react-icons/md/check-circle.d.ts b/types/react-icons/md/check-circle.d.ts similarity index 100% rename from react-icons/md/check-circle.d.ts rename to types/react-icons/md/check-circle.d.ts diff --git a/react-icons/md/check.d.ts b/types/react-icons/md/check.d.ts similarity index 100% rename from react-icons/md/check.d.ts rename to types/react-icons/md/check.d.ts diff --git a/react-icons/md/chevron-left.d.ts b/types/react-icons/md/chevron-left.d.ts similarity index 100% rename from react-icons/md/chevron-left.d.ts rename to types/react-icons/md/chevron-left.d.ts diff --git a/react-icons/md/chevron-right.d.ts b/types/react-icons/md/chevron-right.d.ts similarity index 100% rename from react-icons/md/chevron-right.d.ts rename to types/react-icons/md/chevron-right.d.ts diff --git a/react-icons/md/child-care.d.ts b/types/react-icons/md/child-care.d.ts similarity index 100% rename from react-icons/md/child-care.d.ts rename to types/react-icons/md/child-care.d.ts diff --git a/react-icons/md/child-friendly.d.ts b/types/react-icons/md/child-friendly.d.ts similarity index 100% rename from react-icons/md/child-friendly.d.ts rename to types/react-icons/md/child-friendly.d.ts diff --git a/react-icons/md/chrome-reader-mode.d.ts b/types/react-icons/md/chrome-reader-mode.d.ts similarity index 100% rename from react-icons/md/chrome-reader-mode.d.ts rename to types/react-icons/md/chrome-reader-mode.d.ts diff --git a/react-icons/md/class.d.ts b/types/react-icons/md/class.d.ts similarity index 100% rename from react-icons/md/class.d.ts rename to types/react-icons/md/class.d.ts diff --git a/react-icons/md/clear-all.d.ts b/types/react-icons/md/clear-all.d.ts similarity index 100% rename from react-icons/md/clear-all.d.ts rename to types/react-icons/md/clear-all.d.ts diff --git a/react-icons/md/clear.d.ts b/types/react-icons/md/clear.d.ts similarity index 100% rename from react-icons/md/clear.d.ts rename to types/react-icons/md/clear.d.ts diff --git a/react-icons/md/close.d.ts b/types/react-icons/md/close.d.ts similarity index 100% rename from react-icons/md/close.d.ts rename to types/react-icons/md/close.d.ts diff --git a/react-icons/md/closed-caption.d.ts b/types/react-icons/md/closed-caption.d.ts similarity index 100% rename from react-icons/md/closed-caption.d.ts rename to types/react-icons/md/closed-caption.d.ts diff --git a/react-icons/md/cloud-circle.d.ts b/types/react-icons/md/cloud-circle.d.ts similarity index 100% rename from react-icons/md/cloud-circle.d.ts rename to types/react-icons/md/cloud-circle.d.ts diff --git a/react-icons/md/cloud-done.d.ts b/types/react-icons/md/cloud-done.d.ts similarity index 100% rename from react-icons/md/cloud-done.d.ts rename to types/react-icons/md/cloud-done.d.ts diff --git a/react-icons/md/cloud-download.d.ts b/types/react-icons/md/cloud-download.d.ts similarity index 100% rename from react-icons/md/cloud-download.d.ts rename to types/react-icons/md/cloud-download.d.ts diff --git a/react-icons/md/cloud-off.d.ts b/types/react-icons/md/cloud-off.d.ts similarity index 100% rename from react-icons/md/cloud-off.d.ts rename to types/react-icons/md/cloud-off.d.ts diff --git a/react-icons/md/cloud-queue.d.ts b/types/react-icons/md/cloud-queue.d.ts similarity index 100% rename from react-icons/md/cloud-queue.d.ts rename to types/react-icons/md/cloud-queue.d.ts diff --git a/react-icons/md/cloud-upload.d.ts b/types/react-icons/md/cloud-upload.d.ts similarity index 100% rename from react-icons/md/cloud-upload.d.ts rename to types/react-icons/md/cloud-upload.d.ts diff --git a/react-icons/md/cloud.d.ts b/types/react-icons/md/cloud.d.ts similarity index 100% rename from react-icons/md/cloud.d.ts rename to types/react-icons/md/cloud.d.ts diff --git a/react-icons/md/code.d.ts b/types/react-icons/md/code.d.ts similarity index 100% rename from react-icons/md/code.d.ts rename to types/react-icons/md/code.d.ts diff --git a/react-icons/md/collections-bookmark.d.ts b/types/react-icons/md/collections-bookmark.d.ts similarity index 100% rename from react-icons/md/collections-bookmark.d.ts rename to types/react-icons/md/collections-bookmark.d.ts diff --git a/react-icons/md/collections.d.ts b/types/react-icons/md/collections.d.ts similarity index 100% rename from react-icons/md/collections.d.ts rename to types/react-icons/md/collections.d.ts diff --git a/react-icons/md/color-lens.d.ts b/types/react-icons/md/color-lens.d.ts similarity index 100% rename from react-icons/md/color-lens.d.ts rename to types/react-icons/md/color-lens.d.ts diff --git a/react-icons/md/colorize.d.ts b/types/react-icons/md/colorize.d.ts similarity index 100% rename from react-icons/md/colorize.d.ts rename to types/react-icons/md/colorize.d.ts diff --git a/react-icons/md/comment.d.ts b/types/react-icons/md/comment.d.ts similarity index 100% rename from react-icons/md/comment.d.ts rename to types/react-icons/md/comment.d.ts diff --git a/react-icons/md/compare-arrows.d.ts b/types/react-icons/md/compare-arrows.d.ts similarity index 100% rename from react-icons/md/compare-arrows.d.ts rename to types/react-icons/md/compare-arrows.d.ts diff --git a/react-icons/md/compare.d.ts b/types/react-icons/md/compare.d.ts similarity index 100% rename from react-icons/md/compare.d.ts rename to types/react-icons/md/compare.d.ts diff --git a/react-icons/md/computer.d.ts b/types/react-icons/md/computer.d.ts similarity index 100% rename from react-icons/md/computer.d.ts rename to types/react-icons/md/computer.d.ts diff --git a/react-icons/md/confirmation-number.d.ts b/types/react-icons/md/confirmation-number.d.ts similarity index 100% rename from react-icons/md/confirmation-number.d.ts rename to types/react-icons/md/confirmation-number.d.ts diff --git a/react-icons/md/contact-mail.d.ts b/types/react-icons/md/contact-mail.d.ts similarity index 100% rename from react-icons/md/contact-mail.d.ts rename to types/react-icons/md/contact-mail.d.ts diff --git a/react-icons/md/contact-phone.d.ts b/types/react-icons/md/contact-phone.d.ts similarity index 100% rename from react-icons/md/contact-phone.d.ts rename to types/react-icons/md/contact-phone.d.ts diff --git a/react-icons/md/contacts.d.ts b/types/react-icons/md/contacts.d.ts similarity index 100% rename from react-icons/md/contacts.d.ts rename to types/react-icons/md/contacts.d.ts diff --git a/react-icons/md/content-copy.d.ts b/types/react-icons/md/content-copy.d.ts similarity index 100% rename from react-icons/md/content-copy.d.ts rename to types/react-icons/md/content-copy.d.ts diff --git a/react-icons/md/content-cut.d.ts b/types/react-icons/md/content-cut.d.ts similarity index 100% rename from react-icons/md/content-cut.d.ts rename to types/react-icons/md/content-cut.d.ts diff --git a/react-icons/md/content-paste.d.ts b/types/react-icons/md/content-paste.d.ts similarity index 100% rename from react-icons/md/content-paste.d.ts rename to types/react-icons/md/content-paste.d.ts diff --git a/react-icons/md/control-point-duplicate.d.ts b/types/react-icons/md/control-point-duplicate.d.ts similarity index 100% rename from react-icons/md/control-point-duplicate.d.ts rename to types/react-icons/md/control-point-duplicate.d.ts diff --git a/react-icons/md/control-point.d.ts b/types/react-icons/md/control-point.d.ts similarity index 100% rename from react-icons/md/control-point.d.ts rename to types/react-icons/md/control-point.d.ts diff --git a/react-icons/md/copyright.d.ts b/types/react-icons/md/copyright.d.ts similarity index 100% rename from react-icons/md/copyright.d.ts rename to types/react-icons/md/copyright.d.ts diff --git a/react-icons/md/create-new-folder.d.ts b/types/react-icons/md/create-new-folder.d.ts similarity index 100% rename from react-icons/md/create-new-folder.d.ts rename to types/react-icons/md/create-new-folder.d.ts diff --git a/react-icons/md/create.d.ts b/types/react-icons/md/create.d.ts similarity index 100% rename from react-icons/md/create.d.ts rename to types/react-icons/md/create.d.ts diff --git a/react-icons/md/credit-card.d.ts b/types/react-icons/md/credit-card.d.ts similarity index 100% rename from react-icons/md/credit-card.d.ts rename to types/react-icons/md/credit-card.d.ts diff --git a/react-icons/md/crop-16-9.d.ts b/types/react-icons/md/crop-16-9.d.ts similarity index 100% rename from react-icons/md/crop-16-9.d.ts rename to types/react-icons/md/crop-16-9.d.ts diff --git a/react-icons/md/crop-3-2.d.ts b/types/react-icons/md/crop-3-2.d.ts similarity index 100% rename from react-icons/md/crop-3-2.d.ts rename to types/react-icons/md/crop-3-2.d.ts diff --git a/react-icons/md/crop-5-4.d.ts b/types/react-icons/md/crop-5-4.d.ts similarity index 100% rename from react-icons/md/crop-5-4.d.ts rename to types/react-icons/md/crop-5-4.d.ts diff --git a/react-icons/md/crop-7-5.d.ts b/types/react-icons/md/crop-7-5.d.ts similarity index 100% rename from react-icons/md/crop-7-5.d.ts rename to types/react-icons/md/crop-7-5.d.ts diff --git a/react-icons/md/crop-din.d.ts b/types/react-icons/md/crop-din.d.ts similarity index 100% rename from react-icons/md/crop-din.d.ts rename to types/react-icons/md/crop-din.d.ts diff --git a/react-icons/md/crop-free.d.ts b/types/react-icons/md/crop-free.d.ts similarity index 100% rename from react-icons/md/crop-free.d.ts rename to types/react-icons/md/crop-free.d.ts diff --git a/react-icons/md/crop-landscape.d.ts b/types/react-icons/md/crop-landscape.d.ts similarity index 100% rename from react-icons/md/crop-landscape.d.ts rename to types/react-icons/md/crop-landscape.d.ts diff --git a/react-icons/md/crop-original.d.ts b/types/react-icons/md/crop-original.d.ts similarity index 100% rename from react-icons/md/crop-original.d.ts rename to types/react-icons/md/crop-original.d.ts diff --git a/react-icons/md/crop-portrait.d.ts b/types/react-icons/md/crop-portrait.d.ts similarity index 100% rename from react-icons/md/crop-portrait.d.ts rename to types/react-icons/md/crop-portrait.d.ts diff --git a/react-icons/md/crop-rotate.d.ts b/types/react-icons/md/crop-rotate.d.ts similarity index 100% rename from react-icons/md/crop-rotate.d.ts rename to types/react-icons/md/crop-rotate.d.ts diff --git a/react-icons/md/crop-square.d.ts b/types/react-icons/md/crop-square.d.ts similarity index 100% rename from react-icons/md/crop-square.d.ts rename to types/react-icons/md/crop-square.d.ts diff --git a/react-icons/md/crop.d.ts b/types/react-icons/md/crop.d.ts similarity index 100% rename from react-icons/md/crop.d.ts rename to types/react-icons/md/crop.d.ts diff --git a/react-icons/md/dashboard.d.ts b/types/react-icons/md/dashboard.d.ts similarity index 100% rename from react-icons/md/dashboard.d.ts rename to types/react-icons/md/dashboard.d.ts diff --git a/react-icons/md/data-usage.d.ts b/types/react-icons/md/data-usage.d.ts similarity index 100% rename from react-icons/md/data-usage.d.ts rename to types/react-icons/md/data-usage.d.ts diff --git a/react-icons/md/date-range.d.ts b/types/react-icons/md/date-range.d.ts similarity index 100% rename from react-icons/md/date-range.d.ts rename to types/react-icons/md/date-range.d.ts diff --git a/react-icons/md/dehaze.d.ts b/types/react-icons/md/dehaze.d.ts similarity index 100% rename from react-icons/md/dehaze.d.ts rename to types/react-icons/md/dehaze.d.ts diff --git a/react-icons/md/delete-forever.d.ts b/types/react-icons/md/delete-forever.d.ts similarity index 100% rename from react-icons/md/delete-forever.d.ts rename to types/react-icons/md/delete-forever.d.ts diff --git a/react-icons/md/delete-sweep.d.ts b/types/react-icons/md/delete-sweep.d.ts similarity index 100% rename from react-icons/md/delete-sweep.d.ts rename to types/react-icons/md/delete-sweep.d.ts diff --git a/react-icons/md/delete.d.ts b/types/react-icons/md/delete.d.ts similarity index 100% rename from react-icons/md/delete.d.ts rename to types/react-icons/md/delete.d.ts diff --git a/react-icons/md/description.d.ts b/types/react-icons/md/description.d.ts similarity index 100% rename from react-icons/md/description.d.ts rename to types/react-icons/md/description.d.ts diff --git a/react-icons/md/desktop-mac.d.ts b/types/react-icons/md/desktop-mac.d.ts similarity index 100% rename from react-icons/md/desktop-mac.d.ts rename to types/react-icons/md/desktop-mac.d.ts diff --git a/react-icons/md/desktop-windows.d.ts b/types/react-icons/md/desktop-windows.d.ts similarity index 100% rename from react-icons/md/desktop-windows.d.ts rename to types/react-icons/md/desktop-windows.d.ts diff --git a/react-icons/md/details.d.ts b/types/react-icons/md/details.d.ts similarity index 100% rename from react-icons/md/details.d.ts rename to types/react-icons/md/details.d.ts diff --git a/react-icons/md/developer-board.d.ts b/types/react-icons/md/developer-board.d.ts similarity index 100% rename from react-icons/md/developer-board.d.ts rename to types/react-icons/md/developer-board.d.ts diff --git a/react-icons/md/developer-mode.d.ts b/types/react-icons/md/developer-mode.d.ts similarity index 100% rename from react-icons/md/developer-mode.d.ts rename to types/react-icons/md/developer-mode.d.ts diff --git a/react-icons/md/device-hub.d.ts b/types/react-icons/md/device-hub.d.ts similarity index 100% rename from react-icons/md/device-hub.d.ts rename to types/react-icons/md/device-hub.d.ts diff --git a/react-icons/md/devices-other.d.ts b/types/react-icons/md/devices-other.d.ts similarity index 100% rename from react-icons/md/devices-other.d.ts rename to types/react-icons/md/devices-other.d.ts diff --git a/react-icons/md/devices.d.ts b/types/react-icons/md/devices.d.ts similarity index 100% rename from react-icons/md/devices.d.ts rename to types/react-icons/md/devices.d.ts diff --git a/react-icons/md/dialer-sip.d.ts b/types/react-icons/md/dialer-sip.d.ts similarity index 100% rename from react-icons/md/dialer-sip.d.ts rename to types/react-icons/md/dialer-sip.d.ts diff --git a/react-icons/md/dialpad.d.ts b/types/react-icons/md/dialpad.d.ts similarity index 100% rename from react-icons/md/dialpad.d.ts rename to types/react-icons/md/dialpad.d.ts diff --git a/react-icons/md/directions-bike.d.ts b/types/react-icons/md/directions-bike.d.ts similarity index 100% rename from react-icons/md/directions-bike.d.ts rename to types/react-icons/md/directions-bike.d.ts diff --git a/react-icons/md/directions-boat.d.ts b/types/react-icons/md/directions-boat.d.ts similarity index 100% rename from react-icons/md/directions-boat.d.ts rename to types/react-icons/md/directions-boat.d.ts diff --git a/react-icons/md/directions-bus.d.ts b/types/react-icons/md/directions-bus.d.ts similarity index 100% rename from react-icons/md/directions-bus.d.ts rename to types/react-icons/md/directions-bus.d.ts diff --git a/react-icons/md/directions-car.d.ts b/types/react-icons/md/directions-car.d.ts similarity index 100% rename from react-icons/md/directions-car.d.ts rename to types/react-icons/md/directions-car.d.ts diff --git a/react-icons/md/directions-ferry.d.ts b/types/react-icons/md/directions-ferry.d.ts similarity index 100% rename from react-icons/md/directions-ferry.d.ts rename to types/react-icons/md/directions-ferry.d.ts diff --git a/react-icons/md/directions-railway.d.ts b/types/react-icons/md/directions-railway.d.ts similarity index 100% rename from react-icons/md/directions-railway.d.ts rename to types/react-icons/md/directions-railway.d.ts diff --git a/react-icons/md/directions-run.d.ts b/types/react-icons/md/directions-run.d.ts similarity index 100% rename from react-icons/md/directions-run.d.ts rename to types/react-icons/md/directions-run.d.ts diff --git a/react-icons/md/directions-subway.d.ts b/types/react-icons/md/directions-subway.d.ts similarity index 100% rename from react-icons/md/directions-subway.d.ts rename to types/react-icons/md/directions-subway.d.ts diff --git a/react-icons/md/directions-transit.d.ts b/types/react-icons/md/directions-transit.d.ts similarity index 100% rename from react-icons/md/directions-transit.d.ts rename to types/react-icons/md/directions-transit.d.ts diff --git a/react-icons/md/directions-walk.d.ts b/types/react-icons/md/directions-walk.d.ts similarity index 100% rename from react-icons/md/directions-walk.d.ts rename to types/react-icons/md/directions-walk.d.ts diff --git a/react-icons/md/directions.d.ts b/types/react-icons/md/directions.d.ts similarity index 100% rename from react-icons/md/directions.d.ts rename to types/react-icons/md/directions.d.ts diff --git a/react-icons/md/disc-full.d.ts b/types/react-icons/md/disc-full.d.ts similarity index 100% rename from react-icons/md/disc-full.d.ts rename to types/react-icons/md/disc-full.d.ts diff --git a/react-icons/md/dns.d.ts b/types/react-icons/md/dns.d.ts similarity index 100% rename from react-icons/md/dns.d.ts rename to types/react-icons/md/dns.d.ts diff --git a/react-icons/md/do-not-disturb-alt.d.ts b/types/react-icons/md/do-not-disturb-alt.d.ts similarity index 100% rename from react-icons/md/do-not-disturb-alt.d.ts rename to types/react-icons/md/do-not-disturb-alt.d.ts diff --git a/react-icons/md/do-not-disturb-off.d.ts b/types/react-icons/md/do-not-disturb-off.d.ts similarity index 100% rename from react-icons/md/do-not-disturb-off.d.ts rename to types/react-icons/md/do-not-disturb-off.d.ts diff --git a/react-icons/md/do-not-disturb.d.ts b/types/react-icons/md/do-not-disturb.d.ts similarity index 100% rename from react-icons/md/do-not-disturb.d.ts rename to types/react-icons/md/do-not-disturb.d.ts diff --git a/react-icons/md/dock.d.ts b/types/react-icons/md/dock.d.ts similarity index 100% rename from react-icons/md/dock.d.ts rename to types/react-icons/md/dock.d.ts diff --git a/react-icons/md/domain.d.ts b/types/react-icons/md/domain.d.ts similarity index 100% rename from react-icons/md/domain.d.ts rename to types/react-icons/md/domain.d.ts diff --git a/react-icons/md/done-all.d.ts b/types/react-icons/md/done-all.d.ts similarity index 100% rename from react-icons/md/done-all.d.ts rename to types/react-icons/md/done-all.d.ts diff --git a/react-icons/md/done.d.ts b/types/react-icons/md/done.d.ts similarity index 100% rename from react-icons/md/done.d.ts rename to types/react-icons/md/done.d.ts diff --git a/react-icons/md/donut-large.d.ts b/types/react-icons/md/donut-large.d.ts similarity index 100% rename from react-icons/md/donut-large.d.ts rename to types/react-icons/md/donut-large.d.ts diff --git a/react-icons/md/donut-small.d.ts b/types/react-icons/md/donut-small.d.ts similarity index 100% rename from react-icons/md/donut-small.d.ts rename to types/react-icons/md/donut-small.d.ts diff --git a/react-icons/md/drafts.d.ts b/types/react-icons/md/drafts.d.ts similarity index 100% rename from react-icons/md/drafts.d.ts rename to types/react-icons/md/drafts.d.ts diff --git a/react-icons/md/drag-handle.d.ts b/types/react-icons/md/drag-handle.d.ts similarity index 100% rename from react-icons/md/drag-handle.d.ts rename to types/react-icons/md/drag-handle.d.ts diff --git a/react-icons/md/drive-eta.d.ts b/types/react-icons/md/drive-eta.d.ts similarity index 100% rename from react-icons/md/drive-eta.d.ts rename to types/react-icons/md/drive-eta.d.ts diff --git a/react-icons/md/dvr.d.ts b/types/react-icons/md/dvr.d.ts similarity index 100% rename from react-icons/md/dvr.d.ts rename to types/react-icons/md/dvr.d.ts diff --git a/react-icons/md/edit-location.d.ts b/types/react-icons/md/edit-location.d.ts similarity index 100% rename from react-icons/md/edit-location.d.ts rename to types/react-icons/md/edit-location.d.ts diff --git a/react-icons/md/edit.d.ts b/types/react-icons/md/edit.d.ts similarity index 100% rename from react-icons/md/edit.d.ts rename to types/react-icons/md/edit.d.ts diff --git a/react-icons/md/eject.d.ts b/types/react-icons/md/eject.d.ts similarity index 100% rename from react-icons/md/eject.d.ts rename to types/react-icons/md/eject.d.ts diff --git a/react-icons/md/email.d.ts b/types/react-icons/md/email.d.ts similarity index 100% rename from react-icons/md/email.d.ts rename to types/react-icons/md/email.d.ts diff --git a/react-icons/md/enhanced-encryption.d.ts b/types/react-icons/md/enhanced-encryption.d.ts similarity index 100% rename from react-icons/md/enhanced-encryption.d.ts rename to types/react-icons/md/enhanced-encryption.d.ts diff --git a/react-icons/md/equalizer.d.ts b/types/react-icons/md/equalizer.d.ts similarity index 100% rename from react-icons/md/equalizer.d.ts rename to types/react-icons/md/equalizer.d.ts diff --git a/react-icons/md/error-outline.d.ts b/types/react-icons/md/error-outline.d.ts similarity index 100% rename from react-icons/md/error-outline.d.ts rename to types/react-icons/md/error-outline.d.ts diff --git a/react-icons/md/error.d.ts b/types/react-icons/md/error.d.ts similarity index 100% rename from react-icons/md/error.d.ts rename to types/react-icons/md/error.d.ts diff --git a/react-icons/md/euro-symbol.d.ts b/types/react-icons/md/euro-symbol.d.ts similarity index 100% rename from react-icons/md/euro-symbol.d.ts rename to types/react-icons/md/euro-symbol.d.ts diff --git a/react-icons/md/ev-station.d.ts b/types/react-icons/md/ev-station.d.ts similarity index 100% rename from react-icons/md/ev-station.d.ts rename to types/react-icons/md/ev-station.d.ts diff --git a/react-icons/md/event-available.d.ts b/types/react-icons/md/event-available.d.ts similarity index 100% rename from react-icons/md/event-available.d.ts rename to types/react-icons/md/event-available.d.ts diff --git a/react-icons/md/event-busy.d.ts b/types/react-icons/md/event-busy.d.ts similarity index 100% rename from react-icons/md/event-busy.d.ts rename to types/react-icons/md/event-busy.d.ts diff --git a/react-icons/md/event-note.d.ts b/types/react-icons/md/event-note.d.ts similarity index 100% rename from react-icons/md/event-note.d.ts rename to types/react-icons/md/event-note.d.ts diff --git a/react-icons/md/event-seat.d.ts b/types/react-icons/md/event-seat.d.ts similarity index 100% rename from react-icons/md/event-seat.d.ts rename to types/react-icons/md/event-seat.d.ts diff --git a/react-icons/md/event.d.ts b/types/react-icons/md/event.d.ts similarity index 100% rename from react-icons/md/event.d.ts rename to types/react-icons/md/event.d.ts diff --git a/react-icons/md/exit-to-app.d.ts b/types/react-icons/md/exit-to-app.d.ts similarity index 100% rename from react-icons/md/exit-to-app.d.ts rename to types/react-icons/md/exit-to-app.d.ts diff --git a/react-icons/md/expand-less.d.ts b/types/react-icons/md/expand-less.d.ts similarity index 100% rename from react-icons/md/expand-less.d.ts rename to types/react-icons/md/expand-less.d.ts diff --git a/react-icons/md/expand-more.d.ts b/types/react-icons/md/expand-more.d.ts similarity index 100% rename from react-icons/md/expand-more.d.ts rename to types/react-icons/md/expand-more.d.ts diff --git a/react-icons/md/explicit.d.ts b/types/react-icons/md/explicit.d.ts similarity index 100% rename from react-icons/md/explicit.d.ts rename to types/react-icons/md/explicit.d.ts diff --git a/react-icons/md/explore.d.ts b/types/react-icons/md/explore.d.ts similarity index 100% rename from react-icons/md/explore.d.ts rename to types/react-icons/md/explore.d.ts diff --git a/react-icons/md/exposure-minus-1.d.ts b/types/react-icons/md/exposure-minus-1.d.ts similarity index 100% rename from react-icons/md/exposure-minus-1.d.ts rename to types/react-icons/md/exposure-minus-1.d.ts diff --git a/react-icons/md/exposure-minus-2.d.ts b/types/react-icons/md/exposure-minus-2.d.ts similarity index 100% rename from react-icons/md/exposure-minus-2.d.ts rename to types/react-icons/md/exposure-minus-2.d.ts diff --git a/react-icons/md/exposure-neg-1.d.ts b/types/react-icons/md/exposure-neg-1.d.ts similarity index 100% rename from react-icons/md/exposure-neg-1.d.ts rename to types/react-icons/md/exposure-neg-1.d.ts diff --git a/react-icons/md/exposure-neg-2.d.ts b/types/react-icons/md/exposure-neg-2.d.ts similarity index 100% rename from react-icons/md/exposure-neg-2.d.ts rename to types/react-icons/md/exposure-neg-2.d.ts diff --git a/react-icons/md/exposure-plus-1.d.ts b/types/react-icons/md/exposure-plus-1.d.ts similarity index 100% rename from react-icons/md/exposure-plus-1.d.ts rename to types/react-icons/md/exposure-plus-1.d.ts diff --git a/react-icons/md/exposure-plus-2.d.ts b/types/react-icons/md/exposure-plus-2.d.ts similarity index 100% rename from react-icons/md/exposure-plus-2.d.ts rename to types/react-icons/md/exposure-plus-2.d.ts diff --git a/react-icons/md/exposure-zero.d.ts b/types/react-icons/md/exposure-zero.d.ts similarity index 100% rename from react-icons/md/exposure-zero.d.ts rename to types/react-icons/md/exposure-zero.d.ts diff --git a/react-icons/md/exposure.d.ts b/types/react-icons/md/exposure.d.ts similarity index 100% rename from react-icons/md/exposure.d.ts rename to types/react-icons/md/exposure.d.ts diff --git a/react-icons/md/extension.d.ts b/types/react-icons/md/extension.d.ts similarity index 100% rename from react-icons/md/extension.d.ts rename to types/react-icons/md/extension.d.ts diff --git a/react-icons/md/face.d.ts b/types/react-icons/md/face.d.ts similarity index 100% rename from react-icons/md/face.d.ts rename to types/react-icons/md/face.d.ts diff --git a/react-icons/md/fast-forward.d.ts b/types/react-icons/md/fast-forward.d.ts similarity index 100% rename from react-icons/md/fast-forward.d.ts rename to types/react-icons/md/fast-forward.d.ts diff --git a/react-icons/md/fast-rewind.d.ts b/types/react-icons/md/fast-rewind.d.ts similarity index 100% rename from react-icons/md/fast-rewind.d.ts rename to types/react-icons/md/fast-rewind.d.ts diff --git a/react-icons/md/favorite-border.d.ts b/types/react-icons/md/favorite-border.d.ts similarity index 100% rename from react-icons/md/favorite-border.d.ts rename to types/react-icons/md/favorite-border.d.ts diff --git a/react-icons/md/favorite-outline.d.ts b/types/react-icons/md/favorite-outline.d.ts similarity index 100% rename from react-icons/md/favorite-outline.d.ts rename to types/react-icons/md/favorite-outline.d.ts diff --git a/react-icons/md/favorite.d.ts b/types/react-icons/md/favorite.d.ts similarity index 100% rename from react-icons/md/favorite.d.ts rename to types/react-icons/md/favorite.d.ts diff --git a/react-icons/md/featured-play-list.d.ts b/types/react-icons/md/featured-play-list.d.ts similarity index 100% rename from react-icons/md/featured-play-list.d.ts rename to types/react-icons/md/featured-play-list.d.ts diff --git a/react-icons/md/featured-video.d.ts b/types/react-icons/md/featured-video.d.ts similarity index 100% rename from react-icons/md/featured-video.d.ts rename to types/react-icons/md/featured-video.d.ts diff --git a/react-icons/md/feedback.d.ts b/types/react-icons/md/feedback.d.ts similarity index 100% rename from react-icons/md/feedback.d.ts rename to types/react-icons/md/feedback.d.ts diff --git a/react-icons/md/fiber-dvr.d.ts b/types/react-icons/md/fiber-dvr.d.ts similarity index 100% rename from react-icons/md/fiber-dvr.d.ts rename to types/react-icons/md/fiber-dvr.d.ts diff --git a/react-icons/md/fiber-manual-record.d.ts b/types/react-icons/md/fiber-manual-record.d.ts similarity index 100% rename from react-icons/md/fiber-manual-record.d.ts rename to types/react-icons/md/fiber-manual-record.d.ts diff --git a/react-icons/md/fiber-new.d.ts b/types/react-icons/md/fiber-new.d.ts similarity index 100% rename from react-icons/md/fiber-new.d.ts rename to types/react-icons/md/fiber-new.d.ts diff --git a/react-icons/md/fiber-pin.d.ts b/types/react-icons/md/fiber-pin.d.ts similarity index 100% rename from react-icons/md/fiber-pin.d.ts rename to types/react-icons/md/fiber-pin.d.ts diff --git a/react-icons/md/fiber-smart-record.d.ts b/types/react-icons/md/fiber-smart-record.d.ts similarity index 100% rename from react-icons/md/fiber-smart-record.d.ts rename to types/react-icons/md/fiber-smart-record.d.ts diff --git a/react-icons/md/file-download.d.ts b/types/react-icons/md/file-download.d.ts similarity index 100% rename from react-icons/md/file-download.d.ts rename to types/react-icons/md/file-download.d.ts diff --git a/react-icons/md/file-upload.d.ts b/types/react-icons/md/file-upload.d.ts similarity index 100% rename from react-icons/md/file-upload.d.ts rename to types/react-icons/md/file-upload.d.ts diff --git a/react-icons/md/filter-1.d.ts b/types/react-icons/md/filter-1.d.ts similarity index 100% rename from react-icons/md/filter-1.d.ts rename to types/react-icons/md/filter-1.d.ts diff --git a/react-icons/md/filter-2.d.ts b/types/react-icons/md/filter-2.d.ts similarity index 100% rename from react-icons/md/filter-2.d.ts rename to types/react-icons/md/filter-2.d.ts diff --git a/react-icons/md/filter-3.d.ts b/types/react-icons/md/filter-3.d.ts similarity index 100% rename from react-icons/md/filter-3.d.ts rename to types/react-icons/md/filter-3.d.ts diff --git a/react-icons/md/filter-4.d.ts b/types/react-icons/md/filter-4.d.ts similarity index 100% rename from react-icons/md/filter-4.d.ts rename to types/react-icons/md/filter-4.d.ts diff --git a/react-icons/md/filter-5.d.ts b/types/react-icons/md/filter-5.d.ts similarity index 100% rename from react-icons/md/filter-5.d.ts rename to types/react-icons/md/filter-5.d.ts diff --git a/react-icons/md/filter-6.d.ts b/types/react-icons/md/filter-6.d.ts similarity index 100% rename from react-icons/md/filter-6.d.ts rename to types/react-icons/md/filter-6.d.ts diff --git a/react-icons/md/filter-7.d.ts b/types/react-icons/md/filter-7.d.ts similarity index 100% rename from react-icons/md/filter-7.d.ts rename to types/react-icons/md/filter-7.d.ts diff --git a/react-icons/md/filter-8.d.ts b/types/react-icons/md/filter-8.d.ts similarity index 100% rename from react-icons/md/filter-8.d.ts rename to types/react-icons/md/filter-8.d.ts diff --git a/react-icons/md/filter-9-plus.d.ts b/types/react-icons/md/filter-9-plus.d.ts similarity index 100% rename from react-icons/md/filter-9-plus.d.ts rename to types/react-icons/md/filter-9-plus.d.ts diff --git a/react-icons/md/filter-9.d.ts b/types/react-icons/md/filter-9.d.ts similarity index 100% rename from react-icons/md/filter-9.d.ts rename to types/react-icons/md/filter-9.d.ts diff --git a/react-icons/md/filter-b-and-w.d.ts b/types/react-icons/md/filter-b-and-w.d.ts similarity index 100% rename from react-icons/md/filter-b-and-w.d.ts rename to types/react-icons/md/filter-b-and-w.d.ts diff --git a/react-icons/md/filter-center-focus.d.ts b/types/react-icons/md/filter-center-focus.d.ts similarity index 100% rename from react-icons/md/filter-center-focus.d.ts rename to types/react-icons/md/filter-center-focus.d.ts diff --git a/react-icons/md/filter-drama.d.ts b/types/react-icons/md/filter-drama.d.ts similarity index 100% rename from react-icons/md/filter-drama.d.ts rename to types/react-icons/md/filter-drama.d.ts diff --git a/react-icons/md/filter-frames.d.ts b/types/react-icons/md/filter-frames.d.ts similarity index 100% rename from react-icons/md/filter-frames.d.ts rename to types/react-icons/md/filter-frames.d.ts diff --git a/react-icons/md/filter-hdr.d.ts b/types/react-icons/md/filter-hdr.d.ts similarity index 100% rename from react-icons/md/filter-hdr.d.ts rename to types/react-icons/md/filter-hdr.d.ts diff --git a/react-icons/md/filter-list.d.ts b/types/react-icons/md/filter-list.d.ts similarity index 100% rename from react-icons/md/filter-list.d.ts rename to types/react-icons/md/filter-list.d.ts diff --git a/react-icons/md/filter-none.d.ts b/types/react-icons/md/filter-none.d.ts similarity index 100% rename from react-icons/md/filter-none.d.ts rename to types/react-icons/md/filter-none.d.ts diff --git a/react-icons/md/filter-tilt-shift.d.ts b/types/react-icons/md/filter-tilt-shift.d.ts similarity index 100% rename from react-icons/md/filter-tilt-shift.d.ts rename to types/react-icons/md/filter-tilt-shift.d.ts diff --git a/react-icons/md/filter-vintage.d.ts b/types/react-icons/md/filter-vintage.d.ts similarity index 100% rename from react-icons/md/filter-vintage.d.ts rename to types/react-icons/md/filter-vintage.d.ts diff --git a/react-icons/md/filter.d.ts b/types/react-icons/md/filter.d.ts similarity index 100% rename from react-icons/md/filter.d.ts rename to types/react-icons/md/filter.d.ts diff --git a/react-icons/md/find-in-page.d.ts b/types/react-icons/md/find-in-page.d.ts similarity index 100% rename from react-icons/md/find-in-page.d.ts rename to types/react-icons/md/find-in-page.d.ts diff --git a/react-icons/md/find-replace.d.ts b/types/react-icons/md/find-replace.d.ts similarity index 100% rename from react-icons/md/find-replace.d.ts rename to types/react-icons/md/find-replace.d.ts diff --git a/react-icons/md/fingerprint.d.ts b/types/react-icons/md/fingerprint.d.ts similarity index 100% rename from react-icons/md/fingerprint.d.ts rename to types/react-icons/md/fingerprint.d.ts diff --git a/react-icons/md/first-page.d.ts b/types/react-icons/md/first-page.d.ts similarity index 100% rename from react-icons/md/first-page.d.ts rename to types/react-icons/md/first-page.d.ts diff --git a/react-icons/md/fitness-center.d.ts b/types/react-icons/md/fitness-center.d.ts similarity index 100% rename from react-icons/md/fitness-center.d.ts rename to types/react-icons/md/fitness-center.d.ts diff --git a/react-icons/md/flag.d.ts b/types/react-icons/md/flag.d.ts similarity index 100% rename from react-icons/md/flag.d.ts rename to types/react-icons/md/flag.d.ts diff --git a/react-icons/md/flare.d.ts b/types/react-icons/md/flare.d.ts similarity index 100% rename from react-icons/md/flare.d.ts rename to types/react-icons/md/flare.d.ts diff --git a/react-icons/md/flash-auto.d.ts b/types/react-icons/md/flash-auto.d.ts similarity index 100% rename from react-icons/md/flash-auto.d.ts rename to types/react-icons/md/flash-auto.d.ts diff --git a/react-icons/md/flash-off.d.ts b/types/react-icons/md/flash-off.d.ts similarity index 100% rename from react-icons/md/flash-off.d.ts rename to types/react-icons/md/flash-off.d.ts diff --git a/react-icons/md/flash-on.d.ts b/types/react-icons/md/flash-on.d.ts similarity index 100% rename from react-icons/md/flash-on.d.ts rename to types/react-icons/md/flash-on.d.ts diff --git a/react-icons/md/flight-land.d.ts b/types/react-icons/md/flight-land.d.ts similarity index 100% rename from react-icons/md/flight-land.d.ts rename to types/react-icons/md/flight-land.d.ts diff --git a/react-icons/md/flight-takeoff.d.ts b/types/react-icons/md/flight-takeoff.d.ts similarity index 100% rename from react-icons/md/flight-takeoff.d.ts rename to types/react-icons/md/flight-takeoff.d.ts diff --git a/react-icons/md/flight.d.ts b/types/react-icons/md/flight.d.ts similarity index 100% rename from react-icons/md/flight.d.ts rename to types/react-icons/md/flight.d.ts diff --git a/react-icons/md/flip-to-back.d.ts b/types/react-icons/md/flip-to-back.d.ts similarity index 100% rename from react-icons/md/flip-to-back.d.ts rename to types/react-icons/md/flip-to-back.d.ts diff --git a/react-icons/md/flip-to-front.d.ts b/types/react-icons/md/flip-to-front.d.ts similarity index 100% rename from react-icons/md/flip-to-front.d.ts rename to types/react-icons/md/flip-to-front.d.ts diff --git a/react-icons/md/flip.d.ts b/types/react-icons/md/flip.d.ts similarity index 100% rename from react-icons/md/flip.d.ts rename to types/react-icons/md/flip.d.ts diff --git a/react-icons/md/folder-open.d.ts b/types/react-icons/md/folder-open.d.ts similarity index 100% rename from react-icons/md/folder-open.d.ts rename to types/react-icons/md/folder-open.d.ts diff --git a/react-icons/md/folder-shared.d.ts b/types/react-icons/md/folder-shared.d.ts similarity index 100% rename from react-icons/md/folder-shared.d.ts rename to types/react-icons/md/folder-shared.d.ts diff --git a/react-icons/md/folder-special.d.ts b/types/react-icons/md/folder-special.d.ts similarity index 100% rename from react-icons/md/folder-special.d.ts rename to types/react-icons/md/folder-special.d.ts diff --git a/react-icons/md/folder.d.ts b/types/react-icons/md/folder.d.ts similarity index 100% rename from react-icons/md/folder.d.ts rename to types/react-icons/md/folder.d.ts diff --git a/react-icons/md/font-download.d.ts b/types/react-icons/md/font-download.d.ts similarity index 100% rename from react-icons/md/font-download.d.ts rename to types/react-icons/md/font-download.d.ts diff --git a/react-icons/md/format-align-center.d.ts b/types/react-icons/md/format-align-center.d.ts similarity index 100% rename from react-icons/md/format-align-center.d.ts rename to types/react-icons/md/format-align-center.d.ts diff --git a/react-icons/md/format-align-justify.d.ts b/types/react-icons/md/format-align-justify.d.ts similarity index 100% rename from react-icons/md/format-align-justify.d.ts rename to types/react-icons/md/format-align-justify.d.ts diff --git a/react-icons/md/format-align-left.d.ts b/types/react-icons/md/format-align-left.d.ts similarity index 100% rename from react-icons/md/format-align-left.d.ts rename to types/react-icons/md/format-align-left.d.ts diff --git a/react-icons/md/format-align-right.d.ts b/types/react-icons/md/format-align-right.d.ts similarity index 100% rename from react-icons/md/format-align-right.d.ts rename to types/react-icons/md/format-align-right.d.ts diff --git a/react-icons/md/format-bold.d.ts b/types/react-icons/md/format-bold.d.ts similarity index 100% rename from react-icons/md/format-bold.d.ts rename to types/react-icons/md/format-bold.d.ts diff --git a/react-icons/md/format-clear.d.ts b/types/react-icons/md/format-clear.d.ts similarity index 100% rename from react-icons/md/format-clear.d.ts rename to types/react-icons/md/format-clear.d.ts diff --git a/react-icons/md/format-color-fill.d.ts b/types/react-icons/md/format-color-fill.d.ts similarity index 100% rename from react-icons/md/format-color-fill.d.ts rename to types/react-icons/md/format-color-fill.d.ts diff --git a/react-icons/md/format-color-reset.d.ts b/types/react-icons/md/format-color-reset.d.ts similarity index 100% rename from react-icons/md/format-color-reset.d.ts rename to types/react-icons/md/format-color-reset.d.ts diff --git a/react-icons/md/format-color-text.d.ts b/types/react-icons/md/format-color-text.d.ts similarity index 100% rename from react-icons/md/format-color-text.d.ts rename to types/react-icons/md/format-color-text.d.ts diff --git a/react-icons/md/format-indent-decrease.d.ts b/types/react-icons/md/format-indent-decrease.d.ts similarity index 100% rename from react-icons/md/format-indent-decrease.d.ts rename to types/react-icons/md/format-indent-decrease.d.ts diff --git a/react-icons/md/format-indent-increase.d.ts b/types/react-icons/md/format-indent-increase.d.ts similarity index 100% rename from react-icons/md/format-indent-increase.d.ts rename to types/react-icons/md/format-indent-increase.d.ts diff --git a/react-icons/md/format-italic.d.ts b/types/react-icons/md/format-italic.d.ts similarity index 100% rename from react-icons/md/format-italic.d.ts rename to types/react-icons/md/format-italic.d.ts diff --git a/react-icons/md/format-line-spacing.d.ts b/types/react-icons/md/format-line-spacing.d.ts similarity index 100% rename from react-icons/md/format-line-spacing.d.ts rename to types/react-icons/md/format-line-spacing.d.ts diff --git a/react-icons/md/format-list-bulleted.d.ts b/types/react-icons/md/format-list-bulleted.d.ts similarity index 100% rename from react-icons/md/format-list-bulleted.d.ts rename to types/react-icons/md/format-list-bulleted.d.ts diff --git a/react-icons/md/format-list-numbered.d.ts b/types/react-icons/md/format-list-numbered.d.ts similarity index 100% rename from react-icons/md/format-list-numbered.d.ts rename to types/react-icons/md/format-list-numbered.d.ts diff --git a/react-icons/md/format-paint.d.ts b/types/react-icons/md/format-paint.d.ts similarity index 100% rename from react-icons/md/format-paint.d.ts rename to types/react-icons/md/format-paint.d.ts diff --git a/react-icons/md/format-quote.d.ts b/types/react-icons/md/format-quote.d.ts similarity index 100% rename from react-icons/md/format-quote.d.ts rename to types/react-icons/md/format-quote.d.ts diff --git a/react-icons/md/format-shapes.d.ts b/types/react-icons/md/format-shapes.d.ts similarity index 100% rename from react-icons/md/format-shapes.d.ts rename to types/react-icons/md/format-shapes.d.ts diff --git a/react-icons/md/format-size.d.ts b/types/react-icons/md/format-size.d.ts similarity index 100% rename from react-icons/md/format-size.d.ts rename to types/react-icons/md/format-size.d.ts diff --git a/react-icons/md/format-strikethrough.d.ts b/types/react-icons/md/format-strikethrough.d.ts similarity index 100% rename from react-icons/md/format-strikethrough.d.ts rename to types/react-icons/md/format-strikethrough.d.ts diff --git a/react-icons/md/format-textdirection-l-to-r.d.ts b/types/react-icons/md/format-textdirection-l-to-r.d.ts similarity index 100% rename from react-icons/md/format-textdirection-l-to-r.d.ts rename to types/react-icons/md/format-textdirection-l-to-r.d.ts diff --git a/react-icons/md/format-textdirection-r-to-l.d.ts b/types/react-icons/md/format-textdirection-r-to-l.d.ts similarity index 100% rename from react-icons/md/format-textdirection-r-to-l.d.ts rename to types/react-icons/md/format-textdirection-r-to-l.d.ts diff --git a/react-icons/md/format-underlined.d.ts b/types/react-icons/md/format-underlined.d.ts similarity index 100% rename from react-icons/md/format-underlined.d.ts rename to types/react-icons/md/format-underlined.d.ts diff --git a/react-icons/md/forum.d.ts b/types/react-icons/md/forum.d.ts similarity index 100% rename from react-icons/md/forum.d.ts rename to types/react-icons/md/forum.d.ts diff --git a/react-icons/md/forward-10.d.ts b/types/react-icons/md/forward-10.d.ts similarity index 100% rename from react-icons/md/forward-10.d.ts rename to types/react-icons/md/forward-10.d.ts diff --git a/react-icons/md/forward-30.d.ts b/types/react-icons/md/forward-30.d.ts similarity index 100% rename from react-icons/md/forward-30.d.ts rename to types/react-icons/md/forward-30.d.ts diff --git a/react-icons/md/forward-5.d.ts b/types/react-icons/md/forward-5.d.ts similarity index 100% rename from react-icons/md/forward-5.d.ts rename to types/react-icons/md/forward-5.d.ts diff --git a/react-icons/md/forward.d.ts b/types/react-icons/md/forward.d.ts similarity index 100% rename from react-icons/md/forward.d.ts rename to types/react-icons/md/forward.d.ts diff --git a/react-icons/md/free-breakfast.d.ts b/types/react-icons/md/free-breakfast.d.ts similarity index 100% rename from react-icons/md/free-breakfast.d.ts rename to types/react-icons/md/free-breakfast.d.ts diff --git a/react-icons/md/fullscreen-exit.d.ts b/types/react-icons/md/fullscreen-exit.d.ts similarity index 100% rename from react-icons/md/fullscreen-exit.d.ts rename to types/react-icons/md/fullscreen-exit.d.ts diff --git a/react-icons/md/fullscreen.d.ts b/types/react-icons/md/fullscreen.d.ts similarity index 100% rename from react-icons/md/fullscreen.d.ts rename to types/react-icons/md/fullscreen.d.ts diff --git a/react-icons/md/functions.d.ts b/types/react-icons/md/functions.d.ts similarity index 100% rename from react-icons/md/functions.d.ts rename to types/react-icons/md/functions.d.ts diff --git a/react-icons/md/g-translate.d.ts b/types/react-icons/md/g-translate.d.ts similarity index 100% rename from react-icons/md/g-translate.d.ts rename to types/react-icons/md/g-translate.d.ts diff --git a/react-icons/md/gamepad.d.ts b/types/react-icons/md/gamepad.d.ts similarity index 100% rename from react-icons/md/gamepad.d.ts rename to types/react-icons/md/gamepad.d.ts diff --git a/react-icons/md/games.d.ts b/types/react-icons/md/games.d.ts similarity index 100% rename from react-icons/md/games.d.ts rename to types/react-icons/md/games.d.ts diff --git a/react-icons/md/gavel.d.ts b/types/react-icons/md/gavel.d.ts similarity index 100% rename from react-icons/md/gavel.d.ts rename to types/react-icons/md/gavel.d.ts diff --git a/react-icons/md/gesture.d.ts b/types/react-icons/md/gesture.d.ts similarity index 100% rename from react-icons/md/gesture.d.ts rename to types/react-icons/md/gesture.d.ts diff --git a/react-icons/md/get-app.d.ts b/types/react-icons/md/get-app.d.ts similarity index 100% rename from react-icons/md/get-app.d.ts rename to types/react-icons/md/get-app.d.ts diff --git a/react-icons/md/gif.d.ts b/types/react-icons/md/gif.d.ts similarity index 100% rename from react-icons/md/gif.d.ts rename to types/react-icons/md/gif.d.ts diff --git a/react-icons/md/goat.d.ts b/types/react-icons/md/goat.d.ts similarity index 100% rename from react-icons/md/goat.d.ts rename to types/react-icons/md/goat.d.ts diff --git a/react-icons/md/golf-course.d.ts b/types/react-icons/md/golf-course.d.ts similarity index 100% rename from react-icons/md/golf-course.d.ts rename to types/react-icons/md/golf-course.d.ts diff --git a/react-icons/md/gps-fixed.d.ts b/types/react-icons/md/gps-fixed.d.ts similarity index 100% rename from react-icons/md/gps-fixed.d.ts rename to types/react-icons/md/gps-fixed.d.ts diff --git a/react-icons/md/gps-not-fixed.d.ts b/types/react-icons/md/gps-not-fixed.d.ts similarity index 100% rename from react-icons/md/gps-not-fixed.d.ts rename to types/react-icons/md/gps-not-fixed.d.ts diff --git a/react-icons/md/gps-off.d.ts b/types/react-icons/md/gps-off.d.ts similarity index 100% rename from react-icons/md/gps-off.d.ts rename to types/react-icons/md/gps-off.d.ts diff --git a/react-icons/md/grade.d.ts b/types/react-icons/md/grade.d.ts similarity index 100% rename from react-icons/md/grade.d.ts rename to types/react-icons/md/grade.d.ts diff --git a/react-icons/md/gradient.d.ts b/types/react-icons/md/gradient.d.ts similarity index 100% rename from react-icons/md/gradient.d.ts rename to types/react-icons/md/gradient.d.ts diff --git a/react-icons/md/grain.d.ts b/types/react-icons/md/grain.d.ts similarity index 100% rename from react-icons/md/grain.d.ts rename to types/react-icons/md/grain.d.ts diff --git a/react-icons/md/graphic-eq.d.ts b/types/react-icons/md/graphic-eq.d.ts similarity index 100% rename from react-icons/md/graphic-eq.d.ts rename to types/react-icons/md/graphic-eq.d.ts diff --git a/react-icons/md/grid-off.d.ts b/types/react-icons/md/grid-off.d.ts similarity index 100% rename from react-icons/md/grid-off.d.ts rename to types/react-icons/md/grid-off.d.ts diff --git a/react-icons/md/grid-on.d.ts b/types/react-icons/md/grid-on.d.ts similarity index 100% rename from react-icons/md/grid-on.d.ts rename to types/react-icons/md/grid-on.d.ts diff --git a/react-icons/md/group-add.d.ts b/types/react-icons/md/group-add.d.ts similarity index 100% rename from react-icons/md/group-add.d.ts rename to types/react-icons/md/group-add.d.ts diff --git a/react-icons/md/group-work.d.ts b/types/react-icons/md/group-work.d.ts similarity index 100% rename from react-icons/md/group-work.d.ts rename to types/react-icons/md/group-work.d.ts diff --git a/react-icons/md/group.d.ts b/types/react-icons/md/group.d.ts similarity index 100% rename from react-icons/md/group.d.ts rename to types/react-icons/md/group.d.ts diff --git a/react-icons/md/hd.d.ts b/types/react-icons/md/hd.d.ts similarity index 100% rename from react-icons/md/hd.d.ts rename to types/react-icons/md/hd.d.ts diff --git a/react-icons/md/hdr-off.d.ts b/types/react-icons/md/hdr-off.d.ts similarity index 100% rename from react-icons/md/hdr-off.d.ts rename to types/react-icons/md/hdr-off.d.ts diff --git a/react-icons/md/hdr-on.d.ts b/types/react-icons/md/hdr-on.d.ts similarity index 100% rename from react-icons/md/hdr-on.d.ts rename to types/react-icons/md/hdr-on.d.ts diff --git a/react-icons/md/hdr-strong.d.ts b/types/react-icons/md/hdr-strong.d.ts similarity index 100% rename from react-icons/md/hdr-strong.d.ts rename to types/react-icons/md/hdr-strong.d.ts diff --git a/react-icons/md/hdr-weak.d.ts b/types/react-icons/md/hdr-weak.d.ts similarity index 100% rename from react-icons/md/hdr-weak.d.ts rename to types/react-icons/md/hdr-weak.d.ts diff --git a/react-icons/md/headset-mic.d.ts b/types/react-icons/md/headset-mic.d.ts similarity index 100% rename from react-icons/md/headset-mic.d.ts rename to types/react-icons/md/headset-mic.d.ts diff --git a/react-icons/md/headset.d.ts b/types/react-icons/md/headset.d.ts similarity index 100% rename from react-icons/md/headset.d.ts rename to types/react-icons/md/headset.d.ts diff --git a/react-icons/md/healing.d.ts b/types/react-icons/md/healing.d.ts similarity index 100% rename from react-icons/md/healing.d.ts rename to types/react-icons/md/healing.d.ts diff --git a/react-icons/md/hearing.d.ts b/types/react-icons/md/hearing.d.ts similarity index 100% rename from react-icons/md/hearing.d.ts rename to types/react-icons/md/hearing.d.ts diff --git a/react-icons/md/help-outline.d.ts b/types/react-icons/md/help-outline.d.ts similarity index 100% rename from react-icons/md/help-outline.d.ts rename to types/react-icons/md/help-outline.d.ts diff --git a/react-icons/md/help.d.ts b/types/react-icons/md/help.d.ts similarity index 100% rename from react-icons/md/help.d.ts rename to types/react-icons/md/help.d.ts diff --git a/react-icons/md/high-quality.d.ts b/types/react-icons/md/high-quality.d.ts similarity index 100% rename from react-icons/md/high-quality.d.ts rename to types/react-icons/md/high-quality.d.ts diff --git a/react-icons/md/highlight-off.d.ts b/types/react-icons/md/highlight-off.d.ts similarity index 100% rename from react-icons/md/highlight-off.d.ts rename to types/react-icons/md/highlight-off.d.ts diff --git a/react-icons/md/highlight-remove.d.ts b/types/react-icons/md/highlight-remove.d.ts similarity index 100% rename from react-icons/md/highlight-remove.d.ts rename to types/react-icons/md/highlight-remove.d.ts diff --git a/react-icons/md/highlight.d.ts b/types/react-icons/md/highlight.d.ts similarity index 100% rename from react-icons/md/highlight.d.ts rename to types/react-icons/md/highlight.d.ts diff --git a/react-icons/md/history.d.ts b/types/react-icons/md/history.d.ts similarity index 100% rename from react-icons/md/history.d.ts rename to types/react-icons/md/history.d.ts diff --git a/react-icons/md/home.d.ts b/types/react-icons/md/home.d.ts similarity index 100% rename from react-icons/md/home.d.ts rename to types/react-icons/md/home.d.ts diff --git a/react-icons/md/hot-tub.d.ts b/types/react-icons/md/hot-tub.d.ts similarity index 100% rename from react-icons/md/hot-tub.d.ts rename to types/react-icons/md/hot-tub.d.ts diff --git a/react-icons/md/hotel.d.ts b/types/react-icons/md/hotel.d.ts similarity index 100% rename from react-icons/md/hotel.d.ts rename to types/react-icons/md/hotel.d.ts diff --git a/react-icons/md/hourglass-empty.d.ts b/types/react-icons/md/hourglass-empty.d.ts similarity index 100% rename from react-icons/md/hourglass-empty.d.ts rename to types/react-icons/md/hourglass-empty.d.ts diff --git a/react-icons/md/hourglass-full.d.ts b/types/react-icons/md/hourglass-full.d.ts similarity index 100% rename from react-icons/md/hourglass-full.d.ts rename to types/react-icons/md/hourglass-full.d.ts diff --git a/react-icons/md/http.d.ts b/types/react-icons/md/http.d.ts similarity index 100% rename from react-icons/md/http.d.ts rename to types/react-icons/md/http.d.ts diff --git a/react-icons/md/https.d.ts b/types/react-icons/md/https.d.ts similarity index 100% rename from react-icons/md/https.d.ts rename to types/react-icons/md/https.d.ts diff --git a/react-icons/md/image-aspect-ratio.d.ts b/types/react-icons/md/image-aspect-ratio.d.ts similarity index 100% rename from react-icons/md/image-aspect-ratio.d.ts rename to types/react-icons/md/image-aspect-ratio.d.ts diff --git a/react-icons/md/image.d.ts b/types/react-icons/md/image.d.ts similarity index 100% rename from react-icons/md/image.d.ts rename to types/react-icons/md/image.d.ts diff --git a/react-icons/md/import-contacts.d.ts b/types/react-icons/md/import-contacts.d.ts similarity index 100% rename from react-icons/md/import-contacts.d.ts rename to types/react-icons/md/import-contacts.d.ts diff --git a/react-icons/md/import-export.d.ts b/types/react-icons/md/import-export.d.ts similarity index 100% rename from react-icons/md/import-export.d.ts rename to types/react-icons/md/import-export.d.ts diff --git a/react-icons/md/important-devices.d.ts b/types/react-icons/md/important-devices.d.ts similarity index 100% rename from react-icons/md/important-devices.d.ts rename to types/react-icons/md/important-devices.d.ts diff --git a/react-icons/md/inbox.d.ts b/types/react-icons/md/inbox.d.ts similarity index 100% rename from react-icons/md/inbox.d.ts rename to types/react-icons/md/inbox.d.ts diff --git a/react-icons/md/indeterminate-check-box.d.ts b/types/react-icons/md/indeterminate-check-box.d.ts similarity index 100% rename from react-icons/md/indeterminate-check-box.d.ts rename to types/react-icons/md/indeterminate-check-box.d.ts diff --git a/react-icons/md/index.d.ts b/types/react-icons/md/index.d.ts similarity index 100% rename from react-icons/md/index.d.ts rename to types/react-icons/md/index.d.ts diff --git a/react-icons/md/info-outline.d.ts b/types/react-icons/md/info-outline.d.ts similarity index 100% rename from react-icons/md/info-outline.d.ts rename to types/react-icons/md/info-outline.d.ts diff --git a/react-icons/md/info.d.ts b/types/react-icons/md/info.d.ts similarity index 100% rename from react-icons/md/info.d.ts rename to types/react-icons/md/info.d.ts diff --git a/react-icons/md/input.d.ts b/types/react-icons/md/input.d.ts similarity index 100% rename from react-icons/md/input.d.ts rename to types/react-icons/md/input.d.ts diff --git a/react-icons/md/insert-chart.d.ts b/types/react-icons/md/insert-chart.d.ts similarity index 100% rename from react-icons/md/insert-chart.d.ts rename to types/react-icons/md/insert-chart.d.ts diff --git a/react-icons/md/insert-comment.d.ts b/types/react-icons/md/insert-comment.d.ts similarity index 100% rename from react-icons/md/insert-comment.d.ts rename to types/react-icons/md/insert-comment.d.ts diff --git a/react-icons/md/insert-drive-file.d.ts b/types/react-icons/md/insert-drive-file.d.ts similarity index 100% rename from react-icons/md/insert-drive-file.d.ts rename to types/react-icons/md/insert-drive-file.d.ts diff --git a/react-icons/md/insert-emoticon.d.ts b/types/react-icons/md/insert-emoticon.d.ts similarity index 100% rename from react-icons/md/insert-emoticon.d.ts rename to types/react-icons/md/insert-emoticon.d.ts diff --git a/react-icons/md/insert-invitation.d.ts b/types/react-icons/md/insert-invitation.d.ts similarity index 100% rename from react-icons/md/insert-invitation.d.ts rename to types/react-icons/md/insert-invitation.d.ts diff --git a/react-icons/md/insert-link.d.ts b/types/react-icons/md/insert-link.d.ts similarity index 100% rename from react-icons/md/insert-link.d.ts rename to types/react-icons/md/insert-link.d.ts diff --git a/react-icons/md/insert-photo.d.ts b/types/react-icons/md/insert-photo.d.ts similarity index 100% rename from react-icons/md/insert-photo.d.ts rename to types/react-icons/md/insert-photo.d.ts diff --git a/react-icons/md/invert-colors-off.d.ts b/types/react-icons/md/invert-colors-off.d.ts similarity index 100% rename from react-icons/md/invert-colors-off.d.ts rename to types/react-icons/md/invert-colors-off.d.ts diff --git a/react-icons/md/invert-colors-on.d.ts b/types/react-icons/md/invert-colors-on.d.ts similarity index 100% rename from react-icons/md/invert-colors-on.d.ts rename to types/react-icons/md/invert-colors-on.d.ts diff --git a/react-icons/md/invert-colors.d.ts b/types/react-icons/md/invert-colors.d.ts similarity index 100% rename from react-icons/md/invert-colors.d.ts rename to types/react-icons/md/invert-colors.d.ts diff --git a/react-icons/md/iso.d.ts b/types/react-icons/md/iso.d.ts similarity index 100% rename from react-icons/md/iso.d.ts rename to types/react-icons/md/iso.d.ts diff --git a/react-icons/md/keyboard-arrow-down.d.ts b/types/react-icons/md/keyboard-arrow-down.d.ts similarity index 100% rename from react-icons/md/keyboard-arrow-down.d.ts rename to types/react-icons/md/keyboard-arrow-down.d.ts diff --git a/react-icons/md/keyboard-arrow-left.d.ts b/types/react-icons/md/keyboard-arrow-left.d.ts similarity index 100% rename from react-icons/md/keyboard-arrow-left.d.ts rename to types/react-icons/md/keyboard-arrow-left.d.ts diff --git a/react-icons/md/keyboard-arrow-right.d.ts b/types/react-icons/md/keyboard-arrow-right.d.ts similarity index 100% rename from react-icons/md/keyboard-arrow-right.d.ts rename to types/react-icons/md/keyboard-arrow-right.d.ts diff --git a/react-icons/md/keyboard-arrow-up.d.ts b/types/react-icons/md/keyboard-arrow-up.d.ts similarity index 100% rename from react-icons/md/keyboard-arrow-up.d.ts rename to types/react-icons/md/keyboard-arrow-up.d.ts diff --git a/react-icons/md/keyboard-backspace.d.ts b/types/react-icons/md/keyboard-backspace.d.ts similarity index 100% rename from react-icons/md/keyboard-backspace.d.ts rename to types/react-icons/md/keyboard-backspace.d.ts diff --git a/react-icons/md/keyboard-capslock.d.ts b/types/react-icons/md/keyboard-capslock.d.ts similarity index 100% rename from react-icons/md/keyboard-capslock.d.ts rename to types/react-icons/md/keyboard-capslock.d.ts diff --git a/react-icons/md/keyboard-control.d.ts b/types/react-icons/md/keyboard-control.d.ts similarity index 100% rename from react-icons/md/keyboard-control.d.ts rename to types/react-icons/md/keyboard-control.d.ts diff --git a/react-icons/md/keyboard-hide.d.ts b/types/react-icons/md/keyboard-hide.d.ts similarity index 100% rename from react-icons/md/keyboard-hide.d.ts rename to types/react-icons/md/keyboard-hide.d.ts diff --git a/react-icons/md/keyboard-return.d.ts b/types/react-icons/md/keyboard-return.d.ts similarity index 100% rename from react-icons/md/keyboard-return.d.ts rename to types/react-icons/md/keyboard-return.d.ts diff --git a/react-icons/md/keyboard-tab.d.ts b/types/react-icons/md/keyboard-tab.d.ts similarity index 100% rename from react-icons/md/keyboard-tab.d.ts rename to types/react-icons/md/keyboard-tab.d.ts diff --git a/react-icons/md/keyboard-voice.d.ts b/types/react-icons/md/keyboard-voice.d.ts similarity index 100% rename from react-icons/md/keyboard-voice.d.ts rename to types/react-icons/md/keyboard-voice.d.ts diff --git a/react-icons/md/keyboard.d.ts b/types/react-icons/md/keyboard.d.ts similarity index 100% rename from react-icons/md/keyboard.d.ts rename to types/react-icons/md/keyboard.d.ts diff --git a/react-icons/md/kitchen.d.ts b/types/react-icons/md/kitchen.d.ts similarity index 100% rename from react-icons/md/kitchen.d.ts rename to types/react-icons/md/kitchen.d.ts diff --git a/react-icons/md/label-outline.d.ts b/types/react-icons/md/label-outline.d.ts similarity index 100% rename from react-icons/md/label-outline.d.ts rename to types/react-icons/md/label-outline.d.ts diff --git a/react-icons/md/label.d.ts b/types/react-icons/md/label.d.ts similarity index 100% rename from react-icons/md/label.d.ts rename to types/react-icons/md/label.d.ts diff --git a/react-icons/md/landscape.d.ts b/types/react-icons/md/landscape.d.ts similarity index 100% rename from react-icons/md/landscape.d.ts rename to types/react-icons/md/landscape.d.ts diff --git a/react-icons/md/language.d.ts b/types/react-icons/md/language.d.ts similarity index 100% rename from react-icons/md/language.d.ts rename to types/react-icons/md/language.d.ts diff --git a/react-icons/md/laptop-chromebook.d.ts b/types/react-icons/md/laptop-chromebook.d.ts similarity index 100% rename from react-icons/md/laptop-chromebook.d.ts rename to types/react-icons/md/laptop-chromebook.d.ts diff --git a/react-icons/md/laptop-mac.d.ts b/types/react-icons/md/laptop-mac.d.ts similarity index 100% rename from react-icons/md/laptop-mac.d.ts rename to types/react-icons/md/laptop-mac.d.ts diff --git a/react-icons/md/laptop-windows.d.ts b/types/react-icons/md/laptop-windows.d.ts similarity index 100% rename from react-icons/md/laptop-windows.d.ts rename to types/react-icons/md/laptop-windows.d.ts diff --git a/react-icons/md/laptop.d.ts b/types/react-icons/md/laptop.d.ts similarity index 100% rename from react-icons/md/laptop.d.ts rename to types/react-icons/md/laptop.d.ts diff --git a/react-icons/md/last-page.d.ts b/types/react-icons/md/last-page.d.ts similarity index 100% rename from react-icons/md/last-page.d.ts rename to types/react-icons/md/last-page.d.ts diff --git a/react-icons/md/launch.d.ts b/types/react-icons/md/launch.d.ts similarity index 100% rename from react-icons/md/launch.d.ts rename to types/react-icons/md/launch.d.ts diff --git a/react-icons/md/layers-clear.d.ts b/types/react-icons/md/layers-clear.d.ts similarity index 100% rename from react-icons/md/layers-clear.d.ts rename to types/react-icons/md/layers-clear.d.ts diff --git a/react-icons/md/layers.d.ts b/types/react-icons/md/layers.d.ts similarity index 100% rename from react-icons/md/layers.d.ts rename to types/react-icons/md/layers.d.ts diff --git a/react-icons/md/leak-add.d.ts b/types/react-icons/md/leak-add.d.ts similarity index 100% rename from react-icons/md/leak-add.d.ts rename to types/react-icons/md/leak-add.d.ts diff --git a/react-icons/md/leak-remove.d.ts b/types/react-icons/md/leak-remove.d.ts similarity index 100% rename from react-icons/md/leak-remove.d.ts rename to types/react-icons/md/leak-remove.d.ts diff --git a/react-icons/md/lens.d.ts b/types/react-icons/md/lens.d.ts similarity index 100% rename from react-icons/md/lens.d.ts rename to types/react-icons/md/lens.d.ts diff --git a/react-icons/md/library-add.d.ts b/types/react-icons/md/library-add.d.ts similarity index 100% rename from react-icons/md/library-add.d.ts rename to types/react-icons/md/library-add.d.ts diff --git a/react-icons/md/library-books.d.ts b/types/react-icons/md/library-books.d.ts similarity index 100% rename from react-icons/md/library-books.d.ts rename to types/react-icons/md/library-books.d.ts diff --git a/react-icons/md/library-music.d.ts b/types/react-icons/md/library-music.d.ts similarity index 100% rename from react-icons/md/library-music.d.ts rename to types/react-icons/md/library-music.d.ts diff --git a/react-icons/md/lightbulb-outline.d.ts b/types/react-icons/md/lightbulb-outline.d.ts similarity index 100% rename from react-icons/md/lightbulb-outline.d.ts rename to types/react-icons/md/lightbulb-outline.d.ts diff --git a/react-icons/md/line-style.d.ts b/types/react-icons/md/line-style.d.ts similarity index 100% rename from react-icons/md/line-style.d.ts rename to types/react-icons/md/line-style.d.ts diff --git a/react-icons/md/line-weight.d.ts b/types/react-icons/md/line-weight.d.ts similarity index 100% rename from react-icons/md/line-weight.d.ts rename to types/react-icons/md/line-weight.d.ts diff --git a/react-icons/md/linear-scale.d.ts b/types/react-icons/md/linear-scale.d.ts similarity index 100% rename from react-icons/md/linear-scale.d.ts rename to types/react-icons/md/linear-scale.d.ts diff --git a/react-icons/md/link.d.ts b/types/react-icons/md/link.d.ts similarity index 100% rename from react-icons/md/link.d.ts rename to types/react-icons/md/link.d.ts diff --git a/react-icons/md/linked-camera.d.ts b/types/react-icons/md/linked-camera.d.ts similarity index 100% rename from react-icons/md/linked-camera.d.ts rename to types/react-icons/md/linked-camera.d.ts diff --git a/react-icons/md/list.d.ts b/types/react-icons/md/list.d.ts similarity index 100% rename from react-icons/md/list.d.ts rename to types/react-icons/md/list.d.ts diff --git a/react-icons/md/live-help.d.ts b/types/react-icons/md/live-help.d.ts similarity index 100% rename from react-icons/md/live-help.d.ts rename to types/react-icons/md/live-help.d.ts diff --git a/react-icons/md/live-tv.d.ts b/types/react-icons/md/live-tv.d.ts similarity index 100% rename from react-icons/md/live-tv.d.ts rename to types/react-icons/md/live-tv.d.ts diff --git a/react-icons/md/local-airport.d.ts b/types/react-icons/md/local-airport.d.ts similarity index 100% rename from react-icons/md/local-airport.d.ts rename to types/react-icons/md/local-airport.d.ts diff --git a/react-icons/md/local-atm.d.ts b/types/react-icons/md/local-atm.d.ts similarity index 100% rename from react-icons/md/local-atm.d.ts rename to types/react-icons/md/local-atm.d.ts diff --git a/react-icons/md/local-attraction.d.ts b/types/react-icons/md/local-attraction.d.ts similarity index 100% rename from react-icons/md/local-attraction.d.ts rename to types/react-icons/md/local-attraction.d.ts diff --git a/react-icons/md/local-bar.d.ts b/types/react-icons/md/local-bar.d.ts similarity index 100% rename from react-icons/md/local-bar.d.ts rename to types/react-icons/md/local-bar.d.ts diff --git a/react-icons/md/local-cafe.d.ts b/types/react-icons/md/local-cafe.d.ts similarity index 100% rename from react-icons/md/local-cafe.d.ts rename to types/react-icons/md/local-cafe.d.ts diff --git a/react-icons/md/local-car-wash.d.ts b/types/react-icons/md/local-car-wash.d.ts similarity index 100% rename from react-icons/md/local-car-wash.d.ts rename to types/react-icons/md/local-car-wash.d.ts diff --git a/react-icons/md/local-convenience-store.d.ts b/types/react-icons/md/local-convenience-store.d.ts similarity index 100% rename from react-icons/md/local-convenience-store.d.ts rename to types/react-icons/md/local-convenience-store.d.ts diff --git a/react-icons/md/local-drink.d.ts b/types/react-icons/md/local-drink.d.ts similarity index 100% rename from react-icons/md/local-drink.d.ts rename to types/react-icons/md/local-drink.d.ts diff --git a/react-icons/md/local-florist.d.ts b/types/react-icons/md/local-florist.d.ts similarity index 100% rename from react-icons/md/local-florist.d.ts rename to types/react-icons/md/local-florist.d.ts diff --git a/react-icons/md/local-gas-station.d.ts b/types/react-icons/md/local-gas-station.d.ts similarity index 100% rename from react-icons/md/local-gas-station.d.ts rename to types/react-icons/md/local-gas-station.d.ts diff --git a/react-icons/md/local-grocery-store.d.ts b/types/react-icons/md/local-grocery-store.d.ts similarity index 100% rename from react-icons/md/local-grocery-store.d.ts rename to types/react-icons/md/local-grocery-store.d.ts diff --git a/react-icons/md/local-hospital.d.ts b/types/react-icons/md/local-hospital.d.ts similarity index 100% rename from react-icons/md/local-hospital.d.ts rename to types/react-icons/md/local-hospital.d.ts diff --git a/react-icons/md/local-hotel.d.ts b/types/react-icons/md/local-hotel.d.ts similarity index 100% rename from react-icons/md/local-hotel.d.ts rename to types/react-icons/md/local-hotel.d.ts diff --git a/react-icons/md/local-laundry-service.d.ts b/types/react-icons/md/local-laundry-service.d.ts similarity index 100% rename from react-icons/md/local-laundry-service.d.ts rename to types/react-icons/md/local-laundry-service.d.ts diff --git a/react-icons/md/local-library.d.ts b/types/react-icons/md/local-library.d.ts similarity index 100% rename from react-icons/md/local-library.d.ts rename to types/react-icons/md/local-library.d.ts diff --git a/react-icons/md/local-mall.d.ts b/types/react-icons/md/local-mall.d.ts similarity index 100% rename from react-icons/md/local-mall.d.ts rename to types/react-icons/md/local-mall.d.ts diff --git a/react-icons/md/local-movies.d.ts b/types/react-icons/md/local-movies.d.ts similarity index 100% rename from react-icons/md/local-movies.d.ts rename to types/react-icons/md/local-movies.d.ts diff --git a/react-icons/md/local-offer.d.ts b/types/react-icons/md/local-offer.d.ts similarity index 100% rename from react-icons/md/local-offer.d.ts rename to types/react-icons/md/local-offer.d.ts diff --git a/react-icons/md/local-parking.d.ts b/types/react-icons/md/local-parking.d.ts similarity index 100% rename from react-icons/md/local-parking.d.ts rename to types/react-icons/md/local-parking.d.ts diff --git a/react-icons/md/local-pharmacy.d.ts b/types/react-icons/md/local-pharmacy.d.ts similarity index 100% rename from react-icons/md/local-pharmacy.d.ts rename to types/react-icons/md/local-pharmacy.d.ts diff --git a/react-icons/md/local-phone.d.ts b/types/react-icons/md/local-phone.d.ts similarity index 100% rename from react-icons/md/local-phone.d.ts rename to types/react-icons/md/local-phone.d.ts diff --git a/react-icons/md/local-pizza.d.ts b/types/react-icons/md/local-pizza.d.ts similarity index 100% rename from react-icons/md/local-pizza.d.ts rename to types/react-icons/md/local-pizza.d.ts diff --git a/react-icons/md/local-play.d.ts b/types/react-icons/md/local-play.d.ts similarity index 100% rename from react-icons/md/local-play.d.ts rename to types/react-icons/md/local-play.d.ts diff --git a/react-icons/md/local-post-office.d.ts b/types/react-icons/md/local-post-office.d.ts similarity index 100% rename from react-icons/md/local-post-office.d.ts rename to types/react-icons/md/local-post-office.d.ts diff --git a/react-icons/md/local-print-shop.d.ts b/types/react-icons/md/local-print-shop.d.ts similarity index 100% rename from react-icons/md/local-print-shop.d.ts rename to types/react-icons/md/local-print-shop.d.ts diff --git a/react-icons/md/local-restaurant.d.ts b/types/react-icons/md/local-restaurant.d.ts similarity index 100% rename from react-icons/md/local-restaurant.d.ts rename to types/react-icons/md/local-restaurant.d.ts diff --git a/react-icons/md/local-see.d.ts b/types/react-icons/md/local-see.d.ts similarity index 100% rename from react-icons/md/local-see.d.ts rename to types/react-icons/md/local-see.d.ts diff --git a/react-icons/md/local-shipping.d.ts b/types/react-icons/md/local-shipping.d.ts similarity index 100% rename from react-icons/md/local-shipping.d.ts rename to types/react-icons/md/local-shipping.d.ts diff --git a/react-icons/md/local-taxi.d.ts b/types/react-icons/md/local-taxi.d.ts similarity index 100% rename from react-icons/md/local-taxi.d.ts rename to types/react-icons/md/local-taxi.d.ts diff --git a/react-icons/md/location-city.d.ts b/types/react-icons/md/location-city.d.ts similarity index 100% rename from react-icons/md/location-city.d.ts rename to types/react-icons/md/location-city.d.ts diff --git a/react-icons/md/location-disabled.d.ts b/types/react-icons/md/location-disabled.d.ts similarity index 100% rename from react-icons/md/location-disabled.d.ts rename to types/react-icons/md/location-disabled.d.ts diff --git a/react-icons/md/location-history.d.ts b/types/react-icons/md/location-history.d.ts similarity index 100% rename from react-icons/md/location-history.d.ts rename to types/react-icons/md/location-history.d.ts diff --git a/react-icons/md/location-off.d.ts b/types/react-icons/md/location-off.d.ts similarity index 100% rename from react-icons/md/location-off.d.ts rename to types/react-icons/md/location-off.d.ts diff --git a/react-icons/md/location-on.d.ts b/types/react-icons/md/location-on.d.ts similarity index 100% rename from react-icons/md/location-on.d.ts rename to types/react-icons/md/location-on.d.ts diff --git a/react-icons/md/location-searching.d.ts b/types/react-icons/md/location-searching.d.ts similarity index 100% rename from react-icons/md/location-searching.d.ts rename to types/react-icons/md/location-searching.d.ts diff --git a/react-icons/md/lock-open.d.ts b/types/react-icons/md/lock-open.d.ts similarity index 100% rename from react-icons/md/lock-open.d.ts rename to types/react-icons/md/lock-open.d.ts diff --git a/react-icons/md/lock-outline.d.ts b/types/react-icons/md/lock-outline.d.ts similarity index 100% rename from react-icons/md/lock-outline.d.ts rename to types/react-icons/md/lock-outline.d.ts diff --git a/react-icons/md/lock.d.ts b/types/react-icons/md/lock.d.ts similarity index 100% rename from react-icons/md/lock.d.ts rename to types/react-icons/md/lock.d.ts diff --git a/react-icons/md/looks-3.d.ts b/types/react-icons/md/looks-3.d.ts similarity index 100% rename from react-icons/md/looks-3.d.ts rename to types/react-icons/md/looks-3.d.ts diff --git a/react-icons/md/looks-4.d.ts b/types/react-icons/md/looks-4.d.ts similarity index 100% rename from react-icons/md/looks-4.d.ts rename to types/react-icons/md/looks-4.d.ts diff --git a/react-icons/md/looks-5.d.ts b/types/react-icons/md/looks-5.d.ts similarity index 100% rename from react-icons/md/looks-5.d.ts rename to types/react-icons/md/looks-5.d.ts diff --git a/react-icons/md/looks-6.d.ts b/types/react-icons/md/looks-6.d.ts similarity index 100% rename from react-icons/md/looks-6.d.ts rename to types/react-icons/md/looks-6.d.ts diff --git a/react-icons/md/looks-one.d.ts b/types/react-icons/md/looks-one.d.ts similarity index 100% rename from react-icons/md/looks-one.d.ts rename to types/react-icons/md/looks-one.d.ts diff --git a/react-icons/md/looks-two.d.ts b/types/react-icons/md/looks-two.d.ts similarity index 100% rename from react-icons/md/looks-two.d.ts rename to types/react-icons/md/looks-two.d.ts diff --git a/react-icons/md/looks.d.ts b/types/react-icons/md/looks.d.ts similarity index 100% rename from react-icons/md/looks.d.ts rename to types/react-icons/md/looks.d.ts diff --git a/react-icons/md/loop.d.ts b/types/react-icons/md/loop.d.ts similarity index 100% rename from react-icons/md/loop.d.ts rename to types/react-icons/md/loop.d.ts diff --git a/react-icons/md/loupe.d.ts b/types/react-icons/md/loupe.d.ts similarity index 100% rename from react-icons/md/loupe.d.ts rename to types/react-icons/md/loupe.d.ts diff --git a/react-icons/md/low-priority.d.ts b/types/react-icons/md/low-priority.d.ts similarity index 100% rename from react-icons/md/low-priority.d.ts rename to types/react-icons/md/low-priority.d.ts diff --git a/react-icons/md/loyalty.d.ts b/types/react-icons/md/loyalty.d.ts similarity index 100% rename from react-icons/md/loyalty.d.ts rename to types/react-icons/md/loyalty.d.ts diff --git a/react-icons/md/mail-outline.d.ts b/types/react-icons/md/mail-outline.d.ts similarity index 100% rename from react-icons/md/mail-outline.d.ts rename to types/react-icons/md/mail-outline.d.ts diff --git a/react-icons/md/mail.d.ts b/types/react-icons/md/mail.d.ts similarity index 100% rename from react-icons/md/mail.d.ts rename to types/react-icons/md/mail.d.ts diff --git a/react-icons/md/map.d.ts b/types/react-icons/md/map.d.ts similarity index 100% rename from react-icons/md/map.d.ts rename to types/react-icons/md/map.d.ts diff --git a/react-icons/md/markunread-mailbox.d.ts b/types/react-icons/md/markunread-mailbox.d.ts similarity index 100% rename from react-icons/md/markunread-mailbox.d.ts rename to types/react-icons/md/markunread-mailbox.d.ts diff --git a/react-icons/md/markunread.d.ts b/types/react-icons/md/markunread.d.ts similarity index 100% rename from react-icons/md/markunread.d.ts rename to types/react-icons/md/markunread.d.ts diff --git a/react-icons/md/memory.d.ts b/types/react-icons/md/memory.d.ts similarity index 100% rename from react-icons/md/memory.d.ts rename to types/react-icons/md/memory.d.ts diff --git a/react-icons/md/menu.d.ts b/types/react-icons/md/menu.d.ts similarity index 100% rename from react-icons/md/menu.d.ts rename to types/react-icons/md/menu.d.ts diff --git a/react-icons/md/merge-type.d.ts b/types/react-icons/md/merge-type.d.ts similarity index 100% rename from react-icons/md/merge-type.d.ts rename to types/react-icons/md/merge-type.d.ts diff --git a/react-icons/md/message.d.ts b/types/react-icons/md/message.d.ts similarity index 100% rename from react-icons/md/message.d.ts rename to types/react-icons/md/message.d.ts diff --git a/react-icons/md/mic-none.d.ts b/types/react-icons/md/mic-none.d.ts similarity index 100% rename from react-icons/md/mic-none.d.ts rename to types/react-icons/md/mic-none.d.ts diff --git a/react-icons/md/mic-off.d.ts b/types/react-icons/md/mic-off.d.ts similarity index 100% rename from react-icons/md/mic-off.d.ts rename to types/react-icons/md/mic-off.d.ts diff --git a/react-icons/md/mic.d.ts b/types/react-icons/md/mic.d.ts similarity index 100% rename from react-icons/md/mic.d.ts rename to types/react-icons/md/mic.d.ts diff --git a/react-icons/md/mms.d.ts b/types/react-icons/md/mms.d.ts similarity index 100% rename from react-icons/md/mms.d.ts rename to types/react-icons/md/mms.d.ts diff --git a/react-icons/md/mode-comment.d.ts b/types/react-icons/md/mode-comment.d.ts similarity index 100% rename from react-icons/md/mode-comment.d.ts rename to types/react-icons/md/mode-comment.d.ts diff --git a/react-icons/md/mode-edit.d.ts b/types/react-icons/md/mode-edit.d.ts similarity index 100% rename from react-icons/md/mode-edit.d.ts rename to types/react-icons/md/mode-edit.d.ts diff --git a/react-icons/md/monetization-on.d.ts b/types/react-icons/md/monetization-on.d.ts similarity index 100% rename from react-icons/md/monetization-on.d.ts rename to types/react-icons/md/monetization-on.d.ts diff --git a/react-icons/md/money-off.d.ts b/types/react-icons/md/money-off.d.ts similarity index 100% rename from react-icons/md/money-off.d.ts rename to types/react-icons/md/money-off.d.ts diff --git a/react-icons/md/monochrome-photos.d.ts b/types/react-icons/md/monochrome-photos.d.ts similarity index 100% rename from react-icons/md/monochrome-photos.d.ts rename to types/react-icons/md/monochrome-photos.d.ts diff --git a/react-icons/md/mood-bad.d.ts b/types/react-icons/md/mood-bad.d.ts similarity index 100% rename from react-icons/md/mood-bad.d.ts rename to types/react-icons/md/mood-bad.d.ts diff --git a/react-icons/md/mood.d.ts b/types/react-icons/md/mood.d.ts similarity index 100% rename from react-icons/md/mood.d.ts rename to types/react-icons/md/mood.d.ts diff --git a/react-icons/md/more-horiz.d.ts b/types/react-icons/md/more-horiz.d.ts similarity index 100% rename from react-icons/md/more-horiz.d.ts rename to types/react-icons/md/more-horiz.d.ts diff --git a/react-icons/md/more-vert.d.ts b/types/react-icons/md/more-vert.d.ts similarity index 100% rename from react-icons/md/more-vert.d.ts rename to types/react-icons/md/more-vert.d.ts diff --git a/react-icons/md/more.d.ts b/types/react-icons/md/more.d.ts similarity index 100% rename from react-icons/md/more.d.ts rename to types/react-icons/md/more.d.ts diff --git a/react-icons/md/motorcycle.d.ts b/types/react-icons/md/motorcycle.d.ts similarity index 100% rename from react-icons/md/motorcycle.d.ts rename to types/react-icons/md/motorcycle.d.ts diff --git a/react-icons/md/mouse.d.ts b/types/react-icons/md/mouse.d.ts similarity index 100% rename from react-icons/md/mouse.d.ts rename to types/react-icons/md/mouse.d.ts diff --git a/react-icons/md/move-to-inbox.d.ts b/types/react-icons/md/move-to-inbox.d.ts similarity index 100% rename from react-icons/md/move-to-inbox.d.ts rename to types/react-icons/md/move-to-inbox.d.ts diff --git a/react-icons/md/movie-creation.d.ts b/types/react-icons/md/movie-creation.d.ts similarity index 100% rename from react-icons/md/movie-creation.d.ts rename to types/react-icons/md/movie-creation.d.ts diff --git a/react-icons/md/movie-filter.d.ts b/types/react-icons/md/movie-filter.d.ts similarity index 100% rename from react-icons/md/movie-filter.d.ts rename to types/react-icons/md/movie-filter.d.ts diff --git a/react-icons/md/movie.d.ts b/types/react-icons/md/movie.d.ts similarity index 100% rename from react-icons/md/movie.d.ts rename to types/react-icons/md/movie.d.ts diff --git a/react-icons/md/multiline-chart.d.ts b/types/react-icons/md/multiline-chart.d.ts similarity index 100% rename from react-icons/md/multiline-chart.d.ts rename to types/react-icons/md/multiline-chart.d.ts diff --git a/react-icons/md/music-note.d.ts b/types/react-icons/md/music-note.d.ts similarity index 100% rename from react-icons/md/music-note.d.ts rename to types/react-icons/md/music-note.d.ts diff --git a/react-icons/md/music-video.d.ts b/types/react-icons/md/music-video.d.ts similarity index 100% rename from react-icons/md/music-video.d.ts rename to types/react-icons/md/music-video.d.ts diff --git a/react-icons/md/my-location.d.ts b/types/react-icons/md/my-location.d.ts similarity index 100% rename from react-icons/md/my-location.d.ts rename to types/react-icons/md/my-location.d.ts diff --git a/react-icons/md/nature-people.d.ts b/types/react-icons/md/nature-people.d.ts similarity index 100% rename from react-icons/md/nature-people.d.ts rename to types/react-icons/md/nature-people.d.ts diff --git a/react-icons/md/nature.d.ts b/types/react-icons/md/nature.d.ts similarity index 100% rename from react-icons/md/nature.d.ts rename to types/react-icons/md/nature.d.ts diff --git a/react-icons/md/navigate-before.d.ts b/types/react-icons/md/navigate-before.d.ts similarity index 100% rename from react-icons/md/navigate-before.d.ts rename to types/react-icons/md/navigate-before.d.ts diff --git a/react-icons/md/navigate-next.d.ts b/types/react-icons/md/navigate-next.d.ts similarity index 100% rename from react-icons/md/navigate-next.d.ts rename to types/react-icons/md/navigate-next.d.ts diff --git a/react-icons/md/navigation.d.ts b/types/react-icons/md/navigation.d.ts similarity index 100% rename from react-icons/md/navigation.d.ts rename to types/react-icons/md/navigation.d.ts diff --git a/react-icons/md/near-me.d.ts b/types/react-icons/md/near-me.d.ts similarity index 100% rename from react-icons/md/near-me.d.ts rename to types/react-icons/md/near-me.d.ts diff --git a/react-icons/md/network-cell.d.ts b/types/react-icons/md/network-cell.d.ts similarity index 100% rename from react-icons/md/network-cell.d.ts rename to types/react-icons/md/network-cell.d.ts diff --git a/react-icons/md/network-check.d.ts b/types/react-icons/md/network-check.d.ts similarity index 100% rename from react-icons/md/network-check.d.ts rename to types/react-icons/md/network-check.d.ts diff --git a/react-icons/md/network-locked.d.ts b/types/react-icons/md/network-locked.d.ts similarity index 100% rename from react-icons/md/network-locked.d.ts rename to types/react-icons/md/network-locked.d.ts diff --git a/react-icons/md/network-wifi.d.ts b/types/react-icons/md/network-wifi.d.ts similarity index 100% rename from react-icons/md/network-wifi.d.ts rename to types/react-icons/md/network-wifi.d.ts diff --git a/react-icons/md/new-releases.d.ts b/types/react-icons/md/new-releases.d.ts similarity index 100% rename from react-icons/md/new-releases.d.ts rename to types/react-icons/md/new-releases.d.ts diff --git a/react-icons/md/next-week.d.ts b/types/react-icons/md/next-week.d.ts similarity index 100% rename from react-icons/md/next-week.d.ts rename to types/react-icons/md/next-week.d.ts diff --git a/react-icons/md/nfc.d.ts b/types/react-icons/md/nfc.d.ts similarity index 100% rename from react-icons/md/nfc.d.ts rename to types/react-icons/md/nfc.d.ts diff --git a/react-icons/md/no-encryption.d.ts b/types/react-icons/md/no-encryption.d.ts similarity index 100% rename from react-icons/md/no-encryption.d.ts rename to types/react-icons/md/no-encryption.d.ts diff --git a/react-icons/md/no-sim.d.ts b/types/react-icons/md/no-sim.d.ts similarity index 100% rename from react-icons/md/no-sim.d.ts rename to types/react-icons/md/no-sim.d.ts diff --git a/react-icons/md/not-interested.d.ts b/types/react-icons/md/not-interested.d.ts similarity index 100% rename from react-icons/md/not-interested.d.ts rename to types/react-icons/md/not-interested.d.ts diff --git a/react-icons/md/note-add.d.ts b/types/react-icons/md/note-add.d.ts similarity index 100% rename from react-icons/md/note-add.d.ts rename to types/react-icons/md/note-add.d.ts diff --git a/react-icons/md/note.d.ts b/types/react-icons/md/note.d.ts similarity index 100% rename from react-icons/md/note.d.ts rename to types/react-icons/md/note.d.ts diff --git a/react-icons/md/notifications-active.d.ts b/types/react-icons/md/notifications-active.d.ts similarity index 100% rename from react-icons/md/notifications-active.d.ts rename to types/react-icons/md/notifications-active.d.ts diff --git a/react-icons/md/notifications-none.d.ts b/types/react-icons/md/notifications-none.d.ts similarity index 100% rename from react-icons/md/notifications-none.d.ts rename to types/react-icons/md/notifications-none.d.ts diff --git a/react-icons/md/notifications-off.d.ts b/types/react-icons/md/notifications-off.d.ts similarity index 100% rename from react-icons/md/notifications-off.d.ts rename to types/react-icons/md/notifications-off.d.ts diff --git a/react-icons/md/notifications-paused.d.ts b/types/react-icons/md/notifications-paused.d.ts similarity index 100% rename from react-icons/md/notifications-paused.d.ts rename to types/react-icons/md/notifications-paused.d.ts diff --git a/react-icons/md/notifications.d.ts b/types/react-icons/md/notifications.d.ts similarity index 100% rename from react-icons/md/notifications.d.ts rename to types/react-icons/md/notifications.d.ts diff --git a/react-icons/md/now-wallpaper.d.ts b/types/react-icons/md/now-wallpaper.d.ts similarity index 100% rename from react-icons/md/now-wallpaper.d.ts rename to types/react-icons/md/now-wallpaper.d.ts diff --git a/react-icons/md/now-widgets.d.ts b/types/react-icons/md/now-widgets.d.ts similarity index 100% rename from react-icons/md/now-widgets.d.ts rename to types/react-icons/md/now-widgets.d.ts diff --git a/react-icons/md/offline-pin.d.ts b/types/react-icons/md/offline-pin.d.ts similarity index 100% rename from react-icons/md/offline-pin.d.ts rename to types/react-icons/md/offline-pin.d.ts diff --git a/react-icons/md/ondemand-video.d.ts b/types/react-icons/md/ondemand-video.d.ts similarity index 100% rename from react-icons/md/ondemand-video.d.ts rename to types/react-icons/md/ondemand-video.d.ts diff --git a/react-icons/md/opacity.d.ts b/types/react-icons/md/opacity.d.ts similarity index 100% rename from react-icons/md/opacity.d.ts rename to types/react-icons/md/opacity.d.ts diff --git a/react-icons/md/open-in-browser.d.ts b/types/react-icons/md/open-in-browser.d.ts similarity index 100% rename from react-icons/md/open-in-browser.d.ts rename to types/react-icons/md/open-in-browser.d.ts diff --git a/react-icons/md/open-in-new.d.ts b/types/react-icons/md/open-in-new.d.ts similarity index 100% rename from react-icons/md/open-in-new.d.ts rename to types/react-icons/md/open-in-new.d.ts diff --git a/react-icons/md/open-with.d.ts b/types/react-icons/md/open-with.d.ts similarity index 100% rename from react-icons/md/open-with.d.ts rename to types/react-icons/md/open-with.d.ts diff --git a/react-icons/md/pages.d.ts b/types/react-icons/md/pages.d.ts similarity index 100% rename from react-icons/md/pages.d.ts rename to types/react-icons/md/pages.d.ts diff --git a/react-icons/md/pageview.d.ts b/types/react-icons/md/pageview.d.ts similarity index 100% rename from react-icons/md/pageview.d.ts rename to types/react-icons/md/pageview.d.ts diff --git a/react-icons/md/palette.d.ts b/types/react-icons/md/palette.d.ts similarity index 100% rename from react-icons/md/palette.d.ts rename to types/react-icons/md/palette.d.ts diff --git a/react-icons/md/pan-tool.d.ts b/types/react-icons/md/pan-tool.d.ts similarity index 100% rename from react-icons/md/pan-tool.d.ts rename to types/react-icons/md/pan-tool.d.ts diff --git a/react-icons/md/panorama-fish-eye.d.ts b/types/react-icons/md/panorama-fish-eye.d.ts similarity index 100% rename from react-icons/md/panorama-fish-eye.d.ts rename to types/react-icons/md/panorama-fish-eye.d.ts diff --git a/react-icons/md/panorama-horizontal.d.ts b/types/react-icons/md/panorama-horizontal.d.ts similarity index 100% rename from react-icons/md/panorama-horizontal.d.ts rename to types/react-icons/md/panorama-horizontal.d.ts diff --git a/react-icons/md/panorama-vertical.d.ts b/types/react-icons/md/panorama-vertical.d.ts similarity index 100% rename from react-icons/md/panorama-vertical.d.ts rename to types/react-icons/md/panorama-vertical.d.ts diff --git a/react-icons/md/panorama-wide-angle.d.ts b/types/react-icons/md/panorama-wide-angle.d.ts similarity index 100% rename from react-icons/md/panorama-wide-angle.d.ts rename to types/react-icons/md/panorama-wide-angle.d.ts diff --git a/react-icons/md/panorama.d.ts b/types/react-icons/md/panorama.d.ts similarity index 100% rename from react-icons/md/panorama.d.ts rename to types/react-icons/md/panorama.d.ts diff --git a/react-icons/md/party-mode.d.ts b/types/react-icons/md/party-mode.d.ts similarity index 100% rename from react-icons/md/party-mode.d.ts rename to types/react-icons/md/party-mode.d.ts diff --git a/react-icons/md/pause-circle-filled.d.ts b/types/react-icons/md/pause-circle-filled.d.ts similarity index 100% rename from react-icons/md/pause-circle-filled.d.ts rename to types/react-icons/md/pause-circle-filled.d.ts diff --git a/react-icons/md/pause-circle-outline.d.ts b/types/react-icons/md/pause-circle-outline.d.ts similarity index 100% rename from react-icons/md/pause-circle-outline.d.ts rename to types/react-icons/md/pause-circle-outline.d.ts diff --git a/react-icons/md/pause.d.ts b/types/react-icons/md/pause.d.ts similarity index 100% rename from react-icons/md/pause.d.ts rename to types/react-icons/md/pause.d.ts diff --git a/react-icons/md/payment.d.ts b/types/react-icons/md/payment.d.ts similarity index 100% rename from react-icons/md/payment.d.ts rename to types/react-icons/md/payment.d.ts diff --git a/react-icons/md/people-outline.d.ts b/types/react-icons/md/people-outline.d.ts similarity index 100% rename from react-icons/md/people-outline.d.ts rename to types/react-icons/md/people-outline.d.ts diff --git a/react-icons/md/people.d.ts b/types/react-icons/md/people.d.ts similarity index 100% rename from react-icons/md/people.d.ts rename to types/react-icons/md/people.d.ts diff --git a/react-icons/md/perm-camera-mic.d.ts b/types/react-icons/md/perm-camera-mic.d.ts similarity index 100% rename from react-icons/md/perm-camera-mic.d.ts rename to types/react-icons/md/perm-camera-mic.d.ts diff --git a/react-icons/md/perm-contact-calendar.d.ts b/types/react-icons/md/perm-contact-calendar.d.ts similarity index 100% rename from react-icons/md/perm-contact-calendar.d.ts rename to types/react-icons/md/perm-contact-calendar.d.ts diff --git a/react-icons/md/perm-data-setting.d.ts b/types/react-icons/md/perm-data-setting.d.ts similarity index 100% rename from react-icons/md/perm-data-setting.d.ts rename to types/react-icons/md/perm-data-setting.d.ts diff --git a/react-icons/md/perm-device-information.d.ts b/types/react-icons/md/perm-device-information.d.ts similarity index 100% rename from react-icons/md/perm-device-information.d.ts rename to types/react-icons/md/perm-device-information.d.ts diff --git a/react-icons/md/perm-identity.d.ts b/types/react-icons/md/perm-identity.d.ts similarity index 100% rename from react-icons/md/perm-identity.d.ts rename to types/react-icons/md/perm-identity.d.ts diff --git a/react-icons/md/perm-media.d.ts b/types/react-icons/md/perm-media.d.ts similarity index 100% rename from react-icons/md/perm-media.d.ts rename to types/react-icons/md/perm-media.d.ts diff --git a/react-icons/md/perm-phone-msg.d.ts b/types/react-icons/md/perm-phone-msg.d.ts similarity index 100% rename from react-icons/md/perm-phone-msg.d.ts rename to types/react-icons/md/perm-phone-msg.d.ts diff --git a/react-icons/md/perm-scan-wifi.d.ts b/types/react-icons/md/perm-scan-wifi.d.ts similarity index 100% rename from react-icons/md/perm-scan-wifi.d.ts rename to types/react-icons/md/perm-scan-wifi.d.ts diff --git a/react-icons/md/person-add.d.ts b/types/react-icons/md/person-add.d.ts similarity index 100% rename from react-icons/md/person-add.d.ts rename to types/react-icons/md/person-add.d.ts diff --git a/react-icons/md/person-outline.d.ts b/types/react-icons/md/person-outline.d.ts similarity index 100% rename from react-icons/md/person-outline.d.ts rename to types/react-icons/md/person-outline.d.ts diff --git a/react-icons/md/person-pin-circle.d.ts b/types/react-icons/md/person-pin-circle.d.ts similarity index 100% rename from react-icons/md/person-pin-circle.d.ts rename to types/react-icons/md/person-pin-circle.d.ts diff --git a/react-icons/md/person-pin.d.ts b/types/react-icons/md/person-pin.d.ts similarity index 100% rename from react-icons/md/person-pin.d.ts rename to types/react-icons/md/person-pin.d.ts diff --git a/react-icons/md/person.d.ts b/types/react-icons/md/person.d.ts similarity index 100% rename from react-icons/md/person.d.ts rename to types/react-icons/md/person.d.ts diff --git a/react-icons/md/personal-video.d.ts b/types/react-icons/md/personal-video.d.ts similarity index 100% rename from react-icons/md/personal-video.d.ts rename to types/react-icons/md/personal-video.d.ts diff --git a/react-icons/md/pets.d.ts b/types/react-icons/md/pets.d.ts similarity index 100% rename from react-icons/md/pets.d.ts rename to types/react-icons/md/pets.d.ts diff --git a/react-icons/md/phone-android.d.ts b/types/react-icons/md/phone-android.d.ts similarity index 100% rename from react-icons/md/phone-android.d.ts rename to types/react-icons/md/phone-android.d.ts diff --git a/react-icons/md/phone-bluetooth-speaker.d.ts b/types/react-icons/md/phone-bluetooth-speaker.d.ts similarity index 100% rename from react-icons/md/phone-bluetooth-speaker.d.ts rename to types/react-icons/md/phone-bluetooth-speaker.d.ts diff --git a/react-icons/md/phone-forwarded.d.ts b/types/react-icons/md/phone-forwarded.d.ts similarity index 100% rename from react-icons/md/phone-forwarded.d.ts rename to types/react-icons/md/phone-forwarded.d.ts diff --git a/react-icons/md/phone-in-talk.d.ts b/types/react-icons/md/phone-in-talk.d.ts similarity index 100% rename from react-icons/md/phone-in-talk.d.ts rename to types/react-icons/md/phone-in-talk.d.ts diff --git a/react-icons/md/phone-iphone.d.ts b/types/react-icons/md/phone-iphone.d.ts similarity index 100% rename from react-icons/md/phone-iphone.d.ts rename to types/react-icons/md/phone-iphone.d.ts diff --git a/react-icons/md/phone-locked.d.ts b/types/react-icons/md/phone-locked.d.ts similarity index 100% rename from react-icons/md/phone-locked.d.ts rename to types/react-icons/md/phone-locked.d.ts diff --git a/react-icons/md/phone-missed.d.ts b/types/react-icons/md/phone-missed.d.ts similarity index 100% rename from react-icons/md/phone-missed.d.ts rename to types/react-icons/md/phone-missed.d.ts diff --git a/react-icons/md/phone-paused.d.ts b/types/react-icons/md/phone-paused.d.ts similarity index 100% rename from react-icons/md/phone-paused.d.ts rename to types/react-icons/md/phone-paused.d.ts diff --git a/react-icons/md/phone.d.ts b/types/react-icons/md/phone.d.ts similarity index 100% rename from react-icons/md/phone.d.ts rename to types/react-icons/md/phone.d.ts diff --git a/react-icons/md/phonelink-erase.d.ts b/types/react-icons/md/phonelink-erase.d.ts similarity index 100% rename from react-icons/md/phonelink-erase.d.ts rename to types/react-icons/md/phonelink-erase.d.ts diff --git a/react-icons/md/phonelink-lock.d.ts b/types/react-icons/md/phonelink-lock.d.ts similarity index 100% rename from react-icons/md/phonelink-lock.d.ts rename to types/react-icons/md/phonelink-lock.d.ts diff --git a/react-icons/md/phonelink-off.d.ts b/types/react-icons/md/phonelink-off.d.ts similarity index 100% rename from react-icons/md/phonelink-off.d.ts rename to types/react-icons/md/phonelink-off.d.ts diff --git a/react-icons/md/phonelink-ring.d.ts b/types/react-icons/md/phonelink-ring.d.ts similarity index 100% rename from react-icons/md/phonelink-ring.d.ts rename to types/react-icons/md/phonelink-ring.d.ts diff --git a/react-icons/md/phonelink-setup.d.ts b/types/react-icons/md/phonelink-setup.d.ts similarity index 100% rename from react-icons/md/phonelink-setup.d.ts rename to types/react-icons/md/phonelink-setup.d.ts diff --git a/react-icons/md/phonelink.d.ts b/types/react-icons/md/phonelink.d.ts similarity index 100% rename from react-icons/md/phonelink.d.ts rename to types/react-icons/md/phonelink.d.ts diff --git a/react-icons/md/photo-album.d.ts b/types/react-icons/md/photo-album.d.ts similarity index 100% rename from react-icons/md/photo-album.d.ts rename to types/react-icons/md/photo-album.d.ts diff --git a/react-icons/md/photo-camera.d.ts b/types/react-icons/md/photo-camera.d.ts similarity index 100% rename from react-icons/md/photo-camera.d.ts rename to types/react-icons/md/photo-camera.d.ts diff --git a/react-icons/md/photo-filter.d.ts b/types/react-icons/md/photo-filter.d.ts similarity index 100% rename from react-icons/md/photo-filter.d.ts rename to types/react-icons/md/photo-filter.d.ts diff --git a/react-icons/md/photo-library.d.ts b/types/react-icons/md/photo-library.d.ts similarity index 100% rename from react-icons/md/photo-library.d.ts rename to types/react-icons/md/photo-library.d.ts diff --git a/react-icons/md/photo-size-select-actual.d.ts b/types/react-icons/md/photo-size-select-actual.d.ts similarity index 100% rename from react-icons/md/photo-size-select-actual.d.ts rename to types/react-icons/md/photo-size-select-actual.d.ts diff --git a/react-icons/md/photo-size-select-large.d.ts b/types/react-icons/md/photo-size-select-large.d.ts similarity index 100% rename from react-icons/md/photo-size-select-large.d.ts rename to types/react-icons/md/photo-size-select-large.d.ts diff --git a/react-icons/md/photo-size-select-small.d.ts b/types/react-icons/md/photo-size-select-small.d.ts similarity index 100% rename from react-icons/md/photo-size-select-small.d.ts rename to types/react-icons/md/photo-size-select-small.d.ts diff --git a/react-icons/md/photo.d.ts b/types/react-icons/md/photo.d.ts similarity index 100% rename from react-icons/md/photo.d.ts rename to types/react-icons/md/photo.d.ts diff --git a/react-icons/md/picture-as-pdf.d.ts b/types/react-icons/md/picture-as-pdf.d.ts similarity index 100% rename from react-icons/md/picture-as-pdf.d.ts rename to types/react-icons/md/picture-as-pdf.d.ts diff --git a/react-icons/md/picture-in-picture-alt.d.ts b/types/react-icons/md/picture-in-picture-alt.d.ts similarity index 100% rename from react-icons/md/picture-in-picture-alt.d.ts rename to types/react-icons/md/picture-in-picture-alt.d.ts diff --git a/react-icons/md/picture-in-picture.d.ts b/types/react-icons/md/picture-in-picture.d.ts similarity index 100% rename from react-icons/md/picture-in-picture.d.ts rename to types/react-icons/md/picture-in-picture.d.ts diff --git a/react-icons/md/pie-chart-outlined.d.ts b/types/react-icons/md/pie-chart-outlined.d.ts similarity index 100% rename from react-icons/md/pie-chart-outlined.d.ts rename to types/react-icons/md/pie-chart-outlined.d.ts diff --git a/react-icons/md/pie-chart.d.ts b/types/react-icons/md/pie-chart.d.ts similarity index 100% rename from react-icons/md/pie-chart.d.ts rename to types/react-icons/md/pie-chart.d.ts diff --git a/react-icons/md/pin-drop.d.ts b/types/react-icons/md/pin-drop.d.ts similarity index 100% rename from react-icons/md/pin-drop.d.ts rename to types/react-icons/md/pin-drop.d.ts diff --git a/react-icons/md/place.d.ts b/types/react-icons/md/place.d.ts similarity index 100% rename from react-icons/md/place.d.ts rename to types/react-icons/md/place.d.ts diff --git a/react-icons/md/play-arrow.d.ts b/types/react-icons/md/play-arrow.d.ts similarity index 100% rename from react-icons/md/play-arrow.d.ts rename to types/react-icons/md/play-arrow.d.ts diff --git a/react-icons/md/play-circle-filled.d.ts b/types/react-icons/md/play-circle-filled.d.ts similarity index 100% rename from react-icons/md/play-circle-filled.d.ts rename to types/react-icons/md/play-circle-filled.d.ts diff --git a/react-icons/md/play-circle-outline.d.ts b/types/react-icons/md/play-circle-outline.d.ts similarity index 100% rename from react-icons/md/play-circle-outline.d.ts rename to types/react-icons/md/play-circle-outline.d.ts diff --git a/react-icons/md/play-for-work.d.ts b/types/react-icons/md/play-for-work.d.ts similarity index 100% rename from react-icons/md/play-for-work.d.ts rename to types/react-icons/md/play-for-work.d.ts diff --git a/react-icons/md/playlist-add-check.d.ts b/types/react-icons/md/playlist-add-check.d.ts similarity index 100% rename from react-icons/md/playlist-add-check.d.ts rename to types/react-icons/md/playlist-add-check.d.ts diff --git a/react-icons/md/playlist-add.d.ts b/types/react-icons/md/playlist-add.d.ts similarity index 100% rename from react-icons/md/playlist-add.d.ts rename to types/react-icons/md/playlist-add.d.ts diff --git a/react-icons/md/playlist-play.d.ts b/types/react-icons/md/playlist-play.d.ts similarity index 100% rename from react-icons/md/playlist-play.d.ts rename to types/react-icons/md/playlist-play.d.ts diff --git a/react-icons/md/plus-one.d.ts b/types/react-icons/md/plus-one.d.ts similarity index 100% rename from react-icons/md/plus-one.d.ts rename to types/react-icons/md/plus-one.d.ts diff --git a/react-icons/md/poll.d.ts b/types/react-icons/md/poll.d.ts similarity index 100% rename from react-icons/md/poll.d.ts rename to types/react-icons/md/poll.d.ts diff --git a/react-icons/md/polymer.d.ts b/types/react-icons/md/polymer.d.ts similarity index 100% rename from react-icons/md/polymer.d.ts rename to types/react-icons/md/polymer.d.ts diff --git a/react-icons/md/pool.d.ts b/types/react-icons/md/pool.d.ts similarity index 100% rename from react-icons/md/pool.d.ts rename to types/react-icons/md/pool.d.ts diff --git a/react-icons/md/portable-wifi-off.d.ts b/types/react-icons/md/portable-wifi-off.d.ts similarity index 100% rename from react-icons/md/portable-wifi-off.d.ts rename to types/react-icons/md/portable-wifi-off.d.ts diff --git a/react-icons/md/portrait.d.ts b/types/react-icons/md/portrait.d.ts similarity index 100% rename from react-icons/md/portrait.d.ts rename to types/react-icons/md/portrait.d.ts diff --git a/react-icons/md/power-input.d.ts b/types/react-icons/md/power-input.d.ts similarity index 100% rename from react-icons/md/power-input.d.ts rename to types/react-icons/md/power-input.d.ts diff --git a/react-icons/md/power-settings-new.d.ts b/types/react-icons/md/power-settings-new.d.ts similarity index 100% rename from react-icons/md/power-settings-new.d.ts rename to types/react-icons/md/power-settings-new.d.ts diff --git a/react-icons/md/power.d.ts b/types/react-icons/md/power.d.ts similarity index 100% rename from react-icons/md/power.d.ts rename to types/react-icons/md/power.d.ts diff --git a/react-icons/md/pregnant-woman.d.ts b/types/react-icons/md/pregnant-woman.d.ts similarity index 100% rename from react-icons/md/pregnant-woman.d.ts rename to types/react-icons/md/pregnant-woman.d.ts diff --git a/react-icons/md/present-to-all.d.ts b/types/react-icons/md/present-to-all.d.ts similarity index 100% rename from react-icons/md/present-to-all.d.ts rename to types/react-icons/md/present-to-all.d.ts diff --git a/react-icons/md/print.d.ts b/types/react-icons/md/print.d.ts similarity index 100% rename from react-icons/md/print.d.ts rename to types/react-icons/md/print.d.ts diff --git a/react-icons/md/priority-high.d.ts b/types/react-icons/md/priority-high.d.ts similarity index 100% rename from react-icons/md/priority-high.d.ts rename to types/react-icons/md/priority-high.d.ts diff --git a/react-icons/md/public.d.ts b/types/react-icons/md/public.d.ts similarity index 100% rename from react-icons/md/public.d.ts rename to types/react-icons/md/public.d.ts diff --git a/react-icons/md/publish.d.ts b/types/react-icons/md/publish.d.ts similarity index 100% rename from react-icons/md/publish.d.ts rename to types/react-icons/md/publish.d.ts diff --git a/react-icons/md/query-builder.d.ts b/types/react-icons/md/query-builder.d.ts similarity index 100% rename from react-icons/md/query-builder.d.ts rename to types/react-icons/md/query-builder.d.ts diff --git a/react-icons/md/question-answer.d.ts b/types/react-icons/md/question-answer.d.ts similarity index 100% rename from react-icons/md/question-answer.d.ts rename to types/react-icons/md/question-answer.d.ts diff --git a/react-icons/md/queue-music.d.ts b/types/react-icons/md/queue-music.d.ts similarity index 100% rename from react-icons/md/queue-music.d.ts rename to types/react-icons/md/queue-music.d.ts diff --git a/react-icons/md/queue-play-next.d.ts b/types/react-icons/md/queue-play-next.d.ts similarity index 100% rename from react-icons/md/queue-play-next.d.ts rename to types/react-icons/md/queue-play-next.d.ts diff --git a/react-icons/md/queue.d.ts b/types/react-icons/md/queue.d.ts similarity index 100% rename from react-icons/md/queue.d.ts rename to types/react-icons/md/queue.d.ts diff --git a/react-icons/md/radio-button-checked.d.ts b/types/react-icons/md/radio-button-checked.d.ts similarity index 100% rename from react-icons/md/radio-button-checked.d.ts rename to types/react-icons/md/radio-button-checked.d.ts diff --git a/react-icons/md/radio-button-unchecked.d.ts b/types/react-icons/md/radio-button-unchecked.d.ts similarity index 100% rename from react-icons/md/radio-button-unchecked.d.ts rename to types/react-icons/md/radio-button-unchecked.d.ts diff --git a/react-icons/md/radio.d.ts b/types/react-icons/md/radio.d.ts similarity index 100% rename from react-icons/md/radio.d.ts rename to types/react-icons/md/radio.d.ts diff --git a/react-icons/md/rate-review.d.ts b/types/react-icons/md/rate-review.d.ts similarity index 100% rename from react-icons/md/rate-review.d.ts rename to types/react-icons/md/rate-review.d.ts diff --git a/react-icons/md/receipt.d.ts b/types/react-icons/md/receipt.d.ts similarity index 100% rename from react-icons/md/receipt.d.ts rename to types/react-icons/md/receipt.d.ts diff --git a/react-icons/md/recent-actors.d.ts b/types/react-icons/md/recent-actors.d.ts similarity index 100% rename from react-icons/md/recent-actors.d.ts rename to types/react-icons/md/recent-actors.d.ts diff --git a/react-icons/md/record-voice-over.d.ts b/types/react-icons/md/record-voice-over.d.ts similarity index 100% rename from react-icons/md/record-voice-over.d.ts rename to types/react-icons/md/record-voice-over.d.ts diff --git a/react-icons/md/redeem.d.ts b/types/react-icons/md/redeem.d.ts similarity index 100% rename from react-icons/md/redeem.d.ts rename to types/react-icons/md/redeem.d.ts diff --git a/react-icons/md/redo.d.ts b/types/react-icons/md/redo.d.ts similarity index 100% rename from react-icons/md/redo.d.ts rename to types/react-icons/md/redo.d.ts diff --git a/react-icons/md/refresh.d.ts b/types/react-icons/md/refresh.d.ts similarity index 100% rename from react-icons/md/refresh.d.ts rename to types/react-icons/md/refresh.d.ts diff --git a/react-icons/md/remove-circle-outline.d.ts b/types/react-icons/md/remove-circle-outline.d.ts similarity index 100% rename from react-icons/md/remove-circle-outline.d.ts rename to types/react-icons/md/remove-circle-outline.d.ts diff --git a/react-icons/md/remove-circle.d.ts b/types/react-icons/md/remove-circle.d.ts similarity index 100% rename from react-icons/md/remove-circle.d.ts rename to types/react-icons/md/remove-circle.d.ts diff --git a/react-icons/md/remove-from-queue.d.ts b/types/react-icons/md/remove-from-queue.d.ts similarity index 100% rename from react-icons/md/remove-from-queue.d.ts rename to types/react-icons/md/remove-from-queue.d.ts diff --git a/react-icons/md/remove-red-eye.d.ts b/types/react-icons/md/remove-red-eye.d.ts similarity index 100% rename from react-icons/md/remove-red-eye.d.ts rename to types/react-icons/md/remove-red-eye.d.ts diff --git a/react-icons/md/remove-shopping-cart.d.ts b/types/react-icons/md/remove-shopping-cart.d.ts similarity index 100% rename from react-icons/md/remove-shopping-cart.d.ts rename to types/react-icons/md/remove-shopping-cart.d.ts diff --git a/react-icons/md/remove.d.ts b/types/react-icons/md/remove.d.ts similarity index 100% rename from react-icons/md/remove.d.ts rename to types/react-icons/md/remove.d.ts diff --git a/react-icons/md/reorder.d.ts b/types/react-icons/md/reorder.d.ts similarity index 100% rename from react-icons/md/reorder.d.ts rename to types/react-icons/md/reorder.d.ts diff --git a/react-icons/md/repeat-one.d.ts b/types/react-icons/md/repeat-one.d.ts similarity index 100% rename from react-icons/md/repeat-one.d.ts rename to types/react-icons/md/repeat-one.d.ts diff --git a/react-icons/md/repeat.d.ts b/types/react-icons/md/repeat.d.ts similarity index 100% rename from react-icons/md/repeat.d.ts rename to types/react-icons/md/repeat.d.ts diff --git a/react-icons/md/replay-10.d.ts b/types/react-icons/md/replay-10.d.ts similarity index 100% rename from react-icons/md/replay-10.d.ts rename to types/react-icons/md/replay-10.d.ts diff --git a/react-icons/md/replay-30.d.ts b/types/react-icons/md/replay-30.d.ts similarity index 100% rename from react-icons/md/replay-30.d.ts rename to types/react-icons/md/replay-30.d.ts diff --git a/react-icons/md/replay-5.d.ts b/types/react-icons/md/replay-5.d.ts similarity index 100% rename from react-icons/md/replay-5.d.ts rename to types/react-icons/md/replay-5.d.ts diff --git a/react-icons/md/replay.d.ts b/types/react-icons/md/replay.d.ts similarity index 100% rename from react-icons/md/replay.d.ts rename to types/react-icons/md/replay.d.ts diff --git a/react-icons/md/reply-all.d.ts b/types/react-icons/md/reply-all.d.ts similarity index 100% rename from react-icons/md/reply-all.d.ts rename to types/react-icons/md/reply-all.d.ts diff --git a/react-icons/md/reply.d.ts b/types/react-icons/md/reply.d.ts similarity index 100% rename from react-icons/md/reply.d.ts rename to types/react-icons/md/reply.d.ts diff --git a/react-icons/md/report-problem.d.ts b/types/react-icons/md/report-problem.d.ts similarity index 100% rename from react-icons/md/report-problem.d.ts rename to types/react-icons/md/report-problem.d.ts diff --git a/react-icons/md/report.d.ts b/types/react-icons/md/report.d.ts similarity index 100% rename from react-icons/md/report.d.ts rename to types/react-icons/md/report.d.ts diff --git a/react-icons/md/restaurant-menu.d.ts b/types/react-icons/md/restaurant-menu.d.ts similarity index 100% rename from react-icons/md/restaurant-menu.d.ts rename to types/react-icons/md/restaurant-menu.d.ts diff --git a/react-icons/md/restaurant.d.ts b/types/react-icons/md/restaurant.d.ts similarity index 100% rename from react-icons/md/restaurant.d.ts rename to types/react-icons/md/restaurant.d.ts diff --git a/react-icons/md/restore-page.d.ts b/types/react-icons/md/restore-page.d.ts similarity index 100% rename from react-icons/md/restore-page.d.ts rename to types/react-icons/md/restore-page.d.ts diff --git a/react-icons/md/restore.d.ts b/types/react-icons/md/restore.d.ts similarity index 100% rename from react-icons/md/restore.d.ts rename to types/react-icons/md/restore.d.ts diff --git a/react-icons/md/ring-volume.d.ts b/types/react-icons/md/ring-volume.d.ts similarity index 100% rename from react-icons/md/ring-volume.d.ts rename to types/react-icons/md/ring-volume.d.ts diff --git a/react-icons/md/room-service.d.ts b/types/react-icons/md/room-service.d.ts similarity index 100% rename from react-icons/md/room-service.d.ts rename to types/react-icons/md/room-service.d.ts diff --git a/react-icons/md/room.d.ts b/types/react-icons/md/room.d.ts similarity index 100% rename from react-icons/md/room.d.ts rename to types/react-icons/md/room.d.ts diff --git a/react-icons/md/rotate-90-degrees-ccw.d.ts b/types/react-icons/md/rotate-90-degrees-ccw.d.ts similarity index 100% rename from react-icons/md/rotate-90-degrees-ccw.d.ts rename to types/react-icons/md/rotate-90-degrees-ccw.d.ts diff --git a/react-icons/md/rotate-left.d.ts b/types/react-icons/md/rotate-left.d.ts similarity index 100% rename from react-icons/md/rotate-left.d.ts rename to types/react-icons/md/rotate-left.d.ts diff --git a/react-icons/md/rotate-right.d.ts b/types/react-icons/md/rotate-right.d.ts similarity index 100% rename from react-icons/md/rotate-right.d.ts rename to types/react-icons/md/rotate-right.d.ts diff --git a/react-icons/md/rounded-corner.d.ts b/types/react-icons/md/rounded-corner.d.ts similarity index 100% rename from react-icons/md/rounded-corner.d.ts rename to types/react-icons/md/rounded-corner.d.ts diff --git a/react-icons/md/router.d.ts b/types/react-icons/md/router.d.ts similarity index 100% rename from react-icons/md/router.d.ts rename to types/react-icons/md/router.d.ts diff --git a/react-icons/md/rowing.d.ts b/types/react-icons/md/rowing.d.ts similarity index 100% rename from react-icons/md/rowing.d.ts rename to types/react-icons/md/rowing.d.ts diff --git a/react-icons/md/rss-feed.d.ts b/types/react-icons/md/rss-feed.d.ts similarity index 100% rename from react-icons/md/rss-feed.d.ts rename to types/react-icons/md/rss-feed.d.ts diff --git a/react-icons/md/rv-hookup.d.ts b/types/react-icons/md/rv-hookup.d.ts similarity index 100% rename from react-icons/md/rv-hookup.d.ts rename to types/react-icons/md/rv-hookup.d.ts diff --git a/react-icons/md/satellite.d.ts b/types/react-icons/md/satellite.d.ts similarity index 100% rename from react-icons/md/satellite.d.ts rename to types/react-icons/md/satellite.d.ts diff --git a/react-icons/md/save.d.ts b/types/react-icons/md/save.d.ts similarity index 100% rename from react-icons/md/save.d.ts rename to types/react-icons/md/save.d.ts diff --git a/react-icons/md/scanner.d.ts b/types/react-icons/md/scanner.d.ts similarity index 100% rename from react-icons/md/scanner.d.ts rename to types/react-icons/md/scanner.d.ts diff --git a/react-icons/md/schedule.d.ts b/types/react-icons/md/schedule.d.ts similarity index 100% rename from react-icons/md/schedule.d.ts rename to types/react-icons/md/schedule.d.ts diff --git a/react-icons/md/school.d.ts b/types/react-icons/md/school.d.ts similarity index 100% rename from react-icons/md/school.d.ts rename to types/react-icons/md/school.d.ts diff --git a/react-icons/md/screen-lock-landscape.d.ts b/types/react-icons/md/screen-lock-landscape.d.ts similarity index 100% rename from react-icons/md/screen-lock-landscape.d.ts rename to types/react-icons/md/screen-lock-landscape.d.ts diff --git a/react-icons/md/screen-lock-portrait.d.ts b/types/react-icons/md/screen-lock-portrait.d.ts similarity index 100% rename from react-icons/md/screen-lock-portrait.d.ts rename to types/react-icons/md/screen-lock-portrait.d.ts diff --git a/react-icons/md/screen-lock-rotation.d.ts b/types/react-icons/md/screen-lock-rotation.d.ts similarity index 100% rename from react-icons/md/screen-lock-rotation.d.ts rename to types/react-icons/md/screen-lock-rotation.d.ts diff --git a/react-icons/md/screen-rotation.d.ts b/types/react-icons/md/screen-rotation.d.ts similarity index 100% rename from react-icons/md/screen-rotation.d.ts rename to types/react-icons/md/screen-rotation.d.ts diff --git a/react-icons/md/screen-share.d.ts b/types/react-icons/md/screen-share.d.ts similarity index 100% rename from react-icons/md/screen-share.d.ts rename to types/react-icons/md/screen-share.d.ts diff --git a/react-icons/md/sd-card.d.ts b/types/react-icons/md/sd-card.d.ts similarity index 100% rename from react-icons/md/sd-card.d.ts rename to types/react-icons/md/sd-card.d.ts diff --git a/react-icons/md/sd-storage.d.ts b/types/react-icons/md/sd-storage.d.ts similarity index 100% rename from react-icons/md/sd-storage.d.ts rename to types/react-icons/md/sd-storage.d.ts diff --git a/react-icons/md/search.d.ts b/types/react-icons/md/search.d.ts similarity index 100% rename from react-icons/md/search.d.ts rename to types/react-icons/md/search.d.ts diff --git a/react-icons/md/security.d.ts b/types/react-icons/md/security.d.ts similarity index 100% rename from react-icons/md/security.d.ts rename to types/react-icons/md/security.d.ts diff --git a/react-icons/md/select-all.d.ts b/types/react-icons/md/select-all.d.ts similarity index 100% rename from react-icons/md/select-all.d.ts rename to types/react-icons/md/select-all.d.ts diff --git a/react-icons/md/send.d.ts b/types/react-icons/md/send.d.ts similarity index 100% rename from react-icons/md/send.d.ts rename to types/react-icons/md/send.d.ts diff --git a/react-icons/md/sentiment-dissatisfied.d.ts b/types/react-icons/md/sentiment-dissatisfied.d.ts similarity index 100% rename from react-icons/md/sentiment-dissatisfied.d.ts rename to types/react-icons/md/sentiment-dissatisfied.d.ts diff --git a/react-icons/md/sentiment-neutral.d.ts b/types/react-icons/md/sentiment-neutral.d.ts similarity index 100% rename from react-icons/md/sentiment-neutral.d.ts rename to types/react-icons/md/sentiment-neutral.d.ts diff --git a/react-icons/md/sentiment-satisfied.d.ts b/types/react-icons/md/sentiment-satisfied.d.ts similarity index 100% rename from react-icons/md/sentiment-satisfied.d.ts rename to types/react-icons/md/sentiment-satisfied.d.ts diff --git a/react-icons/md/sentiment-very-dissatisfied.d.ts b/types/react-icons/md/sentiment-very-dissatisfied.d.ts similarity index 100% rename from react-icons/md/sentiment-very-dissatisfied.d.ts rename to types/react-icons/md/sentiment-very-dissatisfied.d.ts diff --git a/react-icons/md/sentiment-very-satisfied.d.ts b/types/react-icons/md/sentiment-very-satisfied.d.ts similarity index 100% rename from react-icons/md/sentiment-very-satisfied.d.ts rename to types/react-icons/md/sentiment-very-satisfied.d.ts diff --git a/react-icons/md/settings-applications.d.ts b/types/react-icons/md/settings-applications.d.ts similarity index 100% rename from react-icons/md/settings-applications.d.ts rename to types/react-icons/md/settings-applications.d.ts diff --git a/react-icons/md/settings-backup-restore.d.ts b/types/react-icons/md/settings-backup-restore.d.ts similarity index 100% rename from react-icons/md/settings-backup-restore.d.ts rename to types/react-icons/md/settings-backup-restore.d.ts diff --git a/react-icons/md/settings-bluetooth.d.ts b/types/react-icons/md/settings-bluetooth.d.ts similarity index 100% rename from react-icons/md/settings-bluetooth.d.ts rename to types/react-icons/md/settings-bluetooth.d.ts diff --git a/react-icons/md/settings-brightness.d.ts b/types/react-icons/md/settings-brightness.d.ts similarity index 100% rename from react-icons/md/settings-brightness.d.ts rename to types/react-icons/md/settings-brightness.d.ts diff --git a/react-icons/md/settings-cell.d.ts b/types/react-icons/md/settings-cell.d.ts similarity index 100% rename from react-icons/md/settings-cell.d.ts rename to types/react-icons/md/settings-cell.d.ts diff --git a/react-icons/md/settings-ethernet.d.ts b/types/react-icons/md/settings-ethernet.d.ts similarity index 100% rename from react-icons/md/settings-ethernet.d.ts rename to types/react-icons/md/settings-ethernet.d.ts diff --git a/react-icons/md/settings-input-antenna.d.ts b/types/react-icons/md/settings-input-antenna.d.ts similarity index 100% rename from react-icons/md/settings-input-antenna.d.ts rename to types/react-icons/md/settings-input-antenna.d.ts diff --git a/react-icons/md/settings-input-component.d.ts b/types/react-icons/md/settings-input-component.d.ts similarity index 100% rename from react-icons/md/settings-input-component.d.ts rename to types/react-icons/md/settings-input-component.d.ts diff --git a/react-icons/md/settings-input-composite.d.ts b/types/react-icons/md/settings-input-composite.d.ts similarity index 100% rename from react-icons/md/settings-input-composite.d.ts rename to types/react-icons/md/settings-input-composite.d.ts diff --git a/react-icons/md/settings-input-hdmi.d.ts b/types/react-icons/md/settings-input-hdmi.d.ts similarity index 100% rename from react-icons/md/settings-input-hdmi.d.ts rename to types/react-icons/md/settings-input-hdmi.d.ts diff --git a/react-icons/md/settings-input-svideo.d.ts b/types/react-icons/md/settings-input-svideo.d.ts similarity index 100% rename from react-icons/md/settings-input-svideo.d.ts rename to types/react-icons/md/settings-input-svideo.d.ts diff --git a/react-icons/md/settings-overscan.d.ts b/types/react-icons/md/settings-overscan.d.ts similarity index 100% rename from react-icons/md/settings-overscan.d.ts rename to types/react-icons/md/settings-overscan.d.ts diff --git a/react-icons/md/settings-phone.d.ts b/types/react-icons/md/settings-phone.d.ts similarity index 100% rename from react-icons/md/settings-phone.d.ts rename to types/react-icons/md/settings-phone.d.ts diff --git a/react-icons/md/settings-power.d.ts b/types/react-icons/md/settings-power.d.ts similarity index 100% rename from react-icons/md/settings-power.d.ts rename to types/react-icons/md/settings-power.d.ts diff --git a/react-icons/md/settings-remote.d.ts b/types/react-icons/md/settings-remote.d.ts similarity index 100% rename from react-icons/md/settings-remote.d.ts rename to types/react-icons/md/settings-remote.d.ts diff --git a/react-icons/md/settings-system-daydream.d.ts b/types/react-icons/md/settings-system-daydream.d.ts similarity index 100% rename from react-icons/md/settings-system-daydream.d.ts rename to types/react-icons/md/settings-system-daydream.d.ts diff --git a/react-icons/md/settings-voice.d.ts b/types/react-icons/md/settings-voice.d.ts similarity index 100% rename from react-icons/md/settings-voice.d.ts rename to types/react-icons/md/settings-voice.d.ts diff --git a/react-icons/md/settings.d.ts b/types/react-icons/md/settings.d.ts similarity index 100% rename from react-icons/md/settings.d.ts rename to types/react-icons/md/settings.d.ts diff --git a/react-icons/md/share.d.ts b/types/react-icons/md/share.d.ts similarity index 100% rename from react-icons/md/share.d.ts rename to types/react-icons/md/share.d.ts diff --git a/react-icons/md/shop-two.d.ts b/types/react-icons/md/shop-two.d.ts similarity index 100% rename from react-icons/md/shop-two.d.ts rename to types/react-icons/md/shop-two.d.ts diff --git a/react-icons/md/shop.d.ts b/types/react-icons/md/shop.d.ts similarity index 100% rename from react-icons/md/shop.d.ts rename to types/react-icons/md/shop.d.ts diff --git a/react-icons/md/shopping-basket.d.ts b/types/react-icons/md/shopping-basket.d.ts similarity index 100% rename from react-icons/md/shopping-basket.d.ts rename to types/react-icons/md/shopping-basket.d.ts diff --git a/react-icons/md/shopping-cart.d.ts b/types/react-icons/md/shopping-cart.d.ts similarity index 100% rename from react-icons/md/shopping-cart.d.ts rename to types/react-icons/md/shopping-cart.d.ts diff --git a/react-icons/md/short-text.d.ts b/types/react-icons/md/short-text.d.ts similarity index 100% rename from react-icons/md/short-text.d.ts rename to types/react-icons/md/short-text.d.ts diff --git a/react-icons/md/show-chart.d.ts b/types/react-icons/md/show-chart.d.ts similarity index 100% rename from react-icons/md/show-chart.d.ts rename to types/react-icons/md/show-chart.d.ts diff --git a/react-icons/md/shuffle.d.ts b/types/react-icons/md/shuffle.d.ts similarity index 100% rename from react-icons/md/shuffle.d.ts rename to types/react-icons/md/shuffle.d.ts diff --git a/react-icons/md/signal-cellular-4-bar.d.ts b/types/react-icons/md/signal-cellular-4-bar.d.ts similarity index 100% rename from react-icons/md/signal-cellular-4-bar.d.ts rename to types/react-icons/md/signal-cellular-4-bar.d.ts diff --git a/react-icons/md/signal-cellular-connected-no-internet-4-bar.d.ts b/types/react-icons/md/signal-cellular-connected-no-internet-4-bar.d.ts similarity index 100% rename from react-icons/md/signal-cellular-connected-no-internet-4-bar.d.ts rename to types/react-icons/md/signal-cellular-connected-no-internet-4-bar.d.ts diff --git a/react-icons/md/signal-cellular-no-sim.d.ts b/types/react-icons/md/signal-cellular-no-sim.d.ts similarity index 100% rename from react-icons/md/signal-cellular-no-sim.d.ts rename to types/react-icons/md/signal-cellular-no-sim.d.ts diff --git a/react-icons/md/signal-cellular-null.d.ts b/types/react-icons/md/signal-cellular-null.d.ts similarity index 100% rename from react-icons/md/signal-cellular-null.d.ts rename to types/react-icons/md/signal-cellular-null.d.ts diff --git a/react-icons/md/signal-cellular-off.d.ts b/types/react-icons/md/signal-cellular-off.d.ts similarity index 100% rename from react-icons/md/signal-cellular-off.d.ts rename to types/react-icons/md/signal-cellular-off.d.ts diff --git a/react-icons/md/signal-wifi-4-bar-lock.d.ts b/types/react-icons/md/signal-wifi-4-bar-lock.d.ts similarity index 100% rename from react-icons/md/signal-wifi-4-bar-lock.d.ts rename to types/react-icons/md/signal-wifi-4-bar-lock.d.ts diff --git a/react-icons/md/signal-wifi-4-bar.d.ts b/types/react-icons/md/signal-wifi-4-bar.d.ts similarity index 100% rename from react-icons/md/signal-wifi-4-bar.d.ts rename to types/react-icons/md/signal-wifi-4-bar.d.ts diff --git a/react-icons/md/signal-wifi-off.d.ts b/types/react-icons/md/signal-wifi-off.d.ts similarity index 100% rename from react-icons/md/signal-wifi-off.d.ts rename to types/react-icons/md/signal-wifi-off.d.ts diff --git a/react-icons/md/sim-card-alert.d.ts b/types/react-icons/md/sim-card-alert.d.ts similarity index 100% rename from react-icons/md/sim-card-alert.d.ts rename to types/react-icons/md/sim-card-alert.d.ts diff --git a/react-icons/md/sim-card.d.ts b/types/react-icons/md/sim-card.d.ts similarity index 100% rename from react-icons/md/sim-card.d.ts rename to types/react-icons/md/sim-card.d.ts diff --git a/react-icons/md/skip-next.d.ts b/types/react-icons/md/skip-next.d.ts similarity index 100% rename from react-icons/md/skip-next.d.ts rename to types/react-icons/md/skip-next.d.ts diff --git a/react-icons/md/skip-previous.d.ts b/types/react-icons/md/skip-previous.d.ts similarity index 100% rename from react-icons/md/skip-previous.d.ts rename to types/react-icons/md/skip-previous.d.ts diff --git a/react-icons/md/slideshow.d.ts b/types/react-icons/md/slideshow.d.ts similarity index 100% rename from react-icons/md/slideshow.d.ts rename to types/react-icons/md/slideshow.d.ts diff --git a/react-icons/md/slow-motion-video.d.ts b/types/react-icons/md/slow-motion-video.d.ts similarity index 100% rename from react-icons/md/slow-motion-video.d.ts rename to types/react-icons/md/slow-motion-video.d.ts diff --git a/react-icons/md/smartphone.d.ts b/types/react-icons/md/smartphone.d.ts similarity index 100% rename from react-icons/md/smartphone.d.ts rename to types/react-icons/md/smartphone.d.ts diff --git a/react-icons/md/smoke-free.d.ts b/types/react-icons/md/smoke-free.d.ts similarity index 100% rename from react-icons/md/smoke-free.d.ts rename to types/react-icons/md/smoke-free.d.ts diff --git a/react-icons/md/smoking-rooms.d.ts b/types/react-icons/md/smoking-rooms.d.ts similarity index 100% rename from react-icons/md/smoking-rooms.d.ts rename to types/react-icons/md/smoking-rooms.d.ts diff --git a/react-icons/md/sms-failed.d.ts b/types/react-icons/md/sms-failed.d.ts similarity index 100% rename from react-icons/md/sms-failed.d.ts rename to types/react-icons/md/sms-failed.d.ts diff --git a/react-icons/md/sms.d.ts b/types/react-icons/md/sms.d.ts similarity index 100% rename from react-icons/md/sms.d.ts rename to types/react-icons/md/sms.d.ts diff --git a/react-icons/md/snooze.d.ts b/types/react-icons/md/snooze.d.ts similarity index 100% rename from react-icons/md/snooze.d.ts rename to types/react-icons/md/snooze.d.ts diff --git a/react-icons/md/sort-by-alpha.d.ts b/types/react-icons/md/sort-by-alpha.d.ts similarity index 100% rename from react-icons/md/sort-by-alpha.d.ts rename to types/react-icons/md/sort-by-alpha.d.ts diff --git a/react-icons/md/sort.d.ts b/types/react-icons/md/sort.d.ts similarity index 100% rename from react-icons/md/sort.d.ts rename to types/react-icons/md/sort.d.ts diff --git a/react-icons/md/spa.d.ts b/types/react-icons/md/spa.d.ts similarity index 100% rename from react-icons/md/spa.d.ts rename to types/react-icons/md/spa.d.ts diff --git a/react-icons/md/space-bar.d.ts b/types/react-icons/md/space-bar.d.ts similarity index 100% rename from react-icons/md/space-bar.d.ts rename to types/react-icons/md/space-bar.d.ts diff --git a/react-icons/md/speaker-group.d.ts b/types/react-icons/md/speaker-group.d.ts similarity index 100% rename from react-icons/md/speaker-group.d.ts rename to types/react-icons/md/speaker-group.d.ts diff --git a/react-icons/md/speaker-notes-off.d.ts b/types/react-icons/md/speaker-notes-off.d.ts similarity index 100% rename from react-icons/md/speaker-notes-off.d.ts rename to types/react-icons/md/speaker-notes-off.d.ts diff --git a/react-icons/md/speaker-notes.d.ts b/types/react-icons/md/speaker-notes.d.ts similarity index 100% rename from react-icons/md/speaker-notes.d.ts rename to types/react-icons/md/speaker-notes.d.ts diff --git a/react-icons/md/speaker-phone.d.ts b/types/react-icons/md/speaker-phone.d.ts similarity index 100% rename from react-icons/md/speaker-phone.d.ts rename to types/react-icons/md/speaker-phone.d.ts diff --git a/react-icons/md/speaker.d.ts b/types/react-icons/md/speaker.d.ts similarity index 100% rename from react-icons/md/speaker.d.ts rename to types/react-icons/md/speaker.d.ts diff --git a/react-icons/md/spellcheck.d.ts b/types/react-icons/md/spellcheck.d.ts similarity index 100% rename from react-icons/md/spellcheck.d.ts rename to types/react-icons/md/spellcheck.d.ts diff --git a/react-icons/md/star-border.d.ts b/types/react-icons/md/star-border.d.ts similarity index 100% rename from react-icons/md/star-border.d.ts rename to types/react-icons/md/star-border.d.ts diff --git a/react-icons/md/star-half.d.ts b/types/react-icons/md/star-half.d.ts similarity index 100% rename from react-icons/md/star-half.d.ts rename to types/react-icons/md/star-half.d.ts diff --git a/react-icons/md/star-outline.d.ts b/types/react-icons/md/star-outline.d.ts similarity index 100% rename from react-icons/md/star-outline.d.ts rename to types/react-icons/md/star-outline.d.ts diff --git a/react-icons/md/star.d.ts b/types/react-icons/md/star.d.ts similarity index 100% rename from react-icons/md/star.d.ts rename to types/react-icons/md/star.d.ts diff --git a/react-icons/md/stars.d.ts b/types/react-icons/md/stars.d.ts similarity index 100% rename from react-icons/md/stars.d.ts rename to types/react-icons/md/stars.d.ts diff --git a/react-icons/md/stay-current-landscape.d.ts b/types/react-icons/md/stay-current-landscape.d.ts similarity index 100% rename from react-icons/md/stay-current-landscape.d.ts rename to types/react-icons/md/stay-current-landscape.d.ts diff --git a/react-icons/md/stay-current-portrait.d.ts b/types/react-icons/md/stay-current-portrait.d.ts similarity index 100% rename from react-icons/md/stay-current-portrait.d.ts rename to types/react-icons/md/stay-current-portrait.d.ts diff --git a/react-icons/md/stay-primary-landscape.d.ts b/types/react-icons/md/stay-primary-landscape.d.ts similarity index 100% rename from react-icons/md/stay-primary-landscape.d.ts rename to types/react-icons/md/stay-primary-landscape.d.ts diff --git a/react-icons/md/stay-primary-portrait.d.ts b/types/react-icons/md/stay-primary-portrait.d.ts similarity index 100% rename from react-icons/md/stay-primary-portrait.d.ts rename to types/react-icons/md/stay-primary-portrait.d.ts diff --git a/react-icons/md/stop-screen-share.d.ts b/types/react-icons/md/stop-screen-share.d.ts similarity index 100% rename from react-icons/md/stop-screen-share.d.ts rename to types/react-icons/md/stop-screen-share.d.ts diff --git a/react-icons/md/stop.d.ts b/types/react-icons/md/stop.d.ts similarity index 100% rename from react-icons/md/stop.d.ts rename to types/react-icons/md/stop.d.ts diff --git a/react-icons/md/storage.d.ts b/types/react-icons/md/storage.d.ts similarity index 100% rename from react-icons/md/storage.d.ts rename to types/react-icons/md/storage.d.ts diff --git a/react-icons/md/store-mall-directory.d.ts b/types/react-icons/md/store-mall-directory.d.ts similarity index 100% rename from react-icons/md/store-mall-directory.d.ts rename to types/react-icons/md/store-mall-directory.d.ts diff --git a/react-icons/md/store.d.ts b/types/react-icons/md/store.d.ts similarity index 100% rename from react-icons/md/store.d.ts rename to types/react-icons/md/store.d.ts diff --git a/react-icons/md/straighten.d.ts b/types/react-icons/md/straighten.d.ts similarity index 100% rename from react-icons/md/straighten.d.ts rename to types/react-icons/md/straighten.d.ts diff --git a/react-icons/md/streetview.d.ts b/types/react-icons/md/streetview.d.ts similarity index 100% rename from react-icons/md/streetview.d.ts rename to types/react-icons/md/streetview.d.ts diff --git a/react-icons/md/strikethrough-s.d.ts b/types/react-icons/md/strikethrough-s.d.ts similarity index 100% rename from react-icons/md/strikethrough-s.d.ts rename to types/react-icons/md/strikethrough-s.d.ts diff --git a/react-icons/md/style.d.ts b/types/react-icons/md/style.d.ts similarity index 100% rename from react-icons/md/style.d.ts rename to types/react-icons/md/style.d.ts diff --git a/react-icons/md/subdirectory-arrow-left.d.ts b/types/react-icons/md/subdirectory-arrow-left.d.ts similarity index 100% rename from react-icons/md/subdirectory-arrow-left.d.ts rename to types/react-icons/md/subdirectory-arrow-left.d.ts diff --git a/react-icons/md/subdirectory-arrow-right.d.ts b/types/react-icons/md/subdirectory-arrow-right.d.ts similarity index 100% rename from react-icons/md/subdirectory-arrow-right.d.ts rename to types/react-icons/md/subdirectory-arrow-right.d.ts diff --git a/react-icons/md/subject.d.ts b/types/react-icons/md/subject.d.ts similarity index 100% rename from react-icons/md/subject.d.ts rename to types/react-icons/md/subject.d.ts diff --git a/react-icons/md/subscriptions.d.ts b/types/react-icons/md/subscriptions.d.ts similarity index 100% rename from react-icons/md/subscriptions.d.ts rename to types/react-icons/md/subscriptions.d.ts diff --git a/react-icons/md/subtitles.d.ts b/types/react-icons/md/subtitles.d.ts similarity index 100% rename from react-icons/md/subtitles.d.ts rename to types/react-icons/md/subtitles.d.ts diff --git a/react-icons/md/subway.d.ts b/types/react-icons/md/subway.d.ts similarity index 100% rename from react-icons/md/subway.d.ts rename to types/react-icons/md/subway.d.ts diff --git a/react-icons/md/supervisor-account.d.ts b/types/react-icons/md/supervisor-account.d.ts similarity index 100% rename from react-icons/md/supervisor-account.d.ts rename to types/react-icons/md/supervisor-account.d.ts diff --git a/react-icons/md/surround-sound.d.ts b/types/react-icons/md/surround-sound.d.ts similarity index 100% rename from react-icons/md/surround-sound.d.ts rename to types/react-icons/md/surround-sound.d.ts diff --git a/react-icons/md/swap-calls.d.ts b/types/react-icons/md/swap-calls.d.ts similarity index 100% rename from react-icons/md/swap-calls.d.ts rename to types/react-icons/md/swap-calls.d.ts diff --git a/react-icons/md/swap-horiz.d.ts b/types/react-icons/md/swap-horiz.d.ts similarity index 100% rename from react-icons/md/swap-horiz.d.ts rename to types/react-icons/md/swap-horiz.d.ts diff --git a/react-icons/md/swap-vert.d.ts b/types/react-icons/md/swap-vert.d.ts similarity index 100% rename from react-icons/md/swap-vert.d.ts rename to types/react-icons/md/swap-vert.d.ts diff --git a/react-icons/md/swap-vertical-circle.d.ts b/types/react-icons/md/swap-vertical-circle.d.ts similarity index 100% rename from react-icons/md/swap-vertical-circle.d.ts rename to types/react-icons/md/swap-vertical-circle.d.ts diff --git a/react-icons/md/switch-camera.d.ts b/types/react-icons/md/switch-camera.d.ts similarity index 100% rename from react-icons/md/switch-camera.d.ts rename to types/react-icons/md/switch-camera.d.ts diff --git a/react-icons/md/switch-video.d.ts b/types/react-icons/md/switch-video.d.ts similarity index 100% rename from react-icons/md/switch-video.d.ts rename to types/react-icons/md/switch-video.d.ts diff --git a/react-icons/md/sync-disabled.d.ts b/types/react-icons/md/sync-disabled.d.ts similarity index 100% rename from react-icons/md/sync-disabled.d.ts rename to types/react-icons/md/sync-disabled.d.ts diff --git a/react-icons/md/sync-problem.d.ts b/types/react-icons/md/sync-problem.d.ts similarity index 100% rename from react-icons/md/sync-problem.d.ts rename to types/react-icons/md/sync-problem.d.ts diff --git a/react-icons/md/sync.d.ts b/types/react-icons/md/sync.d.ts similarity index 100% rename from react-icons/md/sync.d.ts rename to types/react-icons/md/sync.d.ts diff --git a/react-icons/md/system-update-alt.d.ts b/types/react-icons/md/system-update-alt.d.ts similarity index 100% rename from react-icons/md/system-update-alt.d.ts rename to types/react-icons/md/system-update-alt.d.ts diff --git a/react-icons/md/system-update.d.ts b/types/react-icons/md/system-update.d.ts similarity index 100% rename from react-icons/md/system-update.d.ts rename to types/react-icons/md/system-update.d.ts diff --git a/react-icons/md/tab-unselected.d.ts b/types/react-icons/md/tab-unselected.d.ts similarity index 100% rename from react-icons/md/tab-unselected.d.ts rename to types/react-icons/md/tab-unselected.d.ts diff --git a/react-icons/md/tab.d.ts b/types/react-icons/md/tab.d.ts similarity index 100% rename from react-icons/md/tab.d.ts rename to types/react-icons/md/tab.d.ts diff --git a/react-icons/md/tablet-android.d.ts b/types/react-icons/md/tablet-android.d.ts similarity index 100% rename from react-icons/md/tablet-android.d.ts rename to types/react-icons/md/tablet-android.d.ts diff --git a/react-icons/md/tablet-mac.d.ts b/types/react-icons/md/tablet-mac.d.ts similarity index 100% rename from react-icons/md/tablet-mac.d.ts rename to types/react-icons/md/tablet-mac.d.ts diff --git a/react-icons/md/tablet.d.ts b/types/react-icons/md/tablet.d.ts similarity index 100% rename from react-icons/md/tablet.d.ts rename to types/react-icons/md/tablet.d.ts diff --git a/react-icons/md/tag-faces.d.ts b/types/react-icons/md/tag-faces.d.ts similarity index 100% rename from react-icons/md/tag-faces.d.ts rename to types/react-icons/md/tag-faces.d.ts diff --git a/react-icons/md/tap-and-play.d.ts b/types/react-icons/md/tap-and-play.d.ts similarity index 100% rename from react-icons/md/tap-and-play.d.ts rename to types/react-icons/md/tap-and-play.d.ts diff --git a/react-icons/md/terrain.d.ts b/types/react-icons/md/terrain.d.ts similarity index 100% rename from react-icons/md/terrain.d.ts rename to types/react-icons/md/terrain.d.ts diff --git a/react-icons/md/text-fields.d.ts b/types/react-icons/md/text-fields.d.ts similarity index 100% rename from react-icons/md/text-fields.d.ts rename to types/react-icons/md/text-fields.d.ts diff --git a/react-icons/md/text-format.d.ts b/types/react-icons/md/text-format.d.ts similarity index 100% rename from react-icons/md/text-format.d.ts rename to types/react-icons/md/text-format.d.ts diff --git a/react-icons/md/textsms.d.ts b/types/react-icons/md/textsms.d.ts similarity index 100% rename from react-icons/md/textsms.d.ts rename to types/react-icons/md/textsms.d.ts diff --git a/react-icons/md/texture.d.ts b/types/react-icons/md/texture.d.ts similarity index 100% rename from react-icons/md/texture.d.ts rename to types/react-icons/md/texture.d.ts diff --git a/react-icons/md/theaters.d.ts b/types/react-icons/md/theaters.d.ts similarity index 100% rename from react-icons/md/theaters.d.ts rename to types/react-icons/md/theaters.d.ts diff --git a/react-icons/md/thumb-down.d.ts b/types/react-icons/md/thumb-down.d.ts similarity index 100% rename from react-icons/md/thumb-down.d.ts rename to types/react-icons/md/thumb-down.d.ts diff --git a/react-icons/md/thumb-up.d.ts b/types/react-icons/md/thumb-up.d.ts similarity index 100% rename from react-icons/md/thumb-up.d.ts rename to types/react-icons/md/thumb-up.d.ts diff --git a/react-icons/md/thumbs-up-down.d.ts b/types/react-icons/md/thumbs-up-down.d.ts similarity index 100% rename from react-icons/md/thumbs-up-down.d.ts rename to types/react-icons/md/thumbs-up-down.d.ts diff --git a/react-icons/md/time-to-leave.d.ts b/types/react-icons/md/time-to-leave.d.ts similarity index 100% rename from react-icons/md/time-to-leave.d.ts rename to types/react-icons/md/time-to-leave.d.ts diff --git a/react-icons/md/timelapse.d.ts b/types/react-icons/md/timelapse.d.ts similarity index 100% rename from react-icons/md/timelapse.d.ts rename to types/react-icons/md/timelapse.d.ts diff --git a/react-icons/md/timeline.d.ts b/types/react-icons/md/timeline.d.ts similarity index 100% rename from react-icons/md/timeline.d.ts rename to types/react-icons/md/timeline.d.ts diff --git a/react-icons/md/timer-10.d.ts b/types/react-icons/md/timer-10.d.ts similarity index 100% rename from react-icons/md/timer-10.d.ts rename to types/react-icons/md/timer-10.d.ts diff --git a/react-icons/md/timer-3.d.ts b/types/react-icons/md/timer-3.d.ts similarity index 100% rename from react-icons/md/timer-3.d.ts rename to types/react-icons/md/timer-3.d.ts diff --git a/react-icons/md/timer-off.d.ts b/types/react-icons/md/timer-off.d.ts similarity index 100% rename from react-icons/md/timer-off.d.ts rename to types/react-icons/md/timer-off.d.ts diff --git a/react-icons/md/timer.d.ts b/types/react-icons/md/timer.d.ts similarity index 100% rename from react-icons/md/timer.d.ts rename to types/react-icons/md/timer.d.ts diff --git a/react-icons/md/title.d.ts b/types/react-icons/md/title.d.ts similarity index 100% rename from react-icons/md/title.d.ts rename to types/react-icons/md/title.d.ts diff --git a/react-icons/md/toc.d.ts b/types/react-icons/md/toc.d.ts similarity index 100% rename from react-icons/md/toc.d.ts rename to types/react-icons/md/toc.d.ts diff --git a/react-icons/md/today.d.ts b/types/react-icons/md/today.d.ts similarity index 100% rename from react-icons/md/today.d.ts rename to types/react-icons/md/today.d.ts diff --git a/react-icons/md/toll.d.ts b/types/react-icons/md/toll.d.ts similarity index 100% rename from react-icons/md/toll.d.ts rename to types/react-icons/md/toll.d.ts diff --git a/react-icons/md/tonality.d.ts b/types/react-icons/md/tonality.d.ts similarity index 100% rename from react-icons/md/tonality.d.ts rename to types/react-icons/md/tonality.d.ts diff --git a/react-icons/md/touch-app.d.ts b/types/react-icons/md/touch-app.d.ts similarity index 100% rename from react-icons/md/touch-app.d.ts rename to types/react-icons/md/touch-app.d.ts diff --git a/react-icons/md/toys.d.ts b/types/react-icons/md/toys.d.ts similarity index 100% rename from react-icons/md/toys.d.ts rename to types/react-icons/md/toys.d.ts diff --git a/react-icons/md/track-changes.d.ts b/types/react-icons/md/track-changes.d.ts similarity index 100% rename from react-icons/md/track-changes.d.ts rename to types/react-icons/md/track-changes.d.ts diff --git a/react-icons/md/traffic.d.ts b/types/react-icons/md/traffic.d.ts similarity index 100% rename from react-icons/md/traffic.d.ts rename to types/react-icons/md/traffic.d.ts diff --git a/react-icons/md/train.d.ts b/types/react-icons/md/train.d.ts similarity index 100% rename from react-icons/md/train.d.ts rename to types/react-icons/md/train.d.ts diff --git a/react-icons/md/tram.d.ts b/types/react-icons/md/tram.d.ts similarity index 100% rename from react-icons/md/tram.d.ts rename to types/react-icons/md/tram.d.ts diff --git a/react-icons/md/transfer-within-a-station.d.ts b/types/react-icons/md/transfer-within-a-station.d.ts similarity index 100% rename from react-icons/md/transfer-within-a-station.d.ts rename to types/react-icons/md/transfer-within-a-station.d.ts diff --git a/react-icons/md/transform.d.ts b/types/react-icons/md/transform.d.ts similarity index 100% rename from react-icons/md/transform.d.ts rename to types/react-icons/md/transform.d.ts diff --git a/react-icons/md/translate.d.ts b/types/react-icons/md/translate.d.ts similarity index 100% rename from react-icons/md/translate.d.ts rename to types/react-icons/md/translate.d.ts diff --git a/react-icons/md/trending-down.d.ts b/types/react-icons/md/trending-down.d.ts similarity index 100% rename from react-icons/md/trending-down.d.ts rename to types/react-icons/md/trending-down.d.ts diff --git a/react-icons/md/trending-flat.d.ts b/types/react-icons/md/trending-flat.d.ts similarity index 100% rename from react-icons/md/trending-flat.d.ts rename to types/react-icons/md/trending-flat.d.ts diff --git a/react-icons/md/trending-neutral.d.ts b/types/react-icons/md/trending-neutral.d.ts similarity index 100% rename from react-icons/md/trending-neutral.d.ts rename to types/react-icons/md/trending-neutral.d.ts diff --git a/react-icons/md/trending-up.d.ts b/types/react-icons/md/trending-up.d.ts similarity index 100% rename from react-icons/md/trending-up.d.ts rename to types/react-icons/md/trending-up.d.ts diff --git a/react-icons/md/tune.d.ts b/types/react-icons/md/tune.d.ts similarity index 100% rename from react-icons/md/tune.d.ts rename to types/react-icons/md/tune.d.ts diff --git a/react-icons/md/turned-in-not.d.ts b/types/react-icons/md/turned-in-not.d.ts similarity index 100% rename from react-icons/md/turned-in-not.d.ts rename to types/react-icons/md/turned-in-not.d.ts diff --git a/react-icons/md/turned-in.d.ts b/types/react-icons/md/turned-in.d.ts similarity index 100% rename from react-icons/md/turned-in.d.ts rename to types/react-icons/md/turned-in.d.ts diff --git a/react-icons/md/tv.d.ts b/types/react-icons/md/tv.d.ts similarity index 100% rename from react-icons/md/tv.d.ts rename to types/react-icons/md/tv.d.ts diff --git a/react-icons/md/unarchive.d.ts b/types/react-icons/md/unarchive.d.ts similarity index 100% rename from react-icons/md/unarchive.d.ts rename to types/react-icons/md/unarchive.d.ts diff --git a/react-icons/md/undo.d.ts b/types/react-icons/md/undo.d.ts similarity index 100% rename from react-icons/md/undo.d.ts rename to types/react-icons/md/undo.d.ts diff --git a/react-icons/md/unfold-less.d.ts b/types/react-icons/md/unfold-less.d.ts similarity index 100% rename from react-icons/md/unfold-less.d.ts rename to types/react-icons/md/unfold-less.d.ts diff --git a/react-icons/md/unfold-more.d.ts b/types/react-icons/md/unfold-more.d.ts similarity index 100% rename from react-icons/md/unfold-more.d.ts rename to types/react-icons/md/unfold-more.d.ts diff --git a/react-icons/md/update.d.ts b/types/react-icons/md/update.d.ts similarity index 100% rename from react-icons/md/update.d.ts rename to types/react-icons/md/update.d.ts diff --git a/react-icons/md/usb.d.ts b/types/react-icons/md/usb.d.ts similarity index 100% rename from react-icons/md/usb.d.ts rename to types/react-icons/md/usb.d.ts diff --git a/react-icons/md/verified-user.d.ts b/types/react-icons/md/verified-user.d.ts similarity index 100% rename from react-icons/md/verified-user.d.ts rename to types/react-icons/md/verified-user.d.ts diff --git a/react-icons/md/vertical-align-bottom.d.ts b/types/react-icons/md/vertical-align-bottom.d.ts similarity index 100% rename from react-icons/md/vertical-align-bottom.d.ts rename to types/react-icons/md/vertical-align-bottom.d.ts diff --git a/react-icons/md/vertical-align-center.d.ts b/types/react-icons/md/vertical-align-center.d.ts similarity index 100% rename from react-icons/md/vertical-align-center.d.ts rename to types/react-icons/md/vertical-align-center.d.ts diff --git a/react-icons/md/vertical-align-top.d.ts b/types/react-icons/md/vertical-align-top.d.ts similarity index 100% rename from react-icons/md/vertical-align-top.d.ts rename to types/react-icons/md/vertical-align-top.d.ts diff --git a/react-icons/md/vibration.d.ts b/types/react-icons/md/vibration.d.ts similarity index 100% rename from react-icons/md/vibration.d.ts rename to types/react-icons/md/vibration.d.ts diff --git a/react-icons/md/video-call.d.ts b/types/react-icons/md/video-call.d.ts similarity index 100% rename from react-icons/md/video-call.d.ts rename to types/react-icons/md/video-call.d.ts diff --git a/react-icons/md/video-collection.d.ts b/types/react-icons/md/video-collection.d.ts similarity index 100% rename from react-icons/md/video-collection.d.ts rename to types/react-icons/md/video-collection.d.ts diff --git a/react-icons/md/video-label.d.ts b/types/react-icons/md/video-label.d.ts similarity index 100% rename from react-icons/md/video-label.d.ts rename to types/react-icons/md/video-label.d.ts diff --git a/react-icons/md/video-library.d.ts b/types/react-icons/md/video-library.d.ts similarity index 100% rename from react-icons/md/video-library.d.ts rename to types/react-icons/md/video-library.d.ts diff --git a/react-icons/md/videocam-off.d.ts b/types/react-icons/md/videocam-off.d.ts similarity index 100% rename from react-icons/md/videocam-off.d.ts rename to types/react-icons/md/videocam-off.d.ts diff --git a/react-icons/md/videocam.d.ts b/types/react-icons/md/videocam.d.ts similarity index 100% rename from react-icons/md/videocam.d.ts rename to types/react-icons/md/videocam.d.ts diff --git a/react-icons/md/videogame-asset.d.ts b/types/react-icons/md/videogame-asset.d.ts similarity index 100% rename from react-icons/md/videogame-asset.d.ts rename to types/react-icons/md/videogame-asset.d.ts diff --git a/react-icons/md/view-agenda.d.ts b/types/react-icons/md/view-agenda.d.ts similarity index 100% rename from react-icons/md/view-agenda.d.ts rename to types/react-icons/md/view-agenda.d.ts diff --git a/react-icons/md/view-array.d.ts b/types/react-icons/md/view-array.d.ts similarity index 100% rename from react-icons/md/view-array.d.ts rename to types/react-icons/md/view-array.d.ts diff --git a/react-icons/md/view-carousel.d.ts b/types/react-icons/md/view-carousel.d.ts similarity index 100% rename from react-icons/md/view-carousel.d.ts rename to types/react-icons/md/view-carousel.d.ts diff --git a/react-icons/md/view-column.d.ts b/types/react-icons/md/view-column.d.ts similarity index 100% rename from react-icons/md/view-column.d.ts rename to types/react-icons/md/view-column.d.ts diff --git a/react-icons/md/view-comfortable.d.ts b/types/react-icons/md/view-comfortable.d.ts similarity index 100% rename from react-icons/md/view-comfortable.d.ts rename to types/react-icons/md/view-comfortable.d.ts diff --git a/react-icons/md/view-comfy.d.ts b/types/react-icons/md/view-comfy.d.ts similarity index 100% rename from react-icons/md/view-comfy.d.ts rename to types/react-icons/md/view-comfy.d.ts diff --git a/react-icons/md/view-compact.d.ts b/types/react-icons/md/view-compact.d.ts similarity index 100% rename from react-icons/md/view-compact.d.ts rename to types/react-icons/md/view-compact.d.ts diff --git a/react-icons/md/view-day.d.ts b/types/react-icons/md/view-day.d.ts similarity index 100% rename from react-icons/md/view-day.d.ts rename to types/react-icons/md/view-day.d.ts diff --git a/react-icons/md/view-headline.d.ts b/types/react-icons/md/view-headline.d.ts similarity index 100% rename from react-icons/md/view-headline.d.ts rename to types/react-icons/md/view-headline.d.ts diff --git a/react-icons/md/view-list.d.ts b/types/react-icons/md/view-list.d.ts similarity index 100% rename from react-icons/md/view-list.d.ts rename to types/react-icons/md/view-list.d.ts diff --git a/react-icons/md/view-module.d.ts b/types/react-icons/md/view-module.d.ts similarity index 100% rename from react-icons/md/view-module.d.ts rename to types/react-icons/md/view-module.d.ts diff --git a/react-icons/md/view-quilt.d.ts b/types/react-icons/md/view-quilt.d.ts similarity index 100% rename from react-icons/md/view-quilt.d.ts rename to types/react-icons/md/view-quilt.d.ts diff --git a/react-icons/md/view-stream.d.ts b/types/react-icons/md/view-stream.d.ts similarity index 100% rename from react-icons/md/view-stream.d.ts rename to types/react-icons/md/view-stream.d.ts diff --git a/react-icons/md/view-week.d.ts b/types/react-icons/md/view-week.d.ts similarity index 100% rename from react-icons/md/view-week.d.ts rename to types/react-icons/md/view-week.d.ts diff --git a/react-icons/md/vignette.d.ts b/types/react-icons/md/vignette.d.ts similarity index 100% rename from react-icons/md/vignette.d.ts rename to types/react-icons/md/vignette.d.ts diff --git a/react-icons/md/visibility-off.d.ts b/types/react-icons/md/visibility-off.d.ts similarity index 100% rename from react-icons/md/visibility-off.d.ts rename to types/react-icons/md/visibility-off.d.ts diff --git a/react-icons/md/visibility.d.ts b/types/react-icons/md/visibility.d.ts similarity index 100% rename from react-icons/md/visibility.d.ts rename to types/react-icons/md/visibility.d.ts diff --git a/react-icons/md/voice-chat.d.ts b/types/react-icons/md/voice-chat.d.ts similarity index 100% rename from react-icons/md/voice-chat.d.ts rename to types/react-icons/md/voice-chat.d.ts diff --git a/react-icons/md/voicemail.d.ts b/types/react-icons/md/voicemail.d.ts similarity index 100% rename from react-icons/md/voicemail.d.ts rename to types/react-icons/md/voicemail.d.ts diff --git a/react-icons/md/volume-down.d.ts b/types/react-icons/md/volume-down.d.ts similarity index 100% rename from react-icons/md/volume-down.d.ts rename to types/react-icons/md/volume-down.d.ts diff --git a/react-icons/md/volume-mute.d.ts b/types/react-icons/md/volume-mute.d.ts similarity index 100% rename from react-icons/md/volume-mute.d.ts rename to types/react-icons/md/volume-mute.d.ts diff --git a/react-icons/md/volume-off.d.ts b/types/react-icons/md/volume-off.d.ts similarity index 100% rename from react-icons/md/volume-off.d.ts rename to types/react-icons/md/volume-off.d.ts diff --git a/react-icons/md/volume-up.d.ts b/types/react-icons/md/volume-up.d.ts similarity index 100% rename from react-icons/md/volume-up.d.ts rename to types/react-icons/md/volume-up.d.ts diff --git a/react-icons/md/vpn-key.d.ts b/types/react-icons/md/vpn-key.d.ts similarity index 100% rename from react-icons/md/vpn-key.d.ts rename to types/react-icons/md/vpn-key.d.ts diff --git a/react-icons/md/vpn-lock.d.ts b/types/react-icons/md/vpn-lock.d.ts similarity index 100% rename from react-icons/md/vpn-lock.d.ts rename to types/react-icons/md/vpn-lock.d.ts diff --git a/react-icons/md/wallpaper.d.ts b/types/react-icons/md/wallpaper.d.ts similarity index 100% rename from react-icons/md/wallpaper.d.ts rename to types/react-icons/md/wallpaper.d.ts diff --git a/react-icons/md/warning.d.ts b/types/react-icons/md/warning.d.ts similarity index 100% rename from react-icons/md/warning.d.ts rename to types/react-icons/md/warning.d.ts diff --git a/react-icons/md/watch-later.d.ts b/types/react-icons/md/watch-later.d.ts similarity index 100% rename from react-icons/md/watch-later.d.ts rename to types/react-icons/md/watch-later.d.ts diff --git a/react-icons/md/watch.d.ts b/types/react-icons/md/watch.d.ts similarity index 100% rename from react-icons/md/watch.d.ts rename to types/react-icons/md/watch.d.ts diff --git a/react-icons/md/wb-auto.d.ts b/types/react-icons/md/wb-auto.d.ts similarity index 100% rename from react-icons/md/wb-auto.d.ts rename to types/react-icons/md/wb-auto.d.ts diff --git a/react-icons/md/wb-cloudy.d.ts b/types/react-icons/md/wb-cloudy.d.ts similarity index 100% rename from react-icons/md/wb-cloudy.d.ts rename to types/react-icons/md/wb-cloudy.d.ts diff --git a/react-icons/md/wb-incandescent.d.ts b/types/react-icons/md/wb-incandescent.d.ts similarity index 100% rename from react-icons/md/wb-incandescent.d.ts rename to types/react-icons/md/wb-incandescent.d.ts diff --git a/react-icons/md/wb-iridescent.d.ts b/types/react-icons/md/wb-iridescent.d.ts similarity index 100% rename from react-icons/md/wb-iridescent.d.ts rename to types/react-icons/md/wb-iridescent.d.ts diff --git a/react-icons/md/wb-sunny.d.ts b/types/react-icons/md/wb-sunny.d.ts similarity index 100% rename from react-icons/md/wb-sunny.d.ts rename to types/react-icons/md/wb-sunny.d.ts diff --git a/react-icons/md/wc.d.ts b/types/react-icons/md/wc.d.ts similarity index 100% rename from react-icons/md/wc.d.ts rename to types/react-icons/md/wc.d.ts diff --git a/react-icons/md/web-asset.d.ts b/types/react-icons/md/web-asset.d.ts similarity index 100% rename from react-icons/md/web-asset.d.ts rename to types/react-icons/md/web-asset.d.ts diff --git a/react-icons/md/web.d.ts b/types/react-icons/md/web.d.ts similarity index 100% rename from react-icons/md/web.d.ts rename to types/react-icons/md/web.d.ts diff --git a/react-icons/md/weekend.d.ts b/types/react-icons/md/weekend.d.ts similarity index 100% rename from react-icons/md/weekend.d.ts rename to types/react-icons/md/weekend.d.ts diff --git a/react-icons/md/whatshot.d.ts b/types/react-icons/md/whatshot.d.ts similarity index 100% rename from react-icons/md/whatshot.d.ts rename to types/react-icons/md/whatshot.d.ts diff --git a/react-icons/md/widgets.d.ts b/types/react-icons/md/widgets.d.ts similarity index 100% rename from react-icons/md/widgets.d.ts rename to types/react-icons/md/widgets.d.ts diff --git a/react-icons/md/wifi-lock.d.ts b/types/react-icons/md/wifi-lock.d.ts similarity index 100% rename from react-icons/md/wifi-lock.d.ts rename to types/react-icons/md/wifi-lock.d.ts diff --git a/react-icons/md/wifi-tethering.d.ts b/types/react-icons/md/wifi-tethering.d.ts similarity index 100% rename from react-icons/md/wifi-tethering.d.ts rename to types/react-icons/md/wifi-tethering.d.ts diff --git a/react-icons/md/wifi.d.ts b/types/react-icons/md/wifi.d.ts similarity index 100% rename from react-icons/md/wifi.d.ts rename to types/react-icons/md/wifi.d.ts diff --git a/react-icons/md/work.d.ts b/types/react-icons/md/work.d.ts similarity index 100% rename from react-icons/md/work.d.ts rename to types/react-icons/md/work.d.ts diff --git a/react-icons/md/wrap-text.d.ts b/types/react-icons/md/wrap-text.d.ts similarity index 100% rename from react-icons/md/wrap-text.d.ts rename to types/react-icons/md/wrap-text.d.ts diff --git a/react-icons/md/youtube-searched-for.d.ts b/types/react-icons/md/youtube-searched-for.d.ts similarity index 100% rename from react-icons/md/youtube-searched-for.d.ts rename to types/react-icons/md/youtube-searched-for.d.ts diff --git a/react-icons/md/zoom-in.d.ts b/types/react-icons/md/zoom-in.d.ts similarity index 100% rename from react-icons/md/zoom-in.d.ts rename to types/react-icons/md/zoom-in.d.ts diff --git a/react-icons/md/zoom-out-map.d.ts b/types/react-icons/md/zoom-out-map.d.ts similarity index 100% rename from react-icons/md/zoom-out-map.d.ts rename to types/react-icons/md/zoom-out-map.d.ts diff --git a/react-icons/md/zoom-out.d.ts b/types/react-icons/md/zoom-out.d.ts similarity index 100% rename from react-icons/md/zoom-out.d.ts rename to types/react-icons/md/zoom-out.d.ts diff --git a/react-icons/react-icons-tests.tsx b/types/react-icons/react-icons-tests.tsx similarity index 100% rename from react-icons/react-icons-tests.tsx rename to types/react-icons/react-icons-tests.tsx diff --git a/react-icons/ti/adjust-brightness.d.ts b/types/react-icons/ti/adjust-brightness.d.ts similarity index 100% rename from react-icons/ti/adjust-brightness.d.ts rename to types/react-icons/ti/adjust-brightness.d.ts diff --git a/react-icons/ti/adjust-contrast.d.ts b/types/react-icons/ti/adjust-contrast.d.ts similarity index 100% rename from react-icons/ti/adjust-contrast.d.ts rename to types/react-icons/ti/adjust-contrast.d.ts diff --git a/react-icons/ti/anchor-outline.d.ts b/types/react-icons/ti/anchor-outline.d.ts similarity index 100% rename from react-icons/ti/anchor-outline.d.ts rename to types/react-icons/ti/anchor-outline.d.ts diff --git a/react-icons/ti/anchor.d.ts b/types/react-icons/ti/anchor.d.ts similarity index 100% rename from react-icons/ti/anchor.d.ts rename to types/react-icons/ti/anchor.d.ts diff --git a/react-icons/ti/archive.d.ts b/types/react-icons/ti/archive.d.ts similarity index 100% rename from react-icons/ti/archive.d.ts rename to types/react-icons/ti/archive.d.ts diff --git a/react-icons/ti/arrow-back-outline.d.ts b/types/react-icons/ti/arrow-back-outline.d.ts similarity index 100% rename from react-icons/ti/arrow-back-outline.d.ts rename to types/react-icons/ti/arrow-back-outline.d.ts diff --git a/react-icons/ti/arrow-back.d.ts b/types/react-icons/ti/arrow-back.d.ts similarity index 100% rename from react-icons/ti/arrow-back.d.ts rename to types/react-icons/ti/arrow-back.d.ts diff --git a/react-icons/ti/arrow-down-outline.d.ts b/types/react-icons/ti/arrow-down-outline.d.ts similarity index 100% rename from react-icons/ti/arrow-down-outline.d.ts rename to types/react-icons/ti/arrow-down-outline.d.ts diff --git a/react-icons/ti/arrow-down-thick.d.ts b/types/react-icons/ti/arrow-down-thick.d.ts similarity index 100% rename from react-icons/ti/arrow-down-thick.d.ts rename to types/react-icons/ti/arrow-down-thick.d.ts diff --git a/react-icons/ti/arrow-down.d.ts b/types/react-icons/ti/arrow-down.d.ts similarity index 100% rename from react-icons/ti/arrow-down.d.ts rename to types/react-icons/ti/arrow-down.d.ts diff --git a/react-icons/ti/arrow-forward-outline.d.ts b/types/react-icons/ti/arrow-forward-outline.d.ts similarity index 100% rename from react-icons/ti/arrow-forward-outline.d.ts rename to types/react-icons/ti/arrow-forward-outline.d.ts diff --git a/react-icons/ti/arrow-forward.d.ts b/types/react-icons/ti/arrow-forward.d.ts similarity index 100% rename from react-icons/ti/arrow-forward.d.ts rename to types/react-icons/ti/arrow-forward.d.ts diff --git a/react-icons/ti/arrow-left-outline.d.ts b/types/react-icons/ti/arrow-left-outline.d.ts similarity index 100% rename from react-icons/ti/arrow-left-outline.d.ts rename to types/react-icons/ti/arrow-left-outline.d.ts diff --git a/react-icons/ti/arrow-left-thick.d.ts b/types/react-icons/ti/arrow-left-thick.d.ts similarity index 100% rename from react-icons/ti/arrow-left-thick.d.ts rename to types/react-icons/ti/arrow-left-thick.d.ts diff --git a/react-icons/ti/arrow-left.d.ts b/types/react-icons/ti/arrow-left.d.ts similarity index 100% rename from react-icons/ti/arrow-left.d.ts rename to types/react-icons/ti/arrow-left.d.ts diff --git a/react-icons/ti/arrow-loop-outline.d.ts b/types/react-icons/ti/arrow-loop-outline.d.ts similarity index 100% rename from react-icons/ti/arrow-loop-outline.d.ts rename to types/react-icons/ti/arrow-loop-outline.d.ts diff --git a/react-icons/ti/arrow-loop.d.ts b/types/react-icons/ti/arrow-loop.d.ts similarity index 100% rename from react-icons/ti/arrow-loop.d.ts rename to types/react-icons/ti/arrow-loop.d.ts diff --git a/react-icons/ti/arrow-maximise-outline.d.ts b/types/react-icons/ti/arrow-maximise-outline.d.ts similarity index 100% rename from react-icons/ti/arrow-maximise-outline.d.ts rename to types/react-icons/ti/arrow-maximise-outline.d.ts diff --git a/react-icons/ti/arrow-maximise.d.ts b/types/react-icons/ti/arrow-maximise.d.ts similarity index 100% rename from react-icons/ti/arrow-maximise.d.ts rename to types/react-icons/ti/arrow-maximise.d.ts diff --git a/react-icons/ti/arrow-minimise-outline.d.ts b/types/react-icons/ti/arrow-minimise-outline.d.ts similarity index 100% rename from react-icons/ti/arrow-minimise-outline.d.ts rename to types/react-icons/ti/arrow-minimise-outline.d.ts diff --git a/react-icons/ti/arrow-minimise.d.ts b/types/react-icons/ti/arrow-minimise.d.ts similarity index 100% rename from react-icons/ti/arrow-minimise.d.ts rename to types/react-icons/ti/arrow-minimise.d.ts diff --git a/react-icons/ti/arrow-move-outline.d.ts b/types/react-icons/ti/arrow-move-outline.d.ts similarity index 100% rename from react-icons/ti/arrow-move-outline.d.ts rename to types/react-icons/ti/arrow-move-outline.d.ts diff --git a/react-icons/ti/arrow-move.d.ts b/types/react-icons/ti/arrow-move.d.ts similarity index 100% rename from react-icons/ti/arrow-move.d.ts rename to types/react-icons/ti/arrow-move.d.ts diff --git a/react-icons/ti/arrow-repeat-outline.d.ts b/types/react-icons/ti/arrow-repeat-outline.d.ts similarity index 100% rename from react-icons/ti/arrow-repeat-outline.d.ts rename to types/react-icons/ti/arrow-repeat-outline.d.ts diff --git a/react-icons/ti/arrow-repeat.d.ts b/types/react-icons/ti/arrow-repeat.d.ts similarity index 100% rename from react-icons/ti/arrow-repeat.d.ts rename to types/react-icons/ti/arrow-repeat.d.ts diff --git a/react-icons/ti/arrow-right-outline.d.ts b/types/react-icons/ti/arrow-right-outline.d.ts similarity index 100% rename from react-icons/ti/arrow-right-outline.d.ts rename to types/react-icons/ti/arrow-right-outline.d.ts diff --git a/react-icons/ti/arrow-right-thick.d.ts b/types/react-icons/ti/arrow-right-thick.d.ts similarity index 100% rename from react-icons/ti/arrow-right-thick.d.ts rename to types/react-icons/ti/arrow-right-thick.d.ts diff --git a/react-icons/ti/arrow-right.d.ts b/types/react-icons/ti/arrow-right.d.ts similarity index 100% rename from react-icons/ti/arrow-right.d.ts rename to types/react-icons/ti/arrow-right.d.ts diff --git a/react-icons/ti/arrow-shuffle.d.ts b/types/react-icons/ti/arrow-shuffle.d.ts similarity index 100% rename from react-icons/ti/arrow-shuffle.d.ts rename to types/react-icons/ti/arrow-shuffle.d.ts diff --git a/react-icons/ti/arrow-sorted-down.d.ts b/types/react-icons/ti/arrow-sorted-down.d.ts similarity index 100% rename from react-icons/ti/arrow-sorted-down.d.ts rename to types/react-icons/ti/arrow-sorted-down.d.ts diff --git a/react-icons/ti/arrow-sorted-up.d.ts b/types/react-icons/ti/arrow-sorted-up.d.ts similarity index 100% rename from react-icons/ti/arrow-sorted-up.d.ts rename to types/react-icons/ti/arrow-sorted-up.d.ts diff --git a/react-icons/ti/arrow-sync-outline.d.ts b/types/react-icons/ti/arrow-sync-outline.d.ts similarity index 100% rename from react-icons/ti/arrow-sync-outline.d.ts rename to types/react-icons/ti/arrow-sync-outline.d.ts diff --git a/react-icons/ti/arrow-sync.d.ts b/types/react-icons/ti/arrow-sync.d.ts similarity index 100% rename from react-icons/ti/arrow-sync.d.ts rename to types/react-icons/ti/arrow-sync.d.ts diff --git a/react-icons/ti/arrow-unsorted.d.ts b/types/react-icons/ti/arrow-unsorted.d.ts similarity index 100% rename from react-icons/ti/arrow-unsorted.d.ts rename to types/react-icons/ti/arrow-unsorted.d.ts diff --git a/react-icons/ti/arrow-up-outline.d.ts b/types/react-icons/ti/arrow-up-outline.d.ts similarity index 100% rename from react-icons/ti/arrow-up-outline.d.ts rename to types/react-icons/ti/arrow-up-outline.d.ts diff --git a/react-icons/ti/arrow-up-thick.d.ts b/types/react-icons/ti/arrow-up-thick.d.ts similarity index 100% rename from react-icons/ti/arrow-up-thick.d.ts rename to types/react-icons/ti/arrow-up-thick.d.ts diff --git a/react-icons/ti/arrow-up.d.ts b/types/react-icons/ti/arrow-up.d.ts similarity index 100% rename from react-icons/ti/arrow-up.d.ts rename to types/react-icons/ti/arrow-up.d.ts diff --git a/react-icons/ti/at.d.ts b/types/react-icons/ti/at.d.ts similarity index 100% rename from react-icons/ti/at.d.ts rename to types/react-icons/ti/at.d.ts diff --git a/react-icons/ti/attachment-outline.d.ts b/types/react-icons/ti/attachment-outline.d.ts similarity index 100% rename from react-icons/ti/attachment-outline.d.ts rename to types/react-icons/ti/attachment-outline.d.ts diff --git a/react-icons/ti/attachment.d.ts b/types/react-icons/ti/attachment.d.ts similarity index 100% rename from react-icons/ti/attachment.d.ts rename to types/react-icons/ti/attachment.d.ts diff --git a/react-icons/ti/backspace-outline.d.ts b/types/react-icons/ti/backspace-outline.d.ts similarity index 100% rename from react-icons/ti/backspace-outline.d.ts rename to types/react-icons/ti/backspace-outline.d.ts diff --git a/react-icons/ti/backspace.d.ts b/types/react-icons/ti/backspace.d.ts similarity index 100% rename from react-icons/ti/backspace.d.ts rename to types/react-icons/ti/backspace.d.ts diff --git a/react-icons/ti/battery-charge.d.ts b/types/react-icons/ti/battery-charge.d.ts similarity index 100% rename from react-icons/ti/battery-charge.d.ts rename to types/react-icons/ti/battery-charge.d.ts diff --git a/react-icons/ti/battery-full.d.ts b/types/react-icons/ti/battery-full.d.ts similarity index 100% rename from react-icons/ti/battery-full.d.ts rename to types/react-icons/ti/battery-full.d.ts diff --git a/react-icons/ti/battery-high.d.ts b/types/react-icons/ti/battery-high.d.ts similarity index 100% rename from react-icons/ti/battery-high.d.ts rename to types/react-icons/ti/battery-high.d.ts diff --git a/react-icons/ti/battery-low.d.ts b/types/react-icons/ti/battery-low.d.ts similarity index 100% rename from react-icons/ti/battery-low.d.ts rename to types/react-icons/ti/battery-low.d.ts diff --git a/react-icons/ti/battery-mid.d.ts b/types/react-icons/ti/battery-mid.d.ts similarity index 100% rename from react-icons/ti/battery-mid.d.ts rename to types/react-icons/ti/battery-mid.d.ts diff --git a/react-icons/ti/beaker.d.ts b/types/react-icons/ti/beaker.d.ts similarity index 100% rename from react-icons/ti/beaker.d.ts rename to types/react-icons/ti/beaker.d.ts diff --git a/react-icons/ti/beer.d.ts b/types/react-icons/ti/beer.d.ts similarity index 100% rename from react-icons/ti/beer.d.ts rename to types/react-icons/ti/beer.d.ts diff --git a/react-icons/ti/bell.d.ts b/types/react-icons/ti/bell.d.ts similarity index 100% rename from react-icons/ti/bell.d.ts rename to types/react-icons/ti/bell.d.ts diff --git a/react-icons/ti/book.d.ts b/types/react-icons/ti/book.d.ts similarity index 100% rename from react-icons/ti/book.d.ts rename to types/react-icons/ti/book.d.ts diff --git a/react-icons/ti/bookmark.d.ts b/types/react-icons/ti/bookmark.d.ts similarity index 100% rename from react-icons/ti/bookmark.d.ts rename to types/react-icons/ti/bookmark.d.ts diff --git a/react-icons/ti/briefcase.d.ts b/types/react-icons/ti/briefcase.d.ts similarity index 100% rename from react-icons/ti/briefcase.d.ts rename to types/react-icons/ti/briefcase.d.ts diff --git a/react-icons/ti/brush.d.ts b/types/react-icons/ti/brush.d.ts similarity index 100% rename from react-icons/ti/brush.d.ts rename to types/react-icons/ti/brush.d.ts diff --git a/react-icons/ti/business-card.d.ts b/types/react-icons/ti/business-card.d.ts similarity index 100% rename from react-icons/ti/business-card.d.ts rename to types/react-icons/ti/business-card.d.ts diff --git a/react-icons/ti/calculator.d.ts b/types/react-icons/ti/calculator.d.ts similarity index 100% rename from react-icons/ti/calculator.d.ts rename to types/react-icons/ti/calculator.d.ts diff --git a/react-icons/ti/calendar-outline.d.ts b/types/react-icons/ti/calendar-outline.d.ts similarity index 100% rename from react-icons/ti/calendar-outline.d.ts rename to types/react-icons/ti/calendar-outline.d.ts diff --git a/react-icons/ti/calendar.d.ts b/types/react-icons/ti/calendar.d.ts similarity index 100% rename from react-icons/ti/calendar.d.ts rename to types/react-icons/ti/calendar.d.ts diff --git a/react-icons/ti/calender-outline.d.ts b/types/react-icons/ti/calender-outline.d.ts similarity index 100% rename from react-icons/ti/calender-outline.d.ts rename to types/react-icons/ti/calender-outline.d.ts diff --git a/react-icons/ti/calender.d.ts b/types/react-icons/ti/calender.d.ts similarity index 100% rename from react-icons/ti/calender.d.ts rename to types/react-icons/ti/calender.d.ts diff --git a/react-icons/ti/camera-outline.d.ts b/types/react-icons/ti/camera-outline.d.ts similarity index 100% rename from react-icons/ti/camera-outline.d.ts rename to types/react-icons/ti/camera-outline.d.ts diff --git a/react-icons/ti/camera.d.ts b/types/react-icons/ti/camera.d.ts similarity index 100% rename from react-icons/ti/camera.d.ts rename to types/react-icons/ti/camera.d.ts diff --git a/react-icons/ti/cancel-outline.d.ts b/types/react-icons/ti/cancel-outline.d.ts similarity index 100% rename from react-icons/ti/cancel-outline.d.ts rename to types/react-icons/ti/cancel-outline.d.ts diff --git a/react-icons/ti/cancel.d.ts b/types/react-icons/ti/cancel.d.ts similarity index 100% rename from react-icons/ti/cancel.d.ts rename to types/react-icons/ti/cancel.d.ts diff --git a/react-icons/ti/chart-area-outline.d.ts b/types/react-icons/ti/chart-area-outline.d.ts similarity index 100% rename from react-icons/ti/chart-area-outline.d.ts rename to types/react-icons/ti/chart-area-outline.d.ts diff --git a/react-icons/ti/chart-area.d.ts b/types/react-icons/ti/chart-area.d.ts similarity index 100% rename from react-icons/ti/chart-area.d.ts rename to types/react-icons/ti/chart-area.d.ts diff --git a/react-icons/ti/chart-bar-outline.d.ts b/types/react-icons/ti/chart-bar-outline.d.ts similarity index 100% rename from react-icons/ti/chart-bar-outline.d.ts rename to types/react-icons/ti/chart-bar-outline.d.ts diff --git a/react-icons/ti/chart-bar.d.ts b/types/react-icons/ti/chart-bar.d.ts similarity index 100% rename from react-icons/ti/chart-bar.d.ts rename to types/react-icons/ti/chart-bar.d.ts diff --git a/react-icons/ti/chart-line-outline.d.ts b/types/react-icons/ti/chart-line-outline.d.ts similarity index 100% rename from react-icons/ti/chart-line-outline.d.ts rename to types/react-icons/ti/chart-line-outline.d.ts diff --git a/react-icons/ti/chart-line.d.ts b/types/react-icons/ti/chart-line.d.ts similarity index 100% rename from react-icons/ti/chart-line.d.ts rename to types/react-icons/ti/chart-line.d.ts diff --git a/react-icons/ti/chart-pie-outline.d.ts b/types/react-icons/ti/chart-pie-outline.d.ts similarity index 100% rename from react-icons/ti/chart-pie-outline.d.ts rename to types/react-icons/ti/chart-pie-outline.d.ts diff --git a/react-icons/ti/chart-pie.d.ts b/types/react-icons/ti/chart-pie.d.ts similarity index 100% rename from react-icons/ti/chart-pie.d.ts rename to types/react-icons/ti/chart-pie.d.ts diff --git a/react-icons/ti/chevron-left-outline.d.ts b/types/react-icons/ti/chevron-left-outline.d.ts similarity index 100% rename from react-icons/ti/chevron-left-outline.d.ts rename to types/react-icons/ti/chevron-left-outline.d.ts diff --git a/react-icons/ti/chevron-left.d.ts b/types/react-icons/ti/chevron-left.d.ts similarity index 100% rename from react-icons/ti/chevron-left.d.ts rename to types/react-icons/ti/chevron-left.d.ts diff --git a/react-icons/ti/chevron-right-outline.d.ts b/types/react-icons/ti/chevron-right-outline.d.ts similarity index 100% rename from react-icons/ti/chevron-right-outline.d.ts rename to types/react-icons/ti/chevron-right-outline.d.ts diff --git a/react-icons/ti/chevron-right.d.ts b/types/react-icons/ti/chevron-right.d.ts similarity index 100% rename from react-icons/ti/chevron-right.d.ts rename to types/react-icons/ti/chevron-right.d.ts diff --git a/react-icons/ti/clipboard.d.ts b/types/react-icons/ti/clipboard.d.ts similarity index 100% rename from react-icons/ti/clipboard.d.ts rename to types/react-icons/ti/clipboard.d.ts diff --git a/react-icons/ti/cloud-storage-outline.d.ts b/types/react-icons/ti/cloud-storage-outline.d.ts similarity index 100% rename from react-icons/ti/cloud-storage-outline.d.ts rename to types/react-icons/ti/cloud-storage-outline.d.ts diff --git a/react-icons/ti/cloud-storage.d.ts b/types/react-icons/ti/cloud-storage.d.ts similarity index 100% rename from react-icons/ti/cloud-storage.d.ts rename to types/react-icons/ti/cloud-storage.d.ts diff --git a/react-icons/ti/code-outline.d.ts b/types/react-icons/ti/code-outline.d.ts similarity index 100% rename from react-icons/ti/code-outline.d.ts rename to types/react-icons/ti/code-outline.d.ts diff --git a/react-icons/ti/code.d.ts b/types/react-icons/ti/code.d.ts similarity index 100% rename from react-icons/ti/code.d.ts rename to types/react-icons/ti/code.d.ts diff --git a/react-icons/ti/coffee.d.ts b/types/react-icons/ti/coffee.d.ts similarity index 100% rename from react-icons/ti/coffee.d.ts rename to types/react-icons/ti/coffee.d.ts diff --git a/react-icons/ti/cog-outline.d.ts b/types/react-icons/ti/cog-outline.d.ts similarity index 100% rename from react-icons/ti/cog-outline.d.ts rename to types/react-icons/ti/cog-outline.d.ts diff --git a/react-icons/ti/cog.d.ts b/types/react-icons/ti/cog.d.ts similarity index 100% rename from react-icons/ti/cog.d.ts rename to types/react-icons/ti/cog.d.ts diff --git a/react-icons/ti/compass.d.ts b/types/react-icons/ti/compass.d.ts similarity index 100% rename from react-icons/ti/compass.d.ts rename to types/react-icons/ti/compass.d.ts diff --git a/react-icons/ti/contacts.d.ts b/types/react-icons/ti/contacts.d.ts similarity index 100% rename from react-icons/ti/contacts.d.ts rename to types/react-icons/ti/contacts.d.ts diff --git a/react-icons/ti/credit-card.d.ts b/types/react-icons/ti/credit-card.d.ts similarity index 100% rename from react-icons/ti/credit-card.d.ts rename to types/react-icons/ti/credit-card.d.ts diff --git a/react-icons/ti/cross.d.ts b/types/react-icons/ti/cross.d.ts similarity index 100% rename from react-icons/ti/cross.d.ts rename to types/react-icons/ti/cross.d.ts diff --git a/react-icons/ti/css3.d.ts b/types/react-icons/ti/css3.d.ts similarity index 100% rename from react-icons/ti/css3.d.ts rename to types/react-icons/ti/css3.d.ts diff --git a/react-icons/ti/database.d.ts b/types/react-icons/ti/database.d.ts similarity index 100% rename from react-icons/ti/database.d.ts rename to types/react-icons/ti/database.d.ts diff --git a/react-icons/ti/delete-outline.d.ts b/types/react-icons/ti/delete-outline.d.ts similarity index 100% rename from react-icons/ti/delete-outline.d.ts rename to types/react-icons/ti/delete-outline.d.ts diff --git a/react-icons/ti/delete.d.ts b/types/react-icons/ti/delete.d.ts similarity index 100% rename from react-icons/ti/delete.d.ts rename to types/react-icons/ti/delete.d.ts diff --git a/react-icons/ti/device-desktop.d.ts b/types/react-icons/ti/device-desktop.d.ts similarity index 100% rename from react-icons/ti/device-desktop.d.ts rename to types/react-icons/ti/device-desktop.d.ts diff --git a/react-icons/ti/device-laptop.d.ts b/types/react-icons/ti/device-laptop.d.ts similarity index 100% rename from react-icons/ti/device-laptop.d.ts rename to types/react-icons/ti/device-laptop.d.ts diff --git a/react-icons/ti/device-phone.d.ts b/types/react-icons/ti/device-phone.d.ts similarity index 100% rename from react-icons/ti/device-phone.d.ts rename to types/react-icons/ti/device-phone.d.ts diff --git a/react-icons/ti/device-tablet.d.ts b/types/react-icons/ti/device-tablet.d.ts similarity index 100% rename from react-icons/ti/device-tablet.d.ts rename to types/react-icons/ti/device-tablet.d.ts diff --git a/react-icons/ti/directions.d.ts b/types/react-icons/ti/directions.d.ts similarity index 100% rename from react-icons/ti/directions.d.ts rename to types/react-icons/ti/directions.d.ts diff --git a/react-icons/ti/divide-outline.d.ts b/types/react-icons/ti/divide-outline.d.ts similarity index 100% rename from react-icons/ti/divide-outline.d.ts rename to types/react-icons/ti/divide-outline.d.ts diff --git a/react-icons/ti/divide.d.ts b/types/react-icons/ti/divide.d.ts similarity index 100% rename from react-icons/ti/divide.d.ts rename to types/react-icons/ti/divide.d.ts diff --git a/react-icons/ti/document-add.d.ts b/types/react-icons/ti/document-add.d.ts similarity index 100% rename from react-icons/ti/document-add.d.ts rename to types/react-icons/ti/document-add.d.ts diff --git a/react-icons/ti/document-delete.d.ts b/types/react-icons/ti/document-delete.d.ts similarity index 100% rename from react-icons/ti/document-delete.d.ts rename to types/react-icons/ti/document-delete.d.ts diff --git a/react-icons/ti/document-text.d.ts b/types/react-icons/ti/document-text.d.ts similarity index 100% rename from react-icons/ti/document-text.d.ts rename to types/react-icons/ti/document-text.d.ts diff --git a/react-icons/ti/document.d.ts b/types/react-icons/ti/document.d.ts similarity index 100% rename from react-icons/ti/document.d.ts rename to types/react-icons/ti/document.d.ts diff --git a/react-icons/ti/download-outline.d.ts b/types/react-icons/ti/download-outline.d.ts similarity index 100% rename from react-icons/ti/download-outline.d.ts rename to types/react-icons/ti/download-outline.d.ts diff --git a/react-icons/ti/download.d.ts b/types/react-icons/ti/download.d.ts similarity index 100% rename from react-icons/ti/download.d.ts rename to types/react-icons/ti/download.d.ts diff --git a/react-icons/ti/dropbox.d.ts b/types/react-icons/ti/dropbox.d.ts similarity index 100% rename from react-icons/ti/dropbox.d.ts rename to types/react-icons/ti/dropbox.d.ts diff --git a/react-icons/ti/edit.d.ts b/types/react-icons/ti/edit.d.ts similarity index 100% rename from react-icons/ti/edit.d.ts rename to types/react-icons/ti/edit.d.ts diff --git a/react-icons/ti/eject-outline.d.ts b/types/react-icons/ti/eject-outline.d.ts similarity index 100% rename from react-icons/ti/eject-outline.d.ts rename to types/react-icons/ti/eject-outline.d.ts diff --git a/react-icons/ti/eject.d.ts b/types/react-icons/ti/eject.d.ts similarity index 100% rename from react-icons/ti/eject.d.ts rename to types/react-icons/ti/eject.d.ts diff --git a/react-icons/ti/equals-outline.d.ts b/types/react-icons/ti/equals-outline.d.ts similarity index 100% rename from react-icons/ti/equals-outline.d.ts rename to types/react-icons/ti/equals-outline.d.ts diff --git a/react-icons/ti/equals.d.ts b/types/react-icons/ti/equals.d.ts similarity index 100% rename from react-icons/ti/equals.d.ts rename to types/react-icons/ti/equals.d.ts diff --git a/react-icons/ti/export-outline.d.ts b/types/react-icons/ti/export-outline.d.ts similarity index 100% rename from react-icons/ti/export-outline.d.ts rename to types/react-icons/ti/export-outline.d.ts diff --git a/react-icons/ti/export.d.ts b/types/react-icons/ti/export.d.ts similarity index 100% rename from react-icons/ti/export.d.ts rename to types/react-icons/ti/export.d.ts diff --git a/react-icons/ti/eye-outline.d.ts b/types/react-icons/ti/eye-outline.d.ts similarity index 100% rename from react-icons/ti/eye-outline.d.ts rename to types/react-icons/ti/eye-outline.d.ts diff --git a/react-icons/ti/eye.d.ts b/types/react-icons/ti/eye.d.ts similarity index 100% rename from react-icons/ti/eye.d.ts rename to types/react-icons/ti/eye.d.ts diff --git a/react-icons/ti/feather.d.ts b/types/react-icons/ti/feather.d.ts similarity index 100% rename from react-icons/ti/feather.d.ts rename to types/react-icons/ti/feather.d.ts diff --git a/react-icons/ti/film.d.ts b/types/react-icons/ti/film.d.ts similarity index 100% rename from react-icons/ti/film.d.ts rename to types/react-icons/ti/film.d.ts diff --git a/react-icons/ti/filter.d.ts b/types/react-icons/ti/filter.d.ts similarity index 100% rename from react-icons/ti/filter.d.ts rename to types/react-icons/ti/filter.d.ts diff --git a/react-icons/ti/flag-outline.d.ts b/types/react-icons/ti/flag-outline.d.ts similarity index 100% rename from react-icons/ti/flag-outline.d.ts rename to types/react-icons/ti/flag-outline.d.ts diff --git a/react-icons/ti/flag.d.ts b/types/react-icons/ti/flag.d.ts similarity index 100% rename from react-icons/ti/flag.d.ts rename to types/react-icons/ti/flag.d.ts diff --git a/react-icons/ti/flash-outline.d.ts b/types/react-icons/ti/flash-outline.d.ts similarity index 100% rename from react-icons/ti/flash-outline.d.ts rename to types/react-icons/ti/flash-outline.d.ts diff --git a/react-icons/ti/flash.d.ts b/types/react-icons/ti/flash.d.ts similarity index 100% rename from react-icons/ti/flash.d.ts rename to types/react-icons/ti/flash.d.ts diff --git a/react-icons/ti/flow-children.d.ts b/types/react-icons/ti/flow-children.d.ts similarity index 100% rename from react-icons/ti/flow-children.d.ts rename to types/react-icons/ti/flow-children.d.ts diff --git a/react-icons/ti/flow-merge.d.ts b/types/react-icons/ti/flow-merge.d.ts similarity index 100% rename from react-icons/ti/flow-merge.d.ts rename to types/react-icons/ti/flow-merge.d.ts diff --git a/react-icons/ti/flow-parallel.d.ts b/types/react-icons/ti/flow-parallel.d.ts similarity index 100% rename from react-icons/ti/flow-parallel.d.ts rename to types/react-icons/ti/flow-parallel.d.ts diff --git a/react-icons/ti/flow-switch.d.ts b/types/react-icons/ti/flow-switch.d.ts similarity index 100% rename from react-icons/ti/flow-switch.d.ts rename to types/react-icons/ti/flow-switch.d.ts diff --git a/react-icons/ti/folder-add.d.ts b/types/react-icons/ti/folder-add.d.ts similarity index 100% rename from react-icons/ti/folder-add.d.ts rename to types/react-icons/ti/folder-add.d.ts diff --git a/react-icons/ti/folder-delete.d.ts b/types/react-icons/ti/folder-delete.d.ts similarity index 100% rename from react-icons/ti/folder-delete.d.ts rename to types/react-icons/ti/folder-delete.d.ts diff --git a/react-icons/ti/folder-open.d.ts b/types/react-icons/ti/folder-open.d.ts similarity index 100% rename from react-icons/ti/folder-open.d.ts rename to types/react-icons/ti/folder-open.d.ts diff --git a/react-icons/ti/folder.d.ts b/types/react-icons/ti/folder.d.ts similarity index 100% rename from react-icons/ti/folder.d.ts rename to types/react-icons/ti/folder.d.ts diff --git a/react-icons/ti/gift.d.ts b/types/react-icons/ti/gift.d.ts similarity index 100% rename from react-icons/ti/gift.d.ts rename to types/react-icons/ti/gift.d.ts diff --git a/react-icons/ti/globe-outline.d.ts b/types/react-icons/ti/globe-outline.d.ts similarity index 100% rename from react-icons/ti/globe-outline.d.ts rename to types/react-icons/ti/globe-outline.d.ts diff --git a/react-icons/ti/globe.d.ts b/types/react-icons/ti/globe.d.ts similarity index 100% rename from react-icons/ti/globe.d.ts rename to types/react-icons/ti/globe.d.ts diff --git a/react-icons/ti/group-outline.d.ts b/types/react-icons/ti/group-outline.d.ts similarity index 100% rename from react-icons/ti/group-outline.d.ts rename to types/react-icons/ti/group-outline.d.ts diff --git a/react-icons/ti/group.d.ts b/types/react-icons/ti/group.d.ts similarity index 100% rename from react-icons/ti/group.d.ts rename to types/react-icons/ti/group.d.ts diff --git a/react-icons/ti/headphones.d.ts b/types/react-icons/ti/headphones.d.ts similarity index 100% rename from react-icons/ti/headphones.d.ts rename to types/react-icons/ti/headphones.d.ts diff --git a/react-icons/ti/heart-full-outline.d.ts b/types/react-icons/ti/heart-full-outline.d.ts similarity index 100% rename from react-icons/ti/heart-full-outline.d.ts rename to types/react-icons/ti/heart-full-outline.d.ts diff --git a/react-icons/ti/heart-half-outline.d.ts b/types/react-icons/ti/heart-half-outline.d.ts similarity index 100% rename from react-icons/ti/heart-half-outline.d.ts rename to types/react-icons/ti/heart-half-outline.d.ts diff --git a/react-icons/ti/heart-outline.d.ts b/types/react-icons/ti/heart-outline.d.ts similarity index 100% rename from react-icons/ti/heart-outline.d.ts rename to types/react-icons/ti/heart-outline.d.ts diff --git a/react-icons/ti/heart.d.ts b/types/react-icons/ti/heart.d.ts similarity index 100% rename from react-icons/ti/heart.d.ts rename to types/react-icons/ti/heart.d.ts diff --git a/react-icons/ti/home-outline.d.ts b/types/react-icons/ti/home-outline.d.ts similarity index 100% rename from react-icons/ti/home-outline.d.ts rename to types/react-icons/ti/home-outline.d.ts diff --git a/react-icons/ti/home.d.ts b/types/react-icons/ti/home.d.ts similarity index 100% rename from react-icons/ti/home.d.ts rename to types/react-icons/ti/home.d.ts diff --git a/react-icons/ti/html5.d.ts b/types/react-icons/ti/html5.d.ts similarity index 100% rename from react-icons/ti/html5.d.ts rename to types/react-icons/ti/html5.d.ts diff --git a/react-icons/ti/image-outline.d.ts b/types/react-icons/ti/image-outline.d.ts similarity index 100% rename from react-icons/ti/image-outline.d.ts rename to types/react-icons/ti/image-outline.d.ts diff --git a/react-icons/ti/image.d.ts b/types/react-icons/ti/image.d.ts similarity index 100% rename from react-icons/ti/image.d.ts rename to types/react-icons/ti/image.d.ts diff --git a/react-icons/ti/index.d.ts b/types/react-icons/ti/index.d.ts similarity index 100% rename from react-icons/ti/index.d.ts rename to types/react-icons/ti/index.d.ts diff --git a/react-icons/ti/infinity-outline.d.ts b/types/react-icons/ti/infinity-outline.d.ts similarity index 100% rename from react-icons/ti/infinity-outline.d.ts rename to types/react-icons/ti/infinity-outline.d.ts diff --git a/react-icons/ti/infinity.d.ts b/types/react-icons/ti/infinity.d.ts similarity index 100% rename from react-icons/ti/infinity.d.ts rename to types/react-icons/ti/infinity.d.ts diff --git a/react-icons/ti/info-large-outline.d.ts b/types/react-icons/ti/info-large-outline.d.ts similarity index 100% rename from react-icons/ti/info-large-outline.d.ts rename to types/react-icons/ti/info-large-outline.d.ts diff --git a/react-icons/ti/info-large.d.ts b/types/react-icons/ti/info-large.d.ts similarity index 100% rename from react-icons/ti/info-large.d.ts rename to types/react-icons/ti/info-large.d.ts diff --git a/react-icons/ti/info-outline.d.ts b/types/react-icons/ti/info-outline.d.ts similarity index 100% rename from react-icons/ti/info-outline.d.ts rename to types/react-icons/ti/info-outline.d.ts diff --git a/react-icons/ti/info.d.ts b/types/react-icons/ti/info.d.ts similarity index 100% rename from react-icons/ti/info.d.ts rename to types/react-icons/ti/info.d.ts diff --git a/react-icons/ti/input-checked-outline.d.ts b/types/react-icons/ti/input-checked-outline.d.ts similarity index 100% rename from react-icons/ti/input-checked-outline.d.ts rename to types/react-icons/ti/input-checked-outline.d.ts diff --git a/react-icons/ti/input-checked.d.ts b/types/react-icons/ti/input-checked.d.ts similarity index 100% rename from react-icons/ti/input-checked.d.ts rename to types/react-icons/ti/input-checked.d.ts diff --git a/react-icons/ti/key-outline.d.ts b/types/react-icons/ti/key-outline.d.ts similarity index 100% rename from react-icons/ti/key-outline.d.ts rename to types/react-icons/ti/key-outline.d.ts diff --git a/react-icons/ti/key.d.ts b/types/react-icons/ti/key.d.ts similarity index 100% rename from react-icons/ti/key.d.ts rename to types/react-icons/ti/key.d.ts diff --git a/react-icons/ti/keyboard.d.ts b/types/react-icons/ti/keyboard.d.ts similarity index 100% rename from react-icons/ti/keyboard.d.ts rename to types/react-icons/ti/keyboard.d.ts diff --git a/react-icons/ti/leaf.d.ts b/types/react-icons/ti/leaf.d.ts similarity index 100% rename from react-icons/ti/leaf.d.ts rename to types/react-icons/ti/leaf.d.ts diff --git a/react-icons/ti/lightbulb.d.ts b/types/react-icons/ti/lightbulb.d.ts similarity index 100% rename from react-icons/ti/lightbulb.d.ts rename to types/react-icons/ti/lightbulb.d.ts diff --git a/react-icons/ti/link-outline.d.ts b/types/react-icons/ti/link-outline.d.ts similarity index 100% rename from react-icons/ti/link-outline.d.ts rename to types/react-icons/ti/link-outline.d.ts diff --git a/react-icons/ti/link.d.ts b/types/react-icons/ti/link.d.ts similarity index 100% rename from react-icons/ti/link.d.ts rename to types/react-icons/ti/link.d.ts diff --git a/react-icons/ti/location-arrow-outline.d.ts b/types/react-icons/ti/location-arrow-outline.d.ts similarity index 100% rename from react-icons/ti/location-arrow-outline.d.ts rename to types/react-icons/ti/location-arrow-outline.d.ts diff --git a/react-icons/ti/location-arrow.d.ts b/types/react-icons/ti/location-arrow.d.ts similarity index 100% rename from react-icons/ti/location-arrow.d.ts rename to types/react-icons/ti/location-arrow.d.ts diff --git a/react-icons/ti/location-outline.d.ts b/types/react-icons/ti/location-outline.d.ts similarity index 100% rename from react-icons/ti/location-outline.d.ts rename to types/react-icons/ti/location-outline.d.ts diff --git a/react-icons/ti/location.d.ts b/types/react-icons/ti/location.d.ts similarity index 100% rename from react-icons/ti/location.d.ts rename to types/react-icons/ti/location.d.ts diff --git a/react-icons/ti/lock-closed-outline.d.ts b/types/react-icons/ti/lock-closed-outline.d.ts similarity index 100% rename from react-icons/ti/lock-closed-outline.d.ts rename to types/react-icons/ti/lock-closed-outline.d.ts diff --git a/react-icons/ti/lock-closed.d.ts b/types/react-icons/ti/lock-closed.d.ts similarity index 100% rename from react-icons/ti/lock-closed.d.ts rename to types/react-icons/ti/lock-closed.d.ts diff --git a/react-icons/ti/lock-open-outline.d.ts b/types/react-icons/ti/lock-open-outline.d.ts similarity index 100% rename from react-icons/ti/lock-open-outline.d.ts rename to types/react-icons/ti/lock-open-outline.d.ts diff --git a/react-icons/ti/lock-open.d.ts b/types/react-icons/ti/lock-open.d.ts similarity index 100% rename from react-icons/ti/lock-open.d.ts rename to types/react-icons/ti/lock-open.d.ts diff --git a/react-icons/ti/mail.d.ts b/types/react-icons/ti/mail.d.ts similarity index 100% rename from react-icons/ti/mail.d.ts rename to types/react-icons/ti/mail.d.ts diff --git a/react-icons/ti/map.d.ts b/types/react-icons/ti/map.d.ts similarity index 100% rename from react-icons/ti/map.d.ts rename to types/react-icons/ti/map.d.ts diff --git a/react-icons/ti/media-eject-outline.d.ts b/types/react-icons/ti/media-eject-outline.d.ts similarity index 100% rename from react-icons/ti/media-eject-outline.d.ts rename to types/react-icons/ti/media-eject-outline.d.ts diff --git a/react-icons/ti/media-eject.d.ts b/types/react-icons/ti/media-eject.d.ts similarity index 100% rename from react-icons/ti/media-eject.d.ts rename to types/react-icons/ti/media-eject.d.ts diff --git a/react-icons/ti/media-fast-forward-outline.d.ts b/types/react-icons/ti/media-fast-forward-outline.d.ts similarity index 100% rename from react-icons/ti/media-fast-forward-outline.d.ts rename to types/react-icons/ti/media-fast-forward-outline.d.ts diff --git a/react-icons/ti/media-fast-forward.d.ts b/types/react-icons/ti/media-fast-forward.d.ts similarity index 100% rename from react-icons/ti/media-fast-forward.d.ts rename to types/react-icons/ti/media-fast-forward.d.ts diff --git a/react-icons/ti/media-pause-outline.d.ts b/types/react-icons/ti/media-pause-outline.d.ts similarity index 100% rename from react-icons/ti/media-pause-outline.d.ts rename to types/react-icons/ti/media-pause-outline.d.ts diff --git a/react-icons/ti/media-pause.d.ts b/types/react-icons/ti/media-pause.d.ts similarity index 100% rename from react-icons/ti/media-pause.d.ts rename to types/react-icons/ti/media-pause.d.ts diff --git a/react-icons/ti/media-play-outline.d.ts b/types/react-icons/ti/media-play-outline.d.ts similarity index 100% rename from react-icons/ti/media-play-outline.d.ts rename to types/react-icons/ti/media-play-outline.d.ts diff --git a/react-icons/ti/media-play-reverse-outline.d.ts b/types/react-icons/ti/media-play-reverse-outline.d.ts similarity index 100% rename from react-icons/ti/media-play-reverse-outline.d.ts rename to types/react-icons/ti/media-play-reverse-outline.d.ts diff --git a/react-icons/ti/media-play-reverse.d.ts b/types/react-icons/ti/media-play-reverse.d.ts similarity index 100% rename from react-icons/ti/media-play-reverse.d.ts rename to types/react-icons/ti/media-play-reverse.d.ts diff --git a/react-icons/ti/media-play.d.ts b/types/react-icons/ti/media-play.d.ts similarity index 100% rename from react-icons/ti/media-play.d.ts rename to types/react-icons/ti/media-play.d.ts diff --git a/react-icons/ti/media-record-outline.d.ts b/types/react-icons/ti/media-record-outline.d.ts similarity index 100% rename from react-icons/ti/media-record-outline.d.ts rename to types/react-icons/ti/media-record-outline.d.ts diff --git a/react-icons/ti/media-record.d.ts b/types/react-icons/ti/media-record.d.ts similarity index 100% rename from react-icons/ti/media-record.d.ts rename to types/react-icons/ti/media-record.d.ts diff --git a/react-icons/ti/media-rewind-outline.d.ts b/types/react-icons/ti/media-rewind-outline.d.ts similarity index 100% rename from react-icons/ti/media-rewind-outline.d.ts rename to types/react-icons/ti/media-rewind-outline.d.ts diff --git a/react-icons/ti/media-rewind.d.ts b/types/react-icons/ti/media-rewind.d.ts similarity index 100% rename from react-icons/ti/media-rewind.d.ts rename to types/react-icons/ti/media-rewind.d.ts diff --git a/react-icons/ti/media-stop-outline.d.ts b/types/react-icons/ti/media-stop-outline.d.ts similarity index 100% rename from react-icons/ti/media-stop-outline.d.ts rename to types/react-icons/ti/media-stop-outline.d.ts diff --git a/react-icons/ti/media-stop.d.ts b/types/react-icons/ti/media-stop.d.ts similarity index 100% rename from react-icons/ti/media-stop.d.ts rename to types/react-icons/ti/media-stop.d.ts diff --git a/react-icons/ti/message-typing.d.ts b/types/react-icons/ti/message-typing.d.ts similarity index 100% rename from react-icons/ti/message-typing.d.ts rename to types/react-icons/ti/message-typing.d.ts diff --git a/react-icons/ti/message.d.ts b/types/react-icons/ti/message.d.ts similarity index 100% rename from react-icons/ti/message.d.ts rename to types/react-icons/ti/message.d.ts diff --git a/react-icons/ti/messages.d.ts b/types/react-icons/ti/messages.d.ts similarity index 100% rename from react-icons/ti/messages.d.ts rename to types/react-icons/ti/messages.d.ts diff --git a/react-icons/ti/microphone-outline.d.ts b/types/react-icons/ti/microphone-outline.d.ts similarity index 100% rename from react-icons/ti/microphone-outline.d.ts rename to types/react-icons/ti/microphone-outline.d.ts diff --git a/react-icons/ti/microphone.d.ts b/types/react-icons/ti/microphone.d.ts similarity index 100% rename from react-icons/ti/microphone.d.ts rename to types/react-icons/ti/microphone.d.ts diff --git a/react-icons/ti/minus-outline.d.ts b/types/react-icons/ti/minus-outline.d.ts similarity index 100% rename from react-icons/ti/minus-outline.d.ts rename to types/react-icons/ti/minus-outline.d.ts diff --git a/react-icons/ti/minus.d.ts b/types/react-icons/ti/minus.d.ts similarity index 100% rename from react-icons/ti/minus.d.ts rename to types/react-icons/ti/minus.d.ts diff --git a/react-icons/ti/mortar-board.d.ts b/types/react-icons/ti/mortar-board.d.ts similarity index 100% rename from react-icons/ti/mortar-board.d.ts rename to types/react-icons/ti/mortar-board.d.ts diff --git a/react-icons/ti/news.d.ts b/types/react-icons/ti/news.d.ts similarity index 100% rename from react-icons/ti/news.d.ts rename to types/react-icons/ti/news.d.ts diff --git a/react-icons/ti/notes-outline.d.ts b/types/react-icons/ti/notes-outline.d.ts similarity index 100% rename from react-icons/ti/notes-outline.d.ts rename to types/react-icons/ti/notes-outline.d.ts diff --git a/react-icons/ti/notes.d.ts b/types/react-icons/ti/notes.d.ts similarity index 100% rename from react-icons/ti/notes.d.ts rename to types/react-icons/ti/notes.d.ts diff --git a/react-icons/ti/pen.d.ts b/types/react-icons/ti/pen.d.ts similarity index 100% rename from react-icons/ti/pen.d.ts rename to types/react-icons/ti/pen.d.ts diff --git a/react-icons/ti/pencil.d.ts b/types/react-icons/ti/pencil.d.ts similarity index 100% rename from react-icons/ti/pencil.d.ts rename to types/react-icons/ti/pencil.d.ts diff --git a/react-icons/ti/phone-outline.d.ts b/types/react-icons/ti/phone-outline.d.ts similarity index 100% rename from react-icons/ti/phone-outline.d.ts rename to types/react-icons/ti/phone-outline.d.ts diff --git a/react-icons/ti/phone.d.ts b/types/react-icons/ti/phone.d.ts similarity index 100% rename from react-icons/ti/phone.d.ts rename to types/react-icons/ti/phone.d.ts diff --git a/react-icons/ti/pi-outline.d.ts b/types/react-icons/ti/pi-outline.d.ts similarity index 100% rename from react-icons/ti/pi-outline.d.ts rename to types/react-icons/ti/pi-outline.d.ts diff --git a/react-icons/ti/pi.d.ts b/types/react-icons/ti/pi.d.ts similarity index 100% rename from react-icons/ti/pi.d.ts rename to types/react-icons/ti/pi.d.ts diff --git a/react-icons/ti/pin-outline.d.ts b/types/react-icons/ti/pin-outline.d.ts similarity index 100% rename from react-icons/ti/pin-outline.d.ts rename to types/react-icons/ti/pin-outline.d.ts diff --git a/react-icons/ti/pin.d.ts b/types/react-icons/ti/pin.d.ts similarity index 100% rename from react-icons/ti/pin.d.ts rename to types/react-icons/ti/pin.d.ts diff --git a/react-icons/ti/pipette.d.ts b/types/react-icons/ti/pipette.d.ts similarity index 100% rename from react-icons/ti/pipette.d.ts rename to types/react-icons/ti/pipette.d.ts diff --git a/react-icons/ti/plane-outline.d.ts b/types/react-icons/ti/plane-outline.d.ts similarity index 100% rename from react-icons/ti/plane-outline.d.ts rename to types/react-icons/ti/plane-outline.d.ts diff --git a/react-icons/ti/plane.d.ts b/types/react-icons/ti/plane.d.ts similarity index 100% rename from react-icons/ti/plane.d.ts rename to types/react-icons/ti/plane.d.ts diff --git a/react-icons/ti/plug.d.ts b/types/react-icons/ti/plug.d.ts similarity index 100% rename from react-icons/ti/plug.d.ts rename to types/react-icons/ti/plug.d.ts diff --git a/react-icons/ti/plus-outline.d.ts b/types/react-icons/ti/plus-outline.d.ts similarity index 100% rename from react-icons/ti/plus-outline.d.ts rename to types/react-icons/ti/plus-outline.d.ts diff --git a/react-icons/ti/plus.d.ts b/types/react-icons/ti/plus.d.ts similarity index 100% rename from react-icons/ti/plus.d.ts rename to types/react-icons/ti/plus.d.ts diff --git a/react-icons/ti/point-of-interest-outline.d.ts b/types/react-icons/ti/point-of-interest-outline.d.ts similarity index 100% rename from react-icons/ti/point-of-interest-outline.d.ts rename to types/react-icons/ti/point-of-interest-outline.d.ts diff --git a/react-icons/ti/point-of-interest.d.ts b/types/react-icons/ti/point-of-interest.d.ts similarity index 100% rename from react-icons/ti/point-of-interest.d.ts rename to types/react-icons/ti/point-of-interest.d.ts diff --git a/react-icons/ti/power-outline.d.ts b/types/react-icons/ti/power-outline.d.ts similarity index 100% rename from react-icons/ti/power-outline.d.ts rename to types/react-icons/ti/power-outline.d.ts diff --git a/react-icons/ti/power.d.ts b/types/react-icons/ti/power.d.ts similarity index 100% rename from react-icons/ti/power.d.ts rename to types/react-icons/ti/power.d.ts diff --git a/react-icons/ti/printer.d.ts b/types/react-icons/ti/printer.d.ts similarity index 100% rename from react-icons/ti/printer.d.ts rename to types/react-icons/ti/printer.d.ts diff --git a/react-icons/ti/puzzle-outline.d.ts b/types/react-icons/ti/puzzle-outline.d.ts similarity index 100% rename from react-icons/ti/puzzle-outline.d.ts rename to types/react-icons/ti/puzzle-outline.d.ts diff --git a/react-icons/ti/puzzle.d.ts b/types/react-icons/ti/puzzle.d.ts similarity index 100% rename from react-icons/ti/puzzle.d.ts rename to types/react-icons/ti/puzzle.d.ts diff --git a/react-icons/ti/radar-outline.d.ts b/types/react-icons/ti/radar-outline.d.ts similarity index 100% rename from react-icons/ti/radar-outline.d.ts rename to types/react-icons/ti/radar-outline.d.ts diff --git a/react-icons/ti/radar.d.ts b/types/react-icons/ti/radar.d.ts similarity index 100% rename from react-icons/ti/radar.d.ts rename to types/react-icons/ti/radar.d.ts diff --git a/react-icons/ti/refresh-outline.d.ts b/types/react-icons/ti/refresh-outline.d.ts similarity index 100% rename from react-icons/ti/refresh-outline.d.ts rename to types/react-icons/ti/refresh-outline.d.ts diff --git a/react-icons/ti/refresh.d.ts b/types/react-icons/ti/refresh.d.ts similarity index 100% rename from react-icons/ti/refresh.d.ts rename to types/react-icons/ti/refresh.d.ts diff --git a/react-icons/ti/rss-outline.d.ts b/types/react-icons/ti/rss-outline.d.ts similarity index 100% rename from react-icons/ti/rss-outline.d.ts rename to types/react-icons/ti/rss-outline.d.ts diff --git a/react-icons/ti/rss.d.ts b/types/react-icons/ti/rss.d.ts similarity index 100% rename from react-icons/ti/rss.d.ts rename to types/react-icons/ti/rss.d.ts diff --git a/react-icons/ti/scissors-outline.d.ts b/types/react-icons/ti/scissors-outline.d.ts similarity index 100% rename from react-icons/ti/scissors-outline.d.ts rename to types/react-icons/ti/scissors-outline.d.ts diff --git a/react-icons/ti/scissors.d.ts b/types/react-icons/ti/scissors.d.ts similarity index 100% rename from react-icons/ti/scissors.d.ts rename to types/react-icons/ti/scissors.d.ts diff --git a/react-icons/ti/shopping-bag.d.ts b/types/react-icons/ti/shopping-bag.d.ts similarity index 100% rename from react-icons/ti/shopping-bag.d.ts rename to types/react-icons/ti/shopping-bag.d.ts diff --git a/react-icons/ti/shopping-cart.d.ts b/types/react-icons/ti/shopping-cart.d.ts similarity index 100% rename from react-icons/ti/shopping-cart.d.ts rename to types/react-icons/ti/shopping-cart.d.ts diff --git a/react-icons/ti/social-at-circular.d.ts b/types/react-icons/ti/social-at-circular.d.ts similarity index 100% rename from react-icons/ti/social-at-circular.d.ts rename to types/react-icons/ti/social-at-circular.d.ts diff --git a/react-icons/ti/social-dribbble-circular.d.ts b/types/react-icons/ti/social-dribbble-circular.d.ts similarity index 100% rename from react-icons/ti/social-dribbble-circular.d.ts rename to types/react-icons/ti/social-dribbble-circular.d.ts diff --git a/react-icons/ti/social-dribbble.d.ts b/types/react-icons/ti/social-dribbble.d.ts similarity index 100% rename from react-icons/ti/social-dribbble.d.ts rename to types/react-icons/ti/social-dribbble.d.ts diff --git a/react-icons/ti/social-facebook-circular.d.ts b/types/react-icons/ti/social-facebook-circular.d.ts similarity index 100% rename from react-icons/ti/social-facebook-circular.d.ts rename to types/react-icons/ti/social-facebook-circular.d.ts diff --git a/react-icons/ti/social-facebook.d.ts b/types/react-icons/ti/social-facebook.d.ts similarity index 100% rename from react-icons/ti/social-facebook.d.ts rename to types/react-icons/ti/social-facebook.d.ts diff --git a/react-icons/ti/social-flickr-circular.d.ts b/types/react-icons/ti/social-flickr-circular.d.ts similarity index 100% rename from react-icons/ti/social-flickr-circular.d.ts rename to types/react-icons/ti/social-flickr-circular.d.ts diff --git a/react-icons/ti/social-flickr.d.ts b/types/react-icons/ti/social-flickr.d.ts similarity index 100% rename from react-icons/ti/social-flickr.d.ts rename to types/react-icons/ti/social-flickr.d.ts diff --git a/react-icons/ti/social-github-circular.d.ts b/types/react-icons/ti/social-github-circular.d.ts similarity index 100% rename from react-icons/ti/social-github-circular.d.ts rename to types/react-icons/ti/social-github-circular.d.ts diff --git a/react-icons/ti/social-github.d.ts b/types/react-icons/ti/social-github.d.ts similarity index 100% rename from react-icons/ti/social-github.d.ts rename to types/react-icons/ti/social-github.d.ts diff --git a/react-icons/ti/social-google-plus-circular.d.ts b/types/react-icons/ti/social-google-plus-circular.d.ts similarity index 100% rename from react-icons/ti/social-google-plus-circular.d.ts rename to types/react-icons/ti/social-google-plus-circular.d.ts diff --git a/react-icons/ti/social-google-plus.d.ts b/types/react-icons/ti/social-google-plus.d.ts similarity index 100% rename from react-icons/ti/social-google-plus.d.ts rename to types/react-icons/ti/social-google-plus.d.ts diff --git a/react-icons/ti/social-instagram-circular.d.ts b/types/react-icons/ti/social-instagram-circular.d.ts similarity index 100% rename from react-icons/ti/social-instagram-circular.d.ts rename to types/react-icons/ti/social-instagram-circular.d.ts diff --git a/react-icons/ti/social-instagram.d.ts b/types/react-icons/ti/social-instagram.d.ts similarity index 100% rename from react-icons/ti/social-instagram.d.ts rename to types/react-icons/ti/social-instagram.d.ts diff --git a/react-icons/ti/social-last-fm-circular.d.ts b/types/react-icons/ti/social-last-fm-circular.d.ts similarity index 100% rename from react-icons/ti/social-last-fm-circular.d.ts rename to types/react-icons/ti/social-last-fm-circular.d.ts diff --git a/react-icons/ti/social-last-fm.d.ts b/types/react-icons/ti/social-last-fm.d.ts similarity index 100% rename from react-icons/ti/social-last-fm.d.ts rename to types/react-icons/ti/social-last-fm.d.ts diff --git a/react-icons/ti/social-linkedin-circular.d.ts b/types/react-icons/ti/social-linkedin-circular.d.ts similarity index 100% rename from react-icons/ti/social-linkedin-circular.d.ts rename to types/react-icons/ti/social-linkedin-circular.d.ts diff --git a/react-icons/ti/social-linkedin.d.ts b/types/react-icons/ti/social-linkedin.d.ts similarity index 100% rename from react-icons/ti/social-linkedin.d.ts rename to types/react-icons/ti/social-linkedin.d.ts diff --git a/react-icons/ti/social-pinterest-circular.d.ts b/types/react-icons/ti/social-pinterest-circular.d.ts similarity index 100% rename from react-icons/ti/social-pinterest-circular.d.ts rename to types/react-icons/ti/social-pinterest-circular.d.ts diff --git a/react-icons/ti/social-pinterest.d.ts b/types/react-icons/ti/social-pinterest.d.ts similarity index 100% rename from react-icons/ti/social-pinterest.d.ts rename to types/react-icons/ti/social-pinterest.d.ts diff --git a/react-icons/ti/social-skype-outline.d.ts b/types/react-icons/ti/social-skype-outline.d.ts similarity index 100% rename from react-icons/ti/social-skype-outline.d.ts rename to types/react-icons/ti/social-skype-outline.d.ts diff --git a/react-icons/ti/social-skype.d.ts b/types/react-icons/ti/social-skype.d.ts similarity index 100% rename from react-icons/ti/social-skype.d.ts rename to types/react-icons/ti/social-skype.d.ts diff --git a/react-icons/ti/social-tumbler-circular.d.ts b/types/react-icons/ti/social-tumbler-circular.d.ts similarity index 100% rename from react-icons/ti/social-tumbler-circular.d.ts rename to types/react-icons/ti/social-tumbler-circular.d.ts diff --git a/react-icons/ti/social-tumbler.d.ts b/types/react-icons/ti/social-tumbler.d.ts similarity index 100% rename from react-icons/ti/social-tumbler.d.ts rename to types/react-icons/ti/social-tumbler.d.ts diff --git a/react-icons/ti/social-twitter-circular.d.ts b/types/react-icons/ti/social-twitter-circular.d.ts similarity index 100% rename from react-icons/ti/social-twitter-circular.d.ts rename to types/react-icons/ti/social-twitter-circular.d.ts diff --git a/react-icons/ti/social-twitter.d.ts b/types/react-icons/ti/social-twitter.d.ts similarity index 100% rename from react-icons/ti/social-twitter.d.ts rename to types/react-icons/ti/social-twitter.d.ts diff --git a/react-icons/ti/social-vimeo-circular.d.ts b/types/react-icons/ti/social-vimeo-circular.d.ts similarity index 100% rename from react-icons/ti/social-vimeo-circular.d.ts rename to types/react-icons/ti/social-vimeo-circular.d.ts diff --git a/react-icons/ti/social-vimeo.d.ts b/types/react-icons/ti/social-vimeo.d.ts similarity index 100% rename from react-icons/ti/social-vimeo.d.ts rename to types/react-icons/ti/social-vimeo.d.ts diff --git a/react-icons/ti/social-youtube-circular.d.ts b/types/react-icons/ti/social-youtube-circular.d.ts similarity index 100% rename from react-icons/ti/social-youtube-circular.d.ts rename to types/react-icons/ti/social-youtube-circular.d.ts diff --git a/react-icons/ti/social-youtube.d.ts b/types/react-icons/ti/social-youtube.d.ts similarity index 100% rename from react-icons/ti/social-youtube.d.ts rename to types/react-icons/ti/social-youtube.d.ts diff --git a/react-icons/ti/sort-alphabetically-outline.d.ts b/types/react-icons/ti/sort-alphabetically-outline.d.ts similarity index 100% rename from react-icons/ti/sort-alphabetically-outline.d.ts rename to types/react-icons/ti/sort-alphabetically-outline.d.ts diff --git a/react-icons/ti/sort-alphabetically.d.ts b/types/react-icons/ti/sort-alphabetically.d.ts similarity index 100% rename from react-icons/ti/sort-alphabetically.d.ts rename to types/react-icons/ti/sort-alphabetically.d.ts diff --git a/react-icons/ti/sort-numerically-outline.d.ts b/types/react-icons/ti/sort-numerically-outline.d.ts similarity index 100% rename from react-icons/ti/sort-numerically-outline.d.ts rename to types/react-icons/ti/sort-numerically-outline.d.ts diff --git a/react-icons/ti/sort-numerically.d.ts b/types/react-icons/ti/sort-numerically.d.ts similarity index 100% rename from react-icons/ti/sort-numerically.d.ts rename to types/react-icons/ti/sort-numerically.d.ts diff --git a/react-icons/ti/spanner-outline.d.ts b/types/react-icons/ti/spanner-outline.d.ts similarity index 100% rename from react-icons/ti/spanner-outline.d.ts rename to types/react-icons/ti/spanner-outline.d.ts diff --git a/react-icons/ti/spanner.d.ts b/types/react-icons/ti/spanner.d.ts similarity index 100% rename from react-icons/ti/spanner.d.ts rename to types/react-icons/ti/spanner.d.ts diff --git a/react-icons/ti/spiral.d.ts b/types/react-icons/ti/spiral.d.ts similarity index 100% rename from react-icons/ti/spiral.d.ts rename to types/react-icons/ti/spiral.d.ts diff --git a/react-icons/ti/star-full-outline.d.ts b/types/react-icons/ti/star-full-outline.d.ts similarity index 100% rename from react-icons/ti/star-full-outline.d.ts rename to types/react-icons/ti/star-full-outline.d.ts diff --git a/react-icons/ti/star-half-outline.d.ts b/types/react-icons/ti/star-half-outline.d.ts similarity index 100% rename from react-icons/ti/star-half-outline.d.ts rename to types/react-icons/ti/star-half-outline.d.ts diff --git a/react-icons/ti/star-half.d.ts b/types/react-icons/ti/star-half.d.ts similarity index 100% rename from react-icons/ti/star-half.d.ts rename to types/react-icons/ti/star-half.d.ts diff --git a/react-icons/ti/star-outline.d.ts b/types/react-icons/ti/star-outline.d.ts similarity index 100% rename from react-icons/ti/star-outline.d.ts rename to types/react-icons/ti/star-outline.d.ts diff --git a/react-icons/ti/star.d.ts b/types/react-icons/ti/star.d.ts similarity index 100% rename from react-icons/ti/star.d.ts rename to types/react-icons/ti/star.d.ts diff --git a/react-icons/ti/starburst-outline.d.ts b/types/react-icons/ti/starburst-outline.d.ts similarity index 100% rename from react-icons/ti/starburst-outline.d.ts rename to types/react-icons/ti/starburst-outline.d.ts diff --git a/react-icons/ti/starburst.d.ts b/types/react-icons/ti/starburst.d.ts similarity index 100% rename from react-icons/ti/starburst.d.ts rename to types/react-icons/ti/starburst.d.ts diff --git a/react-icons/ti/stopwatch.d.ts b/types/react-icons/ti/stopwatch.d.ts similarity index 100% rename from react-icons/ti/stopwatch.d.ts rename to types/react-icons/ti/stopwatch.d.ts diff --git a/react-icons/ti/support.d.ts b/types/react-icons/ti/support.d.ts similarity index 100% rename from react-icons/ti/support.d.ts rename to types/react-icons/ti/support.d.ts diff --git a/react-icons/ti/tabs-outline.d.ts b/types/react-icons/ti/tabs-outline.d.ts similarity index 100% rename from react-icons/ti/tabs-outline.d.ts rename to types/react-icons/ti/tabs-outline.d.ts diff --git a/react-icons/ti/tag.d.ts b/types/react-icons/ti/tag.d.ts similarity index 100% rename from react-icons/ti/tag.d.ts rename to types/react-icons/ti/tag.d.ts diff --git a/react-icons/ti/tags.d.ts b/types/react-icons/ti/tags.d.ts similarity index 100% rename from react-icons/ti/tags.d.ts rename to types/react-icons/ti/tags.d.ts diff --git a/react-icons/ti/th-large-outline.d.ts b/types/react-icons/ti/th-large-outline.d.ts similarity index 100% rename from react-icons/ti/th-large-outline.d.ts rename to types/react-icons/ti/th-large-outline.d.ts diff --git a/react-icons/ti/th-large.d.ts b/types/react-icons/ti/th-large.d.ts similarity index 100% rename from react-icons/ti/th-large.d.ts rename to types/react-icons/ti/th-large.d.ts diff --git a/react-icons/ti/th-list-outline.d.ts b/types/react-icons/ti/th-list-outline.d.ts similarity index 100% rename from react-icons/ti/th-list-outline.d.ts rename to types/react-icons/ti/th-list-outline.d.ts diff --git a/react-icons/ti/th-list.d.ts b/types/react-icons/ti/th-list.d.ts similarity index 100% rename from react-icons/ti/th-list.d.ts rename to types/react-icons/ti/th-list.d.ts diff --git a/react-icons/ti/th-menu-outline.d.ts b/types/react-icons/ti/th-menu-outline.d.ts similarity index 100% rename from react-icons/ti/th-menu-outline.d.ts rename to types/react-icons/ti/th-menu-outline.d.ts diff --git a/react-icons/ti/th-menu.d.ts b/types/react-icons/ti/th-menu.d.ts similarity index 100% rename from react-icons/ti/th-menu.d.ts rename to types/react-icons/ti/th-menu.d.ts diff --git a/react-icons/ti/th-small-outline.d.ts b/types/react-icons/ti/th-small-outline.d.ts similarity index 100% rename from react-icons/ti/th-small-outline.d.ts rename to types/react-icons/ti/th-small-outline.d.ts diff --git a/react-icons/ti/th-small.d.ts b/types/react-icons/ti/th-small.d.ts similarity index 100% rename from react-icons/ti/th-small.d.ts rename to types/react-icons/ti/th-small.d.ts diff --git a/react-icons/ti/thermometer.d.ts b/types/react-icons/ti/thermometer.d.ts similarity index 100% rename from react-icons/ti/thermometer.d.ts rename to types/react-icons/ti/thermometer.d.ts diff --git a/react-icons/ti/thumbs-down.d.ts b/types/react-icons/ti/thumbs-down.d.ts similarity index 100% rename from react-icons/ti/thumbs-down.d.ts rename to types/react-icons/ti/thumbs-down.d.ts diff --git a/react-icons/ti/thumbs-ok.d.ts b/types/react-icons/ti/thumbs-ok.d.ts similarity index 100% rename from react-icons/ti/thumbs-ok.d.ts rename to types/react-icons/ti/thumbs-ok.d.ts diff --git a/react-icons/ti/thumbs-up.d.ts b/types/react-icons/ti/thumbs-up.d.ts similarity index 100% rename from react-icons/ti/thumbs-up.d.ts rename to types/react-icons/ti/thumbs-up.d.ts diff --git a/react-icons/ti/tick-outline.d.ts b/types/react-icons/ti/tick-outline.d.ts similarity index 100% rename from react-icons/ti/tick-outline.d.ts rename to types/react-icons/ti/tick-outline.d.ts diff --git a/react-icons/ti/tick.d.ts b/types/react-icons/ti/tick.d.ts similarity index 100% rename from react-icons/ti/tick.d.ts rename to types/react-icons/ti/tick.d.ts diff --git a/react-icons/ti/ticket.d.ts b/types/react-icons/ti/ticket.d.ts similarity index 100% rename from react-icons/ti/ticket.d.ts rename to types/react-icons/ti/ticket.d.ts diff --git a/react-icons/ti/time.d.ts b/types/react-icons/ti/time.d.ts similarity index 100% rename from react-icons/ti/time.d.ts rename to types/react-icons/ti/time.d.ts diff --git a/react-icons/ti/times-outline.d.ts b/types/react-icons/ti/times-outline.d.ts similarity index 100% rename from react-icons/ti/times-outline.d.ts rename to types/react-icons/ti/times-outline.d.ts diff --git a/react-icons/ti/times.d.ts b/types/react-icons/ti/times.d.ts similarity index 100% rename from react-icons/ti/times.d.ts rename to types/react-icons/ti/times.d.ts diff --git a/react-icons/ti/trash.d.ts b/types/react-icons/ti/trash.d.ts similarity index 100% rename from react-icons/ti/trash.d.ts rename to types/react-icons/ti/trash.d.ts diff --git a/react-icons/ti/tree.d.ts b/types/react-icons/ti/tree.d.ts similarity index 100% rename from react-icons/ti/tree.d.ts rename to types/react-icons/ti/tree.d.ts diff --git a/react-icons/ti/upload-outline.d.ts b/types/react-icons/ti/upload-outline.d.ts similarity index 100% rename from react-icons/ti/upload-outline.d.ts rename to types/react-icons/ti/upload-outline.d.ts diff --git a/react-icons/ti/upload.d.ts b/types/react-icons/ti/upload.d.ts similarity index 100% rename from react-icons/ti/upload.d.ts rename to types/react-icons/ti/upload.d.ts diff --git a/react-icons/ti/user-add-outline.d.ts b/types/react-icons/ti/user-add-outline.d.ts similarity index 100% rename from react-icons/ti/user-add-outline.d.ts rename to types/react-icons/ti/user-add-outline.d.ts diff --git a/react-icons/ti/user-add.d.ts b/types/react-icons/ti/user-add.d.ts similarity index 100% rename from react-icons/ti/user-add.d.ts rename to types/react-icons/ti/user-add.d.ts diff --git a/react-icons/ti/user-delete-outline.d.ts b/types/react-icons/ti/user-delete-outline.d.ts similarity index 100% rename from react-icons/ti/user-delete-outline.d.ts rename to types/react-icons/ti/user-delete-outline.d.ts diff --git a/react-icons/ti/user-delete.d.ts b/types/react-icons/ti/user-delete.d.ts similarity index 100% rename from react-icons/ti/user-delete.d.ts rename to types/react-icons/ti/user-delete.d.ts diff --git a/react-icons/ti/user-outline.d.ts b/types/react-icons/ti/user-outline.d.ts similarity index 100% rename from react-icons/ti/user-outline.d.ts rename to types/react-icons/ti/user-outline.d.ts diff --git a/react-icons/ti/user.d.ts b/types/react-icons/ti/user.d.ts similarity index 100% rename from react-icons/ti/user.d.ts rename to types/react-icons/ti/user.d.ts diff --git a/react-icons/ti/vendor-android.d.ts b/types/react-icons/ti/vendor-android.d.ts similarity index 100% rename from react-icons/ti/vendor-android.d.ts rename to types/react-icons/ti/vendor-android.d.ts diff --git a/react-icons/ti/vendor-apple.d.ts b/types/react-icons/ti/vendor-apple.d.ts similarity index 100% rename from react-icons/ti/vendor-apple.d.ts rename to types/react-icons/ti/vendor-apple.d.ts diff --git a/react-icons/ti/vendor-microsoft.d.ts b/types/react-icons/ti/vendor-microsoft.d.ts similarity index 100% rename from react-icons/ti/vendor-microsoft.d.ts rename to types/react-icons/ti/vendor-microsoft.d.ts diff --git a/react-icons/ti/video-outline.d.ts b/types/react-icons/ti/video-outline.d.ts similarity index 100% rename from react-icons/ti/video-outline.d.ts rename to types/react-icons/ti/video-outline.d.ts diff --git a/react-icons/ti/video.d.ts b/types/react-icons/ti/video.d.ts similarity index 100% rename from react-icons/ti/video.d.ts rename to types/react-icons/ti/video.d.ts diff --git a/react-icons/ti/volume-down.d.ts b/types/react-icons/ti/volume-down.d.ts similarity index 100% rename from react-icons/ti/volume-down.d.ts rename to types/react-icons/ti/volume-down.d.ts diff --git a/react-icons/ti/volume-mute.d.ts b/types/react-icons/ti/volume-mute.d.ts similarity index 100% rename from react-icons/ti/volume-mute.d.ts rename to types/react-icons/ti/volume-mute.d.ts diff --git a/react-icons/ti/volume-up.d.ts b/types/react-icons/ti/volume-up.d.ts similarity index 100% rename from react-icons/ti/volume-up.d.ts rename to types/react-icons/ti/volume-up.d.ts diff --git a/react-icons/ti/volume.d.ts b/types/react-icons/ti/volume.d.ts similarity index 100% rename from react-icons/ti/volume.d.ts rename to types/react-icons/ti/volume.d.ts diff --git a/react-icons/ti/warning-outline.d.ts b/types/react-icons/ti/warning-outline.d.ts similarity index 100% rename from react-icons/ti/warning-outline.d.ts rename to types/react-icons/ti/warning-outline.d.ts diff --git a/react-icons/ti/warning.d.ts b/types/react-icons/ti/warning.d.ts similarity index 100% rename from react-icons/ti/warning.d.ts rename to types/react-icons/ti/warning.d.ts diff --git a/react-icons/ti/watch.d.ts b/types/react-icons/ti/watch.d.ts similarity index 100% rename from react-icons/ti/watch.d.ts rename to types/react-icons/ti/watch.d.ts diff --git a/react-icons/ti/waves-outline.d.ts b/types/react-icons/ti/waves-outline.d.ts similarity index 100% rename from react-icons/ti/waves-outline.d.ts rename to types/react-icons/ti/waves-outline.d.ts diff --git a/react-icons/ti/waves.d.ts b/types/react-icons/ti/waves.d.ts similarity index 100% rename from react-icons/ti/waves.d.ts rename to types/react-icons/ti/waves.d.ts diff --git a/react-icons/ti/weather-cloudy.d.ts b/types/react-icons/ti/weather-cloudy.d.ts similarity index 100% rename from react-icons/ti/weather-cloudy.d.ts rename to types/react-icons/ti/weather-cloudy.d.ts diff --git a/react-icons/ti/weather-downpour.d.ts b/types/react-icons/ti/weather-downpour.d.ts similarity index 100% rename from react-icons/ti/weather-downpour.d.ts rename to types/react-icons/ti/weather-downpour.d.ts diff --git a/react-icons/ti/weather-night.d.ts b/types/react-icons/ti/weather-night.d.ts similarity index 100% rename from react-icons/ti/weather-night.d.ts rename to types/react-icons/ti/weather-night.d.ts diff --git a/react-icons/ti/weather-partly-sunny.d.ts b/types/react-icons/ti/weather-partly-sunny.d.ts similarity index 100% rename from react-icons/ti/weather-partly-sunny.d.ts rename to types/react-icons/ti/weather-partly-sunny.d.ts diff --git a/react-icons/ti/weather-shower.d.ts b/types/react-icons/ti/weather-shower.d.ts similarity index 100% rename from react-icons/ti/weather-shower.d.ts rename to types/react-icons/ti/weather-shower.d.ts diff --git a/react-icons/ti/weather-snow.d.ts b/types/react-icons/ti/weather-snow.d.ts similarity index 100% rename from react-icons/ti/weather-snow.d.ts rename to types/react-icons/ti/weather-snow.d.ts diff --git a/react-icons/ti/weather-stormy.d.ts b/types/react-icons/ti/weather-stormy.d.ts similarity index 100% rename from react-icons/ti/weather-stormy.d.ts rename to types/react-icons/ti/weather-stormy.d.ts diff --git a/react-icons/ti/weather-sunny.d.ts b/types/react-icons/ti/weather-sunny.d.ts similarity index 100% rename from react-icons/ti/weather-sunny.d.ts rename to types/react-icons/ti/weather-sunny.d.ts diff --git a/react-icons/ti/weather-windy-cloudy.d.ts b/types/react-icons/ti/weather-windy-cloudy.d.ts similarity index 100% rename from react-icons/ti/weather-windy-cloudy.d.ts rename to types/react-icons/ti/weather-windy-cloudy.d.ts diff --git a/react-icons/ti/weather-windy.d.ts b/types/react-icons/ti/weather-windy.d.ts similarity index 100% rename from react-icons/ti/weather-windy.d.ts rename to types/react-icons/ti/weather-windy.d.ts diff --git a/react-icons/ti/wi-fi-outline.d.ts b/types/react-icons/ti/wi-fi-outline.d.ts similarity index 100% rename from react-icons/ti/wi-fi-outline.d.ts rename to types/react-icons/ti/wi-fi-outline.d.ts diff --git a/react-icons/ti/wi-fi.d.ts b/types/react-icons/ti/wi-fi.d.ts similarity index 100% rename from react-icons/ti/wi-fi.d.ts rename to types/react-icons/ti/wi-fi.d.ts diff --git a/react-icons/ti/wine.d.ts b/types/react-icons/ti/wine.d.ts similarity index 100% rename from react-icons/ti/wine.d.ts rename to types/react-icons/ti/wine.d.ts diff --git a/react-icons/ti/world-outline.d.ts b/types/react-icons/ti/world-outline.d.ts similarity index 100% rename from react-icons/ti/world-outline.d.ts rename to types/react-icons/ti/world-outline.d.ts diff --git a/react-icons/ti/world.d.ts b/types/react-icons/ti/world.d.ts similarity index 100% rename from react-icons/ti/world.d.ts rename to types/react-icons/ti/world.d.ts diff --git a/react-icons/ti/zoom-in-outline.d.ts b/types/react-icons/ti/zoom-in-outline.d.ts similarity index 100% rename from react-icons/ti/zoom-in-outline.d.ts rename to types/react-icons/ti/zoom-in-outline.d.ts diff --git a/react-icons/ti/zoom-in.d.ts b/types/react-icons/ti/zoom-in.d.ts similarity index 100% rename from react-icons/ti/zoom-in.d.ts rename to types/react-icons/ti/zoom-in.d.ts diff --git a/react-icons/ti/zoom-out-outline.d.ts b/types/react-icons/ti/zoom-out-outline.d.ts similarity index 100% rename from react-icons/ti/zoom-out-outline.d.ts rename to types/react-icons/ti/zoom-out-outline.d.ts diff --git a/react-icons/ti/zoom-out.d.ts b/types/react-icons/ti/zoom-out.d.ts similarity index 100% rename from react-icons/ti/zoom-out.d.ts rename to types/react-icons/ti/zoom-out.d.ts diff --git a/react-icons/ti/zoom-outline.d.ts b/types/react-icons/ti/zoom-outline.d.ts similarity index 100% rename from react-icons/ti/zoom-outline.d.ts rename to types/react-icons/ti/zoom-outline.d.ts diff --git a/react-icons/ti/zoom.d.ts b/types/react-icons/ti/zoom.d.ts similarity index 100% rename from react-icons/ti/zoom.d.ts rename to types/react-icons/ti/zoom.d.ts diff --git a/react-icons/tsconfig.json b/types/react-icons/tsconfig.json similarity index 100% rename from react-icons/tsconfig.json rename to types/react-icons/tsconfig.json diff --git a/react-input-mask/tslint.json b/types/react-icons/tslint.json similarity index 100% rename from react-input-mask/tslint.json rename to types/react-icons/tslint.json diff --git a/react-imageloader/index.d.ts b/types/react-imageloader/index.d.ts similarity index 100% rename from react-imageloader/index.d.ts rename to types/react-imageloader/index.d.ts diff --git a/react-imageloader/react-imageloader-tests.tsx b/types/react-imageloader/react-imageloader-tests.tsx similarity index 100% rename from react-imageloader/react-imageloader-tests.tsx rename to types/react-imageloader/react-imageloader-tests.tsx diff --git a/react-imageloader/tsconfig.json b/types/react-imageloader/tsconfig.json similarity index 100% rename from react-imageloader/tsconfig.json rename to types/react-imageloader/tsconfig.json diff --git a/react-infinite/index.d.ts b/types/react-infinite/index.d.ts similarity index 100% rename from react-infinite/index.d.ts rename to types/react-infinite/index.d.ts diff --git a/react-infinite/react-infinite-tests.tsx b/types/react-infinite/react-infinite-tests.tsx similarity index 100% rename from react-infinite/react-infinite-tests.tsx rename to types/react-infinite/react-infinite-tests.tsx diff --git a/react-infinite/tsconfig.json b/types/react-infinite/tsconfig.json similarity index 100% rename from react-infinite/tsconfig.json rename to types/react-infinite/tsconfig.json diff --git a/react-input-calendar/index.d.ts b/types/react-input-calendar/index.d.ts similarity index 100% rename from react-input-calendar/index.d.ts rename to types/react-input-calendar/index.d.ts diff --git a/react-input-calendar/react-input-calendar-tests.tsx b/types/react-input-calendar/react-input-calendar-tests.tsx similarity index 100% rename from react-input-calendar/react-input-calendar-tests.tsx rename to types/react-input-calendar/react-input-calendar-tests.tsx diff --git a/react-input-calendar/tsconfig.json b/types/react-input-calendar/tsconfig.json similarity index 100% rename from react-input-calendar/tsconfig.json rename to types/react-input-calendar/tsconfig.json diff --git a/react-input-mask/index.d.ts b/types/react-input-mask/index.d.ts similarity index 100% rename from react-input-mask/index.d.ts rename to types/react-input-mask/index.d.ts diff --git a/react-input-mask/react-input-mask-tests.tsx b/types/react-input-mask/react-input-mask-tests.tsx similarity index 100% rename from react-input-mask/react-input-mask-tests.tsx rename to types/react-input-mask/react-input-mask-tests.tsx diff --git a/react-input-mask/tsconfig.json b/types/react-input-mask/tsconfig.json similarity index 100% rename from react-input-mask/tsconfig.json rename to types/react-input-mask/tsconfig.json diff --git a/react-joyride/tslint.json b/types/react-input-mask/tslint.json similarity index 100% rename from react-joyride/tslint.json rename to types/react-input-mask/tslint.json diff --git a/react-intl-redux/index.d.ts b/types/react-intl-redux/index.d.ts similarity index 100% rename from react-intl-redux/index.d.ts rename to types/react-intl-redux/index.d.ts diff --git a/react-intl-redux/package.json b/types/react-intl-redux/package.json similarity index 100% rename from react-intl-redux/package.json rename to types/react-intl-redux/package.json diff --git a/react-intl-redux/react-intl-redux-tests.tsx b/types/react-intl-redux/react-intl-redux-tests.tsx similarity index 100% rename from react-intl-redux/react-intl-redux-tests.tsx rename to types/react-intl-redux/react-intl-redux-tests.tsx diff --git a/react-intl-redux/tsconfig.json b/types/react-intl-redux/tsconfig.json similarity index 100% rename from react-intl-redux/tsconfig.json rename to types/react-intl-redux/tsconfig.json diff --git a/react-intl/index.d.ts b/types/react-intl/index.d.ts similarity index 99% rename from react-intl/index.d.ts rename to types/react-intl/index.d.ts index ed0b639f92..e1ed69c152 100644 --- a/react-intl/index.d.ts +++ b/types/react-intl/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for react-intl 2.2.1 // Project: http://formatjs.io/react/ -// Definitions by: Bruno Grieder , Christian Droulers , Fedor Nezhivoi , Till Wolff +// Definitions by: Bruno Grieder , Christian Droulers , Fedor Nezhivoi , Till Wolff // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 @@ -14,7 +14,8 @@ declare namespace ReactIntl { pluralRuleFunction?: (n: number, ord: boolean) => string; } - function injectIntl(component: React.ComponentClass | React.StatelessComponent): React.ComponentClass; + function injectIntl(component: React.ComponentClass | React.StatelessComponent): + React.ComponentClass & { WrappedComponent: React.ComponentClass | React.StatelessComponent }; function addLocaleData(data: Locale[] | Locale): void; @@ -227,7 +228,11 @@ declare namespace ReactIntl { defaultFormats?: Object; } } - class IntlProvider extends React.Component { } + class IntlProvider extends React.Component { + getChildContext(): { + intl: InjectedIntl; + } + } class LocaleData extends Array { } diff --git a/react-intl/react-intl-tests.tsx b/types/react-intl/react-intl-tests.tsx similarity index 95% rename from react-intl/react-intl-tests.tsx rename to types/react-intl/react-intl-tests.tsx index d3477aaa11..3165b0583e 100644 --- a/react-intl/react-intl-tests.tsx +++ b/types/react-intl/react-intl-tests.tsx @@ -168,7 +168,7 @@ class SomeComponent extends React.Component = injectIntl(SomeComponent); +const SomeComponentWithIntl = injectIntl(SomeComponent); class TestApp extends React.Component<{}, {}> { public render(): React.ReactElement<{}> { @@ -191,6 +191,10 @@ class TestApp extends React.Component<{}, {}> { } } +const intlProvider = new IntlProvider({ locale: 'en' }, {}); +const { intl } = intlProvider.getChildContext(); +const wrappedComponent = + export default { TestApp, SomeComponent: SomeComponentWithIntl diff --git a/react-intl/tsconfig.json b/types/react-intl/tsconfig.json similarity index 100% rename from react-intl/tsconfig.json rename to types/react-intl/tsconfig.json diff --git a/react-intl/v1/index.d.ts b/types/react-intl/v1/index.d.ts similarity index 100% rename from react-intl/v1/index.d.ts rename to types/react-intl/v1/index.d.ts diff --git a/react-intl/v1/react-intl-tests.tsx b/types/react-intl/v1/react-intl-tests.tsx similarity index 100% rename from react-intl/v1/react-intl-tests.tsx rename to types/react-intl/v1/react-intl-tests.tsx diff --git a/react-intl/v1/tsconfig.json b/types/react-intl/v1/tsconfig.json similarity index 100% rename from react-intl/v1/tsconfig.json rename to types/react-intl/v1/tsconfig.json diff --git a/react-is-deprecated/index.d.ts b/types/react-is-deprecated/index.d.ts similarity index 100% rename from react-is-deprecated/index.d.ts rename to types/react-is-deprecated/index.d.ts diff --git a/react-is-deprecated/react-is-deprecated-tests.ts b/types/react-is-deprecated/react-is-deprecated-tests.ts similarity index 100% rename from react-is-deprecated/react-is-deprecated-tests.ts rename to types/react-is-deprecated/react-is-deprecated-tests.ts diff --git a/react-is-deprecated/tsconfig.json b/types/react-is-deprecated/tsconfig.json similarity index 100% rename from react-is-deprecated/tsconfig.json rename to types/react-is-deprecated/tsconfig.json diff --git a/react-joyride/index.d.ts b/types/react-joyride/index.d.ts similarity index 100% rename from react-joyride/index.d.ts rename to types/react-joyride/index.d.ts diff --git a/react-joyride/react-joyride-tests.tsx b/types/react-joyride/react-joyride-tests.tsx similarity index 100% rename from react-joyride/react-joyride-tests.tsx rename to types/react-joyride/react-joyride-tests.tsx diff --git a/react-joyride/tsconfig.json b/types/react-joyride/tsconfig.json similarity index 100% rename from react-joyride/tsconfig.json rename to types/react-joyride/tsconfig.json diff --git a/react-json-pretty/tslint.json b/types/react-joyride/tslint.json similarity index 100% rename from react-json-pretty/tslint.json rename to types/react-joyride/tslint.json diff --git a/react-json-pretty/index.d.ts b/types/react-json-pretty/index.d.ts similarity index 100% rename from react-json-pretty/index.d.ts rename to types/react-json-pretty/index.d.ts diff --git a/react-json-pretty/react-json-pretty-tests.tsx b/types/react-json-pretty/react-json-pretty-tests.tsx similarity index 100% rename from react-json-pretty/react-json-pretty-tests.tsx rename to types/react-json-pretty/react-json-pretty-tests.tsx diff --git a/react-json-pretty/tsconfig.json b/types/react-json-pretty/tsconfig.json similarity index 100% rename from react-json-pretty/tsconfig.json rename to types/react-json-pretty/tsconfig.json diff --git a/react-leaflet/tslint.json b/types/react-json-pretty/tslint.json similarity index 100% rename from react-leaflet/tslint.json rename to types/react-json-pretty/tslint.json diff --git a/react-json-tree/index.d.ts b/types/react-json-tree/index.d.ts similarity index 100% rename from react-json-tree/index.d.ts rename to types/react-json-tree/index.d.ts diff --git a/react-json-tree/react-json-tree-tests.tsx b/types/react-json-tree/react-json-tree-tests.tsx similarity index 100% rename from react-json-tree/react-json-tree-tests.tsx rename to types/react-json-tree/react-json-tree-tests.tsx diff --git a/react-json-tree/tsconfig.json b/types/react-json-tree/tsconfig.json similarity index 100% rename from react-json-tree/tsconfig.json rename to types/react-json-tree/tsconfig.json diff --git a/react-jsonschema-form/index.d.ts b/types/react-jsonschema-form/index.d.ts similarity index 100% rename from react-jsonschema-form/index.d.ts rename to types/react-jsonschema-form/index.d.ts diff --git a/react-jsonschema-form/react-jsonschema-form-tests.tsx b/types/react-jsonschema-form/react-jsonschema-form-tests.tsx similarity index 100% rename from react-jsonschema-form/react-jsonschema-form-tests.tsx rename to types/react-jsonschema-form/react-jsonschema-form-tests.tsx diff --git a/react-jsonschema-form/tsconfig.json b/types/react-jsonschema-form/tsconfig.json similarity index 100% rename from react-jsonschema-form/tsconfig.json rename to types/react-jsonschema-form/tsconfig.json diff --git a/react-leaflet/index.d.ts b/types/react-leaflet/index.d.ts similarity index 100% rename from react-leaflet/index.d.ts rename to types/react-leaflet/index.d.ts diff --git a/react-leaflet/react-leaflet-tests.tsx b/types/react-leaflet/react-leaflet-tests.tsx similarity index 100% rename from react-leaflet/react-leaflet-tests.tsx rename to types/react-leaflet/react-leaflet-tests.tsx diff --git a/react-leaflet/tsconfig.json b/types/react-leaflet/tsconfig.json similarity index 100% rename from react-leaflet/tsconfig.json rename to types/react-leaflet/tsconfig.json diff --git a/react-maskedinput/tslint.json b/types/react-leaflet/tslint.json similarity index 100% rename from react-maskedinput/tslint.json rename to types/react-leaflet/tslint.json diff --git a/react-maskedinput/index.d.ts b/types/react-maskedinput/index.d.ts similarity index 100% rename from react-maskedinput/index.d.ts rename to types/react-maskedinput/index.d.ts diff --git a/react-maskedinput/react-maskedinput-tests.tsx b/types/react-maskedinput/react-maskedinput-tests.tsx similarity index 100% rename from react-maskedinput/react-maskedinput-tests.tsx rename to types/react-maskedinput/react-maskedinput-tests.tsx diff --git a/react-maskedinput/tsconfig.json b/types/react-maskedinput/tsconfig.json similarity index 100% rename from react-maskedinput/tsconfig.json rename to types/react-maskedinput/tsconfig.json diff --git a/react-modal/tslint.json b/types/react-maskedinput/tslint.json similarity index 100% rename from react-modal/tslint.json rename to types/react-maskedinput/tslint.json diff --git a/react-mdl/index.d.ts b/types/react-mdl/index.d.ts similarity index 100% rename from react-mdl/index.d.ts rename to types/react-mdl/index.d.ts diff --git a/react-mdl/react-mdl-tests.tsx b/types/react-mdl/react-mdl-tests.tsx similarity index 100% rename from react-mdl/react-mdl-tests.tsx rename to types/react-mdl/react-mdl-tests.tsx diff --git a/react-mdl/tsconfig.json b/types/react-mdl/tsconfig.json similarity index 100% rename from react-mdl/tsconfig.json rename to types/react-mdl/tsconfig.json diff --git a/react-measure/index.d.ts b/types/react-measure/index.d.ts similarity index 100% rename from react-measure/index.d.ts rename to types/react-measure/index.d.ts diff --git a/react-measure/react-measure-tests.tsx b/types/react-measure/react-measure-tests.tsx similarity index 100% rename from react-measure/react-measure-tests.tsx rename to types/react-measure/react-measure-tests.tsx diff --git a/react-measure/tsconfig.json b/types/react-measure/tsconfig.json similarity index 100% rename from react-measure/tsconfig.json rename to types/react-measure/tsconfig.json diff --git a/react-mixin/index.d.ts b/types/react-mixin/index.d.ts similarity index 100% rename from react-mixin/index.d.ts rename to types/react-mixin/index.d.ts diff --git a/react-mixin/react-mixin-tests.tsx b/types/react-mixin/react-mixin-tests.tsx similarity index 100% rename from react-mixin/react-mixin-tests.tsx rename to types/react-mixin/react-mixin-tests.tsx diff --git a/react-mixin/tsconfig.json b/types/react-mixin/tsconfig.json similarity index 100% rename from react-mixin/tsconfig.json rename to types/react-mixin/tsconfig.json diff --git a/react-modal/index.d.ts b/types/react-modal/index.d.ts similarity index 100% rename from react-modal/index.d.ts rename to types/react-modal/index.d.ts diff --git a/react-modal/react-modal-tests.tsx b/types/react-modal/react-modal-tests.tsx similarity index 100% rename from react-modal/react-modal-tests.tsx rename to types/react-modal/react-modal-tests.tsx diff --git a/react-modal/tsconfig.json b/types/react-modal/tsconfig.json similarity index 100% rename from react-modal/tsconfig.json rename to types/react-modal/tsconfig.json diff --git a/react-native-datepicker/tslint.json b/types/react-modal/tslint.json similarity index 100% rename from react-native-datepicker/tslint.json rename to types/react-modal/tslint.json diff --git a/react-motion-slider/index.d.ts b/types/react-motion-slider/index.d.ts similarity index 100% rename from react-motion-slider/index.d.ts rename to types/react-motion-slider/index.d.ts diff --git a/react-motion-slider/react-motion-slider-tests.tsx b/types/react-motion-slider/react-motion-slider-tests.tsx similarity index 100% rename from react-motion-slider/react-motion-slider-tests.tsx rename to types/react-motion-slider/react-motion-slider-tests.tsx diff --git a/react-motion-slider/tsconfig.json b/types/react-motion-slider/tsconfig.json similarity index 100% rename from react-motion-slider/tsconfig.json rename to types/react-motion-slider/tsconfig.json diff --git a/react-motion/index.d.ts b/types/react-motion/index.d.ts similarity index 100% rename from react-motion/index.d.ts rename to types/react-motion/index.d.ts diff --git a/react-motion/react-motion-tests.tsx b/types/react-motion/react-motion-tests.tsx similarity index 100% rename from react-motion/react-motion-tests.tsx rename to types/react-motion/react-motion-tests.tsx diff --git a/react-motion/tsconfig.json b/types/react-motion/tsconfig.json similarity index 100% rename from react-motion/tsconfig.json rename to types/react-motion/tsconfig.json diff --git a/react-native-datepicker/index.d.ts b/types/react-native-datepicker/index.d.ts similarity index 100% rename from react-native-datepicker/index.d.ts rename to types/react-native-datepicker/index.d.ts diff --git a/react-native-datepicker/react-native-datepicker-tests.tsx b/types/react-native-datepicker/react-native-datepicker-tests.tsx similarity index 100% rename from react-native-datepicker/react-native-datepicker-tests.tsx rename to types/react-native-datepicker/react-native-datepicker-tests.tsx diff --git a/react-native-datepicker/tsconfig.json b/types/react-native-datepicker/tsconfig.json similarity index 100% rename from react-native-datepicker/tsconfig.json rename to types/react-native-datepicker/tsconfig.json diff --git a/react-native-fs/tslint.json b/types/react-native-datepicker/tslint.json similarity index 100% rename from react-native-fs/tslint.json rename to types/react-native-datepicker/tslint.json diff --git a/react-native-fs/index.d.ts b/types/react-native-fs/index.d.ts similarity index 100% rename from react-native-fs/index.d.ts rename to types/react-native-fs/index.d.ts diff --git a/react-native-fs/react-native-fs-tests.ts b/types/react-native-fs/react-native-fs-tests.ts similarity index 100% rename from react-native-fs/react-native-fs-tests.ts rename to types/react-native-fs/react-native-fs-tests.ts diff --git a/react-native-fs/tsconfig.json b/types/react-native-fs/tsconfig.json similarity index 100% rename from react-native-fs/tsconfig.json rename to types/react-native-fs/tsconfig.json diff --git a/react-native-scrollable-tab-view/tslint.json b/types/react-native-fs/tslint.json similarity index 100% rename from react-native-scrollable-tab-view/tslint.json rename to types/react-native-fs/tslint.json diff --git a/react-native-orientation/index.d.ts b/types/react-native-orientation/index.d.ts similarity index 100% rename from react-native-orientation/index.d.ts rename to types/react-native-orientation/index.d.ts diff --git a/react-native-orientation/react-native-orientation-tests.ts b/types/react-native-orientation/react-native-orientation-tests.ts similarity index 100% rename from react-native-orientation/react-native-orientation-tests.ts rename to types/react-native-orientation/react-native-orientation-tests.ts diff --git a/react-native-orientation/tsconfig.json b/types/react-native-orientation/tsconfig.json similarity index 100% rename from react-native-orientation/tsconfig.json rename to types/react-native-orientation/tsconfig.json diff --git a/react-native-scrollable-tab-view/index.d.ts b/types/react-native-scrollable-tab-view/index.d.ts similarity index 97% rename from react-native-scrollable-tab-view/index.d.ts rename to types/react-native-scrollable-tab-view/index.d.ts index 9287ede79d..873d69855b 100644 --- a/react-native-scrollable-tab-view/index.d.ts +++ b/types/react-native-scrollable-tab-view/index.d.ts @@ -7,7 +7,8 @@ import * as React from 'react'; import { Animated, - ViewStyle + ViewStyle, + ScrollViewProperties } from 'react-native'; export interface onChangeTabProperties { @@ -85,7 +86,7 @@ interface ScrollableTabViewProperties extends React.Props { * contentProps (Object) - props that are applied to root ScrollView/ViewPagerAndroid. * Note that overriding defaults set by the library may break functionality; see the source for details. */ - contentProps?: React.ScrollViewProperties; + contentProps?: ScrollViewProperties; /** * scrollWithoutAnimation (Bool) - on tab press change tab without animation. diff --git a/react-native-scrollable-tab-view/react-native-scrollable-tab-view-tests.tsx b/types/react-native-scrollable-tab-view/react-native-scrollable-tab-view-tests.tsx similarity index 100% rename from react-native-scrollable-tab-view/react-native-scrollable-tab-view-tests.tsx rename to types/react-native-scrollable-tab-view/react-native-scrollable-tab-view-tests.tsx diff --git a/react-native-scrollable-tab-view/tsconfig.json b/types/react-native-scrollable-tab-view/tsconfig.json similarity index 100% rename from react-native-scrollable-tab-view/tsconfig.json rename to types/react-native-scrollable-tab-view/tsconfig.json diff --git a/react-native-swiper/tslint.json b/types/react-native-scrollable-tab-view/tslint.json similarity index 100% rename from react-native-swiper/tslint.json rename to types/react-native-scrollable-tab-view/tslint.json diff --git a/react-native-sortable-list/index.d.ts b/types/react-native-sortable-list/index.d.ts similarity index 100% rename from react-native-sortable-list/index.d.ts rename to types/react-native-sortable-list/index.d.ts diff --git a/react-native-sortable-list/react-native-sortable-list-tests.tsx b/types/react-native-sortable-list/react-native-sortable-list-tests.tsx similarity index 100% rename from react-native-sortable-list/react-native-sortable-list-tests.tsx rename to types/react-native-sortable-list/react-native-sortable-list-tests.tsx diff --git a/react-native-sortable-list/tsconfig.json b/types/react-native-sortable-list/tsconfig.json similarity index 100% rename from react-native-sortable-list/tsconfig.json rename to types/react-native-sortable-list/tsconfig.json diff --git a/react-native-swiper/index.d.ts b/types/react-native-swiper/index.d.ts similarity index 100% rename from react-native-swiper/index.d.ts rename to types/react-native-swiper/index.d.ts diff --git a/react-native-swiper/react-native-swiper-tests.tsx b/types/react-native-swiper/react-native-swiper-tests.tsx similarity index 100% rename from react-native-swiper/react-native-swiper-tests.tsx rename to types/react-native-swiper/react-native-swiper-tests.tsx diff --git a/react-native-swiper/tsconfig.json b/types/react-native-swiper/tsconfig.json similarity index 100% rename from react-native-swiper/tsconfig.json rename to types/react-native-swiper/tsconfig.json diff --git a/react-notification-system-redux/tslint.json b/types/react-native-swiper/tslint.json similarity index 100% rename from react-notification-system-redux/tslint.json rename to types/react-native-swiper/tslint.json diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts new file mode 100644 index 0000000000..6a833a4467 --- /dev/null +++ b/types/react-native/index.d.ts @@ -0,0 +1,8488 @@ +// Type definitions for react-native 0.42 +// Project: https://github.com/facebook/react-native +// Definitions by: Eloy Durán +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// +// USING: these definitions are meant to be used with the TSC compiler target set to ES6 +// +// USAGE EXAMPLES: check the RNTSExplorer project at https://github.com/bgrieder/RNTSExplorer +// +// CONTRIBUTING: please open pull requests +// +// CREDITS: This work is based on an original work made by Bernd Paradies: https://github.com/bparadie +// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/// + +export type MeasureOnSuccessCallback = ( + x: number, + y: number, + width: number, + height: number, + pageX: number, + pageY: number + ) => void + +export type MeasureInWindowOnSuccessCallback = ( + x: number, + y: number, + width: number, + height: number + ) => void + +export type MeasureLayoutOnSuccessCallback = ( + left: number, + top: number, + width: number, + height: number + ) => void + +/** + * EventSubscription represents a subscription to a particular event. It can + * remove its own subscription. + */ +interface EventSubscription { + + eventType: string; + key: number; + subscriber: EventSubscriptionVendor; + + /** + * @param {EventSubscriptionVendor} subscriber the subscriber that controls + * this subscription. + */ + new(subscriber: EventSubscriptionVendor): EventSubscription + + /** + * Removes this subscription from the subscriber that controls it. + */ + remove(): void +} + +/** + * EventSubscriptionVendor stores a set of EventSubscriptions that are + * subscribed to a particular event type. + */ +interface EventSubscriptionVendor { + + constructor(): EventSubscriptionVendor + + /** + * Adds a subscription keyed by an event type. + * + * @param {string} eventType + * @param {EventSubscription} subscription + */ + addSubscription(eventType: string, subscription: EventSubscription): EventSubscription + + /** + * Removes a bulk set of the subscriptions. + * + * @param {?string} eventType - Optional name of the event type whose + * registered supscriptions to remove, if null remove all subscriptions. + */ + removeAllSubscriptions(eventType?: string): void + + /** + * Removes a specific subscription. Instead of calling this function, call + * `subscription.remove()` directly. + * + * @param {object} subscription + */ + removeSubscription(subscription: any): void + + /** + * Returns the array of subscriptions that are currently registered for the + * given event type. + * + * Note: This array can be potentially sparse as subscriptions are deleted + * from it when they are removed. + * + * @param {string} eventType + * @returns {?array} + */ + getSubscriptionsForType(eventType: string): EventSubscription[] +} + +/** + * EmitterSubscription represents a subscription with listener and context data. + */ +interface EmitterSubscription extends EventSubscription { + emitter: EventEmitter + listener: () => any + context: any + + /** + * @param {EventEmitter} emitter - The event emitter that registered this + * subscription + * @param {EventSubscriptionVendor} subscriber - The subscriber that controls + * this subscription + * @param {function} listener - Function to invoke when the specified event is + * emitted + * @param {*} context - Optional context object to use when invoking the + * listener + */ + new(emitter: EventEmitter, subscriber: EventSubscriptionVendor, listener: () => any, context: any): EmitterSubscription + + /** + * Removes this subscription from the emitter that registered it. + * Note: we're overriding the `remove()` method of EventSubscription here + * but deliberately not calling `super.remove()` as the responsibility + * for removing the subscription lies with the EventEmitter. + */ + remove(): void +} + +interface EventEmitterListener { + /** + * Adds a listener to be invoked when events of the specified type are + * emitted. An optional calling context may be provided. The data arguments + * emitted will be passed to the listener function. + * + * @param {string} eventType - Name of the event to listen to + * @param {function} listener - Function to invoke when the specified event is + * emitted + * @param {*} context - Optional context object to use when invoking the + * listener + */ + addListener(eventType: string, listener: (...args: any[]) => any, context?: any): EmitterSubscription +} + +interface EventEmitter extends EventEmitterListener { + /** + * @constructor + * + * @param {EventSubscriptionVendor} subscriber - Optional subscriber instance + * to use. If omitted, a new subscriber will be created for the emitter. + */ + new(subscriber?: EventSubscriptionVendor): EventEmitter + + /** + * Similar to addListener, except that the listener is removed after it is + * invoked once. + * + * @param {string} eventType - Name of the event to listen to + * @param {function} listener - Function to invoke only once when the + * specified event is emitted + * @param {*} context - Optional context object to use when invoking the + * listener + */ + once(eventType: string, listener: (...args: any[]) => any, context: any): EmitterSubscription + + /** + * Removes all of the registered listeners, including those registered as + * listener maps. + * + * @param {?string} eventType - Optional name of the event whose registered + * listeners to remove + */ + removeAllListeners(eventType?: string): void + + /** + * Provides an API that can be called during an eventing cycle to remove the + * last listener that was invoked. This allows a developer to provide an event + * object that can remove the listener (or listener map) during the + * invocation. + * + * If it is called when not inside of an emitting cycle it will throw. + * + * @throws {Error} When called not during an eventing cycle + * + * @example + * var subscription = emitter.addListenerMap({ + * someEvent: function(data, event) { + * console.log(data); + * emitter.removeCurrentListener(); + * } + * }); + * + * emitter.emit('someEvent', 'abc'); // logs 'abc' + * emitter.emit('someEvent', 'def'); // does not log anything + */ + removeCurrentListener(): void + + /** + * Removes a specific subscription. Called by the `remove()` method of the + * subscription itself to ensure any necessary cleanup is performed. + */ + removeSubscription(subscription: EmitterSubscription): void + + /** + * Returns an array of listeners that are currently registered for the given + * event. + * + * @param {string} eventType - Name of the event to query + * @returns {array} + */ + listeners(eventType: string): EmitterSubscription[] + + /** + * Emits an event of the given type with the given data. All handlers of that + * particular type will be notified. + * + * @param {string} eventType - Name of the event to emit + * @param {...*} Arbitrary arguments to be passed to each registered listener + * + * @example + * emitter.addListener('someEvent', function(message) { + * console.log(message); + * }); + * + * emitter.emit('someEvent', 'abc'); // logs 'abc' + */ + emit(eventType: string): void + + /** + * Removes the given listener for event of specific type. + * + * @param {string} eventType - Name of the event to emit + * @param {function} listener - Function to invoke when the specified event is + * emitted + * + * @example + * emitter.removeListener('someEvent', function(message) { + * console.log(message); + * }); // removes the listener if already registered + * + */ + removeListener(eventType: string, listener: (...args: any[]) => any): void +} + +/** NativeMethodsMixin provides methods to access the underlying native component directly. + * This can be useful in cases when you want to focus a view or measure its on-screen dimensions, + * for example. + * The methods described here are available on most of the default components provided by React Native. + * Note, however, that they are not available on composite components that aren't directly backed by a + * native view. This will generally include most components that you define in your own app. + * For more information, see [Direct Manipulation](http://facebook.github.io/react-native/docs/direct-manipulation.html). + * @see https://github.com/facebook/react-native/blob/master/Libraries/ReactIOS/NativeMethodsMixin.js + */ +export interface NativeMethodsMixinStatic { + /** + * Determines the location on screen, width, and height of the given view and + * returns the values via an async callback. If successful, the callback will + * be called with the following arguments: + * + * - x + * - y + * - width + * - height + * - pageX + * - pageY + * + * Note that these measurements are not available until after the rendering + * has been completed in native. If you need the measurements as soon as + * possible, consider using the [`onLayout` + * prop](docs/view.html#onlayout) instead. + */ + measure(callback: MeasureOnSuccessCallback): void; + + /** + * Determines the location of the given view in the window and returns the + * values via an async callback. If the React root view is embedded in + * another native view, this will give you the absolute coordinates. If + * successful, the callback will be called with the following + * arguments: + * + * - x + * - y + * - width + * - height + * + * Note that these measurements are not available until after the rendering + * has been completed in native. + */ + measureInWindow(callback: MeasureInWindowOnSuccessCallback): void; + + /** + * Like [`measure()`](#measure), but measures the view relative an ancestor, + * specified as `relativeToNativeNode`. This means that the returned x, y + * are relative to the origin x, y of the ancestor view. + * + * As always, to obtain a native node handle for a component, you can use + * `React.findNodeHandle(component)`. + */ + measureLayout( + relativeToNativeNode: number, + onSuccess: MeasureLayoutOnSuccessCallback, + onFail: () => void /* currently unused */ + ): void; + + /** + * This function sends props straight to native. They will not participate in + * future diff process - this means that if you do not include them in the + * next render, they will remain active (see [Direct + * Manipulation](docs/direct-manipulation.html)). + */ + setNativeProps(nativeProps: Object): void; + + /** + * Requests focus for the given input or view. The exact behavior triggered + * will depend on the platform and type of view. + */ + focus(): void; + + /** + * Removes focus from an input or view. This is the opposite of `focus()`. + */ + blur(): void; + + refs: { + [key: string]: React.Component + }; +} + +// see react-jsx.d.ts +export function createElement

(type: React.ReactType, + props?: P, + ...children: React.ReactNode[]): React.ReactElement

; + + +export type Runnable = (appParameters: any) => void; + + +// Similar to React.SyntheticEvent except for nativeEvent +interface NativeSyntheticEvent { + bubbles: boolean + cancelable: boolean + currentTarget: EventTarget + defaultPrevented: boolean + eventPhase: number + isTrusted: boolean + nativeEvent: T + preventDefault(): void + stopPropagation(): void + target: EventTarget + timeStamp: Date + type: string +} + +export interface NativeTouchEvent { + /** + * Array of all touch events that have changed since the last event + */ + changedTouches: NativeTouchEvent[] + + /** + * The ID of the touch + */ + identifier: string + + /** + * The X position of the touch, relative to the element + */ + locationX: number + + /** + * The Y position of the touch, relative to the element + */ + locationY: number + + /** + * The X position of the touch, relative to the screen + */ + pageX: number + + /** + * The Y position of the touch, relative to the screen + */ + pageY: number + + /** + * The node id of the element receiving the touch event + */ + target: string + + /** + * A time identifier for the touch, useful for velocity calculation + */ + timestamp: number + + /** + * Array of all current touches on the screen + */ + touches: NativeTouchEvent[] +} + +export interface GestureResponderEvent extends NativeSyntheticEvent { +} + + +export interface PointProperties { + x: number + y: number +} + +export interface Insets { + top?: number + left?: number + bottom?: number + right?: number +} + +/** + * //FIXME: need to find documentation on which component is a TTouchable and can implement that interface + * @see React.DOMAtributes + */ +export interface Touchable { + onTouchStart?: (event: GestureResponderEvent) => void + onTouchMove?: (event: GestureResponderEvent) => void + onTouchEnd?: (event: GestureResponderEvent) => void + onTouchCancel?: (event: GestureResponderEvent) => void + onTouchEndCapture?: (event: GestureResponderEvent) => void +} + +export type ComponentProvider = () => React.ComponentClass + +export type AppConfig = { + appKey: string; + component?: ComponentProvider + run?: Runnable; +} + +// https://github.com/facebook/react-native/blob/master/Libraries/AppRegistry/AppRegistry.js +/** + * `AppRegistry` is the JS entry point to running all React Native apps. App + * root components should register themselves with + * `AppRegistry.registerComponent`, then the native system can load the bundle + * for the app and then actually run the app when it's ready by invoking + * `AppRegistry.runApplication`. + * + * To "stop" an application when a view should be destroyed, call + * `AppRegistry.unmountApplicationComponentAtRootTag` with the tag that was + * pass into `runApplication`. These should always be used as a pair. + * + * `AppRegistry` should be `require`d early in the `require` sequence to make + * sure the JS execution environment is setup before other modules are + * `require`d. + */ +export class AppRegistry { + static registerConfig(config: AppConfig[]): void; + + static registerComponent( appKey: string, getComponentFunc: ComponentProvider ): string; + + static registerRunnable(appKey: string, func: Runnable): string; + + static getAppKeys(): string[]; + + static unmountApplicationComponentAtRootTag(rootTag: number): void; + + static runApplication(appKey: string, appParameters: any): void; +} + +export interface LayoutAnimationTypes { + spring: string + linear: string + easeInEaseOut: string + easeIn: string + easeOut: string +} + +export interface LayoutAnimationProperties { + opacity: string + scaleXY: string +} + +export interface LayoutAnimationAnim { + duration?: number + delay?: number + springDamping?: number + initialVelocity?: number + type?: string //LayoutAnimationTypes + property?: string //LayoutAnimationProperties +} + +export interface LayoutAnimationConfig { + duration: number + create?: LayoutAnimationAnim + update?: LayoutAnimationAnim + delete?: LayoutAnimationAnim +} + +/** Automatically animates views to their new positions when the next layout happens. + * A common way to use this API is to call LayoutAnimation.configureNext before + * calling setState. */ +export interface LayoutAnimationStatic { + /** Schedules an animation to happen on the next layout. + * @param config Specifies animation properties: + * `duration` in milliseconds + * `create`, config for animating in new views (see Anim type) + * `update`, config for animating views that have been updated (see Anim type) + * @param onAnimationDidEnd Called when the animation finished. Only supported on iOS. + */ + configureNext: ( config: LayoutAnimationConfig, onAnimationDidEnd?: () => void ) => void + /** Helper for creating a config for configureNext. */ + create: (duration: number, type?: string, creationProp?: string) => LayoutAnimationConfig + Types: LayoutAnimationTypes + Properties: LayoutAnimationProperties + configChecker: (shapeTypes: {[key: string]: any}) => any + Presets: { + easeInEaseOut: LayoutAnimationConfig + linear: LayoutAnimationConfig + spring: LayoutAnimationConfig + } + easeInEaseOut: (config: LayoutAnimationConfig, onAnimationDidEnd?: () => void) => void + linear: (config: LayoutAnimationConfig, onAnimationDidEnd?: () => void) => void + spring: (config: LayoutAnimationConfig, onAnimationDidEnd?: () => void) => void +} + +export type FlexAlignType = "flex-start" | "flex-end" | "center" | "stretch" | "baseline"; +export type FlexJustifyType = "flex-start" | "flex-end" | "center" | "space-between" | "space-around"; +export type FlexDirection = "row" | "column" | "row-reverse" | "column-reverse"; + +/** + * Flex Prop Types + * @see https://facebook.github.io/react-native/docs/flexbox.html#proptypes + * @see LayoutPropTypes.js + */ +export interface FlexStyle { + + alignItems?: FlexAlignType; + alignSelf?: "auto" | FlexAlignType; + borderBottomWidth?: number + borderLeftWidth?: number + borderRightWidth?: number + borderTopWidth?: number + borderWidth?: number + bottom?: number | string + flex?: number + flexGrow?: number + flexShrink?: number + flexBasis?: number | string + flexDirection?: FlexDirection + flexWrap?: "wrap" | "nowrap" + height?: number | string + justifyContent?: FlexJustifyType + left?: number | string + minWidth?: number | string + maxWidth?: number | string + minHeight?: number | string + maxHeight?: number | string + margin?: number | string + marginBottom?: number | string + marginHorizontal?: number | string + marginLeft?: number | string + marginRight?: number | string + marginTop?: number | string + marginVertical?: number | string + overflow?: "visible" | "hidden" | "scroll" + padding?: number | string + paddingBottom?: number | string + paddingHorizontal?: number | string + paddingLeft?: number | string + paddingRight?: number | string + paddingTop?: number | string + paddingVertical?: number | string + position?: "absolute" | "relative" + right?: number | string + top?: number | string + width?: number | string + + /** + * @platform ios + */ + zIndex?: number +} + +/** + * @see ShadowPropTypesIOS.js + */ +export interface ShadowPropTypesIOSStatic { + /** + * Sets the drop shadow color + * @platform ios + */ + shadowColor: string + + /** + * Sets the drop shadow offset + * @platform ios + */ + shadowOffset: { width: number, height: number } + + /** + * Sets the drop shadow opacity (multiplied by the color's alpha component) + * @platform ios + */ + shadowOpacity: number + + /** + * Sets the drop shadow blur radius + * @platform ios + */ + shadowRadius: number +} + +type GetCurrentPositionOptions = { + timeout: number + maximumAge: number + enableHighAccuracy: boolean + distanceFilter: number +} + +type WatchPositionOptions = { + timeout: number + maximumAge: number + enableHighAccuracy: boolean + distanceFilter: number +} + +type GeolocationReturnType = { + coords: { + latitude: number + longitude: number + altitude?: number + accuracy?: number + altitudeAccuracy?: number + heading?: number + speed?: number + } + timestamp: number +} + +interface PerpectiveTransform { + perspective: number; +} + +interface RotateTransform { + rotate: string; +} + +interface RotateXTransform { + rotateX: string; +} + +interface RotateYTransform { + rotateY: string; +} + +interface RotateZTransform { + rotateZ: string; +} + +interface ScaleTransform { + scale: number; +} + +interface ScaleXTransform { + scaleX: number; +} + +interface ScaleYTransform { + scaleY: number; +} + +interface TranslateXTransform { + translateX: number; +} + +interface TranslateYTransform { + translateY: number; +} + +interface SkewXTransform { + skewX: string; +} + +interface SkewYTransform { + skewY: string; +} + +export interface TransformsStyle { + transform?: ( + PerpectiveTransform | + RotateTransform | + RotateXTransform | + RotateYTransform | + RotateZTransform | + ScaleTransform | + ScaleXTransform | + ScaleYTransform | + TranslateXTransform | + TranslateYTransform | + SkewXTransform | + SkewYTransform + )[] + transformMatrix?: Array + rotation?: number + scaleX?: number + scaleY?: number + translateX?: number + translateY?: number +} + + +export interface StyleSheetProperties { + hairlineWidth: number + flatten(style: T): T +} + +export interface LayoutRectangle { + x: number; + y: number; + width: number; + height: number; +} + +// @see TextProperties.onLayout +export interface LayoutChangeEvent { + nativeEvent: { + layout: LayoutRectangle + } +} + +export interface TextStyleIOS extends ViewStyle { + letterSpacing?: number + textDecorationColor?: string + textDecorationStyle?: "solid" | "double" | "dotted" | "dashed" + writingDirection?: "auto" | "ltr" | "rtl" +} + +export interface TextStyleAndroid extends ViewStyle { + textAlignVertical?: "auto" | "top" | "bottom" | "center" + includeFontPadding?: boolean +} + +// @see https://facebook.github.io/react-native/docs/text.html#style +export interface TextStyle extends TextStyleIOS, TextStyleAndroid, ViewStyle { + color?: string + fontFamily?: string + fontSize?: number + fontStyle?: "normal" | "italic" + /** + * Specifies font weight. The values 'normal' and 'bold' are supported + * for most fonts. Not all fonts have a variant for each of the numeric + * values, in that case the closest one is chosen. + */ + fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" + letterSpacing?: number + lineHeight?: number + /** + * Specifies text alignment. + * The value 'justify' is only supported on iOS. + */ + textAlign?: "auto" | "left" | "right" | "center" + textDecorationLine?: "none" | "underline" | "line-through" | "underline line-through" + textDecorationStyle?: "solid" | "double" | "dotted" | "dashed" + textDecorationColor?: string + textShadowColor?: string + textShadowOffset?: { width: number, height: number } + textShadowRadius?: number + testID?: string +} + +export interface TextPropertiesIOS { + /** + * Specifies whether fonts should scale to respect Text Size accessibility setting on iOS. The + * default is `true`. + */ + allowFontScaling?: boolean + + /** + * Specifies whether font should be scaled down automatically to fit given style constraints. + */ + adjustsFontSizeToFit?: boolean + + /** + * Specifies smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0). + */ + minimumFontScale?: number + + /** + * When `true`, no visual change is made when text is pressed down. By + * default, a gray oval highlights the text on press down. + */ + suppressHighlighting?: boolean +} + +export interface TextPropertiesAndroid { + /** + * Lets the user select text, to use the native copy and paste functionality. + */ + selectable?: boolean +} + +// https://facebook.github.io/react-native/docs/text.html#props +export interface TextProperties extends TextPropertiesIOS, TextPropertiesAndroid, React.Props { + + /** + * When set to `true`, indicates that the view is an accessibility element. The default value + * for a `Text` element is `true`. + * + * See the + * [Accessibility guide](/react-native/docs/accessibility.html#accessible-ios-android) + * for more information. + */ + accessible?: boolean + + /** + * This can be one of the following values: + * + * - `head` - The line is displayed so that the end fits in the container and the missing text + * at the beginning of the line is indicated by an ellipsis glyph. e.g., "...wxyz" + * - `middle` - The line is displayed so that the beginning and end fit in the container and the + * missing text in the middle is indicated by an ellipsis glyph. "ab...yz" + * - `tail` - The line is displayed so that the beginning fits in the container and the + * missing text at the end of the line is indicated by an ellipsis glyph. e.g., "abcd..." + * - `clip` - Lines are not drawn past the edge of the text container. + * + * The default is `tail`. + * + * `numberOfLines` must be set in conjunction with this prop. + * + * > `clip` is working only for iOS + */ + ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip' + + /** + * Line Break mode. Works only with numberOfLines. + * clip is working only for iOS + */ + lineBreakMode?: 'head' | 'middle' | 'tail' | 'clip' + + /** + * Used to truncate the text with an ellipsis after computing the text + * layout, including line wrapping, such that the total number of lines + * does not exceed this number. + * + * This prop is commonly used with `ellipsizeMode`. + */ + numberOfLines?: number + + /** + * Invoked on mount and layout changes with + * + * {nativeEvent: { layout: {x, y, width, height}}}. + */ + onLayout?: (event: LayoutChangeEvent) => void + + /** + * This function is called on press. + * Text intrinsically supports press handling with a default highlight state (which can be disabled with suppressHighlighting). + */ + onPress?: () => void + + /** + * This function is called on long press. + * e.g., `onLongPress={this.increaseSize}>`` + */ + onLongPress?: () => void + + /** + * @see https://facebook.github.io/react-native/docs/text.html#style + */ + style?: TextStyle + + /** + * Used to locate this view in end-to-end tests. + */ + testID?: string +} + +/** + * A React component for displaying text which supports nesting, styling, and touch handling. + */ +export interface TextStatic extends NativeMethodsMixin, React.ClassicComponentClass { + +} + +type DataDetectorTypes = 'phoneNumber' | 'link' | 'address' | 'calendarEvent' | 'none' | 'all'; + +/** + * DocumentSelectionState is responsible for maintaining selection information + * for a document. + * + * It is intended for use by AbstractTextEditor-based components for + * identifying the appropriate start/end positions to modify the + * DocumentContent, and for programatically setting browser selection when + * components re-render. + */ +export interface DocumentSelectionState extends EventEmitter { + new(anchor: number, focus: number): DocumentSelectionState + + /** + * Apply an update to the state. If either offset value has changed, + * set the values and emit the `change` event. Otherwise no-op. + * + * @param {number} anchor + * @param {number} focus + */ + update(anchor: number, focus: number): void + + /** + * Given a max text length, constrain our selection offsets to ensure + * that the selection remains strictly within the text range. + * + * @param {number} maxLength + */ + constrainLength(maxLength: number): void + + focus(): void + blur(): void + hasFocus(): boolean + isCollapsed(): boolean + isBackward(): boolean + + getAnchorOffset(): number + getFocusOffset(): number + getStartOffset(): number + getEndOffset(): number + overlaps(start: number, end: number): boolean +} + + +/** + * IOS Specific properties for TextInput + * @see https://facebook.github.io/react-native/docs/textinput.html#props + */ +export interface TextInputIOSProperties { + + /** + * enum('never', 'while-editing', 'unless-editing', 'always') + * When the clear button should appear on the right side of the text view + */ + clearButtonMode?: 'never' | 'while-editing' | 'unless-editing' | 'always' + + /** + * If true, clears the text field automatically when editing begins + */ + clearTextOnFocus?: boolean + + /** + * Determines the types of data converted to clickable URLs in the text input. + * Only valid if `multiline={true}` and `editable={false}`. + * By default no data types are detected. + * + * You can provide one type or an array of many types. + * + * Possible values for `dataDetectorTypes` are: + * + * - `'phoneNumber'` + * - `'link'` + * - `'address'` + * - `'calendarEvent'` + * - `'none'` + * - `'all'` + */ + dataDetectorTypes?: DataDetectorTypes | DataDetectorTypes[] + + /** + * If true, the keyboard disables the return key when there is no text and automatically enables it when there is text. + * The default value is false. + */ + enablesReturnKeyAutomatically?: boolean + + /** + * Determines the color of the keyboard. + */ + keyboardAppearance?: 'default' | 'light' | 'dark' + + /** + * Callback that is called when a key is pressed. + * Pressed key value is passed as an argument to the callback handler. + * Fires before onChange callbacks. + */ + onKeyPress?: (key: string) => void + + /** + * See DocumentSelectionState.js, some state that is responsible for maintaining selection information for a document + */ + selectionState?: DocumentSelectionState + + +} + +/** + * Android Specific properties for TextInput + * @see https://facebook.github.io/react-native/docs/textinput.html#props + */ +export interface TextInputAndroidProperties { + + /** + * If defined, the provided image resource will be rendered on the left. + */ + inlineImageLeft?: string + + /** + * Padding between the inline image, if any, and the text input itself. + */ + inlineImagePadding?: number + + /** + * Sets the number of lines for a TextInput. + * Use it with multiline set to true to be able to fill the lines. + */ + numberOfLines?: number + + /** + * Sets the return key to the label. Use it instead of `returnKeyType`. + * @platform android + */ + returnKeyLabel?: string + + /** + * The color of the textInput underline. + */ + underlineColorAndroid?: string +} + +export type KeyboardType = "default" | "email-address" | "numeric" | "phone-pad" +export type KeyboardTypeIOS = "ascii-capable" | "numbers-and-punctuation" | "url" | "number-pad" | "name-phone-pad" | "decimal-pad" | "twitter" | "web-search" + +export type ReturnKeyType = "done" | "go" | "next" | "search" | "send" +export type ReturnKeyTypeAndroid = "none" | "previous" +export type ReturnKeyTypeIOS = "default" | "google" | "join" | "route" | "yahoo" | "emergency-call" + +/** + * @see https://facebook.github.io/react-native/docs/textinput.html#props + */ +export interface TextInputProperties extends ViewProperties, TextInputIOSProperties, TextInputAndroidProperties, React.Props { + + /** + * Can tell TextInput to automatically capitalize certain characters. + * characters: all characters, + * words: first letter of each word + * sentences: first letter of each sentence (default) + * none: don't auto capitalize anything + * + * https://facebook.github.io/react-native/docs/textinput.html#autocapitalize + */ + autoCapitalize?: "none" | "sentences" | "words" | "characters" + + /** + * If false, disables auto-correct. + * The default value is true. + */ + autoCorrect?: boolean + + /** + * If true, focuses the input on componentDidMount. + * The default value is false. + */ + autoFocus?: boolean + + /** + * If true, the text field will blur when submitted. + * The default value is true. + */ + blurOnSubmit?: boolean + + /** + * Provides an initial value that will change when the user starts typing. + * Useful for simple use-cases where you don't want to deal with listening to events + * and updating the value prop to keep the controlled state in sync. + */ + defaultValue?: string + + /** + * If false, text is not editable. The default value is true. + */ + editable?: boolean + + /** + * enum("default", 'numeric', 'email-address', "ascii-capable", 'numbers-and-punctuation', 'url', 'number-pad', 'phone-pad', 'name-phone-pad', 'decimal-pad', 'twitter', 'web-search') + * Determines which keyboard to open, e.g.numeric. + * The following values work across platforms: - default - numeric - email-address - phone-pad + */ + keyboardType?: KeyboardType | KeyboardTypeIOS + + /** + * Limits the maximum number of characters that can be entered. + * Use this instead of implementing the logic in JS to avoid flicker. + */ + maxLength?: number + + /** + * If true, the text input can be multiple lines. The default value is false. + */ + multiline?: boolean + + /** + * Callback that is called when the text input is blurred + */ + onBlur?: () => void + + /** + * Callback that is called when the text input's text changes. + */ + onChange?: (event: { nativeEvent: { text: string, contentSize: { width: number, height: number }, target: number, eventCount: number } }) => void + + /** + * Callback that is called when the text input's text changes. + * Changed text is passed as an argument to the callback handler. + */ + onChangeText?: (text: string) => void + + /** + * Callback that is called when the text input's content size changes. + * This will be called with + * `{ nativeEvent: { contentSize: { width, height } } }`. + * + * Only called for multiline text inputs. + */ + onContentSizeChange?: ( event: {nativeEvent: {contentSize: { width: number, height: number}}} ) => void + + /** + * Callback that is called when text input ends. + */ + onEndEditing?: (event: { nativeEvent: { text: string } }) => void + + /** + * Callback that is called when the text input is focused + */ + onFocus?: () => void + + /** + * Callback that is called when the text input selection is changed. + */ + onSelectionChange?: (event: { nativeEvent: { selection: { start: number, end: number }, target: number } }) => void + + /** + * Callback that is called when the text input's submit button is pressed. + */ + onSubmitEditing?: (event: { nativeEvent: { text: string } }) => void + + /** + * The string that will be rendered before text input has been entered + */ + placeholder?: string + + /** + * The text color of the placeholder string + */ + placeholderTextColor?: string + + /** + * enum('default', 'go', 'google', 'join', 'next', 'route', 'search', 'send', 'yahoo', 'done', 'emergency-call') + * Determines how the return key should look. + */ + returnKeyType?: ReturnKeyType | ReturnKeyTypeAndroid | ReturnKeyTypeIOS + + /** + * If true, the text input obscures the text entered so that sensitive text like passwords stay secure. + * The default value is false. + */ + secureTextEntry?: boolean + + /** + * If true, all text will automatically be selected on focus + */ + selectTextOnFocus?: boolean + + /** + * The start and end of the text input's selection. Set start and end to + * the same value to position the cursor. + */ + selection?: { start: number, end?: number } + + /** + * The highlight (and cursor on ios) color of the text input + */ + selectionColor?: string + + /** + * Styles + */ + style?: TextStyle + + /** + * Used to locate this view in end-to-end tests + */ + testID?: string + + /** + * The value to show for the text input. TextInput is a controlled component, + * which means the native value will be forced to match this value prop if provided. + * For most uses this works great, but in some cases this may cause flickering - one common cause is preventing edits by keeping value the same. + * In addition to simply setting the same value, either set editable={false}, + * or set/update maxLength to prevent unwanted edits without flicker. + */ + value?: string + + ref?: React.Ref +} + +/** + * This class is responsible for coordinating the "focused" + * state for TextInputs. All calls relating to the keyboard + * should be funneled through here + */ +interface TextInputState { + /** + * Returns the ID of the currently focused text field, if one exists + * If no text field is focused it returns null + */ + currentlyFocusedField(): number + + /** + * @param {number} TextInputID id of the text field to focus + * Focuses the specified text field + * noop if the text field was already focused + */ + focusTextInput(textFieldID?: number): void + + /** + * @param {number} textFieldID id of the text field to focus + * Unfocuses the specified text field + * noop if it wasn't focused + */ + blurTextInput(textFieldID?: number) : void +} + +/** + * @see https://facebook.github.io/react-native/docs/textinput.html#methods + */ +export interface TextInputStatic extends NativeMethodsMixin, TimerMixin, React.ComponentClass { + State: TextInputState + + /** + * Returns if the input is currently focused. + */ + isFocused: () => boolean + + /** + * Removes all text from the input. + */ + clear: () => void +} + +export type ToolbarAndroidAction = { + /** + * title: required, the title of this action + */ + title: string + + /** + * icon: the icon for this action, e.g. require('./some_icon.png') + */ + icon?: ImageURISource + + /** + * show: when to show this action as an icon or hide it in the overflow menu: always, ifRoom or never + */ + show?: "always" | "ifRoom" | "never" + + /** + * showWithText: boolean, whether to show text alongside the icon or not + */ + showWithText?: boolean +} + +export interface ToolbarAndroidProperties extends ViewProperties, React.Props { + + /** + * Sets possible actions on the toolbar as part of the action menu. These are displayed as icons + * or text on the right side of the widget. If they don't fit they are placed in an 'overflow' + * menu. + * + * This property takes an array of objects, where each object has the following keys: + * + * * `title`: **required**, the title of this action + * * `icon`: the icon for this action, e.g. `require('./some_icon.png')` + * * `show`: when to show this action as an icon or hide it in the overflow menu: `always`, + * `ifRoom` or `never` + * * `showWithText`: boolean, whether to show text alongside the icon or not + */ + actions?: ToolbarAndroidAction[] + + /** + * Sets the content inset for the toolbar ending edge. + * The content inset affects the valid area for Toolbar content other + * than the navigation button and menu. Insets define the minimum + * margin for these components and can be used to effectively align + * Toolbar content along well-known gridlines. + */ + contentInsetEnd?: number + + /** + * Sets the content inset for the toolbar starting edge. + * The content inset affects the valid area for Toolbar content + * other than the navigation button and menu. Insets define the + * minimum margin for these components and can be used to effectively + * align Toolbar content along well-known gridlines. + */ + contentInsetStart?: number + + /** + * Sets the toolbar logo. + */ + logo?: ImageURISource + + /** + * Sets the navigation icon. + */ + navIcon?: ImageURISource + + /** + * Callback that is called when an action is selected. The only + * argument that is passed to the callback is the position of the + * action in the actions array. + */ + onActionSelected?: (position: number) => void + + /** + * Callback called when the icon is selected. + */ + onIconClicked?: () => void + + /** + * Sets the overflow icon. + */ + overflowIcon?: ImageURISource + + /** + * Used to set the toolbar direction to RTL. + * In addition to this property you need to add + * android:supportsRtl="true" + * to your application AndroidManifest.xml and then call + * setLayoutDirection(LayoutDirection.RTL) in your MainActivity + * onCreate method. + */ + rtl?: boolean + + /** + * Sets the toolbar subtitle. + */ + subtitle?: string + + /** + * Sets the toolbar subtitle color. + */ + subtitleColor?: string + + /** + * Used to locate this view in end-to-end tests. + */ + testID?: string + + /** + * Sets the toolbar title. + */ + title?: string + + /** + * Sets the toolbar title color. + */ + titleColor?: string + + ref?: React.Ref +} + +/** + * React component that wraps the Android-only [`Toolbar` widget][0]. A Toolbar can display a logo, + * navigation icon (e.g. hamburger menu), a title & subtitle and a list of actions. The title and + * subtitle are expanded so the logo and navigation icons are displayed on the left, title and + * subtitle in the middle and the actions on the right. + * + * If the toolbar has an only child, it will be displayed between the title and actions. + * + * Although the Toolbar supports remote images for the logo, navigation and action icons, this + * should only be used in DEV mode where `require('./some_icon.png')` translates into a packager + * URL. In release mode you should always use a drawable resource for these icons. Using + * `require('./some_icon.png')` will do this automatically for you, so as long as you don't + * explicitly use e.g. `{uri: 'http://...'}`, you will be good. + * + * [0]: https://developer.android.com/reference/android/support/v7/widget/Toolbar.html + */ +export interface ToolbarAndroidStatic extends NativeMethodsMixin, React.ComponentClass { + +} + + +/** + * Gesture recognition on mobile devices is much more complicated than web. + * A touch can go through several phases as the app determines what the user's intention is. + * For example, the app needs to determine if the touch is scrolling, sliding on a widget, or tapping. + * This can even change during the duration of a touch. There can also be multiple simultaneous touches. + * + * The touch responder system is needed to allow components to negotiate these touch interactions + * without any additional knowledge about their parent or child components. + * This system is implemented in ResponderEventPlugin.js, which contains further details and documentation. + * + * Best Practices + * Users can feel huge differences in the usability of web apps vs. native, and this is one of the big causes. + * Every action should have the following attributes: + * Feedback/highlighting- show the user what is handling their touch, and what will happen when they release the gesture + * Cancel-ability- when making an action, the user should be able to abort it mid-touch by dragging their finger away + * + * These features make users more comfortable while using an app, + * because it allows people to experiment and interact without fear of making mistakes. + * + * TouchableHighlight and Touchable* + * The responder system can be complicated to use. + * So we have provided an abstract Touchable implementation for things that should be "tappable". + * This uses the responder system and allows you to easily configure tap interactions declaratively. + * Use TouchableHighlight anywhere where you would use a button or link on web. + */ +export interface GestureResponderHandlers { + + /** + * A view can become the touch responder by implementing the correct negotiation methods. + * There are two methods to ask the view if it wants to become responder: + */ + + /** + * Does this view want to become responder on the start of a touch? + */ + onStartShouldSetResponder?: (event: GestureResponderEvent) => boolean + + /** + * Called for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness? + */ + onMoveShouldSetResponder?: (event: GestureResponderEvent) => boolean + + /** + * If the View returns true and attempts to become the responder, one of the following will happen: + */ + + onResponderEnd?: ( event: GestureResponderEvent ) => void + + /** + * The View is now responding for touch events. + * This is the time to highlight and show the user what is happening + */ + onResponderGrant?: (event: GestureResponderEvent) => void + + /** + * Something else is the responder right now and will not release it + */ + onResponderReject?: (event: GestureResponderEvent) => void + + /** + * If the view is responding, the following handlers can be called: + */ + + /** + * The user is moving their finger + */ + onResponderMove?: (event: GestureResponderEvent) => void + + /** + * Fired at the end of the touch, ie "touchUp" + */ + onResponderRelease?: (event: GestureResponderEvent) => void + + onResponderStart?: ( event: GestureResponderEvent ) => void + + /** + * Something else wants to become responder. + * Should this view release the responder? Returning true allows release + */ + onResponderTerminationRequest?: (event: GestureResponderEvent) => boolean + + /** + * The responder has been taken from the View. + * Might be taken by other views after a call to onResponderTerminationRequest, + * or might be taken by the OS without asking (happens with control center/ notification center on iOS) + */ + onResponderTerminate?: (event: GestureResponderEvent) => void + + /** + * onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, + * where the deepest node is called first. + * That means that the deepest component will become responder when multiple Views return true for *ShouldSetResponder handlers. + * This is desirable in most cases, because it makes sure all controls and buttons are usable. + * + * However, sometimes a parent will want to make sure that it becomes responder. + * This can be handled by using the capture phase. + * Before the responder system bubbles up from the deepest component, + * it will do a capture phase, firing on*ShouldSetResponderCapture. + * So if a parent View wants to prevent the child from becoming responder on a touch start, + * it should have a onStartShouldSetResponderCapture handler which returns true. + */ + onStartShouldSetResponderCapture?: (event: GestureResponderEvent) => boolean + + /** + * onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, + * where the deepest node is called first. + * That means that the deepest component will become responder when multiple Views return true for *ShouldSetResponder handlers. + * This is desirable in most cases, because it makes sure all controls and buttons are usable. + * + * However, sometimes a parent will want to make sure that it becomes responder. + * This can be handled by using the capture phase. + * Before the responder system bubbles up from the deepest component, + * it will do a capture phase, firing on*ShouldSetResponderCapture. + * So if a parent View wants to prevent the child from becoming responder on a touch start, + * it should have a onStartShouldSetResponderCapture handler which returns true. + */ + onMoveShouldSetResponderCapture?: () => void; + +} + +// @see https://facebook.github.io/react-native/docs/view.html#style +export interface ViewStyle extends FlexStyle, TransformsStyle { + backfaceVisibility?: "visible" | "hidden" + backgroundColor?: string; + borderBottomColor?: string; + borderBottomLeftRadius?: number; + borderBottomRightRadius?: number; + borderBottomWidth?: number; + borderColor?: string; + borderLeftColor?: string; + borderRadius?: number; + borderRightColor?: string; + borderRightWidth?: number; + borderStyle?: "solid" | "dotted" | "dashed" + borderTopColor?: string; + borderTopLeftRadius?: number; + borderTopRightRadius?: number; + borderTopWidth?: number + opacity?: number; + overflow?: "visible" | "hidden" + shadowColor?: string; + shadowOffset?: { width: number, height: number }; + shadowOpacity?: number; + shadowRadius?: number; + elevation?: number; + testID?: string; +} + + +export interface ViewPropertiesIOS { + + /** + * Provides additional traits to screen reader. + * By default no traits are provided unless specified otherwise in element + */ + accessibilityTraits?: ViewAccessibilityTraits | ViewAccessibilityTraits[]; + + /** + * Whether this view should be rendered as a bitmap before compositing. + * + * On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; + * for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view + * and quickly composite it during each frame. + * + * Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. + * Test and measure when using this property. + */ + shouldRasterizeIOS?: boolean +} + +export interface ViewPropertiesAndroid { + + /** + * Indicates to accessibility services to treat UI component like a native one. + * Works for Android only. + */ + accessibilityComponentType?: 'none' | 'button' | 'radiobutton_checked' | 'radiobutton_unchecked' + + + /** + * Indicates to accessibility services whether the user should be notified when this view changes. + * Works for Android API >= 19 only. + * See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references. + */ + accessibilityLiveRegion?: 'none' | 'polite' | 'assertive' + + /** + * Views that are only used to layout their children or otherwise don't draw anything + * may be automatically removed from the native hierarchy as an optimization. + * Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy. + */ + collapsable?: boolean + + + /** + * Controls how view is important for accessibility which is if it fires accessibility events + * and if it is reported to accessibility services that query the screen. + * Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. + * + * Possible values: + * 'auto' - The system determines whether the view is important for accessibility - default (recommended). + * 'yes' - The view is important for accessibility. + * 'no' - The view is not important for accessibility. + * 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views. + */ + importantForAccessibility?: 'auto' | 'yes' | 'no' | 'no-hide-descendants' + + + /** + * Whether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. + * The default (false) falls back to drawing the component and its children + * with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. + * This default may be noticeable and undesired in the case where the View you are setting an opacity on + * has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background). + * + * Rendering offscreen to preserve correct alpha behavior is extremely expensive + * and hard to debug for non-native developers, which is why it is not turned on by default. + * If you do need to enable this property for an animation, + * consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). + * If that property is enabled, this View will be rendered off-screen once, + * saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU. + */ + needsOffscreenAlphaCompositing?: boolean + + + /** + * Whether this view should render itself (and all of its children) into a single hardware texture on the GPU. + * + * On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: + * in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be + * re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation. + */ + renderToHardwareTextureAndroid?: boolean; + +} + +/** + * @see https://facebook.github.io/react-native/docs/view.html#props + */ +export interface ViewProperties extends ViewPropertiesAndroid, ViewPropertiesIOS, GestureResponderHandlers, Touchable, React.Props { + + /** + * Overrides the text that's read by the screen reader when the user interacts with the element. By default, the + * label is constructed by traversing all the children and accumulating all the Text nodes separated by space. + */ + accessibilityLabel?: string; + + /** + * When true, indicates that the view is an accessibility element. + * By default, all the touchable elements are accessible. + */ + accessible?: boolean; + + /** + * This defines how far a touch event can start away from the view. + * Typical interface guidelines recommend touch targets that are at least + * 30 - 40 points/density-independent pixels. If a Touchable view has + * a height of 20 the touchable height can be extended to 40 with + * hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} + * NOTE The touch area never extends past the parent view bounds and + * the Z-index of sibling views always takes precedence if a touch + * hits two overlapping views. + */ + + hitSlop?: Insets + + /** + * When `accessible` is true, the system will try to invoke this function when the user performs accessibility tap gesture. + */ + onAcccessibilityTap?: () => void; + + /** + * Invoked on mount and layout changes with + * + * {nativeEvent: { layout: {x, y, width, height}}}. + */ + onLayout?: (event: LayoutChangeEvent) => void; + + /** + * When accessible is true, the system will invoke this function when the user performs the magic tap gesture. + */ + onMagicTap?: () => void; + + /** + * + * In the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class: + * + * .box-none { + * pointer-events: none; + * } + * .box-none * { + * pointer-events: all; + * } + * + * box-only is the equivalent of + * + * .box-only { + * pointer-events: all; + * } + * .box-only * { + * pointer-events: none; + * } + * + * But since pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, + * we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform. + */ + pointerEvents?: "box-none" | "none" | "box-only" | "auto" + + /** + * + * This is a special performance property exposed by RCTView and is useful for scrolling content when there are many subviews, + * most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. + * The subviews must also have overflow: hidden, as should the containing view (or one of its superviews). + */ + removeClippedSubviews?: boolean + + style?: ViewStyle; + + /** + * Used to locate this view in end-to-end tests. + */ + testID?: string; +} + +/** + * The most fundamental component for building UI, View is a container that supports layout with flexbox, style, some touch handling, + * and accessibility controls, and is designed to be nested inside other views and to have 0 to many children of any type. + * View maps directly to the native view equivalent on whatever platform React is running on, + * whether that is a UIView,

, android.view, etc. + */ +export interface ViewStatic extends NativeMethodsMixin, React.ClassicComponentClass { + AccessibilityTraits: [ + 'none', + 'button', + 'link', + 'header', + 'search', + 'image', + 'selected', + 'plays', + 'key', + 'text', + 'summary', + 'disabled', + 'frequentUpdates', + 'startsMedia', + 'adjustable', + 'allowsDirectInteraction', + 'pageTurn' + ] + + AccessibilityComponentType: [ + 'none', + 'button', + 'radiobutton_checked', + 'radiobutton_unchecked' + ], + + /** + * Is 3D Touch / Force Touch available (i.e. will touch events include `force`) + * @platform ios + */ + forceTouchAvailable: boolean, +} + +/** + * @see https://facebook.github.io/react-native/docs/viewpagerandroid.html#props + */ + + +export interface ViewPagerAndroidOnPageScrollEventData { + position: number; + offset: number; +} + +export interface ViewPagerAndroidOnPageSelectedEventData { + position: number; +} + +export interface ViewPagerAndroidProperties extends ViewProperties { + /** + * Index of initial page that should be selected. Use `setPage` method to + * update the page, and `onPageSelected` to monitor page changes + */ + initialPage?: number; + + /** + * When false, the content does not scroll. + * The default value is true. + */ + scrollEnabled?: boolean; + + /** + * Executed when transitioning between pages (ether because of animation for + * the requested page change or when user is swiping/dragging between pages) + * The `event.nativeEvent` object for this callback will carry following data: + * - position - index of first page from the left that is currently visible + * - offset - value from range [0,1) describing stage between page transitions. + * Value x means that (1 - x) fraction of the page at "position" index is + * visible, and x fraction of the next page is visible. + */ + onPageScroll?: (event: NativeSyntheticEvent) => void; + + /** + * This callback will be called once ViewPager finish navigating to selected page + * (when user swipes between pages). The `event.nativeEvent` object passed to this + * callback will have following fields: + * - position - index of page that has been selected + */ + onPageSelected?: (event: NativeSyntheticEvent) => void; + + /** + * Function called when the page scrolling state has changed. + * The page scrolling state can be in 3 states: + * - idle, meaning there is no interaction with the page scroller happening at the time + * - dragging, meaning there is currently an interaction with the page scroller + * - settling, meaning that there was an interaction with the page scroller, and the + * page scroller is now finishing it's closing or opening animation + */ + onPageScrollStateChanged?: (state: "Idle" | "Dragging" | "Settling") => void + + /** + * Determines whether the keyboard gets dismissed in response to a drag. + * - 'none' (the default), drags do not dismiss the keyboard. + * - 'on-drag', the keyboard is dismissed when a drag begins. + */ + keyboardDismissMode?: "none" | "on-drag" + + /** + * Blank space to show between pages. This is only visible while scrolling, pages are still + * edge-to-edge. + */ + pageMargin?: number +} + +export interface ViewPagerAndroidStatic extends NativeMethodsMixin, React.ComponentClass { + /** + * A helper function to scroll to a specific page in the ViewPager. + * The transition between pages will be animated. + */ + setPage(selectedPage: number): void + + /** + * A helper function to scroll to a specific page in the ViewPager. + * The transition between pages will *not* be animated. + */ + setPageWithoutAnimation(selectedPage: number): void +} + +/** + * It is a component to solve the common problem of views that need to move out of the way of the virtual keyboard. + * It can automatically adjust either its position or bottom padding based on the position of the keyboard. + */ +export interface KeyboardAvoidingViewStatic extends TimerMixin, React.ClassicComponentClass { + +} + +export interface KeyboardAvoidingViewProps extends ViewProperties, React.Props { + + behavior?: 'height' | 'position' | 'padding' + + /** + * The style of the content container(View) when behavior is 'position'. + */ + contentContainerStyle?: ViewStyle + + /** + * This is the distance between the top of the user screen and the react native view, + * may be non-zero in some use cases. + */ + keyboardVerticalOffset?: number + + ref?: React.Ref +} + +/** + * //FIXME: No documentation extracted from code comment on WebView.ios.js + */ +export interface NavState { + + url?: string + title?: string + loading?: boolean + canGoBack?: boolean + canGoForward?: boolean; + + [key: string]: any +} + +/** + * Passed data from WebView via window.postMessage. + */ +export interface WebViewMessageEventData { +/** + * The data sent from a WebView; can only be a string. + */ +data: string +} + +export interface WebViewPropertiesAndroid { + + /** + * Used for android only, JS is enabled by default for WebView on iOS + */ + javaScriptEnabled?: boolean + + /** + * Used on Android only, controls whether DOM Storage is enabled + * or not android + */ + domStorageEnabled?: boolean, + + /** + * Sets the user-agent for the WebView. + */ + userAgent?: string +} + +export interface WebViewIOSLoadRequestEvent { + target: number + canGoBack: boolean + lockIdentifier: number + loading: boolean + title: string + canGoForward: boolean + navigationType: 'other' | 'click' + url: string +} + +export interface WebViewPropertiesIOS { + + /** + * Determines whether HTML5 videos play inline or use the native + * full-screen controller. default value false + * NOTE : "In order * for video to play inline, not only does + * this property need to be set to true, but the video element + * in the HTML document must also include the webkit-playsinline + * attribute." + */ + allowsInlineMediaPlayback?: boolean + + /** + * Boolean value that determines whether the web view bounces + * when it reaches the edge of the content. The default value is `true`. + * @platform ios + */ + bounces?: boolean + + /** + * A floating-point number that determines how quickly the scroll + * view decelerates after the user lifts their finger. You may also + * use string shortcuts "normal" and "fast" which match the + * underlying iOS settings for UIScrollViewDecelerationRateNormal + * and UIScrollViewDecelerationRateFast respectively. + * - normal: 0.998 - fast: 0.99 (the default for iOS WebView) + */ + decelerationRate?: "normal" | "fast" | number + + /** + * Allows custom handling of any webview requests by a JS handler. + * Return true or false from this method to continue loading the + * request. + */ + onShouldStartLoadWithRequest?: (event: WebViewIOSLoadRequestEvent) => boolean + + /** + * Boolean value that determines whether scrolling is enabled in the + * `WebView`. The default value is `true`. + */ + scrollEnabled?: boolean +} + +export interface WebViewUriSource { + + /* + * The URI to load in the WebView. Can be a local or remote file. + */ + uri?: string; + + /* + * The HTTP Method to use. Defaults to GET if not specified. + * NOTE: On Android, only GET and POST are supported. + */ + method?: string; + + /* + * Additional HTTP headers to send with the request. + * NOTE: On Android, this can only be used with GET requests. + */ + headers?: any; + + /* + * The HTTP body to send with the request. This must be a valid + * UTF-8 string, and will be sent exactly as specified, with no + * additional encoding (e.g. URL-escaping or base64) applied. + * NOTE: On Android, this can only be used with POST requests. + */ + body?: string; +} + +export interface WebViewHtmlSource { + + /* + * A static HTML page to display in the WebView. + */ + html: string; + + /* + * The base URL to be used for any relative links in the HTML. + */ + baseUrl?: string; +} + +/** + * @see https://facebook.github.io/react-native/docs/webview.html#props + */ +export interface WebViewProperties extends ViewProperties, WebViewPropertiesAndroid, WebViewPropertiesIOS, React.Props { + + /** + * Controls whether to adjust the content inset for web views that are + * placed behind a navigation bar, tab bar, or toolbar. The default value + * is `true`. + */ + automaticallyAdjustContentInsets?: boolean + + /** + * The amount by which the web view content is inset from the edges of + * the scroll view. Defaults to {top: 0, left: 0, bottom: 0, right: 0}. + */ + contentInset?: Insets + + /** + * @deprecated + */ + html?: string + + /** + * Set this to provide JavaScript that will be injected into the web page + * when the view loads. + */ + injectedJavaScript?: string + + /** + * Invoked when load fails + */ + onError?: (event: NavState) => void + + /** + * Invoked when load finish + */ + onLoad?: (event: NavState) => void + + /** + * Invoked when load either succeeds or fails + */ + onLoadEnd?: (event: NavState) => void + + /** + * Invoked on load start + */ + onLoadStart?: (event: NavState) => void + + /** + * Invoked when window.postMessage is called from WebView. + */ + onMessage?: ( event: NativeSyntheticEvent ) => void + + /** + * Function that is invoked when the `WebView` loading starts or ends. + */ + onNavigationStateChange?: ( event: NavState ) => void + + /** + * Function that returns a view to show if there's an error. + */ + renderError?: () => React.ReactElement + + /** + * Function that returns a loading indicator. + */ + renderLoading?: () => React.ReactElement + + /** + * Boolean value that forces the `WebView` to show the loading view + * on the first load. + */ + startInLoadingState?: boolean + + style?: ViewStyle + + // Deprecated: Use the `source` prop instead. + url?: string + + source?: WebViewUriSource | WebViewHtmlSource | number + + /** + * Determines whether HTML5 audio & videos require the user to tap + * before they can start playing. The default value is false. + */ + mediaPlaybackRequiresUserAction?: boolean + + /** + * sets whether the webpage scales to fit the view and the user can change the scale + */ + scalesPageToFit?: boolean + + ref?: React.Ref +} + + +export interface WebViewStatic extends React.ClassicComponentClass { + + /** + * Go back one page in the webview's history. + */ + goBack: () => void + + /** + * Go forward one page in the webview's history. + */ + goForward: () => void + +/** + * Post a message to the WebView in the form of a string. + */ +postMessage: (message: string) => void + + /** + * Reloads the current page. + */ + reload: () => void + + /** + * Stop loading the current page. + */ + stopLoading(): void + + /** + * Returns the native webview node. + */ + getWebViewHandle: () => any +} + + +/** + * @see https://facebook.github.io/react-native/docs/segmentedcontrolios.html + * @see SegmentedControlIOS.ios.js + */ +export interface NativeSegmentedControlIOSChangeEvent { + value: string + selectedSegmentIndex: number + target: number +} + +export interface SegmentedControlIOSProperties extends ViewProperties, React.Props { + + /** + * If false the user won't be able to interact with the control. Default value is true. + */ + enabled?: boolean + + /** + * If true, then selecting a segment won't persist visually. + * The onValueChange callback will still work as expected. + */ + momentary?: boolean + + /** + * Callback that is called when the user taps a segment; + * passes the event as an argument + * @param event + */ + onChange?: (event: NativeSyntheticEvent) => void + + /** + * Callback that is called when the user taps a segment; passes the segment's value as an argument + * @param value + */ + onValueChange?: (value: string) => void + + /** + * The index in props.values of the segment to be (pre)selected. + */ + selectedIndex?: number + + /** + * Accent color of the control. + */ + tintColor?: string + + /** + * The labels for the control's segment buttons, in order. + */ + values?: string[] + + ref?: React.Ref +} + +/** + * Use `SegmentedControlIOS` to render a UISegmentedControl iOS. + * + * #### Programmatically changing selected index + * + * The selected index can be changed on the fly by assigning the + * selectIndex prop to a state variable, then changing that variable. + * Note that the state variable would need to be updated as the user + * selects a value and changes the index, as shown in the example below. + * + * ```` + * { + * this.setState({selectedIndex: event.nativeEvent.selectedSegmentIndex}); + * }} + * /> + * ```` + */ +export interface SegmentedControlIOSStatic extends NativeMethodsMixin, React.ClassicComponentClass { + +} + + +export interface NavigatorIOSProperties extends React.Props { + /** + * The default background color of the navigation bar. + */ + barTintColor?: string + + /** + * NavigatorIOS uses "route" objects to identify child views, their props, and navigation bar configuration. + * "push" and all the other navigation operations expect routes to be like this + */ + initialRoute: Route + + /** + * The default wrapper style for components in the navigator. + * A common use case is to set the backgroundColor for every page + */ + itemWrapperStyle?: ViewStyle + + /** + * Boolean value that indicates whether the interactive pop gesture is + * enabled. This is useful for enabling/disabling the back swipe navigation + * gesture. + * + * If this prop is not provided, the default behavior is for the back swipe + * gesture to be enabled when the navigation bar is shown and disabled when + * the navigation bar is hidden. Once you've provided the + * `interactivePopGestureEnabled` prop, you can never restore the default + * behavior. + */ + interactivePopGestureEnabled?: boolean + + /** + * A Boolean value that indicates whether the navigation bar is hidden + */ + navigationBarHidden?: boolean + + /** + * A Boolean value that indicates whether to hide the 1px hairline shadow + */ + shadowHidden?: boolean + + /** + * The color used for buttons in the navigation bar + */ + tintColor?: string + + /** + * The text color of the navigation bar title + */ + titleTextColor?: string + + /** + * A Boolean value that indicates whether the navigation bar is translucent + */ + translucent?: boolean + + /** + * NOT IN THE DOC BUT IN THE EXAMPLES + */ + style?: ViewStyle +} + +/** + * A navigator is an object of navigation functions that a view can call. + * It is passed as a prop to any component rendered by NavigatorIOS. + * + * Navigator functions are also available on the NavigatorIOS component: + * + * @see https://facebook.github.io/react-native/docs/navigatorios.html#navigator + */ +export interface NavigationIOS { + /** + * Navigate forward to a new route + */ + push: (route: Route) => void + + /** + * Go back one page + */ + pop: () => void + + /** + * Go back N pages at once. When N=1, behavior matches pop() + */ + popN: (n: number) => void + + /** + * Replace the route for the current page and immediately load the view for the new route + */ + replace: (route: Route) => void + + /** + * Replace the route/view for the previous page + */ + replacePrevious: (route: Route) => void + + /** + * Replaces the previous route/view and transitions back to it + */ + replacePreviousAndPop: (route: Route) => void + + /** + * Replaces the top item and popToTop + */ + resetTo: (route: Route) => void + + /** + * Go back to the item for a particular route object + */ + popToRoute(route: Route): void + + /** + * Go back to the top item + */ + popToTop(): void +} + +export interface NavigatorIOSStatic extends NavigationIOS, React.ComponentClass { +} + + +/** + * @see https://facebook.github.io/react-native/docs/activityindicator.html#props + */ +export interface ActivityIndicatorProperties extends ViewProperties, React.Props { + + /** + * Whether to show the indicator (true, the default) or hide it (false). + */ + animating?: boolean + + /** + * The foreground color of the spinner (default is gray). + */ + color?: string + + /** + * Whether the indicator should hide when not animating (true by default). + */ + hidesWhenStopped?: boolean + + /** + * Size of the indicator. + * Small has a height of 20, large has a height of 36. + * + * enum('small', 'large') + */ + size?: number | 'small' | 'large' + + style?: ViewStyle + + ref?: React.Ref +} + +export interface ActivityIndicatorStatic extends NativeMethodsMixin, React.ClassicComponentClass { +} + + +/** + * @see https://facebook.github.io/react-native/docs/activityindicatorios.html#props + */ +export interface ActivityIndicatorIOSProperties extends ViewProperties, React.Props { + + /** + * Whether to show the indicator (true, the default) or hide it (false). + */ + animating?: boolean + + /** + * The foreground color of the spinner (default is gray). + */ + color?: string + + /** + * Whether the indicator should hide when not animating (true by default). + */ + hidesWhenStopped?: boolean + + /** + * Invoked on mount and layout changes with + */ + onLayout?: (event: { nativeEvent: { layout: { x: number, y: number, width: number, height: number } } }) => void + + /** + * Size of the indicator. + * Small has a height of 20, large has a height of 36. + * + * enum('small', 'large') + */ + size?: 'small' | 'large' + + style?: ViewStyle + + ref?: React.Ref +} + +/** + * @Deprecated since version 0.28.0 + */ +export interface ActivityIndicatorIOSStatic extends React.ComponentClass { +} + + +export interface DatePickerIOSProperties extends ViewProperties, React.Props { + + /** + * The currently selected date. + */ + date: Date + + + /** + * Maximum date. + * Restricts the range of possible date/time values. + */ + maximumDate?: Date + + /** + * Maximum date. + * Restricts the range of possible date/time values. + */ + minimumDate?: Date + + /** + * enum(1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30) + * The interval at which minutes can be selected. + */ + minuteInterval?: number + + /** + * enum('date', 'time', 'datetime') + * The date picker mode. + */ + mode?: "date" | "time" | "datetime" + + /** + * Date change handler. + * This is called when the user changes the date or time in the UI. + * The first and only argument is a Date object representing the new date and time. + */ + onDateChange: ( newDate: Date ) => void + + /** + * Timezone offset in minutes. + * By default, the date picker will use the device's timezone. With this parameter, it is possible to force a certain timezone offset. + * For instance, to show times in Pacific Standard Time, pass -7 * 60. + */ + timeZoneOffsetInMinutes?: number + + ref?: React.Ref +} + +export interface DatePickerIOSStatic extends NativeMethodsMixin, React.ComponentClass { +} + +export interface DrawerSlideEvent extends NativeSyntheticEvent { +} + +/** + * @see DrawerLayoutAndroid.android.js + */ +export interface DrawerLayoutAndroidProperties extends ViewProperties, React.Props { + + /** + * Specifies the background color of the drawer. The default value + * is white. If you want to set the opacity of the drawer, use rgba. + * Example: + * return ( + * + * + *); + */ + drawerBackgroundColor?: string; + + /** + * Specifies the lock mode of the drawer. The drawer can be locked + * in 3 states: + * + * - unlocked (default), meaning that the drawer will respond + * (open/close) to touch gestures. + * + * - locked-closed, meaning that the drawer will stay closed and not + * respond to gestures. + * + * - locked-open, meaning that the drawer will stay opened and + * not respond to gestures. The drawer may still be opened and + * closed programmatically (openDrawer/closeDrawer). + */ + drawerLockMode?: "unlocked" | "locked-closed" | "locked-open"; + + /** + * Specifies the side of the screen from which the drawer will slide in. + * enum(DrawerLayoutAndroid.positions.Left, DrawerLayoutAndroid.positions.Right) + */ + drawerPosition?: number; + + /** + * Specifies the width of the drawer, more precisely the width of the + * view that be pulled in from the edge of the window. + */ + drawerWidth?: number; + + /** + * Determines whether the keyboard gets dismissed in response to a drag. + * - 'none' (the default), drags do not dismiss the keyboard. + * - 'on-drag', the keyboard is dismissed when a drag begins. + */ + keyboardDismissMode?: "none" | "on-drag" + + /** + * Function called whenever the navigation view has been closed. + */ + onDrawerClose?: () => void + + /** + * Function called whenever the navigation view has been opened. + */ + onDrawerOpen?: () => void + + /** + * Function called whenever there is an interaction with the navigation view. + * @param event + */ + onDrawerSlide?: (event: DrawerSlideEvent) => void + + /** + * Function called when the drawer state has changed. + * The drawer can be in 3 states: + * - idle, meaning there is no interaction with the navigation + * view happening at the time + * - dragging, meaning there is currently an interaction with the + * navigation view + * - settling, meaning that there was an interaction with the + * navigation view, and the navigation view is now finishing + * it's closing or opening animation + * @param event + */ + onDrawerStateChanged?: (event: "Idle" | "Dragging" | "Settling") => void + + /** + * The navigation view that will be rendered to the side of the + * screen and can be pulled in. + */ + renderNavigationView: () => JSX.Element + + /** + * Make the drawer take the entire screen and draw the background of + * the status bar to allow it to open over the status bar. It will + * only have an effect on API 21+. + */ + statusBarBackgroundColor?: string + + ref?: React.Ref +} + +interface DrawerPosition { + Left: number + Right: number +} + +export interface DrawerLayoutAndroidStatic extends NativeMethodsMixin, React.ClassicComponentClass { + + /** + * drawer's positions. + */ + positions: DrawerPosition + + /** + * Opens the drawer. + */ + openDrawer(): void + + /** + * Closes the drawer. + */ + closeDrawer(): void +} + +/** + * @see PickerIOS.ios.js + */ +export interface PickerIOSItemProperties extends React.Props { + value?: string | number + label?: string +} + +/** + * @see PickerIOS.ios.js + */ +export interface PickerIOSItemStatic extends React.ComponentClass { +} + +/** + * @see Picker.js + */ +export interface PickerItemProperties extends React.Props { + label: string + value?: any +} + +export interface PickerItemStatic extends React.ComponentClass { +} + +export interface PickerPropertiesIOS extends ViewProperties, React.Props { + + /** + * Style to apply to each of the item labels. + * @platform ios + */ + itemStyle?: ViewStyle, + + ref?: React.Ref +} + +export interface PickerPropertiesAndroid extends ViewProperties, React.Props { + + /** + * If set to false, the picker will be disabled, i.e. the user will not be able to make a + * selection. + * @platform android + */ + enabled?: boolean + + /** + * On Android, specifies how to display the selection items when the user taps on the picker: + * + * - 'dialog': Show a modal dialog. This is the default. + * - 'dropdown': Shows a dropdown anchored to the picker view + * + * @platform android + */ + mode?: "dialog" | "dropdown" + + /** + * Prompt string for this picker, used on Android in dialog mode as the title of the dialog. + * @platform android + */ + prompt?: string + + ref?: React.Ref +} + +/** + * @see https://facebook.github.io/react-native/docs/picker.html + * @see Picker.js + */ +export interface PickerProperties extends PickerPropertiesIOS, PickerPropertiesAndroid, React.Props { + + /** + * Callback for when an item is selected. This is called with the + * following parameters: + * - itemValue: the value prop of the item that was selected + * - itemPosition: the index of the selected item in this picker + * @param itemValue + * @param itemPosition + */ + onValueChange?: (itemValue: any, itemPosition: number) => void + + /** + * Value matching value of one of the items. + * Can be a string or an integer. + */ + selectedValue?: any + + style?: ViewStyle + + /** + * Used to locate this view in end-to-end tests. + */ + testId?: string + + ref?: React.Ref +} + +/** + * @see https://facebook.github.io/react-native/docs/picker.html + * @see Picker.js + */ +export interface PickerStatic extends React.ComponentClass { + + /** + * On Android, display the options in a dialog. + */ + MODE_DIALOG: string + /** + * On Android, display the options in a dropdown (this is the default). + */ + MODE_DROPDOWN: string + + Item?: PickerItemStatic +} + +/** + * @see https://facebook.github.io/react-native/docs/pickerios.html + * @see PickerIOS.ios.js + */ +export interface PickerIOSProperties extends ViewProperties, React.Props { + + itemStyle?: TextStyle + onValueChange?: ( value: string | number ) => void + selectedValue?: string | number + + ref?: React.Ref +} + +/** + * @see https://facebook.github.io/react-native/docs/pickerios.html + * @see PickerIOS.ios.js + */ +export interface PickerIOSStatic extends NativeMethodsMixin, React.ClassicComponentClass { + + Item: PickerIOSItemStatic +} + +/** + * @see https://facebook.github.io/react-native/docs/progressbarandroid.html + * @see ProgressBarAndroid.android.js + */ +export interface ProgressBarAndroidProperties extends ViewProperties, React.Props { + + /** + * Style of the ProgressBar. One of: + Horizontal + Normal (default) + Small + Large + Inverse + SmallInverse + LargeInverse + */ + styleAttr?: "Horizontal" | "Normal" | "Small" | "Large" | "Inverse" | "SmallInverse" | "LargeInverse" + + /** + * If the progress bar will show indeterminate progress. + * Note that this can only be false if styleAttr is Horizontal. + */ + indeterminate?: boolean + + /** + * The progress value (between 0 and 1). + */ + progress?: number + + /** + * Color of the progress bar. + */ + color?: string + + /** + * Used to locate this view in end-to-end tests. + */ + testID?: string + + ref?: React.Ref +} +/** + * React component that wraps the Android-only `ProgressBar`. This component is used to indicate + * that the app is loading or there is some activity in the app. +*/ +export interface ProgressBarAndroidStatic extends NativeMethodsMixin, React.ClassicComponentClass { +} + +/** + * @see https://facebook.github.io/react-native/docs/progressviewios.html + * @see ProgressViewIOS.ios.js + */ +export interface ProgressViewIOSProperties extends ViewProperties, React.Props { + + /** + * The progress bar style. + */ + progressViewStyle?: "default" | "bar" + + /** + * The progress value (between 0 and 1). + */ + progress?: number + + /** + * The tint color of the progress bar itself. + */ + progressTintColor?: string + + /** + * The tint color of the progress bar track. + */ + trackTintColor?: string + + /** + * A stretchable image to display as the progress bar. + */ + progressImage?: ImageURISource | ImageURISource[] + + /** + * A stretchable image to display behind the progress bar. + */ + trackImage?: ImageURISource | ImageURISource[] + + ref?: React.Ref +} +export interface ProgressViewIOSStatic extends NativeMethodsMixin, React.ClassicComponentClass { +} + +export interface RefreshControlPropertiesIOS extends ViewProperties, React.Props { + + /** + * The color of the refresh indicator. + */ + tintColor?: string + + /** + * The title displayed under the refresh indicator. + */ + title?: string + + /** + * Title color. + */ + titleColor?: string + + ref?: React.Ref +} + +export interface RefreshControlPropertiesAndroid extends ViewProperties, React.Props { + + /** + * The colors (at least one) that will be used to draw the refresh indicator. + */ + colors?: string[] + + /** + * Whether the pull to refresh functionality is enabled. + */ + enabled?: boolean + + /** + * The background color of the refresh indicator. + */ + progressBackgroundColor?: string + + /** + * Size of the refresh indicator, see RefreshControl.SIZE. + */ + size?: number + + /** + * Progress view top offset + * @platform android + */ + progressViewOffset?: number + + ref?: React.Ref +} + +export interface RefreshControlProperties extends RefreshControlPropertiesIOS, RefreshControlPropertiesAndroid, React.Props { + + /** + * Called when the view starts refreshing. + */ + onRefresh?: () => void + + /** + * Whether the view should be indicating an active refresh. + */ + refreshing: boolean + + ref?: React.Ref +} + +/** + * This component is used inside a ScrollView or ListView to add pull to refresh + * functionality. When the ScrollView is at `scrollY: 0`, swiping down + * triggers an `onRefresh` event. + * + * __Note:__ `refreshing` is a controlled prop, this is why it needs to be set to true + * in the `onRefresh` function otherwise the refresh indicator will stop immediately. + */ +export interface RefreshControlStatic extends NativeMethodsMixin, React.ClassicComponentClass { + SIZE: Object // Undocumented +} + +export interface RecyclerViewBackedScrollViewProperties extends ScrollViewProperties, React.Props { + ref?: React.Ref +} + +/** + * Wrapper around android native recycler view. + * + * It simply renders rows passed as children in a separate recycler view cells + * similarly to how `ScrollView` is doing it. Thanks to the fact that it uses + * native `RecyclerView` though, rows that are out of sight are going to be + * automatically detached (similarly on how this would work with + * `removeClippedSubviews = true` on a `ScrollView.js`). + * + * CAUTION: This is an experimental component and should only be used together + * with javascript implementation of list view (see ListView.js). In order to + * use it pass this component as `renderScrollComponent` to the list view. For + * now only horizontal scrolling is supported. + */ +export interface RecyclerViewBackedScrollViewStatic extends ScrollResponderMixin, React.ClassicComponentClass { + + /** + * A helper function to scroll to a specific point in the scrollview. + * This is currently used to help focus on child textviews, but can also + * be used to quickly scroll to any element we want to focus. Syntax: + * + * scrollResponderScrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true}) + * + * Note: The weird argument signature is due to the fact that, for historical reasons, + * the function also accepts separate arguments as as alternative to the options object. + * This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED. + */ + scrollTo( + y?: number | { x?: number, y?: number, animated?: boolean }, + x?: number, + animated?: boolean + ): void; + + /** + * Returns a reference to the underlying scroll responder, which supports + * operations like `scrollTo`. All ScrollView-like components should + * implement this method so that they can be composed while providing access + * to the underlying scroll responder's methods. + */ + getScrollResponder(): JSX.Element; +} + +export interface SliderPropertiesIOS extends ViewProperties, React.Props { + + /** + * Assigns a maximum track image. Only static images are supported. + * The leftmost pixel of the image will be stretched to fill the track. + */ + maximumTrackImage?: ImageURISource + + /** + * The color used for the track to the right of the button. + * Overrides the default blue gradient image. + */ + maximumTrackTintColor?: string + + /** + * Assigns a minimum track image. Only static images are supported. + * The rightmost pixel of the image will be stretched to fill the track. + */ + minimumTrackImage?: ImageURISource + + /** + * The color used for the track to the left of the button. + * Overrides the default blue gradient image. + */ + minimumTrackTintColor?: string + + /** + * Sets an image for the thumb. Only static images are supported. + */ + thumbImage?: ImageURISource + + /** + * Assigns a single image for the track. Only static images + * are supported. The center pixel of the image will be stretched + * to fill the track. + */ + trackImage?: ImageURISource + + ref?: React.Ref +} + +export interface SliderProperties extends SliderPropertiesIOS, React.Props { + + /** + * If true the user won't be able to move the slider. + * Default value is false. + */ + disabled?: boolean + + /** + * Initial maximum value of the slider. Default value is 1. + */ + maximumValue?: number + + /** + * Initial minimum value of the slider. Default value is 0. + */ + minimumValue?: number + + /** + * Callback called when the user finishes changing the value (e.g. when the slider is released). + * @param value + */ + onSlidingComplete?: (value: number) => void + + /** + * Callback continuously called while the user is dragging the slider. + * @param value + */ + onValueChange?: (value: number) => void + + /** + * Step value of the slider. The value should be between 0 and (maximumValue - minimumValue). Default value is 0. + */ + step?: number + + /** + * Used to style and layout the Slider. See StyleSheet.js and ViewStylePropTypes.js for more info. + */ + style?: ViewStyle + + /** + * Used to locate this view in UI automation tests. + */ + testID?: string + + /** + * Initial value of the slider. The value should be between minimumValue + * and maximumValue, which default to 0 and 1 respectively. + * Default value is 0. + * This is not a controlled component, you don't need to update + * the value during dragging. + */ + value?: number +} + +/** + * A component used to select a single value from a range of values. + */ +export interface SliderStatic extends NativeMethodsMixin, React.ClassicComponentClass { + +} + +/** + * https://facebook.github.io/react-native/docs/switchios.html#props + */ +export interface SwitchIOSProperties extends ViewProperties, React.Props { + + /** + * If true the user won't be able to toggle the switch. Default value is false. + */ + disabled?: boolean + + /** + * Background color when the switch is turned on. + */ + onTintColor?: string + + /** + * Callback that is called when the user toggles the switch. + */ + onValueChange?: (value: boolean) => void + + /** + * Background color for the switch round button. + */ + thumbTintColor?: string + + /** + * Background color when the switch is turned off. + */ + tintColor?: string + + /** + * The value of the switch, if true the switch will be turned on. Default value is false. + */ + value?: boolean + + ref?: React.Ref +} + +/** + * + * Use SwitchIOS to render a boolean input on iOS. + * + * This is a controlled component, so you must hook in to the onValueChange callback and update the value prop in order for the component to update, + * otherwise the user's change will be reverted immediately to reflect props.value as the source of truth. + * + * @see https://facebook.github.io/react-native/docs/switchios.html + */ +export interface SwitchIOSStatic extends React.ComponentClass { + +} + +export type ImageResizeMode = "contain" | "cover" | "stretch" | "center" | "repeat" + +/** + * @see ImageResizeMode.js + */ +export interface ImageResizeModeStatic { + /** + * contain - The image will be resized such that it will be completely + * visible, contained within the frame of the View. + */ + contain: ImageResizeMode + /** + * cover - The image will be resized such that the entire area of the view + * is covered by the image, potentially clipping parts of the image. + */ + cover: ImageResizeMode + /** + * stretch - The image will be stretched to fill the entire frame of the + * view without clipping. This may change the aspect ratio of the image, + * distoring it. Only supported on iOS. + */ + stretch: ImageResizeMode + /** + * center - The image will be scaled down such that it is completely visible, + * if bigger than the area of the view. + * The image will not be scaled up. + */ + center: ImageResizeMode, + + /** + * repeat - The image will be repeated to cover the frame of the View. The + * image will keep it's size and aspect ratio. + */ + repeat: ImageResizeMode, +} + +export interface ShadowStyleIOS { + shadowColor?: string + shadowOffset?: {width: number, height: number} + shadowOpacity?: number + shadowRadius?: number +} + +/** + * Image style + * @see https://facebook.github.io/react-native/docs/image.html#style + */ +export interface ImageStyle extends FlexStyle, TransformsStyle, ShadowStyleIOS { + resizeMode?: ImageResizeMode + backfaceVisibility?: "visible" | "hidden" + borderBottomLeftRadius?: number + borderBottomRightRadius?: number + backgroundColor?: string + borderColor?: string + borderWidth?: number + borderRadius?: number + borderTopLeftRadius?: number + borderTopRightRadius?: number + overflow?: "visible" | "hidden" + overlayColor?: string + tintColor?: string + opacity?: number +} + +/* + * @see https://github.com/facebook/react-native/blob/master/Libraries/Image/ImageSourcePropType.js + */ +interface ImageURISource { + /** + * `uri` is a string representing the resource identifier for the image, which + * could be an http address, a local file path, or the name of a static image + * resource (which should be wrapped in the `require('./path/to/image.png')` + * function). + */ + uri?: string, + /** + * `bundle` is the iOS asset bundle which the image is included in. This + * will default to [NSBundle mainBundle] if not set. + * @platform ios + */ + bundle?: string, + /** + * `method` is the HTTP Method to use. Defaults to GET if not specified. + */ + method?: string, + /** + * `headers` is an object representing the HTTP headers to send along with the + * request for a remote image. + */ + headers?: {[key: string]: string}, + /** + * `cache` determines how the requests handles potentially cached + * responses. + * + * - `default`: Use the native platforms default strategy. `useProtocolCachePolicy` on iOS. + * + * - `reload`: The data for the URL will be loaded from the originating source. + * No existing cache data should be used to satisfy a URL load request. + * + * - `force-cache`: The existing cached data will be used to satisfy the request, + * regardless of its age or expiration date. If there is no existing data in the cache + * corresponding the request, the data is loaded from the originating source. + * + * - `only-if-cached`: The existing cache data will be used to satisfy a request, regardless of + * its age or expiration date. If there is no existing data in the cache corresponding + * to a URL load request, no attempt is made to load the data from the originating source, + * and the load is considered to have failed. + * + * @platform ios + */ + cache?: 'default' | 'reload' | 'force-cache' | 'only-if-cached', + /** + * `body` is the HTTP body to send with the request. This must be a valid + * UTF-8 string, and will be sent exactly as specified, with no + * additional encoding (e.g. URL-escaping or base64) applied. + */ + body?: string, + /** + * `width` and `height` can be specified if known at build time, in which case + * these will be used to set the default `` component dimensions. + */ + width?: number, + height?: number, + /** + * `scale` is used to indicate the scale factor of the image. Defaults to 1.0 if + * unspecified, meaning that one image pixel equates to one display point / DIP. + */ + scale?: number, +} + +export interface ImagePropertiesIOS { + /** + * The text that's read by the screen reader when the user interacts with the image. + */ + accessibilityLabel?: string; + + /** + * When true, indicates the image is an accessibility element. + */ + accessible?: boolean; + + /** + * blurRadius: the blur radius of the blur filter added to the image + * @platform ios + */ + blurRadius?: number, + + /** + * When the image is resized, the corners of the size specified by capInsets will stay a fixed size, + * but the center content and borders of the image will be stretched. + * This is useful for creating resizable rounded buttons, shadows, and other resizable assets. + * More info on Apple documentation + */ + capInsets?: Insets + + /** + * A static image to display while downloading the final image off the network. + */ + defaultSource?: ImageURISource | number + + /** + * Invoked on download progress with {nativeEvent: {loaded, total}} + */ + onProgress?: (event: { nativeEvent: { loaded: number, total: number }}) => void + + /** + * Invoked when a partial load of the image is complete. The definition of + * what constitutes a "partial load" is loader specific though this is meant + * for progressive JPEG loads. + * @platform ios + */ + onPartialLoad?: () => void, +} + +interface ImagePropertiesAndroid { + /** + * The mechanism that should be used to resize the image when the image's dimensions + * differ from the image view's dimensions. Defaults to auto. + * + * 'auto': Use heuristics to pick between resize and scale. + * + * 'resize': A software operation which changes the encoded image in memory before it gets decoded. + * This should be used instead of scale when the image is much larger than the view. + * + * 'scale': The image gets drawn downscaled or upscaled. Compared to resize, scale is faster (usually hardware accelerated) + * and produces higher quality images. This should be used if the image is smaller than the view. + * It should also be used if the image is slightly bigger than the view. + */ + resizeMethod?: 'auto' | 'resize' | 'scale' +} + +/** + * @see https://facebook.github.io/react-native/docs/image.html + */ +export interface ImageProperties extends ImagePropertiesIOS, ImagePropertiesAndroid, React.Props { + /** + * onLayout function + * + * Invoked on mount and layout changes with + * + * {nativeEvent: { layout: {x, y, width, height}}}. + */ + onLayout?: (event: LayoutChangeEvent) => void; + + /** + * Invoked on load error with {nativeEvent: {error}} + */ + onError?: (error: { nativeEvent: any }) => void + + /** + * Invoked when load completes successfully + */ + onLoad?: () => void + + /** + * Invoked when load either succeeds or fails + */ + onLoadEnd?: () => void + + /** + * Invoked on load start + */ + onLoadStart?: () => void + + progressiveRenderingEnabled?: boolean + + /** + * Determines how to resize the image when the frame doesn't match the raw + * image dimensions. + * + * 'cover': Scale the image uniformly (maintain the image's aspect ratio) + * so that both dimensions (width and height) of the image will be equal + * to or larger than the corresponding dimension of the view (minus padding). + * + * 'contain': Scale the image uniformly (maintain the image's aspect ratio) + * so that both dimensions (width and height) of the image will be equal to + * or less than the corresponding dimension of the view (minus padding). + * + * 'stretch': Scale width and height independently, This may change the + * aspect ratio of the src. + * + * 'repeat': Repeat the image to cover the frame of the view. + * The image will keep it's size and aspect ratio. (iOS only) + * + * 'center': Scale the image down so that it is completely visible, + * if bigger than the area of the view. + * The image will not be scaled up. + */ + resizeMode?: 'cover' | 'contain' | 'stretch' | 'repeat' | 'center' + + /** + * The mechanism that should be used to resize the image when the image's dimensions + * differ from the image view's dimensions. Defaults to `auto`. + * + * - `auto`: Use heuristics to pick between `resize` and `scale`. + * + * - `resize`: A software operation which changes the encoded image in memory before it + * gets decoded. This should be used instead of `scale` when the image is much larger + * than the view. + * + * - `scale`: The image gets drawn downscaled or upscaled. Compared to `resize`, `scale` is + * faster (usually hardware accelerated) and produces higher quality images. This + * should be used if the image is smaller than the view. It should also be used if the + * image is slightly bigger than the view. + * + * More details about `resize` and `scale` can be found at http://frescolib.org/docs/resizing-rotating.html. + * + * @platform android + */ + resizeMethod?: 'auto' | 'resize' | 'scale' + + /** + * `uri` is a string representing the resource identifier for the image, which + * could be an http address, a local file path, or a static image + * resource (which should be wrapped in the `require('./path/to/image.png')` function). + * This prop can also contain several remote `uri`, specified together with + * their width and height. The native side will then choose the best `uri` to display + * based on the measured size of the image container. + */ + source: ImageURISource | ImageURISource[] + + /** + * similarly to `source`, this property represents the resource used to render + * the loading indicator for the image, displayed until image is ready to be + * displayed, typically after when it got downloaded from network. + */ + loadingIndicatorSource?: ImageURISource; + + /** + * + * Style + */ + style?: ImageStyle; + + /** + * A unique identifier for this element to be used in UI Automation testing scripts. + */ + testID?: string; + +} + +export interface ImageStatic extends NativeMethodsMixin, React.ComponentClass { + resizeMode: ImageResizeMode + getSize(uri: string, success: (width: number, height: number) => void, failure: (error: any) => void): any + prefetch(url: string): any + abortPrefetch?(requestId: number): void + queryCache?(urls: string[]): Promise> +} + +/** + * @see https://facebook.github.io/react-native/docs/listview.html#props + */ +export interface ListViewProperties extends ScrollViewProperties, React.Props { + + /** + * An instance of [ListView.DataSource](docs/listviewdatasource.html) to use + */ + dataSource: ListViewDataSource + + /** + * Flag indicating whether empty section headers should be rendered. + * In the future release empty section headers will be rendered by + * default, and the flag will be deprecated. If empty sections are not + * desired to be rendered their indices should be excluded from + * sectionID object. + */ + enableEmptySections?: boolean + + /** + * How many rows to render on initial component mount. Use this to make + * it so that the first screen worth of data apears at one time instead of + * over the course of multiple frames. + */ + initialListSize?: number + + /** + * (visibleRows, changedRows) => void + * + * Called when the set of visible rows changes. `visibleRows` maps + * { sectionID: { rowID: true }} for all the visible rows, and + * `changedRows` maps { sectionID: { rowID: true | false }} for the rows + * that have changed their visibility, with true indicating visible, and + * false indicating the view has moved out of view. + */ + onChangeVisibleRows?: (visibleRows: Array<{ [sectionId: string]: { [rowID: string]: boolean } }>, changedRows: Array<{ [sectionId: string]: { [rowID: string]: boolean } }>) => void + + /** + * Called when all rows have been rendered and the list has been scrolled + * to within onEndReachedThreshold of the bottom. The native scroll + * event is provided. + */ + onEndReached?: () => void + + /** + * Threshold in pixels for onEndReached. + */ + onEndReachedThreshold?: number + + /** + * Number of rows to render per event loop. + */ + pageSize?: number + + /** + * A performance optimization for improving scroll perf of + * large lists, used in conjunction with overflow: 'hidden' on the row + * containers. Use at your own risk. + */ + removeClippedSubviews?: boolean + + /** + * () => renderable + * + * The header and footer are always rendered (if these props are provided) + * on every render pass. If they are expensive to re-render, wrap them + * in StaticContainer or other mechanism as appropriate. Footer is always + * at the bottom of the list, and header at the top, on every render pass. + */ + renderFooter?: () => React.ReactElement + + /** + * () => renderable + * + * The header and footer are always rendered (if these props are provided) + * on every render pass. If they are expensive to re-render, wrap them + * in StaticContainer or other mechanism as appropriate. Footer is always + * at the bottom of the list, and header at the top, on every render pass. + */ + renderHeader?: () => React.ReactElement + + /** + * (rowData, sectionID, rowID) => renderable + * Takes a data entry from the data source and its ids and should return + * a renderable component to be rendered as the row. By default the data + * is exactly what was put into the data source, but it's also possible to + * provide custom extractors. + */ + renderRow: ( rowData: any, sectionID: string | number, rowID: string | number, highlightRow?: boolean ) => React.ReactElement + + + /** + * A function that returns the scrollable component in which the list rows are rendered. + * Defaults to returning a ScrollView with the given props. + */ + renderScrollComponent?: (props: ScrollViewProperties) => React.ReactElement + + /** + * (sectionData, sectionID) => renderable + * + * If provided, a sticky header is rendered for this section. The sticky + * behavior means that it will scroll with the content at the top of the + * section until it reaches the top of the screen, at which point it will + * stick to the top until it is pushed off the screen by the next section + * header. + */ + renderSectionHeader?: (sectionData: any, sectionId: string | number) => React.ReactElement + + + /** + * (sectionID, rowID, adjacentRowHighlighted) => renderable + * If provided, a renderable component to be rendered as the separator below each row + * but not the last row if there is a section header below. + * Take a sectionID and rowID of the row above and whether its adjacent row is highlighted. + */ + renderSeparator?: (sectionID: string | number, rowID: string | number, adjacentRowHighlighted?: boolean) => React.ReactElement + + /** + * How early to start rendering rows before they come on screen, in + * pixels. + */ + scrollRenderAheadDistance?: number + + /** + * An array of child indices determining which children get docked to the + * top of the screen when scrolling. For example, passing + * `stickyHeaderIndices={[0]}` will cause the first child to be fixed to the + * top of the scroll view. This property is not supported in conjunction + * with `horizontal={true}`. + * @platform ios + */ + stickyHeaderIndices?: number[] + + ref?: React.Ref +} + + +interface TimerMixin { + setTimeout: typeof setTimeout, + clearTimeout: typeof clearTimeout, + setInterval: typeof setInterval, + clearInterval: typeof clearInterval, + setImmediate: typeof setImmediate, + clearImmediate: typeof clearImmediate, + requestAnimationFrame: typeof requestAnimationFrame, + cancelAnimationFrame: typeof cancelAnimationFrame, +} + +export interface ListViewStatic extends ScrollResponderMixin, TimerMixin, React.ComponentClass { + DataSource: ListViewDataSource; + + /** + * Exports some data, e.g. for perf investigations or analytics. + */ + getMetrics: () => { + contentLength: number, + totalRows: number, + renderedRows: number, + visibleRows: number, + } + + /** + * Provides a handle to the underlying scroll responder. + */ + getScrollResponder: () => any, + + /** + * Scrolls to a given x, y offset, either immediately or with a smooth animation. + * + * See `ScrollView#scrollTo`. + */ + scrollTo: ( y?: number | { x?: number, y?: number, animated?: boolean } , x?: number, animated?: boolean ) => void, +} + + +export interface MapViewAnnotation { + latitude: number + longitude: number + animateDrop?: boolean + draggable?: boolean + onDragStateChange?: () => any, + onFocus?: () => any, + onBlur?: () => any, + title?: string + subtitle?: string + leftCalloutView?: React.ReactElement + rightCalloutView?: React.ReactElement + detailCalloutView?: React.ReactElement + tintColor?: string + image?: ImageURISource + view?: React.ReactElement + hasLeftCallout?: boolean + hasRightCallout?: boolean + onLeftCalloutPress?: () => void + onRightCalloutPress?: () => void + id?: string +} + +export interface MapViewRegion { + latitude: number + longitude: number + latitudeDelta?: number + longitudeDelta?: number +} + +export interface MapViewOverlay { + coordinates: ({ latitude: number, longitude: number })[] + lineWidth?: number + strokeColor?: string + fillColor?: string + id?: string +} + +export interface MapViewProperties extends ViewProperties, React.Props { + + /** + * If false points of interest won't be displayed on the map. + * Default value is true. + */ + showsPointsOfInterest?: boolean + + /** + * Map annotations with title/subtitle. + */ + annotations?: MapViewAnnotation[] + + /** + * If true the map will follow the user's location whenever it changes. + * Note that this has no effect unless showsUserLocation is enabled. + * Default value is true. + */ + followUserLocation?: boolean + + /** + * Insets for the map's legal label, originally at bottom left of the map. See EdgeInsetsPropType.js for more information. + */ + legalLabelInsets?: Insets + + /** + * The map type to be displayed. + * standard: standard road map (default) + * satellite: satellite view + * hybrid: satellite view with roads and points of interest overlayed + * + * enum('standard', 'satellite', 'hybrid') + */ + mapType?: 'standard' |'satellite' |'hybrid' + + /** + * Maximum size of area that can be displayed. + */ + maxDelta?: number + + /** + * Minimum size of area that can be displayed. + */ + minDelta?: number + + /** + * Map overlays + */ + overlays?: MapViewOverlay[] + + /** + * If false compass won't be displayed on the map. + * Default value is true. + */ + showsCompass?: boolean + + /** + * Callback that is called once, when the user taps an annotation. + */ + onAnnotationPress?: () => void + + /** + * Callback that is called continuously when the user is dragging the map. + */ + onRegionChange?: (region: MapViewRegion) => void + + /** + * Callback that is called once, when the user is done moving the map. + */ + onRegionChangeComplete?: (region: MapViewRegion) => void + + /** + * When this property is set to true and a valid camera is associated with the map, + * the camera’s pitch angle is used to tilt the plane of the map. + * + * When this property is set to false, the camera’s pitch angle is ignored and + * the map is always displayed as if the user is looking straight down onto it. + */ + pitchEnabled?: boolean + + /** + * The region to be displayed by the map. + * The region is defined by the center coordinates and the span of coordinates to display. + */ + region?: MapViewRegion + + /** + * When this property is set to true and a valid camera is associated with the map, + * the camera’s heading angle is used to rotate the plane of the map around its center point. + * + * When this property is set to false, the camera’s heading angle is ignored and the map is always oriented + * so that true north is situated at the top of the map view + */ + rotateEnabled?: boolean + + /** + * If false the user won't be able to change the map region being displayed. + * Default value is true. + */ + scrollEnabled?: boolean + + /** + * If true the app will ask for the user's location and focus on it. + * Default value is false. + * + * NOTE: You need to add NSLocationWhenInUseUsageDescription key in Info.plist to enable geolocation, + * otherwise it is going to fail silently! + */ + showsUserLocation?: boolean + + /** + * Used to style and layout the MapView. + * See StyleSheet.js and ViewStylePropTypes.js for more info. + */ + style?: ViewStyle + + /** + * If false the user won't be able to pinch/zoom the map. + * Default value is true. + */ + zoomEnabled?: boolean + + ref?: React.Ref +} + +/** + * @see https://facebook.github.io/react-native/docs/mapview.html#content + */ +export interface MapViewStatic extends NativeMethodsMixin, React.ComponentClass { + PinColors: { + RED: string, + GREEN: string, + PURPLE: string + } +} + +export interface ModalProperties extends React.Props { + + // Only `animated` is documented. The JS code says `animated` is + // deprecated and `animationType` is preferred. + animated?: boolean + /** + * The `animationType` prop controls how the modal animates. + * + * - `slide` slides in from the bottom + * - `fade` fades into view + * - `none` appears without an animation + */ + animationType?: "none" | "slide" | "fade" + /** + * The `transparent` prop determines whether your modal will fill the entire view. + * Setting this to `true` will render the modal over a transparent background. + */ + transparent?: boolean + /** + * The `visible` prop determines whether your modal is visible. + */ + visible?: boolean + /** + * The `onRequestClose` prop allows passing a function that will be called once the modal has been dismissed. + * _On the Android platform, this is a required function._ + */ + onRequestClose?: () => void + /** + * The `onShow` prop allows passing a function that will be called once the modal has been shown. + */ + onShow?: (event: NativeSyntheticEvent) => void + /** + * The `supportedOrientations` prop allows the modal to be rotated to any of the specified orientations. + * On iOS, the modal is still restricted by what's specified in your app's Info.plist's UISupportedInterfaceOrientations field. + * @platform ios + */ + supportedOrientations?: ('portrait' | 'portrait-upside-down' | 'landscape' | 'landscape-left' | 'landscape-right')[] + /** + * The `onOrientationChange` callback is called when the orientation changes while the modal is being displayed. + * The orientation provided is only 'portrait' or 'landscape'. This callback is also called on initial render, regardless of the current orientation. + * @platform ios + */ + onOrientationChange?: () => void +} + +export interface ModalStatic extends React.ComponentClass { + +} + +/** + * @see https://github.com/facebook/react-native/blob/0.34-stable\Libraries\Components\Touchable\Touchable.js + */ +interface TouchableMixin { + + /** + * Invoked when the item should be highlighted. Mixers should implement this + * to visually distinguish the `VisualRect` so that the user knows that + * releasing a touch will result in a "selection" (analog to click). + */ + touchableHandleActivePressIn(e: Event): void + + /** + * Invoked when the item is "active" (in that it is still eligible to become + * a "select") but the touch has left the `PressRect`. Usually the mixer will + * want to unhighlight the `VisualRect`. If the user (while pressing) moves + * back into the `PressRect` `touchableHandleActivePressIn` will be invoked + * again and the mixer should probably highlight the `VisualRect` again. This + * event will not fire on an `touchEnd/mouseUp` event, only move events while + * the user is depressing the mouse/touch. + */ + touchableHandleActivePressOut(e: Event): void + + /** + * Invoked when the item is "selected" - meaning the interaction ended by + * letting up while the item was either in the state + * `RESPONDER_ACTIVE_PRESS_IN` or `RESPONDER_INACTIVE_PRESS_IN`. + */ + touchableHandlePress(e: Event): void + + /** + * Invoked when the item is long pressed - meaning the interaction ended by + * letting up while the item was in `RESPONDER_ACTIVE_LONG_PRESS_IN`. If + * `touchableHandleLongPress` is *not* provided, `touchableHandlePress` will + * be called as it normally is. If `touchableHandleLongPress` is provided, by + * default any `touchableHandlePress` callback will not be invoked. To + * override this default behavior, override `touchableLongPressCancelsPress` + * to return false. As a result, `touchableHandlePress` will be called when + * lifting up, even if `touchableHandleLongPress` has also been called. + */ + touchableHandleLongPress(e: Event): void + + /** + * Returns the amount to extend the `HitRect` into the `PressRect`. Positive + * numbers mean the size expands outwards. + */ + touchableGetPressRectOffset(): Insets + + /** + * Returns the number of millis to wait before triggering a highlight. + */ + touchableGetHighlightDelayMS(): number + + // These methods are undocumented but still being used by TouchableMixin internals + touchableGetLongPressDelayMS(): number + touchableGetPressOutDelayMS(): number + touchableGetHitSlop(): Insets +} + +export interface TouchableWithoutFeedbackAndroidProperties { + + /** + * Indicates to accessibility services to treat UI component like a native one. + * Works for Android only. + * + * @enum('none', 'button', 'radiobutton_checked', 'radiobutton_unchecked' ) + */ + accessibilityComponentType?: 'none' | 'button' | 'radiobutton_checked' | 'radiobutton_unchecked' +} + +type ViewAccessibilityTraits = + 'none' | + 'button' | + 'link' | + 'header' | + 'search' | + 'image' | + 'selected' | + 'plays' | + 'key' | + 'text' | + 'summary' | + 'disabled' | + 'frequentUpdates' | + 'startsMedia' | + 'adjustable' | + 'allowsDirectInteraction' | + 'pageTurn' + +export interface TouchableWithoutFeedbackIOSProperties { + + /** + * Provides additional traits to screen reader. + * By default no traits are provided unless specified otherwise in element + */ + accessibilityTraits?: ViewAccessibilityTraits | ViewAccessibilityTraits[] + +} + +/** + * @see https://facebook.github.io/react-native/docs/touchablewithoutfeedback.html#props + */ +export interface TouchableWithoutFeedbackProperties extends TouchableWithoutFeedbackAndroidProperties, TouchableWithoutFeedbackIOSProperties { + + + /** + * Called when the touch is released, but not if cancelled (e.g. by a scroll that steals the responder lock). + */ + accessible?: boolean + + /** + * Delay in ms, from onPressIn, before onLongPress is called. + */ + delayLongPress?: number; + + /** + * Delay in ms, from the start of the touch, before onPressIn is called. + */ + delayPressIn?: number; + + /** + * Delay in ms, from the release of the touch, before onPressOut is called. + */ + delayPressOut?: number; + + /** + * If true, disable all interactions for this component. + */ + disabled?: boolean + + /** + * This defines how far your touch can start away from the button. + * This is added to pressRetentionOffset when moving off of the button. + * NOTE The touch area never extends past the parent view bounds and + * the Z-index of sibling views always takes precedence if a touch hits + * two overlapping views. + */ + hitSlop?: Insets + + /** + * Invoked on mount and layout changes with + * {nativeEvent: {layout: {x, y, width, height}}} + */ + onLayout?: (event: LayoutChangeEvent) => void + + onLongPress?: () => void; + + /** + * Called when the touch is released, + * but not if cancelled (e.g. by a scroll that steals the responder lock). + */ + onPress?: () => void; + + onPressIn?: () => void; + + onPressOut?: () => void; + + /** + * //FIXME: not in doc but available in examples + */ + style?: ViewStyle + + /** + * When the scroll view is disabled, this defines how far your + * touch may move off of the button, before deactivating the button. + * Once deactivated, try moving it back and you'll see that the button + * is once again reactivated! Move it back and forth several times + * while the scroll view is disabled. Ensure you pass in a constant + * to reduce memory allocations. + */ + pressRetentionOffset?: Insets +} + + +export interface TouchableWithoutFeedbackProps extends TouchableWithoutFeedbackProperties, React.Props { + +} + +/** + * Do not use unless you have a very good reason. + * All the elements that respond to press should have a visual feedback when touched. + * This is one of the primary reason a "web" app doesn't feel "native". + * + * @see https://facebook.github.io/react-native/docs/touchablewithoutfeedback.html + */ +export interface TouchableWithoutFeedbackStatic extends TimerMixin, TouchableMixin, React.ClassicComponentClass { + +} + +/** + * @see https://facebook.github.io/react-native/docs/touchablehighlight.html#props + */ +export interface TouchableHighlightProperties extends TouchableWithoutFeedbackProperties, React.Props { + + /** + * Determines what the opacity of the wrapped view should be when touch is active. + */ + activeOpacity?: number + + /** + * + * Called immediately after the underlay is hidden + */ + onHideUnderlay?: () => void + + /** + * Called immediately after the underlay is shown + */ + onShowUnderlay?: () => void + + /** + * @see https://facebook.github.io/react-native/docs/view.html#style + */ + style?: ViewStyle + + + /** + * The color of the underlay that will show through when the touch is active. + */ + underlayColor?: string +} + +/** + * A wrapper for making views respond properly to touches. + * On press down, the opacity of the wrapped view is decreased, + * which allows the underlay color to show through, darkening or tinting the view. + * The underlay comes from adding a view to the view hierarchy, + * which can sometimes cause unwanted visual artifacts if not used correctly, + * for example if the backgroundColor of the wrapped view isn't explicitly set to an opaque color. + * + * NOTE: TouchableHighlight supports only one child + * If you wish to have several child components, wrap them in a View. + * + * @see https://facebook.github.io/react-native/docs/touchablehighlight.html + */ +export interface TouchableHighlightStatic extends NativeMethodsMixin, TimerMixin, TouchableMixin, React.ClassicComponentClass { +} + + +/** + * @see https://facebook.github.io/react-native/docs/touchableopacity.html#props + */ +export interface TouchableOpacityProperties extends TouchableWithoutFeedbackProperties, React.Props { + /** + * Determines what the opacity of the wrapped view should be when touch is active. + * Defaults to 0.2 + */ + activeOpacity?: number +} + +/** + * A wrapper for making views respond properly to touches. + * On press down, the opacity of the wrapped view is decreased, dimming it. + * This is done without actually changing the view hierarchy, + * and in general is easy to add to an app without weird side-effects. + * + * @see https://facebook.github.io/react-native/docs/touchableopacity.html + */ +export interface TouchableOpacityStatic extends TimerMixin, TouchableMixin, NativeMethodsMixin, React.ClassicComponentClass { + /** + * Animate the touchable to a new opacity. + */ + setOpacityTo: (value: number) => void +} + +interface BaseBackgroundPropType { + type: string +} + +interface RippleBackgroundPropType extends BaseBackgroundPropType { + type: 'RippleAndroid' + color?: number, + borderless?: boolean +} + +interface ThemeAttributeBackgroundPropType extends BaseBackgroundPropType { + type: 'ThemeAttrAndroid' + attribute: string +} + +type BackgroundPropType = RippleBackgroundPropType | ThemeAttributeBackgroundPropType + +/** + * @see https://facebook.github.io/react-native/docs/touchableopacity.html#props + */ +export interface TouchableNativeFeedbackProperties extends TouchableWithoutFeedbackProperties, React.Props { + /** + * Determines the type of background drawable that's going to be used to display feedback. + * It takes an object with type property and extra data depending on the type. + * It's recommended to use one of the following static methods to generate that dictionary: + * 1) TouchableNativeFeedback.SelectableBackground() - will create object that represents android theme's + * default background for selectable elements (?android:attr/selectableItemBackground) + * 2) TouchableNativeFeedback.SelectableBackgroundBorderless() - will create object that represent android + * theme's default background for borderless selectable elements + * (?android:attr/selectableItemBackgroundBorderless). Available on android API level 21+ + * 3) TouchableNativeFeedback.Ripple(color, borderless) - will create object that represents ripple drawable + * with specified color (as a string). If property borderless evaluates to true the ripple will render + * outside of the view bounds (see native actionbar buttons as an example of that behavior). This background + * type is available on Android API level 21+ + */ + background?: BackgroundPropType +} + +/** + * A wrapper for making views respond properly to touches (Android only). + * On Android this component uses native state drawable to display touch feedback. + * At the moment it only supports having a single View instance as a child node, + * as it's implemented by replacing that View with another instance of RCTView node with some additional properties set. + * + * Background drawable of native feedback touchable can be customized with background property. + * + * @see https://facebook.github.io/react-native/docs/touchablenativefeedback.html#content + */ +export interface TouchableNativeFeedbackStatic extends TouchableMixin, React.ClassicComponentClass { + + /** + * Creates an object that represents android theme's default background for + * selectable elements (?android:attr/selectableItemBackground). + */ + SelectableBackground(): ThemeAttributeBackgroundPropType + + /** + * Creates an object that represent android theme's default background for borderless + * selectable elements (?android:attr/selectableItemBackgroundBorderless). + * Available on android API level 21+. + */ + SelectableBackgroundBorderless(): ThemeAttributeBackgroundPropType + + /** + * Creates an object that represents ripple drawable with specified color (as a + * string). If property `borderless` evaluates to true the ripple will + * render outside of the view bounds (see native actionbar buttons as an + * example of that behavior). This background type is available on Android + * API level 21+. + * + * @param color The ripple color + * @param borderless If the ripple can render outside it's bounds + */ + Ripple( color: string, borderless?: boolean ): RippleBackgroundPropType +} + + +export interface LeftToRightGesture { + // If the gesture can end and restart during one continuous touch + isDetachable: boolean; + // How far the swipe must drag to start transitioning + gestureDetectMovement: number; + // Amplitude of release velocity that is considered still + notMoving: number; + // Fraction of directional move required. + directionRatio: number; + // Velocity to transition with when the gesture release was "not moving" + snapVelocity: number; + // Region that can trigger swipe. iOS default is 30px from the left edge + edgeHitWidth: number; + // Ratio of gesture completion when non-velocity release will cause action + stillCompletionRatio: number; + fullDistance: any; + direction: string; +} + +export interface JumpGesture extends LeftToRightGesture{ + overswipe: { + frictionConstant: number + frictionByDistance: number + } +} + +// see /NavigatorSceneConfigs.js +export interface SceneConfig { + // A list of all gestures that are enabled on this scene + gestures?: { + pop?: LeftToRightGesture, + }, + + // Rebound spring parameters when transitioning FROM this scene + springFriction: number; + springTension: number; + + // Velocity to start at when transitioning without gesture + defaultTransitionVelocity: number; + + // Animation interpolators for horizontal transitioning: + animationInterpolators: { + into: () => boolean, + out: () => boolean + }; +} + +export interface JumpSceneConfig extends SceneConfig { + gestures: { + jumpBack: JumpGesture + jumpForward: JumpGesture + } +} + +// see /NavigatorSceneConfigs.js +export interface SceneConfigs { + PushFromRight: SceneConfig; + PushFromLeft: SceneConfig; + FloatFromRight: SceneConfig; + FloatFromLeft: SceneConfig; + FloatFromBottom: SceneConfig; + FloatFromBottomAndroid: SceneConfig; + FadeAndroid: SceneConfig; + HorizontalSwipeJump: SceneConfig; + HorizontalSwipeJumpFromRight: SceneConfig; + VerticalUpSwipeJump: SceneConfig; + VerticalDownSwipeJump: SceneConfig; +} + +export interface Route { + component?: React.ComponentClass + id?: string + title?: string + passProps?: Object; + + //anything else + [key: string]: any + + //Commonly found properties + backButtonTitle?: string + content?: string + message?: string; + index?: number + onRightButtonPress?: () => void + rightButtonTitle?: string + sceneConfig?: SceneConfig + wrapperStyle?: any +} + + +/** + * @see https://facebook.github.io/react-native/docs/navigator.html#content + */ +export interface NavigatorProperties extends React.Props { + /** + * Optional function that allows configuration about scene animations and gestures. + * Will be invoked with `route` and `routeStack` parameters, where `route` + * corresponds to the current scene being rendered by the `Navigator` and + * `routeStack` is the set of currently mounted routes that the navigator + * could transition to. The function should return a scene configuration object. + * @param route + * @param routeStack + */ + configureScene?: (route: Route, routeStack: Route[]) => SceneConfig + /** + * Specify a route to start on. + * A route is an object that the navigator will use to identify each scene to render. + * initialRoute must be a route in the initialRouteStack if both props are provided. + * The initialRoute will default to the last item in the initialRouteStack. + */ + initialRoute?: Route + /** + * Provide a set of routes to initially mount. + * Required if no initialRoute is provided. + * Otherwise, it will default to an array containing only the initialRoute + */ + initialRouteStack?: Route[] + + /** + * Optionally provide a navigation bar that persists across scene transitions + */ + navigationBar?: React.ReactElement + + /** + * Optionally provide the navigator object from a parent Navigator + */ + navigator?: Navigator + + /** + * @deprecated Use navigationContext.addListener('willfocus', callback) instead. + */ + onDidFocus?: () => any + + /** + * @deprecated Use navigationContext.addListener('willfocus', callback) instead. + */ + onWillFocus?: () => any + + /** + * Required function which renders the scene for a given route. + * Will be invoked with the route and the navigator object + * @param route + * @param navigator + */ + renderScene: ( route: Route, navigator: Navigator ) => React.ReactElement + + /** + * Styles to apply to the container of each scene + */ + sceneStyle?: ViewStyle + +} + +/** + * Class that contains the info and methods for app navigation. + */ +export interface NavigationContext { + parent: NavigationContext; + top: NavigationContext; + currentRoute: any; + appendChild(childContext: NavigationContext): void; + addListener(eventType: string, listener: () => void, useCapture?: boolean): NativeEventSubscription; + emit(eventType: string, data: any, didEmitCallback?: () => void): void; + dispose(): void; +} + +interface InteractionMixin { + createInteractionHandle(): number + clearInteractionHandle(clearHandle: number): void + /** + * Schedule work for after all interactions have completed. + * + * @param {function} callback + */ + runAfterInteractions(callback: () => any): void +} + +interface SubscribableMixin { + /** + * Special form of calling `addListener` that *guarantees* that a + * subscription *must* be tied to a component instance, and therefore will + * be cleaned up when the component is unmounted. It is impossible to create + * the subscription and pass it in - this method must be the one to create + * the subscription and therefore can guarantee it is retained in a way that + * will be cleaned up. + * + * @param {EventEmitter} eventEmitter emitter to subscribe to. + * @param {string} eventType Type of event to listen to. + * @param {function} listener Function to invoke when event occurs. + * @param {object} context Object to use as listener context. + */ + addListenerOn( eventEmitter: any, eventType: string, listener: () => any, context: any ): void +} + +/** + * Use Navigator to transition between different scenes in your app. + * To accomplish this, provide route objects to the navigator to identify each scene, + * and also a renderScene function that the navigator can use to render the scene for a given route. + * + * To change the animation or gesture properties of the scene, provide a configureScene prop to get the config object for a given route. + * See Navigator.SceneConfigs for default animations and more info on scene config options. + * @see https://facebook.github.io/react-native/docs/navigator.html + */ +export interface NavigatorStatic extends TimerMixin, InteractionMixin, SubscribableMixin, React.ComponentClass { + SceneConfigs: SceneConfigs; + NavigationBar: NavigatorStatic.NavigationBarStatic; + BreadcrumbNavigationBar: NavigatorStatic.BreadcrumbNavigationBarStatic; + + navigationContext: NavigationContext; + + /** + * returns the current list of routes + */ + getCurrentRoutes(): Route[]; + + /** + * Jump backward without unmounting the current scen + */ + jumpBack(): void; + + /** + * Jump forward to the next scene in the route stack + */ + jumpForward(): void; + + /** + * Transition to an existing scene without unmounting + */ + jumpTo(route: Route): void; + + /** + * Navigate forward to a new scene, squashing any scenes that you could jumpForward to + */ + push(route: Route): void; + + /** + * Transition back and unmount the current scene + */ + pop(): void; + + /** + * Go back N scenes at once. When N=1, behavior matches `pop()`. + * When N is invalid(negative or bigger than current routes count), do nothing. + * @param {number} n The number of scenes to pop. Should be an integer. + */ + popN(n: number): void + + /** + * Replace the current scene with a new route + */ + replace(route: Route): void; + + /** + * Replace a scene as specified by an index + */ + replaceAtIndex(route: Route, index: number): void; + + /** + * Replace the previous scene + */ + replacePrevious(route: Route): void; + + /** + * Reset every scene with an array of routes + */ + immediatelyResetRouteStack(routes: Route[]): void; + + /** + * Pop to a particular scene, as specified by its route. All scenes after it will be unmounted + */ + popToRoute(route: Route): void; + + /** + * Pop to the first scene in the stack, unmounting every other scene + */ + popToTop(): void; + + /** + * Replace the previous scene and pop to it. + */ + replacePreviousAndPop( route: Route ): void; + + /** + * Navigate to a new scene and reset route stack. + */ + resetTo( route: Route ): void; + +} + +export namespace NavigatorStatic { + + + export interface NavState { + routeStack: Route[] + presentedIndex: number + } + + // @see NavigationBarStyle.ios.js + export interface NavigationBarStyle { + General: { + NavBarHeight: number + StatusBarHeight: number + TotalNavHeight: number + }, + Interpolators: { + // Animating *into* the center stage from the right + RightToCenter: () => boolean + // Animating out of the center stage, to the left + CenterToLeft: () => boolean + // Both stages (animating *past* the center stage) + RightToLeft: () => boolean + }, + Stages: { + Left: { + Title: FlexStyle + LeftButton: FlexStyle + RightButton: FlexStyle + }, + Center: { + Title: FlexStyle + LeftButton: FlexStyle + RightButton: FlexStyle + }, + Right: { + Title: FlexStyle + LeftButton: FlexStyle + RightButton: FlexStyle + }, + } + } + + + export interface NavigationBarRouteMapper { + Title: (route: Route, nav: Navigator, index: number, navState: NavState) => JSX.Element | null; + LeftButton: (route: Route, nav: Navigator, index: number, navState: NavState) => JSX.Element | null; + RightButton: (route: Route, nav: Navigator, index: number, navState: NavState) => JSX.Element | null; + } + + /** + * @see NavigatorNavigationBar.js + */ + export interface NavigationBarProperties extends React.Props { + navigator?: Navigator + routeMapper?: NavigationBarRouteMapper + navState?: NavState + navigationStyles?: NavigationBarStyle + style?: ViewStyle + } + + export interface NavigationBarStatic extends React.ComponentClass { + Styles: NavigationBarStyle + StylesAndroid: NavigationBarStyle; + StylesIOS: NavigationBarStyle; + + /** + * Stop transtion, immediately resets the cached state and re-render the + * whole view. + */ + immediatelyRefresh(): void; + } + + export type NavigationBar = NavigationBarStatic + export var NavigationBar: NavigationBarStatic + + + export interface BreadcrumbNavigationBarStyle { + //TODO &see NavigatorBreadcrumbNavigationBar.js + } + + export interface BreadcrumbNavigationBarRouteMapper { + rightContentForRoute: (route: Route, navigator: Navigator) => React.ReactElement + titleContentForRoute: (route: Route, navigator: Navigator) => React.ReactElement + iconForRoute: (route: Route, navigator: Navigator) => React.ReactElement + //in samples... + separatorForRoute: (route: Route, navigator: Navigator) => React.ReactElement + } + + /** + * @see NavigatorNavigationBar.js + */ + export interface BreadcrumbNavigationBarProperties extends React.Props { + navigator?: Navigator + routeMapper?: BreadcrumbNavigationBarRouteMapper + navState?: NavState + style?: ViewStyle + } + + export interface BreadcrumbNavigationBarStatic extends React.ComponentClass { + Styles: BreadcrumbNavigationBarStyle + + immediatelyRefresh(): void + } + + export type BreadcrumbNavigationBar = BreadcrumbNavigationBarStatic + var BreadcrumbNavigationBar: BreadcrumbNavigationBarStatic + +} + +// @see https://github.com/facebook/react-native/blob/0.34-stable\Libraries\StyleSheet\StyleSheetTypes.js +export namespace StyleSheet { + + type Style = ViewStyle | TextStyle | ImageStyle + + /** + * Creates a StyleSheet style reference from the given object. + */ + export function create( styles: T ): T; + + /** + * Flattens an array of style objects, into one aggregated style object. + * Alternatively, this method can be used to lookup IDs, returned by + * StyleSheet.register. + * + * > **NOTE**: Exercise caution as abusing this can tax you in terms of + * > optimizations. + * > + * > IDs enable optimizations through the bridge and memory in general. Refering + * > to style objects directly will deprive you of these optimizations. + * + * Example: + * ``` + * var styles = StyleSheet.create({ + * listItem: { + * flex: 1, + * fontSize: 16, + * color: 'white' + * }, + * selectedListItem: { + * color: 'green' + * } + * }); + * + * StyleSheet.flatten([styles.listItem, styles.selectedListItem]) + * // returns { flex: 1, fontSize: 16, color: 'green' } + * ``` + * Alternative use: + * ``` + * StyleSheet.flatten(styles.listItem); + * // return { flex: 1, fontSize: 16, color: 'white' } + * // Simply styles.listItem would return its ID (number) + * ``` + * This method internally uses `StyleSheetRegistry.getStyleByID(style)` + * to resolve style objects represented by IDs. Thus, an array of style + * objects (instances of StyleSheet.create), are individually resolved to, + * their respective objects, merged as one and then returned. This also explains + * the alternative use. + */ + export function flatten(style?: Style | Style[]): Style + + /** + * This is defined as the width of a thin line on the platform. It can be + * used as the thickness of a border or division between two elements. + * Example: + * ``` + * { + * borderBottomColor: '#bbb', + * borderBottomWidth: StyleSheet.hairlineWidth + * } + * ``` + * + * This constant will always be a round number of pixels (so a line defined + * by it look crisp) and will try to match the standard width of a thin line + * on the underlying platform. However, you should not rely on it being a + * constant size, because on different platforms and screen densities its + * value may be calculated differently. + */ + export var hairlineWidth: number + + /** + * A very common pattern is to create overlays with position absolute and zero positioning, + * so `absoluteFill` can be used for convenience and to reduce duplication of these repeated + * styles. + */ + export var absoluteFill: number + + /** + * Sometimes you may want `absoluteFill` but with a couple tweaks - `absoluteFillObject` can be + * used to create a customized entry in a `StyleSheet`, e.g.: + * + * const styles = StyleSheet.create({ + * wrapper: { + * ...StyleSheet.absoluteFillObject, + * top: 10, + * backgroundColor: 'transparent', + * }, + * }); + */ + export var absoluteFillObject: { + position: string + left: number + right: number + top: number + bottom: number + } +} + +export interface RelayProfiler { + attachProfileHandler( + name: string, + handler: (name: string, state?: any) => () => void + ): void, + + attachAggregateHandler( + name: string, + handler: (name: string, callback: () => void) => void + ): void, +} + +export interface SystraceStatic { + setEnabled(enabled: boolean): void + + /** + * beginEvent/endEvent for starting and then ending a profile within the same call stack frame + **/ + beginEvent(profileName?: any, args?: any): void + endEvent(): void + + /** + * beginAsyncEvent/endAsyncEvent for starting and then ending a profile where the end can either + * occur on another thread or out of the current stack frame, eg await + * the returned cookie variable should be used as input into the endAsyncEvent call to end the profile + **/ + beginAsyncEvent(profileName?: any): any + endAsyncEvent(profileName?: any, cookie?: any): void + + /** + * counterEvent registers the value to the profileName on the systrace timeline + **/ + counterEvent(profileName?: any, value?: any): void + + /** + * Relay profiles use await calls, so likely occur out of current stack frame + * therefore async variant of profiling is used + **/ + attachToRelayProfiler(relayProfiler: RelayProfiler): void + + /* This is not called by default due to perf overhead but it's useful + if you want to find traces which spend too much time in JSON. */ + swizzleJSON(): void + + /** + * Measures multiple methods of a class. For example, you can do: + * Systrace.measureMethods(JSON, 'JSON', ['parse', 'stringify']); + * + * @param object + * @param objectName + * @param methodNames Map from method names to method display names. + */ + measureMethods(object: any, objectName: string, methodNames: Array): void + + // tslint:disable:forbidden-types + /** + * Returns an profiled version of the input function. For example, you can: + * JSON.parse = Systrace.measure('JSON', 'parse', JSON.parse); + * + * @param objName + * @param fnName + * @param {function} func + * @return {function} replacement function + */ + measure(objName: string, fnName: string, func: T): T + // tslint:enable:forbidden-types +} + +/** + * //FIXME: Could not find docs. Inferred from examples and jscode : ListViewDataSource.js + */ +export interface DataSourceAssetCallback { + rowHasChanged?: (r1: any, r2: any) => boolean + sectionHeaderHasChanged?: (h1: any, h2: any) => boolean + getRowData?: (dataBlob: any, sectionID: number | string, rowID: number | string) => T + getSectionHeaderData?: (dataBlob: any, sectionID: number | string) => T +} + +/** + * Provides efficient data processing and access to the + * `ListView` component. A `ListViewDataSource` is created with functions for + * extracting data from the input blob, and comparing elements (with default + * implementations for convenience). The input blob can be as simple as an + * array of strings, or an object with rows nested inside section objects. + * + * To update the data in the datasource, use `cloneWithRows` (or + * `cloneWithRowsAndSections` if you care about sections). The data in the + * data source is immutable, so you can't modify it directly. The clone methods + * suck in the new data and compute a diff for each row so ListView knows + * whether to re-render it or not. + */ +export interface ListViewDataSource { + /** + * You can provide custom extraction and `hasChanged` functions for section + * headers and rows. If absent, data will be extracted with the + * `defaultGetRowData` and `defaultGetSectionHeaderData` functions. + * + * The default extractor expects data of one of the following forms: + * + * { sectionID_1: { rowID_1: , ... }, ... } + * + * or + * + * { sectionID_1: [ , , ... ], ... } + * + * or + * + * [ [ , , ... ], ... ] + * + * The constructor takes in a params argument that can contain any of the + * following: + * + * - getRowData(dataBlob, sectionID, rowID); + * - getSectionHeaderData(dataBlob, sectionID); + * - rowHasChanged(prevRowData, nextRowData); + * - sectionHeaderHasChanged(prevSectionData, nextSectionData); + */ + new (onAsset: DataSourceAssetCallback): ListViewDataSource; + + /** + * Clones this `ListViewDataSource` with the specified `dataBlob` and + * `rowIdentities`. The `dataBlob` is just an aribitrary blob of data. At + * construction an extractor to get the interesting informatoin was defined + * (or the default was used). + * + * The `rowIdentities` is is a 2D array of identifiers for rows. + * ie. [['a1', 'a2'], ['b1', 'b2', 'b3'], ...]. If not provided, it's + * assumed that the keys of the section data are the row identities. + * + * Note: This function does NOT clone the data in this data source. It simply + * passes the functions defined at construction to a new data source with + * the data specified. If you wish to maintain the existing data you must + * handle merging of old and new data separately and then pass that into + * this function as the `dataBlob`. + */ + cloneWithRows(dataBlob: Array | { [key: string]: any }, rowIdentities?: Array): ListViewDataSource + + /** + * This performs the same function as the `cloneWithRows` function but here + * you also specify what your `sectionIdentities` are. If you don't care + * about sections you should safely be able to use `cloneWithRows`. + * + * `sectionIdentities` is an array of identifiers for sections. + * ie. ['s1', 's2', ...]. If not provided, it's assumed that the + * keys of dataBlob are the section identities. + * + * Note: this returns a new object! + */ + cloneWithRowsAndSections(dataBlob: Array | { [key: string]: any }, sectionIdentities?: Array, rowIdentities?: Array>): ListViewDataSource + + getRowCount(): number + getRowAndSectionCount(): number + + /** + * Returns if the row is dirtied and needs to be rerendered + */ + rowShouldUpdate(sectionIndex: number, rowIndex: number): boolean + + /** + * Gets the data required to render the row. + */ + getRowData(sectionIndex: number, rowIndex: number): any + + /** + * Gets the rowID at index provided if the dataSource arrays were flattened, + * or null of out of range indexes. + */ + getRowIDForFlatIndex(index: number): string + + /** + * Gets the sectionID at index provided if the dataSource arrays were flattened, + * or null for out of range indexes. + */ + getSectionIDForFlatIndex(index: number): string + + /** + * Returns an array containing the number of rows in each section + */ + getSectionLengths(): Array + + /** + * Returns if the section header is dirtied and needs to be rerendered + */ + sectionHeaderShouldUpdate(sectionIndex: number): boolean + + /** + * Gets the data required to render the section header + */ + getSectionHeaderData(sectionIndex: number): any +} + + +/** + * @see https://facebook.github.io/react-native/docs/tabbarios-item.html#props + */ +export interface TabBarItemProperties extends ViewProperties, React.Props { + + /** + * Little red bubble that sits at the top right of the icon. + */ + badge?: string | number + + /** + * A custom icon for the tab. It is ignored when a system icon is defined. + */ + icon?: ImageURISource + + /** + * Callback when this tab is being selected, + * you should change the state of your component to set selected={true}. + */ + onPress?: () => void + + /** + * If set to true it renders the image as original, + * it defaults to being displayed as a template + */ + renderAsOriginal?: boolean + + /** + * It specifies whether the children are visible or not. If you see a blank content, you probably forgot to add a selected one. + */ + selected?: boolean + + /** + * A custom icon when the tab is selected. + * It is ignored when a system icon is defined. If left empty, the icon will be tinted in blue. + */ + selectedIcon?: ImageURISource + + /** + * React style object. + */ + style?: ViewStyle + + /** + * Items comes with a few predefined system icons. + * Note that if you are using them, the title and selectedIcon will be overriden with the system ones. + * + * enum('bookmarks', 'contacts', 'downloads', 'favorites', 'featured', 'history', 'more', 'most-recent', 'most-viewed', 'recents', 'search', 'top-rated') + */ + systemIcon?: "bookmarks" | "contacts" | "downloads" | "favorites" | "featured" | "history" | "more" | "most-recent" | "most-viewed" | "recents" | "search" | "top-rated" + + /** + * Text that appears under the icon. It is ignored when a system icon is defined. + */ + title?: string + + ref?: React.Ref +} + +export interface TabBarItemStatic extends React.ComponentClass { +} + +/** + * @see https://facebook.github.io/react-native/docs/tabbarios.html#props + */ +export interface TabBarIOSProperties extends ViewProperties, React.Props { + + /** + * Background color of the tab bar + */ + barTintColor?: string + + /** + * Specifies tab bar item positioning. Available values are: + * - fill - distributes items across the entire width of the tab bar + * - center - centers item in the available tab bar space + * - auto (default) - distributes items dynamically according to the + * user interface idiom. In a horizontally compact environment (e.g. iPhone 5) + * this value defaults to `fill`, in a horizontally regular one (e.g. iPad) + * it defaults to center. + */ + itemPositioning?: 'fill' | 'center' | 'auto' + + /** + * Color of the currently selected tab icon + */ + tintColor?: string + + /** + * A Boolean value that indicates whether the tab bar is translucent + */ + translucent?: boolean + + /** + * Color of text on unselected tabs + */ + unselectedTintColor?: string + + ref?: React.Ref +} + +export interface TabBarIOSStatic extends React.ComponentClass { + Item: TabBarItemStatic; +} + + +export interface PixelRatioStatic { + + /* + Returns the device pixel density. Some examples: + PixelRatio.get() === 1 + mdpi Android devices (160 dpi) + PixelRatio.get() === 1.5 + hdpi Android devices (240 dpi) + PixelRatio.get() === 2 + iPhone 4, 4S + iPhone 5, 5c, 5s + iPhone 6 + xhdpi Android devices (320 dpi) + PixelRatio.get() === 3 + iPhone 6 plus + xxhdpi Android devices (480 dpi) + PixelRatio.get() === 3.5 + Nexus 6 + */ + get(): number; + + /* + Returns the scaling factor for font sizes. This is the ratio that is + used to calculate the absolute font size, so any elements that + heavily depend on that should use this to do calculations. + + If a font scale is not set, this returns the device pixel ratio. + + Currently this is only implemented on Android and reflects the user + preference set in Settings > Display > Font size, + on iOS it will always return the default pixel ratio. + */ + getFontScale(): number + + /** + * Converts a layout size (dp) to pixel size (px). + * Guaranteed to return an integer number. + * @param layoutSize + */ + getPixelSizeForLayoutSize(layoutSize: number): number + + /** + * Rounds a layout size (dp) to the nearest layout size that + * corresponds to an integer number of pixels. For example, + * on a device with a PixelRatio of 3, + * PixelRatio.roundToNearestPixel(8.4) = 8.33, + * which corresponds to exactly (8.33 * 3) = 25 pixels. + * @param layoutSize + */ + roundToNearestPixel(layoutSize: number): number + + /** + * No-op for iOS, but used on the web. Should not be documented. [sic] + */ + startDetecting(): void +} + +/** + * @see https://facebook.github.io/react-native/docs/platform-specific-code.html#content + */ +export type PlatformOSType = 'ios' | 'android' + +interface PlatformStatic { + OS: PlatformOSType + Version: number + + /** + * @see https://facebook.github.io/react-native/docs/platform-specific-code.html#content + */ + select( specifics: { ios?: T, android?: T} ): T; +} + +/** + * Deprecated - subclass NativeEventEmitter to create granular event modules instead of + * adding all event listeners directly to RCTDeviceEventEmitter. + */ +interface DeviceEventEmitterStatic extends EventEmitter { + sharedSubscriber: EventSubscriptionVendor + new(): DeviceEventEmitterStatic; + addListener( type: string, listener: ( data: T ) => void, context?: any ): EmitterSubscription; +} + +// Used by Dimensions below +export interface ScaledSize { + width: number; + height: number; + scale: number; + fontScale: number; +} + +/** + * Initial dimensions are set before `runApplication` is called so they should + * be available before any other require's are run, but may be updated later. + * + * Note: Although dimensions are available immediately, they may change (e.g + * due to device rotation) so any rendering logic or styles that depend on + * these constants should try to call this function on every render, rather + * than caching the value (for example, using inline styles rather than + * setting a value in a `StyleSheet`). + * + * Example: `var {height, width} = Dimensions.get('window');` + * + * @param {string} dim Name of dimension as defined when calling `set`. + * @returns {Object?} Value for the dimension. + * @see https://facebook.github.io/react-native/docs/dimensions.html#content + */ +export interface Dimensions { + /** + * Initial dimensions are set before runApplication is called so they + * should be available before any other require's are run, but may be + * updated later. + * Note: Although dimensions are available immediately, they may + * change (e.g due to device rotation) so any rendering logic or + * styles that depend on these constants should try to call this + * function on every render, rather than caching the value (for + * example, using inline styles rather than setting a value in a + * StyleSheet). + * Example: var {height, width} = Dimensions.get('window'); + @param {string} dim Name of dimension as defined when calling set. + @returns {Object?} Value for the dimension. + */ + get(dim: "window" | "screen"): ScaledSize; + + /** + * This should only be called from native code by sending the didUpdateDimensions event. + * @param {object} dims Simple string-keyed object of dimensions to set + */ + set( dims: {[key: string]: any} ): void +} + +export type SimpleTask = { + name: string + gen: () => void +} +export type PromiseTask = { + name: string + gen: () => Promise +} + +export type Handle = number + +export interface InteractionManagerStatic extends EventEmitterListener { + Events: { + interactionStart: string + interactionComplete: string + } + + /** + * Schedule a function to run after all interactions have completed. + * Returns a cancellable + * @param fn + */ + runAfterInteractions(task?: (() => any) | SimpleTask | PromiseTask): { + then: (onfulfilled?: () => any, onrejected?: () => any) => Promise, + done: (...args: any[]) => any, + cancel: () => void, + } + + /** + * Notify manager that an interaction has started. + */ + createInteractionHandle(): Handle + + /** + * Notify manager that an interaction has completed. + */ + clearInteractionHandle(handle: Handle): void + + /** + * A positive number will use setTimeout to schedule any tasks after + * the eventLoopRunningTime hits the deadline value, otherwise all + * tasks will be executed in one setImmediate batch (default). + */ + setDeadline(deadline: number): void +} + + +export interface ScrollViewStyle extends FlexStyle, TransformsStyle { + + backfaceVisibility?: "visible" | "hidden" + backgroundColor?: string + borderColor?: string + borderTopColor?: string + borderRightColor?: string + borderBottomColor?: string + borderLeftColor?: string + borderRadius?: number + borderTopLeftRadius?: number + borderTopRightRadius?: number + borderBottomLeftRadius?: number + borderBottomRightRadius?: number + borderStyle?: "solid" | "dotted" | "dashed" + borderWidth?: number + borderTopWidth?: number + borderRightWidth?: number + borderBottomWidth?: number + borderLeftWidth?: number + opacity?: number + overflow?: "visible" | "hidden" + shadowColor?: string + shadowOffset?: { width: number; height: number } + shadowOpacity?: number + shadowRadius?: number + elevation?: number +} + + +interface ScrollResponderMixin extends SubscribableMixin { + /** + * Invoke this from an `onScroll` event. + */ + scrollResponderHandleScrollShouldSetResponder(): boolean + + /** + * Merely touch starting is not sufficient for a scroll view to become the + * responder. Being the "responder" means that the very next touch move/end + * event will result in an action/movement. + * + * Invoke this from an `onStartShouldSetResponder` event. + * + * `onStartShouldSetResponder` is used when the next move/end will trigger + * some UI movement/action, but when you want to yield priority to views + * nested inside of the view. + * + * There may be some cases where scroll views actually should return `true` + * from `onStartShouldSetResponder`: Any time we are detecting a standard tap + * that gives priority to nested views. + * + * - If a single tap on the scroll view triggers an action such as + * recentering a map style view yet wants to give priority to interaction + * views inside (such as dropped pins or labels), then we would return true + * from this method when there is a single touch. + * + * - Similar to the previous case, if a two finger "tap" should trigger a + * zoom, we would check the `touches` count, and if `>= 2`, we would return + * true. + * + */ + scrollResponderHandleStartShouldSetResponder(): boolean + + /** + * There are times when the scroll view wants to become the responder + * (meaning respond to the next immediate `touchStart/touchEnd`), in a way + * that *doesn't* give priority to nested views (hence the capture phase): + * + * - Currently animating. + * - Tapping anywhere that is not the focused input, while the keyboard is + * up (which should dismiss the keyboard). + * + * Invoke this from an `onStartShouldSetResponderCapture` event. + */ + scrollResponderHandleStartShouldSetResponderCapture(e: Event): boolean + + /** + * Invoke this from an `onResponderReject` event. + * + * Some other element is not yielding its role as responder. Normally, we'd + * just disable the `UIScrollView`, but a touch has already began on it, the + * `UIScrollView` will not accept being disabled after that. The easiest + * solution for now is to accept the limitation of disallowing this + * altogether. To improve this, find a way to disable the `UIScrollView` after + * a touch has already started. + */ + scrollResponderHandleResponderReject(): any + + /** + * We will allow the scroll view to give up its lock iff it acquired the lock + * during an animation. This is a very useful default that happens to satisfy + * many common user experiences. + * + * - Stop a scroll on the left edge, then turn that into an outer view's + * backswipe. + * - Stop a scroll mid-bounce at the top, continue pulling to have the outer + * view dismiss. + * - However, without catching the scroll view mid-bounce (while it is + * motionless), if you drag far enough for the scroll view to become + * responder (and therefore drag the scroll view a bit), any backswipe + * navigation of a swipe gesture higher in the view hierarchy, should be + * rejected. + */ + scrollResponderHandleTerminationRequest(): boolean + + /** + * Invoke this from an `onTouchEnd` event. + * + * @param {SyntheticEvent} e Event. + */ + scrollResponderHandleTouchEnd(e: Event): void + + /** + * Invoke this from an `onResponderRelease` event. + */ + scrollResponderHandleResponderRelease(e: Event): void + + scrollResponderHandleScroll(e: Event): void + + /** + * Invoke this from an `onResponderGrant` event. + */ + scrollResponderHandleResponderGrant(e: Event): void + + /** + * Unfortunately, `onScrollBeginDrag` also fires when *stopping* the scroll + * animation, and there's not an easy way to distinguish a drag vs. stopping + * momentum. + * + * Invoke this from an `onScrollBeginDrag` event. + */ + scrollResponderHandleScrollBeginDrag(e: Event): void + + /** + * Invoke this from an `onScrollEndDrag` event. + */ + scrollResponderHandleScrollEndDrag(e: Event): void + + /** + * Invoke this from an `onMomentumScrollBegin` event. + */ + scrollResponderHandleMomentumScrollBegin(e: Event): void + + /** + * Invoke this from an `onMomentumScrollEnd` event. + */ + scrollResponderHandleMomentumScrollEnd(e: Event): void + + /** + * Invoke this from an `onTouchStart` event. + * + * Since we know that the `SimpleEventPlugin` occurs later in the plugin + * order, after `ResponderEventPlugin`, we can detect that we were *not* + * permitted to be the responder (presumably because a contained view became + * responder). The `onResponderReject` won't fire in that case - it only + * fires when a *current* responder rejects our request. + * + * @param {SyntheticEvent} e Touch Start event. + */ + scrollResponderHandleTouchStart(e: Event): void + + /** + * Invoke this from an `onTouchMove` event. + * + * Since we know that the `SimpleEventPlugin` occurs later in the plugin + * order, after `ResponderEventPlugin`, we can detect that we were *not* + * permitted to be the responder (presumably because a contained view became + * responder). The `onResponderReject` won't fire in that case - it only + * fires when a *current* responder rejects our request. + * + * @param {SyntheticEvent} e Touch Start event. + */ + scrollResponderHandleTouchMove(e: Event): void + + /** + * A helper function for this class that lets us quickly determine if the + * view is currently animating. This is particularly useful to know when + * a touch has just started or ended. + */ + scrollResponderIsAnimating(): boolean + + /** + * Returns the node that represents native view that can be scrolled. + * Components can pass what node to use by defining a `getScrollableNode` + * function otherwise `this` is used. + */ + scrollResponderGetScrollableNode(): any + + /** + * A helper function to scroll to a specific point in the scrollview. + * This is currently used to help focus on child textviews, but can also + * be used to quickly scroll to any element we want to focus. Syntax: + * + * scrollResponderScrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true}) + * + * Note: The weird argument signature is due to the fact that, for historical reasons, + * the function also accepts separate arguments as as alternative to the options object. + * This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED. + */ + scrollResponderScrollTo( x?: number | { x?: number, y?: number, animated?: boolean }, y?: number, animated?: boolean ): void, + + /** + * A helper function to zoom to a specific rect in the scrollview. The argument has the shape + * {x: number; y: number; width: number; height: number; animated: boolean = true} + * + * @platform ios + */ + scrollResponderZoomTo( + rect: { x: number, y: number, width: number, height: number, animated?: boolean }, + animated?: boolean // deprecated, put this inside the rect argument instead + ): void + + /** + * This method should be used as the callback to onFocus in a TextInputs' + * parent view. Note that any module using this mixin needs to return + * the parent view's ref in getScrollViewRef() in order to use this method. + * @param {any} nodeHandle The TextInput node handle + * @param {number} additionalOffset The scroll view's top "contentInset". + * Default is 0. + * @param {bool} preventNegativeScrolling Whether to allow pulling the content + * down to make it meet the keyboard's top. Default is false. + */ + scrollResponderScrollNativeHandleToKeyboard(nodeHandle: any, additionalOffset?: number, preventNegativeScrollOffset?: boolean): void + + /** + * The calculations performed here assume the scroll view takes up the entire + * screen - even if has some content inset. We then measure the offsets of the + * keyboard, and compensate both for the scroll view's "contentInset". + * + * @param {number} left Position of input w.r.t. table view. + * @param {number} top Position of input w.r.t. table view. + * @param {number} width Width of the text input. + * @param {number} height Height of the text input. + */ + scrollResponderInputMeasureAndScrollToKeyboard(left: number, top: number, width: number, height: number): void + + scrollResponderTextInputFocusError(e: Event): void + + /** + * `componentWillMount` is the closest thing to a standard "constructor" for + * React components. + * + * The `keyboardWillShow` is called before input focus. + */ + componentWillMount(): void + + /** + * Warning, this may be called several times for a single keyboard opening. + * It's best to store the information in this method and then take any action + * at a later point (either in `keyboardDidShow` or other). + * + * Here's the order that events occur in: + * - focus + * - willShow {startCoordinates, endCoordinates} several times + * - didShow several times + * - blur + * - willHide {startCoordinates, endCoordinates} several times + * - didHide several times + * + * The `ScrollResponder` providesModule callbacks for each of these events. + * Even though any user could have easily listened to keyboard events + * themselves, using these `props` callbacks ensures that ordering of events + * is consistent - and not dependent on the order that the keyboard events are + * subscribed to. This matters when telling the scroll view to scroll to where + * the keyboard is headed - the scroll responder better have been notified of + * the keyboard destination before being instructed to scroll to where the + * keyboard will be. Stick to the `ScrollResponder` callbacks, and everything + * will work. + * + * WARNING: These callbacks will fire even if a keyboard is displayed in a + * different navigation pane. Filter out the events to determine if they are + * relevant to you. (For example, only if you receive these callbacks after + * you had explicitly focused a node etc). + */ + scrollResponderKeyboardWillShow(e: Event): void + + scrollResponderKeyboardWillHide(e: Event): void + + scrollResponderKeyboardDidShow(e: Event): void + + scrollResponderKeyboardDidHide(e: Event): void +} + +export interface ScrollViewPropertiesIOS { + + /** + * When true the scroll view bounces horizontally when it reaches the end + * even if the content is smaller than the scroll view itself. The default + * value is true when `horizontal={true}` and false otherwise. + */ + alwaysBounceHorizontal?: boolean + /** + * When true the scroll view bounces vertically when it reaches the end + * even if the content is smaller than the scroll view itself. The default + * value is false when `horizontal={true}` and true otherwise. + */ + alwaysBounceVertical?: boolean + + /** + * Controls whether iOS should automatically adjust the content inset for scroll views that are placed behind a navigation bar or tab bar/ toolbar. + * The default value is true. + */ + automaticallyAdjustContentInsets?: boolean // true + + /** + * When true the scroll view bounces when it reaches the end of the + * content if the content is larger then the scroll view along the axis of + * the scroll direction. When false it disables all bouncing even if + * the `alwaysBounce*` props are true. The default value is true. + */ + bounces?: boolean + /** + * When true gestures can drive zoom past min/max and the zoom will animate + * to the min/max value at gesture end otherwise the zoom will not exceed + * the limits. + */ + bouncesZoom?: boolean + + /** + * When false once tracking starts won't try to drag if the touch moves. + * The default value is true. + */ + canCancelContentTouches?: boolean + + /** + * When true the scroll view automatically centers the content when the + * content is smaller than the scroll view bounds; when the content is + * larger than the scroll view this property has no effect. The default + * value is false. + */ + centerContent?: boolean + + /** + * The amount by which the scroll view content is inset from the edges of the scroll view. + * Defaults to {0, 0, 0, 0}. + */ + contentInset?: Insets // zeros + + /** + * Used to manually set the starting scroll offset. + * The default value is {x: 0, y: 0} + */ + contentOffset?: PointProperties // zeros + + /** + * A floating-point number that determines how quickly the scroll view + * decelerates after the user lifts their finger. Reasonable choices include + * - Normal: 0.998 (the default) + * - Fast: 0.9 + */ + decelerationRate?: "fast" | "normal" | number + + /** + * When true the ScrollView will try to lock to only vertical or horizontal + * scrolling while dragging. The default value is false. + */ + directionalLockEnabled?: boolean + + /** + * The style of the scroll indicators. + * - default (the default), same as black. + * - black, scroll indicator is black. This style is good against + * a white content background. + * - white, scroll indicator is white. This style is good against + * a black content background. + */ + indicatorStyle?: "default" | "black" | "white" + + /** + * The maximum allowed zoom scale. The default value is 1.0. + */ + maximumZoomScale?: number + + /** + * The minimum allowed zoom scale. The default value is 1.0. + */ + minimumZoomScale?: number + + /** + * Called when a scrolling animation ends. + */ + onScrollAnimationEnd?: () => void + + /** + * This controls how often the scroll event will be fired while scrolling (in events per seconds). + * A higher number yields better accuracy for code that is tracking the scroll position, + * but can lead to scroll performance problems due to the volume of information being send over the bridge. + * The default value is zero, which means the scroll event will be sent only once each time the view is scrolled. + */ + scrollEventThrottle?: number // null + + /** + * The amount by which the scroll view indicators are inset from the edges of the scroll view. + * This should normally be set to the same value as the contentInset. + * Defaults to {0, 0, 0, 0}. + */ + scrollIndicatorInsets?: Insets //zeroes + + /** + * When true the scroll view scrolls to top when the status bar is tapped. + * The default value is true. + */ + scrollsToTop?: boolean + + /** + * When snapToInterval is set, snapToAlignment will define the relationship of the the snapping to the scroll view. + * - start (the default) will align the snap at the left (horizontal) or top (vertical) + * - center will align the snap in the center + * - end will align the snap at the right (horizontal) or bottom (vertical) + */ + snapToAlignment?: "start" | "center" | "end" + + /** + * When set, causes the scroll view to stop at multiples of the value of snapToInterval. + * This can be used for paginating through children that have lengths smaller than the scroll view. + * Used in combination with snapToAlignment. + */ + snapToInterval?: number[] + + /** + * An array of child indices determining which children get docked to the + * top of the screen when scrolling. For example passing + * `stickyHeaderIndices={[0]}` will cause the first child to be fixed to the + * top of the scroll view. This property is not supported in conjunction + * with `horizontal={true}`. + */ + stickyHeaderIndices?: number[] + + /** + * The current scale of the scroll view content. The default value is 1.0. + */ + zoomScale?: number +} + +export interface ScrollViewPropertiesAndroid { + + /** + * Sometimes a scrollview takes up more space than its content fills. + * When this is the case, this prop will fill the rest of the + * scrollview with a color to avoid setting a background and creating + * unnecessary overdraw. This is an advanced optimization that is not + * needed in the general case. + */ + endFillColor?: string + + /** + * Tag used to log scroll performance on this scroll view. Will force + * momentum events to be turned on (see sendMomentumEvents). This doesn't do + * anything out of the box and you need to implement a custom native + * FpsListener for it to be useful. + * @platform android + */ + scrollPerfTag?: string + + /** + * Used to override default value of overScroll mode. + + * Possible values: + * - 'auto' - Default value, allow a user to over-scroll this view only if the content is large enough to meaningfully scroll. + * - 'always' - Always allow a user to over-scroll this view. + * - 'never' - Never allow a user to over-scroll this view. + */ + overScrollMode?: 'auto' | 'always' | 'never' +} + +export interface ScrollViewProperties extends ViewProperties, ScrollViewPropertiesIOS, ScrollViewPropertiesAndroid, Touchable, React.Props { + + /** + * These styles will be applied to the scroll view content container which + * wraps all of the child views. Example: + * + * return ( + * + * + * ); + * ... + * var styles = StyleSheet.create({ + * contentContainer: { + * paddingVertical: 20 + * } + * }); + */ + contentContainerStyle?: ViewStyle + + /** + * When true the scroll view's children are arranged horizontally in a row + * instead of vertically in a column. The default value is false. + */ + horizontal?: boolean + + /** + * Determines whether the keyboard gets dismissed in response to a drag. + * - 'none' (the default) drags do not dismiss the keyboard. + * - 'onDrag' the keyboard is dismissed when a drag begins. + * - 'interactive' the keyboard is dismissed interactively with the drag + * and moves in synchrony with the touch; dragging upwards cancels the + * dismissal. + */ + keyboardDismissMode?: 'none' | 'interactive' | 'on-drag' + + /** + * When false tapping outside of the focused text input when the keyboard + * is up dismisses the keyboard. When true the scroll view will not catch + * taps and the keyboard will not dismiss automatically. The default value + * is false. + */ + keyboardShouldPersistTaps?: boolean | 'always' | 'never' | 'handled' + + /** + * Called when scrollable content view of the ScrollView changes. + * Handler function is passed the content width and content height as parameters: (contentWidth, contentHeight) + * It's implemented using onLayout handler attached to the content container which this ScrollView renders. + * + */ + onContentSizeChange?: (w: number, h: number) => void + + /** + * Fires at most once per frame during scrolling. + * The frequency of the events can be contolled using the scrollEventThrottle prop. + */ + onScroll?: (event?: NativeSyntheticEvent) => void + + /** + * Fires if a user initiates a scroll gesture. + */ + onScrollBeginDrag?: (event?: NativeSyntheticEvent) => void + +/** + * Fires when a user has finished scrolling. + */ + onScrollEndDrag?: (event?: NativeSyntheticEvent) => void + +/** + * Fires when scroll view has finished moving + */ + onMomentumScrollEnd?: (event?: NativeSyntheticEvent) => void + + /** + * Fires when scroll view has begun moving + */ + onMomentumScrollBegin?: (event?: NativeSyntheticEvent) => void + + /** + * When true the scroll view stops on multiples of the scroll view's size + * when scrolling. This can be used for horizontal pagination. The default + * value is false. + */ + pagingEnabled?: boolean + + /** + * When false, the content does not scroll. The default value is true + */ + scrollEnabled?: boolean // true + + /** + * Experimental: When true offscreen child views (whose `overflow` value is + * `hidden`) are removed from their native backing superview when offscreen. + * This canimprove scrolling performance on long lists. The default value is + * false. + */ + removeClippedSubviews?: boolean + + /** + * When true, shows a horizontal scroll indicator. + */ + showsHorizontalScrollIndicator?: boolean + + /** + * When true, shows a vertical scroll indicator. + */ + showsVerticalScrollIndicator?: boolean + + /** + * Style + */ + style?: ScrollViewStyle + + /** + * A RefreshControl component, used to provide pull-to-refresh + * functionality for the ScrollView. + */ + refreshControl?: React.ReactElement + + ref?: React.Ref +} + +export interface ScrollViewProps extends ScrollViewProperties, React.Props { + ref?: React.Ref +} + +interface ScrollViewStatic extends ScrollResponderMixin, React.ComponentClass { + + /** + * Scrolls to a given x, y offset, either immediately or with a smooth animation. + * Syntax: + * + * scrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true}) + * + * Note: The weird argument signature is due to the fact that, for historical reasons, + * the function also accepts separate arguments as as alternative to the options object. + * This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED. + */ + scrollTo( + y?: number | { x?: number, y?: number, animated?: boolean }, + x?: number, + animated?: boolean + ): void; + + /** + * Returns a reference to the underlying scroll responder, which supports + * operations like `scrollTo`. All ScrollView-like components should + * implement this method so that they can be composed while providing access + * to the underlying scroll responder's methods. + */ + getScrollResponder(): JSX.Element; + + getScrollableNode(): any; + + // Undocumented + getInnerViewNode(): any; + + // Deprecated, do not use. + scrollWithoutAnimationTo?: (y: number, x: number) => void +} + + +export interface NativeScrollRectangle { + left: number; + top: number; + bottom: number; + right: number; +} + +export interface NativeScrollPoint { + x: number; + y: number; +} + +export interface NativeScrollSize { + height: number; + width: number; +} + +export interface NativeScrollEvent { + contentInset: NativeScrollRectangle; + contentOffset: NativeScrollPoint; + contentSize: NativeScrollSize; + layoutMeasurement: NativeScrollSize; + zoomScale: number; +} + +export interface SnapshotViewIOSProperties extends ViewProperties, React.Props { + + // A callback when the Snapshot view is ready to be compared + onSnapshotReady(): any, + + // A name to identify the individual instance to the SnapshotView + testIdentifier : string, + + ref?: React.Ref +} + +export interface SnapshotViewIOSStatic extends NativeMethodsMixin, React.ComponentClass {} + +// Deduced from +// https://github.com/facebook/react-native/commit/052cd7eb8afa7a805ef13e940251be080499919c + +/** + * Data source wrapper around ListViewDataSource to allow for tracking of + * which row is swiped open and close opened row(s) when another row is swiped + * open. + * + * See https://github.com/facebook/react-native/pull/5602 for why + * ListViewDataSource is not subclassed. + */ +export interface SwipeableListViewDataSource { + cloneWithRowsAndSections(dataBlob: any, + sectionIdentities?: Array, + rowIdentities?: Array>): SwipeableListViewDataSource + getDataSource(): ListViewDataSource + getOpenRowID(): string + getFirstRowID(): string + setOpenRowID(rowID: string): SwipeableListViewDataSource +} + +export interface SwipeableListViewProps extends React.Props { + + /** + * To alert the user that swiping is possible, the first row can bounce + * on component mount. + */ + bounceFirstRowOnMount: boolean + + /** + * Use `SwipeableListView.getNewDataSource()` to get a data source to use, + * then use it just like you would a normal ListView data source + */ + dataSource: SwipeableListViewDataSource + + // Maximum distance to open to after a swipe + maxSwipeDistance: number + + // Callback method to render the swipeable view + renderRow: (rowData: any, sectionID: string | number, rowID: string | number, highlightRow?: boolean) => React.ReactElement + + // Callback method to render the view that will be unveiled on swipe + renderQuickActions(rowData: any, sectionID: string | number, rowID: string | number): React.ReactElement +} + +/** + * A container component that renders multiple SwipeableRow's in a ListView + * implementation. This is designed to be a drop-in replacement for the + * standard React Native `ListView`, so use it as if it were a ListView, but + * with extra props, i.e. + * + * let ds = SwipeableListView.getNewDataSource(); + * ds.cloneWithRowsAndSections(dataBlob, ?sectionIDs, ?rowIDs); + * // .. + * + * + * SwipeableRow can be used independently of this component, but the main + * benefit of using this component is + * + * - It ensures that at most 1 row is swiped open (auto closes others) + * - It can bounce the 1st row of the list so users know it's swipeable + * - More to come + */ +export interface SwipeableListViewStatic extends React.ComponentClass { + getNewDataSource(): SwipeableListViewDataSource +} + + +////////////////////////////////////////////////////////////////////////// +// +// A P I s +// +////////////////////////////////////////////////////////////////////////// + +/** + * @see: http://facebook.github.io/react-native/docs/actionsheetios.html#content + */ +export interface ActionSheetIOSOptions { + title?: string + options: string[] + cancelButtonIndex?: number + destructiveButtonIndex?: number + message?: string +} + +export interface ShareActionSheetIOSOptions { + message?: string + url?: string + subject?: string + /** The activities to exclude from the ActionSheet. + * For example: ['com.apple.UIKit.activity.PostToTwitter'] + */ + excludedActivityTypes?: string[] +} + +/** + * @see https://facebook.github.io/react-native/docs/actionsheetios.html#content + */ +export interface ActionSheetIOSStatic { + /** + * Display an iOS action sheet. The `options` object must contain one or more + * of: + * - `options` (array of strings) - a list of button titles (required) + * - `cancelButtonIndex` (int) - index of cancel button in `options` + * - `destructiveButtonIndex` (int) - index of destructive button in `options` + * - `title` (string) - a title to show above the action sheet + * - `message` (string) - a message to show below the title + */ + showActionSheetWithOptions: (options: ActionSheetIOSOptions, callback: (buttonIndex: number) => void) => void + + /** + * Display the iOS share sheet. The `options` object should contain + * one or both of `message` and `url` and can additionally have + * a `subject` or `excludedActivityTypes`: + * + * - `url` (string) - a URL to share + * - `message` (string) - a message to share + * - `subject` (string) - a subject for the message + * - `excludedActivityTypes` (array) - the activities to exclude from the ActionSheet + * + * NOTE: if `url` points to a local file, or is a base64-encoded + * uri, the file it points to will be loaded and shared directly. + * In this way, you can share images, videos, PDF files, etc. + */ + showShareActionSheetWithOptions: (options: ShareActionSheetIOSOptions, failureCallback: (error: Error) => void, successCallback: (success: boolean, method: string) => void) => void +} + +export type ShareContent = { + title?: string + message: string +} | { + title?: string + url: string +} + +export type ShareOptions = { + dialogTitle?: string + excludeActivityTypes?: Array + tintColor?: string +} + +export interface ShareStatic { + /** + * Open a dialog to share text content. + * + * In iOS, Returns a Promise which will be invoked an object containing `action`, `activityType`. + * If the user dismissed the dialog, the Promise will still be resolved with action being `Share.dismissedAction` + * and all the other keys being undefined. + * + * In Android, Returns a Promise which always be resolved with action being `Share.sharedAction`. + * + * ### Content + * + * - `message` - a message to share + * - `title` - title of the message + * + * #### iOS + * + * - `url` - an URL to share + * + * At least one of URL and message is required. + * + * ### Options + * + * #### iOS + * + * - `excludedActivityTypes` + * - `tintColor` + * + * #### Android + * + * - `dialogTitle` + * + */ + share(content: ShareContent, options: ShareOptions): Promise + sharedAction: string + dismissedAction: string +} + +/** + * @see https://facebook.github.io/react-native/docs/alert.html#content + */ +export interface AlertButton { + text?: string + onPress?: () => void + style?: "default" | "cancel" | "destructive" +} + +interface AlertOptions { + /** @platform android */ + cancelable?: boolean; +} + +/** + * Launches an alert dialog with the specified title and message. + * + * Optionally provide a list of buttons. Tapping any button will fire the + * respective onPress callback and dismiss the alert. By default, the only + * button will be an 'OK' button. + * + * This is an API that works both on iOS and Android and can show static + * alerts. To show an alert that prompts the user to enter some information, + * see `AlertIOS`; entering text in an alert is common on iOS only. + * + * ## iOS + * + * On iOS you can specify any number of buttons. Each button can optionally + * specify a style, which is one of 'default', 'cancel' or 'destructive'. + * + * ## Android + * + * On Android at most three buttons can be specified. Android has a concept + * of a neutral, negative and a positive button: + * + * - If you specify one button, it will be the 'positive' one (such as 'OK') + * - Two buttons mean 'negative', 'positive' (such as 'Cancel', 'OK') + * - Three buttons mean 'neutral', 'negative', 'positive' (such as 'Later', 'Cancel', 'OK') + * + * ``` + * // Works on both iOS and Android + * Alert.alert( + * 'Alert Title', + * 'My Alert Msg', + * [ + * {text: 'Ask me later', onPress: () => console.log('Ask me later pressed')}, + * {text: 'Cancel', onPress: () => console.log('Cancel Pressed'), style: 'cancel'}, + * {text: 'OK', onPress: () => console.log('OK Pressed')}, + * ] + * ) + * ``` + */ +export interface AlertStatic { + alert: (title: string, message?: string, buttons?: AlertButton[], options?: AlertOptions, type?: string) => void +} + +/** + * Wrapper around the Android native module. + */ +export interface AlertAndroidStatic { + alert: (title: string, message?: string, buttons?: AlertButton[], options?: AlertOptions) => void +} + +/** + * //FIXME: No documentation - inferred from RCTAdSupport.m + */ +export interface AdSupportIOSStatic { + getAdvertisingId: (onSuccess: (deviceId: string) => void, onFailure: (err: Error) => void) => void + getAdvertisingTrackingEnabled: (onSuccess: (hasTracking: boolean) => void, onFailure: (err: Error) => void) => void +} + +interface AlertIOSButton { + text: string + onPress?: () => void + style?: "default" | "cancel" | "destructive" +} + +export type AlertType = "default" | "plain-text" | "secure-text" | "login-password" + +/** + * @description + * `AlertIOS` provides functionality to create an iOS alert dialog with a + * message or create a prompt for user input. + * + * We recommend using the [`Alert.alert`](/docs/alert.html) method for + * cross-platform support if you don't need to create iOS-only prompts. + * + * @see https://facebook.github.io/react-native/docs/alertios.html#content + */ +export interface AlertIOSStatic { + + /** + * Create and display a popup alert. + * @static + * @method alert + * @param title The dialog's title. + * @param message An optional message that appears below + * the dialog's title. + * @param callbackOrButtons This optional argument should + * be either a single-argument function or an array of buttons. If passed + * a function, it will be called when the user taps 'OK'. + * + * If passed an array of button configurations, each button should include + * a `text` key, as well as optional `onPress` and `style` keys. `style` + * should be one of 'default', 'cancel' or 'destructive'. + * @param type Deprecated, do not use. + */ + alert: ( title: string, message?: string, callbackOrButtons?: (() => void) | Array, type?: AlertType ) => void + + /** + * Create and display a prompt to enter some text. + * @static + * @method prompt + * @param title The dialog's title. + * @param message An optional message that appears above the text + * input. + * @param callbackOrButtons This optional argument should + * be either a single-argument function or an array of buttons. If passed + * a function, it will be called with the prompt's value when the user + * taps 'OK'. + * + * If passed an array of button configurations, each button should include + * a `text` key, as well as optional `onPress` and `style` keys (see + * example). `style` should be one of 'default', 'cancel' or 'destructive'. + * @param type This configures the text input. One of 'plain-text', + * 'secure-text' or 'login-password'. + * @param defaultValue The default text in text input. + */ + prompt: ( title: string, message?: string, callbackOrButtons?: ((value: string) => void) | Array, type?: AlertType, defaultValue?: string ) => void +} + +/** + * AppStateIOS can tell you if the app is in the foreground or background, + * and notify you when the state changes. + * + * AppStateIOS is frequently used to determine the intent and proper behavior + * when handling push notifications. + * + * iOS App States + * active - The app is running in the foreground + * background - The app is running in the background. The user is either in another app or on the home screen + * inactive - This is a transition state that currently never happens for typical React Native apps. + * + * For more information, see Apple's documentation: https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/TheAppLifeCycle/TheAppLifeCycle.html + * + * @see https://facebook.github.io/react-native/docs/appstateios.html#content + */ +export type AppStateEvent = "change" | "memoryWarning" +export type AppStateStatus = "active" | "background" | "inactive" + +export interface AppStateStatic { + + currentState: string + + /** + * Add a handler to AppState changes by listening to the change event + * type and providing the handler + */ + addEventListener(type: AppStateEvent, listener: (state: AppStateStatus) => void): void + + /** + * Remove a handler by passing the change event type and the handler + */ + removeEventListener(type: AppStateEvent, listener: (state: AppStateStatus) => void): void +} + +/** + * AsyncStorage is a simple, unencrypted, asynchronous, persistent, key-value storage + * system that is global to the app. It should be used instead of LocalStorage. + * + * It is recommended that you use an abstraction on top of `AsyncStorage` + * instead of `AsyncStorage` directly for anything more than light usage since + * it operates globally. + * + * On iOS, `AsyncStorage` is backed by native code that stores small values in a + * serialized dictionary and larger values in separate files. On Android, + * `AsyncStorage` will use either [RocksDB](http://rocksdb.org/) or SQLite + * based on what is available. + * + * @see https://facebook.github.io/react-native/docs/asyncstorage.html#content + */ +export interface AsyncStorageStatic { + + /** + * Fetches key and passes the result to callback, along with an Error if there is any. + */ + getItem(key: string, callback?: (error?: Error, result?: string) => void): Promise + + /** + * Sets value for key and calls callback on completion, along with an Error if there is any + */ + setItem(key: string, value: string, callback?: (error?: Error) => void): Promise + + removeItem(key: string, callback?: (error?: Error) => void): Promise + + /** + * Merges existing value with input value, assuming they are stringified json. Returns a Promise object. + * Not supported by all native implementation + */ + mergeItem(key: string, value: string, callback?: (error?: Error) => void): Promise + + /** + * Erases all AsyncStorage for all clients, libraries, etc. You probably don't want to call this. + * Use removeItem or multiRemove to clear only your own keys instead. + */ + clear(callback?: (error?: Error) => void): Promise + + /** + * Gets all keys known to the app, for all callers, libraries, etc + */ + getAllKeys(callback?: (error?: Error, keys?: string[]) => void): Promise + + /** + * multiGet invokes callback with an array of key-value pair arrays that matches the input format of multiSet + */ + multiGet(keys: string[], callback?: (errors?: Error[], result?: [string, string][]) => void): Promise<[string, string][]> + + /** + * multiSet and multiMerge take arrays of key-value array pairs that match the output of multiGet, + * + * multiSet([['k1', 'val1'], ['k2', 'val2']], cb); + */ + multiSet(keyValuePairs: string[][], callback?: (errors?: Error[]) => void): Promise + + /** + * Delete all the keys in the keys array. + */ + multiRemove(keys: string[], callback?: (errors?: Error[]) => void): Promise + + /** + * Merges existing values with input values, assuming they are stringified json. + * Returns a Promise object. + * + * Not supported by all native implementations. + */ + multiMerge(keyValuePairs: string[][], callback?: (errors?: Error[]) => void): Promise +} + +export type BackPressEventName = "hardwareBackPress" + +/** + * Detect hardware back button presses, and programmatically invoke the + * default back button functionality to exit the app if there are no + * listeners or if none of the listeners return true. + * Methods don't have more detailed documentation as of 0.25. + */ +export interface BackAndroidStatic { + exitApp(): void; + addEventListener(eventName: BackPressEventName, handler: () => void): void; + removeEventListener(eventName: BackPressEventName, handler: () => void): void; +} + +export interface ButtonProperties { + title: string; + onPress: () => any; + color?: string; + accessibilityLabel?: string; + disabled?: boolean; +} + +export interface ButtonStatic extends React.ComponentClass { +} + +export type CameraRollGroupType = "Album" | "All" | "Event" | "Faces" | "Library" | "PhotoStream" | "SavedPhotos"; +export type CameraRollAssetType = "All" | "Videos" | "Photos"; + +export interface CameraRollFetchParams { + first: number; + after?: string; + groupTypes?: CameraRollGroupType + groupName?: string + assetType?: CameraRollAssetType +} + +export interface CameraRollNodeInfo { + image: Image; + group_name: string; + timestamp: number; + location: any; +} + +export interface CameraRollEdgeInfo { + node: CameraRollNodeInfo; +} + +export interface CameraRollAssetInfo { + edges: CameraRollEdgeInfo[]; + page_info: { + has_next_page: boolean; + end_cursor: string; + }; +} + +export interface GetPhotosParamType { + first: number + after?: string + groupTypes?: CameraRollGroupType + groupName?: string + assetType?: CameraRollAssetType + mimeTypes?: string[] +} + +export interface GetPhotosReturnType { + edges: { + node: { + type: string + group_name: string + image: { + uri: string + height: number + width: number + isStored?: boolean + } + timestamp: number + location: { + latitude: number + longitude: number + altitude: number + heading: number + speed: number + } + } + }[] + + page_info: { + has_next_page: boolean + start_cursor?: string + end_cursor?: string + } +} + +/** + * CameraRoll provides access to the local camera roll / gallery. + * Before using this you must link the RCTCameraRoll library. + * You can refer to (Linking)[https://facebook.github.io/react-native/docs/linking-libraries-ios.html] for help. + */ +export interface CameraRollStatic { + + GroupTypesOptions: CameraRollGroupType[] //'Album','All','Event','Faces','Library','PhotoStream','SavedPhotos' + AssetTypeOptions: CameraRollAssetType[] // "All", "Videos", "Photos" + + /** + * Saves the image to the camera roll / gallery. + * + * @tag On Android, this is a local URI, such as "file:///sdcard/img.png". + * On iOS, the tag can be one of the following: + * local URI + * assets-library tag + * a tag not maching any of the above, which means the image data will be stored in memory (and consume memory as long as the process is alive) + * + * @deprecated use saveToCameraRoll instead + */ + saveImageWithTag(tag: string): Promise + + /** + * Saves the photo or video to the camera roll / gallery. + * + * On Android, the tag must be a local image or video URI, such as `"file:///sdcard/img.png"`. + * + * On iOS, the tag can be any image URI (including local, remote asset-library and base64 data URIs) + * or a local video file URI (remote or data URIs are not supported for saving video at this time). + * + * If the tag has a file extension of .mov or .mp4, it will be inferred as a video. Otherwise + * it will be treated as a photo. To override the automatic choice, you can pass an optional + * `type` parameter that must be one of 'photo' or 'video'. + * + * Returns a Promise which will resolve with the new URI. + */ + saveToCameraRoll(tag: string, type?: 'photo' | 'video'): Promise + + /** + * Saves the photo or video to the camera roll / gallery. + * + * On Android, the tag must be a local image or video URI, such as `"file:///sdcard/img.png"`. + * + * On iOS, the tag can be any image URI (including local, remote asset-library and base64 data URIs) + * or a local video file URI (remote or data URIs are not supported for saving video at this time). + * + * If the tag has a file extension of .mov or .mp4, it will be inferred as a video. Otherwise + * it will be treated as a photo. To override the automatic choice, you can pass an optional + * `type` parameter that must be one of 'photo' or 'video'. + * + * Returns a Promise which will resolve with the new URI. + */ + saveToCameraRoll(tag: string, type?: 'photo' | 'video'): Promise + + /** + * Invokes callback with photo identifier objects from the local camera roll of the device matching shape defined by getPhotosReturnChecker. + * + * @param {object} params See getPhotosParamChecker. + */ + getPhotos(params: GetPhotosParamType): Promise; +} + +/** Clipboard gives you an interface for setting and getting content from Clipboard on both iOS and Android */ +export interface ClipboardStatic { + getString(): Promise; + setString(content: string): void; +} + +export interface DatePickerAndroidOpenOption { + date?: Date | number + minDate?: Date | number + maxDate?: Date | number +} + +// Deduced from DatePickerAndroid.android.js +export interface DatePickerAndroidOpenReturn { + action: string // "dateSetAction" | "dismissedAction" + year?: number + month?: number + day?: number +} + +export interface DatePickerAndroidStatic { + /* + Opens the standard Android date picker dialog. + + The available keys for the options object are: + * date (Date object or timestamp in milliseconds) - date to show by default + * minDate (Date object or timestamp in milliseconds) - minimum date that can be selected + * maxDate (Date object or timestamp in milliseconds) - maximum date that can be selected + + Returns a Promise which will be invoked an object containing action, year, month (0-11), day if the user picked + a date. If the user dismissed the dialog, the Promise will still be resolved with action being + DatePickerAndroid.dismissedAction and all the other keys being undefined. Always check whether the action before + reading the values. + + Note the native date picker dialog has some UI glitches on Android 4 and lower when using the minDate and maxDate options. + */ + open(options?: DatePickerAndroidOpenOption): Promise + + /** + * A date has been selected. + */ + dateSetAction: string + + /** + * The dialog has been dismissed. + */ + dismissedAction: string +} + +export interface FetchableListenable { + fetch: () => Promise + + /** + * eventName is expected to be `change` + * //FIXME: No doc - inferred from NetInfo.js + */ + addEventListener: (eventName: string, listener: (result: T) => void) => void + + /** + * eventName is expected to be `change` + * //FIXME: No doc - inferred from NetInfo.js + */ + removeEventListener: (eventName: string, listener: (result: T) => void) => void +} + +export interface IntentAndroidStatic { + /** + * Starts a corresponding external activity for the given URL. + + For example, if the URL is "https://www.facebook.com", the system browser will be opened, or the "choose application" dialog will be shown. + + You can use other URLs, like a location (e.g. "geo:37.484847,-122.148386"), a contact, or any other URL that can be opened with {@code Intent.ACTION_VIEW}. + + NOTE: This method will fail if the system doesn't know how to open the specified URL. If you're passing in a non-http(s) URL, it's best to check {@code canOpenURL} first. + + NOTE: For web URLs, the protocol ("http://", "https://") must be set accordingly! + + @deprecated + */ + openURL(url: string): void + + /** + * Determine whether or not an installed app can handle a given URL. + + You can use other URLs, like a location (e.g. "geo:37.484847,-122.148386"), a contact, or any other URL that can be opened with {@code Intent.ACTION_VIEW}. + + NOTE: For web URLs, the protocol ("http://", "https://") must be set accordingly! + + @param URL the URL to open + + @deprecated + */ + canOpenURL(url: string, callback: (supported: boolean) => void): void + + /** + * If the app launch was triggered by an app link with {@code Intent.ACTION_VIEW}, it will give the link url, otherwise it will give null + + Refer http://developer.android.com/training/app-indexing/deep-linking.html#handling-intents + + @deprecated + */ + getInitialURL(callback: (url: string) => void): void +} + +export interface LinkingStatic extends NativeEventEmitter { + /** + * Add a handler to Linking changes by listening to the `url` event type + * and providing the handler + */ + addEventListener(type: string, handler: (event: { url: string }) => void): void + + /** + * Remove a handler by passing the `url` event type and the handler + */ + removeEventListener(type: string, handler: (event: { url: string }) => void): void + + /** + * Try to open the given url with any of the installed apps. + * You can use other URLs, like a location (e.g. "geo:37.484847,-122.148386"), a contact, or any other URL that can be opened with the installed apps. + * NOTE: This method will fail if the system doesn't know how to open the specified URL. If you're passing in a non-http(s) URL, it's best to check {@code canOpenURL} first. + * NOTE: For web URLs, the protocol ("http://", "https://") must be set accordingly! + */ + openURL(url: string): Promise + + /** + * Determine whether or not an installed app can handle a given URL. + * NOTE: For web URLs, the protocol ("http://", "https://") must be set accordingly! + * NOTE: As of iOS 9, your app needs to provide the LSApplicationQueriesSchemes key inside Info.plist. + * @param URL the URL to open + */ + canOpenURL(url: string): Promise + + /** + * If the app launch was triggered by an app link with, it will give the link url, otherwise it will give null + * NOTE: To support deep linking on Android, refer http://developer.android.com/training/app-indexing/deep-linking.html#handling-intents + */ + getInitialURL(): Promise +} + +export interface LinkingIOSStatic { + /** + * Add a handler to LinkingIOS changes by listening to the url event type and providing the handler + @deprecated + */ + addEventListener(type: string, handler: (event: { url: string }) => void): void + + /** + * Remove a handler by passing the url event type and the handler + @deprecated + */ + removeEventListener(type: string, handler: (event: { url: string }) => void): void + + /** + * Try to open the given url with any of the installed apps. + @deprecated + */ + openURL(url: string): void + + /** + * Determine whether or not an installed app can handle a given URL. The callback function will be called with bool supported as the only argument + NOTE: As of iOS 9, your app needs to provide the LSApplicationQueriesSchemes key inside Info.plist. + @deprecated + */ + canOpenURL(url: string, callback: (supported: boolean) => void): void + + /** + * If the app launch was triggered by an app link, it will pop the link url, otherwise it will return null + @deprecated + */ + popInitialURL(): string; +} + + +/** + * NetInfo exposes info about online/offline status + * + * Asynchronously determine if the device is online and on a cellular network. + * + * - `none` - device is offline + * - `wifi` - device is online and connected via wifi, or is the iOS simulator + * - `cell` - device is connected via Edge, 3G, WiMax, or LTE + * - `unknown` - error case and the network status is unknown + * @see https://facebook.github.io/react-native/docs/netinfo.html#content + */ + +// This is from code, a few items more than documentation@0.25 +export type NetInfoReturnType = "none" | "wifi" | "cell" | "unknown" | + "NONE" | "MOBILE" | "WIFI" | "MOBILE_MMS" | "MOBILE_SUPL" | "MOBILE_DUN" | + "MOBILE_HIPRI" | "WIMAX" | "BLUETOOTH" | "DUMMY" | "ETHERNET" | "MOBILE_FOTA" | + "MOBILE_IMS" | "MOBILE_CBS" | "WIFI_P2P" | "MOBILE_IA" | "MOBILE_EMERGENCY" | + "PROXY" | "VPN" | "UNKNOWN" + +export interface NetInfoStatic extends FetchableListenable { + + /** + * + * Available on all platforms. + * Asynchronously fetch a boolean to determine internet connectivity. + */ + isConnected: FetchableListenable + + /** + * Available on Android. Detect if the current active connection is + * metered or not. A network is classified as metered when the user is + * sensitive to heavy data usage on that connection due to monetary + * costs, data limitations or battery/performance issues. + */ + isConnectionExpensive: Promise +} + + +export interface PanResponderGestureState { + + /** + * ID of the gestureState- persisted as long as there at least one touch on + */ + stateID: number + + /** + * the latest screen coordinates of the recently-moved touch + */ + moveX: number + + /** + * the latest screen coordinates of the recently-moved touch + */ + moveY: number + + /** + * the screen coordinates of the responder grant + */ + x0: number + + /** + * the screen coordinates of the responder grant + */ + y0: number + + /** + * accumulated distance of the gesture since the touch started + */ + dx: number + + /** + * accumulated distance of the gesture since the touch started + */ + dy: number + + /** + * current velocity of the gesture + */ + vx: number + + /** + * current velocity of the gesture + */ + vy: number + + /** + * Number of touches currently on screen + */ + numberActiveTouches: number + + + // All `gestureState` accounts for timeStamps up until: + _accountsForMovesUpTo: number +} + + +/** + * @see documentation of GestureResponderHandlers + */ +export interface PanResponderCallbacks { + onMoveShouldSetPanResponder?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean + onStartShouldSetPanResponder?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void + onPanResponderGrant?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void + onPanResponderMove?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void + onPanResponderRelease?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void + onPanResponderTerminate?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void + + onMoveShouldSetPanResponderCapture?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean + onStartShouldSetPanResponderCapture?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean + onPanResponderReject?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void + onPanResponderStart?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void + onPanResponderEnd?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => void + onPanResponderTerminationRequest?: (e: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean +} + +export interface PanResponderInstance { + panHandlers: GestureResponderHandlers +} + +/** + * PanResponder reconciles several touches into a single gesture. + * It makes single-touch gestures resilient to extra touches, + * and can be used to recognize simple multi-touch gestures. + * + * It provides a predictable wrapper of the responder handlers provided by the gesture responder system. + * For each handler, it provides a new gestureState object alongside the normal event. + */ +export interface PanResponderStatic { + /** + * @param config Enhanced versions of all of the responder callbacks + * that provide not only the typical `ResponderSyntheticEvent`, but also the + * `PanResponder` gesture state. Simply replace the word `Responder` with + * `PanResponder` in each of the typical `onResponder*` callbacks. For + * example, the `config` object would look like: + * + * - `onMoveShouldSetPanResponder: (e, gestureState) => {...}` + * - `onMoveShouldSetPanResponderCapture: (e, gestureState) => {...}` + * - `onStartShouldSetPanResponder: (e, gestureState) => {...}` + * - `onStartShouldSetPanResponderCapture: (e, gestureState) => {...}` + * - `onPanResponderReject: (e, gestureState) => {...}` + * - `onPanResponderGrant: (e, gestureState) => {...}` + * - `onPanResponderStart: (e, gestureState) => {...}` + * - `onPanResponderEnd: (e, gestureState) => {...}` + * - `onPanResponderRelease: (e, gestureState) => {...}` + * - `onPanResponderMove: (e, gestureState) => {...}` + * - `onPanResponderTerminate: (e, gestureState) => {...}` + * - `onPanResponderTerminationRequest: (e, gestureState) => {...}` + * + * In general, for events that have capture equivalents, we update the + * gestureState once in the capture phase and can use it in the bubble phase + * as well. + * + * Be careful with onStartShould* callbacks. They only reflect updated + * `gestureState` for start/end events that bubble/capture to the Node. + * Once the node is the responder, you can rely on every start/end event + * being processed by the gesture and `gestureState` being updated + * accordingly. (numberActiveTouches) may not be totally accurate unless you + * are the responder. + */ + create(config: PanResponderCallbacks): PanResponderInstance +} + +export interface Rationale { + title: string + message: string +} + +export type Permission = + "android.permission.READ_CALENDAR" | + "android.permission.WRITE_CALENDAR" | + "android.permission.CAMERA" | + "android.permission.READ_CONTACTS" | + "android.permission.WRITE_CONTACTS" | + "android.permission.GET_ACCOUNTS" | + "android.permission.ACCESS_FINE_LOCATION" | + "android.permission.ACCESS_COARSE_LOCATION" | + "android.permission.RECORD_AUDIO" | + "android.permission.READ_PHONE_STATE" | + "android.permission.CALL_PHONE" | + "android.permission.READ_CALL_LOG" | + "android.permission.WRITE_CALL_LOG" | + "com.android.voicemail.permission.ADD_VOICEMAIL" | + "android.permission.USE_SIP" | + "android.permission.PROCESS_OUTGOING_CALLS" | + "android.permission.BODY_SENSORS" | + "android.permission.SEND_SMS" | + "android.permission.RECEIVE_SMS" | + "android.permission.READ_SMS" | + "android.permission.RECEIVE_WAP_PUSH" | + "android.permission.RECEIVE_MMS" | + "android.permission.READ_EXTERNAL_STORAGE" | + "android.permission.WRITE_EXTERNAL_STORAGE" + +export interface PermissionsAndroidStatic { + /** + * A list of specified "dangerous" permissions that require prompting the user + */ + PERMISSIONS: {[key: string]: Permission} + new(): PermissionsAndroidStatic + /** + * Returns a promise resolving to a boolean value as to whether the specified + * permissions has been granted + */ + checkPermission(permission: Permission): Promise + /** + * Prompts the user to enable a permission and returns a promise resolving to a + * boolean value indicating whether the user allowed or denied the request + * + * If the optional rationale argument is included (which is an object with a + * `title` and `message`), this function checks with the OS whether it is + * necessary to show a dialog explaining why the permission is needed + * (https://developer.android.com/training/permissions/requesting.html#explain) + * and then shows the system permission dialog + */ + requestPermission(permission: Permission, rationale?: Rationale): Promise +} + +export interface PushNotificationPermissions { + alert?: boolean + badge?: boolean + sound?: boolean +} + +export interface PushNotification { + + + /** + * An alias for `getAlert` to get the notification's main message string + */ + getMessage(): string | Object + + /** + * Gets the sound string from the `aps` object + */ + getSound(): string + + /** + * Gets the notification's main message from the `aps` object + */ + getAlert(): string | Object + + /** + * Gets the badge count number from the `aps` object + */ + getBadgeCount(): number + + /** + * Gets the data object on the notif + */ + getData(): Object + +} + + +type PresentLocalNotificationDetails = { + alertBody: string + alertAction: string + soundName?: string + category?: string + userInfo?: Object + applicationIconBadgeNumber?: number +} + +type ScheduleLocalNotificationDetails = { + fireDate: Date + alertBody: string + alertAction: string + soundName?: string + category?: string + userInfo?: Object + applicationIconBadgeNumber?: number +} + +export type PushNotificationEventName = "notification" | "localNotification" | "register" | "registrationError" + +/** + * Handle push notifications for your app, including permission handling and icon badge number. + * @see https://facebook.github.io/react-native/docs/pushnotificationios.html#content + * + * //FIXME: BGR: The documentation seems completely off compared to the actual js implementation. I could never get the example to run + */ +export interface PushNotificationIOSStatic { + + /** + * Schedules the localNotification for immediate presentation. + * details is an object containing: + * alertBody : The message displayed in the notification alert. + * alertAction : The "action" displayed beneath an actionable notification. Defaults to "view"; + * soundName : The sound played when the notification is fired (optional). + * category : The category of this notification, required for actionable notifications (optional). + * userInfo : An optional object containing additional notification data. + * applicationIconBadgeNumber (optional) : The number to display as the app's icon badge. The default value of this property is 0, which means that no badge is displayed. + */ + presentLocalNotification(details: PresentLocalNotificationDetails): void + + /** + * Schedules the localNotification for future presentation. + * details is an object containing: + * fireDate : The date and time when the system should deliver the notification. + * alertBody : The message displayed in the notification alert. + * alertAction : The "action" displayed beneath an actionable notification. Defaults to "view"; + * soundName : The sound played when the notification is fired (optional). + * category : The category of this notification, required for actionable notifications (optional). + * userInfo : An optional object containing additional notification data. + * applicationIconBadgeNumber (optional) : The number to display as the app's icon badge. Setting the number to 0 removes the icon badge. + */ + scheduleLocalNotification(details: ScheduleLocalNotificationDetails): void + + /** + * Cancels all scheduled localNotifications + */ + cancelAllLocalNotifications(): void + + /** + * Cancel local notifications. + * Optionally restricts the set of canceled notifications to those notifications whose userInfo fields match the corresponding fields in the userInfo argument. + */ + cancelLocalNotifications(userInfo: Object): void + + /** + * Sets the badge number for the app icon on the home screen + */ + setApplicationIconBadgeNumber(number: number): void + + /** + * Gets the current badge number for the app icon on the home screen + */ + getApplicationIconBadgeNumber(callback: (badge: number) => void): void + + /** + * Gets the local notifications that are currently scheduled. + */ + getScheduledLocalNotifications(callback: (notifications: ScheduleLocalNotificationDetails[]) => void): void + + /** + * Attaches a listener to remote notifications while the app is running in the + * foreground or the background. + * + * The handler will get be invoked with an instance of `PushNotificationIOS` + * + * The type MUST be 'notification' + */ + addEventListener(type: PushNotificationEventName, handler: (notification: PushNotification) => void): void + + /** + * Removes the event listener. Do this in `componentWillUnmount` to prevent + * memory leaks + */ + removeEventListener(type: PushNotificationEventName, handler: (notification: PushNotification) => void): void + + /** + * Requests all notification permissions from iOS, prompting the user's + * dialog box. + */ + requestPermissions(permissions?: PushNotificationPermissions[]): void + + /** + * Requests all notification permissions from iOS, prompting the user's + * dialog box. + */ + requestPermissions(permissions?: PushNotificationPermissions): Promise + + /** + * Unregister for all remote notifications received via Apple Push + * Notification service. + * You should call this method in rare circumstances only, such as when + * a new version of the app removes support for all types of remote + * notifications. Users can temporarily prevent apps from receiving + * remote notifications through the Notifications section of the + * Settings app. Apps unregistered through this method can always + * re-register. + */ + abandonPermissions(): void + + /** + * See what push permissions are currently enabled. `callback` will be + * invoked with a `permissions` object: + * + * - `alert` :boolean + * - `badge` :boolean + * - `sound` :boolean + */ + checkPermissions(callback: (permissions: PushNotificationPermissions) => void): void + + /** + * This method returns a promise that resolves to either the notification + * object if the app was launched by a push notification, or `null` otherwise. + */ + getInitialNotification(): PushNotification +} + +export interface SettingsStatic { + get(key: string): any + set(settings: Object): void + watchKeys(keys: string | Array, callback: (() => void)): number + clearWatch(watchId: number): void +} + + +/** + * @enum('default', 'light-content') + */ +export type StatusBarStyle = "default" | "light-content" + +/** + * @enum('fade', 'slide') + */ +export type StatusBarAnimation = "none" | "fade" | "slide" + +export interface StatusBarPropertiesIOS extends React.Props { + /** + * Sets the color of the status bar text. + */ + barStyle?: StatusBarStyle + + /** + * If the network activity indicator should be visible. + */ + networkActivityIndicatorVisible?: boolean + + /** + * The transition effect when showing and hiding the status bar using + * the hidden prop. Defaults to 'fade'. + */ + showHideTransition?: "fade" | "slide" +} + +export interface StatusBarPropertiesAndroid extends React.Props { + /** + * The background color of the status bar. + */ + backgroundColor?: string + + /** + * If the status bar is translucent. When translucent is set to true, + * the app will draw under the status bar. This is useful when using a + * semi transparent status bar color. + */ + translucent?: boolean +} + +export interface StatusBarProperties extends StatusBarPropertiesIOS, StatusBarPropertiesAndroid, React.Props { + + /** + * If the transition between status bar property changes should be + * animated. Supported for backgroundColor, barStyle and hidden. + */ + animated?: boolean + + /** + * If the status bar is hidden. + */ + hidden?: boolean +} + +export interface StatusBarStatic extends React.ComponentClass { + + /** + * The current height of the status bar on the device. + * @platform android + */ + currentHeight?: number + + /** + * Show or hide the status bar + * @param hidden The dialog's title. + * @param animation Optional animation when + * changing the status bar hidden property. + */ + setHidden: (hidden: boolean, animation?: StatusBarAnimation) => void + + /** + * Set the status bar style + * @param style Status bar style to set + * @param animated Animate the style change. + */ + setBarStyle: (style: StatusBarStyle, animated?: boolean) => void + + /** + * Control the visibility of the network activity indicator + * @param visible Show the indicator. + */ + setNetworkActivityIndicatorVisible: (visible: boolean) => void + + /** + * Set the background color for the status bar + * @param color Background color. + * @param animated Animate the style change. + */ + setBackgroundColor: (color: string, animated?: boolean) => void + + /** + * Control the translucency of the status bar + * @param translucent Set as translucent. + */ + setTranslucent: (translucent: boolean) => void +} + +/** + * StatusBarIOS is deprecated. + * Use `StatusBar` for mutating the status bar. + */ +export interface StatusBarIOSStatic extends NativeEventEmitter { +} + +type TimePickerAndroidOpenOptions = { + hour?: number + minute?: number + is24Hour?: boolean +} + +/** + * Opens the standard Android time picker dialog. + * + * ### Example + * + * ``` + * try { + * const {action, hour, minute} = await TimePickerAndroid.open({ + * hour: 14, + * minute: 0, + * is24Hour: false, // Will display '2 PM' + * }); + * if (action !== TimePickerAndroid.dismissedAction) { + * // Selected hour (0-23), minute (0-59) + * } + * } catch ({code, message}) { + * console.warn('Cannot open time picker', message); + * } + * ``` + */ +export interface TimePickerAndroidStatic { + + /** + * Opens the standard Android time picker dialog. + * + * The available keys for the `options` object are: + * * `hour` (0-23) - the hour to show, defaults to the current time + * * `minute` (0-59) - the minute to show, defaults to the current time + * * `is24Hour` (boolean) - If `true`, the picker uses the 24-hour format. If `false`, + * the picker shows an AM/PM chooser. If undefined, the default for the current locale + * is used. + * + * Returns a Promise which will be invoked an object containing `action`, `hour` (0-23), + * `minute` (0-59) if the user picked a time. If the user dismissed the dialog, the Promise will + * still be resolved with action being `TimePickerAndroid.dismissedAction` and all the other keys + * being undefined. **Always** check whether the `action` before reading the values. + */ + open(options: TimePickerAndroidOpenOptions): Promise<{ action: string, hour: number, minute: number }> + + /** + * A time has been selected. + */ + timeSetAction: string + + /** + * The dialog has been dismissed. + */ + dismissedAction: string +} + +/** + * This exposes the native ToastAndroid module as a JS module. This has a function 'show' + * which takes the following parameters: + * + * 1. String message: A string with the text to toast + * 2. int duration: The duration of the toast. May be ToastAndroid.SHORT or ToastAndroid.LONG + * + * There is also a function `showWithGravity` to specify the layout gravity. May be + * ToastAndroid.TOP, ToastAndroid.BOTTOM, ToastAndroid.CENTER + */ +export interface ToastAndroidStatic { + /** + * String message: A string with the text to toast + * int duration: The duration of the toast. + * May be ToastAndroid.SHORT or ToastAndroid.LONG + */ + show(message: string, duration: number): void + /** `gravity` may be ToastAndroid.TOP, ToastAndroid.BOTTOM, ToastAndroid.CENTER */ + showWithGravity( + message: string, + duration: number, + gravity: number + ): void + // Toast duration constants + SHORT: number + LONG: number + // Toast gravity constants + TOP: number + BOTTOM: number + CENTER: number +} + +export interface UIManagerStatic { + /** + * Capture an image of the screen, window or an individual view. The image + * will be stored in a temporary file that will only exist for as long as the + * app is running. + * + * The `view` argument can be the literal string `window` if you want to + * capture the entire window, or it can be a reference to a specific + * React Native component. + * + * The `options` argument may include: + * - width/height (number) - the width and height of the image to capture. + * - format (string) - either 'png' or 'jpeg'. Defaults to 'png'. + * - quality (number) - the quality when using jpeg. 0.0 - 1.0 (default). + * + * Returns a Promise (tempFilePath) + * @platform ios + */ + takeSnapshot: ( + view ?: 'window' | React.ReactElement | number, + options ?: { + width ?: number, + height ?: number, + format ?: 'png' | 'jpeg', + quality ?: number, + } + ) => Promise +} + +export interface SwitchPropertiesIOS extends ViewProperties, React.Props { + + /** + * Background color when the switch is turned on. + */ + onTintColor?: string + + /** + * Color of the foreground switch grip. + */ + thumbTintColor?: string + + /** + * Background color when the switch is turned off. + */ + tintColor?: string + + ref?: React.Ref +} + +export interface SwitchProperties extends SwitchPropertiesIOS, React.Props { + + /** + * If true the user won't be able to toggle the switch. + * Default value is false. + */ + disabled?: boolean + + /** + * Invoked with the new value when the value changes. + */ + onValueChange?: (value: boolean) => void + + /** + * Used to locate this view in end-to-end tests. + */ + testID?: string + + /** + * The value of the switch. If true the switch will be turned on. + * Default value is false. + */ + value?: boolean + style?: ViewStyle +} + +/** + * Renders a boolean input. + * + * This is a controlled component that requires an `onValueChange` callback that + * updates the `value` prop in order for the component to reflect user actions. + * If the `value` prop is not updated, the component will continue to render + * the supplied `value` prop instead of the expected result of any user actions. + */ +export interface SwitchStatic extends NativeMethodsMixin, React.ClassicComponentClass { + +} + +/** + * NOTE: `VibrationIOS` is being deprecated. Use `Vibration` instead. + * + * The Vibration API is exposed at VibrationIOS.vibrate(). + * On iOS, calling this function will trigger a one second vibration. + * The vibration is asynchronous so this method will return immediately. + * + * There will be no effect on devices that do not support Vibration, eg. the iOS simulator. + * + * Vibration patterns are currently unsupported. + * + * @see https://facebook.github.io/react-native/docs/vibrationios.html#content + */ +export interface VibrationIOSStatic { + /** + * @deprecated + */ + vibrate(): void +} + +/** + * The Vibration API is exposed at `Vibration.vibrate()`. + * The vibration is asynchronous so this method will return immediately. + * + * There will be no effect on devices that do not support Vibration, eg. the simulator. + * + * **Note for android** + * add `` to `AndroidManifest.xml` + * + * **Android Usage:** + * + * [0, 500, 200, 500] + * V(0.5s) --wait(0.2s)--> V(0.5s) + * + * [300, 500, 200, 500] + * --wait(0.3s)--> V(0.5s) --wait(0.2s)--> V(0.5s) + * + * **iOS Usage:** + * if first argument is 0, it will not be included in pattern array. + * + * [0, 1000, 2000, 3000] + * V(fixed) --wait(1s)--> V(fixed) --wait(2s)--> V(fixed) --wait(3s)--> V(fixed) + */ +export interface VibrationStatic { + vibrate(pattern: number | number[], repeat: boolean): void + + /** + * Stop vibration + */ + cancel(): void +} + +/** + * This class implements common easing functions. The math is pretty obscure, + * but this cool website has nice visual illustrations of what they represent: + * http://xaedes.de/dev/transitions/ + */ +export type EasingFunction = (value: number) => number; +export interface EasingStatic { + step0: EasingFunction; + step1: EasingFunction; + linear: EasingFunction; + ease: EasingFunction; + quad: EasingFunction; + cubic: EasingFunction; + poly: EasingFunction; + sin: EasingFunction; + circle: EasingFunction; + exp: EasingFunction; + elastic: EasingFunction; + back(s: number): EasingFunction; + bounce: EasingFunction; + bezier(x1: number, + y1: number, + x2: number, + y2: number): EasingFunction; + in(easing: EasingFunction): EasingFunction; + out(easing: EasingFunction): EasingFunction; + inOut(easing: EasingFunction): EasingFunction; +} + +export module Animated { + // Most (all?) functions where AnimatedValue is used any subclass of Animated can be used as well. + type AnimatedValue = Animated; + type AnimatedValueXY = ValueXY; + + type Base = Animated; + + class Animated { + // Internal class, no public API. + } + + class AnimatedWithChildren extends Animated { + // Internal class, no public API. + } + + class AnimatedInterpolation extends AnimatedWithChildren { + interpolate(config: InterpolationConfigType): AnimatedInterpolation; + } + + type ExtrapolateType = 'extend' | 'identity' | 'clamp'; + + type InterpolationConfigType = { + inputRange: number[]; + outputRange: (number[] | string[]); + easing?: ((input: number) => number); + extrapolate?: ExtrapolateType; + extrapolateLeft?: ExtrapolateType; + extrapolateRight?: ExtrapolateType; + }; + + type ValueListenerCallback = (state: { value: number }) => void; + + /** + * Standard value for driving animations. One `Animated.Value` can drive + * multiple properties in a synchronized fashion, but can only be driven by one + * mechanism at a time. Using a new mechanism (e.g. starting a new animation, + * or calling `setValue`) will stop any previous ones. + */ + export class Value extends AnimatedWithChildren { + constructor(value: number); + + /** + * Directly set the value. This will stop any animations running on the value + * and update all the bound properties. + */ + setValue(value: number): void; + + /** + * Sets an offset that is applied on top of whatever value is set, whether via + * `setValue`, an animation, or `Animated.event`. Useful for compensating + * things like the start of a pan gesture. + */ + setOffset(offset: number): void; + + /** + * Merges the offset value into the base value and resets the offset to zero. + * The final output of the value is unchanged. + */ + flattenOffset(): void; + + /** + * Adds an asynchronous listener to the value so you can observe updates from + * animations. This is useful because there is no way to + * synchronously read the value because it might be driven natively. + */ + addListener(callback: ValueListenerCallback): string; + + removeListener(id: string): void; + + removeAllListeners(): void; + + /** + * Stops any running animation or tracking. `callback` is invoked with the + * final value after stopping the animation, which is useful for updating + * state to match the animation position with layout. + */ + stopAnimation(callback?: (value: number) => void): void; + + /** + * Interpolates the value before updating the property, e.g. mapping 0-1 to + * 0-10. + */ + interpolate(config: InterpolationConfigType): AnimatedInterpolation; + } + + type ValueXYListenerCallback = (value: { x: number; y: number }) => void; + + /** + * 2D Value for driving 2D animations, such as pan gestures. Almost identical + * API to normal `Animated.Value`, but multiplexed. Contains two regular + * `Animated.Value`s under the hood. + */ + export class ValueXY extends AnimatedWithChildren { + x: AnimatedValue; + y: AnimatedValue; + + constructor(valueIn?: { x: number | AnimatedValue; y: number | AnimatedValue }); + + setValue(value: { x: number; y: number }): void; + + setOffset(offset: { x: number; y: number }): void; + + flattenOffset(): void + + stopAnimation(callback?: (value: {x: number, y: number}) => void): void; + + addListener(callback: ValueXYListenerCallback): string; + + removeListener(id: string): void; + + /** + * Converts `{x, y}` into `{left, top}` for use in style, e.g. + * + *```javascript + * style={this.state.anim.getLayout()} + *``` + */ + getLayout(): { [key: string]: AnimatedValue }; + + /** + * Converts `{x, y}` into a useable translation transform, e.g. + * + *```javascript + * style={{ + * transform: this.state.anim.getTranslateTransform() + * }} + *``` + */ + getTranslateTransform(): { [key: string]: AnimatedValue }[]; + + } + + type EndResult = { finished: boolean }; + type EndCallback = (result: EndResult) => void; + + interface CompositeAnimation { + start: (callback?: EndCallback) => void; + stop: () => void; + } + + interface AnimationConfig { + isInteraction?: boolean; + useNativeDriver?: boolean; + } + + /** + * Animates a value from an initial velocity to zero based on a decay + * coefficient. + */ + export function decay( + value: AnimatedValue | AnimatedValueXY, + config: DecayAnimationConfig + ): CompositeAnimation; + + interface DecayAnimationConfig extends AnimationConfig { + velocity: number | { x: number, y: number }; + deceleration?: number; + } + + /** + * Animates a value along a timed easing curve. The `Easing` module has tons + * of pre-defined curves, or you can use your own function. + */ + export var timing: ( + value: AnimatedValue | AnimatedValueXY, + config: TimingAnimationConfig + ) => CompositeAnimation; + + interface TimingAnimationConfig extends AnimationConfig { + toValue: number | AnimatedValue | { x: number, y: number } | AnimatedValueXY; + easing?: (value: number) => number; + duration?: number; + delay?: number; + } + + interface SpringAnimationConfig extends AnimationConfig { + toValue: number | AnimatedValue | { x: number, y: number } | AnimatedValueXY; + overshootClamping?: boolean; + restDisplacementThreshold?: number; + restSpeedThreshold?: number; + velocity?: number | { x: number, y: number }; + bounciness?: number; + speed?: number; + tension?: number; + friction?: number; + } + + /** + * Creates a new Animated value composed from two Animated values added + * together. + */ + export function add( + a: Animated, + b: Animated + ): AnimatedAddition; + + class AnimatedAddition extends AnimatedInterpolation { } + + /** + * Creates a new Animated value composed from two Animated values multiplied + * together. + */ + export function multiply( + a: Animated, + b: Animated + ): AnimatedMultiplication; + + class AnimatedMultiplication extends AnimatedInterpolation { } + + /** + * Creates a new Animated value that is the (non-negative) modulo of the + * provided Animated value + */ + export function modulo( + a: Animated, + modulus: number + ): AnimatedModulo; + + class AnimatedModulo extends AnimatedInterpolation { } + + /** + * Create a new Animated value that is limited between 2 values. It uses the + * difference between the last value so even if the value is far from the bounds + * it will start changing when the value starts getting closer again. + * (`value = clamp(value + diff, min, max)`). + * + * This is useful with scroll events, for example, to show the navbar when + * scrolling up and to hide it when scrolling down. + */ + export function diffClamp(a: Animated, min: number, max: number): AnimatedDiffClamp; + + class AnimatedDiffClamp extends AnimatedInterpolation {} + + /** + * Starts an animation after the given delay. + */ + export function delay(time: number): CompositeAnimation; + + /** + * Starts an array of animations in order, waiting for each to complete + * before starting the next. If the current running animation is stopped, no + * following animations will be started. + */ + export function sequence( + animations: Array + ): CompositeAnimation; + + /** + * Array of animations may run in parallel (overlap), but are started in + * sequence with successive delays. Nice for doing trailing effects. + */ + + export function stagger( + time: number, + animations: Array + ): CompositeAnimation + + /** + * Spring animation based on Rebound and Origami. Tracks velocity state to + * create fluid motions as the `toValue` updates, and can be chained together. + */ + export function spring ( + value: AnimatedValue | AnimatedValueXY, + config: SpringAnimationConfig + ): CompositeAnimation; + + type ParallelConfig = { + stopTogether?: boolean; // If one is stopped, stop all. default: true + } + + /** + * Starts an array of animations all at the same time. By default, if one + * of the animations is stopped, they will all be stopped. You can override + * this with the `stopTogether` flag. + */ + export function parallel ( + animations: Array, + config?: ParallelConfig + ): CompositeAnimation; + + type Mapping = { [key: string]: Mapping } | AnimatedValue; + interface EventConfig { + listener?: ValueListenerCallback + } + + /** + * Takes an array of mappings and extracts values from each arg accordingly, + * then calls `setValue` on the mapped outputs. e.g. + * + *```javascript + * onScroll={Animated.event( + * [{nativeEvent: {contentOffset: {x: this._scrollX}}}] + * {listener}, // Optional async listener + * ) + * ... + * onPanResponderMove: Animated.event([ + * null, // raw event arg ignored + * {dx: this._panX}, // gestureState arg + * ]), + *``` + */ + export function event ( + argMapping: Mapping[], + config?: EventConfig + ): (...args: any[]) => void; + + /** + * Make any React component Animatable. Used to create `Animated.View`, etc. + */ + export function createAnimatedComponent (component: any) : any; + + /** + * Animated variants of the basic native views. Accepts Animated.Value for + * props and style. + */ + export var View: any; + export var Image: any; + export var Text: any; +} + +// tslint:disable-next-line:interface-name +export interface I18nManagerStatic { + isRTL: boolean + allowRTL: (allowRTL: boolean) => {} + forceRTL: (forceRTL: boolean) => {} +} + +export interface GeolocationStatic { + /* + * Invokes the success callback once with the latest location info. Supported + * options: timeout (ms), maximumAge (ms), enableHighAccuracy (bool) + * On Android, this can return almost immediately if the location is cached or + * request an update, which might take a while. + */ + getCurrentPosition(geo_success: (position: GeolocationReturnType) => void, geo_error?: (error: Error) => void, geo_options?: GetCurrentPositionOptions): void + + /* + * Invokes the success callback whenever the location changes. Supported + * options: timeout (ms), maximumAge (ms), enableHighAccuracy (bool), distanceFilter(m) + */ + watchPosition(success: (position: Geolocation) => void, error?: (error: Error) => void, options?: WatchPositionOptions): void + + clearWatch(watchID: number): void + + stopObserving(): void +} + +export interface OpenCameraDialogOptions { + /** Defaults to false */ + videoMode?: boolean +} + +export interface OpenSelectDialogOptions { + /** Defaults to true */ + showImages?: boolean + /** Defaults to false */ + showVideos?: boolean +} + +/** [imageURL|tempImageTag, height, width] */ +export type ImagePickerResult = [string, number, number] + +export interface ImagePickerIOSStatic { + canRecordVideos(callback: (value: boolean) => void): void + canUseCamera(callback: (value: boolean) => void): void + openCameraDialog(config: OpenCameraDialogOptions, successCallback: (args: ImagePickerResult) => void, cancelCallback: (args: any[]) => void): void + openSelectDialog(config: OpenSelectDialogOptions, successCallback: (args: ImagePickerResult) => void, cancelCallback: (args: any[]) => void): void +} + +export interface ImageStoreStatic { + /** + * Check if the ImageStore contains image data for the specified URI. + * @platform ios + */ + hasImageForTag(uri: string, callback: (hasImage: boolean) => void): void + /** + * Delete an image from the ImageStore. Images are stored in memory and + * must be manually removed when you are finished with them, otherwise they + * will continue to use up RAM until the app is terminated. It is safe to + * call `removeImageForTag()` without first calling `hasImageForTag()`, it + * will simply fail silently. + * @platform ios + */ + removeImageForTag(uri: string): void + /** + * Stores a base64-encoded image in the ImageStore, and returns a URI that + * can be used to access or display the image later. Images are stored in + * memory only, and must be manually deleted when you are finished with + * them by calling `removeImageForTag()`. + * + * Note that it is very inefficient to transfer large quantities of binary + * data between JS and native code, so you should avoid calling this more + * than necessary. + * @platform ios + */ + addImageFromBase64( + base64ImageData: string, + success: (uri: string) => void, + failure: (error: any) => void + ): void + /** + * Retrieves the base64-encoded data for an image in the ImageStore. If the + * specified URI does not match an image in the store, the failure callback + * will be called. + * + * Note that it is very inefficient to transfer large quantities of binary + * data between JS and native code, so you should avoid calling this more + * than necessary. To display an image in the ImageStore, you can just pass + * the URI to an `` component; there is no need to retrieve the + * base64 data. + */ + getBase64ForTag( + uri: string, + success: (base64ImageData: string) => void, + failure: (error: any) => void + ): void +} + +// Network Polyfill +// TODO: Add proper support for fetch +export type fetch = (url: string, options?: Object) => Promise +export const fetch: fetch; + +// Timers polyfill +export type timedScheduler = (fn: string | (() => any), delay?: number) => number +export type setTimeout = timedScheduler +export type setInterval = timedScheduler +export type setImmediate = (fn: () => any) => number +export type requestAnimationFrame = (fn: (time: number) => any) => number + +export type schedulerCanceller = (id: number) => void +export type clearTimeout = schedulerCanceller +export type clearInterval = schedulerCanceller +export type clearImmediate = schedulerCanceller +export type cancelAnimationFrame = schedulerCanceller + + +export interface TabsReducerStatic { + JumpToAction(index: number): any; +} + +export type TabsReducerFunction = (params: any) => any; + +export interface NavigationTab { + key: string; +} + +export interface NavigationAction { + type: string; +} + +export interface NavigationRoute { + key: string; + title?: string; +} + +export interface NavigationState extends NavigationRoute { + index: number; + routes: NavigationRoute[]; +} + +export type NavigationRenderer = ( + route: NavigationState, + onNavigate: (action: NavigationAction) => boolean +) => JSX.Element; + +interface SubViewProps extends NavigationSceneRendererProps { + onNavigateBack?(): void; +} + +type SubViewRenderer = (subViewProps: SubViewProps) => JSX.Element | null; + +export interface NavigationHeaderProps extends NavigationSceneRendererProps { + onNavigateBack?(): void, + renderLeftComponent?: SubViewRenderer, + renderRightComponent?: SubViewRenderer, + renderTitleComponent?: SubViewRenderer, + style?: ViewStyle, + viewProps?: any, + statusBarHeight?: number | NavigationAnimatedValue +} + +export interface NavigationHeaderStatic extends React.ComponentClass { + Title: NavigationHeaderTitleStatic + HEIGHT: number +} + +export interface NavigationHeaderTitleProps { + children?: JSX.Element, + style?: ViewStyle, + textStyle?: TextStyle, + viewProps?: any +} + +export interface NavigationHeaderTitleStatic extends React.ComponentClass { +} + +export interface NavigationCardStackProps { + /** + * Custom style applied to the card. + */ + cardStyle?: ViewStyle + /** + * Custom style interpolator for the card. + */ + cardStyleInterpolator?: (props: NavigationSceneRendererProps) => ViewStyle; + /** + * Direction of the cards movement. Value could be `horizontal` or + * `vertical`. Default value is `horizontal`. + */ + direction?: 'horizontal' | 'vertical' + /** + * The distance from the edge of the card which gesture response can start + * for. Defaults value is `30`. + */ + gestureResponseDistance?: number + /** + * Enable gestures. Default value is true + */ + enableGestures?: boolean, + /** + * The controlled navigation state. Typically, the navigation state + * look like this: + * + * ```js + * const navigationState = { + * index: 0, // the index of the selected route. + * routes: [ // A list of routes. + * {key: 'page 1'}, // The 1st route. + * {key: 'page 2'}, // The second route. + * ], + * }; + * ``` + */ + navigationState: NavigationState, + /** + * Callback that is called when the "back" action is performed. + * This happens when the back button is pressed or the back gesture is + * performed. + */ + onNavigateBack?: () => any, + /** + * Function that renders the header. + */ + renderHeader?: NavigationSceneRenderer, + /** + * Function that renders the a scene for a route. + */ + renderScene: NavigationSceneRenderer, + /** + * Custom style applied to the cards stack. + */ + style?: ViewStyle, +} + +// Object Instances + +export type NavigationAnimatedValue = Animated.Value; + +// Value & Structs. + +export type NavigationGestureDirection = 'horizontal' | 'vertical'; + +export type NavigationLayout = { + height: NavigationAnimatedValue, + initHeight: number, + initWidth: number, + isMeasured: boolean, + width: NavigationAnimatedValue, +}; + +export type NavigationScene = { + index: number, + isActive: boolean, + isStale: boolean, + key: string, + route: NavigationRoute, +}; + +// Similar to `NavigationTransitionProps`, except that the prop `scene` +// represents the scene for the renderer to render. +export interface NavigationSceneRendererProps { + layout: NavigationLayout, + navigationState: NavigationState, + position: NavigationAnimatedValue, + progress: NavigationAnimatedValue, + scenes: Array, + scene: NavigationScene, + gestureResponseDistance?: number, +} + +export interface NavigationSceneRenderer extends React.StatelessComponent { +} + +export interface NavigationPropTypes { + // helpers + extractSceneRendererProps(props: NavigationSceneRendererProps): NavigationSceneRendererProps + + // Bundled propTypes. + SceneRendererProps: { + layout: string, + navigationState: string, + position: string, + progress: string, + scene: string, + scenes: NavigationScene[], + } + + // propTypes + SceneRenderer: any, // TODO: fix this + action: NavigationAction, + navigationState: NavigationState, + navigationRoute: NavigationRoute, + panHandlers: GestureResponderHandlers, +} + +export interface NavigationCardProps extends React.ComponentClass { + onComponentRef: (ref: any) => void, + onNavigateBack?: () => any, + panHandlers?: GestureResponderHandlers, + pointerEvents: string, + renderScene: NavigationSceneRenderer, + style?: ViewStyle, +} + +export interface NavigationCardStackStatic extends React.ComponentClass { +} + +export interface NavigationCardStatic extends React.ComponentClass { +} + +/** + * Utilities to perform atomic operation with navigate state and routes. + * + * ```javascript + * const state1 = {key: 'page 1'}; + * const state2 = NavigationStateUtils.push(state1, {key: 'page 2'}); + * ``` + */ +export interface NavigationStateUtils { + get(state: NavigationState, key: string): NavigationRoute + indexOf(state: NavigationState, key: string): number + has(state: NavigationState, key: string): boolean + push(state: NavigationState, route: NavigationRoute): NavigationState + pop(state: NavigationState): NavigationState + jumpToIndex(state: NavigationState, index: number): NavigationState + jumpTo(state: NavigationState, key: string): NavigationState + back(state: NavigationState): NavigationState + forward(state: NavigationState): NavigationState + replaceAt( + state: NavigationState, + key: string, + route: NavigationRoute + ): NavigationState + replaceAtIndex( + state: NavigationState, + index: number, + route: NavigationRoute + ): NavigationState + reset( + state: NavigationState, + routes: Array, + index?: number + ): NavigationState +} + +export type NavigationTransitionProps = { + // The layout of the transitioner of the scenes. + layout: NavigationLayout, + + // The navigation state of the transitioner. + navigationState: NavigationState, + + // The progressive index of the transitioner's navigation state. + position: NavigationAnimatedValue, + + // The value that represents the progress of the transition when navigation + // state changes from one to another. Its numberic value will range from 0 + // to 1. + // progress.__getAnimatedValue() < 1 : transtion is happening. + // progress.__getAnimatedValue() == 1 : transtion completes. + progress: NavigationAnimatedValue, + + // All the scenes of the transitioner. + scenes: Array, + + // The active scene, corresponding to the route at + // `navigationState.routes[navigationState.index]`. + scene: NavigationScene, + + // The gesture distance for `horizontal` and `vertical` transitions + gestureResponseDistance?: number, +} +export type NavigationTransitionSpec = { + duration?: number, + // An easing function from `Easing`. + easing?: EasingFunction, + // A timing function such as `Animated.timing`. + timing?: (value: NavigationAnimatedValue, config: any) => any, +} +export interface NavigationTransitionerProps { + configureTransition?: ( + a: NavigationTransitionProps, + b?: NavigationTransitionProps + ) => NavigationTransitionSpec, + navigationState: NavigationState, + onTransitionEnd?: () => void, + onTransitionStart?: () => void, + render: (a: NavigationTransitionProps, b?: NavigationTransitionProps) => any, + style: any, +} + +export interface NavigationTransitioner extends React.ComponentClass { +} + +export interface NavigationCard extends React.ComponentClass { +} + +export interface NavigationExperimentalStatic { + // Core + StateUtils: NavigationStateUtils + + // Views + Transitioner: NavigationTransitioner, + + //AnimatedView: NavigationAnimatedViewStatic; + // CustomComponents: + Card: NavigationCard, + CardStack: NavigationCardStackStatic; + Header: NavigationHeaderStatic; + + PropTypes: NavigationPropTypes, +} + +// +// Interfacing with Native Modules +// https://facebook.github.io/react-native/docs/native-modules-ios.html +// + +export interface NativeEventSubscription { + /** + * Call this method to un-subscribe from a native-event + */ + remove(): void; +} + +/** + * Receive events from native-code + * Deprecated - subclass NativeEventEmitter to create granular event modules instead of + * adding all event listeners directly to RCTNativeAppEventEmitter. + * @see https://github.com/facebook/react-native/blob/0.34-stable\Libraries\EventEmitter\RCTNativeAppEventEmitter.js + * @see https://facebook.github.io/react-native/docs/native-modules-ios.html#sending-events-to-javascript + */ +type RCTNativeAppEventEmitter = DeviceEventEmitterStatic + +interface ImageCropData { + /** + * The top-left corner of the cropped image, specified in the original + * image's coordinate space. + */ + offset: { + x: number; + y: number; + } + + /** + * The size (dimensions) of the cropped image, specified in the original + * image's coordinate space. + */ + size: { + width: number; + height: number; + } + + /** + * (Optional) size to scale the cropped image to. + */ + displaySize?: { width: number, height: number } + + /** + * (Optional) the resizing mode to use when scaling the image. If the + * `displaySize` param is not specified, this has no effect. + */ + resizeMode?: 'contain' | 'cover' | 'stretch' +} + +interface ImageEditorStatic { + /** + * Crop the image specified by the URI param. If URI points to a remote + * image, it will be downloaded automatically. If the image cannot be + * loaded/downloaded, the failure callback will be called. + * + * If the cropping process is successful, the resultant cropped image + * will be stored in the ImageStore, and the URI returned in the success + * callback will point to the image in the store. Remember to delete the + * cropped image from the ImageStore when you are done with it. + */ + cropImage( uri: string, cropData: ImageCropData, success: (uri: string) => void, failure: (error: Object) => void ): void +} + +export interface ARTShapeProps { + d: string, + strokeWidth: number, + strokeDash?: number[], + stroke: string +} + +export interface ARTSurfaceProps { + style: ViewStyle, + width: number, + height: number +} + +export interface ShapeStatic extends React.ComponentClass { +} + +export interface SurfaceStatic extends React.ComponentClass { +} + +export interface ARTStatic { + Shape: ShapeStatic, + Surface: SurfaceStatic +} + +export interface KeyboardStatic extends NativeEventEmitter { + dismiss: () => void +} + +////////////////////////////////////////////////////////////////////////// +// +// R E - E X P O R T S +// +////////////////////////////////////////////////////////////////////////// + +// TODO: The following components need to be added +// - [ ] ART +export var ART: ARTStatic +export type ART = ARTStatic + +export var ActivityIndicator: ActivityIndicatorStatic +export type ActivityIndicator = ActivityIndicatorStatic + +export var ActivityIndicatorIOS: ActivityIndicatorIOSStatic +export type ActivityIndicatorIOS = ActivityIndicatorIOSStatic + +export var DatePickerIOS: DatePickerIOSStatic +export type DatePickerIOS = DatePickerIOSStatic + +export var DrawerLayoutAndroid: DrawerLayoutAndroidStatic +export type DrawerLayoutAndroid = DrawerLayoutAndroidStatic + +export var Image: ImageStatic +export type Image = ImageStatic + +export var ImagePickerIOS: ImagePickerIOSStatic +export type ImagePickerIOS = ImagePickerIOSStatic + +export var LayoutAnimation: LayoutAnimationStatic +export type LayoutAnimation = LayoutAnimationStatic + +export var ListView: ListViewStatic +export type ListView = ListViewStatic + +export var MapView: MapViewStatic +export type MapView = MapViewStatic + +export var Modal: ModalStatic +export type Modal = ModalStatic + +export var Navigator: NavigatorStatic +export type Navigator = NavigatorStatic + +export var NavigatorIOS: NavigatorIOSStatic +export type NavigatorIOS = NavigatorIOSStatic + +export var Picker: PickerStatic +export type Picker = PickerStatic + +export var PickerIOS: PickerIOSStatic +export type PickerIOS = PickerIOSStatic + +export var ProgressBarAndroid: ProgressBarAndroidStatic +export type ProgressBarAndroid = ProgressBarAndroidStatic + +export var ProgressViewIOS: ProgressViewIOSStatic +export type ProgressViewIOS = ProgressViewIOSStatic + +export var RefreshControl: RefreshControlStatic +export type RefreshControl = RefreshControlStatic + +export var RecyclerViewBackedScrollView: RecyclerViewBackedScrollViewStatic +export type RecyclerViewBackedScrollView = RecyclerViewBackedScrollViewStatic + +export var SegmentedControlIOS: SegmentedControlIOSStatic +export type SegmentedControlIOS = SegmentedControlIOSStatic + +export var Slider: SliderStatic +export type Slider = SliderStatic + +export var SliderIOS: SliderStatic +export type SliderIOS = SliderStatic + +export var StatusBar: StatusBarStatic +export type StatusBar = StatusBarStatic + +export var ScrollView: ScrollViewStatic +export type ScrollView = ScrollViewStatic + +export var SnapshotViewIOS: SnapshotViewIOSStatic +export type SnapshotViewIOS = SnapshotViewIOSStatic + +export var Systrace: SystraceStatic +export type Systrace = SystraceStatic + +export var SwipeableListView: SwipeableListViewStatic +export type SwipeableListView = SwipeableListViewStatic + +export var Switch: SwitchStatic +export type Switch = SwitchStatic + +export var SwitchIOS: SwitchIOSStatic +export type SwitchIOS = SwitchIOSStatic + +export var TabBarIOS: TabBarIOSStatic +export type TabBarIOS = TabBarIOSStatic + +export var Text: TextStatic +export type Text = TextStatic + +export var TextInput: TextInputStatic +export type TextInput = TextInputStatic + +export var ToolbarAndroid: ToolbarAndroidStatic +export type ToolbarAndroid = ToolbarAndroidStatic + +export var TouchableHighlight: TouchableHighlightStatic +export type TouchableHighlight = TouchableHighlightStatic + +export var TouchableNativeFeedback: TouchableNativeFeedbackStatic +export type TouchableNativeFeedback = TouchableNativeFeedbackStatic + +export var TouchableOpacity: TouchableOpacityStatic +export type TouchableOpacity = TouchableOpacityStatic + +export var TouchableWithoutFeedback: TouchableWithoutFeedbackStatic +export type TouchableWithoutFeedback = TouchableWithoutFeedbackStatic + +export var View: ViewStatic +export type View = ViewStatic + +export var ViewPagerAndroid: ViewPagerAndroidStatic +export type ViewPagerAndroid = ViewPagerAndroidStatic + +export var WebView: WebViewStatic +export type WebView = WebViewStatic + + +//////////// APIS ////////////// +export var ActionSheetIOS: ActionSheetIOSStatic +export type ActionSheetIOS = ActionSheetIOSStatic + +export var Share: ShareStatic +export type Share = ShareStatic + +export var AdSupportIOS: AdSupportIOSStatic +export type AdSupportIOS = AdSupportIOSStatic + +export var Alert: AlertStatic +export type Alert = AlertStatic + +export var AlertAndroid: AlertAndroidStatic +export type AlertAndroid = AlertAndroidStatic + +export var AlertIOS: AlertIOSStatic +export type AlertIOS = AlertIOSStatic + +export var AppState: AppStateStatic; +export type AppState = AppStateStatic; + +export var AppStateIOS: AppStateStatic +export type AppStateIOS = AppStateStatic + +export var AsyncStorage: AsyncStorageStatic +export type AsyncStorage = AsyncStorageStatic + +export var BackAndroid: BackAndroidStatic +export type BackAndroid = BackAndroidStatic + +export var Button: ButtonStatic +export type Button = ButtonStatic + +export var CameraRoll: CameraRollStatic +export type CameraRoll = CameraRollStatic + +export var Clipboard: ClipboardStatic +export type Clipboard = ClipboardStatic + +export var DatePickerAndroid: DatePickerAndroidStatic +export type DatePickerAndroid = DatePickerAndroidStatic + +export var Geolocation: GeolocationStatic +export type Geolocation = GeolocationStatic + +/** http://facebook.github.io/react-native/blog/2016/08/19/right-to-left-support-for-react-native-apps.html */ +export var I18nManager: I18nManagerStatic +export type I18nManager = I18nManagerStatic + +export var ImageEditor: ImageEditorStatic +export type ImageEditor = ImageEditorStatic + +export var ImageStore: ImageStoreStatic +export type ImageStore = ImageStoreStatic + +export var InteractionManager: InteractionManagerStatic + +export var IntentAndroid: IntentAndroidStatic +export type IntentAndroid = IntentAndroidStatic + +export var Keyboard: KeyboardStatic + +export var KeyboardAvoidingView: KeyboardAvoidingViewStatic +export type KeyboardAvoidingView = KeyboardAvoidingViewStatic + +export var Linking: LinkingStatic +export type Linking = LinkingStatic + +export var LinkingIOS: LinkingIOSStatic +export type LinkingIOS = LinkingIOSStatic + +export var NativeMethodsMixin: NativeMethodsMixinStatic +export type NativeMethodsMixin = NativeMethodsMixinStatic + +export var NativeComponent: NativeMethodsMixinStatic +export type NativeComponent = NativeMethodsMixinStatic + +export var NetInfo: NetInfoStatic +export type NetInfo = NetInfoStatic + +export var PanResponder: PanResponderStatic +export type PanResponder = PanResponderStatic + +export var PermissionsAndroid: PermissionsAndroidStatic +export type PermissionsAndroid = PermissionsAndroidStatic + +export var PushNotificationIOS: PushNotificationIOSStatic +export type PushNotificationIOS = PushNotificationIOSStatic + +export var Settings: SettingsStatic +export type Settings = SettingsStatic + +export var StatusBarIOS: StatusBarIOSStatic +export type StatusBarIOS = StatusBarIOSStatic + +export var TimePickerAndroid: TimePickerAndroidStatic +export type TimePickerAndroid = TimePickerAndroidStatic + +export var ToastAndroid: ToastAndroidStatic +export type ToastAndroid = ToastAndroidStatic + +export var UIManager: UIManagerStatic +export type UIManager = UIManagerStatic + +export var VibrationIOS: VibrationIOSStatic +export type VibrationIOS = VibrationIOSStatic + +export var Vibration: VibrationStatic +export type Vibration = VibrationStatic + +export var Dimensions: Dimensions; +export var ShadowPropTypesIOS: ShadowPropTypesIOSStatic; + +export type NavigationExperimental = NavigationExperimentalStatic; +export var NavigationExperimental: NavigationExperimentalStatic; + +export type Easing = EasingStatic; +export var Easing: EasingStatic; + +//////////// Plugins ////////////// + +export var DeviceEventEmitter: DeviceEventEmitterStatic +/** + * Abstract base class for implementing event-emitting modules. This implements + * a subset of the standard EventEmitter node module API. + */ +export interface NativeEventEmitter extends EventEmitter {} +export var NativeEventEmitter: NativeEventEmitter +/** + * Deprecated - subclass NativeEventEmitter to create granular event modules instead of + * adding all event listeners directly to RCTNativeAppEventEmitter. + */ +export var NativeAppEventEmitter: RCTNativeAppEventEmitter +/** + * Native Modules written in ObjectiveC/Swift/Java exposed via the RCTBridge + * Define lazy getters for each module. These will return the module if already loaded, or load it if not. + * See https://facebook.github.io/react-native/docs/native-modules-ios.html + * Use: + * const MyModule = NativeModules.ModuleName + */ +export var NativeModules: any +export var Platform: PlatformStatic +export var PixelRatio: PixelRatioStatic + +export interface ComponentInterface

{ + name?: string; + displayName?: string; + propTypes: P +} + +/** + * Used to create React components that directly wrap native component + * implementations. Config information is extracted from data exported from the + * UIManager module. You should also wrap the native component in a + * hand-written component with full propTypes definitions and other + * documentation - pass the hand-written component in as `componentInterface` to + * verify all the native props are documented via `propTypes`. + * + * If some native props shouldn't be exposed in the wrapper interface, you can + * pass null for `componentInterface` and call `verifyPropTypes` directly + * with `nativePropsToIgnore`; + * + * Common types are lined up with the appropriate prop differs with + * `TypeToDifferMap`. Non-scalar types not in the map default to `deepDiffer`. + */ +export function requireNativeComponent

( + viewName: string, + componentInterface?: ComponentInterface

, + extraConfig?: {nativeOnly?: any} +): React.ComponentClass

; + +export function findNodeHandle(componentOrHandle: null | number | React.Component): null | number; + +export function processColor(color: any): number; + +////////////////////////////////////////////////////////////////////////// +// +// Additional ( and controversial) +// +////////////////////////////////////////////////////////////////////////// + +export function __spread(target: any, ...sources: any[]): any; + +export interface GlobalStatic { + + /** + * Accepts a function as its only argument and calls that function before the next repaint. + * It is an essential building block for animations that underlies all of the JavaScript-based animation APIs. + * In general, you shouldn't need to call this yourself - the animation API's will manage frame updates for you. + * @see https://facebook.github.io/react-native/docs/animations.html#requestanimationframe + */ + requestAnimationFrame(fn: () => void): void; + + /** + * This contains the non-native `XMLHttpRequest` object, which you can use if you want to route network requests + * through DevTools (to trace them): + * + * global.XMLHttpRequest = global.originalXMLHttpRequest; + * + * @see https://github.com/facebook/react-native/issues/934 + */ + originalXMLHttpRequest: Object; + XMLHttpRequest: Object; +} + +// +// Add-Ons +// +export namespace addons { + + //FIXME: Documentation ? + export interface TestModuleStatic { + + verifySnapshot: (done: (indicator?: any) => void) => void + markTestPassed: (indicator: any) => void + markTestCompleted: () => void + } + + export var TestModule: TestModuleStatic + export type TestModule = TestModuleStatic +} + +// +// Prop Types +// +export var ColorPropType: React.Requireable +export var EdgeInsetsPropType: React.Requireable +export var PointPropType: React.Requireable + +declare global { + const global: GlobalStatic; + function require(name: string): any; + + /** + * This variable is set to true when react-native is running in Dev mode + * Typical usage: + * if (__DEV__) console.log('Running in dev mode') + */ + var __DEV__: boolean +} diff --git a/react-native/test/animated.tsx b/types/react-native/test/animated.tsx similarity index 100% rename from react-native/test/animated.tsx rename to types/react-native/test/animated.tsx diff --git a/react-native/test/index.tsx b/types/react-native/test/index.tsx similarity index 88% rename from react-native/test/index.tsx rename to types/react-native/test/index.tsx index 32bcbe931b..f7a4abae57 100644 --- a/react-native/test/index.tsx +++ b/types/react-native/test/index.tsx @@ -11,16 +11,20 @@ The content of index.io.js could be something like For a list of complete Typescript examples: check https://github.com/bgrieder/RNTSExplorer */ -import * as React from 'react-native' +import * as React from 'react' import { - StyleSheet, - Text, - View, AppState, AppStateIOS, - ViewPagerAndroid, - Dimensions, BackAndroid, + Dimensions, + InteractionManager, + StyleSheet, + Systrace, + Text, + TextStyle, + View, + ViewStyle, + ViewPagerAndroid, } from 'react-native'; function testDimensions() { @@ -43,9 +47,9 @@ BackAndroid.addEventListener("hardwareBackPress", () => { }); interface LocalStyles { - container: React.ViewStyle; - welcome: React.TextStyle; - instructions: React.TextStyle; + container: ViewStyle; + welcome: TextStyle; + instructions: TextStyle; } var styles = StyleSheet.create( @@ -77,22 +81,22 @@ const stylesAlt = StyleSheet.create( justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF', - } as React.ViewStyle, + } as ViewStyle, welcome: { fontSize: 20, textAlign: 'center', margin: 10, - } as React.TextStyle, + } as TextStyle, instructions: { textAlign: 'center', color: '#333333', marginBottom: 5, - } as React.TextStyle + } as TextStyle } ) -class Welcome extends React.Component { +class Welcome extends React.Component { refs: { [key: string]: any @@ -164,3 +168,10 @@ export class ViewPagerAndroidTest { ); } } + +const profiledJSONParse = Systrace.measure('JSON', 'parse', JSON.parse) +profiledJSONParse('[]') + +InteractionManager.runAfterInteractions(() => { + // ... +}).then(() => 'done') diff --git a/react-native/tsconfig.json b/types/react-native/tsconfig.json similarity index 100% rename from react-native/tsconfig.json rename to types/react-native/tsconfig.json diff --git a/types/react-native/tslint.json b/types/react-native/tslint.json new file mode 100644 index 0000000000..dd4e4a1cba --- /dev/null +++ b/types/react-native/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "../tslint.json", + "rules": { + // Lowercase `object` is available in TypeScript 2.2 only. + "forbidden-types": false + } +} diff --git a/react-notification-system-redux/index.d.ts b/types/react-notification-system-redux/index.d.ts similarity index 100% rename from react-notification-system-redux/index.d.ts rename to types/react-notification-system-redux/index.d.ts diff --git a/react-notification-system-redux/package.json b/types/react-notification-system-redux/package.json similarity index 100% rename from react-notification-system-redux/package.json rename to types/react-notification-system-redux/package.json diff --git a/react-notification-system-redux/react-notification-system-redux-tests.tsx b/types/react-notification-system-redux/react-notification-system-redux-tests.tsx similarity index 100% rename from react-notification-system-redux/react-notification-system-redux-tests.tsx rename to types/react-notification-system-redux/react-notification-system-redux-tests.tsx diff --git a/react-notification-system-redux/tsconfig.json b/types/react-notification-system-redux/tsconfig.json similarity index 100% rename from react-notification-system-redux/tsconfig.json rename to types/react-notification-system-redux/tsconfig.json diff --git a/react-overlays/tslint.json b/types/react-notification-system-redux/tslint.json similarity index 100% rename from react-overlays/tslint.json rename to types/react-notification-system-redux/tslint.json diff --git a/react-notification-system/index.d.ts b/types/react-notification-system/index.d.ts similarity index 100% rename from react-notification-system/index.d.ts rename to types/react-notification-system/index.d.ts diff --git a/react-notification-system/react-notification-system-tests.ts b/types/react-notification-system/react-notification-system-tests.ts similarity index 100% rename from react-notification-system/react-notification-system-tests.ts rename to types/react-notification-system/react-notification-system-tests.ts diff --git a/react-notification-system/tsconfig.json b/types/react-notification-system/tsconfig.json similarity index 100% rename from react-notification-system/tsconfig.json rename to types/react-notification-system/tsconfig.json diff --git a/react-onclickoutside/index.d.ts b/types/react-onclickoutside/index.d.ts similarity index 100% rename from react-onclickoutside/index.d.ts rename to types/react-onclickoutside/index.d.ts diff --git a/react-onclickoutside/react-onclickoutside-tests.tsx b/types/react-onclickoutside/react-onclickoutside-tests.tsx similarity index 100% rename from react-onclickoutside/react-onclickoutside-tests.tsx rename to types/react-onclickoutside/react-onclickoutside-tests.tsx diff --git a/react-onclickoutside/tsconfig.json b/types/react-onclickoutside/tsconfig.json similarity index 100% rename from react-onclickoutside/tsconfig.json rename to types/react-onclickoutside/tsconfig.json diff --git a/react-overlays/index.d.ts b/types/react-overlays/index.d.ts similarity index 100% rename from react-overlays/index.d.ts rename to types/react-overlays/index.d.ts diff --git a/react-overlays/lib/RootCloseWrapper.d.ts b/types/react-overlays/lib/RootCloseWrapper.d.ts similarity index 100% rename from react-overlays/lib/RootCloseWrapper.d.ts rename to types/react-overlays/lib/RootCloseWrapper.d.ts diff --git a/react-overlays/react-overlays-tests.tsx b/types/react-overlays/react-overlays-tests.tsx similarity index 100% rename from react-overlays/react-overlays-tests.tsx rename to types/react-overlays/react-overlays-tests.tsx diff --git a/react-overlays/tsconfig.json b/types/react-overlays/tsconfig.json similarity index 100% rename from react-overlays/tsconfig.json rename to types/react-overlays/tsconfig.json diff --git a/react-portal/tslint.json b/types/react-overlays/tslint.json similarity index 100% rename from react-portal/tslint.json rename to types/react-overlays/tslint.json diff --git a/react-paginate/index.d.ts b/types/react-paginate/index.d.ts similarity index 82% rename from react-paginate/index.d.ts rename to types/react-paginate/index.d.ts index 363aeb8ea1..18636a8f6f 100644 --- a/react-paginate/index.d.ts +++ b/types/react-paginate/index.d.ts @@ -1,10 +1,10 @@ -// Type definitions for react-paginate v4.2.0 +// Type definitions for react-paginate 4.2 // Project: https://github.com/AdeleD/react-paginate -// Definitions by: Simon Hartcher , Wouter Hardeman +// Definitions by: Simon Hartcher , Wouter Hardeman , pegel03 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 -import * as React from "react"; +import * as React from 'react'; interface ReactPaginateProps { /** @@ -45,7 +45,7 @@ interface ReactPaginateProps { /** * The method to call when a page is clicked. Exposes the current page object as an argument. */ - onPageChange?: Function; + onPageChange?: (selectedItem: {selected: number}) => void; /** * The initial page selected. @@ -58,9 +58,9 @@ interface ReactPaginateProps { forcePage?: number; /** - * Disable `onPageChange` callback with initial page. Default: `false` + * Disable onPageChange callback with initial page. Default: false */ - disableInitialCallback?: boolean + disableInitialCallback?: boolean; /** * The classname of the pagination container. @@ -108,9 +108,9 @@ interface ReactPaginateProps { disabledClassName?: string; /** - * The method is called to generate the `href` attribute value on tag `a` of each page element. + * The method is called to generate the href attribute value on tag a of each page element. */ - hrefBuilder?: Function; + hrefBuilder?: (pageIndex: number) => void; } declare const ReactPaginate: React.ComponentClass; diff --git a/types/react-paginate/react-paginate-tests.tsx b/types/react-paginate/react-paginate-tests.tsx new file mode 100644 index 0000000000..5f8f8f1994 --- /dev/null +++ b/types/react-paginate/react-paginate-tests.tsx @@ -0,0 +1,33 @@ +import * as React from "react"; +import ReactPaginate = require("react-paginate"); + +class Test extends React.Component<{}, {}> { + + render() { + return ( + null} + initialPage={2} + forcePage={3} + disableInitialCallback={false} + containerClassName={'container'} + pageClassName={'page-li'} + pageLinkClassName={'page-a'} + activeClassName={'active'} + previousClassName={'previous-li'} + nextClassName={'next-li'} + previousLinkClassName={'previous-a'} + nextLinkClassName={'next-a'} + disabledClassName={'disabled'} + hrefBuilder={(pageIndex: number) => null} + /> + ); + } +} diff --git a/react-paginate/tsconfig.json b/types/react-paginate/tsconfig.json similarity index 92% rename from react-paginate/tsconfig.json rename to types/react-paginate/tsconfig.json index c7215760aa..3d4b5809a6 100644 --- a/react-paginate/tsconfig.json +++ b/types/react-paginate/tsconfig.json @@ -11,7 +11,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -21,4 +21,4 @@ "forceConsistentCasingInFileNames": true, "jsx": "react" } -} \ No newline at end of file +} diff --git a/react-recaptcha/tslint.json b/types/react-paginate/tslint.json similarity index 100% rename from react-recaptcha/tslint.json rename to types/react-paginate/tslint.json diff --git a/react-portal/index.d.ts b/types/react-portal/index.d.ts similarity index 100% rename from react-portal/index.d.ts rename to types/react-portal/index.d.ts diff --git a/react-portal/react-portal-tests.tsx b/types/react-portal/react-portal-tests.tsx similarity index 100% rename from react-portal/react-portal-tests.tsx rename to types/react-portal/react-portal-tests.tsx diff --git a/react-portal/tsconfig.json b/types/react-portal/tsconfig.json similarity index 100% rename from react-portal/tsconfig.json rename to types/react-portal/tsconfig.json diff --git a/react-router-redux/tslint.json b/types/react-portal/tslint.json similarity index 100% rename from react-router-redux/tslint.json rename to types/react-portal/tslint.json diff --git a/react-props-decorators/index.d.ts b/types/react-props-decorators/index.d.ts similarity index 100% rename from react-props-decorators/index.d.ts rename to types/react-props-decorators/index.d.ts diff --git a/react-props-decorators/react-props-decorators-tests.ts b/types/react-props-decorators/react-props-decorators-tests.ts similarity index 100% rename from react-props-decorators/react-props-decorators-tests.ts rename to types/react-props-decorators/react-props-decorators-tests.ts diff --git a/react-props-decorators/tsconfig.json b/types/react-props-decorators/tsconfig.json similarity index 100% rename from react-props-decorators/tsconfig.json rename to types/react-props-decorators/tsconfig.json diff --git a/react-recaptcha/index.d.ts b/types/react-recaptcha/index.d.ts similarity index 100% rename from react-recaptcha/index.d.ts rename to types/react-recaptcha/index.d.ts diff --git a/react-recaptcha/react-recaptcha-tests.tsx b/types/react-recaptcha/react-recaptcha-tests.tsx similarity index 100% rename from react-recaptcha/react-recaptcha-tests.tsx rename to types/react-recaptcha/react-recaptcha-tests.tsx diff --git a/react-recaptcha/tsconfig.json b/types/react-recaptcha/tsconfig.json similarity index 100% rename from react-recaptcha/tsconfig.json rename to types/react-recaptcha/tsconfig.json diff --git a/react-router/tslint.json b/types/react-recaptcha/tslint.json similarity index 100% rename from react-router/tslint.json rename to types/react-recaptcha/tslint.json diff --git a/react-redux-i18n/index.d.ts b/types/react-redux-i18n/index.d.ts similarity index 100% rename from react-redux-i18n/index.d.ts rename to types/react-redux-i18n/index.d.ts diff --git a/react-redux-i18n/package.json b/types/react-redux-i18n/package.json similarity index 100% rename from react-redux-i18n/package.json rename to types/react-redux-i18n/package.json diff --git a/react-redux-i18n/react-redux-i18n-tests.tsx b/types/react-redux-i18n/react-redux-i18n-tests.tsx similarity index 100% rename from react-redux-i18n/react-redux-i18n-tests.tsx rename to types/react-redux-i18n/react-redux-i18n-tests.tsx diff --git a/react-redux-i18n/tsconfig.json b/types/react-redux-i18n/tsconfig.json similarity index 100% rename from react-redux-i18n/tsconfig.json rename to types/react-redux-i18n/tsconfig.json diff --git a/react-redux-toastr/index.d.ts b/types/react-redux-toastr/index.d.ts similarity index 100% rename from react-redux-toastr/index.d.ts rename to types/react-redux-toastr/index.d.ts diff --git a/react-redux-toastr/package.json b/types/react-redux-toastr/package.json similarity index 100% rename from react-redux-toastr/package.json rename to types/react-redux-toastr/package.json diff --git a/react-redux-toastr/react-redux-toastr-tests.ts b/types/react-redux-toastr/react-redux-toastr-tests.ts similarity index 100% rename from react-redux-toastr/react-redux-toastr-tests.ts rename to types/react-redux-toastr/react-redux-toastr-tests.ts diff --git a/react-redux-toastr/tsconfig.json b/types/react-redux-toastr/tsconfig.json similarity index 100% rename from react-redux-toastr/tsconfig.json rename to types/react-redux-toastr/tsconfig.json diff --git a/react-redux/index.d.ts b/types/react-redux/index.d.ts similarity index 83% rename from react-redux/index.d.ts rename to types/react-redux/index.d.ts index 8daa310b51..1f300e02a6 100644 --- a/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -49,18 +49,20 @@ export interface InferableComponentDecorator { export declare function connect(): InferableComponentDecorator; export declare function connect( - mapStateToProps?: FuncOrSelf>, - mapDispatchToProps?: FuncOrSelf | MapDispatchToPropsObject>, + mapStateToProps?: MapStateToProps | MapStateToPropsFactory, + mapDispatchToProps?: MapDispatchToProps | MapDispatchToPropsFactory, mergeProps?: MergeProps, options?: Options ): ComponentDecorator; -type FuncOrSelf = T | (() => T); - interface MapStateToProps { (state: any, ownProps?: TOwnProps): TStateProps; } +interface MapStateToPropsFactory { + (initialState: any, ownProps?: TOwnProps): MapStateToProps; +} + interface MapDispatchToPropsFunction { (dispatch: Dispatch, ownProps?: TOwnProps): TDispatchProps; } @@ -69,6 +71,13 @@ interface MapDispatchToPropsObject { [name: string]: ActionCreator; } +type MapDispatchToProps = + MapDispatchToPropsFunction | MapDispatchToPropsObject; + +interface MapDispatchToPropsFactory { + (dispatch: Dispatch, ownProps?: TOwnProps): MapDispatchToProps; +} + interface MergeProps { (stateProps: TStateProps, dispatchProps: TDispatchProps, ownProps: TOwnProps): TStateProps & TDispatchProps; } @@ -83,7 +92,7 @@ interface Options { */ pure?: boolean; /** - * If true, stores a ref to the wrapped component instance and makes it available via + * If true, stores a ref to the wrapped component instance and makes it available via * getWrappedInstance() method. Defaults to false. */ withRef?: boolean; diff --git a/react-redux/package.json b/types/react-redux/package.json similarity index 100% rename from react-redux/package.json rename to types/react-redux/package.json diff --git a/react-redux/react-redux-tests.tsx b/types/react-redux/react-redux-tests.tsx similarity index 97% rename from react-redux/react-redux-tests.tsx rename to types/react-redux/react-redux-tests.tsx index 5d1f32765f..4c7a55ea7b 100644 --- a/react-redux/react-redux-tests.tsx +++ b/types/react-redux/react-redux-tests.tsx @@ -56,10 +56,16 @@ interface ICounterStateProps { interface ICounterDispatchProps { onIncrement: () => void } +// with higher order functions connect( () => mapStateToProps, () => mapDispatchToProps )(Counter); +// with higher order functions using parameters +connect( + (initialState: CounterState, ownProps: {}) => mapStateToProps, + (dispatch: Dispatch, ownProps: {}) => mapDispatchToProps +)(Counter); // only first argument connect( () => mapStateToProps diff --git a/react-redux/tsconfig.json b/types/react-redux/tsconfig.json similarity index 100% rename from react-redux/tsconfig.json rename to types/react-redux/tsconfig.json diff --git a/react-relay/index.d.ts b/types/react-relay/index.d.ts similarity index 100% rename from react-relay/index.d.ts rename to types/react-relay/index.d.ts diff --git a/react-relay/react-relay-tests.tsx b/types/react-relay/react-relay-tests.tsx similarity index 100% rename from react-relay/react-relay-tests.tsx rename to types/react-relay/react-relay-tests.tsx diff --git a/react-relay/tsconfig.json b/types/react-relay/tsconfig.json similarity index 100% rename from react-relay/tsconfig.json rename to types/react-relay/tsconfig.json diff --git a/react-responsive/index.d.ts b/types/react-responsive/index.d.ts similarity index 100% rename from react-responsive/index.d.ts rename to types/react-responsive/index.d.ts diff --git a/react-responsive/react-responsive-tests.tsx b/types/react-responsive/react-responsive-tests.tsx similarity index 100% rename from react-responsive/react-responsive-tests.tsx rename to types/react-responsive/react-responsive-tests.tsx diff --git a/react-responsive/tsconfig.json b/types/react-responsive/tsconfig.json similarity index 100% rename from react-responsive/tsconfig.json rename to types/react-responsive/tsconfig.json diff --git a/react-router-bootstrap/index.d.ts b/types/react-router-bootstrap/index.d.ts similarity index 100% rename from react-router-bootstrap/index.d.ts rename to types/react-router-bootstrap/index.d.ts diff --git a/react-router-bootstrap/lib/IndexLinkContainer.d.ts b/types/react-router-bootstrap/lib/IndexLinkContainer.d.ts similarity index 100% rename from react-router-bootstrap/lib/IndexLinkContainer.d.ts rename to types/react-router-bootstrap/lib/IndexLinkContainer.d.ts diff --git a/react-router-bootstrap/lib/LinkContainer.d.ts b/types/react-router-bootstrap/lib/LinkContainer.d.ts similarity index 100% rename from react-router-bootstrap/lib/LinkContainer.d.ts rename to types/react-router-bootstrap/lib/LinkContainer.d.ts diff --git a/react-router-bootstrap/react-router-bootstrap-tests.tsx b/types/react-router-bootstrap/react-router-bootstrap-tests.tsx similarity index 100% rename from react-router-bootstrap/react-router-bootstrap-tests.tsx rename to types/react-router-bootstrap/react-router-bootstrap-tests.tsx diff --git a/react-router-bootstrap/tsconfig.json b/types/react-router-bootstrap/tsconfig.json similarity index 82% rename from react-router-bootstrap/tsconfig.json rename to types/react-router-bootstrap/tsconfig.json index 8e586637c7..c41b83b04f 100644 --- a/react-router-bootstrap/tsconfig.json +++ b/types/react-router-bootstrap/tsconfig.json @@ -15,7 +15,9 @@ ], "paths": { "history": ["history/v3"], - "history/*": ["history/v3/*"] + "history/*": ["history/v3/*"], + "react-router": ["react-router/v3"], + "react-router/*": ["react-router/v3/*"] }, "types": [], "noEmit": true, diff --git a/types/react-router-dom/index.d.ts b/types/react-router-dom/index.d.ts new file mode 100644 index 0000000000..72d195f56f --- /dev/null +++ b/types/react-router-dom/index.d.ts @@ -0,0 +1,79 @@ +// Type definitions for React Router 4.0 +// Project: https://github.com/ReactTraining/react-router +// Definitions by: Tanguy Krotoff +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +declare module 'react-router-dom' { + import { + Prompt, + MemoryRouter, + Redirect, + RouteComponentProps, + RouteProps, + Route, + Router, + StaticRouter, + Switch, + match, + matchPath, + withRouter + } from 'react-router'; + import * as React from 'react'; + import * as H from 'history'; + + + interface BrowserRouterProps { + basename?: string; + getUserConfirmation?: () => void; + forceRefresh?: boolean; + keyLength?: number; + } + class BrowserRouter extends React.Component {} + + + interface HashRouterProps { + basename?: string; + getUserConfirmation?: () => void; + hashType?: 'slash' | 'noslash' | 'hashbang'; + } + class HashRouter extends React.Component {} + + + interface LinkProps extends React.HTMLAttributes { + to: H.LocationDescriptor; + replace?: boolean; + } + class Link extends React.Component {} + + + interface NavLinkProps extends LinkProps { + activeClassName?: string; + activeStyle?: React.CSSProperties; + exact?: boolean; + strict?: boolean; + isActive?: (location: H.Location, props: any) => boolean; + } + class NavLink extends React.Component {} + + + export { + BrowserRouter, + HashRouter, + LinkProps, // TypeScript specific, not from React Router itself + Link, + NavLink, + Prompt, + MemoryRouter, + Redirect, + RouteComponentProps, // TypeScript specific, not from React Router itself + RouteProps, // TypeScript specific, not from React Router itself + Route, + Router, + StaticRouter, + Switch, + match, // TypeScript specific, not from React Router itself + matchPath, + withRouter + } +} diff --git a/types/react-router-dom/tsconfig.json b/types/react-router-dom/tsconfig.json new file mode 100644 index 0000000000..41c143c1c6 --- /dev/null +++ b/types/react-router-dom/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "module": "commonjs", + "lib": ["es6", "dom"], + "jsx": "react", + "strictNullChecks": true, + "noImplicitAny": true, + "noImplicitThis": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true + }, + "files": [ + "index.d.ts" + ] +} diff --git a/types/react-router-dom/tslint.json b/types/react-router-dom/tslint.json new file mode 100644 index 0000000000..cfdf2986e5 --- /dev/null +++ b/types/react-router-dom/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "../tslint.json", + "rules": { + "no-single-declare-module": false + } +} diff --git a/react-router-redux/index.d.ts b/types/react-router-redux/index.d.ts similarity index 100% rename from react-router-redux/index.d.ts rename to types/react-router-redux/index.d.ts diff --git a/react-router-redux/package.json b/types/react-router-redux/package.json similarity index 100% rename from react-router-redux/package.json rename to types/react-router-redux/package.json diff --git a/react-router-redux/react-router-redux-tests.ts b/types/react-router-redux/react-router-redux-tests.ts similarity index 100% rename from react-router-redux/react-router-redux-tests.ts rename to types/react-router-redux/react-router-redux-tests.ts diff --git a/react-router-redux/tsconfig.json b/types/react-router-redux/tsconfig.json similarity index 100% rename from react-router-redux/tsconfig.json rename to types/react-router-redux/tsconfig.json diff --git a/react-sidebar/tslint.json b/types/react-router-redux/tslint.json similarity index 100% rename from react-sidebar/tslint.json rename to types/react-router-redux/tslint.json diff --git a/react-router-redux/v3/index.d.ts b/types/react-router-redux/v3/index.d.ts similarity index 100% rename from react-router-redux/v3/index.d.ts rename to types/react-router-redux/v3/index.d.ts diff --git a/react-router-redux/v3/package.json b/types/react-router-redux/v3/package.json similarity index 100% rename from react-router-redux/v3/package.json rename to types/react-router-redux/v3/package.json diff --git a/react-router-redux/v3/react-router-redux-tests.ts b/types/react-router-redux/v3/react-router-redux-tests.ts similarity index 100% rename from react-router-redux/v3/react-router-redux-tests.ts rename to types/react-router-redux/v3/react-router-redux-tests.ts diff --git a/react-router-redux/v3/tsconfig.json b/types/react-router-redux/v3/tsconfig.json similarity index 100% rename from react-router-redux/v3/tsconfig.json rename to types/react-router-redux/v3/tsconfig.json diff --git a/react-router-redux/v3/tslint.json b/types/react-router-redux/v3/tslint.json similarity index 100% rename from react-router-redux/v3/tslint.json rename to types/react-router-redux/v3/tslint.json diff --git a/types/react-router/index.d.ts b/types/react-router/index.d.ts new file mode 100644 index 0000000000..4ab0049d69 --- /dev/null +++ b/types/react-router/index.d.ts @@ -0,0 +1,110 @@ +// Type definitions for React Router 4.0 +// Project: https://github.com/ReactTraining/react-router +// Definitions by: Sergey Buturlakin +// Yuichi Murata +// Václav Ostrožlík +// Nathan Brown +// Alex Wendland +// Kostya Esmukov +// John Reilly +// Karol Janyst +// Dovydas Navickas +// Tanguy Krotoff +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +declare module 'react-router' { + import * as React from 'react'; + import * as H from 'history'; + + + interface MemoryRouterProps { + initialEntries?: H.Location[]; + initialIndex?: number; + getUserConfirmation?: () => void; + keyLength?: number; + } + class MemoryRouter extends React.Component {} + + + interface PromptProps { + message: string | ((location: H.Location) => void); + when?: boolean; + } + class Prompt extends React.Component {} + + + interface RedirectProps { + to: H.LocationDescriptor; + push?: boolean; + from?: string; + } + class Redirect extends React.Component {} + + + interface RouteComponentProps

{ + match: match

; + location: H.Location; + history: H.History; + } + + interface RouteProps { + location?: H.Location; + component?: React.SFC | void> | React.ComponentClass | void>; + render?: (props: RouteComponentProps) => React.ReactNode; + children?: (props: RouteComponentProps) => React.ReactNode | React.ReactNode; + path?: string; + exact?: boolean; + strict?: boolean; + } + class Route extends React.Component {} + + + interface RouterProps { + history: any; + } + class Router extends React.Component {} + + + interface StaticRouterProps extends RouterProps { + basename?: string; + location?: string | object; + context?: object; + } + class StaticRouter extends React.Component {} + + + interface SwitchProps extends RouteProps { + } + class Switch extends React.Component {} + + + interface match

{ + params: P; + isExact: boolean; + path: string; + url: string; + } + + + function matchPath

(pathname: string, props: RouteProps): match

| null; + + + function withRouter(component: React.SFC> | React.ComponentClass>): React.ComponentClass; + + + export { + MemoryRouter, + Prompt, + Redirect, + RouteComponentProps, // TypeScript specific, not from React Router itself + RouteProps, // TypeScript specific, not from React Router itself + Route, + Router, + StaticRouter, + Switch, + match, // TypeScript specific, not from React Router itself + matchPath, + withRouter + } +} diff --git a/types/react-router/test/Ambiguous.tsx b/types/react-router/test/Ambiguous.tsx new file mode 100644 index 0000000000..971636a1e0 --- /dev/null +++ b/types/react-router/test/Ambiguous.tsx @@ -0,0 +1,50 @@ +import * as React from 'react' +import { + BrowserRouter as Router, + RouteComponentProps, + Route, + Link, + Switch +} from 'react-router-dom' + +const AmbiguousExample = () => ( + +

+
    +
  • About Us (static)
  • +
  • Company (static)
  • +
  • Kim (dynamic)
  • +
  • Chris (dynamic)
  • +
+ + {/* + Sometimes you want to have a whitelist of static paths + like "/about" and "/company" but also allow for dynamic + patterns like "/:user". The problem is that "/about" + is ambiguous and will match both "/about" and "/:user". + Most routers have an algorithm to decide for you what + it will match since they only allow you to match one + "route". React Router lets you match in multiple places + on purpose (sidebars, breadcrumbs, etc). So, when you + want to clear up any ambiguous matching, and not match + "/about" to "/:user", just wrap your s in a + . It will render the first one that matches. + */} + + + + + +
+ +) + +const About = () =>

About

+const Company = () =>

Company

+const User: React.SFC> = ({ match }) => ( +
+

User: {match.params.user}

+
+) + +export default AmbiguousExample \ No newline at end of file diff --git a/types/react-router/test/Animation.tsx b/types/react-router/test/Animation.tsx new file mode 100644 index 0000000000..1696dfd6fd --- /dev/null +++ b/types/react-router/test/Animation.tsx @@ -0,0 +1,123 @@ +import * as React from 'react' +import * as ReactCSSTransitionGroup from 'react-addons-css-transition-group' +import { + BrowserRouter as Router, + RouteComponentProps, + Route, + LinkProps, + Link, + Redirect +} from 'react-router-dom' + +/* you'll need this CSS somewhere +.fade-enter { + opacity: 0; + z-index: 1; +} +.fade-enter.fade-enter-active { + opacity: 1; + transition: opacity 250ms ease-in; +} +*/ + +const AnimationExample = () => ( + + ( +
+ ( + + )}/> + +
    + Red + Green + Blue + Pink +
+ +
+ + {/* no different than other usage of + ReactCSSTransitionGroup, just make + sure to pass `location` to `Route` + so it can match the old location + as it animates out + */} + + +
+
+ )}/> +
+) + +const NavLink: React.SFC = (props) => ( +
  • + +
  • +) + +interface HSLParams { + h: number; + s: number; + l: number; +} + +const HSL: React.SFC> = ({ match: { params } }) => ( +
    hsl({params.h}, {params.s}%, {params.l}%)
    +) + +const styles: any = {} + +styles.fill = { + position: 'absolute', + left: 0, + right: 0, + top: 0, + bottom: 0 +} + +styles.content = { + ...styles.fill, + top: '40px', + textAlign: 'center' +} + +styles.nav = { + padding: 0, + margin: 0, + position: 'absolute', + top: 0, + height: '40px', + width: '100%', + display: 'flex' +} + +styles.navItem = { + textAlign: 'center', + flex: 1, + listStyleType: 'none', + padding: '10px' +} + +styles.hsl = { + ...styles.fill, + color: 'white', + paddingTop: '20px', + fontSize: '30px' +} + +export default AnimationExample \ No newline at end of file diff --git a/types/react-router/test/Auth.tsx b/types/react-router/test/Auth.tsx new file mode 100644 index 0000000000..86dffe2b63 --- /dev/null +++ b/types/react-router/test/Auth.tsx @@ -0,0 +1,101 @@ +import * as React from 'react' +import { + BrowserRouter as Router, + RouteComponentProps, + RouteProps, + Route, + Link, + Redirect, + withRouter +} from 'react-router-dom' + +//////////////////////////////////////////////////////////// +// 1. Click the public page +// 2. Click the protected page +// 3. Log in +// 4. Click the back button, note the URL each time + +const AuthExample = () => ( + +
    + +
      +
    • Public Page
    • +
    • Protected Page
    • +
    + + + +
    +
    +) + +const fakeAuth = { + isAuthenticated: false, + authenticate(this: any, cb: () => void) { + this.isAuthenticated = true + setTimeout(cb, 100) // fake async + }, + signout(this: any, cb: () => void) { + this.isAuthenticated = false + setTimeout(cb, 100) + } +} + +const AuthButton = withRouter(({ history }) => ( + fakeAuth.isAuthenticated ? ( +

    + Welcome! +

    + ) : ( +

    You are not logged in.

    + ) +)) + +const PrivateRoute: React.SFC = ({ component, ...rest }) => ( + ( + fakeAuth.isAuthenticated ? React.createElement(component! as React.SFC, props) : ( + + ) + )}/> +) + +const Public: React.SFC> = () =>

    Public

    +const Protected: React.SFC> = () =>

    Protected

    + +class Login extends React.Component, {redirectToReferrer: boolean}> { + state = { + redirectToReferrer: false + } + + login = () => { + fakeAuth.authenticate(() => { + this.setState({ redirectToReferrer: true }) + }) + } + + render() { + const { from } = this.props.location.state || { from: { pathname: '/' } } + const { redirectToReferrer } = this.state + + if (redirectToReferrer) { + return ( + + ) + } + + return ( +
    +

    You must log in to view the page at {from.pathname}

    + +
    + ) + } +} + +export default AuthExample \ No newline at end of file diff --git a/types/react-router/test/Basic.tsx b/types/react-router/test/Basic.tsx new file mode 100644 index 0000000000..16ff86947a --- /dev/null +++ b/types/react-router/test/Basic.tsx @@ -0,0 +1,73 @@ +import * as React from 'react' +import { + BrowserRouter as Router, + RouteComponentProps, + Route, + Link +} from 'react-router-dom' + +const BasicExample = () => ( + +
    +
      +
    • Home
    • +
    • About
    • +
    • Topics
    • +
    + +
    + + + + +
    +
    +) + +const Home = () => ( +
    +

    Home

    +
    +) + +const About = () => ( +
    +

    About

    +
    +) + +const Topics: React.SFC> = ({ match }) => ( +
    +

    Topics

    +
      +
    • + + Rendering with React + +
    • +
    • + + Components + +
    • +
    • + + Props v. State + +
    • +
    + + + ( +

    Please select a topic.

    + )}/> +
    +) + +const Topic: React.SFC> = ({ match }) => ( +
    +

    {match.params.topicId}

    +
    +) + +export default BasicExample \ No newline at end of file diff --git a/types/react-router/test/CustomLink.tsx b/types/react-router/test/CustomLink.tsx new file mode 100644 index 0000000000..2159cf039a --- /dev/null +++ b/types/react-router/test/CustomLink.tsx @@ -0,0 +1,45 @@ +import * as React from 'react' +import { + BrowserRouter as Router, + Route, + LinkProps, + Link +} from 'react-router-dom' + +const CustomLinkExample = () => ( + +
    + + +
    + + +
    +
    +) + +interface OldSchoolMenuLinkProps extends LinkProps { + activeOnlyWhenExact?: boolean; +} + +const OldSchoolMenuLink: React.SFC = ({ label, to, activeOnlyWhenExact }) => ( + ( +
    + {match ? '> ' : ''}{label} +
    + )}/> +) + +const Home = () => ( +
    +

    Home

    +
    +) + +const About = () => ( +
    +

    About

    +
    +) + +export default CustomLinkExample \ No newline at end of file diff --git a/types/react-router/test/ModalGallery.tsx b/types/react-router/test/ModalGallery.tsx new file mode 100644 index 0000000000..ccaefe3adc --- /dev/null +++ b/types/react-router/test/ModalGallery.tsx @@ -0,0 +1,177 @@ +import * as React from 'react' +import { + BrowserRouter as Router, + Switch, + RouteComponentProps, + Route, + Link +} from 'react-router-dom' + +// This example shows how to render two different screens +// (or the same screen in a different context) at the same url, +// depending on you got there. +// +// Click the colors and see them full screen, then "visit the +// gallery" and click on the colors. Note the URL and the component +// are the same as before but now we see them inside a modal +// on top of the old screen. + +class ModalSwitch extends React.Component, void> { + + // We can pass a location to that will tell it to + // ignore the router's current location and use the location + // prop instead. + // + // We can also use "location state" to tell the app the user + // wants to go to `/images/2` in a modal, rather than as the + // main page, keeping the gallery visible behind it. + // + // Normally, `/images/2` wouldn't match the gallery at `/`. + // So, to get both screens to render, we can save the old + // location and pass it to Switch, so it will think the location + // is still `/` even though its `/images/2`. + previousLocation = this.props.location + + componentWillUpdate(nextProps: RouteComponentProps) { + const { location } = this.props + // set previousLocation if props.location is not modal + if ( + nextProps.history.action !== 'POP' && + (!location.state || !location.state.modal) + ) { + this.previousLocation = this.props.location + } + } + + render() { + const { location } = this.props + const isModal = !!( + location.state && + location.state.modal && + this.previousLocation !== location // not initial render + ) + return ( +
    + + + + + + {isModal ? : null} +
    + ) + } +} + +const IMAGES = [ + { id: 0, title: 'Dark Orchid', color: 'DarkOrchid' }, + { id: 1, title: 'Lime Green', color: 'LimeGreen' }, + { id: 2, title: 'Tomato', color: 'Tomato' }, + { id: 3, title: 'Seven Ate Nine', color: '#789' }, + { id: 4, title: 'Crimson', color: 'Crimson' } +] + +const Thumbnail: React.SFC<{color: string}> = ({ color }) => +
    + +const Image: React.SFC<{color: string}> = ({ color }) => +
    + +const Home = () => ( +
    + Visit the Gallery +

    Featured Images

    +
      +
    • Tomato
    • +
    • Crimson
    • +
    +
    +) + +const Gallery = () => ( +
    + {IMAGES.map(i => ( + + +

    {i.title}

    + + ))} +
    +) + +const ImageView: React.SFC> = ({ match }) => { + const image = IMAGES[parseInt(match.params.id, 10)] + if (!image) { + return
    Image not found
    + } + + return ( +
    +

    {image.title}

    + +
    + ) +} + +const Modal: React.SFC> = ({ match, history }) => { + const image = IMAGES[parseInt(match.params.id, 10)] + if (!image) { + return null! + } + const back = (e: React.MouseEvent) => { + e.stopPropagation() + history.goBack() + } + return ( +
    +
    +

    {image.title}

    + + +
    +
    + ) +} + +const ModalGallery = () => ( + + + +) + +export default ModalGallery \ No newline at end of file diff --git a/types/react-router/test/NoMatch.tsx b/types/react-router/test/NoMatch.tsx new file mode 100644 index 0000000000..10b7a64fa9 --- /dev/null +++ b/types/react-router/test/NoMatch.tsx @@ -0,0 +1,48 @@ +import * as React from 'react' +import { + BrowserRouter as Router, + RouteComponentProps, + Route, + Link, + Switch, + Redirect +} from 'react-router-dom' + +const NoMatchExample = () => ( + +
    +
      +
    • Home
    • +
    • Old Match, to be redirected
    • +
    • Will Match
    • +
    • Will Not Match
    • +
    • Also Will Not Match
    • +
    + + + + + + +
    +
    +) + +const Home = () => ( +

    + A <Switch> renders the + first child <Route> that + matches. A <Route> with + no path always matches. +

    +) + +const WillMatch = () =>

    Matched!

    + +const NoMatch: React.SFC> = ({ location }) => ( +
    +

    No match for {location.pathname}

    +
    +) + +export default NoMatchExample \ No newline at end of file diff --git a/types/react-router/test/Params.tsx b/types/react-router/test/Params.tsx new file mode 100644 index 0000000000..148161c317 --- /dev/null +++ b/types/react-router/test/Params.tsx @@ -0,0 +1,31 @@ +import * as React from 'react' +import { + BrowserRouter as Router, + RouteComponentProps, + Route, + Link +} from 'react-router-dom' + +const ParamsExample = () => ( + +
    +

    Accounts

    +
      +
    • Netflix
    • +
    • Zillow Group
    • +
    • Yahoo
    • +
    • Modus Create
    • +
    + + +
    +
    +) + +const Child: React.SFC> = ({ match }) => ( +
    +

    ID: {match.params.id}

    +
    +) + +export default ParamsExample \ No newline at end of file diff --git a/types/react-router/test/PreventingTransitions.tsx b/types/react-router/test/PreventingTransitions.tsx new file mode 100644 index 0000000000..b23ba65608 --- /dev/null +++ b/types/react-router/test/PreventingTransitions.tsx @@ -0,0 +1,74 @@ +import * as React from 'react' +import { + BrowserRouter as Router, + RouteComponentProps, + Route, + Link, + Prompt +} from 'react-router-dom' + +const PreventingTransitionsExample = () => ( + +
    +
      +
    • Form
    • +
    • One
    • +
    • Two
    • +
    + +

    One

    }/> +

    Two

    }/> +
    +
    +) + +class Form extends React.Component { + state = { + isBlocking: false + } + + render() { + const { isBlocking } = this.state + + return ( +
    { + event.preventDefault(); + (event.target as HTMLFormElement).reset(); + this.setState({ + isBlocking: false + }) + }} + > + ( + `Are you sure you want to go to ${location.pathname}` + )} + /> + +

    + Blocking? {isBlocking ? 'Yes, click a link or the back button' : 'Nope'} +

    + +

    + { + this.setState({ + isBlocking: event.target.value.length > 0 + }) + }} + /> +

    + +

    + +

    + + ) + } +} + +export default PreventingTransitionsExample \ No newline at end of file diff --git a/types/react-router/test/README.md b/types/react-router/test/README.md new file mode 100644 index 0000000000..341bd29130 --- /dev/null +++ b/types/react-router/test/README.md @@ -0,0 +1 @@ +Examples taken from https://github.com/ReactTraining/react-router/tree/22bd52c901ef0312348c2b02549c7102bd5653ae/packages/react-router-website/modules/examples diff --git a/types/react-router/test/Recursive.tsx b/types/react-router/test/Recursive.tsx new file mode 100644 index 0000000000..748e00a968 --- /dev/null +++ b/types/react-router/test/Recursive.tsx @@ -0,0 +1,57 @@ +import * as React from 'react' +import { + BrowserRouter as Router, + RouteComponentProps, + Route, + Link, + match +} from 'react-router-dom' +import * as H from 'history'; + +const PEEPS = [ + { id: 0, name: 'Michelle', friends: [ 1, 2, 3 ] }, + { id: 1, name: 'Sean', friends: [ 0, 3 ] }, + { id: 2, name: 'Kim', friends: [ 0, 1, 3 ], }, + { id: 3, name: 'David', friends: [ 1, 2 ] } +] + +const find = (id: number) => PEEPS.find(p => p.id == id) + +const RecursiveExample = () => ( + + + +) + +interface InitialPersonProps { + match: { + params: { + id: number; + }; + url: string; + }; +} + +type PersonProps = RouteComponentProps<{ id: number }>; + +const Person: React.SFC = ({ match }) => { + const person = find(match.params.id) + + return ( +
    +

    {person!.name}’s Friends

    +
      + {person!.friends.map(id => ( +
    • + + {find(id)!.name} + +
    • + ))} +
    + }/> +
    + ) +} + +export default RecursiveExample diff --git a/types/react-router/test/RouteConfig.tsx b/types/react-router/test/RouteConfig.tsx new file mode 100644 index 0000000000..1dffdc1527 --- /dev/null +++ b/types/react-router/test/RouteConfig.tsx @@ -0,0 +1,88 @@ +import * as React from 'react' +import { + BrowserRouter as Router, + RouteComponentProps, + RouteProps, + Route, + Link +} from 'react-router-dom' + +// Some folks find value in a centralized route config. +// A route config is just data. React is great at mapping +// data into components, and is a component. + +//////////////////////////////////////////////////////////// +// first our route components +const Main = () =>

    Main

    + +const Sandwiches = () =>

    Sandwiches

    + +interface PropsWithRoutes extends RouteComponentProps { + routes: Array; +} + +const Tacos: React.SFC = ({ routes }) => ( +
    +

    Tacos

    +
      +
    • Bus
    • +
    • Cart
    • +
    + + {routes.map((route, i) => ( + + ))} +
    +) + +const Bus = () =>

    Bus

    +const Cart = () =>

    Cart

    + +//////////////////////////////////////////////////////////// +// then our route config +interface MyRouteProps extends RouteProps { + component: React.SFC; + routes?: MyRouteProps[]; +} +const routes: Array = [ + { path: '/sandwiches', + component: Sandwiches + }, + { path: '/tacos', + component: Tacos, + routes: [ + { path: '/tacos/bus', + component: Bus + }, + { path: '/tacos/cart', + component: Cart + } + ] + } +] + +// wrap and use this everywhere instead, then when +// sub routes are added to any route it'll work +const RouteWithSubRoutes = (route: MyRouteProps) => ( + ( + // pass the sub-routes down to keep nesting + + )}/> +) + +const RouteConfigExample = () => ( + +
    +
      +
    • Tacos
    • +
    • Sandwiches
    • +
    + + {routes.map((route, i) => ( + + ))} +
    +
    +) + +export default RouteConfigExample \ No newline at end of file diff --git a/types/react-router/test/Sidebar.tsx b/types/react-router/test/Sidebar.tsx new file mode 100644 index 0000000000..fb81829dfb --- /dev/null +++ b/types/react-router/test/Sidebar.tsx @@ -0,0 +1,80 @@ +import * as React from 'react' +import { + BrowserRouter as Router, + RouteProps, + Route, + Link +} from 'react-router-dom' + +// Each logical "route" has two components, one for +// the sidebar and one for the main area. We want to +// render both of them in different places when the +// path matches the current URL. +interface MyRoute extends RouteProps { + sidebar: () => JSX.Element; + main: () => JSX.Element; +} +const routes: Array = [ + { path: '/', + exact: true, + sidebar: () =>
    home!
    , + main: () =>

    Home

    + }, + { path: '/bubblegum', + sidebar: () =>
    bubblegum!
    , + main: () =>

    Bubblegum

    + }, + { path: '/shoelaces', + sidebar: () =>
    shoelaces!
    , + main: () =>

    Shoelaces

    + } +] + +const SidebarExample = () => ( + +
    +
    +
      +
    • Home
    • +
    • Bubblegum
    • +
    • Shoelaces
    • +
    + + {routes.map((route, index) => ( + // You can render a in as many places + // as you want in your app. It will render along + // with any other s that also match the URL. + // So, a sidebar or breadcrumbs or anything else + // that requires you to render multiple things + // in multiple places at the same URL is nothing + // more than multiple s. + + ))} +
    + +
    + {routes.map((route, index) => ( + // Render more s with the same paths as + // above, but different components this time. + + ))} +
    +
    +
    +) + +export default SidebarExample \ No newline at end of file diff --git a/types/react-router/tsconfig.json b/types/react-router/tsconfig.json new file mode 100644 index 0000000000..c98755507a --- /dev/null +++ b/types/react-router/tsconfig.json @@ -0,0 +1,30 @@ +{ + "compilerOptions": { + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "module": "commonjs", + "lib": ["es6", "dom"], + "jsx": "react", + "strictNullChecks": true, + "noImplicitAny": true, + "noImplicitThis": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true + }, + "files": [ + "index.d.ts", + "test/Ambiguous.tsx", + "test/Animation.tsx", + "test/Auth.tsx", + "test/Basic.tsx", + "test/CustomLink.tsx", + "test/ModalGallery.tsx", + "test/NoMatch.tsx", + "test/Params.tsx", + "test/PreventingTransitions.tsx", + "test/Recursive.tsx", + "test/RouteConfig.tsx", + "test/Sidebar.tsx" + ] +} diff --git a/types/react-router/tslint.json b/types/react-router/tslint.json new file mode 100644 index 0000000000..0209984d72 --- /dev/null +++ b/types/react-router/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "../tslint.json", + "rules": { + "no-empty-interface": false, + "void-return": false, + "no-single-declare-module": false + } +} diff --git a/react-router/v2/index.d.ts b/types/react-router/v2/index.d.ts similarity index 100% rename from react-router/v2/index.d.ts rename to types/react-router/v2/index.d.ts diff --git a/react-router/v2/lib/IndexLink.d.ts b/types/react-router/v2/lib/IndexLink.d.ts similarity index 100% rename from react-router/v2/lib/IndexLink.d.ts rename to types/react-router/v2/lib/IndexLink.d.ts diff --git a/react-router/v2/lib/IndexRedirect.d.ts b/types/react-router/v2/lib/IndexRedirect.d.ts similarity index 100% rename from react-router/v2/lib/IndexRedirect.d.ts rename to types/react-router/v2/lib/IndexRedirect.d.ts diff --git a/react-router/v2/lib/IndexRoute.d.ts b/types/react-router/v2/lib/IndexRoute.d.ts similarity index 100% rename from react-router/v2/lib/IndexRoute.d.ts rename to types/react-router/v2/lib/IndexRoute.d.ts diff --git a/react-router/v2/lib/Lifecycle.d.ts b/types/react-router/v2/lib/Lifecycle.d.ts similarity index 100% rename from react-router/v2/lib/Lifecycle.d.ts rename to types/react-router/v2/lib/Lifecycle.d.ts diff --git a/react-router/v2/lib/Link.d.ts b/types/react-router/v2/lib/Link.d.ts similarity index 100% rename from react-router/v2/lib/Link.d.ts rename to types/react-router/v2/lib/Link.d.ts diff --git a/react-router/v2/lib/PatternUtils.d.ts b/types/react-router/v2/lib/PatternUtils.d.ts similarity index 100% rename from react-router/v2/lib/PatternUtils.d.ts rename to types/react-router/v2/lib/PatternUtils.d.ts diff --git a/react-router/v2/lib/PropTypes.d.ts b/types/react-router/v2/lib/PropTypes.d.ts similarity index 100% rename from react-router/v2/lib/PropTypes.d.ts rename to types/react-router/v2/lib/PropTypes.d.ts diff --git a/react-router/v2/lib/Redirect.d.ts b/types/react-router/v2/lib/Redirect.d.ts similarity index 100% rename from react-router/v2/lib/Redirect.d.ts rename to types/react-router/v2/lib/Redirect.d.ts diff --git a/react-router/v2/lib/Route.d.ts b/types/react-router/v2/lib/Route.d.ts similarity index 100% rename from react-router/v2/lib/Route.d.ts rename to types/react-router/v2/lib/Route.d.ts diff --git a/react-router/v2/lib/RouteContext.d.ts b/types/react-router/v2/lib/RouteContext.d.ts similarity index 100% rename from react-router/v2/lib/RouteContext.d.ts rename to types/react-router/v2/lib/RouteContext.d.ts diff --git a/react-router/v2/lib/RouteUtils.d.ts b/types/react-router/v2/lib/RouteUtils.d.ts similarity index 100% rename from react-router/v2/lib/RouteUtils.d.ts rename to types/react-router/v2/lib/RouteUtils.d.ts diff --git a/react-router/v2/lib/Router.d.ts b/types/react-router/v2/lib/Router.d.ts similarity index 100% rename from react-router/v2/lib/Router.d.ts rename to types/react-router/v2/lib/Router.d.ts diff --git a/react-router/v2/lib/RouterContext.d.ts b/types/react-router/v2/lib/RouterContext.d.ts similarity index 100% rename from react-router/v2/lib/RouterContext.d.ts rename to types/react-router/v2/lib/RouterContext.d.ts diff --git a/react-router/v2/lib/applyRouterMiddleware.d.ts b/types/react-router/v2/lib/applyRouterMiddleware.d.ts similarity index 100% rename from react-router/v2/lib/applyRouterMiddleware.d.ts rename to types/react-router/v2/lib/applyRouterMiddleware.d.ts diff --git a/react-router/v2/lib/browserHistory.d.ts b/types/react-router/v2/lib/browserHistory.d.ts similarity index 100% rename from react-router/v2/lib/browserHistory.d.ts rename to types/react-router/v2/lib/browserHistory.d.ts diff --git a/react-router/v2/lib/createMemoryHistory.d.ts b/types/react-router/v2/lib/createMemoryHistory.d.ts similarity index 100% rename from react-router/v2/lib/createMemoryHistory.d.ts rename to types/react-router/v2/lib/createMemoryHistory.d.ts diff --git a/react-router/v2/lib/hashHistory.d.ts b/types/react-router/v2/lib/hashHistory.d.ts similarity index 100% rename from react-router/v2/lib/hashHistory.d.ts rename to types/react-router/v2/lib/hashHistory.d.ts diff --git a/react-router/v2/lib/match.d.ts b/types/react-router/v2/lib/match.d.ts similarity index 100% rename from react-router/v2/lib/match.d.ts rename to types/react-router/v2/lib/match.d.ts diff --git a/react-router/v2/lib/routerHistory.d.ts b/types/react-router/v2/lib/routerHistory.d.ts similarity index 100% rename from react-router/v2/lib/routerHistory.d.ts rename to types/react-router/v2/lib/routerHistory.d.ts diff --git a/react-router/v2/lib/useRouterHistory.d.ts b/types/react-router/v2/lib/useRouterHistory.d.ts similarity index 100% rename from react-router/v2/lib/useRouterHistory.d.ts rename to types/react-router/v2/lib/useRouterHistory.d.ts diff --git a/react-router/v2/lib/useRoutes.d.ts b/types/react-router/v2/lib/useRoutes.d.ts similarity index 100% rename from react-router/v2/lib/useRoutes.d.ts rename to types/react-router/v2/lib/useRoutes.d.ts diff --git a/react-router/v2/lib/withRouter.d.ts b/types/react-router/v2/lib/withRouter.d.ts similarity index 100% rename from react-router/v2/lib/withRouter.d.ts rename to types/react-router/v2/lib/withRouter.d.ts diff --git a/react-router/v2/tsconfig.json b/types/react-router/v2/tsconfig.json similarity index 100% rename from react-router/v2/tsconfig.json rename to types/react-router/v2/tsconfig.json diff --git a/react-router/v2/tslint.json b/types/react-router/v2/tslint.json similarity index 100% rename from react-router/v2/tslint.json rename to types/react-router/v2/tslint.json diff --git a/react-router/index.d.ts b/types/react-router/v3/index.d.ts similarity index 100% rename from react-router/index.d.ts rename to types/react-router/v3/index.d.ts diff --git a/react-router/lib/IndexLink.d.ts b/types/react-router/v3/lib/IndexLink.d.ts similarity index 100% rename from react-router/lib/IndexLink.d.ts rename to types/react-router/v3/lib/IndexLink.d.ts diff --git a/react-router/lib/IndexRedirect.d.ts b/types/react-router/v3/lib/IndexRedirect.d.ts similarity index 100% rename from react-router/lib/IndexRedirect.d.ts rename to types/react-router/v3/lib/IndexRedirect.d.ts diff --git a/react-router/lib/IndexRoute.d.ts b/types/react-router/v3/lib/IndexRoute.d.ts similarity index 100% rename from react-router/lib/IndexRoute.d.ts rename to types/react-router/v3/lib/IndexRoute.d.ts diff --git a/react-router/lib/Link.d.ts b/types/react-router/v3/lib/Link.d.ts similarity index 100% rename from react-router/lib/Link.d.ts rename to types/react-router/v3/lib/Link.d.ts diff --git a/react-router/lib/PatternUtils.d.ts b/types/react-router/v3/lib/PatternUtils.d.ts similarity index 100% rename from react-router/lib/PatternUtils.d.ts rename to types/react-router/v3/lib/PatternUtils.d.ts diff --git a/react-router/lib/PropTypes.d.ts b/types/react-router/v3/lib/PropTypes.d.ts similarity index 100% rename from react-router/lib/PropTypes.d.ts rename to types/react-router/v3/lib/PropTypes.d.ts diff --git a/react-router/lib/Redirect.d.ts b/types/react-router/v3/lib/Redirect.d.ts similarity index 100% rename from react-router/lib/Redirect.d.ts rename to types/react-router/v3/lib/Redirect.d.ts diff --git a/react-router/lib/Route.d.ts b/types/react-router/v3/lib/Route.d.ts similarity index 100% rename from react-router/lib/Route.d.ts rename to types/react-router/v3/lib/Route.d.ts diff --git a/react-router/lib/RouteUtils.d.ts b/types/react-router/v3/lib/RouteUtils.d.ts similarity index 100% rename from react-router/lib/RouteUtils.d.ts rename to types/react-router/v3/lib/RouteUtils.d.ts diff --git a/react-router/lib/Router.d.ts b/types/react-router/v3/lib/Router.d.ts similarity index 100% rename from react-router/lib/Router.d.ts rename to types/react-router/v3/lib/Router.d.ts diff --git a/react-router/lib/RouterContext.d.ts b/types/react-router/v3/lib/RouterContext.d.ts similarity index 100% rename from react-router/lib/RouterContext.d.ts rename to types/react-router/v3/lib/RouterContext.d.ts diff --git a/react-router/lib/applyRouterMiddleware.d.ts b/types/react-router/v3/lib/applyRouterMiddleware.d.ts similarity index 100% rename from react-router/lib/applyRouterMiddleware.d.ts rename to types/react-router/v3/lib/applyRouterMiddleware.d.ts diff --git a/react-router/lib/browserHistory.d.ts b/types/react-router/v3/lib/browserHistory.d.ts similarity index 100% rename from react-router/lib/browserHistory.d.ts rename to types/react-router/v3/lib/browserHistory.d.ts diff --git a/react-router/lib/createMemoryHistory.d.ts b/types/react-router/v3/lib/createMemoryHistory.d.ts similarity index 100% rename from react-router/lib/createMemoryHistory.d.ts rename to types/react-router/v3/lib/createMemoryHistory.d.ts diff --git a/react-router/lib/hashHistory.d.ts b/types/react-router/v3/lib/hashHistory.d.ts similarity index 100% rename from react-router/lib/hashHistory.d.ts rename to types/react-router/v3/lib/hashHistory.d.ts diff --git a/react-router/lib/match.d.ts b/types/react-router/v3/lib/match.d.ts similarity index 100% rename from react-router/lib/match.d.ts rename to types/react-router/v3/lib/match.d.ts diff --git a/react-router/lib/useRouterHistory.d.ts b/types/react-router/v3/lib/useRouterHistory.d.ts similarity index 100% rename from react-router/lib/useRouterHistory.d.ts rename to types/react-router/v3/lib/useRouterHistory.d.ts diff --git a/react-router/lib/withRouter.d.ts b/types/react-router/v3/lib/withRouter.d.ts similarity index 100% rename from react-router/lib/withRouter.d.ts rename to types/react-router/v3/lib/withRouter.d.ts diff --git a/react-router/react-router-tests.tsx b/types/react-router/v3/react-router-tests.tsx similarity index 100% rename from react-router/react-router-tests.tsx rename to types/react-router/v3/react-router-tests.tsx diff --git a/react-router/tsconfig.json b/types/react-router/v3/tsconfig.json similarity index 83% rename from react-router/tsconfig.json rename to types/react-router/v3/tsconfig.json index 301ed3f651..0f60e7a6ea 100644 --- a/react-router/tsconfig.json +++ b/types/react-router/v3/tsconfig.json @@ -9,11 +9,13 @@ "noImplicitThis": true, "strictNullChecks": false, "jsx": "react", - "baseUrl": "../", - "typeRoots": ["../"], + "baseUrl": "../../", + "typeRoots": ["../../"], "paths": { "history": ["history/v3"], - "history/*": ["history/v3/*"] + "history/*": ["history/v3/*"], + "react-router": ["react-router/v3"], + "react-router/*": ["react-router/v3/*"] }, "types": [], "noEmit": true, diff --git a/react-smooth-scrollbar/tslint.json b/types/react-router/v3/tslint.json similarity index 100% rename from react-smooth-scrollbar/tslint.json rename to types/react-router/v3/tslint.json diff --git a/react-scroll/index.d.ts b/types/react-scroll/index.d.ts similarity index 100% rename from react-scroll/index.d.ts rename to types/react-scroll/index.d.ts diff --git a/react-scroll/react-scroll-tests.tsx b/types/react-scroll/react-scroll-tests.tsx similarity index 100% rename from react-scroll/react-scroll-tests.tsx rename to types/react-scroll/react-scroll-tests.tsx diff --git a/react-scroll/tsconfig.json b/types/react-scroll/tsconfig.json similarity index 100% rename from react-scroll/tsconfig.json rename to types/react-scroll/tsconfig.json diff --git a/react-scrollbar/index.d.ts b/types/react-scrollbar/index.d.ts similarity index 100% rename from react-scrollbar/index.d.ts rename to types/react-scrollbar/index.d.ts diff --git a/react-scrollbar/react-scrollbar-tests.tsx b/types/react-scrollbar/react-scrollbar-tests.tsx similarity index 100% rename from react-scrollbar/react-scrollbar-tests.tsx rename to types/react-scrollbar/react-scrollbar-tests.tsx diff --git a/react-scrollbar/tsconfig.json b/types/react-scrollbar/tsconfig.json similarity index 100% rename from react-scrollbar/tsconfig.json rename to types/react-scrollbar/tsconfig.json diff --git a/react-select/index.d.ts b/types/react-select/index.d.ts similarity index 99% rename from react-select/index.d.ts rename to types/react-select/index.d.ts index 789512661f..2ce34cf2b8 100644 --- a/react-select/index.d.ts +++ b/types/react-select/index.d.ts @@ -169,6 +169,10 @@ declare namespace ReactSelectClass { * @default {} */ inputProps?: Object; + /** + * renders a custom input + */ + inputRenderer?: (props: Object) => React.ReactElement; /** * whether the Select is loading externally or not (such as options being loaded). * if true, a loading spinner will be shown at the right side. diff --git a/react-select/react-select-tests.tsx b/types/react-select/react-select-tests.tsx similarity index 100% rename from react-select/react-select-tests.tsx rename to types/react-select/react-select-tests.tsx diff --git a/react-select/tsconfig.json b/types/react-select/tsconfig.json similarity index 100% rename from react-select/tsconfig.json rename to types/react-select/tsconfig.json diff --git a/react-side-effect/index.d.ts b/types/react-side-effect/index.d.ts similarity index 100% rename from react-side-effect/index.d.ts rename to types/react-side-effect/index.d.ts diff --git a/react-side-effect/react-side-effect-tests.ts b/types/react-side-effect/react-side-effect-tests.ts similarity index 100% rename from react-side-effect/react-side-effect-tests.ts rename to types/react-side-effect/react-side-effect-tests.ts diff --git a/react-side-effect/tsconfig.json b/types/react-side-effect/tsconfig.json similarity index 100% rename from react-side-effect/tsconfig.json rename to types/react-side-effect/tsconfig.json diff --git a/react-sidebar/index.d.ts b/types/react-sidebar/index.d.ts similarity index 100% rename from react-sidebar/index.d.ts rename to types/react-sidebar/index.d.ts diff --git a/react-sidebar/react-sidebar-tests.tsx b/types/react-sidebar/react-sidebar-tests.tsx similarity index 100% rename from react-sidebar/react-sidebar-tests.tsx rename to types/react-sidebar/react-sidebar-tests.tsx diff --git a/react-sidebar/tsconfig.json b/types/react-sidebar/tsconfig.json similarity index 100% rename from react-sidebar/tsconfig.json rename to types/react-sidebar/tsconfig.json diff --git a/react-sticky/tslint.json b/types/react-sidebar/tslint.json similarity index 100% rename from react-sticky/tslint.json rename to types/react-sidebar/tslint.json diff --git a/react-slick/index.d.ts b/types/react-slick/index.d.ts similarity index 100% rename from react-slick/index.d.ts rename to types/react-slick/index.d.ts diff --git a/react-slick/react-slick-tests.tsx b/types/react-slick/react-slick-tests.tsx similarity index 100% rename from react-slick/react-slick-tests.tsx rename to types/react-slick/react-slick-tests.tsx diff --git a/react-slick/tsconfig.json b/types/react-slick/tsconfig.json similarity index 100% rename from react-slick/tsconfig.json rename to types/react-slick/tsconfig.json diff --git a/react-smooth-scrollbar/index.d.ts b/types/react-smooth-scrollbar/index.d.ts similarity index 100% rename from react-smooth-scrollbar/index.d.ts rename to types/react-smooth-scrollbar/index.d.ts diff --git a/react-smooth-scrollbar/react-smooth-scrollbar-tests.tsx b/types/react-smooth-scrollbar/react-smooth-scrollbar-tests.tsx similarity index 100% rename from react-smooth-scrollbar/react-smooth-scrollbar-tests.tsx rename to types/react-smooth-scrollbar/react-smooth-scrollbar-tests.tsx diff --git a/react-smooth-scrollbar/tsconfig.json b/types/react-smooth-scrollbar/tsconfig.json similarity index 100% rename from react-smooth-scrollbar/tsconfig.json rename to types/react-smooth-scrollbar/tsconfig.json diff --git a/react-test-renderer/tslint.json b/types/react-smooth-scrollbar/tslint.json similarity index 100% rename from react-test-renderer/tslint.json rename to types/react-smooth-scrollbar/tslint.json diff --git a/react-sortable-hoc/index.d.ts b/types/react-sortable-hoc/index.d.ts similarity index 100% rename from react-sortable-hoc/index.d.ts rename to types/react-sortable-hoc/index.d.ts diff --git a/react-sortable-hoc/react-sortable-hoc-tests.tsx b/types/react-sortable-hoc/react-sortable-hoc-tests.tsx similarity index 100% rename from react-sortable-hoc/react-sortable-hoc-tests.tsx rename to types/react-sortable-hoc/react-sortable-hoc-tests.tsx diff --git a/react-sortable-hoc/tsconfig.json b/types/react-sortable-hoc/tsconfig.json similarity index 100% rename from react-sortable-hoc/tsconfig.json rename to types/react-sortable-hoc/tsconfig.json diff --git a/react-spinkit/index.d.ts b/types/react-spinkit/index.d.ts similarity index 100% rename from react-spinkit/index.d.ts rename to types/react-spinkit/index.d.ts diff --git a/react-spinkit/react-spinkit-tests.tsx b/types/react-spinkit/react-spinkit-tests.tsx similarity index 100% rename from react-spinkit/react-spinkit-tests.tsx rename to types/react-spinkit/react-spinkit-tests.tsx diff --git a/react-spinkit/tsconfig.json b/types/react-spinkit/tsconfig.json similarity index 100% rename from react-spinkit/tsconfig.json rename to types/react-spinkit/tsconfig.json diff --git a/react-split-pane/index.d.ts b/types/react-split-pane/index.d.ts similarity index 100% rename from react-split-pane/index.d.ts rename to types/react-split-pane/index.d.ts diff --git a/react-split-pane/react-split-pane-tests.tsx b/types/react-split-pane/react-split-pane-tests.tsx similarity index 100% rename from react-split-pane/react-split-pane-tests.tsx rename to types/react-split-pane/react-split-pane-tests.tsx diff --git a/react-split-pane/tsconfig.json b/types/react-split-pane/tsconfig.json similarity index 100% rename from react-split-pane/tsconfig.json rename to types/react-split-pane/tsconfig.json diff --git a/react-sticky/index.d.ts b/types/react-sticky/index.d.ts similarity index 100% rename from react-sticky/index.d.ts rename to types/react-sticky/index.d.ts diff --git a/react-sticky/react-sticky-tests.tsx b/types/react-sticky/react-sticky-tests.tsx similarity index 100% rename from react-sticky/react-sticky-tests.tsx rename to types/react-sticky/react-sticky-tests.tsx diff --git a/react-sticky/tsconfig.json b/types/react-sticky/tsconfig.json similarity index 100% rename from react-sticky/tsconfig.json rename to types/react-sticky/tsconfig.json diff --git a/react-toggle/tslint.json b/types/react-sticky/tslint.json similarity index 100% rename from react-toggle/tslint.json rename to types/react-sticky/tslint.json diff --git a/types/react-svg-pan-zoom/index.d.ts b/types/react-svg-pan-zoom/index.d.ts new file mode 100644 index 0000000000..837890a507 --- /dev/null +++ b/types/react-svg-pan-zoom/index.d.ts @@ -0,0 +1,198 @@ +// Type definitions for react-svg-pan-zoom 2.5 +// Project: https://github.com/chrvadala/react-svg-pan-zoom#readme +// Definitions by: Huy Nguyen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 +import * as React from 'react'; + +declare module 'react-svg-pan-zoom' { + + // String constants: + const MODE_IDLE = 'idle'; + const MODE_PANNING = 'panning'; + const MODE_ZOOMING = 'zooming'; + + export const TOOL_AUTO = 'auto'; + export const TOOL_NONE = 'none'; + export const TOOL_PAN = 'pan'; + export const TOOL_ZOOM_IN = 'zoom-in'; + export const TOOL_ZOOM_OUT = 'zoom-out'; + + export const POSITION_NONE = 'none'; + export const POSITION_TOP = 'top'; + export const POSITION_RIGHT = 'right'; + export const POSITION_BOTTOM = 'bottom'; + export const POSITION_LEFT = 'left'; + + export type Mode = typeof MODE_IDLE | typeof MODE_PANNING | typeof MODE_ZOOMING; + + export interface Value { + version: 2, + mode: Mode, + focus: boolean, + a: number, + b: number, + c: number, + d: number, + e: number, + f: number, + viewerWidth: number, + viewerHeight: number, + SVGWidth: number, + SVGHeight: number, + startX?: number | null, + startY?: number | null, + endX?: number | null, + endY?: number | null, + + } + + export type Tool = typeof TOOL_AUTO | typeof TOOL_NONE | typeof TOOL_PAN | + typeof TOOL_ZOOM_IN | typeof TOOL_ZOOM_OUT + export type ToolbarPosition = typeof POSITION_NONE | typeof POSITION_TOP | typeof POSITION_RIGHT | + typeof POSITION_BOTTOM | typeof POSITION_LEFT + + + export interface OptionalProps { + //background of the viewer + background: React.CSSProperties, + + //background of the svg + SVGBackground: string, + + //value of the viewer (current point of view) + value: Value | null, + + //CSS style of the Viewer + style: object, + + //className of the Viewer + className: string, + + //detect zoom operation performed trough pinch gesture or mouse scroll + detectWheel: boolean, + + //perform PAN if the mouse is on viewer border + detectAutoPan: boolean, + + //toolbar position + toolbarPosition: ToolbarPosition, + + //handler something changed + onChangeValue: (value: Value) => void, + + //handler tool changed + onChangeTool: (tool: Tool) => void, + + // Note: The `T` type parameter is the type of the `target` of the event: + //handler click + onClick: (event: ViewerMouseEvent) => void, + + //handler double click + onDoubleClick: (event: ViewerMouseEvent) => void, + + //handler mouseup + onMouseUp: (event: ViewerMouseEvent) => void, + + //handler mousemove + onMouseMove: (event: ViewerMouseEvent) => void, + + //handler mousedown + onMouseDown: (event: ViewerMouseEvent) => void, + + //if disabled the user can move the image outside the viewer + preventPanOutside: boolean, + + //how much scale in or out + scaleFactor: number, + + //current active tool (TOOL_NONE, TOOL_PAN, TOOL_ZOOM_IN, TOOL_ZOOM_OUT) + tool: Tool, + + //modifier keys //https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState + modifierKeys: string[], + + //override default toolbar component + // TODO: specify function type more clearly + customToolbar: React.Component | React.StatelessComponent, + + // How about touch events? They are in README but not in `propTypes`. + } + + export interface RequiredProps { + //width of the viewer displayed on screen + width: number, + //height of the viewer displayed on screen + height: number, + + //accept only one node SVG + // TODO: Figure out how to constrain `children` or maybe just leave it commented out + // because `children` is already implicit props + // children: () => any + } + + export type Props = RequiredProps & Partial + + class ReactSVGPanZoom extends React.Component { + pan(SVGDeltaX: number, SVGDeltaY: number): void + zoom(SVGPointX: number, SVGPointY: number, scaleFactor: number): void + fitSelection(selectionSVGPointX: number, selectionSVGPointY: number, selectionWidth: number, selectionHeight: number): void + fitToViewer(): void + setPointOnViewerCenter(SVGPointX: number, SVGPointY: number, zoomLevel: number): void + reset(): void + zoomOnViewerCenter(scaleFactor: number): void + getValue(): Value + setValue(value: Value): void + getTool(): Tool + setTool(tool: Tool): void + } + + + export interface Point { + x: number, + y: number, + } + + export interface ViewerMouseEvent{ + originalEvent: React.MouseEvent, + SVGViewer: SVGSVGElement, + point: Point, + x: number, + y: number, + scaleFactor: number, + translationX: number, + translationY: number, + preventDefault(): void + stopPropagation(): void + } + + export interface ViewerTouchEvent { + originalEvent: React.TouchEvent, + SVGViewer: SVGSVGElement, + points: Point[], + changedPoints: Point[], + scaleFactor: number, + translationX: number, + translationY: number, + preventDefault(): void + stopPropagation(): void + } + + // Utility functions exposed: + export function pan(value: Value, SVGDeltaX: number, SVGDeltaY: number, panLimit?: number): Value + + export function zoom(value: Value, SVGPointX: number, SVGPointY: number, scaleFactor: number): Value + + export function fitSelection( + value: Value, selectionSVGPointX: number, selectionSVGPointY: number, selectionWidth: number, selectionHeight: number): Value + + export function fitToViewer(value: Value): Value + + export function zoomOnViewerCenter(value: Value, scaleFactor: number): Value + + export function setPointOnViewerCenter(value: Value, SVGPointX: number, SVGPointY: number, zoomLevel: number): Value + + export function reset(value: Value): Value +} + + diff --git a/types/react-svg-pan-zoom/react-svg-pan-zoom-tests.tsx b/types/react-svg-pan-zoom/react-svg-pan-zoom-tests.tsx new file mode 100644 index 0000000000..dbe8f0d55e --- /dev/null +++ b/types/react-svg-pan-zoom/react-svg-pan-zoom-tests.tsx @@ -0,0 +1,57 @@ +import * as React from 'react'; +import * as ReactDOM from 'react-dom'; +import { + ReactSVGPanZoom, + Props, + fitToViewer, + ViewerMouseEvent +} from 'react-svg-pan-zoom'; + + +class Example1 extends React.Component<{}, {}> { + Viewer: ReactSVGPanZoom + constructor(props: Props) { + super(props); + } + + componentDidMount() { + this.Viewer.fitToViewer(); + } + + render() { + return ( +
    + + + + +
    + + this.Viewer = Viewer} + onClick={(event: ViewerMouseEvent) => console.log('click', event.x, event.y, event.originalEvent)} + onMouseUp={(event: ViewerMouseEvent) => console.log('up', event.x, event.y)} + onMouseMove={(event: ViewerMouseEvent) => console.log('move', event.x, event.y)} + onMouseDown={(event: ViewerMouseEvent) => console.log('down', event.x, event.y)}> + + + + + + + + + + + + +
    + ); + } +} + +ReactDOM.render( + , + document.getElementById('app') +); diff --git a/react-day-picker/tsconfig.json b/types/react-svg-pan-zoom/tsconfig.json similarity index 92% rename from react-day-picker/tsconfig.json rename to types/react-svg-pan-zoom/tsconfig.json index 943c51e1e6..c1b72dd378 100644 --- a/react-day-picker/tsconfig.json +++ b/types/react-svg-pan-zoom/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "module": "commonjs", + "jsx": "react", "lib": [ "es6", "dom" @@ -9,7 +10,6 @@ "noImplicitThis": true, "strictNullChecks": true, "baseUrl": "../", - "jsx": "react", "typeRoots": [ "../" ], @@ -19,6 +19,6 @@ }, "files": [ "index.d.ts", - "react-day-picker-tests.tsx" + "react-svg-pan-zoom-tests.tsx" ] } diff --git a/readline-sync/tslint.json b/types/react-svg-pan-zoom/tslint.json similarity index 100% rename from readline-sync/tslint.json rename to types/react-svg-pan-zoom/tslint.json diff --git a/react-swf/index.d.ts b/types/react-swf/index.d.ts similarity index 100% rename from react-swf/index.d.ts rename to types/react-swf/index.d.ts diff --git a/react-swf/react-swf-tests.ts b/types/react-swf/react-swf-tests.ts similarity index 100% rename from react-swf/react-swf-tests.ts rename to types/react-swf/react-swf-tests.ts diff --git a/react-swf/tsconfig.json b/types/react-swf/tsconfig.json similarity index 100% rename from react-swf/tsconfig.json rename to types/react-swf/tsconfig.json diff --git a/react-swipeable-views/index.d.ts b/types/react-swipeable-views/index.d.ts similarity index 100% rename from react-swipeable-views/index.d.ts rename to types/react-swipeable-views/index.d.ts diff --git a/react-swipeable-views/react-swipeable-views-tests.ts b/types/react-swipeable-views/react-swipeable-views-tests.ts similarity index 100% rename from react-swipeable-views/react-swipeable-views-tests.ts rename to types/react-swipeable-views/react-swipeable-views-tests.ts diff --git a/react-swipeable-views/tsconfig.json b/types/react-swipeable-views/tsconfig.json similarity index 100% rename from react-swipeable-views/tsconfig.json rename to types/react-swipeable-views/tsconfig.json diff --git a/react-swipeable/index.d.ts b/types/react-swipeable/index.d.ts similarity index 100% rename from react-swipeable/index.d.ts rename to types/react-swipeable/index.d.ts diff --git a/react-swipeable/react-swipeable-tests.tsx b/types/react-swipeable/react-swipeable-tests.tsx similarity index 100% rename from react-swipeable/react-swipeable-tests.tsx rename to types/react-swipeable/react-swipeable-tests.tsx diff --git a/react-swipeable/tsconfig.json b/types/react-swipeable/tsconfig.json similarity index 100% rename from react-swipeable/tsconfig.json rename to types/react-swipeable/tsconfig.json diff --git a/react-syntax-highlighter/index.d.ts b/types/react-syntax-highlighter/index.d.ts similarity index 100% rename from react-syntax-highlighter/index.d.ts rename to types/react-syntax-highlighter/index.d.ts diff --git a/react-syntax-highlighter/react-syntax-highlighter-tests.tsx b/types/react-syntax-highlighter/react-syntax-highlighter-tests.tsx similarity index 100% rename from react-syntax-highlighter/react-syntax-highlighter-tests.tsx rename to types/react-syntax-highlighter/react-syntax-highlighter-tests.tsx diff --git a/react-syntax-highlighter/tsconfig.json b/types/react-syntax-highlighter/tsconfig.json similarity index 100% rename from react-syntax-highlighter/tsconfig.json rename to types/react-syntax-highlighter/tsconfig.json diff --git a/react-tabs/index.d.ts b/types/react-tabs/index.d.ts similarity index 100% rename from react-tabs/index.d.ts rename to types/react-tabs/index.d.ts diff --git a/react-tabs/react-tabs-tests.ts b/types/react-tabs/react-tabs-tests.ts similarity index 100% rename from react-tabs/react-tabs-tests.ts rename to types/react-tabs/react-tabs-tests.ts diff --git a/react-tabs/tsconfig.json b/types/react-tabs/tsconfig.json similarity index 100% rename from react-tabs/tsconfig.json rename to types/react-tabs/tsconfig.json diff --git a/react-tagcloud/index.d.ts b/types/react-tagcloud/index.d.ts similarity index 93% rename from react-tagcloud/index.d.ts rename to types/react-tagcloud/index.d.ts index c1e8990bf6..11761bb142 100644 --- a/react-tagcloud/index.d.ts +++ b/types/react-tagcloud/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-tagcloud v0.4.0 +// Type definitions for react-tagcloud v1.1.0 // Project: https://github.com/madox2/react-tagcloud // Definitions by: wassname // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -15,6 +15,7 @@ declare namespace ReactTagCloud { renderer?: Function; className?: string; onClick?: Function; + disableRandomColor?: boolean; } interface TagCloudClass extends React.ComponentClass { } diff --git a/react-tagcloud/react-tagcloud-tests.tsx b/types/react-tagcloud/react-tagcloud-tests.tsx similarity index 98% rename from react-tagcloud/react-tagcloud-tests.tsx rename to types/react-tagcloud/react-tagcloud-tests.tsx index 552cc20e2d..efdbfab378 100644 --- a/react-tagcloud/react-tagcloud-tests.tsx +++ b/types/react-tagcloud/react-tagcloud-tests.tsx @@ -19,6 +19,7 @@ ReactDOM.render( maxSize={35} tags={data} shuffle={false} + disableRandomColor={false} onClick={(tag:string) => console.log("clicking on tag:", tag)} />, document.getElementById("simple-cloud") ); diff --git a/react-tagcloud/tsconfig.json b/types/react-tagcloud/tsconfig.json similarity index 100% rename from react-tagcloud/tsconfig.json rename to types/react-tagcloud/tsconfig.json diff --git a/react-tap-event-plugin/index.d.ts b/types/react-tap-event-plugin/index.d.ts similarity index 100% rename from react-tap-event-plugin/index.d.ts rename to types/react-tap-event-plugin/index.d.ts diff --git a/react-tap-event-plugin/react-tap-event-plugin-tests.ts b/types/react-tap-event-plugin/react-tap-event-plugin-tests.ts similarity index 100% rename from react-tap-event-plugin/react-tap-event-plugin-tests.ts rename to types/react-tap-event-plugin/react-tap-event-plugin-tests.ts diff --git a/react-tap-event-plugin/tsconfig.json b/types/react-tap-event-plugin/tsconfig.json similarity index 100% rename from react-tap-event-plugin/tsconfig.json rename to types/react-tap-event-plugin/tsconfig.json diff --git a/react-test-renderer/index.d.ts b/types/react-test-renderer/index.d.ts similarity index 100% rename from react-test-renderer/index.d.ts rename to types/react-test-renderer/index.d.ts diff --git a/react-test-renderer/react-test-renderer-tests.ts b/types/react-test-renderer/react-test-renderer-tests.ts similarity index 100% rename from react-test-renderer/react-test-renderer-tests.ts rename to types/react-test-renderer/react-test-renderer-tests.ts diff --git a/react-test-renderer/tsconfig.json b/types/react-test-renderer/tsconfig.json similarity index 100% rename from react-test-renderer/tsconfig.json rename to types/react-test-renderer/tsconfig.json diff --git a/realm/tslint.json b/types/react-test-renderer/tslint.json similarity index 100% rename from realm/tslint.json rename to types/react-test-renderer/tslint.json diff --git a/react-tether/index.d.ts b/types/react-tether/index.d.ts similarity index 100% rename from react-tether/index.d.ts rename to types/react-tether/index.d.ts diff --git a/react-tether/react-tether-tests.tsx b/types/react-tether/react-tether-tests.tsx similarity index 100% rename from react-tether/react-tether-tests.tsx rename to types/react-tether/react-tether-tests.tsx diff --git a/react-tether/tsconfig.json b/types/react-tether/tsconfig.json similarity index 100% rename from react-tether/tsconfig.json rename to types/react-tether/tsconfig.json diff --git a/react-tether/tslint.json b/types/react-tether/tslint.json similarity index 100% rename from react-tether/tslint.json rename to types/react-tether/tslint.json diff --git a/react-textarea-autosize/index.d.ts b/types/react-textarea-autosize/index.d.ts similarity index 95% rename from react-textarea-autosize/index.d.ts rename to types/react-textarea-autosize/index.d.ts index 647d19c6ac..2d07898200 100644 --- a/react-textarea-autosize/index.d.ts +++ b/types/react-textarea-autosize/index.d.ts @@ -19,7 +19,7 @@ declare module "react-textarea-autosize" { * Callback on value change * @param event */ - onChange?: (event: React.FormEvent) => void; + onChange?: (event: React.ChangeEvent) => void; /** * Callback on height change * @param height diff --git a/react-textarea-autosize/react-textarea-autosize-tests.tsx b/types/react-textarea-autosize/react-textarea-autosize-tests.tsx similarity index 100% rename from react-textarea-autosize/react-textarea-autosize-tests.tsx rename to types/react-textarea-autosize/react-textarea-autosize-tests.tsx diff --git a/react-textarea-autosize/tsconfig.json b/types/react-textarea-autosize/tsconfig.json similarity index 100% rename from react-textarea-autosize/tsconfig.json rename to types/react-textarea-autosize/tsconfig.json diff --git a/react-toggle/index.d.ts b/types/react-toggle/index.d.ts similarity index 100% rename from react-toggle/index.d.ts rename to types/react-toggle/index.d.ts diff --git a/react-toggle/react-toggle-tests.tsx b/types/react-toggle/react-toggle-tests.tsx similarity index 100% rename from react-toggle/react-toggle-tests.tsx rename to types/react-toggle/react-toggle-tests.tsx diff --git a/react-toggle/tsconfig.json b/types/react-toggle/tsconfig.json similarity index 100% rename from react-toggle/tsconfig.json rename to types/react-toggle/tsconfig.json diff --git a/reduce-reducers/tslint.json b/types/react-toggle/tslint.json similarity index 100% rename from reduce-reducers/tslint.json rename to types/react-toggle/tslint.json diff --git a/react-user-tour/index.d.ts b/types/react-user-tour/index.d.ts similarity index 100% rename from react-user-tour/index.d.ts rename to types/react-user-tour/index.d.ts diff --git a/react-user-tour/react-user-tour-tests.tsx b/types/react-user-tour/react-user-tour-tests.tsx similarity index 100% rename from react-user-tour/react-user-tour-tests.tsx rename to types/react-user-tour/react-user-tour-tests.tsx diff --git a/react-user-tour/tsconfig.json b/types/react-user-tour/tsconfig.json similarity index 100% rename from react-user-tour/tsconfig.json rename to types/react-user-tour/tsconfig.json diff --git a/react-virtualized/index.d.ts b/types/react-virtualized/index.d.ts similarity index 87% rename from react-virtualized/index.d.ts rename to types/react-virtualized/index.d.ts index 1994466f8c..f89183c90f 100644 --- a/react-virtualized/index.d.ts +++ b/types/react-virtualized/index.d.ts @@ -26,19 +26,7 @@ export interface AutoSizerProps { export class AutoSizer extends React.PureComponent { } export interface CellMeasurerProps { - cellRenderer: (info: { columnIndex: number, rowIndex: number }) => React.ReactNode; - cellSizeCache?: { - clearAllColumnWidths(): void; - clearAllRowHeights(): void; - clearColumnWidth(index: number): void; - clearRowHeight(index: number): void; - getColumnWidth(index: number): number; - getRowHeight(index: number): number; - hasColumnWidth(index: number): boolean; - hasRowHeight(index: number): boolean; - setColumnWidth(index: number, width: number): void; - setRowHeight(index: number, height: number): void; - }; + cache?: CellMeasurerCache; children?: React.StatelessComponent<{ getColumnWidth: () => number, getRowHeight: () => number, @@ -46,11 +34,10 @@ export interface CellMeasurerProps { resetMeasurementsForColumn: (index: number) => any, resetMeasurementsForRow: (index: number) => any, }>; - columnCount: number; - container?: React.ReactType; - height?: number; - rowCount: number; - width?: number; + columnIndex: number; + parent?: React.ReactType; + rowIndex: number; + style?: React.CSSProperties; } export class CellMeasurer extends React.PureComponent { } @@ -74,17 +61,6 @@ export type CellMeasurerCacheParams = { keyMapper?: KeyMapper } export class CellMeasurerCache { - _cellHeightCache: Cache; - _cellWidthCache: Cache; - _columnWidthCache: Cache; - _defaultHeight?: number; - _defaultWidth?: number; - _minHeight?: number; - _minWidth?: number; - _keyMapper: KeyMapper; - _rowHeightCache: Cache; - _hasFixedHeight: boolean; - _hasFixedWidth: boolean; constructor(params: CellMeasurerCacheParams); clear( rowIndex: number, @@ -113,10 +89,6 @@ export class CellMeasurerCache { width: number, height: number ): void; - _updateCachedColumnAndRowSizes( - rowIndex: number, - columnIndex: number - ): void; } export type CollectionCellSizeAndPosition = { height: number, width: number, x: number, y: number }; @@ -220,8 +192,17 @@ export interface ColumnProps { } export class Column extends React.Component { } +export type RowClickHandlerParams = { + rowData: { + columnData: Object, + id: string, + index: number + } +} + // ref: https://github.com/bvaughn/react-virtualized/blob/master/docs/Table.md export interface TableProps { + deferredMeasurementCache?: CellMeasurerCache; autoHeight?: boolean; children?: React.ReactChildren; className?: string; @@ -232,15 +213,15 @@ export interface TableProps { headerClassName?: string; headerHeight: number; headerStyle?: any; - height: number; + height?: number; id?: string; noRowsRender?: () => void; onHeaderClick?: (dataKey: string, columnData: any) => void; - onRowClick?: (info: IndexParam) => void; - onRowDoubleClick?: (info: IndexParam) => void; - onRowMouseOut?: (info: IndexParam) => void; - onRowMouseOver?: (info: IndexParam) => void; - onRowsRendered?: (info: IndexParam) => void; + onRowClick?: (info: RowClickHandlerParams) => void; + onRowDoubleClick?: (info: RowClickHandlerParams) => void; + onRowMouseOut?: (info: RowClickHandlerParams) => void; + onRowMouseOver?: (info: RowClickHandlerParams) => void; + onRowsRendered?: (info: RowClickHandlerParams) => void; overscanRowCount?: number; onScroll?: (info: { clientHeight: number, scrollHeight: number, scrollTop: number }) => void; rowClassName?: string | ((info: IndexParam) => string); @@ -258,9 +239,18 @@ export interface TableProps { sortDirection?: SortDirectionType; style?: React.CSSProperties; tabIndex?: number; - width: number; + width?: number; +} +export class Table extends React.PureComponent { + forceUpdateGrid(): void; + /** See Grid#measureAllCells */ + measureAllRows(): void; + /** See Grid#recomputeGridSize */ + recomputeRowHeights(index?: number): void; + /** See Grid#scrollToCell */ + scrollToRow(index?: number): void; + Grid: Grid; } -export class Table extends React.PureComponent { } export const defaultTableCellDataGetter: TableCellDataGetter; export const defaultTableCellRenderer: TableCellRenderer; @@ -418,7 +408,7 @@ export type GridProps = { columnCount: number; columnWidth: number | ((params: IndexParam) => number); containerStyle?: React.CSSProperties; - deferredMeasurementCache?: Object; + deferredMeasurementCache?: CellMeasurerCache; estimatedColumnSize?: number; estimatedRowSize?: number; getScrollbarSize?: () => number; @@ -448,7 +438,40 @@ export type GridProps = { tabIndex?: number; width: number; }; -export class Grid extends React.PureComponent { } +export class Grid extends React.PureComponent { + /** + * Invalidate Grid size and recompute visible cells. + * This is a deferred wrapper for recomputeGridSize(). + * It sets a flag to be evaluated on cDM/cDU to avoid unnecessary renders. + * This method is intended for advanced use-cases like CellMeasurer. + */ + invalidateCellSizeAfterRender(params: { + columnIndex: number, + rowIndex: number + }): void; + /** + * Pre-measure all columns and rows in a Grid. + * Typically cells are only measured as needed and estimated sizes are used for cells that have not yet been measured. + * This method ensures that the next call to getTotalSize() returns an exact size (as opposed to just an estimated one). + */ + measureAllCells(): void; + /** + * Forced recompute of row heights and column widths. + * This function should be called if dynamic column or row sizes have changed but nothing else has. + * Since Grid only receives :columnCount and :rowCount it has no way of detecting when the underlying data changes. + */ + recomputeGridSize(params?: { + columnIndex?: number, + rowIndex?: number + }): void; + /** + * Ensure column and row are visible. + */ + scrollToCell(params: { + columnIndex: number, + rowIndex: number + }): void; +} export type InfiniteLoaderProps = { children?: React.StatelessComponent<{ diff --git a/react-virtualized/react-virtualized-tests.tsx b/types/react-virtualized/react-virtualized-tests.tsx similarity index 99% rename from react-virtualized/react-virtualized-tests.tsx rename to types/react-virtualized/react-virtualized-tests.tsx index 1ab6654c18..aa1dc087a9 100644 --- a/react-virtualized/react-virtualized-tests.tsx +++ b/types/react-virtualized/react-virtualized-tests.tsx @@ -203,10 +203,8 @@ function CellMeasurerTest() { ReactDOM.render( {({ getColumnWidth }) => ( extends ChangeTargetHTMLAttributes, ClassAttributes { } - interface SVGProps extends SVGAttributes, ClassAttributes { + interface SVGProps extends SVGAttributes, ClassAttributes { } interface DOMAttributes { @@ -627,17 +627,17 @@ declare namespace React { /** * Aligns a flex container's lines within the flex container when there is extra space in the cross-axis, similar to how justify-content aligns individual items within the main-axis. */ - alignContent?: CSSWideKeyword | any; + alignContent?: CSSWideKeyword | "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "stretch"; /** * Sets the default alignment in the cross axis for all of the flex container's items, including anonymous flex items, similarly to how justify-content aligns items along the main axis. */ - alignItems?: CSSWideKeyword | any; + alignItems?: CSSWideKeyword | "flex-start" | "flex-end" | "center" | "baseline" | "stretch"; /** * Allows the default alignment to be overridden for individual flex items. */ - alignSelf?: CSSWideKeyword | any; + alignSelf?: CSSWideKeyword | "auto" | "flex-start" | "flex-end" | "center" | "baseline" | "stretch"; /** * This property allows precise alignment of elements, such as graphics, that do not have a baseline-table or lack the desired baseline in their baseline-table. With the alignment-adjust property, the position of the baseline identified by the alignment-baseline can be explicitly determined. It also determines precisely the alignment point for each glyph within a textual element. @@ -1106,12 +1106,12 @@ declare namespace React { /** * The flex-direction CSS property describes how flex items are placed in the flex container, by setting the direction of the flex container's main axis. */ - flexDirection?: CSSWideKeyword | any; + flexDirection?: CSSWideKeyword | "row" | "row-reverse" | "column" | "column-reverse"; /** * The flex-flow CSS property defines the flex container's main and cross axis. It is a shorthand property for the flex-direction and flex-wrap properties. */ - flexFlow?: CSSWideKeyword | any; + flexFlow?: CSSWideKeyword | string; /** * Specifies the flex grow factor of a flex item. @@ -1142,6 +1142,12 @@ declare namespace React { */ flexShrink?: CSSWideKeyword | number; + /** + * Specifies whether flex items are forced into a single line or can be wrapped onto multiple lines. If wrapping is allowed, this property also enables you to control the direction in which lines are stacked. + * See CSS flex-wrap property https://drafts.csswg.org/css-flexbox-1/#flex-wrap-property + */ + flexWrap?: CSSWideKeyword | "nowrap" | "wrap" | "wrap-reverse"; + /** * Elements which have the style float are floated horizontally. These elements can move as far to the left or right of the containing element. All elements after the floating element will flow around it, but elements before the floating element are not impacted. If several floating elements are placed after each other, they will float next to each other as long as there is room. */ @@ -2211,7 +2217,25 @@ declare namespace React { // - "number | string" // - "string" // - union of string literals - interface SVGAttributes extends HTMLAttributes { + interface SVGAttributes extends DOMAttributes { + // Attributes which also defined in HTMLAttributes + // See comment in SVGDOMPropertyConfig.js + className?: string; + color?: string; + height?: number | string; + id?: string; + lang?: string; + max?: number | string; + media?: string; + method?: string; + min?: number | string; + name?: string; + style?: CSSProperties; + target?: string; + type?: string; + width?: number | string; + + // SVG Specific attributes accentHeight?: number | string; accumulate?: "none" | "sum"; additive?: "replace" | "sum"; @@ -2404,7 +2428,6 @@ declare namespace React { textRendering?: number | string; to?: number | string; transform?: string; - type?: string; u1?: number | string; u2?: number | string; underlinePosition?: number | string; @@ -2610,9 +2633,7 @@ declare namespace React { isRequired: Validator; } - interface ValidationMap { - [key: string]: Validator; - } + type ValidationMap = { [K in keyof T]?: Validator }; interface ReactPropTypes { any: Requireable; @@ -2802,61 +2823,61 @@ declare global { wbr: React.HTMLProps; // SVG - svg: React.SVGProps; + svg: React.SVGProps; - animate: React.SVGProps; - circle: React.SVGProps; - clipPath: React.SVGProps; - defs: React.SVGProps; - desc: React.SVGProps; - ellipse: React.SVGProps; - feBlend: React.SVGProps; - feColorMatrix: React.SVGProps; - feComponentTransfer: React.SVGProps; - feComposite: React.SVGProps; - feConvolveMatrix: React.SVGProps; - feDiffuseLighting: React.SVGProps; - feDisplacementMap: React.SVGProps; - feDistantLight: React.SVGProps; - feFlood: React.SVGProps; - feFuncA: React.SVGProps; - feFuncB: React.SVGProps; - feFuncG: React.SVGProps; - feFuncR: React.SVGProps; - feGaussianBlur: React.SVGProps; - feImage: React.SVGProps; - feMerge: React.SVGProps; - feMergeNode: React.SVGProps; - feMorphology: React.SVGProps; - feOffset: React.SVGProps; - fePointLight: React.SVGProps; - feSpecularLighting: React.SVGProps; - feSpotLight: React.SVGProps; - feTile: React.SVGProps; - feTurbulence: React.SVGProps; - filter: React.SVGProps; - foreignObject: React.SVGProps; - g: React.SVGProps; - image: React.SVGProps; - line: React.SVGProps; - linearGradient: React.SVGProps; - marker: React.SVGProps; - mask: React.SVGProps; - metadata: React.SVGProps; - path: React.SVGProps; - pattern: React.SVGProps; - polygon: React.SVGProps; - polyline: React.SVGProps; - radialGradient: React.SVGProps; - rect: React.SVGProps; - stop: React.SVGProps; - switch: React.SVGProps; - symbol: React.SVGProps; - text: React.SVGProps; - textPath: React.SVGProps; - tspan: React.SVGProps; - use: React.SVGProps; - view: React.SVGProps; + animate: React.SVGProps; // TODO: It is SVGAnimateElement but is not in TypeScript's lib.dom.d.ts for now. + circle: React.SVGProps; + clipPath: React.SVGProps; + defs: React.SVGProps; + desc: React.SVGProps; + ellipse: React.SVGProps; + feBlend: React.SVGProps; + feColorMatrix: React.SVGProps; + feComponentTransfer: React.SVGProps; + feComposite: React.SVGProps; + feConvolveMatrix: React.SVGProps; + feDiffuseLighting: React.SVGProps; + feDisplacementMap: React.SVGProps; + feDistantLight: React.SVGProps; + feFlood: React.SVGProps; + feFuncA: React.SVGProps; + feFuncB: React.SVGProps; + feFuncG: React.SVGProps; + feFuncR: React.SVGProps; + feGaussianBlur: React.SVGProps; + feImage: React.SVGProps; + feMerge: React.SVGProps; + feMergeNode: React.SVGProps; + feMorphology: React.SVGProps; + feOffset: React.SVGProps; + fePointLight: React.SVGProps; + feSpecularLighting: React.SVGProps; + feSpotLight: React.SVGProps; + feTile: React.SVGProps; + feTurbulence: React.SVGProps; + filter: React.SVGProps; + foreignObject: React.SVGProps; + g: React.SVGProps; + image: React.SVGProps; + line: React.SVGProps; + linearGradient: React.SVGProps; + marker: React.SVGProps; + mask: React.SVGProps; + metadata: React.SVGProps; + path: React.SVGProps; + pattern: React.SVGProps; + polygon: React.SVGProps; + polyline: React.SVGProps; + radialGradient: React.SVGProps; + rect: React.SVGProps; + stop: React.SVGProps; + switch: React.SVGProps; + symbol: React.SVGProps; + text: React.SVGProps; + textPath: React.SVGProps; + tspan: React.SVGProps; + use: React.SVGProps; + view: React.SVGProps; } } } diff --git a/react/test/cssProperties.tsx b/types/react/test/cssProperties.tsx similarity index 100% rename from react/test/cssProperties.tsx rename to types/react/test/cssProperties.tsx diff --git a/react/test/index.ts b/types/react/test/index.ts similarity index 99% rename from react/test/index.ts rename to types/react/test/index.ts index 1bf6c8dcc2..f0fee7a00b 100644 --- a/react/test/index.ts +++ b/types/react/test/index.ts @@ -342,6 +342,9 @@ React.DOM.svg({ xmlns: "http://www.w3.org/2000/svg" }, React.DOM.rect({ + className: 'foobar', + id: 'foo', + color: 'black', x: 22, y: 10, width: 4, diff --git a/react/test/tsx.tsx b/types/react/test/tsx.tsx similarity index 100% rename from react/test/tsx.tsx rename to types/react/test/tsx.tsx diff --git a/react/tsconfig.json b/types/react/tsconfig.json similarity index 100% rename from react/tsconfig.json rename to types/react/tsconfig.json diff --git a/reactcss/index.d.ts b/types/reactcss/index.d.ts similarity index 100% rename from reactcss/index.d.ts rename to types/reactcss/index.d.ts diff --git a/reactcss/reactcss-tests.tsx b/types/reactcss/reactcss-tests.tsx similarity index 100% rename from reactcss/reactcss-tests.tsx rename to types/reactcss/reactcss-tests.tsx diff --git a/reactcss/tsconfig.json b/types/reactcss/tsconfig.json similarity index 100% rename from reactcss/tsconfig.json rename to types/reactcss/tsconfig.json diff --git a/types/reactstrap/index.d.ts b/types/reactstrap/index.d.ts new file mode 100644 index 0000000000..198b410ed4 --- /dev/null +++ b/types/reactstrap/index.d.ts @@ -0,0 +1,82 @@ +// Type definitions for reactstrap 4.3 +// Project: https://github.com/reactstrap/reactstrap#readme +// Definitions by: Ali Hammad Baig , Marco Falkenberg +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +export { default as Alert } from './lib/Alert' +export { default as Badge } from './lib/Badge' +export { default as Breadcrumb } from './lib/Breadcrumb' +export { default as BreadcrumbItem } from './lib/BreadcrumbItem' +export { default as Button } from './lib/Button' +export { default as ButtonDropdown } from './lib/ButtonDropdown' +export { default as ButtonGroup } from './lib/ButtonGroup' +export { default as ButtonToolbar } from './lib/ButtonToolbar' +export { default as Card } from './lib/Card' +export { default as CardBlock } from './lib/CardBlock' +export { default as CardColumns } from './lib/CardColumns' +export { default as CardDeck } from './lib/CardDeck' +export { default as CardFooter } from './lib/CardFooter' +export { default as CardGroup } from './lib/CardGroup' +export { default as CardHeader } from './lib/CardHeader' +export { default as CardImg } from './lib/CardImg' +export { default as CardImgOverlay } from './lib/CardImgOverlay' +export { default as CardLink } from './lib/CardLink' +export { default as CardSubtitle } from './lib/CardSubtitle' +export { default as CardText } from './lib/CardText' +export { default as CardTitle } from './lib/CardTitle' +export { default as Col } from './lib/Col' +export { default as Collapse } from './lib/Collapse' +export { default as Container } from './lib/Container' +export { default as Dropdown } from './lib/Dropdown' +export { default as DropdownItem } from './lib/DropdownItem' +export { default as DropdownMenu } from './lib/DropdownMenu' +export { default as DropdownToggle } from './lib/DropdownToggle' +export { default as Fade } from './lib/Fade' +export { default as Form } from './lib/Form' +export { default as FormFeedback } from './lib/FormFeedback' +export { default as FormGroup } from './lib/FormGroup' +export { default as FormText } from './lib/FormText' +export { default as Input } from './lib/Input' +export { default as InputGroup } from './lib/InputGroup' +export { default as InputGroupAddon } from './lib/InputGroupAddon' +export { default as InputGroupButton } from './lib/InputGroupButton' +export { default as Jumbotron } from './lib/Jumbotron' +export { default as Label } from './lib/Label' +export { default as ListGroup } from './lib/ListGroup' +export { default as ListGroupItem } from './lib/ListGroupItem' +export { default as ListGroupItemHeading } from './lib/ListGroupItemHeading' +export { default as ListGroupItemText } from './lib/ListGroupItemText' +export { default as Media } from './lib/Media' +export { default as Modal } from './lib/Modal' +export { default as ModalBody } from './lib/ModalBody' +export { default as ModalFooter } from './lib/ModalFooter' +export { default as ModalHeader } from './lib/ModalHeader' +export { default as Nav } from './lib/Nav' +export { default as Navbar } from './lib/Navbar' +export { default as NavbarBrand } from './lib/NavbarBrand' +export { default as NavbarToggler } from './lib/NavbarToggler' +export { default as NavDropdown } from './lib/NavDropdown' +export { default as NavItem } from './lib/NavItem' +export { default as NavLink } from './lib/NavLink' +export { default as Pagination } from './lib/Pagination' +export { default as PaginationItem } from './lib/PaginationItem' +export { default as PaginationLink } from './lib/PaginationLink' +export { default as Popover } from './lib/Popover' +export { default as PopoverContent } from './lib/PopoverContent' +export { default as PopoverTitle } from './lib/PopoverTitle' +export { default as Progress } from './lib/Progress' +export { default as Row } from './lib/Row' +export { default as TabContent } from './lib/TabContent' +export { default as Table } from './lib/Table' +export { default as TabPane } from './lib/TabPane' +export { default as Tag } from './lib/Tag' +export { default as TetherContent } from './lib/TetherContent' +export { default as Tooltip } from './lib/Tooltip' +export { + UncontrolledAlert, + UncontrolledButtonDropdown, + UncontrolledDropdown, + UncontrolledNavDropdown, + UncontrolledTooltip +} from './lib/Uncontrolled' \ No newline at end of file diff --git a/types/reactstrap/lib/Alert.d.ts b/types/reactstrap/lib/Alert.d.ts new file mode 100644 index 0000000000..ebe4f8cccc --- /dev/null +++ b/types/reactstrap/lib/Alert.d.ts @@ -0,0 +1,16 @@ +export interface UncontrolledProps { + className?: string; + color?: string; + tag?: React.ReactType; + transitionAppearTimeout?: number; + transitionEnterTimeout?: number; + transitionLeaveTimeout?: number; +} + +interface Props extends UncontrolledProps { + isOpen?: boolean; + toggle?: () => void; +} + +declare var Alert: React.StatelessComponent; +export default Alert; \ No newline at end of file diff --git a/types/reactstrap/lib/Badge.d.ts b/types/reactstrap/lib/Badge.d.ts new file mode 100644 index 0000000000..0f9c66b691 --- /dev/null +++ b/types/reactstrap/lib/Badge.d.ts @@ -0,0 +1,9 @@ +interface Props { + color?: string; + pill?: boolean; + tag?: React.ReactType; + className?: string; +} + +declare var Badge: React.StatelessComponent; +export default Badge; \ No newline at end of file diff --git a/types/reactstrap/lib/Breadcrumb.d.ts b/types/reactstrap/lib/Breadcrumb.d.ts new file mode 100644 index 0000000000..a6be7ab9fc --- /dev/null +++ b/types/reactstrap/lib/Breadcrumb.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: string; + className?: string; +} + +declare var Breadcrumb: React.StatelessComponent; +export default Breadcrumb; \ No newline at end of file diff --git a/types/reactstrap/lib/BreadcrumbItem.d.ts b/types/reactstrap/lib/BreadcrumbItem.d.ts new file mode 100644 index 0000000000..ce4e8ca522 --- /dev/null +++ b/types/reactstrap/lib/BreadcrumbItem.d.ts @@ -0,0 +1,12 @@ +interface Props { + tag?: React.ReactType; + active?: boolean; + className?: string; + // if a is passed as a string + // this could be href + [others: string]: any; +} + +declare var BreadcrumbItem: React.StatelessComponent; +export default BreadcrumbItem; + diff --git a/types/reactstrap/lib/Button.d.ts b/types/reactstrap/lib/Button.d.ts new file mode 100644 index 0000000000..8ab27dfdcd --- /dev/null +++ b/types/reactstrap/lib/Button.d.ts @@ -0,0 +1,16 @@ +interface Props extends React.HTMLProps { + outline?: boolean; + active?: boolean; + block?: boolean; + color?: string; + disabled?: boolean; + tag?: React.ReactType; + + onClick?: React.MouseEventHandler; + size?: any; + id?: string; + style?: React.CSSProperties; +} + +declare var Button: React.StatelessComponent; +export default Button; \ No newline at end of file diff --git a/types/reactstrap/lib/ButtonDropdown.d.ts b/types/reactstrap/lib/ButtonDropdown.d.ts new file mode 100644 index 0000000000..9ab54c7502 --- /dev/null +++ b/types/reactstrap/lib/ButtonDropdown.d.ts @@ -0,0 +1,12 @@ +import { + UncontrolledProps as DropdownUncontrolledProps, + Props as DropdownProps +} from './Dropdown'; + +// tslint:disable-next-line +export interface UncontrolledProps extends DropdownUncontrolledProps { } +// tslint:disable-next-line +interface Props extends DropdownProps { } + +declare var ButtonDropdown: React.StatelessComponent; +export default ButtonDropdown; \ No newline at end of file diff --git a/types/reactstrap/lib/ButtonGroup.d.ts b/types/reactstrap/lib/ButtonGroup.d.ts new file mode 100644 index 0000000000..a583a41ee0 --- /dev/null +++ b/types/reactstrap/lib/ButtonGroup.d.ts @@ -0,0 +1,11 @@ +interface Props { + tag?: React.ReactType; + 'aria-label'?: string; + className?: string; + role?: string; + size?: string; + vertical?: boolean; +} + +declare var ButtonGroup: React.StatelessComponent; +export default ButtonGroup; \ No newline at end of file diff --git a/types/reactstrap/lib/ButtonToolbar.d.ts b/types/reactstrap/lib/ButtonToolbar.d.ts new file mode 100644 index 0000000000..239c96c01e --- /dev/null +++ b/types/reactstrap/lib/ButtonToolbar.d.ts @@ -0,0 +1,9 @@ +interface Props { + tag?: React.ReactType; + 'aria-label'?: string; + className?: string; + role?: string; +} + +declare var ButtonToolbar: React.StatelessComponent; +export default ButtonToolbar; \ No newline at end of file diff --git a/types/reactstrap/lib/Card.d.ts b/types/reactstrap/lib/Card.d.ts new file mode 100644 index 0000000000..f300b09310 --- /dev/null +++ b/types/reactstrap/lib/Card.d.ts @@ -0,0 +1,13 @@ +interface Props { + tag?: React.ReactType; + inverse?: boolean; + color?: string; + block?: boolean; + outline?: boolean; + className?: string; + style?: React.CSSProperties; +} + +declare var Card: React.StatelessComponent; +export default Card; + diff --git a/types/reactstrap/lib/CardBlock.d.ts b/types/reactstrap/lib/CardBlock.d.ts new file mode 100644 index 0000000000..406f4b8258 --- /dev/null +++ b/types/reactstrap/lib/CardBlock.d.ts @@ -0,0 +1,8 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var CardBlock: React.StatelessComponent; +export default CardBlock; + diff --git a/types/reactstrap/lib/CardColumns.d.ts b/types/reactstrap/lib/CardColumns.d.ts new file mode 100644 index 0000000000..a4992b8ffe --- /dev/null +++ b/types/reactstrap/lib/CardColumns.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var CardColumns: React.StatelessComponent; +export default CardColumns; \ No newline at end of file diff --git a/types/reactstrap/lib/CardDeck.d.ts b/types/reactstrap/lib/CardDeck.d.ts new file mode 100644 index 0000000000..1b70bda457 --- /dev/null +++ b/types/reactstrap/lib/CardDeck.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var CardDeck: React.StatelessComponent; +export default CardDeck; \ No newline at end of file diff --git a/types/reactstrap/lib/CardFooter.d.ts b/types/reactstrap/lib/CardFooter.d.ts new file mode 100644 index 0000000000..8356b15aef --- /dev/null +++ b/types/reactstrap/lib/CardFooter.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var CardFooter: React.StatelessComponent; +export default CardFooter; \ No newline at end of file diff --git a/types/reactstrap/lib/CardGroup.d.ts b/types/reactstrap/lib/CardGroup.d.ts new file mode 100644 index 0000000000..c6e956c8a2 --- /dev/null +++ b/types/reactstrap/lib/CardGroup.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var CardGroup: React.StatelessComponent; +export default CardGroup; \ No newline at end of file diff --git a/types/reactstrap/lib/CardHeader.d.ts b/types/reactstrap/lib/CardHeader.d.ts new file mode 100644 index 0000000000..6977abf238 --- /dev/null +++ b/types/reactstrap/lib/CardHeader.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var CardHeader: React.StatelessComponent; +export default CardHeader; \ No newline at end of file diff --git a/types/reactstrap/lib/CardImg.d.ts b/types/reactstrap/lib/CardImg.d.ts new file mode 100644 index 0000000000..6a8f85f3b8 --- /dev/null +++ b/types/reactstrap/lib/CardImg.d.ts @@ -0,0 +1,13 @@ +interface Props { + tag?: React.ReactType; + top?: boolean; + bottom?: boolean; + className?: string; + src?: string; + width?: string; + height?: string; + alt?: string; +} + +declare var CardImg: React.StatelessComponent; +export default CardImg; \ No newline at end of file diff --git a/types/reactstrap/lib/CardImgOverlay.d.ts b/types/reactstrap/lib/CardImgOverlay.d.ts new file mode 100644 index 0000000000..40c958fd0e --- /dev/null +++ b/types/reactstrap/lib/CardImgOverlay.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var CardImgOverlay: React.StatelessComponent; +export default CardImgOverlay; \ No newline at end of file diff --git a/types/reactstrap/lib/CardLink.d.ts b/types/reactstrap/lib/CardLink.d.ts new file mode 100644 index 0000000000..7db1d25a16 --- /dev/null +++ b/types/reactstrap/lib/CardLink.d.ts @@ -0,0 +1,8 @@ +interface Props { + tag?: React.ReactType; + className?: string; + href?: string; +} + +declare var CardLink: React.StatelessComponent; +export default CardLink; \ No newline at end of file diff --git a/types/reactstrap/lib/CardSubtitle.d.ts b/types/reactstrap/lib/CardSubtitle.d.ts new file mode 100644 index 0000000000..9a3100bdd1 --- /dev/null +++ b/types/reactstrap/lib/CardSubtitle.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var CardSubtitle: React.StatelessComponent; +export default CardSubtitle; \ No newline at end of file diff --git a/types/reactstrap/lib/CardText.d.ts b/types/reactstrap/lib/CardText.d.ts new file mode 100644 index 0000000000..a831497faa --- /dev/null +++ b/types/reactstrap/lib/CardText.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var CardText: React.StatelessComponent; +export default CardText; diff --git a/types/reactstrap/lib/CardTitle.d.ts b/types/reactstrap/lib/CardTitle.d.ts new file mode 100644 index 0000000000..8b8871348d --- /dev/null +++ b/types/reactstrap/lib/CardTitle.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var CardTitle: React.StatelessComponent; +export default CardTitle; \ No newline at end of file diff --git a/types/reactstrap/lib/Col.d.ts b/types/reactstrap/lib/Col.d.ts new file mode 100644 index 0000000000..33a207d329 --- /dev/null +++ b/types/reactstrap/lib/Col.d.ts @@ -0,0 +1,24 @@ +export type ColumnProps + = string + | boolean + | number + | { + size?: boolean | number | string + push?: string | number + pull?: string | number + offset?: string | number + }; + +interface Props { + xs?: ColumnProps; + sm?: ColumnProps; + md?: ColumnProps; + lg?: ColumnProps; + xl?: ColumnProps; + + //custom widths + widths?: string[]; +} + +declare var Col: React.StatelessComponent; +export default Col; diff --git a/types/reactstrap/lib/Collapse.d.ts b/types/reactstrap/lib/Collapse.d.ts new file mode 100644 index 0000000000..ce17d102e3 --- /dev/null +++ b/types/reactstrap/lib/Collapse.d.ts @@ -0,0 +1,15 @@ +interface Props extends React.HTMLProps { + isOpen?: boolean; + classNames?: string; + tag?: React.ReactType; + navbar?: boolean; + delay?: { + show: number + hide: number + }; + onOpened?: () => void; + onClosed?: () => void; +} + +declare var Collapse: React.StatelessComponent; +export default Collapse; \ No newline at end of file diff --git a/types/reactstrap/lib/Container.d.ts b/types/reactstrap/lib/Container.d.ts new file mode 100644 index 0000000000..bb0c9aa7a3 --- /dev/null +++ b/types/reactstrap/lib/Container.d.ts @@ -0,0 +1,8 @@ +interface Props { + tag?: React.ReactType; + fluid?: boolean; + className?: string; +} + +declare var Container: React.StatelessComponent; +export default Container; \ No newline at end of file diff --git a/types/reactstrap/lib/Dropdown.d.ts b/types/reactstrap/lib/Dropdown.d.ts new file mode 100644 index 0000000000..57e4532a31 --- /dev/null +++ b/types/reactstrap/lib/Dropdown.d.ts @@ -0,0 +1,19 @@ +/// + +export interface UncontrolledProps { + isOpen?: boolean; + toggle?: () => void; +} + +export interface Props extends UncontrolledProps { + disabled?: boolean; + dropup?: boolean; + group?: boolean; + size?: string; + tag?: React.ReactType; + tether?: boolean | Tether.ITetherOptions; + className?: string; +} + +declare var Dropdown: React.StatelessComponent; +export default Dropdown; \ No newline at end of file diff --git a/types/reactstrap/lib/DropdownItem.d.ts b/types/reactstrap/lib/DropdownItem.d.ts new file mode 100644 index 0000000000..00088966b3 --- /dev/null +++ b/types/reactstrap/lib/DropdownItem.d.ts @@ -0,0 +1,11 @@ +interface Props { + disabled?: boolean; + divider?: boolean; + tag?: React.ReactType; + header?: boolean; + onClick?: React.MouseEvent; + className?: string; +} + +declare var DropdownItem: React.StatelessComponent; +export default DropdownItem; \ No newline at end of file diff --git a/types/reactstrap/lib/DropdownMenu.d.ts b/types/reactstrap/lib/DropdownMenu.d.ts new file mode 100644 index 0000000000..08dd194288 --- /dev/null +++ b/types/reactstrap/lib/DropdownMenu.d.ts @@ -0,0 +1,8 @@ +interface Props { + tag?: React.ReactType; + right?: boolean; + className?: boolean; +} + +declare var DropdownMenu: React.StatelessComponent; +export default DropdownMenu; \ No newline at end of file diff --git a/types/reactstrap/lib/DropdownToggle.d.ts b/types/reactstrap/lib/DropdownToggle.d.ts new file mode 100644 index 0000000000..753ef0045c --- /dev/null +++ b/types/reactstrap/lib/DropdownToggle.d.ts @@ -0,0 +1,16 @@ +interface Props { + caret?: boolean; + className?: string; + disabled?: boolean; + onClick?: React.MouseEventHandler; + 'data-toggle'?: string; + 'aria-haspopup'?: boolean; + split?: boolean; + tag?: React.ReactType; + nav?: boolean; + color?: string; + size?: string; +} + +declare var DropdownToggle: React.StatelessComponent; +export default DropdownToggle; \ No newline at end of file diff --git a/types/reactstrap/lib/Fade.d.ts b/types/reactstrap/lib/Fade.d.ts new file mode 100644 index 0000000000..f8776c2709 --- /dev/null +++ b/types/reactstrap/lib/Fade.d.ts @@ -0,0 +1,17 @@ +interface Props { + baseClass?: string; + baseClassIn?: string; + tag?: React.ReactType; + className?: string; + transitionAppearTimeout?: number; + transitionEnterTimeout?: number; + transitionLeaveTimeout?: number; + transitionAppear?: boolean; + transitionEnter?: boolean; + transitionLeave?: boolean; + onLeave?: () => void; + onEnter?: () => void; +} + +declare var Fade: React.StatelessComponent; +export default Fade; \ No newline at end of file diff --git a/types/reactstrap/lib/Form.d.ts b/types/reactstrap/lib/Form.d.ts new file mode 100644 index 0000000000..39f20c28da --- /dev/null +++ b/types/reactstrap/lib/Form.d.ts @@ -0,0 +1,8 @@ +interface Props extends React.HTMLProps { + inline?: boolean; + tag?: React.ReactType; + className?: string; +} + +declare var Form: React.StatelessComponent; +export default Form; \ No newline at end of file diff --git a/types/reactstrap/lib/FormFeedback.d.ts b/types/reactstrap/lib/FormFeedback.d.ts new file mode 100644 index 0000000000..30ecaeea74 --- /dev/null +++ b/types/reactstrap/lib/FormFeedback.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: string; + className?: string; +} + +declare var FormFeedback: React.StatelessComponent; +export default FormFeedback; \ No newline at end of file diff --git a/types/reactstrap/lib/FormGroup.d.ts b/types/reactstrap/lib/FormGroup.d.ts new file mode 100644 index 0000000000..fd2390cdfa --- /dev/null +++ b/types/reactstrap/lib/FormGroup.d.ts @@ -0,0 +1,11 @@ +interface Props { + row?: boolean; + check?: boolean; + disabled?: boolean; + tag?: React.ReactType; + color?: string; + className?: boolean; +} + +declare var FormGroup: React.StatelessComponent; +export default FormGroup; \ No newline at end of file diff --git a/types/reactstrap/lib/FormText.d.ts b/types/reactstrap/lib/FormText.d.ts new file mode 100644 index 0000000000..221a6de013 --- /dev/null +++ b/types/reactstrap/lib/FormText.d.ts @@ -0,0 +1,9 @@ +interface Props { + inline?: boolean; + tag?: string; + color?: string; + className?: string; +} + +declare var FormText: React.StatelessComponent; +export default FormText; \ No newline at end of file diff --git a/types/reactstrap/lib/Input.d.ts b/types/reactstrap/lib/Input.d.ts new file mode 100644 index 0000000000..816add1137 --- /dev/null +++ b/types/reactstrap/lib/Input.d.ts @@ -0,0 +1,46 @@ +type InputType = + | 'text' + | 'email' + | 'select' + | 'file' + | 'radio' + | 'checkbox' + | 'textarea' + | 'button' + | 'reset' + | 'submit' + | 'date' + | 'datetime-local' + | 'hidden' + | 'image' + | 'month' + | 'number' + | 'range' + | 'search' + | 'tel' + | 'url' + | 'week' + | 'password' + | 'datetime' + | 'time' + | 'color'; + +// Intermediate interface to "redefine" the type of size to string +// size:number => size:any => size:string +interface Intermediate extends React.ChangeTargetHTMLProps { + size?: any; +} + +interface InputProps extends Intermediate { + type?: InputType; + size?: string; + state?: string; + tag?: React.ReactType; + addon?: boolean; + className?: string; + // We don't have the property 'static' here because 'static' is a reserved keyword in TypeScript + // Maybe reactstrap will support an 'isStatic' alias in the future +} + +declare var Input: React.StatelessComponent; +export default Input; \ No newline at end of file diff --git a/types/reactstrap/lib/InputGroup.d.ts b/types/reactstrap/lib/InputGroup.d.ts new file mode 100644 index 0000000000..1d2cfb0633 --- /dev/null +++ b/types/reactstrap/lib/InputGroup.d.ts @@ -0,0 +1,8 @@ +interface Props { + tag?: React.ReactType; + size?: string; + className?: string; +} + +declare var InputGroup: React.StatelessComponent; +export default InputGroup; \ No newline at end of file diff --git a/types/reactstrap/lib/InputGroupAddon.d.ts b/types/reactstrap/lib/InputGroupAddon.d.ts new file mode 100644 index 0000000000..379c6cc24d --- /dev/null +++ b/types/reactstrap/lib/InputGroupAddon.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var InputGroupAddon: React.StatelessComponent; +export default InputGroupAddon; \ No newline at end of file diff --git a/types/reactstrap/lib/InputGroupButton.d.ts b/types/reactstrap/lib/InputGroupButton.d.ts new file mode 100644 index 0000000000..43017e4a25 --- /dev/null +++ b/types/reactstrap/lib/InputGroupButton.d.ts @@ -0,0 +1,10 @@ +interface Props { + tag?: React.ReactType; + groupClassName?: string; + groupAttributes?: any; + className?: string; + color?: string; +} + +declare var InputGroupButton: React.StatelessComponent; +export default InputGroupButton; \ No newline at end of file diff --git a/types/reactstrap/lib/Jumbotron.d.ts b/types/reactstrap/lib/Jumbotron.d.ts new file mode 100644 index 0000000000..65529d80e7 --- /dev/null +++ b/types/reactstrap/lib/Jumbotron.d.ts @@ -0,0 +1,8 @@ +interface Props { + tag?: React.ReactType; + fluid?: boolean; + className?: string; +} + +declare var Jumbotron: React.StatelessComponent; +export default Jumbotron; \ No newline at end of file diff --git a/types/reactstrap/lib/Label.d.ts b/types/reactstrap/lib/Label.d.ts new file mode 100644 index 0000000000..0c7ba166ba --- /dev/null +++ b/types/reactstrap/lib/Label.d.ts @@ -0,0 +1,20 @@ +import { ColumnProps } from './Col'; + +interface Props { + hidden?: boolean; + check?: boolean; + inline?: boolean; + disabled?: boolean; + size?: string; + for?: string; + tag?: string; + className?: string; + xs?: ColumnProps; + sm?: ColumnProps; + md?: ColumnProps; + lg?: ColumnProps; + xl?: ColumnProps; +} + +declare var Label: React.StatelessComponent; +export default Label; \ No newline at end of file diff --git a/types/reactstrap/lib/ListGroup.d.ts b/types/reactstrap/lib/ListGroup.d.ts new file mode 100644 index 0000000000..50e5ecb247 --- /dev/null +++ b/types/reactstrap/lib/ListGroup.d.ts @@ -0,0 +1,8 @@ +interface Props { + tag?: React.ReactType; + flush?: boolean; + className?: string; +} + +declare var ListGroup: React.StatelessComponent; +export default ListGroup; \ No newline at end of file diff --git a/types/reactstrap/lib/ListGroupItem.d.ts b/types/reactstrap/lib/ListGroupItem.d.ts new file mode 100644 index 0000000000..a85df43fc1 --- /dev/null +++ b/types/reactstrap/lib/ListGroupItem.d.ts @@ -0,0 +1,12 @@ +interface Props { + tag?: React.ReactType; + active?: boolean; + disabled?: boolean; + color?: string; + action?: boolean; + className?: string; + href?: string; +} + +declare var ListGroupItem: React.StatelessComponent; +export default ListGroupItem; \ No newline at end of file diff --git a/types/reactstrap/lib/ListGroupItemHeading.d.ts b/types/reactstrap/lib/ListGroupItemHeading.d.ts new file mode 100644 index 0000000000..35adbf4d5e --- /dev/null +++ b/types/reactstrap/lib/ListGroupItemHeading.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var ListGroupItemHeading: React.StatelessComponent; +export default ListGroupItemHeading; \ No newline at end of file diff --git a/types/reactstrap/lib/ListGroupItemText.d.ts b/types/reactstrap/lib/ListGroupItemText.d.ts new file mode 100644 index 0000000000..51fc4b0459 --- /dev/null +++ b/types/reactstrap/lib/ListGroupItemText.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var ListGroupItemText: React.StatelessComponent; +export default ListGroupItemText; \ No newline at end of file diff --git a/types/reactstrap/lib/Media.d.ts b/types/reactstrap/lib/Media.d.ts new file mode 100644 index 0000000000..be8c28ada9 --- /dev/null +++ b/types/reactstrap/lib/Media.d.ts @@ -0,0 +1,18 @@ +interface Props { + body?: boolean; + bottom?: boolean; + className?: string; + heading?: boolean; + left?: boolean; + list?: boolean; + middle?: boolean; + object?: boolean; + right?: boolean; + tag?: React.ReactType; + top?: boolean; + href?: string; + alt?: string; +} + +declare var Media: React.StatelessComponent; +export default Media; \ No newline at end of file diff --git a/types/reactstrap/lib/Modal.d.ts b/types/reactstrap/lib/Modal.d.ts new file mode 100644 index 0000000000..60d09d1cb4 --- /dev/null +++ b/types/reactstrap/lib/Modal.d.ts @@ -0,0 +1,18 @@ +interface Props { + isOpen?: boolean; + size?: string; + toggle?: () => void; + keyboard?: boolean; + backdrop?: boolean | 'static'; + onEnter?: () => void; + onExit?: () => void; + className?: string; + wrapClassName?: string; + modalClassName?: string; + backdropClassName?: string; + contentClassName?: string; + zIndex?: number | string; +} + +declare var Modal: React.StatelessComponent; +export default Modal; \ No newline at end of file diff --git a/types/reactstrap/lib/ModalBody.d.ts b/types/reactstrap/lib/ModalBody.d.ts new file mode 100644 index 0000000000..3a09dfed76 --- /dev/null +++ b/types/reactstrap/lib/ModalBody.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var ModalBody: React.StatelessComponent; +export default ModalBody; \ No newline at end of file diff --git a/types/reactstrap/lib/ModalFooter.d.ts b/types/reactstrap/lib/ModalFooter.d.ts new file mode 100644 index 0000000000..b3ec195ed9 --- /dev/null +++ b/types/reactstrap/lib/ModalFooter.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var ModalFooter: React.StatelessComponent; +export default ModalFooter; \ No newline at end of file diff --git a/types/reactstrap/lib/ModalHeader.d.ts b/types/reactstrap/lib/ModalHeader.d.ts new file mode 100644 index 0000000000..decfdab4b0 --- /dev/null +++ b/types/reactstrap/lib/ModalHeader.d.ts @@ -0,0 +1,9 @@ +interface Props { + tag?: React.ReactType; + className?: string; + wrapTag?: React.ReactType; + toggle?: () => void; +} + +declare var ModalHeader: React.StatelessComponent; +export default ModalHeader; \ No newline at end of file diff --git a/types/reactstrap/lib/Nav.d.ts b/types/reactstrap/lib/Nav.d.ts new file mode 100644 index 0000000000..660c2a401c --- /dev/null +++ b/types/reactstrap/lib/Nav.d.ts @@ -0,0 +1,13 @@ +interface Props { + inline?: boolean; + disabled?: boolean; + tabs?: boolean; + pills?: boolean; + stacked?: boolean; + navbar?: boolean; + tag?: React.ReactType; + className?: string; +} + +declare var Nav: React.StatelessComponent; +export default Nav; \ No newline at end of file diff --git a/types/reactstrap/lib/NavDropdown.d.ts b/types/reactstrap/lib/NavDropdown.d.ts new file mode 100644 index 0000000000..6b480d495a --- /dev/null +++ b/types/reactstrap/lib/NavDropdown.d.ts @@ -0,0 +1,12 @@ +import { + UncontrolledProps as DropdownUncontrolledProps, + Props as DropdownProps +} from './Dropdown'; + +// tslint:disable-next-line +export interface UncontrolledProps extends DropdownUncontrolledProps { } +// tslint:disable-next-line +interface Props extends DropdownProps { } + +declare var NavDropdown: React.StatelessComponent; +export default NavDropdown; \ No newline at end of file diff --git a/types/reactstrap/lib/NavItem.d.ts b/types/reactstrap/lib/NavItem.d.ts new file mode 100644 index 0000000000..ee83c5477e --- /dev/null +++ b/types/reactstrap/lib/NavItem.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var NavItem: React.StatelessComponent; +export default NavItem; \ No newline at end of file diff --git a/types/reactstrap/lib/NavLink.d.ts b/types/reactstrap/lib/NavLink.d.ts new file mode 100644 index 0000000000..35da161a1e --- /dev/null +++ b/types/reactstrap/lib/NavLink.d.ts @@ -0,0 +1,11 @@ +interface Props { + tag?: React.ReactType; + disabled?: boolean; + active?: boolean; + className?: string; + onClick?: React.MouseEventHandler; + href?: string; +} + +declare var NavLink: React.StatelessComponent; +export default NavLink; \ No newline at end of file diff --git a/types/reactstrap/lib/Navbar.d.ts b/types/reactstrap/lib/Navbar.d.ts new file mode 100644 index 0000000000..e25aa7bdcb --- /dev/null +++ b/types/reactstrap/lib/Navbar.d.ts @@ -0,0 +1,15 @@ +interface Props { + light?: boolean; + inverse?: boolean; + full?: boolean; + fixed?: string; + sticky?: string; + color?: string; + role?: string; + tag?: React.ReactType; + className?: string; + toggleable?: boolean | string; +} + +declare var Navbar: React.StatelessComponent; +export default Navbar; \ No newline at end of file diff --git a/types/reactstrap/lib/NavbarBrand.d.ts b/types/reactstrap/lib/NavbarBrand.d.ts new file mode 100644 index 0000000000..c99fba6673 --- /dev/null +++ b/types/reactstrap/lib/NavbarBrand.d.ts @@ -0,0 +1,7 @@ +interface NavbarBrand { + tag?: React.ReactType; + className?: string; +} + +declare var NavbarBrand: React.StatelessComponent>; +export default NavbarBrand; \ No newline at end of file diff --git a/types/reactstrap/lib/NavbarToggler.d.ts b/types/reactstrap/lib/NavbarToggler.d.ts new file mode 100644 index 0000000000..083e2920aa --- /dev/null +++ b/types/reactstrap/lib/NavbarToggler.d.ts @@ -0,0 +1,10 @@ +interface Props extends React.HTMLProps { + tag?: React.ReactType; + type?: string; + className?: string; + right?: boolean; + left?: boolean; +} + +declare var NavbarToggler: React.StatelessComponent; +export default NavbarToggler; \ No newline at end of file diff --git a/types/reactstrap/lib/Pagination.d.ts b/types/reactstrap/lib/Pagination.d.ts new file mode 100644 index 0000000000..c7f621f109 --- /dev/null +++ b/types/reactstrap/lib/Pagination.d.ts @@ -0,0 +1,7 @@ +interface Props { + className?: string; + size?: string; +} + +declare var Pagination: React.StatelessComponent; +export default Pagination; \ No newline at end of file diff --git a/types/reactstrap/lib/PaginationItem.d.ts b/types/reactstrap/lib/PaginationItem.d.ts new file mode 100644 index 0000000000..9a85a09891 --- /dev/null +++ b/types/reactstrap/lib/PaginationItem.d.ts @@ -0,0 +1,9 @@ +interface Props { + className?: string; + active?: boolean; + disabled?: boolean; + tag?: React.ReactType; +} + +declare var PaginationItem: React.StatelessComponent; +export default PaginationItem; \ No newline at end of file diff --git a/types/reactstrap/lib/PaginationLink.d.ts b/types/reactstrap/lib/PaginationLink.d.ts new file mode 100644 index 0000000000..a075aa6305 --- /dev/null +++ b/types/reactstrap/lib/PaginationLink.d.ts @@ -0,0 +1,10 @@ +interface Props extends React.HTMLProps { + 'aria-label'?: string; + className?: string; + next?: boolean; + previous?: boolean; + tag?: React.ReactType; +} + +declare var PaginationLink: React.StatelessComponent; +export default PaginationLink; \ No newline at end of file diff --git a/types/reactstrap/lib/Popover.d.ts b/types/reactstrap/lib/Popover.d.ts new file mode 100644 index 0000000000..a1c7f30603 --- /dev/null +++ b/types/reactstrap/lib/Popover.d.ts @@ -0,0 +1,31 @@ +/// + +type Placement + = 'top' + | 'bottom' + | 'left' + | 'right' + | 'top left' + | 'top center' + | 'top right' + | 'right top' + | 'right middle' + | 'right bottom' + | 'bottom right' + | 'bottom center' + | 'bottom left' + | 'left top' + | 'left middle' + | 'left bottom'; + +interface Props { + placement?: Placement; + target: string; + isOpen?: boolean; + tether?: Tether.ITetherOptions; + className?: string; + toggle?: () => void; +} + +declare var Popover: React.StatelessComponent; +export default Popover; \ No newline at end of file diff --git a/types/reactstrap/lib/PopoverContent.d.ts b/types/reactstrap/lib/PopoverContent.d.ts new file mode 100644 index 0000000000..5344b41804 --- /dev/null +++ b/types/reactstrap/lib/PopoverContent.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var PopoverContent: React.StatelessComponent; +export default PopoverContent; \ No newline at end of file diff --git a/types/reactstrap/lib/PopoverTitle.d.ts b/types/reactstrap/lib/PopoverTitle.d.ts new file mode 100644 index 0000000000..6c837868e6 --- /dev/null +++ b/types/reactstrap/lib/PopoverTitle.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var PopoverTitle: React.StatelessComponent; +export default PopoverTitle; \ No newline at end of file diff --git a/types/reactstrap/lib/Progress.d.ts b/types/reactstrap/lib/Progress.d.ts new file mode 100644 index 0000000000..ea01393b3c --- /dev/null +++ b/types/reactstrap/lib/Progress.d.ts @@ -0,0 +1,15 @@ +interface Props { + bar?: boolean; + multi?: boolean; + tag?: string; + value?: string | number; + max?: string | number; + animated?: boolean; + striped?: boolean; + color?: string; + className?: string; + barClassName?: string; +} + +declare var Progress: React.StatelessComponent; +export default Progress; \ No newline at end of file diff --git a/types/reactstrap/lib/Row.d.ts b/types/reactstrap/lib/Row.d.ts new file mode 100644 index 0000000000..b318b6e6f5 --- /dev/null +++ b/types/reactstrap/lib/Row.d.ts @@ -0,0 +1,8 @@ +interface Props { + className?: string; + tag?: React.ReactType; + noGutters?: boolean; +} + +declare var Row: React.StatelessComponent>; +export default Row; \ No newline at end of file diff --git a/types/reactstrap/lib/TabContent.d.ts b/types/reactstrap/lib/TabContent.d.ts new file mode 100644 index 0000000000..7e5f9120c0 --- /dev/null +++ b/types/reactstrap/lib/TabContent.d.ts @@ -0,0 +1,8 @@ +interface Props { + tag?: React.ReactType; + activeTab?: number | string; + className?: string; +} + +declare var TabContent: React.StatelessComponent; +export default TabContent; \ No newline at end of file diff --git a/types/reactstrap/lib/TabPane.d.ts b/types/reactstrap/lib/TabPane.d.ts new file mode 100644 index 0000000000..9add666c8e --- /dev/null +++ b/types/reactstrap/lib/TabPane.d.ts @@ -0,0 +1,8 @@ +interface Props { + tag?: React.ReactType; + className?: string; + tabId?: number | string; +} + +declare var TabPane: React.StatelessComponent; +export default TabPane; \ No newline at end of file diff --git a/types/reactstrap/lib/Table.d.ts b/types/reactstrap/lib/Table.d.ts new file mode 100644 index 0000000000..9c3f27abe8 --- /dev/null +++ b/types/reactstrap/lib/Table.d.ts @@ -0,0 +1,15 @@ +interface Props { + className?: string; + size?: string; + bordered?: boolean; + striped?: boolean; + inverse?: boolean; + hover?: boolean; + reflow?: boolean; + responsive?: boolean; + tag?: React.ReactType; + responsiveTag?: React.ReactType; +} + +declare var Table: React.StatelessComponent; +export default Table; \ No newline at end of file diff --git a/types/reactstrap/lib/Tag.d.ts b/types/reactstrap/lib/Tag.d.ts new file mode 100644 index 0000000000..1ea80359aa --- /dev/null +++ b/types/reactstrap/lib/Tag.d.ts @@ -0,0 +1,9 @@ +interface Props { + color?: string; + pill?: boolean; + tag?: React.ReactType; + className?: string; +} + +declare var Tag: React.StatelessComponent; +export default Tag; \ No newline at end of file diff --git a/types/reactstrap/lib/TetherContent.d.ts b/types/reactstrap/lib/TetherContent.d.ts new file mode 100644 index 0000000000..46a6a7745a --- /dev/null +++ b/types/reactstrap/lib/TetherContent.d.ts @@ -0,0 +1,15 @@ +/// + +interface Props { + className?: string; + arrow?: string; + disabled?: boolean; + isOpen: boolean; + toggle: () => void; + tether: Tether.ITetherOptions; + tetherRef?: (tether: Tether) => void; + style?: React.CSSProperties; +} + +declare var TetherContent: React.StatelessComponent; +export default TetherContent; \ No newline at end of file diff --git a/types/reactstrap/lib/Tooltip.d.ts b/types/reactstrap/lib/Tooltip.d.ts new file mode 100644 index 0000000000..19b45a581e --- /dev/null +++ b/types/reactstrap/lib/Tooltip.d.ts @@ -0,0 +1,40 @@ +/// + +type Placement + = 'top' + | 'bottom' + | 'left' + | 'right' + | 'top left' + | 'top center' + | 'top right' + | 'right top' + | 'right middle' + | 'right bottom' + | 'bottom right' + | 'bottom center' + | 'bottom left' + | 'left top' + | 'left middle' + | 'left bottom'; + +export interface UncontrolledProps { + placement?: Placement; + target: string; + disabled?: boolean; + tether?: Tether.ITetherOptions; + tetherRef?: (tether: Tether) => void; + className?: string; + autohide?: boolean; + delay?: number | { show: number, hide: number }; +} + +interface Props extends UncontrolledProps { + toggle?: () => void; + isOpen?: boolean; +} + + + +declare var Tooltip: React.StatelessComponent; +export default Tooltip; \ No newline at end of file diff --git a/types/reactstrap/lib/Uncontrolled.d.ts b/types/reactstrap/lib/Uncontrolled.d.ts new file mode 100644 index 0000000000..151ee012d3 --- /dev/null +++ b/types/reactstrap/lib/Uncontrolled.d.ts @@ -0,0 +1,29 @@ +import { + UncontrolledProps as AlertUncontrolledProps +} from './Alert'; +import { + UncontrolledProps as ButtonDropdownUncontrolledProps +} from './ButtonDropdown'; +import { + UncontrolledProps as DropdownUncontrolledProps +} from './Dropdown'; +import { + UncontrolledProps as NavDropdownUncontrolledProps +} from './NavDropdown'; +import { + UncontrolledProps as TooltipUncontrolledProps +} from './Tooltip'; + +declare var UncontrolledAlert: React.StatelessComponent; +declare var UncontrolledButtonDropdown: React.StatelessComponent; +declare var UncontrolledDropdown: React.StatelessComponent; +declare var UncontrolledNavDropdown: React.StatelessComponent; +declare var UncontrolledTooltip: React.StatelessComponent; + +export { + UncontrolledAlert, + UncontrolledButtonDropdown, + UncontrolledDropdown, + UncontrolledNavDropdown, + UncontrolledTooltip +} \ No newline at end of file diff --git a/types/reactstrap/reactstrap-tests.tsx b/types/reactstrap/reactstrap-tests.tsx new file mode 100644 index 0000000000..71ab35ff9b --- /dev/null +++ b/types/reactstrap/reactstrap-tests.tsx @@ -0,0 +1,3240 @@ +import * as React from 'react'; +import { + Alert, + UncontrolledAlert, + Badge, + Breadcrumb, + BreadcrumbItem, + Button, + ButtonDropdown, + ButtonGroup, + ButtonToolbar, + Dropdown, + DropdownItem, + DropdownMenu, + DropdownToggle, + Card, + CardBlock, + CardColumns, + CardDeck, + CardFooter, + CardGroup, + CardHeader, + CardImg, + CardImgOverlay, + CardLink, + CardSubtitle, + CardText, + CardTitle, + Row, + Col, + Container, + Collapse, + Fade, + Form, + FormFeedback, + FormGroup, + FormText, + Input, + InputGroup, + InputGroupAddon, + InputGroupButton, + Pagination, + Label, + ListGroup, + ListGroupItem, + ListGroupItemHeading, + ListGroupItemText, + ModalFooter, + Modal, + ModalBody, + ModalHeader, + Jumbotron, + Media, + Nav, + Navbar, + NavbarBrand, + NavbarToggler, + NavDropdown, + NavItem, + NavLink, + PaginationItem, + PaginationLink, + Popover, + PopoverContent, + PopoverTitle, + Progress, + TabPane, + UncontrolledButtonDropdown, + UncontrolledDropdown, + UncontrolledNavDropdown, + UncontrolledTooltip, + TabContent, + Table, + Tag, + TetherContent, + Tooltip +} from 'reactstrap'; + + +//--------------- Alert +const Examplea = (props: any) => { + return ( +
    + + Well done! You successfully read this important alert message. + + + Heads up! This alert needs your attention, but it's not super important. + + + Warning! Better check yourself, you're not looking too good. + + + Oh snap! Change a few things up and try submitting again. + +
    + ); +}; + +class AlertExample extends React.Component { + constructor(props: any) { + super(props); + + this.state = { + visible: true + } + } + + onDismiss = () => { + this.setState({ visible: false }); + } + + render() { + return ( + + I am an alert and I can be dismissed! + + ); + } +} + +function AlertExample1() { + return ( + + I am an alert and I can be dismissed! + + ); +} + +//--------------- Badge +class Example2 extends React.Component { + render() { + return ( +
    +

    Heading New

    +

    Heading New

    +

    Heading New

    +

    Heading New

    +
    Heading New
    +
    Heading New
    +
    + ); + } +} + +export class Example3 extends React.Component { + render() { + return ( +
    + default + primary + success + info + warning + danger +
    + ); + } +} + +class Example4 extends React.Component { + render() { + return ( +
    + default{' '} + primary{' '} + success{' '} + info{' '} + warning{' '} + danger +
    + ); + } +} + +//------------- Breadcrumbs +const Example5 = (props: any) => { + return ( +
    + + Home + + + Home + Library + + + Home + Library + Data + +
    + ); +}; + +const Example6 = (props: any) => { + return ( +
    + + Home + Library + Data + Bootstrap + +
    + ); +}; + +//------------- Buttons +class Example7 extends React.Component { + render() { + return ( +
    + {' '} + {' '} + {' '} + {' '} + {' '} + {' '} + +
    + ); + } +} + +class Example8 extends React.Component { + render() { + return ( +
    + {' '} + {' '} + {' '} + {' '} + {' '} + +
    + ); + } +} + +const Example9 = ( +
    + {' '} + +
    +) + +const Example10 = ( +
    + {' '} + +
    +) + +const Example11 = ( +
    + + +
    +) + +const Example12 = ( +
    + {' '} + +
    +) + +const Example13 = ( +
    + {' '} + +
    +) + +class Example14 extends React.Component { + constructor(props: any) { + super(props); + + this.state = { cSelected: [] }; + + this.onRadioBtnClick = this.onRadioBtnClick.bind(this); + this.onCheckboxBtnClick = this.onCheckboxBtnClick.bind(this); + } + + onRadioBtnClick(rSelected: number) { + this.setState({ rSelected }); + } + + onCheckboxBtnClick(selected: number) { + const index = this.state.cSelected.indexOf(selected); + if (index < 0) { + this.state.cSelected.push(selected); + } else { + this.state.cSelected.splice(index, 1); + } + this.setState({ cSelected: [...this.state.cSelected] }); + } + + render() { + return ( +
    +
    Radio Buttons
    + + + + + +

    Selected: {this.state.rSelected}

    + +
    Checkbox Buttons
    + + + + + +

    Selected: {JSON.stringify(this.state.cSelected)}

    +
    + ); + } +} + +//------------- Button Dropdown +class Example15 extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + dropdownOpen: false + }; + } + + toggle() { + this.setState({ + dropdownOpen: !this.state.dropdownOpen + }); + } + + render() { + return ( + + + Button Dropdown + + + Header + Action + Another Action + + Another Action + + + ); + } +} + +const Example16 = ( + true}> + + Text + + + Header + Action + Another Action + + Another Action + + +) + +const Example17 = (props: any) => ( + true}> + + + + Header + Action + Another Action + + Another Action + + +) + +const Example18 = ( +
    + true}> + + Large Button + + + Another Action + Another Action + + + + true}> + + Small Button + + + Another Action + Another Action + + +
    +) + +const Example19 = ( + true} dropup> + + Dropup + + + Another Action + Another Action + + +) + + + +//--------------- ButtonGroup +class Example20 extends React.Component { + render() { + return ( + + {' '} + {' '} + + + ); + } +} + +class Example21 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + ); + } +} + +const Example22 = (props: any) => ( +
    + + + + + + + + + + + + + + + + + +
    +) + +const Example23 = (props: any) => ( + + + + true}> + + Dropdown + + + Dropdown Link + Dropdown Link + + + + +) + +const Example24 = (props: any) => ( + + + + true}> + + Dropdown + + + Dropdown Link + Dropdown Link + + + +) + + +//------------------ Cards +const Example25 = (props: any) => { + return ( +
    + + + + Card title + Card subtitle + Some quick example text to build on the card title and make up the bulk of the card's content. + + + +
    + ); +}; + +const Example26 = (props: any) => { + return ( +
    + + + Card title + Card subtitle + + Card image cap + + Some quick example text to build on the card title and make up the bulk of the card's content. + Card Link + Another Link + + +
    + ); +}; + +const Example27 = (props: any) => { + return ( + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + + ); +}; + +const Example28 = (props: any) => { + return ( +
    + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + +
    + ); +}; + +const Example29 = (props: any) => { + return ( +
    + + Header + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + Footer + + + + Featured + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + Footer + +
    + ); +}; + +const Example30 = (props: any) => { + return ( +
    + + + + Card Title + This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. + + Last updated 3 mins ago + + + + + + Card Title + This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. + + Last updated 3 mins ago + + + + +
    + ); +}; + +const Example31 = (props: any) => { + return ( +
    + + + + Card Title + This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. + + Last updated 3 mins ago + + + +
    + ); +}; + +const Example32 = (props: any) => { + return ( +
    + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + +
    + ); +}; + +const Example33 = (props: any) => { + return ( +
    + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + +
    + ); +}; + +const Example34 = (props: any) => { + return ( + + + + + Card title + Card subtitle + This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. + + + + + + + Card title + Card subtitle + This card has supporting text below as a natural lead-in to additional content. + + + + + + + Card title + Card subtitle + + This is a wider card with supporting text below as a natural lead-in to additional content. This + card has even longer content than the first to show that equal height action. + + + + + + ); +}; + +const Example35 = (props: any) => { + return ( + + + + + Card title + Card subtitle + This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. + + + + + + + Card title + Card subtitle + This card has supporting text below as a natural lead-in to additional content. + + + + + + + Card title + Card subtitle + + This is a wider card with supporting text below as a natural lead-in to additional content. This card has + even longer content than the first to show that equal height action. + + + + + + ); +}; + +const Example36 = (props: any) => { + return ( + + + + + Card title + Card subtitle + This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. + + + + + + + + + Card title + Card subtitle + This card has supporting text below as a natural lead-in to additional content. + + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + + + Card title + Card subtitle + + This is a wider card with supporting text below as a natural lead-in to additional content. This card + has even longer content than the first to show that equal height action. + + + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + ); +}; + + +//------------------ Collapse + +class Example37 extends React.Component { + constructor(props: any) { + super(props); + this.toggle = this.toggle.bind(this); + this.state = { collapse: false }; + } + + toggle() { + this.setState({ collapse: !this.state.collapse }); + } + + render() { + return ( +
    + + + + + Anim pariatur cliche reprehenderit, + enim eiusmod high life accusamus terry richardson ad squid. Nihil + anim keffiyeh helvetica, craft beer labore wes anderson cred + nesciunt sapiente ea proident. + + + +
    + ); + } +} + +class Example38 extends React.Component { + constructor(props: any) { + super(props); + this.onOpened = this.onOpened.bind(this); + this.onClosed = this.onClosed.bind(this); + this.toggle = this.toggle.bind(this); + this.state = { collapse: false, status: 'Closed' }; + } + + onOpened() { + this.setState({ ...this.state, status: 'Opened' }); + } + + onClosed() { + this.setState({ ...this.state, status: 'Closed' }); + } + + toggle() { + const status = !this.state.collapse ? 'Opening...' : 'Closing...'; + this.setState({ collapse: !this.state.collapse, status }); + } + + render() { + return ( +
    + +
    Current state: {this.state.status}
    + + + + Anim pariatur cliche reprehenderit, + enim eiusmod high life accusamus terry richardson ad squid. Nihil + anim keffiyeh helvetica, craft beer labore wes anderson cred + nesciunt sapiente ea proident. + + + +
    + ); + } +} + + +//------- Dropdown + +class Example39 extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + dropdownOpen: false + }; + } + + toggle() { + this.setState({ + dropdownOpen: !this.state.dropdownOpen + }); + } + + render() { + return ( + + + Dropdown + + + Header + Action + Another Action + + Another Action + + + ); + } +} + +const Example40 = (props: any) => ( + false}> + + Dropdown + + + Header + Action + Another Action + + Another Action + + +) + +const Example41 = (props: any) => ( + Header +) + +const Example42 = (props: any) => ( +
    + + Action + Action + true}> + asdfasd + sadfas + + + true}> + sadfasd + sadf + + + true}> + asdf + sasdfsdf + + +
    +) + +class Example43 extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + dropdownOpen: false + }; + } + + toggle() { + this.setState({ + dropdownOpen: !this.state.dropdownOpen + }); + } + + render() { + return ( + + + Custom Dropdown Content + + +
    Custom dropdown item
    +
    Custom dropdown item
    +
    Custom dropdown item
    +
    Custom dropdown item
    +
    +
    + ); + } +} + +function Example44() { + return ( + + + Dropdown + + + Header + Action + Another Action + + Another Action + + + ); +} + + +//------------------ Form +class Example45 extends React.Component { + render() { + return ( +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This is some placeholder block-level help text for the above input. + It's a bit lighter and easily wraps to a new line. + + + + Radio Buttons + + + + + + + + + + + + + + +
    + ); + } +} + +class Example46 extends React.Component { + render() { + return ( +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This is some placeholder block-level help text for the above input. + It's a bit lighter and easily wraps to a new line. + + + + + Radio Buttons + + + + + + + + + + + + + + + + + + + + + + + + + +
    + ); + } +} + +class Example47 extends React.Component { + render() { + return ( +
    + + {' '} + + + {' '} + + {' '} + + + {' '} + +
    + ); + } +} + +class Example48 extends React.Component { + render() { + return ( +
    + + + + Success! You did it! + Example help text that remains unchanged. + + + + + Whoops, check your formatting and try again. + Example help text that remains unchanged. + + + + + Oh noes! that name is already taken + Example help text that remains unchanged. + +
    + ); + } +} + +class Example49 extends React.Component { + render() { + return ( +
    + + + Some static value + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This is some placeholder block-level help text for the above input. + It's a bit lighter and easily wraps to a new line. + + + + + + + + +
    + ); + } +} + +class Example50 extends React.Component { + render() { + return ( +
    + + + + + + + + + + + + +
    + ); + } +} + +class Example51 extends React.Component { + render() { + return ( +
    + + + + + {' '} + + + + + {' '} + +
    + ); + } +} + +const Example52 = (props: any) => { + return ( +
    + + @ + + +
    + + + + + + +
    + + + @example.com + +
    + + $ + $ + + $ + $ + +
    + + $ + + .00 + +
    + ); +}; + +const Example53 = (props: any) => { + return ( +
    + + To the Left! + + +
    + + + To the Right! + +
    + + To the Left! + + To the Right! + +
    + ); +} + +const Example54 = (props: any) => { + return ( +
    + + @lg + + +
    + + @normal + + +
    + + @sm + + +
    + ); +}; + +const Example55 = (props: any) => { + return ( +
    + + + + +
    + + + + +
    + + + + + +
    + ); +}; + +const Example56 = (props: any) => { + return ( +
    + + @lg + + +
    + + @normal + + +
    + + @sm + + +
    + ); +}; + +const Example57 = (props: any) => { + return ( +
    + + + + +
    + + + + +
    + + + + + +
    + ); +}; + +const Example58 = (props: any) => { + return ( +
    + + To the Left! + + +
    + + + To the Right! + +
    + + To the Left! + + To the Right! + +
    + ); +}; + +const Example59 = (props: any) => { + return ( +
    + +

    Hello, world!

    +

    This is a simple hero unit, a simple Jumbotron-style component for calling extra attention to featured content or information.

    +
    +

    It uses utility classes for typgraphy and spacing to space content out within the larger container.

    +

    + +

    +
    +
    + ); +}; + + +const Example60 = (props: any) => { + return ( +
    + + +

    Fluid jumbotron

    +

    This is a modified jumbotron that occupies the entire horizontal space of its parent.

    +
    +
    +
    + ); +}; + +class Example61 extends React.Component { + render() { + return ( + + + .col + + + .col + .col + .col + .col + + + .col-3 + .col-auto - variable width content + .col-3 + + + .col-6 + .col-6 + + + .col-6 .col-sm-4 + .col-6 .col-sm-4 + .col .col-sm-4 + + + .col .col-sm-6 .col-sm-push-2 .col-sm-pull-2 .col-sm-offset-2 + + + .col .col-sm-12 .col-md-6 .col-md-offset-3 + + + .col .col-sm .col-sm-offset-1 + .col .col-sm .col-sm-offset-1 + + + ); + } +} + +class Example62 extends React.Component { + render() { + return ( + + Cras justo odio + Dapibus ac facilisis in + Morbi leo risus + Porta ac consectetur ac + Vestibulum at eros + + ); + } +} + +class Example63 extends React.Component { + render() { + return ( + + Cras justo odio 14 + Dapibus ac facilisis in 2 + Morbi leo risus 1 + + ); + } +} + +class Example64 extends React.Component { + render() { + return ( + + Cras justo odio + Dapibus ac facilisis in + Morbi leo risus + Porta ac consectetur ac + Vestibulum at eros + + ); + } +} + +class Example65 extends React.Component { + render() { + return ( +
    +

    Anchors

    +

    Be sure to not use the standard .btn classes here.

    + + Cras justo odio + Dapibus ac facilisis in + Morbi leo risus + Porta ac consectetur ac + Vestibulum at eros + +

    +

    Buttons

    + + Cras justo odio + Dapibus ac facilisis in + Morbi leo risus + Porta ac consectetur ac + Vestibulum at eros + +
    + ); + } +} + +class Example66 extends React.Component { + render() { + return ( + + Cras justo odio + Dapibus ac facilisis in + Morbi leo risus + Porta ac consectetur ac + + ); + } +} + +class Example67 extends React.Component { + render() { + return ( + + + List group item heading + + Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit. + + + + List group item heading + + Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit. + + + + List group item heading + + Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit. + + + + ); + } +} + +// ------------- Media +const Example68 = () => { + return ( + + + + + + + Media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus + odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. + Donec lacinia congue felis in faucibus. + + + ); +}; + +const Example69 = () => { + return ( + + + + + + + Media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus + odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. + Donec lacinia congue felis in faucibus. + + + + + + + Nested media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras + purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate + fringilla. Donec lacinia congue felis in faucibus. + + + + + ); +}; + +const Example70 = () => { + return ( +
    + + + + + + + Top aligned media + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras + purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate + fringilla. Donec lacinia congue felis in faucibus. + + + + + + + + + Middle aligned media + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras + purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate + fringilla. Donec lacinia congue felis in faucibus. + + + + + + + + + Bottom aligned media + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras + purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate + fringilla. Donec lacinia congue felis in faucibus. + + +
    + ); +}; + +const Example71 = () => { + return ( + + + + + + + + Media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras + purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate + fringilla. Donec lacinia congue felis in faucibus. + + + + + + + Nested media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. + Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi + vulputate fringilla. Donec lacinia congue felis in faucibus. + + + + + + + Nested media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. + Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi + vulputate fringilla. Donec lacinia congue felis in faucibus. + + + + + + + + + + + Nested media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras + purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate + fringilla. Donec lacinia congue felis in faucibus. + + + + + + + + Media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras + purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate + fringilla. Donec lacinia congue felis in faucibus. + + + + + + + ); +}; + + +//--------------- Modal +class ModalExample72 extends React.Component { + constructor(props: any) { + super(props); + this.state = { + modal: false + }; + + this.toggle = this.toggle.bind(this); + } + + toggle() { + this.setState({ + modal: !this.state.modal + }); + } + + render() { + return ( +
    + + + Modal title + + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat + nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit + anim id est laborum. + + + {' '} + + + +
    + ); + } +} + +class ModalExample73 extends React.Component { + constructor(props: any) { + super(props); + this.state = { + modal: false, + backdrop: true + }; + + this.toggle = this.toggle.bind(this); + this.changeBackdrop = this.changeBackdrop.bind(this); + } + + toggle() { + this.setState({ + modal: !this.state.modal + }); + } + + changeBackdrop(e: React.ChangeEvent) { + let value = e.target.value; + if (value !== 'static') { + value = JSON.parse(value); + } + this.setState({ backdrop: value }); + } + + render() { + return ( +
    +
    e.preventDefault()}> + + {' '} + + + + + + + {' '} + +
    + + Modal title + + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu + fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt + mollit anim id est laborum. + + + {' '} + + + +
    + ); + } +} + +class ModalExample74 extends React.Component { + constructor(props: any) { + super(props); + this.state = { + modal: false, + nestedModal: false, + }; + + this.toggle = this.toggle.bind(this); + this.toggleNested = this.toggleNested.bind(this); + } + + toggle() { + this.setState({ + modal: !this.state.modal + }); + } + + toggleNested() { + this.setState({ + nestedModal: !this.state.nestedModal + }); + } + + render() { + return ( +
    + + + Modal title + + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu + fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt + mollit anim id est laborum. +
    + + + Nested Modal title + Stuff and things + + {' '} + + + +
    + + {' '} + + +
    +
    + ); + } +} + +class Example75 extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + isOpen: false + }; + } + toggle() { + this.setState({ + isOpen: !this.state.isOpen + }); + } + render() { + return ( +
    + + + reactstrap + + + + +
    + ); + } +} + +class Example76 extends React.Component { + constructor(props: any) { + super(props); + + this.toggleNavbar = this.toggleNavbar.bind(this); + this.state = { + collapsed: true + }; + } + + toggleNavbar() { + this.setState({ + collapsed: !this.state.collapsed + }); + } + render() { + return ( +
    + + + + reactstrap + + + +
    + ); + } +} + +class Example77 extends React.Component { + render() { + return ( +
    +

    List Based

    + +
    +

    Link Based

    + +
    + ); + } +} + +class Example78 extends React.Component { + render() { + return ( +
    +

    List Based

    + +
    +

    Link based

    + +
    + ); + } +} + +class Example79 extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + dropdownOpen: false + }; + } + + toggle() { + this.setState({ + dropdownOpen: !this.state.dropdownOpen + }); + } + + render() { + return ( +
    + +
    + ); + } +} + +class Example80 extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + dropdownOpen: false + }; + } + + toggle() { + this.setState({ + dropdownOpen: !this.state.dropdownOpen + }); + } + + render() { + return ( +
    + +
    + ); + } +} + +//----------- Pagination +class Example81 extends React.Component { + render() { + return ( + + + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + + + ); + } +} + + +class Example82 extends React.Component { + render() { + return ( + + + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + + + ); + } +} + + +class Example83 extends React.Component { + render() { + return ( + + + + + + + 1 + + + + + 2 + + + + + 3 + + + + + + + ); + } +} + +class Example84 extends React.Component { + render() { + return ( + + + + + + + 1 + + + + + 2 + + + + + 3 + + + + + + + ); + } +} + + +//------------------------- Popover +class Example85 extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + popoverOpen: false + }; + } + + toggle() { + this.setState({ + popoverOpen: !this.state.popoverOpen + }); + } + + render() { + return ( +
    + + + Popover Title + Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. + +
    + ); + } +} + +class PopoverItem extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + popoverOpen: false + }; + } + + toggle() { + this.setState({ + popoverOpen: !this.state.popoverOpen + }); + } + + render() { + return ( + + + + Popover Title + Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. + + + ); + } +} + +class PopoverExampleMulti extends React.Component { + constructor(props: any) { + super(props); + + this.state = { + popovers: [ + { + placement: 'top', + text: 'Top' + }, + { + placement: 'bottom', + text: 'Bottom' + }, + { + placement: 'left', + text: 'Left' + }, + { + placement: 'right', + text: 'Right' + } + ] + }; + } + + render() { + return ( +
    + {this.state.popovers.map((popover, i) => { + return ; + })} +
    + ); + } +} + + +//------------------------- Progress + +const Example86 = (props: any) => { + return ( +
    +
    0%
    + +
    25%
    + +
    50%
    + +
    75%
    + +
    100%
    + +
    Multiple bars
    + + + + + + + +
    + ); +}; + +const Example87 = (props: any) => { + return ( +
    + + + + + +
    + ); +}; + +const Example88 = (props: any) => { + return ( +
    + 25% + 1/2 + You're almost there! + You did it! + + Meh + Wow! + Cool + 20% + !! + +
    + ); +}; + +const Example89 = (props: any) => { + return ( +
    + + + + + + + + + + + +
    + ); +}; + +const Example90 = (props: any) => { + return ( +
    + + + + + + + + + + + +
    + ); +}; + +const Example91 = (props: any) => { + return ( +
    +
    Plain
    + + + + + + + +
    With Labels
    + + Meh + Wow! + 25% + LOOK OUT!! + +
    Stripes and Animations
    + + Stripes + Animated Stripes + Plain + +
    + ); +}; + +const Example92 = (props: any) => { + return ( +
    +
    1 of 5
    + +
    50 of 135
    + +
    75 of 111
    + +
    463 of 500
    + + +
    Various (40) of 55
    + + 5 + 15 + 10 + 10 + +
    + ); +}; + + +//--------------- Table +class Example93 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #First NameLast NameUsername
    1MarkOtto@mdo
    2JacobThornton@fat
    3Larrythe Bird@twitter
    + ); + } +} + +class Example94 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #First NameLast NameUsername
    1MarkOtto@mdo
    2JacobThornton@fat
    3Larrythe Bird@twitter
    + ); + } +} + +class Example95 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #First NameLast NameUsername
    1MarkOtto@mdo
    2JacobThornton@fat
    3Larrythe Bird@twitter
    + ); + } +} + +class Example96 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #First NameLast NameUsername
    1MarkOtto@mdo
    2JacobThornton@fat
    3Larrythe Bird@twitter
    + ); + } +} + +class Example97 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #First NameLast NameUsername
    1MarkOtto@mdo
    2JacobThornton@fat
    3Larrythe Bird@twitter
    + ); + } +} + +class Example98 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #First NameLast NameUsername
    1MarkOtto@mdo
    2JacobThornton@fat
    3Larrythe Bird@twitter
    + ); + } +} + +class Example99 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #Table headingTable headingTable headingTable headingTable headingTable heading
    1Table cellTable cellTable cellTable cellTable cellTable cell
    2Table cellTable cellTable cellTable cellTable cellTable cell
    3Table cellTable cellTable cellTable cellTable cellTable cell
    + ); + } +} + +class Example100 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #Table headingTable headingTable headingTable headingTable headingTable heading
    1Table cellTable cellTable cellTable cellTable cellTable cell
    2Table cellTable cellTable cellTable cellTable cellTable cell
    3Table cellTable cellTable cellTable cellTable cellTable cell
    + ); + } +} + +class Example101 extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + activeTab: '1' + }; + } + + toggle(tab: string) { + if (this.state.activeTab !== tab) { + this.setState({ + activeTab: tab + }); + } + } + render() { + return ( +
    + + + + + +

    Tab 1 Contents

    + +
    +
    + + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + + +
    +
    + ); + } +} + + +class Example102 extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + tooltipOpen: false + }; + } + + toggle() { + this.setState({ + tooltipOpen: !this.state.tooltipOpen + }); + } + + render() { + return ( +
    +

    Somewhere in here is a tooltip.

    + + Hello world! + +
    + ); + } +} + + +class Example103 extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + tooltipOpen: false + }; + } + + toggle() { + this.setState({ + tooltipOpen: !this.state.tooltipOpen + }); + } + + render() { + return ( +
    +

    Sometimes you need to allow users to select text within a tooltip.

    + + Try to select this text! + +
    + ); + } +} + +class TooltipItem extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + tooltipOpen: false + }; + } + + toggle() { + this.setState({ + tooltipOpen: !this.state.tooltipOpen + }); + } + + render() { + return ( + + + + Tooltip Content! + + + ); + } +} + +class TooltipExampleMulti extends React.Component { + constructor(props: any) { + super(props); + + this.state = { + tooltips: [ + { + placement: 'top', + text: 'Top' + }, + { + placement: 'bottom', + text: 'Bottom' + }, + { + placement: 'left', + text: 'Left' + }, + { + placement: 'right', + text: 'Right' + } + ] + }; + } + + render() { + return ( +
    + {this.state.tooltips.map((tooltip: {placement: string; text: string; }, i: number) => { + return ; + })} +
    + ); + } +} + +function Example() { + return ( +
    +

    Somewhere in here is a tooltip.

    + + Hello world! + +
    + ); +} diff --git a/types/reactstrap/tsconfig.json b/types/reactstrap/tsconfig.json new file mode 100644 index 0000000000..593d60e0ec --- /dev/null +++ b/types/reactstrap/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "jsx": "react", + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "reactstrap-tests.tsx" + ] +} \ No newline at end of file diff --git a/stamplay-js-sdk/tslint.json b/types/reactstrap/tslint.json similarity index 100% rename from stamplay-js-sdk/tslint.json rename to types/reactstrap/tslint.json diff --git a/read/index.d.ts b/types/read/index.d.ts similarity index 100% rename from read/index.d.ts rename to types/read/index.d.ts diff --git a/read/read-tests.ts b/types/read/read-tests.ts similarity index 100% rename from read/read-tests.ts rename to types/read/read-tests.ts diff --git a/read/tsconfig.json b/types/read/tsconfig.json similarity index 100% rename from read/tsconfig.json rename to types/read/tsconfig.json diff --git a/readdir-stream/index.d.ts b/types/readdir-stream/index.d.ts similarity index 100% rename from readdir-stream/index.d.ts rename to types/readdir-stream/index.d.ts diff --git a/readdir-stream/readdir-stream-tests.ts b/types/readdir-stream/readdir-stream-tests.ts similarity index 100% rename from readdir-stream/readdir-stream-tests.ts rename to types/readdir-stream/readdir-stream-tests.ts diff --git a/readdir-stream/tsconfig.json b/types/readdir-stream/tsconfig.json similarity index 100% rename from readdir-stream/tsconfig.json rename to types/readdir-stream/tsconfig.json diff --git a/readline-sync/index.d.ts b/types/readline-sync/index.d.ts similarity index 100% rename from readline-sync/index.d.ts rename to types/readline-sync/index.d.ts diff --git a/readline-sync/readline-sync-tests.ts b/types/readline-sync/readline-sync-tests.ts similarity index 100% rename from readline-sync/readline-sync-tests.ts rename to types/readline-sync/readline-sync-tests.ts diff --git a/readline-sync/tsconfig.json b/types/readline-sync/tsconfig.json similarity index 100% rename from readline-sync/tsconfig.json rename to types/readline-sync/tsconfig.json diff --git a/redux-actions/tslint.json b/types/readline-sync/tslint.json similarity index 100% rename from redux-actions/tslint.json rename to types/readline-sync/tslint.json diff --git a/realm/index.d.ts b/types/realm/index.d.ts similarity index 100% rename from realm/index.d.ts rename to types/realm/index.d.ts diff --git a/realm/react-native/index.d.ts b/types/realm/react-native/index.d.ts similarity index 100% rename from realm/react-native/index.d.ts rename to types/realm/react-native/index.d.ts diff --git a/realm/realm-tests.ts b/types/realm/realm-tests.ts similarity index 100% rename from realm/realm-tests.ts rename to types/realm/realm-tests.ts diff --git a/realm/tsconfig.json b/types/realm/tsconfig.json similarity index 100% rename from realm/tsconfig.json rename to types/realm/tsconfig.json diff --git a/redux-batched-actions/tslint.json b/types/realm/tslint.json similarity index 100% rename from redux-batched-actions/tslint.json rename to types/realm/tslint.json diff --git a/rebass/index.d.ts b/types/rebass/index.d.ts similarity index 100% rename from rebass/index.d.ts rename to types/rebass/index.d.ts diff --git a/rebass/rebass-tests.tsx b/types/rebass/rebass-tests.tsx similarity index 100% rename from rebass/rebass-tests.tsx rename to types/rebass/rebass-tests.tsx diff --git a/rebass/tsconfig.json b/types/rebass/tsconfig.json similarity index 100% rename from rebass/tsconfig.json rename to types/rebass/tsconfig.json diff --git a/recaptcha/index.d.ts b/types/recaptcha/index.d.ts similarity index 100% rename from recaptcha/index.d.ts rename to types/recaptcha/index.d.ts diff --git a/recaptcha/recaptcha-tests.ts b/types/recaptcha/recaptcha-tests.ts similarity index 100% rename from recaptcha/recaptcha-tests.ts rename to types/recaptcha/recaptcha-tests.ts diff --git a/recaptcha/tsconfig.json b/types/recaptcha/tsconfig.json similarity index 100% rename from recaptcha/tsconfig.json rename to types/recaptcha/tsconfig.json diff --git a/recompose/index.d.ts b/types/recompose/index.d.ts similarity index 98% rename from recompose/index.d.ts rename to types/recompose/index.d.ts index 3ff504fab3..6cef47160e 100644 --- a/recompose/index.d.ts +++ b/types/recompose/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Recompose v0.20.3 +// Type definitions for Recompose v0.22.0 // Project: https://github.com/acdlite/recompose // Definitions by: Iskander Sierra // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -50,8 +50,9 @@ declare module 'recompose' { type HandleCreators = { [handlerName: string]: mapper; }; + type HandleCreatorsFactory = (initialProps: TOutter) => HandleCreators; export function withHandlers( - handlerCreators: HandleCreators + handlerCreators: HandleCreators | HandleCreatorsFactory ): ComponentEnhancer; // defaultProps: https://github.com/acdlite/recompose/blob/master/docs/API.md#defaultprops diff --git a/recompose/recompose-tests.tsx b/types/recompose/recompose-tests.tsx similarity index 96% rename from recompose/recompose-tests.tsx rename to types/recompose/recompose-tests.tsx index c4c66b3e2c..01bd1d28f5 100644 --- a/recompose/recompose-tests.tsx +++ b/types/recompose/recompose-tests.tsx @@ -73,6 +73,12 @@ function testWithHandlers() { onSubmit: (props: OutterProps) => (e: any) => {}, }); const enhanced: React.ComponentClass = enhancer(innerComponent); + + const enhancer2 = withHandlers((props: OutterProps) => ({ + onChange: (props: OutterProps) => (e: any) => {}, + onSubmit: (props: OutterProps) => (e: any) => {}, + })); + const enhanced2: React.ComponentClass = enhancer2(innerComponent); } function testDefaultProps() { diff --git a/recompose/tsconfig.json b/types/recompose/tsconfig.json similarity index 100% rename from recompose/tsconfig.json rename to types/recompose/tsconfig.json diff --git a/recursive-readdir/index.d.ts b/types/recursive-readdir/index.d.ts similarity index 100% rename from recursive-readdir/index.d.ts rename to types/recursive-readdir/index.d.ts diff --git a/recursive-readdir/recursive-readdir-tests.ts b/types/recursive-readdir/recursive-readdir-tests.ts similarity index 100% rename from recursive-readdir/recursive-readdir-tests.ts rename to types/recursive-readdir/recursive-readdir-tests.ts diff --git a/recursive-readdir/tsconfig.json b/types/recursive-readdir/tsconfig.json similarity index 100% rename from recursive-readdir/tsconfig.json rename to types/recursive-readdir/tsconfig.json diff --git a/redis-rate-limiter/index.d.ts b/types/redis-rate-limiter/index.d.ts similarity index 100% rename from redis-rate-limiter/index.d.ts rename to types/redis-rate-limiter/index.d.ts diff --git a/redis-rate-limiter/redis-rate-limiter-tests.ts b/types/redis-rate-limiter/redis-rate-limiter-tests.ts similarity index 100% rename from redis-rate-limiter/redis-rate-limiter-tests.ts rename to types/redis-rate-limiter/redis-rate-limiter-tests.ts diff --git a/redis-rate-limiter/tsconfig.json b/types/redis-rate-limiter/tsconfig.json similarity index 100% rename from redis-rate-limiter/tsconfig.json rename to types/redis-rate-limiter/tsconfig.json diff --git a/redis-scripto/index.d.ts b/types/redis-scripto/index.d.ts similarity index 100% rename from redis-scripto/index.d.ts rename to types/redis-scripto/index.d.ts diff --git a/redis-scripto/redis-scripto-tests.ts b/types/redis-scripto/redis-scripto-tests.ts similarity index 100% rename from redis-scripto/redis-scripto-tests.ts rename to types/redis-scripto/redis-scripto-tests.ts diff --git a/redis-scripto/tsconfig.json b/types/redis-scripto/tsconfig.json similarity index 100% rename from redis-scripto/tsconfig.json rename to types/redis-scripto/tsconfig.json diff --git a/redis/index.d.ts b/types/redis/index.d.ts similarity index 100% rename from redis/index.d.ts rename to types/redis/index.d.ts diff --git a/redis/redis-tests.ts b/types/redis/redis-tests.ts similarity index 100% rename from redis/redis-tests.ts rename to types/redis/redis-tests.ts diff --git a/redis/tsconfig.json b/types/redis/tsconfig.json similarity index 100% rename from redis/tsconfig.json rename to types/redis/tsconfig.json diff --git a/redlock/index.d.ts b/types/redlock/index.d.ts similarity index 100% rename from redlock/index.d.ts rename to types/redlock/index.d.ts diff --git a/redlock/redlock-tests.ts b/types/redlock/redlock-tests.ts similarity index 100% rename from redlock/redlock-tests.ts rename to types/redlock/redlock-tests.ts diff --git a/redlock/tsconfig.json b/types/redlock/tsconfig.json similarity index 100% rename from redlock/tsconfig.json rename to types/redlock/tsconfig.json diff --git a/reduce-reducers/index.d.ts b/types/reduce-reducers/index.d.ts similarity index 100% rename from reduce-reducers/index.d.ts rename to types/reduce-reducers/index.d.ts diff --git a/reduce-reducers/package.json b/types/reduce-reducers/package.json similarity index 100% rename from reduce-reducers/package.json rename to types/reduce-reducers/package.json diff --git a/reduce-reducers/reduce-reducers-tests.ts b/types/reduce-reducers/reduce-reducers-tests.ts similarity index 100% rename from reduce-reducers/reduce-reducers-tests.ts rename to types/reduce-reducers/reduce-reducers-tests.ts diff --git a/reduce-reducers/tsconfig.json b/types/reduce-reducers/tsconfig.json similarity index 100% rename from reduce-reducers/tsconfig.json rename to types/reduce-reducers/tsconfig.json diff --git a/redux-localstorage-debounce/tslint.json b/types/reduce-reducers/tslint.json similarity index 100% rename from redux-localstorage-debounce/tslint.json rename to types/reduce-reducers/tslint.json diff --git a/redux-action-utils/index.d.ts b/types/redux-action-utils/index.d.ts similarity index 100% rename from redux-action-utils/index.d.ts rename to types/redux-action-utils/index.d.ts diff --git a/redux-action-utils/package.json b/types/redux-action-utils/package.json similarity index 100% rename from redux-action-utils/package.json rename to types/redux-action-utils/package.json diff --git a/redux-action-utils/redux-action-utils-tests.ts b/types/redux-action-utils/redux-action-utils-tests.ts similarity index 100% rename from redux-action-utils/redux-action-utils-tests.ts rename to types/redux-action-utils/redux-action-utils-tests.ts diff --git a/redux-action-utils/tsconfig.json b/types/redux-action-utils/tsconfig.json similarity index 100% rename from redux-action-utils/tsconfig.json rename to types/redux-action-utils/tsconfig.json diff --git a/types/redux-action/index.d.ts b/types/redux-action/index.d.ts new file mode 100644 index 0000000000..eff19178e9 --- /dev/null +++ b/types/redux-action/index.d.ts @@ -0,0 +1,93 @@ +// Type definitions for redux-action 1.2 +// Project: https://github.com/coderhaoxin/redux-action +// Definitions by: newraina +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * inspired by @types/redux-actions, thanks. + */ + +import * as Redux from 'redux'; + +export as namespace ReduxAction; + +interface BaseAction { + type: string; +} + +interface Action extends BaseAction { + payload: Payload; +} + +interface MetaAction extends Action { + meta: Meta; +} + +type ThunkAction = (dispatch: Redux.Dispatch, getState: () => any) => Promise>; +type ThunkMetaAction = (dispatch: Redux.Dispatch, getState: () => any) => Promise>; + +/** argument inferring borrowed from redux-actions definitions */ +type ActionFunction0 = () => R; +type ActionFunction1 = (t1: T1) => R; +type ActionFunction2 = (t1: T1, t2: T2) => R; +type ActionFunction3 = (t1: T1, t2: T2, t3: T3) => R; +type ActionFunctionAny = (...args: any[]) => R; + +type ReducerHandler = (payload: any, state?: State, action?: A) => S; + +interface ReducerHandlers { + [type: string]: ReducerHandler; +} + +export function createAction( + type: string, + payloadCreator: ActionFunctionAny | Payload>, +): ActionFunctionAny>; + +export function createAction( + payloadCreator: ActionFunctionAny | Payload>, +): ActionFunctionAny>; + +export function createAction( + payloadCreator: ActionFunction1 | Payload>, +): ActionFunction1>; + +export function createAction( + payloadCreator: ActionFunction2 | Payload>, +): ActionFunction2>; + +export function createAction( + payloadCreator: ActionFunction3 | Payload>, +): ActionFunction3>; + +export function createAction( + type: string, + payloadCreator: ActionFunctionAny | Payload>, + metaCreator: ActionFunctionAny +): ActionFunctionAny>; + +export function createAction( + payloadCreator: ActionFunctionAny | Payload>, + metaCreator: ActionFunctionAny +): ActionFunctionAny>; + +export function createAction( + type?: string, +): ActionFunction1>; + +export function createAction( + type?: string, +): ActionFunction1>; + +export function createSyncAction( + type: string, + payloadCreator?: ActionFunctionAny, +): ActionFunctionAny>; + +export function createSyncAction( + type: string, + payloadCreator: ActionFunctionAny, + metaCreator: ActionFunctionAny +): ActionFunctionAny>; + +export function createReducer(defaultState: State, handlers: ReducerHandlers): Redux.Reducer; diff --git a/types/redux-action/package.json b/types/redux-action/package.json new file mode 100644 index 0000000000..973078f95d --- /dev/null +++ b/types/redux-action/package.json @@ -0,0 +1,6 @@ +{ + "dependencies": { + "redux": "^3.6.0", + "redux-thunk": "^2.2.0" + } +} diff --git a/types/redux-action/redux-action-tests.ts b/types/redux-action/redux-action-tests.ts new file mode 100644 index 0000000000..cad92bba34 --- /dev/null +++ b/types/redux-action/redux-action-tests.ts @@ -0,0 +1,84 @@ + +import * as ReduxAction from 'redux-action'; +import * as ReduxThunk from 'redux-thunk'; +import * as Redux from 'redux'; + +interface Payload { + name: string; + id: number; +} + +const dispatch: Redux.Dispatch = (...args: any[]): any => { }; + +const actionCreator0 = ReduxAction.createAction('get items'); + +dispatch(actionCreator0(1)) + .then(action => { + const type: string = action.type; + const payload: Payload = action.payload; + }); + +const actionCreator1 = ReduxAction.createAction(); + +dispatch(actionCreator1(1)) + .then(action => { + const type: string = action.type; + const payload: Payload = action.payload; + }); + +const actionCreator2 = ReduxAction.createAction('get items', (name: string) => name); + +dispatch(actionCreator2(1)) + .then(action => { + const type: string = action.type; + const payload: string = action.payload; + }); + +const actionCreator3 = ReduxAction.createAction('get items', (name: string) => Promise.resolve(name)); + +dispatch(actionCreator3(1)) + .then(action => { + const type: string = action.type; + const payload: string = action.payload; + }); + +const actionCreator4 = ReduxAction.createAction((name: string) => name); + +dispatch(actionCreator4(1)) + .then(action => { + const type: string = action.type; + const payload: string = action.payload; + }); + +const actionCreator5 = ReduxAction.createAction((name: string) => 1); + +dispatch(actionCreator5('items')) + .then(action => { + const type: string = action.type; + const payload: number = action.payload; + }); + +const actionCreator6 = ReduxAction.createAction((name: string) => 1); + +dispatch(actionCreator6('items', false)) + .then(action => { + const type: string = action.type; + const payload: number = action.payload; + }); + +const syncActionCreator0 = ReduxAction.createSyncAction('get items'); +const syncAction0: ReduxAction.Action = dispatch(syncActionCreator0(1)); + +const syncActionCreator1 = ReduxAction.createSyncAction('get items', (name: string) => name); +const syncAction1: ReduxAction.Action = dispatch(syncActionCreator1(1)); + +interface State { + name: string; +} +const reducer = ReduxAction.createReducer({ name: 'name' }, { + 'get items': () => { + return 'new name'; + } +}); + +const combinedReducer: Redux.Reducer = Redux.combineReducers({ reducer }); diff --git a/localforage/tsconfig.json b/types/redux-action/tsconfig.json similarity index 85% rename from localforage/tsconfig.json rename to types/redux-action/tsconfig.json index 1e3cbf9e63..0acc89b041 100644 --- a/localforage/tsconfig.json +++ b/types/redux-action/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "localforage-tests.ts" + "redux-action-tests.ts" ] -} \ No newline at end of file +} diff --git a/redux-localstorage-filter/tslint.json b/types/redux-action/tslint.json similarity index 100% rename from redux-localstorage-filter/tslint.json rename to types/redux-action/tslint.json diff --git a/redux-actions/index.d.ts b/types/redux-actions/index.d.ts similarity index 100% rename from redux-actions/index.d.ts rename to types/redux-actions/index.d.ts diff --git a/redux-actions/redux-actions-tests.ts b/types/redux-actions/redux-actions-tests.ts similarity index 100% rename from redux-actions/redux-actions-tests.ts rename to types/redux-actions/redux-actions-tests.ts diff --git a/redux-actions/tsconfig.json b/types/redux-actions/tsconfig.json similarity index 100% rename from redux-actions/tsconfig.json rename to types/redux-actions/tsconfig.json diff --git a/redux-ui/tslint.json b/types/redux-actions/tslint.json similarity index 100% rename from redux-ui/tslint.json rename to types/redux-actions/tslint.json diff --git a/types/redux-auth-wrapper/index.d.ts b/types/redux-auth-wrapper/index.d.ts new file mode 100644 index 0000000000..ffde27da52 --- /dev/null +++ b/types/redux-auth-wrapper/index.d.ts @@ -0,0 +1,33 @@ +// Type definitions for redux-auth-wrapper 1.0 +// Project: https://github.com/mjrussell/redux-auth-wrapper +// Definitions by: Karol Janyst +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +import { ComponentClass, StatelessComponent, ReactType } from "react"; +import { Action } from "redux"; +import { Location } from "history"; + +type ComponentConstructor

    = ComponentClass

    | StatelessComponent

    ; + +interface InjectedProps { + authData?: AuthData; +} + +export interface AuthWrapperConfig { + allowRedirectBack?: boolean | ((location: Location, redirectPath: string) => boolean); + authenticatingSelector?: (state: State, ownProps?: Props) => boolean; + authSelector: (state: State, ownProps?: Props) => AuthData; + FailureComponent?: ReactType; + failureRedirectPath?: string | ((state: State, ownProps?: Props) => string); + LoadingComponent?: ReactType; + redirectQueryParamName?: string; + wrapperDisplayName?: string; + predicate?: (authData: AuthData) => boolean; + propMapper?: (ownProps: Props) => InjectedProps & Props; + redirectAction?: (...args: any[]) => Action; +} + +type AuthDecorator = (component: ComponentConstructor) => ComponentClass; + +export function UserAuthWrapper(config: AuthWrapperConfig): AuthDecorator; diff --git a/redux-bootstrap/package.json b/types/redux-auth-wrapper/package.json similarity index 100% rename from redux-bootstrap/package.json rename to types/redux-auth-wrapper/package.json diff --git a/types/redux-auth-wrapper/redux-auth-wrapper-tests.tsx b/types/redux-auth-wrapper/redux-auth-wrapper-tests.tsx new file mode 100644 index 0000000000..a6d363dc06 --- /dev/null +++ b/types/redux-auth-wrapper/redux-auth-wrapper-tests.tsx @@ -0,0 +1,28 @@ +import * as React from "react"; +import { StatelessComponent } from "react"; +import { UserAuthWrapper } from "redux-auth-wrapper"; + +const Auth = UserAuthWrapper({ + allowRedirectBack: true, + authenticatingSelector(state: any) { + return state.auth.loading + }, + authSelector(state: any) { + return state.auth + }, + FailureComponent: () => (

    ), + failureRedirectPath: "/401", + LoadingComponent: () => (
    ), + redirectAction: () => ({ type : "redirect" }), + redirectQueryParamName: "next", + predicate(authData: any) { + return authData.authorized + }, + wrapperDisplayName: "TestAuth" +}); + +export const TestAuthComponent: StatelessComponent = () => { + return (
    ); +}; + +const TestAuth = Auth(TestAuthComponent); diff --git a/qajax/tsconfig.json b/types/redux-auth-wrapper/tsconfig.json similarity index 56% rename from qajax/tsconfig.json rename to types/redux-auth-wrapper/tsconfig.json index 17bb7d92b2..5aae706c27 100644 --- a/qajax/tsconfig.json +++ b/types/redux-auth-wrapper/tsconfig.json @@ -7,20 +7,20 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", - "typeRoots": [ - "../" - ], + "typeRoots": ["../"], "paths": { - "q": [ "q/v0" ] + "history": ["history/v3"], + "history/*": ["history/v3/*"] }, "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "jsx": "react" }, "files": [ "index.d.ts", - "qajax-tests.ts" + "redux-auth-wrapper-tests.tsx" ] -} \ No newline at end of file +} diff --git a/restify-plugins/tslint.json b/types/redux-auth-wrapper/tslint.json similarity index 100% rename from restify-plugins/tslint.json rename to types/redux-auth-wrapper/tslint.json diff --git a/redux-batched-actions/index.d.ts b/types/redux-batched-actions/index.d.ts similarity index 100% rename from redux-batched-actions/index.d.ts rename to types/redux-batched-actions/index.d.ts diff --git a/redux-batched-actions/package.json b/types/redux-batched-actions/package.json similarity index 100% rename from redux-batched-actions/package.json rename to types/redux-batched-actions/package.json diff --git a/redux-batched-actions/redux-batched-actions-tests.ts b/types/redux-batched-actions/redux-batched-actions-tests.ts similarity index 100% rename from redux-batched-actions/redux-batched-actions-tests.ts rename to types/redux-batched-actions/redux-batched-actions-tests.ts diff --git a/redux-batched-actions/tsconfig.json b/types/redux-batched-actions/tsconfig.json similarity index 100% rename from redux-batched-actions/tsconfig.json rename to types/redux-batched-actions/tsconfig.json diff --git a/revalidate/tslint.json b/types/redux-batched-actions/tslint.json similarity index 100% rename from revalidate/tslint.json rename to types/redux-batched-actions/tslint.json diff --git a/redux-bootstrap/index.d.ts b/types/redux-bootstrap/index.d.ts similarity index 100% rename from redux-bootstrap/index.d.ts rename to types/redux-bootstrap/index.d.ts diff --git a/redux-persist-transform-compress/package.json b/types/redux-bootstrap/package.json similarity index 100% rename from redux-persist-transform-compress/package.json rename to types/redux-bootstrap/package.json diff --git a/redux-bootstrap/redux-bootstrap-tests.tsx b/types/redux-bootstrap/redux-bootstrap-tests.tsx similarity index 100% rename from redux-bootstrap/redux-bootstrap-tests.tsx rename to types/redux-bootstrap/redux-bootstrap-tests.tsx diff --git a/redux-bootstrap/tsconfig.json b/types/redux-bootstrap/tsconfig.json similarity index 100% rename from redux-bootstrap/tsconfig.json rename to types/redux-bootstrap/tsconfig.json diff --git a/redux-debounced/index.d.ts b/types/redux-debounced/index.d.ts similarity index 100% rename from redux-debounced/index.d.ts rename to types/redux-debounced/index.d.ts diff --git a/redux-debounced/package.json b/types/redux-debounced/package.json similarity index 100% rename from redux-debounced/package.json rename to types/redux-debounced/package.json diff --git a/redux-debounced/redux-debounced-tests.ts b/types/redux-debounced/redux-debounced-tests.ts similarity index 100% rename from redux-debounced/redux-debounced-tests.ts rename to types/redux-debounced/redux-debounced-tests.ts diff --git a/redux-debounced/tsconfig.json b/types/redux-debounced/tsconfig.json similarity index 100% rename from redux-debounced/tsconfig.json rename to types/redux-debounced/tsconfig.json diff --git a/redux-devtools-dock-monitor/index.d.ts b/types/redux-devtools-dock-monitor/index.d.ts similarity index 100% rename from redux-devtools-dock-monitor/index.d.ts rename to types/redux-devtools-dock-monitor/index.d.ts diff --git a/redux-devtools-dock-monitor/redux-devtools-dock-monitor-tests.tsx b/types/redux-devtools-dock-monitor/redux-devtools-dock-monitor-tests.tsx similarity index 100% rename from redux-devtools-dock-monitor/redux-devtools-dock-monitor-tests.tsx rename to types/redux-devtools-dock-monitor/redux-devtools-dock-monitor-tests.tsx diff --git a/redux-devtools-dock-monitor/tsconfig.json b/types/redux-devtools-dock-monitor/tsconfig.json similarity index 100% rename from redux-devtools-dock-monitor/tsconfig.json rename to types/redux-devtools-dock-monitor/tsconfig.json diff --git a/redux-devtools-log-monitor/index.d.ts b/types/redux-devtools-log-monitor/index.d.ts similarity index 100% rename from redux-devtools-log-monitor/index.d.ts rename to types/redux-devtools-log-monitor/index.d.ts diff --git a/redux-devtools-log-monitor/redux-devtools-log-monitor-tests.tsx b/types/redux-devtools-log-monitor/redux-devtools-log-monitor-tests.tsx similarity index 100% rename from redux-devtools-log-monitor/redux-devtools-log-monitor-tests.tsx rename to types/redux-devtools-log-monitor/redux-devtools-log-monitor-tests.tsx diff --git a/redux-devtools-log-monitor/tsconfig.json b/types/redux-devtools-log-monitor/tsconfig.json similarity index 100% rename from redux-devtools-log-monitor/tsconfig.json rename to types/redux-devtools-log-monitor/tsconfig.json diff --git a/redux-devtools/index.d.ts b/types/redux-devtools/index.d.ts similarity index 100% rename from redux-devtools/index.d.ts rename to types/redux-devtools/index.d.ts diff --git a/redux-devtools/package.json b/types/redux-devtools/package.json similarity index 100% rename from redux-devtools/package.json rename to types/redux-devtools/package.json diff --git a/redux-devtools/redux-devtools-tests.tsx b/types/redux-devtools/redux-devtools-tests.tsx similarity index 100% rename from redux-devtools/redux-devtools-tests.tsx rename to types/redux-devtools/redux-devtools-tests.tsx diff --git a/redux-devtools/tsconfig.json b/types/redux-devtools/tsconfig.json similarity index 100% rename from redux-devtools/tsconfig.json rename to types/redux-devtools/tsconfig.json diff --git a/redux-form/index.d.ts b/types/redux-form/index.d.ts similarity index 100% rename from redux-form/index.d.ts rename to types/redux-form/index.d.ts diff --git a/redux-form/lib/Field.d.ts b/types/redux-form/lib/Field.d.ts similarity index 100% rename from redux-form/lib/Field.d.ts rename to types/redux-form/lib/Field.d.ts diff --git a/redux-form/lib/FieldArray.d.ts b/types/redux-form/lib/FieldArray.d.ts similarity index 100% rename from redux-form/lib/FieldArray.d.ts rename to types/redux-form/lib/FieldArray.d.ts diff --git a/redux-form/lib/Fields.d.ts b/types/redux-form/lib/Fields.d.ts similarity index 100% rename from redux-form/lib/Fields.d.ts rename to types/redux-form/lib/Fields.d.ts diff --git a/redux-form/lib/FormSection.d.ts b/types/redux-form/lib/FormSection.d.ts similarity index 100% rename from redux-form/lib/FormSection.d.ts rename to types/redux-form/lib/FormSection.d.ts diff --git a/redux-form/lib/actions.d.ts b/types/redux-form/lib/actions.d.ts similarity index 100% rename from redux-form/lib/actions.d.ts rename to types/redux-form/lib/actions.d.ts diff --git a/redux-form/lib/reducer.d.ts b/types/redux-form/lib/reducer.d.ts similarity index 100% rename from redux-form/lib/reducer.d.ts rename to types/redux-form/lib/reducer.d.ts diff --git a/redux-form/lib/reduxForm.d.ts b/types/redux-form/lib/reduxForm.d.ts similarity index 100% rename from redux-form/lib/reduxForm.d.ts rename to types/redux-form/lib/reduxForm.d.ts diff --git a/redux-form/lib/selectors.d.ts b/types/redux-form/lib/selectors.d.ts similarity index 100% rename from redux-form/lib/selectors.d.ts rename to types/redux-form/lib/selectors.d.ts diff --git a/redux-form/package.json b/types/redux-form/package.json similarity index 100% rename from redux-form/package.json rename to types/redux-form/package.json diff --git a/redux-form/redux-form-tests.tsx b/types/redux-form/redux-form-tests.tsx similarity index 100% rename from redux-form/redux-form-tests.tsx rename to types/redux-form/redux-form-tests.tsx diff --git a/redux-form/tsconfig.json b/types/redux-form/tsconfig.json similarity index 100% rename from redux-form/tsconfig.json rename to types/redux-form/tsconfig.json diff --git a/redux-form/v4/index.d.ts b/types/redux-form/v4/index.d.ts similarity index 100% rename from redux-form/v4/index.d.ts rename to types/redux-form/v4/index.d.ts diff --git a/redux-form/v4/redux-form-tests.tsx b/types/redux-form/v4/redux-form-tests.tsx similarity index 100% rename from redux-form/v4/redux-form-tests.tsx rename to types/redux-form/v4/redux-form-tests.tsx diff --git a/redux-form/v4/tsconfig.json b/types/redux-form/v4/tsconfig.json similarity index 100% rename from redux-form/v4/tsconfig.json rename to types/redux-form/v4/tsconfig.json diff --git a/redux-immutable-state-invariant/index.d.ts b/types/redux-immutable-state-invariant/index.d.ts similarity index 100% rename from redux-immutable-state-invariant/index.d.ts rename to types/redux-immutable-state-invariant/index.d.ts diff --git a/redux-immutable-state-invariant/package.json b/types/redux-immutable-state-invariant/package.json similarity index 100% rename from redux-immutable-state-invariant/package.json rename to types/redux-immutable-state-invariant/package.json diff --git a/redux-immutable-state-invariant/redux-immutable-state-invariant-tests.ts b/types/redux-immutable-state-invariant/redux-immutable-state-invariant-tests.ts similarity index 100% rename from redux-immutable-state-invariant/redux-immutable-state-invariant-tests.ts rename to types/redux-immutable-state-invariant/redux-immutable-state-invariant-tests.ts diff --git a/redux-immutable-state-invariant/tsconfig.json b/types/redux-immutable-state-invariant/tsconfig.json similarity index 100% rename from redux-immutable-state-invariant/tsconfig.json rename to types/redux-immutable-state-invariant/tsconfig.json diff --git a/redux-immutable/index.d.ts b/types/redux-immutable/index.d.ts similarity index 100% rename from redux-immutable/index.d.ts rename to types/redux-immutable/index.d.ts diff --git a/redux-immutable/package.json b/types/redux-immutable/package.json similarity index 100% rename from redux-immutable/package.json rename to types/redux-immutable/package.json diff --git a/redux-immutable/redux-immutable-tests.ts b/types/redux-immutable/redux-immutable-tests.ts similarity index 100% rename from redux-immutable/redux-immutable-tests.ts rename to types/redux-immutable/redux-immutable-tests.ts diff --git a/redux-immutable/tsconfig.json b/types/redux-immutable/tsconfig.json similarity index 100% rename from redux-immutable/tsconfig.json rename to types/redux-immutable/tsconfig.json diff --git a/redux-localstorage-debounce/index.d.ts b/types/redux-localstorage-debounce/index.d.ts similarity index 100% rename from redux-localstorage-debounce/index.d.ts rename to types/redux-localstorage-debounce/index.d.ts diff --git a/redux-localstorage-debounce/package.json b/types/redux-localstorage-debounce/package.json similarity index 100% rename from redux-localstorage-debounce/package.json rename to types/redux-localstorage-debounce/package.json diff --git a/redux-localstorage-debounce/redux-localstorage-debounce-tests.ts b/types/redux-localstorage-debounce/redux-localstorage-debounce-tests.ts similarity index 100% rename from redux-localstorage-debounce/redux-localstorage-debounce-tests.ts rename to types/redux-localstorage-debounce/redux-localstorage-debounce-tests.ts diff --git a/redux-localstorage-debounce/tsconfig.json b/types/redux-localstorage-debounce/tsconfig.json similarity index 100% rename from redux-localstorage-debounce/tsconfig.json rename to types/redux-localstorage-debounce/tsconfig.json diff --git a/route-parser/tslint.json b/types/redux-localstorage-debounce/tslint.json similarity index 100% rename from route-parser/tslint.json rename to types/redux-localstorage-debounce/tslint.json diff --git a/redux-localstorage-filter/index.d.ts b/types/redux-localstorage-filter/index.d.ts similarity index 100% rename from redux-localstorage-filter/index.d.ts rename to types/redux-localstorage-filter/index.d.ts diff --git a/redux-localstorage-filter/package.json b/types/redux-localstorage-filter/package.json similarity index 100% rename from redux-localstorage-filter/package.json rename to types/redux-localstorage-filter/package.json diff --git a/redux-localstorage-filter/redux-localstorage-filter-tests.ts b/types/redux-localstorage-filter/redux-localstorage-filter-tests.ts similarity index 100% rename from redux-localstorage-filter/redux-localstorage-filter-tests.ts rename to types/redux-localstorage-filter/redux-localstorage-filter-tests.ts diff --git a/redux-localstorage-filter/tsconfig.json b/types/redux-localstorage-filter/tsconfig.json similarity index 100% rename from redux-localstorage-filter/tsconfig.json rename to types/redux-localstorage-filter/tsconfig.json diff --git a/rrule/tslint.json b/types/redux-localstorage-filter/tslint.json similarity index 100% rename from rrule/tslint.json rename to types/redux-localstorage-filter/tslint.json diff --git a/redux-localstorage/index.d.ts b/types/redux-localstorage/index.d.ts similarity index 100% rename from redux-localstorage/index.d.ts rename to types/redux-localstorage/index.d.ts diff --git a/redux-localstorage/lib/adapters/AsyncStorage.d.ts b/types/redux-localstorage/lib/adapters/AsyncStorage.d.ts similarity index 100% rename from redux-localstorage/lib/adapters/AsyncStorage.d.ts rename to types/redux-localstorage/lib/adapters/AsyncStorage.d.ts diff --git a/redux-localstorage/lib/adapters/localStorage.d.ts b/types/redux-localstorage/lib/adapters/localStorage.d.ts similarity index 100% rename from redux-localstorage/lib/adapters/localStorage.d.ts rename to types/redux-localstorage/lib/adapters/localStorage.d.ts diff --git a/redux-localstorage/lib/adapters/sessionStorage.d.ts b/types/redux-localstorage/lib/adapters/sessionStorage.d.ts similarity index 100% rename from redux-localstorage/lib/adapters/sessionStorage.d.ts rename to types/redux-localstorage/lib/adapters/sessionStorage.d.ts diff --git a/redux-localstorage/package.json b/types/redux-localstorage/package.json similarity index 100% rename from redux-localstorage/package.json rename to types/redux-localstorage/package.json diff --git a/redux-localstorage/redux-localstorage-tests.ts b/types/redux-localstorage/redux-localstorage-tests.ts similarity index 100% rename from redux-localstorage/redux-localstorage-tests.ts rename to types/redux-localstorage/redux-localstorage-tests.ts diff --git a/redux-localstorage/tsconfig.json b/types/redux-localstorage/tsconfig.json similarity index 100% rename from redux-localstorage/tsconfig.json rename to types/redux-localstorage/tsconfig.json diff --git a/redux-localstorage/tslint.json b/types/redux-localstorage/tslint.json similarity index 100% rename from redux-localstorage/tslint.json rename to types/redux-localstorage/tslint.json diff --git a/types/redux-logger/index.d.ts b/types/redux-logger/index.d.ts new file mode 100644 index 0000000000..becaf79c29 --- /dev/null +++ b/types/redux-logger/index.d.ts @@ -0,0 +1,51 @@ +// Type definitions for redux-logger v2.10.1 +// Project: https://github.com/fcomb/redux-logger +// Definitions by: Alexander Rusakov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export as namespace ReduxLogger; + +import * as Redux from "redux"; + +export const logger: Redux.Middleware; + +export type LoggerPredicate = (getState: () => any, action: any) => boolean; + +export type StateToString = (state: any) => string; +export type ActionToString = (action: any) => string; +export type ErrorToString = (error: any, prevState: any) => string; + +export interface ColorsObject { + title?: boolean | ActionToString; + prevState?: boolean | StateToString; + action?: boolean | ActionToString; + nextState?: boolean | StateToString; + error?: boolean | ErrorToString; +} + +export interface LevelObject { + prevState?: string | boolean | StateToString; + action?: string | boolean | ActionToString; + nextState?: string | boolean | StateToString; + error?: string | boolean | ErrorToString; +} + +export interface ReduxLoggerOptions { + level?: string | ActionToString | LevelObject; + duration?: boolean; + timestamp?: boolean; + colors?: ColorsObject; + logger?: any; + logErrors?: boolean; + collapsed?: boolean | LoggerPredicate; + predicate?: LoggerPredicate; + stateTransformer?: (state: any) => any; + actionTransformer?: (action: any) => any; + errorTransformer?: (error: any) => any; + diff?: boolean; + diffPredicate?: LoggerPredicate; +} + +declare function createLogger(options?: ReduxLoggerOptions): Redux.Middleware; + +export default createLogger; diff --git a/redux-logger/package.json b/types/redux-logger/package.json similarity index 100% rename from redux-logger/package.json rename to types/redux-logger/package.json diff --git a/redux-logger/redux-logger-tests.ts b/types/redux-logger/redux-logger-tests.ts similarity index 94% rename from redux-logger/redux-logger-tests.ts rename to types/redux-logger/redux-logger-tests.ts index 34c2938276..b2ccaa4432 100644 --- a/redux-logger/redux-logger-tests.ts +++ b/types/redux-logger/redux-logger-tests.ts @@ -1,8 +1,9 @@ -import * as createLogger from 'redux-logger'; +import createLogger from 'redux-logger'; +import {logger} from 'redux-logger'; import { applyMiddleware, createStore } from 'redux' -let logger = createLogger(); +let loggerSimple = createLogger(); let loggerSimpleOpts = createLogger({ duration: true, diff --git a/redux-logger/tsconfig.json b/types/redux-logger/tsconfig.json similarity index 100% rename from redux-logger/tsconfig.json rename to types/redux-logger/tsconfig.json diff --git a/redux-mock-store/index.d.ts b/types/redux-mock-store/index.d.ts similarity index 100% rename from redux-mock-store/index.d.ts rename to types/redux-mock-store/index.d.ts diff --git a/redux-mock-store/package.json b/types/redux-mock-store/package.json similarity index 100% rename from redux-mock-store/package.json rename to types/redux-mock-store/package.json diff --git a/redux-mock-store/redux-mock-store-tests.ts b/types/redux-mock-store/redux-mock-store-tests.ts similarity index 100% rename from redux-mock-store/redux-mock-store-tests.ts rename to types/redux-mock-store/redux-mock-store-tests.ts diff --git a/redux-mock-store/tsconfig.json b/types/redux-mock-store/tsconfig.json similarity index 100% rename from redux-mock-store/tsconfig.json rename to types/redux-mock-store/tsconfig.json diff --git a/redux-optimistic-ui/index.d.ts b/types/redux-optimistic-ui/index.d.ts similarity index 100% rename from redux-optimistic-ui/index.d.ts rename to types/redux-optimistic-ui/index.d.ts diff --git a/redux-optimistic-ui/package.json b/types/redux-optimistic-ui/package.json similarity index 100% rename from redux-optimistic-ui/package.json rename to types/redux-optimistic-ui/package.json diff --git a/redux-optimistic-ui/redux-optimistic-ui-tests.ts b/types/redux-optimistic-ui/redux-optimistic-ui-tests.ts similarity index 100% rename from redux-optimistic-ui/redux-optimistic-ui-tests.ts rename to types/redux-optimistic-ui/redux-optimistic-ui-tests.ts diff --git a/redux-optimistic-ui/tsconfig.json b/types/redux-optimistic-ui/tsconfig.json similarity index 100% rename from redux-optimistic-ui/tsconfig.json rename to types/redux-optimistic-ui/tsconfig.json diff --git a/types/redux-persist-transform-encrypt/async.d.ts b/types/redux-persist-transform-encrypt/async.d.ts new file mode 100644 index 0000000000..68bcb6c3b8 --- /dev/null +++ b/types/redux-persist-transform-encrypt/async.d.ts @@ -0,0 +1,3 @@ +import createAsyncEncryptor from "redux-persist-transform-encrypt"; + +export default createAsyncEncryptor; diff --git a/types/redux-persist-transform-encrypt/index.d.ts b/types/redux-persist-transform-encrypt/index.d.ts new file mode 100644 index 0000000000..a3d5dc1750 --- /dev/null +++ b/types/redux-persist-transform-encrypt/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for redux-persist-transform-encrypt 1.0 +// Project: https://github.com/maxdeviant/redux-persist-transform-encrypt +// Definitions by: Karol Janyst +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Transform } from "redux-persist"; + +export interface EncryptorConfig { + secretKey: string; +} + +export default function createEncryptor(config: EncryptorConfig): Transform; diff --git a/types/redux-persist-transform-encrypt/package.json b/types/redux-persist-transform-encrypt/package.json new file mode 100644 index 0000000000..b6f251687a --- /dev/null +++ b/types/redux-persist-transform-encrypt/package.json @@ -0,0 +1,6 @@ +{ + "dependencies": { + "redux": "^3.6.0", + "redux-persist": "^4.5.0" + } +} diff --git a/types/redux-persist-transform-encrypt/redux-persist-transform-encrypt-tests.ts b/types/redux-persist-transform-encrypt/redux-persist-transform-encrypt-tests.ts new file mode 100644 index 0000000000..76dc7985bd --- /dev/null +++ b/types/redux-persist-transform-encrypt/redux-persist-transform-encrypt-tests.ts @@ -0,0 +1,15 @@ +import { createStore, Reducer, Store } from "redux" +import { createPersistor, Transform } from "redux-persist" +import { EncryptorConfig } from "redux-persist-transform-encrypt" +import createEncryptor from "redux-persist-transform-encrypt" +import createAsyncEncryptor from "redux-persist-transform-encrypt/async" + +const reducer: Reducer = (state: any, action: any) => ({ state, action }) + +const config: EncryptorConfig = { secretKey : "foo" } +const encryptor: Transform = createEncryptor(config) +const asyncEncryptor: Transform = createAsyncEncryptor(config) + +const store: Store = createStore(reducer) + +createPersistor(store, { transforms : [encryptor, asyncEncryptor] }) diff --git a/types/redux-persist-transform-encrypt/tsconfig.json b/types/redux-persist-transform-encrypt/tsconfig.json new file mode 100644 index 0000000000..e101982e56 --- /dev/null +++ b/types/redux-persist-transform-encrypt/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "noUnusedParameters": true, + "noUnusedLocals": true + }, + "files": [ + "async.d.ts", + "index.d.ts", + "redux-persist-transform-encrypt-tests.ts" + ] +} diff --git a/tedious-connection-pool/tslint.json b/types/redux-persist-transform-encrypt/tslint.json similarity index 100% rename from tedious-connection-pool/tslint.json rename to types/redux-persist-transform-encrypt/tslint.json diff --git a/redux-persist-transform-filter/index.d.ts b/types/redux-persist-transform-filter/index.d.ts similarity index 57% rename from redux-persist-transform-filter/index.d.ts rename to types/redux-persist-transform-filter/index.d.ts index 19e7779bbd..9619c07df7 100644 --- a/redux-persist-transform-filter/index.d.ts +++ b/types/redux-persist-transform-filter/index.d.ts @@ -3,6 +3,6 @@ // Definitions by: Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -import { PersistTransformer } from "redux-persist"; +import { Transform } from "redux-persist"; -export default function createFilter (reducerName: string, inboundPaths?: string[], outboundPaths?: string[]): PersistTransformer; +export default function createFilter(reducerName: string, inboundPaths?: string[], outboundPaths?: string[]): Transform; diff --git a/types/redux-persist-transform-filter/package.json b/types/redux-persist-transform-filter/package.json new file mode 100644 index 0000000000..b6f251687a --- /dev/null +++ b/types/redux-persist-transform-filter/package.json @@ -0,0 +1,6 @@ +{ + "dependencies": { + "redux": "^3.6.0", + "redux-persist": "^4.5.0" + } +} diff --git a/types/redux-persist-transform-filter/redux-persist-transform-filter-tests.ts b/types/redux-persist-transform-filter/redux-persist-transform-filter-tests.ts new file mode 100644 index 0000000000..737e4a70a7 --- /dev/null +++ b/types/redux-persist-transform-filter/redux-persist-transform-filter-tests.ts @@ -0,0 +1,15 @@ +import { createStore, Reducer, Store } from "redux" +import { createPersistor, Transform } from "redux-persist" +import createFilter from "redux-persist-transform-filter" + +const reducer: Reducer = (state: any, action: any) => ({ state, action }) + +const filter: Transform = createFilter( + "foo", + ["foo.bar"], + ["fizz.buzz"] +) + +const store: Store = createStore(reducer) + +createPersistor(store, { transforms : [filter] }) diff --git a/types/redux-persist-transform-filter/tsconfig.json b/types/redux-persist-transform-filter/tsconfig.json new file mode 100644 index 0000000000..a8f712550c --- /dev/null +++ b/types/redux-persist-transform-filter/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "noUnusedParameters": true, + "noUnusedLocals": true + }, + "files": [ + "index.d.ts", + "redux-persist-transform-filter-tests.ts" + ] +} diff --git a/types/redux-persist-transform-filter/tslint.json b/types/redux-persist-transform-filter/tslint.json new file mode 100644 index 0000000000..f9e30021f4 --- /dev/null +++ b/types/redux-persist-transform-filter/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} diff --git a/redux-promise-middleware/index.d.ts b/types/redux-promise-middleware/index.d.ts similarity index 100% rename from redux-promise-middleware/index.d.ts rename to types/redux-promise-middleware/index.d.ts diff --git a/redux-persist-transform-encrypt/package.json b/types/redux-promise-middleware/package.json similarity index 100% rename from redux-persist-transform-encrypt/package.json rename to types/redux-promise-middleware/package.json diff --git a/redux-promise-middleware/redux-promise-middleware-tests.ts b/types/redux-promise-middleware/redux-promise-middleware-tests.ts similarity index 100% rename from redux-promise-middleware/redux-promise-middleware-tests.ts rename to types/redux-promise-middleware/redux-promise-middleware-tests.ts diff --git a/redux-promise-middleware/tsconfig.json b/types/redux-promise-middleware/tsconfig.json similarity index 100% rename from redux-promise-middleware/tsconfig.json rename to types/redux-promise-middleware/tsconfig.json diff --git a/redux-promise/index.d.ts b/types/redux-promise/index.d.ts similarity index 100% rename from redux-promise/index.d.ts rename to types/redux-promise/index.d.ts diff --git a/redux-promise/package.json b/types/redux-promise/package.json similarity index 100% rename from redux-promise/package.json rename to types/redux-promise/package.json diff --git a/redux-promise/redux-promise-tests.ts b/types/redux-promise/redux-promise-tests.ts similarity index 100% rename from redux-promise/redux-promise-tests.ts rename to types/redux-promise/redux-promise-tests.ts diff --git a/redux-promise/tsconfig.json b/types/redux-promise/tsconfig.json similarity index 100% rename from redux-promise/tsconfig.json rename to types/redux-promise/tsconfig.json diff --git a/redux-recycle/index.d.ts b/types/redux-recycle/index.d.ts similarity index 100% rename from redux-recycle/index.d.ts rename to types/redux-recycle/index.d.ts diff --git a/redux-recycle/package.json b/types/redux-recycle/package.json similarity index 100% rename from redux-recycle/package.json rename to types/redux-recycle/package.json diff --git a/redux-recycle/redux-recycle-tests.ts b/types/redux-recycle/redux-recycle-tests.ts similarity index 100% rename from redux-recycle/redux-recycle-tests.ts rename to types/redux-recycle/redux-recycle-tests.ts diff --git a/redux-recycle/tsconfig.json b/types/redux-recycle/tsconfig.json similarity index 100% rename from redux-recycle/tsconfig.json rename to types/redux-recycle/tsconfig.json diff --git a/redux-router/index.d.ts b/types/redux-router/index.d.ts similarity index 100% rename from redux-router/index.d.ts rename to types/redux-router/index.d.ts diff --git a/redux-router/lib/ReduxRouter.d.ts b/types/redux-router/lib/ReduxRouter.d.ts similarity index 100% rename from redux-router/lib/ReduxRouter.d.ts rename to types/redux-router/lib/ReduxRouter.d.ts diff --git a/redux-router/lib/actionCreators.d.ts b/types/redux-router/lib/actionCreators.d.ts similarity index 100% rename from redux-router/lib/actionCreators.d.ts rename to types/redux-router/lib/actionCreators.d.ts diff --git a/redux-router/lib/client.d.ts b/types/redux-router/lib/client.d.ts similarity index 100% rename from redux-router/lib/client.d.ts rename to types/redux-router/lib/client.d.ts diff --git a/redux-router/lib/isActive.d.ts b/types/redux-router/lib/isActive.d.ts similarity index 100% rename from redux-router/lib/isActive.d.ts rename to types/redux-router/lib/isActive.d.ts diff --git a/redux-router/lib/routerStateReducer.d.ts b/types/redux-router/lib/routerStateReducer.d.ts similarity index 100% rename from redux-router/lib/routerStateReducer.d.ts rename to types/redux-router/lib/routerStateReducer.d.ts diff --git a/redux-persist-transform-filter/package.json b/types/redux-router/package.json similarity index 100% rename from redux-persist-transform-filter/package.json rename to types/redux-router/package.json diff --git a/redux-router/redux-router-tests.ts b/types/redux-router/redux-router-tests.ts similarity index 100% rename from redux-router/redux-router-tests.ts rename to types/redux-router/redux-router-tests.ts diff --git a/redux-router/tsconfig.json b/types/redux-router/tsconfig.json similarity index 100% rename from redux-router/tsconfig.json rename to types/redux-router/tsconfig.json diff --git a/redux-storage/index.d.ts b/types/redux-storage/index.d.ts similarity index 100% rename from redux-storage/index.d.ts rename to types/redux-storage/index.d.ts diff --git a/redux-storage/package.json b/types/redux-storage/package.json similarity index 100% rename from redux-storage/package.json rename to types/redux-storage/package.json diff --git a/redux-storage/redux-storage-tests.ts b/types/redux-storage/redux-storage-tests.ts similarity index 100% rename from redux-storage/redux-storage-tests.ts rename to types/redux-storage/redux-storage-tests.ts diff --git a/redux-storage/tsconfig.json b/types/redux-storage/tsconfig.json similarity index 100% rename from redux-storage/tsconfig.json rename to types/redux-storage/tsconfig.json diff --git a/redux-ui/index.d.ts b/types/redux-ui/index.d.ts similarity index 100% rename from redux-ui/index.d.ts rename to types/redux-ui/index.d.ts diff --git a/redux-ui/package.json b/types/redux-ui/package.json similarity index 100% rename from redux-ui/package.json rename to types/redux-ui/package.json diff --git a/redux-ui/redux-ui-tests.ts b/types/redux-ui/redux-ui-tests.ts similarity index 100% rename from redux-ui/redux-ui-tests.ts rename to types/redux-ui/redux-ui-tests.ts diff --git a/redux-ui/tsconfig.json b/types/redux-ui/tsconfig.json similarity index 100% rename from redux-ui/tsconfig.json rename to types/redux-ui/tsconfig.json diff --git a/safe-regex/tslint.json b/types/redux-ui/tslint.json similarity index 100% rename from safe-regex/tslint.json rename to types/redux-ui/tslint.json diff --git a/ref-array/index.d.ts b/types/ref-array/index.d.ts similarity index 100% rename from ref-array/index.d.ts rename to types/ref-array/index.d.ts diff --git a/ref-array/tsconfig.json b/types/ref-array/tsconfig.json similarity index 100% rename from ref-array/tsconfig.json rename to types/ref-array/tsconfig.json diff --git a/ref-struct/index.d.ts b/types/ref-struct/index.d.ts similarity index 100% rename from ref-struct/index.d.ts rename to types/ref-struct/index.d.ts diff --git a/ref-struct/tsconfig.json b/types/ref-struct/tsconfig.json similarity index 100% rename from ref-struct/tsconfig.json rename to types/ref-struct/tsconfig.json diff --git a/ref-union/index.d.ts b/types/ref-union/index.d.ts similarity index 100% rename from ref-union/index.d.ts rename to types/ref-union/index.d.ts diff --git a/ref-union/tsconfig.json b/types/ref-union/tsconfig.json similarity index 100% rename from ref-union/tsconfig.json rename to types/ref-union/tsconfig.json diff --git a/ref/index.d.ts b/types/ref/index.d.ts similarity index 100% rename from ref/index.d.ts rename to types/ref/index.d.ts diff --git a/ref/tsconfig.json b/types/ref/tsconfig.json similarity index 100% rename from ref/tsconfig.json rename to types/ref/tsconfig.json diff --git a/reflect-metadata/index.d.ts b/types/reflect-metadata/index.d.ts similarity index 100% rename from reflect-metadata/index.d.ts rename to types/reflect-metadata/index.d.ts diff --git a/reflect-metadata/reflect-metadata-tests.ts b/types/reflect-metadata/reflect-metadata-tests.ts similarity index 100% rename from reflect-metadata/reflect-metadata-tests.ts rename to types/reflect-metadata/reflect-metadata-tests.ts diff --git a/reflect-metadata/tsconfig.json b/types/reflect-metadata/tsconfig.json similarity index 100% rename from reflect-metadata/tsconfig.json rename to types/reflect-metadata/tsconfig.json diff --git a/reflux/index.d.ts b/types/reflux/index.d.ts similarity index 100% rename from reflux/index.d.ts rename to types/reflux/index.d.ts diff --git a/reflux/reflux-tests.ts b/types/reflux/reflux-tests.ts similarity index 100% rename from reflux/reflux-tests.ts rename to types/reflux/reflux-tests.ts diff --git a/reflux/tsconfig.json b/types/reflux/tsconfig.json similarity index 100% rename from reflux/tsconfig.json rename to types/reflux/tsconfig.json diff --git a/reflux/tslint.json b/types/reflux/tslint.json similarity index 100% rename from reflux/tslint.json rename to types/reflux/tslint.json diff --git a/relateurl/index.d.ts b/types/relateurl/index.d.ts similarity index 100% rename from relateurl/index.d.ts rename to types/relateurl/index.d.ts diff --git a/relateurl/relateurl-tests.ts b/types/relateurl/relateurl-tests.ts similarity index 100% rename from relateurl/relateurl-tests.ts rename to types/relateurl/relateurl-tests.ts diff --git a/relateurl/tsconfig.json b/types/relateurl/tsconfig.json similarity index 100% rename from relateurl/tsconfig.json rename to types/relateurl/tsconfig.json diff --git a/remote-redux-devtools/index.d.ts b/types/remote-redux-devtools/index.d.ts similarity index 100% rename from remote-redux-devtools/index.d.ts rename to types/remote-redux-devtools/index.d.ts diff --git a/remote-redux-devtools/remote-redux-devtools-tests.ts b/types/remote-redux-devtools/remote-redux-devtools-tests.ts similarity index 100% rename from remote-redux-devtools/remote-redux-devtools-tests.ts rename to types/remote-redux-devtools/remote-redux-devtools-tests.ts diff --git a/remote-redux-devtools/tsconfig.json b/types/remote-redux-devtools/tsconfig.json similarity index 100% rename from remote-redux-devtools/tsconfig.json rename to types/remote-redux-devtools/tsconfig.json diff --git a/replace-ext/index.d.ts b/types/replace-ext/index.d.ts similarity index 100% rename from replace-ext/index.d.ts rename to types/replace-ext/index.d.ts diff --git a/replace-ext/replace-ext-tests.ts b/types/replace-ext/replace-ext-tests.ts similarity index 100% rename from replace-ext/replace-ext-tests.ts rename to types/replace-ext/replace-ext-tests.ts diff --git a/replace-ext/tsconfig.json b/types/replace-ext/tsconfig.json similarity index 100% rename from replace-ext/tsconfig.json rename to types/replace-ext/tsconfig.json diff --git a/request-ip/index.d.ts b/types/request-ip/index.d.ts similarity index 100% rename from request-ip/index.d.ts rename to types/request-ip/index.d.ts diff --git a/request-ip/request-ip-tests.ts b/types/request-ip/request-ip-tests.ts similarity index 100% rename from request-ip/request-ip-tests.ts rename to types/request-ip/request-ip-tests.ts diff --git a/request-ip/tsconfig.json b/types/request-ip/tsconfig.json similarity index 100% rename from request-ip/tsconfig.json rename to types/request-ip/tsconfig.json diff --git a/request-promise-native/index.d.ts b/types/request-promise-native/index.d.ts similarity index 100% rename from request-promise-native/index.d.ts rename to types/request-promise-native/index.d.ts diff --git a/request-promise-native/request-promise-native-tests.ts b/types/request-promise-native/request-promise-native-tests.ts similarity index 100% rename from request-promise-native/request-promise-native-tests.ts rename to types/request-promise-native/request-promise-native-tests.ts diff --git a/request-promise-native/tsconfig.json b/types/request-promise-native/tsconfig.json similarity index 100% rename from request-promise-native/tsconfig.json rename to types/request-promise-native/tsconfig.json diff --git a/request-promise/index.d.ts b/types/request-promise/index.d.ts similarity index 100% rename from request-promise/index.d.ts rename to types/request-promise/index.d.ts diff --git a/request-promise/request-promise-tests.ts b/types/request-promise/request-promise-tests.ts similarity index 100% rename from request-promise/request-promise-tests.ts rename to types/request-promise/request-promise-tests.ts diff --git a/request-promise/tsconfig.json b/types/request-promise/tsconfig.json similarity index 100% rename from request-promise/tsconfig.json rename to types/request-promise/tsconfig.json diff --git a/request/index.d.ts b/types/request/index.d.ts similarity index 99% rename from request/index.d.ts rename to types/request/index.d.ts index e65c8308d6..41791cf1ad 100644 --- a/request/index.d.ts +++ b/types/request/index.d.ts @@ -56,7 +56,7 @@ declare namespace request { delete(options: TUriUrlOptions & TOptions, callback?: RequestCallback): TRequest; forever(agentOptions: any, optionsArg: any): TRequest; - jar(): CookieJar; + jar(store?: any): CookieJar; cookie(str: string): Cookie; initParams: any; diff --git a/request/request-tests.ts b/types/request/request-tests.ts similarity index 100% rename from request/request-tests.ts rename to types/request/request-tests.ts diff --git a/request/tsconfig.json b/types/request/tsconfig.json similarity index 100% rename from request/tsconfig.json rename to types/request/tsconfig.json diff --git a/requirejs-domready/index.d.ts b/types/requirejs-domready/index.d.ts similarity index 100% rename from requirejs-domready/index.d.ts rename to types/requirejs-domready/index.d.ts diff --git a/requirejs-domready/requirejs-domready-tests.ts b/types/requirejs-domready/requirejs-domready-tests.ts similarity index 100% rename from requirejs-domready/requirejs-domready-tests.ts rename to types/requirejs-domready/requirejs-domready-tests.ts diff --git a/requirejs-domready/tsconfig.json b/types/requirejs-domready/tsconfig.json similarity index 100% rename from requirejs-domready/tsconfig.json rename to types/requirejs-domready/tsconfig.json diff --git a/requirejs/README.md b/types/requirejs/README.md similarity index 100% rename from requirejs/README.md rename to types/requirejs/README.md diff --git a/requirejs/index.d.ts b/types/requirejs/index.d.ts similarity index 100% rename from requirejs/index.d.ts rename to types/requirejs/index.d.ts diff --git a/requirejs/requirejs-tests.ts b/types/requirejs/requirejs-tests.ts similarity index 100% rename from requirejs/requirejs-tests.ts rename to types/requirejs/requirejs-tests.ts diff --git a/requirejs/tsconfig.json b/types/requirejs/tsconfig.json similarity index 100% rename from requirejs/tsconfig.json rename to types/requirejs/tsconfig.json diff --git a/reselect/index.d.ts b/types/reselect/index.d.ts similarity index 100% rename from reselect/index.d.ts rename to types/reselect/index.d.ts diff --git a/reselect/tsconfig.json b/types/reselect/tsconfig.json similarity index 100% rename from reselect/tsconfig.json rename to types/reselect/tsconfig.json diff --git a/resemblejs/index.d.ts b/types/resemblejs/index.d.ts similarity index 100% rename from resemblejs/index.d.ts rename to types/resemblejs/index.d.ts diff --git a/resemblejs/resemblejs-tests.ts b/types/resemblejs/resemblejs-tests.ts similarity index 100% rename from resemblejs/resemblejs-tests.ts rename to types/resemblejs/resemblejs-tests.ts diff --git a/resemblejs/tsconfig.json b/types/resemblejs/tsconfig.json similarity index 100% rename from resemblejs/tsconfig.json rename to types/resemblejs/tsconfig.json diff --git a/resolve-from/index.d.ts b/types/resolve-from/index.d.ts similarity index 100% rename from resolve-from/index.d.ts rename to types/resolve-from/index.d.ts diff --git a/resolve-from/resolve-from-tests.ts b/types/resolve-from/resolve-from-tests.ts similarity index 100% rename from resolve-from/resolve-from-tests.ts rename to types/resolve-from/resolve-from-tests.ts diff --git a/resolve-from/tsconfig.json b/types/resolve-from/tsconfig.json similarity index 100% rename from resolve-from/tsconfig.json rename to types/resolve-from/tsconfig.json diff --git a/resolve/index.d.ts b/types/resolve/index.d.ts similarity index 100% rename from resolve/index.d.ts rename to types/resolve/index.d.ts diff --git a/resolve/resolve-tests.ts b/types/resolve/resolve-tests.ts similarity index 100% rename from resolve/resolve-tests.ts rename to types/resolve/resolve-tests.ts diff --git a/resolve/tsconfig.json b/types/resolve/tsconfig.json similarity index 100% rename from resolve/tsconfig.json rename to types/resolve/tsconfig.json diff --git a/response-time/index.d.ts b/types/response-time/index.d.ts similarity index 100% rename from response-time/index.d.ts rename to types/response-time/index.d.ts diff --git a/response-time/response-time-tests.ts b/types/response-time/response-time-tests.ts similarity index 100% rename from response-time/response-time-tests.ts rename to types/response-time/response-time-tests.ts diff --git a/response-time/tsconfig.json b/types/response-time/tsconfig.json similarity index 100% rename from response-time/tsconfig.json rename to types/response-time/tsconfig.json diff --git a/rest-io/index.d.ts b/types/rest-io/index.d.ts similarity index 100% rename from rest-io/index.d.ts rename to types/rest-io/index.d.ts diff --git a/rest-io/rest-io-tests.ts b/types/rest-io/rest-io-tests.ts similarity index 100% rename from rest-io/rest-io-tests.ts rename to types/rest-io/rest-io-tests.ts diff --git a/rest-io/tsconfig.json b/types/rest-io/tsconfig.json similarity index 100% rename from rest-io/tsconfig.json rename to types/rest-io/tsconfig.json diff --git a/rest/index.d.ts b/types/rest/index.d.ts similarity index 100% rename from rest/index.d.ts rename to types/rest/index.d.ts diff --git a/rest/rest-tests.ts b/types/rest/rest-tests.ts similarity index 100% rename from rest/rest-tests.ts rename to types/rest/rest-tests.ts diff --git a/rest/tsconfig.json b/types/rest/tsconfig.json similarity index 100% rename from rest/tsconfig.json rename to types/rest/tsconfig.json diff --git a/restangular/index.d.ts b/types/restangular/index.d.ts similarity index 100% rename from restangular/index.d.ts rename to types/restangular/index.d.ts diff --git a/restangular/restangular-tests.ts b/types/restangular/restangular-tests.ts similarity index 100% rename from restangular/restangular-tests.ts rename to types/restangular/restangular-tests.ts diff --git a/restangular/tsconfig.json b/types/restangular/tsconfig.json similarity index 100% rename from restangular/tsconfig.json rename to types/restangular/tsconfig.json diff --git a/restful.js/index.d.ts b/types/restful.js/index.d.ts similarity index 100% rename from restful.js/index.d.ts rename to types/restful.js/index.d.ts diff --git a/restful.js/restful.js-tests.ts b/types/restful.js/restful.js-tests.ts similarity index 100% rename from restful.js/restful.js-tests.ts rename to types/restful.js/restful.js-tests.ts diff --git a/restful.js/tsconfig.json b/types/restful.js/tsconfig.json similarity index 100% rename from restful.js/tsconfig.json rename to types/restful.js/tsconfig.json diff --git a/restify-plugins/index.d.ts b/types/restify-plugins/index.d.ts similarity index 100% rename from restify-plugins/index.d.ts rename to types/restify-plugins/index.d.ts diff --git a/restify-plugins/restify-plugins-tests.ts b/types/restify-plugins/restify-plugins-tests.ts similarity index 100% rename from restify-plugins/restify-plugins-tests.ts rename to types/restify-plugins/restify-plugins-tests.ts diff --git a/restify-plugins/tsconfig.json b/types/restify-plugins/tsconfig.json similarity index 100% rename from restify-plugins/tsconfig.json rename to types/restify-plugins/tsconfig.json diff --git a/semver-diff/tslint.json b/types/restify-plugins/tslint.json similarity index 100% rename from semver-diff/tslint.json rename to types/restify-plugins/tslint.json diff --git a/restify/index.d.ts b/types/restify/index.d.ts similarity index 99% rename from restify/index.d.ts rename to types/restify/index.d.ts index 8a85283d93..759a46c6d0 100644 --- a/restify/index.d.ts +++ b/types/restify/index.d.ts @@ -450,8 +450,8 @@ interface Server extends http.Server { interface ServerOptions { ca?: string; - certificate?: string; - key?: string; + certificate?: string | string[] | Buffer | Buffer[]; + key?: string | string[] | Buffer | Buffer[]; formatters?: Object; log?: Object; name?: string; diff --git a/restify/restify-tests.ts b/types/restify/restify-tests.ts similarity index 100% rename from restify/restify-tests.ts rename to types/restify/restify-tests.ts diff --git a/restify/tsconfig.json b/types/restify/tsconfig.json similarity index 100% rename from restify/tsconfig.json rename to types/restify/tsconfig.json diff --git a/restler/index.d.ts b/types/restler/index.d.ts similarity index 100% rename from restler/index.d.ts rename to types/restler/index.d.ts diff --git a/restler/restler-tests.ts b/types/restler/restler-tests.ts similarity index 100% rename from restler/restler-tests.ts rename to types/restler/restler-tests.ts diff --git a/restler/tsconfig.json b/types/restler/tsconfig.json similarity index 100% rename from restler/tsconfig.json rename to types/restler/tsconfig.json diff --git a/resumablejs/index.d.ts b/types/resumablejs/index.d.ts similarity index 100% rename from resumablejs/index.d.ts rename to types/resumablejs/index.d.ts diff --git a/resumablejs/resumablejs-tests.ts b/types/resumablejs/resumablejs-tests.ts similarity index 100% rename from resumablejs/resumablejs-tests.ts rename to types/resumablejs/resumablejs-tests.ts diff --git a/resumablejs/tsconfig.json b/types/resumablejs/tsconfig.json similarity index 100% rename from resumablejs/tsconfig.json rename to types/resumablejs/tsconfig.json diff --git a/rethinkdb/index.d.ts b/types/rethinkdb/index.d.ts similarity index 100% rename from rethinkdb/index.d.ts rename to types/rethinkdb/index.d.ts diff --git a/rethinkdb/rethinkdb-tests.ts b/types/rethinkdb/rethinkdb-tests.ts similarity index 100% rename from rethinkdb/rethinkdb-tests.ts rename to types/rethinkdb/rethinkdb-tests.ts diff --git a/rethinkdb/tsconfig.json b/types/rethinkdb/tsconfig.json similarity index 100% rename from rethinkdb/tsconfig.json rename to types/rethinkdb/tsconfig.json diff --git a/revalidate/index.d.ts b/types/revalidate/index.d.ts similarity index 100% rename from revalidate/index.d.ts rename to types/revalidate/index.d.ts diff --git a/revalidate/revalidate-tests.ts b/types/revalidate/revalidate-tests.ts similarity index 100% rename from revalidate/revalidate-tests.ts rename to types/revalidate/revalidate-tests.ts diff --git a/revalidate/tsconfig.json b/types/revalidate/tsconfig.json similarity index 100% rename from revalidate/tsconfig.json rename to types/revalidate/tsconfig.json diff --git a/session-file-store/tslint.json b/types/revalidate/tslint.json similarity index 100% rename from session-file-store/tslint.json rename to types/revalidate/tslint.json diff --git a/revalidator/index.d.ts b/types/revalidator/index.d.ts similarity index 100% rename from revalidator/index.d.ts rename to types/revalidator/index.d.ts diff --git a/revalidator/revalidator-tests.ts b/types/revalidator/revalidator-tests.ts similarity index 100% rename from revalidator/revalidator-tests.ts rename to types/revalidator/revalidator-tests.ts diff --git a/revalidator/tsconfig.json b/types/revalidator/tsconfig.json similarity index 100% rename from revalidator/tsconfig.json rename to types/revalidator/tsconfig.json diff --git a/reveal/index.d.ts b/types/reveal/index.d.ts similarity index 100% rename from reveal/index.d.ts rename to types/reveal/index.d.ts diff --git a/reveal/reveal-tests.ts b/types/reveal/reveal-tests.ts similarity index 100% rename from reveal/reveal-tests.ts rename to types/reveal/reveal-tests.ts diff --git a/reveal/tsconfig.json b/types/reveal/tsconfig.json similarity index 100% rename from reveal/tsconfig.json rename to types/reveal/tsconfig.json diff --git a/rewire/index.d.ts b/types/rewire/index.d.ts similarity index 100% rename from rewire/index.d.ts rename to types/rewire/index.d.ts diff --git a/rewire/rewire-tests.ts b/types/rewire/rewire-tests.ts similarity index 100% rename from rewire/rewire-tests.ts rename to types/rewire/rewire-tests.ts diff --git a/rewire/tsconfig.json b/types/rewire/tsconfig.json similarity index 100% rename from rewire/tsconfig.json rename to types/rewire/tsconfig.json diff --git a/types/rheostat/index.d.ts b/types/rheostat/index.d.ts new file mode 100644 index 0000000000..372e5c6f1b --- /dev/null +++ b/types/rheostat/index.d.ts @@ -0,0 +1,49 @@ +// Type definitions for rheostat 2.1 +// Project: https://github.com/airbnb/rheostat +// Definitions by: Sasha Bayan , Wil Lee +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +import * as React from 'react'; + +export type Orientation = 'horizontal' | 'vertical'; + +export interface Algorithm { + getPosition(value: number, min: number, max: number): number; + getValue(pos: number, min: number, max: number): number; +} + +export interface PublicState { + max: number; + min: number; + values: number[]; +} + +export interface Events { + onClick?: () => any; + onChange?: (publicState: PublicState) => any; + onKeyPress?: () => any; + onSliderDragEnd?: () => any; + onSliderDragMove?: () => any; + onSliderDragStart?: () => any; + onValuesUpdated?: (publicState: PublicState) => any; +} + +export interface Props extends Events { + algorithm?: Algorithm; + className?: string; + disabled?: boolean; + handle?: React.ReactType; + max?: number; + min?: number; + orientation?: Orientation; + pitComponent?: React.ReactType; + pitPoints?: number[]; + progressBar?: React.ReactType; + snap?: boolean; + snapPoints?: number[]; + values?: number[]; +} + +export default class Rheostat extends React.Component {} + diff --git a/types/rheostat/rheostat-tests.tsx b/types/rheostat/rheostat-tests.tsx new file mode 100644 index 0000000000..1116861943 --- /dev/null +++ b/types/rheostat/rheostat-tests.tsx @@ -0,0 +1,74 @@ +import * as React from 'react'; +import Rheostat, {Orientation, Algorithm, PublicState} from 'rheostat'; + +type Element = React.ReactElement; + +function Basic(props: {}): Element { + return ; +} + +function MultiHandles(props: {}): Element { + return ( + + ); +} + +function CustomAlgorithm(props: {}): Element { + const geometric: Algorithm = { + getPosition(x: number, min: number, max: number) { + return ((max / (max - min)) ** 0.5) * (((x - min) / max) ** 0.5) * 100; + }, + + getValue(x: number, min: number, max: number) { + return (Math.floor(((x / 100) ** 2) * (max - min)) + min); + } + }; + + return ; +} + +function ComponentOverrides(props: {}): Element { + function Bar(props: {}): Element { return
    ; } + return ( + + ); +} + +function Vertical(props: {}): Element { + return ; +} + +function Pits(props: {}): Element { + function Pit(props: {}): Element { return ; } + return ( + + ); +} + +function CustomValues(props: {}): Element { + return ( + + ); +} + +function Handlers(props: {}): Element { + function handler(data: PublicState): void {} + return ( + + ); +} diff --git a/types/rheostat/tsconfig.json b/types/rheostat/tsconfig.json new file mode 100644 index 0000000000..384dce128d --- /dev/null +++ b/types/rheostat/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6", "dom"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "jsx": "react", + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "rheostat-tests.tsx" + ] +} diff --git a/types/rheostat/tslint.json b/types/rheostat/tslint.json new file mode 100644 index 0000000000..ec365f164b --- /dev/null +++ b/types/rheostat/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} diff --git a/rickshaw/index.d.ts b/types/rickshaw/index.d.ts similarity index 100% rename from rickshaw/index.d.ts rename to types/rickshaw/index.d.ts diff --git a/rickshaw/tsconfig.json b/types/rickshaw/tsconfig.json similarity index 100% rename from rickshaw/tsconfig.json rename to types/rickshaw/tsconfig.json diff --git a/rimraf/index.d.ts b/types/rimraf/index.d.ts similarity index 100% rename from rimraf/index.d.ts rename to types/rimraf/index.d.ts diff --git a/rimraf/rimraf-tests.ts b/types/rimraf/rimraf-tests.ts similarity index 100% rename from rimraf/rimraf-tests.ts rename to types/rimraf/rimraf-tests.ts diff --git a/rimraf/tsconfig.json b/types/rimraf/tsconfig.json similarity index 100% rename from rimraf/tsconfig.json rename to types/rimraf/tsconfig.json diff --git a/riot-api-nodejs/index.d.ts b/types/riot-api-nodejs/index.d.ts similarity index 100% rename from riot-api-nodejs/index.d.ts rename to types/riot-api-nodejs/index.d.ts diff --git a/riot-api-nodejs/riot-api-nodejs-tests.ts b/types/riot-api-nodejs/riot-api-nodejs-tests.ts similarity index 100% rename from riot-api-nodejs/riot-api-nodejs-tests.ts rename to types/riot-api-nodejs/riot-api-nodejs-tests.ts diff --git a/riot-api-nodejs/tsconfig.json b/types/riot-api-nodejs/tsconfig.json similarity index 100% rename from riot-api-nodejs/tsconfig.json rename to types/riot-api-nodejs/tsconfig.json diff --git a/riot-games-api/index.d.ts b/types/riot-games-api/index.d.ts similarity index 100% rename from riot-games-api/index.d.ts rename to types/riot-games-api/index.d.ts diff --git a/riot-games-api/riot-games-api-tests.ts b/types/riot-games-api/riot-games-api-tests.ts similarity index 100% rename from riot-games-api/riot-games-api-tests.ts rename to types/riot-games-api/riot-games-api-tests.ts diff --git a/riot-games-api/tsconfig.json b/types/riot-games-api/tsconfig.json similarity index 100% rename from riot-games-api/tsconfig.json rename to types/riot-games-api/tsconfig.json diff --git a/riot/index.d.ts b/types/riot/index.d.ts similarity index 100% rename from riot/index.d.ts rename to types/riot/index.d.ts diff --git a/riot/riot-tests.ts b/types/riot/riot-tests.ts similarity index 100% rename from riot/riot-tests.ts rename to types/riot/riot-tests.ts diff --git a/riot/tsconfig.json b/types/riot/tsconfig.json similarity index 100% rename from riot/tsconfig.json rename to types/riot/tsconfig.json diff --git a/riotcontrol/index.d.ts b/types/riotcontrol/index.d.ts similarity index 100% rename from riotcontrol/index.d.ts rename to types/riotcontrol/index.d.ts diff --git a/riotcontrol/riotcontrol-tests.ts b/types/riotcontrol/riotcontrol-tests.ts similarity index 100% rename from riotcontrol/riotcontrol-tests.ts rename to types/riotcontrol/riotcontrol-tests.ts diff --git a/riotcontrol/tsconfig.json b/types/riotcontrol/tsconfig.json similarity index 100% rename from riotcontrol/tsconfig.json rename to types/riotcontrol/tsconfig.json diff --git a/riotjs/index.d.ts b/types/riotjs/index.d.ts similarity index 100% rename from riotjs/index.d.ts rename to types/riotjs/index.d.ts diff --git a/riotjs/riotjs-render.d.ts b/types/riotjs/riotjs-render.d.ts similarity index 100% rename from riotjs/riotjs-render.d.ts rename to types/riotjs/riotjs-render.d.ts diff --git a/riotjs/riotjs-tests.ts b/types/riotjs/riotjs-tests.ts similarity index 100% rename from riotjs/riotjs-tests.ts rename to types/riotjs/riotjs-tests.ts diff --git a/riotjs/tsconfig.json b/types/riotjs/tsconfig.json similarity index 100% rename from riotjs/tsconfig.json rename to types/riotjs/tsconfig.json diff --git a/rison/index.d.ts b/types/rison/index.d.ts similarity index 100% rename from rison/index.d.ts rename to types/rison/index.d.ts diff --git a/rison/rison-tests.ts b/types/rison/rison-tests.ts similarity index 100% rename from rison/rison-tests.ts rename to types/rison/rison-tests.ts diff --git a/rison/tsconfig.json b/types/rison/tsconfig.json similarity index 100% rename from rison/tsconfig.json rename to types/rison/tsconfig.json diff --git a/rivets/index.d.ts b/types/rivets/index.d.ts similarity index 100% rename from rivets/index.d.ts rename to types/rivets/index.d.ts diff --git a/rivets/rivets-tests.ts b/types/rivets/rivets-tests.ts similarity index 100% rename from rivets/rivets-tests.ts rename to types/rivets/rivets-tests.ts diff --git a/rivets/tsconfig.json b/types/rivets/tsconfig.json similarity index 100% rename from rivets/tsconfig.json rename to types/rivets/tsconfig.json diff --git a/rosie/index.d.ts b/types/rosie/index.d.ts similarity index 100% rename from rosie/index.d.ts rename to types/rosie/index.d.ts diff --git a/rosie/rosie-tests.ts b/types/rosie/rosie-tests.ts similarity index 100% rename from rosie/rosie-tests.ts rename to types/rosie/rosie-tests.ts diff --git a/rosie/tsconfig.json b/types/rosie/tsconfig.json similarity index 100% rename from rosie/tsconfig.json rename to types/rosie/tsconfig.json diff --git a/roslib/index.d.ts b/types/roslib/index.d.ts similarity index 100% rename from roslib/index.d.ts rename to types/roslib/index.d.ts diff --git a/roslib/roslib-tests.ts b/types/roslib/roslib-tests.ts similarity index 100% rename from roslib/roslib-tests.ts rename to types/roslib/roslib-tests.ts diff --git a/roslib/tsconfig.json b/types/roslib/tsconfig.json similarity index 100% rename from roslib/tsconfig.json rename to types/roslib/tsconfig.json diff --git a/route-parser/index.d.ts b/types/route-parser/index.d.ts similarity index 100% rename from route-parser/index.d.ts rename to types/route-parser/index.d.ts diff --git a/route-parser/route-parser-tests.ts b/types/route-parser/route-parser-tests.ts similarity index 100% rename from route-parser/route-parser-tests.ts rename to types/route-parser/route-parser-tests.ts diff --git a/route-parser/tsconfig.json b/types/route-parser/tsconfig.json similarity index 100% rename from route-parser/tsconfig.json rename to types/route-parser/tsconfig.json diff --git a/sha1/tslint.json b/types/route-parser/tslint.json similarity index 100% rename from sha1/tslint.json rename to types/route-parser/tslint.json diff --git a/route-recognizer/index.d.ts b/types/route-recognizer/index.d.ts similarity index 100% rename from route-recognizer/index.d.ts rename to types/route-recognizer/index.d.ts diff --git a/route-recognizer/route-recognizer-tests.ts b/types/route-recognizer/route-recognizer-tests.ts similarity index 100% rename from route-recognizer/route-recognizer-tests.ts rename to types/route-recognizer/route-recognizer-tests.ts diff --git a/route-recognizer/tsconfig.json b/types/route-recognizer/tsconfig.json similarity index 100% rename from route-recognizer/tsconfig.json rename to types/route-recognizer/tsconfig.json diff --git a/router5/index.d.ts b/types/router5/index.d.ts similarity index 100% rename from router5/index.d.ts rename to types/router5/index.d.ts diff --git a/router5/router5-tests.ts b/types/router5/router5-tests.ts similarity index 100% rename from router5/router5-tests.ts rename to types/router5/router5-tests.ts diff --git a/router5/tsconfig.json b/types/router5/tsconfig.json similarity index 100% rename from router5/tsconfig.json rename to types/router5/tsconfig.json diff --git a/routie/index.d.ts b/types/routie/index.d.ts similarity index 100% rename from routie/index.d.ts rename to types/routie/index.d.ts diff --git a/routie/routie-tests.ts b/types/routie/routie-tests.ts similarity index 100% rename from routie/routie-tests.ts rename to types/routie/routie-tests.ts diff --git a/routie/tsconfig.json b/types/routie/tsconfig.json similarity index 100% rename from routie/tsconfig.json rename to types/routie/tsconfig.json diff --git a/royalslider/index.d.ts b/types/royalslider/index.d.ts similarity index 100% rename from royalslider/index.d.ts rename to types/royalslider/index.d.ts diff --git a/royalslider/royalslider-tests.ts b/types/royalslider/royalslider-tests.ts similarity index 100% rename from royalslider/royalslider-tests.ts rename to types/royalslider/royalslider-tests.ts diff --git a/royalslider/tsconfig.json b/types/royalslider/tsconfig.json similarity index 100% rename from royalslider/tsconfig.json rename to types/royalslider/tsconfig.json diff --git a/rpio/index.d.ts b/types/rpio/index.d.ts similarity index 100% rename from rpio/index.d.ts rename to types/rpio/index.d.ts diff --git a/rpio/rpio-tests.ts b/types/rpio/rpio-tests.ts similarity index 100% rename from rpio/rpio-tests.ts rename to types/rpio/rpio-tests.ts diff --git a/rpio/tsconfig.json b/types/rpio/tsconfig.json similarity index 100% rename from rpio/tsconfig.json rename to types/rpio/tsconfig.json diff --git a/rrule/index.d.ts b/types/rrule/index.d.ts similarity index 100% rename from rrule/index.d.ts rename to types/rrule/index.d.ts diff --git a/rrule/test/commonJs.ts b/types/rrule/test/commonJs.ts similarity index 100% rename from rrule/test/commonJs.ts rename to types/rrule/test/commonJs.ts diff --git a/rrule/test/global.ts b/types/rrule/test/global.ts similarity index 100% rename from rrule/test/global.ts rename to types/rrule/test/global.ts diff --git a/rrule/test/rrule.ts b/types/rrule/test/rrule.ts similarity index 100% rename from rrule/test/rrule.ts rename to types/rrule/test/rrule.ts diff --git a/rrule/tsconfig.json b/types/rrule/tsconfig.json similarity index 100% rename from rrule/tsconfig.json rename to types/rrule/tsconfig.json diff --git a/sharp/tslint.json b/types/rrule/tslint.json similarity index 100% rename from sharp/tslint.json rename to types/rrule/tslint.json diff --git a/rsmq-worker/index.d.ts b/types/rsmq-worker/index.d.ts similarity index 100% rename from rsmq-worker/index.d.ts rename to types/rsmq-worker/index.d.ts diff --git a/rsmq-worker/rsmq-worker-tests.ts b/types/rsmq-worker/rsmq-worker-tests.ts similarity index 100% rename from rsmq-worker/rsmq-worker-tests.ts rename to types/rsmq-worker/rsmq-worker-tests.ts diff --git a/rsmq-worker/tsconfig.json b/types/rsmq-worker/tsconfig.json similarity index 100% rename from rsmq-worker/tsconfig.json rename to types/rsmq-worker/tsconfig.json diff --git a/rsmq/index.d.ts b/types/rsmq/index.d.ts similarity index 100% rename from rsmq/index.d.ts rename to types/rsmq/index.d.ts diff --git a/rsmq/rsmq-tests.ts b/types/rsmq/rsmq-tests.ts similarity index 100% rename from rsmq/rsmq-tests.ts rename to types/rsmq/rsmq-tests.ts diff --git a/rsmq/tsconfig.json b/types/rsmq/tsconfig.json similarity index 100% rename from rsmq/tsconfig.json rename to types/rsmq/tsconfig.json diff --git a/rss/index.d.ts b/types/rss/index.d.ts similarity index 100% rename from rss/index.d.ts rename to types/rss/index.d.ts diff --git a/rss/rss-tests.ts b/types/rss/rss-tests.ts similarity index 100% rename from rss/rss-tests.ts rename to types/rss/rss-tests.ts diff --git a/rss/tsconfig.json b/types/rss/tsconfig.json similarity index 100% rename from rss/tsconfig.json rename to types/rss/tsconfig.json diff --git a/rsvp/index.d.ts b/types/rsvp/index.d.ts similarity index 100% rename from rsvp/index.d.ts rename to types/rsvp/index.d.ts diff --git a/rsvp/rsvp-tests.ts b/types/rsvp/rsvp-tests.ts similarity index 100% rename from rsvp/rsvp-tests.ts rename to types/rsvp/rsvp-tests.ts diff --git a/rsvp/tsconfig.json b/types/rsvp/tsconfig.json similarity index 100% rename from rsvp/tsconfig.json rename to types/rsvp/tsconfig.json diff --git a/rsync/index.d.ts b/types/rsync/index.d.ts similarity index 100% rename from rsync/index.d.ts rename to types/rsync/index.d.ts diff --git a/rsync/rsync-tests.ts b/types/rsync/rsync-tests.ts similarity index 100% rename from rsync/rsync-tests.ts rename to types/rsync/rsync-tests.ts diff --git a/rsync/tsconfig.json b/types/rsync/tsconfig.json similarity index 100% rename from rsync/tsconfig.json rename to types/rsync/tsconfig.json diff --git a/rtree/index.d.ts b/types/rtree/index.d.ts similarity index 100% rename from rtree/index.d.ts rename to types/rtree/index.d.ts diff --git a/rtree/rtree-tests.ts b/types/rtree/rtree-tests.ts similarity index 100% rename from rtree/rtree-tests.ts rename to types/rtree/rtree-tests.ts diff --git a/rtree/tsconfig.json b/types/rtree/tsconfig.json similarity index 100% rename from rtree/tsconfig.json rename to types/rtree/tsconfig.json diff --git a/run-sequence/index.d.ts b/types/run-sequence/index.d.ts similarity index 100% rename from run-sequence/index.d.ts rename to types/run-sequence/index.d.ts diff --git a/run-sequence/run-sequence-tests.ts b/types/run-sequence/run-sequence-tests.ts similarity index 100% rename from run-sequence/run-sequence-tests.ts rename to types/run-sequence/run-sequence-tests.ts diff --git a/run-sequence/tsconfig.json b/types/run-sequence/tsconfig.json similarity index 100% rename from run-sequence/tsconfig.json rename to types/run-sequence/tsconfig.json diff --git a/rvo2/index.d.ts b/types/rvo2/index.d.ts similarity index 100% rename from rvo2/index.d.ts rename to types/rvo2/index.d.ts diff --git a/rvo2/rvo2-tests.ts b/types/rvo2/rvo2-tests.ts similarity index 100% rename from rvo2/rvo2-tests.ts rename to types/rvo2/rvo2-tests.ts diff --git a/rvo2/tsconfig.json b/types/rvo2/tsconfig.json similarity index 100% rename from rvo2/tsconfig.json rename to types/rvo2/tsconfig.json diff --git a/rx-angular/index.d.ts b/types/rx-angular/index.d.ts similarity index 100% rename from rx-angular/index.d.ts rename to types/rx-angular/index.d.ts diff --git a/rx-angular/rx-angular-tests.ts b/types/rx-angular/rx-angular-tests.ts similarity index 100% rename from rx-angular/rx-angular-tests.ts rename to types/rx-angular/rx-angular-tests.ts diff --git a/rx-angular/tsconfig.json b/types/rx-angular/tsconfig.json similarity index 100% rename from rx-angular/tsconfig.json rename to types/rx-angular/tsconfig.json diff --git a/rx-core-binding/index.d.ts b/types/rx-core-binding/index.d.ts similarity index 100% rename from rx-core-binding/index.d.ts rename to types/rx-core-binding/index.d.ts diff --git a/rx-core-binding/tsconfig.json b/types/rx-core-binding/tsconfig.json similarity index 100% rename from rx-core-binding/tsconfig.json rename to types/rx-core-binding/tsconfig.json diff --git a/rx-core-binding/tslint.json b/types/rx-core-binding/tslint.json similarity index 100% rename from rx-core-binding/tslint.json rename to types/rx-core-binding/tslint.json diff --git a/rx-core/index.d.ts b/types/rx-core/index.d.ts similarity index 100% rename from rx-core/index.d.ts rename to types/rx-core/index.d.ts diff --git a/rx-core/tsconfig.json b/types/rx-core/tsconfig.json similarity index 100% rename from rx-core/tsconfig.json rename to types/rx-core/tsconfig.json diff --git a/rx-core/tslint.json b/types/rx-core/tslint.json similarity index 100% rename from rx-core/tslint.json rename to types/rx-core/tslint.json diff --git a/rx-dom/index.d.ts b/types/rx-dom/index.d.ts similarity index 100% rename from rx-dom/index.d.ts rename to types/rx-dom/index.d.ts diff --git a/rx-dom/rx-dom-tests.ts b/types/rx-dom/rx-dom-tests.ts similarity index 100% rename from rx-dom/rx-dom-tests.ts rename to types/rx-dom/rx-dom-tests.ts diff --git a/rx-dom/tsconfig.json b/types/rx-dom/tsconfig.json similarity index 100% rename from rx-dom/tsconfig.json rename to types/rx-dom/tsconfig.json diff --git a/rx-dom/tslint.json b/types/rx-dom/tslint.json similarity index 100% rename from rx-dom/tslint.json rename to types/rx-dom/tslint.json diff --git a/rx-jquery/index.d.ts b/types/rx-jquery/index.d.ts similarity index 100% rename from rx-jquery/index.d.ts rename to types/rx-jquery/index.d.ts diff --git a/rx-jquery/tsconfig.json b/types/rx-jquery/tsconfig.json similarity index 100% rename from rx-jquery/tsconfig.json rename to types/rx-jquery/tsconfig.json diff --git a/rx-lite-aggregates/index.d.ts b/types/rx-lite-aggregates/index.d.ts similarity index 100% rename from rx-lite-aggregates/index.d.ts rename to types/rx-lite-aggregates/index.d.ts diff --git a/rx-lite-aggregates/tsconfig.json b/types/rx-lite-aggregates/tsconfig.json similarity index 100% rename from rx-lite-aggregates/tsconfig.json rename to types/rx-lite-aggregates/tsconfig.json diff --git a/rx-lite-aggregates/tslint.json b/types/rx-lite-aggregates/tslint.json similarity index 100% rename from rx-lite-aggregates/tslint.json rename to types/rx-lite-aggregates/tslint.json diff --git a/rx-lite-async/index.d.ts b/types/rx-lite-async/index.d.ts similarity index 100% rename from rx-lite-async/index.d.ts rename to types/rx-lite-async/index.d.ts diff --git a/rx-lite-async/rx-lite-async-tests.ts b/types/rx-lite-async/rx-lite-async-tests.ts similarity index 100% rename from rx-lite-async/rx-lite-async-tests.ts rename to types/rx-lite-async/rx-lite-async-tests.ts diff --git a/rx-lite-async/tsconfig.json b/types/rx-lite-async/tsconfig.json similarity index 100% rename from rx-lite-async/tsconfig.json rename to types/rx-lite-async/tsconfig.json diff --git a/rx-lite-async/tslint.json b/types/rx-lite-async/tslint.json similarity index 100% rename from rx-lite-async/tslint.json rename to types/rx-lite-async/tslint.json diff --git a/rx-lite-backpressure/index.d.ts b/types/rx-lite-backpressure/index.d.ts similarity index 100% rename from rx-lite-backpressure/index.d.ts rename to types/rx-lite-backpressure/index.d.ts diff --git a/rx-lite-backpressure/rx-lite-backpressure-tests.ts b/types/rx-lite-backpressure/rx-lite-backpressure-tests.ts similarity index 100% rename from rx-lite-backpressure/rx-lite-backpressure-tests.ts rename to types/rx-lite-backpressure/rx-lite-backpressure-tests.ts diff --git a/rx-lite-backpressure/tsconfig.json b/types/rx-lite-backpressure/tsconfig.json similarity index 100% rename from rx-lite-backpressure/tsconfig.json rename to types/rx-lite-backpressure/tsconfig.json diff --git a/rx-lite-backpressure/tslint.json b/types/rx-lite-backpressure/tslint.json similarity index 100% rename from rx-lite-backpressure/tslint.json rename to types/rx-lite-backpressure/tslint.json diff --git a/rx-lite-coincidence/index.d.ts b/types/rx-lite-coincidence/index.d.ts similarity index 100% rename from rx-lite-coincidence/index.d.ts rename to types/rx-lite-coincidence/index.d.ts diff --git a/rx-lite-coincidence/tsconfig.json b/types/rx-lite-coincidence/tsconfig.json similarity index 100% rename from rx-lite-coincidence/tsconfig.json rename to types/rx-lite-coincidence/tsconfig.json diff --git a/rx-lite-coincidence/tslint.json b/types/rx-lite-coincidence/tslint.json similarity index 100% rename from rx-lite-coincidence/tslint.json rename to types/rx-lite-coincidence/tslint.json diff --git a/rx-lite-experimental/index.d.ts b/types/rx-lite-experimental/index.d.ts similarity index 100% rename from rx-lite-experimental/index.d.ts rename to types/rx-lite-experimental/index.d.ts diff --git a/rx-lite-experimental/tsconfig.json b/types/rx-lite-experimental/tsconfig.json similarity index 100% rename from rx-lite-experimental/tsconfig.json rename to types/rx-lite-experimental/tsconfig.json diff --git a/rx-lite-experimental/tslint.json b/types/rx-lite-experimental/tslint.json similarity index 100% rename from rx-lite-experimental/tslint.json rename to types/rx-lite-experimental/tslint.json diff --git a/rx-lite-joinpatterns/index.d.ts b/types/rx-lite-joinpatterns/index.d.ts similarity index 100% rename from rx-lite-joinpatterns/index.d.ts rename to types/rx-lite-joinpatterns/index.d.ts diff --git a/rx-lite-joinpatterns/tsconfig.json b/types/rx-lite-joinpatterns/tsconfig.json similarity index 100% rename from rx-lite-joinpatterns/tsconfig.json rename to types/rx-lite-joinpatterns/tsconfig.json diff --git a/rx-lite-joinpatterns/tslint.json b/types/rx-lite-joinpatterns/tslint.json similarity index 100% rename from rx-lite-joinpatterns/tslint.json rename to types/rx-lite-joinpatterns/tslint.json diff --git a/rx-lite-testing/index.d.ts b/types/rx-lite-testing/index.d.ts similarity index 100% rename from rx-lite-testing/index.d.ts rename to types/rx-lite-testing/index.d.ts diff --git a/rx-lite-testing/tsconfig.json b/types/rx-lite-testing/tsconfig.json similarity index 100% rename from rx-lite-testing/tsconfig.json rename to types/rx-lite-testing/tsconfig.json diff --git a/rx-lite-testing/tslint.json b/types/rx-lite-testing/tslint.json similarity index 100% rename from rx-lite-testing/tslint.json rename to types/rx-lite-testing/tslint.json diff --git a/rx-lite-time/index.d.ts b/types/rx-lite-time/index.d.ts similarity index 100% rename from rx-lite-time/index.d.ts rename to types/rx-lite-time/index.d.ts diff --git a/rx-lite-time/tsconfig.json b/types/rx-lite-time/tsconfig.json similarity index 100% rename from rx-lite-time/tsconfig.json rename to types/rx-lite-time/tsconfig.json diff --git a/rx-lite-time/tslint.json b/types/rx-lite-time/tslint.json similarity index 100% rename from rx-lite-time/tslint.json rename to types/rx-lite-time/tslint.json diff --git a/rx-lite-virtualtime/index.d.ts b/types/rx-lite-virtualtime/index.d.ts similarity index 100% rename from rx-lite-virtualtime/index.d.ts rename to types/rx-lite-virtualtime/index.d.ts diff --git a/rx-lite-virtualtime/tsconfig.json b/types/rx-lite-virtualtime/tsconfig.json similarity index 100% rename from rx-lite-virtualtime/tsconfig.json rename to types/rx-lite-virtualtime/tsconfig.json diff --git a/rx-lite-virtualtime/tslint.json b/types/rx-lite-virtualtime/tslint.json similarity index 100% rename from rx-lite-virtualtime/tslint.json rename to types/rx-lite-virtualtime/tslint.json diff --git a/rx-lite/index.d.ts b/types/rx-lite/index.d.ts similarity index 100% rename from rx-lite/index.d.ts rename to types/rx-lite/index.d.ts diff --git a/rx-lite/rx-lite-tests.ts b/types/rx-lite/rx-lite-tests.ts similarity index 100% rename from rx-lite/rx-lite-tests.ts rename to types/rx-lite/rx-lite-tests.ts diff --git a/rx-lite/tsconfig.json b/types/rx-lite/tsconfig.json similarity index 100% rename from rx-lite/tsconfig.json rename to types/rx-lite/tsconfig.json diff --git a/rx-lite/tslint.json b/types/rx-lite/tslint.json similarity index 100% rename from rx-lite/tslint.json rename to types/rx-lite/tslint.json diff --git a/rx-node/index.d.ts b/types/rx-node/index.d.ts similarity index 100% rename from rx-node/index.d.ts rename to types/rx-node/index.d.ts diff --git a/rx-node/rx-node-tests.ts b/types/rx-node/rx-node-tests.ts similarity index 100% rename from rx-node/rx-node-tests.ts rename to types/rx-node/rx-node-tests.ts diff --git a/rx-node/tsconfig.json b/types/rx-node/tsconfig.json similarity index 100% rename from rx-node/tsconfig.json rename to types/rx-node/tsconfig.json diff --git a/rx.wamp/index.d.ts b/types/rx.wamp/index.d.ts similarity index 100% rename from rx.wamp/index.d.ts rename to types/rx.wamp/index.d.ts diff --git a/rx.wamp/rx.wamp-tests.ts b/types/rx.wamp/rx.wamp-tests.ts similarity index 100% rename from rx.wamp/rx.wamp-tests.ts rename to types/rx.wamp/rx.wamp-tests.ts diff --git a/rx.wamp/tsconfig.json b/types/rx.wamp/tsconfig.json similarity index 100% rename from rx.wamp/tsconfig.json rename to types/rx.wamp/tsconfig.json diff --git a/rx/index.d.ts b/types/rx/index.d.ts similarity index 100% rename from rx/index.d.ts rename to types/rx/index.d.ts diff --git a/rx/tsconfig.json b/types/rx/tsconfig.json similarity index 100% rename from rx/tsconfig.json rename to types/rx/tsconfig.json diff --git a/rx/tslint.json b/types/rx/tslint.json similarity index 100% rename from rx/tslint.json rename to types/rx/tslint.json diff --git a/s3-upload-stream/index.d.ts b/types/s3-upload-stream/index.d.ts similarity index 100% rename from s3-upload-stream/index.d.ts rename to types/s3-upload-stream/index.d.ts diff --git a/s3-upload-stream/s3-upload-stream-tests.ts b/types/s3-upload-stream/s3-upload-stream-tests.ts similarity index 100% rename from s3-upload-stream/s3-upload-stream-tests.ts rename to types/s3-upload-stream/s3-upload-stream-tests.ts diff --git a/s3-upload-stream/tsconfig.json b/types/s3-upload-stream/tsconfig.json similarity index 100% rename from s3-upload-stream/tsconfig.json rename to types/s3-upload-stream/tsconfig.json diff --git a/s3-uploader/index.d.ts b/types/s3-uploader/index.d.ts similarity index 100% rename from s3-uploader/index.d.ts rename to types/s3-uploader/index.d.ts diff --git a/s3-uploader/s3-uploader-tests.ts b/types/s3-uploader/s3-uploader-tests.ts similarity index 100% rename from s3-uploader/s3-uploader-tests.ts rename to types/s3-uploader/s3-uploader-tests.ts diff --git a/s3-uploader/tsconfig.json b/types/s3-uploader/tsconfig.json similarity index 100% rename from s3-uploader/tsconfig.json rename to types/s3-uploader/tsconfig.json diff --git a/s3rver/index.d.ts b/types/s3rver/index.d.ts similarity index 100% rename from s3rver/index.d.ts rename to types/s3rver/index.d.ts diff --git a/s3rver/s3rver-tests.ts b/types/s3rver/s3rver-tests.ts similarity index 100% rename from s3rver/s3rver-tests.ts rename to types/s3rver/s3rver-tests.ts diff --git a/s3rver/tsconfig.json b/types/s3rver/tsconfig.json similarity index 100% rename from s3rver/tsconfig.json rename to types/s3rver/tsconfig.json diff --git a/safari-extension-content/index.d.ts b/types/safari-extension-content/index.d.ts similarity index 100% rename from safari-extension-content/index.d.ts rename to types/safari-extension-content/index.d.ts diff --git a/safari-extension-content/safari-extension-content-tests.ts b/types/safari-extension-content/safari-extension-content-tests.ts similarity index 100% rename from safari-extension-content/safari-extension-content-tests.ts rename to types/safari-extension-content/safari-extension-content-tests.ts diff --git a/safari-extension-content/tsconfig.json b/types/safari-extension-content/tsconfig.json similarity index 100% rename from safari-extension-content/tsconfig.json rename to types/safari-extension-content/tsconfig.json diff --git a/safari-extension/index.d.ts b/types/safari-extension/index.d.ts similarity index 100% rename from safari-extension/index.d.ts rename to types/safari-extension/index.d.ts diff --git a/safari-extension/safari-extension-tests.ts b/types/safari-extension/safari-extension-tests.ts similarity index 100% rename from safari-extension/safari-extension-tests.ts rename to types/safari-extension/safari-extension-tests.ts diff --git a/safari-extension/tsconfig.json b/types/safari-extension/tsconfig.json similarity index 100% rename from safari-extension/tsconfig.json rename to types/safari-extension/tsconfig.json diff --git a/safe-regex/index.d.ts b/types/safe-regex/index.d.ts similarity index 100% rename from safe-regex/index.d.ts rename to types/safe-regex/index.d.ts diff --git a/safe-regex/safe-regex-tests.ts b/types/safe-regex/safe-regex-tests.ts similarity index 100% rename from safe-regex/safe-regex-tests.ts rename to types/safe-regex/safe-regex-tests.ts diff --git a/safe-regex/tsconfig.json b/types/safe-regex/tsconfig.json similarity index 100% rename from safe-regex/tsconfig.json rename to types/safe-regex/tsconfig.json diff --git a/sheetify/tslint.json b/types/safe-regex/tslint.json similarity index 100% rename from sheetify/tslint.json rename to types/safe-regex/tslint.json diff --git a/sails.io.js/index.d.ts b/types/sails.io.js/index.d.ts similarity index 100% rename from sails.io.js/index.d.ts rename to types/sails.io.js/index.d.ts diff --git a/sails.io.js/sails.io.js-tests.ts b/types/sails.io.js/sails.io.js-tests.ts similarity index 100% rename from sails.io.js/sails.io.js-tests.ts rename to types/sails.io.js/sails.io.js-tests.ts diff --git a/sails.io.js/tsconfig.json b/types/sails.io.js/tsconfig.json similarity index 100% rename from sails.io.js/tsconfig.json rename to types/sails.io.js/tsconfig.json diff --git a/samchon-collection/index.d.ts b/types/samchon-collection/index.d.ts similarity index 100% rename from samchon-collection/index.d.ts rename to types/samchon-collection/index.d.ts diff --git a/samchon-collection/samchon-collection-tests.ts b/types/samchon-collection/samchon-collection-tests.ts similarity index 100% rename from samchon-collection/samchon-collection-tests.ts rename to types/samchon-collection/samchon-collection-tests.ts diff --git a/samchon-collection/tsconfig.json b/types/samchon-collection/tsconfig.json similarity index 100% rename from samchon-collection/tsconfig.json rename to types/samchon-collection/tsconfig.json diff --git a/samchon-framework/index.d.ts b/types/samchon-framework/index.d.ts similarity index 100% rename from samchon-framework/index.d.ts rename to types/samchon-framework/index.d.ts diff --git a/samchon-framework/samchon-framework-tests.ts b/types/samchon-framework/samchon-framework-tests.ts similarity index 100% rename from samchon-framework/samchon-framework-tests.ts rename to types/samchon-framework/samchon-framework-tests.ts diff --git a/samchon-framework/tsconfig.json b/types/samchon-framework/tsconfig.json similarity index 100% rename from samchon-framework/tsconfig.json rename to types/samchon-framework/tsconfig.json diff --git a/samchon-library/index.d.ts b/types/samchon-library/index.d.ts similarity index 100% rename from samchon-library/index.d.ts rename to types/samchon-library/index.d.ts diff --git a/samchon-library/samchon-library-tests.ts b/types/samchon-library/samchon-library-tests.ts similarity index 100% rename from samchon-library/samchon-library-tests.ts rename to types/samchon-library/samchon-library-tests.ts diff --git a/samchon-library/tsconfig.json b/types/samchon-library/tsconfig.json similarity index 100% rename from samchon-library/tsconfig.json rename to types/samchon-library/tsconfig.json diff --git a/samchon/index.d.ts b/types/samchon/index.d.ts similarity index 100% rename from samchon/index.d.ts rename to types/samchon/index.d.ts diff --git a/samchon/samchon-tests.ts b/types/samchon/samchon-tests.ts similarity index 100% rename from samchon/samchon-tests.ts rename to types/samchon/samchon-tests.ts diff --git a/samchon/tsconfig.json b/types/samchon/tsconfig.json similarity index 100% rename from samchon/tsconfig.json rename to types/samchon/tsconfig.json diff --git a/saml2-js/index.d.ts b/types/saml2-js/index.d.ts similarity index 100% rename from saml2-js/index.d.ts rename to types/saml2-js/index.d.ts diff --git a/saml2-js/saml2-js-tests.ts b/types/saml2-js/saml2-js-tests.ts similarity index 100% rename from saml2-js/saml2-js-tests.ts rename to types/saml2-js/saml2-js-tests.ts diff --git a/saml2-js/tsconfig.json b/types/saml2-js/tsconfig.json similarity index 100% rename from saml2-js/tsconfig.json rename to types/saml2-js/tsconfig.json diff --git a/samlp/index.d.ts b/types/samlp/index.d.ts similarity index 100% rename from samlp/index.d.ts rename to types/samlp/index.d.ts diff --git a/samlp/samlp-tests.ts b/types/samlp/samlp-tests.ts similarity index 100% rename from samlp/samlp-tests.ts rename to types/samlp/samlp-tests.ts diff --git a/samlp/tsconfig.json b/types/samlp/tsconfig.json similarity index 100% rename from samlp/tsconfig.json rename to types/samlp/tsconfig.json diff --git a/sammy/index.d.ts b/types/sammy/index.d.ts similarity index 71% rename from sammy/index.d.ts rename to types/sammy/index.d.ts index a40926195d..00b3b618a2 100644 --- a/sammy/index.d.ts +++ b/types/sammy/index.d.ts @@ -11,46 +11,46 @@ declare function Sammy(handler: Function): Sammy.Application; declare function Sammy(selector: string, handler: Function): Sammy.Application; declare namespace Sammy { - interface SammyFunc { - (): Sammy.Application; - (selector: string): Sammy.Application; - (handler: Function): Sammy.Application; - (selector: string, handler: Function): Sammy.Application; - } + interface SammyFunc { + (): Sammy.Application; + (selector: string): Sammy.Application; + (handler: Function): Sammy.Application; + (selector: string, handler: Function): Sammy.Application; + } - export function Cache(app, options); - export function DataCacheProxy(initial, $element); + export function Cache(app: any, options: any): any; + export function DataCacheProxy(initial: any, $element: any): any; export var DataLocationProxy:DataLocationProxy; - export function DefaultLocationProxy(app, run_interval_every); - export function EJS(app, method_alias); + export function DefaultLocationProxy(app: any, run_interval_every: any): any; + export function EJS(app: any, method_alias: any): any; - export function Exceptional(app, errorReporter); - export function Flash(app); + export function Exceptional(app: any, errorReporter: any): any; + export function Flash(app: any): any; export var FormBuilder: FormBuilder; - export function Form(app); // formFor ( name, object, content_callback ) + export function Form(app: any): any; // formFor ( name, object, content_callback ) - export function Haml(app, method_alias); - export function Handlebars(app, method_alias); - export function Hogan(app, method_alias); - export function Hoptoad(app, errorReporter); - export function JSON(app); - export function Meld(app, method_alias); - export function MemoryCacheProxy(initial); - export function Mustache(app, method_alias); - export function NestedParams(app); - export function OAuth2(app); - export function PathLocationProxy(app); - export function Pure(app, method_alias); - export function PushLocationProxy(app); - export function Session(app, options); - export function Storage(app); + export function Haml(app: any, method_alias: any): any; + export function Handlebars(app: any, method_alias: any): any; + export function Hogan(app: any, method_alias: any): any; + export function Hoptoad(app: any, errorReporter: any): any; + export function JSON(app: any): any; + export function Meld(app: any, method_alias: any): any; + export function MemoryCacheProxy(initial: any): any; + export function Mustache(app: any, method_alias: any): any; + export function NestedParams(app: any): any; + export function OAuth2(app: any): any; + export function PathLocationProxy(app: any): any; + export function Pure(app: any, method_alias: any): any; + export function PushLocationProxy(app: any): any; + export function Session(app: any, options: any): any; + export function Storage(app: any): any; export var Store: Store; - export function Title(); - export function Template(app, method_alias); - export function Tmpl(app, method_alias); - export function addLogger(logger); - export function log(...args:any[]); + export function Title(): any; + export function Template(app: any, method_alias: any): any; + export function Tmpl(app: any, method_alias: any): any; + export function addLogger(logger: any): any; + export function log(...args:any[]): any; export class Object { @@ -73,7 +73,7 @@ declare namespace Sammy { ROUTE_VERBS: string[]; APP_EVENTS: string[]; - (appFn: Function); + (appFn: Function): any; $element(selector?: string): JQuery; after(callback: Function): Application; @@ -111,7 +111,7 @@ declare namespace Sammy { route(verb: string, path: RegExp, callback: Function): Application; run(start_url?: string): Application; runRoute(verb: string, path?: string, params?: any, target?: any): any; - send(...params: any[]); + send(...params: any[]): any; setLocation(new_location: string): string; setLocationProxy(new_proxy: DataLocationProxy): void; swap(content: any, callback: Function): any; @@ -120,21 +120,21 @@ declare namespace Sammy { trigger(name: string, data?: any): Application; unload(): Application; use(...params: any[]): void; - last_location: string[]; + last_location: string[]; // Features provided by oauth2 plugin oauthorize: string; - requireOAuth(); - requireOAuth(path?:string); - requireOAuth(callback?: Function); + requireOAuth(): any; + requireOAuth(path?:string): any; + requireOAuth(callback?: Function): any; } export interface DataLocationProxy { - new (app, run_interval_every?): DataLocationProxy; - new (app, data_name, href_attribute): DataLocationProxy; + new (app: any, run_interval_every?: any): DataLocationProxy; + new (app: any, data_name: any, href_attribute: any): DataLocationProxy; - fullPath(location_obj): string; + fullPath(location_obj: any): string; bind(): void; unbind(): void; setLocation(new_location: string): string; @@ -143,22 +143,22 @@ declare namespace Sammy { export interface EventContext extends Object { - new (app, verb, path, params, target); + new (app: any, verb: any, path: any, params: any, target: any): any; $element(): JQuery; engineFor(engine: any): any; eventNamespace(): string; - interpolate(content: any, data: any, engine: any, partials): EventContext; + interpolate(content: any, data: any, engine: any, partials?: any): EventContext; json(str: any): any; json(str: string): any; load(location: any, options?: any, callback?: Function): any; - loadPartials(partials); + loadPartials(partials?: any): any; notFound(): any; - partial(location: string, data?: any, callback?: Function, partials?): RenderContext; + partial(location: string, data?: any, callback?: Function, partials?: any): RenderContext; partials: any; params: any; redirect(...params: any[]): void; - render(location: string, data?: any, callback?: Function, partials?): RenderContext; + render(location: string, data?: any, callback?: Function, partials?: any): RenderContext; renderEach(location: any, data?: { name: string;data?:any}[],callback?: Function): RenderContext; send(...params: any[]): RenderContext; swap(contents: any, callback: Function): string; @@ -172,13 +172,13 @@ declare namespace Sammy { export interface FormBuilder { - new (name, object); + new (name: any, object: any): any; checkbox(keypath: string, value: any, ...attributes: any[]): string; close(): string; hidden(keypath: string, ...attributes: any[]): string; label(keypath: string, content: any, ...attributes: any[]): string; - open(...attributes: any[]); + open(...attributes: any[]): any; password(keypath: string, ...attributes: any[]): string; radio(keypath: string, value: any, ...attributes: any[]): string; select(keypath: string, options: any, ...attributes: any[]): string; @@ -193,10 +193,10 @@ declare namespace Sammy { export interface GoogleAnalytics { - new (app, tracker); + new (app: any, tracker: any): any; - noTrack(); - track(path); + noTrack(): any; + track(path: any): any; } export interface Haml extends EventContext { } @@ -211,7 +211,7 @@ declare namespace Sammy { export interface RenderContext extends Object { - new (event_context); + new (event_context: any): any; appendTo(selector: string): RenderContext; collect(array: any[], callback: Function, now?: boolean): RenderContext; @@ -219,8 +219,8 @@ declare namespace Sammy { load(location: string, options?: any, callback?: Function): RenderContext; loadPartials(partials?: any): RenderContext; next(content: any): void; - partial(location: string, callback: Function, partials): RenderContext; - partial(location: string, data: any, callback: Function, partials): RenderContext; + partial(location: string, callback: Function, partials: any): RenderContext; + partial(location: string, data: any, callback: Function, partials: any): RenderContext; prependTo(selector: string): RenderContext; render(callback: Function): RenderContext; render(location: string, data: any): RenderContext; @@ -232,7 +232,7 @@ declare namespace Sammy { send(...params: any[]): RenderContext; swap(callback?: Function): RenderContext; then(callback: Function): RenderContext; - trigger(name, data); + trigger(name: any, data: any): any; wait(): void; } @@ -251,7 +251,7 @@ declare namespace Sammy { stores: any; - new (options?:any); + new (options?:any): any; clear(key: string): any; clearAll(): void; @@ -266,14 +266,14 @@ declare namespace Sammy { load(key: string, path: string, callback: Function): void; set(key: string, value: any): any; - Cookie(name, element, options); - Data(name, element); - LocalStorage(name, element); - Memory(name, element); - SessionStorage(name, element); - isAvailable(type); - Template(app, method_alias); - } + Cookie(name: any, element: any, options: any): any; + Data(name: any, element: any): any; + LocalStorage(name: any, element: any): any; + Memory(name: any, element: any): any; + SessionStorage(name: any, element: any): any; + isAvailable(type: any): any; + Template(app: any, method_alias: any): any; + } } declare module "sammy" { @@ -281,6 +281,6 @@ declare module "sammy" { } interface JQueryStatic { - sammy: Sammy.SammyFunc; - log: Function; -} + sammy: Sammy.SammyFunc; + log: Function; +} \ No newline at end of file diff --git a/sammy/sammy-tests.ts b/types/sammy/sammy-tests.ts similarity index 100% rename from sammy/sammy-tests.ts rename to types/sammy/sammy-tests.ts diff --git a/sammy/tsconfig.json b/types/sammy/tsconfig.json similarity index 100% rename from sammy/tsconfig.json rename to types/sammy/tsconfig.json diff --git a/sandboxed-module/index.d.ts b/types/sandboxed-module/index.d.ts similarity index 100% rename from sandboxed-module/index.d.ts rename to types/sandboxed-module/index.d.ts diff --git a/sandboxed-module/sandboxed-module-tests.ts b/types/sandboxed-module/sandboxed-module-tests.ts similarity index 100% rename from sandboxed-module/sandboxed-module-tests.ts rename to types/sandboxed-module/sandboxed-module-tests.ts diff --git a/sandboxed-module/tsconfig.json b/types/sandboxed-module/tsconfig.json similarity index 100% rename from sandboxed-module/tsconfig.json rename to types/sandboxed-module/tsconfig.json diff --git a/sanitize-filename/index.d.ts b/types/sanitize-filename/index.d.ts similarity index 100% rename from sanitize-filename/index.d.ts rename to types/sanitize-filename/index.d.ts diff --git a/sanitize-filename/sanitize-filename-tests.ts b/types/sanitize-filename/sanitize-filename-tests.ts similarity index 100% rename from sanitize-filename/sanitize-filename-tests.ts rename to types/sanitize-filename/sanitize-filename-tests.ts diff --git a/sanitize-filename/tsconfig.json b/types/sanitize-filename/tsconfig.json similarity index 100% rename from sanitize-filename/tsconfig.json rename to types/sanitize-filename/tsconfig.json diff --git a/sanitize-html/index.d.ts b/types/sanitize-html/index.d.ts similarity index 100% rename from sanitize-html/index.d.ts rename to types/sanitize-html/index.d.ts diff --git a/sanitize-html/sanitize-html-tests.ts b/types/sanitize-html/sanitize-html-tests.ts similarity index 100% rename from sanitize-html/sanitize-html-tests.ts rename to types/sanitize-html/sanitize-html-tests.ts diff --git a/sanitize-html/tsconfig.json b/types/sanitize-html/tsconfig.json similarity index 100% rename from sanitize-html/tsconfig.json rename to types/sanitize-html/tsconfig.json diff --git a/sanitizer/index.d.ts b/types/sanitizer/index.d.ts similarity index 100% rename from sanitizer/index.d.ts rename to types/sanitizer/index.d.ts diff --git a/sanitizer/sanitizer-tests.ts b/types/sanitizer/sanitizer-tests.ts similarity index 100% rename from sanitizer/sanitizer-tests.ts rename to types/sanitizer/sanitizer-tests.ts diff --git a/sanitizer/tsconfig.json b/types/sanitizer/tsconfig.json similarity index 100% rename from sanitizer/tsconfig.json rename to types/sanitizer/tsconfig.json diff --git a/sass-graph/index.d.ts b/types/sass-graph/index.d.ts similarity index 100% rename from sass-graph/index.d.ts rename to types/sass-graph/index.d.ts diff --git a/sass-graph/sass-graph-tests.ts b/types/sass-graph/sass-graph-tests.ts similarity index 100% rename from sass-graph/sass-graph-tests.ts rename to types/sass-graph/sass-graph-tests.ts diff --git a/sass-graph/tsconfig.json b/types/sass-graph/tsconfig.json similarity index 100% rename from sass-graph/tsconfig.json rename to types/sass-graph/tsconfig.json diff --git a/sat/index.d.ts b/types/sat/index.d.ts similarity index 100% rename from sat/index.d.ts rename to types/sat/index.d.ts diff --git a/sat/sat-tests.ts b/types/sat/sat-tests.ts similarity index 100% rename from sat/sat-tests.ts rename to types/sat/sat-tests.ts diff --git a/sat/tsconfig.json b/types/sat/tsconfig.json similarity index 100% rename from sat/tsconfig.json rename to types/sat/tsconfig.json diff --git a/satnav/index.d.ts b/types/satnav/index.d.ts similarity index 100% rename from satnav/index.d.ts rename to types/satnav/index.d.ts diff --git a/satnav/satnav-tests.ts b/types/satnav/satnav-tests.ts similarity index 100% rename from satnav/satnav-tests.ts rename to types/satnav/satnav-tests.ts diff --git a/satnav/tsconfig.json b/types/satnav/tsconfig.json similarity index 100% rename from satnav/tsconfig.json rename to types/satnav/tsconfig.json diff --git a/sax/index.d.ts b/types/sax/index.d.ts similarity index 100% rename from sax/index.d.ts rename to types/sax/index.d.ts diff --git a/sax/sax-tests.ts b/types/sax/sax-tests.ts similarity index 100% rename from sax/sax-tests.ts rename to types/sax/sax-tests.ts diff --git a/sax/tsconfig.json b/types/sax/tsconfig.json similarity index 100% rename from sax/tsconfig.json rename to types/sax/tsconfig.json diff --git a/scalike/index.d.ts b/types/scalike/index.d.ts similarity index 100% rename from scalike/index.d.ts rename to types/scalike/index.d.ts diff --git a/scalike/scalike-tests.ts b/types/scalike/scalike-tests.ts similarity index 100% rename from scalike/scalike-tests.ts rename to types/scalike/scalike-tests.ts diff --git a/scalike/tsconfig.json b/types/scalike/tsconfig.json similarity index 100% rename from scalike/tsconfig.json rename to types/scalike/tsconfig.json diff --git a/screenfull/index.d.ts b/types/screenfull/index.d.ts similarity index 100% rename from screenfull/index.d.ts rename to types/screenfull/index.d.ts diff --git a/screenfull/screenfull-tests.ts b/types/screenfull/screenfull-tests.ts similarity index 100% rename from screenfull/screenfull-tests.ts rename to types/screenfull/screenfull-tests.ts diff --git a/screenfull/tsconfig.json b/types/screenfull/tsconfig.json similarity index 100% rename from screenfull/tsconfig.json rename to types/screenfull/tsconfig.json diff --git a/scriptjs/index.d.ts b/types/scriptjs/index.d.ts similarity index 100% rename from scriptjs/index.d.ts rename to types/scriptjs/index.d.ts diff --git a/scriptjs/scriptjs-tests.ts b/types/scriptjs/scriptjs-tests.ts similarity index 100% rename from scriptjs/scriptjs-tests.ts rename to types/scriptjs/scriptjs-tests.ts diff --git a/scriptjs/tsconfig.json b/types/scriptjs/tsconfig.json similarity index 100% rename from scriptjs/tsconfig.json rename to types/scriptjs/tsconfig.json diff --git a/scroll-into-view/index.d.ts b/types/scroll-into-view/index.d.ts similarity index 100% rename from scroll-into-view/index.d.ts rename to types/scroll-into-view/index.d.ts diff --git a/scroll-into-view/scroll-into-view-tests.ts b/types/scroll-into-view/scroll-into-view-tests.ts similarity index 100% rename from scroll-into-view/scroll-into-view-tests.ts rename to types/scroll-into-view/scroll-into-view-tests.ts diff --git a/scroll-into-view/tsconfig.json b/types/scroll-into-view/tsconfig.json similarity index 100% rename from scroll-into-view/tsconfig.json rename to types/scroll-into-view/tsconfig.json diff --git a/scroller/index.d.ts b/types/scroller/index.d.ts similarity index 100% rename from scroller/index.d.ts rename to types/scroller/index.d.ts diff --git a/scroller/scroller-tests.ts b/types/scroller/scroller-tests.ts similarity index 100% rename from scroller/scroller-tests.ts rename to types/scroller/scroller-tests.ts diff --git a/scroller/tsconfig.json b/types/scroller/tsconfig.json similarity index 100% rename from scroller/tsconfig.json rename to types/scroller/tsconfig.json diff --git a/scrollreveal/index.d.ts b/types/scrollreveal/index.d.ts similarity index 100% rename from scrollreveal/index.d.ts rename to types/scrollreveal/index.d.ts diff --git a/scrollreveal/scrollreveal-tests.ts b/types/scrollreveal/scrollreveal-tests.ts similarity index 100% rename from scrollreveal/scrollreveal-tests.ts rename to types/scrollreveal/scrollreveal-tests.ts diff --git a/scrollreveal/tsconfig.json b/types/scrollreveal/tsconfig.json similarity index 100% rename from scrollreveal/tsconfig.json rename to types/scrollreveal/tsconfig.json diff --git a/scrolltofixed/index.d.ts b/types/scrolltofixed/index.d.ts similarity index 100% rename from scrolltofixed/index.d.ts rename to types/scrolltofixed/index.d.ts diff --git a/scrolltofixed/scrolltofixed-tests.ts b/types/scrolltofixed/scrolltofixed-tests.ts similarity index 100% rename from scrolltofixed/scrolltofixed-tests.ts rename to types/scrolltofixed/scrolltofixed-tests.ts diff --git a/scrolltofixed/tsconfig.json b/types/scrolltofixed/tsconfig.json similarity index 100% rename from scrolltofixed/tsconfig.json rename to types/scrolltofixed/tsconfig.json diff --git a/scrypt-async/index.d.ts b/types/scrypt-async/index.d.ts similarity index 100% rename from scrypt-async/index.d.ts rename to types/scrypt-async/index.d.ts diff --git a/scrypt-async/scrypt-async-tests.ts b/types/scrypt-async/scrypt-async-tests.ts similarity index 100% rename from scrypt-async/scrypt-async-tests.ts rename to types/scrypt-async/scrypt-async-tests.ts diff --git a/scrypt-async/tsconfig.json b/types/scrypt-async/tsconfig.json similarity index 100% rename from scrypt-async/tsconfig.json rename to types/scrypt-async/tsconfig.json diff --git a/seamless-immutable/index.d.ts b/types/seamless-immutable/index.d.ts similarity index 100% rename from seamless-immutable/index.d.ts rename to types/seamless-immutable/index.d.ts diff --git a/seamless-immutable/seamless-immutable-tests.ts b/types/seamless-immutable/seamless-immutable-tests.ts similarity index 100% rename from seamless-immutable/seamless-immutable-tests.ts rename to types/seamless-immutable/seamless-immutable-tests.ts diff --git a/seamless-immutable/tsconfig.json b/types/seamless-immutable/tsconfig.json similarity index 100% rename from seamless-immutable/tsconfig.json rename to types/seamless-immutable/tsconfig.json diff --git a/seamless/index.d.ts b/types/seamless/index.d.ts similarity index 100% rename from seamless/index.d.ts rename to types/seamless/index.d.ts diff --git a/seamless/seamless-tests.ts b/types/seamless/seamless-tests.ts similarity index 100% rename from seamless/seamless-tests.ts rename to types/seamless/seamless-tests.ts diff --git a/seamless/tsconfig.json b/types/seamless/tsconfig.json similarity index 100% rename from seamless/tsconfig.json rename to types/seamless/tsconfig.json diff --git a/seedrandom/index.d.ts b/types/seedrandom/index.d.ts similarity index 100% rename from seedrandom/index.d.ts rename to types/seedrandom/index.d.ts diff --git a/seedrandom/seedrandom-tests.ts b/types/seedrandom/seedrandom-tests.ts similarity index 100% rename from seedrandom/seedrandom-tests.ts rename to types/seedrandom/seedrandom-tests.ts diff --git a/seedrandom/tsconfig.json b/types/seedrandom/tsconfig.json similarity index 100% rename from seedrandom/tsconfig.json rename to types/seedrandom/tsconfig.json diff --git a/segment-analytics/index.d.ts b/types/segment-analytics/index.d.ts similarity index 100% rename from segment-analytics/index.d.ts rename to types/segment-analytics/index.d.ts diff --git a/segment-analytics/segment-analytics-tests.ts b/types/segment-analytics/segment-analytics-tests.ts similarity index 100% rename from segment-analytics/segment-analytics-tests.ts rename to types/segment-analytics/segment-analytics-tests.ts diff --git a/segment-analytics/tsconfig.json b/types/segment-analytics/tsconfig.json similarity index 100% rename from segment-analytics/tsconfig.json rename to types/segment-analytics/tsconfig.json diff --git a/select2/index.d.ts b/types/select2/index.d.ts similarity index 100% rename from select2/index.d.ts rename to types/select2/index.d.ts diff --git a/select2/select2-tests.ts b/types/select2/select2-tests.ts similarity index 100% rename from select2/select2-tests.ts rename to types/select2/select2-tests.ts diff --git a/select2/tsconfig.json b/types/select2/tsconfig.json similarity index 100% rename from select2/tsconfig.json rename to types/select2/tsconfig.json diff --git a/selectize/index.d.ts b/types/selectize/index.d.ts similarity index 100% rename from selectize/index.d.ts rename to types/selectize/index.d.ts diff --git a/selectize/selectize-tests.ts b/types/selectize/selectize-tests.ts similarity index 100% rename from selectize/selectize-tests.ts rename to types/selectize/selectize-tests.ts diff --git a/selectize/tsconfig.json b/types/selectize/tsconfig.json similarity index 100% rename from selectize/tsconfig.json rename to types/selectize/tsconfig.json diff --git a/selenium-webdriver/chrome.d.ts b/types/selenium-webdriver/chrome.d.ts similarity index 100% rename from selenium-webdriver/chrome.d.ts rename to types/selenium-webdriver/chrome.d.ts diff --git a/selenium-webdriver/edge.d.ts b/types/selenium-webdriver/edge.d.ts similarity index 100% rename from selenium-webdriver/edge.d.ts rename to types/selenium-webdriver/edge.d.ts diff --git a/selenium-webdriver/firefox.d.ts b/types/selenium-webdriver/firefox.d.ts similarity index 100% rename from selenium-webdriver/firefox.d.ts rename to types/selenium-webdriver/firefox.d.ts diff --git a/selenium-webdriver/http.d.ts b/types/selenium-webdriver/http.d.ts similarity index 100% rename from selenium-webdriver/http.d.ts rename to types/selenium-webdriver/http.d.ts diff --git a/selenium-webdriver/ie.d.ts b/types/selenium-webdriver/ie.d.ts similarity index 100% rename from selenium-webdriver/ie.d.ts rename to types/selenium-webdriver/ie.d.ts diff --git a/selenium-webdriver/index.d.ts b/types/selenium-webdriver/index.d.ts similarity index 100% rename from selenium-webdriver/index.d.ts rename to types/selenium-webdriver/index.d.ts diff --git a/selenium-webdriver/opera.d.ts b/types/selenium-webdriver/opera.d.ts similarity index 100% rename from selenium-webdriver/opera.d.ts rename to types/selenium-webdriver/opera.d.ts diff --git a/selenium-webdriver/remote.d.ts b/types/selenium-webdriver/remote.d.ts similarity index 100% rename from selenium-webdriver/remote.d.ts rename to types/selenium-webdriver/remote.d.ts diff --git a/selenium-webdriver/safari.d.ts b/types/selenium-webdriver/safari.d.ts similarity index 100% rename from selenium-webdriver/safari.d.ts rename to types/selenium-webdriver/safari.d.ts diff --git a/selenium-webdriver/test/chrome.ts b/types/selenium-webdriver/test/chrome.ts similarity index 100% rename from selenium-webdriver/test/chrome.ts rename to types/selenium-webdriver/test/chrome.ts diff --git a/selenium-webdriver/test/firefox.ts b/types/selenium-webdriver/test/firefox.ts similarity index 100% rename from selenium-webdriver/test/firefox.ts rename to types/selenium-webdriver/test/firefox.ts diff --git a/selenium-webdriver/test/index.ts b/types/selenium-webdriver/test/index.ts similarity index 100% rename from selenium-webdriver/test/index.ts rename to types/selenium-webdriver/test/index.ts diff --git a/selenium-webdriver/test/remote.ts b/types/selenium-webdriver/test/remote.ts similarity index 100% rename from selenium-webdriver/test/remote.ts rename to types/selenium-webdriver/test/remote.ts diff --git a/selenium-webdriver/testing.d.ts b/types/selenium-webdriver/testing.d.ts similarity index 100% rename from selenium-webdriver/testing.d.ts rename to types/selenium-webdriver/testing.d.ts diff --git a/selenium-webdriver/tsconfig.json b/types/selenium-webdriver/tsconfig.json similarity index 100% rename from selenium-webdriver/tsconfig.json rename to types/selenium-webdriver/tsconfig.json diff --git a/selenium-webdriver/tslint.json b/types/selenium-webdriver/tslint.json similarity index 100% rename from selenium-webdriver/tslint.json rename to types/selenium-webdriver/tslint.json diff --git a/selenium-webdriver/v2/chrome.d.ts b/types/selenium-webdriver/v2/chrome.d.ts similarity index 100% rename from selenium-webdriver/v2/chrome.d.ts rename to types/selenium-webdriver/v2/chrome.d.ts diff --git a/selenium-webdriver/v2/edge.d.ts b/types/selenium-webdriver/v2/edge.d.ts similarity index 100% rename from selenium-webdriver/v2/edge.d.ts rename to types/selenium-webdriver/v2/edge.d.ts diff --git a/selenium-webdriver/v2/executors.d.ts b/types/selenium-webdriver/v2/executors.d.ts similarity index 100% rename from selenium-webdriver/v2/executors.d.ts rename to types/selenium-webdriver/v2/executors.d.ts diff --git a/selenium-webdriver/v2/firefox.d.ts b/types/selenium-webdriver/v2/firefox.d.ts similarity index 100% rename from selenium-webdriver/v2/firefox.d.ts rename to types/selenium-webdriver/v2/firefox.d.ts diff --git a/selenium-webdriver/v2/http.d.ts b/types/selenium-webdriver/v2/http.d.ts similarity index 100% rename from selenium-webdriver/v2/http.d.ts rename to types/selenium-webdriver/v2/http.d.ts diff --git a/selenium-webdriver/v2/ie.d.ts b/types/selenium-webdriver/v2/ie.d.ts similarity index 100% rename from selenium-webdriver/v2/ie.d.ts rename to types/selenium-webdriver/v2/ie.d.ts diff --git a/selenium-webdriver/v2/index.d.ts b/types/selenium-webdriver/v2/index.d.ts similarity index 100% rename from selenium-webdriver/v2/index.d.ts rename to types/selenium-webdriver/v2/index.d.ts diff --git a/selenium-webdriver/v2/opera.d.ts b/types/selenium-webdriver/v2/opera.d.ts similarity index 100% rename from selenium-webdriver/v2/opera.d.ts rename to types/selenium-webdriver/v2/opera.d.ts diff --git a/selenium-webdriver/v2/remote.d.ts b/types/selenium-webdriver/v2/remote.d.ts similarity index 100% rename from selenium-webdriver/v2/remote.d.ts rename to types/selenium-webdriver/v2/remote.d.ts diff --git a/selenium-webdriver/v2/safari.d.ts b/types/selenium-webdriver/v2/safari.d.ts similarity index 100% rename from selenium-webdriver/v2/safari.d.ts rename to types/selenium-webdriver/v2/safari.d.ts diff --git a/selenium-webdriver/v2/test/chrome.ts b/types/selenium-webdriver/v2/test/chrome.ts similarity index 100% rename from selenium-webdriver/v2/test/chrome.ts rename to types/selenium-webdriver/v2/test/chrome.ts diff --git a/selenium-webdriver/v2/test/firefox.ts b/types/selenium-webdriver/v2/test/firefox.ts similarity index 100% rename from selenium-webdriver/v2/test/firefox.ts rename to types/selenium-webdriver/v2/test/firefox.ts diff --git a/selenium-webdriver/v2/test/index.ts b/types/selenium-webdriver/v2/test/index.ts similarity index 100% rename from selenium-webdriver/v2/test/index.ts rename to types/selenium-webdriver/v2/test/index.ts diff --git a/selenium-webdriver/v2/test/remote.ts b/types/selenium-webdriver/v2/test/remote.ts similarity index 100% rename from selenium-webdriver/v2/test/remote.ts rename to types/selenium-webdriver/v2/test/remote.ts diff --git a/selenium-webdriver/v2/testing.d.ts b/types/selenium-webdriver/v2/testing.d.ts similarity index 100% rename from selenium-webdriver/v2/testing.d.ts rename to types/selenium-webdriver/v2/testing.d.ts diff --git a/selenium-webdriver/v2/tsconfig.json b/types/selenium-webdriver/v2/tsconfig.json similarity index 100% rename from selenium-webdriver/v2/tsconfig.json rename to types/selenium-webdriver/v2/tsconfig.json diff --git a/selenium-webdriver/v2/tslint.json b/types/selenium-webdriver/v2/tslint.json similarity index 100% rename from selenium-webdriver/v2/tslint.json rename to types/selenium-webdriver/v2/tslint.json diff --git a/semantic-ui/index.d.ts b/types/semantic-ui/index.d.ts similarity index 100% rename from semantic-ui/index.d.ts rename to types/semantic-ui/index.d.ts diff --git a/semantic-ui/semantic-ui-tests.ts b/types/semantic-ui/semantic-ui-tests.ts similarity index 100% rename from semantic-ui/semantic-ui-tests.ts rename to types/semantic-ui/semantic-ui-tests.ts diff --git a/semantic-ui/tsconfig.json b/types/semantic-ui/tsconfig.json similarity index 100% rename from semantic-ui/tsconfig.json rename to types/semantic-ui/tsconfig.json diff --git a/semantic-ui/tslint.json b/types/semantic-ui/tslint.json similarity index 100% rename from semantic-ui/tslint.json rename to types/semantic-ui/tslint.json diff --git a/semaphore/index.d.ts b/types/semaphore/index.d.ts similarity index 100% rename from semaphore/index.d.ts rename to types/semaphore/index.d.ts diff --git a/semaphore/semaphore-tests.ts b/types/semaphore/semaphore-tests.ts similarity index 100% rename from semaphore/semaphore-tests.ts rename to types/semaphore/semaphore-tests.ts diff --git a/semaphore/tsconfig.json b/types/semaphore/tsconfig.json similarity index 100% rename from semaphore/tsconfig.json rename to types/semaphore/tsconfig.json diff --git a/semver-diff/index.d.ts b/types/semver-diff/index.d.ts similarity index 100% rename from semver-diff/index.d.ts rename to types/semver-diff/index.d.ts diff --git a/semver-diff/semver-diff-tests.ts b/types/semver-diff/semver-diff-tests.ts similarity index 100% rename from semver-diff/semver-diff-tests.ts rename to types/semver-diff/semver-diff-tests.ts diff --git a/semver-diff/tsconfig.json b/types/semver-diff/tsconfig.json similarity index 100% rename from semver-diff/tsconfig.json rename to types/semver-diff/tsconfig.json diff --git a/shipit-utils/tslint.json b/types/semver-diff/tslint.json similarity index 100% rename from shipit-utils/tslint.json rename to types/semver-diff/tslint.json diff --git a/semver/index.d.ts b/types/semver/index.d.ts similarity index 100% rename from semver/index.d.ts rename to types/semver/index.d.ts diff --git a/semver/semver-tests.ts b/types/semver/semver-tests.ts similarity index 100% rename from semver/semver-tests.ts rename to types/semver/semver-tests.ts diff --git a/semver/tsconfig.json b/types/semver/tsconfig.json similarity index 100% rename from semver/tsconfig.json rename to types/semver/tsconfig.json diff --git a/types/semver/tslint.json b/types/semver/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/types/semver/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/sencha_touch/index.d.ts b/types/sencha_touch/index.d.ts similarity index 100% rename from sencha_touch/index.d.ts rename to types/sencha_touch/index.d.ts diff --git a/sencha_touch/sencha_touch-tests.ts b/types/sencha_touch/sencha_touch-tests.ts similarity index 100% rename from sencha_touch/sencha_touch-tests.ts rename to types/sencha_touch/sencha_touch-tests.ts diff --git a/sencha_touch/tsconfig.json b/types/sencha_touch/tsconfig.json similarity index 100% rename from sencha_touch/tsconfig.json rename to types/sencha_touch/tsconfig.json diff --git a/send/index.d.ts b/types/send/index.d.ts similarity index 100% rename from send/index.d.ts rename to types/send/index.d.ts diff --git a/send/send-tests.ts b/types/send/send-tests.ts similarity index 100% rename from send/send-tests.ts rename to types/send/send-tests.ts diff --git a/send/tsconfig.json b/types/send/tsconfig.json similarity index 100% rename from send/tsconfig.json rename to types/send/tsconfig.json diff --git a/sendgrid/index.d.ts b/types/sendgrid/index.d.ts similarity index 100% rename from sendgrid/index.d.ts rename to types/sendgrid/index.d.ts diff --git a/sendgrid/sendgrid-tests.ts b/types/sendgrid/sendgrid-tests.ts similarity index 100% rename from sendgrid/sendgrid-tests.ts rename to types/sendgrid/sendgrid-tests.ts diff --git a/sendgrid/tsconfig.json b/types/sendgrid/tsconfig.json similarity index 100% rename from sendgrid/tsconfig.json rename to types/sendgrid/tsconfig.json diff --git a/sendgrid/v1/index.d.ts b/types/sendgrid/v1/index.d.ts similarity index 100% rename from sendgrid/v1/index.d.ts rename to types/sendgrid/v1/index.d.ts diff --git a/sendgrid/v1/tsconfig.json b/types/sendgrid/v1/tsconfig.json similarity index 100% rename from sendgrid/v1/tsconfig.json rename to types/sendgrid/v1/tsconfig.json diff --git a/seneca/index.d.ts b/types/seneca/index.d.ts similarity index 100% rename from seneca/index.d.ts rename to types/seneca/index.d.ts diff --git a/seneca/seneca-tests.ts b/types/seneca/seneca-tests.ts similarity index 100% rename from seneca/seneca-tests.ts rename to types/seneca/seneca-tests.ts diff --git a/seneca/tsconfig.json b/types/seneca/tsconfig.json similarity index 100% rename from seneca/tsconfig.json rename to types/seneca/tsconfig.json diff --git a/sequelize-fixtures/index.d.ts b/types/sequelize-fixtures/index.d.ts similarity index 97% rename from sequelize-fixtures/index.d.ts rename to types/sequelize-fixtures/index.d.ts index b865d91d0c..6114ed84e2 100644 --- a/sequelize-fixtures/index.d.ts +++ b/types/sequelize-fixtures/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/domasx2/sequelize-fixtures // Definitions by: Christian Schwarz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.2 /// diff --git a/sequelize-fixtures/sequelize-fixtures-tests.ts b/types/sequelize-fixtures/sequelize-fixtures-tests.ts similarity index 100% rename from sequelize-fixtures/sequelize-fixtures-tests.ts rename to types/sequelize-fixtures/sequelize-fixtures-tests.ts diff --git a/sequelize-fixtures/tsconfig.json b/types/sequelize-fixtures/tsconfig.json similarity index 100% rename from sequelize-fixtures/tsconfig.json rename to types/sequelize-fixtures/tsconfig.json diff --git a/sequelize/index.d.ts b/types/sequelize/index.d.ts similarity index 99% rename from sequelize/index.d.ts rename to types/sequelize/index.d.ts index e21d8f6f88..2642535740 100644 --- a/sequelize/index.d.ts +++ b/types/sequelize/index.d.ts @@ -2,7 +2,7 @@ // Project: http://sequelizejs.com // Definitions by: samuelneff , Peter Harris , Ivan Drinchev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.2 // Based on original work by: samuelneff @@ -481,7 +481,7 @@ declare namespace sequelize { * @see http://docs.sequelizejs.com/en/latest/api/associations/has-many/ * @see Instance */ - interface HasManyCreateAssociationMixin { + interface HasManyCreateAssociationMixin { /** * Create a new instance of the associated model and associate it with this. * @param values The values used to create the association. @@ -490,7 +490,7 @@ declare namespace sequelize { ( values?: TAttributes, options?: HasManyCreateAssociationMixinOptions | CreateOptions - ): Promise; + ): Promise; } /** @@ -944,7 +944,7 @@ declare namespace sequelize { * @see http://docs.sequelizejs.com/en/latest/api/associations/belongs-to-many/ * @see Instance */ - interface BelongsToManyCreateAssociationMixin { + interface BelongsToManyCreateAssociationMixin { /** * Create a new instance of the associated model and associate it with this. * @param values The values used to create the association. @@ -953,7 +953,7 @@ declare namespace sequelize { ( values?: TAttributes, options?: BelongsToManyCreateAssociationMixinOptions | CreateOptions | TJoinTableAttributes - ): Promise; + ): Promise; } /** @@ -3148,7 +3148,7 @@ declare namespace sequelize { /** * A list of attributes to select from the child model */ - attributes?: string[]; + attributes?: FindOptionsAttributesArray | { include?: FindOptionsAttributesArray, exclude?: Array }; /** * If true, converts to an inner join, which means that the parent model will only be loaded if it has any diff --git a/sequelize/sequelize-tests.ts b/types/sequelize/sequelize-tests.ts similarity index 99% rename from sequelize/sequelize-tests.ts rename to types/sequelize/sequelize-tests.ts index ceff709a6b..9425bd4f84 100644 --- a/sequelize/sequelize-tests.ts +++ b/types/sequelize/sequelize-tests.ts @@ -210,7 +210,7 @@ barcode.setProduct(product, { save: true }).then(() => { }); barcode.createProduct(); barcode.createProduct({ id: 1, name: 'Crowbar' }); -barcode.createProduct({ id: 1 }, { save: true, silent: true }).then(() => { }); +barcode.createProduct({ id: 1 }, { save: true, silent: true }).then((product) => { }); product.getWarehouse(); product.getWarehouse({ scope: null }).then(w => w.capacity); @@ -243,7 +243,7 @@ warehouse.addProduct(2, { validate: true }).then(() => { }); warehouse.createProduct(); warehouse.createProduct({ id: 1, name: 'baz' }); -warehouse.createProduct({ id: 1 }, { silent: true }).then(() => { }); +warehouse.createProduct({ id: 1 }, { silent: true }).then((product) => { }); warehouse.removeProducts(); warehouse.removeProducts([product]); @@ -281,7 +281,7 @@ warehouse.addBranch(2, { validate: true, distance: 1 }).then(() => { }); warehouse.createBranch(); warehouse.createBranch({ id: 1, address: 'baz' }); -warehouse.createBranch({ id: 1 }, { silent: true, distance: 1 }).then(() => { }); +warehouse.createBranch({ id: 1 }, { silent: true, distance: 1 }).then((branch) => { }); warehouse.removeBranches(); warehouse.removeBranches([branch]); @@ -319,7 +319,7 @@ customer.addBranch(2, { validate: true }).then(() => { }); customer.createBranch(); customer.createBranch({ id: 1, address: 'baz' }); -customer.createBranch({ id: 1 }, { silent: true }).then(() => { }); +customer.createBranch({ id: 1 }, { silent: true }).then((branch) => { }); customer.removeBranches(); customer.removeBranches([branch]); @@ -383,7 +383,7 @@ interface WarehouseInstance extends Sequelize.Instance, War setProducts: Sequelize.HasManySetAssociationsMixin; addProducts: Sequelize.HasManyAddAssociationsMixin; addProduct: Sequelize.HasManyAddAssociationMixin; - createProduct: Sequelize.HasManyCreateAssociationMixin; + createProduct: Sequelize.HasManyCreateAssociationMixin; removeProduct: Sequelize.HasManyRemoveAssociationMixin; removeProducts: Sequelize.HasManyRemoveAssociationsMixin; hasProduct: Sequelize.HasManyHasAssociationMixin; @@ -395,7 +395,7 @@ interface WarehouseInstance extends Sequelize.Instance, War setBranches: Sequelize.BelongsToManySetAssociationsMixin; addBranches: Sequelize.BelongsToManyAddAssociationsMixin; addBranch: Sequelize.BelongsToManyAddAssociationMixin; - createBranch: Sequelize.BelongsToManyCreateAssociationMixin; + createBranch: Sequelize.BelongsToManyCreateAssociationMixin; removeBranch: Sequelize.BelongsToManyRemoveAssociationMixin; removeBranches: Sequelize.BelongsToManyRemoveAssociationsMixin; hasBranch: Sequelize.BelongsToManyHasAssociationMixin; @@ -415,7 +415,7 @@ interface BranchInstance extends Sequelize.Instance, BranchAtt setWarehouses: Sequelize.BelongsToManySetAssociationsMixin; addWarehouses: Sequelize.BelongsToManyAddAssociationsMixin; addWarehouse: Sequelize.BelongsToManyAddAssociationMixin; - createWarehouse: Sequelize.BelongsToManyCreateAssociationMixin; + createWarehouse: Sequelize.BelongsToManyCreateAssociationMixin; removeWarehouse: Sequelize.BelongsToManyRemoveAssociationMixin; removeWarehouses: Sequelize.BelongsToManyRemoveAssociationsMixin; hasWarehouse: Sequelize.BelongsToManyHasAssociationMixin; @@ -427,7 +427,7 @@ interface BranchInstance extends Sequelize.Instance, BranchAtt setCustomers: Sequelize.BelongsToManySetAssociationsMixin; addCustomers: Sequelize.BelongsToManyAddAssociationsMixin; addCustomer: Sequelize.BelongsToManyAddAssociationMixin; - createCustomer: Sequelize.BelongsToManyCreateAssociationMixin; + createCustomer: Sequelize.BelongsToManyCreateAssociationMixin; removeCustomer: Sequelize.BelongsToManyRemoveAssociationMixin; removeCustomers: Sequelize.BelongsToManyRemoveAssociationsMixin; hasCustomer: Sequelize.BelongsToManyHasAssociationMixin; @@ -453,7 +453,7 @@ interface CustomerInstance extends Sequelize.Instance, Custo setBranches: Sequelize.BelongsToManySetAssociationsMixin; addBranches: Sequelize.BelongsToManyAddAssociationsMixin; addBranch: Sequelize.BelongsToManyAddAssociationMixin; - createBranch: Sequelize.BelongsToManyCreateAssociationMixin; + createBranch: Sequelize.BelongsToManyCreateAssociationMixin; removeBranch: Sequelize.BelongsToManyRemoveAssociationMixin; removeBranches: Sequelize.BelongsToManyRemoveAssociationsMixin; hasBranch: Sequelize.BelongsToManyHasAssociationMixin; diff --git a/sequelize/tsconfig.json b/types/sequelize/tsconfig.json similarity index 100% rename from sequelize/tsconfig.json rename to types/sequelize/tsconfig.json diff --git a/sequelize/v3/index.d.ts b/types/sequelize/v3/index.d.ts similarity index 99% rename from sequelize/v3/index.d.ts rename to types/sequelize/v3/index.d.ts index f44fcbbd46..3f8fd0e1a4 100644 --- a/sequelize/v3/index.d.ts +++ b/types/sequelize/v3/index.d.ts @@ -2,7 +2,7 @@ // Project: http://sequelizejs.com // Definitions by: samuelneff , Peter Harris , Ivan Drinchev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.2 // Based on original work by: samuelneff diff --git a/sequelize/v3/sequelize-tests.ts b/types/sequelize/v3/sequelize-tests.ts similarity index 100% rename from sequelize/v3/sequelize-tests.ts rename to types/sequelize/v3/sequelize-tests.ts diff --git a/sequelize/v3/tsconfig.json b/types/sequelize/v3/tsconfig.json similarity index 100% rename from sequelize/v3/tsconfig.json rename to types/sequelize/v3/tsconfig.json diff --git a/sequester/index.d.ts b/types/sequester/index.d.ts similarity index 100% rename from sequester/index.d.ts rename to types/sequester/index.d.ts diff --git a/sequester/sequester-tests.ts b/types/sequester/sequester-tests.ts similarity index 100% rename from sequester/sequester-tests.ts rename to types/sequester/sequester-tests.ts diff --git a/sequester/tsconfig.json b/types/sequester/tsconfig.json similarity index 100% rename from sequester/tsconfig.json rename to types/sequester/tsconfig.json diff --git a/serialport/index.d.ts b/types/serialport/index.d.ts similarity index 92% rename from serialport/index.d.ts rename to types/serialport/index.d.ts index d94ab9d79f..5b284cc669 100644 --- a/serialport/index.d.ts +++ b/types/serialport/index.d.ts @@ -5,7 +5,8 @@ declare module 'serialport' { class SerialPort { - constructor(path: string, options?: Object, openImmediately?: boolean, callback?: (err: any) => void) + //openImmediately already removed in 4.0.7 + constructor(path: string, options?: Object, callback?: (err: any) => void) isOpen(): boolean; on(event: string, callback?: (data?: any) => void): void; open(callback?: (err: any) => void): void; diff --git a/serialport/serialport-tests.ts b/types/serialport/serialport-tests.ts similarity index 100% rename from serialport/serialport-tests.ts rename to types/serialport/serialport-tests.ts diff --git a/serialport/tsconfig.json b/types/serialport/tsconfig.json similarity index 100% rename from serialport/tsconfig.json rename to types/serialport/tsconfig.json diff --git a/serve-favicon/index.d.ts b/types/serve-favicon/index.d.ts similarity index 100% rename from serve-favicon/index.d.ts rename to types/serve-favicon/index.d.ts diff --git a/serve-favicon/serve-favicon-tests.ts b/types/serve-favicon/serve-favicon-tests.ts similarity index 100% rename from serve-favicon/serve-favicon-tests.ts rename to types/serve-favicon/serve-favicon-tests.ts diff --git a/serve-favicon/tsconfig.json b/types/serve-favicon/tsconfig.json similarity index 100% rename from serve-favicon/tsconfig.json rename to types/serve-favicon/tsconfig.json diff --git a/serve-index/index.d.ts b/types/serve-index/index.d.ts similarity index 100% rename from serve-index/index.d.ts rename to types/serve-index/index.d.ts diff --git a/serve-index/serve-index-tests.ts b/types/serve-index/serve-index-tests.ts similarity index 100% rename from serve-index/serve-index-tests.ts rename to types/serve-index/serve-index-tests.ts diff --git a/serve-index/tsconfig.json b/types/serve-index/tsconfig.json similarity index 100% rename from serve-index/tsconfig.json rename to types/serve-index/tsconfig.json diff --git a/serve-static/index.d.ts b/types/serve-static/index.d.ts similarity index 100% rename from serve-static/index.d.ts rename to types/serve-static/index.d.ts diff --git a/serve-static/serve-static-tests.ts b/types/serve-static/serve-static-tests.ts similarity index 100% rename from serve-static/serve-static-tests.ts rename to types/serve-static/serve-static-tests.ts diff --git a/serve-static/tsconfig.json b/types/serve-static/tsconfig.json similarity index 100% rename from serve-static/tsconfig.json rename to types/serve-static/tsconfig.json diff --git a/session-file-store/index.d.ts b/types/session-file-store/index.d.ts similarity index 100% rename from session-file-store/index.d.ts rename to types/session-file-store/index.d.ts diff --git a/session-file-store/session-file-store-tests.ts b/types/session-file-store/session-file-store-tests.ts similarity index 50% rename from session-file-store/session-file-store-tests.ts rename to types/session-file-store/session-file-store-tests.ts index b268aea8b0..ffe3c79bee 100644 --- a/session-file-store/session-file-store-tests.ts +++ b/types/session-file-store/session-file-store-tests.ts @@ -1,14 +1,13 @@ import FileStore = require("session-file-store"); -const options:FileStore.Options = { +const options: FileStore.Options = { path: "./tmp/sessions/", - logFn:function(a:string) { - + logFn: (a: string) => { } }; const sessionStore = new FileStore(options); -sessionStore.list(function (err: any, file: Array) { +sessionStore.list((err: any, file: Array) => { -}); +}); \ No newline at end of file diff --git a/session-file-store/tsconfig.json b/types/session-file-store/tsconfig.json similarity index 100% rename from session-file-store/tsconfig.json rename to types/session-file-store/tsconfig.json diff --git a/shipit/tslint.json b/types/session-file-store/tslint.json similarity index 100% rename from shipit/tslint.json rename to types/session-file-store/tslint.json diff --git a/set-cookie-parser/index.d.ts b/types/set-cookie-parser/index.d.ts similarity index 100% rename from set-cookie-parser/index.d.ts rename to types/set-cookie-parser/index.d.ts diff --git a/set-cookie-parser/set-cookie-parser-tests.ts b/types/set-cookie-parser/set-cookie-parser-tests.ts similarity index 100% rename from set-cookie-parser/set-cookie-parser-tests.ts rename to types/set-cookie-parser/set-cookie-parser-tests.ts diff --git a/set-cookie-parser/tsconfig.json b/types/set-cookie-parser/tsconfig.json similarity index 100% rename from set-cookie-parser/tsconfig.json rename to types/set-cookie-parser/tsconfig.json diff --git a/sha1/index.d.ts b/types/sha1/index.d.ts similarity index 100% rename from sha1/index.d.ts rename to types/sha1/index.d.ts diff --git a/sha1/sha1-tests.ts b/types/sha1/sha1-tests.ts similarity index 100% rename from sha1/sha1-tests.ts rename to types/sha1/sha1-tests.ts diff --git a/sha1/tsconfig.json b/types/sha1/tsconfig.json similarity index 100% rename from sha1/tsconfig.json rename to types/sha1/tsconfig.json diff --git a/siema/tslint.json b/types/sha1/tslint.json similarity index 100% rename from siema/tslint.json rename to types/sha1/tslint.json diff --git a/shallowequal/index.d.ts b/types/shallowequal/index.d.ts similarity index 100% rename from shallowequal/index.d.ts rename to types/shallowequal/index.d.ts diff --git a/shallowequal/shallowequal-tests.ts b/types/shallowequal/shallowequal-tests.ts similarity index 100% rename from shallowequal/shallowequal-tests.ts rename to types/shallowequal/shallowequal-tests.ts diff --git a/shallowequal/tsconfig.json b/types/shallowequal/tsconfig.json similarity index 100% rename from shallowequal/tsconfig.json rename to types/shallowequal/tsconfig.json diff --git a/shapefile/index.d.ts b/types/shapefile/index.d.ts similarity index 100% rename from shapefile/index.d.ts rename to types/shapefile/index.d.ts diff --git a/shapefile/shapefile-tests.ts b/types/shapefile/shapefile-tests.ts similarity index 100% rename from shapefile/shapefile-tests.ts rename to types/shapefile/shapefile-tests.ts diff --git a/shapefile/tsconfig.json b/types/shapefile/tsconfig.json similarity index 100% rename from shapefile/tsconfig.json rename to types/shapefile/tsconfig.json diff --git a/sharedworker/index.d.ts b/types/sharedworker/index.d.ts similarity index 100% rename from sharedworker/index.d.ts rename to types/sharedworker/index.d.ts diff --git a/sharedworker/sharedworker-tests.ts b/types/sharedworker/sharedworker-tests.ts similarity index 100% rename from sharedworker/sharedworker-tests.ts rename to types/sharedworker/sharedworker-tests.ts diff --git a/sharedworker/tsconfig.json b/types/sharedworker/tsconfig.json similarity index 100% rename from sharedworker/tsconfig.json rename to types/sharedworker/tsconfig.json diff --git a/sharepoint/index.d.ts b/types/sharepoint/index.d.ts similarity index 100% rename from sharepoint/index.d.ts rename to types/sharepoint/index.d.ts diff --git a/sharepoint/sharepoint-tests.ts b/types/sharepoint/sharepoint-tests.ts similarity index 100% rename from sharepoint/sharepoint-tests.ts rename to types/sharepoint/sharepoint-tests.ts diff --git a/sharepoint/tsconfig.json b/types/sharepoint/tsconfig.json similarity index 100% rename from sharepoint/tsconfig.json rename to types/sharepoint/tsconfig.json diff --git a/sharepoint/tslint.json b/types/sharepoint/tslint.json similarity index 100% rename from sharepoint/tslint.json rename to types/sharepoint/tslint.json diff --git a/sharp/index.d.ts b/types/sharp/index.d.ts similarity index 100% rename from sharp/index.d.ts rename to types/sharp/index.d.ts diff --git a/sharp/sharp-tests.ts b/types/sharp/sharp-tests.ts similarity index 100% rename from sharp/sharp-tests.ts rename to types/sharp/sharp-tests.ts diff --git a/sharp/tsconfig.json b/types/sharp/tsconfig.json similarity index 100% rename from sharp/tsconfig.json rename to types/sharp/tsconfig.json diff --git a/simple-oauth2/tslint.json b/types/sharp/tslint.json similarity index 100% rename from simple-oauth2/tslint.json rename to types/sharp/tslint.json diff --git a/sheetify/index.d.ts b/types/sheetify/index.d.ts similarity index 100% rename from sheetify/index.d.ts rename to types/sheetify/index.d.ts diff --git a/sheetify/sheetify-tests.ts b/types/sheetify/sheetify-tests.ts similarity index 100% rename from sheetify/sheetify-tests.ts rename to types/sheetify/sheetify-tests.ts diff --git a/sheetify/tsconfig.json b/types/sheetify/tsconfig.json similarity index 100% rename from sheetify/tsconfig.json rename to types/sheetify/tsconfig.json diff --git a/simple-peer/tslint.json b/types/sheetify/tslint.json similarity index 100% rename from simple-peer/tslint.json rename to types/sheetify/tslint.json diff --git a/shelljs/index.d.ts b/types/shelljs/index.d.ts similarity index 100% rename from shelljs/index.d.ts rename to types/shelljs/index.d.ts diff --git a/shelljs/shelljs-tests.ts b/types/shelljs/shelljs-tests.ts similarity index 100% rename from shelljs/shelljs-tests.ts rename to types/shelljs/shelljs-tests.ts diff --git a/shelljs/tsconfig.json b/types/shelljs/tsconfig.json similarity index 100% rename from shelljs/tsconfig.json rename to types/shelljs/tsconfig.json diff --git a/shipit-utils/index.d.ts b/types/shipit-utils/index.d.ts similarity index 100% rename from shipit-utils/index.d.ts rename to types/shipit-utils/index.d.ts diff --git a/shipit-utils/shipit-utils-tests.ts b/types/shipit-utils/shipit-utils-tests.ts similarity index 100% rename from shipit-utils/shipit-utils-tests.ts rename to types/shipit-utils/shipit-utils-tests.ts diff --git a/shipit-utils/tsconfig.json b/types/shipit-utils/tsconfig.json similarity index 100% rename from shipit-utils/tsconfig.json rename to types/shipit-utils/tsconfig.json diff --git a/simple-xml/tslint.json b/types/shipit-utils/tslint.json similarity index 100% rename from simple-xml/tslint.json rename to types/shipit-utils/tslint.json diff --git a/shipit/index.d.ts b/types/shipit/index.d.ts similarity index 100% rename from shipit/index.d.ts rename to types/shipit/index.d.ts diff --git a/shipit/shipit-tests.ts b/types/shipit/shipit-tests.ts similarity index 100% rename from shipit/shipit-tests.ts rename to types/shipit/shipit-tests.ts diff --git a/shipit/tsconfig.json b/types/shipit/tsconfig.json similarity index 100% rename from shipit/tsconfig.json rename to types/shipit/tsconfig.json diff --git a/slug/tslint.json b/types/shipit/tslint.json similarity index 100% rename from slug/tslint.json rename to types/shipit/tslint.json diff --git a/shopify-buy/index.d.ts b/types/shopify-buy/index.d.ts similarity index 100% rename from shopify-buy/index.d.ts rename to types/shopify-buy/index.d.ts diff --git a/shopify-buy/shopify-buy-tests.ts b/types/shopify-buy/shopify-buy-tests.ts similarity index 100% rename from shopify-buy/shopify-buy-tests.ts rename to types/shopify-buy/shopify-buy-tests.ts diff --git a/shopify-buy/tsconfig.json b/types/shopify-buy/tsconfig.json similarity index 100% rename from shopify-buy/tsconfig.json rename to types/shopify-buy/tsconfig.json diff --git a/shortid/index.d.ts b/types/shortid/index.d.ts similarity index 100% rename from shortid/index.d.ts rename to types/shortid/index.d.ts diff --git a/shortid/shortid-tests.ts b/types/shortid/shortid-tests.ts similarity index 100% rename from shortid/shortid-tests.ts rename to types/shortid/shortid-tests.ts diff --git a/shortid/tsconfig.json b/types/shortid/tsconfig.json similarity index 100% rename from shortid/tsconfig.json rename to types/shortid/tsconfig.json diff --git a/should-promised/index.d.ts b/types/should-promised/index.d.ts similarity index 100% rename from should-promised/index.d.ts rename to types/should-promised/index.d.ts diff --git a/should-promised/should-promised-tests.ts b/types/should-promised/should-promised-tests.ts similarity index 100% rename from should-promised/should-promised-tests.ts rename to types/should-promised/should-promised-tests.ts diff --git a/should-promised/tsconfig.json b/types/should-promised/tsconfig.json similarity index 100% rename from should-promised/tsconfig.json rename to types/should-promised/tsconfig.json diff --git a/should/index.d.ts b/types/should/index.d.ts similarity index 100% rename from should/index.d.ts rename to types/should/index.d.ts diff --git a/should/should-tests.ts b/types/should/should-tests.ts similarity index 100% rename from should/should-tests.ts rename to types/should/should-tests.ts diff --git a/should/tsconfig.json b/types/should/tsconfig.json similarity index 100% rename from should/tsconfig.json rename to types/should/tsconfig.json diff --git a/showdown/index.d.ts b/types/showdown/index.d.ts similarity index 100% rename from showdown/index.d.ts rename to types/showdown/index.d.ts diff --git a/showdown/showdown-tests.ts b/types/showdown/showdown-tests.ts similarity index 100% rename from showdown/showdown-tests.ts rename to types/showdown/showdown-tests.ts diff --git a/showdown/tsconfig.json b/types/showdown/tsconfig.json similarity index 100% rename from showdown/tsconfig.json rename to types/showdown/tsconfig.json diff --git a/shuffle-array/index.d.ts b/types/shuffle-array/index.d.ts similarity index 100% rename from shuffle-array/index.d.ts rename to types/shuffle-array/index.d.ts diff --git a/shuffle-array/shuffle-array-tests.ts b/types/shuffle-array/shuffle-array-tests.ts similarity index 100% rename from shuffle-array/shuffle-array-tests.ts rename to types/shuffle-array/shuffle-array-tests.ts diff --git a/shuffle-array/tsconfig.json b/types/shuffle-array/tsconfig.json similarity index 100% rename from shuffle-array/tsconfig.json rename to types/shuffle-array/tsconfig.json diff --git a/siema/index.d.ts b/types/siema/index.d.ts similarity index 100% rename from siema/index.d.ts rename to types/siema/index.d.ts diff --git a/siema/siema-tests.ts b/types/siema/siema-tests.ts similarity index 100% rename from siema/siema-tests.ts rename to types/siema/siema-tests.ts diff --git a/siema/tsconfig.json b/types/siema/tsconfig.json similarity index 100% rename from siema/tsconfig.json rename to types/siema/tsconfig.json diff --git a/smooth-scrollbar/tslint.json b/types/siema/tslint.json similarity index 100% rename from smooth-scrollbar/tslint.json rename to types/siema/tslint.json diff --git a/siesta/index.d.ts b/types/siesta/index.d.ts similarity index 100% rename from siesta/index.d.ts rename to types/siesta/index.d.ts diff --git a/siesta/siesta-tests.ts b/types/siesta/siesta-tests.ts similarity index 100% rename from siesta/siesta-tests.ts rename to types/siesta/siesta-tests.ts diff --git a/siesta/tsconfig.json b/types/siesta/tsconfig.json similarity index 100% rename from siesta/tsconfig.json rename to types/siesta/tsconfig.json diff --git a/sigmajs/index.d.ts b/types/sigmajs/index.d.ts similarity index 100% rename from sigmajs/index.d.ts rename to types/sigmajs/index.d.ts diff --git a/sigmajs/sigmajs-tests.ts b/types/sigmajs/sigmajs-tests.ts similarity index 100% rename from sigmajs/sigmajs-tests.ts rename to types/sigmajs/sigmajs-tests.ts diff --git a/sigmajs/tsconfig.json b/types/sigmajs/tsconfig.json similarity index 100% rename from sigmajs/tsconfig.json rename to types/sigmajs/tsconfig.json diff --git a/signalr/index.d.ts b/types/signalr/index.d.ts similarity index 100% rename from signalr/index.d.ts rename to types/signalr/index.d.ts diff --git a/signalr/signalr-tests.ts b/types/signalr/signalr-tests.ts similarity index 100% rename from signalr/signalr-tests.ts rename to types/signalr/signalr-tests.ts diff --git a/signalr/tsconfig.json b/types/signalr/tsconfig.json similarity index 100% rename from signalr/tsconfig.json rename to types/signalr/tsconfig.json diff --git a/signalr/v1/index.d.ts b/types/signalr/v1/index.d.ts similarity index 100% rename from signalr/v1/index.d.ts rename to types/signalr/v1/index.d.ts diff --git a/signalr/v1/signalr-tests.ts b/types/signalr/v1/signalr-tests.ts similarity index 100% rename from signalr/v1/signalr-tests.ts rename to types/signalr/v1/signalr-tests.ts diff --git a/signalr/v1/tsconfig.json b/types/signalr/v1/tsconfig.json similarity index 100% rename from signalr/v1/tsconfig.json rename to types/signalr/v1/tsconfig.json diff --git a/signals/index.d.ts b/types/signals/index.d.ts similarity index 100% rename from signals/index.d.ts rename to types/signals/index.d.ts diff --git a/signals/signals-tests.ts b/types/signals/signals-tests.ts similarity index 100% rename from signals/signals-tests.ts rename to types/signals/signals-tests.ts diff --git a/signals/tsconfig.json b/types/signals/tsconfig.json similarity index 100% rename from signals/tsconfig.json rename to types/signals/tsconfig.json diff --git a/signature_pad/index.d.ts b/types/signature_pad/index.d.ts similarity index 100% rename from signature_pad/index.d.ts rename to types/signature_pad/index.d.ts diff --git a/signature_pad/signature_pad-tests.ts b/types/signature_pad/signature_pad-tests.ts similarity index 100% rename from signature_pad/signature_pad-tests.ts rename to types/signature_pad/signature_pad-tests.ts diff --git a/signature_pad/tsconfig.json b/types/signature_pad/tsconfig.json similarity index 100% rename from signature_pad/tsconfig.json rename to types/signature_pad/tsconfig.json diff --git a/simple-assign/index.d.ts b/types/simple-assign/index.d.ts similarity index 100% rename from simple-assign/index.d.ts rename to types/simple-assign/index.d.ts diff --git a/simple-assign/simple-assign-tests.ts b/types/simple-assign/simple-assign-tests.ts similarity index 100% rename from simple-assign/simple-assign-tests.ts rename to types/simple-assign/simple-assign-tests.ts diff --git a/simple-assign/tsconfig.json b/types/simple-assign/tsconfig.json similarity index 100% rename from simple-assign/tsconfig.json rename to types/simple-assign/tsconfig.json diff --git a/simple-cw-node/index.d.ts b/types/simple-cw-node/index.d.ts similarity index 100% rename from simple-cw-node/index.d.ts rename to types/simple-cw-node/index.d.ts diff --git a/simple-cw-node/simple-cw-node-tests.ts b/types/simple-cw-node/simple-cw-node-tests.ts similarity index 100% rename from simple-cw-node/simple-cw-node-tests.ts rename to types/simple-cw-node/simple-cw-node-tests.ts diff --git a/simple-cw-node/tsconfig.json b/types/simple-cw-node/tsconfig.json similarity index 100% rename from simple-cw-node/tsconfig.json rename to types/simple-cw-node/tsconfig.json diff --git a/simple-mock/index.d.ts b/types/simple-mock/index.d.ts similarity index 100% rename from simple-mock/index.d.ts rename to types/simple-mock/index.d.ts diff --git a/simple-mock/simple-mock-tests.ts b/types/simple-mock/simple-mock-tests.ts similarity index 100% rename from simple-mock/simple-mock-tests.ts rename to types/simple-mock/simple-mock-tests.ts diff --git a/simple-mock/tsconfig.json b/types/simple-mock/tsconfig.json similarity index 100% rename from simple-mock/tsconfig.json rename to types/simple-mock/tsconfig.json diff --git a/simple-oauth2/index.d.ts b/types/simple-oauth2/index.d.ts similarity index 100% rename from simple-oauth2/index.d.ts rename to types/simple-oauth2/index.d.ts diff --git a/simple-oauth2/simple-oauth2-tests.ts b/types/simple-oauth2/simple-oauth2-tests.ts similarity index 100% rename from simple-oauth2/simple-oauth2-tests.ts rename to types/simple-oauth2/simple-oauth2-tests.ts diff --git a/simple-oauth2/tsconfig.json b/types/simple-oauth2/tsconfig.json similarity index 100% rename from simple-oauth2/tsconfig.json rename to types/simple-oauth2/tsconfig.json diff --git a/spatialite/tslint.json b/types/simple-oauth2/tslint.json similarity index 100% rename from spatialite/tslint.json rename to types/simple-oauth2/tslint.json diff --git a/simple-peer/index.d.ts b/types/simple-peer/index.d.ts similarity index 100% rename from simple-peer/index.d.ts rename to types/simple-peer/index.d.ts diff --git a/simple-peer/simple-peer-tests.ts b/types/simple-peer/simple-peer-tests.ts similarity index 100% rename from simple-peer/simple-peer-tests.ts rename to types/simple-peer/simple-peer-tests.ts diff --git a/simple-peer/tsconfig.json b/types/simple-peer/tsconfig.json similarity index 100% rename from simple-peer/tsconfig.json rename to types/simple-peer/tsconfig.json diff --git a/speakingurl/tslint.json b/types/simple-peer/tslint.json similarity index 100% rename from speakingurl/tslint.json rename to types/simple-peer/tslint.json diff --git a/simple-url-cache/index.d.ts b/types/simple-url-cache/index.d.ts similarity index 100% rename from simple-url-cache/index.d.ts rename to types/simple-url-cache/index.d.ts diff --git a/simple-url-cache/simple-url-cache-tests.ts b/types/simple-url-cache/simple-url-cache-tests.ts similarity index 100% rename from simple-url-cache/simple-url-cache-tests.ts rename to types/simple-url-cache/simple-url-cache-tests.ts diff --git a/simple-url-cache/tsconfig.json b/types/simple-url-cache/tsconfig.json similarity index 100% rename from simple-url-cache/tsconfig.json rename to types/simple-url-cache/tsconfig.json diff --git a/simple-xml/index.d.ts b/types/simple-xml/index.d.ts similarity index 100% rename from simple-xml/index.d.ts rename to types/simple-xml/index.d.ts diff --git a/simple-xml/simple-xml-tests.ts b/types/simple-xml/simple-xml-tests.ts similarity index 100% rename from simple-xml/simple-xml-tests.ts rename to types/simple-xml/simple-xml-tests.ts diff --git a/simple-xml/tsconfig.json b/types/simple-xml/tsconfig.json similarity index 100% rename from simple-xml/tsconfig.json rename to types/simple-xml/tsconfig.json diff --git a/sqlite3/tslint.json b/types/simple-xml/tslint.json similarity index 100% rename from sqlite3/tslint.json rename to types/simple-xml/tslint.json diff --git a/simplebar/index.d.ts b/types/simplebar/index.d.ts similarity index 100% rename from simplebar/index.d.ts rename to types/simplebar/index.d.ts diff --git a/simplebar/simplebar-tests.ts b/types/simplebar/simplebar-tests.ts similarity index 100% rename from simplebar/simplebar-tests.ts rename to types/simplebar/simplebar-tests.ts diff --git a/simplebar/tsconfig.json b/types/simplebar/tsconfig.json similarity index 100% rename from simplebar/tsconfig.json rename to types/simplebar/tsconfig.json diff --git a/simplemde/index.d.ts b/types/simplemde/index.d.ts similarity index 100% rename from simplemde/index.d.ts rename to types/simplemde/index.d.ts diff --git a/simplemde/simplemde-tests.ts b/types/simplemde/simplemde-tests.ts similarity index 100% rename from simplemde/simplemde-tests.ts rename to types/simplemde/simplemde-tests.ts diff --git a/simplemde/tsconfig.json b/types/simplemde/tsconfig.json similarity index 100% rename from simplemde/tsconfig.json rename to types/simplemde/tsconfig.json diff --git a/simplesmtp/index.d.ts b/types/simplesmtp/index.d.ts similarity index 100% rename from simplesmtp/index.d.ts rename to types/simplesmtp/index.d.ts diff --git a/simplesmtp/simplesmtp-tests.ts b/types/simplesmtp/simplesmtp-tests.ts similarity index 100% rename from simplesmtp/simplesmtp-tests.ts rename to types/simplesmtp/simplesmtp-tests.ts diff --git a/simplesmtp/tsconfig.json b/types/simplesmtp/tsconfig.json similarity index 100% rename from simplesmtp/tsconfig.json rename to types/simplesmtp/tsconfig.json diff --git a/simplestorage.js/index.d.ts b/types/simplestorage.js/index.d.ts similarity index 100% rename from simplestorage.js/index.d.ts rename to types/simplestorage.js/index.d.ts diff --git a/simplestorage.js/simplestorage.js-tests.ts b/types/simplestorage.js/simplestorage.js-tests.ts similarity index 100% rename from simplestorage.js/simplestorage.js-tests.ts rename to types/simplestorage.js/simplestorage.js-tests.ts diff --git a/simplestorage.js/tsconfig.json b/types/simplestorage.js/tsconfig.json similarity index 100% rename from simplestorage.js/tsconfig.json rename to types/simplestorage.js/tsconfig.json diff --git a/sinon-as-promised/index.d.ts b/types/sinon-as-promised/index.d.ts similarity index 100% rename from sinon-as-promised/index.d.ts rename to types/sinon-as-promised/index.d.ts diff --git a/sinon-as-promised/sinon-as-promised-tests.ts b/types/sinon-as-promised/sinon-as-promised-tests.ts similarity index 100% rename from sinon-as-promised/sinon-as-promised-tests.ts rename to types/sinon-as-promised/sinon-as-promised-tests.ts diff --git a/sinon-as-promised/tsconfig.json b/types/sinon-as-promised/tsconfig.json similarity index 100% rename from sinon-as-promised/tsconfig.json rename to types/sinon-as-promised/tsconfig.json diff --git a/sinon-chai/index.d.ts b/types/sinon-chai/index.d.ts similarity index 100% rename from sinon-chai/index.d.ts rename to types/sinon-chai/index.d.ts diff --git a/sinon-chai/sinon-chai-tests.ts b/types/sinon-chai/sinon-chai-tests.ts similarity index 100% rename from sinon-chai/sinon-chai-tests.ts rename to types/sinon-chai/sinon-chai-tests.ts diff --git a/sinon-chai/tsconfig.json b/types/sinon-chai/tsconfig.json similarity index 100% rename from sinon-chai/tsconfig.json rename to types/sinon-chai/tsconfig.json diff --git a/sinon-chrome/index.d.ts b/types/sinon-chrome/index.d.ts similarity index 100% rename from sinon-chrome/index.d.ts rename to types/sinon-chrome/index.d.ts diff --git a/sinon-chrome/sinon-chrome-tests.ts b/types/sinon-chrome/sinon-chrome-tests.ts similarity index 100% rename from sinon-chrome/sinon-chrome-tests.ts rename to types/sinon-chrome/sinon-chrome-tests.ts diff --git a/sinon-chrome/tsconfig.json b/types/sinon-chrome/tsconfig.json similarity index 100% rename from sinon-chrome/tsconfig.json rename to types/sinon-chrome/tsconfig.json diff --git a/sinon-mongoose/index.d.ts b/types/sinon-mongoose/index.d.ts similarity index 100% rename from sinon-mongoose/index.d.ts rename to types/sinon-mongoose/index.d.ts diff --git a/sinon-mongoose/sinon-mongoose-tests.ts b/types/sinon-mongoose/sinon-mongoose-tests.ts similarity index 100% rename from sinon-mongoose/sinon-mongoose-tests.ts rename to types/sinon-mongoose/sinon-mongoose-tests.ts diff --git a/sinon-mongoose/tsconfig.json b/types/sinon-mongoose/tsconfig.json similarity index 100% rename from sinon-mongoose/tsconfig.json rename to types/sinon-mongoose/tsconfig.json diff --git a/sinon-stub-promise/index.d.ts b/types/sinon-stub-promise/index.d.ts similarity index 100% rename from sinon-stub-promise/index.d.ts rename to types/sinon-stub-promise/index.d.ts diff --git a/sinon-stub-promise/sinon-stub-promise-tests.ts b/types/sinon-stub-promise/sinon-stub-promise-tests.ts similarity index 100% rename from sinon-stub-promise/sinon-stub-promise-tests.ts rename to types/sinon-stub-promise/sinon-stub-promise-tests.ts diff --git a/sinon-stub-promise/tsconfig.json b/types/sinon-stub-promise/tsconfig.json similarity index 100% rename from sinon-stub-promise/tsconfig.json rename to types/sinon-stub-promise/tsconfig.json diff --git a/sinon/index.d.ts b/types/sinon/index.d.ts similarity index 99% rename from sinon/index.d.ts rename to types/sinon/index.d.ts index 7c44ab9d7a..e4ba1ad612 100644 --- a/sinon/index.d.ts +++ b/types/sinon/index.d.ts @@ -102,6 +102,7 @@ declare namespace Sinon { throws(type?: string): SinonStub; throws(obj: any): SinonStub; callsArg(index: number): SinonStub; + callThrough(): SinonStub; callsArgOn(index: number, context: any): SinonStub; callsArgWith(index: number, ...args: any[]): SinonStub; callsArgOnWith(index: number, context: any, ...args: any[]): SinonStub; diff --git a/sinon/sinon-tests.ts b/types/sinon/sinon-tests.ts similarity index 100% rename from sinon/sinon-tests.ts rename to types/sinon/sinon-tests.ts diff --git a/sinon/tsconfig.json b/types/sinon/tsconfig.json similarity index 100% rename from sinon/tsconfig.json rename to types/sinon/tsconfig.json diff --git a/sip.js/index.d.ts b/types/sip.js/index.d.ts similarity index 100% rename from sip.js/index.d.ts rename to types/sip.js/index.d.ts diff --git a/sip.js/sip.js-tests.ts b/types/sip.js/sip.js-tests.ts similarity index 100% rename from sip.js/sip.js-tests.ts rename to types/sip.js/sip.js-tests.ts diff --git a/sip.js/tsconfig.json b/types/sip.js/tsconfig.json similarity index 100% rename from sip.js/tsconfig.json rename to types/sip.js/tsconfig.json diff --git a/sip.js/tslint.json b/types/sip.js/tslint.json similarity index 100% rename from sip.js/tslint.json rename to types/sip.js/tslint.json diff --git a/sipml/index.d.ts b/types/sipml/index.d.ts similarity index 100% rename from sipml/index.d.ts rename to types/sipml/index.d.ts diff --git a/sipml/sipml-tests.ts b/types/sipml/sipml-tests.ts similarity index 100% rename from sipml/sipml-tests.ts rename to types/sipml/sipml-tests.ts diff --git a/sipml/tsconfig.json b/types/sipml/tsconfig.json similarity index 100% rename from sipml/tsconfig.json rename to types/sipml/tsconfig.json diff --git a/sitemap2/index.d.ts b/types/sitemap2/index.d.ts similarity index 100% rename from sitemap2/index.d.ts rename to types/sitemap2/index.d.ts diff --git a/sitemap2/sitemap2-tests.ts b/types/sitemap2/sitemap2-tests.ts similarity index 100% rename from sitemap2/sitemap2-tests.ts rename to types/sitemap2/sitemap2-tests.ts diff --git a/sitemap2/tsconfig.json b/types/sitemap2/tsconfig.json similarity index 100% rename from sitemap2/tsconfig.json rename to types/sitemap2/tsconfig.json diff --git a/types/sitemap2/tslint.json b/types/sitemap2/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/types/sitemap2/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/sjcl/index.d.ts b/types/sjcl/index.d.ts similarity index 99% rename from sjcl/index.d.ts rename to types/sjcl/index.d.ts index 0192faa6b4..ea906defef 100644 --- a/sjcl/index.d.ts +++ b/types/sjcl/index.d.ts @@ -525,6 +525,7 @@ declare namespace sjcl { interface SjclConveninceDecryptor { (password: string, ciphertext: SjclCipherEncrypted, params?: SjclCipherDecryptParams, rp?: SjclCipherDecrypted): string; + (password: string, ciphertext: string, params?: SjclCipherDecryptParams, rp?: SjclCipherDecrypted): string; (password: BitArray, ciphertext: SjclCipherEncrypted, params?: SjclCipherDecryptParams, rp?: SjclCipherDecrypted): string; (password: SjclElGamalSecretKey, ciphertext: SjclCipherEncrypted, params?: SjclCipherDecryptParams, rp?: SjclCipherDecrypted): string; } diff --git a/sjcl/sjcl-tests.ts b/types/sjcl/sjcl-tests.ts similarity index 100% rename from sjcl/sjcl-tests.ts rename to types/sjcl/sjcl-tests.ts diff --git a/sjcl/tsconfig.json b/types/sjcl/tsconfig.json similarity index 100% rename from sjcl/tsconfig.json rename to types/sjcl/tsconfig.json diff --git a/ski/index.d.ts b/types/ski/index.d.ts similarity index 100% rename from ski/index.d.ts rename to types/ski/index.d.ts diff --git a/ski/ski-tests.ts b/types/ski/ski-tests.ts similarity index 100% rename from ski/ski-tests.ts rename to types/ski/ski-tests.ts diff --git a/ski/tsconfig.json b/types/ski/tsconfig.json similarity index 100% rename from ski/tsconfig.json rename to types/ski/tsconfig.json diff --git a/skyway/index.d.ts b/types/skyway/index.d.ts similarity index 100% rename from skyway/index.d.ts rename to types/skyway/index.d.ts diff --git a/skyway/skyway-tests.ts b/types/skyway/skyway-tests.ts similarity index 100% rename from skyway/skyway-tests.ts rename to types/skyway/skyway-tests.ts diff --git a/skyway/tsconfig.json b/types/skyway/tsconfig.json similarity index 100% rename from skyway/tsconfig.json rename to types/skyway/tsconfig.json diff --git a/slack-node/index.d.ts b/types/slack-node/index.d.ts similarity index 100% rename from slack-node/index.d.ts rename to types/slack-node/index.d.ts diff --git a/slack-node/slack-node-tests.ts b/types/slack-node/slack-node-tests.ts similarity index 100% rename from slack-node/slack-node-tests.ts rename to types/slack-node/slack-node-tests.ts diff --git a/slack-node/tsconfig.json b/types/slack-node/tsconfig.json similarity index 100% rename from slack-node/tsconfig.json rename to types/slack-node/tsconfig.json diff --git a/slackify-html/index.d.ts b/types/slackify-html/index.d.ts similarity index 100% rename from slackify-html/index.d.ts rename to types/slackify-html/index.d.ts diff --git a/slackify-html/slackify-html-tests.ts b/types/slackify-html/slackify-html-tests.ts similarity index 100% rename from slackify-html/slackify-html-tests.ts rename to types/slackify-html/slackify-html-tests.ts diff --git a/slackify-html/tsconfig.json b/types/slackify-html/tsconfig.json similarity index 100% rename from slackify-html/tsconfig.json rename to types/slackify-html/tsconfig.json diff --git a/slate-irc/index.d.ts b/types/slate-irc/index.d.ts similarity index 100% rename from slate-irc/index.d.ts rename to types/slate-irc/index.d.ts diff --git a/slate-irc/slate-irc-tests.ts b/types/slate-irc/slate-irc-tests.ts similarity index 100% rename from slate-irc/slate-irc-tests.ts rename to types/slate-irc/slate-irc-tests.ts diff --git a/slate-irc/tsconfig.json b/types/slate-irc/tsconfig.json similarity index 100% rename from slate-irc/tsconfig.json rename to types/slate-irc/tsconfig.json diff --git a/sleep/index.d.ts b/types/sleep/index.d.ts similarity index 100% rename from sleep/index.d.ts rename to types/sleep/index.d.ts diff --git a/sleep/sleep-tests.ts b/types/sleep/sleep-tests.ts similarity index 100% rename from sleep/sleep-tests.ts rename to types/sleep/sleep-tests.ts diff --git a/sleep/tsconfig.json b/types/sleep/tsconfig.json similarity index 100% rename from sleep/tsconfig.json rename to types/sleep/tsconfig.json diff --git a/slick-carousel/index.d.ts b/types/slick-carousel/index.d.ts similarity index 100% rename from slick-carousel/index.d.ts rename to types/slick-carousel/index.d.ts diff --git a/slick-carousel/slick-carousel-tests.ts b/types/slick-carousel/slick-carousel-tests.ts similarity index 100% rename from slick-carousel/slick-carousel-tests.ts rename to types/slick-carousel/slick-carousel-tests.ts diff --git a/slick-carousel/tsconfig.json b/types/slick-carousel/tsconfig.json similarity index 100% rename from slick-carousel/tsconfig.json rename to types/slick-carousel/tsconfig.json diff --git a/slickgrid/index.d.ts b/types/slickgrid/index.d.ts similarity index 100% rename from slickgrid/index.d.ts rename to types/slickgrid/index.d.ts diff --git a/slickgrid/slick.autotooltips.d.ts b/types/slickgrid/slick.autotooltips.d.ts similarity index 100% rename from slickgrid/slick.autotooltips.d.ts rename to types/slickgrid/slick.autotooltips.d.ts diff --git a/slickgrid/slick.checkboxselectcolumn.d.ts b/types/slickgrid/slick.checkboxselectcolumn.d.ts similarity index 100% rename from slickgrid/slick.checkboxselectcolumn.d.ts rename to types/slickgrid/slick.checkboxselectcolumn.d.ts diff --git a/slickgrid/slick.columnpicker.d.ts b/types/slickgrid/slick.columnpicker.d.ts similarity index 100% rename from slickgrid/slick.columnpicker.d.ts rename to types/slickgrid/slick.columnpicker.d.ts diff --git a/slickgrid/slick.headerbuttons.d.ts b/types/slickgrid/slick.headerbuttons.d.ts similarity index 100% rename from slickgrid/slick.headerbuttons.d.ts rename to types/slickgrid/slick.headerbuttons.d.ts diff --git a/slickgrid/slick.rowselectionmodel.d.ts b/types/slickgrid/slick.rowselectionmodel.d.ts similarity index 100% rename from slickgrid/slick.rowselectionmodel.d.ts rename to types/slickgrid/slick.rowselectionmodel.d.ts diff --git a/slickgrid/test/index.ts b/types/slickgrid/test/index.ts similarity index 100% rename from slickgrid/test/index.ts rename to types/slickgrid/test/index.ts diff --git a/slickgrid/test/slick.autotooltips.ts b/types/slickgrid/test/slick.autotooltips.ts similarity index 100% rename from slickgrid/test/slick.autotooltips.ts rename to types/slickgrid/test/slick.autotooltips.ts diff --git a/slickgrid/test/slick.checkboxselectcolumn.ts b/types/slickgrid/test/slick.checkboxselectcolumn.ts similarity index 100% rename from slickgrid/test/slick.checkboxselectcolumn.ts rename to types/slickgrid/test/slick.checkboxselectcolumn.ts diff --git a/slickgrid/tsconfig.json b/types/slickgrid/tsconfig.json similarity index 100% rename from slickgrid/tsconfig.json rename to types/slickgrid/tsconfig.json diff --git a/slideout/index.d.ts b/types/slideout/index.d.ts similarity index 100% rename from slideout/index.d.ts rename to types/slideout/index.d.ts diff --git a/slideout/slideout-tests.ts b/types/slideout/slideout-tests.ts similarity index 100% rename from slideout/slideout-tests.ts rename to types/slideout/slideout-tests.ts diff --git a/slideout/tsconfig.json b/types/slideout/tsconfig.json similarity index 100% rename from slideout/tsconfig.json rename to types/slideout/tsconfig.json diff --git a/slug/index.d.ts b/types/slug/index.d.ts similarity index 100% rename from slug/index.d.ts rename to types/slug/index.d.ts diff --git a/slug/slug-tests.ts b/types/slug/slug-tests.ts similarity index 100% rename from slug/slug-tests.ts rename to types/slug/slug-tests.ts diff --git a/slug/tsconfig.json b/types/slug/tsconfig.json similarity index 100% rename from slug/tsconfig.json rename to types/slug/tsconfig.json diff --git a/sshpk/tslint.json b/types/slug/tslint.json similarity index 100% rename from sshpk/tslint.json rename to types/slug/tslint.json diff --git a/smart-fox-server/index.d.ts b/types/smart-fox-server/index.d.ts similarity index 100% rename from smart-fox-server/index.d.ts rename to types/smart-fox-server/index.d.ts diff --git a/smart-fox-server/smart-fox-server-tests.ts b/types/smart-fox-server/smart-fox-server-tests.ts similarity index 100% rename from smart-fox-server/smart-fox-server-tests.ts rename to types/smart-fox-server/smart-fox-server-tests.ts diff --git a/smart-fox-server/tsconfig.json b/types/smart-fox-server/tsconfig.json similarity index 100% rename from smart-fox-server/tsconfig.json rename to types/smart-fox-server/tsconfig.json diff --git a/smooth-scrollbar/index.d.ts b/types/smooth-scrollbar/index.d.ts similarity index 100% rename from smooth-scrollbar/index.d.ts rename to types/smooth-scrollbar/index.d.ts diff --git a/smooth-scrollbar/smooth-scrollbar-tests.ts b/types/smooth-scrollbar/smooth-scrollbar-tests.ts similarity index 100% rename from smooth-scrollbar/smooth-scrollbar-tests.ts rename to types/smooth-scrollbar/smooth-scrollbar-tests.ts diff --git a/smooth-scrollbar/tsconfig.json b/types/smooth-scrollbar/tsconfig.json similarity index 100% rename from smooth-scrollbar/tsconfig.json rename to types/smooth-scrollbar/tsconfig.json diff --git a/stream-buffers/tslint.json b/types/smooth-scrollbar/tslint.json similarity index 100% rename from stream-buffers/tslint.json rename to types/smooth-scrollbar/tslint.json diff --git a/smoothie/index.d.ts b/types/smoothie/index.d.ts similarity index 100% rename from smoothie/index.d.ts rename to types/smoothie/index.d.ts diff --git a/smoothie/smoothie-tests.ts b/types/smoothie/smoothie-tests.ts similarity index 100% rename from smoothie/smoothie-tests.ts rename to types/smoothie/smoothie-tests.ts diff --git a/smoothie/tsconfig.json b/types/smoothie/tsconfig.json similarity index 100% rename from smoothie/tsconfig.json rename to types/smoothie/tsconfig.json diff --git a/smtp-server/index.d.ts b/types/smtp-server/index.d.ts similarity index 100% rename from smtp-server/index.d.ts rename to types/smtp-server/index.d.ts diff --git a/smtp-server/smtp-server-tests.ts b/types/smtp-server/smtp-server-tests.ts similarity index 100% rename from smtp-server/smtp-server-tests.ts rename to types/smtp-server/smtp-server-tests.ts diff --git a/smtp-server/tsconfig.json b/types/smtp-server/tsconfig.json similarity index 100% rename from smtp-server/tsconfig.json rename to types/smtp-server/tsconfig.json diff --git a/smtpapi/index.d.ts b/types/smtpapi/index.d.ts similarity index 100% rename from smtpapi/index.d.ts rename to types/smtpapi/index.d.ts diff --git a/smtpapi/smtpapi-tests.ts b/types/smtpapi/smtpapi-tests.ts similarity index 100% rename from smtpapi/smtpapi-tests.ts rename to types/smtpapi/smtpapi-tests.ts diff --git a/smtpapi/tsconfig.json b/types/smtpapi/tsconfig.json similarity index 100% rename from smtpapi/tsconfig.json rename to types/smtpapi/tsconfig.json diff --git a/snapsvg/index.d.ts b/types/snapsvg/index.d.ts similarity index 100% rename from snapsvg/index.d.ts rename to types/snapsvg/index.d.ts diff --git a/snapsvg/test/1.ts b/types/snapsvg/test/1.ts similarity index 100% rename from snapsvg/test/1.ts rename to types/snapsvg/test/1.ts diff --git a/snapsvg/test/2.ts b/types/snapsvg/test/2.ts similarity index 100% rename from snapsvg/test/2.ts rename to types/snapsvg/test/2.ts diff --git a/snapsvg/test/3.ts b/types/snapsvg/test/3.ts similarity index 100% rename from snapsvg/test/3.ts rename to types/snapsvg/test/3.ts diff --git a/snapsvg/tsconfig.json b/types/snapsvg/tsconfig.json similarity index 100% rename from snapsvg/tsconfig.json rename to types/snapsvg/tsconfig.json diff --git a/soap/index.d.ts b/types/soap/index.d.ts similarity index 86% rename from soap/index.d.ts rename to types/soap/index.d.ts index eda277d575..762b803d12 100644 --- a/soap/index.d.ts +++ b/types/soap/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for soap +// Type definitions for soap 0.18 // Project: https://www.npmjs.com/package/soap // Definitions by: Leo Liang , Cage Fox // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -11,7 +11,15 @@ interface Security { } export interface SoapMethod { - (args: any, callback: (err: any, result: any) => void, options?: any, extraHeaders?: any): void; + (args: any, callback: (err: any, result: any) => void, options?: any, extraHeaders?: any): void; +} + +export class BasicAuthSecurity implements Security { + constructor(username: string, password: string); +} + +export class BearerSecurity implements Security { + constructor(token: string); } export class WSSecurity implements Security { @@ -60,8 +68,8 @@ export interface Option { forceSoap12Headers?: boolean; httpClient?: HttpClient; ignoreBaseNameSpaces?: boolean, - ignoredNamespaces?: string[] | {namespaces: string[], override: boolean}; - overrideRootElement?: {namespace: string, xmlnsAttributes?: string[]}; + ignoredNamespaces?: string[] | { namespaces: string[], override: boolean }; + overrideRootElement?: { namespace: string, xmlnsAttributes?: string[] }; request?: (options: any, callback?: (error: any, res: any, body: any) => void) => void; stream?: boolean; valueKey?: string; diff --git a/soap/soap-tests.ts b/types/soap/soap-tests.ts similarity index 53% rename from soap/soap-tests.ts rename to types/soap/soap-tests.ts index f07346988e..72a1d1a85d 100644 --- a/soap/soap-tests.ts +++ b/types/soap/soap-tests.ts @@ -23,10 +23,13 @@ const wsdlOptions = { xmlKey: '$xml' }; -soap.createClient(url, wsdlOptions, function(err: any, client: soap.Client) { +soap.createClient(url, wsdlOptions, (err: any, client: soap.Client) => { let securityOptions = { hasTimeStamp: false }; client.setSecurity(new soap.WSSecurity('user', 'password', securityOptions)); - let defaults = {rejectUnauthorized: false}; + client.setSecurity(new soap.BasicAuthSecurity('user', 'password')); + client.setSecurity(new soap.BearerSecurity('token')); + client.setSecurity(new soap.WSSecurity('user', 'password', securityOptions)); + let defaults = { rejectUnauthorized: false }; client.setSecurity(new soap.ClientSSLSecurity('/path/to/key', '/path/to/cert', '/path/to/ca', defaults)); client.setSecurity(new soap.ClientSSLSecurity('/path/to/key', '/path/to/cert', defaults)); client.setSecurity(new soap.ClientSSLSecurity('/path/to/key', '/path/to/cert', '/path/to/ca')); @@ -43,54 +46,54 @@ soap.createClient(url, wsdlOptions, function(err: any, client: soap.Client) { client.getHttpHeaders(); client.getSoapHeaders(); client.setSOAPAction('action'); - (client['create'] as soap.SoapMethod)({ name: 'value' }, function(err: any, result: any) { + (client['create'] as soap.SoapMethod)({ name: 'value' }, (err: any, result: any) => { // result is an object }); - (client['create'] as soap.SoapMethod)({ name: 'value' }, function(err: any, result: any) { + (client['create'] as soap.SoapMethod)({ name: 'value' }, (err: any, result: any) => { // result is an object }, {}); - client.on('request', function(obj: any) { + client.on('request', (obj: any) => { //obj is an object }); }); var myService = { - MyService: { - MyPort: { - MyFunction: function(args: any) { - return { - name: args.name - }; - }, + MyService: { + MyPort: { + MyFunction: (args: any) => { + return { + name: args.name + }; + }, - // This is how to define an asynchronous function. - MyAsyncFunction: function(args: any, callback: any) { - // do some work - callback({ - name: args.name - }); - }, + // This is how to define an asynchronous function. + MyAsyncFunction: (args: any, callback: any) => { + // do some work + callback({ + name: args.name + }); + }, - // This is how to receive incoming headers - HeadersAwareFunction: function(args: any, cb: any, headers: any) { - return { - name: headers.Token - }; - }, + // This is how to receive incoming headers + HeadersAwareFunction: (args: any, cb: any, headers: any) => { + return { + name: headers.Token + }; + }, - // You can also inspect the original `req` - reallyDeatailedFunction: function(args: any, cb: any, headers: any, req: any) { - console.log('SOAP `reallyDeatailedFunction` request from ' + req.connection.remoteAddress); - return { - name: headers.Token - }; - } - } - } - }; + // You can also inspect the original `req` + reallyDeatailedFunction: (args: any, cb: any, headers: any, req: any) => { + console.log('SOAP `reallyDeatailedFunction` request from ' + req.connection.remoteAddress); + return { + name: headers.Token + }; + } + } + } +}; var xml = fs.readFileSync('myservice.wsdl', 'utf8'), - server = http.createServer(function(request,response) { + server = http.createServer((request, response) => { response.end('404: Not Found: ' + request.url); }); diff --git a/soap/tsconfig.json b/types/soap/tsconfig.json similarity index 100% rename from soap/tsconfig.json rename to types/soap/tsconfig.json diff --git a/socket.io-client/index.d.ts b/types/socket.io-client/index.d.ts similarity index 100% rename from socket.io-client/index.d.ts rename to types/socket.io-client/index.d.ts diff --git a/socket.io-client/socket.io-client-tests.ts b/types/socket.io-client/socket.io-client-tests.ts similarity index 100% rename from socket.io-client/socket.io-client-tests.ts rename to types/socket.io-client/socket.io-client-tests.ts diff --git a/socket.io-client/tsconfig.json b/types/socket.io-client/tsconfig.json similarity index 100% rename from socket.io-client/tsconfig.json rename to types/socket.io-client/tsconfig.json diff --git a/socket.io-parser/index.d.ts b/types/socket.io-parser/index.d.ts similarity index 100% rename from socket.io-parser/index.d.ts rename to types/socket.io-parser/index.d.ts diff --git a/socket.io-parser/socket.io-parser-tests.ts b/types/socket.io-parser/socket.io-parser-tests.ts similarity index 100% rename from socket.io-parser/socket.io-parser-tests.ts rename to types/socket.io-parser/socket.io-parser-tests.ts diff --git a/socket.io-parser/tsconfig.json b/types/socket.io-parser/tsconfig.json similarity index 100% rename from socket.io-parser/tsconfig.json rename to types/socket.io-parser/tsconfig.json diff --git a/socket.io-redis/index.d.ts b/types/socket.io-redis/index.d.ts similarity index 100% rename from socket.io-redis/index.d.ts rename to types/socket.io-redis/index.d.ts diff --git a/socket.io-redis/socket.io-redis-tests.ts b/types/socket.io-redis/socket.io-redis-tests.ts similarity index 100% rename from socket.io-redis/socket.io-redis-tests.ts rename to types/socket.io-redis/socket.io-redis-tests.ts diff --git a/socket.io-redis/tsconfig.json b/types/socket.io-redis/tsconfig.json similarity index 100% rename from socket.io-redis/tsconfig.json rename to types/socket.io-redis/tsconfig.json diff --git a/socket.io.users/index.d.ts b/types/socket.io.users/index.d.ts similarity index 100% rename from socket.io.users/index.d.ts rename to types/socket.io.users/index.d.ts diff --git a/socket.io.users/socket.io.users-tests.ts b/types/socket.io.users/socket.io.users-tests.ts similarity index 100% rename from socket.io.users/socket.io.users-tests.ts rename to types/socket.io.users/socket.io.users-tests.ts diff --git a/socket.io.users/tsconfig.json b/types/socket.io.users/tsconfig.json similarity index 100% rename from socket.io.users/tsconfig.json rename to types/socket.io.users/tsconfig.json diff --git a/socket.io/index.d.ts b/types/socket.io/index.d.ts similarity index 87% rename from socket.io/index.d.ts rename to types/socket.io/index.d.ts index 2333dc8fe2..9eafcec6a1 100644 --- a/socket.io/index.d.ts +++ b/types/socket.io/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for socket.io 1.4.4 // Project: http://socket.io/ -// Definitions by: PROGRE , Damian Connolly , Florent Poujol +// Definitions by: PROGRE , Damian Connolly , Florent Poujol , KentarouTakeda // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -472,7 +472,7 @@ declare namespace SocketIO { * as we have a problem with the emit() event (as it's overridden with a * different return) */ - interface Socket { + interface Socket extends NodeJS.EventEmitter{ /** * The namespace that this socket is for @@ -509,28 +509,7 @@ declare namespace SocketIO { /** * The underlying Engine.io Socket instance */ - conn: { - - /** - * The ID for this socket - matches Client.id - */ - id: string; - - /** - * The Engine.io Server for this socket - */ - server: any; - - /** - * The ready state for the client. Either 'opening', 'open', 'closing', or 'closed' - */ - readyState: string; - - /** - * The remote IP for this connection - */ - remoteAddress: string; - }; + conn: EngineSocket; /** * The list of rooms that this Socket is currently in, where @@ -613,17 +592,6 @@ declare namespace SocketIO { */ broadcast: Socket; - /** - * Emits an event to this client. If the 'broadcast' flag was set, this will - * emit to all other clients, except for this one - * @param event The event that we want to emit - * @param args Any number of optional arguments to pass with the event. If the - * last argument is a function, it will be called as an ack. The ack should - * take whatever data was sent with the packet - * @return This Socket - */ - emit( event: string, ...args: any[]): Socket; - /** * Targets a room when broadcasting * @param room The name of the room that we're targeting @@ -677,53 +645,6 @@ declare namespace SocketIO { */ disconnect( close?: boolean ): Socket; - /** - * Adds a listener for a particular event. Calling multiple times will add - * multiple listeners - * @param event The event that we're listening for - * @param fn The function to call when we get the event. Parameters depend on the - * event in question - * @return This Socket - */ - on( event: string, fn: Function ): Socket; - - /** - * @see on( event, fn ) - */ - addListener( event: string, fn: Function ): Socket; - - /** - * Adds a listener for a particular event that will be invoked - * a single time before being automatically removed - * @param event The event that we're listening for - * @param fn The function to call when we get the event. Parameters depend on - * the event in question - * @return This Socket - */ - once( event: string, fn: Function ): Socket; - - /** - * Removes a listener for a particular type of event. This will either - * remove a specific listener, or all listeners for this type of event - * @param event The event that we want to remove the listener of - * @param fn The function to remove, or null if we want to remove all functions - * @return This Socket - */ - removeListener( event: string, fn?: Function ): Socket; - - /** - * Removes all event listeners on this object - * @return This Socket - */ - removeAllListeners( event?: string ): Socket; - - /** - * Sets the maximum number of listeners this instance can have - * @param n The max number of listeners we can add to this emitter - * @return This Socket - */ - setMaxListeners( n: number ): Socket; - /** * Returns all the callbacks for a particular event * @param event The event that we're looking for the callbacks of @@ -809,28 +730,7 @@ declare namespace SocketIO { /** * The underlying Engine.io Socket instance */ - conn: { - - /** - * The ID for this socket - matches Client.id - */ - id: string; - - /** - * The Engine.io Server for this socket - */ - server: any; - - /** - * The ready state for the client. Either 'opening', 'open', 'closing', or 'closed' - */ - readyState: string; - - /** - * The remote IP for this connection - */ - remoteAddress: string; - }; + conn: EngineSocket; /** * The ID for this client. Regenerated at every connection @@ -855,4 +755,44 @@ declare namespace SocketIO { */ nsps: {[nsp: string]: Socket}; } + + /** + * A reference to the underlying engine.io Socket connection. + */ + interface EngineSocket extends NodeJS.EventEmitter { + /** + * The ID for this socket - matches Client.id + */ + id: string; + + /** + * The Engine.io Server for this socket + */ + server: any; + + /** + * The ready state for the client. Either 'opening', 'open', 'closing', or 'closed' + */ + readyState: string; + + /** + * The remote IP for this connection + */ + remoteAddress: string; + + /** + * whether the transport has been upgraded + */ + upgraded: boolean; + + /** + * (http.IncomingMessage): request that originated the Socket + */ + request: any; + + /** + * (Transport): transport reference + */ + transport: any; + } } diff --git a/socket.io/socket.io-tests.ts b/types/socket.io/socket.io-tests.ts similarity index 90% rename from socket.io/socket.io-tests.ts rename to types/socket.io/socket.io-tests.ts index ea3d97e21f..23c4a6d996 100644 --- a/socket.io/socket.io-tests.ts +++ b/types/socket.io/socket.io-tests.ts @@ -144,6 +144,22 @@ function testUsingItJustAsACrossBrowserWebSocket() { }); } +function testSocketConnection() { + var io = socketIO.listen(80); + + io.sockets.on('connection', function (socket) { + console.log(socket.client.conn === socket.conn); + console.log(socket.client.request.httpVersion); + console.log(socket.conn.id); + console.log(socket.conn.upgraded); + console.log(socket.conn.readyState); + + socket.on('packet', function(message :string, ping :string){ + console.log(message, ping); + });; + }); +} + function testClosingServerWithCallback() { var io = socketIO.listen(80); io.close(function() { diff --git a/socket.io/tsconfig.json b/types/socket.io/tsconfig.json similarity index 100% rename from socket.io/tsconfig.json rename to types/socket.io/tsconfig.json diff --git a/socketty/index.d.ts b/types/socketty/index.d.ts similarity index 100% rename from socketty/index.d.ts rename to types/socketty/index.d.ts diff --git a/socketty/socketty-tests.ts b/types/socketty/socketty-tests.ts similarity index 100% rename from socketty/socketty-tests.ts rename to types/socketty/socketty-tests.ts diff --git a/socketty/tsconfig.json b/types/socketty/tsconfig.json similarity index 100% rename from socketty/tsconfig.json rename to types/socketty/tsconfig.json diff --git a/sockjs-client/index.d.ts b/types/sockjs-client/index.d.ts similarity index 100% rename from sockjs-client/index.d.ts rename to types/sockjs-client/index.d.ts diff --git a/sockjs-client/sockjs-client-tests.ts b/types/sockjs-client/sockjs-client-tests.ts similarity index 100% rename from sockjs-client/sockjs-client-tests.ts rename to types/sockjs-client/sockjs-client-tests.ts diff --git a/sockjs-client/tsconfig.json b/types/sockjs-client/tsconfig.json similarity index 100% rename from sockjs-client/tsconfig.json rename to types/sockjs-client/tsconfig.json diff --git a/sockjs-node/index.d.ts b/types/sockjs-node/index.d.ts similarity index 100% rename from sockjs-node/index.d.ts rename to types/sockjs-node/index.d.ts diff --git a/sockjs-node/sockjs-node-tests.ts b/types/sockjs-node/sockjs-node-tests.ts similarity index 100% rename from sockjs-node/sockjs-node-tests.ts rename to types/sockjs-node/sockjs-node-tests.ts diff --git a/sockjs-node/tsconfig.json b/types/sockjs-node/tsconfig.json similarity index 100% rename from sockjs-node/tsconfig.json rename to types/sockjs-node/tsconfig.json diff --git a/sockjs/index.d.ts b/types/sockjs/index.d.ts similarity index 100% rename from sockjs/index.d.ts rename to types/sockjs/index.d.ts diff --git a/sockjs/tsconfig.json b/types/sockjs/tsconfig.json similarity index 100% rename from sockjs/tsconfig.json rename to types/sockjs/tsconfig.json diff --git a/solution-center-communicator/index.d.ts b/types/solution-center-communicator/index.d.ts similarity index 100% rename from solution-center-communicator/index.d.ts rename to types/solution-center-communicator/index.d.ts diff --git a/solution-center-communicator/solution-center-communicator-tests.ts b/types/solution-center-communicator/solution-center-communicator-tests.ts similarity index 100% rename from solution-center-communicator/solution-center-communicator-tests.ts rename to types/solution-center-communicator/solution-center-communicator-tests.ts diff --git a/solution-center-communicator/tsconfig.json b/types/solution-center-communicator/tsconfig.json similarity index 100% rename from solution-center-communicator/tsconfig.json rename to types/solution-center-communicator/tsconfig.json diff --git a/sortablejs/index.d.ts b/types/sortablejs/index.d.ts similarity index 100% rename from sortablejs/index.d.ts rename to types/sortablejs/index.d.ts diff --git a/sortablejs/sortablejs-tests.ts b/types/sortablejs/sortablejs-tests.ts similarity index 100% rename from sortablejs/sortablejs-tests.ts rename to types/sortablejs/sortablejs-tests.ts diff --git a/sortablejs/tsconfig.json b/types/sortablejs/tsconfig.json similarity index 100% rename from sortablejs/tsconfig.json rename to types/sortablejs/tsconfig.json diff --git a/soundjs/index.d.ts b/types/soundjs/index.d.ts similarity index 100% rename from soundjs/index.d.ts rename to types/soundjs/index.d.ts diff --git a/soundjs/soundjs-tests.ts b/types/soundjs/soundjs-tests.ts similarity index 100% rename from soundjs/soundjs-tests.ts rename to types/soundjs/soundjs-tests.ts diff --git a/soundjs/tsconfig.json b/types/soundjs/tsconfig.json similarity index 100% rename from soundjs/tsconfig.json rename to types/soundjs/tsconfig.json diff --git a/source-list-map/index.d.ts b/types/source-list-map/index.d.ts similarity index 100% rename from source-list-map/index.d.ts rename to types/source-list-map/index.d.ts diff --git a/source-list-map/source-list-map-tests.ts b/types/source-list-map/source-list-map-tests.ts similarity index 100% rename from source-list-map/source-list-map-tests.ts rename to types/source-list-map/source-list-map-tests.ts diff --git a/source-list-map/tsconfig.json b/types/source-list-map/tsconfig.json similarity index 100% rename from source-list-map/tsconfig.json rename to types/source-list-map/tsconfig.json diff --git a/source-map-support/index.d.ts b/types/source-map-support/index.d.ts similarity index 100% rename from source-map-support/index.d.ts rename to types/source-map-support/index.d.ts diff --git a/source-map-support/source-map-support-tests.ts b/types/source-map-support/source-map-support-tests.ts similarity index 100% rename from source-map-support/source-map-support-tests.ts rename to types/source-map-support/source-map-support-tests.ts diff --git a/source-map-support/tsconfig.json b/types/source-map-support/tsconfig.json similarity index 100% rename from source-map-support/tsconfig.json rename to types/source-map-support/tsconfig.json diff --git a/source-map/index.d.ts b/types/source-map/index.d.ts similarity index 100% rename from source-map/index.d.ts rename to types/source-map/index.d.ts diff --git a/source-map/source-map-tests.ts b/types/source-map/source-map-tests.ts similarity index 100% rename from source-map/source-map-tests.ts rename to types/source-map/source-map-tests.ts diff --git a/source-map/tsconfig.json b/types/source-map/tsconfig.json similarity index 100% rename from source-map/tsconfig.json rename to types/source-map/tsconfig.json diff --git a/space-pen/index.d.ts b/types/space-pen/index.d.ts similarity index 100% rename from space-pen/index.d.ts rename to types/space-pen/index.d.ts diff --git a/space-pen/space-pen-tests.ts b/types/space-pen/space-pen-tests.ts similarity index 100% rename from space-pen/space-pen-tests.ts rename to types/space-pen/space-pen-tests.ts diff --git a/space-pen/tsconfig.json b/types/space-pen/tsconfig.json similarity index 100% rename from space-pen/tsconfig.json rename to types/space-pen/tsconfig.json diff --git a/types/sparkpost/index.d.ts b/types/sparkpost/index.d.ts new file mode 100644 index 0000000000..fc6e408949 --- /dev/null +++ b/types/sparkpost/index.d.ts @@ -0,0 +1,1773 @@ +// Type definitions for sparkpost 2.1 +// Project: https://github.com/SparkPost/node-sparkpost +// Definitions by: Joshua DeVinney , Bond +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as Request from "request"; +import * as Http from "http"; + +declare class SparkPost { + /** Specifying an inbound domain enables you to customize the address to which inbound messages are sent. */ + inboundDomains: { + /** + * List all your inbound domains. + * @param callback The request callback with Domain results array + */ + list(callback: SparkPost.ResultsCallback): void; + /** + * List all your inbound domains. + * @returns Promise The Domain results array + */ + list(): SparkPost.ResultsPromise; + /** + * Retrieve an inbound domain by specifying its domain name in the URI path. + * @param domain Domain name + * @param callback The request callback with Domain results + */ + get(domain: string, callback: SparkPost.ResultsCallback): void; + /** + * Retrieve an inbound domain by specifying its domain name in the URI path. + * @param domain Domain name + * @returns Promise The Domain results + */ + get(domain: string): SparkPost.ResultsPromise; + /** + * Create an inbound domain by providing an inbound domains object as the POST request body. + * @param createOpts a hash of [inbound domain attributes]{@link https://developers.sparkpost.com/api/inbound-domains#header-inbound-domains-attributes} + * @param callback The request callback + */ + create(createOpts: SparkPost.CreateOpts, callback: SparkPost.Callback): void; + /** + * Create an inbound domain by providing an inbound domains object as the POST request body. + * @param createOpts a hash of [inbound domain attributes]{@link https://developers.sparkpost.com/api/inbound-domains#header-inbound-domains-attributes} + * @returns Promise void + */ + create(createOpts: SparkPost.CreateOpts): Promise; + /** + * Delete an inbound domain by specifying its domain name in the URI path. + * @param domain Domain name + * @param callback The request callback + */ + delete(domain: string, callback: SparkPost.Callback): void; + /** + * Delete an inbound domain by specifying its domain name in the URI path. + * @param domain Domain name + * @returns Promise void + */ + delete(domain: string): Promise; + }; + /** The Message Events API provides the means to search the raw events generated by SparkPost. */ + messageEvents: { + /** + * Retrieves list of message events according to given params + * @param parameters Query parameters + * @param callback The request callback with MessageEvent results array + */ + search(parameters: SparkPost.MessageEventParameters, callback: SparkPost.ResultsCallback): void; + /** + * Retrieves list of message events according to given params + * @param parameters Query parameters + * @returns Promise The MessageEvent results array + */ + search(parameters: SparkPost.MessageEventParameters): SparkPost.ResultsPromise; + }; + /** A recipient list is a collection of recipients that can be used in a transmission. */ + recipientLists: { + /** + * List a summary of all recipient lists. The recipients for each list are not included in the results. + * To retrieve recipient details, use the [Retrieve a Recipient List endpoint]{@link https://developers.sparkpost.com/api/recipient-lists.html#recipient-lists-retrieve-get}, + * and specify the recipient list. + * + * @param callback The request callback with RecipientList results array + */ + list(callback: SparkPost.ResultsCallback): void; + /** + * List a summary of all recipient lists. The recipients for each list are not included in the results. + * To retrieve recipient details, use the [Retrieve a Recipient List endpoint]{@link https://developers.sparkpost.com/api/recipient-lists.html#recipient-lists-retrieve-get}, + * and specify the recipient list. + * + * @returns Promise The RecipientList results array + */ + list(): SparkPost.ResultsPromise; + /** + * Retrieve details about a specified recipient list by specifying its id in the URI path. + * To retrieve the recipients contained in a list, the show_recipients parameter must be set to true. + * + * @param {string} id + * @param {{ show_recipients?: boolean }} specifies whether to retrieve the recipients. Defaults to false + * @param {SparkPost.Callback} callback + */ + get(id: string, options: { show_recipients?: boolean }, callback: SparkPost.Callback): void; + /** + * Retrieve details about a specified recipient list by specifying its id in the URI path. + * To retrieve the recipients contained in a list, the show_recipients parameter must be set to true. + * + * @param {string} id + * @param {SparkPost.Callback} callback + */ + get(id: string, callback: SparkPost.Callback): void; + /** + * Retrieve details about a specified recipient list by specifying its id in the URI path. + * To retrieve the recipients contained in a list, the show_recipients parameter must be set to true. + * + * @param {string} id + * @param {{ show_recipients?: boolean }} [options] specifies whether to retrieve the recipients. Defaults to false + * @returns {Promise} + */ + get(id: string, options?: { show_recipients?: boolean }): SparkPost.ResultsPromise; + /** + * Create a recipient list by providing a recipient list object as the POST request body. + * At a minimum, the “recipients” array is required, which must contain a valid “address”. + * If the recipient list “id” is not provided in the POST request body, one will be generated and returned in the results body. + * Use the num_rcpt_errors parameter to limit the number of recipient errors returned. + * @param options The create options + * @param callback The request callback with metadata results + */ + create(options: SparkPost.CreateRecipientList, callback: SparkPost.ResultsCallback): void; + /** + * Create a recipient list by providing a recipient list object as the POST request body. + * At a minimum, the “recipients” array is required, which must contain a valid “address”. + * If the recipient list “id” is not provided in the POST request body, one will be generated and returned in the results body. + * Use the num_rcpt_errors parameter to limit the number of recipient errors returned. + * @param options The create options + * @returns Promise metadata results + */ + create(options: SparkPost.CreateRecipientList): SparkPost.ResultsPromise; + /** + * Update an existing recipient list by specifying its ID in the URI path and use a recipient list object as the PUT request body. + * Use the num_rcpt_errors parameter to limit the number of recipient errors returned. + * + * @param {string} id Identifier of the recipient list + * @param options The update options + * @param callback The request callback with metadata results + */ + update(id: string, options: SparkPost.UpdateRecipientList, callback: SparkPost.ResultsCallback): void; + /** + * Update an existing recipient list by specifying its ID in the URI path and use a recipient list object as the PUT request body. + * Use the num_rcpt_errors parameter to limit the number of recipient errors returned. + * + * @param {string} id Identifier of the recipient list + * @param {SparkPost.UpdateRecipientList} options + * @returns {SparkPost.ResultsPromise} + */ + update(id: string, options: SparkPost.UpdateRecipientList): SparkPost.ResultsPromise; + /** + * Permanently delete the specified recipient list. + * + * @param id The list id + * @param callback The request callback + */ + delete(id: string, callback: SparkPost.Callback): void; + /** + * Permanently delete the specified recipient list. + * + * @param id The list id + * @returns Promise void + */ + delete(id: string): Promise; + }; + /** Relay Webhooks are a way to instruct SparkPost to accept inbound email on your behalf and forward it to you over HTTP for your own consumption. */ + relayWebhooks: { + /** + * List all your relay webhooks. + * @param callback The request callback with RelayWebhook results array + */ + list(callback: SparkPost.ResultsCallback): void; + /** + * List all your relay webhooks. + * @returns Promise The RelayWebhook results array + */ + list(): SparkPost.ResultsPromise; + /** + * Delete a relay webhook by specifying the webhook ID in the URI path. + * @param relayWebhookId The webhook id + * @param callback The request callback with RelayWebhook results + */ + get(relayWebhookId: string, callback: SparkPost.ResultsCallback): void; + /** + * Delete a relay webhook by specifying the webhook ID in the URI path. + * @param relayWebhookId The webhook id + * @returns Promise The RelayWebhook results + */ + get(relayWebhookId: string): SparkPost.ResultsPromise; + /** + * Create a relay webhook by providing a relay webhooks object as the POST request body. + * @param options The create options + * @param callback The request callback with webhook id results + */ + create(options: SparkPost.RelayWebhook, callback: SparkPost.ResultsCallback<{ id: string }>): void; + /** + * Create a relay webhook by providing a relay webhooks object as the POST request body. + * @param options The create options + * @returns Promise The webhook id results + */ + create(options: SparkPost.RelayWebhook): SparkPost.ResultsPromise<{ id: string }>; + /** + * Update a relay webhook by specifying the webhook ID in the URI path. + * @param options The update options + * @param callback The request callback with webhook id results + */ + update(id: string, options: SparkPost.UpdateRelayWebhook, callback: SparkPost.ResultsCallback<{ id: string }>): void; + /** + * Update a relay webhook by specifying the webhook ID in the URI path. + * @param options The update options + * @returns Promise The webhook id results + */ + update(id: string, options: SparkPost.UpdateRelayWebhook): SparkPost.ResultsPromise<{ id: string }>; + /** + * Delete a relay webhook by specifying the webhook ID in the URI path. + * @param relayWebhookId The webhook id + * @param callback The request callback + */ + delete(relayWebhookId: string, callback: SparkPost.Callback): void; + /** + * Delete a relay webhook by specifying the webhook ID in the URI path. + * @param relayWebhookId The webhook id + * @returns Promise void + */ + delete(relayWebhookId: string): Promise; + }; + sendingDomains: { + /** + * List an overview of all sending domains in the system. + * @param callback The request callback with SendingDomain results array + */ + list(callback: SparkPost.ResultsCallback): void; + /** + * List an overview of all sending domains in the system. + * + * @returns The SendingDomain results array + */ + list(): SparkPost.ResultsPromise; + /** + * Retrieve a sending domain by specifying its domain name in the URI path. The response includes details about its DKIM key configuration. + * @param domain The domain + * @param callback The request callback with SendingDomain results + */ + get(domain: string, callback: SparkPost.ResultsCallback): void; + /** + * Retrieve a sending domain by specifying its domain name in the URI path. The response includes details about its DKIM key configuration. + * + * @param domain The domain + * @returns Promise The SendingDomain results + */ + get(domain: string): SparkPost.ResultsPromise; + /** + * Create a sending domain by providing a sending domain object as the POST request body. + * @param options The create options + * @param callback The request callback with basic info results + */ + create(options: SparkPost.CreateSendingDomain, callback: SparkPost.ResultsCallback<{ message: string, domain: string }>): void; + /** + * Create a sending domain by providing a sending domain object as the POST request body. + * + * @param options The create options + * @returns Promise The basic info results + */ + create(options: SparkPost.CreateSendingDomain): SparkPost.ResultsPromise<{ message: string, domain: string }>; + /** + * Update the attributes of an existing sending domain by specifying its domain name in the URI path and use a sending domain object as the PUT request body. + * @param domain The domain + * @param updateOpts The update options + * @param callback The request callback with basic info results + */ + update(domain: string, updateOpts: SparkPost.UpdateSendingDomain, callback: SparkPost.ResultsCallback<{ message: string, domain: string }>): void; + /** + * Update the attributes of an existing sending domain by specifying its domain name in the URI path and use a sending domain object as the PUT request body. + * + * @param domain The domain + * @param updateOpts The update options + * @returns Promise The basic info results + */ + update(domain: string, updateOpts: SparkPost.UpdateSendingDomain): SparkPost.ResultsPromise<{ message: string, domain: string }>; + /** + * Delete an existing sending domain. + * @param domain The domain + * @param callback The request callback + */ + delete(domain: string, callback: SparkPost.Callback): void; + /** + * Delete an existing sending domain. + * + * @param domain The domain + * @returns Promise void + */ + delete(domain: string): Promise; + /** + * Verify a Sending Domain + * @param domain The domain + * @param options a hash of [verify attributes]{@link https://developers.sparkpost.com/api/sending-domains#header-verify-attributes} + * @param callback The request callback with verify results + */ + verify(domain: string, options: SparkPost.VerifyOptions, callback: SparkPost.ResultsCallback): void; + /** + * Verify a Sending Domain + * + * @param domain The domain + * @param options a hash of [verify attributes]{@link https://developers.sparkpost.com/api/sending-domains#header-verify-attributes} + * @returns Promise The verify results + */ + verify(domain: string, options: SparkPost.VerifyOptions): SparkPost.ResultsPromise; + }; + subaccounts: { + /** + * Endpoint for retrieving a list of your subaccounts. + * This endpoint only returns information about the subaccounts themselves, not the data associated with the subaccount. + * @param callback The request callback with subaccount information results array + */ + list(callback: SparkPost.ResultsCallback): void; + /** + * Endpoint for retrieving a list of your subaccounts. + * This endpoint only returns information about the subaccounts themselves, not the data associated with the subaccount. + * + * @returns Promise The subaccount information results array + */ + list(): SparkPost.ResultsPromise; + /** + * Get details about a specified subaccount by its id + * + * @param id the id of the subaccount you want to look up + * @param callback The request callback with subaccount information results + */ + get(id: string | number, callback: SparkPost.ResultsCallback): void; + /** + * Get details about a specified subaccount by its id + * + * @param id the id of the subaccount you want to look up + * @returns Promise The subaccount information results + */ + get(id: string | number): SparkPost.ResultsPromise; + /** + * Provisions a new subaccount and an initial subaccount API key. + * @param subaccount The create options + * @param callback The request callback with basic subaccount information results + */ + create(subaccount: SparkPost.CreateSubaccount, callback: SparkPost.ResultsCallback): void; + /** + * Provisions a new subaccount and an initial subaccount API key. + * + * @param subaccount The create options + * @returns Promise The basic subaccount information results + */ + create(subaccount: SparkPost.CreateSubaccount): SparkPost.ResultsPromise; + /** + * Update an existing subaccount’s information. + * + * @param id the id of the subaccount you want to update + * @param subaccount an object of [updatable subaccount attributes]{@link https://developers.sparkpost.com/api/subaccounts#header-request-body-attributes-1} + * @param callback The request callback with webhook id results + */ + update(id: string, subaccount: SparkPost.UpdateSubaccount, callback: SparkPost.ResultsCallback<{ message: string }>): void; + /** + * Update an existing subaccount’s information. + * + * @param id the id of the subaccount you want to update + * @param subaccount an object of [updatable subaccount attributes]{@link https://developers.sparkpost.com/api/subaccounts#header-request-body-attributes-1} + * @returns Promise The webhook id results + */ + update(id: string, subaccount: SparkPost.UpdateSubaccount): SparkPost.ResultsPromise<{ message: string }>; + }; + suppressionList: { + /** + * List all entries in your suppression list, filtered by an optional set of search parameters. + * + * @param {SparkPost.ResultsCallback} callback The request callback with supression lists. + */ + list(callback: SparkPost.ResultsCallback): void; + /** + * List all entries in your suppression list, filtered by an optional set of search parameters. + * + * @param {SparkPost.SupressionSearchParameters} parameters an object of [search parameters]{@link https://developers.sparkpost.com/api/suppression-list#suppression-list-search-get} + * @param {SparkPost.ResultsCallback} callback The request callback with supression lists. + */ + list(parameters: SparkPost.SupressionSearchParameters, callback: SparkPost.ResultsCallback): void; + /** + * List all entries in your suppression list, filtered by an optional set of search parameters. + * + * @param {SparkPost.SupressionSearchParameters} [parameters] an object of [search parameters]{@link https://developers.sparkpost.com/api/suppression-list#suppression-list-search-get} + * @returns {Promise} Promise The supression lists + */ + list(parameters?: SparkPost.SupressionSearchParameters): SparkPost.ResultsPromise; + /** + * Retrieve an entry by recipient email. + * + * @param {string} email address to check + * @returns void + */ + get(email: string, callback: SparkPost.ResultsCallback): void; + /** + * Retrieve an entry by recipient email. + * + * @param {string} email address to check + * @returns void + */ + get(email: string): SparkPost.ResultsPromise; + /** + * Delete a recipient from the list by specifying the recipient’s email address in the URI path. + * + * @param {string} email Recipient email address + * @param callback + */ + delete(email: string, callback: SparkPost.Callback): void; + /** + * Delete a recipient from the list by specifying the recipient’s email address in the URI path. + * + * @param {string} email Recipient email address + * @returns {Promise} void + */ + delete(email: string): Promise; + /** + * Insert or update one or many entries. + * + * @param listEntries The suppression entry list + * @param callback The request callback + */ + upsert(listEntries: SparkPost.CreateSupressionListEntry | SparkPost.CreateSupressionListEntry[], callback: SparkPost.ResultsCallback<{ message: string }>): void; + /** + * Insert or update one or many entries. + * + * @param {(SparkPost.CreateSupressionListEntry | SparkPost.CreateSupressionListEntry[])} listEntries The suppression entry list + * @returns {Promise<{ message: string }>} + */ + upsert(listEntries: SparkPost.CreateSupressionListEntry | SparkPost.CreateSupressionListEntry[]): SparkPost.ResultsPromise<{ message: string }>; + }; + templates: { + /** + * List a summary of all templates. + * @param callback The request callback with TemplateMeta results array + */ + list(callback: SparkPost.ResultsCallback): void; + /** + * List a summary of all templates. + * + * @returns {SparkPost.ResultsPromise} The TemplateMeta results array + */ + list(): SparkPost.ResultsPromise; + /** + * Retrieve details about a specified template by its id + * + * @param id the id of the template you want to look up + * @param options specifies a draft or published template + * @param callback The request callback with Template results + */ + get(id: string, options: { draft?: boolean }, callback: SparkPost.ResultsCallback): void; + /** + * Retrieve details about a specified template by its id + * + * @param {string} id the id of the template you want to look up + * @param {SparkPost.ResultsCallback} callback The request callback with Template results + */ + get(id: string, callback: SparkPost.ResultsCallback): void; + /** + * Retrieve details about a specified template by its id + * + * @param {string} id the id of the template you want to look up + * @param {{ draft?: boolean }} [options] specifies a draft or published template + * @returns {SparkPost.ResultsPromise} The Template results + */ + get(id: string, options?: { draft?: boolean }): SparkPost.ResultsPromise; + /** + * Create a new template + * + * @param template an object of [template attributes]{@link https://developers.sparkpost.com/api/templates#header-template-attributes} + * @param callback The request callback with template id results + */ + create(template: SparkPost.CreateTemplate, callback: SparkPost.ResultsCallback<{ id: string }>): void; + /** + * Create a new template + * + * @param {SparkPost.CreateTemplate} template an object of [template attributes]{@link https://developers.sparkpost.com/api/templates#header-template-attributes} + * @returns {SparkPost.ResultsPromise<{ id: string }>} The template id results + */ + create(template: SparkPost.CreateTemplate): SparkPost.ResultsPromise<{ id: string }>; + /** + * Update an existing template + * + * @param {string} id the id of the template you want to update + * @param template an object of [template attributes]{@link https://developers.sparkpost.com/api/templates#header-template-attributes} + * @param options The create options. If true, directly overwrite the existing published template. If false, create a new draft + * @param callback The request callback with template id results + */ + update(id: string, template: SparkPost.UpdateTemplate, options: { + update_published?: boolean; + }, callback: SparkPost.ResultsCallback<{ id: string }>): void; + /** + * Update an existing template + * + * @param {string} id the id of the template you want to update + * @param {SparkPost.UpdateTemplate} template an object of [template attributes]{@link https://developers.sparkpost.com/api/templates#header-template-attributes} + * @param {SparkPost.ResultsCallback<{ id: string }>} callback The request callback with template id results + */ + update(id: string, template: SparkPost.UpdateTemplate, + callback: SparkPost.ResultsCallback<{ id: string }>): void; + /** + * Update an existing template + * + * @param {string} id the id of the template you want to update + * @param {SparkPost.UpdateTemplate} template an object of [template attributes]{@link https://developers.sparkpost.com/api/templates#header-template-attributes} + * @param {{ + * update_published?: boolean; + * }} [options] If true, directly overwrite the existing published template. If false, create a new draft + * @returns {SparkPost.ResultsPromise<{ id: string }>} The template id results + */ + update(id: string, template: SparkPost.UpdateTemplate, options?: { + update_published?: boolean; + }): SparkPost.ResultsPromise<{ id: string }>; + /** + * Delete an existing template + * @param id The template id + * @param callback The request callback + */ + delete(id: string, callback: SparkPost.Callback): void; + /** + * Delete an existing template + * + * @param id The template id + * @returns Promise void + */ + delete(id: string): Promise; + /** + * Preview the most recent version of an existing template by id + * + * @param {string} id the id of the template you want to look up + * @param options The preview options + * @param callback The request callback with webhook id results + */ + preview(id: string, options: { substitution_data?: any, draft?: boolean }, callback: SparkPost.ResultsCallback): void; + /** + * Preview the most recent version of an existing template by id + * + * @param {string} id the id of the template you want to look up + * @param {SparkPost.ResultsCallback} callback The request callback with webhook id results + */ + preview(id: string, callback: SparkPost.ResultsCallback): void; + /** + * Preview the most recent version of an existing template by id + * + * @param {string} id the id of the template you want to look up + * @param {{ substitution_data: any, draft?: boolean }} [options] + * @returns {SparkPost.ResultsPromise} The webhook id results + */ + preview(id: string, options?: { substitution_data?: any, draft?: boolean }): SparkPost.ResultsPromise; + }; + transmissions: { + /** + * List an overview of all transmissions in the account + * + * @param callback The request callback with Transmission results array + */ + list(callback: SparkPost.ResultsCallback): void; + /** + * List an overview of all transmissions in the account + * + * @param {{ campaign_id?: string, template_id: string }} options + * @param {SparkPost.ResultsCallback} callback The request callback with Transmission results array + */ + list(options: { campaign_id?: string, template_id?: string }, callback: SparkPost.ResultsCallback): void; + /** + * List an overview of all transmissions in the account + * + * @param {{ campaign_id?: string, template_id: string }} [options] + * @returns {SparkPost.ResultsPromise} The Transmission results array + */ + list(options?: { campaign_id?: string, template_id?: string }): SparkPost.ResultsPromise; + /** + * Retrieve the details about a transmission by its ID + * + * @param id The id of the transmission you want to look up + * @param callback The request callback with Transmission results + */ + get(transmissionID: string, callback: SparkPost.ResultsCallback): void; + /** + * Retrieve the details about a transmission by its ID + * + * @param {string} id The id of the transmission you want to look up + * @returns {SparkPost.ResultsPromise} The Transmission results + */ + get(id: string): SparkPost.ResultsPromise; + /** + * Sends a message by creating a new transmission + * + * @param transmission an object of [transmission attributes]{@link https://developers.sparkpost.com/api/transmissions#header-transmission-attributes} + * @param options The create options. Specify maximum number of recipient errors returned + * @param callback The request callback with metadata and id results + */ + send(transmission: SparkPost.CreateTransmission, options: { num_rcpt_errors?: number }, callback: SparkPost.ResultsCallback<{ + total_rejected_recipients: number; + total_accepted_recipients: number; + id: string; + }>): void; + /** + * + * + * @param {SparkPost.CreateTransmission} transmission an object of [transmission attributes]{@link https://developers.sparkpost.com/api/transmissions#header-transmission-attributes} + * @param {SparkPost.ResultsCallback<{ + * total_rejected_recipients: number; + * total_accepted_recipients: number; + * id: string; + * }>} callback The request callback with metadata and id results + */ + send(transmission: SparkPost.CreateTransmission, callback: SparkPost.ResultsCallback<{ + total_rejected_recipients: number; + total_accepted_recipients: number; + id: string; + }>): void; + /** + * Sends a message by creating a new transmission + * + * @param {SparkPost.CreateTransmission} transmission an object of [transmission attributes]{@link https://developers.sparkpost.com/api/transmissions#header-transmission-attributes} + * @param {{ num_rcpt_errors?: number }} [options] specify maximum number of recipient errors returned + * @returns {SparkPost.ResultsPromise<{ + * total_rejected_recipients: number; + * total_accepted_recipients: number; + * id: string; + * }>} The metadata and id results + */ + send(transmission: SparkPost.CreateTransmission, options?: { num_rcpt_errors?: number }): SparkPost.ResultsPromise<{ + total_rejected_recipients: number; + total_accepted_recipients: number; + id: string; + }>; + }; + webhooks: { + /** + * List currently existing webhooks. + * @param callback The request callback with RelayWebhook results array + */ + list(callback: SparkPost.ResultsCallback>): void; + /** + * List currently existing webhooks. + * @param options Object containing optional timezone + * @param callback The request callback with RelayWebhook results array + */ + list(options: { timezone?: string }, callback: SparkPost.ResultsCallback>): void; + /** + * List currently existing webhooks.the timezone to use for the last_successful and last_failure properties | Default: UTC + * + * @param {{ timezone?: string }} [options] + * @returns {(SparkPost.ResultsPromise>)} + */ + list(options?: { timezone?: string }): SparkPost.ResultsPromise>; + /** + * Retrieve details about a specified webhook by its id + * + * @param {string} id The id of the webhook to get + * @param options Object containing id and optional timezone + * @param callback The request callback with RelayWebhook results + */ + get(id: string, options: { timezone?: string }, callback: SparkPost.ResultsCallback): void; + /** + * Retrieve details about a specified webhook by its id + * + * @param {string} id The id of the webhook to get + * @param {(SparkPost.ResultsCallback)} callback The request callback with RelayWebhook results + */ + get(id: string, callback: SparkPost.ResultsCallback): void; + /** + * Retrieve details about a specified webhook by its id + * + * @param {string} id The id of the webhook to get + * @param {{ timezone?: string }} [options] the timezone to use for the last_successful and last_failure properties + * @returns {(SparkPost.ResultsPromise)} The RelayWebhook results + */ + get(id: string, options?: { timezone?: string }): SparkPost.ResultsPromise; + /** + * Create a new webhook + * + * @param options a hash of [webhook attributes]{@link https://developers.sparkpost.com/api/webhooks#header-webhooks-object-properties} + * @param callback The request callback with webhook id results + */ + create(options: SparkPost.Webhook, callback: SparkPost.ResultsCallback): void; + /** + * Create a new webhook + * + * @param {SparkPost.Webhook} options a hash of [webhook attributes]{@link https://developers.sparkpost.com/api/webhooks#header-webhooks-object-properties} + * @returns {(SparkPost.ResultsPromise)} The webhook id results + */ + create(options: SparkPost.Webhook): SparkPost.ResultsPromise; + /** + * Update an existing webhook + * @param {string} id the id of the webhook to update + * @param options A hash of [webhook attribues]{@link https://developers.sparkpost.com/api/webhooks#header-webhooks-object-properties} + * @param callback The request callback with webhook id results + */ + update(id: string, options: SparkPost.UpdateWebhook, callback: SparkPost.ResultsCallback): void; + /** + * Update an existing webhook + * + * @param {string} id + * @param {SparkPost.UpdateWebhook} options + * @returns {(SparkPost.ResultsPromise)} + */ + update(id: string, options: SparkPost.UpdateWebhook): SparkPost.ResultsPromise; + /** + * Delete an existing webhook + * @param id The webhook id + * @param callback The request callback + */ + delete(id: string, callback: SparkPost.Callback): void; + /** + * Delete an existing webhook. + * + * @param {string} id The id of the webhook to delete + * @returns {Promise} + */ + delete(id: string): Promise; + /** + * Sends an example message event batch from the Webhook API to the target URL + * + * @param {string} id The id of the webhook to validate + * @param options the message (payload) to send to the webhook consumer + * @param callback The request callback with validation results + */ + validate(id: string, options: { message: any }, callback: SparkPost.ResultsCallback<{ + msg: string; + response: { + status: number; + headers: any; + body: string; + } + }>): void; + /** + * Sends an example message event batch from the Webhook API to the target URL. + * + * @param {string} id The id of the webhook to validate + * @param {{ message: any }} options The message (payload) to send to the webhook consumer + * @returns {SparkPost.ResultsPromise<{ + * msg: string; + * response: { + * status: number; + * headers: any; + * body: string; + * } + * }>} The validation results + */ + validate(id: string, options: { message: any }): SparkPost.ResultsPromise<{ + msg: string; + response: { + status: number; + headers: any; + body: string; + } + }>; + /** + * Gets recent status information about a webhook. + * + * @param {string} id The id of the webhook + * @param options An optional limit that specifies the maximum number of results to return. Defaults to 1000 + * @param callback The request callback with status results + */ + getBatchStatus(id: string, options: { limit?: number }, callback: SparkPost.ResultsCallback<{ + batch_id: string; + ts: string; + attempts: number; + response_code: number; + }[]>): void; + /** + * Gets recent status information about a webhook. + * + * @param {string} id The id of the webhook + * @param {SparkPost.ResultsCallback<{ + * batch_id: string; + * ts: string; + * attempts: number; + * response_code: number; + * }[]>} callback The request callback with status results + */ + getBatchStatus(id: string, callback: SparkPost.ResultsCallback<{ + batch_id: string; + ts: string; + attempts: number; + response_code: number; + }[]>): void; + /** + * Gets recent status information about a webhook. + * + * @param {string} id The id of the webhook + * @param {{ limit?: number }} Maximum number of results to return. Defaults to 1000 + * @returns {SparkPost.ResultsPromise<{ + * batch_id: string; + * ts: string; + * attempts: number; + * response_code: number; + * }[]>} The status results + */ + getBatchStatus(id: string, options: { limit?: number }): SparkPost.ResultsPromise<{ + batch_id: string; + ts: string; + attempts: number; + response_code: number; + }[]>; + /** + * Lists descriptions of the events, event types, and event fields that could be included in a Webhooks post to your target URL. + * @param callback The request callback containing documentation results + */ + getDocumentation(callback: SparkPost.ResultsCallback): void; + /** + * Lists descriptions of the events, event types, and event fields that could be included in a Webhooks post to your target URL. + * + * @returns {SparkPost.ResultsPromise} The documentation results + */ + getDocumentation(): SparkPost.ResultsPromise; + /** + * List an example of the event data that will be posted by a Webhook for the specified events. + * @param callback The request callback containing examples + */ + getSamples(callback: SparkPost.Callback): void; + /** + * List an example of the event data that will be posted by a Webhook for the specified events. + * @param options The optional event name + * @param callback The request callback containing examples + */ + getSamples(options: { events?: string }, callback: SparkPost.Callback): void; + /** + * List an example of the event data that will be posted by a Webhook for the specified events. + * + * @param {{ events?: string }} options [event types]{@link https://support.sparkpost.com/customer/portal/articles/1976204} for which to get a sample payload + * Default: all event types returned + * @returns {Promise>} + */ + getSamples(options?: { events?: string }): Promise>; + }; + + /** + * The official Node.js binding for your favorite SparkPost APIs! + * @param apiKey A passed in apiKey will take precedence over an environment variable + * @param options Additional options + */ + constructor(apiKey?: string, options?: SparkPost.ConstructorOptions); + + request(options: Request.Options, callback: SparkPost.Callback): void; + request(options: Request.Options): Promise>; + get(options: Request.Options, callback: SparkPost.Callback): void; + get(options: Request.Options): Promise>; + post(options: Request.Options, callback: SparkPost.Callback): void; + post(options: Request.Options): Promise>; + put(options: Request.Options, callback: SparkPost.Callback): void; + put(options: Request.Options): Promise>; + delete(options: Request.Options, callback: SparkPost.Callback): void; + delete(options: Request.Options): Promise>; +} + +declare namespace SparkPost { + + export interface ErrorWithDescription { + message: string; + code: string; + description: string; + } + export interface ErrorWithParam { + message: string; + param: string; + value: string | null; + } + export interface SparkPostError extends Error { + name: "SparkPostError"; + errors: ErrorWithDescription[] | ErrorWithParam[]; + statusCode: number; + } + + export interface ConstructorOptions { + origin?: string; + endpoint?: string; + apiVersion?: string; + headers?: any; + } + + export interface Response extends Http.IncomingMessage { + body: T; + } + export interface Callback { + (err: Error | SparkPostError | null, res: Response): void; + } + export type ResultsCallback = Callback<{ results: T }>; + export type ResultsPromise = Promise<{ results: T }>; + + export interface Domain { + domain: string; + } + + export interface MessageEvent { + /** Type of event this record describes */ + type: string; + /** Classification code for a given message (see [Bounce Classification Codes](https://support.sparkpost.com/customer/portal/articles/1929896)) */ + bounce_class: string; + /** Campaign of which this message was a part */ + campaign_id: string; + /** SparkPost-customer identifier through which this message was sent */ + customer_id: string; + /** Protocol by which SparkPost delivered this message */ + delv_method: string; + /** Token of the device / application targeted by this PUSH notification message. Applies only when delv_method is gcm or apn. */ + device_token: string; + /** Error code by which the remote server described a failed delivery attempt */ + error_code: string; + /** IP address of the host to which SparkPost delivered this message; in engagement events, the IP address of the host where the HTTP request originated */ + ip_address: string; + /** SparkPost-cluster-wide unique identifier for this message */ + message_id: string; + /** Sender address used on this message"s SMTP envelope */ + msg_from: string; + /** Message"s size in bytes */ + msg_size: string; + /** Number of failed attempts before this message was successfully delivered; when the first attempt succeeds, zero */ + num_retries: string; + /** Metadata describing the message recipient */ + rcpt_meta: any; + /** Tags applied to the message which generated this event */ + rcpt_tags: string[]; + /** Recipient address used on this message"s SMTP envelope */ + rcpt_to: string; + /** Indicates that a recipient address appeared in the Cc or Bcc header or the archive JSON array */ + rcpt_type: string; + /** Unmodified, exact response returned by the remote server due to a failed delivery attempt */ + raw_reason: string; + /** Canonicalized text of the response returned by the remote server due to a failed delivery attempt */ + reason: string; + /** Domain receiving this message */ + routing_domain: string; + /** Subject line from the email header */ + subject: string; + /** Slug of the template used to construct this message */ + template_id: string; + /** Version of the template used to construct this message */ + template_version: string; + /** Event date and time formatted as: YYYY-MM-DDTHH:MM:SS.SSS±hh:mm */ + timestamp: string; + /** Transmission which originated this message */ + transmission_id: string; + } + + export interface MessageEventParameters { + /** delimited list of bounce classification codes to search. (See Bounce Classification Codes.) */ + bounce_classes?: Array | string | number; + /** delimited list of campaign ID’s to search (i.e. the campaign id used during creation of a transmission). */ + campaign_ids?: string[] | string; + /** Specifies the delimiter for query parameter lists */ + delimiter?: string; + /** delimited list of event types to search. Defaults to all event types. */ + events?: string[] | string; + /** delimited list of friendly from emails to search. */ + friendly_froms?: string[] | string; + /** Datetime in format of YYYY-MM-DDTHH:MM. */ + from?: string; + /** delimited list of message ID’s to search. */ + message_ids?: string[] | string; + /** The results page number to return. Used with per_page for paging through results. */ + page?: number; + /** Number of results to return per page. Must be between 1 and 10,000 (inclusive). */ + per_page?: number; + /** Bounce/failure/rejection reason that will be matched using a wildcard (e.g., %reason%). */ + reason?: string[] | string; + /** delimited list of recipients to search. */ + recipients?: string[] | string; + /** delimited list of subaccount ID’s to search. */ + subaccounts?: number[] | number; + /** delimited list of template ID’s to search. */ + template_ids?: string[] | string; + /** Standard timezone identification string. */ + timezone?: string; + /** Datetime in format of YYYY-MM-DDTHH:MM. */ + to?: string; + /** delimited list of transmission ID’s to search (i.e. id generated during creation of a transmission). */ + transmission_ids?: string[] | string; + } + + export interface RecipientListMetadata { + total_rejected_recipients: number; + total_accepted_recipients: number; + id: string; + name: string; + } + + export interface RecipientList { + /** Short, unique, recipient list identifier */ + id: string; + /** Short, pretty/readable recipient list display name, not required to be unique */ + name: string; + /** Detailed description of the recipient list */ + description: string; + /** Recipient list attribute object */ + attributes: any; + /** Number of accepted recipients */ + total_accepted_recipients: number; + } + export interface RecipientListWithRecipients extends RecipientList { + /** Array of recipient objects */ + recipients: Recipient[]; + } + + export interface CreateRecipientList { + /** Short, unique, recipient list identifier */ + id?: string; + /** Short, pretty/readable recipient list display name, not required to be unique */ + name?: string; + /** Detailed description of the recipient list */ + description?: string; + /** Recipient list attribute object */ + attributes?: any; + /** limit the number of recipient errors returned. */ + num_rcpt_errors?: number; + /** Array of recipient objects */ + recipients: Recipient[]; + } + export interface UpdateRecipientList { + /** Short, unique, recipient list identifier */ + id?: string; + /** Short, pretty/readable recipient list display name, not required to be unique */ + name?: string; + /** Detailed description of the recipient list */ + description?: string; + /** Recipient list attribute object */ + attributes?: any; + /** Array of recipient objects */ + recipients: Recipient[]; + } + + export interface BaseRecipient { + /** SparkPost Enterprise API only. Email to use for envelope FROM. */ + return_path?: string; + /** Array of text labels associated with a recipient. */ + tags?: string[]; + /** Key/value pairs associated with a recipient. */ + metadata?: any; + /** Key/value pairs associated with a recipient that are provided to the substitution engine. */ + substitution_data?: any; + } + export interface RecipientWithAddress { + /** Address information for a recipient At a minimum, address or multichannel_addresses is required. */ + address: Address | string; + } + export interface RecipientWithMultichannelAddresses { + /** + * Address information for a recipient. At a minimum, address or multichannel_addresses is required. + * If both address and multichannel_addresses are specified only multichannel_addresses will be used. + * + * @type {(Address | string)} + * @memberOf RecipientWithMultichannelAddresses + */ + address?: Address | string; + /** + * Array of Multichannel Address objects for a recipient. At a minimum, address or multichannel_addresses is required. + * If both address and multichannel_addresses are specified only multichannel_addresses will be used. + * + * @type {MultichannelAddress[]} + * @memberOf RecipientWithMultichannelAddresses + */ + multichannel_addresses: MultichannelAddress[]; + } + export type Recipient = (RecipientWithAddress | RecipientWithMultichannelAddresses) & BaseRecipient; + + export interface Address { + /** Valid email address */ + email: string; + /** User-friendly name for the email address */ + name?: string; + /** Email address to display in the “To” header instead of address.email (for CC and BCC) */ + header_to?: string; + } + + export interface MultichannelAddress { + /** The communication channel used to reach recipient. Valid values are “email”, “gcm”, “apns”. */ + channel: string; + /** Valid email address. Required if channel is “email”. */ + email: string; + /** User-friendly name for the email address. Used when channel is “email” */ + name: string; + /** Email address to display in the “To” header instead of address.email (for BCC). Used when channel is “email” */ + header_to: string; + /** SparkPost Enterprise API only. Required if channel is “gcm” or “apns” */ + token: string; + /** SparkPost Enterprise API only. Required if channel is “gcm” or “apns” */ + app_id: string; + } + + export interface RelayWebhook { + /** User-friendly name no example: Inbound Customer Replies */ + name?: string; + /** URL of the target to which to POST relay batches */ + target: string; + /** Authentication token to present in the X-MessageSystems-Webhook-Token header of POST requests to target */ + auth_token?: string; + /** Restrict which inbound messages will be relayed to the target */ + match: Match; + } + + export interface UpdateRelayWebhook { + /** User-friendly name no example: Inbound Customer Replies */ + name?: string; + /** URL of the target to which to POST relay batches */ + target: string; + /** Authentication token to present in the X-MessageSystems-Webhook-Token header of POST requests to target */ + auth_token?: string; + /** Restrict which inbound messages will be relayed to the target */ + match?: Match; + } + + export interface Match { + /** Inbound messaging protocol associated with this webhook. Defaults to “SMTP” */ + protocol?: string; + /** Inbound domain associated with this webhook. Required when protocol is “SMTP”. */ + domain?: string; + /** ESME address binding associated with this webhook yes, when protocol is “SMPP”. SparkPost Enterprise API only. */ + esme_address?: string; + } + + export interface SendingDomain { + /** Name of the sending domain. */ + domain: string; + /** Associated tracking domain. */ + tracking_domain: string; + /** JSON object containing status details, including whether this domain’s ownership has been verified. */ + status: Status; + /** JSON object in which DKIM key configuration is defined. */ + dkim?: DKIM; + /** Whether to generate a DKIM keypair on creation. */ + generate_dkim?: boolean; + /** Size, in bits, of the DKIM private key to be generated. This option only applies if generate_dkim is ‘true’. */ + dkim_key_length?: number; + /** Setting to true allows this domain to be used by subaccounts. Defaults to false, only available to domains belonging to a master account. */ + shared_with_subaccounts: boolean; + } + + export interface CreateSendingDomain { + /** Name of the sending domain. */ + domain: string; + /** Associated tracking domain. */ + tracking_domain?: string; + /** JSON object containing status details, including whether this domain’s ownership has been verified. */ + status?: Status; + /** JSON object in which DKIM key configuration is defined. */ + dkim?: DKIM; + /** Whether to generate a DKIM keypair on creation. */ + generate_dkim?: boolean; + /** Size, in bits, of the DKIM private key to be generated. This option only applies if generate_dkim is ‘true’. */ + dkim_key_length?: number; + /** Setting to true allows this domain to be used by subaccounts. Defaults to false, only available to domains belonging to a master account. */ + shared_with_subaccounts?: boolean; + } + + export interface UpdateSendingDomain { + /** Associated tracking domain. */ + tracking_domain?: string; + /** JSON object in which DKIM key configuration is defined. */ + dkim?: DKIM; + /** Whether to generate a DKIM keypair on creation. */ + generate_dkim?: boolean; + /** Size, in bits, of the DKIM private key to be generated. This option only applies if generate_dkim is ‘true’. */ + dkim_key_length?: number; + /** Setting to true allows this domain to be used by subaccounts. Defaults to false, only available to domains belonging to a master account. */ + shared_with_subaccounts?: boolean; + } + + export interface DKIM { + /** Signing Domain Identifier (SDID). SparkPost Enterprise API only. */ + signing_domain?: string; + /** DKIM private key. */ + private?: string; + /** DKIM public key. */ + public: string; + /** DomainKey selector. */ + selector: string; + /** Header fields to be included in the DKIM signature. This field is currently ignored. */ + headers?: string; + } + + export interface Status { + /** Whether domain ownership has been verified */ + ownership_verified: boolean; + /** Verification status of SPF configuration */ + spf_status: "valid" | "invalid" | "unverified" | "pending"; + /** Compliance status */ + compliance_status: "valid" | "pending" | "blocked"; + /** Verification status of DKIM configuration */ + dkim_status: "valid" | "invalid" | "unverified" | "pending"; + /** Verification status of abuse@ mailbox */ + abuse_at_status: "valid" | "invalid" | "unverified" | "pending"; + /** Verification status of postmaster@ mailbox */ + postmaster_at_status: "valid" | "invalid" | "unverified" | "pending"; + } + + export interface VerifyOptions { + /** + * Request verification of DKIM record + * + * @type {boolean} + * @memberOf VerifyOptions + */ + dkim_verify?: boolean; + /** + * Request verification of SPF record + * + * @type {boolean} + * @deprecated + * @memberOf VerifyOptions + */ + spf_verify?: boolean; + /** + * Request an email with a verification link to be sent to the sending domain’s postmaster@ mailbox. + * + * @type {boolean} + * @memberOf VerifyOptions + */ + postmaster_at_verify?: boolean; + /** + * Request an email with a verification link to be sent to the sending domain’s abuse@ mailbox. + * + * @type {boolean} + * @memberOf VerifyOptions + */ + abuse_at_verify?: boolean; + /** + * A token retrieved from the verification link contained in the postmaster@ verification email. + * + * @type {string} + * @memberOf VerifyOptions + */ + postmaster_at_token?: string; + /** + * A token retrieved from the verification link contained in the abuse@ verification email. + * + * @type {string} + * @memberOf VerifyOptions + */ + abuse_at_token?: string; + } + + export interface VerifyResults extends Status { + dns?: { + dkim_record: string; + spf_record: string; + }; + } + + export interface CreateSubaccount { + /** user-friendly name */ + name: string; + /** user-friendly identifier for subaccount API key */ + key_label: string; + /** list of grants to give the subaccount API key */ + key_grants: string[]; + /** list of IPs the subaccount may be used from */ + key_valid_ips?: string[]; + /** id of the default IP pool assigned to subaccount"s transmissions */ + ip_pool?: string; + } + + export interface CreateSubaccountResponse { + subaccount_id: number; + key: string; + label: string; + short_key: string; + } + + export interface UpdateSubaccount { + /** user-friendly name */ + name: string; + /** status of the subaccount */ + status: string; + /** id of the default IP pool assigned to subaccount"s transmissions */ + ip_pool?: string; + } + + export interface SubaccountInformation { + /** ID of subaccount */ + id: number; + /** User friendly identifier for a specific subaccount */ + name: string; + /** Status of the account */ + status: "active" | "suspended" | "terminated"; + /** The ID of the default IP Pool assigned to this subaccount’s transmissions */ + ip_pool?: string; + compliance_status: string; + } + + export interface CreateSupressionListEntry { + /** + * Email address to be suppressed + * + * @type {string} + * @memberOf CreateSupressionListEntry + */ + recipient: string; + /** + * Type of suppression record + * + * @type {("transactional" | "non_transactional")} + * @memberOf CreateSupressionListEntry + */ + type?: "transactional" | "non_transactional"; + /** + * Whether the recipient requested to not receive any non-transactional messages + * Not required if a valid type is passed + * + * @deprecated Available, but deprecated in favor of type + * @type {boolean} + * @memberOf CreateSupressionListEntry + */ + transactional?: boolean; + /** + * Whether the recipient requested to not receive any non-transactional messages + * Not required if a valid type is passed + * + * @deprecated Available, but deprecated in favor of type + * @type {boolean} + * @memberOf CreateSupressionListEntry + */ + non_transactional?: boolean; + /** + * Source responsible for inserting the list entry + * no - entries created by the user are marked as Manually Added + * + * @type {("Spam Complaint" | "List Unsubscribe" | "Bounce Rule" | "Unsubscribe Link" | "Manually Added" | "Compliance")} + * @memberOf CreateSupressionListEntry + */ + readonly source?: "Spam Complaint" | "List Unsubscribe" | "Bounce Rule" | "Unsubscribe Link" | "Manually Added" | "Compliance"; + /** Short explanation of the suppression */ + description?: string; + } + + export interface SupressionListEntry { + /** + * Email address to be suppressed + * + * @type {string} + * @memberOf SupressionListEntry + */ + recipient: string; + /** + * Whether the recipient requested to not receive any transactional messages + * Not required if a valid type is passed + * + * @deprecated Available, but deprecated in favor of type + * @type {boolean} + * @memberOf SupressionListEntry + */ + transactional?: boolean; + /** + * Whether the recipient requested to not receive any non-transactional messages + * Not required if a valid type is passed + * + * @deprecated Available, but deprecated in favor of type + * @type {boolean} + * @memberOf SupressionListEntry + */ + non_transactional?: boolean; + /** Type of suppression record: transactional or non_transactional */ + type?: "transactional" | "non_transactional"; + /** + * Source responsible for inserting the list entry + * + * no - entries created by the user are marked as Manually Added + * + * @type {("Spam Complaint" | "List Unsubscribe" | "Bounce Rule" | "Unsubscribe Link" | "Manually Added" | "Compliance")} + * @memberOf SupressionListEntry + */ + source?: "Spam Complaint" | "List Unsubscribe" | "Bounce Rule" | "Unsubscribe Link" | "Manually Added" | "Compliance"; + /** Short explanation of the suppression */ + description?: string; + created: string; + updated: string; + } + + export interface SupressionSearchParameters { + /** Datetime the entries were last updated, in the format of YYYY-MM-DDTHH:mm:ssZ */ + to?: string; + /** Datetime the entries were last updated, in the format YYYY-MM-DDTHH:mm:ssZ */ + from?: string; + /** + * Domain of entries to include in the search. ( Note: SparkPost only) + * + * @type {string} + * @memberOf SupressionSearch + */ + domain?: string; + /** + * The results cursor location to return, to start paging with cursor, use the value of ‘initial’. + * When cursor is provided the page parameter is ignored. (Note: SparkPost only) + * + * @type {string} + * @memberOf SupressionSearch + */ + cursor?: string; + /** + * Maximum number of results to return per page. Must be between 1 and 10,000. + * ( Note: SparkPost only) + * @default 1000 + * @type {string} + * @memberOf SupressionSearch + */ + per_page?: string | number; + /** + * The results page number to return. Used with per_page for paging through results. + * The page parameter works up to 10,000 results. + * You must use the cursor parameter and start with cursor=initial to page result sets larger than 10,000 + * ( Note: SparkPost only) + * + * @type {string} + * @memberOf SupressionSearch + */ + page?: string | number; + /** Types of entries to include in the search, i.e. entries with “transactional” and/or “non_transactional” keys set to true */ + types?: string; + /** Sources of the entries to include in the search, i.e. entries that were added by this source */ + sources?: string; + /** + * Description of the entries to include in the search, i.e descriptions that include the text submitted. + * ( Note: SparkPost only) + * + * @type {string} + * @memberOf SupressionSearch + */ + description?: string; + /** + * Maximum number of results to return per page. Must be between 1 and 10,000. + * @type {number} + * @deprecated use per_page instead + * @memberOf SupressionSearch + */ + limit?: number; + } + + export interface TemplateContent { + /** HTML content for the email’s text/html MIME part */ + html: string; + /** Text content for the email’s text/plain MIME part */ + text: string; + /** Email subject line. */ + subject: string; + /** + * Address "from" : "deals@company.com" or JSON object composed of the "name" and "email" fields. + * "from" : { "name" : "My Company", "email" : "deals@company.com" } used to compose the email’s "From" header. + * + * @type {(Address | string)} + * @memberOf TemplateContent + */ + from: Address | string; + /** Email address used to compose the email’s “Reply-To” header. */ + reply_to?: string; + /** JSON dictionary containing headers other than “Subject”, “From”, “To”, and “Reply-To”. */ + headers?: any; + } + + export interface CreateTemplateContent { + /** HTML content for the email’s text/html MIME part */ + html?: string; + /** Text content for the email’s text/plain MIME part */ + text?: string; + /** Email subject line. */ + subject: string; + /** + * Address "from" : "deals@company.com" or JSON object composed of the "name" and "email" fields. + * "from" : { "name" : "My Company", "email" : "deals@company.com" } used to compose the email’s "From" header. + * + * @type {(Address | string)} + * @memberOf TemplateContent + */ + from: Address | string; + /** Email address used to compose the email’s “Reply-To” header. */ + reply_to?: string; + /** JSON dictionary containing headers other than “Subject”, “From”, “To”, and “Reply-To”. */ + headers?: any; + } + + export interface TemplateMeta { + /** Unique template ID */ + id: string; + /** Template name */ + name: string; + /** Published state of the template (true = published, false = draft) */ + published: boolean; + /** Template description */ + description: string; + } + + export interface Template { + /** + * Short, unique, alphanumeric ID used to reference the template. + * At a minimum, id or name is required upon creation. + * It is auto generated if not provided. + * After a template has been created, this property cannot be changed. Maximum length - 64 bytes + * + * @type {string} + * @memberOf Template + */ + id: string; + /** Content that will be used to construct a message yes For a full description, see the Content Attributes. Maximum length - 20 MBs */ + content: TemplateContent | { email_rfc822: string }; + /** Whether the template is published or is a draft version no - defaults to false A template cannot be changed from published to draft. */ + published: boolean; + /** Editable display name At a minimum, id or name is required upon creation. The name does not have to be unique. Maximum length - 1024 bytes */ + name: string; + /** Detailed description of the template no Maximum length - 1024 bytes */ + description: string; + /** JSON object in which template options are defined no For a full description, see the Options Attributes. */ + options: TemplateOptions; + /** The “last_update_time” is the time the template was last updated, for both draft and published versions */ + last_update_time: string; + /** The “last_use” time represents the last time any version of this template was used (draft or published). */ + last_use?: string; + } + + export interface CreateTemplate { + /** + * Short, unique, alphanumeric ID used to reference the template. + * At a minimum, id or name is required upon creation. + * It is auto generated if not provided. + * After a template has been created, this property cannot be changed. Maximum length - 64 bytes + * + * @type {string} + * @memberOf CreateTemplate + */ + id?: string; + /** Content that will be used to construct a message yes For a full description, see the Content Attributes. Maximum length - 20 MBs */ + content: CreateTemplateContent | { email_rfc822: string }; + /** Whether the template is published or is a draft version no - defaults to false A template cannot be changed from published to draft. */ + published?: boolean; + /** Editable display name At a minimum, id or name is required upon creation. The name does not have to be unique. Maximum length - 1024 bytes */ + name?: string; + /** Detailed description of the template no Maximum length - 1024 bytes */ + description?: string; + /** JSON object in which template options are defined no For a full description, see the Options Attributes. */ + options?: CreateTemplateOptions; + } + + export interface UpdateTemplate { + /** Content that will be used to construct a message yes For a full description, see the Content Attributes. Maximum length - 20 MBs */ + content?: CreateTemplateContent | { email_rfc822: string }; + /** Whether the template is published or is a draft version no - defaults to false A template cannot be changed from published to draft. */ + published?: boolean; + /** Editable display name At a minimum, id or name is required upon creation. The name does not have to be unique. Maximum length - 1024 bytes */ + name?: string; + /** Detailed description of the template no Maximum length - 1024 bytes */ + description?: string; + /** JSON object in which template options are defined no For a full description, see the Options Attributes. */ + options?: CreateTemplateOptions; + } + + export interface TemplateOptions { + /** Enable or disable open tracking */ + open_tracking: boolean; + /** Enable or disable click tracking */ + click_tracking: boolean; + /** Distinguish between transactional and non-transactional messages for unsubscribe and suppression purposes */ + transactional: boolean; + } + + export interface CreateTemplateOptions { + /** Enable or disable open tracking */ + open_tracking?: boolean; + /** Enable or disable click tracking */ + click_tracking?: boolean; + /** Distinguish between transactional and non-transactional messages for unsubscribe and suppression purposes */ + transactional?: boolean; + } + + export interface CreateTransmission { + /** JSON object in which transmission options are defined */ + options?: TransmissionOptions; + /** + * Recipients to receive a carbon copy of the transmission + * + * @type {Recipient[]} + * @memberOf CreateTransmission + */ + cc?: Recipient[]; + /** + * Recipients to discreetly receive a carbon copy of the transmission + * + * @type {Recipient[]} + * @memberOf CreateTransmission + */ + bcc?: Recipient[]; + /** Inline recipient objects or object containing stored recipient list ID */ + recipients?: Recipient[] | { list_id: string }; + /** Name of the campaign */ + campaign_id?: string; + /** Description of the transmission */ + description?: string; + /** Transmission level metadata containing key/value pairs */ + metadata?: any; + /** Key/value pairs that are provided to the substitution engine */ + substitution_data?: any; + /** SparkPost Enterprise API only: email to use for envelope FROM */ + return_path?: string; + /** Content that will be used to construct a message */ + content: InlineContent | { template_id: string, use_draft_template?: boolean } | { email_rfc822: string }; + } + + export interface TransmissionSummary { + /** ID of the transmission */ + id: string; + /** State of the transmission */ + state: "submitted" | "Generating" | "Success" | "Canceled"; + /** Description of the transmission */ + description: string; + /** Name of the campaign */ + campaign_id: string; + /** Content that will be used to construct a message */ + content: { template_id: string }; + } + + export interface Transmission { + /** ID of the transmission */ + id: string; + /** State of the transmission */ + state: "submitted" | "Generating" | "Success" | "Canceled"; + /** JSON object in which transmission options are defined */ + options: TransmissionOptions; + /** Name of the campaign */ + campaign_id: string; + /** Description of the transmission */ + description: string; + /** Transmission level metadata containing key/value pairs */ + metadata: any; + /** Key/value pairs that are provided to the substitution engine */ + substitution_data: any; + /** Content that will be used to construct a message */ + content: InlineContent | { template_id: string, use_draft_template?: boolean } | { email_rfc822: string }; + /** Computed total number of messages generated */ + num_generated: number; + /** Computed total number of failed messages */ + num_failed_generation: number; + /** Number of recipients that failed input validation */ + num_invalid_recipients: number; + rcpt_list_chunk_size: number; + rcpt_list_total_chunks: number; + } + + export interface TransmissionOptions { + /** Delay generation of messages until this datetime. */ + start_time?: string; + /** Whether open tracking is enabled for this transmission */ + open_tracking?: boolean; + /** Whether click tracking is enabled for this transmission */ + click_tracking?: boolean; + /** Whether message is transactional or non-transactional for unsubscribe and suppression purposes */ + transactional?: boolean; + /** Whether or not to use the sandbox sending domain */ + sandbox?: boolean; + /** SparkPost Enterprise API only: Whether or not to ignore customer suppression rules, for this transmission only. Only applicable if your configuration supports this parameter. */ + skip_suppression?: boolean; + /** The ID of a dedicated IP pool associated with your account ( Note: SparkPost only ). */ + ip_pool?: string; + /** Whether or not to perform CSS inlining in HTML content */ + inline_css?: boolean; + } + + export interface InlineContent { + /** HTML content for the email’s text/html MIME part At a minimum, html, text, or push is required. */ + html?: string; + /** Text content for the email’s text/plain MIME part At a minimum, html, text, or push is required. */ + text?: string; + /** Content of push notifications At a minimum, html, text, or push is required. SparkPost Enterprise API only. */ + push?: PushData; + /** Email subject line required for email transmissions Expected in the UTF-8 charset without RFC2047 encoding. Substitution syntax is supported. */ + subject?: string; + /** "deals@company.com" or JSON object composed of the “name” and “email” fields “from” : { “name” : “My Company”, “email” : "deals@company.com" } used to compose the email’s “From” header */ + from?: string | { email: string, name: string }; + /** Email address used to compose the email’s “Reply-To” header */ + reply_to?: string; + /** JSON dictionary containing headers other than “Subject”, “From”, “To”, and “Reply-To” */ + headers?: any; + /** JSON array of attachments. */ + attachments?: Attachment[]; + /** JSON array of inline images. */ + inline_images?: Attachment[]; + } + + export interface PushData { + /** payload for APNs messages */ + apns?: any; + /** payload for GCM messages */ + gcm?: any; + } + + export interface Attachment { + /** + * The MIME type of the attachment; e.g., “text/plain”, “image/jpeg”, “audio/mp3”, “video/mp4”, “application/msword”, “application/pdf”, etc., + * including the “charset” parameter (text/html; charset=“UTF-8”) if needed. + * The value will apply “as-is” to the “Content-Type” header of the generated MIME part for the attachment. + * + * @type {string} + * @memberOf Attachment + */ + type: string; + /** The filename of the attachment (for example, “document.pdf”). This is inserted into the filename parameter of the Content-Disposition header. */ + name: string; + /** + * The content of the attachment as a Base64 encoded string. + * The string should not contain \r\n line breaks. + * The SparkPost systems will add line breaks as necessary to ensure the Base64 encoded lines contain no more than 76 characters each. + * + * @type {string} + * @memberOf Attachment + */ + data: string; + } + + export interface Webhook { + /** User-friendly name for webhook */ + name: string; + /** URL of the target to which to POST event batches */ + target: string; + /** Array of event types this webhook will receive */ + events: string[]; + /** + * Reserved for future use + * + * @default {true} + * @type {boolean} + * @memberOf Webhook + */ + active?: boolean; + /** Type of authentication to be used during POST requests to target */ + auth_type?: string; + /** Object containing details needed to request authorization credentials, as necessary */ + auth_request_details?: any; + /** Object containing credentials needed to make authorized POST requests to target */ + auth_credentials?: any; + /** Authentication token to present in the X-MessageSystems-Webhook-Token header of POST requests to target */ + auth_token?: string; + } + + export interface UpdateWebhook { + /** User-friendly name for webhook */ + name?: string; + /** URL of the target to which to POST event batches */ + target?: string; + /** Array of event types this webhook will receive */ + events?: string[]; + active?: boolean; + /** Type of authentication to be used during POST requests to target */ + auth_type?: string; + /** Object containing details needed to request authorization credentials, as necessary */ + auth_request_details?: any; + /** Object containing credentials needed to make authorized POST requests to target */ + auth_credentials?: any; + /** Authentication token to present in the X-MessageSystems-Webhook-Token header of POST requests to target */ + auth_token?: string; + } + + export interface WebhookLinks { + links: { + href: string; + rel: string; + method: string[]; + }[]; + } + + export interface CreateOpts { + /** + * Domain (or subdomain) name for which SparkPost will receive inbound emails + * + * @type {string} + * @memberOf CreateOpts + */ + domain: string; + } +} + +export = SparkPost; diff --git a/types/sparkpost/sparkpost-tests.ts b/types/sparkpost/sparkpost-tests.ts new file mode 100644 index 0000000000..d3fef264f0 --- /dev/null +++ b/types/sparkpost/sparkpost-tests.ts @@ -0,0 +1,1807 @@ +import * as SparkPost from "sparkpost"; + +let key = "YOURAPIKEY"; +let client = new SparkPost(key); + +// Callback +client.get({ + uri: "metrics/domains" +}, function(err, data) { + if (err) { + console.log(err); + return; + } + + console.log(data.body); +}); + +// Promise +client.get({ + uri: 'metrics/domains' +}) + .then(data => { + console.log(data); + }) + .catch(err => { + console.log(err); + }); + +// Callback +client.inboundDomains.create({ domain: 'example1.com' }, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +// Promise +client.inboundDomains.create({ domain: 'example1.com' }) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.inboundDomains.delete("example1.com", function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +// Promise +client.inboundDomains.delete('example1.com') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.inboundDomains.get("example1.com", function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +// Promise +client.inboundDomains.get('example1.com') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.inboundDomains.list(function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +// Promise +client.inboundDomains.list() + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.messageEvents.search({}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Callback +client.messageEvents.search({ + events: "click", + campaign_ids: "monday_mailshot" +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Callback +client.messageEvents.search({ + from: "2016-01-01T00:00", + to: "2016-01-02T23:59", + page: 1, + per_page: 5, + events: ["bounce", "out_of_band"], + bounce_classes: [10] +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.messageEvents.search({ + events: 'click', + campaign_ids: 'monday_mailshot' +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Promise +client.messageEvents.search({}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Promise +client.messageEvents.search({ + from: '2016-01-01T00:00', + to: '2016-01-02T23:59', + page: 1, + per_page: 5, + events: ['bounce', 'out_of_band'], + bounce_classes: [10] +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.recipientLists.create({ + id: "UNIQUE_TEST_ID", + name: "Test Recipient List", + recipients: [ + { + address: { + email: "test1@test.com" + } + }, { + address: { + email: "test2@test.com" + } + }, { + address: { + email: "test3@test.com" + } + } + ] +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.recipientLists.create({ + id: "UNIQUE_TEST_ID", + name: "Test Recipient List", + recipients: [ + { + address: { + email: "test1@test.com" + } + }, { + address: { + email: "test2@test.com" + } + }, { + address: { + email: "test3@test.com" + } + } + ] +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.recipientLists.delete("UNIQUE_TEST_ID", function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.recipientLists.delete('UNIQUE_TEST_ID') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.recipientLists.list(function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.recipientLists.list() + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.recipientLists.get('UNIQUE_TEST_ID', function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Callback +client.recipientLists.get('UNIQUE_TEST_ID', { + show_recipients: true +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.recipientLists.get('UNIQUE_TEST_ID', { + show_recipients: true +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Promise +client.recipientLists.get('UNIQUE_TEST_ID') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.recipientLists.update('EXISTING_TEST_ID', { + name: "Test Recipient List", + recipients: [ + { + address: { + email: "test1@test.com" + } + }, { + address: { + email: "test2@test.com" + } + }, { + address: { + email: "test3@test.com" + } + } + ] +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.recipientLists.update('EXISTING_TEST_ID', { + name: "Test Recipient List", + recipients: [ + { + address: { + email: "test1@test.com" + } + }, { + address: { + email: "test2@test.com" + } + }, { + address: { + email: "test3@test.com" + } + } + ] +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log(err); + }); + +// Callback +client.relayWebhooks.create({ + name: "Test Relay Webhook", + target: "http://client.test.com/test-webhook", + match: { + domain: "inbound.example.com" + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +// Promise +client.relayWebhooks.create({ + name: 'Test Relay Webhook', + target: 'http://client.test.com/test-webhook', + match: { + domain: 'inbound.example.com' + } +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.relayWebhooks.delete("123456789", function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +// Promise +client.relayWebhooks.delete('123456789') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.relayWebhooks.get('123456789', function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +// Promise +client.relayWebhooks.get('123456789') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +client.relayWebhooks.list(function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +// Promise +client.relayWebhooks.list() + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.relayWebhooks.update('123456789', { + target: "http://client.test.com/test-webhook" +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +// Promise +client.relayWebhooks.update('123456789', { + target: 'http://client.test.com/test-webhook' +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.sendingDomains.create({ + domain: "example1.com", + dkim: { + "private": "MIICXgIBAAKBgQC+W6scd3XWwvC/hPRksfDYFi3ztgyS9OSqnnjtNQeDdTSD1DRx/==", + "public": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+W6scd3XWwvC/==", + selector: "brisbane", + headers: "from:to:subject:date" + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.sendingDomains.create({ + domain: 'example1.com', + dkim: { + 'private': 'MIICXgIBAAKBgQC+W6scd3XWwvC/hPRksfDYFi3ztgyS9OSqnnjtNQeDdTSD1DRx/==', + 'public': 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+W6scd3XWwvC/==', + selector: 'brisbane', + headers: 'from:to:subject:date' + } +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.sendingDomains.delete("example1.com", function(err, data) { + if (err) { + console.log(err); + } else { + console.log(data); + console.log("Congrats you can use our client library!"); + } +}); + +// Promise +client.sendingDomains.delete('example1.com') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.sendingDomains.list(function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.sendingDomains.list() + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.sendingDomains.get('example1.com', function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.sendingDomains.get('example1.com') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.sendingDomains.update('example1.com', { + dkim: { + "private": "MIICXgIBAAKBgQC+W6scd3XWwvC/hPRksfDYFi3ztgyS9OSqnnjtNQeDdTSD1DRx/Y1g==", + "public": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+W6scd3XWwvC/==", + selector: "hello_selector", + headers: "from:to:subject:date" + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.sendingDomains.update('example1.com', { + dkim: { + 'private': 'MIICXgIBAAKBgQC+W6scd3XWwvC/hPRksfDYFi3ztgyS9OSqnnjtNQeDdTSD1DRx/Y1g==', + 'public': 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+W6scd3XWwvC/==', + selector: 'hello_selector', + headers: 'from:to:subject:date' + } +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.sendingDomains.verify('example1.com', { + dkim_verify: true, + spf_verify: true, + abuse_at_verify: true, + postmaster_at_verify: true +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Callback +client.sendingDomains.verify('example1.com', { + dkim_verify: false +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.sendingDomains.verify('example1.com', { + dkim_verify: true, + spf_verify: true, + abuse_at_verify: true, + postmaster_at_verify: true +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.subaccounts.create({ + name: "Test Subaccount", + key_label: 'Test Subaccount key', + key_grants: [ + "smtp/inject", + "transmissions/modify" + ] +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res); + console.log("Congrats you can use our client library!"); + } +}); + +// Promise +client.subaccounts.create({ + name: 'Test Subaccount', + key_label: 'Test Subaccount key', + key_grants: [ + 'smtp/inject', + 'transmissions/modify' + ] +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.subaccounts.list(function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +// Promise +client.subaccounts.list() + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.subaccounts.get(123, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +// Promise +client.subaccounts.get('123') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.subaccounts.update('123', { + name: "Test Subaccount", + status: "suspended" +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our client library!"); + } +}); + +// Promise +client.subaccounts.update('123', { + name: 'Test Subaccount', + status: 'suspended' +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.suppressionList.delete('test@test.com', function(err, data) { + if (err) { + console.log('Whoops! Something went wrong'); + console.log(err); + } else { + console.log('Congrats you can use our client library!'); + console.log(data); + } +}); + +// Promise +client.suppressionList.delete('test@test.com') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Promise +client.suppressionList.get('test@test.com') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.suppressionList.get('test@test.com', function(err, data) { + if (err) { + console.log('Whoops! Something went wrong'); + console.log(err); + } else { + console.log('Congrats you can use our client library!'); + console.log(data); + } +}); + +// Promise +client.suppressionList.list({ + from: '2015-05-07T00:00:00+0000', + to: '2015-05-07T23:59:59+0000', + limit: 5 +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); + }); + +// Callback +client.suppressionList.list({ + from: '2015-05-07T00:00:00+0000', + to: '2015-05-07T23:59:59+0000', + limit: 5 +}, function(err, data) { + if (err) { + console.log('Whoops! Something went wrong'); + console.log(err); + } else { + console.log('Congrats you can use our client library!'); + console.log(data); + } +}); + +// Callback +client.suppressionList.list(function(err, data) { + if (err) { + console.log('Whoops! Something went wrong'); + console.log(err); + } else { + console.log('Congrats you can use our client library!'); + console.log(data); + } +}); + +// Promise +client.suppressionList.upsert({ + recipient: 'test1@test.com', + transactional: false, + non_transactional: true, + description: 'Test description 1' +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); + }); + +// Callback +client.suppressionList.upsert({ + recipient: 'test1@test.com', + transactional: false, + non_transactional: true, + description: 'Test description 1' +}, function(err, data) { + if (err) { + console.log('Whoops! Something went wrong'); + console.log(err); + } else { + console.log('Congrats you can use our client library!'); + console.log(data); + } +}); + +// Promise +client.suppressionList.upsert([ + { + recipient: 'test1@test.com', + transactional: false, + non_transactional: true, + description: 'Test description 1' + }, + { + recipient: 'test2@test.com', + transactional: true, + non_transactional: true, + description: 'Test description 2' + }, + { + recipient: 'test3@test.com', + transactional: true, + non_transactional: false, + description: 'Test description 3' + } +]) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); + }); + +// Callback +client.suppressionList.upsert([ + { + recipient: 'test1@test.com', + transactional: false, + non_transactional: true, + description: 'Test description 1' + }, + { + recipient: 'test2@test.com', + transactional: true, + non_transactional: true, + description: 'Test description 2' + }, + { + recipient: 'test3@test.com', + transactional: true, + non_transactional: false, + description: 'Test description 3' + } +], function(err, data) { + if (err) { + console.log('Whoops! Something went wrong'); + console.log(err); + } else { + console.log('Congrats you can use our client library!'); + console.log(data); + } +}); + +// Callback +client.templates.create({ + id: "TEST_ID", + name: "Test Template", + content: { + from: "test@test.com", + subject: "Test email template!", + html: "This is a test email template!" + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.templates.create({ + id: 'TEST_ID', + name: 'Test Template', + content: { + from: 'test@test.com', + subject: 'Test email template!', + html: 'This is a test email template!' + } +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.templates.delete("TEST_ID", function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.templates.delete('TEST_ID') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.templates.list(function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.templates.list() + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.templates.get('TEST_ID', { + draft: true +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Callback +client.templates.get('TEST_ID', function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.templates.get('TEST_ID') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.templates.preview('TEST_ID', { + substitution_data: {} +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.templates.preview('TEST_ID', { + substitution_data: { + name: 'Natalie', + age: 35, + member: true + }, + draft: true +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.templates.update('TEST_ID', { + content: { + from: "test@test.com", + subject: "Updated Published Test email template!", + html: "This is a published test email template! Updated!" + }, +}, { update_published: true }, +function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Callback +client.templates.update('TEST_ID', { + content: { + from: "test@test.com", + subject: "Updated Test email template!", + html: "This is a test email template! Updated!" + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.templates.update('TEST_ID', { + content: { + from: 'test@test.com', + subject: 'Updated Test email template!', + html: 'This is a test email template! Updated!' + } +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); + }); + +// Callback +client.transmissions.list(function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.transmissions.list() + .then(data => { + console.log(data); + console.log('Congrats you can use our client library!'); + }) + .catch(err => { + console.log(err); + }); + +client.transmissions.list({ + campaign_id: "my_campaign" +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +client.transmissions.list({ + template_id: "my_template" +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Callback +client.transmissions.get("YOUR-TRANSMISSION-KEY", function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.transmissions.get('YOUR-TRANSMISSION-KEY') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); + }); + +// Callback +client.transmissions.send({ + recipients: [{ address: { email: "john.doe@example.com" } }], + content: { + from: "From Envelope ", + subject: "Example Email for MIME Parts", + html: "

    Hello World!

    ", + text: "Hello World!" + }, + options: { + open_tracking: true, + click_tracking: true + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Callback +client.transmissions.send({ + recipients: [{address: {email: "john.doe@example.com"}}], + content: { + email_rfc822: "Content-Type: text/plain\nFrom: From Envelope \nSubject: Example Email\n\nHello World" + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Callback +client.transmissions.send({ + options: { + open_tracking: true, + click_tracking: true + }, + campaign_id: "christmas_campaign", + return_path: "bounces-christmas-campaign@flintstone.com", + metadata: { + user_type: "students" + }, + substitution_data: { + sender: "Big Store Team" + }, + recipients: [ + { + return_path: "123@bounces.flintstone.com", + address: { + email: "wilma@flintstone.com", + name: "Wilma Flintstone" + }, + tags: [ + "greeting", + "prehistoric", + "fred", + "flintstone" + ], + metadata: { + place: "Bedrock" + }, + substitution_data: { + customer_type: "Platinum" + } + } + ], + content: { + from: { + name: "Fred Flintstone", + email: "fred@flintstone.com" + }, + subject: "Big Christmas savings!", + reply_to: "Christmas Sales ", + headers: { + "X-Customer-Campaign-ID": "christmas_campaign" + }, + text: "Hi {{address.name}} \nSave big this Christmas in your area {{place}}! \nClick http://www.mysite.com and get huge discount\n Hurry, this offer is only to {{customer_type}}\n {{sender}}", + html: "

    Hi {{address.name}} \nSave big this Christmas in your area {{place}}! \nClick http://www.mysite.com and get huge discount\n

    " + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Callback +client.transmissions.send({ + recipients: [ + { + address: { + email: "original.recipient@example.com", + name: "Original Recipient" + }, + substitution_data: { + recipient_type: "Original" + } + }, + { + address: { + email: "bcc.recipient@example.com", + header_to: "\"Original Recipient\" " + }, + substitution_data: { + recipient_type: "BCC" + } + } + ], + content: { + from: { + name: "Node BCC Test", + email: "from@example.com" + }, + subject: "Example email using bcc", + text: "An example email using bcc with SparkPost to the {{recipient_type}} recipient.", + html: "

    An example email using bcc with SparkPost to the {{recipient_type}} recipient.

    " + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats! You sent an email with bcc using SparkPost!"); + } +}); + +// Callback +client.transmissions.send({ + recipients: [ + { + address: { + email: "original.recipient@example.com", + name: "Original Recipient" + }, + substitution_data: { + recipient_type: "Original" + } + }, + { + address: { + email: "cc.recipient@example.com", + name: "Carbon Copy Recipient", + header_to: "\"Original Recipient\" " + }, + substitution_data: { + recipient_type: "CC" + } + } + ], + content: { + from: { + name: "Node CC Test", + email: "from@example.com" + }, + headers: { + "CC": "\"Carbon Copy Recipient\" " + }, + subject: "Example email using cc", + text: "An example email using cc with SparkPost to the {{recipient_type}} recipient.", + html: "

    An example email using cc with SparkPost to the {{recipient_type}} recipient.

    " + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats! You sent an email with cc using SparkPost!"); + } +}); + +// Callback +client.transmissions.send({ + recipients: { + list_id: "example-list" + }, + content: { + from: "From Envelope ", + subject: "Example Email for Stored List and Inline Content", + html: "

    Hello World

    ", + text: "Hello World!" + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Callback +client.transmissions.send({ + recipients: { + list_id: "example-list" + }, + content: { + from: "From Envelope ", + subject: "Example Email for Stored List and Template", + template_id: "my-template" + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Callback +client.transmissions.send({ + campaign_id: "ricks-campaign", + content: { + template_id: "ricks-template" + }, + recipients: [{ address: { email: "rick.sanchez@rickandmorty100years.com", name: "Rick Sanchez" } }] +}, { + num_rcpt_errors: 3 +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("What up my glib globs! SparkPost!"); + } +}); + + +// Promise +client.transmissions.send({ + options: { + open_tracking: true, + click_tracking: true + }, + campaign_id: 'christmas_campaign', + metadata: { + user_type: 'students' + }, + substitution_data: { + sender: 'Big Store Team' + }, + cc: [], + bcc: [], + recipients: [ + { + address: { + email: 'wilma@flintstone.com', + name: 'Wilma Flintstone' + }, + tags: [ + 'greeting', + 'prehistoric', + 'fred', + 'flintstone' + ], + metadata: { + place: 'Bedrock' + }, + substitution_data: { + customer_type: 'Platinum' + } + } + ], + content: { + from: { + name: 'Fred Flintstone', + email: 'fred@flintstone.com' + }, + subject: 'Big Christmas savings!', + reply_to: 'Christmas Sales ', + headers: { + 'X-Customer-Campaign-ID': 'christmas_campaign' + }, + text: 'Hi {{address.name}} \nSave big this Christmas in your area {{place}}! \nClick http://www.mysite.com and get huge discount\n Hurry, this offer is only to {{customer_type}}\n {{sender}}', + html: '

    Hi {{address.name}} \nSave big this Christmas in your area {{place}}! \nClick http://www.mysite.com and get huge discount\n

    ' + } +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Promise +client.transmissions.send({ + recipients: [ + { + address: { + email: 'original.recipient@example.com', + name: 'Original Recipient' + }, + substitution_data: { + recipient_type: 'Original' + } + }, + { + address: { + email: 'cc.recipient@example.com', + name: 'Carbon Copy Recipient', + header_to: '"Original Recipient" ' + }, + substitution_data: { + recipient_type: 'CC' + } + } + ], + content: { + from: { + name: 'Node CC Test', + email: 'from@example.com' + }, + headers: { + 'CC': '"Carbon Copy Recipient" ' + }, + subject: 'Example email using cc', + text: 'An example email using cc with SparkPost to the {{recipient_type}} recipient.', + html: '

    An example email using cc with SparkPost to the {{recipient_type}} recipient.

    ' + } +}) + .then(data => { + console.log('Congrats! You sent an email with cc using SparkPost!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.webhooks.create({ + name: "Test webhook", + target: "http://client.test.com/test-webhook", + auth_token: "AUTH_TOKEN", + events: [ + "delivery", + "injection", + "open", + "click" + ] +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.webhooks.create({ + name: 'Test Webhook', + target: 'http://client.test.com/test-webhook', + auth_token: 'AUTH_TOKEN', + events: [ + 'delivery', + 'injection', + 'open', + 'click' + ] +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.webhooks.delete("TEST_WEBHOOK_UUID", function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.webhooks.delete('TEST_WEBHOOK_UUID') + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); + }); + +// Callback +client.webhooks.get('TEST_WEBHOOK_UUID', { + timezone: 'America/New_York' +}, function(err, data) { + if (err) { + console.log('Whoops! Something went wrong'); + console.log(err); + } else { + console.log('Congrats you can use our client library!'); + console.log(data); + } +}); + +// Promise +client.webhooks.get('TEST_WEBHOOK_UUID', { + timezone: 'America/New_York' +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); + }); + +// Callback +client.webhooks.getBatchStatus('TEST_WEBHOOK_UUID', { + limit: 1000 +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.webhooks.getBatchStatus('TEST_WEBHOOK_UUID', { + limit: 1000 +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); + }); + +// Callback +client.webhooks.getDocumentation(function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.webhooks.getDocumentation() + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.webhooks.getSamples({ + events: "bounce" +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.webhooks.getSamples({ + events: 'bounce' +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.webhooks.list(function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.webhooks.list() + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.webhooks.update('TEST_WEBHOOK_UUID', { + name: "Renamed Test webhook", + events: [ + "policy_rejection", + "delay" + ] +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.webhooks.update('TEST_WEBHOOK_UUID', { + name: 'Renamed Test Webhook', + events: [ + 'policy_rejection', + 'delay' + ] +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); +}); + +// Callback +client.webhooks.validate('TEST_WEBHOOK_UUID', { + message: { + msys: {} + } +}, function(err, res) { + if (err) { + console.log(err); + } else { + console.log(res.body); + console.log("Congrats you can use our SDK!"); + } +}); + +// Promise +client.webhooks.validate('TEST_WEBHOOK_UUID', { + message: { + msys: {} + } +}) + .then(data => { + console.log('Congrats you can use our client library!'); + console.log(data); + }) + .catch(err => { + console.log('Whoops! Something went wrong'); + console.log(err); + }); diff --git a/sparkpost/tsconfig.json b/types/sparkpost/tsconfig.json similarity index 92% rename from sparkpost/tsconfig.json rename to types/sparkpost/tsconfig.json index 0ef33f26af..e40a56608b 100644 --- a/sparkpost/tsconfig.json +++ b/types/sparkpost/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -19,4 +19,4 @@ "index.d.ts", "sparkpost-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/sparkpost/tslint.json b/types/sparkpost/tslint.json new file mode 100644 index 0000000000..e77aa7b0ee --- /dev/null +++ b/types/sparkpost/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "../tslint.json", + "rules": { + "only-arrow-functions-2": [ + false + ] + } +} diff --git a/sparkpost/index.d.ts b/types/sparkpost/v1/index.d.ts similarity index 94% rename from sparkpost/index.d.ts rename to types/sparkpost/v1/index.d.ts index c88fab5d92..b12f3712ab 100644 --- a/sparkpost/index.d.ts +++ b/types/sparkpost/v1/index.d.ts @@ -3,7 +3,6 @@ // Definitions by: Joshua DeVinney // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// /// import * as Request from "request"; @@ -167,7 +166,7 @@ declare class SparkPost { */ all(callback: SparkPost.ResultsCallback): void; /** - * + * * @param subaccountId The webhook id * @param callback The request callback with subaccount information results */ @@ -343,7 +342,7 @@ declare class SparkPost { }[]>): void; /** * Lists descriptions of the events, event types, and event fields that could be included in a Webhooks post to your target URL. - * @param callback The request callback containing documentation results + * @param callback The request callback containing documentation results */ getDocumentation(callback: SparkPost.ResultsCallback): void; /** @@ -564,9 +563,23 @@ declare namespace SparkPost { address: Address | string; } export interface RecipientWithMultichannelAddresses { - /** Address information for a recipient. At a minimum, address or multichannel_addresses is required. If both address and multichannel_addresses are specified only multichannel_addresses will be used. */ + /** + * Address information for a recipient. + * At a minimum, address or multichannel_addresses is required. + * If both address and multichannel_addresses are specified only multichannel_addresses will be used. + * + * @type {(Address | string)} + * @memberOf RecipientWithMultichannelAddresses + */ address?: Address | string; - /** Array of Multichannel Address objects for a recipient. At a minimum, address or multichannel_addresses is required. If both address and multichannel_addresses are specified only multichannel_addresses will be used. */ + /** + * Array of Multichannel Address objects for a recipient. + * At a minimum, address or multichannel_addresses is required. + * If both address and multichannel_addresses are specified only multichannel_addresses will be used. + * + * @type {MultichannelAddress[]} + * @memberOf RecipientWithMultichannelAddresses + */ multichannel_addresses: MultichannelAddress[]; } export type Recipient = (RecipientWithAddress | RecipientWithMultichannelAddresses) & BaseRecipient; @@ -805,7 +818,13 @@ declare namespace SparkPost { text: string; /** Email subject line. */ subject: string; - /** Address “from” : "deals@company.com" or JSON object composed of the “name” and “email” fields “from” : { “name” : “My Company”, “email” : "deals@company.com" } used to compose the email’s “From” header. */ + /** + * Address “from” : "deals@company.com" or JSON object composed of the “name” and “email” fields + * “from” : { “name” : “My Company”, “email” : "deals@company.com" } used to compose the email’s “From” header. + * + * @type {(Address | string)} + * @memberOf CreateTemplateContent + */ from: Address | string; /** Email address used to compose the email’s “Reply-To” header. */ reply_to?: string; @@ -820,7 +839,13 @@ declare namespace SparkPost { text?: string; /** Email subject line. */ subject: string; - /** Address “from” : "deals@company.com" or JSON object composed of the “name” and “email” fields “from” : { “name” : “My Company”, “email” : "deals@company.com" } used to compose the email’s “From” header. */ + /** + * Address “from” : "deals@company.com" or JSON object composed of the “name” and “email” fields + * “from” : { “name” : “My Company”, “email” : "deals@company.com" } used to compose the email’s “From” header. + * + * @type {(Address | string)} + * @memberOf CreateTemplateContent + */ from: Address | string; /** Email address used to compose the email’s “Reply-To” header. */ reply_to?: string; @@ -840,7 +865,14 @@ declare namespace SparkPost { } export interface Template { - /** Short, unique, alphanumeric ID used to reference the template At a minimum, id or name is required upon creation. It is auto generated if not provided. After a template has been created, this property cannot be changed. Maximum length - 64 bytes */ + /** + * Short, unique, alphanumeric ID used to reference the template. + * At a minimum, id or name is required upon creation. It is auto generated if not provided. + * After a template has been created, this property cannot be changed. Maximum length - 64 bytes + * + * @type {string} + * @memberOf CreateTemplate + */ id: string; /** Content that will be used to construct a message yes For a full description, see the Content Attributes. Maximum length - 20 MBs */ content: TemplateContent | { email_rfc822: string }; @@ -859,7 +891,14 @@ declare namespace SparkPost { } export interface CreateTemplate { - /** Short, unique, alphanumeric ID used to reference the template At a minimum, id or name is required upon creation. It is auto generated if not provided. After a template has been created, this property cannot be changed. Maximum length - 64 bytes */ + /** + * Short, unique, alphanumeric ID used to reference the template. + * At a minimum, id or name is required upon creation. It is auto generated if not provided. + * After a template has been created, this property cannot be changed. Maximum length - 64 bytes + * + * @type {string} + * @memberOf CreateTemplate + */ id?: string; /** Content that will be used to construct a message yes For a full description, see the Content Attributes. Maximum length - 20 MBs */ content: CreateTemplateContent | { email_rfc822: string }; @@ -1011,11 +1050,25 @@ declare namespace SparkPost { } export interface Attachment { - /** The MIME type of the attachment; e.g., “text/plain”, “image/jpeg”, “audio/mp3”, “video/mp4”, “application/msword”, “application/pdf”, etc., including the “charset” parameter (text/html; charset=“UTF-8”) if needed. The value will apply “as-is” to the “Content-Type” header of the generated MIME part for the attachment. */ + /** + * The MIME type of the attachment; e.g., “text/plain”, “image/jpeg”, “audio/mp3”, “video/mp4”, “application/msword”, “application/pdf”, etc., + * including the “charset” parameter (text/html; charset=“UTF-8”) if needed. + * The value will apply “as-is” to the “Content-Type” header of the generated MIME part for the attachment. + * + * @type {string} + * @memberOf Attachment + */ type: string; /** The filename of the attachment (for example, “document.pdf”). This is inserted into the filename parameter of the Content-Disposition header. */ name: string; - /** The content of the attachment as a Base64 encoded string. The string should not contain \r\n line breaks. The SparkPost systems will add line breaks as necessary to ensure the Base64 encoded lines contain no more than 76 characters each. */ + /** + * The content of the attachment as a Base64 encoded string. + * The string should not contain \r\n line breaks. + * The SparkPost systems will add line breaks as necessary to ensure the Base64 encoded lines contain no more than 76 characters each. + * + * @type {string} + * @memberOf Attachment + */ data: string; } diff --git a/sparkpost/sparkpost-tests.ts b/types/sparkpost/v1/sparkpost-tests.ts similarity index 90% rename from sparkpost/sparkpost-tests.ts rename to types/sparkpost/v1/sparkpost-tests.ts index 9f7f47b44d..0b8a41ab0a 100644 --- a/sparkpost/sparkpost-tests.ts +++ b/types/sparkpost/v1/sparkpost-tests.ts @@ -239,8 +239,8 @@ client.relayWebhooks.update({ client.sendingDomains.create({ domain: "example1.com", dkim: { - "private": "MIICXgIBAAKBgQC+W6scd3XWwvC/hPRksfDYFi3ztgyS9OSqnnjtNQeDdTSD1DRx/xFar2wjmzxp2+SnJ5pspaF77VZveN3P/HVmXZVghr3asoV9WBx/uW1nDIUxU35L4juXiTwsMAbgMyh3NqIKTNKyMDy4P8vpEhtH1iv/BrwMdBjHDVCycB8WnwIDAQABAoGBAITb3BCRPBi5lGhHdn+1RgC7cjUQEbSb4eFHm+ULRwQ0UIPWHwiVWtptZ09usHq989fKp1g/PfcNzm8c78uTS6gCxfECweFCRK6EdO6cCCr1cfWvmBdSjzYhODUdQeyWZi2ozqd0FhGWoV4VHseh4iLj36DzleTLtOZj3FhAo1WJAkEA68T+KkGeDyWwvttYtuSiQCCTrXYAWTQnkIUxduCp7Ap6tVeIDn3TaXTj74UbEgaNgLhjG4bX//fdeDW6PaK9YwJBAM6xJmwHLPMgwNVjiz3u/6fhY3kaZTWcxtMkXCjh1QE82KzDwqyrCg7EFjTtFysSHCAZxXZMcivGl4TZLHnydJUCQQCx16+M+mAatuiCnvxlQUMuMiSTNK6Amzm45u9v53nlZeY3weYMYFdHdfe1pebMiwrT7MI9clKebz6svYJVmdtXAkApDAc8VuR3WB7TgdRKNWdyGJGfoD1PO1ZE4iinOcoKV+IT1UCY99Kkgg6C7j62n/8T5OpRBvd5eBPpHxP1F9BNAkEA5Nf2VO9lcTetksHdIeKK+F7sio6UZn0Rv7iUo3ALrN1D1cGfWIh2dj3ko1iSreyNVSwGW0ePP27qDmU+u6/Y1g==", - "public": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+W6scd3XWwvC/hPRksfDYFi3ztgyS9OSqnnjtNQeDdTSD1DRx/xFar2wjmzxp2+SnJ5pspaF77VZveN3P/HVmXZVghr3asoV9WBx/uW1nDIUxU35L4juXiTwsMAbgMyh3NqIKTNKyMDy4P8vpEhtH1iv/BrwMdBjHDVCycB8WnwIDAQAB", + "private": "MIICXgIBAAKBgQC+W6scd3XWwvC//Y1g==", + "public": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+W6scd3XWwvC/==", selector: "brisbane", headers: "from:to:subject:date" } @@ -284,8 +284,8 @@ client.sendingDomains.find("example1.com", function(err, res) { client.sendingDomains.update({ domain: "example1.com", dkim: { - "private": "MIICXgIBAAKBgQC+W6scd3XWwvC/hPRksfDYFi3ztgyS9OSqnnjtNQeDdTSD1DRx/xFar2wjmzxp2+SnJ5pspaF77VZveN3P/HVmXZVghr3asoV9WBx/uW1nDIUxU35L4juXiTwsMAbgMyh3NqIKTNKyMDy4P8vpEhtH1iv/BrwMdBjHDVCycB8WnwIDAQABAoGBAITb3BCRPBi5lGhHdn+1RgC7cjUQEbSb4eFHm+ULRwQ0UIPWHwiVWtptZ09usHq989fKp1g/PfcNzm8c78uTS6gCxfECweFCRK6EdO6cCCr1cfWvmBdSjzYhODUdQeyWZi2ozqd0FhGWoV4VHseh4iLj36DzleTLtOZj3FhAo1WJAkEA68T+KkGeDyWwvttYtuSiQCCTrXYAWTQnkIUxduCp7Ap6tVeIDn3TaXTj74UbEgaNgLhjG4bX//fdeDW6PaK9YwJBAM6xJmwHLPMgwNVjiz3u/6fhY3kaZTWcxtMkXCjh1QE82KzDwqyrCg7EFjTtFysSHCAZxXZMcivGl4TZLHnydJUCQQCx16+M+mAatuiCnvxlQUMuMiSTNK6Amzm45u9v53nlZeY3weYMYFdHdfe1pebMiwrT7MI9clKebz6svYJVmdtXAkApDAc8VuR3WB7TgdRKNWdyGJGfoD1PO1ZE4iinOcoKV+IT1UCY99Kkgg6C7j62n/8T5OpRBvd5eBPpHxP1F9BNAkEA5Nf2VO9lcTetksHdIeKK+F7sio6UZn0Rv7iUo3ALrN1D1cGfWIh2dj3ko1iSreyNVSwGW0ePP27qDmU+u6/Y1g==", - "public": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+W6scd3XWwvC/hPRksfDYFi3ztgyS9OSqnnjtNQeDdTSD1DRx/xFar2wjmzxp2+SnJ5pspaF77VZveN3P/HVmXZVghr3asoV9WBx/uW1nDIUxU35L4juXiTwsMAbgMyh3NqIKTNKyMDy4P8vpEhtH1iv/BrwMdBjHDVCycB8WnwIDAQAB", + "private": "MIICXgIBAAKBgQC+W6scd3XWwvC/hPRksfDYFi3ztgyS9OSqnnjtNQeDdTSD1DRx//Y1g==", + "public": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+W6scd3XWwvC/==", selector: "hello_selector", headers: "from:to:subject:date" } @@ -674,7 +674,7 @@ client.transmissions.send({ "X-Customer-Campaign-ID": "christmas_campaign" }, text: "Hi {{address.name}} \nSave big this Christmas in your area {{place}}! \nClick http://www.mysite.com and get huge discount\n Hurry, this offer is only to {{customer_type}}\n {{sender}}", - html: "

    Hi {{address.name}} \nSave big this Christmas in your area {{place}}! \nClick http://www.mysite.com and get huge discount\n

    Hurry, this offer is only to {{customer_type}}\n

    {{sender}}

    " + html: "

    Hi {{address.name}} \nSave big this Christmas in your area {{place}}! \nClick http://www.mysite.com and get huge discount\n

    " } } }, function(err, res) { diff --git a/node-form/tsconfig.json b/types/sparkpost/v1/tsconfig.json similarity index 71% rename from node-form/tsconfig.json rename to types/sparkpost/v1/tsconfig.json index d0fa4eb87b..54f30b3435 100644 --- a/node-form/tsconfig.json +++ b/types/sparkpost/v1/tsconfig.json @@ -7,12 +7,13 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, - "baseUrl": "../", + "baseUrl": "../../", "typeRoots": [ - "../" + "../../" ], "paths": { - "q": [ "q/v0" ] + "sparkpost": ["sparkpost/v1"], + "sparkpost/*": ["sparkpost/v1/*"] }, "types": [], "noEmit": true, @@ -20,6 +21,6 @@ }, "files": [ "index.d.ts", - "node-form-tests.ts" + "sparkpost-tests.ts" ] -} \ No newline at end of file +} diff --git a/spatialite/index.d.ts b/types/spatialite/index.d.ts similarity index 100% rename from spatialite/index.d.ts rename to types/spatialite/index.d.ts diff --git a/spatialite/spatialite-tests.ts b/types/spatialite/spatialite-tests.ts similarity index 100% rename from spatialite/spatialite-tests.ts rename to types/spatialite/spatialite-tests.ts diff --git a/spatialite/tsconfig.json b/types/spatialite/tsconfig.json similarity index 100% rename from spatialite/tsconfig.json rename to types/spatialite/tsconfig.json diff --git a/stringify-object/tslint.json b/types/spatialite/tslint.json similarity index 100% rename from stringify-object/tslint.json rename to types/spatialite/tslint.json diff --git a/spdy/index.d.ts b/types/spdy/index.d.ts similarity index 100% rename from spdy/index.d.ts rename to types/spdy/index.d.ts diff --git a/spdy/spdy-tests.ts b/types/spdy/spdy-tests.ts similarity index 100% rename from spdy/spdy-tests.ts rename to types/spdy/spdy-tests.ts diff --git a/spdy/tsconfig.json b/types/spdy/tsconfig.json similarity index 100% rename from spdy/tsconfig.json rename to types/spdy/tsconfig.json diff --git a/speakeasy/index.d.ts b/types/speakeasy/index.d.ts similarity index 99% rename from speakeasy/index.d.ts rename to types/speakeasy/index.d.ts index 15ec90c09a..4e281f996f 100644 --- a/speakeasy/index.d.ts +++ b/types/speakeasy/index.d.ts @@ -49,6 +49,7 @@ interface TotpOptions { counter?: number; epoch?: number; secret?: string; + digits?: number; digest?: () => string; algorithm?: string; } diff --git a/speakeasy/speakeasy-tests.ts b/types/speakeasy/speakeasy-tests.ts similarity index 100% rename from speakeasy/speakeasy-tests.ts rename to types/speakeasy/speakeasy-tests.ts diff --git a/speakeasy/tsconfig.json b/types/speakeasy/tsconfig.json similarity index 100% rename from speakeasy/tsconfig.json rename to types/speakeasy/tsconfig.json diff --git a/speakingurl/index.d.ts b/types/speakingurl/index.d.ts similarity index 100% rename from speakingurl/index.d.ts rename to types/speakingurl/index.d.ts diff --git a/speakingurl/speakingurl-tests.ts b/types/speakingurl/speakingurl-tests.ts similarity index 100% rename from speakingurl/speakingurl-tests.ts rename to types/speakingurl/speakingurl-tests.ts diff --git a/speakingurl/tsconfig.json b/types/speakingurl/tsconfig.json similarity index 100% rename from speakingurl/tsconfig.json rename to types/speakingurl/tsconfig.json diff --git a/strip-ansi/tslint.json b/types/speakingurl/tslint.json similarity index 100% rename from strip-ansi/tslint.json rename to types/speakingurl/tslint.json diff --git a/spectacle/index.d.ts b/types/spectacle/index.d.ts similarity index 100% rename from spectacle/index.d.ts rename to types/spectacle/index.d.ts diff --git a/spectacle/spectacle-tests.tsx b/types/spectacle/spectacle-tests.tsx similarity index 100% rename from spectacle/spectacle-tests.tsx rename to types/spectacle/spectacle-tests.tsx diff --git a/spectacle/tsconfig.json b/types/spectacle/tsconfig.json similarity index 100% rename from spectacle/tsconfig.json rename to types/spectacle/tsconfig.json diff --git a/spectrum/index.d.ts b/types/spectrum/index.d.ts similarity index 100% rename from spectrum/index.d.ts rename to types/spectrum/index.d.ts diff --git a/spectrum/spectrum-tests.ts b/types/spectrum/spectrum-tests.ts similarity index 100% rename from spectrum/spectrum-tests.ts rename to types/spectrum/spectrum-tests.ts diff --git a/spectrum/tsconfig.json b/types/spectrum/tsconfig.json similarity index 100% rename from spectrum/tsconfig.json rename to types/spectrum/tsconfig.json diff --git a/spin.js/index.d.ts b/types/spin.js/index.d.ts similarity index 100% rename from spin.js/index.d.ts rename to types/spin.js/index.d.ts diff --git a/spin.js/spin.js-tests.ts b/types/spin.js/spin.js-tests.ts similarity index 100% rename from spin.js/spin.js-tests.ts rename to types/spin.js/spin.js-tests.ts diff --git a/spin.js/tsconfig.json b/types/spin.js/tsconfig.json similarity index 100% rename from spin.js/tsconfig.json rename to types/spin.js/tsconfig.json diff --git a/split/index.d.ts b/types/split/index.d.ts similarity index 100% rename from split/index.d.ts rename to types/split/index.d.ts diff --git a/split/split-tests.ts b/types/split/split-tests.ts similarity index 100% rename from split/split-tests.ts rename to types/split/split-tests.ts diff --git a/split/tsconfig.json b/types/split/tsconfig.json similarity index 100% rename from split/tsconfig.json rename to types/split/tsconfig.json diff --git a/split2/index.d.ts b/types/split2/index.d.ts similarity index 100% rename from split2/index.d.ts rename to types/split2/index.d.ts diff --git a/split2/split2-tests.ts b/types/split2/split2-tests.ts similarity index 100% rename from split2/split2-tests.ts rename to types/split2/split2-tests.ts diff --git a/split2/tsconfig.json b/types/split2/tsconfig.json similarity index 100% rename from split2/tsconfig.json rename to types/split2/tsconfig.json diff --git a/spotify-api/index.d.ts b/types/spotify-api/index.d.ts similarity index 100% rename from spotify-api/index.d.ts rename to types/spotify-api/index.d.ts diff --git a/spotify-api/spotify-api-tests.ts b/types/spotify-api/spotify-api-tests.ts similarity index 100% rename from spotify-api/spotify-api-tests.ts rename to types/spotify-api/spotify-api-tests.ts diff --git a/spotify-api/tsconfig.json b/types/spotify-api/tsconfig.json similarity index 100% rename from spotify-api/tsconfig.json rename to types/spotify-api/tsconfig.json diff --git a/sprintf-js/index.d.ts b/types/sprintf-js/index.d.ts similarity index 100% rename from sprintf-js/index.d.ts rename to types/sprintf-js/index.d.ts diff --git a/sprintf-js/sprintf-js-tests.ts b/types/sprintf-js/sprintf-js-tests.ts similarity index 100% rename from sprintf-js/sprintf-js-tests.ts rename to types/sprintf-js/sprintf-js-tests.ts diff --git a/sprintf-js/tsconfig.json b/types/sprintf-js/tsconfig.json similarity index 100% rename from sprintf-js/tsconfig.json rename to types/sprintf-js/tsconfig.json diff --git a/sprintf/index.d.ts b/types/sprintf/index.d.ts similarity index 100% rename from sprintf/index.d.ts rename to types/sprintf/index.d.ts diff --git a/sprintf/sprintf-tests.ts b/types/sprintf/sprintf-tests.ts similarity index 100% rename from sprintf/sprintf-tests.ts rename to types/sprintf/sprintf-tests.ts diff --git a/sprintf/tsconfig.json b/types/sprintf/tsconfig.json similarity index 100% rename from sprintf/tsconfig.json rename to types/sprintf/tsconfig.json diff --git a/sql.js/index.d.ts b/types/sql.js/index.d.ts similarity index 100% rename from sql.js/index.d.ts rename to types/sql.js/index.d.ts diff --git a/sql.js/sql.js-tests.ts b/types/sql.js/sql.js-tests.ts similarity index 100% rename from sql.js/sql.js-tests.ts rename to types/sql.js/sql.js-tests.ts diff --git a/sql.js/tsconfig.json b/types/sql.js/tsconfig.json similarity index 100% rename from sql.js/tsconfig.json rename to types/sql.js/tsconfig.json diff --git a/sqlite3/index.d.ts b/types/sqlite3/index.d.ts similarity index 100% rename from sqlite3/index.d.ts rename to types/sqlite3/index.d.ts diff --git a/sqlite3/sqlite3-tests.ts b/types/sqlite3/sqlite3-tests.ts similarity index 100% rename from sqlite3/sqlite3-tests.ts rename to types/sqlite3/sqlite3-tests.ts diff --git a/sqlite3/tsconfig.json b/types/sqlite3/tsconfig.json similarity index 100% rename from sqlite3/tsconfig.json rename to types/sqlite3/tsconfig.json diff --git a/strip-bom/tslint.json b/types/sqlite3/tslint.json similarity index 100% rename from strip-bom/tslint.json rename to types/sqlite3/tslint.json diff --git a/sqs-consumer/index.d.ts b/types/sqs-consumer/index.d.ts similarity index 100% rename from sqs-consumer/index.d.ts rename to types/sqs-consumer/index.d.ts diff --git a/sqs-consumer/sqs-consumer-tests.ts b/types/sqs-consumer/sqs-consumer-tests.ts similarity index 100% rename from sqs-consumer/sqs-consumer-tests.ts rename to types/sqs-consumer/sqs-consumer-tests.ts diff --git a/sqs-consumer/tsconfig.json b/types/sqs-consumer/tsconfig.json similarity index 100% rename from sqs-consumer/tsconfig.json rename to types/sqs-consumer/tsconfig.json diff --git a/sqs-producer/index.d.ts b/types/sqs-producer/index.d.ts similarity index 100% rename from sqs-producer/index.d.ts rename to types/sqs-producer/index.d.ts diff --git a/sqs-producer/sqs-producer-tests.ts b/types/sqs-producer/sqs-producer-tests.ts similarity index 100% rename from sqs-producer/sqs-producer-tests.ts rename to types/sqs-producer/sqs-producer-tests.ts diff --git a/sqs-producer/tsconfig.json b/types/sqs-producer/tsconfig.json similarity index 100% rename from sqs-producer/tsconfig.json rename to types/sqs-producer/tsconfig.json diff --git a/squirejs/index.d.ts b/types/squirejs/index.d.ts similarity index 100% rename from squirejs/index.d.ts rename to types/squirejs/index.d.ts diff --git a/squirejs/squirejs-tests.ts b/types/squirejs/squirejs-tests.ts similarity index 100% rename from squirejs/squirejs-tests.ts rename to types/squirejs/squirejs-tests.ts diff --git a/squirejs/tsconfig.json b/types/squirejs/tsconfig.json similarity index 100% rename from squirejs/tsconfig.json rename to types/squirejs/tsconfig.json diff --git a/srp/index.d.ts b/types/srp/index.d.ts similarity index 100% rename from srp/index.d.ts rename to types/srp/index.d.ts diff --git a/srp/srp-tests.ts b/types/srp/srp-tests.ts similarity index 100% rename from srp/srp-tests.ts rename to types/srp/srp-tests.ts diff --git a/srp/tsconfig.json b/types/srp/tsconfig.json similarity index 100% rename from srp/tsconfig.json rename to types/srp/tsconfig.json diff --git a/ss-utils/index.d.ts b/types/ss-utils/index.d.ts similarity index 100% rename from ss-utils/index.d.ts rename to types/ss-utils/index.d.ts diff --git a/ss-utils/ss-utils-tests.ts b/types/ss-utils/ss-utils-tests.ts similarity index 100% rename from ss-utils/ss-utils-tests.ts rename to types/ss-utils/ss-utils-tests.ts diff --git a/ss-utils/tsconfig.json b/types/ss-utils/tsconfig.json similarity index 100% rename from ss-utils/tsconfig.json rename to types/ss-utils/tsconfig.json diff --git a/ssh2-sftp-client/index.d.ts b/types/ssh2-sftp-client/index.d.ts similarity index 100% rename from ssh2-sftp-client/index.d.ts rename to types/ssh2-sftp-client/index.d.ts diff --git a/ssh2-sftp-client/ssh2-sftp-client-tests.ts b/types/ssh2-sftp-client/ssh2-sftp-client-tests.ts similarity index 100% rename from ssh2-sftp-client/ssh2-sftp-client-tests.ts rename to types/ssh2-sftp-client/ssh2-sftp-client-tests.ts diff --git a/ssh2-sftp-client/tsconfig.json b/types/ssh2-sftp-client/tsconfig.json similarity index 100% rename from ssh2-sftp-client/tsconfig.json rename to types/ssh2-sftp-client/tsconfig.json diff --git a/ssh2-streams/index.d.ts b/types/ssh2-streams/index.d.ts similarity index 100% rename from ssh2-streams/index.d.ts rename to types/ssh2-streams/index.d.ts diff --git a/ssh2-streams/ssh2-streams-tests.ts b/types/ssh2-streams/ssh2-streams-tests.ts similarity index 100% rename from ssh2-streams/ssh2-streams-tests.ts rename to types/ssh2-streams/ssh2-streams-tests.ts diff --git a/ssh2-streams/tsconfig.json b/types/ssh2-streams/tsconfig.json similarity index 100% rename from ssh2-streams/tsconfig.json rename to types/ssh2-streams/tsconfig.json diff --git a/ssh2/index.d.ts b/types/ssh2/index.d.ts similarity index 100% rename from ssh2/index.d.ts rename to types/ssh2/index.d.ts diff --git a/ssh2/ssh2-tests.ts b/types/ssh2/ssh2-tests.ts similarity index 100% rename from ssh2/ssh2-tests.ts rename to types/ssh2/ssh2-tests.ts diff --git a/ssh2/tsconfig.json b/types/ssh2/tsconfig.json similarity index 100% rename from ssh2/tsconfig.json rename to types/ssh2/tsconfig.json diff --git a/sshpk/index.d.ts b/types/sshpk/index.d.ts similarity index 100% rename from sshpk/index.d.ts rename to types/sshpk/index.d.ts diff --git a/sshpk/sshpk-tests.ts b/types/sshpk/sshpk-tests.ts similarity index 100% rename from sshpk/sshpk-tests.ts rename to types/sshpk/sshpk-tests.ts diff --git a/sshpk/tsconfig.json b/types/sshpk/tsconfig.json similarity index 100% rename from sshpk/tsconfig.json rename to types/sshpk/tsconfig.json diff --git a/stripe/tslint.json b/types/sshpk/tslint.json similarity index 100% rename from stripe/tslint.json rename to types/sshpk/tslint.json diff --git a/stack-mapper/index.d.ts b/types/stack-mapper/index.d.ts similarity index 100% rename from stack-mapper/index.d.ts rename to types/stack-mapper/index.d.ts diff --git a/stack-mapper/stack-mapper-tests.ts b/types/stack-mapper/stack-mapper-tests.ts similarity index 100% rename from stack-mapper/stack-mapper-tests.ts rename to types/stack-mapper/stack-mapper-tests.ts diff --git a/stack-mapper/tsconfig.json b/types/stack-mapper/tsconfig.json similarity index 100% rename from stack-mapper/tsconfig.json rename to types/stack-mapper/tsconfig.json diff --git a/stack-trace/index.d.ts b/types/stack-trace/index.d.ts similarity index 100% rename from stack-trace/index.d.ts rename to types/stack-trace/index.d.ts diff --git a/stack-trace/stack-trace-tests.ts b/types/stack-trace/stack-trace-tests.ts similarity index 100% rename from stack-trace/stack-trace-tests.ts rename to types/stack-trace/stack-trace-tests.ts diff --git a/stack-trace/tsconfig.json b/types/stack-trace/tsconfig.json similarity index 100% rename from stack-trace/tsconfig.json rename to types/stack-trace/tsconfig.json diff --git a/stacktrace-js/index.d.ts b/types/stacktrace-js/index.d.ts similarity index 100% rename from stacktrace-js/index.d.ts rename to types/stacktrace-js/index.d.ts diff --git a/stacktrace-js/stacktrace-js-tests.ts b/types/stacktrace-js/stacktrace-js-tests.ts similarity index 100% rename from stacktrace-js/stacktrace-js-tests.ts rename to types/stacktrace-js/stacktrace-js-tests.ts diff --git a/stacktrace-js/tsconfig.json b/types/stacktrace-js/tsconfig.json similarity index 100% rename from stacktrace-js/tsconfig.json rename to types/stacktrace-js/tsconfig.json diff --git a/stampit/index.d.ts b/types/stampit/index.d.ts similarity index 100% rename from stampit/index.d.ts rename to types/stampit/index.d.ts diff --git a/stampit/stampit-tests.ts b/types/stampit/stampit-tests.ts similarity index 100% rename from stampit/stampit-tests.ts rename to types/stampit/stampit-tests.ts diff --git a/stampit/tsconfig.json b/types/stampit/tsconfig.json similarity index 100% rename from stampit/tsconfig.json rename to types/stampit/tsconfig.json diff --git a/stamplay-js-sdk/index.d.ts b/types/stamplay-js-sdk/index.d.ts similarity index 100% rename from stamplay-js-sdk/index.d.ts rename to types/stamplay-js-sdk/index.d.ts diff --git a/stamplay-js-sdk/stamplay-js-sdk-tests.ts b/types/stamplay-js-sdk/stamplay-js-sdk-tests.ts similarity index 100% rename from stamplay-js-sdk/stamplay-js-sdk-tests.ts rename to types/stamplay-js-sdk/stamplay-js-sdk-tests.ts diff --git a/stamplay-js-sdk/tsconfig.json b/types/stamplay-js-sdk/tsconfig.json similarity index 100% rename from stamplay-js-sdk/tsconfig.json rename to types/stamplay-js-sdk/tsconfig.json diff --git a/types/stamplay-js-sdk/tslint.json b/types/stamplay-js-sdk/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/types/stamplay-js-sdk/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/state-machine/index.d.ts b/types/state-machine/index.d.ts similarity index 100% rename from state-machine/index.d.ts rename to types/state-machine/index.d.ts diff --git a/state-machine/state-machine-tests.ts b/types/state-machine/state-machine-tests.ts similarity index 100% rename from state-machine/state-machine-tests.ts rename to types/state-machine/state-machine-tests.ts diff --git a/state-machine/tsconfig.json b/types/state-machine/tsconfig.json similarity index 100% rename from state-machine/tsconfig.json rename to types/state-machine/tsconfig.json diff --git a/static-eval/index.d.ts b/types/static-eval/index.d.ts similarity index 100% rename from static-eval/index.d.ts rename to types/static-eval/index.d.ts diff --git a/static-eval/static-eval-tests.ts b/types/static-eval/static-eval-tests.ts similarity index 100% rename from static-eval/static-eval-tests.ts rename to types/static-eval/static-eval-tests.ts diff --git a/static-eval/tsconfig.json b/types/static-eval/tsconfig.json similarity index 100% rename from static-eval/tsconfig.json rename to types/static-eval/tsconfig.json diff --git a/stats.js/index.d.ts b/types/stats.js/index.d.ts similarity index 100% rename from stats.js/index.d.ts rename to types/stats.js/index.d.ts diff --git a/stats.js/stats.js-tests.ts b/types/stats.js/stats.js-tests.ts similarity index 100% rename from stats.js/stats.js-tests.ts rename to types/stats.js/stats.js-tests.ts diff --git a/stats.js/tsconfig.json b/types/stats.js/tsconfig.json similarity index 100% rename from stats.js/tsconfig.json rename to types/stats.js/tsconfig.json diff --git a/statsd-client/index.d.ts b/types/statsd-client/index.d.ts similarity index 100% rename from statsd-client/index.d.ts rename to types/statsd-client/index.d.ts diff --git a/statsd-client/statsd-client-tests.ts b/types/statsd-client/statsd-client-tests.ts similarity index 100% rename from statsd-client/statsd-client-tests.ts rename to types/statsd-client/statsd-client-tests.ts diff --git a/statsd-client/tsconfig.json b/types/statsd-client/tsconfig.json similarity index 100% rename from statsd-client/tsconfig.json rename to types/statsd-client/tsconfig.json diff --git a/status-bar/index.d.ts b/types/status-bar/index.d.ts similarity index 100% rename from status-bar/index.d.ts rename to types/status-bar/index.d.ts diff --git a/status-bar/status-bar-tests.ts b/types/status-bar/status-bar-tests.ts similarity index 100% rename from status-bar/status-bar-tests.ts rename to types/status-bar/status-bar-tests.ts diff --git a/status-bar/tsconfig.json b/types/status-bar/tsconfig.json similarity index 100% rename from status-bar/tsconfig.json rename to types/status-bar/tsconfig.json diff --git a/statuses/index.d.ts b/types/statuses/index.d.ts similarity index 100% rename from statuses/index.d.ts rename to types/statuses/index.d.ts diff --git a/statuses/statuses-tests.ts b/types/statuses/statuses-tests.ts similarity index 100% rename from statuses/statuses-tests.ts rename to types/statuses/statuses-tests.ts diff --git a/statuses/tsconfig.json b/types/statuses/tsconfig.json similarity index 100% rename from statuses/tsconfig.json rename to types/statuses/tsconfig.json diff --git a/steam/index.d.ts b/types/steam/index.d.ts similarity index 100% rename from steam/index.d.ts rename to types/steam/index.d.ts diff --git a/steam/steam-tests.ts b/types/steam/steam-tests.ts similarity index 100% rename from steam/steam-tests.ts rename to types/steam/steam-tests.ts diff --git a/steam/tsconfig.json b/types/steam/tsconfig.json similarity index 100% rename from steam/tsconfig.json rename to types/steam/tsconfig.json diff --git a/steed/index.d.ts b/types/steed/index.d.ts similarity index 100% rename from steed/index.d.ts rename to types/steed/index.d.ts diff --git a/steed/steed-tests.ts b/types/steed/steed-tests.ts similarity index 100% rename from steed/steed-tests.ts rename to types/steed/steed-tests.ts diff --git a/steed/tsconfig.json b/types/steed/tsconfig.json similarity index 100% rename from steed/tsconfig.json rename to types/steed/tsconfig.json diff --git a/steed/tslint.json b/types/steed/tslint.json similarity index 100% rename from steed/tslint.json rename to types/steed/tslint.json diff --git a/stompjs/index.d.ts b/types/stompjs/index.d.ts similarity index 100% rename from stompjs/index.d.ts rename to types/stompjs/index.d.ts diff --git a/stompjs/stompjs-tests.ts b/types/stompjs/stompjs-tests.ts similarity index 100% rename from stompjs/stompjs-tests.ts rename to types/stompjs/stompjs-tests.ts diff --git a/stompjs/tsconfig.json b/types/stompjs/tsconfig.json similarity index 100% rename from stompjs/tsconfig.json rename to types/stompjs/tsconfig.json diff --git a/storejs/index.d.ts b/types/storejs/index.d.ts similarity index 100% rename from storejs/index.d.ts rename to types/storejs/index.d.ts diff --git a/storejs/storejs-tests.ts b/types/storejs/storejs-tests.ts similarity index 100% rename from storejs/storejs-tests.ts rename to types/storejs/storejs-tests.ts diff --git a/storejs/tsconfig.json b/types/storejs/tsconfig.json similarity index 100% rename from storejs/tsconfig.json rename to types/storejs/tsconfig.json diff --git a/stream-buffers/index.d.ts b/types/stream-buffers/index.d.ts similarity index 100% rename from stream-buffers/index.d.ts rename to types/stream-buffers/index.d.ts diff --git a/stream-buffers/stream-buffers-tests.ts b/types/stream-buffers/stream-buffers-tests.ts similarity index 100% rename from stream-buffers/stream-buffers-tests.ts rename to types/stream-buffers/stream-buffers-tests.ts diff --git a/stream-buffers/tsconfig.json b/types/stream-buffers/tsconfig.json similarity index 100% rename from stream-buffers/tsconfig.json rename to types/stream-buffers/tsconfig.json diff --git a/strong-cluster-control/tslint.json b/types/stream-buffers/tslint.json similarity index 100% rename from strong-cluster-control/tslint.json rename to types/stream-buffers/tslint.json diff --git a/stream-meter/index.d.ts b/types/stream-meter/index.d.ts similarity index 100% rename from stream-meter/index.d.ts rename to types/stream-meter/index.d.ts diff --git a/stream-meter/stream-meter-tests.ts b/types/stream-meter/stream-meter-tests.ts similarity index 100% rename from stream-meter/stream-meter-tests.ts rename to types/stream-meter/stream-meter-tests.ts diff --git a/stream-meter/tsconfig.json b/types/stream-meter/tsconfig.json similarity index 100% rename from stream-meter/tsconfig.json rename to types/stream-meter/tsconfig.json diff --git a/stream-series/index.d.ts b/types/stream-series/index.d.ts similarity index 100% rename from stream-series/index.d.ts rename to types/stream-series/index.d.ts diff --git a/stream-series/stream-series-tests.ts b/types/stream-series/stream-series-tests.ts similarity index 100% rename from stream-series/stream-series-tests.ts rename to types/stream-series/stream-series-tests.ts diff --git a/stream-series/tsconfig.json b/types/stream-series/tsconfig.json similarity index 100% rename from stream-series/tsconfig.json rename to types/stream-series/tsconfig.json diff --git a/stream-to-array/index.d.ts b/types/stream-to-array/index.d.ts similarity index 100% rename from stream-to-array/index.d.ts rename to types/stream-to-array/index.d.ts diff --git a/stream-to-array/stream-to-array-tests.ts b/types/stream-to-array/stream-to-array-tests.ts similarity index 100% rename from stream-to-array/stream-to-array-tests.ts rename to types/stream-to-array/stream-to-array-tests.ts diff --git a/stream-to-array/tsconfig.json b/types/stream-to-array/tsconfig.json similarity index 100% rename from stream-to-array/tsconfig.json rename to types/stream-to-array/tsconfig.json diff --git a/streamjs/README.md b/types/streamjs/README.md similarity index 100% rename from streamjs/README.md rename to types/streamjs/README.md diff --git a/streamjs/index.d.ts b/types/streamjs/index.d.ts similarity index 100% rename from streamjs/index.d.ts rename to types/streamjs/index.d.ts diff --git a/streamjs/streamjs-tests.ts b/types/streamjs/streamjs-tests.ts similarity index 100% rename from streamjs/streamjs-tests.ts rename to types/streamjs/streamjs-tests.ts diff --git a/streamjs/tsconfig.json b/types/streamjs/tsconfig.json similarity index 100% rename from streamjs/tsconfig.json rename to types/streamjs/tsconfig.json diff --git a/strftime/index.d.ts b/types/strftime/index.d.ts similarity index 100% rename from strftime/index.d.ts rename to types/strftime/index.d.ts diff --git a/strftime/strftime-tests.ts b/types/strftime/strftime-tests.ts similarity index 100% rename from strftime/strftime-tests.ts rename to types/strftime/strftime-tests.ts diff --git a/strftime/tsconfig.json b/types/strftime/tsconfig.json similarity index 100% rename from strftime/tsconfig.json rename to types/strftime/tsconfig.json diff --git a/string-hash/index.d.ts b/types/string-hash/index.d.ts similarity index 100% rename from string-hash/index.d.ts rename to types/string-hash/index.d.ts diff --git a/string-hash/string-hash-tests.ts b/types/string-hash/string-hash-tests.ts similarity index 100% rename from string-hash/string-hash-tests.ts rename to types/string-hash/string-hash-tests.ts diff --git a/string-hash/tsconfig.json b/types/string-hash/tsconfig.json similarity index 100% rename from string-hash/tsconfig.json rename to types/string-hash/tsconfig.json diff --git a/string-template/index.d.ts b/types/string-template/index.d.ts similarity index 100% rename from string-template/index.d.ts rename to types/string-template/index.d.ts diff --git a/string-template/string-template-tests.ts b/types/string-template/string-template-tests.ts similarity index 100% rename from string-template/string-template-tests.ts rename to types/string-template/string-template-tests.ts diff --git a/string-template/tsconfig.json b/types/string-template/tsconfig.json similarity index 100% rename from string-template/tsconfig.json rename to types/string-template/tsconfig.json diff --git a/string/index.d.ts b/types/string/index.d.ts similarity index 100% rename from string/index.d.ts rename to types/string/index.d.ts diff --git a/string/string-tests.ts b/types/string/string-tests.ts similarity index 100% rename from string/string-tests.ts rename to types/string/string-tests.ts diff --git a/string/tsconfig.json b/types/string/tsconfig.json similarity index 100% rename from string/tsconfig.json rename to types/string/tsconfig.json diff --git a/string_score/index.d.ts b/types/string_score/index.d.ts similarity index 100% rename from string_score/index.d.ts rename to types/string_score/index.d.ts diff --git a/string_score/string_score-tests.ts b/types/string_score/string_score-tests.ts similarity index 100% rename from string_score/string_score-tests.ts rename to types/string_score/string_score-tests.ts diff --git a/string_score/tsconfig.json b/types/string_score/tsconfig.json similarity index 100% rename from string_score/tsconfig.json rename to types/string_score/tsconfig.json diff --git a/stringify-object/index.d.ts b/types/stringify-object/index.d.ts similarity index 100% rename from stringify-object/index.d.ts rename to types/stringify-object/index.d.ts diff --git a/stringify-object/stringify-object-tests.ts b/types/stringify-object/stringify-object-tests.ts similarity index 100% rename from stringify-object/stringify-object-tests.ts rename to types/stringify-object/stringify-object-tests.ts diff --git a/stringify-object/tsconfig.json b/types/stringify-object/tsconfig.json similarity index 100% rename from stringify-object/tsconfig.json rename to types/stringify-object/tsconfig.json diff --git a/swagger-express-mw/tslint.json b/types/stringify-object/tslint.json similarity index 100% rename from swagger-express-mw/tslint.json rename to types/stringify-object/tslint.json diff --git a/strip-ansi/index.d.ts b/types/strip-ansi/index.d.ts similarity index 100% rename from strip-ansi/index.d.ts rename to types/strip-ansi/index.d.ts diff --git a/strip-ansi/strip-ansi-tests.ts b/types/strip-ansi/strip-ansi-tests.ts similarity index 100% rename from strip-ansi/strip-ansi-tests.ts rename to types/strip-ansi/strip-ansi-tests.ts diff --git a/strip-ansi/tsconfig.json b/types/strip-ansi/tsconfig.json similarity index 100% rename from strip-ansi/tsconfig.json rename to types/strip-ansi/tsconfig.json diff --git a/swagger-hapi/tslint.json b/types/strip-ansi/tslint.json similarity index 100% rename from swagger-hapi/tslint.json rename to types/strip-ansi/tslint.json diff --git a/strip-bom/index.d.ts b/types/strip-bom/index.d.ts similarity index 100% rename from strip-bom/index.d.ts rename to types/strip-bom/index.d.ts diff --git a/strip-bom/strip-bom-tests.ts b/types/strip-bom/strip-bom-tests.ts similarity index 100% rename from strip-bom/strip-bom-tests.ts rename to types/strip-bom/strip-bom-tests.ts diff --git a/strip-bom/tsconfig.json b/types/strip-bom/tsconfig.json similarity index 100% rename from strip-bom/tsconfig.json rename to types/strip-bom/tsconfig.json diff --git a/swagger-node-runner/tslint.json b/types/strip-bom/tslint.json similarity index 100% rename from swagger-node-runner/tslint.json rename to types/strip-bom/tslint.json diff --git a/strip-json-comments/index.d.ts b/types/strip-json-comments/index.d.ts similarity index 100% rename from strip-json-comments/index.d.ts rename to types/strip-json-comments/index.d.ts diff --git a/strip-json-comments/strip-json-comments-tests.ts b/types/strip-json-comments/strip-json-comments-tests.ts similarity index 100% rename from strip-json-comments/strip-json-comments-tests.ts rename to types/strip-json-comments/strip-json-comments-tests.ts diff --git a/strip-json-comments/tsconfig.json b/types/strip-json-comments/tsconfig.json similarity index 100% rename from strip-json-comments/tsconfig.json rename to types/strip-json-comments/tsconfig.json diff --git a/stripe-checkout/index.d.ts b/types/stripe-checkout/index.d.ts similarity index 100% rename from stripe-checkout/index.d.ts rename to types/stripe-checkout/index.d.ts diff --git a/stripe-checkout/stripe-checkout-tests.ts b/types/stripe-checkout/stripe-checkout-tests.ts similarity index 100% rename from stripe-checkout/stripe-checkout-tests.ts rename to types/stripe-checkout/stripe-checkout-tests.ts diff --git a/stripe-checkout/tsconfig.json b/types/stripe-checkout/tsconfig.json similarity index 100% rename from stripe-checkout/tsconfig.json rename to types/stripe-checkout/tsconfig.json diff --git a/stripe-node/index.d.ts b/types/stripe-node/index.d.ts similarity index 100% rename from stripe-node/index.d.ts rename to types/stripe-node/index.d.ts diff --git a/stripe-node/stripe-node-tests.ts b/types/stripe-node/stripe-node-tests.ts similarity index 100% rename from stripe-node/stripe-node-tests.ts rename to types/stripe-node/stripe-node-tests.ts diff --git a/stripe-node/tsconfig.json b/types/stripe-node/tsconfig.json similarity index 100% rename from stripe-node/tsconfig.json rename to types/stripe-node/tsconfig.json diff --git a/stripe/index.d.ts b/types/stripe/index.d.ts similarity index 100% rename from stripe/index.d.ts rename to types/stripe/index.d.ts diff --git a/stripe/stripe-tests.ts b/types/stripe/stripe-tests.ts similarity index 100% rename from stripe/stripe-tests.ts rename to types/stripe/stripe-tests.ts diff --git a/stripe/tsconfig.json b/types/stripe/tsconfig.json similarity index 100% rename from stripe/tsconfig.json rename to types/stripe/tsconfig.json diff --git a/swagger-parser/tslint.json b/types/stripe/tslint.json similarity index 100% rename from swagger-parser/tslint.json rename to types/stripe/tslint.json diff --git a/striptags/index.d.ts b/types/striptags/index.d.ts similarity index 100% rename from striptags/index.d.ts rename to types/striptags/index.d.ts diff --git a/striptags/striptags-tests.ts b/types/striptags/striptags-tests.ts similarity index 100% rename from striptags/striptags-tests.ts rename to types/striptags/striptags-tests.ts diff --git a/striptags/tsconfig.json b/types/striptags/tsconfig.json similarity index 100% rename from striptags/tsconfig.json rename to types/striptags/tsconfig.json diff --git a/strong-cluster-control/index.d.ts b/types/strong-cluster-control/index.d.ts similarity index 100% rename from strong-cluster-control/index.d.ts rename to types/strong-cluster-control/index.d.ts diff --git a/strong-cluster-control/strong-cluster-control-tests.ts b/types/strong-cluster-control/strong-cluster-control-tests.ts similarity index 100% rename from strong-cluster-control/strong-cluster-control-tests.ts rename to types/strong-cluster-control/strong-cluster-control-tests.ts diff --git a/strong-cluster-control/tsconfig.json b/types/strong-cluster-control/tsconfig.json similarity index 100% rename from strong-cluster-control/tsconfig.json rename to types/strong-cluster-control/tsconfig.json diff --git a/swagger-restify-mw/tslint.json b/types/strong-cluster-control/tslint.json similarity index 100% rename from swagger-restify-mw/tslint.json rename to types/strong-cluster-control/tslint.json diff --git a/strophe/index.d.ts b/types/strophe/index.d.ts similarity index 100% rename from strophe/index.d.ts rename to types/strophe/index.d.ts diff --git a/strophe/strophe-tests.ts b/types/strophe/strophe-tests.ts similarity index 100% rename from strophe/strophe-tests.ts rename to types/strophe/strophe-tests.ts diff --git a/strophe/tsconfig.json b/types/strophe/tsconfig.json similarity index 100% rename from strophe/tsconfig.json rename to types/strophe/tsconfig.json diff --git a/stylelint/index.d.ts b/types/stylelint/index.d.ts similarity index 100% rename from stylelint/index.d.ts rename to types/stylelint/index.d.ts diff --git a/stylelint/stylelint-tests.ts b/types/stylelint/stylelint-tests.ts similarity index 100% rename from stylelint/stylelint-tests.ts rename to types/stylelint/stylelint-tests.ts diff --git a/stylelint/tsconfig.json b/types/stylelint/tsconfig.json similarity index 100% rename from stylelint/tsconfig.json rename to types/stylelint/tsconfig.json diff --git a/stylus/index.d.ts b/types/stylus/index.d.ts similarity index 100% rename from stylus/index.d.ts rename to types/stylus/index.d.ts diff --git a/stylus/stylus-tests.ts b/types/stylus/stylus-tests.ts similarity index 100% rename from stylus/stylus-tests.ts rename to types/stylus/stylus-tests.ts diff --git a/stylus/tsconfig.json b/types/stylus/tsconfig.json similarity index 100% rename from stylus/tsconfig.json rename to types/stylus/tsconfig.json diff --git a/succinct/index.d.ts b/types/succinct/index.d.ts similarity index 100% rename from succinct/index.d.ts rename to types/succinct/index.d.ts diff --git a/succinct/succinct-tests.ts b/types/succinct/succinct-tests.ts similarity index 100% rename from succinct/succinct-tests.ts rename to types/succinct/succinct-tests.ts diff --git a/succinct/tsconfig.json b/types/succinct/tsconfig.json similarity index 100% rename from succinct/tsconfig.json rename to types/succinct/tsconfig.json diff --git a/suitescript/index.d.ts b/types/suitescript/index.d.ts similarity index 100% rename from suitescript/index.d.ts rename to types/suitescript/index.d.ts diff --git a/suitescript/tsconfig.json b/types/suitescript/tsconfig.json similarity index 100% rename from suitescript/tsconfig.json rename to types/suitescript/tsconfig.json diff --git a/superagent/index.d.ts b/types/superagent/index.d.ts similarity index 100% rename from superagent/index.d.ts rename to types/superagent/index.d.ts diff --git a/superagent/superagent-tests.ts b/types/superagent/superagent-tests.ts similarity index 100% rename from superagent/superagent-tests.ts rename to types/superagent/superagent-tests.ts diff --git a/superagent/tsconfig.json b/types/superagent/tsconfig.json similarity index 100% rename from superagent/tsconfig.json rename to types/superagent/tsconfig.json diff --git a/supertest-as-promised/index.d.ts b/types/supertest-as-promised/index.d.ts similarity index 100% rename from supertest-as-promised/index.d.ts rename to types/supertest-as-promised/index.d.ts diff --git a/supertest-as-promised/supertest-as-promised-tests.ts b/types/supertest-as-promised/supertest-as-promised-tests.ts similarity index 100% rename from supertest-as-promised/supertest-as-promised-tests.ts rename to types/supertest-as-promised/supertest-as-promised-tests.ts diff --git a/supertest-as-promised/tsconfig.json b/types/supertest-as-promised/tsconfig.json similarity index 100% rename from supertest-as-promised/tsconfig.json rename to types/supertest-as-promised/tsconfig.json diff --git a/supertest-as-promised/tslint.json b/types/supertest-as-promised/tslint.json similarity index 100% rename from supertest-as-promised/tslint.json rename to types/supertest-as-promised/tslint.json diff --git a/supertest/index.d.ts b/types/supertest/index.d.ts similarity index 100% rename from supertest/index.d.ts rename to types/supertest/index.d.ts diff --git a/supertest/supertest-tests.ts b/types/supertest/supertest-tests.ts similarity index 100% rename from supertest/supertest-tests.ts rename to types/supertest/supertest-tests.ts diff --git a/supertest/tsconfig.json b/types/supertest/tsconfig.json similarity index 100% rename from supertest/tsconfig.json rename to types/supertest/tsconfig.json diff --git a/supports-color/index.d.ts b/types/supports-color/index.d.ts similarity index 100% rename from supports-color/index.d.ts rename to types/supports-color/index.d.ts diff --git a/supports-color/supports-color-tests.ts b/types/supports-color/supports-color-tests.ts similarity index 100% rename from supports-color/supports-color-tests.ts rename to types/supports-color/supports-color-tests.ts diff --git a/supports-color/tsconfig.json b/types/supports-color/tsconfig.json similarity index 100% rename from supports-color/tsconfig.json rename to types/supports-color/tsconfig.json diff --git a/survey-knockout/index.d.ts b/types/survey-knockout/index.d.ts similarity index 100% rename from survey-knockout/index.d.ts rename to types/survey-knockout/index.d.ts diff --git a/survey-knockout/survey-knockout-tests.ts b/types/survey-knockout/survey-knockout-tests.ts similarity index 100% rename from survey-knockout/survey-knockout-tests.ts rename to types/survey-knockout/survey-knockout-tests.ts diff --git a/survey-knockout/tsconfig.json b/types/survey-knockout/tsconfig.json similarity index 100% rename from survey-knockout/tsconfig.json rename to types/survey-knockout/tsconfig.json diff --git a/svg-injector/index.d.ts b/types/svg-injector/index.d.ts similarity index 100% rename from svg-injector/index.d.ts rename to types/svg-injector/index.d.ts diff --git a/svg-injector/svg-injector-tests.ts b/types/svg-injector/svg-injector-tests.ts similarity index 100% rename from svg-injector/svg-injector-tests.ts rename to types/svg-injector/svg-injector-tests.ts diff --git a/svg-injector/tsconfig.json b/types/svg-injector/tsconfig.json similarity index 100% rename from svg-injector/tsconfig.json rename to types/svg-injector/tsconfig.json diff --git a/svg-pan-zoom/index.d.ts b/types/svg-pan-zoom/index.d.ts similarity index 100% rename from svg-pan-zoom/index.d.ts rename to types/svg-pan-zoom/index.d.ts diff --git a/svg-pan-zoom/svg-pan-zoom-tests.ts b/types/svg-pan-zoom/svg-pan-zoom-tests.ts similarity index 100% rename from svg-pan-zoom/svg-pan-zoom-tests.ts rename to types/svg-pan-zoom/svg-pan-zoom-tests.ts diff --git a/svg-pan-zoom/tsconfig.json b/types/svg-pan-zoom/tsconfig.json similarity index 100% rename from svg-pan-zoom/tsconfig.json rename to types/svg-pan-zoom/tsconfig.json diff --git a/svg-pan-zoom/v2/index.d.ts b/types/svg-pan-zoom/v2/index.d.ts similarity index 100% rename from svg-pan-zoom/v2/index.d.ts rename to types/svg-pan-zoom/v2/index.d.ts diff --git a/svg-pan-zoom/v2/tsconfig.json b/types/svg-pan-zoom/v2/tsconfig.json similarity index 100% rename from svg-pan-zoom/v2/tsconfig.json rename to types/svg-pan-zoom/v2/tsconfig.json diff --git a/svg-sprite/index.d.ts b/types/svg-sprite/index.d.ts similarity index 100% rename from svg-sprite/index.d.ts rename to types/svg-sprite/index.d.ts diff --git a/svg-sprite/svg-sprite-tests.ts b/types/svg-sprite/svg-sprite-tests.ts similarity index 100% rename from svg-sprite/svg-sprite-tests.ts rename to types/svg-sprite/svg-sprite-tests.ts diff --git a/svg-sprite/tsconfig.json b/types/svg-sprite/tsconfig.json similarity index 100% rename from svg-sprite/tsconfig.json rename to types/svg-sprite/tsconfig.json diff --git a/svg.js/index.d.ts b/types/svg.js/index.d.ts similarity index 100% rename from svg.js/index.d.ts rename to types/svg.js/index.d.ts diff --git a/svg.js/svg.js-tests.ts b/types/svg.js/svg.js-tests.ts similarity index 100% rename from svg.js/svg.js-tests.ts rename to types/svg.js/svg.js-tests.ts diff --git a/svg.js/tsconfig.json b/types/svg.js/tsconfig.json similarity index 100% rename from svg.js/tsconfig.json rename to types/svg.js/tsconfig.json diff --git a/svg2png/index.d.ts b/types/svg2png/index.d.ts similarity index 100% rename from svg2png/index.d.ts rename to types/svg2png/index.d.ts diff --git a/svg2png/svg2png-tests.ts b/types/svg2png/svg2png-tests.ts similarity index 100% rename from svg2png/svg2png-tests.ts rename to types/svg2png/svg2png-tests.ts diff --git a/svg2png/tsconfig.json b/types/svg2png/tsconfig.json similarity index 100% rename from svg2png/tsconfig.json rename to types/svg2png/tsconfig.json diff --git a/svgjs.draggable/index.d.ts b/types/svgjs.draggable/index.d.ts similarity index 100% rename from svgjs.draggable/index.d.ts rename to types/svgjs.draggable/index.d.ts diff --git a/svgjs.draggable/tsconfig.json b/types/svgjs.draggable/tsconfig.json similarity index 100% rename from svgjs.draggable/tsconfig.json rename to types/svgjs.draggable/tsconfig.json diff --git a/svgjs.resize/index.d.ts b/types/svgjs.resize/index.d.ts similarity index 100% rename from svgjs.resize/index.d.ts rename to types/svgjs.resize/index.d.ts diff --git a/svgjs.resize/tsconfig.json b/types/svgjs.resize/tsconfig.json similarity index 100% rename from svgjs.resize/tsconfig.json rename to types/svgjs.resize/tsconfig.json diff --git a/swag/index.d.ts b/types/swag/index.d.ts similarity index 100% rename from swag/index.d.ts rename to types/swag/index.d.ts diff --git a/swag/swag-tests.ts b/types/swag/swag-tests.ts similarity index 100% rename from swag/swag-tests.ts rename to types/swag/swag-tests.ts diff --git a/swag/tsconfig.json b/types/swag/tsconfig.json similarity index 100% rename from swag/tsconfig.json rename to types/swag/tsconfig.json diff --git a/swagger-express-middleware/index.d.ts b/types/swagger-express-middleware/index.d.ts similarity index 100% rename from swagger-express-middleware/index.d.ts rename to types/swagger-express-middleware/index.d.ts diff --git a/swagger-express-middleware/swagger-express-middleware-tests.ts b/types/swagger-express-middleware/swagger-express-middleware-tests.ts similarity index 100% rename from swagger-express-middleware/swagger-express-middleware-tests.ts rename to types/swagger-express-middleware/swagger-express-middleware-tests.ts diff --git a/swagger-express-middleware/tsconfig.json b/types/swagger-express-middleware/tsconfig.json similarity index 100% rename from swagger-express-middleware/tsconfig.json rename to types/swagger-express-middleware/tsconfig.json diff --git a/swagger-express-mw/index.d.ts b/types/swagger-express-mw/index.d.ts similarity index 100% rename from swagger-express-mw/index.d.ts rename to types/swagger-express-mw/index.d.ts diff --git a/swagger-express-mw/swagger-express-mw-tests.ts b/types/swagger-express-mw/swagger-express-mw-tests.ts similarity index 100% rename from swagger-express-mw/swagger-express-mw-tests.ts rename to types/swagger-express-mw/swagger-express-mw-tests.ts diff --git a/swagger-express-mw/tsconfig.json b/types/swagger-express-mw/tsconfig.json similarity index 100% rename from swagger-express-mw/tsconfig.json rename to types/swagger-express-mw/tsconfig.json diff --git a/swagger-sails-hook/tslint.json b/types/swagger-express-mw/tslint.json similarity index 100% rename from swagger-sails-hook/tslint.json rename to types/swagger-express-mw/tslint.json diff --git a/swagger-hapi/index.d.ts b/types/swagger-hapi/index.d.ts similarity index 100% rename from swagger-hapi/index.d.ts rename to types/swagger-hapi/index.d.ts diff --git a/swagger-hapi/swagger-hapi-tests.ts b/types/swagger-hapi/swagger-hapi-tests.ts similarity index 100% rename from swagger-hapi/swagger-hapi-tests.ts rename to types/swagger-hapi/swagger-hapi-tests.ts diff --git a/swagger-hapi/tsconfig.json b/types/swagger-hapi/tsconfig.json similarity index 100% rename from swagger-hapi/tsconfig.json rename to types/swagger-hapi/tsconfig.json diff --git a/table/tslint.json b/types/swagger-hapi/tslint.json similarity index 100% rename from table/tslint.json rename to types/swagger-hapi/tslint.json diff --git a/swagger-jsdoc/index.d.ts b/types/swagger-jsdoc/index.d.ts similarity index 100% rename from swagger-jsdoc/index.d.ts rename to types/swagger-jsdoc/index.d.ts diff --git a/swagger-jsdoc/swagger-jsdoc-tests.ts b/types/swagger-jsdoc/swagger-jsdoc-tests.ts similarity index 100% rename from swagger-jsdoc/swagger-jsdoc-tests.ts rename to types/swagger-jsdoc/swagger-jsdoc-tests.ts diff --git a/swagger-jsdoc/tsconfig.json b/types/swagger-jsdoc/tsconfig.json similarity index 100% rename from swagger-jsdoc/tsconfig.json rename to types/swagger-jsdoc/tsconfig.json diff --git a/swagger-node-runner/index.d.ts b/types/swagger-node-runner/index.d.ts similarity index 100% rename from swagger-node-runner/index.d.ts rename to types/swagger-node-runner/index.d.ts diff --git a/swagger-node-runner/swagger-node-runner-tests.ts b/types/swagger-node-runner/swagger-node-runner-tests.ts similarity index 100% rename from swagger-node-runner/swagger-node-runner-tests.ts rename to types/swagger-node-runner/swagger-node-runner-tests.ts diff --git a/swagger-node-runner/tsconfig.json b/types/swagger-node-runner/tsconfig.json similarity index 100% rename from swagger-node-runner/tsconfig.json rename to types/swagger-node-runner/tsconfig.json diff --git a/tinymce/tslint.json b/types/swagger-node-runner/tslint.json similarity index 100% rename from tinymce/tslint.json rename to types/swagger-node-runner/tslint.json diff --git a/swagger-parser/index.d.ts b/types/swagger-parser/index.d.ts similarity index 100% rename from swagger-parser/index.d.ts rename to types/swagger-parser/index.d.ts diff --git a/swagger-parser/swagger-parser-tests.ts b/types/swagger-parser/swagger-parser-tests.ts similarity index 100% rename from swagger-parser/swagger-parser-tests.ts rename to types/swagger-parser/swagger-parser-tests.ts diff --git a/swagger-parser/tsconfig.json b/types/swagger-parser/tsconfig.json similarity index 100% rename from swagger-parser/tsconfig.json rename to types/swagger-parser/tsconfig.json diff --git a/uikit/tslint.json b/types/swagger-parser/tslint.json similarity index 100% rename from uikit/tslint.json rename to types/swagger-parser/tslint.json diff --git a/swagger-restify-mw/index.d.ts b/types/swagger-restify-mw/index.d.ts similarity index 100% rename from swagger-restify-mw/index.d.ts rename to types/swagger-restify-mw/index.d.ts diff --git a/swagger-restify-mw/swagger-restify-mw-tests.ts b/types/swagger-restify-mw/swagger-restify-mw-tests.ts similarity index 100% rename from swagger-restify-mw/swagger-restify-mw-tests.ts rename to types/swagger-restify-mw/swagger-restify-mw-tests.ts diff --git a/swagger-restify-mw/tsconfig.json b/types/swagger-restify-mw/tsconfig.json similarity index 100% rename from swagger-restify-mw/tsconfig.json rename to types/swagger-restify-mw/tsconfig.json diff --git a/update-notifier/tslint.json b/types/swagger-restify-mw/tslint.json similarity index 100% rename from update-notifier/tslint.json rename to types/swagger-restify-mw/tslint.json diff --git a/swagger-sails-hook/index.d.ts b/types/swagger-sails-hook/index.d.ts similarity index 100% rename from swagger-sails-hook/index.d.ts rename to types/swagger-sails-hook/index.d.ts diff --git a/swagger-sails-hook/swagger-sails-hook-tests.ts b/types/swagger-sails-hook/swagger-sails-hook-tests.ts similarity index 100% rename from swagger-sails-hook/swagger-sails-hook-tests.ts rename to types/swagger-sails-hook/swagger-sails-hook-tests.ts diff --git a/swagger-sails-hook/tsconfig.json b/types/swagger-sails-hook/tsconfig.json similarity index 100% rename from swagger-sails-hook/tsconfig.json rename to types/swagger-sails-hook/tsconfig.json diff --git a/url-regex/tslint.json b/types/swagger-sails-hook/tslint.json similarity index 100% rename from url-regex/tslint.json rename to types/swagger-sails-hook/tslint.json diff --git a/swagger-schema-official/index.d.ts b/types/swagger-schema-official/index.d.ts similarity index 100% rename from swagger-schema-official/index.d.ts rename to types/swagger-schema-official/index.d.ts diff --git a/swagger-schema-official/swagger-schema-official-tests.ts b/types/swagger-schema-official/swagger-schema-official-tests.ts similarity index 100% rename from swagger-schema-official/swagger-schema-official-tests.ts rename to types/swagger-schema-official/swagger-schema-official-tests.ts diff --git a/swagger-schema-official/tsconfig.json b/types/swagger-schema-official/tsconfig.json similarity index 100% rename from swagger-schema-official/tsconfig.json rename to types/swagger-schema-official/tsconfig.json diff --git a/swagger-schema-official/tslint.json b/types/swagger-schema-official/tslint.json similarity index 100% rename from swagger-schema-official/tslint.json rename to types/swagger-schema-official/tslint.json diff --git a/swaggerize-express/index.d.ts b/types/swaggerize-express/index.d.ts similarity index 100% rename from swaggerize-express/index.d.ts rename to types/swaggerize-express/index.d.ts diff --git a/swaggerize-express/swaggerize-express-tests.ts b/types/swaggerize-express/swaggerize-express-tests.ts similarity index 100% rename from swaggerize-express/swaggerize-express-tests.ts rename to types/swaggerize-express/swaggerize-express-tests.ts diff --git a/swaggerize-express/tsconfig.json b/types/swaggerize-express/tsconfig.json similarity index 100% rename from swaggerize-express/tsconfig.json rename to types/swaggerize-express/tsconfig.json diff --git a/sweetalert/index.d.ts b/types/sweetalert/index.d.ts similarity index 100% rename from sweetalert/index.d.ts rename to types/sweetalert/index.d.ts diff --git a/sweetalert/sweetalert-tests.ts b/types/sweetalert/sweetalert-tests.ts similarity index 100% rename from sweetalert/sweetalert-tests.ts rename to types/sweetalert/sweetalert-tests.ts diff --git a/sweetalert/tsconfig.json b/types/sweetalert/tsconfig.json similarity index 100% rename from sweetalert/tsconfig.json rename to types/sweetalert/tsconfig.json diff --git a/swfobject/index.d.ts b/types/swfobject/index.d.ts similarity index 100% rename from swfobject/index.d.ts rename to types/swfobject/index.d.ts diff --git a/swfobject/swfobject-tests.ts b/types/swfobject/swfobject-tests.ts similarity index 100% rename from swfobject/swfobject-tests.ts rename to types/swfobject/swfobject-tests.ts diff --git a/swfobject/tsconfig.json b/types/swfobject/tsconfig.json similarity index 100% rename from swfobject/tsconfig.json rename to types/swfobject/tsconfig.json diff --git a/swiftclick/index.d.ts b/types/swiftclick/index.d.ts similarity index 100% rename from swiftclick/index.d.ts rename to types/swiftclick/index.d.ts diff --git a/swiftclick/swiftclick-tests.ts b/types/swiftclick/swiftclick-tests.ts similarity index 100% rename from swiftclick/swiftclick-tests.ts rename to types/swiftclick/swiftclick-tests.ts diff --git a/swiftclick/tsconfig.json b/types/swiftclick/tsconfig.json similarity index 100% rename from swiftclick/tsconfig.json rename to types/swiftclick/tsconfig.json diff --git a/swig-email-templates/index.d.ts b/types/swig-email-templates/index.d.ts similarity index 100% rename from swig-email-templates/index.d.ts rename to types/swig-email-templates/index.d.ts diff --git a/swig-email-templates/swig-email-templates-tests.ts b/types/swig-email-templates/swig-email-templates-tests.ts similarity index 100% rename from swig-email-templates/swig-email-templates-tests.ts rename to types/swig-email-templates/swig-email-templates-tests.ts diff --git a/swig-email-templates/tsconfig.json b/types/swig-email-templates/tsconfig.json similarity index 100% rename from swig-email-templates/tsconfig.json rename to types/swig-email-templates/tsconfig.json diff --git a/swig/index.d.ts b/types/swig/index.d.ts similarity index 100% rename from swig/index.d.ts rename to types/swig/index.d.ts diff --git a/swig/swig-tests.ts b/types/swig/swig-tests.ts similarity index 100% rename from swig/swig-tests.ts rename to types/swig/swig-tests.ts diff --git a/swig/tsconfig.json b/types/swig/tsconfig.json similarity index 100% rename from swig/tsconfig.json rename to types/swig/tsconfig.json diff --git a/swipe/index.d.ts b/types/swipe/index.d.ts similarity index 100% rename from swipe/index.d.ts rename to types/swipe/index.d.ts diff --git a/swipe/swipe-tests.ts b/types/swipe/swipe-tests.ts similarity index 100% rename from swipe/swipe-tests.ts rename to types/swipe/swipe-tests.ts diff --git a/swipe/tsconfig.json b/types/swipe/tsconfig.json similarity index 100% rename from swipe/tsconfig.json rename to types/swipe/tsconfig.json diff --git a/swiper/index.d.ts b/types/swiper/index.d.ts similarity index 100% rename from swiper/index.d.ts rename to types/swiper/index.d.ts diff --git a/swiper/swiper-tests.ts b/types/swiper/swiper-tests.ts similarity index 100% rename from swiper/swiper-tests.ts rename to types/swiper/swiper-tests.ts diff --git a/swiper/tsconfig.json b/types/swiper/tsconfig.json similarity index 100% rename from swiper/tsconfig.json rename to types/swiper/tsconfig.json diff --git a/swiper/tslint.json b/types/swiper/tslint.json similarity index 100% rename from swiper/tslint.json rename to types/swiper/tslint.json diff --git a/swiper/v2/index.d.ts b/types/swiper/v2/index.d.ts similarity index 100% rename from swiper/v2/index.d.ts rename to types/swiper/v2/index.d.ts diff --git a/swiper/v2/swiper-tests.ts b/types/swiper/v2/swiper-tests.ts similarity index 100% rename from swiper/v2/swiper-tests.ts rename to types/swiper/v2/swiper-tests.ts diff --git a/swiper/v2/tsconfig.json b/types/swiper/v2/tsconfig.json similarity index 100% rename from swiper/v2/tsconfig.json rename to types/swiper/v2/tsconfig.json diff --git a/swiper/v2/tslint.json b/types/swiper/v2/tslint.json similarity index 100% rename from swiper/v2/tslint.json rename to types/swiper/v2/tslint.json diff --git a/swipeview/index.d.ts b/types/swipeview/index.d.ts similarity index 100% rename from swipeview/index.d.ts rename to types/swipeview/index.d.ts diff --git a/swipeview/swipeview-tests.ts b/types/swipeview/swipeview-tests.ts similarity index 100% rename from swipeview/swipeview-tests.ts rename to types/swipeview/swipeview-tests.ts diff --git a/swipeview/tsconfig.json b/types/swipeview/tsconfig.json similarity index 100% rename from swipeview/tsconfig.json rename to types/swipeview/tsconfig.json diff --git a/switchery/index.d.ts b/types/switchery/index.d.ts similarity index 100% rename from switchery/index.d.ts rename to types/switchery/index.d.ts diff --git a/switchery/switchery-tests.ts b/types/switchery/switchery-tests.ts similarity index 100% rename from switchery/switchery-tests.ts rename to types/switchery/switchery-tests.ts diff --git a/switchery/tsconfig.json b/types/switchery/tsconfig.json similarity index 100% rename from switchery/tsconfig.json rename to types/switchery/tsconfig.json diff --git a/swiz/index.d.ts b/types/swiz/index.d.ts similarity index 100% rename from swiz/index.d.ts rename to types/swiz/index.d.ts diff --git a/swiz/swiz-tests.ts b/types/swiz/swiz-tests.ts similarity index 100% rename from swiz/swiz-tests.ts rename to types/swiz/swiz-tests.ts diff --git a/swiz/tsconfig.json b/types/swiz/tsconfig.json similarity index 100% rename from swiz/tsconfig.json rename to types/swiz/tsconfig.json diff --git a/sylvester/index.d.ts b/types/sylvester/index.d.ts similarity index 100% rename from sylvester/index.d.ts rename to types/sylvester/index.d.ts diff --git a/sylvester/sylvester-tests.ts b/types/sylvester/sylvester-tests.ts similarity index 100% rename from sylvester/sylvester-tests.ts rename to types/sylvester/sylvester-tests.ts diff --git a/sylvester/tsconfig.json b/types/sylvester/tsconfig.json similarity index 100% rename from sylvester/tsconfig.json rename to types/sylvester/tsconfig.json diff --git a/synaptic/index.d.ts b/types/synaptic/index.d.ts similarity index 100% rename from synaptic/index.d.ts rename to types/synaptic/index.d.ts diff --git a/synaptic/synaptic-tests.ts b/types/synaptic/synaptic-tests.ts similarity index 100% rename from synaptic/synaptic-tests.ts rename to types/synaptic/synaptic-tests.ts diff --git a/synaptic/tsconfig.json b/types/synaptic/tsconfig.json similarity index 100% rename from synaptic/tsconfig.json rename to types/synaptic/tsconfig.json diff --git a/systemjs/index.d.ts b/types/systemjs/index.d.ts similarity index 100% rename from systemjs/index.d.ts rename to types/systemjs/index.d.ts diff --git a/systemjs/systemjs-tests.ts b/types/systemjs/systemjs-tests.ts similarity index 100% rename from systemjs/systemjs-tests.ts rename to types/systemjs/systemjs-tests.ts diff --git a/systemjs/tsconfig.json b/types/systemjs/tsconfig.json similarity index 100% rename from systemjs/tsconfig.json rename to types/systemjs/tsconfig.json diff --git a/table/index.d.ts b/types/table/index.d.ts similarity index 100% rename from table/index.d.ts rename to types/table/index.d.ts diff --git a/table/table-tests.ts b/types/table/table-tests.ts similarity index 100% rename from table/table-tests.ts rename to types/table/table-tests.ts diff --git a/table/tsconfig.json b/types/table/tsconfig.json similarity index 100% rename from table/tsconfig.json rename to types/table/tsconfig.json diff --git a/usb/tslint.json b/types/table/tslint.json similarity index 100% rename from usb/tslint.json rename to types/table/tslint.json diff --git a/tabris/README.md b/types/tabris/README.md similarity index 100% rename from tabris/README.md rename to types/tabris/README.md diff --git a/tabris/index.d.ts b/types/tabris/index.d.ts similarity index 100% rename from tabris/index.d.ts rename to types/tabris/index.d.ts diff --git a/tabris/tabris-tests.ts b/types/tabris/tabris-tests.ts similarity index 100% rename from tabris/tabris-tests.ts rename to types/tabris/tabris-tests.ts diff --git a/tabris/tsconfig.json b/types/tabris/tsconfig.json similarity index 100% rename from tabris/tsconfig.json rename to types/tabris/tsconfig.json diff --git a/tabtab/index.d.ts b/types/tabtab/index.d.ts similarity index 100% rename from tabtab/index.d.ts rename to types/tabtab/index.d.ts diff --git a/tabtab/tabtab-tests.ts b/types/tabtab/tabtab-tests.ts similarity index 100% rename from tabtab/tabtab-tests.ts rename to types/tabtab/tabtab-tests.ts diff --git a/tabtab/tsconfig.json b/types/tabtab/tsconfig.json similarity index 100% rename from tabtab/tsconfig.json rename to types/tabtab/tsconfig.json diff --git a/tapable/index.d.ts b/types/tapable/index.d.ts similarity index 100% rename from tapable/index.d.ts rename to types/tapable/index.d.ts diff --git a/tapable/tapable-tests.ts b/types/tapable/tapable-tests.ts similarity index 100% rename from tapable/tapable-tests.ts rename to types/tapable/tapable-tests.ts diff --git a/tapable/tsconfig.json b/types/tapable/tsconfig.json similarity index 100% rename from tapable/tsconfig.json rename to types/tapable/tsconfig.json diff --git a/tape/index.d.ts b/types/tape/index.d.ts similarity index 100% rename from tape/index.d.ts rename to types/tape/index.d.ts diff --git a/tape/tape-tests.ts b/types/tape/tape-tests.ts similarity index 100% rename from tape/tape-tests.ts rename to types/tape/tape-tests.ts diff --git a/tape/tsconfig.json b/types/tape/tsconfig.json similarity index 100% rename from tape/tsconfig.json rename to types/tape/tsconfig.json diff --git a/tar/index.d.ts b/types/tar/index.d.ts similarity index 100% rename from tar/index.d.ts rename to types/tar/index.d.ts diff --git a/tar/tar-tests.ts b/types/tar/tar-tests.ts similarity index 100% rename from tar/tar-tests.ts rename to types/tar/tar-tests.ts diff --git a/tar/tsconfig.json b/types/tar/tsconfig.json similarity index 100% rename from tar/tsconfig.json rename to types/tar/tsconfig.json diff --git a/tcomb/index.d.ts b/types/tcomb/index.d.ts similarity index 100% rename from tcomb/index.d.ts rename to types/tcomb/index.d.ts diff --git a/tcomb/tcomb-tests.ts b/types/tcomb/tcomb-tests.ts similarity index 100% rename from tcomb/tcomb-tests.ts rename to types/tcomb/tcomb-tests.ts diff --git a/tcomb/tsconfig.json b/types/tcomb/tsconfig.json similarity index 100% rename from tcomb/tsconfig.json rename to types/tcomb/tsconfig.json diff --git a/tcomb/tslint.json b/types/tcomb/tslint.json similarity index 100% rename from tcomb/tslint.json rename to types/tcomb/tslint.json diff --git a/tea-merge/index.d.ts b/types/tea-merge/index.d.ts similarity index 100% rename from tea-merge/index.d.ts rename to types/tea-merge/index.d.ts diff --git a/tea-merge/tea-merge-tests.ts b/types/tea-merge/tea-merge-tests.ts similarity index 100% rename from tea-merge/tea-merge-tests.ts rename to types/tea-merge/tea-merge-tests.ts diff --git a/tea-merge/tsconfig.json b/types/tea-merge/tsconfig.json similarity index 100% rename from tea-merge/tsconfig.json rename to types/tea-merge/tsconfig.json diff --git a/tedious-connection-pool/index.d.ts b/types/tedious-connection-pool/index.d.ts similarity index 100% rename from tedious-connection-pool/index.d.ts rename to types/tedious-connection-pool/index.d.ts diff --git a/tedious-connection-pool/tedious-connection-pool-tests.ts b/types/tedious-connection-pool/tedious-connection-pool-tests.ts similarity index 100% rename from tedious-connection-pool/tedious-connection-pool-tests.ts rename to types/tedious-connection-pool/tedious-connection-pool-tests.ts diff --git a/tedious-connection-pool/tsconfig.json b/types/tedious-connection-pool/tsconfig.json similarity index 100% rename from tedious-connection-pool/tsconfig.json rename to types/tedious-connection-pool/tsconfig.json diff --git a/types/tedious-connection-pool/tslint.json b/types/tedious-connection-pool/tslint.json new file mode 100644 index 0000000000..f9e30021f4 --- /dev/null +++ b/types/tedious-connection-pool/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} diff --git a/tedious/index.d.ts b/types/tedious/index.d.ts similarity index 100% rename from tedious/index.d.ts rename to types/tedious/index.d.ts diff --git a/tedious/tedious-tests.ts b/types/tedious/tedious-tests.ts similarity index 100% rename from tedious/tedious-tests.ts rename to types/tedious/tedious-tests.ts diff --git a/tedious/tsconfig.json b/types/tedious/tsconfig.json similarity index 100% rename from tedious/tsconfig.json rename to types/tedious/tsconfig.json diff --git a/teechart/index.d.ts b/types/teechart/index.d.ts similarity index 100% rename from teechart/index.d.ts rename to types/teechart/index.d.ts diff --git a/teechart/tsconfig.json b/types/teechart/tsconfig.json similarity index 100% rename from teechart/tsconfig.json rename to types/teechart/tsconfig.json diff --git a/temp-fs/index.d.ts b/types/temp-fs/index.d.ts similarity index 100% rename from temp-fs/index.d.ts rename to types/temp-fs/index.d.ts diff --git a/temp-fs/temp-fs-tests.ts b/types/temp-fs/temp-fs-tests.ts similarity index 100% rename from temp-fs/temp-fs-tests.ts rename to types/temp-fs/temp-fs-tests.ts diff --git a/temp-fs/tsconfig.json b/types/temp-fs/tsconfig.json similarity index 100% rename from temp-fs/tsconfig.json rename to types/temp-fs/tsconfig.json diff --git a/temp/index.d.ts b/types/temp/index.d.ts similarity index 100% rename from temp/index.d.ts rename to types/temp/index.d.ts diff --git a/temp/temp-tests.ts b/types/temp/temp-tests.ts similarity index 100% rename from temp/temp-tests.ts rename to types/temp/temp-tests.ts diff --git a/temp/tsconfig.json b/types/temp/tsconfig.json similarity index 100% rename from temp/tsconfig.json rename to types/temp/tsconfig.json diff --git a/tempfile/index.d.ts b/types/tempfile/index.d.ts similarity index 100% rename from tempfile/index.d.ts rename to types/tempfile/index.d.ts diff --git a/tempfile/tempfile-tests.ts b/types/tempfile/tempfile-tests.ts similarity index 100% rename from tempfile/tempfile-tests.ts rename to types/tempfile/tempfile-tests.ts diff --git a/tempfile/tsconfig.json b/types/tempfile/tsconfig.json similarity index 100% rename from tempfile/tsconfig.json rename to types/tempfile/tsconfig.json diff --git a/terminal-menu/index.d.ts b/types/terminal-menu/index.d.ts similarity index 100% rename from terminal-menu/index.d.ts rename to types/terminal-menu/index.d.ts diff --git a/terminal-menu/terminal-menu-tests.ts b/types/terminal-menu/terminal-menu-tests.ts similarity index 100% rename from terminal-menu/terminal-menu-tests.ts rename to types/terminal-menu/terminal-menu-tests.ts diff --git a/terminal-menu/tsconfig.json b/types/terminal-menu/tsconfig.json similarity index 100% rename from terminal-menu/tsconfig.json rename to types/terminal-menu/tsconfig.json diff --git a/tesseract.js/index.d.ts b/types/tesseract.js/index.d.ts similarity index 100% rename from tesseract.js/index.d.ts rename to types/tesseract.js/index.d.ts diff --git a/tesseract.js/tesseract.js-tests.ts b/types/tesseract.js/tesseract.js-tests.ts similarity index 100% rename from tesseract.js/tesseract.js-tests.ts rename to types/tesseract.js/tesseract.js-tests.ts diff --git a/tesseract.js/tsconfig.json b/types/tesseract.js/tsconfig.json similarity index 100% rename from tesseract.js/tsconfig.json rename to types/tesseract.js/tsconfig.json diff --git a/tether-drop/index.d.ts b/types/tether-drop/index.d.ts similarity index 100% rename from tether-drop/index.d.ts rename to types/tether-drop/index.d.ts diff --git a/tether-drop/tether-drop-tests.ts b/types/tether-drop/tether-drop-tests.ts similarity index 100% rename from tether-drop/tether-drop-tests.ts rename to types/tether-drop/tether-drop-tests.ts diff --git a/tether-drop/tsconfig.json b/types/tether-drop/tsconfig.json similarity index 100% rename from tether-drop/tsconfig.json rename to types/tether-drop/tsconfig.json diff --git a/tether-shepherd/index.d.ts b/types/tether-shepherd/index.d.ts similarity index 100% rename from tether-shepherd/index.d.ts rename to types/tether-shepherd/index.d.ts diff --git a/tether-shepherd/tether-shepherd-tests.ts b/types/tether-shepherd/tether-shepherd-tests.ts similarity index 100% rename from tether-shepherd/tether-shepherd-tests.ts rename to types/tether-shepherd/tether-shepherd-tests.ts diff --git a/tether-shepherd/tsconfig.json b/types/tether-shepherd/tsconfig.json similarity index 100% rename from tether-shepherd/tsconfig.json rename to types/tether-shepherd/tsconfig.json diff --git a/tether/index.d.ts b/types/tether/index.d.ts similarity index 100% rename from tether/index.d.ts rename to types/tether/index.d.ts diff --git a/tether/tether-tests.ts b/types/tether/tether-tests.ts similarity index 100% rename from tether/tether-tests.ts rename to types/tether/tether-tests.ts diff --git a/tether/tsconfig.json b/types/tether/tsconfig.json similarity index 100% rename from tether/tsconfig.json rename to types/tether/tsconfig.json diff --git a/text-buffer/index.d.ts b/types/text-buffer/index.d.ts similarity index 100% rename from text-buffer/index.d.ts rename to types/text-buffer/index.d.ts diff --git a/text-buffer/text-buffer-tests.ts b/types/text-buffer/text-buffer-tests.ts similarity index 100% rename from text-buffer/text-buffer-tests.ts rename to types/text-buffer/text-buffer-tests.ts diff --git a/text-buffer/tsconfig.json b/types/text-buffer/tsconfig.json similarity index 100% rename from text-buffer/tsconfig.json rename to types/text-buffer/tsconfig.json diff --git a/text-encoding/index.d.ts b/types/text-encoding/index.d.ts similarity index 100% rename from text-encoding/index.d.ts rename to types/text-encoding/index.d.ts diff --git a/text-encoding/text-encoding-tests.ts b/types/text-encoding/text-encoding-tests.ts similarity index 100% rename from text-encoding/text-encoding-tests.ts rename to types/text-encoding/text-encoding-tests.ts diff --git a/text-encoding/tsconfig.json b/types/text-encoding/tsconfig.json similarity index 100% rename from text-encoding/tsconfig.json rename to types/text-encoding/tsconfig.json diff --git a/three/detector.d.ts b/types/three/detector.d.ts similarity index 100% rename from three/detector.d.ts rename to types/three/detector.d.ts diff --git a/three/index.d.ts b/types/three/index.d.ts similarity index 96% rename from three/index.d.ts rename to types/three/index.d.ts index ff962d17b7..064d3e8660 100644 --- a/three/index.d.ts +++ b/types/three/index.d.ts @@ -664,7 +664,9 @@ declare namespace THREE { updateProjectionMatrix(): void; toJSON(meta?: any): any; - // deprecated + /** + * @deprecated + */ setLens(focalLength: number, frameHeight?: number): void; } @@ -719,47 +721,114 @@ declare namespace THREE { setXY(index: number, x: number, y: number): BufferAttribute; setXYZ(index: number, x: number, y: number, z: number): BufferAttribute; setXYZW(index: number, x: number, y: number, z: number, w: number): BufferAttribute; - - length: number; // deprecated, use count + /** + * @deprecated Use count instead. + */ + length: number; } + /** + * @deprecated THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead. + */ export class Int8Attribute extends BufferAttribute { constructor(array: any, itemSize: number); } + /** + * @deprecated THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead. + */ export class Uint8Attribute extends BufferAttribute { constructor(array: any, itemSize: number); } + /** + * @deprecated THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead. + */ export class Uint8ClampedAttribute extends BufferAttribute { constructor(array: any, itemSize: number); } + /** + * @deprecated THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead. + */ export class Int16Attribute extends BufferAttribute { constructor(array: any, itemSize: number); } + /** + * @deprecated THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead. + */ export class Uint16Attribute extends BufferAttribute { constructor(array: any, itemSize: number); } + /** + * @deprecated THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead. + */ export class Int32Attribute extends BufferAttribute { constructor(array: any, itemSize: number); } + /** + * @deprecated THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead. + */ export class Uint32Attribute extends BufferAttribute { constructor(array: any, itemSize: number); } + /** + * @deprecated THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead. + */ export class Float32Attribute extends BufferAttribute { constructor(array: any, itemSize: number); } + /** + * @deprecated THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead. + */ export class Float64Attribute extends BufferAttribute { constructor(array: any, itemSize: number); } - // deprecated, use new THREE.BufferAttribute().setDynamic( true ) + export class Int8BufferAttribute extends BufferAttribute { + constructor(array: Iterable | ArrayLike | ArrayBuffer, itemSize: number); + } + + export class Uint8BufferAttribute extends BufferAttribute { + constructor(array: Iterable | ArrayLike | ArrayBuffer, itemSize: number); + } + + export class Uint8ClampedBufferAttribute extends BufferAttribute { + constructor(array: Iterable | ArrayLike | ArrayBuffer, itemSize: number); + } + + export class Int16BufferAttribute extends BufferAttribute { + constructor(array: Iterable | ArrayLike | ArrayBuffer, itemSize: number); + } + + export class Uint16BufferAttribute extends BufferAttribute { + constructor(array: Iterable | ArrayLike | ArrayBuffer, itemSize: number); + } + + export class Int32BufferAttribute extends BufferAttribute { + constructor(array: Iterable | ArrayLike | ArrayBuffer, itemSize: number); + } + + export class Uint32BufferAttribute extends BufferAttribute { + constructor(array: Iterable | ArrayLike | ArrayBuffer, itemSize: number); + } + + export class Float32BufferAttribute extends BufferAttribute { + constructor(array: Iterable | ArrayLike | ArrayBuffer, itemSize: number); + } + + export class Float64BufferAttribute extends BufferAttribute { + constructor(array: Iterable | ArrayLike | ArrayBuffer, itemSize: number); + } + + /** + * @deprecated, use new THREE.BufferAttribute().setDynamic( true ). + */ export class DynamicBufferAttribute extends BufferAttribute {} /** @@ -858,7 +927,9 @@ declare namespace THREE { */ dispose(): void; - // deprecated + /** + * @deprecated + */ drawcalls: any; offsets: any; @@ -1102,7 +1173,10 @@ declare namespace THREE { copy(source: this): this; } - export class Face4 extends Face3 {} // deprecated, use Face3 + /** + * @deprecated Use Face3 instead. + */ + export class Face4 extends Face3 {} export interface MorphTarget { name: string; @@ -1348,9 +1422,18 @@ declare namespace THREE { dispatchEvent(event: { type: string; [attachment: string]: any; }): void; } - export namespace GeometryUtils { // deprecated - export function merge(geometry1: any, geometry2: any, materialIndexOffset?: any): any; // deprecated, use geometry.merge( geometry2, matrix, materialIndexOffset ) - export function center(geometry: any): any; // deprecated, use geometry.center() + /** + * @deprecated + */ + export namespace GeometryUtils { + /** + * @deprecated Use geometry.merge( geometry2, matrix, materialIndexOffset ). + */ + export function merge(geometry1: any, geometry2: any, materialIndexOffset?: any): any; + /** + * @deprecated Use geometry.center(). + */ + export function center(geometry: any): any; } /** @@ -1431,8 +1514,10 @@ declare namespace THREE { setXY(index: number, x: number, y: number): InterleavedBufferAttribute; setXYZ(index: number, x: number, y: number, z: number): InterleavedBufferAttribute; setXYZW(index: number, x: number, y: number, z: number, w: number): InterleavedBufferAttribute; - - length: number; // deprecated, use count instead + /** + * @deprecated Use count instead. + */ + length: number; } export let Object3DIdCount: number; @@ -1704,7 +1789,9 @@ declare namespace THREE { */ copy(source: this, recursive?: boolean): this; - // deprecated + /** + * @deprecated + */ eulerOrder: string; getChildByName(name: string): Object3D; translate(distance: number, axis: Vector3): Object3D; @@ -1776,16 +1863,46 @@ declare namespace THREE { intensity: number; receiveShadow: boolean; shadow: LightShadow; - shadowCameraFov: any; // deprecated, use shadow.camera.fov - shadowCameraLeft: any; // deprecated, use shadow.camera.left - shadowCameraRight: any; // deprecated, use shadow.camera.right - shadowCameraTop: any; // deprecated, use shadow.camera.top - shadowCameraBottom: any; // deprecated, use shadow.camera.bottom - shadowCameraNear: any; // deprecated, use shadow.camera.near - shadowCameraFar: any; // deprecated, use shadow.camera.far - shadowBias: any; // deprecated, use shadow.bias - shadowMapWidth: any; // deprecated, use shadow.mapSize.width - shadowMapHeight: any; // deprecated, use shadow.mapSize.height + /** + * @deprecated Use shadow.camera.fov instead. + */ + shadowCameraFov: any; + /** + * @deprecated Use shadow.camera.left instead. + */ + shadowCameraLeft: any; + /** + * @deprecated Use shadow.camera.right instead. + */ + shadowCameraRight: any; + /** + * @deprecated Use shadow.camera.top instead. + */ + shadowCameraTop: any; + /** + * @deprecated Use shadow.camera.bottom instead. + */ + shadowCameraBottom: any; + /** + * @deprecated Use shadow.camera.near instead. + */ + shadowCameraNear: any; + /** + * @deprecated Use shadow.camera.far instead. + */ + shadowCameraFar: any; + /** + * @deprecated Use shadow.bias instead. + */ + shadowBias: any; + /** + * @deprecated Use shadow.mapSize.width instead. + */ + shadowMapWidth: any; + /** + * @deprecated Use shadow.mapSize.height instead. + */ + shadowMapHeight: any; } export class LightShadow { @@ -2361,7 +2478,9 @@ declare namespace THREE { update(): void; dispose(): void; - // deprecated + /** + * @deprecated + */ warpRGB: Color; } @@ -2676,7 +2795,10 @@ declare namespace THREE { skinning: boolean; morphTargets: boolean; morphNormals: boolean; - metal: boolean; // deprecated + /** + * @deprecated + */ + metal: boolean; setValues(parameters: MeshPhongMaterialParameters): void; } @@ -2706,7 +2828,10 @@ declare namespace THREE { toJSON(meta: any): any; } - export class MeshFaceMaterial extends MultiMaterial {} // deprecated, use MultiMaterial + /** + * @deprecated Use MultiMaterial instead. + */ + export class MeshFaceMaterial extends MultiMaterial {} export interface PointsMaterialParameters extends MaterialParameters { color?: number|string; @@ -2726,9 +2851,18 @@ declare namespace THREE { setValues(parameters: PointsMaterialParameters): void; } - export class PointCloudMaterial extends PointsMaterial {} // deprecated - export class ParticleBasicMaterial extends PointsMaterial {} // deprecated - export class ParticleSystemMaterial extends PointsMaterial {} // deprecated + /** + * @deprecated + */ + export class PointCloudMaterial extends PointsMaterial {} + /** + * @deprecated + */ + export class ParticleBasicMaterial extends PointsMaterial {} + /** + * @deprecated + */ + export class ParticleSystemMaterial extends PointsMaterial {} export interface ShaderMaterialParameters extends MaterialParameters { defines?: any; @@ -2760,7 +2894,10 @@ declare namespace THREE { skinning: boolean; morphTargets: boolean; morphNormals: boolean; - derivatives: any; // deprecated, use extensions.derivatives + /** + * @deprecated Use extensions.derivatives instead. + */ + derivatives: any; extensions: { derivatives: boolean; fragDepth: boolean; drawBuffers: boolean; shaderTextureLOD: boolean }; defaultAttributeValues: any; index0AttributeName: string; @@ -2823,9 +2960,14 @@ declare namespace THREE { union(box: Box2): Box2; translate(offset: Vector2): Box2; equals(box: Box2): boolean; - - empty(): any; // deprecated, use isEmpty() - isIntersectionBox(b: any): any; // deprecated, use intersectsBox() + /** + * @deprecated Use isEmpty() instead. + */ + empty(): any; + /** + * @deprecated Use intersectsBox() instead. + */ + isIntersectionBox(b: any): any; } export class Box3 { @@ -2863,10 +3005,18 @@ declare namespace THREE { applyMatrix4(matrix: Matrix4): Box3; translate(offset: Vector3): Box3; equals(box: Box3): boolean; - - empty(): any; // deprecated, use isEmpty() - isIntersectionBox(b: any): any; // deprecated, use intersectsBox() - isIntersectionSphere(s: any): any; // deprecated, use intersectsSphere() + /** + * @deprecated Use isEmpty() instead. + */ + empty(): any; + /** + * @deprecated Use intersectsBox() instead. + */ + isIntersectionBox(b: any): any; + /** + * @deprecated Use intersectsSphere() instead. + */ + isIntersectionSphere(s: any): any; } export interface HSL { @@ -3255,8 +3405,9 @@ declare namespace THREE { /** * Random float from 0 to 1 with 16 bits of randomness. * Standard Math.random() creates repetitive patterns when applied over larger space. + * @deprecated Use Math.random() */ - export function random16(): number; // deprecated, use Math.random() + export function random16(): number; /** * Random integer from low to high interval. @@ -3363,7 +3514,9 @@ declare namespace THREE { fromArray(array: number[], offset?: number): Matrix3; toArray(): number[]; - // deprecated + /** + * @deprecated + */ multiplyVector3(vector: Vector3): any; multiplyVector3Array(a: any): any; getInverse(matrix: Matrix4, throwOnDegenerate?: boolean): Matrix3; @@ -3545,7 +3698,9 @@ declare namespace THREE { fromArray(array: number[], offset?: number): Matrix4; toArray(): number[]; - // deprecated + /** + * @deprecated + */ extractPosition(m: Matrix4): Matrix4; setRotationFromQuaternion(q: Quaternion): Matrix4; multiplyVector3(v: any): any; @@ -3582,7 +3737,9 @@ declare namespace THREE { translate(offset: Vector3): Plane; equals(plane: Plane): boolean; - // deprecated + /** + * @deprecated + */ isIntersectionLine(l: any): any; } @@ -3705,7 +3862,9 @@ declare namespace THREE { static slerpFlat(dst: number[], dstOffset: number, src0: number[], srcOffset: number, src1: number[], stcOffset1: number, t: number): Quaternion; - // deprecated + /** + * @deprecated + */ multiplyVector3(v: any): any; } @@ -3736,7 +3895,9 @@ declare namespace THREE { applyMatrix4(matrix4: Matrix4): Ray; equals(ray: Ray): boolean; - // deprecated + /** + * @deprecated + */ isIntersectionBox(b: any): any; isIntersectionPlane(p: any): any; isIntersectionSphere(s: any): any; @@ -4254,13 +4415,18 @@ declare namespace THREE { toArray(xyz?: number[], offset?: number): number[]; fromBufferAttribute( attribute: BufferAttribute, index: number, offset?: number): Vector3; - // deprecated + /** + * @deprecated + */ getPositionFromMatrix(m: Matrix4): Vector3; getScaleFromMatrix(m: Matrix4): Vector3; getColumnFromMatrix(index: number, matrix: Matrix4): Vector3; } - export class Vertex extends Vector3 {} // deprecated + /** + * @deprecated use THREE.Vector3 instead. + */ + export class Vertex extends Vector3 {} /** * 4D vector. @@ -4479,7 +4645,9 @@ declare namespace THREE { update(camera: Camera): void; toJSON(meta: any): any; - // deprecated + /** + * @deprecated + */ objects: any[]; } @@ -4522,8 +4690,14 @@ declare namespace THREE { raycast(raycaster: Raycaster, intersects: any): void; } - export const LineStrip: number; // deprecated - export const LinePieces: number; // deprecated + /** + * @deprecated + */ + export const LineStrip: number; + /** + * @deprecated + */ + export const LinePieces: number; export class LineSegments extends Line { constructor( @@ -4578,8 +4752,14 @@ declare namespace THREE { raycast(raycaster: Raycaster, intersects: any): void; } - export class PointCloud extends Points {} // deprecated - export class ParticleSystem extends Points {} // deprecated + /** + * @deprecated + */ + export class PointCloud extends Points {} + /** + * @deprecated + */ + export class ParticleSystem extends Points {} export class Skeleton { constructor(bones: Bone[], boneInverses?: Matrix4[], useVertexTexture?: boolean); @@ -4628,7 +4808,10 @@ declare namespace THREE { raycast(raycaster: Raycaster, intersects: any): void; } - export class Particle extends Sprite {} // deprecated + /** + * @deprecated Use Sprite instead. + */ + export class Particle extends Sprite {} // Renderers ////////////////////////////////////////////////////////////////////////////////// @@ -4894,14 +5077,19 @@ declare namespace THREE { * @param frontFace "ccw" or "cw */ setFaceCulling(cullFace?: CullFace, frontFace?: FrontFaceDirection): void; - setTexture(texture: Texture, slot: number): void; // deprecated + /** + * @deprecated + */ + setTexture(texture: Texture, slot: number): void; setTexture2D(texture: Texture, slot: number): void; setTextureCube(texture: Texture, slot: number): void; getCurrentRenderTarget(): RenderTarget; setRenderTarget(renderTarget: RenderTarget): void; readRenderTargetPixels( renderTarget: RenderTarget, x: number, y: number, width: number, height: number, buffer: any ): void; - // deprecated + /** + * @deprecated + */ gammaFactor: number; shadowMapEnabled: boolean; shadowMapType: ShadowMapType; @@ -4945,16 +5133,46 @@ declare namespace THREE { depthBuffer: boolean; stencilBuffer: boolean; depthTexture: Texture; - wrapS: any; // deprecated, use texture.wrapS - wrapT: any; // deprecated, use texture.wrapT - magFilter: any; // deprecated, use texture.magFilter - minFilter: any; // deprecated, use texture.minFilter - anisotropy: any; // deprecated, use texture.anisotropy - offset: any; // deprecated, use texture.offset - repeat: any; // deprecated, use texture.repeat - format: any; // deprecated, use texture.format - type: any; // deprecated, use texture.type - generateMipmaps: any; // deprecated, use texture.generateMipmaps + /** + * @deprecated Use texture.wrapS instead. + */ + wrapS: any; + /** + * @deprecated Use texture.wrapT instead. + */ + wrapT: any; + /** + * @deprecated Use texture.magFilter instead. + */ + magFilter: any; + /** + * @deprecated Use texture.minFilter instead. + */ + minFilter: any; + /** + * @deprecated Use texture.anisotropy instead. + */ + anisotropy: any; + /** + * @deprecated Use texture.offset instead. + */ + offset: any; + /** + * @deprecated Use texture.repeat instead. + */ + repeat: any; + /** + * @deprecated Use texture.format instead. + */ + format: any; + /** + * @deprecated Use texture.type instead. + */ + type: any; + /** + * @deprecated Use texture.generateMipmaps instead. + */ + generateMipmaps: any; setSize(width: number, height: number): void; clone(): this; @@ -5225,9 +5443,14 @@ declare namespace THREE { export class Uniform { constructor(value: any); - constructor(type: string, value: any); // deprecated - - type: string; // deprecated + /** + * @deprecated + */ + constructor(type: string, value: any); + /** + * @deprecated + */ + type: string; value: any; dynamic: boolean; onUpdateCallback: Function; @@ -5324,8 +5547,14 @@ declare namespace THREE { program: any; vertexShader: WebGLShader; fragmentShader: WebGLShader; - uniforms: any; // deprecated, use getUniforms() - attributes: any; // deprecated, use getAttributes() + /** + * @deprecated Use getUniforms() instead. + */ + uniforms: any; + /** + * @deprecated Use getAttributes() instead. + */ + attributes: any; getUniforms(): WebGLUniforms; getAttributes(): any; @@ -5392,7 +5621,9 @@ declare namespace THREE { render(scene: Scene, camera: Camera): void; - // deprecated + /** + * @deprecated + */ cullFace: any; } @@ -5714,7 +5945,10 @@ declare namespace THREE { // Extras ///////////////////////////////////////////////////////////////////// - export namespace ImageUtils { // deprecated + /** + * @deprecated Use TextureLoader instead. + */ + export namespace ImageUtils { export let crossOrigin: string; export function loadTexture(url: string, mapping?: Mapping, onLoad?: (texture: Texture) => void, onError?: (message: string) => void): Texture; @@ -5770,7 +6004,10 @@ declare namespace THREE { setLoop(value: boolean): void; getVolume(): number; setVolume(value: number): Audio; - load(file: string): Audio; // deprecated, use the AudioLoader class + /** + * @deprecated Use AudioLoader instead. + */ + load(file: string): Audio; } export class AudioAnalyser { @@ -5782,7 +6019,9 @@ declare namespace THREE { getFrequencyData(): Uint8Array; getAverageFrequency(): number; - // deprecated + /** + * @deprecated + */ getData(file: any): any; } @@ -6116,7 +6355,10 @@ declare namespace THREE { }; } - export class CubeGeometry extends BoxGeometry {} // deprecated, use BoxGeometry + /** + * @deprecated Use BoxGeometry instead. + */ + export class CubeGeometry extends BoxGeometry {} export class CircleBufferGeometry extends BufferGeometry { constructor(radius?: number, segments?: number, thetaStart?: number, thetaLength?: number); @@ -6547,8 +6789,10 @@ declare namespace THREE { export class GridHelper extends LineSegments { constructor(size: number, divisions: number, color1?: Color|number, color2?: Color|number); - - setColors(color1?: Color|number, color2?: Color|number): void; // deprecated + /** + * @deprecated + */ + setColors(color1?: Color|number, color2?: Color|number): void; } export class HemisphereLightHelper extends Object3D { diff --git a/three/test/canvas/canvas_camera_orthographic.ts b/types/three/test/canvas/canvas_camera_orthographic.ts similarity index 100% rename from three/test/canvas/canvas_camera_orthographic.ts rename to types/three/test/canvas/canvas_camera_orthographic.ts diff --git a/three/test/canvas/canvas_geometry_cube.ts b/types/three/test/canvas/canvas_geometry_cube.ts similarity index 100% rename from three/test/canvas/canvas_geometry_cube.ts rename to types/three/test/canvas/canvas_geometry_cube.ts diff --git a/three/test/canvas/canvas_interactive_cubes_tween.ts b/types/three/test/canvas/canvas_interactive_cubes_tween.ts similarity index 100% rename from three/test/canvas/canvas_interactive_cubes_tween.ts rename to types/three/test/canvas/canvas_interactive_cubes_tween.ts diff --git a/three/test/canvas/canvas_lights_pointlights.ts b/types/three/test/canvas/canvas_lights_pointlights.ts similarity index 100% rename from three/test/canvas/canvas_lights_pointlights.ts rename to types/three/test/canvas/canvas_lights_pointlights.ts diff --git a/three/test/canvas/canvas_materials.ts b/types/three/test/canvas/canvas_materials.ts similarity index 100% rename from three/test/canvas/canvas_materials.ts rename to types/three/test/canvas/canvas_materials.ts diff --git a/three/test/canvas/canvas_particles_floor.ts b/types/three/test/canvas/canvas_particles_floor.ts similarity index 100% rename from three/test/canvas/canvas_particles_floor.ts rename to types/three/test/canvas/canvas_particles_floor.ts diff --git a/three/test/css3d/css3d_periodictable.ts b/types/three/test/css3d/css3d_periodictable.ts similarity index 100% rename from three/test/css3d/css3d_periodictable.ts rename to types/three/test/css3d/css3d_periodictable.ts diff --git a/three/test/css3d/css3d_sprites.ts b/types/three/test/css3d/css3d_sprites.ts similarity index 100% rename from three/test/css3d/css3d_sprites.ts rename to types/three/test/css3d/css3d_sprites.ts diff --git a/three/test/examples/controls/vrcontrols.ts b/types/three/test/examples/controls/vrcontrols.ts similarity index 100% rename from three/test/examples/controls/vrcontrols.ts rename to types/three/test/examples/controls/vrcontrols.ts diff --git a/three/test/examples/ctm/ctmloader.ts b/types/three/test/examples/ctm/ctmloader.ts similarity index 100% rename from three/test/examples/ctm/ctmloader.ts rename to types/three/test/examples/ctm/ctmloader.ts diff --git a/three/test/examples/detector.ts b/types/three/test/examples/detector.ts similarity index 100% rename from three/test/examples/detector.ts rename to types/three/test/examples/detector.ts diff --git a/three/test/examples/effects/vreffect.ts b/types/three/test/examples/effects/vreffect.ts similarity index 100% rename from three/test/examples/effects/vreffect.ts rename to types/three/test/examples/effects/vreffect.ts diff --git a/three/test/examples/octree.ts b/types/three/test/examples/octree.ts similarity index 100% rename from three/test/examples/octree.ts rename to types/three/test/examples/octree.ts diff --git a/three/test/math/test_unit_math.ts b/types/three/test/math/test_unit_math.ts similarity index 100% rename from three/test/math/test_unit_math.ts rename to types/three/test/math/test_unit_math.ts diff --git a/three/test/three-tests-setup.ts b/types/three/test/three-tests-setup.ts similarity index 100% rename from three/test/three-tests-setup.ts rename to types/three/test/three-tests-setup.ts diff --git a/three/test/webgl/webgl_animation_cloth.ts b/types/three/test/webgl/webgl_animation_cloth.ts similarity index 100% rename from three/test/webgl/webgl_animation_cloth.ts rename to types/three/test/webgl/webgl_animation_cloth.ts diff --git a/three/test/webgl/webgl_animation_skinning_morph.ts b/types/three/test/webgl/webgl_animation_skinning_morph.ts similarity index 100% rename from three/test/webgl/webgl_animation_skinning_morph.ts rename to types/three/test/webgl/webgl_animation_skinning_morph.ts diff --git a/three/test/webgl/webgl_buffergeometry.ts b/types/three/test/webgl/webgl_buffergeometry.ts similarity index 100% rename from three/test/webgl/webgl_buffergeometry.ts rename to types/three/test/webgl/webgl_buffergeometry.ts diff --git a/three/test/webgl/webgl_camera.ts b/types/three/test/webgl/webgl_camera.ts similarity index 100% rename from three/test/webgl/webgl_camera.ts rename to types/three/test/webgl/webgl_camera.ts diff --git a/three/test/webgl/webgl_custom_attributes.ts b/types/three/test/webgl/webgl_custom_attributes.ts similarity index 100% rename from three/test/webgl/webgl_custom_attributes.ts rename to types/three/test/webgl/webgl_custom_attributes.ts diff --git a/three/test/webgl/webgl_geometries.ts b/types/three/test/webgl/webgl_geometries.ts similarity index 100% rename from three/test/webgl/webgl_geometries.ts rename to types/three/test/webgl/webgl_geometries.ts diff --git a/three/test/webgl/webgl_helpers.ts b/types/three/test/webgl/webgl_helpers.ts similarity index 100% rename from three/test/webgl/webgl_helpers.ts rename to types/three/test/webgl/webgl_helpers.ts diff --git a/three/test/webgl/webgl_interactive_cubes.ts b/types/three/test/webgl/webgl_interactive_cubes.ts similarity index 100% rename from three/test/webgl/webgl_interactive_cubes.ts rename to types/three/test/webgl/webgl_interactive_cubes.ts diff --git a/three/test/webgl/webgl_interactive_raycasting_points.ts b/types/three/test/webgl/webgl_interactive_raycasting_points.ts similarity index 100% rename from three/test/webgl/webgl_interactive_raycasting_points.ts rename to types/three/test/webgl/webgl_interactive_raycasting_points.ts diff --git a/three/test/webgl/webgl_lensflares.ts b/types/three/test/webgl/webgl_lensflares.ts similarity index 100% rename from three/test/webgl/webgl_lensflares.ts rename to types/three/test/webgl/webgl_lensflares.ts diff --git a/three/test/webgl/webgl_lights_hemisphere.ts b/types/three/test/webgl/webgl_lights_hemisphere.ts similarity index 100% rename from three/test/webgl/webgl_lights_hemisphere.ts rename to types/three/test/webgl/webgl_lights_hemisphere.ts diff --git a/three/test/webgl/webgl_lines_colors.ts b/types/three/test/webgl/webgl_lines_colors.ts similarity index 100% rename from three/test/webgl/webgl_lines_colors.ts rename to types/three/test/webgl/webgl_lines_colors.ts diff --git a/three/test/webgl/webgl_loader_awd.ts b/types/three/test/webgl/webgl_loader_awd.ts similarity index 100% rename from three/test/webgl/webgl_loader_awd.ts rename to types/three/test/webgl/webgl_loader_awd.ts diff --git a/three/test/webgl/webgl_materials.ts b/types/three/test/webgl/webgl_materials.ts similarity index 100% rename from three/test/webgl/webgl_materials.ts rename to types/three/test/webgl/webgl_materials.ts diff --git a/three/test/webgl/webgl_morphtargets.ts b/types/three/test/webgl/webgl_morphtargets.ts similarity index 100% rename from three/test/webgl/webgl_morphtargets.ts rename to types/three/test/webgl/webgl_morphtargets.ts diff --git a/three/test/webgl/webgl_points_billboards.ts b/types/three/test/webgl/webgl_points_billboards.ts similarity index 100% rename from three/test/webgl/webgl_points_billboards.ts rename to types/three/test/webgl/webgl_points_billboards.ts diff --git a/three/test/webgl/webgl_postprocessing.ts b/types/three/test/webgl/webgl_postprocessing.ts similarity index 100% rename from three/test/webgl/webgl_postprocessing.ts rename to types/three/test/webgl/webgl_postprocessing.ts diff --git a/three/test/webgl/webgl_shader.ts b/types/three/test/webgl/webgl_shader.ts similarity index 100% rename from three/test/webgl/webgl_shader.ts rename to types/three/test/webgl/webgl_shader.ts diff --git a/three/test/webgl/webgl_sprites.ts b/types/three/test/webgl/webgl_sprites.ts similarity index 100% rename from three/test/webgl/webgl_sprites.ts rename to types/three/test/webgl/webgl_sprites.ts diff --git a/three/three-FirstPersonControls.d.ts b/types/three/three-FirstPersonControls.d.ts similarity index 100% rename from three/three-FirstPersonControls.d.ts rename to types/three/three-FirstPersonControls.d.ts diff --git a/three/three-canvasrenderer.d.ts b/types/three/three-canvasrenderer.d.ts similarity index 100% rename from three/three-canvasrenderer.d.ts rename to types/three/three-canvasrenderer.d.ts diff --git a/three/three-colladaLoader.d.ts b/types/three/three-colladaLoader.d.ts similarity index 100% rename from three/three-colladaLoader.d.ts rename to types/three/three-colladaLoader.d.ts diff --git a/three/three-copyshader.d.ts b/types/three/three-copyshader.d.ts similarity index 100% rename from three/three-copyshader.d.ts rename to types/three/three-copyshader.d.ts diff --git a/three/three-css3drenderer.d.ts b/types/three/three-css3drenderer.d.ts similarity index 100% rename from three/three-css3drenderer.d.ts rename to types/three/three-css3drenderer.d.ts diff --git a/three/three-ctmloader.d.ts b/types/three/three-ctmloader.d.ts similarity index 100% rename from three/three-ctmloader.d.ts rename to types/three/three-ctmloader.d.ts diff --git a/three/three-editorcontrols.d.ts b/types/three/three-editorcontrols.d.ts similarity index 100% rename from three/three-editorcontrols.d.ts rename to types/three/three-editorcontrols.d.ts diff --git a/three/three-effectcomposer.d.ts b/types/three/three-effectcomposer.d.ts similarity index 100% rename from three/three-effectcomposer.d.ts rename to types/three/three-effectcomposer.d.ts diff --git a/three/three-maskpass.d.ts b/types/three/three-maskpass.d.ts similarity index 100% rename from three/three-maskpass.d.ts rename to types/three/three-maskpass.d.ts diff --git a/three/three-octree.d.ts b/types/three/three-octree.d.ts similarity index 100% rename from three/three-octree.d.ts rename to types/three/three-octree.d.ts diff --git a/three/three-orbitcontrols.d.ts b/types/three/three-orbitcontrols.d.ts similarity index 100% rename from three/three-orbitcontrols.d.ts rename to types/three/three-orbitcontrols.d.ts diff --git a/three/three-orthographictrackballcontrols.d.ts b/types/three/three-orthographictrackballcontrols.d.ts similarity index 100% rename from three/three-orthographictrackballcontrols.d.ts rename to types/three/three-orthographictrackballcontrols.d.ts diff --git a/three/three-projector.d.ts b/types/three/three-projector.d.ts similarity index 100% rename from three/three-projector.d.ts rename to types/three/three-projector.d.ts diff --git a/three/three-renderpass.d.ts b/types/three/three-renderpass.d.ts similarity index 100% rename from three/three-renderpass.d.ts rename to types/three/three-renderpass.d.ts diff --git a/three/three-shaderpass.d.ts b/types/three/three-shaderpass.d.ts similarity index 100% rename from three/three-shaderpass.d.ts rename to types/three/three-shaderpass.d.ts diff --git a/three/three-trackballcontrols.d.ts b/types/three/three-trackballcontrols.d.ts similarity index 100% rename from three/three-trackballcontrols.d.ts rename to types/three/three-trackballcontrols.d.ts diff --git a/three/three-transformcontrols.d.ts b/types/three/three-transformcontrols.d.ts similarity index 100% rename from three/three-transformcontrols.d.ts rename to types/three/three-transformcontrols.d.ts diff --git a/three/three-vrcontrols.d.ts b/types/three/three-vrcontrols.d.ts similarity index 100% rename from three/three-vrcontrols.d.ts rename to types/three/three-vrcontrols.d.ts diff --git a/three/three-vreffect.d.ts b/types/three/three-vreffect.d.ts similarity index 100% rename from three/three-vreffect.d.ts rename to types/three/three-vreffect.d.ts diff --git a/three/tsconfig.json b/types/three/tsconfig.json similarity index 100% rename from three/tsconfig.json rename to types/three/tsconfig.json diff --git a/thrift/index.d.ts b/types/thrift/index.d.ts similarity index 100% rename from thrift/index.d.ts rename to types/thrift/index.d.ts diff --git a/thrift/thrift-tests.ts b/types/thrift/thrift-tests.ts similarity index 100% rename from thrift/thrift-tests.ts rename to types/thrift/thrift-tests.ts diff --git a/thrift/tsconfig.json b/types/thrift/tsconfig.json similarity index 100% rename from thrift/tsconfig.json rename to types/thrift/tsconfig.json diff --git a/through/index.d.ts b/types/through/index.d.ts similarity index 100% rename from through/index.d.ts rename to types/through/index.d.ts diff --git a/through/through-tests.ts b/types/through/through-tests.ts similarity index 100% rename from through/through-tests.ts rename to types/through/through-tests.ts diff --git a/through/tsconfig.json b/types/through/tsconfig.json similarity index 100% rename from through/tsconfig.json rename to types/through/tsconfig.json diff --git a/through2/index.d.ts b/types/through2/index.d.ts similarity index 100% rename from through2/index.d.ts rename to types/through2/index.d.ts diff --git a/through2/through2-tests.ts b/types/through2/through2-tests.ts similarity index 100% rename from through2/through2-tests.ts rename to types/through2/through2-tests.ts diff --git a/through2/tsconfig.json b/types/through2/tsconfig.json similarity index 100% rename from through2/tsconfig.json rename to types/through2/tsconfig.json diff --git a/through2/v0/index.d.ts b/types/through2/v0/index.d.ts similarity index 100% rename from through2/v0/index.d.ts rename to types/through2/v0/index.d.ts diff --git a/through2/v0/through2-tests.ts b/types/through2/v0/through2-tests.ts similarity index 100% rename from through2/v0/through2-tests.ts rename to types/through2/v0/through2-tests.ts diff --git a/through2/v0/tsconfig.json b/types/through2/v0/tsconfig.json similarity index 100% rename from through2/v0/tsconfig.json rename to types/through2/v0/tsconfig.json diff --git a/tile-reduce/index.d.ts b/types/tile-reduce/index.d.ts similarity index 100% rename from tile-reduce/index.d.ts rename to types/tile-reduce/index.d.ts diff --git a/tile-reduce/tile-reduce-tests.ts b/types/tile-reduce/tile-reduce-tests.ts similarity index 100% rename from tile-reduce/tile-reduce-tests.ts rename to types/tile-reduce/tile-reduce-tests.ts diff --git a/tile-reduce/tsconfig.json b/types/tile-reduce/tsconfig.json similarity index 100% rename from tile-reduce/tsconfig.json rename to types/tile-reduce/tsconfig.json diff --git a/tilebelt/index.d.ts b/types/tilebelt/index.d.ts similarity index 100% rename from tilebelt/index.d.ts rename to types/tilebelt/index.d.ts diff --git a/tilebelt/tilebelt-tests.ts b/types/tilebelt/tilebelt-tests.ts similarity index 100% rename from tilebelt/tilebelt-tests.ts rename to types/tilebelt/tilebelt-tests.ts diff --git a/tilebelt/tsconfig.json b/types/tilebelt/tsconfig.json similarity index 100% rename from tilebelt/tsconfig.json rename to types/tilebelt/tsconfig.json diff --git a/timelinejs/index.d.ts b/types/timelinejs/index.d.ts similarity index 100% rename from timelinejs/index.d.ts rename to types/timelinejs/index.d.ts diff --git a/timelinejs/timelinejs-tests.ts b/types/timelinejs/timelinejs-tests.ts similarity index 100% rename from timelinejs/timelinejs-tests.ts rename to types/timelinejs/timelinejs-tests.ts diff --git a/timelinejs/tsconfig.json b/types/timelinejs/tsconfig.json similarity index 100% rename from timelinejs/tsconfig.json rename to types/timelinejs/tsconfig.json diff --git a/timelinejs3/index.d.ts b/types/timelinejs3/index.d.ts similarity index 100% rename from timelinejs3/index.d.ts rename to types/timelinejs3/index.d.ts diff --git a/timelinejs3/timelinejs3-tests.ts b/types/timelinejs3/timelinejs3-tests.ts similarity index 100% rename from timelinejs3/timelinejs3-tests.ts rename to types/timelinejs3/timelinejs3-tests.ts diff --git a/timelinejs3/tsconfig.json b/types/timelinejs3/tsconfig.json similarity index 100% rename from timelinejs3/tsconfig.json rename to types/timelinejs3/tsconfig.json diff --git a/timezone-js/index.d.ts b/types/timezone-js/index.d.ts similarity index 100% rename from timezone-js/index.d.ts rename to types/timezone-js/index.d.ts diff --git a/timezone-js/timezone-js-tests.ts b/types/timezone-js/timezone-js-tests.ts similarity index 100% rename from timezone-js/timezone-js-tests.ts rename to types/timezone-js/timezone-js-tests.ts diff --git a/timezone-js/tsconfig.json b/types/timezone-js/tsconfig.json similarity index 100% rename from timezone-js/tsconfig.json rename to types/timezone-js/tsconfig.json diff --git a/timezonecomplete/index.d.ts b/types/timezonecomplete/index.d.ts similarity index 100% rename from timezonecomplete/index.d.ts rename to types/timezonecomplete/index.d.ts diff --git a/timezonecomplete/timezonecomplete-tests.ts b/types/timezonecomplete/timezonecomplete-tests.ts similarity index 100% rename from timezonecomplete/timezonecomplete-tests.ts rename to types/timezonecomplete/timezonecomplete-tests.ts diff --git a/timezonecomplete/tsconfig.json b/types/timezonecomplete/tsconfig.json similarity index 100% rename from timezonecomplete/tsconfig.json rename to types/timezonecomplete/tsconfig.json diff --git a/tinder/index.d.ts b/types/tinder/index.d.ts similarity index 100% rename from tinder/index.d.ts rename to types/tinder/index.d.ts diff --git a/tinder/tinder-tests.ts b/types/tinder/tinder-tests.ts similarity index 100% rename from tinder/tinder-tests.ts rename to types/tinder/tinder-tests.ts diff --git a/tinder/tsconfig.json b/types/tinder/tsconfig.json similarity index 100% rename from tinder/tsconfig.json rename to types/tinder/tsconfig.json diff --git a/tinycolor2/index.d.ts b/types/tinycolor2/index.d.ts similarity index 100% rename from tinycolor2/index.d.ts rename to types/tinycolor2/index.d.ts diff --git a/tinycolor2/tinycolor2-tests.ts b/types/tinycolor2/tinycolor2-tests.ts similarity index 100% rename from tinycolor2/tinycolor2-tests.ts rename to types/tinycolor2/tinycolor2-tests.ts diff --git a/tinycolor2/tsconfig.json b/types/tinycolor2/tsconfig.json similarity index 100% rename from tinycolor2/tsconfig.json rename to types/tinycolor2/tsconfig.json diff --git a/tinycopy/index.d.ts b/types/tinycopy/index.d.ts similarity index 100% rename from tinycopy/index.d.ts rename to types/tinycopy/index.d.ts diff --git a/tinycopy/tinycopy-tests.ts b/types/tinycopy/tinycopy-tests.ts similarity index 100% rename from tinycopy/tinycopy-tests.ts rename to types/tinycopy/tinycopy-tests.ts diff --git a/tinycopy/tsconfig.json b/types/tinycopy/tsconfig.json similarity index 100% rename from tinycopy/tsconfig.json rename to types/tinycopy/tsconfig.json diff --git a/tinymce/index.d.ts b/types/tinymce/index.d.ts similarity index 88% rename from tinymce/index.d.ts rename to types/tinymce/index.d.ts index b82f90a46e..04ac24d056 100644 --- a/tinymce/index.d.ts +++ b/types/tinymce/index.d.ts @@ -5,48 +5,59 @@ // Work In Progress -declare namespace TinyMce { +import 'jquery'; - export interface Static extends TinyMce.EditorManager { - DOM: TinyMce.dom.DOMUtils; - PluginManager: TinyMce.AddOnManager; - ScriptLoader: TinyMce.dom.ScriptLoader; +declare namespace tinymce { - ThemeManager: TinyMce.AddOnManager; + var DOM: dom.DOMUtils; - create(s: string, p: {}, root?: {}): void; + var PluginManager: AddOnManager; - createNS(n: string, o: {}): {}; + var ScriptLoader: dom.ScriptLoader; - each(o: {}, cb: () => void, s?: {}): void; + var ThemeManager: AddOnManager; - explode(s: string, d: string): void; + var EditorManager: EditorManager; - grep(a: any[], f: () => void): any[]; + var baseURL: string; - inArray(item: any, arr: any[]): number; + var activeEditor: Editor; - is(obj: {}, type?: string): boolean; + function create(s: string, p: {}, root?: {}): void; - isArray(obj: {}): boolean; + function createNS(n: string, o: {}): {}; - makeMap(items: any[], delim?: string, map?: {}): {}; + function each(o: {}, cb: () => void, s?: {}): void; - map(array: any[], callback: () => void): any[]; + function explode(s: string, d: string): void; - resolve(n: string, o?: {}): {}; + function grep(a: any[], f: () => void): any[]; - toArray(obj: {}): any[]; + function inArray(item: any, arr: any[]): number; - trim(s: string): string; + function is(obj: {}, type?: string): boolean; - walk(o: {}, f: () => void, n?: string, s?: string): void; - } + function isArray(obj: {}): boolean; + + function makeMap(items: any[], delim?: string, map?: {}): {}; + + function map(array: any[], callback: () => void): any[]; + + function resolve(n: string, o?: {}): {}; + + function toArray(obj: {}): any[]; + + function trim(s: string): string; + + function walk(o: {}, f: () => void, n?: string, s?: string): void; + + function init(settings: Settings): void; export interface Settings { + table_toolbar?: boolean; auto_focus?: string; @@ -58,13 +69,13 @@ declare namespace TinyMce { hidden_input?: boolean; - init_instance_callback?: (editor: TinyMce.Editor) => void; + init_instance_callback?: (editor: Editor) => void; plugins?: string | string[]; selector?: string; - setup?: (edtor: TinyMce.Editor) => void; + setup?: (edtor: Editor) => void; target?: Element; @@ -282,7 +293,7 @@ declare namespace TinyMce { export interface AddOnManager { - add(id: string, addOn: (editor: TinyMce.Editor, url: string) => void): Theme | Plugin; + add(id: string, addOn: (editor: Editor, url: string) => void): Theme | Plugin; addComponents(pluginName: string, scripts: string[]): void; @@ -293,7 +304,9 @@ declare namespace TinyMce { requireLangPack(name: string, languages?: string): void; } - export interface Editor extends util.Observable { + export class Editor extends util.Observable { + + constructor(id: string, settings: Settings, editorManager: tinymce.EditorManager); $: dom.DomQuery; @@ -437,15 +450,15 @@ declare namespace TinyMce { $: dom.DomQuery; - activeEditor: TinyMce.Editor; + activeEditor: Editor; - baseURI: TinyMce.util.URI; + baseURI: util.URI; baseURL: string; documentBaseURL: string; - editors: TinyMce.Editor[]; + editors: Editor[]; i18n: {}; @@ -457,23 +470,23 @@ declare namespace TinyMce { suffix: string; - add(editor: TinyMce.Editor): TinyMce.Editor; + add(editor: Editor): Editor; addI18n(code: string, items: {}): void; - createEditor(id: string, settings: {}): TinyMce.Editor; + createEditor(id: string, settings: {}): Editor; execCommand(cmd: string, ui?: boolean, value?: string): boolean; - get(id: string): TinyMce.Editor; + get(id: string): Editor; init(settings: Settings): Promise; overrideDefaults(defaultSettings: {}): void; - remove(selector: TinyMce.Editor): TinyMce.Editor; + remove(selector: Editor): Editor; - setActive(editor: TinyMce.Editor): void; + setActive(editor: Editor): void; translate(text: string): string; @@ -594,14 +607,9 @@ declare namespace TinyMce { } } - export interface FocusManager { - - isEditorUIElement(elm: Element): boolean; - } - - export class FocusManager implements FocusManager { - - constructor(editorManager: TinyMce.EditorManager); + class FocusManager { + constructor(); + static isEditorUIElement(elm: Element): boolean; } export interface Formatter { @@ -695,6 +703,48 @@ declare namespace TinyMce { open(args?: {}): void; } + export namespace ui { + export interface ControlSettings { + menu: ui.Menu; + } + + interface Collection { + + } + + interface Container { + add(items: any): Collection; + items(): Collection; + } + + interface Moveable { + moveRel(elm: Node, rel: string): Control; + } + + interface FloatPanel extends Control, Moveable { + + } + + interface Menu extends FloatPanel, Control, Container { + + } + + interface Factory { + create(settings: any): Control; + } + + export class Control { + constructor(); + + $el: JQuery; + on(name: string, callback: string): tinymce.ui.Control; + tooltip(): Control; + settings: ControlSettings; + disabled(state: boolean): void; + active(state: boolean): void; + } + } + export namespace dom { export interface BookmarkManager { @@ -744,7 +794,7 @@ declare namespace TinyMce { getOuterHTML(elm: string): string; - getParent(node: Node, selector: () => void, root?: Node): Node; + getParent(node: Node, selector: any, root?: Node): Node; getParents(node: Node, selector: () => void, root?: Node): T[]; @@ -1085,14 +1135,14 @@ declare namespace TinyMce { addNodeFilter(attributes: string, callback: () => void): void; - filterNode(node: TinyMce.html.Node): TinyMce.html.Node; + filterNode(node: html.Node): html.Node; - parse(html: string, args?: {}): TinyMce.html.Node; + parse(html: string, args?: {}): html.Node; } export class DomParser implements DomParser { - constructor(settings: {}, schema: TinyMce.html.Schema); + constructor(settings: {}, schema: html.Schema); } export interface Entities { @@ -1112,31 +1162,31 @@ declare namespace TinyMce { export interface Node { - append(node: TinyMce.html.Node): TinyMce.html.Node; + append(node: html.Node): html.Node; - attr(name: string, value?: string): string | TinyMce.html.Node; + attr(name: string, value?: string): string | html.Node; - clone(): TinyMce.html.Node; + clone(): html.Node; create(name: string, attrs: {}): void; - empty(): TinyMce.html.Node; + empty(): html.Node; - getAll(name: string): TinyMce.html.Node[]; + getAll(name: string): html.Node[]; - insert(node: TinyMce.html.Node, ref_node: TinyMce.html.Node, before?: boolean): TinyMce.html.Node; + insert(node: html.Node, ref_node: html.Node, before?: boolean): html.Node; isEmpty(elements: {}): boolean; - remove(): TinyMce.html.Node; + remove(): html.Node; - replace(node: TinyMce.html.Node): TinyMce.html.Node; + replace(node: html.Node): html.Node; unwrap(): void; - walk(prev?: boolean): TinyMce.html.Node; + walk(prev?: boolean): html.Node; - wrap(wrapperNode: TinyMce.html.Node): TinyMce.html.Node; + wrap(wrapperNode: html.Node): html.Node; } export class Node implements Node { @@ -1151,7 +1201,7 @@ declare namespace TinyMce { export class SaxParser implements SaxParser { - constructor(settings: {}, schema: TinyMce.html.Schema); + constructor(settings: {}, schema: html.Schema); } export interface Schema { @@ -1201,17 +1251,17 @@ declare namespace TinyMce { export class Schema implements Schema { - constructor(settings: {}); + constructor(settings: {}); } export interface Serializer { - serialize(node: TinyMce.html.Node): string; + serialize(node: html.Node): string; } export class Serializer implements Serializer { - constructor(settings: {}, schema: TinyMce.html.Schema); + constructor(settings: {}, schema: html.Schema); } export interface Styles { @@ -1252,7 +1302,7 @@ declare namespace TinyMce { export interface Color { - parse(value: {}): TinyMce.util.Color; + parse(value: {}): util.Color; toHex(): string; @@ -1278,7 +1328,7 @@ declare namespace TinyMce { setEditorInterval(callback: () => void, time: number): number; - setEditorTimeout(editor: TinyMce.Editor, callback: () => void, time: number): number; + setEditorTimeout(editor: Editor, callback: () => void, time: number): number; setInterval(callback: () => void, time: number): number; @@ -1342,7 +1392,7 @@ declare namespace TinyMce { setItem(key: string, value: string): void; } - export interface Observable { + export class Observable { fire(name: string, args?: {}, bubble?: boolean): {}; @@ -1390,7 +1440,7 @@ declare namespace TinyMce { getURI(noProtoHost: boolean): URI; - isSameOrigin(uri: TinyMce.util.URI): boolean; + isSameOrigin(uri: util.URI): boolean; setPath(path: string): void; @@ -1425,5 +1475,3 @@ declare namespace TinyMce { } } - -declare var tinymce: TinyMce.Static; diff --git a/tinymce/tinymce-tests.ts b/types/tinymce/tinymce-tests.ts similarity index 86% rename from tinymce/tinymce-tests.ts rename to types/tinymce/tinymce-tests.ts index 18dd5cfbc7..09c3dd523b 100644 --- a/tinymce/tinymce-tests.ts +++ b/types/tinymce/tinymce-tests.ts @@ -1,3 +1,5 @@ +import { tinymce } from 'tinymce'; + tinymce.init( { selector: 'textarea', @@ -14,4 +16,4 @@ tinymce.init( ); -let t = new TinyMce.util.Color('#FFFFFF'); +let t = new tinymce.util.Color('#FFFFFF'); diff --git a/tinymce/tsconfig.json b/types/tinymce/tsconfig.json similarity index 100% rename from tinymce/tsconfig.json rename to types/tinymce/tsconfig.json diff --git a/user-home/tslint.json b/types/tinymce/tslint.json similarity index 100% rename from user-home/tslint.json rename to types/tinymce/tslint.json diff --git a/titanium/index.d.ts b/types/titanium/index.d.ts similarity index 100% rename from titanium/index.d.ts rename to types/titanium/index.d.ts diff --git a/titanium/titanium-tests.ts b/types/titanium/titanium-tests.ts similarity index 100% rename from titanium/titanium-tests.ts rename to types/titanium/titanium-tests.ts diff --git a/titanium/tsconfig.json b/types/titanium/tsconfig.json similarity index 100% rename from titanium/tsconfig.json rename to types/titanium/tsconfig.json diff --git a/title/index.d.ts b/types/title/index.d.ts similarity index 100% rename from title/index.d.ts rename to types/title/index.d.ts diff --git a/title/title-tests.ts b/types/title/title-tests.ts similarity index 100% rename from title/title-tests.ts rename to types/title/title-tests.ts diff --git a/title/tsconfig.json b/types/title/tsconfig.json similarity index 100% rename from title/tsconfig.json rename to types/title/tsconfig.json diff --git a/tldjs/index.d.ts b/types/tldjs/index.d.ts similarity index 100% rename from tldjs/index.d.ts rename to types/tldjs/index.d.ts diff --git a/tldjs/tldjs-tests.ts b/types/tldjs/tldjs-tests.ts similarity index 100% rename from tldjs/tldjs-tests.ts rename to types/tldjs/tldjs-tests.ts diff --git a/tldjs/tsconfig.json b/types/tldjs/tsconfig.json similarity index 100% rename from tldjs/tsconfig.json rename to types/tldjs/tsconfig.json diff --git a/tmp/index.d.ts b/types/tmp/index.d.ts similarity index 100% rename from tmp/index.d.ts rename to types/tmp/index.d.ts diff --git a/tmp/tmp-tests.ts b/types/tmp/tmp-tests.ts similarity index 100% rename from tmp/tmp-tests.ts rename to types/tmp/tmp-tests.ts diff --git a/tmp/tsconfig.json b/types/tmp/tsconfig.json similarity index 100% rename from tmp/tsconfig.json rename to types/tmp/tsconfig.json diff --git a/to-title-case-gouch/index.d.ts b/types/to-title-case-gouch/index.d.ts similarity index 100% rename from to-title-case-gouch/index.d.ts rename to types/to-title-case-gouch/index.d.ts diff --git a/to-title-case-gouch/to-title-case-gouch-tests.ts b/types/to-title-case-gouch/to-title-case-gouch-tests.ts similarity index 100% rename from to-title-case-gouch/to-title-case-gouch-tests.ts rename to types/to-title-case-gouch/to-title-case-gouch-tests.ts diff --git a/to-title-case-gouch/tsconfig.json b/types/to-title-case-gouch/tsconfig.json similarity index 100% rename from to-title-case-gouch/tsconfig.json rename to types/to-title-case-gouch/tsconfig.json diff --git a/types/toastr/index.d.ts b/types/toastr/index.d.ts new file mode 100644 index 0000000000..767627c95d --- /dev/null +++ b/types/toastr/index.d.ts @@ -0,0 +1,383 @@ +// Type definitions for Toastr 2.1.3 +// Project: https://github.com/CodeSeven/toastr +// Definitions by: Boris Yankov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + + +/// + +interface ToastrOptions { + /** + * Optionally override the animation easing to show or hide the toasts. + * swing and linear are built into jQuery. + * @default swing + */ + showEasing?: string; + /** + * Optionally override the animation easing to show or hide the toasts. + * swing and linear are built into jQuery. + * @default swing + */ + hideEasing?: string; + /** + * Use the jQuery show method of your choice. + * The methods fadeIn/fadeOut, slideDown/slideUp, and show/hide are built into jQuery. + * @default fadeIn + */ + showMethod?: string; + /** + * Use the jQuery hide method of your choice. + * The methods fadeIn/fadeOut, slideDown/slideUp, and show/hide are built into jQuery. + * @default fadeOut + */ + hideMethod?: string; + /** + * Should a close button be shown? + * @default undefined + */ + closeButton?: boolean; + /** + * CSS class the close button will be given. + * @default toast-close-button + */ + closeClass?: string; + /** + * Time in milliseconds the toast should take to hide, when the close button is clicked. + * Falls back to hide configuration. + * @default false + */ + closeDuration?: number; + /** + * The animation easing while hiding the toast, when the close button is clicked. + * Falls back to hide configuration. + * swing and linear are built into jQuery. + * @default false + */ + closeEasing?: string; + /** + * Use the jQuery show/hide method of your choice, when the close button is clicked. + * Falls back to hide configuration. + * The methods fadeIn/fadeOut, slideDown/slideUp, and show/hide are built into jQuery. + * @default false + */ + closeMethod?: string; + /** + * Set to false so that the toast hides event if hovered. + * @default true + */ + closeOnHover?: boolean; + /** + * Html for the close button. + */ + closeHtml?: string; + /** + * onCloseClick function callback, fired when the close button is clicked. + * Closing cannot be prevented by ev.stopPropagation() etc. + * @default undefined + */ + onCloseClick?: (ev: JQueryMouseEventObject) => void; + /** + * Should clicking on toast dismiss it? + * @default true + */ + tapToDismiss?: boolean; + /** + * CSS class the toast element will be given. + * @default toast + */ + toastClass?: string; + /** + * Id toast container will be given. + * @default toast-container + */ + containerId?: string; + /** + * Should debug details be outputted to the console? + * @default false + */ + debug?: boolean; + /** + * Time in milliseconds the toast should take to show. + * @default 300 + */ + showDuration?: number; + /** + * onShown function callback. + * @default undefined + */ + onShown?: () => void; + /** + * Time in milliseconds the toast should take to hide. + * @default 1000 + */ + hideDuration?: number; + /** + * onHidden function callback. + * @default undefined + */ + onHidden?: () => void; + /** + * Time in milliseconds the toast should be displayed after leaving mouse over. + * Set timeOut and extendedTimeOut to 0 to make it sticky. + * @default 1000 + */ + extendedTimeOut?: number; + /** + * If specified, you must provide all classes. + */ + iconClasses?: { + /** + * Icon to use on error toasts. + * @default toast-error + */ + error: string; + /** + * Icon to use on info toasts. + * @default toast-info + */ + info: string; + /** + * Icon to use on success toasts. + * @default toast-success + */ + success: string; + /** + * Icon to use on warning toasts. + * @default toast-warning + */ + warning: string; + }; + /** + * Icon to use for toast. + * @default toast-info + */ + iconClass?: string; + /** + * Where toast should be displayed. + * The default stylesheet covers: + * toast-top-left, toast-top-center, toast-top-right, toast-top-full-width, + * toast-bottom-left, toast-bottom-center, toast-bottom-right, toast-bottom-full-width + * @default toast-top-right + */ + positionClass?: string; + /** + * Time in milliseconds that the toast should be displayed. + * Set timeOut and extendedTimeOut to 0 to make it sticky. + * @default 5000 + */ + timeOut?: number; + /** + * CSS class the title element will be given. + * @default toast-title + */ + titleClass?: string; + /** + * CSS class the message element will be given. + * @default toast-message + */ + messageClass?: string; + /** + * Set newest toast to appear on top. + * @default true + */ + newestOnTop?: boolean; + /** + * The element to put the toastr container + * @default body + */ + target?: string; + /** + * Rather than having identical toasts stack, set the preventDuplicates property to true. + * Duplicates are matched to the previous toast based on their message content. + * @default false + */ + preventDuplicates?: boolean; + /** + * Visually indicates how long before a toast expires. + * @default false + */ + progressBar?: boolean; + /** + * CSS class the progressbar element will be given. + * @default toast-progress + */ + progressClass?: string; + /** + * Function to execute on toast click. Closing cannot be prevented by ev.stopPropagation() etc. + * @default undefined + */ + onclick?: (ev: JQueryMouseEventObject) => void; + /** + * Should the title and message text be escaped? + * @default false + */ + escapeHtml?: boolean; + /** + * Flip the toastr to be displayed properly for right-to-left languages. + * @default false + */ + rtl?: boolean; +} + +interface ToastrDisplayMethod { + /** + * Create a toast + * + * @param message Message to display in toast + */ + (message: string): JQuery; + /** + * Create a toast + * + * @param message Message to display in toast + * @param title Title to display on toast + */ + (message: string, title: string): JQuery; + /** + * Create a toast + * + * @param message Message to display in toast + * @param title Title to display on toast + * @param overrides Option values for toast + */ + (message: string, title: string, overrides: ToastrOptions): JQuery; +} + +type ToastrType = 'error'|'info'|'success'|'warning'; + +interface ToastMap { + /** + * The toast type. + */ + type: ToastrType; + /** + * The toast message. + */ + message: string; + /** + * The toast icon class. + */ + iconClass: string; + /** + * The toast title. + */ + title?: string; + /** + * Any override options specified when the toast was created. + */ + optionsOverride?: ToastrOptions; +} + +interface ToastrResponse { + /** + * The internal toast id. + */ + toastId: number; + /** + * The current state of the toast. + */ + state: 'visible'|'hidden'; + /** + * The datetime the toast was opened. + */ + startTime: Date; + /** + * The datetime the toast was closed, if the state is hidden. + */ + endTime?: Date; + /** + * The toastr options. + */ + options: ToastrOptions; + /** + * The event's toast details. + */ + map: ToastMap; +} + +interface Toastr { + /** + * Clear toasts + */ + clear: { + /** + * Clear all toasts + */ + (): void; + /** + * Clear specific toast + * + * @param toast Toast to clear + */ + (toast: JQuery): void; + /** + * Clear specific toast + * + * @param toast Toast to clear + * @param clearOptions force clearing a toast, ignoring focus + */ + (toast: JQuery, clearOptions: {force: boolean}): void; + }; + /** + * Removes all toasts (without animation) + */ + remove: { + (): void; + }; + /** + * Create an error toast + */ + error: ToastrDisplayMethod; + /** + * Create an info toast + */ + info: ToastrDisplayMethod; + /** + * The toatsr options object + */ + options: ToastrOptions; + /** + * Create a success toast + */ + success: ToastrDisplayMethod; + /** + * Create a warning toast + */ + warning: ToastrDisplayMethod; + /** + * Get toastr version + */ + version: string; + /** + * Get or create a container. + */ + getContainer: { + /** + * Get the container by options.containerId. + * + * @param options Option values for the container + */ + (options?: ToastrOptions): JQuery, + /** + * Get the container by options.containerId. + * If it doesn't exist, it will be created according to options. + * + * @param options Option values for the container + * @param create Use true to create a container, if it doesn't exist + */ + (options: ToastrOptions, create: boolean): JQuery, + }; + /** + * Register a callback to be called when a toast gets created or hidden. + * + * @param callback The function which will be passed the event details. + */ + subscribe: (callback: (response: ToastrResponse) => any) => void; + + [key: string]: any; +} + +declare var toastr: Toastr; +declare module "toastr" { + export = toastr; +} diff --git a/toastr/toastr-tests.ts b/types/toastr/toastr-tests.ts similarity index 100% rename from toastr/toastr-tests.ts rename to types/toastr/toastr-tests.ts diff --git a/toastr/tsconfig.json b/types/toastr/tsconfig.json similarity index 100% rename from toastr/tsconfig.json rename to types/toastr/tsconfig.json diff --git a/tooltipster/index.d.ts b/types/tooltipster/index.d.ts similarity index 100% rename from tooltipster/index.d.ts rename to types/tooltipster/index.d.ts diff --git a/tooltipster/tooltipster-tests.ts b/types/tooltipster/tooltipster-tests.ts similarity index 100% rename from tooltipster/tooltipster-tests.ts rename to types/tooltipster/tooltipster-tests.ts diff --git a/tooltipster/tsconfig.json b/types/tooltipster/tsconfig.json similarity index 100% rename from tooltipster/tsconfig.json rename to types/tooltipster/tsconfig.json diff --git a/torrent-stream/index.d.ts b/types/torrent-stream/index.d.ts similarity index 100% rename from torrent-stream/index.d.ts rename to types/torrent-stream/index.d.ts diff --git a/torrent-stream/torrent-stream-tests.ts b/types/torrent-stream/torrent-stream-tests.ts similarity index 100% rename from torrent-stream/torrent-stream-tests.ts rename to types/torrent-stream/torrent-stream-tests.ts diff --git a/torrent-stream/tsconfig.json b/types/torrent-stream/tsconfig.json similarity index 100% rename from torrent-stream/tsconfig.json rename to types/torrent-stream/tsconfig.json diff --git a/touch-events/index.d.ts b/types/touch-events/index.d.ts similarity index 100% rename from touch-events/index.d.ts rename to types/touch-events/index.d.ts diff --git a/touch-events/touch-events-tests.ts b/types/touch-events/touch-events-tests.ts similarity index 100% rename from touch-events/touch-events-tests.ts rename to types/touch-events/touch-events-tests.ts diff --git a/touch-events/tsconfig.json b/types/touch-events/tsconfig.json similarity index 100% rename from touch-events/tsconfig.json rename to types/touch-events/tsconfig.json diff --git a/touch/index.d.ts b/types/touch/index.d.ts similarity index 100% rename from touch/index.d.ts rename to types/touch/index.d.ts diff --git a/touch/touch-tests.ts b/types/touch/touch-tests.ts similarity index 100% rename from touch/touch-tests.ts rename to types/touch/touch-tests.ts diff --git a/touch/tsconfig.json b/types/touch/tsconfig.json similarity index 100% rename from touch/tsconfig.json rename to types/touch/tsconfig.json diff --git a/traceback/index.d.ts b/types/traceback/index.d.ts similarity index 100% rename from traceback/index.d.ts rename to types/traceback/index.d.ts diff --git a/traceback/traceback-tests.ts b/types/traceback/traceback-tests.ts similarity index 100% rename from traceback/traceback-tests.ts rename to types/traceback/traceback-tests.ts diff --git a/traceback/tsconfig.json b/types/traceback/tsconfig.json similarity index 100% rename from traceback/tsconfig.json rename to types/traceback/tsconfig.json diff --git a/tracking/index.d.ts b/types/tracking/index.d.ts similarity index 100% rename from tracking/index.d.ts rename to types/tracking/index.d.ts diff --git a/tracking/tracking-tests.ts b/types/tracking/tracking-tests.ts similarity index 100% rename from tracking/tracking-tests.ts rename to types/tracking/tracking-tests.ts diff --git a/tracking/tsconfig.json b/types/tracking/tsconfig.json similarity index 100% rename from tracking/tsconfig.json rename to types/tracking/tsconfig.json diff --git a/transducers-js/index.d.ts b/types/transducers-js/index.d.ts similarity index 100% rename from transducers-js/index.d.ts rename to types/transducers-js/index.d.ts diff --git a/transducers-js/transducers-js-tests.ts b/types/transducers-js/transducers-js-tests.ts similarity index 100% rename from transducers-js/transducers-js-tests.ts rename to types/transducers-js/transducers-js-tests.ts diff --git a/transducers-js/tsconfig.json b/types/transducers-js/tsconfig.json similarity index 100% rename from transducers-js/tsconfig.json rename to types/transducers-js/tsconfig.json diff --git a/transducers-js/tslint.json b/types/transducers-js/tslint.json similarity index 100% rename from transducers-js/tslint.json rename to types/transducers-js/tslint.json diff --git a/traverse/index.d.ts b/types/traverse/index.d.ts similarity index 100% rename from traverse/index.d.ts rename to types/traverse/index.d.ts diff --git a/traverse/traverse-tests.ts b/types/traverse/traverse-tests.ts similarity index 100% rename from traverse/traverse-tests.ts rename to types/traverse/traverse-tests.ts diff --git a/traverse/tsconfig.json b/types/traverse/tsconfig.json similarity index 100% rename from traverse/tsconfig.json rename to types/traverse/tsconfig.json diff --git a/traverson/index.d.ts b/types/traverson/index.d.ts similarity index 100% rename from traverson/index.d.ts rename to types/traverson/index.d.ts diff --git a/traverson/traverson-tests.ts b/types/traverson/traverson-tests.ts similarity index 100% rename from traverson/traverson-tests.ts rename to types/traverson/traverson-tests.ts diff --git a/traverson/tsconfig.json b/types/traverson/tsconfig.json similarity index 100% rename from traverson/tsconfig.json rename to types/traverson/tsconfig.json diff --git a/trayballoon/index.d.ts b/types/trayballoon/index.d.ts similarity index 100% rename from trayballoon/index.d.ts rename to types/trayballoon/index.d.ts diff --git a/trayballoon/trayballoon-tests.ts b/types/trayballoon/trayballoon-tests.ts similarity index 100% rename from trayballoon/trayballoon-tests.ts rename to types/trayballoon/trayballoon-tests.ts diff --git a/trayballoon/tsconfig.json b/types/trayballoon/tsconfig.json similarity index 100% rename from trayballoon/tsconfig.json rename to types/trayballoon/tsconfig.json diff --git a/trim/index.d.ts b/types/trim/index.d.ts similarity index 100% rename from trim/index.d.ts rename to types/trim/index.d.ts diff --git a/trim/trim-tests.ts b/types/trim/trim-tests.ts similarity index 100% rename from trim/trim-tests.ts rename to types/trim/trim-tests.ts diff --git a/trim/tsconfig.json b/types/trim/tsconfig.json similarity index 100% rename from trim/tsconfig.json rename to types/trim/tsconfig.json diff --git a/trunk8/index.d.ts b/types/trunk8/index.d.ts similarity index 100% rename from trunk8/index.d.ts rename to types/trunk8/index.d.ts diff --git a/trunk8/tsconfig.json b/types/trunk8/tsconfig.json similarity index 100% rename from trunk8/tsconfig.json rename to types/trunk8/tsconfig.json diff --git a/types/tslint.json b/types/tslint.json new file mode 100644 index 0000000000..490445671d --- /dev/null +++ b/types/tslint.json @@ -0,0 +1 @@ +{ "extends": "../node_modules/types-publisher/tslint-definitions.json" } diff --git a/tsmonad/index.d.ts b/types/tsmonad/index.d.ts similarity index 100% rename from tsmonad/index.d.ts rename to types/tsmonad/index.d.ts diff --git a/tsmonad/test/either-tests.ts b/types/tsmonad/test/either-tests.ts similarity index 100% rename from tsmonad/test/either-tests.ts rename to types/tsmonad/test/either-tests.ts diff --git a/tsmonad/test/maybe-tests.ts b/types/tsmonad/test/maybe-tests.ts similarity index 100% rename from tsmonad/test/maybe-tests.ts rename to types/tsmonad/test/maybe-tests.ts diff --git a/tsmonad/test/writer-tests.ts b/types/tsmonad/test/writer-tests.ts similarity index 100% rename from tsmonad/test/writer-tests.ts rename to types/tsmonad/test/writer-tests.ts diff --git a/tsmonad/tsconfig.json b/types/tsmonad/tsconfig.json similarity index 100% rename from tsmonad/tsconfig.json rename to types/tsmonad/tsconfig.json diff --git a/tspromise/index.d.ts b/types/tspromise/index.d.ts similarity index 100% rename from tspromise/index.d.ts rename to types/tspromise/index.d.ts diff --git a/tspromise/tsconfig.json b/types/tspromise/tsconfig.json similarity index 100% rename from tspromise/tsconfig.json rename to types/tspromise/tsconfig.json diff --git a/tspromise/tspromise-tests.ts b/types/tspromise/tspromise-tests.ts similarity index 100% rename from tspromise/tspromise-tests.ts rename to types/tspromise/tspromise-tests.ts diff --git a/tstl/index.d.ts b/types/tstl/index.d.ts similarity index 100% rename from tstl/index.d.ts rename to types/tstl/index.d.ts diff --git a/tstl/tsconfig.json b/types/tstl/tsconfig.json similarity index 100% rename from tstl/tsconfig.json rename to types/tstl/tsconfig.json diff --git a/tstl/tstl-tests.ts b/types/tstl/tstl-tests.ts similarity index 100% rename from tstl/tstl-tests.ts rename to types/tstl/tstl-tests.ts diff --git a/turf/index.d.ts b/types/turf/index.d.ts similarity index 100% rename from turf/index.d.ts rename to types/turf/index.d.ts diff --git a/turf/tsconfig.json b/types/turf/tsconfig.json similarity index 100% rename from turf/tsconfig.json rename to types/turf/tsconfig.json diff --git a/turf/turf-tests.ts b/types/turf/turf-tests.ts similarity index 100% rename from turf/turf-tests.ts rename to types/turf/turf-tests.ts diff --git a/turf/v2/index.d.ts b/types/turf/v2/index.d.ts similarity index 100% rename from turf/v2/index.d.ts rename to types/turf/v2/index.d.ts diff --git a/turf/v2/tsconfig.json b/types/turf/v2/tsconfig.json similarity index 100% rename from turf/v2/tsconfig.json rename to types/turf/v2/tsconfig.json diff --git a/turf/v2/turf-tests.ts b/types/turf/v2/turf-tests.ts similarity index 100% rename from turf/v2/turf-tests.ts rename to types/turf/v2/turf-tests.ts diff --git a/tv4/index.d.ts b/types/tv4/index.d.ts similarity index 100% rename from tv4/index.d.ts rename to types/tv4/index.d.ts diff --git a/tv4/tsconfig.json b/types/tv4/tsconfig.json similarity index 100% rename from tv4/tsconfig.json rename to types/tv4/tsconfig.json diff --git a/tv4/tv4-tests.ts b/types/tv4/tv4-tests.ts similarity index 100% rename from tv4/tv4-tests.ts rename to types/tv4/tv4-tests.ts diff --git a/tween.js/index.d.ts b/types/tween.js/index.d.ts similarity index 100% rename from tween.js/index.d.ts rename to types/tween.js/index.d.ts diff --git a/tween.js/tsconfig.json b/types/tween.js/tsconfig.json similarity index 100% rename from tween.js/tsconfig.json rename to types/tween.js/tsconfig.json diff --git a/tweenjs/index.d.ts b/types/tweenjs/index.d.ts similarity index 100% rename from tweenjs/index.d.ts rename to types/tweenjs/index.d.ts diff --git a/tweenjs/tsconfig.json b/types/tweenjs/tsconfig.json similarity index 100% rename from tweenjs/tsconfig.json rename to types/tweenjs/tsconfig.json diff --git a/tweenjs/tweenjs-tests.ts b/types/tweenjs/tweenjs-tests.ts similarity index 100% rename from tweenjs/tweenjs-tests.ts rename to types/tweenjs/tweenjs-tests.ts diff --git a/twig/index.d.ts b/types/twig/index.d.ts similarity index 100% rename from twig/index.d.ts rename to types/twig/index.d.ts diff --git a/twig/tsconfig.json b/types/twig/tsconfig.json similarity index 100% rename from twig/tsconfig.json rename to types/twig/tsconfig.json diff --git a/twig/twig-tests.ts b/types/twig/twig-tests.ts similarity index 100% rename from twig/twig-tests.ts rename to types/twig/twig-tests.ts diff --git a/twilio/index.d.ts b/types/twilio/index.d.ts similarity index 100% rename from twilio/index.d.ts rename to types/twilio/index.d.ts diff --git a/twilio/tsconfig.json b/types/twilio/tsconfig.json similarity index 100% rename from twilio/tsconfig.json rename to types/twilio/tsconfig.json diff --git a/twilio/twilio-tests.ts b/types/twilio/twilio-tests.ts similarity index 100% rename from twilio/twilio-tests.ts rename to types/twilio/twilio-tests.ts diff --git a/twit/index.d.ts b/types/twit/index.d.ts similarity index 100% rename from twit/index.d.ts rename to types/twit/index.d.ts diff --git a/twit/tsconfig.json b/types/twit/tsconfig.json similarity index 100% rename from twit/tsconfig.json rename to types/twit/tsconfig.json diff --git a/twit/twit-tests.ts b/types/twit/twit-tests.ts similarity index 100% rename from twit/twit-tests.ts rename to types/twit/twit-tests.ts diff --git a/twitter-text/index.d.ts b/types/twitter-text/index.d.ts similarity index 100% rename from twitter-text/index.d.ts rename to types/twitter-text/index.d.ts diff --git a/twitter-text/tsconfig.json b/types/twitter-text/tsconfig.json similarity index 100% rename from twitter-text/tsconfig.json rename to types/twitter-text/tsconfig.json diff --git a/twitter-text/twitter-text-tests.ts b/types/twitter-text/twitter-text-tests.ts similarity index 100% rename from twitter-text/twitter-text-tests.ts rename to types/twitter-text/twitter-text-tests.ts diff --git a/twitter/index.d.ts b/types/twitter/index.d.ts similarity index 100% rename from twitter/index.d.ts rename to types/twitter/index.d.ts diff --git a/twitter/tsconfig.json b/types/twitter/tsconfig.json similarity index 100% rename from twitter/tsconfig.json rename to types/twitter/tsconfig.json diff --git a/twitter/twitter-tests.ts b/types/twitter/twitter-tests.ts similarity index 100% rename from twitter/twitter-tests.ts rename to types/twitter/twitter-tests.ts diff --git a/twix/index.d.ts b/types/twix/index.d.ts similarity index 100% rename from twix/index.d.ts rename to types/twix/index.d.ts diff --git a/twix/package.json b/types/twix/package.json similarity index 100% rename from twix/package.json rename to types/twix/package.json diff --git a/twix/tsconfig.json b/types/twix/tsconfig.json similarity index 100% rename from twix/tsconfig.json rename to types/twix/tsconfig.json diff --git a/twix/twix-tests.ts b/types/twix/twix-tests.ts similarity index 100% rename from twix/twix-tests.ts rename to types/twix/twix-tests.ts diff --git a/type-check/index.d.ts b/types/type-check/index.d.ts similarity index 100% rename from type-check/index.d.ts rename to types/type-check/index.d.ts diff --git a/type-check/tsconfig.json b/types/type-check/tsconfig.json similarity index 100% rename from type-check/tsconfig.json rename to types/type-check/tsconfig.json diff --git a/type-check/type-check-tests.ts b/types/type-check/type-check-tests.ts similarity index 100% rename from type-check/type-check-tests.ts rename to types/type-check/type-check-tests.ts diff --git a/type-detect/index.d.ts b/types/type-detect/index.d.ts similarity index 100% rename from type-detect/index.d.ts rename to types/type-detect/index.d.ts diff --git a/type-detect/tsconfig.json b/types/type-detect/tsconfig.json similarity index 100% rename from type-detect/tsconfig.json rename to types/type-detect/tsconfig.json diff --git a/type-detect/type-detect-tests.ts b/types/type-detect/type-detect-tests.ts similarity index 100% rename from type-detect/type-detect-tests.ts rename to types/type-detect/type-detect-tests.ts diff --git a/type-name/index.d.ts b/types/type-name/index.d.ts similarity index 100% rename from type-name/index.d.ts rename to types/type-name/index.d.ts diff --git a/type-name/tsconfig.json b/types/type-name/tsconfig.json similarity index 100% rename from type-name/tsconfig.json rename to types/type-name/tsconfig.json diff --git a/type-name/type-name-tests.ts b/types/type-name/type-name-tests.ts similarity index 100% rename from type-name/type-name-tests.ts rename to types/type-name/type-name-tests.ts diff --git a/typeahead/index.d.ts b/types/typeahead/index.d.ts similarity index 100% rename from typeahead/index.d.ts rename to types/typeahead/index.d.ts diff --git a/typeahead/tsconfig.json b/types/typeahead/tsconfig.json similarity index 100% rename from typeahead/tsconfig.json rename to types/typeahead/tsconfig.json diff --git a/typeahead/typeahead-tests.ts b/types/typeahead/typeahead-tests.ts similarity index 100% rename from typeahead/typeahead-tests.ts rename to types/typeahead/typeahead-tests.ts diff --git a/typedarray-pool/index.d.ts b/types/typedarray-pool/index.d.ts similarity index 100% rename from typedarray-pool/index.d.ts rename to types/typedarray-pool/index.d.ts diff --git a/typedarray-pool/tsconfig.json b/types/typedarray-pool/tsconfig.json similarity index 100% rename from typedarray-pool/tsconfig.json rename to types/typedarray-pool/tsconfig.json diff --git a/typedarray-pool/typedarray-pool-tests.ts b/types/typedarray-pool/typedarray-pool-tests.ts similarity index 100% rename from typedarray-pool/typedarray-pool-tests.ts rename to types/typedarray-pool/typedarray-pool-tests.ts diff --git a/typescript-deferred/index.d.ts b/types/typescript-deferred/index.d.ts similarity index 100% rename from typescript-deferred/index.d.ts rename to types/typescript-deferred/index.d.ts diff --git a/typescript-deferred/tsconfig.json b/types/typescript-deferred/tsconfig.json similarity index 100% rename from typescript-deferred/tsconfig.json rename to types/typescript-deferred/tsconfig.json diff --git a/typescript-deferred/typescript-deferred-tests.ts b/types/typescript-deferred/typescript-deferred-tests.ts similarity index 100% rename from typescript-deferred/typescript-deferred-tests.ts rename to types/typescript-deferred/typescript-deferred-tests.ts diff --git a/typescript-stl/index.d.ts b/types/typescript-stl/index.d.ts similarity index 100% rename from typescript-stl/index.d.ts rename to types/typescript-stl/index.d.ts diff --git a/typescript-stl/tsconfig.json b/types/typescript-stl/tsconfig.json similarity index 100% rename from typescript-stl/tsconfig.json rename to types/typescript-stl/tsconfig.json diff --git a/typescript-stl/typescript-stl-tests.ts b/types/typescript-stl/typescript-stl-tests.ts similarity index 100% rename from typescript-stl/typescript-stl-tests.ts rename to types/typescript-stl/typescript-stl-tests.ts diff --git a/tz-format/index.d.ts b/types/tz-format/index.d.ts similarity index 100% rename from tz-format/index.d.ts rename to types/tz-format/index.d.ts diff --git a/tz-format/tsconfig.json b/types/tz-format/tsconfig.json similarity index 100% rename from tz-format/tsconfig.json rename to types/tz-format/tsconfig.json diff --git a/tz-format/tz-format-tests.ts b/types/tz-format/tz-format-tests.ts similarity index 100% rename from tz-format/tz-format-tests.ts rename to types/tz-format/tz-format-tests.ts diff --git a/ua-parser-js/index.d.ts b/types/ua-parser-js/index.d.ts similarity index 100% rename from ua-parser-js/index.d.ts rename to types/ua-parser-js/index.d.ts diff --git a/ua-parser-js/tsconfig.json b/types/ua-parser-js/tsconfig.json similarity index 100% rename from ua-parser-js/tsconfig.json rename to types/ua-parser-js/tsconfig.json diff --git a/ua-parser-js/ua-parser-js-tests.ts b/types/ua-parser-js/ua-parser-js-tests.ts similarity index 100% rename from ua-parser-js/ua-parser-js-tests.ts rename to types/ua-parser-js/ua-parser-js-tests.ts diff --git a/uglify-js/index.d.ts b/types/uglify-js/index.d.ts similarity index 100% rename from uglify-js/index.d.ts rename to types/uglify-js/index.d.ts diff --git a/uglify-js/tsconfig.json b/types/uglify-js/tsconfig.json similarity index 100% rename from uglify-js/tsconfig.json rename to types/uglify-js/tsconfig.json diff --git a/uglify-js/uglify-js-tests.ts b/types/uglify-js/uglify-js-tests.ts similarity index 100% rename from uglify-js/uglify-js-tests.ts rename to types/uglify-js/uglify-js-tests.ts diff --git a/uglifycss/index.d.ts b/types/uglifycss/index.d.ts similarity index 100% rename from uglifycss/index.d.ts rename to types/uglifycss/index.d.ts diff --git a/uglifycss/tsconfig.json b/types/uglifycss/tsconfig.json similarity index 100% rename from uglifycss/tsconfig.json rename to types/uglifycss/tsconfig.json diff --git a/uglifycss/uglifycss-tests.ts b/types/uglifycss/uglifycss-tests.ts similarity index 100% rename from uglifycss/uglifycss-tests.ts rename to types/uglifycss/uglifycss-tests.ts diff --git a/ui-grid/index.d.ts b/types/ui-grid/index.d.ts similarity index 100% rename from ui-grid/index.d.ts rename to types/ui-grid/index.d.ts diff --git a/ui-grid/tsconfig.json b/types/ui-grid/tsconfig.json similarity index 100% rename from ui-grid/tsconfig.json rename to types/ui-grid/tsconfig.json diff --git a/ui-grid/ui-grid-tests.ts b/types/ui-grid/ui-grid-tests.ts similarity index 100% rename from ui-grid/ui-grid-tests.ts rename to types/ui-grid/ui-grid-tests.ts diff --git a/ui-router-extras/index.d.ts b/types/ui-router-extras/index.d.ts similarity index 100% rename from ui-router-extras/index.d.ts rename to types/ui-router-extras/index.d.ts diff --git a/ui-router-extras/tsconfig.json b/types/ui-router-extras/tsconfig.json similarity index 100% rename from ui-router-extras/tsconfig.json rename to types/ui-router-extras/tsconfig.json diff --git a/ui-router-extras/tslint.json b/types/ui-router-extras/tslint.json similarity index 100% rename from ui-router-extras/tslint.json rename to types/ui-router-extras/tslint.json diff --git a/ui-router-extras/ui-router-extras-tests.ts b/types/ui-router-extras/ui-router-extras-tests.ts similarity index 100% rename from ui-router-extras/ui-router-extras-tests.ts rename to types/ui-router-extras/ui-router-extras-tests.ts diff --git a/ui-select/index.d.ts b/types/ui-select/index.d.ts similarity index 100% rename from ui-select/index.d.ts rename to types/ui-select/index.d.ts diff --git a/ui-select/tsconfig.json b/types/ui-select/tsconfig.json similarity index 100% rename from ui-select/tsconfig.json rename to types/ui-select/tsconfig.json diff --git a/ui-select/ui-select-tests.ts b/types/ui-select/ui-select-tests.ts similarity index 100% rename from ui-select/ui-select-tests.ts rename to types/ui-select/ui-select-tests.ts diff --git a/uid-safe/index.d.ts b/types/uid-safe/index.d.ts similarity index 100% rename from uid-safe/index.d.ts rename to types/uid-safe/index.d.ts diff --git a/uid-safe/tsconfig.json b/types/uid-safe/tsconfig.json similarity index 100% rename from uid-safe/tsconfig.json rename to types/uid-safe/tsconfig.json diff --git a/uid-safe/uid-safe-tests.ts b/types/uid-safe/uid-safe-tests.ts similarity index 100% rename from uid-safe/uid-safe-tests.ts rename to types/uid-safe/uid-safe-tests.ts diff --git a/uikit/README.md b/types/uikit/README.md similarity index 100% rename from uikit/README.md rename to types/uikit/README.md diff --git a/uikit/index.d.ts b/types/uikit/index.d.ts similarity index 100% rename from uikit/index.d.ts rename to types/uikit/index.d.ts diff --git a/uikit/tsconfig.json b/types/uikit/tsconfig.json similarity index 100% rename from uikit/tsconfig.json rename to types/uikit/tsconfig.json diff --git a/uuid-js/tslint.json b/types/uikit/tslint.json similarity index 100% rename from uuid-js/tslint.json rename to types/uikit/tslint.json diff --git a/uikit/uikit-tests.ts b/types/uikit/uikit-tests.ts similarity index 100% rename from uikit/uikit-tests.ts rename to types/uikit/uikit-tests.ts diff --git a/uk.co.workingedge.phonegap.plugin.istablet/index.d.ts b/types/uk.co.workingedge.phonegap.plugin.istablet/index.d.ts similarity index 100% rename from uk.co.workingedge.phonegap.plugin.istablet/index.d.ts rename to types/uk.co.workingedge.phonegap.plugin.istablet/index.d.ts diff --git a/uk.co.workingedge.phonegap.plugin.istablet/tsconfig.json b/types/uk.co.workingedge.phonegap.plugin.istablet/tsconfig.json similarity index 100% rename from uk.co.workingedge.phonegap.plugin.istablet/tsconfig.json rename to types/uk.co.workingedge.phonegap.plugin.istablet/tsconfig.json diff --git a/uk.co.workingedge.phonegap.plugin.istablet/uk.co.workingedge.phonegap.plugin.istablet-tests.ts b/types/uk.co.workingedge.phonegap.plugin.istablet/uk.co.workingedge.phonegap.plugin.istablet-tests.ts similarity index 100% rename from uk.co.workingedge.phonegap.plugin.istablet/uk.co.workingedge.phonegap.plugin.istablet-tests.ts rename to types/uk.co.workingedge.phonegap.plugin.istablet/uk.co.workingedge.phonegap.plugin.istablet-tests.ts diff --git a/uk.co.workingedge.phonegap.plugin.launchnavigator/index.d.ts b/types/uk.co.workingedge.phonegap.plugin.launchnavigator/index.d.ts similarity index 100% rename from uk.co.workingedge.phonegap.plugin.launchnavigator/index.d.ts rename to types/uk.co.workingedge.phonegap.plugin.launchnavigator/index.d.ts diff --git a/uk.co.workingedge.phonegap.plugin.launchnavigator/tsconfig.json b/types/uk.co.workingedge.phonegap.plugin.launchnavigator/tsconfig.json similarity index 100% rename from uk.co.workingedge.phonegap.plugin.launchnavigator/tsconfig.json rename to types/uk.co.workingedge.phonegap.plugin.launchnavigator/tsconfig.json diff --git a/uk.co.workingedge.phonegap.plugin.launchnavigator/uk.co.workingedge.phonegap.plugin.launchnavigator-tests.ts b/types/uk.co.workingedge.phonegap.plugin.launchnavigator/uk.co.workingedge.phonegap.plugin.launchnavigator-tests.ts similarity index 100% rename from uk.co.workingedge.phonegap.plugin.launchnavigator/uk.co.workingedge.phonegap.plugin.launchnavigator-tests.ts rename to types/uk.co.workingedge.phonegap.plugin.launchnavigator/uk.co.workingedge.phonegap.plugin.launchnavigator-tests.ts diff --git a/umbraco/index.d.ts b/types/umbraco/index.d.ts similarity index 100% rename from umbraco/index.d.ts rename to types/umbraco/index.d.ts diff --git a/umbraco/tsconfig.json b/types/umbraco/tsconfig.json similarity index 100% rename from umbraco/tsconfig.json rename to types/umbraco/tsconfig.json diff --git a/umbraco/umbraco-resources.d.ts b/types/umbraco/umbraco-resources.d.ts similarity index 100% rename from umbraco/umbraco-resources.d.ts rename to types/umbraco/umbraco-resources.d.ts diff --git a/umbraco/umbraco-services.d.ts b/types/umbraco/umbraco-services.d.ts similarity index 100% rename from umbraco/umbraco-services.d.ts rename to types/umbraco/umbraco-services.d.ts diff --git a/umbraco/umbraco-tests.ts b/types/umbraco/umbraco-tests.ts similarity index 100% rename from umbraco/umbraco-tests.ts rename to types/umbraco/umbraco-tests.ts diff --git a/umzug/index.d.ts b/types/umzug/index.d.ts similarity index 99% rename from umzug/index.d.ts rename to types/umzug/index.d.ts index af3618df7e..85659e246b 100644 --- a/umzug/index.d.ts +++ b/types/umzug/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/sequelize/umzug // Definitions by: Ivan Drinchev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.2 /// /// diff --git a/umzug/tsconfig.json b/types/umzug/tsconfig.json similarity index 100% rename from umzug/tsconfig.json rename to types/umzug/tsconfig.json diff --git a/umzug/umzug-tests.ts b/types/umzug/umzug-tests.ts similarity index 100% rename from umzug/umzug-tests.ts rename to types/umzug/umzug-tests.ts diff --git a/underscore-ko/index.d.ts b/types/underscore-ko/index.d.ts similarity index 100% rename from underscore-ko/index.d.ts rename to types/underscore-ko/index.d.ts diff --git a/underscore-ko/tsconfig.json b/types/underscore-ko/tsconfig.json similarity index 100% rename from underscore-ko/tsconfig.json rename to types/underscore-ko/tsconfig.json diff --git a/underscore.string/index.d.ts b/types/underscore.string/index.d.ts similarity index 100% rename from underscore.string/index.d.ts rename to types/underscore.string/index.d.ts diff --git a/underscore.string/tsconfig.json b/types/underscore.string/tsconfig.json similarity index 100% rename from underscore.string/tsconfig.json rename to types/underscore.string/tsconfig.json diff --git a/underscore.string/underscore.string-tests.ts b/types/underscore.string/underscore.string-tests.ts similarity index 100% rename from underscore.string/underscore.string-tests.ts rename to types/underscore.string/underscore.string-tests.ts diff --git a/underscore/index.d.ts b/types/underscore/index.d.ts similarity index 100% rename from underscore/index.d.ts rename to types/underscore/index.d.ts diff --git a/underscore/tsconfig.json b/types/underscore/tsconfig.json similarity index 100% rename from underscore/tsconfig.json rename to types/underscore/tsconfig.json diff --git a/underscore/underscore-tests.ts b/types/underscore/underscore-tests.ts similarity index 100% rename from underscore/underscore-tests.ts rename to types/underscore/underscore-tests.ts diff --git a/undertaker/index.d.ts b/types/undertaker/index.d.ts similarity index 100% rename from undertaker/index.d.ts rename to types/undertaker/index.d.ts diff --git a/undertaker/tsconfig.json b/types/undertaker/tsconfig.json similarity index 100% rename from undertaker/tsconfig.json rename to types/undertaker/tsconfig.json diff --git a/undertaker/undertaker-tests.ts b/types/undertaker/undertaker-tests.ts similarity index 100% rename from undertaker/undertaker-tests.ts rename to types/undertaker/undertaker-tests.ts diff --git a/uniq/index.d.ts b/types/uniq/index.d.ts similarity index 100% rename from uniq/index.d.ts rename to types/uniq/index.d.ts diff --git a/uniq/tsconfig.json b/types/uniq/tsconfig.json similarity index 100% rename from uniq/tsconfig.json rename to types/uniq/tsconfig.json diff --git a/uniq/uniq-tests.ts b/types/uniq/uniq-tests.ts similarity index 100% rename from uniq/uniq-tests.ts rename to types/uniq/uniq-tests.ts diff --git a/unique-random/index.d.ts b/types/unique-random/index.d.ts similarity index 100% rename from unique-random/index.d.ts rename to types/unique-random/index.d.ts diff --git a/unique-random/tsconfig.json b/types/unique-random/tsconfig.json similarity index 100% rename from unique-random/tsconfig.json rename to types/unique-random/tsconfig.json diff --git a/unique-random/unique-random-tests.ts b/types/unique-random/unique-random-tests.ts similarity index 100% rename from unique-random/unique-random-tests.ts rename to types/unique-random/unique-random-tests.ts diff --git a/unity-webapi/index.d.ts b/types/unity-webapi/index.d.ts similarity index 100% rename from unity-webapi/index.d.ts rename to types/unity-webapi/index.d.ts diff --git a/unity-webapi/tsconfig.json b/types/unity-webapi/tsconfig.json similarity index 100% rename from unity-webapi/tsconfig.json rename to types/unity-webapi/tsconfig.json diff --git a/unity-webapi/unity-webapi-tests.ts b/types/unity-webapi/unity-webapi-tests.ts similarity index 100% rename from unity-webapi/unity-webapi-tests.ts rename to types/unity-webapi/unity-webapi-tests.ts diff --git a/universal-analytics/index.d.ts b/types/universal-analytics/index.d.ts similarity index 100% rename from universal-analytics/index.d.ts rename to types/universal-analytics/index.d.ts diff --git a/universal-analytics/tsconfig.json b/types/universal-analytics/tsconfig.json similarity index 100% rename from universal-analytics/tsconfig.json rename to types/universal-analytics/tsconfig.json diff --git a/universal-analytics/universal-analytics-tests.ts b/types/universal-analytics/universal-analytics-tests.ts similarity index 100% rename from universal-analytics/universal-analytics-tests.ts rename to types/universal-analytics/universal-analytics-tests.ts diff --git a/universal-router/index.d.ts b/types/universal-router/index.d.ts similarity index 100% rename from universal-router/index.d.ts rename to types/universal-router/index.d.ts diff --git a/universal-router/tsconfig.json b/types/universal-router/tsconfig.json similarity index 100% rename from universal-router/tsconfig.json rename to types/universal-router/tsconfig.json diff --git a/universal-router/tslint.json b/types/universal-router/tslint.json similarity index 100% rename from universal-router/tslint.json rename to types/universal-router/tslint.json diff --git a/universal-router/universal-router-tests.ts b/types/universal-router/universal-router-tests.ts similarity index 100% rename from universal-router/universal-router-tests.ts rename to types/universal-router/universal-router-tests.ts diff --git a/unorm/index.d.ts b/types/unorm/index.d.ts similarity index 100% rename from unorm/index.d.ts rename to types/unorm/index.d.ts diff --git a/unorm/tsconfig.json b/types/unorm/tsconfig.json similarity index 100% rename from unorm/tsconfig.json rename to types/unorm/tsconfig.json diff --git a/unorm/unorm-tests.ts b/types/unorm/unorm-tests.ts similarity index 100% rename from unorm/unorm-tests.ts rename to types/unorm/unorm-tests.ts diff --git a/update-notifier/index.d.ts b/types/update-notifier/index.d.ts similarity index 100% rename from update-notifier/index.d.ts rename to types/update-notifier/index.d.ts diff --git a/update-notifier/tsconfig.json b/types/update-notifier/tsconfig.json similarity index 100% rename from update-notifier/tsconfig.json rename to types/update-notifier/tsconfig.json diff --git a/vanilla-tilt/tslint.json b/types/update-notifier/tslint.json similarity index 100% rename from vanilla-tilt/tslint.json rename to types/update-notifier/tslint.json diff --git a/update-notifier/update-notifier-tests.ts b/types/update-notifier/update-notifier-tests.ts similarity index 100% rename from update-notifier/update-notifier-tests.ts rename to types/update-notifier/update-notifier-tests.ts diff --git a/urbanairship-cordova/index.d.ts b/types/urbanairship-cordova/index.d.ts similarity index 100% rename from urbanairship-cordova/index.d.ts rename to types/urbanairship-cordova/index.d.ts diff --git a/urbanairship-cordova/tsconfig.json b/types/urbanairship-cordova/tsconfig.json similarity index 100% rename from urbanairship-cordova/tsconfig.json rename to types/urbanairship-cordova/tsconfig.json diff --git a/urbanairship-cordova/urbanairship-cordova-tests.ts b/types/urbanairship-cordova/urbanairship-cordova-tests.ts similarity index 100% rename from urbanairship-cordova/urbanairship-cordova-tests.ts rename to types/urbanairship-cordova/urbanairship-cordova-tests.ts diff --git a/uri-templates/index.d.ts b/types/uri-templates/index.d.ts similarity index 100% rename from uri-templates/index.d.ts rename to types/uri-templates/index.d.ts diff --git a/uri-templates/tsconfig.json b/types/uri-templates/tsconfig.json similarity index 100% rename from uri-templates/tsconfig.json rename to types/uri-templates/tsconfig.json diff --git a/uri-templates/uri-templates-tests.ts b/types/uri-templates/uri-templates-tests.ts similarity index 100% rename from uri-templates/uri-templates-tests.ts rename to types/uri-templates/uri-templates-tests.ts diff --git a/urijs/index.d.ts b/types/urijs/index.d.ts similarity index 100% rename from urijs/index.d.ts rename to types/urijs/index.d.ts diff --git a/urijs/tsconfig.json b/types/urijs/tsconfig.json similarity index 100% rename from urijs/tsconfig.json rename to types/urijs/tsconfig.json diff --git a/urijs/urijs-tests.ts b/types/urijs/urijs-tests.ts similarity index 100% rename from urijs/urijs-tests.ts rename to types/urijs/urijs-tests.ts diff --git a/uritemplate/index.d.ts b/types/uritemplate/index.d.ts similarity index 100% rename from uritemplate/index.d.ts rename to types/uritemplate/index.d.ts diff --git a/uritemplate/tsconfig.json b/types/uritemplate/tsconfig.json similarity index 100% rename from uritemplate/tsconfig.json rename to types/uritemplate/tsconfig.json diff --git a/uritemplate/uritemplate-tests.ts b/types/uritemplate/uritemplate-tests.ts similarity index 100% rename from uritemplate/uritemplate-tests.ts rename to types/uritemplate/uritemplate-tests.ts diff --git a/url-join/index.d.ts b/types/url-join/index.d.ts similarity index 100% rename from url-join/index.d.ts rename to types/url-join/index.d.ts diff --git a/url-join/tsconfig.json b/types/url-join/tsconfig.json similarity index 100% rename from url-join/tsconfig.json rename to types/url-join/tsconfig.json diff --git a/url-join/url-join-tests.ts b/types/url-join/url-join-tests.ts similarity index 100% rename from url-join/url-join-tests.ts rename to types/url-join/url-join-tests.ts diff --git a/url-regex/index.d.ts b/types/url-regex/index.d.ts similarity index 100% rename from url-regex/index.d.ts rename to types/url-regex/index.d.ts diff --git a/url-regex/tsconfig.json b/types/url-regex/tsconfig.json similarity index 100% rename from url-regex/tsconfig.json rename to types/url-regex/tsconfig.json diff --git a/verror/tslint.json b/types/url-regex/tslint.json similarity index 100% rename from verror/tslint.json rename to types/url-regex/tslint.json diff --git a/url-regex/url-regex-tests.ts b/types/url-regex/url-regex-tests.ts similarity index 100% rename from url-regex/url-regex-tests.ts rename to types/url-regex/url-regex-tests.ts diff --git a/url-template/index.d.ts b/types/url-template/index.d.ts similarity index 100% rename from url-template/index.d.ts rename to types/url-template/index.d.ts diff --git a/url-template/tsconfig.json b/types/url-template/tsconfig.json similarity index 100% rename from url-template/tsconfig.json rename to types/url-template/tsconfig.json diff --git a/url-template/url-template-tests.ts b/types/url-template/url-template-tests.ts similarity index 100% rename from url-template/url-template-tests.ts rename to types/url-template/url-template-tests.ts diff --git a/urlrouter/index.d.ts b/types/urlrouter/index.d.ts similarity index 100% rename from urlrouter/index.d.ts rename to types/urlrouter/index.d.ts diff --git a/urlrouter/tsconfig.json b/types/urlrouter/tsconfig.json similarity index 100% rename from urlrouter/tsconfig.json rename to types/urlrouter/tsconfig.json diff --git a/urlrouter/urlrouter-tests.ts b/types/urlrouter/urlrouter-tests.ts similarity index 100% rename from urlrouter/urlrouter-tests.ts rename to types/urlrouter/urlrouter-tests.ts diff --git a/urlsafe-base64/index.d.ts b/types/urlsafe-base64/index.d.ts similarity index 100% rename from urlsafe-base64/index.d.ts rename to types/urlsafe-base64/index.d.ts diff --git a/urlsafe-base64/tsconfig.json b/types/urlsafe-base64/tsconfig.json similarity index 100% rename from urlsafe-base64/tsconfig.json rename to types/urlsafe-base64/tsconfig.json diff --git a/urlsafe-base64/urlsafe-base64-tests.ts b/types/urlsafe-base64/urlsafe-base64-tests.ts similarity index 100% rename from urlsafe-base64/urlsafe-base64-tests.ts rename to types/urlsafe-base64/urlsafe-base64-tests.ts diff --git a/usage/index.d.ts b/types/usage/index.d.ts similarity index 100% rename from usage/index.d.ts rename to types/usage/index.d.ts diff --git a/usage/tsconfig.json b/types/usage/tsconfig.json similarity index 100% rename from usage/tsconfig.json rename to types/usage/tsconfig.json diff --git a/usage/usage-tests.ts b/types/usage/usage-tests.ts similarity index 100% rename from usage/usage-tests.ts rename to types/usage/usage-tests.ts diff --git a/usb/index.d.ts b/types/usb/index.d.ts similarity index 100% rename from usb/index.d.ts rename to types/usb/index.d.ts diff --git a/usb/tsconfig.json b/types/usb/tsconfig.json similarity index 100% rename from usb/tsconfig.json rename to types/usb/tsconfig.json diff --git a/videojs/tslint.json b/types/usb/tslint.json similarity index 100% rename from videojs/tslint.json rename to types/usb/tslint.json diff --git a/usb/usb-tests.ts b/types/usb/usb-tests.ts similarity index 100% rename from usb/usb-tests.ts rename to types/usb/usb-tests.ts diff --git a/user-home/index.d.ts b/types/user-home/index.d.ts similarity index 100% rename from user-home/index.d.ts rename to types/user-home/index.d.ts diff --git a/user-home/tsconfig.json b/types/user-home/tsconfig.json similarity index 100% rename from user-home/tsconfig.json rename to types/user-home/tsconfig.json diff --git a/vinyl-fs/tslint.json b/types/user-home/tslint.json similarity index 100% rename from vinyl-fs/tslint.json rename to types/user-home/tslint.json diff --git a/user-home/user-home-tests.ts b/types/user-home/user-home-tests.ts similarity index 100% rename from user-home/user-home-tests.ts rename to types/user-home/user-home-tests.ts diff --git a/useragent/index.d.ts b/types/useragent/index.d.ts similarity index 100% rename from useragent/index.d.ts rename to types/useragent/index.d.ts diff --git a/useragent/tsconfig.json b/types/useragent/tsconfig.json similarity index 100% rename from useragent/tsconfig.json rename to types/useragent/tsconfig.json diff --git a/useragent/useragent-tests.ts b/types/useragent/useragent-tests.ts similarity index 100% rename from useragent/useragent-tests.ts rename to types/useragent/useragent-tests.ts diff --git a/username/index.d.ts b/types/username/index.d.ts similarity index 100% rename from username/index.d.ts rename to types/username/index.d.ts diff --git a/username/tsconfig.json b/types/username/tsconfig.json similarity index 100% rename from username/tsconfig.json rename to types/username/tsconfig.json diff --git a/username/username-tests.ts b/types/username/username-tests.ts similarity index 100% rename from username/username-tests.ts rename to types/username/username-tests.ts diff --git a/utf8/index.d.ts b/types/utf8/index.d.ts similarity index 100% rename from utf8/index.d.ts rename to types/utf8/index.d.ts diff --git a/utf8/tsconfig.json b/types/utf8/tsconfig.json similarity index 100% rename from utf8/tsconfig.json rename to types/utf8/tsconfig.json diff --git a/utf8/utf8-tests.ts b/types/utf8/utf8-tests.ts similarity index 100% rename from utf8/utf8-tests.ts rename to types/utf8/utf8-tests.ts diff --git a/utils-merge/index.d.ts b/types/utils-merge/index.d.ts similarity index 100% rename from utils-merge/index.d.ts rename to types/utils-merge/index.d.ts diff --git a/utils-merge/tsconfig.json b/types/utils-merge/tsconfig.json similarity index 100% rename from utils-merge/tsconfig.json rename to types/utils-merge/tsconfig.json diff --git a/utils-merge/utils-merge-tests.ts b/types/utils-merge/utils-merge-tests.ts similarity index 100% rename from utils-merge/utils-merge-tests.ts rename to types/utils-merge/utils-merge-tests.ts diff --git a/uuid-1345/index.d.ts b/types/uuid-1345/index.d.ts similarity index 100% rename from uuid-1345/index.d.ts rename to types/uuid-1345/index.d.ts diff --git a/uuid-1345/tsconfig.json b/types/uuid-1345/tsconfig.json similarity index 100% rename from uuid-1345/tsconfig.json rename to types/uuid-1345/tsconfig.json diff --git a/uuid-1345/uuid-1345-tests.ts b/types/uuid-1345/uuid-1345-tests.ts similarity index 100% rename from uuid-1345/uuid-1345-tests.ts rename to types/uuid-1345/uuid-1345-tests.ts diff --git a/uuid-js/index.d.ts b/types/uuid-js/index.d.ts similarity index 100% rename from uuid-js/index.d.ts rename to types/uuid-js/index.d.ts diff --git a/uuid-js/tsconfig.json b/types/uuid-js/tsconfig.json similarity index 100% rename from uuid-js/tsconfig.json rename to types/uuid-js/tsconfig.json diff --git a/vis/tslint.json b/types/uuid-js/tslint.json similarity index 100% rename from vis/tslint.json rename to types/uuid-js/tslint.json diff --git a/uuid-js/uuid-js-tests.ts b/types/uuid-js/uuid-js-tests.ts similarity index 100% rename from uuid-js/uuid-js-tests.ts rename to types/uuid-js/uuid-js-tests.ts diff --git a/uuid/index.d.ts b/types/uuid/index.d.ts similarity index 100% rename from uuid/index.d.ts rename to types/uuid/index.d.ts diff --git a/uuid/tsconfig.json b/types/uuid/tsconfig.json similarity index 100% rename from uuid/tsconfig.json rename to types/uuid/tsconfig.json diff --git a/uuid/uuid-tests.ts b/types/uuid/uuid-tests.ts similarity index 100% rename from uuid/uuid-tests.ts rename to types/uuid/uuid-tests.ts diff --git a/uuidjs/index.d.ts b/types/uuidjs/index.d.ts similarity index 100% rename from uuidjs/index.d.ts rename to types/uuidjs/index.d.ts diff --git a/uuidjs/tsconfig.json b/types/uuidjs/tsconfig.json similarity index 100% rename from uuidjs/tsconfig.json rename to types/uuidjs/tsconfig.json diff --git a/uuidjs/uuidjs-tests.ts b/types/uuidjs/uuidjs-tests.ts similarity index 100% rename from uuidjs/uuidjs-tests.ts rename to types/uuidjs/uuidjs-tests.ts diff --git a/uws/index.d.ts b/types/uws/index.d.ts similarity index 100% rename from uws/index.d.ts rename to types/uws/index.d.ts diff --git a/uws/tsconfig.json b/types/uws/tsconfig.json similarity index 100% rename from uws/tsconfig.json rename to types/uws/tsconfig.json diff --git a/uws/uws-tests.ts b/types/uws/uws-tests.ts similarity index 100% rename from uws/uws-tests.ts rename to types/uws/uws-tests.ts diff --git a/v8-profiler/index.d.ts b/types/v8-profiler/index.d.ts similarity index 100% rename from v8-profiler/index.d.ts rename to types/v8-profiler/index.d.ts diff --git a/v8-profiler/tsconfig.json b/types/v8-profiler/tsconfig.json similarity index 100% rename from v8-profiler/tsconfig.json rename to types/v8-profiler/tsconfig.json diff --git a/v8-profiler/v8-profiler-tests.ts b/types/v8-profiler/v8-profiler-tests.ts similarity index 100% rename from v8-profiler/v8-profiler-tests.ts rename to types/v8-profiler/v8-profiler-tests.ts diff --git a/valdr-message/index.d.ts b/types/valdr-message/index.d.ts similarity index 100% rename from valdr-message/index.d.ts rename to types/valdr-message/index.d.ts diff --git a/valdr-message/tsconfig.json b/types/valdr-message/tsconfig.json similarity index 100% rename from valdr-message/tsconfig.json rename to types/valdr-message/tsconfig.json diff --git a/valdr-message/valdr-message-tests.ts b/types/valdr-message/valdr-message-tests.ts similarity index 100% rename from valdr-message/valdr-message-tests.ts rename to types/valdr-message/valdr-message-tests.ts diff --git a/valdr/index.d.ts b/types/valdr/index.d.ts similarity index 100% rename from valdr/index.d.ts rename to types/valdr/index.d.ts diff --git a/valdr/tsconfig.json b/types/valdr/tsconfig.json similarity index 100% rename from valdr/tsconfig.json rename to types/valdr/tsconfig.json diff --git a/valdr/valdr-tests.ts b/types/valdr/valdr-tests.ts similarity index 100% rename from valdr/valdr-tests.ts rename to types/valdr/valdr-tests.ts diff --git a/valerie/index.d.ts b/types/valerie/index.d.ts similarity index 100% rename from valerie/index.d.ts rename to types/valerie/index.d.ts diff --git a/valerie/tsconfig.json b/types/valerie/tsconfig.json similarity index 100% rename from valerie/tsconfig.json rename to types/valerie/tsconfig.json diff --git a/valerie/valerie-tests.ts b/types/valerie/valerie-tests.ts similarity index 100% rename from valerie/valerie-tests.ts rename to types/valerie/valerie-tests.ts diff --git a/valid-url/index.d.ts b/types/valid-url/index.d.ts similarity index 100% rename from valid-url/index.d.ts rename to types/valid-url/index.d.ts diff --git a/valid-url/tsconfig.json b/types/valid-url/tsconfig.json similarity index 100% rename from valid-url/tsconfig.json rename to types/valid-url/tsconfig.json diff --git a/valid-url/valid-url-tests.ts b/types/valid-url/valid-url-tests.ts similarity index 100% rename from valid-url/valid-url-tests.ts rename to types/valid-url/valid-url-tests.ts diff --git a/validate.js/index.d.ts b/types/validate.js/index.d.ts similarity index 100% rename from validate.js/index.d.ts rename to types/validate.js/index.d.ts diff --git a/validate.js/tsconfig.json b/types/validate.js/tsconfig.json similarity index 100% rename from validate.js/tsconfig.json rename to types/validate.js/tsconfig.json diff --git a/validate.js/validate.js-tests.ts b/types/validate.js/validate.js-tests.ts similarity index 100% rename from validate.js/validate.js-tests.ts rename to types/validate.js/validate.js-tests.ts diff --git a/validator/index.d.ts b/types/validator/index.d.ts similarity index 100% rename from validator/index.d.ts rename to types/validator/index.d.ts diff --git a/validator/tsconfig.json b/types/validator/tsconfig.json similarity index 100% rename from validator/tsconfig.json rename to types/validator/tsconfig.json diff --git a/validator/validator-tests.ts b/types/validator/validator-tests.ts similarity index 100% rename from validator/validator-tests.ts rename to types/validator/validator-tests.ts diff --git a/validatorjs/index.d.ts b/types/validatorjs/index.d.ts similarity index 100% rename from validatorjs/index.d.ts rename to types/validatorjs/index.d.ts diff --git a/validatorjs/tsconfig.json b/types/validatorjs/tsconfig.json similarity index 100% rename from validatorjs/tsconfig.json rename to types/validatorjs/tsconfig.json diff --git a/validatorjs/validatorjs-tests.ts b/types/validatorjs/validatorjs-tests.ts similarity index 100% rename from validatorjs/validatorjs-tests.ts rename to types/validatorjs/validatorjs-tests.ts diff --git a/vanilla-tilt/index.d.ts b/types/vanilla-tilt/index.d.ts similarity index 100% rename from vanilla-tilt/index.d.ts rename to types/vanilla-tilt/index.d.ts diff --git a/vanilla-tilt/tsconfig.json b/types/vanilla-tilt/tsconfig.json similarity index 100% rename from vanilla-tilt/tsconfig.json rename to types/vanilla-tilt/tsconfig.json diff --git a/vkbeautify/tslint.json b/types/vanilla-tilt/tslint.json similarity index 100% rename from vkbeautify/tslint.json rename to types/vanilla-tilt/tslint.json diff --git a/vanilla-tilt/vanilla-tilt-tests.ts b/types/vanilla-tilt/vanilla-tilt-tests.ts similarity index 100% rename from vanilla-tilt/vanilla-tilt-tests.ts rename to types/vanilla-tilt/vanilla-tilt-tests.ts diff --git a/vec3/index.d.ts b/types/vec3/index.d.ts similarity index 100% rename from vec3/index.d.ts rename to types/vec3/index.d.ts diff --git a/vec3/tsconfig.json b/types/vec3/tsconfig.json similarity index 100% rename from vec3/tsconfig.json rename to types/vec3/tsconfig.json diff --git a/vec3/vec3-tests.ts b/types/vec3/vec3-tests.ts similarity index 100% rename from vec3/vec3-tests.ts rename to types/vec3/vec3-tests.ts diff --git a/vectorious/index.d.ts b/types/vectorious/index.d.ts similarity index 100% rename from vectorious/index.d.ts rename to types/vectorious/index.d.ts diff --git a/vectorious/tsconfig.json b/types/vectorious/tsconfig.json similarity index 100% rename from vectorious/tsconfig.json rename to types/vectorious/tsconfig.json diff --git a/vectorious/vectorious-tests.ts b/types/vectorious/vectorious-tests.ts similarity index 100% rename from vectorious/vectorious-tests.ts rename to types/vectorious/vectorious-tests.ts diff --git a/vega/index.d.ts b/types/vega/index.d.ts similarity index 100% rename from vega/index.d.ts rename to types/vega/index.d.ts diff --git a/vega/tsconfig.json b/types/vega/tsconfig.json similarity index 100% rename from vega/tsconfig.json rename to types/vega/tsconfig.json diff --git a/vega/vega-tests.ts b/types/vega/vega-tests.ts similarity index 100% rename from vega/vega-tests.ts rename to types/vega/vega-tests.ts diff --git a/velocity-animate/index.d.ts b/types/velocity-animate/index.d.ts similarity index 100% rename from velocity-animate/index.d.ts rename to types/velocity-animate/index.d.ts diff --git a/velocity-animate/tsconfig.json b/types/velocity-animate/tsconfig.json similarity index 100% rename from velocity-animate/tsconfig.json rename to types/velocity-animate/tsconfig.json diff --git a/velocity-animate/velocity-animate-tests.ts b/types/velocity-animate/velocity-animate-tests.ts similarity index 100% rename from velocity-animate/velocity-animate-tests.ts rename to types/velocity-animate/velocity-animate-tests.ts diff --git a/verror/index.d.ts b/types/verror/index.d.ts similarity index 100% rename from verror/index.d.ts rename to types/verror/index.d.ts diff --git a/verror/tsconfig.json b/types/verror/tsconfig.json similarity index 100% rename from verror/tsconfig.json rename to types/verror/tsconfig.json diff --git a/voca/tslint.json b/types/verror/tslint.json similarity index 100% rename from voca/tslint.json rename to types/verror/tslint.json diff --git a/verror/verror-tests.ts b/types/verror/verror-tests.ts similarity index 100% rename from verror/verror-tests.ts rename to types/verror/verror-tests.ts diff --git a/vex-js/index.d.ts b/types/vex-js/index.d.ts similarity index 100% rename from vex-js/index.d.ts rename to types/vex-js/index.d.ts diff --git a/vex-js/tsconfig.json b/types/vex-js/tsconfig.json similarity index 100% rename from vex-js/tsconfig.json rename to types/vex-js/tsconfig.json diff --git a/vex-js/vex-js-tests.ts b/types/vex-js/vex-js-tests.ts similarity index 100% rename from vex-js/vex-js-tests.ts rename to types/vex-js/vex-js-tests.ts diff --git a/vexflow/index.d.ts b/types/vexflow/index.d.ts similarity index 100% rename from vexflow/index.d.ts rename to types/vexflow/index.d.ts diff --git a/vexflow/tsconfig.json b/types/vexflow/tsconfig.json similarity index 100% rename from vexflow/tsconfig.json rename to types/vexflow/tsconfig.json diff --git a/vexflow/vexflow-tests.ts b/types/vexflow/vexflow-tests.ts similarity index 100% rename from vexflow/vexflow-tests.ts rename to types/vexflow/vexflow-tests.ts diff --git a/victor/index.d.ts b/types/victor/index.d.ts similarity index 100% rename from victor/index.d.ts rename to types/victor/index.d.ts diff --git a/victor/tsconfig.json b/types/victor/tsconfig.json similarity index 100% rename from victor/tsconfig.json rename to types/victor/tsconfig.json diff --git a/victor/victor-tests.ts b/types/victor/victor-tests.ts similarity index 100% rename from victor/victor-tests.ts rename to types/victor/victor-tests.ts diff --git a/victory/index.d.ts b/types/victory/index.d.ts similarity index 99% rename from victory/index.d.ts rename to types/victory/index.d.ts index 70d1ecb6f1..d1d241354d 100644 --- a/victory/index.d.ts +++ b/types/victory/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for Victory 0.9.0 // Project: https://github.com/FormidableLabs/victory -// Definitions by: Alexey Svetliakov +// Definitions by: Alexey Svetliakov , snerks // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 @@ -299,6 +299,11 @@ declare module "victory" { before?: (datum: any) => AnimationStyle; after?: (datum: any) => AnimationStyle; }; + /** + * The easing prop specifies an easing function name to use for tweening. + * @default "quadInOut" + */ + easing?: AnimationEasing; } /** diff --git a/victory/tsconfig.json b/types/victory/tsconfig.json similarity index 100% rename from victory/tsconfig.json rename to types/victory/tsconfig.json diff --git a/victory/victory-tests.tsx b/types/victory/victory-tests.tsx similarity index 99% rename from victory/victory-tests.tsx rename to types/victory/victory-tests.tsx index 7947f5f0ec..601780ffaf 100644 --- a/victory/victory-tests.tsx +++ b/types/victory/victory-tests.tsx @@ -601,4 +601,8 @@ test = ( } }} /> -); \ No newline at end of file +); + +test = ( + +); diff --git a/videojs/index.d.ts b/types/videojs/index.d.ts similarity index 100% rename from videojs/index.d.ts rename to types/videojs/index.d.ts diff --git a/videojs/tsconfig.json b/types/videojs/tsconfig.json similarity index 100% rename from videojs/tsconfig.json rename to types/videojs/tsconfig.json diff --git a/watchpack/tslint.json b/types/videojs/tslint.json similarity index 100% rename from watchpack/tslint.json rename to types/videojs/tslint.json diff --git a/videojs/videojs-tests.ts b/types/videojs/videojs-tests.ts similarity index 100% rename from videojs/videojs-tests.ts rename to types/videojs/videojs-tests.ts diff --git a/viewporter/index.d.ts b/types/viewporter/index.d.ts similarity index 100% rename from viewporter/index.d.ts rename to types/viewporter/index.d.ts diff --git a/viewporter/tsconfig.json b/types/viewporter/tsconfig.json similarity index 100% rename from viewporter/tsconfig.json rename to types/viewporter/tsconfig.json diff --git a/viewporter/viewporter-tests.ts b/types/viewporter/viewporter-tests.ts similarity index 100% rename from viewporter/viewporter-tests.ts rename to types/viewporter/viewporter-tests.ts diff --git a/vimeo/index.d.ts b/types/vimeo/index.d.ts similarity index 100% rename from vimeo/index.d.ts rename to types/vimeo/index.d.ts diff --git a/vimeo/tsconfig.json b/types/vimeo/tsconfig.json similarity index 100% rename from vimeo/tsconfig.json rename to types/vimeo/tsconfig.json diff --git a/vinyl-buffer/index.d.ts b/types/vinyl-buffer/index.d.ts similarity index 100% rename from vinyl-buffer/index.d.ts rename to types/vinyl-buffer/index.d.ts diff --git a/vinyl-buffer/tsconfig.json b/types/vinyl-buffer/tsconfig.json similarity index 100% rename from vinyl-buffer/tsconfig.json rename to types/vinyl-buffer/tsconfig.json diff --git a/vinyl-buffer/vinyl-buffer-tests.ts b/types/vinyl-buffer/vinyl-buffer-tests.ts similarity index 100% rename from vinyl-buffer/vinyl-buffer-tests.ts rename to types/vinyl-buffer/vinyl-buffer-tests.ts diff --git a/vinyl-fs/.editorconfig b/types/vinyl-fs/.editorconfig similarity index 100% rename from vinyl-fs/.editorconfig rename to types/vinyl-fs/.editorconfig diff --git a/vinyl-fs/index.d.ts b/types/vinyl-fs/index.d.ts similarity index 83% rename from vinyl-fs/index.d.ts rename to types/vinyl-fs/index.d.ts index 4fa6101b69..52aa5cd506 100644 --- a/vinyl-fs/index.d.ts +++ b/types/vinyl-fs/index.d.ts @@ -27,32 +27,70 @@ interface SrcOptions extends globStream.Options { /** * Specifies the folder relative to the cwd * This is used to determine the file names when saving in .dest() - * Default is where the glob begins + * Default: where the glob begins */ base?: string; /** * Setting this to false will make file.contents a paused stream * If true it will buffer the file contents - * Defaults to true + * Default: true */ buffer?: boolean; /** - * Setting this to false will ignore the contents of the file and disable writing to disk to speed up operations - * Defaults to true + * The mode the directory should be created with. + * Default: the process mode + */ + dirMode?: number; + + /** + * Whether or not you want globs to match on dot files or not + * (e.g., `.gitignore`). + */ + dot?: boolean; + + /** + * Whether or not to recursively resolve symlinks to their targets. + * Setting to `false` to preserve them as symlinks and make `file.symlink` + * equal the original symlink's target path. + * Default: true + */ + followSymlinks?: boolean; + + /** + * Setting this to false will ignore the contents of the file and disable + * writing to disk to speed up operations + * Default: true */ read?: boolean; - /** Only find files that have been modified since the time specified */ + /** + * Whether or not the symlink should be relative or absolute. + * Default: false + */ + relative?: boolean; + + /** Only find files that have been modified since the time specified */ since?: Date|number; - /** Setting this to true will create a duplex stream, one that passes through items and emits globbed files. - * Defaults to false */ + /** + * Causes the BOM to be stripped on UTF-8 encoded files. Set to `false` + * if you need the BOM for some reason. + */ + stripBOM?: boolean; + + /** + * Setting this to true will create a duplex stream, one that passes + * through items and emits globbed files. + * Default: false + */ passthrough?: boolean; - /** Setting this to true will enable sourcemaps. - * Defaults to false */ + /** + * Setting this to true will enable sourcemaps. + * Default: false + */ sourcemaps?: boolean; } diff --git a/vinyl-fs/tsconfig.json b/types/vinyl-fs/tsconfig.json similarity index 100% rename from vinyl-fs/tsconfig.json rename to types/vinyl-fs/tsconfig.json diff --git a/webappsec-credential-management/tslint.json b/types/vinyl-fs/tslint.json similarity index 100% rename from webappsec-credential-management/tslint.json rename to types/vinyl-fs/tslint.json diff --git a/vinyl-fs/vinyl-fs-tests.ts b/types/vinyl-fs/vinyl-fs-tests.ts similarity index 100% rename from vinyl-fs/vinyl-fs-tests.ts rename to types/vinyl-fs/vinyl-fs-tests.ts diff --git a/vinyl-paths/index.d.ts b/types/vinyl-paths/index.d.ts similarity index 100% rename from vinyl-paths/index.d.ts rename to types/vinyl-paths/index.d.ts diff --git a/vinyl-paths/tsconfig.json b/types/vinyl-paths/tsconfig.json similarity index 100% rename from vinyl-paths/tsconfig.json rename to types/vinyl-paths/tsconfig.json diff --git a/vinyl-paths/vinyl-paths-tests.ts b/types/vinyl-paths/vinyl-paths-tests.ts similarity index 100% rename from vinyl-paths/vinyl-paths-tests.ts rename to types/vinyl-paths/vinyl-paths-tests.ts diff --git a/vinyl-source-stream/index.d.ts b/types/vinyl-source-stream/index.d.ts similarity index 100% rename from vinyl-source-stream/index.d.ts rename to types/vinyl-source-stream/index.d.ts diff --git a/vinyl-source-stream/tsconfig.json b/types/vinyl-source-stream/tsconfig.json similarity index 100% rename from vinyl-source-stream/tsconfig.json rename to types/vinyl-source-stream/tsconfig.json diff --git a/vinyl-source-stream/vinyl-source-stream-tests.ts b/types/vinyl-source-stream/vinyl-source-stream-tests.ts similarity index 100% rename from vinyl-source-stream/vinyl-source-stream-tests.ts rename to types/vinyl-source-stream/vinyl-source-stream-tests.ts diff --git a/vinyl/index.d.ts b/types/vinyl/index.d.ts similarity index 100% rename from vinyl/index.d.ts rename to types/vinyl/index.d.ts diff --git a/vinyl/tsconfig.json b/types/vinyl/tsconfig.json similarity index 100% rename from vinyl/tsconfig.json rename to types/vinyl/tsconfig.json diff --git a/vinyl/v0/index.d.ts b/types/vinyl/v0/index.d.ts similarity index 100% rename from vinyl/v0/index.d.ts rename to types/vinyl/v0/index.d.ts diff --git a/vinyl/v0/tsconfig.json b/types/vinyl/v0/tsconfig.json similarity index 100% rename from vinyl/v0/tsconfig.json rename to types/vinyl/v0/tsconfig.json diff --git a/vinyl/v0/vinyl-tests.ts b/types/vinyl/v0/vinyl-tests.ts similarity index 100% rename from vinyl/v0/vinyl-tests.ts rename to types/vinyl/v0/vinyl-tests.ts diff --git a/vinyl/vinyl-tests.ts b/types/vinyl/vinyl-tests.ts similarity index 100% rename from vinyl/vinyl-tests.ts rename to types/vinyl/vinyl-tests.ts diff --git a/virtual-dom/index.d.ts b/types/virtual-dom/index.d.ts similarity index 100% rename from virtual-dom/index.d.ts rename to types/virtual-dom/index.d.ts diff --git a/virtual-dom/tsconfig.json b/types/virtual-dom/tsconfig.json similarity index 100% rename from virtual-dom/tsconfig.json rename to types/virtual-dom/tsconfig.json diff --git a/virtual-dom/virtual-dom-tests.ts b/types/virtual-dom/virtual-dom-tests.ts similarity index 100% rename from virtual-dom/virtual-dom-tests.ts rename to types/virtual-dom/virtual-dom-tests.ts diff --git a/vis/index.d.ts b/types/vis/index.d.ts similarity index 100% rename from vis/index.d.ts rename to types/vis/index.d.ts diff --git a/vis/tsconfig.json b/types/vis/tsconfig.json similarity index 100% rename from vis/tsconfig.json rename to types/vis/tsconfig.json diff --git a/webmidi/tslint.json b/types/vis/tslint.json similarity index 100% rename from webmidi/tslint.json rename to types/vis/tslint.json diff --git a/vis/vis-tests.ts b/types/vis/vis-tests.ts similarity index 100% rename from vis/vis-tests.ts rename to types/vis/vis-tests.ts diff --git a/vitalsigns/index.d.ts b/types/vitalsigns/index.d.ts similarity index 100% rename from vitalsigns/index.d.ts rename to types/vitalsigns/index.d.ts diff --git a/vitalsigns/tsconfig.json b/types/vitalsigns/tsconfig.json similarity index 100% rename from vitalsigns/tsconfig.json rename to types/vitalsigns/tsconfig.json diff --git a/vitalsigns/vitalsigns-tests.ts b/types/vitalsigns/vitalsigns-tests.ts similarity index 100% rename from vitalsigns/vitalsigns-tests.ts rename to types/vitalsigns/vitalsigns-tests.ts diff --git a/vivus/index.d.ts b/types/vivus/index.d.ts similarity index 100% rename from vivus/index.d.ts rename to types/vivus/index.d.ts diff --git a/vivus/tsconfig.json b/types/vivus/tsconfig.json similarity index 100% rename from vivus/tsconfig.json rename to types/vivus/tsconfig.json diff --git a/vivus/vivus-tests.ts b/types/vivus/vivus-tests.ts similarity index 100% rename from vivus/vivus-tests.ts rename to types/vivus/vivus-tests.ts diff --git a/vkbeautify/index.d.ts b/types/vkbeautify/index.d.ts similarity index 100% rename from vkbeautify/index.d.ts rename to types/vkbeautify/index.d.ts diff --git a/vkbeautify/tsconfig.json b/types/vkbeautify/tsconfig.json similarity index 100% rename from vkbeautify/tsconfig.json rename to types/vkbeautify/tsconfig.json diff --git a/webpack-dev-middleware/tslint.json b/types/vkbeautify/tslint.json similarity index 100% rename from webpack-dev-middleware/tslint.json rename to types/vkbeautify/tslint.json diff --git a/vkbeautify/vkbeautify-tests.ts b/types/vkbeautify/vkbeautify-tests.ts similarity index 100% rename from vkbeautify/vkbeautify-tests.ts rename to types/vkbeautify/vkbeautify-tests.ts diff --git a/voca/index.d.ts b/types/voca/index.d.ts similarity index 100% rename from voca/index.d.ts rename to types/voca/index.d.ts diff --git a/voca/tsconfig.json b/types/voca/tsconfig.json similarity index 100% rename from voca/tsconfig.json rename to types/voca/tsconfig.json diff --git a/webpack-hot-middleware/tslint.json b/types/voca/tslint.json similarity index 100% rename from webpack-hot-middleware/tslint.json rename to types/voca/tslint.json diff --git a/voca/voca-tests.ts b/types/voca/voca-tests.ts similarity index 100% rename from voca/voca-tests.ts rename to types/voca/voca-tests.ts diff --git a/voronoi-diagram/index.d.ts b/types/voronoi-diagram/index.d.ts similarity index 100% rename from voronoi-diagram/index.d.ts rename to types/voronoi-diagram/index.d.ts diff --git a/voronoi-diagram/tsconfig.json b/types/voronoi-diagram/tsconfig.json similarity index 100% rename from voronoi-diagram/tsconfig.json rename to types/voronoi-diagram/tsconfig.json diff --git a/voronoi-diagram/voronoi-diagram-tests.ts b/types/voronoi-diagram/voronoi-diagram-tests.ts similarity index 100% rename from voronoi-diagram/voronoi-diagram-tests.ts rename to types/voronoi-diagram/voronoi-diagram-tests.ts diff --git a/vortex-web-client/index.d.ts b/types/vortex-web-client/index.d.ts similarity index 100% rename from vortex-web-client/index.d.ts rename to types/vortex-web-client/index.d.ts diff --git a/vortex-web-client/tsconfig.json b/types/vortex-web-client/tsconfig.json similarity index 100% rename from vortex-web-client/tsconfig.json rename to types/vortex-web-client/tsconfig.json diff --git a/vortex-web-client/vortex-web-client-tests.ts b/types/vortex-web-client/vortex-web-client-tests.ts similarity index 100% rename from vortex-web-client/vortex-web-client-tests.ts rename to types/vortex-web-client/vortex-web-client-tests.ts diff --git a/voximplant-websdk/index.d.ts b/types/voximplant-websdk/index.d.ts similarity index 100% rename from voximplant-websdk/index.d.ts rename to types/voximplant-websdk/index.d.ts diff --git a/voximplant-websdk/tsconfig.json b/types/voximplant-websdk/tsconfig.json similarity index 100% rename from voximplant-websdk/tsconfig.json rename to types/voximplant-websdk/tsconfig.json diff --git a/voximplant-websdk/voximplant-websdk-tests.ts b/types/voximplant-websdk/voximplant-websdk-tests.ts similarity index 100% rename from voximplant-websdk/voximplant-websdk-tests.ts rename to types/voximplant-websdk/voximplant-websdk-tests.ts diff --git a/vso-node-api/index.d.ts b/types/vso-node-api/index.d.ts similarity index 100% rename from vso-node-api/index.d.ts rename to types/vso-node-api/index.d.ts diff --git a/vso-node-api/tsconfig.json b/types/vso-node-api/tsconfig.json similarity index 100% rename from vso-node-api/tsconfig.json rename to types/vso-node-api/tsconfig.json diff --git a/vso-node-api/vso-node-api-tests.ts b/types/vso-node-api/vso-node-api-tests.ts similarity index 100% rename from vso-node-api/vso-node-api-tests.ts rename to types/vso-node-api/vso-node-api-tests.ts diff --git a/vue-resource/index.d.ts b/types/vue-resource/index.d.ts similarity index 100% rename from vue-resource/index.d.ts rename to types/vue-resource/index.d.ts diff --git a/vue-resource/package.json b/types/vue-resource/package.json similarity index 100% rename from vue-resource/package.json rename to types/vue-resource/package.json diff --git a/vue-resource/tsconfig.json b/types/vue-resource/tsconfig.json similarity index 100% rename from vue-resource/tsconfig.json rename to types/vue-resource/tsconfig.json diff --git a/vue-resource/vue-resource-tests.ts b/types/vue-resource/vue-resource-tests.ts similarity index 100% rename from vue-resource/vue-resource-tests.ts rename to types/vue-resource/vue-resource-tests.ts diff --git a/w2ui/index.d.ts b/types/w2ui/index.d.ts similarity index 100% rename from w2ui/index.d.ts rename to types/w2ui/index.d.ts diff --git a/w2ui/tsconfig.json b/types/w2ui/tsconfig.json similarity index 100% rename from w2ui/tsconfig.json rename to types/w2ui/tsconfig.json diff --git a/w2ui/w2ui-tests.ts b/types/w2ui/w2ui-tests.ts similarity index 100% rename from w2ui/w2ui-tests.ts rename to types/w2ui/w2ui-tests.ts diff --git a/wake_on_lan/index.d.ts b/types/wake_on_lan/index.d.ts similarity index 100% rename from wake_on_lan/index.d.ts rename to types/wake_on_lan/index.d.ts diff --git a/wake_on_lan/tsconfig.json b/types/wake_on_lan/tsconfig.json similarity index 100% rename from wake_on_lan/tsconfig.json rename to types/wake_on_lan/tsconfig.json diff --git a/wake_on_lan/wake_on_lan-tests.ts b/types/wake_on_lan/wake_on_lan-tests.ts similarity index 100% rename from wake_on_lan/wake_on_lan-tests.ts rename to types/wake_on_lan/wake_on_lan-tests.ts diff --git a/wallabyjs/index.d.ts b/types/wallabyjs/index.d.ts similarity index 100% rename from wallabyjs/index.d.ts rename to types/wallabyjs/index.d.ts diff --git a/wallabyjs/tsconfig.json b/types/wallabyjs/tsconfig.json similarity index 100% rename from wallabyjs/tsconfig.json rename to types/wallabyjs/tsconfig.json diff --git a/wallabyjs/wallabyjs-tests.ts b/types/wallabyjs/wallabyjs-tests.ts similarity index 100% rename from wallabyjs/wallabyjs-tests.ts rename to types/wallabyjs/wallabyjs-tests.ts diff --git a/wampy/index.d.ts b/types/wampy/index.d.ts similarity index 91% rename from wampy/index.d.ts rename to types/wampy/index.d.ts index f74695503a..276a1a2f00 100644 --- a/wampy/index.d.ts +++ b/types/wampy/index.d.ts @@ -8,7 +8,6 @@ interface WampyOptions autoReconnect?: boolean; reconnectInterval?: number; maxRetries?: number; - transportEncoding?: string; realm?: string; helloCustomDetails?: any; onChallenge?: (auth_method: string, challenge_details: string) => string; @@ -19,7 +18,7 @@ interface WampyOptions onReconnect?: () => void; onReconnectSuccess?: () => void; ws?: any; - msgpackCoder?: any; + serializer?: any; } interface WampyOpStatus @@ -31,7 +30,7 @@ interface WampyOpStatus interface SuccessErrorCallbacksHash { - onSuccess?: (data: any) => void; + onSuccess?: (args: any[], kwargs: any) => void; onError?: (err: string, details: any) => void; } @@ -42,7 +41,7 @@ interface SubscribeCallbacksHash extends SuccessErrorCallbacksHash interface RegisterCallbacksHash extends SuccessErrorCallbacksHash { - rpc: (data: any, options: any) => any[]; + rpc: (args: any[], kwargs: any, options: any) => any[]; } interface CallSuccessErrorCallbacksHash @@ -101,7 +100,7 @@ interface Wampy cancel(reqId: number, callbacks?: ((() => void) | SuccessErrorCallbacksHash), advancedOptions?: CancelAdvancedOptions): Wampy; - register(topicURI: string, callbacks: (((data: any, options: any) => any[]) | RegisterCallbacksHash)): Wampy; + register(topicURI: string, callbacks: (((args: any[], kwargs: any, options: any) => any[]) | RegisterCallbacksHash)): Wampy; unregister(topicURI: string, callbacks?: ((() => void) | SuccessErrorCallbacksHash)): Wampy; } diff --git a/wampy/tsconfig.json b/types/wampy/tsconfig.json similarity index 100% rename from wampy/tsconfig.json rename to types/wampy/tsconfig.json diff --git a/wampy/wampy-tests.ts b/types/wampy/wampy-tests.ts similarity index 74% rename from wampy/wampy-tests.ts rename to types/wampy/wampy-tests.ts index e3de0cd019..6bb301edb7 100644 --- a/wampy/wampy-tests.ts +++ b/types/wampy/wampy-tests.ts @@ -26,10 +26,12 @@ let id: number = ws.getSessionId(); ws.disconnect(); ws.abort(); -ws.subscribe('system.monitor.update', (args: any[], kwargs: any) => { +ws.subscribe('system.monitor.update', (args: any[], kwargs: any) => + { console.log('Received system.monitor.update event!'); }) - .subscribe('client.message', function (args: any[], kwargs: any) { + .subscribe('client.message', function (args: any[], kwargs: any) + { console.log('Received client.message event!'); }); @@ -40,11 +42,13 @@ ws.unsubscribe('subscribed.topic', f1); ws.unsubscribe('chat.message.received'); ws.call('get.server.time', null, { - onSuccess: (args: any[], kwargs: any) => { + onSuccess: (args: any[], kwargs: any) => + { console.log('RPC successfully called'); console.log('Server time is ' + kwargs); }, - onError: (err: string, details: any, args: any[], kwargs: any) => { + onError: (err: string, details: any, args: any[], kwargs: any) => + { console.log('RPC call failed with error ' + err); } }); @@ -55,45 +59,45 @@ ws.getOpStatus(); ws.publish('user.logged.in'); ws.publish('chat.message.received', 'user message'); ws.publish('chat.message.received', ['user message1', 'user message2']); -ws.publish('user.modified', { field1: 'field1', field2: true, field3: 123 }); -ws.publish('user.modified', { field1: 'field1', field2: true, field3: 123 }, { - onSuccess: () => console.log('User successfully modified') +ws.publish('user.modified', {field1: 'field1', field2: true, field3: 123}); +ws.publish('user.modified', {field1: 'field1', field2: true, field3: 123}, { + onSuccess: () => console.log('User successfully modified') }); -ws.publish('user.modified', { field1: 'field1', field2: true, field3: 123 }, { - onSuccess: () => console.log('User successfully modified'), - onError: (err: string, details: any) => console.log('User modification failed', err) +ws.publish('user.modified', {field1: 'field1', field2: true, field3: 123}, { + onSuccess: () => console.log('User successfully modified'), + onError: (err: string, details: any) => console.log('User modification failed', err) }); -ws.publish('chat.message.received', ['Private message'], null, { eligible: 123456789 }); +ws.publish('chat.message.received', ['Private message'], null, {eligible: 123456789}); ws.call('server.time', null, (args: any[], kwargs: any) => console.log('Server time is ' + args[0])); ws.call('start.migration', null, { onSuccess: (args: any[], kwargs: any) => console.log('RPC successfully called'), - onError: (err: string, details: any, args: any[], kwargs: any) => console.log('RPC call failed!',err) + onError: (err: string, details: any, args: any[], kwargs: any) => console.log('RPC call failed!', err) }); -ws.call('restore.backup', { backupFile: 'backup.zip' }, { +ws.call('restore.backup', {backupFile: 'backup.zip'}, { onSuccess: (args: any[], kwargs: any) => console.log('Backup successfully restored'), - onError: (err: string, details: any, args: any[], kwargs: any) => console.log('Restore failed!',err) + onError: (err: string, details: any, args: any[], kwargs: any) => console.log('Restore failed!', err) }); ws.call('start.migration', null, { onSuccess: (args: any[], kwargs: any) => console.log('RPC successfully called'), - onError: (err: string, details: any, args: any[], kwargs: any) => console.log('RPC call failed!',err) + onError: (err: string, details: any, args: any[], kwargs: any) => console.log('RPC call failed!', err) }); let status = ws.getOpStatus(); ws.cancel(status.reqId); -let sqrt_f = (x: number, y: any) => [{}, x*x]; +let sqrt_f = (args: any[], kwargs: any, options: any) => [{}, kwargs * kwargs]; ws.register('sqrt.value', sqrt_f); ws.register('sqrt.value', { rpc: sqrt_f, - onSuccess: (data: any) => console.log('RPC successfully registered'), - onError: (err: string, details: any) => console.log('RPC registration failed!',err) + onSuccess: (args: any[], kwargs: any) => console.log('RPC successfully registered'), + onError: (err: string, details: any) => console.log('RPC registration failed!', err) }); ws.unregister('sqrt.value'); diff --git a/warning/index.d.ts b/types/warning/index.d.ts similarity index 100% rename from warning/index.d.ts rename to types/warning/index.d.ts diff --git a/warning/tsconfig.json b/types/warning/tsconfig.json similarity index 100% rename from warning/tsconfig.json rename to types/warning/tsconfig.json diff --git a/warning/warning-tests.ts b/types/warning/warning-tests.ts similarity index 100% rename from warning/warning-tests.ts rename to types/warning/warning-tests.ts diff --git a/watch/index.d.ts b/types/watch/index.d.ts similarity index 100% rename from watch/index.d.ts rename to types/watch/index.d.ts diff --git a/watch/tsconfig.json b/types/watch/tsconfig.json similarity index 100% rename from watch/tsconfig.json rename to types/watch/tsconfig.json diff --git a/watch/watch-tests.ts b/types/watch/watch-tests.ts similarity index 100% rename from watch/watch-tests.ts rename to types/watch/watch-tests.ts diff --git a/watchify/index.d.ts b/types/watchify/index.d.ts similarity index 100% rename from watchify/index.d.ts rename to types/watchify/index.d.ts diff --git a/watchify/tsconfig.json b/types/watchify/tsconfig.json similarity index 100% rename from watchify/tsconfig.json rename to types/watchify/tsconfig.json diff --git a/watchify/watchify-tests.ts b/types/watchify/watchify-tests.ts similarity index 100% rename from watchify/watchify-tests.ts rename to types/watchify/watchify-tests.ts diff --git a/watchpack/DirectoryWatcher.d.ts b/types/watchpack/DirectoryWatcher.d.ts similarity index 100% rename from watchpack/DirectoryWatcher.d.ts rename to types/watchpack/DirectoryWatcher.d.ts diff --git a/watchpack/Watcher.d.ts b/types/watchpack/Watcher.d.ts similarity index 100% rename from watchpack/Watcher.d.ts rename to types/watchpack/Watcher.d.ts diff --git a/watchpack/index.d.ts b/types/watchpack/index.d.ts similarity index 100% rename from watchpack/index.d.ts rename to types/watchpack/index.d.ts diff --git a/watchpack/tsconfig.json b/types/watchpack/tsconfig.json similarity index 100% rename from watchpack/tsconfig.json rename to types/watchpack/tsconfig.json diff --git a/webpack-notifier/tslint.json b/types/watchpack/tslint.json similarity index 100% rename from webpack-notifier/tslint.json rename to types/watchpack/tslint.json diff --git a/watchpack/watchpack-tests.ts b/types/watchpack/watchpack-tests.ts similarity index 100% rename from watchpack/watchpack-tests.ts rename to types/watchpack/watchpack-tests.ts diff --git a/waterline/index.d.ts b/types/waterline/index.d.ts similarity index 100% rename from waterline/index.d.ts rename to types/waterline/index.d.ts diff --git a/waterline/tsconfig.json b/types/waterline/tsconfig.json similarity index 100% rename from waterline/tsconfig.json rename to types/waterline/tsconfig.json diff --git a/waterline/waterline-tests.ts b/types/waterline/waterline-tests.ts similarity index 100% rename from waterline/waterline-tests.ts rename to types/waterline/waterline-tests.ts diff --git a/weapp-api/index.d.ts b/types/weapp-api/index.d.ts similarity index 100% rename from weapp-api/index.d.ts rename to types/weapp-api/index.d.ts diff --git a/weapp-api/tsconfig.json b/types/weapp-api/tsconfig.json similarity index 100% rename from weapp-api/tsconfig.json rename to types/weapp-api/tsconfig.json diff --git a/weapp-api/weapp-api-tests.ts b/types/weapp-api/weapp-api-tests.ts similarity index 100% rename from weapp-api/weapp-api-tests.ts rename to types/weapp-api/weapp-api-tests.ts diff --git a/web-bluetooth/index.d.ts b/types/web-bluetooth/index.d.ts similarity index 100% rename from web-bluetooth/index.d.ts rename to types/web-bluetooth/index.d.ts diff --git a/web-bluetooth/tsconfig.json b/types/web-bluetooth/tsconfig.json similarity index 100% rename from web-bluetooth/tsconfig.json rename to types/web-bluetooth/tsconfig.json diff --git a/web-bluetooth/web-bluetooth-tests.ts b/types/web-bluetooth/web-bluetooth-tests.ts similarity index 100% rename from web-bluetooth/web-bluetooth-tests.ts rename to types/web-bluetooth/web-bluetooth-tests.ts diff --git a/webappsec-credential-management/index.d.ts b/types/webappsec-credential-management/index.d.ts similarity index 100% rename from webappsec-credential-management/index.d.ts rename to types/webappsec-credential-management/index.d.ts diff --git a/webappsec-credential-management/tsconfig.json b/types/webappsec-credential-management/tsconfig.json similarity index 100% rename from webappsec-credential-management/tsconfig.json rename to types/webappsec-credential-management/tsconfig.json diff --git a/webpack-stream/tslint.json b/types/webappsec-credential-management/tslint.json similarity index 100% rename from webpack-stream/tslint.json rename to types/webappsec-credential-management/tslint.json diff --git a/webappsec-credential-management/webappsec-credential-management-tests.ts b/types/webappsec-credential-management/webappsec-credential-management-tests.ts similarity index 100% rename from webappsec-credential-management/webappsec-credential-management-tests.ts rename to types/webappsec-credential-management/webappsec-credential-management-tests.ts diff --git a/webcl/index.d.ts b/types/webcl/index.d.ts similarity index 100% rename from webcl/index.d.ts rename to types/webcl/index.d.ts diff --git a/webcl/tsconfig.json b/types/webcl/tsconfig.json similarity index 100% rename from webcl/tsconfig.json rename to types/webcl/tsconfig.json diff --git a/webcl/webcl-tests.ts b/types/webcl/webcl-tests.ts similarity index 100% rename from webcl/webcl-tests.ts rename to types/webcl/webcl-tests.ts diff --git a/webcola/index.d.ts b/types/webcola/index.d.ts similarity index 100% rename from webcola/index.d.ts rename to types/webcola/index.d.ts diff --git a/webcola/tsconfig.json b/types/webcola/tsconfig.json similarity index 100% rename from webcola/tsconfig.json rename to types/webcola/tsconfig.json diff --git a/webcomponents.js/index.d.ts b/types/webcomponents.js/index.d.ts similarity index 100% rename from webcomponents.js/index.d.ts rename to types/webcomponents.js/index.d.ts diff --git a/webcomponents.js/tsconfig.json b/types/webcomponents.js/tsconfig.json similarity index 100% rename from webcomponents.js/tsconfig.json rename to types/webcomponents.js/tsconfig.json diff --git a/webcomponents.js/webcomponents.js-tests.ts b/types/webcomponents.js/webcomponents.js-tests.ts similarity index 100% rename from webcomponents.js/webcomponents.js-tests.ts rename to types/webcomponents.js/webcomponents.js-tests.ts diff --git a/webcrypto/index.d.ts b/types/webcrypto/index.d.ts similarity index 100% rename from webcrypto/index.d.ts rename to types/webcrypto/index.d.ts diff --git a/webcrypto/tsconfig.json b/types/webcrypto/tsconfig.json similarity index 100% rename from webcrypto/tsconfig.json rename to types/webcrypto/tsconfig.json diff --git a/webdriverio/index.d.ts b/types/webdriverio/index.d.ts similarity index 100% rename from webdriverio/index.d.ts rename to types/webdriverio/index.d.ts diff --git a/webdriverio/tsconfig.json b/types/webdriverio/tsconfig.json similarity index 100% rename from webdriverio/tsconfig.json rename to types/webdriverio/tsconfig.json diff --git a/webdriverio/webdriverio-tests.ts b/types/webdriverio/webdriverio-tests.ts similarity index 100% rename from webdriverio/webdriverio-tests.ts rename to types/webdriverio/webdriverio-tests.ts diff --git a/webfontloader/index.d.ts b/types/webfontloader/index.d.ts similarity index 100% rename from webfontloader/index.d.ts rename to types/webfontloader/index.d.ts diff --git a/webfontloader/tsconfig.json b/types/webfontloader/tsconfig.json similarity index 100% rename from webfontloader/tsconfig.json rename to types/webfontloader/tsconfig.json diff --git a/webfontloader/webfontloader-tests.ts b/types/webfontloader/webfontloader-tests.ts similarity index 100% rename from webfontloader/webfontloader-tests.ts rename to types/webfontloader/webfontloader-tests.ts diff --git a/webgl-ext/index.d.ts b/types/webgl-ext/index.d.ts similarity index 95% rename from webgl-ext/index.d.ts rename to types/webgl-ext/index.d.ts index 44b7565b42..56a26e3327 100644 --- a/webgl-ext/index.d.ts +++ b/types/webgl-ext/index.d.ts @@ -118,10 +118,10 @@ interface WebGLVertexArrayObjectOES extends WebGLObject { interface OESVertexArrayObject { VERTEX_ARRAY_BINDING_OES: number; - createVertexArrayOES(): WebGLVertexArrayObjectOES; - deleteVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES): void; - isVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES): boolean; - bindVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES): void; + createVertexArrayOES(): WebGLVertexArrayObjectOES | null; + deleteVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void; + isVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): boolean; + bindVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void; } interface WebGLColorBufferFloat { diff --git a/webgl-ext/tsconfig.json b/types/webgl-ext/tsconfig.json similarity index 100% rename from webgl-ext/tsconfig.json rename to types/webgl-ext/tsconfig.json diff --git a/webgl-ext/webgl-ext-tests.ts b/types/webgl-ext/webgl-ext-tests.ts similarity index 100% rename from webgl-ext/webgl-ext-tests.ts rename to types/webgl-ext/webgl-ext-tests.ts diff --git a/types/webgl2/index.d.ts b/types/webgl2/index.d.ts new file mode 100644 index 0000000000..22d1773f1c --- /dev/null +++ b/types/webgl2/index.d.ts @@ -0,0 +1,1176 @@ +// Type definitions for WebGL 2, Editor's Draft Fri Feb 24 16:10:18 2017 -0800 +// Project: https://www.khronos.org/registry/webgl/specs/latest/2.0/ +// Definitions by: Nico Kemnitz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface HTMLCanvasElement extends HTMLElement { + getContext(contextId: "webgl2" | "experimental-webgl2", contextAttributes?: WebGLContextAttributes): WebGL2RenderingContext | null; +} + +interface ImageBitmap { + readonly width: number; + readonly height: number; + close(): void; +} + +interface WebGL2RenderingContext extends WebGLRenderingContext { + readonly READ_BUFFER: number; // 0x0C02 + readonly UNPACK_ROW_LENGTH: number; // 0x0CF2 + readonly UNPACK_SKIP_ROWS: number; // 0x0CF3 + readonly UNPACK_SKIP_PIXELS: number; // 0x0CF4 + readonly PACK_ROW_LENGTH: number; // 0x0D02 + readonly PACK_SKIP_ROWS: number; // 0x0D03 + readonly PACK_SKIP_PIXELS: number; // 0x0D04 + readonly COLOR: number; // 0x1800 + readonly DEPTH: number; // 0x1801 + readonly STENCIL: number; // 0x1802 + readonly RED: number; // 0x1903 + readonly RGB8: number; // 0x8051 + readonly RGBA8: number; // 0x8058 + readonly RGB10_A2: number; // 0x8059 + readonly TEXTURE_BINDING_3D: number; // 0x806A + readonly UNPACK_SKIP_IMAGES: number; // 0x806D + readonly UNPACK_IMAGE_HEIGHT: number; // 0x806E + readonly TEXTURE_3D: number; // 0x806F + readonly TEXTURE_WRAP_R: number; // 0x8072 + readonly MAX_3D_TEXTURE_SIZE: number; // 0x8073 + readonly UNSIGNED_INT_2_10_10_10_REV: number; // 0x8368 + readonly MAX_ELEMENTS_VERTICES: number; // 0x80E8 + readonly MAX_ELEMENTS_INDICES: number; // 0x80E9 + readonly TEXTURE_MIN_LOD: number; // 0x813A + readonly TEXTURE_MAX_LOD: number; // 0x813B + readonly TEXTURE_BASE_LEVEL: number; // 0x813C + readonly TEXTURE_MAX_LEVEL: number; // 0x813D + readonly MIN: number; // 0x8007 + readonly MAX: number; // 0x8008 + readonly DEPTH_COMPONENT24: number; // 0x81A6 + readonly MAX_TEXTURE_LOD_BIAS: number; // 0x84FD + readonly TEXTURE_COMPARE_MODE: number; // 0x884C + readonly TEXTURE_COMPARE_FUNC: number; // 0x884D + readonly CURRENT_QUERY: number; // 0x8865 + readonly QUERY_RESULT: number; // 0x8866 + readonly QUERY_RESULT_AVAILABLE: number; // 0x8867 + readonly STREAM_READ: number; // 0x88E1 + readonly STREAM_COPY: number; // 0x88E2 + readonly STATIC_READ: number; // 0x88E5 + readonly STATIC_COPY: number; // 0x88E6 + readonly DYNAMIC_READ: number; // 0x88E9 + readonly DYNAMIC_COPY: number; // 0x88EA + readonly MAX_DRAW_BUFFERS: number; // 0x8824 + readonly DRAW_BUFFER0: number; // 0x8825 + readonly DRAW_BUFFER1: number; // 0x8826 + readonly DRAW_BUFFER2: number; // 0x8827 + readonly DRAW_BUFFER3: number; // 0x8828 + readonly DRAW_BUFFER4: number; // 0x8829 + readonly DRAW_BUFFER5: number; // 0x882A + readonly DRAW_BUFFER6: number; // 0x882B + readonly DRAW_BUFFER7: number; // 0x882C + readonly DRAW_BUFFER8: number; // 0x882D + readonly DRAW_BUFFER9: number; // 0x882E + readonly DRAW_BUFFER10: number; // 0x882F + readonly DRAW_BUFFER11: number; // 0x8830 + readonly DRAW_BUFFER12: number; // 0x8831 + readonly DRAW_BUFFER13: number; // 0x8832 + readonly DRAW_BUFFER14: number; // 0x8833 + readonly DRAW_BUFFER15: number; // 0x8834 + readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: number; // 0x8B49 + readonly MAX_VERTEX_UNIFORM_COMPONENTS: number; // 0x8B4A + readonly SAMPLER_3D: number; // 0x8B5F + readonly SAMPLER_2D_SHADOW: number; // 0x8B62 + readonly FRAGMENT_SHADER_DERIVATIVE_HINT: number; // 0x8B8B + readonly PIXEL_PACK_BUFFER: number; // 0x88EB + readonly PIXEL_UNPACK_BUFFER: number; // 0x88EC + readonly PIXEL_PACK_BUFFER_BINDING: number; // 0x88ED + readonly PIXEL_UNPACK_BUFFER_BINDING: number; // 0x88EF + readonly FLOAT_MAT2x3: number; // 0x8B65 + readonly FLOAT_MAT2x4: number; // 0x8B66 + readonly FLOAT_MAT3x2: number; // 0x8B67 + readonly FLOAT_MAT3x4: number; // 0x8B68 + readonly FLOAT_MAT4x2: number; // 0x8B69 + readonly FLOAT_MAT4x3: number; // 0x8B6A + readonly SRGB: number; // 0x8C40 + readonly SRGB8: number; // 0x8C41 + readonly SRGB8_ALPHA8: number; // 0x8C43 + readonly COMPARE_REF_TO_TEXTURE: number; // 0x884E + readonly RGBA32F: number; // 0x8814 + readonly RGB32F: number; // 0x8815 + readonly RGBA16F: number; // 0x881A + readonly RGB16F: number; // 0x881B + readonly VERTEX_ATTRIB_ARRAY_INTEGER: number; // 0x88FD + readonly MAX_ARRAY_TEXTURE_LAYERS: number; // 0x88FF + readonly MIN_PROGRAM_TEXEL_OFFSET: number; // 0x8904 + readonly MAX_PROGRAM_TEXEL_OFFSET: number; // 0x8905 + readonly MAX_VARYING_COMPONENTS: number; // 0x8B4B + readonly TEXTURE_2D_ARRAY: number; // 0x8C1A + readonly TEXTURE_BINDING_2D_ARRAY: number; // 0x8C1D + readonly R11F_G11F_B10F: number; // 0x8C3A + readonly UNSIGNED_INT_10F_11F_11F_REV: number; // 0x8C3B + readonly RGB9_E5: number; // 0x8C3D + readonly UNSIGNED_INT_5_9_9_9_REV: number; // 0x8C3E + readonly TRANSFORM_FEEDBACK_BUFFER_MODE: number; // 0x8C7F + readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: number; // 0x8C80 + readonly TRANSFORM_FEEDBACK_VARYINGS: number; // 0x8C83 + readonly TRANSFORM_FEEDBACK_BUFFER_START: number; // 0x8C84 + readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: number; // 0x8C85 + readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: number; // 0x8C88 + readonly RASTERIZER_DISCARD: number; // 0x8C89 + readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: number; // 0x8C8A + readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: number; // 0x8C8B + readonly INTERLEAVED_ATTRIBS: number; // 0x8C8C + readonly SEPARATE_ATTRIBS: number; // 0x8C8D + readonly TRANSFORM_FEEDBACK_BUFFER: number; // 0x8C8E + readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: number; // 0x8C8F + readonly RGBA32UI: number; // 0x8D70 + readonly RGB32UI: number; // 0x8D71 + readonly RGBA16UI: number; // 0x8D76 + readonly RGB16UI: number; // 0x8D77 + readonly RGBA8UI: number; // 0x8D7C + readonly RGB8UI: number; // 0x8D7D + readonly RGBA32I: number; // 0x8D82 + readonly RGB32I: number; // 0x8D83 + readonly RGBA16I: number; // 0x8D88 + readonly RGB16I: number; // 0x8D89 + readonly RGBA8I: number; // 0x8D8E + readonly RGB8I: number; // 0x8D8F + readonly RED_INTEGER: number; // 0x8D94 + readonly RGB_INTEGER: number; // 0x8D98 + readonly RGBA_INTEGER: number; // 0x8D99 + readonly SAMPLER_2D_ARRAY: number; // 0x8DC1 + readonly SAMPLER_2D_ARRAY_SHADOW: number; // 0x8DC4 + readonly SAMPLER_CUBE_SHADOW: number; // 0x8DC5 + readonly UNSIGNED_INT_VEC2: number; // 0x8DC6 + readonly UNSIGNED_INT_VEC3: number; // 0x8DC7 + readonly UNSIGNED_INT_VEC4: number; // 0x8DC8 + readonly INT_SAMPLER_2D: number; // 0x8DCA + readonly INT_SAMPLER_3D: number; // 0x8DCB + readonly INT_SAMPLER_CUBE: number; // 0x8DCC + readonly INT_SAMPLER_2D_ARRAY: number; // 0x8DCF + readonly UNSIGNED_INT_SAMPLER_2D: number; // 0x8DD2 + readonly UNSIGNED_INT_SAMPLER_3D: number; // 0x8DD3 + readonly UNSIGNED_INT_SAMPLER_CUBE: number; // 0x8DD4 + readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: number; // 0x8DD7 + readonly DEPTH_COMPONENT32F: number; // 0x8CAC + readonly DEPTH32F_STENCIL8: number; // 0x8CAD + readonly FLOAT_32_UNSIGNED_INT_24_8_REV: number; // 0x8DAD + readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: number; // 0x8210 + readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: number; // 0x8211 + readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: number; // 0x8212 + readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: number; // 0x8213 + readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: number; // 0x8214 + readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: number; // 0x8215 + readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: number; // 0x8216 + readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: number; // 0x8217 + readonly FRAMEBUFFER_DEFAULT: number; // 0x8218 + //readonly DEPTH_STENCIL_ATTACHMENT: number; // 0x821A /* Already defined in WebGL1 constants */ + //readonly DEPTH_STENCIL: number; // 0x84F9 /* Already defined in WebGL1 constants */ + readonly UNSIGNED_INT_24_8: number; // 0x84FA + readonly DEPTH24_STENCIL8: number; // 0x88F0 + readonly UNSIGNED_NORMALIZED: number; // 0x8C17 + readonly DRAW_FRAMEBUFFER_BINDING: number; // 0x8CA6 /* Same as FRAMEBUFFER_BINDING */ + readonly READ_FRAMEBUFFER: number; // 0x8CA8 + readonly DRAW_FRAMEBUFFER: number; // 0x8CA9 + readonly READ_FRAMEBUFFER_BINDING: number; // 0x8CAA + readonly RENDERBUFFER_SAMPLES: number; // 0x8CAB + readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: number; // 0x8CD4 + readonly MAX_COLOR_ATTACHMENTS: number; // 0x8CDF + readonly COLOR_ATTACHMENT1: number; // 0x8CE1 + readonly COLOR_ATTACHMENT2: number; // 0x8CE2 + readonly COLOR_ATTACHMENT3: number; // 0x8CE3 + readonly COLOR_ATTACHMENT4: number; // 0x8CE4 + readonly COLOR_ATTACHMENT5: number; // 0x8CE5 + readonly COLOR_ATTACHMENT6: number; // 0x8CE6 + readonly COLOR_ATTACHMENT7: number; // 0x8CE7 + readonly COLOR_ATTACHMENT8: number; // 0x8CE8 + readonly COLOR_ATTACHMENT9: number; // 0x8CE9 + readonly COLOR_ATTACHMENT10: number; // 0x8CEA + readonly COLOR_ATTACHMENT11: number; // 0x8CEB + readonly COLOR_ATTACHMENT12: number; // 0x8CEC + readonly COLOR_ATTACHMENT13: number; // 0x8CED + readonly COLOR_ATTACHMENT14: number; // 0x8CEE + readonly COLOR_ATTACHMENT15: number; // 0x8CEF + readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: number; // 0x8D56 + readonly MAX_SAMPLES: number; // 0x8D57 + readonly HALF_FLOAT: number; // 0x140B + readonly RG: number; // 0x8227 + readonly RG_INTEGER: number; // 0x8228 + readonly R8: number; // 0x8229 + readonly RG8: number; // 0x822B + readonly R16F: number; // 0x822D + readonly R32F: number; // 0x822E + readonly RG16F: number; // 0x822F + readonly RG32F: number; // 0x8230 + readonly R8I: number; // 0x8231 + readonly R8UI: number; // 0x8232 + readonly R16I: number; // 0x8233 + readonly R16UI: number; // 0x8234 + readonly R32I: number; // 0x8235 + readonly R32UI: number; // 0x8236 + readonly RG8I: number; // 0x8237 + readonly RG8UI: number; // 0x8238 + readonly RG16I: number; // 0x8239 + readonly RG16UI: number; // 0x823A + readonly RG32I: number; // 0x823B + readonly RG32UI: number; // 0x823C + readonly VERTEX_ARRAY_BINDING: number; // 0x85B5 + readonly R8_SNORM: number; // 0x8F94 + readonly RG8_SNORM: number; // 0x8F95 + readonly RGB8_SNORM: number; // 0x8F96 + readonly RGBA8_SNORM: number; // 0x8F97 + readonly SIGNED_NORMALIZED: number; // 0x8F9C + readonly COPY_READ_BUFFER: number; // 0x8F36 + readonly COPY_WRITE_BUFFER: number; // 0x8F37 + readonly COPY_READ_BUFFER_BINDING: number; // 0x8F36 /* Same as COPY_READ_BUFFER */ + readonly COPY_WRITE_BUFFER_BINDING: number; // 0x8F37 /* Same as COPY_WRITE_BUFFER */ + readonly UNIFORM_BUFFER: number; // 0x8A11 + readonly UNIFORM_BUFFER_BINDING: number; // 0x8A28 + readonly UNIFORM_BUFFER_START: number; // 0x8A29 + readonly UNIFORM_BUFFER_SIZE: number; // 0x8A2A + readonly MAX_VERTEX_UNIFORM_BLOCKS: number; // 0x8A2B + readonly MAX_FRAGMENT_UNIFORM_BLOCKS: number; // 0x8A2D + readonly MAX_COMBINED_UNIFORM_BLOCKS: number; // 0x8A2E + readonly MAX_UNIFORM_BUFFER_BINDINGS: number; // 0x8A2F + readonly MAX_UNIFORM_BLOCK_SIZE: number; // 0x8A30 + readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: number; // 0x8A31 + readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: number; // 0x8A33 + readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: number; // 0x8A34 + readonly ACTIVE_UNIFORM_BLOCKS: number; // 0x8A36 + readonly UNIFORM_TYPE: number; // 0x8A37 + readonly UNIFORM_SIZE: number; // 0x8A38 + readonly UNIFORM_BLOCK_INDEX: number; // 0x8A3A + readonly UNIFORM_OFFSET: number; // 0x8A3B + readonly UNIFORM_ARRAY_STRIDE: number; // 0x8A3C + readonly UNIFORM_MATRIX_STRIDE: number; // 0x8A3D + readonly UNIFORM_IS_ROW_MAJOR: number; // 0x8A3E + readonly UNIFORM_BLOCK_BINDING: number; // 0x8A3F + readonly UNIFORM_BLOCK_DATA_SIZE: number; // 0x8A40 + readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: number; // 0x8A42 + readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: number; // 0x8A43 + readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: number; // 0x8A44 + readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: number; // 0x8A46 + readonly INVALID_INDEX: number; // 0xFFFFFFFF + readonly MAX_VERTEX_OUTPUT_COMPONENTS: number; // 0x9122 + readonly MAX_FRAGMENT_INPUT_COMPONENTS: number; // 0x9125 + readonly MAX_SERVER_WAIT_TIMEOUT: number; // 0x9111 + readonly OBJECT_TYPE: number; // 0x9112 + readonly SYNC_CONDITION: number; // 0x9113 + readonly SYNC_STATUS: number; // 0x9114 + readonly SYNC_FLAGS: number; // 0x9115 + readonly SYNC_FENCE: number; // 0x9116 + readonly SYNC_GPU_COMMANDS_COMPLETE: number; // 0x9117 + readonly UNSIGNALED: number; // 0x9118 + readonly SIGNALED: number; // 0x9119 + readonly ALREADY_SIGNALED: number; // 0x911A + readonly TIMEOUT_EXPIRED: number; // 0x911B + readonly CONDITION_SATISFIED: number; // 0x911C + readonly WAIT_FAILED: number; // 0x911D + readonly SYNC_FLUSH_COMMANDS_BIT: number; // 0x00000001 + readonly VERTEX_ATTRIB_ARRAY_DIVISOR: number; // 0x88FE + readonly ANY_SAMPLES_PASSED: number; // 0x8C2F + readonly ANY_SAMPLES_PASSED_CONSERVATIVE: number; // 0x8D6A + readonly SAMPLER_BINDING: number; // 0x8919 + readonly RGB10_A2UI: number; // 0x906F + readonly INT_2_10_10_10_REV: number; // 0x8D9F + readonly TRANSFORM_FEEDBACK: number; // 0x8E22 + readonly TRANSFORM_FEEDBACK_PAUSED: number; // 0x8E23 + readonly TRANSFORM_FEEDBACK_ACTIVE: number; // 0x8E24 + readonly TRANSFORM_FEEDBACK_BINDING: number; // 0x8E25 + readonly TEXTURE_IMMUTABLE_FORMAT: number; // 0x912F + readonly MAX_ELEMENT_INDEX: number; // 0x8D6B + readonly TEXTURE_IMMUTABLE_LEVELS: number; // 0x82DF + + readonly TIMEOUT_IGNORED: number; // -1 + + /* WebGL-specific enums */ + readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: number; // 0x9247 + + + /* Buffer objects */ + // WebGL1: + bufferData(target: number, size: number, usage: number): void; + bufferData(target: number, srcData: ArrayBuffer | ArrayBufferView | null, usage: number): void; + bufferSubData(target: number, dstByteOffset: number, srcData: ArrayBuffer | ArrayBufferView): void; + // WebGL2: + bufferData(target: number, srcData: ArrayBufferView, usage: number, srcOffset: number, + length?: number): void; + bufferSubData(target: number, dstByteOffset: number, srcData: ArrayBufferView, + srcOffset: number, length?: number): void; + + copyBufferSubData(readTarget: number, writeTarget: number, readOffset: number, + writeOffset: number, size: number): void; + // MapBufferRange, in particular its read-only and write-only modes, + // can not be exposed safely to JavaScript. GetBufferSubData + // replaces it for the purpose of fetching data back from the GPU. + getBufferSubData(target: number, srcByteOffset: number, dstBuffer: ArrayBufferView, + dstOffset?: number, length?: number): void; + + /* Framebuffer objects */ + blitFramebuffer(srcX0: number, srcY0: number, srcX1: number, srcY1: number, dstX0: number, dstY0: number, + dstX1: number, dstY1: number, mask: number, filter: number): void; + framebufferTextureLayer(target: number, attachment: number, texture: WebGLTexture | null, level: number, + layer: number): void; + invalidateFramebuffer(target: number, attachments: number[]): void; + invalidateSubFramebuffer(target: number, attachments: number[], + x: number, y: number, width: number, height: number): void; + readBuffer(src: number): void; + + /* Renderbuffer objects */ + getInternalformatParameter(target: number, internalformat: number, pname: number): any; + renderbufferStorageMultisample(target: number, samples: number, internalformat: number, + width: number, height: number): void; + + /* Texture objects */ + texStorage2D(target: number, levels: number, internalformat: number, width: number, + height: number): void; + texStorage3D(target: number, levels: number, internalformat: number, width: number, + height: number, depth: number): void; + + // WebGL1 legacy entrypoints: + texImage2D(target: number, level: number, internalformat: number, + width: number, height: number, border: number, format: number, + type: number, pixels?: ArrayBufferView): void; + texImage2D(target: number, level: number, internalformat: number, + format: number, type: number, source: ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement): void; // May throw DOMException + texImage2D(target: number, level: number, internalformat: number, + format: number, type: number, source: ImageBitmap | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement): void; // May throw DOMException + + texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, + width: number, height: number, + format: number, type: number, pixels?: ArrayBufferView): void; + texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, + format: number, type: number, source: ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement): void; // May throw DOMException + texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, + format: number, type: number, source: ImageBitmap | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement): void; // May throw DOMException + + // WebGL2 entrypoints: + texImage2D(target: number, level: number, internalformat: number, width: number, height: number, + border: number, format: number, type: number, pboOffset: number): void; + texImage2D(target: number, level: number, internalformat: number, width: number, height: number, + border: number, format: number, type: number, + source: ImageBitmap | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement): void; // May throw DOMException + texImage2D(target: number, level: number, internalformat: number, width: number, height: number, + border: number, format: number, type: number, srcData: ArrayBufferView, + srcOffset: number): void; + + texImage3D(target: number, level: number, internalformat: number, width: number, height: number, + depth: number, border: number, format: number, type: number, pboOffset: number): void; + texImage3D(target: number, level: number, internalformat: number, width: number, height: number, + depth: number, border: number, format: number, type: number, + source: ImageBitmap | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement): void; // May throw DOMException + texImage3D(target: number, level: number, internalformat: number, width: number, height: number, + depth: number, border: number, format: number, type: number, srcData: ArrayBufferView | null): void; + texImage3D(target: number, level: number, internalformat: number, width: number, height: number, + depth: number, border: number, format: number, type: number, srcData: ArrayBufferView, + srcOffset: number): void; + + texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, + height: number, format: number, type: number, pboOffset: number): void; + texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, + height: number, format: number, type: number, + source: ImageBitmap | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement): void; // May throw DOMException + texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, + height: number, format: number, type: number, srcData: ArrayBufferView, + srcOffset: number): void; + + texSubImage3D(target: number, level: number, xoffset: number, yoffset: number, zoffset: number, + width: number, height: number, depth: number, format: number, type: number, + pboOffset: number): void; + texSubImage3D(target: number, level: number, xoffset: number, yoffset: number, zoffset: number, + width: number, height: number, depth: number, format: number, type: number, + source: ImageBitmap | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement): void; // May throw DOMException + texSubImage3D(target: number, level: number, xoffset: number, yoffset: number, zoffset: number, + width: number, height: number, depth: number, format: number, type: number, + srcData: ArrayBufferView | null, srcOffset?: number): void; + + copyTexSubImage3D(target: number, level: number, xoffset: number, yoffset: number, zoffset: number, + x: number, y: number, width: number, height: number): void; + + compressedTexImage2D(target: number, level: number, internalformat: number, width: number, + height: number, border: number, imageSize: number, offset: number): void; + compressedTexImage2D(target: number, level: number, internalformat: number, width: number, + height: number, border: number, srcData: ArrayBufferView, + srcOffset?: number, srcLengthOverride?: number): void; + + compressedTexImage3D(target: number, level: number, internalformat: number, width: number, + height: number, depth: number, border: number, imageSize: number, offset: number): void; + compressedTexImage3D(target: number, level: number, internalformat: number, width: number, + height: number, depth: number, border: number, srcData: ArrayBufferView, + srcOffset?: number, srcLengthOverride?: number): void; + + compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, + width: number, height: number, format: number, imageSize: number, offset: number): void; + compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, + width: number, height: number, format: number, + srcData: ArrayBufferView, + srcOffset?: number, + srcLengthOverride?: number): void; + + compressedTexSubImage3D(target: number, level: number, xoffset: number, yoffset: number, + zoffset: number, width: number, height: number, depth: number, + format: number, imageSize: number, offset: number): void; + compressedTexSubImage3D(target: number, level: number, xoffset: number, yoffset: number, + zoffset: number, width: number, height: number, depth: number, + format: number, srcData: ArrayBufferView, + srcOffset?: number, + srcLengthOverride?: number): void; + + /* Programs and shaders */ + getFragDataLocation(program: WebGLProgram, name: string): number; + + /* Uniforms */ + uniform1ui(location: WebGLUniformLocation | null, v0: number): void; + uniform2ui(location: WebGLUniformLocation | null, v0: number, v1: number): void; + uniform3ui(location: WebGLUniformLocation | null, v0: number, v1: number, v2: number): void; + uniform4ui(location: WebGLUniformLocation | null, v0: number, v1: number, v2: number, v3: number): void; + + uniform1fv(location: WebGLUniformLocation | null, data: Float32Array | number[], srcOffset?: number, + srcLength?: number): void; + uniform2fv(location: WebGLUniformLocation | null, data: Float32Array | number[], srcOffset?: number, + srcLength?: number): void; + uniform3fv(location: WebGLUniformLocation | null, data: Float32Array | number[], srcOffset?: number, + srcLength?: number): void; + uniform4fv(location: WebGLUniformLocation | null, data: Float32Array | number[], srcOffset?: number, + srcLength?: number): void; + + uniform1iv(location: WebGLUniformLocation | null, data: Int32Array | number[], srcOffset?: number, + srcLength?: number): void; + uniform2iv(location: WebGLUniformLocation | null, data: Int32Array | number[], srcOffset?: number, + srcLength?: number): void; + uniform3iv(location: WebGLUniformLocation | null, data: Int32Array | number[], srcOffset?: number, + srcLength?: number): void; + uniform4iv(location: WebGLUniformLocation | null, data: Int32Array | number[], srcOffset?: number, + srcLength?: number): void; + + uniform1uiv(location: WebGLUniformLocation | null, data: Uint32Array | number[], srcOffset?: number, + srcLength?: number): void; + uniform2uiv(location: WebGLUniformLocation | null, data: Uint32Array | number[], srcOffset?: number, + srcLength?: number): void; + uniform3uiv(location: WebGLUniformLocation | null, data: Uint32Array | number[], srcOffset?: number, + srcLength?: number): void; + uniform4uiv(location: WebGLUniformLocation | null, data: Uint32Array | number[], srcOffset?: number, + srcLength?: number): void; + + uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: boolean, data: Float32Array | number[], + srcOffset?: number, srcLength?: number): void; + uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: boolean, data: Float32Array | number[], + srcOffset?: number, srcLength?: number): void; + uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: boolean, data: Float32Array | number[], + srcOffset?: number, srcLength?: number): void; + + uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: boolean, data: Float32Array | number[], + srcOffset?: number, srcLength?: number): void; + uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: boolean, data: Float32Array | number[], + srcOffset?: number, srcLength?: number): void; + uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: boolean, data: Float32Array | number[], + srcOffset?: number, srcLength?: number): void; + + uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: boolean, data: Float32Array | number[], + srcOffset?: number, srcLength?: number): void; + uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: boolean, data: Float32Array | number[], + srcOffset?: number, srcLength?: number): void; + uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: boolean, data: Float32Array | number[], + srcOffset?: number, srcLength?: number): void; + + /* Vertex attribs */ + vertexAttribI4i(index: number, x: number, y: number, z: number, w: number): void; + vertexAttribI4iv(index: number, values: Int32Array | number[]): void; + vertexAttribI4ui(index: number, x: number, y: number, z: number, w: number): void; + vertexAttribI4uiv(index: number, values: Uint32Array | number[]): void; + vertexAttribIPointer(index: number, size: number, type: number, stride: number, offset: number): void; + + /* Writing to the drawing buffer */ + vertexAttribDivisor(index: number, divisor: number): void; + drawArraysInstanced(mode: number, first: number, count: number, instanceCount: number): void; + drawElementsInstanced(mode: number, count: number, type: number, offset: number, instanceCount: number): void; + drawRangeElements(mode: number, start: number, end: number, count: number, type: number, offset: number): void; + + /* Reading back pixels */ + // WebGL1: + readPixels(x: number, y: number, width: number, height: number, format: number, type: number, + dstData: ArrayBufferView | null): void; + // WebGL2: + readPixels(x: number, y: number, width: number, height: number, format: number, type: number, + offset: number): void; + readPixels(x: number, y: number, width: number, height: number, format: number, type: number, + dstData: ArrayBufferView, dstOffset: number): void; + + /* Multiple Render Targets */ + drawBuffers(buffers: number[]): void; + + clearBufferfv(buffer: number, drawbuffer: number, values: Float32Array | number[], + srcOffset?: number): void; + clearBufferiv(buffer: number, drawbuffer: number, values: Int32Array | number[], + srcOffset?: number): void; + clearBufferuiv(buffer: number, drawbuffer: number, values: Uint32Array | number[], + srcOffset?: number): void; + + clearBufferfi(buffer: number, drawbuffer: number, depth: number, stencil: number): void; + + /* Query Objects */ + createQuery(): WebGLQuery | null; + deleteQuery(query: WebGLQuery | null): void; + isQuery(query: WebGLQuery | null): boolean; //[WebGLHandlesContextLoss] + beginQuery(target: number, query: WebGLQuery): void; + endQuery(target: number): void; + getQuery(target: number, pname: number): WebGLQuery | null; + getQueryParameter(query: WebGLQuery, pname: number): any; + + /* Sampler Objects */ + createSampler(): WebGLSampler | null; + deleteSampler(sampler: WebGLSampler | null): void; + isSampler(sampler: WebGLSampler | null): boolean; //[WebGLHandlesContextLoss] + bindSampler(unit: number, sampler: WebGLSampler | null): void; + samplerParameteri(sampler: WebGLSampler, pname: number, param: number): void; + samplerParameterf(sampler: WebGLSampler, pname: number, param: number): void; + getSamplerParameter(sampler: WebGLSampler, pname: number): any; + + /* Sync objects */ + fenceSync(condition: number, flags: number): WebGLSync | null; + isSync(sync: WebGLSync | null): boolean; //[WebGLHandlesContextLoss] + deleteSync(sync: WebGLSync | null): void; + clientWaitSync(sync: WebGLSync, flags: number, timeout: number): number; + waitSync(sync: WebGLSync, flags: number, timeout: number): void; + getSyncParameter(sync: WebGLSync, pname: number): any; + + /* Transform Feedback */ + createTransformFeedback(): WebGLTransformFeedback | null; + deleteTransformFeedback(tf: WebGLTransformFeedback | null): void; + isTransformFeedback(tf: WebGLTransformFeedback | null): boolean; //[WebGLHandlesContextLoss] + bindTransformFeedback(target: number, tf: WebGLTransformFeedback | null): void; + beginTransformFeedback(primitiveMode: number): void; + endTransformFeedback(): void; + transformFeedbackVaryings(program: WebGLProgram, varyings: string[], bufferMode: number): void; + getTransformFeedbackVarying(program: WebGLProgram, index: number): WebGLActiveInfo | null; + pauseTransformFeedback(): void; + resumeTransformFeedback(): void; + + /* Uniform Buffer Objects and Transform Feedback Buffers */ + bindBufferBase(target: number, index: number, buffer: WebGLBuffer | null): void; + bindBufferRange(target: number, index: number, buffer: WebGLBuffer | null, offset: number, size: number): void; + getIndexedParameter(target: number, index: number): any; + getUniformIndices(program: WebGLProgram, uniformNames: string[]): number[] | null; + getActiveUniforms(program: WebGLProgram, uniformIndices: number[], pname: number): any; + getUniformBlockIndex(program: WebGLProgram, uniformBlockName: string): number; + getActiveUniformBlockParameter(program: WebGLProgram, uniformBlockIndex: number, pname: number): any; + getActiveUniformBlockName(program: WebGLProgram, uniformBlockIndex: number): string | null; + uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: number, uniformBlockBinding: number): void; + + /* Vertex Array Objects */ + createVertexArray(): WebGLVertexArrayObject | null; + deleteVertexArray(vertexArray: WebGLVertexArrayObject | null): void; + isVertexArray(vertexArray: WebGLVertexArrayObject | null): boolean; //[WebGLHandlesContextLoss] + bindVertexArray(array: WebGLVertexArrayObject | null): void; +} + +declare var WebGL2RenderingContext: { + prototype: WebGL2RenderingContext; + new (): WebGL2RenderingContext; + + /* WebGL1 constants */ + readonly ACTIVE_ATTRIBUTES: number; + readonly ACTIVE_TEXTURE: number; + readonly ACTIVE_UNIFORMS: number; + readonly ALIASED_LINE_WIDTH_RANGE: number; + readonly ALIASED_POINT_SIZE_RANGE: number; + readonly ALPHA: number; + readonly ALPHA_BITS: number; + readonly ALWAYS: number; + readonly ARRAY_BUFFER: number; + readonly ARRAY_BUFFER_BINDING: number; + readonly ATTACHED_SHADERS: number; + readonly BACK: number; + readonly BLEND: number; + readonly BLEND_COLOR: number; + readonly BLEND_DST_ALPHA: number; + readonly BLEND_DST_RGB: number; + readonly BLEND_EQUATION: number; + readonly BLEND_EQUATION_ALPHA: number; + readonly BLEND_EQUATION_RGB: number; + readonly BLEND_SRC_ALPHA: number; + readonly BLEND_SRC_RGB: number; + readonly BLUE_BITS: number; + readonly BOOL: number; + readonly BOOL_VEC2: number; + readonly BOOL_VEC3: number; + readonly BOOL_VEC4: number; + readonly BROWSER_DEFAULT_WEBGL: number; + readonly BUFFER_SIZE: number; + readonly BUFFER_USAGE: number; + readonly BYTE: number; + readonly CCW: number; + readonly CLAMP_TO_EDGE: number; + readonly COLOR_ATTACHMENT0: number; + readonly COLOR_BUFFER_BIT: number; + readonly COLOR_CLEAR_VALUE: number; + readonly COLOR_WRITEMASK: number; + readonly COMPILE_STATUS: number; + readonly COMPRESSED_TEXTURE_FORMATS: number; + readonly CONSTANT_ALPHA: number; + readonly CONSTANT_COLOR: number; + readonly CONTEXT_LOST_WEBGL: number; + readonly CULL_FACE: number; + readonly CULL_FACE_MODE: number; + readonly CURRENT_PROGRAM: number; + readonly CURRENT_VERTEX_ATTRIB: number; + readonly CW: number; + readonly DECR: number; + readonly DECR_WRAP: number; + readonly DELETE_STATUS: number; + readonly DEPTH_ATTACHMENT: number; + readonly DEPTH_BITS: number; + readonly DEPTH_BUFFER_BIT: number; + readonly DEPTH_CLEAR_VALUE: number; + readonly DEPTH_COMPONENT: number; + readonly DEPTH_COMPONENT16: number; + readonly DEPTH_FUNC: number; + readonly DEPTH_RANGE: number; + readonly DEPTH_STENCIL: number; + readonly DEPTH_STENCIL_ATTACHMENT: number; + readonly DEPTH_TEST: number; + readonly DEPTH_WRITEMASK: number; + readonly DITHER: number; + readonly DONT_CARE: number; + readonly DST_ALPHA: number; + readonly DST_COLOR: number; + readonly DYNAMIC_DRAW: number; + readonly ELEMENT_ARRAY_BUFFER: number; + readonly ELEMENT_ARRAY_BUFFER_BINDING: number; + readonly EQUAL: number; + readonly FASTEST: number; + readonly FLOAT: number; + readonly FLOAT_MAT2: number; + readonly FLOAT_MAT3: number; + readonly FLOAT_MAT4: number; + readonly FLOAT_VEC2: number; + readonly FLOAT_VEC3: number; + readonly FLOAT_VEC4: number; + readonly FRAGMENT_SHADER: number; + readonly FRAMEBUFFER: number; + readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number; + readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number; + readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number; + readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number; + readonly FRAMEBUFFER_BINDING: number; + readonly FRAMEBUFFER_COMPLETE: number; + readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number; + readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number; + readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number; + readonly FRAMEBUFFER_UNSUPPORTED: number; + readonly FRONT: number; + readonly FRONT_AND_BACK: number; + readonly FRONT_FACE: number; + readonly FUNC_ADD: number; + readonly FUNC_REVERSE_SUBTRACT: number; + readonly FUNC_SUBTRACT: number; + readonly GENERATE_MIPMAP_HINT: number; + readonly GEQUAL: number; + readonly GREATER: number; + readonly GREEN_BITS: number; + readonly HIGH_FLOAT: number; + readonly HIGH_INT: number; + readonly IMPLEMENTATION_COLOR_READ_FORMAT: number; + readonly IMPLEMENTATION_COLOR_READ_TYPE: number; + readonly INCR: number; + readonly INCR_WRAP: number; + readonly INT: number; + readonly INT_VEC2: number; + readonly INT_VEC3: number; + readonly INT_VEC4: number; + readonly INVALID_ENUM: number; + readonly INVALID_FRAMEBUFFER_OPERATION: number; + readonly INVALID_OPERATION: number; + readonly INVALID_VALUE: number; + readonly INVERT: number; + readonly KEEP: number; + readonly LEQUAL: number; + readonly LESS: number; + readonly LINEAR: number; + readonly LINEAR_MIPMAP_LINEAR: number; + readonly LINEAR_MIPMAP_NEAREST: number; + readonly LINES: number; + readonly LINE_LOOP: number; + readonly LINE_STRIP: number; + readonly LINE_WIDTH: number; + readonly LINK_STATUS: number; + readonly LOW_FLOAT: number; + readonly LOW_INT: number; + readonly LUMINANCE: number; + readonly LUMINANCE_ALPHA: number; + readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: number; + readonly MAX_CUBE_MAP_TEXTURE_SIZE: number; + readonly MAX_FRAGMENT_UNIFORM_VECTORS: number; + readonly MAX_RENDERBUFFER_SIZE: number; + readonly MAX_TEXTURE_IMAGE_UNITS: number; + readonly MAX_TEXTURE_SIZE: number; + readonly MAX_VARYING_VECTORS: number; + readonly MAX_VERTEX_ATTRIBS: number; + readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: number; + readonly MAX_VERTEX_UNIFORM_VECTORS: number; + readonly MAX_VIEWPORT_DIMS: number; + readonly MEDIUM_FLOAT: number; + readonly MEDIUM_INT: number; + readonly MIRRORED_REPEAT: number; + readonly NEAREST: number; + readonly NEAREST_MIPMAP_LINEAR: number; + readonly NEAREST_MIPMAP_NEAREST: number; + readonly NEVER: number; + readonly NICEST: number; + readonly NONE: number; + readonly NOTEQUAL: number; + readonly NO_ERROR: number; + readonly ONE: number; + readonly ONE_MINUS_CONSTANT_ALPHA: number; + readonly ONE_MINUS_CONSTANT_COLOR: number; + readonly ONE_MINUS_DST_ALPHA: number; + readonly ONE_MINUS_DST_COLOR: number; + readonly ONE_MINUS_SRC_ALPHA: number; + readonly ONE_MINUS_SRC_COLOR: number; + readonly OUT_OF_MEMORY: number; + readonly PACK_ALIGNMENT: number; + readonly POINTS: number; + readonly POLYGON_OFFSET_FACTOR: number; + readonly POLYGON_OFFSET_FILL: number; + readonly POLYGON_OFFSET_UNITS: number; + readonly RED_BITS: number; + readonly RENDERBUFFER: number; + readonly RENDERBUFFER_ALPHA_SIZE: number; + readonly RENDERBUFFER_BINDING: number; + readonly RENDERBUFFER_BLUE_SIZE: number; + readonly RENDERBUFFER_DEPTH_SIZE: number; + readonly RENDERBUFFER_GREEN_SIZE: number; + readonly RENDERBUFFER_HEIGHT: number; + readonly RENDERBUFFER_INTERNAL_FORMAT: number; + readonly RENDERBUFFER_RED_SIZE: number; + readonly RENDERBUFFER_STENCIL_SIZE: number; + readonly RENDERBUFFER_WIDTH: number; + readonly RENDERER: number; + readonly REPEAT: number; + readonly REPLACE: number; + readonly RGB: number; + readonly RGB565: number; + readonly RGB5_A1: number; + readonly RGBA: number; + readonly RGBA4: number; + readonly SAMPLER_2D: number; + readonly SAMPLER_CUBE: number; + readonly SAMPLES: number; + readonly SAMPLE_ALPHA_TO_COVERAGE: number; + readonly SAMPLE_BUFFERS: number; + readonly SAMPLE_COVERAGE: number; + readonly SAMPLE_COVERAGE_INVERT: number; + readonly SAMPLE_COVERAGE_VALUE: number; + readonly SCISSOR_BOX: number; + readonly SCISSOR_TEST: number; + readonly SHADER_TYPE: number; + readonly SHADING_LANGUAGE_VERSION: number; + readonly SHORT: number; + readonly SRC_ALPHA: number; + readonly SRC_ALPHA_SATURATE: number; + readonly SRC_COLOR: number; + readonly STATIC_DRAW: number; + readonly STENCIL_ATTACHMENT: number; + readonly STENCIL_BACK_FAIL: number; + readonly STENCIL_BACK_FUNC: number; + readonly STENCIL_BACK_PASS_DEPTH_FAIL: number; + readonly STENCIL_BACK_PASS_DEPTH_PASS: number; + readonly STENCIL_BACK_REF: number; + readonly STENCIL_BACK_VALUE_MASK: number; + readonly STENCIL_BACK_WRITEMASK: number; + readonly STENCIL_BITS: number; + readonly STENCIL_BUFFER_BIT: number; + readonly STENCIL_CLEAR_VALUE: number; + readonly STENCIL_FAIL: number; + readonly STENCIL_FUNC: number; + readonly STENCIL_INDEX: number; + readonly STENCIL_INDEX8: number; + readonly STENCIL_PASS_DEPTH_FAIL: number; + readonly STENCIL_PASS_DEPTH_PASS: number; + readonly STENCIL_REF: number; + readonly STENCIL_TEST: number; + readonly STENCIL_VALUE_MASK: number; + readonly STENCIL_WRITEMASK: number; + readonly STREAM_DRAW: number; + readonly SUBPIXEL_BITS: number; + readonly TEXTURE: number; + readonly TEXTURE0: number; + readonly TEXTURE1: number; + readonly TEXTURE10: number; + readonly TEXTURE11: number; + readonly TEXTURE12: number; + readonly TEXTURE13: number; + readonly TEXTURE14: number; + readonly TEXTURE15: number; + readonly TEXTURE16: number; + readonly TEXTURE17: number; + readonly TEXTURE18: number; + readonly TEXTURE19: number; + readonly TEXTURE2: number; + readonly TEXTURE20: number; + readonly TEXTURE21: number; + readonly TEXTURE22: number; + readonly TEXTURE23: number; + readonly TEXTURE24: number; + readonly TEXTURE25: number; + readonly TEXTURE26: number; + readonly TEXTURE27: number; + readonly TEXTURE28: number; + readonly TEXTURE29: number; + readonly TEXTURE3: number; + readonly TEXTURE30: number; + readonly TEXTURE31: number; + readonly TEXTURE4: number; + readonly TEXTURE5: number; + readonly TEXTURE6: number; + readonly TEXTURE7: number; + readonly TEXTURE8: number; + readonly TEXTURE9: number; + readonly TEXTURE_2D: number; + readonly TEXTURE_BINDING_2D: number; + readonly TEXTURE_BINDING_CUBE_MAP: number; + readonly TEXTURE_CUBE_MAP: number; + readonly TEXTURE_CUBE_MAP_NEGATIVE_X: number; + readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: number; + readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: number; + readonly TEXTURE_CUBE_MAP_POSITIVE_X: number; + readonly TEXTURE_CUBE_MAP_POSITIVE_Y: number; + readonly TEXTURE_CUBE_MAP_POSITIVE_Z: number; + readonly TEXTURE_MAG_FILTER: number; + readonly TEXTURE_MIN_FILTER: number; + readonly TEXTURE_WRAP_S: number; + readonly TEXTURE_WRAP_T: number; + readonly TRIANGLES: number; + readonly TRIANGLE_FAN: number; + readonly TRIANGLE_STRIP: number; + readonly UNPACK_ALIGNMENT: number; + readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number; + readonly UNPACK_FLIP_Y_WEBGL: number; + readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: number; + readonly UNSIGNED_BYTE: number; + readonly UNSIGNED_INT: number; + readonly UNSIGNED_SHORT: number; + readonly UNSIGNED_SHORT_4_4_4_4: number; + readonly UNSIGNED_SHORT_5_5_5_1: number; + readonly UNSIGNED_SHORT_5_6_5: number; + readonly VALIDATE_STATUS: number; + readonly VENDOR: number; + readonly VERSION: number; + readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number; + readonly VERTEX_ATTRIB_ARRAY_ENABLED: number; + readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: number; + readonly VERTEX_ATTRIB_ARRAY_POINTER: number; + readonly VERTEX_ATTRIB_ARRAY_SIZE: number; + readonly VERTEX_ATTRIB_ARRAY_STRIDE: number; + readonly VERTEX_ATTRIB_ARRAY_TYPE: number; + readonly VERTEX_SHADER: number; + readonly VIEWPORT: number; + readonly ZERO: number; + + /* WebGL2 constants */ + readonly READ_BUFFER: number; // 0x0C02 + readonly UNPACK_ROW_LENGTH: number; // 0x0CF2 + readonly UNPACK_SKIP_ROWS: number; // 0x0CF3 + readonly UNPACK_SKIP_PIXELS: number; // 0x0CF4 + readonly PACK_ROW_LENGTH: number; // 0x0D02 + readonly PACK_SKIP_ROWS: number; // 0x0D03 + readonly PACK_SKIP_PIXELS: number; // 0x0D04 + readonly COLOR: number; // 0x1800 + readonly DEPTH: number; // 0x1801 + readonly STENCIL: number; // 0x1802 + readonly RED: number; // 0x1903 + readonly RGB8: number; // 0x8051 + readonly RGBA8: number; // 0x8058 + readonly RGB10_A2: number; // 0x8059 + readonly TEXTURE_BINDING_3D: number; // 0x806A + readonly UNPACK_SKIP_IMAGES: number; // 0x806D + readonly UNPACK_IMAGE_HEIGHT: number; // 0x806E + readonly TEXTURE_3D: number; // 0x806F + readonly TEXTURE_WRAP_R: number; // 0x8072 + readonly MAX_3D_TEXTURE_SIZE: number; // 0x8073 + readonly UNSIGNED_INT_2_10_10_10_REV: number; // 0x8368 + readonly MAX_ELEMENTS_VERTICES: number; // 0x80E8 + readonly MAX_ELEMENTS_INDICES: number; // 0x80E9 + readonly TEXTURE_MIN_LOD: number; // 0x813A + readonly TEXTURE_MAX_LOD: number; // 0x813B + readonly TEXTURE_BASE_LEVEL: number; // 0x813C + readonly TEXTURE_MAX_LEVEL: number; // 0x813D + readonly MIN: number; // 0x8007 + readonly MAX: number; // 0x8008 + readonly DEPTH_COMPONENT24: number; // 0x81A6 + readonly MAX_TEXTURE_LOD_BIAS: number; // 0x84FD + readonly TEXTURE_COMPARE_MODE: number; // 0x884C + readonly TEXTURE_COMPARE_FUNC: number; // 0x884D + readonly CURRENT_QUERY: number; // 0x8865 + readonly QUERY_RESULT: number; // 0x8866 + readonly QUERY_RESULT_AVAILABLE: number; // 0x8867 + readonly STREAM_READ: number; // 0x88E1 + readonly STREAM_COPY: number; // 0x88E2 + readonly STATIC_READ: number; // 0x88E5 + readonly STATIC_COPY: number; // 0x88E6 + readonly DYNAMIC_READ: number; // 0x88E9 + readonly DYNAMIC_COPY: number; // 0x88EA + readonly MAX_DRAW_BUFFERS: number; // 0x8824 + readonly DRAW_BUFFER0: number; // 0x8825 + readonly DRAW_BUFFER1: number; // 0x8826 + readonly DRAW_BUFFER2: number; // 0x8827 + readonly DRAW_BUFFER3: number; // 0x8828 + readonly DRAW_BUFFER4: number; // 0x8829 + readonly DRAW_BUFFER5: number; // 0x882A + readonly DRAW_BUFFER6: number; // 0x882B + readonly DRAW_BUFFER7: number; // 0x882C + readonly DRAW_BUFFER8: number; // 0x882D + readonly DRAW_BUFFER9: number; // 0x882E + readonly DRAW_BUFFER10: number; // 0x882F + readonly DRAW_BUFFER11: number; // 0x8830 + readonly DRAW_BUFFER12: number; // 0x8831 + readonly DRAW_BUFFER13: number; // 0x8832 + readonly DRAW_BUFFER14: number; // 0x8833 + readonly DRAW_BUFFER15: number; // 0x8834 + readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: number; // 0x8B49 + readonly MAX_VERTEX_UNIFORM_COMPONENTS: number; // 0x8B4A + readonly SAMPLER_3D: number; // 0x8B5F + readonly SAMPLER_2D_SHADOW: number; // 0x8B62 + readonly FRAGMENT_SHADER_DERIVATIVE_HINT: number; // 0x8B8B + readonly PIXEL_PACK_BUFFER: number; // 0x88EB + readonly PIXEL_UNPACK_BUFFER: number; // 0x88EC + readonly PIXEL_PACK_BUFFER_BINDING: number; // 0x88ED + readonly PIXEL_UNPACK_BUFFER_BINDING: number; // 0x88EF + readonly FLOAT_MAT2x3: number; // 0x8B65 + readonly FLOAT_MAT2x4: number; // 0x8B66 + readonly FLOAT_MAT3x2: number; // 0x8B67 + readonly FLOAT_MAT3x4: number; // 0x8B68 + readonly FLOAT_MAT4x2: number; // 0x8B69 + readonly FLOAT_MAT4x3: number; // 0x8B6A + readonly SRGB: number; // 0x8C40 + readonly SRGB8: number; // 0x8C41 + readonly SRGB8_ALPHA8: number; // 0x8C43 + readonly COMPARE_REF_TO_TEXTURE: number; // 0x884E + readonly RGBA32F: number; // 0x8814 + readonly RGB32F: number; // 0x8815 + readonly RGBA16F: number; // 0x881A + readonly RGB16F: number; // 0x881B + readonly VERTEX_ATTRIB_ARRAY_INTEGER: number; // 0x88FD + readonly MAX_ARRAY_TEXTURE_LAYERS: number; // 0x88FF + readonly MIN_PROGRAM_TEXEL_OFFSET: number; // 0x8904 + readonly MAX_PROGRAM_TEXEL_OFFSET: number; // 0x8905 + readonly MAX_VARYING_COMPONENTS: number; // 0x8B4B + readonly TEXTURE_2D_ARRAY: number; // 0x8C1A + readonly TEXTURE_BINDING_2D_ARRAY: number; // 0x8C1D + readonly R11F_G11F_B10F: number; // 0x8C3A + readonly UNSIGNED_INT_10F_11F_11F_REV: number; // 0x8C3B + readonly RGB9_E5: number; // 0x8C3D + readonly UNSIGNED_INT_5_9_9_9_REV: number; // 0x8C3E + readonly TRANSFORM_FEEDBACK_BUFFER_MODE: number; // 0x8C7F + readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: number; // 0x8C80 + readonly TRANSFORM_FEEDBACK_VARYINGS: number; // 0x8C83 + readonly TRANSFORM_FEEDBACK_BUFFER_START: number; // 0x8C84 + readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: number; // 0x8C85 + readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: number; // 0x8C88 + readonly RASTERIZER_DISCARD: number; // 0x8C89 + readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: number; // 0x8C8A + readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: number; // 0x8C8B + readonly INTERLEAVED_ATTRIBS: number; // 0x8C8C + readonly SEPARATE_ATTRIBS: number; // 0x8C8D + readonly TRANSFORM_FEEDBACK_BUFFER: number; // 0x8C8E + readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: number; // 0x8C8F + readonly RGBA32UI: number; // 0x8D70 + readonly RGB32UI: number; // 0x8D71 + readonly RGBA16UI: number; // 0x8D76 + readonly RGB16UI: number; // 0x8D77 + readonly RGBA8UI: number; // 0x8D7C + readonly RGB8UI: number; // 0x8D7D + readonly RGBA32I: number; // 0x8D82 + readonly RGB32I: number; // 0x8D83 + readonly RGBA16I: number; // 0x8D88 + readonly RGB16I: number; // 0x8D89 + readonly RGBA8I: number; // 0x8D8E + readonly RGB8I: number; // 0x8D8F + readonly RED_INTEGER: number; // 0x8D94 + readonly RGB_INTEGER: number; // 0x8D98 + readonly RGBA_INTEGER: number; // 0x8D99 + readonly SAMPLER_2D_ARRAY: number; // 0x8DC1 + readonly SAMPLER_2D_ARRAY_SHADOW: number; // 0x8DC4 + readonly SAMPLER_CUBE_SHADOW: number; // 0x8DC5 + readonly UNSIGNED_INT_VEC2: number; // 0x8DC6 + readonly UNSIGNED_INT_VEC3: number; // 0x8DC7 + readonly UNSIGNED_INT_VEC4: number; // 0x8DC8 + readonly INT_SAMPLER_2D: number; // 0x8DCA + readonly INT_SAMPLER_3D: number; // 0x8DCB + readonly INT_SAMPLER_CUBE: number; // 0x8DCC + readonly INT_SAMPLER_2D_ARRAY: number; // 0x8DCF + readonly UNSIGNED_INT_SAMPLER_2D: number; // 0x8DD2 + readonly UNSIGNED_INT_SAMPLER_3D: number; // 0x8DD3 + readonly UNSIGNED_INT_SAMPLER_CUBE: number; // 0x8DD4 + readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: number; // 0x8DD7 + readonly DEPTH_COMPONENT32F: number; // 0x8CAC + readonly DEPTH32F_STENCIL8: number; // 0x8CAD + readonly FLOAT_32_UNSIGNED_INT_24_8_REV: number; // 0x8DAD + readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: number; // 0x8210 + readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: number; // 0x8211 + readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: number; // 0x8212 + readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: number; // 0x8213 + readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: number; // 0x8214 + readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: number; // 0x8215 + readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: number; // 0x8216 + readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: number; // 0x8217 + readonly FRAMEBUFFER_DEFAULT: number; // 0x8218 + //readonly DEPTH_STENCIL_ATTACHMENT: number; // 0x821A /* Already defined in WebGL1 constants */ + //readonly DEPTH_STENCIL: number; // 0x84F9 /* Already defined in WebGL1 constants */ + readonly UNSIGNED_INT_24_8: number; // 0x84FA + readonly DEPTH24_STENCIL8: number; // 0x88F0 + readonly UNSIGNED_NORMALIZED: number; // 0x8C17 + readonly DRAW_FRAMEBUFFER_BINDING: number; // 0x8CA6 /* Same as FRAMEBUFFER_BINDING */ + readonly READ_FRAMEBUFFER: number; // 0x8CA8 + readonly DRAW_FRAMEBUFFER: number; // 0x8CA9 + readonly READ_FRAMEBUFFER_BINDING: number; // 0x8CAA + readonly RENDERBUFFER_SAMPLES: number; // 0x8CAB + readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: number; // 0x8CD4 + readonly MAX_COLOR_ATTACHMENTS: number; // 0x8CDF + readonly COLOR_ATTACHMENT1: number; // 0x8CE1 + readonly COLOR_ATTACHMENT2: number; // 0x8CE2 + readonly COLOR_ATTACHMENT3: number; // 0x8CE3 + readonly COLOR_ATTACHMENT4: number; // 0x8CE4 + readonly COLOR_ATTACHMENT5: number; // 0x8CE5 + readonly COLOR_ATTACHMENT6: number; // 0x8CE6 + readonly COLOR_ATTACHMENT7: number; // 0x8CE7 + readonly COLOR_ATTACHMENT8: number; // 0x8CE8 + readonly COLOR_ATTACHMENT9: number; // 0x8CE9 + readonly COLOR_ATTACHMENT10: number; // 0x8CEA + readonly COLOR_ATTACHMENT11: number; // 0x8CEB + readonly COLOR_ATTACHMENT12: number; // 0x8CEC + readonly COLOR_ATTACHMENT13: number; // 0x8CED + readonly COLOR_ATTACHMENT14: number; // 0x8CEE + readonly COLOR_ATTACHMENT15: number; // 0x8CEF + readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: number; // 0x8D56 + readonly MAX_SAMPLES: number; // 0x8D57 + readonly HALF_FLOAT: number; // 0x140B + readonly RG: number; // 0x8227 + readonly RG_INTEGER: number; // 0x8228 + readonly R8: number; // 0x8229 + readonly RG8: number; // 0x822B + readonly R16F: number; // 0x822D + readonly R32F: number; // 0x822E + readonly RG16F: number; // 0x822F + readonly RG32F: number; // 0x8230 + readonly R8I: number; // 0x8231 + readonly R8UI: number; // 0x8232 + readonly R16I: number; // 0x8233 + readonly R16UI: number; // 0x8234 + readonly R32I: number; // 0x8235 + readonly R32UI: number; // 0x8236 + readonly RG8I: number; // 0x8237 + readonly RG8UI: number; // 0x8238 + readonly RG16I: number; // 0x8239 + readonly RG16UI: number; // 0x823A + readonly RG32I: number; // 0x823B + readonly RG32UI: number; // 0x823C + readonly VERTEX_ARRAY_BINDING: number; // 0x85B5 + readonly R8_SNORM: number; // 0x8F94 + readonly RG8_SNORM: number; // 0x8F95 + readonly RGB8_SNORM: number; // 0x8F96 + readonly RGBA8_SNORM: number; // 0x8F97 + readonly SIGNED_NORMALIZED: number; // 0x8F9C + readonly COPY_READ_BUFFER: number; // 0x8F36 + readonly COPY_WRITE_BUFFER: number; // 0x8F37 + readonly COPY_READ_BUFFER_BINDING: number; // 0x8F36 /* Same as COPY_READ_BUFFER */ + readonly COPY_WRITE_BUFFER_BINDING: number; // 0x8F37 /* Same as COPY_WRITE_BUFFER */ + readonly UNIFORM_BUFFER: number; // 0x8A11 + readonly UNIFORM_BUFFER_BINDING: number; // 0x8A28 + readonly UNIFORM_BUFFER_START: number; // 0x8A29 + readonly UNIFORM_BUFFER_SIZE: number; // 0x8A2A + readonly MAX_VERTEX_UNIFORM_BLOCKS: number; // 0x8A2B + readonly MAX_FRAGMENT_UNIFORM_BLOCKS: number; // 0x8A2D + readonly MAX_COMBINED_UNIFORM_BLOCKS: number; // 0x8A2E + readonly MAX_UNIFORM_BUFFER_BINDINGS: number; // 0x8A2F + readonly MAX_UNIFORM_BLOCK_SIZE: number; // 0x8A30 + readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: number; // 0x8A31 + readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: number; // 0x8A33 + readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: number; // 0x8A34 + readonly ACTIVE_UNIFORM_BLOCKS: number; // 0x8A36 + readonly UNIFORM_TYPE: number; // 0x8A37 + readonly UNIFORM_SIZE: number; // 0x8A38 + readonly UNIFORM_BLOCK_INDEX: number; // 0x8A3A + readonly UNIFORM_OFFSET: number; // 0x8A3B + readonly UNIFORM_ARRAY_STRIDE: number; // 0x8A3C + readonly UNIFORM_MATRIX_STRIDE: number; // 0x8A3D + readonly UNIFORM_IS_ROW_MAJOR: number; // 0x8A3E + readonly UNIFORM_BLOCK_BINDING: number; // 0x8A3F + readonly UNIFORM_BLOCK_DATA_SIZE: number; // 0x8A40 + readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: number; // 0x8A42 + readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: number; // 0x8A43 + readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: number; // 0x8A44 + readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: number; // 0x8A46 + readonly INVALID_INDEX: number; // 0xFFFFFFFF + readonly MAX_VERTEX_OUTPUT_COMPONENTS: number; // 0x9122 + readonly MAX_FRAGMENT_INPUT_COMPONENTS: number; // 0x9125 + readonly MAX_SERVER_WAIT_TIMEOUT: number; // 0x9111 + readonly OBJECT_TYPE: number; // 0x9112 + readonly SYNC_CONDITION: number; // 0x9113 + readonly SYNC_STATUS: number; // 0x9114 + readonly SYNC_FLAGS: number; // 0x9115 + readonly SYNC_FENCE: number; // 0x9116 + readonly SYNC_GPU_COMMANDS_COMPLETE: number; // 0x9117 + readonly UNSIGNALED: number; // 0x9118 + readonly SIGNALED: number; // 0x9119 + readonly ALREADY_SIGNALED: number; // 0x911A + readonly TIMEOUT_EXPIRED: number; // 0x911B + readonly CONDITION_SATISFIED: number; // 0x911C + readonly WAIT_FAILED: number; // 0x911D + readonly SYNC_FLUSH_COMMANDS_BIT: number; // 0x00000001 + readonly VERTEX_ATTRIB_ARRAY_DIVISOR: number; // 0x88FE + readonly ANY_SAMPLES_PASSED: number; // 0x8C2F + readonly ANY_SAMPLES_PASSED_CONSERVATIVE: number; // 0x8D6A + readonly SAMPLER_BINDING: number; // 0x8919 + readonly RGB10_A2UI: number; // 0x906F + readonly INT_2_10_10_10_REV: number; // 0x8D9F + readonly TRANSFORM_FEEDBACK: number; // 0x8E22 + readonly TRANSFORM_FEEDBACK_PAUSED: number; // 0x8E23 + readonly TRANSFORM_FEEDBACK_ACTIVE: number; // 0x8E24 + readonly TRANSFORM_FEEDBACK_BINDING: number; // 0x8E25 + readonly TEXTURE_IMMUTABLE_FORMAT: number; // 0x912F + readonly MAX_ELEMENT_INDEX: number; // 0x8D6B + readonly TEXTURE_IMMUTABLE_LEVELS: number; // 0x82DF + + readonly TIMEOUT_IGNORED: number; // -1 + + /* WebGL-specific enums */ + readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: number; // 0x9247 +}; + +interface WebGLQuery extends WebGLObject { +} + +declare var WebGLQuery: { + prototype: WebGLQuery; + new (): WebGLQuery; +}; + +interface WebGLSampler extends WebGLObject { +} + +declare var WebGLSampler: { + prototype: WebGLSampler; + new (): WebGLSampler; +}; + +interface WebGLSync extends WebGLObject { +} + +declare var WebGLSync: { + prototype: WebGLSync; + new (): WebGLSync; +}; + +interface WebGLTransformFeedback extends WebGLObject { +} + +declare var WebGLTransformFeedback: { + prototype: WebGLTransformFeedback; + new (): WebGLTransformFeedback; +}; + +interface WebGLVertexArrayObject extends WebGLObject { +} + +declare var WebGLVertexArrayObject: { + prototype: WebGLVertexArrayObject; + new (): WebGLVertexArrayObject; +}; diff --git a/poly2tri/tsconfig.json b/types/webgl2/tsconfig.json similarity index 86% rename from poly2tri/tsconfig.json rename to types/webgl2/tsconfig.json index 1fb436fbcb..129c0d86f3 100644 --- a/poly2tri/tsconfig.json +++ b/types/webgl2/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "poly2tri-tests.ts" + "webgl2-tests.ts" ] } \ No newline at end of file diff --git a/types/webgl2/tslint.json b/types/webgl2/tslint.json new file mode 100644 index 0000000000..3bcd4abbe9 --- /dev/null +++ b/types/webgl2/tslint.json @@ -0,0 +1,9 @@ +{ + "extends": "../tslint.json", + "rules": { + "dt-header": false, + "adjacent-overload-signatures": false, + "unified-signatures": false, + "no-empty-interface": false + } +} diff --git a/types/webgl2/webgl2-tests.ts b/types/webgl2/webgl2-tests.ts new file mode 100644 index 0000000000..7e090ca9d9 --- /dev/null +++ b/types/webgl2/webgl2-tests.ts @@ -0,0 +1,26 @@ +window.onload = () => { + const canvas: HTMLCanvasElement = document.createElement("canvas") as HTMLCanvasElement; + const gl: WebGL2RenderingContext | null = canvas.getContext("webgl2", { antialias: false} ); + + if (gl === null) { + console.log("WebGL2 not available"); + return; + } + + const maxsize = gl.getParameter(gl.MAX_3D_TEXTURE_SIZE); + console.log(`Attempting to create super useful, empty, NPOT 3D texture of size ${maxsize} x 13 x 5...`); + + const texture = gl.createTexture(); + + gl.activeTexture(gl.TEXTURE0); + gl.bindTexture(gl.TEXTURE_3D, texture); + gl.texImage3D(gl.TEXTURE_3D, 0, gl.R32F, maxsize, 13, 5, 0, gl.RED, gl.FLOAT, null); + + if (gl.getError() !== gl.NO_ERROR) { + console.log("Oh noes!"); + } else { + console.log("Success!"); + } + + gl.deleteTexture(texture); +}; diff --git a/webgme/index.d.ts b/types/webgme/index.d.ts similarity index 100% rename from webgme/index.d.ts rename to types/webgme/index.d.ts diff --git a/webgme/tsconfig.json b/types/webgme/tsconfig.json similarity index 100% rename from webgme/tsconfig.json rename to types/webgme/tsconfig.json diff --git a/webgme/webgme-tests.ts b/types/webgme/webgme-tests.ts similarity index 100% rename from webgme/webgme-tests.ts rename to types/webgme/webgme-tests.ts diff --git a/webix/index.d.ts b/types/webix/index.d.ts similarity index 100% rename from webix/index.d.ts rename to types/webix/index.d.ts diff --git a/webix/tsconfig.json b/types/webix/tsconfig.json similarity index 100% rename from webix/tsconfig.json rename to types/webix/tsconfig.json diff --git a/webix/webix-tests.ts b/types/webix/webix-tests.ts similarity index 100% rename from webix/webix-tests.ts rename to types/webix/webix-tests.ts diff --git a/webmidi/index.d.ts b/types/webmidi/index.d.ts similarity index 100% rename from webmidi/index.d.ts rename to types/webmidi/index.d.ts diff --git a/webmidi/tsconfig.json b/types/webmidi/tsconfig.json similarity index 100% rename from webmidi/tsconfig.json rename to types/webmidi/tsconfig.json diff --git a/webpack/tslint.json b/types/webmidi/tslint.json similarity index 100% rename from webpack/tslint.json rename to types/webmidi/tslint.json diff --git a/webmidi/webmidi-tests.ts b/types/webmidi/webmidi-tests.ts similarity index 100% rename from webmidi/webmidi-tests.ts rename to types/webmidi/webmidi-tests.ts diff --git a/types/webpack-chain/index.d.ts b/types/webpack-chain/index.d.ts new file mode 100644 index 0000000000..f6cfc40b25 --- /dev/null +++ b/types/webpack-chain/index.d.ts @@ -0,0 +1,212 @@ +// Type definitions for webpack-chain 3.0 +// Project: https://github.com/mozilla-neutrino/webpack-chain +// Definitions by: Eirikur Nilsson +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as webpack from 'webpack'; +import * as https from 'https'; + +export = Config; + +declare class Config { + devServer: Config.DevServer + entryPoints: Config.EntryPoints + module: Config.Module + node: Config.ChainedMap + output: Config.Output + performance: Config.Performance + plugins: Config.Plugins + resolve: Config.Resolve + resolveLoader: Config.ResolveLoader + + amd(value: { [moduleName: string]: boolean }): this + bail(value: boolean): this + cache(value: boolean | any): this + devtool(value: Config.DevTool): this + context(value: string): this + externals(value: webpack.ExternalsElement | webpack.ExternalsElement[]): this + loader(value: any): this + profile(value: boolean): this + recordsPath(value: string): this + recordsInputPath(value: string): this + recordsOutputPath(value: string): this + stats(value: webpack.Options.Stats): this + target(value: string): this + watch(value: boolean): this + watchOptions(value: webpack.Options.WatchOptions): this + + entry(name: string): Config.ChainedSet + plugin(name: string): Config.Plugin + + toConfig(): webpack.Configuration + merge(obj: any): this +} + +declare namespace Config { + export class Chained { + end(): Parent + } + + export class TypedChainedMap extends Chained { + clear(): this + delete(key: string): this + has(key: string): boolean + get(key: string): Value + set(key: string, value: Value): this + merge(obj: { [key: string]: Value }): this + entries(): { [key: string]: Value } + values(): Array + } + + export class ChainedMap extends TypedChainedMap {} + + export class TypedChainedSet extends Chained { + add(value: Value): this + prepend(value: Value): this + clear(): this + delete(key: string): this + has(key: string): boolean + merge(arr: Array): this + values(): Array + } + + export class ChainedSet extends TypedChainedSet {} + + export class Plugins extends TypedChainedMap> {} + + export class Plugin extends ChainedMap { + init(value: (plugin: PluginClass, args: any[]) => webpack.Plugin): this + use(plugin: PluginClass, args?: any[]): this + tap(f: (args: any[]) => any[]): this + } + + export class Module extends ChainedMap { + rules: TypedChainedMap + rule(name: string): Rule + } + + export class Output extends ChainedMap { + chunkFilename(value: string): this + crossOriginLoading(value: boolean | string): this + filename(value: string): this + library(value: string): this + libraryTarget(value: string): this + devtoolFallbackModuleFilenameTemplate(value: any): this + devtoolLineToLine(value: any): this + devtoolModuleFilenameTemplate(value: any): this + hashFunction(value: string): this + hashDigest(value: string): this + hashDigestLength(value: number): this + hashSalt(value: any): this + hotUpdateChunkFilename(value: string): this + hotUpdateFunction(value: any): this + hotUpdateMainFilename(value: string): this + jsonpFunction(value: string): this + path(value: string): this + pathinfo(value: boolean): this + publicPath(value: string): this + sourceMapFilename(value: string): this + sourcePrefix(value: string): this + strictModuleExceptionHandling(value: boolean): this + umdNamedDefine(value: boolean): this + } + + export class DevServer extends ChainedMap { + clientLogLevel(value: 'none' | 'error' | 'warning' | 'info'): this + compress(value: boolean): this + contentBase(value: boolean | string | string[]): this + filename(value: string): this + headers(value: { [header: string]: string }): this + historyApiFallback(value: boolean | any): this + host(value: string): this + hot(value: boolean): this + hotOnly(value: boolean): this + https(value: boolean | https.ServerOptions): this + inline(value: boolean): this + lazy(value: boolean): this + noInfo(value: boolean): this + overlay(value: boolean | { warnings?: boolean, errors?: boolean }): this + port(value: number): this + proxy(value: any): this + quiet(value: boolean): this + setup(value: (expressApp: any) => void): this + stats(value: webpack.Options.Stats): this + watchContentBase(value: boolean): this + } + + export class Performance extends ChainedMap { + hints(value: boolean | 'error' | 'warning'): this + maxEntrypointSize(value: number): this + maxAssetSize(value: number): this + assetFilter(value: (assetFilename: string) => boolean): this + } + + export class EntryPoints extends TypedChainedMap> {} + + export class Resolve extends ChainedMap { + alias: TypedChainedMap + aliasFields: TypedChainedSet + descriptionFiles: TypedChainedSet + extensions: TypedChainedSet + mainFields: TypedChainedSet + mainFiles: TypedChainedSet + modules: TypedChainedSet + plugins: TypedChainedMap> + + enforceExtension(value: boolean): this + enforceModuleExtension(value: boolean): this + unsafeCache(value: boolean | RegExp | RegExp[]): this + symlinks(value: boolean): this + cachePredicate(value: (data: { path: string, request: string }) => boolean): this + + plugin(name: string): Plugin + } + + export class ResolveLoader extends ChainedMap { + extensions: TypedChainedSet + modules: TypedChainedSet + moduleExtensions: TypedChainedSet + packageMains: TypedChainedSet + } + + export class Rule extends ChainedMap { + uses: TypedChainedMap + include: TypedChainedSet + exclude: TypedChainedSet + + parser(value: { [optName: string]: any }): this + test(value: webpack.Condition | webpack.Condition[]): this + enforce(value: 'pre' | 'post'): this + + use(name: string): Use + pre(): this + post(): this + } + + type LoaderOptions = { [name: string]: any } + + export class Use extends ChainedMap { + loader(value: string): this + options(value: LoaderOptions): this + + tap(f: (options: LoaderOptions) => LoaderOptions): this + } + + type DevTool = 'eval' | 'inline-source-map' | 'cheap-eval-source-map' | 'cheap-source-map' | + 'cheap-module-eval-source-map' | 'cheap-module-source-map' | 'eval-source-map' | 'source-map' | + 'nosources-source-map' | 'hidden-source-map' | 'nosources-source-map' | '@eval' | + '@inline-source-map' | '@cheap-eval-source-map' | '@cheap-source-map' | + '@cheap-module-eval-source-map' | '@cheap-module-source-map' | '@eval-source-map' | + '@source-map' | '@nosources-source-map' | '@hidden-source-map' | '@nosources-source-map' | + '#eval' | '#inline-source-map' | '#cheap-eval-source-map' | '#cheap-source-map' | + '#cheap-module-eval-source-map' | '#cheap-module-source-map' | '#eval-source-map' | + '#source-map' | '#nosources-source-map' | '#hidden-source-map' | '#nosources-source-map' | + '#@eval' | '#@inline-source-map' | '#@cheap-eval-source-map' | '#@cheap-source-map' | + '#@cheap-module-eval-source-map' | '#@cheap-module-source-map' | '#@eval-source-map' | + '#@source-map' | '#@nosources-source-map' | '#@hidden-source-map' | '#@nosources-source-map' | + boolean + + interface PluginClass { + new (...opts: any[]): webpack.Plugin + } +} diff --git a/redux-persist-transform-encrypt/tsconfig.json b/types/webpack-chain/tsconfig.json similarity index 89% rename from redux-persist-transform-encrypt/tsconfig.json rename to types/webpack-chain/tsconfig.json index b0a989e85a..ad23fcfa57 100644 --- a/redux-persist-transform-encrypt/tsconfig.json +++ b/types/webpack-chain/tsconfig.json @@ -17,6 +17,6 @@ }, "files": [ "index.d.ts", - "redux-persist-transform-encrypt-tests.ts" + "webpack-chain-tests.ts" ] -} \ No newline at end of file +} diff --git a/webtorrent/tslint.json b/types/webpack-chain/tslint.json similarity index 100% rename from webtorrent/tslint.json rename to types/webpack-chain/tslint.json diff --git a/types/webpack-chain/webpack-chain-tests.ts b/types/webpack-chain/webpack-chain-tests.ts new file mode 100644 index 0000000000..da72bc6f9f --- /dev/null +++ b/types/webpack-chain/webpack-chain-tests.ts @@ -0,0 +1,205 @@ +import * as Config from 'webpack-chain'; +import * as webpack from 'webpack'; + +const config = new Config(); + +config + .amd({ foo: true }) + .bail(true) + .cache(false) + .cache({}) + .devtool('hidden-source-map') + .devtool(false) + .context('') + .externals('foo') + .externals(/node_modules/) + .externals({ 'test': false, 'foo': 'bar' }) + .externals(['foo', 'bar']) + .externals((context, request, cb) => cb(null, true)) + .loader({}) + .profile(false) + .recordsPath('') + .recordsInputPath('') + .recordsOutputPath('') + .stats({ + assets: false, + publicPath: true, + modules: false + }) + .target('web') + .watch(true) + .watchOptions({}) + + .entry('main') + .add('index.js') + .delete('index.js') + .clear() + .end() + + .entryPoints + .delete('main') + .end() + + .plugin('foo') + .use(webpack.DefinePlugin, []) + .end() + + .plugins + .delete('foo') + .end() + + .devServer + .clientLogLevel('error') + .compress(false) + .contentBase('/') + .contentBase(['foo', 'bar']) + .filename('hello') + .headers({ + 'Content-Type': 'text/css', + }) + .historyApiFallback(true) + .host('localhost') + .hot(true) + .hotOnly(true) + .https(true) + .inline(true) + .lazy(true) + .noInfo(true) + .overlay(true) + .overlay({ + warnings: true, + errors: true, + }) + .port(8080) + .proxy({}) + .quiet(false) + .setup(app => {}) + .stats({ + reasons: true, + errors: true, + warnings: false, + }) + .watchContentBase(true) + .end() + + .module + .rule('compile') + .test(/.js$/) + .include + .add(/.js$/) + .end() + .exclude + .add(/node_modules/) + .end() + .parser({ + opt: 'foo', + }) + .enforce('pre') + .use('babel') + .loader('babel-loader') + .options({}) + .end() + .uses + .delete('babel') + .end() + .pre() + .post() + .end() + .rules + .delete('compile') + .end() + .end() + + .node + .set('__dirname', true) + .delete('__dirname') + .clear() + .end() + + .output + .chunkFilename('') + .crossOriginLoading(true) + .filename('main.js') + .library('var') + .libraryTarget('var') + .devtoolFallbackModuleFilenameTemplate('') + .devtoolLineToLine('') + .devtoolModuleFilenameTemplate('') + .hashFunction('md5') + .hashDigest('md5') + .hashDigestLength(15) + .hashSalt('') + .hotUpdateChunkFilename('update') + .hotUpdateFunction(() => {}) + .hotUpdateMainFilename('main') + .jsonpFunction('callback') + .path('/') + .pathinfo(true) + .publicPath('/') + .sourceMapFilename('index.js.map') + .sourcePrefix('~') + .strictModuleExceptionHandling(true) + .umdNamedDefine(true) + .end() + + .performance + .hints(true) + .hints('warning') + .maxEntrypointSize(20000) + .maxAssetSize(20000) + .assetFilter(filename => true) + .end() + + .resolve + .alias + .set('foo', 'bar') + .end() + .aliasFields + .add('foo') + .end() + .descriptionFiles + .add('foo') + .end() + .extensions + .add('.js') + .end() + .mainFields + .add('browser') + .end() + .mainFiles + .add('index.js') + .end() + .modules + .add('index.js') + .end() + .enforceExtension(true) + .enforceModuleExtension(true) + .unsafeCache(false) + .unsafeCache(/foo/) + .symlinks(true) + .cachePredicate(({ path, request }) => true) + .plugin('foo') + .use(webpack.DefinePlugin, []) + .end() + .plugins + .delete('foo') + .end() + .end() + + .resolveLoader + .extensions + .add('.js') + .end() + .modules + .add('index.js') + .end() + .moduleExtensions + .add('.js') + .end() + .packageMains + .add('index.js') + .end() + .end() + + .merge({}) + .toConfig(); diff --git a/webpack-dev-middleware/index.d.ts b/types/webpack-dev-middleware/index.d.ts similarity index 100% rename from webpack-dev-middleware/index.d.ts rename to types/webpack-dev-middleware/index.d.ts diff --git a/webpack-dev-middleware/tsconfig.json b/types/webpack-dev-middleware/tsconfig.json similarity index 100% rename from webpack-dev-middleware/tsconfig.json rename to types/webpack-dev-middleware/tsconfig.json diff --git a/wicg-mediasession/tslint.json b/types/webpack-dev-middleware/tslint.json similarity index 100% rename from wicg-mediasession/tslint.json rename to types/webpack-dev-middleware/tslint.json diff --git a/webpack-dev-middleware/webpack-dev-middleware-tests.ts b/types/webpack-dev-middleware/webpack-dev-middleware-tests.ts similarity index 100% rename from webpack-dev-middleware/webpack-dev-middleware-tests.ts rename to types/webpack-dev-middleware/webpack-dev-middleware-tests.ts diff --git a/webpack-dev-server/index.d.ts b/types/webpack-dev-server/index.d.ts similarity index 100% rename from webpack-dev-server/index.d.ts rename to types/webpack-dev-server/index.d.ts diff --git a/webpack-dev-server/tsconfig.json b/types/webpack-dev-server/tsconfig.json similarity index 100% rename from webpack-dev-server/tsconfig.json rename to types/webpack-dev-server/tsconfig.json diff --git a/webpack-dev-server/webpack-dev-server-tests.ts b/types/webpack-dev-server/webpack-dev-server-tests.ts similarity index 100% rename from webpack-dev-server/webpack-dev-server-tests.ts rename to types/webpack-dev-server/webpack-dev-server-tests.ts diff --git a/webpack-env/index.d.ts b/types/webpack-env/index.d.ts similarity index 100% rename from webpack-env/index.d.ts rename to types/webpack-env/index.d.ts diff --git a/webpack-env/tsconfig.json b/types/webpack-env/tsconfig.json similarity index 100% rename from webpack-env/tsconfig.json rename to types/webpack-env/tsconfig.json diff --git a/webpack-env/webpack-env-tests.ts b/types/webpack-env/webpack-env-tests.ts similarity index 100% rename from webpack-env/webpack-env-tests.ts rename to types/webpack-env/webpack-env-tests.ts diff --git a/webpack-fail-plugin/index.d.ts b/types/webpack-fail-plugin/index.d.ts similarity index 100% rename from webpack-fail-plugin/index.d.ts rename to types/webpack-fail-plugin/index.d.ts diff --git a/webpack-fail-plugin/tsconfig.json b/types/webpack-fail-plugin/tsconfig.json similarity index 100% rename from webpack-fail-plugin/tsconfig.json rename to types/webpack-fail-plugin/tsconfig.json diff --git a/webpack-fail-plugin/webpack-fail-plugin-tests.ts b/types/webpack-fail-plugin/webpack-fail-plugin-tests.ts similarity index 100% rename from webpack-fail-plugin/webpack-fail-plugin-tests.ts rename to types/webpack-fail-plugin/webpack-fail-plugin-tests.ts diff --git a/webpack-hot-middleware/index.d.ts b/types/webpack-hot-middleware/index.d.ts similarity index 100% rename from webpack-hot-middleware/index.d.ts rename to types/webpack-hot-middleware/index.d.ts diff --git a/webpack-hot-middleware/tsconfig.json b/types/webpack-hot-middleware/tsconfig.json similarity index 100% rename from webpack-hot-middleware/tsconfig.json rename to types/webpack-hot-middleware/tsconfig.json diff --git a/window-or-global/tslint.json b/types/webpack-hot-middleware/tslint.json similarity index 100% rename from window-or-global/tslint.json rename to types/webpack-hot-middleware/tslint.json diff --git a/webpack-hot-middleware/webpack-hot-middleware-tests.ts b/types/webpack-hot-middleware/webpack-hot-middleware-tests.ts similarity index 100% rename from webpack-hot-middleware/webpack-hot-middleware-tests.ts rename to types/webpack-hot-middleware/webpack-hot-middleware-tests.ts diff --git a/webpack-merge/index.d.ts b/types/webpack-merge/index.d.ts similarity index 100% rename from webpack-merge/index.d.ts rename to types/webpack-merge/index.d.ts diff --git a/webpack-merge/tsconfig.json b/types/webpack-merge/tsconfig.json similarity index 100% rename from webpack-merge/tsconfig.json rename to types/webpack-merge/tsconfig.json diff --git a/webpack-merge/webpack-merge-tests.ts b/types/webpack-merge/webpack-merge-tests.ts similarity index 100% rename from webpack-merge/webpack-merge-tests.ts rename to types/webpack-merge/webpack-merge-tests.ts diff --git a/webpack-notifier/index.d.ts b/types/webpack-notifier/index.d.ts similarity index 100% rename from webpack-notifier/index.d.ts rename to types/webpack-notifier/index.d.ts diff --git a/webpack-notifier/tsconfig.json b/types/webpack-notifier/tsconfig.json similarity index 100% rename from webpack-notifier/tsconfig.json rename to types/webpack-notifier/tsconfig.json diff --git a/wu/tslint.json b/types/webpack-notifier/tslint.json similarity index 100% rename from wu/tslint.json rename to types/webpack-notifier/tslint.json diff --git a/webpack-notifier/webpack-notifier-tests.ts b/types/webpack-notifier/webpack-notifier-tests.ts similarity index 100% rename from webpack-notifier/webpack-notifier-tests.ts rename to types/webpack-notifier/webpack-notifier-tests.ts diff --git a/webpack-sources/index.d.ts b/types/webpack-sources/index.d.ts similarity index 100% rename from webpack-sources/index.d.ts rename to types/webpack-sources/index.d.ts diff --git a/webpack-sources/tsconfig.json b/types/webpack-sources/tsconfig.json similarity index 100% rename from webpack-sources/tsconfig.json rename to types/webpack-sources/tsconfig.json diff --git a/webpack-sources/webpack-sources-tests.ts b/types/webpack-sources/webpack-sources-tests.ts similarity index 100% rename from webpack-sources/webpack-sources-tests.ts rename to types/webpack-sources/webpack-sources-tests.ts diff --git a/webpack-stream/index.d.ts b/types/webpack-stream/index.d.ts similarity index 100% rename from webpack-stream/index.d.ts rename to types/webpack-stream/index.d.ts diff --git a/webpack-stream/tsconfig.json b/types/webpack-stream/tsconfig.json similarity index 100% rename from webpack-stream/tsconfig.json rename to types/webpack-stream/tsconfig.json diff --git a/xdg-basedir/tslint.json b/types/webpack-stream/tslint.json similarity index 100% rename from xdg-basedir/tslint.json rename to types/webpack-stream/tslint.json diff --git a/webpack-stream/webpack-stream-tests.ts b/types/webpack-stream/webpack-stream-tests.ts similarity index 100% rename from webpack-stream/webpack-stream-tests.ts rename to types/webpack-stream/webpack-stream-tests.ts diff --git a/webpack-validator/index.d.ts b/types/webpack-validator/index.d.ts similarity index 100% rename from webpack-validator/index.d.ts rename to types/webpack-validator/index.d.ts diff --git a/webpack-validator/tsconfig.json b/types/webpack-validator/tsconfig.json similarity index 100% rename from webpack-validator/tsconfig.json rename to types/webpack-validator/tsconfig.json diff --git a/webpack-validator/webpack-validator-tests.ts b/types/webpack-validator/webpack-validator-tests.ts similarity index 100% rename from webpack-validator/webpack-validator-tests.ts rename to types/webpack-validator/webpack-validator-tests.ts diff --git a/webpack/index.d.ts b/types/webpack/index.d.ts similarity index 95% rename from webpack/index.d.ts rename to types/webpack/index.d.ts index 28d1b33b40..ee9ebd8be2 100644 --- a/webpack/index.d.ts +++ b/types/webpack/index.d.ts @@ -689,6 +689,81 @@ declare namespace webpack { constructor(definitions: {[key: string]: any}); } + class DllPlugin extends Plugin { + constructor(options: DllPlugin.Options | DllPlugin.Options[]); + } + + namespace DllPlugin { + interface Options { + /** + * The context of requests in the manifest file. + * + * Defaults to the webpack context. + */ + context?: string; + + /** + * The name of the exposed DLL function (keep consistent with `output.library`). + */ + name: string; + + /** + * The absolute path to the manifest json file (output). + */ + path: string; + } + } + + class DllReferencePlugin extends Plugin { + constructor(options: DllReferencePlugin.Options); + } + + namespace DllReferencePlugin { + interface Options { + /** + * The mappings from the request to module ID. + * + * Defaults to `manifest.content`. + */ + content?: any; + + /** + * The context of requests in the manifest (or content property). + * + * This is an absolute path. + */ + context: string; + + /** + * An object containing `content` and `name`. + */ + manifest: { content: string, name: string }; + + /** + * The name where the DLL is exposed. + * + * Defaults to `manifest.name`. + * + * See also `externals`. + */ + name?: string; + + /** + * The prefix which is used for accessing the content of the DLL. + */ + scope?: string; + + /** + * The type how the DLL is exposed. + * + * Defaults to `"var"`. + * + * See also `externals`. + */ + sourceType?: string; + } + } + class EvalSourceMapDevToolPlugin extends Plugin { constructor(options?: false | string | EvalSourceMapDevToolPlugin.Options); } diff --git a/webpack/tsconfig.json b/types/webpack/tsconfig.json similarity index 100% rename from webpack/tsconfig.json rename to types/webpack/tsconfig.json diff --git a/xml/tslint.json b/types/webpack/tslint.json similarity index 100% rename from xml/tslint.json rename to types/webpack/tslint.json diff --git a/webpack/webpack-tests.ts b/types/webpack/webpack-tests.ts similarity index 96% rename from webpack/webpack-tests.ts rename to types/webpack/webpack-tests.ts index ce9d42d71b..aeb17e5d4c 100644 --- a/webpack/webpack-tests.ts +++ b/types/webpack/webpack-tests.ts @@ -278,6 +278,27 @@ plugin = new webpack.ContextReplacementPlugin( resourceRegExp, newContentResource); plugin = new webpack.ContextReplacementPlugin(resourceRegExp); +plugin = new webpack.DllPlugin({ + context: 'dir-context', + name: 'dll-name', + path: 'manifest-path' +}); +plugin = new webpack.DllPlugin([{ + context: 'dir-context', + name: 'dll-name', + path: 'manifest-path' +}]); +plugin = new webpack.DllReferencePlugin({ + content: 'dll content', + context: 'dir-context', + manifest: { + content: 'dll content', + name: 'dll name' + }, + name: 'dll name', + scope: 'dll prefix', + sourceType: 'var' +}); plugin = new webpack.IgnorePlugin(requestRegExp); plugin = new webpack.IgnorePlugin(requestRegExp, contextRegExp); diff --git a/webrtc/MediaStream.d.ts b/types/webrtc/MediaStream.d.ts similarity index 100% rename from webrtc/MediaStream.d.ts rename to types/webrtc/MediaStream.d.ts diff --git a/webrtc/RTCPeerConnection.d.ts b/types/webrtc/RTCPeerConnection.d.ts similarity index 100% rename from webrtc/RTCPeerConnection.d.ts rename to types/webrtc/RTCPeerConnection.d.ts diff --git a/webrtc/index.d.ts b/types/webrtc/index.d.ts similarity index 100% rename from webrtc/index.d.ts rename to types/webrtc/index.d.ts diff --git a/webrtc/readme.md b/types/webrtc/readme.md similarity index 100% rename from webrtc/readme.md rename to types/webrtc/readme.md diff --git a/webrtc/test/MediaStream.ts b/types/webrtc/test/MediaStream.ts similarity index 100% rename from webrtc/test/MediaStream.ts rename to types/webrtc/test/MediaStream.ts diff --git a/webrtc/test/RTCPeerConnection.ts b/types/webrtc/test/RTCPeerConnection.ts similarity index 100% rename from webrtc/test/RTCPeerConnection.ts rename to types/webrtc/test/RTCPeerConnection.ts diff --git a/webrtc/tsconfig.json b/types/webrtc/tsconfig.json similarity index 100% rename from webrtc/tsconfig.json rename to types/webrtc/tsconfig.json diff --git a/website-scraper/index.d.ts b/types/website-scraper/index.d.ts similarity index 100% rename from website-scraper/index.d.ts rename to types/website-scraper/index.d.ts diff --git a/website-scraper/tsconfig.json b/types/website-scraper/tsconfig.json similarity index 100% rename from website-scraper/tsconfig.json rename to types/website-scraper/tsconfig.json diff --git a/website-scraper/website-scraper-tests.ts b/types/website-scraper/website-scraper-tests.ts similarity index 100% rename from website-scraper/website-scraper-tests.ts rename to types/website-scraper/website-scraper-tests.ts diff --git a/websocket/index.d.ts b/types/websocket/index.d.ts similarity index 100% rename from websocket/index.d.ts rename to types/websocket/index.d.ts diff --git a/websocket/tsconfig.json b/types/websocket/tsconfig.json similarity index 100% rename from websocket/tsconfig.json rename to types/websocket/tsconfig.json diff --git a/websocket/websocket-tests.ts b/types/websocket/websocket-tests.ts similarity index 100% rename from websocket/websocket-tests.ts rename to types/websocket/websocket-tests.ts diff --git a/webspeechapi/index.d.ts b/types/webspeechapi/index.d.ts similarity index 100% rename from webspeechapi/index.d.ts rename to types/webspeechapi/index.d.ts diff --git a/webspeechapi/tsconfig.json b/types/webspeechapi/tsconfig.json similarity index 100% rename from webspeechapi/tsconfig.json rename to types/webspeechapi/tsconfig.json diff --git a/webspeechapi/webspeechapi-tests.ts b/types/webspeechapi/webspeechapi-tests.ts similarity index 100% rename from webspeechapi/webspeechapi-tests.ts rename to types/webspeechapi/webspeechapi-tests.ts diff --git a/websql/index.d.ts b/types/websql/index.d.ts similarity index 100% rename from websql/index.d.ts rename to types/websql/index.d.ts diff --git a/websql/tsconfig.json b/types/websql/tsconfig.json similarity index 100% rename from websql/tsconfig.json rename to types/websql/tsconfig.json diff --git a/websql/websql-tests.ts b/types/websql/websql-tests.ts similarity index 100% rename from websql/websql-tests.ts rename to types/websql/websql-tests.ts diff --git a/webtorrent/index.d.ts b/types/webtorrent/index.d.ts similarity index 100% rename from webtorrent/index.d.ts rename to types/webtorrent/index.d.ts diff --git a/webtorrent/tsconfig.json b/types/webtorrent/tsconfig.json similarity index 100% rename from webtorrent/tsconfig.json rename to types/webtorrent/tsconfig.json diff --git a/xml2json/tslint.json b/types/webtorrent/tslint.json similarity index 100% rename from xml2json/tslint.json rename to types/webtorrent/tslint.json diff --git a/webtorrent/webtorrent-tests.ts b/types/webtorrent/webtorrent-tests.ts similarity index 100% rename from webtorrent/webtorrent-tests.ts rename to types/webtorrent/webtorrent-tests.ts diff --git a/webvr-api/index.d.ts b/types/webvr-api/index.d.ts similarity index 100% rename from webvr-api/index.d.ts rename to types/webvr-api/index.d.ts diff --git a/webvr-api/tsconfig.json b/types/webvr-api/tsconfig.json similarity index 100% rename from webvr-api/tsconfig.json rename to types/webvr-api/tsconfig.json diff --git a/webvr-api/webvr-api-tests.ts b/types/webvr-api/webvr-api-tests.ts similarity index 100% rename from webvr-api/webvr-api-tests.ts rename to types/webvr-api/webvr-api-tests.ts diff --git a/week/index.d.ts b/types/week/index.d.ts similarity index 100% rename from week/index.d.ts rename to types/week/index.d.ts diff --git a/week/tsconfig.json b/types/week/tsconfig.json similarity index 100% rename from week/tsconfig.json rename to types/week/tsconfig.json diff --git a/types/week/tslint.json b/types/week/tslint.json new file mode 100644 index 0000000000..ec365f164b --- /dev/null +++ b/types/week/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} diff --git a/week/week-tests.ts b/types/week/week-tests.ts similarity index 100% rename from week/week-tests.ts rename to types/week/week-tests.ts diff --git a/weighted/index.d.ts b/types/weighted/index.d.ts similarity index 100% rename from weighted/index.d.ts rename to types/weighted/index.d.ts diff --git a/weighted/tsconfig.json b/types/weighted/tsconfig.json similarity index 100% rename from weighted/tsconfig.json rename to types/weighted/tsconfig.json diff --git a/weighted/weighted-tests.ts b/types/weighted/weighted-tests.ts similarity index 100% rename from weighted/weighted-tests.ts rename to types/weighted/weighted-tests.ts diff --git a/whatwg-streams/index.d.ts b/types/whatwg-streams/index.d.ts similarity index 100% rename from whatwg-streams/index.d.ts rename to types/whatwg-streams/index.d.ts diff --git a/whatwg-streams/tsconfig.json b/types/whatwg-streams/tsconfig.json similarity index 100% rename from whatwg-streams/tsconfig.json rename to types/whatwg-streams/tsconfig.json diff --git a/whatwg-streams/whatwg-streams-tests.ts b/types/whatwg-streams/whatwg-streams-tests.ts similarity index 100% rename from whatwg-streams/whatwg-streams-tests.ts rename to types/whatwg-streams/whatwg-streams-tests.ts diff --git a/when/index.d.ts b/types/when/index.d.ts similarity index 100% rename from when/index.d.ts rename to types/when/index.d.ts diff --git a/when/tsconfig.json b/types/when/tsconfig.json similarity index 100% rename from when/tsconfig.json rename to types/when/tsconfig.json diff --git a/when/when-tests.ts b/types/when/when-tests.ts similarity index 100% rename from when/when-tests.ts rename to types/when/when-tests.ts diff --git a/which/index.d.ts b/types/which/index.d.ts similarity index 100% rename from which/index.d.ts rename to types/which/index.d.ts diff --git a/which/tsconfig.json b/types/which/tsconfig.json similarity index 100% rename from which/tsconfig.json rename to types/which/tsconfig.json diff --git a/which/which-tests.ts b/types/which/which-tests.ts similarity index 100% rename from which/which-tests.ts rename to types/which/which-tests.ts diff --git a/why-did-you-update/index.d.ts b/types/why-did-you-update/index.d.ts similarity index 100% rename from why-did-you-update/index.d.ts rename to types/why-did-you-update/index.d.ts diff --git a/why-did-you-update/tsconfig.json b/types/why-did-you-update/tsconfig.json similarity index 100% rename from why-did-you-update/tsconfig.json rename to types/why-did-you-update/tsconfig.json diff --git a/why-did-you-update/why-did-you-update-tests.ts b/types/why-did-you-update/why-did-you-update-tests.ts similarity index 100% rename from why-did-you-update/why-did-you-update-tests.ts rename to types/why-did-you-update/why-did-you-update-tests.ts diff --git a/wicg-mediasession/index.d.ts b/types/wicg-mediasession/index.d.ts similarity index 100% rename from wicg-mediasession/index.d.ts rename to types/wicg-mediasession/index.d.ts diff --git a/wicg-mediasession/tsconfig.json b/types/wicg-mediasession/tsconfig.json similarity index 100% rename from wicg-mediasession/tsconfig.json rename to types/wicg-mediasession/tsconfig.json diff --git a/xmpp-jid/tslint.json b/types/wicg-mediasession/tslint.json similarity index 100% rename from xmpp-jid/tslint.json rename to types/wicg-mediasession/tslint.json diff --git a/wicg-mediasession/wicg-mediasession-tests.ts b/types/wicg-mediasession/wicg-mediasession-tests.ts similarity index 100% rename from wicg-mediasession/wicg-mediasession-tests.ts rename to types/wicg-mediasession/wicg-mediasession-tests.ts diff --git a/wiiu/index.d.ts b/types/wiiu/index.d.ts similarity index 100% rename from wiiu/index.d.ts rename to types/wiiu/index.d.ts diff --git a/wiiu/tsconfig.json b/types/wiiu/tsconfig.json similarity index 100% rename from wiiu/tsconfig.json rename to types/wiiu/tsconfig.json diff --git a/wiiu/wiiu-tests.ts b/types/wiiu/wiiu-tests.ts similarity index 100% rename from wiiu/wiiu-tests.ts rename to types/wiiu/wiiu-tests.ts diff --git a/window-or-global/index.d.ts b/types/window-or-global/index.d.ts similarity index 100% rename from window-or-global/index.d.ts rename to types/window-or-global/index.d.ts diff --git a/window-or-global/tsconfig.json b/types/window-or-global/tsconfig.json similarity index 100% rename from window-or-global/tsconfig.json rename to types/window-or-global/tsconfig.json diff --git a/xsd-schema-validator/tslint.json b/types/window-or-global/tslint.json similarity index 100% rename from xsd-schema-validator/tslint.json rename to types/window-or-global/tslint.json diff --git a/window-or-global/window-or-global-tests.ts b/types/window-or-global/window-or-global-tests.ts similarity index 100% rename from window-or-global/window-or-global-tests.ts rename to types/window-or-global/window-or-global-tests.ts diff --git a/window-size/index.d.ts b/types/window-size/index.d.ts similarity index 100% rename from window-size/index.d.ts rename to types/window-size/index.d.ts diff --git a/window-size/tsconfig.json b/types/window-size/tsconfig.json similarity index 100% rename from window-size/tsconfig.json rename to types/window-size/tsconfig.json diff --git a/windows-1251/index.d.ts b/types/windows-1251/index.d.ts similarity index 100% rename from windows-1251/index.d.ts rename to types/windows-1251/index.d.ts diff --git a/windows-1251/tsconfig.json b/types/windows-1251/tsconfig.json similarity index 100% rename from windows-1251/tsconfig.json rename to types/windows-1251/tsconfig.json diff --git a/windows-1251/windows-1251-tests.ts b/types/windows-1251/windows-1251-tests.ts similarity index 100% rename from windows-1251/windows-1251-tests.ts rename to types/windows-1251/windows-1251-tests.ts diff --git a/windows-service/index.d.ts b/types/windows-service/index.d.ts similarity index 100% rename from windows-service/index.d.ts rename to types/windows-service/index.d.ts diff --git a/windows-service/tsconfig.json b/types/windows-service/tsconfig.json similarity index 100% rename from windows-service/tsconfig.json rename to types/windows-service/tsconfig.json diff --git a/windows-service/windows-service-tests.ts b/types/windows-service/windows-service-tests.ts similarity index 100% rename from windows-service/windows-service-tests.ts rename to types/windows-service/windows-service-tests.ts diff --git a/winjs/index.d.ts b/types/winjs/index.d.ts similarity index 100% rename from winjs/index.d.ts rename to types/winjs/index.d.ts diff --git a/winjs/tsconfig.json b/types/winjs/tsconfig.json similarity index 100% rename from winjs/tsconfig.json rename to types/winjs/tsconfig.json diff --git a/winjs/v1/index.d.ts b/types/winjs/v1/index.d.ts similarity index 100% rename from winjs/v1/index.d.ts rename to types/winjs/v1/index.d.ts diff --git a/winjs/v1/tsconfig.json b/types/winjs/v1/tsconfig.json similarity index 100% rename from winjs/v1/tsconfig.json rename to types/winjs/v1/tsconfig.json diff --git a/winjs/v2/index.d.ts b/types/winjs/v2/index.d.ts similarity index 100% rename from winjs/v2/index.d.ts rename to types/winjs/v2/index.d.ts diff --git a/winjs/v2/tsconfig.json b/types/winjs/v2/tsconfig.json similarity index 100% rename from winjs/v2/tsconfig.json rename to types/winjs/v2/tsconfig.json diff --git a/winreg/index.d.ts b/types/winreg/index.d.ts similarity index 100% rename from winreg/index.d.ts rename to types/winreg/index.d.ts diff --git a/winreg/tsconfig.json b/types/winreg/tsconfig.json similarity index 100% rename from winreg/tsconfig.json rename to types/winreg/tsconfig.json diff --git a/winreg/winreg-tests.ts b/types/winreg/winreg-tests.ts similarity index 100% rename from winreg/winreg-tests.ts rename to types/winreg/winreg-tests.ts diff --git a/winrt-uwp/index.d.ts b/types/winrt-uwp/index.d.ts similarity index 100% rename from winrt-uwp/index.d.ts rename to types/winrt-uwp/index.d.ts diff --git a/winrt-uwp/tsconfig.json b/types/winrt-uwp/tsconfig.json similarity index 100% rename from winrt-uwp/tsconfig.json rename to types/winrt-uwp/tsconfig.json diff --git a/winrt/index.d.ts b/types/winrt/index.d.ts similarity index 100% rename from winrt/index.d.ts rename to types/winrt/index.d.ts diff --git a/winrt/tsconfig.json b/types/winrt/tsconfig.json similarity index 100% rename from winrt/tsconfig.json rename to types/winrt/tsconfig.json diff --git a/winston-dynamodb/index.d.ts b/types/winston-dynamodb/index.d.ts similarity index 97% rename from winston-dynamodb/index.d.ts rename to types/winston-dynamodb/index.d.ts index a9d7e9e713..f8177e572b 100644 --- a/winston-dynamodb/index.d.ts +++ b/types/winston-dynamodb/index.d.ts @@ -3,8 +3,6 @@ // Definitions by: nickiannone // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - import * as winston from 'winston'; import { TransportInstance } from 'winston'; export interface DynamoDBTransportOptions { diff --git a/winston-dynamodb/tsconfig.json b/types/winston-dynamodb/tsconfig.json similarity index 100% rename from winston-dynamodb/tsconfig.json rename to types/winston-dynamodb/tsconfig.json diff --git a/winston-dynamodb/winston-dynamodb-tests.ts b/types/winston-dynamodb/winston-dynamodb-tests.ts similarity index 95% rename from winston-dynamodb/winston-dynamodb-tests.ts rename to types/winston-dynamodb/winston-dynamodb-tests.ts index a81cdf32e1..f1e24ff471 100644 --- a/winston-dynamodb/winston-dynamodb-tests.ts +++ b/types/winston-dynamodb/winston-dynamodb-tests.ts @@ -13,7 +13,11 @@ var queryOptions: winston.QueryOptions; var transportOptions: winston.TransportOptions; var loggerOptions: winston.LoggerOptions = { transports: [new (winston.Transport)()], - rewriters: [new (winston.Transport)()], + rewriters: [ + (level: string, msg: string, meta: any): any => { + return meta; + } + ], exceptionHandlers: [new (winston.Transport)()], handleExceptions: false }; @@ -101,7 +105,7 @@ logger = winston.remove(transport); logger = winston.add(transport, {filename: 'path/to/file.log'}); winston.clear(); -logger = winston.profile(str, str, metadata, (err: Error, level: string, msg: string, meta: any):void => { +logger = winston.profile(str, str, metadata, (err: Error, level: string, msg: string, meta: any): void => { }); logger = winston.profile(str); @@ -114,7 +118,7 @@ winston.unhandleExceptions(transport); readableStream = winston.stream(options); -readableStream.on('log', function (log:any):void { +readableStream.on('log', (log: any): void => { console.log(log); }); @@ -155,7 +159,7 @@ logger = logger.add(transport, {filename: 'path/to/file.log'}); logger.clear(); logger = logger.remove(transport); profiler = logger.startTimer(); -logger = logger.profile(str, str, metadata, (err: Error, level: string, msg: string, meta: any):void => { +logger = logger.profile(str, str, metadata, (err: Error, level: string, msg: string, meta: any): void => { }); value = logger.setLevels(value); @@ -167,7 +171,7 @@ logger = profiler.logger; profiler.start = new Date(); let testRewriter : winston.MetadataRewriter; -testRewriter = function(level: string, msg: string, meta: any) { +testRewriter = (level: string, msg: string, meta: any): any => { return meta; }; diff --git a/winston/index.d.ts b/types/winston/index.d.ts similarity index 98% rename from winston/index.d.ts rename to types/winston/index.d.ts index 33c4bf248a..019973fe14 100644 --- a/winston/index.d.ts +++ b/types/winston/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for winston v2.2.0 +// Type definitions for winston 2.3 // Project: https://github.com/flatiron/winston // Definitions by: bonnici , Peter Harris // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -123,8 +123,7 @@ declare namespace winston { unhandleExceptions(...transports: winston.TransportInstance[]): void; add(transport: winston.TransportInstance, options?: winston.TransportOptions, created?: boolean): winston.LoggerInstance; clear(): void; - remove(transport: string): winston.LoggerInstance; - remove(transport: winston.TransportInstance): winston.LoggerInstance; + remove(transport: string | winston.TransportInstance): winston.LoggerInstance; startTimer(): winston.ProfileHandler; profile(id: string, msg?: string, meta?: any, callback?: (err: Error, level: string, msg: string, meta: any) => void): winston.LoggerInstance; addColors(target: AbstractConfigColors): any; @@ -232,13 +231,14 @@ declare namespace winston { configure(options: LoggerOptions): void; setLevels(target: AbstractConfigLevels): any; cli(): LoggerInstance; - + level: string; } export interface LoggerOptions { transports?: TransportInstance[]; - rewriters?: TransportInstance[]; + rewriters?: MetadataRewriter[]; + filters?: MetadataFilter[]; exceptionHandlers?: TransportInstance[]; handleExceptions?: boolean; level?: string; @@ -285,7 +285,7 @@ declare namespace winston { logstash: boolean; depth: string|null; align: boolean; - stderrLevels: {[key: string]: LeveledLogMethod;} + stderrLevels: { [key: string]: LeveledLogMethod; } eol: string; stringify?: (obj: Object) => string; diff --git a/winston/tsconfig.json b/types/winston/tsconfig.json similarity index 100% rename from winston/tsconfig.json rename to types/winston/tsconfig.json diff --git a/winston/winston-tests.ts b/types/winston/winston-tests.ts similarity index 96% rename from winston/winston-tests.ts rename to types/winston/winston-tests.ts index d8ab8a29ee..5d9ae552ce 100644 --- a/winston/winston-tests.ts +++ b/types/winston/winston-tests.ts @@ -13,7 +13,11 @@ var queryOptions: winston.QueryOptions; var transportOptions: winston.TransportOptions; var loggerOptions: winston.LoggerOptions = { transports: [new (winston.Transport)()], - rewriters: [new (winston.Transport)()], + rewriters: [ + (level: string, msg: string, meta: any): any => { + return meta; + } + ], exceptionHandlers: [new (winston.Transport)()], handleExceptions: false }; @@ -107,7 +111,7 @@ logger = winston.remove(transport); logger = winston.add(transport, {filename: 'path/to/file.log'}); winston.clear(); -logger = winston.profile(str, str, metadata, (err: Error, level: string, msg: string, meta: any):void => { +logger = winston.profile(str, str, metadata, (err: Error, level: string, msg: string, meta: any): void => { }); logger = winston.profile(str); @@ -120,7 +124,7 @@ winston.unhandleExceptions(transport); readableStream = winston.stream(options); -readableStream.on('log', function (log:any):void { +readableStream.on('log', (log: any): void => { console.log(log); }); @@ -161,7 +165,7 @@ logger = logger.add(transport, {filename: 'path/to/file.log'}); logger.clear(); logger = logger.remove(transport); profiler = logger.startTimer(); -logger = logger.profile(str, str, metadata, (err: Error, level: string, msg: string, meta: any):void => { +logger = logger.profile(str, str, metadata, (err: Error, level: string, msg: string, meta: any): void => { }); value = logger.setLevels(value); @@ -173,7 +177,7 @@ logger = profiler.logger; profiler.start = new Date(); let testRewriter : winston.MetadataRewriter; -testRewriter = function(level: string, msg: string, meta: any) { +testRewriter = (level: string, msg: string, meta: any): any => { return meta; }; diff --git a/wiredep/index.d.ts b/types/wiredep/index.d.ts similarity index 100% rename from wiredep/index.d.ts rename to types/wiredep/index.d.ts diff --git a/wiredep/tsconfig.json b/types/wiredep/tsconfig.json similarity index 100% rename from wiredep/tsconfig.json rename to types/wiredep/tsconfig.json diff --git a/wiredep/wiredep-tests.ts b/types/wiredep/wiredep-tests.ts similarity index 100% rename from wiredep/wiredep-tests.ts rename to types/wiredep/wiredep-tests.ts diff --git a/wiring-pi/index.d.ts b/types/wiring-pi/index.d.ts similarity index 100% rename from wiring-pi/index.d.ts rename to types/wiring-pi/index.d.ts diff --git a/wiring-pi/tsconfig.json b/types/wiring-pi/tsconfig.json similarity index 100% rename from wiring-pi/tsconfig.json rename to types/wiring-pi/tsconfig.json diff --git a/wiring-pi/wiring-pi-tests.ts b/types/wiring-pi/wiring-pi-tests.ts similarity index 100% rename from wiring-pi/wiring-pi-tests.ts rename to types/wiring-pi/wiring-pi-tests.ts diff --git a/wnumb/index.d.ts b/types/wnumb/index.d.ts similarity index 100% rename from wnumb/index.d.ts rename to types/wnumb/index.d.ts diff --git a/wnumb/tsconfig.json b/types/wnumb/tsconfig.json similarity index 100% rename from wnumb/tsconfig.json rename to types/wnumb/tsconfig.json diff --git a/wnumb/wnumb-tests.ts b/types/wnumb/wnumb-tests.ts similarity index 100% rename from wnumb/wnumb-tests.ts rename to types/wnumb/wnumb-tests.ts diff --git a/wolfy87-eventemitter/index.d.ts b/types/wolfy87-eventemitter/index.d.ts similarity index 100% rename from wolfy87-eventemitter/index.d.ts rename to types/wolfy87-eventemitter/index.d.ts diff --git a/wolfy87-eventemitter/tsconfig.json b/types/wolfy87-eventemitter/tsconfig.json similarity index 100% rename from wolfy87-eventemitter/tsconfig.json rename to types/wolfy87-eventemitter/tsconfig.json diff --git a/wolfy87-eventemitter/wolfy87-eventemitter-tests.ts b/types/wolfy87-eventemitter/wolfy87-eventemitter-tests.ts similarity index 100% rename from wolfy87-eventemitter/wolfy87-eventemitter-tests.ts rename to types/wolfy87-eventemitter/wolfy87-eventemitter-tests.ts diff --git a/wonder-commonlib/index.d.ts b/types/wonder-commonlib/index.d.ts similarity index 100% rename from wonder-commonlib/index.d.ts rename to types/wonder-commonlib/index.d.ts diff --git a/wonder-commonlib/tsconfig.json b/types/wonder-commonlib/tsconfig.json similarity index 100% rename from wonder-commonlib/tsconfig.json rename to types/wonder-commonlib/tsconfig.json diff --git a/wonder-commonlib/wonder-commonlib-tests.ts b/types/wonder-commonlib/wonder-commonlib-tests.ts similarity index 100% rename from wonder-commonlib/wonder-commonlib-tests.ts rename to types/wonder-commonlib/wonder-commonlib-tests.ts diff --git a/wonder-frp/index.d.ts b/types/wonder-frp/index.d.ts similarity index 100% rename from wonder-frp/index.d.ts rename to types/wonder-frp/index.d.ts diff --git a/wonder-frp/tsconfig.json b/types/wonder-frp/tsconfig.json similarity index 100% rename from wonder-frp/tsconfig.json rename to types/wonder-frp/tsconfig.json diff --git a/wonder-frp/wonder-frp-tests.ts b/types/wonder-frp/wonder-frp-tests.ts similarity index 100% rename from wonder-frp/wonder-frp-tests.ts rename to types/wonder-frp/wonder-frp-tests.ts diff --git a/wonder.js/index.d.ts b/types/wonder.js/index.d.ts similarity index 100% rename from wonder.js/index.d.ts rename to types/wonder.js/index.d.ts diff --git a/wonder.js/tsconfig.json b/types/wonder.js/tsconfig.json similarity index 100% rename from wonder.js/tsconfig.json rename to types/wonder.js/tsconfig.json diff --git a/wonder.js/wonder.js-tests.ts b/types/wonder.js/wonder.js-tests.ts similarity index 100% rename from wonder.js/wonder.js-tests.ts rename to types/wonder.js/wonder.js-tests.ts diff --git a/wordcloud/index.d.ts b/types/wordcloud/index.d.ts similarity index 100% rename from wordcloud/index.d.ts rename to types/wordcloud/index.d.ts diff --git a/wordcloud/tsconfig.json b/types/wordcloud/tsconfig.json similarity index 100% rename from wordcloud/tsconfig.json rename to types/wordcloud/tsconfig.json diff --git a/wordcloud/wordcloud-tests.ts b/types/wordcloud/wordcloud-tests.ts similarity index 100% rename from wordcloud/wordcloud-tests.ts rename to types/wordcloud/wordcloud-tests.ts diff --git a/wrap-ansi/index.d.ts b/types/wrap-ansi/index.d.ts similarity index 100% rename from wrap-ansi/index.d.ts rename to types/wrap-ansi/index.d.ts diff --git a/wrap-ansi/tsconfig.json b/types/wrap-ansi/tsconfig.json similarity index 100% rename from wrap-ansi/tsconfig.json rename to types/wrap-ansi/tsconfig.json diff --git a/wrap-ansi/wrap-ansi-tests.ts b/types/wrap-ansi/wrap-ansi-tests.ts similarity index 100% rename from wrap-ansi/wrap-ansi-tests.ts rename to types/wrap-ansi/wrap-ansi-tests.ts diff --git a/wreck/index.d.ts b/types/wreck/index.d.ts similarity index 100% rename from wreck/index.d.ts rename to types/wreck/index.d.ts diff --git a/wreck/tsconfig.json b/types/wreck/tsconfig.json similarity index 100% rename from wreck/tsconfig.json rename to types/wreck/tsconfig.json diff --git a/wreck/wreck-tests.ts b/types/wreck/wreck-tests.ts similarity index 100% rename from wreck/wreck-tests.ts rename to types/wreck/wreck-tests.ts diff --git a/wrench/index.d.ts b/types/wrench/index.d.ts similarity index 100% rename from wrench/index.d.ts rename to types/wrench/index.d.ts diff --git a/wrench/tsconfig.json b/types/wrench/tsconfig.json similarity index 100% rename from wrench/tsconfig.json rename to types/wrench/tsconfig.json diff --git a/wrench/wrench-tests.ts b/types/wrench/wrench-tests.ts similarity index 100% rename from wrench/wrench-tests.ts rename to types/wrench/wrench-tests.ts diff --git a/ws/index.d.ts b/types/ws/index.d.ts similarity index 100% rename from ws/index.d.ts rename to types/ws/index.d.ts diff --git a/ws/tsconfig.json b/types/ws/tsconfig.json similarity index 100% rename from ws/tsconfig.json rename to types/ws/tsconfig.json diff --git a/ws/ws-tests.ts b/types/ws/ws-tests.ts similarity index 100% rename from ws/ws-tests.ts rename to types/ws/ws-tests.ts diff --git a/wu/index.d.ts b/types/wu/index.d.ts similarity index 100% rename from wu/index.d.ts rename to types/wu/index.d.ts diff --git a/wu/tsconfig.json b/types/wu/tsconfig.json similarity index 100% rename from wu/tsconfig.json rename to types/wu/tsconfig.json diff --git a/yeoman-generator/tslint.json b/types/wu/tslint.json similarity index 100% rename from yeoman-generator/tslint.json rename to types/wu/tslint.json diff --git a/wu/wu-tests.ts b/types/wu/wu-tests.ts similarity index 100% rename from wu/wu-tests.ts rename to types/wu/wu-tests.ts diff --git a/x-editable/index.d.ts b/types/x-editable/index.d.ts similarity index 100% rename from x-editable/index.d.ts rename to types/x-editable/index.d.ts diff --git a/x-editable/tsconfig.json b/types/x-editable/tsconfig.json similarity index 100% rename from x-editable/tsconfig.json rename to types/x-editable/tsconfig.json diff --git a/x-editable/x-editable-tests.ts b/types/x-editable/x-editable-tests.ts similarity index 100% rename from x-editable/x-editable-tests.ts rename to types/x-editable/x-editable-tests.ts diff --git a/xadesjs/index.d.ts b/types/xadesjs/index.d.ts similarity index 100% rename from xadesjs/index.d.ts rename to types/xadesjs/index.d.ts diff --git a/xadesjs/tsconfig.json b/types/xadesjs/tsconfig.json similarity index 100% rename from xadesjs/tsconfig.json rename to types/xadesjs/tsconfig.json diff --git a/xadesjs/xadesjs-tests.ts b/types/xadesjs/xadesjs-tests.ts similarity index 100% rename from xadesjs/xadesjs-tests.ts rename to types/xadesjs/xadesjs-tests.ts diff --git a/xdate/index.d.ts b/types/xdate/index.d.ts similarity index 100% rename from xdate/index.d.ts rename to types/xdate/index.d.ts diff --git a/xdate/tsconfig.json b/types/xdate/tsconfig.json similarity index 100% rename from xdate/tsconfig.json rename to types/xdate/tsconfig.json diff --git a/xdate/xdate-tests.ts b/types/xdate/xdate-tests.ts similarity index 100% rename from xdate/xdate-tests.ts rename to types/xdate/xdate-tests.ts diff --git a/xdg-basedir/index.d.ts b/types/xdg-basedir/index.d.ts similarity index 100% rename from xdg-basedir/index.d.ts rename to types/xdg-basedir/index.d.ts diff --git a/xdg-basedir/tsconfig.json b/types/xdg-basedir/tsconfig.json similarity index 100% rename from xdg-basedir/tsconfig.json rename to types/xdg-basedir/tsconfig.json diff --git a/types/xdg-basedir/tslint.json b/types/xdg-basedir/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/types/xdg-basedir/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/xdg-basedir/xdg-basedir-tests.ts b/types/xdg-basedir/xdg-basedir-tests.ts similarity index 100% rename from xdg-basedir/xdg-basedir-tests.ts rename to types/xdg-basedir/xdg-basedir-tests.ts diff --git a/xdomain/index.d.ts b/types/xdomain/index.d.ts similarity index 100% rename from xdomain/index.d.ts rename to types/xdomain/index.d.ts diff --git a/xdomain/tsconfig.json b/types/xdomain/tsconfig.json similarity index 100% rename from xdomain/tsconfig.json rename to types/xdomain/tsconfig.json diff --git a/xdomain/xdomain-tests.ts b/types/xdomain/xdomain-tests.ts similarity index 100% rename from xdomain/xdomain-tests.ts rename to types/xdomain/xdomain-tests.ts diff --git a/types/xlsx/index.d.ts b/types/xlsx/index.d.ts new file mode 100644 index 0000000000..0e05c860a8 --- /dev/null +++ b/types/xlsx/index.d.ts @@ -0,0 +1,284 @@ +// Type definitions for xlsx +// Project: https://github.com/SheetJS/js-xlsx +// Definitions by: themauveavenger +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** Attempts to read filename and parse */ +export declare function readFile(filename: string, opts?: IParsingOptions): IWorkBook; +/** Attempts to parse data */ +export declare function read(data: any, opts?: IParsingOptions): IWorkBook; +/** Attempts to write workbook data to filename */ +export declare function writeFile(data: IWorkBook, filename: string, opts?: IWritingOptions): any; +/** Attempts to write the workbook data */ +export declare function write(data: IWorkBook, opts?: IWritingOptions): any; + +export declare var utils: IUtils; + +export interface IProperties { + LastAuthor?: string + Author?: string; + CreatedDate?: Date; + ModifiedDate?: Date + Application?: string; + AppVersion?: string; + Company?: string; + DocSecurity?: string; + Manager?: string; + HyperlinksChanged?: boolean; + SharedDoc?: boolean; + LinksUpToDate?: boolean; + ScaleCrop?: boolean; + Worksheets?: number; + SheetNames?: string[]; +} + +export interface IParsingOptions { + /** + * Input data encoding + */ + type?: 'base64' | 'binary' | 'buffer' | 'array' | 'file'; + + /** + * Save formulae to the .f field + * @default true + */ + cellFormula?: boolean; + + /** + * Parse rich text and save HTML to the .h field + * @default true + */ + cellHTML?: boolean; + + /** + * Save number format string to the .z field + * @default false + */ + cellNF?: boolean; + + /** + * Save style/theme info to the .s field + * @default false + */ + cellStyles?: boolean; + + /** + * Store dates as type d (default is n) + * @default false + */ + cellDates?: boolean; + + /** + * Create cell objects for stub cells + * @default false + */ + sheetStubs?: boolean; + + /** + * If >0, read the first sheetRows rows + * @default 0 + */ + sheetRows?: number; + + /** + * If true, parse calculation chains + * @default false + */ + bookDeps?: boolean; + + /** + * If true, add raw files to book object + * @default false + */ + bookFiles?: boolean; + + /** + * If true, only parse enough to get book metadata + * @default false + */ + bookProps?: boolean; + + /** + * If true, only parse enough to get the sheet names + * @default false + */ + bookSheets?: boolean; + + /** + * If true, expose vbaProject.bin to vbaraw field + * @default false + */ + bookVBA?: boolean; + + /** + * If defined and file is encrypted, use password + * @default '' + */ + password?: string; +} + +export interface IWritingOptions { + /** + * Output data encoding + */ + type?: 'base64' | 'binary' | 'buffer' | 'file'; + + /** + * Store dates as type d (default is n) + * @default false + */ + cellDates?: boolean; + + /** + * Generate Shared String Table + * @default false + */ + bookSST?: boolean; + + /** + * Type of Workbook + * @default 'xlsx' + */ + bookType?: 'xlsx' | 'xlsm' | 'xlsb' | 'ods' | 'biff2' | 'fods' | 'csv'; + + /** + * Name of Worksheet for single-sheet formats + * @default '' + */ + sheet?: string; + + /** + * Use ZIP compression for ZIP-based formats + * @default false + */ + compression?: boolean; +} + +export interface IWorkBook { + /** + * A dictionary of the worksheets in the workbook. + * Use SheetNames to reference these. + */ + Sheets: { [sheet: string]: IWorkSheet }; + + /** + * ordered list of the sheet names in the workbook + */ + SheetNames: string[]; + + /** + * an object storing the standard properties. wb.Custprops stores custom properties. + * Since the XLS standard properties deviate from the XLSX standard, XLS parsing stores core properties in both places. + */ + Props: IProperties; +} + +/** + * object representing the worksheet + */ +export interface IWorkSheet { + [cell: string]: IWorkSheetCell | any; +} + +export interface IWorkSheetCell { + /** + * The raw value of the cell. + */ + v: string | number | boolean | Date; + + /** + * Formatted text (if applicable) + */ + w?: string; + + /** + * The Excel Data Type of the cell. + * b Boolean, n Number, e error, s String, d Date + */ + t: 'b' | 'n' | 'e' | 's' | 'd'; + + /** + * Cell formula (if applicable) + */ + f?: string; + + /** + * Range of enclosing array if formula is array formula (if applicable) + */ + F?: string; + + /** + * Rich text encoding (if applicable) + */ + r?: string; + + /** + * HTML rendering of the rich text (if applicable) + */ + h?: string; + + /** + * Comments associated with the cell ** + */ + c?: string; + + /** + * Number format string associated with the cell (if requested) + */ + z?: string; + + /** + * Cell hyperlink object (.Target holds link, .tooltip is tooltip) + */ + l?: Object; + + /** + * The style/theme of the cell (if applicable) + */ + s?: Object; +} + +export interface ICell { + /** Column number */ + c: number; + /** Row number */ + r: number; +} + +export interface IRange { + /** Starting cell */ + s: ICell; + /** Ending cell */ + e: ICell; +} + +export interface IUtils { + /** Converts a worksheet object to an array of JSON objects */ + sheet_to_json(worksheet:IWorkSheet, opts?: { + raw?: boolean; + range?: any; + header?: "A"|number|string[]; + }):T[]; + /** Generates delimiter-separated-values output */ + sheet_to_csv(worksheet: IWorkSheet, options?: { FS: string, RS: string }): string; + /** Generates a list of the formulae (with value fallbacks) */ + sheet_to_formulae(worksheet: IWorkSheet):any; + + /** Converts 0-indexed cell address to A1 form */ + encode_cell(cell: ICell): string; + /** Converts 0-indexed row to A1 form */ + encode_row(row: number): string; + /** Converts 0-indexed column to A1 form */ + encode_col(col: number): string; + /** Converts 0-indexed range to A1 form */ + encode_range(s: ICell, e: ICell): string; + + /** Converts A1 cell address to 0-indexed form */ + decode_cell(address: string): ICell; + /** Converts A1 row to 0-indexed form */ + decode_row(row: string): number; + /** Converts A1 column to 0-indexed form */ + decode_col(col: string): number; + /** Converts A1 range to 0-indexed form */ + decode_range(range: string): IRange; +} diff --git a/xlsx/tsconfig.json b/types/xlsx/tsconfig.json similarity index 100% rename from xlsx/tsconfig.json rename to types/xlsx/tsconfig.json diff --git a/xlsx/xlsx-tests.ts b/types/xlsx/xlsx-tests.ts similarity index 100% rename from xlsx/xlsx-tests.ts rename to types/xlsx/xlsx-tests.ts diff --git a/xml-js/index.d.ts b/types/xml-js/index.d.ts similarity index 100% rename from xml-js/index.d.ts rename to types/xml-js/index.d.ts diff --git a/xml-js/tsconfig.json b/types/xml-js/tsconfig.json similarity index 100% rename from xml-js/tsconfig.json rename to types/xml-js/tsconfig.json diff --git a/xml-js/xml-js-tests.ts b/types/xml-js/xml-js-tests.ts similarity index 100% rename from xml-js/xml-js-tests.ts rename to types/xml-js/xml-js-tests.ts diff --git a/xml-parser/index.d.ts b/types/xml-parser/index.d.ts similarity index 100% rename from xml-parser/index.d.ts rename to types/xml-parser/index.d.ts diff --git a/xml-parser/tsconfig.json b/types/xml-parser/tsconfig.json similarity index 100% rename from xml-parser/tsconfig.json rename to types/xml-parser/tsconfig.json diff --git a/xml-parser/xml-parser-tests.ts b/types/xml-parser/xml-parser-tests.ts similarity index 100% rename from xml-parser/xml-parser-tests.ts rename to types/xml-parser/xml-parser-tests.ts diff --git a/xml/index.d.ts b/types/xml/index.d.ts similarity index 100% rename from xml/index.d.ts rename to types/xml/index.d.ts diff --git a/xml/tsconfig.json b/types/xml/tsconfig.json similarity index 100% rename from xml/tsconfig.json rename to types/xml/tsconfig.json diff --git a/types/xml/tslint.json b/types/xml/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/types/xml/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/xml/xml-tests.ts b/types/xml/xml-tests.ts similarity index 100% rename from xml/xml-tests.ts rename to types/xml/xml-tests.ts diff --git a/xml2js/index.d.ts b/types/xml2js/index.d.ts similarity index 100% rename from xml2js/index.d.ts rename to types/xml2js/index.d.ts diff --git a/xml2js/processors.d.ts b/types/xml2js/processors.d.ts similarity index 100% rename from xml2js/processors.d.ts rename to types/xml2js/processors.d.ts diff --git a/xml2js/tsconfig.json b/types/xml2js/tsconfig.json similarity index 100% rename from xml2js/tsconfig.json rename to types/xml2js/tsconfig.json diff --git a/xml2js/xml2js-tests.ts b/types/xml2js/xml2js-tests.ts similarity index 100% rename from xml2js/xml2js-tests.ts rename to types/xml2js/xml2js-tests.ts diff --git a/xml2json/index.d.ts b/types/xml2json/index.d.ts similarity index 100% rename from xml2json/index.d.ts rename to types/xml2json/index.d.ts diff --git a/xml2json/tsconfig.json b/types/xml2json/tsconfig.json similarity index 100% rename from xml2json/tsconfig.json rename to types/xml2json/tsconfig.json diff --git a/types/xml2json/tslint.json b/types/xml2json/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/types/xml2json/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/xml2json/xml2json-tests.ts b/types/xml2json/xml2json-tests.ts similarity index 100% rename from xml2json/xml2json-tests.ts rename to types/xml2json/xml2json-tests.ts diff --git a/xmlbuilder/index.d.ts b/types/xmlbuilder/index.d.ts similarity index 100% rename from xmlbuilder/index.d.ts rename to types/xmlbuilder/index.d.ts diff --git a/xmlbuilder/tsconfig.json b/types/xmlbuilder/tsconfig.json similarity index 100% rename from xmlbuilder/tsconfig.json rename to types/xmlbuilder/tsconfig.json diff --git a/xmlbuilder/xmlbuilder-tests.ts b/types/xmlbuilder/xmlbuilder-tests.ts similarity index 100% rename from xmlbuilder/xmlbuilder-tests.ts rename to types/xmlbuilder/xmlbuilder-tests.ts diff --git a/xmldoc/index.d.ts b/types/xmldoc/index.d.ts similarity index 100% rename from xmldoc/index.d.ts rename to types/xmldoc/index.d.ts diff --git a/xmldoc/tsconfig.json b/types/xmldoc/tsconfig.json similarity index 100% rename from xmldoc/tsconfig.json rename to types/xmldoc/tsconfig.json diff --git a/xmldoc/xmldoc-tests.ts b/types/xmldoc/xmldoc-tests.ts similarity index 100% rename from xmldoc/xmldoc-tests.ts rename to types/xmldoc/xmldoc-tests.ts diff --git a/xmldom/index.d.ts b/types/xmldom/index.d.ts old mode 100755 new mode 100644 similarity index 100% rename from xmldom/index.d.ts rename to types/xmldom/index.d.ts diff --git a/xmldom/tsconfig.json b/types/xmldom/tsconfig.json similarity index 100% rename from xmldom/tsconfig.json rename to types/xmldom/tsconfig.json diff --git a/xmldom/xmldom-tests.ts b/types/xmldom/xmldom-tests.ts similarity index 100% rename from xmldom/xmldom-tests.ts rename to types/xmldom/xmldom-tests.ts diff --git a/xmlpoke/index.d.ts b/types/xmlpoke/index.d.ts similarity index 100% rename from xmlpoke/index.d.ts rename to types/xmlpoke/index.d.ts diff --git a/xmlpoke/tsconfig.json b/types/xmlpoke/tsconfig.json similarity index 100% rename from xmlpoke/tsconfig.json rename to types/xmlpoke/tsconfig.json diff --git a/xmlpoke/xmlpoke-tests.ts b/types/xmlpoke/xmlpoke-tests.ts similarity index 100% rename from xmlpoke/xmlpoke-tests.ts rename to types/xmlpoke/xmlpoke-tests.ts diff --git a/xmlrpc/index.d.ts b/types/xmlrpc/index.d.ts similarity index 100% rename from xmlrpc/index.d.ts rename to types/xmlrpc/index.d.ts diff --git a/xmlrpc/tsconfig.json b/types/xmlrpc/tsconfig.json similarity index 100% rename from xmlrpc/tsconfig.json rename to types/xmlrpc/tsconfig.json diff --git a/xmlrpc/xmlrpc-tests.ts b/types/xmlrpc/xmlrpc-tests.ts similarity index 100% rename from xmlrpc/xmlrpc-tests.ts rename to types/xmlrpc/xmlrpc-tests.ts diff --git a/xmltojson/index.d.ts b/types/xmltojson/index.d.ts similarity index 100% rename from xmltojson/index.d.ts rename to types/xmltojson/index.d.ts diff --git a/xmltojson/tsconfig.json b/types/xmltojson/tsconfig.json similarity index 100% rename from xmltojson/tsconfig.json rename to types/xmltojson/tsconfig.json diff --git a/xmltojson/xmltojson-tests.ts b/types/xmltojson/xmltojson-tests.ts similarity index 100% rename from xmltojson/xmltojson-tests.ts rename to types/xmltojson/xmltojson-tests.ts diff --git a/types/xmpp__jid/index.d.ts b/types/xmpp__jid/index.d.ts new file mode 100644 index 0000000000..b132680c72 --- /dev/null +++ b/types/xmpp__jid/index.d.ts @@ -0,0 +1,62 @@ +// Type definitions for @xmpp/jid 0.0 +// Project: github.com/node-xmpp/node-xmpp/ +// Definitions by: PJakcson +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +// TODO: Once TS2.3 is released, +// https://github.com/Microsoft/TypeScript/issues/14819 should be fixed. +// Then, upgrade this package's typescript version to 2.3 and +// Remove the `declare module` wrapper. +// tslint:disable-next-line no-single-declare-module +declare module "@xmpp/jid" { + export function createJID(local: string, domain: string, resource: string): JID; + export function equal(a: JID, b: JID): boolean; + export function is(a: any): boolean; + + /** + * Created by marcneumann on 17.02.17. + */ + export class JID { + local: string; + domain: string; + resource: string; + + constructor(local: string, domain?: string, resource?: string); + + parseJID(jid: string): void; + + toString(unescape?: any): string; + + /** + * Convenience method to distinguish users + **/ + bare(): JID; + + /** + * Comparison function + **/ + equals(other: JID): boolean; + + /** + * http://xmpp.org/rfcs/rfc6122.html#addressing-localpart + **/ + setLocal(local: string, escape?: any): void; + + getLocal(unescape?: any): string; + + /** + * http://xmpp.org/rfcs/rfc6122.html#addressing-domain + */ + setDomain(value: string): void; + + getDomain(): string; + + /** + * http://xmpp.org/rfcs/rfc6122.html#addressing-resourcepart + */ + setResource(value: string): void; + + getResource(): string; + } +} diff --git a/redux-persist-transform-filter/tsconfig.json b/types/xmpp__jid/tsconfig.json similarity index 89% rename from redux-persist-transform-filter/tsconfig.json rename to types/xmpp__jid/tsconfig.json index ac08736562..b9262f6dfb 100644 --- a/redux-persist-transform-filter/tsconfig.json +++ b/types/xmpp__jid/tsconfig.json @@ -17,6 +17,6 @@ }, "files": [ "index.d.ts", - "redux-persist-transform-filter-tests.ts" + "xmpp__jid-tests.ts" ] } \ No newline at end of file diff --git a/types/xmpp__jid/tslint.json b/types/xmpp__jid/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/types/xmpp__jid/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/xmpp-jid/xmpp-jid-tests.ts b/types/xmpp__jid/xmpp__jid-tests.ts similarity index 96% rename from xmpp-jid/xmpp-jid-tests.ts rename to types/xmpp__jid/xmpp__jid-tests.ts index 2514d5fb8a..1652e054a7 100644 --- a/xmpp-jid/xmpp-jid-tests.ts +++ b/types/xmpp__jid/xmpp__jid-tests.ts @@ -1,4 +1,4 @@ -import {JID} from './index'; +import {JID} from '@xmpp/jid'; /* * All return an instance of JID.JID, the new operator is optional. diff --git a/xregexp/index.d.ts b/types/xregexp/index.d.ts similarity index 100% rename from xregexp/index.d.ts rename to types/xregexp/index.d.ts diff --git a/xregexp/tsconfig.json b/types/xregexp/tsconfig.json similarity index 100% rename from xregexp/tsconfig.json rename to types/xregexp/tsconfig.json diff --git a/xregexp/xregexp-tests.ts b/types/xregexp/xregexp-tests.ts similarity index 100% rename from xregexp/xregexp-tests.ts rename to types/xregexp/xregexp-tests.ts diff --git a/xrm/index.d.ts b/types/xrm/index.d.ts similarity index 100% rename from xrm/index.d.ts rename to types/xrm/index.d.ts diff --git a/xrm/tsconfig.json b/types/xrm/tsconfig.json similarity index 100% rename from xrm/tsconfig.json rename to types/xrm/tsconfig.json diff --git a/xrm/tslint.json b/types/xrm/tslint.json similarity index 100% rename from xrm/tslint.json rename to types/xrm/tslint.json diff --git a/xrm/v6/index.d.ts b/types/xrm/v6/index.d.ts similarity index 100% rename from xrm/v6/index.d.ts rename to types/xrm/v6/index.d.ts diff --git a/xrm/v6/tsconfig.json b/types/xrm/v6/tsconfig.json similarity index 100% rename from xrm/v6/tsconfig.json rename to types/xrm/v6/tsconfig.json diff --git a/xrm/v6/xrm-tests.ts b/types/xrm/v6/xrm-tests.ts similarity index 100% rename from xrm/v6/xrm-tests.ts rename to types/xrm/v6/xrm-tests.ts diff --git a/xrm/v7/UNUSED_FILES.txt b/types/xrm/v7/UNUSED_FILES.txt similarity index 100% rename from xrm/v7/UNUSED_FILES.txt rename to types/xrm/v7/UNUSED_FILES.txt diff --git a/xrm/v7/index.d.ts b/types/xrm/v7/index.d.ts similarity index 100% rename from xrm/v7/index.d.ts rename to types/xrm/v7/index.d.ts diff --git a/xrm/v7/parature.d.ts b/types/xrm/v7/parature.d.ts similarity index 100% rename from xrm/v7/parature.d.ts rename to types/xrm/v7/parature.d.ts diff --git a/xrm/v7/tsconfig.json b/types/xrm/v7/tsconfig.json similarity index 100% rename from xrm/v7/tsconfig.json rename to types/xrm/v7/tsconfig.json diff --git a/xrm/v7/xrm-tests.ts b/types/xrm/v7/xrm-tests.ts similarity index 100% rename from xrm/v7/xrm-tests.ts rename to types/xrm/v7/xrm-tests.ts diff --git a/xrm/xrm-tests.ts b/types/xrm/xrm-tests.ts similarity index 100% rename from xrm/xrm-tests.ts rename to types/xrm/xrm-tests.ts diff --git a/xsd-schema-validator/index.d.ts b/types/xsd-schema-validator/index.d.ts similarity index 100% rename from xsd-schema-validator/index.d.ts rename to types/xsd-schema-validator/index.d.ts diff --git a/xsd-schema-validator/tsconfig.json b/types/xsd-schema-validator/tsconfig.json similarity index 100% rename from xsd-schema-validator/tsconfig.json rename to types/xsd-schema-validator/tsconfig.json diff --git a/types/xsd-schema-validator/tslint.json b/types/xsd-schema-validator/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/types/xsd-schema-validator/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/xsd-schema-validator/xsd-schema-validator-tests.ts b/types/xsd-schema-validator/xsd-schema-validator-tests.ts similarity index 100% rename from xsd-schema-validator/xsd-schema-validator-tests.ts rename to types/xsd-schema-validator/xsd-schema-validator-tests.ts diff --git a/xsockets/index.d.ts b/types/xsockets/index.d.ts similarity index 100% rename from xsockets/index.d.ts rename to types/xsockets/index.d.ts diff --git a/xsockets/tsconfig.json b/types/xsockets/tsconfig.json similarity index 100% rename from xsockets/tsconfig.json rename to types/xsockets/tsconfig.json diff --git a/xsockets/xsockets-tests.ts b/types/xsockets/xsockets-tests.ts similarity index 100% rename from xsockets/xsockets-tests.ts rename to types/xsockets/xsockets-tests.ts diff --git a/xss-filters/index.d.ts b/types/xss-filters/index.d.ts similarity index 100% rename from xss-filters/index.d.ts rename to types/xss-filters/index.d.ts diff --git a/xss-filters/tsconfig.json b/types/xss-filters/tsconfig.json similarity index 100% rename from xss-filters/tsconfig.json rename to types/xss-filters/tsconfig.json diff --git a/xss-filters/xss-filters-tests.ts b/types/xss-filters/xss-filters-tests.ts similarity index 100% rename from xss-filters/xss-filters-tests.ts rename to types/xss-filters/xss-filters-tests.ts diff --git a/xtend/index.d.ts b/types/xtend/index.d.ts similarity index 100% rename from xtend/index.d.ts rename to types/xtend/index.d.ts diff --git a/xtend/tsconfig.json b/types/xtend/tsconfig.json similarity index 100% rename from xtend/tsconfig.json rename to types/xtend/tsconfig.json diff --git a/xtend/xtend-tests.ts b/types/xtend/xtend-tests.ts similarity index 100% rename from xtend/xtend-tests.ts rename to types/xtend/xtend-tests.ts diff --git a/xterm/index.d.ts b/types/xterm/index.d.ts similarity index 100% rename from xterm/index.d.ts rename to types/xterm/index.d.ts diff --git a/xterm/tsconfig.json b/types/xterm/tsconfig.json similarity index 100% rename from xterm/tsconfig.json rename to types/xterm/tsconfig.json diff --git a/xterm/xterm-tests.ts b/types/xterm/xterm-tests.ts similarity index 100% rename from xterm/xterm-tests.ts rename to types/xterm/xterm-tests.ts diff --git a/yamljs/index.d.ts b/types/yamljs/index.d.ts similarity index 100% rename from yamljs/index.d.ts rename to types/yamljs/index.d.ts diff --git a/yamljs/tsconfig.json b/types/yamljs/tsconfig.json similarity index 100% rename from yamljs/tsconfig.json rename to types/yamljs/tsconfig.json diff --git a/yamljs/yamljs-tests.ts b/types/yamljs/yamljs-tests.ts similarity index 100% rename from yamljs/yamljs-tests.ts rename to types/yamljs/yamljs-tests.ts diff --git a/yandex-money-sdk/index.d.ts b/types/yandex-money-sdk/index.d.ts similarity index 100% rename from yandex-money-sdk/index.d.ts rename to types/yandex-money-sdk/index.d.ts diff --git a/yandex-money-sdk/tsconfig.json b/types/yandex-money-sdk/tsconfig.json similarity index 100% rename from yandex-money-sdk/tsconfig.json rename to types/yandex-money-sdk/tsconfig.json diff --git a/yandex-money-sdk/yandex-money-sdk-tests.ts b/types/yandex-money-sdk/yandex-money-sdk-tests.ts similarity index 100% rename from yandex-money-sdk/yandex-money-sdk-tests.ts rename to types/yandex-money-sdk/yandex-money-sdk-tests.ts diff --git a/yargs/.editorconfig b/types/yargs/.editorconfig similarity index 100% rename from yargs/.editorconfig rename to types/yargs/.editorconfig diff --git a/yargs/index.d.ts b/types/yargs/index.d.ts similarity index 100% rename from yargs/index.d.ts rename to types/yargs/index.d.ts diff --git a/yargs/tsconfig.json b/types/yargs/tsconfig.json similarity index 100% rename from yargs/tsconfig.json rename to types/yargs/tsconfig.json diff --git a/yargs/yargs-tests.ts b/types/yargs/yargs-tests.ts similarity index 100% rename from yargs/yargs-tests.ts rename to types/yargs/yargs-tests.ts diff --git a/yayson/index.d.ts b/types/yayson/index.d.ts similarity index 100% rename from yayson/index.d.ts rename to types/yayson/index.d.ts diff --git a/yayson/tsconfig.json b/types/yayson/tsconfig.json similarity index 100% rename from yayson/tsconfig.json rename to types/yayson/tsconfig.json diff --git a/yayson/yayson-tests.ts b/types/yayson/yayson-tests.ts similarity index 100% rename from yayson/yayson-tests.ts rename to types/yayson/yayson-tests.ts diff --git a/ydn-db/index.d.ts b/types/ydn-db/index.d.ts similarity index 100% rename from ydn-db/index.d.ts rename to types/ydn-db/index.d.ts diff --git a/ydn-db/tsconfig.json b/types/ydn-db/tsconfig.json similarity index 100% rename from ydn-db/tsconfig.json rename to types/ydn-db/tsconfig.json diff --git a/ydn-db/ydn-db-tests.ts b/types/ydn-db/ydn-db-tests.ts similarity index 100% rename from ydn-db/ydn-db-tests.ts rename to types/ydn-db/ydn-db-tests.ts diff --git a/yeoman-generator/index.d.ts b/types/yeoman-generator/index.d.ts similarity index 100% rename from yeoman-generator/index.d.ts rename to types/yeoman-generator/index.d.ts diff --git a/yeoman-generator/tsconfig.json b/types/yeoman-generator/tsconfig.json similarity index 100% rename from yeoman-generator/tsconfig.json rename to types/yeoman-generator/tsconfig.json diff --git a/types/yeoman-generator/tslint.json b/types/yeoman-generator/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/types/yeoman-generator/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/yeoman-generator/yeoman-generator-tests.ts b/types/yeoman-generator/yeoman-generator-tests.ts similarity index 100% rename from yeoman-generator/yeoman-generator-tests.ts rename to types/yeoman-generator/yeoman-generator-tests.ts diff --git a/yfiles/index.d.ts b/types/yfiles/index.d.ts similarity index 100% rename from yfiles/index.d.ts rename to types/yfiles/index.d.ts diff --git a/yfiles/tsconfig.json b/types/yfiles/tsconfig.json similarity index 100% rename from yfiles/tsconfig.json rename to types/yfiles/tsconfig.json diff --git a/yfiles/yfiles-tests.ts b/types/yfiles/yfiles-tests.ts similarity index 100% rename from yfiles/yfiles-tests.ts rename to types/yfiles/yfiles-tests.ts diff --git a/yosay/index.d.ts b/types/yosay/index.d.ts similarity index 100% rename from yosay/index.d.ts rename to types/yosay/index.d.ts diff --git a/yosay/tsconfig.json b/types/yosay/tsconfig.json similarity index 100% rename from yosay/tsconfig.json rename to types/yosay/tsconfig.json diff --git a/yosay/yosay-tests.ts b/types/yosay/yosay-tests.ts similarity index 100% rename from yosay/yosay-tests.ts rename to types/yosay/yosay-tests.ts diff --git a/types/youtube/index.d.ts b/types/youtube/index.d.ts new file mode 100644 index 0000000000..a45ec6a8c8 --- /dev/null +++ b/types/youtube/index.d.ts @@ -0,0 +1,935 @@ +// Type definitions for YouTube +// Project: https://developers.google.com/youtube/ +// Definitions by: Daz Wilkin , +// Ian Obermiller , +// Josh Goldberg +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +/** + * @see https://developers.google.com/youtube/iframe_api_reference + * @see https://developers.google.com/YouTube/player_parameters + */ +declare namespace YT +{ + /** + * State of a video player. + */ + export enum PlayerState + { + UNSTARTED = -1, + ENDED = 0, + PLAYING = 1, + PAUSED = 2, + BUFFERING = 3, + CUED = 5 + } + + /** + * Known causes for player errors. + */ + export const enum PlayerError + { + /** + * The request contained an invalid parameter value. + */ + InvalidParam = 2, + + /** + * The requested content cannot be played in an HTML5 player. + */ + Html5Error = 5, + + /** + * The video requested was not found. + */ + VideoNotFound = 100, + + /** + * The owner of the requested video does not allow it to be played in embedded players. + */ + EmbeddingNotAllowed = 101, + + /** + * This error is the same as 101. It's just a 101 error in disguise! + */ + EmbeddingNotAllowed2 = 150 + } + + /** + * Whether to auto-hide video controls. + */ + export const enum AutoHide + { + /** + * Controls are visible throughout the video + */ + AlwaysVisible = 0, + + /** + * Progress bar and player controls slide out of view after a couple of seconds. + */ + HideAllControls = 1, + + /** + * Progress bar fades out while the player controls remain visible. + */ + HideProgressBar = 2 + } + + /** + * Whether to autoplay the video. + */ + export const enum AutoPlay + { + /** + * Video does not autoplay. + */ + NoAutoPlay = 0, + + /** + * Video will autoplay when loaded. + */ + AutoPlay = 1 + } + + /** + * Whether to use user-preferred or forced caption loading. + */ + export const enum ClosedCaptionsLoadPolicy + { + /** + * Defaults to the user's preferences. + */ + UserDefault = 0, + + /** + * For closed captions to be shown. + */ + ForceOn = 1 + } + + /** + * Allowed progress bar colors. + */ + export type ProgressBarColor = "red" | "white"; + + /** + * How video controls are shown. + */ + export const enum Controls + { + /** + * Player controls do not display. + */ + Hide = 0, + + /** + * Player controls display. + */ + ShowLoadPlayer = 1, + + /** + * Player controls display after a delay. + */ + ShowDelayLoadPlayer = 2 + } + + /** + * Whether to allow keyboard controls. + */ + export const enum KeyboardControls + { + /** + * Keyboard controls are enabled. + */ + Enable = 0, + + /** + * Keyboard controls are disabled. + */ + Disable = 1 + } + + /** + * Whether the JavaScript API should be enabled. + */ + export const enum JsApi + { + /** + * JavaScript API will be disabled. + */ + Disable = 0, + + /** + * JavaScript API will be enabled. + */ + Enable = 1 + } + + /** + * Whether to display the full-screen button. + */ + export const enum FullscreenButton + { + /** + * The full screen button is hidden. + */ + Hide = 0, + + /** + * The full screen button is visible. + */ + Show = 1 + } + + /** + * Whether to show video annotations. + */ + export const enum IvLoadPolicy + { + /** + * Video annotations will be shown. + */ + Show = 1, + + /** + * Video annotations will not be shown. + */ + Hide = 3 + } + + /** + * Which type of content loads in the player. + */ + export type ListType = ListTypePlayer | ListTypeSearch | ListTypeUserUploads; + + /** + * The requested video should be shown in the player. + */ + export type ListTypePlayer = "player"; + + /** + * A search area should be shown in the player. + */ + export type ListTypeSearch = "search"; + + /** + * The user's uploads should load in the player. + */ + export type ListTypeUserUploads = "user_uploads"; + + /** + * Whether a single video should be looped. + */ + export const enum Loop + { + /** + * Video or playlist will be played only once. + */ + SinglePlay = 0, + + /** + * Video or playlist will be played over and over again. + */ + Loop = 1 + } + + /** + * Comma separated list of video IDs to play after the URL path's video. + */ + export const enum ModestBranding + { + /** + * Player will contain full YouTube branding. + */ + Full = 0, + + /** + * YouTube logo will not display in the control bar. + */ + Modest = 1 + } + + /** + * Whether to show related videos after the video finishes. + */ + export const enum RelatedVideos + { + /** + * Hide related videos after playback is complete. + */ + Hide = 0, + + /** + * Show related videos after playback is complete. + */ + Show = 1 + } + + /** + * Whether to show video information before playing. + */ + export const enum ShowInfo + { + /** + * Hide video title and uploader before video starts playing. + */ + Hide = 0, + + /** + * Show video title and uploader before video starts playing. + */ + Show = 1 + } + + /** + * Base interface for events triggered by a player. + */ + export interface PlayerEvent + { + /** + * Video player corresponding to the event. + */ + target: Player; + } + + /** + * Event for player state change. + */ + export interface OnStateChangeEvent extends PlayerEvent + { + /** + * New player state. + */ + data: PlayerState; + } + + /** + * Event for playback quality change. + */ + export interface OnPlaybackQualityChangeEvent extends PlayerEvent + { + /** + * New playback quality. + */ + data: string; + } + + /** + * Event for playback rate change. + */ + export interface OnPlaybackRateChangeEvent extends PlayerEvent + { + /** + * New playback rate. + */ + data: number; + } + + /** + * Event for a player error. + */ + export interface OnErrorEvent extends PlayerEvent + { + /** + * Which type of error occurred. + */ + data: PlayerError; + } + + /** + * Handles a player event. + * + * @param event The triggering event. + */ + export interface PlayerEventHandler + { + (event: TEvent): void; + } + + /** + * YouTube player options. + */ + export interface PlayerOptions + { + /** + * Player width. + */ + width?: number; + + /** + * Player height + */ + height?: number; + + /** + * ID of the video to load. + */ + videoId: string; + + /** + * Player parameters. + */ + playerVars?: PlayerVars; + + /** + * Handlers for events fired by the player. + */ + events?: Events; + } + + /** + * Allowed suggested player video qualities. + */ + export type SuggestedVideoQuality = ( + VideoQualityDefault + | VideoQualitySmall + | VideoQualityMedium + | VideoQualityLarge + | VideoQualityHD720 + | VideoQualityHD1080 + | VideoQualityHighRes); + + /** + * Default video quality chosen by YouTube. + */ + export type VideoQualityDefault = "default"; + + /** + * Player height is 240px, and player dimensions are at least 320px by 240px for 4:3 aspect ratio. + */ + export type VideoQualitySmall = "small"; + + /** + * Player height is 360px, and player dimensions are 640px by 360px (for 16:9 aspect ratio) or 480px by 360px (for 4:3 aspect ratio). + */ + export type VideoQualityMedium = "medium"; + + /** + * Player height is 480px, and player dimensions are 853px by 480px (for 16:9 aspect ratio) or 640px by 480px (for 4:3 aspect ratio). + */ + export type VideoQualityLarge = "large"; + + /** + * Player height is 720px, and player dimensions are 1280px by 720px (for 16:9 aspect ratio) or 960px by 720px (for 4:3 aspect ratio). + */ + export type VideoQualityHD720 = "hd720"; + + /** + * Player height is 1080px, and player dimensions are 1920px by 1080px (for 16:9 aspect ratio) or 1440px by 1080px (for 4:3 aspect ratio). + */ + export type VideoQualityHD1080 = "hd1080"; + + /** + * Player height is greater than 1080px, which means that the player's aspect ratio is greater than 1920px by 1080px. + */ + export type VideoQualityHighRes = "highres"; + + /** + * Player parameters. + */ + export interface PlayerVars + { + /** + * Whether to autohide video controls (by default, HideProgressBar). + */ + autohide?: AutoHide; + + /** + * Whether to autoplay the video (by default, NoAutoPlay). + */ + autoplay?: AutoPlay; + + /** + * Whether to use user-preferred or forced caption loading (by default, UserDefault). + */ + cc_load_policy?: ClosedCaptionsLoadPolicy; + + /** + * Player progress bar color + */ + color?: ProgressBarColor; + + /** + * How video controls are shown (by default, ShowLoadPlayer). + */ + controls?: Controls; + + /** + * Whether to allow keyboard controls (by default, Enable). + */ + disablekb?: KeyboardControls; + + /** + * Whether the JavaScript API should be enabled (by default, Disable). + */ + enablejsapi?: JsApi; + + /** + * Time, in seconds from the beginning of the video, when to stop playing. + */ + end?: number; + + /** + * Whether to display the full-screen button (by default, Show). + */ + fs?: FullscreenButton; + + /** + * Player language as an ISO 639-1 two-letter language code or fully-specified locale. + */ + hl?: string; + + /** + * Whether to show video annotations (by default, Show). + */ + iv_load_policy?: IvLoadPolicy; + + /** + * Identifies content that will load. + * If listType is search, this is the search query. + * If listType is user_uploads, this is the YouTube user. + * If listType is playlist, this is the playlist ID, prepended by 'PL'. + */ + list?: string; + + /** + * Which type of content loads in the player. + */ + listType?: ListType; + + /** + * Whether a single video should be looped (by default, SinglePlay). + */ + loop?: Loop; + + /** + * Whether to hide some YouTube branding (by default, Full). + */ + modestbranding?: ModestBranding; + + /** + * Origin domain for additional security if using the JavaScript API. + */ + origin?: string; + + /** + * Comma separated list of video IDs to play after the URL path's video. + */ + playlist?: string; + + /** + * Whether to show related videos after the video finishes (by default, Show). + */ + rel?: RelatedVideos; + + /** + * Whether to show video information before playing (by default, Show). + */ + showinfo?: ShowInfo; + + /** + * Time, in seconds from the beginning of the video, when to start playing. + */ + start?: number; + } + + /** + * Handlers for events fired by the player. + */ + export interface Events + { + /** + * Event fired when a player has finished loading and is ready to begin receiving API calls. + */ + onReady?: PlayerEventHandler; + + /** + * Event fired when the player's state changes. + */ + onStateChange?: PlayerEventHandler; + + /** + * Event fired when the playback quality of the player changes. + */ + onPlaybackQualityChange?: PlayerEventHandler; + + /** + * Event fired when the playback rate of the player changes. + */ + onPlaybackRateChange?: PlayerEventHandler; + + /** + * Event fired when an error in the player occurs + */ + onError?: PlayerEventHandler; + + /** + * Event fired to indicate thath the player has loaded, or unloaded, a module + * with exposed API methods. This currently only occurs for closed captioning. + */ + onApiChange?: PlayerEventHandler; + } + + /** + * Settings to load, play, or queue a video or playlist. + */ + export interface VideoOrPlaylistSettings { + /** + * Time, in seconds from the beginning of the (first) video, when to start playing. + */ + startSeconds?: number; + + /** + * Time, in seconds from the end of the (first) video, when to end playing. + */ + endSeconds?: number; + + /** + * Suggested video player quality. + */ + suggestedQuality?: SuggestedVideoQuality + } + + /** + * Settings to play or queue a video by ID. + */ + export interface VideoByIdSettings extends VideoOrPlaylistSettings { + /** + * Video ID. + */ + videoId: string; + } + + /** + * Settings to play or queue a video by media content URL. + */ + export interface VideoByMediaContentUrlSettings extends VideoOrPlaylistSettings { + /** + * Fully qualified player URL. + */ + mediaContentUrl: string; + } + + /** + * Settings to load or queue a playlist. + */ + export interface IPlaylistSettings extends VideoOrPlaylistSettings { + /** + * Identifier for the listType videos list. + */ + list: string; + + /** + * Which type of content loads in the player. + */ + listType?: ListType; + + /** + * Start index of the playlist, if not 0. + */ + index?: number; + } + + /** + * Creates and controls a YouTube player in an