diff --git a/3d-bin-packing/tsconfig.json b/3d-bin-packing/tsconfig.json index 21d0f342af..18e4645ac9 100644 --- a/3d-bin-packing/tsconfig.json +++ b/3d-bin-packing/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/README.md b/README.md index 6586a6c99e..1ffdd93a1b 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ Your package should have this structure: Generate these by running `npm run new-package -- new-package-name`. -You may edit the `tsconfig.json` to add new files or to add the `"jsx"` compiler option. +You may edit the `tsconfig.json` to add new files, to add to `"lib"`, or to add the `"jsx"` compiler option. DefinitelyTyped members routinely monitor for new PRs, though keep in mind that the number of other PRs may slow things down. diff --git a/abs/tsconfig.json b/abs/tsconfig.json index 117ef41b8f..8921c60cd0 100644 --- a/abs/tsconfig.json +++ b/abs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/absolute/tsconfig.json b/absolute/tsconfig.json index 78082718ae..d12e097c74 100644 --- a/absolute/tsconfig.json +++ b/absolute/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/acc-wizard/tsconfig.json b/acc-wizard/tsconfig.json index a0334835e4..96105a9957 100644 --- a/acc-wizard/tsconfig.json +++ b/acc-wizard/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/accepts/tsconfig.json b/accepts/tsconfig.json index 28a7f4c4af..8df97d74f7 100644 --- a/accepts/tsconfig.json +++ b/accepts/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/accounting/tsconfig.json b/accounting/tsconfig.json index ca14419628..7ce026ff30 100644 --- a/accounting/tsconfig.json +++ b/accounting/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ace/tsconfig.json b/ace/tsconfig.json index 0a65374983..799f241178 100644 --- a/ace/tsconfig.json +++ b/ace/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/acl/tsconfig.json b/acl/tsconfig.json index d663cdaa7f..b485f342af 100644 --- a/acl/tsconfig.json +++ b/acl/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/acorn/tsconfig.json b/acorn/tsconfig.json index d85e0fedb0..fbdc652a87 100644 --- a/acorn/tsconfig.json +++ b/acorn/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/actioncable/tsconfig.json b/actioncable/tsconfig.json index fa0376b143..d985971a65 100644 --- a/actioncable/tsconfig.json +++ b/actioncable/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/activex-data-objects/tsconfig.json b/activex-data-objects/tsconfig.json index c272f71ecb..aa81742f09 100644 --- a/activex-data-objects/tsconfig.json +++ b/activex-data-objects/tsconfig.json @@ -1,7 +1,11 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom", + "scripthost" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/activex-scripting-runtime/tsconfig.json b/activex-scripting-runtime/tsconfig.json index bae3467f9d..f5e74f9dd6 100644 --- a/activex-scripting-runtime/tsconfig.json +++ b/activex-scripting-runtime/tsconfig.json @@ -1,7 +1,11 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom", + "scripthost" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/activex-windows-image-acquisition/tsconfig.json b/activex-windows-image-acquisition/tsconfig.json index d280e07763..486d95921c 100644 --- a/activex-windows-image-acquisition/tsconfig.json +++ b/activex-windows-image-acquisition/tsconfig.json @@ -1,7 +1,11 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom", + "scripthost" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/adal/tsconfig.json b/adal/tsconfig.json index cabee4eec0..236017077a 100644 --- a/adal/tsconfig.json +++ b/adal/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/add2home/tsconfig.json b/add2home/tsconfig.json index e9738e2267..ff9b311d2b 100644 --- a/add2home/tsconfig.json +++ b/add2home/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/adm-zip/tsconfig.json b/adm-zip/tsconfig.json index 1814ca1311..3287d252d6 100644 --- a/adm-zip/tsconfig.json +++ b/adm-zip/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ag-grid/tsconfig.json b/ag-grid/tsconfig.json index d74a60fe23..fd05cca8e1 100644 --- a/ag-grid/tsconfig.json +++ b/ag-grid/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/agenda/tsconfig.json b/agenda/tsconfig.json index 0e8e491f1e..22adf1f746 100644 --- a/agenda/tsconfig.json +++ b/agenda/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/alertify/tsconfig.json b/alertify/tsconfig.json index e0a41bca1a..56d098af47 100644 --- a/alertify/tsconfig.json +++ b/alertify/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/alexa-sdk/tsconfig.json b/alexa-sdk/tsconfig.json index f11c860e7d..26757de01c 100644 --- a/alexa-sdk/tsconfig.json +++ b/alexa-sdk/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/algoliasearch/tsconfig.json b/algoliasearch/tsconfig.json index d9b7f174ed..5c32bb92c1 100644 --- a/algoliasearch/tsconfig.json +++ b/algoliasearch/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/alt/tsconfig.json b/alt/tsconfig.json index 43d717e299..9d70eb5d76 100644 --- a/alt/tsconfig.json +++ b/alt/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/amazon-product-api/tsconfig.json b/amazon-product-api/tsconfig.json index 625f8cbcb6..900bf22474 100644 --- a/amazon-product-api/tsconfig.json +++ b/amazon-product-api/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/amcharts/tsconfig.json b/amcharts/tsconfig.json index bf97b93a4d..9661cf12ad 100644 --- a/amcharts/tsconfig.json +++ b/amcharts/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/amplify-deferred/tsconfig.json b/amplify-deferred/tsconfig.json index 682819cad8..fc6466d629 100644 --- a/amplify-deferred/tsconfig.json +++ b/amplify-deferred/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/amplify/tsconfig.json b/amplify/tsconfig.json index a65fb478f3..c30882c681 100644 --- a/amplify/tsconfig.json +++ b/amplify/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/amplitude-js/tsconfig.json b/amplitude-js/tsconfig.json index b75d7280bf..ec0c948bff 100644 --- a/amplitude-js/tsconfig.json +++ b/amplitude-js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/amqp-rpc/tsconfig.json b/amqp-rpc/tsconfig.json index 2433bce5bb..0f5df30f7c 100644 --- a/amqp-rpc/tsconfig.json +++ b/amqp-rpc/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/amqplib/callback_api.d.ts b/amqplib/callback_api.d.ts new file mode 100644 index 0000000000..5d025bf314 --- /dev/null +++ b/amqplib/callback_api.d.ts @@ -0,0 +1,59 @@ +import events = require('events'); +import { Replies, Options, Message } from './properties'; +export * from './properties'; + +export interface Connection extends events.EventEmitter { + close(callback?: (err: any) => void): void; + createChannel(callback: (err: any, channel: Channel) => void): void; + createConfirmChannel(callback: (err: any, confirmChannel: ConfirmChannel) => void): void; +} + +export interface Channel extends events.EventEmitter { + close(callback: (err: any) => void): void; + + assertQueue(queue?: string, options?: Options.AssertQueue, callback?: (err: any, ok: Replies.AssertQueue) => void): void; + checkQueue(queue: string, callback?: (err: any, ok: Replies.AssertQueue) => void): void; + + deleteQueue(queue: string, options?: Options.DeleteQueue, callback?: (err: any, ok: Replies.DeleteQueue) => void): void; + purgeQueue(queue: string, callback?: (err: any, ok: Replies.PurgeQueue) => void): void; + + bindQueue(queue: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void; + unbindQueue(queue: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void; + + assertExchange(exchange: string, type: string, options?: Options.AssertExchange, callback?: (err: any, ok: Replies.AssertExchange) => void): void; + checkExchange(exchange: string, callback?: (err: any, ok: Replies.Empty) => void): void; + + deleteExchange(exchange: string, options?: Options.DeleteExchange, callback?: (err: any, ok: Replies.Empty) => void): void; + + bindExchange(destination: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void; + unbindExchange(destination: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void; + + publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish): boolean; + sendToQueue(queue: string, content: Buffer, options?: Options.Publish): boolean; + + consume(queue: string, onMessage: (msg: Message) => any, options?: Options.Consume, callback?: (err: any, ok: Replies.Consume) => void): void; + + cancel(consumerTag: string, callback?: (err: any, ok: Replies.Empty) => void): void; + get(queue: string, options?: Options.Get, callback?: (err: any, ok: Message | boolean) => void): void; + + ack(message: Message, allUpTo?: boolean): void; + ackAll(): void; + + nack(message: Message, allUpTo?: boolean, requeue?: boolean): void; + nackAll(requeue?: boolean): void; + reject(message: Message, requeue?: boolean): void; + + prefetch(count: number, global?: boolean): void; + recover(callback?: (err: any, ok: Replies.Empty) => void): void; +} + +export interface ConfirmChannel extends Channel { + publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish, callback?: (err: any, ok: Replies.Empty) => void): boolean; + sendToQueue(queue: string, content: Buffer, options?: Options.Publish, callback?: (err: any, ok: Replies.Empty) => void): boolean; + + waitForConfirms(callback?: (err: any) => void): void; +} + +export function connect(callback: (err: any, connection: Connection) => void): void; +export function connect(url: string, callback: (err: any, connection: Connection) => void): void; +export function connect(url: string, socketOptions: any, callback: (err: any, connection: Connection) => void): void; diff --git a/amqplib/index.d.ts b/amqplib/index.d.ts index b406e00ac0..6cd326cd67 100644 --- a/amqplib/index.d.ts +++ b/amqplib/index.d.ts @@ -1,226 +1,65 @@ -// Type definitions for amqplib 0.5.x +// Type definitions for amqplib 0.5 // Project: https://github.com/squaremo/amqp.node // Definitions by: Michael Nahkies , Ab Reitsma , Nicolás Fantone // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// -declare module 'amqplib' { - import * as Promise from 'bluebird'; - import * as events from 'events'; - import shared = require('amqplib/properties'); +import * as Promise from 'bluebird'; +import * as events from 'events'; +import { Replies, Options, Message } from './properties'; +export * from './properties'; - export import Replies = shared.Replies; - export import Options = shared.Options; - export import Message = shared.Message; - - export interface Connection extends events.EventEmitter { - close(): Promise; - createChannel(): Promise; - createConfirmChannel(): Promise; - } - - export interface Channel extends events.EventEmitter { - close(): Promise; - - assertQueue(queue: string, options?: Options.AssertQueue): Promise; - checkQueue(queue: string): Promise; - - deleteQueue(queue: string, options?: Options.DeleteQueue): Promise; - purgeQueue(queue: string): Promise; - - bindQueue(queue: string, source: string, pattern: string, args?: any): Promise; - unbindQueue(queue: string, source: string, pattern: string, args?: any): Promise; - - assertExchange(exchange: string, type: string, options?: Options.AssertExchange): Promise; - checkExchange(exchange: string): Promise; - - deleteExchange(exchange: string, options?: Options.DeleteExchange): Promise; - - bindExchange(destination: string, source: string, pattern: string, args?: any): Promise; - unbindExchange(destination: string, source: string, pattern: string, args?: any): Promise; - - publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish): boolean; - sendToQueue(queue: string, content: Buffer, options?: Options.Publish): boolean; - - consume(queue: string, onMessage: (msg: Message) => any, options?: Options.Consume): Promise; - - cancel(consumerTag: string): Promise; - get(queue: string, options?: Options.Get): Promise; - - ack(message: Message, allUpTo?: boolean): void; - ackAll(): void; - - nack(message: Message, allUpTo?: boolean, requeue?: boolean): void; - nackAll(requeue?: boolean): void; - reject(message: Message, requeue?: boolean): void; - - prefetch(count: number, global?: boolean): Promise; - recover(): Promise; - } - - export interface ConfirmChannel extends Channel { - publish(exchange:string, routingKey:string, content:Buffer, options?:Options.Publish, callback?:(err:any, ok:Replies.Empty) => void):boolean; - sendToQueue(queue:string, content:Buffer, options?:Options.Publish, callback?:(err:any, ok:Replies.Empty) => void):boolean; - - waitForConfirms(): Promise; - } - - export function connect(url: string, socketOptions?: any): Promise; +export interface Connection extends events.EventEmitter { + close(): Promise; + createChannel(): Promise; + createConfirmChannel(): Promise; } -declare module 'amqplib/properties' { - export namespace Replies { - interface Empty { - } - interface AssertQueue { - queue: string; - messageCount: number; - consumerCount: number; - } - interface PurgeQueue { - messageCount: number; - } - interface DeleteQueue { - messageCount: number; - } - interface AssertExchange { - exchange: string; - } - interface Consume { - consumerTag: string; - } - } +export interface Channel extends events.EventEmitter { + close(): Promise; - export namespace Options { - interface AssertQueue { - exclusive?: boolean; - durable?: boolean; - autoDelete?: boolean; - arguments?: any; - messageTtl?: number; - expires?: number; - deadLetterExchange?: string; - deadLetterRoutingKey?: string; - maxLength?: number; - maxPriority?: number; - } - interface DeleteQueue { - ifUnused?: boolean; - ifEmpty?: boolean; - } - interface AssertExchange { - durable?: boolean; - internal?: boolean; - autoDelete?: boolean; - alternateExchange?: string; - arguments?: any; - } - interface DeleteExchange { - ifUnused?: boolean; - } - interface Publish { - expiration?: string | number; - userId?: string; - CC?: string | string[]; + assertQueue(queue: string, options?: Options.AssertQueue): Promise; + checkQueue(queue: string): Promise; - mandatory?: boolean; - persistent?: boolean; - deliveryMode?: boolean | number; - BCC?: string | string[]; + deleteQueue(queue: string, options?: Options.DeleteQueue): Promise; + purgeQueue(queue: string): Promise; - contentType?: string; - contentEncoding?: string; - headers?: any; - priority?: number; - correlationId?: string; - replyTo?: string; - messageId?: string; - timestamp?: number; - type?: string; - appId?: string; - } - interface Consume { - consumerTag?: string; - noLocal?: boolean; - noAck?: boolean; - exclusive?: boolean; - priority?: number; - arguments?: any; - } - interface Get { - noAck?: boolean; - } - } + bindQueue(queue: string, source: string, pattern: string, args?: any): Promise; + unbindQueue(queue: string, source: string, pattern: string, args?: any): Promise; - export interface Message { - content: Buffer; - fields: any; - properties: any; - } + assertExchange(exchange: string, type: string, options?: Options.AssertExchange): Promise; + checkExchange(exchange: string): Promise; + + deleteExchange(exchange: string, options?: Options.DeleteExchange): Promise; + + bindExchange(destination: string, source: string, pattern: string, args?: any): Promise; + unbindExchange(destination: string, source: string, pattern: string, args?: any): Promise; + + publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish): boolean; + sendToQueue(queue: string, content: Buffer, options?: Options.Publish): boolean; + + consume(queue: string, onMessage: (msg: Message) => any, options?: Options.Consume): Promise; + + cancel(consumerTag: string): Promise; + get(queue: string, options?: Options.Get): Promise; + + ack(message: Message, allUpTo?: boolean): void; + ackAll(): void; + + nack(message: Message, allUpTo?: boolean, requeue?: boolean): void; + nackAll(requeue?: boolean): void; + reject(message: Message, requeue?: boolean): void; + + prefetch(count: number, global?: boolean): Promise; + recover(): Promise; } -declare module 'amqplib/callback_api' { - import events = require('events'); - import shared = require('amqplib/properties') +export interface ConfirmChannel extends Channel { + publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish, callback?: (err: any, ok: Replies.Empty) => void): boolean; + sendToQueue(queue: string, content: Buffer, options?: Options.Publish, callback?: (err: any, ok: Replies.Empty) => void): boolean; - export import Replies = shared.Replies; - export import Options = shared.Options; - export import Message = shared.Message; - - export interface Connection extends events.EventEmitter { - close(callback?: (err: any) => void): void; - createChannel(callback: (err: any, channel: Channel) => void): void; - createConfirmChannel(callback: (err: any, confirmChannel: ConfirmChannel) => void): void; - } - - export interface Channel extends events.EventEmitter { - close(callback: (err: any) => void): void; - - assertQueue(queue?: string, options?: Options.AssertQueue, callback?: (err: any, ok: Replies.AssertQueue) => void): void; - checkQueue(queue: string, callback?: (err: any, ok: Replies.AssertQueue) => void): void; - - deleteQueue(queue: string, options?: Options.DeleteQueue, callback?: (err: any, ok: Replies.DeleteQueue) => void): void; - purgeQueue(queue: string, callback?: (err: any, ok: Replies.PurgeQueue) => void): void; - - bindQueue(queue: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void; - unbindQueue(queue: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void; - - assertExchange(exchange: string, type: string, options?: Options.AssertExchange, callback?: (err: any, ok: Replies.AssertExchange) => void): void; - checkExchange(exchange: string, callback?: (err: any, ok: Replies.Empty) => void): void; - - deleteExchange(exchange: string, options?: Options.DeleteExchange, callback?: (err: any, ok: Replies.Empty) => void): void; - - bindExchange(destination: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void; - unbindExchange(destination: string, source: string, pattern: string, args?: any, callback?: (err: any, ok: Replies.Empty) => void): void; - - publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish): boolean; - sendToQueue(queue: string, content: Buffer, options?: Options.Publish): boolean; - - consume(queue: string, onMessage: (msg: Message) => any, options?: Options.Consume, callback?: (err: any, ok: Replies.Consume) => void): void; - - cancel(consumerTag: string, callback?: (err: any, ok: Replies.Empty) => void): void; - get(queue: string, options?: Options.Get, callback?: (err: any, ok: Message | boolean) => void): void; - - ack(message: Message, allUpTo?: boolean): void; - ackAll(): void; - - nack(message: Message, allUpTo?: boolean, requeue?: boolean): void; - nackAll(requeue?: boolean): void; - reject(message: Message, requeue?: boolean): void; - - prefetch(count: number, global?: boolean): void; - recover(callback?: (err: any, ok: Replies.Empty) => void): void; - } - - export interface ConfirmChannel extends Channel { - publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish, callback?: (err: any, ok: Replies.Empty) => void): boolean; - sendToQueue(queue: string, content: Buffer, options?: Options.Publish, callback?: (err: any, ok: Replies.Empty) => void): boolean; - - waitForConfirms(callback?: (err: any) => void): void; - } - - export function connect(callback: (err: any, connection: Connection) => void): void; - export function connect(url: string, callback: (err: any, connection: Connection) => void): void; - export function connect(url: string, socketOptions: any, callback: (err: any, connection: Connection) => void): void; + waitForConfirms(): Promise; } + +export function connect(url: string, socketOptions?: any): Promise; diff --git a/amqplib/properties.d.ts b/amqplib/properties.d.ts new file mode 100644 index 0000000000..12514d7810 --- /dev/null +++ b/amqplib/properties.d.ts @@ -0,0 +1,88 @@ +export namespace Replies { + interface Empty { + } + interface AssertQueue { + queue: string; + messageCount: number; + consumerCount: number; + } + interface PurgeQueue { + messageCount: number; + } + interface DeleteQueue { + messageCount: number; + } + interface AssertExchange { + exchange: string; + } + interface Consume { + consumerTag: string; + } +} + +export namespace Options { + interface AssertQueue { + exclusive?: boolean; + durable?: boolean; + autoDelete?: boolean; + arguments?: any; + messageTtl?: number; + expires?: number; + deadLetterExchange?: string; + deadLetterRoutingKey?: string; + maxLength?: number; + maxPriority?: number; + } + interface DeleteQueue { + ifUnused?: boolean; + ifEmpty?: boolean; + } + interface AssertExchange { + durable?: boolean; + internal?: boolean; + autoDelete?: boolean; + alternateExchange?: string; + arguments?: any; + } + interface DeleteExchange { + ifUnused?: boolean; + } + interface Publish { + expiration?: string | number; + userId?: string; + CC?: string | string[]; + + mandatory?: boolean; + persistent?: boolean; + deliveryMode?: boolean | number; + BCC?: string | string[]; + + contentType?: string; + contentEncoding?: string; + headers?: any; + priority?: number; + correlationId?: string; + replyTo?: string; + messageId?: string; + timestamp?: number; + type?: string; + appId?: string; + } + interface Consume { + consumerTag?: string; + noLocal?: boolean; + noAck?: boolean; + exclusive?: boolean; + priority?: number; + arguments?: any; + } + interface Get { + noAck?: boolean; + } +} + +export interface Message { + content: Buffer; + fields: any; + properties: any; +} \ No newline at end of file diff --git a/amqplib/tsconfig.json b/amqplib/tsconfig.json index e7bc5a878a..1f880d1396 100644 --- a/amqplib/tsconfig.json +++ b/amqplib/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -15,6 +17,7 @@ }, "files": [ "index.d.ts", + "callback_api.d.ts", "amqplib-tests.ts" ] } \ No newline at end of file diff --git a/amqplib/tslint.json b/amqplib/tslint.json new file mode 100644 index 0000000000..9bc375c06b --- /dev/null +++ b/amqplib/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "../tslint.json", + "rules": { + "no-empty-interface": false + } +} \ No newline at end of file diff --git a/analytics-node/tsconfig.json b/analytics-node/tsconfig.json index eb770f82be..e29c706061 100644 --- a/analytics-node/tsconfig.json +++ b/analytics-node/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-agility/tsconfig.json b/angular-agility/tsconfig.json index d8b827bfd7..e93788ab40 100644 --- a/angular-agility/tsconfig.json +++ b/angular-agility/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-animate/tsconfig.json b/angular-animate/tsconfig.json index 5692e5627e..1401eeeedb 100644 --- a/angular-animate/tsconfig.json +++ b/angular-animate/tsconfig.json @@ -4,7 +4,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-bootstrap-calendar/tsconfig.json b/angular-bootstrap-calendar/tsconfig.json index 71d4fd7de1..d568befb6b 100644 --- a/angular-bootstrap-calendar/tsconfig.json +++ b/angular-bootstrap-calendar/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-bootstrap-lightbox/tsconfig.json b/angular-bootstrap-lightbox/tsconfig.json index 462ef95c8c..2bf84b358f 100644 --- a/angular-bootstrap-lightbox/tsconfig.json +++ b/angular-bootstrap-lightbox/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-breadcrumb/tsconfig.json b/angular-breadcrumb/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/angular-breadcrumb/tsconfig.json +++ b/angular-breadcrumb/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-clipboard/tsconfig.json b/angular-clipboard/tsconfig.json index c59541d1d6..4e95bc9714 100644 --- a/angular-clipboard/tsconfig.json +++ b/angular-clipboard/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/angular-cookie/tsconfig.json b/angular-cookie/tsconfig.json index 1d6e7037bc..8bceb7e77b 100644 --- a/angular-cookie/tsconfig.json +++ b/angular-cookie/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-cookies/tsconfig.json b/angular-cookies/tsconfig.json index 5692e5627e..1401eeeedb 100644 --- a/angular-cookies/tsconfig.json +++ b/angular-cookies/tsconfig.json @@ -4,7 +4,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-deferred-bootstrap/tsconfig.json b/angular-deferred-bootstrap/tsconfig.json index c67dc2ba32..5eda2c3552 100644 --- a/angular-deferred-bootstrap/tsconfig.json +++ b/angular-deferred-bootstrap/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-dialog-service/tsconfig.json b/angular-dialog-service/tsconfig.json index a924915069..4c40df5788 100644 --- a/angular-dialog-service/tsconfig.json +++ b/angular-dialog-service/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-dynamic-locale/tsconfig.json b/angular-dynamic-locale/tsconfig.json index 0ac5e902ed..85e4234b51 100644 --- a/angular-dynamic-locale/tsconfig.json +++ b/angular-dynamic-locale/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-environment/tsconfig.json b/angular-environment/tsconfig.json index 3520642e63..8c7dbd4b39 100644 --- a/angular-environment/tsconfig.json +++ b/angular-environment/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-es/tsconfig.json b/angular-es/tsconfig.json index 4e6a8eedd5..27a6433555 100644 --- a/angular-es/tsconfig.json +++ b/angular-es/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-feature-flags/tsconfig.json b/angular-feature-flags/tsconfig.json index a36abdb3a1..43e952a681 100644 --- a/angular-feature-flags/tsconfig.json +++ b/angular-feature-flags/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-file-saver/tsconfig.json b/angular-file-saver/tsconfig.json index 0ee3560e7c..358d72c750 100644 --- a/angular-file-saver/tsconfig.json +++ b/angular-file-saver/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-formly/tsconfig.json b/angular-formly/tsconfig.json index 5bbd17c0c2..06379faf4b 100644 --- a/angular-formly/tsconfig.json +++ b/angular-formly/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-fullscreen/tsconfig.json b/angular-fullscreen/tsconfig.json index d6f6d3475a..6e6e8be685 100644 --- a/angular-fullscreen/tsconfig.json +++ b/angular-fullscreen/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-gettext/tsconfig.json b/angular-gettext/tsconfig.json index 5148d47eb9..906c7b6f00 100644 --- a/angular-gettext/tsconfig.json +++ b/angular-gettext/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-google-analytics/tsconfig.json b/angular-google-analytics/tsconfig.json index b3d6c86c3d..78026bd417 100644 --- a/angular-google-analytics/tsconfig.json +++ b/angular-google-analytics/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-gridster/tsconfig.json b/angular-gridster/tsconfig.json index ad0a51b48f..a266d23b64 100644 --- a/angular-gridster/tsconfig.json +++ b/angular-gridster/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/angular-growl-v2/tsconfig.json b/angular-growl-v2/tsconfig.json index 4b9632329e..30bf2cd4c1 100644 --- a/angular-growl-v2/tsconfig.json +++ b/angular-growl-v2/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-hotkeys/tsconfig.json b/angular-hotkeys/tsconfig.json index 9b83f109d4..57f3f6375b 100644 --- a/angular-hotkeys/tsconfig.json +++ b/angular-hotkeys/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-http-auth/tsconfig.json b/angular-http-auth/tsconfig.json index de4c1c54c8..75f27930ba 100644 --- a/angular-http-auth/tsconfig.json +++ b/angular-http-auth/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-httpi/tsconfig.json b/angular-httpi/tsconfig.json index 5ce96cc629..b149191fb1 100644 --- a/angular-httpi/tsconfig.json +++ b/angular-httpi/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-idle/tsconfig.json b/angular-idle/tsconfig.json index 5c86a83fd2..9aa3da84d3 100644 --- a/angular-idle/tsconfig.json +++ b/angular-idle/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-jwt/tsconfig.json b/angular-jwt/tsconfig.json index 49abf9fb0d..96b47460ce 100644 --- a/angular-jwt/tsconfig.json +++ b/angular-jwt/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-load/tsconfig.json b/angular-load/tsconfig.json index aee2be4824..b9a8bb1819 100644 --- a/angular-load/tsconfig.json +++ b/angular-load/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-loading-bar/tsconfig.json b/angular-loading-bar/tsconfig.json index 32c9a75063..24e7af55dd 100644 --- a/angular-loading-bar/tsconfig.json +++ b/angular-loading-bar/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-local-storage/tsconfig.json b/angular-local-storage/tsconfig.json index 65d3698e22..2df37e062b 100644 --- a/angular-local-storage/tsconfig.json +++ b/angular-local-storage/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-localforage/tsconfig.json b/angular-localforage/tsconfig.json index fd8c932b11..9974f90248 100644 --- a/angular-localforage/tsconfig.json +++ b/angular-localforage/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-locker/tsconfig.json b/angular-locker/tsconfig.json index ec481f65cf..2dfdebd8ad 100644 --- a/angular-locker/tsconfig.json +++ b/angular-locker/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-material/tsconfig.json b/angular-material/tsconfig.json index 5c81b4a02d..dba3d4ed32 100644 --- a/angular-material/tsconfig.json +++ b/angular-material/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-media-queries/tsconfig.json b/angular-media-queries/tsconfig.json index 493c273a2b..7fa741764d 100644 --- a/angular-media-queries/tsconfig.json +++ b/angular-media-queries/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-meteor/tsconfig.json b/angular-meteor/tsconfig.json index 8febc3cb25..07f3a81313 100644 --- a/angular-meteor/tsconfig.json +++ b/angular-meteor/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-mocks/tsconfig.json b/angular-mocks/tsconfig.json index 26d99af5fe..6487dc0dba 100644 --- a/angular-mocks/tsconfig.json +++ b/angular-mocks/tsconfig.json @@ -6,7 +6,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-modal/tsconfig.json b/angular-modal/tsconfig.json index a62e576664..cdbc078a59 100644 --- a/angular-modal/tsconfig.json +++ b/angular-modal/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-notifications/tsconfig.json b/angular-notifications/tsconfig.json index e9fa035ac7..00d57f16e1 100644 --- a/angular-notifications/tsconfig.json +++ b/angular-notifications/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-notify/tsconfig.json b/angular-notify/tsconfig.json index db064d4b3a..30678a1308 100644 --- a/angular-notify/tsconfig.json +++ b/angular-notify/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-odata-resources/tsconfig.json b/angular-odata-resources/tsconfig.json index 70a06903c3..4bb727cafa 100644 --- a/angular-odata-resources/tsconfig.json +++ b/angular-odata-resources/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-permission/tsconfig.json b/angular-permission/tsconfig.json index c577c24510..dbd8053570 100644 --- a/angular-permission/tsconfig.json +++ b/angular-permission/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-promise-tracker/tsconfig.json b/angular-promise-tracker/tsconfig.json index 7b782149cb..e18793a3be 100644 --- a/angular-promise-tracker/tsconfig.json +++ b/angular-promise-tracker/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/angular-q-spread/tsconfig.json b/angular-q-spread/tsconfig.json index 9de57dc2df..4ab75ae3be 100644 --- a/angular-q-spread/tsconfig.json +++ b/angular-q-spread/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-resource/tsconfig.json b/angular-resource/tsconfig.json index 67f7158abc..53d572b642 100644 --- a/angular-resource/tsconfig.json +++ b/angular-resource/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-route/tsconfig.json b/angular-route/tsconfig.json index 139769720d..750627caf0 100644 --- a/angular-route/tsconfig.json +++ b/angular-route/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-sanitize/tsconfig.json b/angular-sanitize/tsconfig.json index 7bb42c2dec..d3804af0bc 100644 --- a/angular-sanitize/tsconfig.json +++ b/angular-sanitize/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-scenario/tsconfig.json b/angular-scenario/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/angular-scenario/tsconfig.json +++ b/angular-scenario/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-scroll/tsconfig.json b/angular-scroll/tsconfig.json index 08f50748ac..09810157e8 100644 --- a/angular-scroll/tsconfig.json +++ b/angular-scroll/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-signalr-hub/tsconfig.json b/angular-signalr-hub/tsconfig.json index 4a970152c4..edc7264376 100644 --- a/angular-signalr-hub/tsconfig.json +++ b/angular-signalr-hub/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-spinner/tsconfig.json b/angular-spinner/tsconfig.json index 7d3a338a97..9f8a416e9e 100644 --- a/angular-spinner/tsconfig.json +++ b/angular-spinner/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-storage/tsconfig.json b/angular-storage/tsconfig.json index 003520747b..2ddc1386e4 100644 --- a/angular-storage/tsconfig.json +++ b/angular-storage/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-strap/tsconfig.json b/angular-strap/tsconfig.json index c906ac720d..44616c2229 100644 --- a/angular-strap/tsconfig.json +++ b/angular-strap/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-toastr/tsconfig.json b/angular-toastr/tsconfig.json index 558e803640..9e8e395643 100644 --- a/angular-toastr/tsconfig.json +++ b/angular-toastr/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-toasty/tsconfig.json b/angular-toasty/tsconfig.json index d3b2bb7dbf..66881e3acf 100644 --- a/angular-toasty/tsconfig.json +++ b/angular-toasty/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/angular-touchspin/tsconfig.json b/angular-touchspin/tsconfig.json index bd902868ad..02708e0656 100644 --- a/angular-touchspin/tsconfig.json +++ b/angular-touchspin/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-translate/tsconfig.json b/angular-translate/tsconfig.json index 5284544f93..b0ed532983 100644 --- a/angular-translate/tsconfig.json +++ b/angular-translate/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-ui-bootstrap/tsconfig.json b/angular-ui-bootstrap/tsconfig.json index 57cf6125c4..242fd49d1e 100644 --- a/angular-ui-bootstrap/tsconfig.json +++ b/angular-ui-bootstrap/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-ui-notification/tsconfig.json b/angular-ui-notification/tsconfig.json index c254264d1d..d46b2d1354 100644 --- a/angular-ui-notification/tsconfig.json +++ b/angular-ui-notification/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-ui-router-default/tsconfig.json b/angular-ui-router-default/tsconfig.json index fb5738335b..7cda72ddf5 100644 --- a/angular-ui-router-default/tsconfig.json +++ b/angular-ui-router-default/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/angular-ui-router-uib-modal/tsconfig.json b/angular-ui-router-uib-modal/tsconfig.json index 043cfffa2a..7924c64716 100644 --- a/angular-ui-router-uib-modal/tsconfig.json +++ b/angular-ui-router-uib-modal/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/angular-ui-router/tsconfig.json b/angular-ui-router/tsconfig.json index 58a6004990..ebac0235fb 100644 --- a/angular-ui-router/tsconfig.json +++ b/angular-ui-router/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/angular-ui-scroll/tsconfig.json b/angular-ui-scroll/tsconfig.json index 97eb534066..897082b4a9 100644 --- a/angular-ui-scroll/tsconfig.json +++ b/angular-ui-scroll/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-ui-sortable/tsconfig.json b/angular-ui-sortable/tsconfig.json index 9d643f200e..80410539a4 100644 --- a/angular-ui-sortable/tsconfig.json +++ b/angular-ui-sortable/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-ui-tree/tsconfig.json b/angular-ui-tree/tsconfig.json index 832beeb0e3..15e286d17d 100644 --- a/angular-ui-tree/tsconfig.json +++ b/angular-ui-tree/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-websocket/tsconfig.json b/angular-websocket/tsconfig.json index 8d31059011..124f24258b 100644 --- a/angular-websocket/tsconfig.json +++ b/angular-websocket/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-wizard/tsconfig.json b/angular-wizard/tsconfig.json index bf9967dc89..ff7d1da277 100644 --- a/angular-wizard/tsconfig.json +++ b/angular-wizard/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular-xeditable/tsconfig.json b/angular-xeditable/tsconfig.json index 1bfc6b2264..93c8382090 100644 --- a/angular-xeditable/tsconfig.json +++ b/angular-xeditable/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular.throttle/tsconfig.json b/angular.throttle/tsconfig.json index 00a72b924c..46b55f70ff 100644 --- a/angular.throttle/tsconfig.json +++ b/angular.throttle/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angular/index.d.ts b/angular/index.d.ts index bae6351cfb..f3f9fc87a6 100644 --- a/angular/index.d.ts +++ b/angular/index.d.ts @@ -1280,7 +1280,15 @@ declare namespace angular { // This corresponds to the "publicLinkFn" returned by $compile. interface ITemplateLinkingFunction { - (scope: IScope, cloneAttachFn?: ICloneAttachFunction): JQuery; + (scope: IScope, cloneAttachFn?: ICloneAttachFunction, options?: ITemplateLinkingFunctionOptions): JQuery; + } + + interface ITemplateLinkingFunctionOptions { + parentBoundTranscludeFn?: ITranscludeFunction, + transcludeControllers?: { + [controller: string]: { instance: IController } + }, + futureParentElement?: JQuery } /** diff --git a/angular/tsconfig.json b/angular/tsconfig.json index 8cd61f15fb..860cc82f22 100644 --- a/angular/tsconfig.json +++ b/angular/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/angularfire/tsconfig.json b/angularfire/tsconfig.json index fbdb58fc98..a0e1af228c 100644 --- a/angularfire/tsconfig.json +++ b/angularfire/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/angularlocalstorage/tsconfig.json b/angularlocalstorage/tsconfig.json index cc91224c3b..bcae5a609f 100644 --- a/angularlocalstorage/tsconfig.json +++ b/angularlocalstorage/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/angulartics/tsconfig.json b/angulartics/tsconfig.json index d1dfb9a0ec..d190dd2ab3 100644 --- a/angulartics/tsconfig.json +++ b/angulartics/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/animation-frame/tsconfig.json b/animation-frame/tsconfig.json index 8148191020..aec9b43665 100644 --- a/animation-frame/tsconfig.json +++ b/animation-frame/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ansi-styles/tsconfig.json b/ansi-styles/tsconfig.json index f1da9621d7..9aa9a851d4 100644 --- a/ansi-styles/tsconfig.json +++ b/ansi-styles/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ansicolors/tsconfig.json b/ansicolors/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/ansicolors/tsconfig.json +++ b/ansicolors/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/antd/tsconfig.json b/antd/tsconfig.json index 086ee4c0fc..6b7785ac6c 100644 --- a/antd/tsconfig.json +++ b/antd/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/any-db-transaction/tsconfig.json b/any-db-transaction/tsconfig.json index 6357e1d1e4..04e83c8b60 100644 --- a/any-db-transaction/tsconfig.json +++ b/any-db-transaction/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/any-db/tsconfig.json b/any-db/tsconfig.json index d48ad90f34..78ed339650 100644 --- a/any-db/tsconfig.json +++ b/any-db/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/anybar/tsconfig.json b/anybar/tsconfig.json index b0527674b4..67676d8dbb 100644 --- a/anybar/tsconfig.json +++ b/anybar/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/anydb-sql-migrations/tsconfig.json b/anydb-sql-migrations/tsconfig.json index 7d76324af5..78eef3d69a 100644 --- a/anydb-sql-migrations/tsconfig.json +++ b/anydb-sql-migrations/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/anydb-sql/tsconfig.json b/anydb-sql/tsconfig.json index 2cfda805ff..92f2bff729 100644 --- a/anydb-sql/tsconfig.json +++ b/anydb-sql/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/apex.js/tsconfig.json b/apex.js/tsconfig.json index 835b16d90b..7f4f681f45 100644 --- a/apex.js/tsconfig.json +++ b/apex.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "apex.js-tests.ts" ] -} +} \ No newline at end of file diff --git a/aphrodite/tsconfig.json b/aphrodite/tsconfig.json index d669701604..d197eb1339 100644 --- a/aphrodite/tsconfig.json +++ b/aphrodite/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/api-error-handler/tsconfig.json b/api-error-handler/tsconfig.json index 7c4620ce17..63f8ed23b4 100644 --- a/api-error-handler/tsconfig.json +++ b/api-error-handler/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/apigee-access/tsconfig.json b/apigee-access/tsconfig.json index 84ec4d7ad5..b13dc3e8ee 100644 --- a/apigee-access/tsconfig.json +++ b/apigee-access/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/apn/tsconfig.json b/apn/tsconfig.json index 66579aa104..a6d716d8fe 100644 --- a/apn/tsconfig.json +++ b/apn/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/app-root-path/tsconfig.json b/app-root-path/tsconfig.json index 3cc9bcb5bd..a3f43b0b45 100644 --- a/app-root-path/tsconfig.json +++ b/app-root-path/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/appframework/tsconfig.json b/appframework/tsconfig.json index cf01c82b57..a672bb4b83 100644 --- a/appframework/tsconfig.json +++ b/appframework/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/appletvjs/tsconfig.json b/appletvjs/tsconfig.json index 973cac356e..777e9522ba 100644 --- a/appletvjs/tsconfig.json +++ b/appletvjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/applicationinsights-js/tsconfig.json b/applicationinsights-js/tsconfig.json index b43cbe673b..3a24c6f936 100644 --- a/applicationinsights-js/tsconfig.json +++ b/applicationinsights-js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/applicationinsights/tsconfig.json b/applicationinsights/tsconfig.json index 5ce4abcfd4..2ee81db96d 100644 --- a/applicationinsights/tsconfig.json +++ b/applicationinsights/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/arbiter/tsconfig.json b/arbiter/tsconfig.json index f46496beda..2b345fa427 100644 --- a/arbiter/tsconfig.json +++ b/arbiter/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/arcgis-js-api/tsconfig.json b/arcgis-js-api/tsconfig.json index eb9ef3d985..a5574d4314 100644 --- a/arcgis-js-api/tsconfig.json +++ b/arcgis-js-api/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/arcgis-js-api/v3/tsconfig.json b/arcgis-js-api/v3/tsconfig.json index d88e99a437..6e7e99e066 100644 --- a/arcgis-js-api/v3/tsconfig.json +++ b/arcgis-js-api/v3/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/arcgis-rest-api/tsconfig.json b/arcgis-rest-api/tsconfig.json index 7e070948a8..34b6945113 100644 --- a/arcgis-rest-api/tsconfig.json +++ b/arcgis-rest-api/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -9,8 +11,7 @@ "typeRoots": [ "../" ], - "types": [ - ], + "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true }, diff --git a/arcgis-to-geojson-utils/tsconfig.json b/arcgis-to-geojson-utils/tsconfig.json index bab5e43e48..a2eb702563 100644 --- a/arcgis-to-geojson-utils/tsconfig.json +++ b/arcgis-to-geojson-utils/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/archiver/tsconfig.json b/archiver/tsconfig.json index 6b43119343..7b043f24e4 100644 --- a/archiver/tsconfig.json +++ b/archiver/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/archy/tsconfig.json b/archy/tsconfig.json index 88c25302ad..ca7e082dcb 100644 --- a/archy/tsconfig.json +++ b/archy/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/argparse/tsconfig.json b/argparse/tsconfig.json index b01153dbc1..31b6cee0f1 100644 --- a/argparse/tsconfig.json +++ b/argparse/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/argv/tsconfig.json b/argv/tsconfig.json index fbf3f7b46d..10c6ce3f11 100644 --- a/argv/tsconfig.json +++ b/argv/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/array-find-index/tsconfig.json b/array-find-index/tsconfig.json index f8fe5d3d72..9cddd0dde7 100644 --- a/array-find-index/tsconfig.json +++ b/array-find-index/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/array-foreach/tsconfig.json b/array-foreach/tsconfig.json index 6b42555b56..d10d11a4a2 100644 --- a/array-foreach/tsconfig.json +++ b/array-foreach/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/array-uniq/tsconfig.json b/array-uniq/tsconfig.json index 70196adde6..29fb9276c8 100644 --- a/array-uniq/tsconfig.json +++ b/array-uniq/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/artyom.js/artyom.js-tests.ts b/artyom.js/artyom.js-tests.ts new file mode 100644 index 0000000000..e70704ad4e --- /dev/null +++ b/artyom.js/artyom.js-tests.ts @@ -0,0 +1,32 @@ +import artyomjs = require('artyom.js'); + +// Get an unique ArtyomJS instance +let artyom = artyomjs.ArtyomBuilder.getInstance(); + +// Add a command (not smart) +artyom.addCommands({ + description: 'Test command', + indexes: ['hello', 'hi'], + action: (i: number) => { + console.log('hello action'); + } +}); + +// Add a smart command +artyom.addCommands({ + description: 'Test command 2', + smart: true, + indexes: ['test *'], + action: (i: number, wildcard: string) => { + console.log('wildcard: ', wildcard); + } +}); + +// Get the browser voices +artyom.getVoices(); + +// Get all supported languages for Artyom +artyom.getLanguage(); + +// Get the artyom.js version +artyom.getVersion(); \ No newline at end of file diff --git a/artyom.js/index.d.ts b/artyom.js/index.d.ts new file mode 100644 index 0000000000..d96880395f --- /dev/null +++ b/artyom.js/index.d.ts @@ -0,0 +1,513 @@ +// Type definitions for artyom.js 1.0 +// Project: https://github.com/sdkcarlos/artyom.js +// Definitions by: Sema García (José Manuel García) +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Extension of Window interface + */ +interface ArtyomWindow extends Window { + webkitSpeechRecognition: any; + SpeechRecognition: any; + SpeechSynthesisUtterance: any; +} + +interface SpeechRecognition extends EventTarget { + grammars: SpeechGrammarList; + lang: string; + continuous: boolean; + interimResults: boolean; + maxAlternatives: number; + serviceURI: string; + start(): void; + stop(): void; + abort(): void; + onaudiostart: (ev: Event) => any; + onsoundstart: (ev: Event) => any; + onspeechstart: (ev: Event) => any; + onspeechend: (ev: Event) => any; + onsoundend: (ev: Event) => any; + onresult: (ev: SpeechRecognitionEvent) => any; + onnomatch: (ev: SpeechRecognitionEvent) => any; + onerror: (ev: SpeechRecognitionError) => any; + onstart: (ev: Event) => any; + onend: (ev: Event) => any; +} + +interface SpeechRecognitionStatic { + prototype: SpeechRecognition; + new (): SpeechRecognition; +} + +declare var SpeechRecognition: SpeechRecognitionStatic; +declare var webkitSpeechRecognition: SpeechRecognitionStatic; + +interface SpeechRecognitionError extends Event { + error: string; + message: string; +} + +interface SpeechRecognitionAlternative { + transcript: string; + confidence: number; +} + +interface SpeechRecognitionResult { + length: number; + item(index: number): SpeechRecognitionAlternative; + [index: number]: SpeechRecognitionAlternative; + isFinal: boolean; +} + +interface SpeechRecognitionResultList { + length: number; + item(index: number): SpeechRecognitionResult; + [index: number]: SpeechRecognitionResult; +} + +interface SpeechRecognitionEvent extends Event { + resultIndex: number; + results: SpeechRecognitionResultList; + interpretation: any; + emma: Document; +} + +interface SpeechGrammar { + src: string; + weight: number; +} + +interface SpeechGrammarStatic { + prototype: SpeechGrammar; + new (): SpeechGrammar; +} + +declare var SpeechGrammar: SpeechGrammarStatic; +declare var webkitSpeechGrammar: SpeechGrammarStatic; + +interface SpeechGrammarList { + length: number; + item(index: number): SpeechGrammar; + [index: number]: SpeechGrammar; + addFromURI(src: string, weight: number): void; + addFromString(string: string, weight: number): void; +} + +interface SpeechGrammarListStatic { + prototype: SpeechGrammarList; + new (): SpeechGrammarList; +} + +declare var SpeechGrammarList: SpeechGrammarListStatic; +declare var webkitSpeechGrammarList: SpeechGrammarListStatic; + +interface SpeechSynthesis extends EventTarget { + pending: boolean; + speaking: boolean; + paused: boolean; + + onvoiceschanged: (ev: Event) => any; + speak(utterance: SpeechSynthesisUtterance): void; + cancel(): void; + pause(): void; + resume(): void; + getVoices(): SpeechSynthesisVoice[]; +} + +interface SpeechSynthesisGetter { + speechSynthesis: SpeechSynthesis; +} + +declare var speechSynthesis: SpeechSynthesis; + +interface SpeechSynthesisUtterance extends EventTarget { + text: string; + lang: string; + voice: SpeechSynthesisVoice; + volume: number; + rate: number; + pitch: number; + + onstart: (ev: SpeechSynthesisEvent) => any; + onend: (ev: SpeechSynthesisEvent) => any; + onerror: (ev: SpeechSynthesisErrorEvent) => any; + onpause: (ev: SpeechSynthesisEvent) => any; + onresume: (ev: SpeechSynthesisEvent) => any; + onmark: (ev: SpeechSynthesisEvent) => any; + onboundary: (ev: SpeechSynthesisEvent) => any; +} + +interface SpeechSynthesisUtteranceStatic { + prototype: SpeechSynthesisUtterance; + new (text?: string): SpeechSynthesisUtterance; +} + +declare var SpeechSynthesisUtterance: SpeechSynthesisUtteranceStatic; + +interface SpeechSynthesisEvent extends Event { + utterance: SpeechSynthesisUtterance; + charIndex: number; + elapsedTime: number; + name: string; +} + +interface SpeechSynthesisErrorEvent extends SpeechSynthesisEvent { + error: string; +} + +interface SpeechSynthesisVoice { + voiceURI: string; + name: string; + lang: string; + localService: boolean; + default: boolean; +} + +declare namespace Artyom { + + interface ArtyomDevice { + isChrome(): boolean; + isMobile(): boolean; + } + + interface ArtyomBrowserVoiceObject { + default: boolean; + lang: string; + localService: false; + name: string; + voiceURI: string; + } + + interface ArtyomConfigProperties { + /** Set the default language of artyom with this property */ + lang?: string; + recognizing?: boolean; + /** Choose if should listen one command and then stops, or listening forever */ + continuous?: boolean; + /** Moderates the speed with which Artyom talks (0 ~ 1) */ + speed?: number; + /** Adjust the volume of the voice of artyom */ + volume?: number; + /** If listen is equal to true the voice recognition will be started otherwise this property can be ignored */ + listen: boolean; + /** Recognition mode: normal, quick, remote */ + mode?: string; + /** Displays all the grammars recognized in the console */ + debug: boolean; + helpers?: { + redirectRecognizedTextOutput: any; + remoteProcessorHandler: any; + lastSay: any; + }; + /** Set a keyword that allows your command to be executed immediately when you say this word (Useful in noisy environments) */ + executionKeyword?: string; + /** Set a keyword that allows to enable the command recognition automatically if this word is recognized while artyom is paused (artyom.dontObey) */ + obeyKeyword?: string; + speaking?: boolean; + obeying?: boolean; + soundex?: boolean; + } + + interface ArtyomCommand { + /** Triggers of the command */ + indexes: string[]; + /** Logic to execute when the command is triggered */ + action: (i: number, wildcard?: string, full?: string) => void; + /** Description of the command */ + description?: string; + /** Flag to specify is a command is either normal or smart */ + smart?: boolean; + } + + interface ArtyomFlags { + restartRecognition: boolean; + } + + interface ArtyomRecognizer { + lang: string; + continuous: boolean; + interimResults: boolean; + start(): void; + stop(): void; + onstart(): void; + onresult(event: any): void; + onerror(event: any): void; + onend(): void; + } + + export 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 + */ + device: ArtyomDevice; + + /** + * Object which provides the speech interface, and set some of its attributes and event handlers + */ + artyomWSR: ArtyomRecognizer; + + /** + * Artyom can return inmediately the voices available in your browser. + * @see http://ourcodeworld.com/projects/projects-documentation/14/read-doc/artyom-getvoices/artyom-js + * @returns {Array} + */ + getVoices(): SpeechSynthesisVoice[]; + + /** + * Returns an array with all the available commands for artyom. + * @see http://ourcodeworld.com/projects/projects-documentation/10/read-doc/artyom-getavailablecommands/artyom-js + * @returns {Array} + */ + getAvailableCommands(): ArtyomCommand[]; + + /** + * Set up artyom for the application. This function will set the default language used by artyom + * or notice the user if artyom is not supported in the actual browser. + * @see http://ourcodeworld.com/projects/projects-documentation/15/read-doc/artyom-initialize/artyom-js + * @param {ArtyomConfigProperties} config + * @returns {Boolean} + */ + initialize(config: ArtyomConfigProperties): boolean; + + /** + * Force artyom to stop listen even if is in continuos mode. + * @see http://ourcodeworld.com/projects/projects-documentation/9/read-doc/artyom-fatality/artyom-js + * @returns {Boolean} + */ + fatality(): boolean; + + /** + * Add dinamically commands to artyom using. You can even add commands while artyom is active. + * @see http://ourcodeworld.com/projects/projects-documentation/4/read-doc/artyom-addcommands/artyom-js + * @param {ArtyomCommand | Array[ArtyomCommand]} newCommand + * @returns {Boolean} + */ + addCommands(newCommand: ArtyomCommand | ArtyomCommand[]): boolean; + + /** + * Remove the commands of artyom with indexes that matches with the given text. + * @see http://ourcodeworld.com/projects/projects-documentation/19/read-doc/artyom-removecommands/artyom-js + * @param {string} identifier + * @returns {Array} + */ + removeCommands(identifier: string): number[]; + + /** + * Removes all the added commands of artyom. + * @see http://ourcodeworld.com/projects/projects-documentation/7/read-doc/artyom-emptycommands/artyom-js + * @returns {Array} + */ + emptyCommands(): ArtyomCommand[]; + + /** + * Stops the actual and pendings messages that artyom have to say. + * @see http://ourcodeworld.com/projects/projects-documentation/23/read-doc/artyom-shutup/artyom-js + */ + shutUp(): void; + + /** + * Returns an object with the actual properties of artyom. + * @see http://ourcodeworld.com/projects/projects-documentation/12/read-doc/artyom-getproperties/artyom-js + * @returns {ArtyomConfigProperties} + */ + getProperties(): ArtyomConfigProperties; + + /** + * Create a listener when an artyom action is called. + * @see http://ourcodeworld.com/projects/projects-documentation/24/read-doc/artyom-when/artyom-js + */ + when(event: any, action: any): any; + + /** + * Returns the code language of artyom according to initialize function. + * @see http://ourcodeworld.com/projects/projects-documentation/11/read-doc/artyom-getlanguage/artyom-js + * @returns {String} Language + */ + getLanguage(): string; + + /** + * Talks a text according to the given parameters (private function). + * @param {String} text Text to be spoken + * @param {Int} actualChunk Number of chunk of the + * @param {Int} totalChunks + * @param {any} callbacks + */ + artyomTalk(text: any, actualChunk: any, totalChunks: any, callbacks: any): any; + + /** + * Splits a string into an array of strings with a limited size (chunk_length). + * @param {String} input text to split into chunks + * @param {Integer} chunk_length limit of characters in every chunk + */ + splitStringByChunks(input: any, chunk_length: any): string[]; + + /** + * Process the given text into chunks and execute the private function artyom_talk. + * @param {String} message Text to be spoken + * @param {Object} callbacks { onStart, onEnd } + * @see http://ourcodeworld.com/projects/projects-documentation/20/read-doc/artyom-say/artyom-js + */ + say(message: any, callbacks: any): void; + + /** + * Repeats the last sentence that artyom said. Useful in noisy environments. + * @param {Boolean} returnObject If set to true, an object with the text and the timestamp when was executed will be returned. + * @see http://ourcodeworld.com/projects/projects-documentation/25/read-doc/artyom-repeatlastsay/artyom-js + */ + repeatLastSay(returnObject: any): void; + + /** + * Verify if the browser supports speechSynthesis. + * @see http://ourcodeworld.com/projects/projects-documentation/40/read-doc/artyom-speechsupported/artyom-js + * @returns {Boolean} + */ + speechSupported(): boolean; + + /** + * Verify if the browser supports webkitSpeechRecognition. + * @see http://ourcodeworld.com/projects/projects-documentation/39/read-doc/artyom-recognizingsupported/artyom-js + * @returns {Boolean} + */ + recognizingSupported(): boolean; + + /** + * Simulate a voice command via JS. + * @see http://ourcodeworld.com/projects/projects-documentation/22/read-doc/artyom-simulateinstruction/artyom-js + * @param {string} sentence + * @returns {Boolean} + */ + simulateInstruction(sentence: string): boolean; + + /** + * Returns an object with data of the matched element. + * @param {string} voiceCommand + * @returns {Object | Function}. There is a result field when the function should return a boolean value. + */ + artyomExecute(voiceCommand: string): any; + + /** + * Displays a message in the console if the artyom propery DEBUG is set to true. + * @param {string} error The error to be debugged + * @param {string} traceLevel Error level: { error | warn | info } + * @see http://ourcodeworld.com/projects/projects-documentation/38/read-doc/artyom-debug/artyom-js + */ + debug(stringEvent: string, traceLevel: string): void; + + /** + * Allows to retrieve the recognized spoken text of artyom and do something with it everytime something is recognized. + * @param {Function} action + * @returns {Boolean} + */ + redirectRecognizedTextOutput(action: () => void): boolean; + + /** + * Says a random quote and returns it's object. + * @param data + */ + sayRandom(data: any): any; + + /** + * Artyom provide an easy way to create a dictation for your user. Just create an instance and start and stop when you want. + */ + newDictation(settings: any): any; + + /** + * A voice prompt will be executed. + */ + newPrompt(config: any): any; + + /** + * Artyom awaits for orders when this function is executed. If artyom gets a first parameter the instance will be stopped. + */ + artyomHey(): any; + + /** + * This function will return the webkitSpeechRecognition object used by artyom retrieve it only to debug on it or get some + * values, do not make changes directly. + */ + getNativeApi(): any; + + /** + * This function returns a boolean according to the SpeechRecognition status if artyom is listening, will return true. + * Note: This is not a feature of SpeechRecognition, therefore this value hangs on the fiability of the onStart and onEnd + * events of the SpeechRecognition + * @returns {Boolean} + */ + isRecognizing(): boolean; + + /** + * This function returns a boolean according to the speechSynthesis status if artyom is speaking, will return true. + * Note: This is not a feature of speechSynthesis, therefore this value hangs on the fiability of the onStart and onEnd + * events of the speechSynthesis. + * @returns {Boolean} + */ + isSpeaking(): boolean; + + /** + * The SpeechSynthesisUtterance objects are stored in the artyom_garbage_collector variable to prevent the wrong behaviour + * of artyom.say. Use this method to clear all spoken SpeechSynthesisUtterance unused objects. + * @returns {Boolean} + */ + clearGarbageCollection(): any; + + /** + * Returns the SpeechSynthesisUtterance garbageobjects. + */ + getGarbageCollection(): any; + + /** + * Pause the processing of commands. Artyom still listening in the background and it can be resumed after a couple of seconds. + * @returns {Boolean} + */ + dontObey(): any; + + /** + * Allow artyom to obey commands again. + * @returns {Boolean} + */ + obey(): any; + + /** + * A boolean to check if artyom is obeying commands or not. + * @returns {Boolean} + */ + isObeying(): boolean; + + /** + * Process the recognized text if artyom is active in remote mode. + * @returns {Boolean} + */ + remoteProcessorService(action: any): any; + + /** + * Returns a string with the actual version of Artyom script. + * @returns {String} + */ + getVersion(): string; + + /** + * Add commands like an artisan. If you use artyom for simple + * tasks then probably you don't like to write a lot to achieve it. + * Use the artisan syntax to write less, but with the same accuracy. + * @disclaimer Not a promise-based implementation, just syntax. + * @returns {Object} + */ + on(indexes: any, smart: any): any; + } + + /** + * ArtyomBuilder bla, bla... + */ + export class ArtyomBuilder { + /** + * Method to bla, bla, bla... + */ + static getInstance(): ArtyomJS + } + +} + +//tslint:disable-next-line:export-just-namespace +export = Artyom; +export as namespace Artyom; diff --git a/artyom.js/tsconfig.json b/artyom.js/tsconfig.json new file mode 100644 index 0000000000..f4736ae50d --- /dev/null +++ b/artyom.js/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "strictNullChecks": true, + "noImplicitThis": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "artyom.js-tests.ts" + ] +} diff --git a/artyom.js/tslint.json b/artyom.js/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/artyom.js/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/asana/tsconfig.json b/asana/tsconfig.json index 5c8e54f344..5a6ff7d940 100644 --- a/asana/tsconfig.json +++ b/asana/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/asciify/tsconfig.json b/asciify/tsconfig.json index 63f36aff6b..df554e6e89 100644 --- a/asciify/tsconfig.json +++ b/asciify/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/asn1js/tsconfig.json b/asn1js/tsconfig.json index ff49d0edcd..14f2b01922 100644 --- a/asn1js/tsconfig.json +++ b/asn1js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/aspnet-identity-pw/tsconfig.json b/aspnet-identity-pw/tsconfig.json index 3d17794b1f..74e84bb784 100644 --- a/aspnet-identity-pw/tsconfig.json +++ b/aspnet-identity-pw/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/assert-plus/tsconfig.json b/assert-plus/tsconfig.json index 22fa7db7b9..ba308d4817 100644 --- a/assert-plus/tsconfig.json +++ b/assert-plus/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "assert-plus-tests.ts" ] -} +} \ No newline at end of file diff --git a/assertion-error/tsconfig.json b/assertion-error/tsconfig.json index f51ddb9b83..622a3d4f31 100644 --- a/assertion-error/tsconfig.json +++ b/assertion-error/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/assertsharp/tsconfig.json b/assertsharp/tsconfig.json index 17d30d98c2..83ffe2f34e 100644 --- a/assertsharp/tsconfig.json +++ b/assertsharp/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/async-lock/tsconfig.json b/async-lock/tsconfig.json index 08f3f0fccc..015de13897 100644 --- a/async-lock/tsconfig.json +++ b/async-lock/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/async-polling/tsconfig.json b/async-polling/tsconfig.json index 4c00e760aa..3743e804f0 100644 --- a/async-polling/tsconfig.json +++ b/async-polling/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/async-writer/tsconfig.json b/async-writer/tsconfig.json index 304d5c6f99..745abd8e87 100644 --- a/async-writer/tsconfig.json +++ b/async-writer/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/async/index.d.ts b/async/index.d.ts index 86aa17ea6b..e3fbe7e512 100644 --- a/async/index.d.ts +++ b/async/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for Async 2.0.1 // Project: https://github.com/caolan/async -// Definitions by: Boris Yankov , Arseniy Maximov , Joe Herman , Angus Fenying +// Definitions by: Boris Yankov , Arseniy Maximov , Joe Herman , Angus Fenying , Pascal Martin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped interface Dictionary { [key: string]: T; } @@ -29,6 +29,7 @@ interface AsyncQueue { idle(): boolean; concurrency: number; push(task: T, callback?: ErrorCallback): void; + push(task: T, callback?: AsyncResultCallback): void; push(task: T[], callback?: ErrorCallback): void; unshift(task: T, callback?: ErrorCallback): void; unshift(task: T[], callback?: ErrorCallback): void; @@ -180,6 +181,7 @@ interface Async { applyEach(fns: Function[], argsAndCallback: any[]): void; // applyEach(fns, args..., callback). TS does not support ... for a middle argument. Callback is optional. applyEachSeries(fns: Function[], argsAndCallback: any[]): void; // applyEachSeries(fns, args..., callback). TS does not support ... for a middle argument. Callback is optional. queue(worker: AsyncWorker, concurrency?: number): AsyncQueue; + queue(worker: AsyncResultIterator, concurrency?: number): AsyncQueue; priorityQueue(worker: AsyncWorker, concurrency: number): AsyncPriorityQueue; cargo(worker : (tasks: any[], callback : ErrorCallback) => void, payload? : number) : AsyncCargo; auto(tasks: any, concurrency?: number, callback?: AsyncResultCallback): void; @@ -194,7 +196,8 @@ interface Async { reflect(fn: AsyncFunction) : (callback: (err: void, result: {error?: Error, value?: T}) => void) => void; reflectAll(tasks: AsyncFunction[]): ((callback: (err: void, result: {error?: Error, value?: T}) => void) => void)[]; - timeout(fn: AsyncFunction, milliseconds: number, info: any): AsyncFunction; + timeout(fn: AsyncFunction, milliseconds: number, info?: any): AsyncFunction; + timeout(fn: AsyncResultIterator, milliseconds: number, info?: any): AsyncResultIterator; times (n: number, iterator: AsyncResultIterator, callback: AsyncResultArrayCallback): void; timesSeries(n: number, iterator: AsyncResultIterator, callback: AsyncResultArrayCallback): void; @@ -223,3 +226,4 @@ declare var async: Async; declare module "async" { export = async; } + diff --git a/async/test/index.ts b/async/test/index.ts index abc2653f60..8c6be303e4 100644 --- a/async/test/index.ts +++ b/async/test/index.ts @@ -349,6 +349,16 @@ q2.unshift(['task3', 'task4', 'task5'], function (error) { console.log('Finished tasks'); }); + +var aq = async.queue(function (level: number, callback: (error : Error, newLevel: number) => void) { + console.log('hello ' + level); + callback(null, level+1); +}); + +aq.push(1, function (err : Error, newLevel : number) { + console.log('finished processing bar' + newLevel); +}); + // create a cargo object with payload 2 var cargo = async.cargo(function (tasks, callback) { for (var i = 0; i < tasks.length; i++) { @@ -794,3 +804,36 @@ async.some({ console.log("async.some/any: done with result", result); }); + +// timeout + +function myFunction1(foo : any, callback: (err : Error, result : any) => void ) : void { + console.log(`async.timeout 1 ${foo}`); + return callback(null, foo); +} +var wrapped1 = async.timeout(myFunction1, 1000); +wrapped1({ bar: 'bar' }, function(err : Error, data : any) { + console.log(`async.timeout 1 end ${data}`); +}); + + +function myFunction2(callback: (err : Error, result : any) => void ) : void { + console.log(`async.timeout 2`); + return callback(null, { bar: 'bar' }); +} + +var wrapped2 = async.timeout(myFunction2, 1000); +wrapped2( function(err : Error, data : any) { + console.log(`async.timeout 2 end ${data}`); +}); + +function myFunction3(callback: (err : Error, result : any) => void ) : void { + console.log(`async.timeout 3`); + return callback(null, { bar: 'bar' }); +} + +var wrapped3 = async.timeout(myFunction3, 1000, { bar: 'bar' }); +wrapped3( function(err : Error, data : any) { + console.log(`async.timeout 3 end ${data}`); +}); + diff --git a/async/tsconfig.json b/async/tsconfig.json index 8cceeb6576..851293fccf 100644 --- a/async/tsconfig.json +++ b/async/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/asyncblock/tsconfig.json b/asyncblock/tsconfig.json index a9866b2780..8c95bd56a0 100644 --- a/asyncblock/tsconfig.json +++ b/asyncblock/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/atmosphere/tsconfig.json b/atmosphere/tsconfig.json index 7eb03df28f..d6b12ce1e3 100644 --- a/atmosphere/tsconfig.json +++ b/atmosphere/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/atom-keymap/tsconfig.json b/atom-keymap/tsconfig.json index 6914b3702e..84ac8aff2e 100644 --- a/atom-keymap/tsconfig.json +++ b/atom-keymap/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/atom/tsconfig.json b/atom/tsconfig.json index cbb243e6bb..3bb8fe9761 100644 --- a/atom/tsconfig.json +++ b/atom/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/atpl/tsconfig.json b/atpl/tsconfig.json index 9a19ba3ae4..b35da8523c 100644 --- a/atpl/tsconfig.json +++ b/atpl/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/auth0-angular/tsconfig.json b/auth0-angular/tsconfig.json index 5f7c2c98ba..da1f149dc0 100644 --- a/auth0-angular/tsconfig.json +++ b/auth0-angular/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/auth0-js/index.d.ts b/auth0-js/index.d.ts index 2907eba686..bd97fed1cc 100644 --- a/auth0-js/index.d.ts +++ b/auth0-js/index.d.ts @@ -35,6 +35,7 @@ interface Auth0ClientOptions { clientID: string; callbackURL: string; callbackOnLocationHash?: boolean; + responseType?: string; domain: string; forceJSONP?: boolean; } @@ -87,6 +88,7 @@ interface Auth0DecodedHash { idToken: string; profile: Auth0UserProfile; state: any; + error: string; } interface Auth0PopupOptions { diff --git a/auth0-js/tsconfig.json b/auth0-js/tsconfig.json index fc79180f7e..a2e16e19e0 100644 --- a/auth0-js/tsconfig.json +++ b/auth0-js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/auth0-lock/tsconfig.json b/auth0-lock/tsconfig.json index 21b7642137..367445041e 100644 --- a/auth0-lock/tsconfig.json +++ b/auth0-lock/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/auth0.widget/tsconfig.json b/auth0.widget/tsconfig.json index 004e2ca566..7bba7e763f 100644 --- a/auth0.widget/tsconfig.json +++ b/auth0.widget/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/auth0/tsconfig.json b/auth0/tsconfig.json index 42e522478d..855b69aa4d 100644 --- a/auth0/tsconfig.json +++ b/auth0/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/auto-launch/tsconfig.json b/auto-launch/tsconfig.json index 2b9b9e5661..2200ea7a60 100644 --- a/auto-launch/tsconfig.json +++ b/auto-launch/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/autobahn/tsconfig.json b/autobahn/tsconfig.json index 7ef3d2e4eb..0efaca40c5 100644 --- a/autobahn/tsconfig.json +++ b/autobahn/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/autobind-decorator/tsconfig.json b/autobind-decorator/tsconfig.json index 906d414b5d..43d5817978 100644 --- a/autobind-decorator/tsconfig.json +++ b/autobind-decorator/tsconfig.json @@ -2,6 +2,10 @@ "compilerOptions": { "module": "commonjs", "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/autolinker/tsconfig.json b/autolinker/tsconfig.json index 6fb1656854..b746881615 100644 --- a/autolinker/tsconfig.json +++ b/autolinker/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/autoprefixer-core/tsconfig.json b/autoprefixer-core/tsconfig.json index f89b9406ed..b9a86fbe1b 100644 --- a/autoprefixer-core/tsconfig.json +++ b/autoprefixer-core/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/autosize/tsconfig.json b/autosize/tsconfig.json index ec273c33df..c5202a2b52 100644 --- a/autosize/tsconfig.json +++ b/autosize/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/avoscloud-sdk/tsconfig.json b/avoscloud-sdk/tsconfig.json index dbd926926e..1da2d1d67d 100644 --- a/avoscloud-sdk/tsconfig.json +++ b/avoscloud-sdk/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/awesomplete/tsconfig.json b/awesomplete/tsconfig.json index c169798465..270615e926 100644 --- a/awesomplete/tsconfig.json +++ b/awesomplete/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/aws-iot-device-sdk/tsconfig.json b/aws-iot-device-sdk/tsconfig.json index a4c761b2a2..657e3a25f2 100644 --- a/aws-iot-device-sdk/tsconfig.json +++ b/aws-iot-device-sdk/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/aws-lambda/aws-lambda-tests.ts b/aws-lambda/aws-lambda-tests.ts index f54c3cc2d4..0d8d9bd47f 100644 --- a/aws-lambda/aws-lambda-tests.ts +++ b/aws-lambda/aws-lambda-tests.ts @@ -62,4 +62,7 @@ context.succeed(str); context.succeed(anyObj); context.succeed(str, anyObj); context.fail(error); -context.fail(str); \ No newline at end of file +context.fail(str); + +/* Handler */ +let handler: AWSLambda.Handler = (event: any, context: AWSLambda.Context, cb: AWSLambda.Callback) => {}; diff --git a/aws-lambda/index.d.ts b/aws-lambda/index.d.ts index a5086eaadf..1aa41b9e62 100644 --- a/aws-lambda/index.d.ts +++ b/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 +// Definitions by: James Darbyshire , Michael Skarum , Stef Heyenrath , Toby Hede // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Context @@ -17,7 +17,7 @@ interface Context { logStreamName: string; identity?: CognitoIdentity; clientContext?: ClientContext; - + // Functions getRemainingTimeInMillis(): number; @@ -28,7 +28,7 @@ interface Context { fail(message: string): void; succeed(message: string): void; succeed(object: any): void; - succeed(message: string, object: any): void; + succeed(message: string, object: any): void; } interface CognitoIdentity { @@ -58,6 +58,16 @@ interface ClientContextEnv { locale: string; } +/** + * AWS Lambda handler function. + * http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-handler.html + * + * @param event – event data. + * @param context – runtime information of the Lambda function that is executing. + * @param callback – optional callback to return information to the caller, otherwise return value is null. + */ +export type Handler = (event: any, context: Context, callback?: Callback) => void; + /** * Optional callback parameter. * http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-handler.html @@ -67,4 +77,4 @@ interface ClientContextEnv { */ export type Callback = (error?: Error, result?: any) => void; -export as namespace AWSLambda; \ No newline at end of file +export as namespace AWSLambda; diff --git a/aws-lambda/tsconfig.json b/aws-lambda/tsconfig.json index fe6cbd47c5..e204a8ac6a 100644 --- a/aws-lambda/tsconfig.json +++ b/aws-lambda/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/aws-sdk/tsconfig.json b/aws-sdk/tsconfig.json index 9e94f9b05c..8183276533 100644 --- a/aws-sdk/tsconfig.json +++ b/aws-sdk/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/aws-serverless-express/tsconfig.json b/aws-serverless-express/tsconfig.json index 240c150976..a62cead1a1 100644 --- a/aws-serverless-express/tsconfig.json +++ b/aws-serverless-express/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/aws4/tsconfig.json b/aws4/tsconfig.json index 8887a05d57..597f05b7e7 100644 --- a/aws4/tsconfig.json +++ b/aws4/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/axe-core/tsconfig.json b/axe-core/tsconfig.json index 61566d440c..5b6183c592 100644 --- a/axe-core/tsconfig.json +++ b/axe-core/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/axios/index.d.ts b/axios/index.d.ts index d66dc3d48c..681fefc806 100644 --- a/axios/index.d.ts +++ b/axios/index.d.ts @@ -99,6 +99,13 @@ declare namespace Axios { * change the response data to be made before it is passed to then/catch */ transformResponse?: (data: T) => U; + + /** + * defines whether to resolve or reject the promise for a given HTTP response status code. + * If returns `true` (or is set to `null` or `undefined`), the promise will be resolved; + * otherwise, the promise will be rejected + */ + validateStatus?: (status: number) => boolean | undefined; } /** diff --git a/axios/tsconfig.json b/axios/tsconfig.json index 9616b86245..4300cfb925 100644 --- a/axios/tsconfig.json +++ b/axios/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/azure-mobile-apps/tsconfig.json b/azure-mobile-apps/tsconfig.json index b01ae7cd85..ae1ae9db7b 100644 --- a/azure-mobile-apps/tsconfig.json +++ b/azure-mobile-apps/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/azure-mobile-services-client/tsconfig.json b/azure-mobile-services-client/tsconfig.json index 5037dc88a1..2094561f71 100644 --- a/azure-mobile-services-client/tsconfig.json +++ b/azure-mobile-services-client/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/azure-sb/tsconfig.json b/azure-sb/tsconfig.json index d8e1535f8d..9e2dba3353 100644 --- a/azure-sb/tsconfig.json +++ b/azure-sb/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/azure/tsconfig.json b/azure/tsconfig.json index d583eb4b26..5f058966d7 100644 --- a/azure/tsconfig.json +++ b/azure/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/babel-code-frame/tsconfig.json b/babel-code-frame/tsconfig.json index a9f0f8522e..c2ee402de8 100644 --- a/babel-code-frame/tsconfig.json +++ b/babel-code-frame/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/babel-core/tsconfig.json b/babel-core/tsconfig.json index ade9d0e1df..eb34de358f 100644 --- a/babel-core/tsconfig.json +++ b/babel-core/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/babel-generator/tsconfig.json b/babel-generator/tsconfig.json index ec0fb91c66..76af52a798 100644 --- a/babel-generator/tsconfig.json +++ b/babel-generator/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/babel-template/tsconfig.json b/babel-template/tsconfig.json index b860dd6fdd..3c87fafd00 100644 --- a/babel-template/tsconfig.json +++ b/babel-template/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/babel-traverse/tsconfig.json b/babel-traverse/tsconfig.json index 051af6be38..01fab311ab 100644 --- a/babel-traverse/tsconfig.json +++ b/babel-traverse/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/babel-types/tsconfig.json b/babel-types/tsconfig.json index 1ee708a599..b5bf7f62ee 100644 --- a/babel-types/tsconfig.json +++ b/babel-types/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/babelify/tsconfig.json b/babelify/tsconfig.json index dcebf50de4..defb24a946 100644 --- a/babelify/tsconfig.json +++ b/babelify/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/babylon/tsconfig.json b/babylon/tsconfig.json index b7a13bc9fc..cd72fd759f 100644 --- a/babylon/tsconfig.json +++ b/babylon/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/babylonjs/tsconfig.json b/babylonjs/tsconfig.json index 185e6fda44..416305ce73 100644 --- a/babylonjs/tsconfig.json +++ b/babylonjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/babyparse/tsconfig.json b/babyparse/tsconfig.json index a4d6d35f99..062572c4ef 100644 --- a/babyparse/tsconfig.json +++ b/babyparse/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/backbone-associations/tsconfig.json b/backbone-associations/tsconfig.json index b325572261..cb81dcd498 100644 --- a/backbone-associations/tsconfig.json +++ b/backbone-associations/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/backbone-fetch-cache/tsconfig.json b/backbone-fetch-cache/tsconfig.json index 2dcd4a6bc2..2625930e32 100644 --- a/backbone-fetch-cache/tsconfig.json +++ b/backbone-fetch-cache/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/backbone-relational/tsconfig.json b/backbone-relational/tsconfig.json index e2c3f7a731..5d127f3c0d 100644 --- a/backbone-relational/tsconfig.json +++ b/backbone-relational/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/backbone.layoutmanager/tsconfig.json b/backbone.layoutmanager/tsconfig.json index 63f89b66b9..69b4f4d064 100644 --- a/backbone.layoutmanager/tsconfig.json +++ b/backbone.layoutmanager/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/backbone.localstorage/tsconfig.json b/backbone.localstorage/tsconfig.json index e7fbffcb9b..60a7e9a9b7 100644 --- a/backbone.localstorage/tsconfig.json +++ b/backbone.localstorage/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/backbone.marionette/tsconfig.json b/backbone.marionette/tsconfig.json index 9dbd0a28f9..ab08adc897 100644 --- a/backbone.marionette/tsconfig.json +++ b/backbone.marionette/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/backbone.paginator/tsconfig.json b/backbone.paginator/tsconfig.json index 81e1895330..eae23a6868 100644 --- a/backbone.paginator/tsconfig.json +++ b/backbone.paginator/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/backbone.radio/tsconfig.json b/backbone.radio/tsconfig.json index 6d33b07dbb..87431e3006 100644 --- a/backbone.radio/tsconfig.json +++ b/backbone.radio/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/backbone/tsconfig.json b/backbone/tsconfig.json index b4a63b9ef0..efe348dbd6 100644 --- a/backbone/tsconfig.json +++ b/backbone/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/backgrid/tsconfig.json b/backgrid/tsconfig.json index 0c44162460..9a32a5ab8c 100644 --- a/backgrid/tsconfig.json +++ b/backgrid/tsconfig.json @@ -2,6 +2,10 @@ "compilerOptions": { "module": "commonjs", "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/backlog-js/tsconfig.json b/backlog-js/tsconfig.json index bc48446105..3e426132ba 100644 --- a/backlog-js/tsconfig.json +++ b/backlog-js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/baconjs/tsconfig.json b/baconjs/tsconfig.json index 45bbf8cad5..e1cdb7a71c 100644 --- a/baconjs/tsconfig.json +++ b/baconjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/barcode/tsconfig.json b/barcode/tsconfig.json index e93f535c98..31a5f27c67 100644 --- a/barcode/tsconfig.json +++ b/barcode/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bardjs/tsconfig.json b/bardjs/tsconfig.json index 001cc0e583..c4c59ddd37 100644 --- a/bardjs/tsconfig.json +++ b/bardjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/base-64/tsconfig.json b/base-64/tsconfig.json index 11fb5f7bd7..279b296c5e 100644 --- a/base-64/tsconfig.json +++ b/base-64/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/base-x/tsconfig.json b/base-x/tsconfig.json index e08a602ff1..2ece07fe8e 100644 --- a/base-x/tsconfig.json +++ b/base-x/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/base16/tsconfig.json b/base16/tsconfig.json index 2de5ed1f03..c4c07afcfb 100644 --- a/base16/tsconfig.json +++ b/base16/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/base64-js/tsconfig.json b/base64-js/tsconfig.json index ed61523cb7..a202fdd2e8 100644 --- a/base64-js/tsconfig.json +++ b/base64-js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/base64url/tsconfig.json b/base64url/tsconfig.json index a62c495fb3..d362086905 100644 --- a/base64url/tsconfig.json +++ b/base64url/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bases/tsconfig.json b/bases/tsconfig.json index b7d1d27d65..aad84d2782 100644 --- a/bases/tsconfig.json +++ b/bases/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/basic-auth/tsconfig.json b/basic-auth/tsconfig.json index cbf7c76632..b9f77df9d2 100644 --- a/basic-auth/tsconfig.json +++ b/basic-auth/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/batch-stream/tsconfig.json b/batch-stream/tsconfig.json index e11bc04a59..51de2a9b7e 100644 --- a/batch-stream/tsconfig.json +++ b/batch-stream/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bazinga-translator/tsconfig.json b/bazinga-translator/tsconfig.json index 327e6b6ec2..c2d466d99c 100644 --- a/bazinga-translator/tsconfig.json +++ b/bazinga-translator/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bcrypt-nodejs/tsconfig.json b/bcrypt-nodejs/tsconfig.json index ffe1da2e5f..06067a179a 100644 --- a/bcrypt-nodejs/tsconfig.json +++ b/bcrypt-nodejs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bcrypt/tsconfig.json b/bcrypt/tsconfig.json index 0a545402e6..75c9449444 100644 --- a/bcrypt/tsconfig.json +++ b/bcrypt/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bcryptjs/tsconfig.json b/bcryptjs/tsconfig.json index 9db5b79791..b0e90ac993 100644 --- a/bcryptjs/tsconfig.json +++ b/bcryptjs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/benchmark/tsconfig.json b/benchmark/tsconfig.json index cea823638e..ed72dc5a3f 100644 --- a/benchmark/tsconfig.json +++ b/benchmark/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/better-curry/tsconfig.json b/better-curry/tsconfig.json index c078d7e98d..83627e6874 100644 --- a/better-curry/tsconfig.json +++ b/better-curry/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bezier-easing/tsconfig.json b/bezier-easing/tsconfig.json index 9cbb3fb9f2..9b3d620719 100644 --- a/bezier-easing/tsconfig.json +++ b/bezier-easing/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bezier-js/tsconfig.json b/bezier-js/tsconfig.json index 1b6d173a81..8c5c4a2044 100644 --- a/bezier-js/tsconfig.json +++ b/bezier-js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bgiframe/tsconfig.json b/bgiframe/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/bgiframe/tsconfig.json +++ b/bgiframe/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/big-integer/tsconfig.json b/big-integer/tsconfig.json index 14bd5ba3fc..4b00c0362e 100644 --- a/big-integer/tsconfig.json +++ b/big-integer/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/big.js/tsconfig.json b/big.js/tsconfig.json index 5c6806c797..27ff564268 100644 --- a/big.js/tsconfig.json +++ b/big.js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bigi/tsconfig.json b/bigi/tsconfig.json index 261cc6a2a4..f8424bbea7 100644 --- a/bigi/tsconfig.json +++ b/bigi/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "bigi-tests.ts" ] -} +} \ No newline at end of file diff --git a/bigint/tsconfig.json b/bigint/tsconfig.json index 962d064254..48165aac98 100644 --- a/bigint/tsconfig.json +++ b/bigint/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bignum/tsconfig.json b/bignum/tsconfig.json index 61dcc7492e..c875979dba 100644 --- a/bignum/tsconfig.json +++ b/bignum/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bigscreen/tsconfig.json b/bigscreen/tsconfig.json index 1e447a9cf7..cdf467e715 100644 --- a/bigscreen/tsconfig.json +++ b/bigscreen/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bind-ponyfill/tsconfig.json b/bind-ponyfill/tsconfig.json index 1253196869..3fcedeaa10 100644 --- a/bind-ponyfill/tsconfig.json +++ b/bind-ponyfill/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": true, diff --git a/bingmaps/tsconfig.json b/bingmaps/tsconfig.json index c546d497fc..8fa709cf83 100644 --- a/bingmaps/tsconfig.json +++ b/bingmaps/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bintrees/tsconfig.json b/bintrees/tsconfig.json index d97622d9f8..15bdb88c5b 100644 --- a/bintrees/tsconfig.json +++ b/bintrees/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bip21/tsconfig.json b/bip21/tsconfig.json index 050c9a1cdf..338634335b 100644 --- a/bip21/tsconfig.json +++ b/bip21/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bit-array/tsconfig.json b/bit-array/tsconfig.json index 943e7295cc..e8ccde051f 100644 --- a/bit-array/tsconfig.json +++ b/bit-array/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bitcoinjs-lib/tsconfig.json b/bitcoinjs-lib/tsconfig.json index 280b41d50e..7a9a4cf261 100644 --- a/bitcoinjs-lib/tsconfig.json +++ b/bitcoinjs-lib/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "bitcoinjs-lib-tests.ts" ] -} +} \ No newline at end of file diff --git a/bittorrent-protocol/bittorrent-protocol-tests.ts b/bittorrent-protocol/bittorrent-protocol-tests.ts new file mode 100644 index 0000000000..1d73154565 --- /dev/null +++ b/bittorrent-protocol/bittorrent-protocol-tests.ts @@ -0,0 +1,20 @@ +import * as Protocol from 'bittorrent-protocol'; +import * as net from 'net'; + +net.createServer(function(socket) { + var wire = new Protocol(); + + // pipe to and from the protocol + socket.pipe(wire).pipe(socket); + + wire.on('handshake', function(infoHash, peerId) { + // receive a handshake (infoHash and peerId are hex strings) + + // lets emit a handshake of our own as well + wire.handshake('my info hash (hex)', 'my peer id (hex)'); + }); + + wire.on('unchoke', function() { + console.log('peer is no longer choking us: ' + wire.peerChoking); + }); +}).listen(6881); diff --git a/bittorrent-protocol/index.d.ts b/bittorrent-protocol/index.d.ts new file mode 100644 index 0000000000..688527e71f --- /dev/null +++ b/bittorrent-protocol/index.d.ts @@ -0,0 +1,93 @@ +// Type definitions for bittorrent-protocol 2.1 +// Project: https://github.com/feross/bittorrent-protocol#readme +// Definitions by: Tomasz Łaziuk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as stream from 'stream'; + +declare const BittorrentProtocol: BittorrentProtocol.BittorrentProtocol; + +declare namespace BittorrentProtocol { + export interface BittorrentProtocol { + new (): Wire; + (): Wire; + } + + export interface Extension { + constructor(wire: Wire): this; + onHandshake?: () => void; + onExtendedHandshake?: () => void; + onMessage?: () => void; + name: string; + } + + export interface Request { + constructor(piece: number, offset: number, length: number, callback: () => void): this; + piece: number; + offset: number; + length: number; + callback: () => void; + } + + export interface Wire extends stream.Duplex { + readonly peerId: string; // remote peer id (hex string) + readonly peerIdBuffer: Buffer; // remote peer id (Buffer) + readonly type: 'webrtc' | 'tcpIncoming' | 'tcpOutgoing' | 'webSeed'; // connection type + readonly amChoking: boolean; // are we choking the peer? + readonly amInterested: boolean; // are we interested in the peer? + readonly peerChoking: boolean; // is the peer choking us? + readonly peerInterested: boolean; // is the peer interested in us? + readonly requests: Request[]; + readonly peerRequests: Request[]; + readonly extendedMapping: { [key: number]: string, }; + readonly peerExtendedMapping: { [key: string]: number, }; + + setKeepAlive(enable: boolean): void; + + setTimeot(ms: number, unref?: boolean): void; + + destroy(): void; + + use(ext: Extension): void; + + handshake(infoHash: string | Buffer, peerId: string | Buffer, extensions?: any): void; + + choke(): void; + + unchoke(): void; + + interested(): void; + + uninterested(): void; + + have(index: number): void; + + // TODO: bitfield can be also a bitfield instance + bitfield(bitfield: Buffer | any): void; + + request(index: number, offset: number, length: number, cb?: (err: Error) => T): T | void; + + piece(index: number, offset: number, buffer: Buffer): void; + + cancel(index: number, offset: number, length: number): void; + + port(port: number): void; + + extend(ext: number | string, obj: any): void; + + // TODO: bitfield is a bitfield instance + on(event: 'bitfield', listener: (bitfield: any) => void): this; + on(event: string | 'keep-alive' | 'choke' | 'unchoke' | 'interested' | 'uninterested' | 'timeout', listener: () => void): this; + on(event: 'upload' | 'have' | 'download' | 'port', listener: (length: number) => void): this; + on(event: 'handshake', listener: (infoHash: string, peerId: string, extensions: Extension[]) => void): this; + on(event: 'request', listener: (index: number, offset: number, length: number, respond: () => void) => void): this; + on(event: 'piece', listener: (index: number, offset: number, buffer: Buffer) => void): this; + on(event: 'cancel', listener: (index: number, offset: number, length: number) => void): this; + on(event: 'extended', listener: (ext: 'handshake' | string, buf: any) => void): void; + on(event: 'unknownmessage', listener: (buffer: Buffer) => void): this; + } +} + +export = BittorrentProtocol; diff --git a/bittorrent-protocol/tsconfig.json b/bittorrent-protocol/tsconfig.json new file mode 100644 index 0000000000..65222bf056 --- /dev/null +++ b/bittorrent-protocol/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "bittorrent-protocol-tests.ts" + ] +} diff --git a/bittorrent-protocol/tslint.json b/bittorrent-protocol/tslint.json new file mode 100644 index 0000000000..ec365f164b --- /dev/null +++ b/bittorrent-protocol/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} diff --git a/bitwise-xor/tsconfig.json b/bitwise-xor/tsconfig.json index 8a5de02f2b..91381b1d2e 100644 --- a/bitwise-xor/tsconfig.json +++ b/bitwise-xor/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bl/tsconfig.json b/bl/tsconfig.json index d25057ecc4..375fd905e2 100644 --- a/bl/tsconfig.json +++ b/bl/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/blacklist/tsconfig.json b/blacklist/tsconfig.json index 5132449aaf..6fa73f1772 100644 --- a/blacklist/tsconfig.json +++ b/blacklist/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "blacklist-tests.ts" ] -} +} \ No newline at end of file diff --git a/blazy/tsconfig.json b/blazy/tsconfig.json index 6357e236df..633c77ad25 100644 --- a/blazy/tsconfig.json +++ b/blazy/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/blessed/tsconfig.json b/blessed/tsconfig.json index 999cea2c7b..2744f7039b 100644 --- a/blessed/tsconfig.json +++ b/blessed/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/blissfuljs/tsconfig.json b/blissfuljs/tsconfig.json index c0cb6bbbe1..9d04254081 100644 --- a/blissfuljs/tsconfig.json +++ b/blissfuljs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/blob-stream/tsconfig.json b/blob-stream/tsconfig.json index 70fbfb30cd..f29a772ddd 100644 --- a/blob-stream/tsconfig.json +++ b/blob-stream/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/blocks/tsconfig.json b/blocks/tsconfig.json index 77fab8218d..40215f80a6 100644 --- a/blocks/tsconfig.json +++ b/blocks/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/blue-tape/tsconfig.json b/blue-tape/tsconfig.json index 9fa54bd259..4740d06fa7 100644 --- a/blue-tape/tsconfig.json +++ b/blue-tape/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bluebird-global/tsconfig.json b/bluebird-global/tsconfig.json index 12ed67cdc4..642b097309 100644 --- a/bluebird-global/tsconfig.json +++ b/bluebird-global/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es5", + "lib": [ + "es2017", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -9,10 +12,6 @@ "typeRoots": [ "../" ], - "lib": [ - "es2017", - "dom" - ], "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true @@ -21,4 +20,4 @@ "index.d.ts", "bluebird-global-tests.ts" ] -} +} \ No newline at end of file diff --git a/bluebird-retry/tsconfig.json b/bluebird-retry/tsconfig.json index 4eaa47aaf6..9d40873998 100644 --- a/bluebird-retry/tsconfig.json +++ b/bluebird-retry/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bluebird/tsconfig.json b/bluebird/tsconfig.json index 8e871c9e34..ec949f562b 100644 --- a/bluebird/tsconfig.json +++ b/bluebird/tsconfig.json @@ -5,7 +5,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es5", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/bluebird/v1/tsconfig.json b/bluebird/v1/tsconfig.json index 9207bdd01d..13442c777a 100644 --- a/bluebird/v1/tsconfig.json +++ b/bluebird/v1/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es5", + "lib": [ + "es5" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -11,7 +13,9 @@ ], "types": [], "paths": { - "bluebird": ["bluebird/v1"] + "bluebird": [ + "bluebird/v1" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/bluebird/v2/tsconfig.json b/bluebird/v2/tsconfig.json index 8c7fd4c71f..aeec8af920 100644 --- a/bluebird/v2/tsconfig.json +++ b/bluebird/v2/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es5", + "lib": [ + "es5" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, @@ -11,7 +13,9 @@ ], "types": [], "paths": { - "bluebird": ["bluebird/v2"] + "bluebird": [ + "bluebird/v2" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/blueimp-md5/tsconfig.json b/blueimp-md5/tsconfig.json index 5cae250d0d..8945974140 100644 --- a/blueimp-md5/tsconfig.json +++ b/blueimp-md5/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/body-parser/tsconfig.json b/body-parser/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/body-parser/tsconfig.json +++ b/body-parser/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bonjour/tsconfig.json b/bonjour/tsconfig.json index 08edb275c4..5f4f7d3088 100644 --- a/bonjour/tsconfig.json +++ b/bonjour/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/bookshelf/tsconfig.json b/bookshelf/tsconfig.json index da566d66b8..012a7c10b2 100644 --- a/bookshelf/tsconfig.json +++ b/bookshelf/tsconfig.json @@ -2,6 +2,9 @@ "compilerOptions": { "module": "commonjs", "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/boolify-string/tsconfig.json b/boolify-string/tsconfig.json index 82d9ff7875..f7a57e27de 100644 --- a/boolify-string/tsconfig.json +++ b/boolify-string/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/boom/boom-tests.ts b/boom/boom-tests.ts index 4c2f23ed64..8b5c3bdce6 100644 --- a/boom/boom-tests.ts +++ b/boom/boom-tests.ts @@ -5,3 +5,4 @@ import Boom = require('boom'); Boom.create(500, 'Internal server error', { timestamp: Date.now() }); Boom.wrap(new Error('test'), 400); Boom.badRequest('Invalid cookies'); +Boom.unauthorized() as Error; diff --git a/boom/index.d.ts b/boom/index.d.ts index b252fad1e1..e8cfb5722f 100644 --- a/boom/index.d.ts +++ b/boom/index.d.ts @@ -16,6 +16,7 @@ declare namespace Boom { isServer: boolean; message: string; output: Output; + name: string; } export interface Output { diff --git a/boom/tsconfig.json b/boom/tsconfig.json index 2ff569cd92..d64d51130b 100644 --- a/boom/tsconfig.json +++ b/boom/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bootbox/tsconfig.json b/bootbox/tsconfig.json index b088f79e39..e9bedd04f7 100644 --- a/bootbox/tsconfig.json +++ b/bootbox/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bootpag/tsconfig.json b/bootpag/tsconfig.json index 6760ddda5c..fa1b79ad37 100644 --- a/bootpag/tsconfig.json +++ b/bootpag/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bootstrap-datepicker/tsconfig.json b/bootstrap-datepicker/tsconfig.json index 95e18e8189..bef8804bc6 100644 --- a/bootstrap-datepicker/tsconfig.json +++ b/bootstrap-datepicker/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bootstrap-fileinput/tsconfig.json b/bootstrap-fileinput/tsconfig.json index bf97b93a4d..9661cf12ad 100644 --- a/bootstrap-fileinput/tsconfig.json +++ b/bootstrap-fileinput/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bootstrap-maxlength/tsconfig.json b/bootstrap-maxlength/tsconfig.json index a4daca7b77..e67f6e33f1 100644 --- a/bootstrap-maxlength/tsconfig.json +++ b/bootstrap-maxlength/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/bootstrap-notify/tsconfig.json b/bootstrap-notify/tsconfig.json index c13c33a92b..70345035cb 100644 --- a/bootstrap-notify/tsconfig.json +++ b/bootstrap-notify/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bootstrap-select/tsconfig.json b/bootstrap-select/tsconfig.json index b947cab95c..28f30d6dc0 100644 --- a/bootstrap-select/tsconfig.json +++ b/bootstrap-select/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/bootstrap-slider/tsconfig.json b/bootstrap-slider/tsconfig.json index 03e9cbfbab..7c807ad0d1 100644 --- a/bootstrap-slider/tsconfig.json +++ b/bootstrap-slider/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/bootstrap-switch/tsconfig.json b/bootstrap-switch/tsconfig.json index 618011fead..6afea7feeb 100644 --- a/bootstrap-switch/tsconfig.json +++ b/bootstrap-switch/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bootstrap-table/tsconfig.json b/bootstrap-table/tsconfig.json index 05ecd1dc75..7a82df8757 100644 --- a/bootstrap-table/tsconfig.json +++ b/bootstrap-table/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/bootstrap-touchspin/tsconfig.json b/bootstrap-touchspin/tsconfig.json index d72a9c0f92..de15b1ab32 100644 --- a/bootstrap-touchspin/tsconfig.json +++ b/bootstrap-touchspin/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bootstrap-validator/tsconfig.json b/bootstrap-validator/tsconfig.json index d5bde637e0..c4415e6d19 100644 --- a/bootstrap-validator/tsconfig.json +++ b/bootstrap-validator/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "bootstrap-validator-tests.ts" ] -} +} \ No newline at end of file diff --git a/bootstrap.paginator/tsconfig.json b/bootstrap.paginator/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/bootstrap.paginator/tsconfig.json +++ b/bootstrap.paginator/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bootstrap.timepicker/tsconfig.json b/bootstrap.timepicker/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/bootstrap.timepicker/tsconfig.json +++ b/bootstrap.timepicker/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bootstrap.v3.datetimepicker/tsconfig.json b/bootstrap.v3.datetimepicker/tsconfig.json index 2eef3f5e3f..27ff9874c6 100644 --- a/bootstrap.v3.datetimepicker/tsconfig.json +++ b/bootstrap.v3.datetimepicker/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bootstrap.v3.datetimepicker/v3/tsconfig.json b/bootstrap.v3.datetimepicker/v3/tsconfig.json index e368705f30..c81098be9e 100644 --- a/bootstrap.v3.datetimepicker/v3/tsconfig.json +++ b/bootstrap.v3.datetimepicker/v3/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "bootstrap.v3.datetimepicker": ["bootstrap.v3.datetimepicker/v3"] + "bootstrap.v3.datetimepicker": [ + "bootstrap.v3.datetimepicker/v3" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/bootstrap/tsconfig.json b/bootstrap/tsconfig.json index 6e2189e5bf..0efb26f214 100644 --- a/bootstrap/tsconfig.json +++ b/bootstrap/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bounce.js/tsconfig.json b/bounce.js/tsconfig.json index 1718271ef6..aea0528321 100644 --- a/bounce.js/tsconfig.json +++ b/bounce.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bowser/tsconfig.json b/bowser/tsconfig.json index 70de6c837c..d0f2ee1a88 100644 --- a/bowser/tsconfig.json +++ b/bowser/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/box2d/tsconfig.json b/box2d/tsconfig.json index d98f02a1c1..77378f313f 100644 --- a/box2d/tsconfig.json +++ b/box2d/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/braintree-web/tsconfig.json b/braintree-web/tsconfig.json index 2c052fabc8..abc64cd9c3 100644 --- a/braintree-web/tsconfig.json +++ b/braintree-web/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/breeze/tsconfig.json b/breeze/tsconfig.json index a3916d6c5c..b03254b93c 100644 --- a/breeze/tsconfig.json +++ b/breeze/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/brorand/tsconfig.json b/brorand/tsconfig.json index c8152cfdb2..5fe5965087 100644 --- a/brorand/tsconfig.json +++ b/brorand/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/browser-bunyan/tsconfig.json b/browser-bunyan/tsconfig.json index 695ae41ca5..c94eef83e2 100644 --- a/browser-bunyan/tsconfig.json +++ b/browser-bunyan/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -17,4 +19,4 @@ "index.d.ts", "browser-bunyan-tests.ts" ] -} +} \ No newline at end of file diff --git a/browser-fingerprint/tsconfig.json b/browser-fingerprint/tsconfig.json index 0ad4f432d0..412a577af0 100644 --- a/browser-fingerprint/tsconfig.json +++ b/browser-fingerprint/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "browser-fingerprint-tests.ts" ] -} +} \ No newline at end of file diff --git a/browser-harness/tsconfig.json b/browser-harness/tsconfig.json index 5bd3144ee4..262ff52cf5 100644 --- a/browser-harness/tsconfig.json +++ b/browser-harness/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/browser-pack/tsconfig.json b/browser-pack/tsconfig.json index 5c463f38f6..67da2f2560 100644 --- a/browser-pack/tsconfig.json +++ b/browser-pack/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/browser-resolve/tsconfig.json b/browser-resolve/tsconfig.json index 35613062f3..d1fd902a14 100644 --- a/browser-resolve/tsconfig.json +++ b/browser-resolve/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/browser-sync/tsconfig.json b/browser-sync/tsconfig.json index 40e4d9c28c..83ef3f0e60 100644 --- a/browser-sync/tsconfig.json +++ b/browser-sync/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/browserify/tsconfig.json b/browserify/tsconfig.json index 789228dcf3..531f734eb9 100644 --- a/browserify/tsconfig.json +++ b/browserify/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bs58/tsconfig.json b/bs58/tsconfig.json index d4b6ed9e9f..90c5bc2b88 100644 --- a/bs58/tsconfig.json +++ b/bs58/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bson/bson-tests.ts b/bson/bson-tests.ts index e1e1c5d323..d18332fe9f 100644 --- a/bson/bson-tests.ts +++ b/bson/bson-tests.ts @@ -1,7 +1,7 @@ import * as bson from 'bson'; -let BSON = new bson.BSONPure.BSON(); -let Long = bson.BSONPure.Long; +let BSON = new bson.BSON(); +let Long = bson.Long; let doc = {long: Long.fromNumber(100)} @@ -13,9 +13,6 @@ console.log("data:", data); let doc_2 = BSON.deserialize(data); console.log("doc_2:", doc_2); - -BSON = new bson.BSONNative.BSON(); +BSON = new bson.BSON(); data = BSON.serialize(doc); doc_2 = BSON.deserialize(data); - - diff --git a/bson/index.d.ts b/bson/index.d.ts index 5c62f61433..517ed8ede9 100644 --- a/bson/index.d.ts +++ b/bson/index.d.ts @@ -1,96 +1,86 @@ -// Type definitions for bson 0.4 +// Type definitions for bson 1.0 // Project: https://github.com/mongodb/js-bson // Definitions by: Hiroki Horiuchi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// -declare namespace bson { - - export namespace BSONPure { - export interface DeserializeOptions { - /** {Boolean, default:false}, evaluate functions in the BSON document scoped to the object deserialized. */ - evalFunctions?: boolean; - /** {Boolean, default:false}, cache evaluated functions for reuse. */ - cacheFunctions?: boolean; - /** {Boolean, default:false}, use a crc32 code for caching, otherwise use the string of the function. */ - cacheFunctionsCrc32?: boolean; - /** {Boolean, default:false}, deserialize Binary data directly into node.js Buffer object. */ - promoteBuffers?: boolean; - } - export class BSON { - /** - * @param {Object} object the Javascript object to serialize. - * @param {Boolean} checkKeys the serializer will check if keys are valid. - * @param {Boolean} asBuffer return the serialized object as a Buffer object (ignore). - * @param {Boolean} serializeFunctions serialize the javascript functions (default:false) - * @return {Buffer} returns a TypedArray or Array depending on what your browser supports - */ - serialize(object: any, checkKeys?: boolean, asBuffer?: boolean, serializeFunctions?: boolean): Buffer; - deserialize(buffer: Buffer, options?: DeserializeOptions, isArray?: boolean): any; - } - - export class Binary { - static SUBTYPE_DEFAULT: number; - static SUBTYPE_FUNCTION: number; - static SUBTYPE_BYTE_ARRAY: number; - static SUBTYPE_UUID_OLD: number; - static SUBTYPE_UUID: number; - static SUBTYPE_MD5: number; - static SUBTYPE_USER_DEFINED: number; - - constructor(buffer: Buffer, subType?: number); - } - export class Code { - constructor(code: string | Function, scope?: any); - } - export class DBRef { - constructor(namespace: string, oid: ObjectID, db?: string); - } - export class Double { - constructor (value: number); - } - export class Long { - static fromInt(i: number): Long; - static fromNumber(n: number): Long; - static fromBits(lowBits: number, highBits: number): Long; - static fromString(s: string, opt_radix?: number): Long; - - constructor(low: number, high: number); - } - export class MaxKey { - constructor(); - } - export class MinKey { - constructor(); - } - export class ObjectId { - static createPk(): ObjectId; - static createFromTime(time: number): ObjectId; - static createFromHexString(hexString: string): ObjectId; - static isValid(id: number | string | ObjectId): boolean; - - constructor(id?: number | string | ObjectId); - } - export type ObjectID = ObjectId; - export class BSONRegExp { - constructor(pattern: string, options: string); - } - export class Symbol { - constructor(value: string); - } - export class Timestamp { - static fromInt(i: number): Timestamp; - static fromNumber(n: number): Timestamp; - static fromBits(lowBits: number, highBits: number): Timestamp; - static fromString(s: string, opt_radix?: number): Timestamp; - - constructor(low: number, high: number); - } - } - export let BSONNative: typeof BSONPure; - +export interface DeserializeOptions { + /** {Boolean, default:false}, evaluate functions in the BSON document scoped to the object deserialized. */ + evalFunctions?: boolean; + /** {Boolean, default:false}, cache evaluated functions for reuse. */ + cacheFunctions?: boolean; + /** {Boolean, default:false}, use a crc32 code for caching, otherwise use the string of the function. */ + cacheFunctionsCrc32?: boolean; + /** {Boolean, default:false}, deserialize Binary data directly into node.js Buffer object. */ + promoteBuffers?: boolean; +} +export class BSON { + /** + * @param {Object} object the Javascript object to serialize. + * @param {Boolean} checkKeys the serializer will check if keys are valid. + * @param {Boolean} asBuffer return the serialized object as a Buffer object (ignore). + * @param {Boolean} serializeFunctions serialize the javascript functions (default:false) + * @return {Buffer} returns a TypedArray or Array depending on what your browser supports + */ + serialize(object: any, checkKeys?: boolean, asBuffer?: boolean, serializeFunctions?: boolean): Buffer; + deserialize(buffer: Buffer, options?: DeserializeOptions, isArray?: boolean): any; } -export = bson; +export class Binary { + static SUBTYPE_DEFAULT: number; + static SUBTYPE_FUNCTION: number; + static SUBTYPE_BYTE_ARRAY: number; + static SUBTYPE_UUID_OLD: number; + static SUBTYPE_UUID: number; + static SUBTYPE_MD5: number; + static SUBTYPE_USER_DEFINED: number; + constructor(buffer: Buffer, subType?: number); +} +export class Code { + constructor(code: string | Function, scope?: any); +} +export class DBRef { + constructor(namespace: string, oid: ObjectID, db?: string); +} +export class Double { + constructor (value: number); +} +export class Long { + static fromInt(i: number): Long; + static fromNumber(n: number): Long; + static fromBits(lowBits: number, highBits: number): Long; + static fromString(s: string, opt_radix?: number): Long; + + constructor(low: number, high: number); +} +export class MaxKey { + constructor(); +} +export class MinKey { + constructor(); +} +export class ObjectId { + static createPk(): ObjectId; + static createFromTime(time: number): ObjectId; + static createFromHexString(hexString: string): ObjectId; + static isValid(id: number | string | ObjectId): boolean; + + constructor(id?: number | string | ObjectId); +} +export type ObjectID = ObjectId; +export class BSONRegExp { + constructor(pattern: string, options: string); +} +export class Symbol { + constructor(value: string); +} +export class Timestamp { + static fromInt(i: number): Timestamp; + static fromNumber(n: number): Timestamp; + static fromBits(lowBits: number, highBits: number): Timestamp; + static fromString(s: string, opt_radix?: number): Timestamp; + + constructor(low: number, high: number); +} diff --git a/bson/tsconfig.json b/bson/tsconfig.json index 0338827586..78adc0219b 100644 --- a/bson/tsconfig.json +++ b/bson/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "bson-tests.ts" ] -} +} \ No newline at end of file diff --git a/bucks/tsconfig.json b/bucks/tsconfig.json index 9231c0db3b..641d6425e8 100644 --- a/bucks/tsconfig.json +++ b/bucks/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/buffer-compare/tsconfig.json b/buffer-compare/tsconfig.json index 7adb2631f5..46bf66605d 100644 --- a/buffer-compare/tsconfig.json +++ b/buffer-compare/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/buffer-equal/tsconfig.json b/buffer-equal/tsconfig.json index 015854b604..fe456dae48 100644 --- a/buffer-equal/tsconfig.json +++ b/buffer-equal/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/buffers/tsconfig.json b/buffers/tsconfig.json index a8d7cbbf92..09a2f78457 100644 --- a/buffers/tsconfig.json +++ b/buffers/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bufferstream/index.d.ts b/bufferstream/index.d.ts index 69a16d98e0..ab048e437f 100644 --- a/bufferstream/index.d.ts +++ b/bufferstream/index.d.ts @@ -1,119 +1,89 @@ -// Type definitions for bufferstream v0.6.2 +// Type definitions for bufferstream 0.6 // Project: https://github.com/dodo/node-bufferstream // Definitions by: Bart van der Schoor // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// -declare module 'bufferstream' { - import stream = require('stream'); +import stream = require('stream'); - export = BufferStream; +export = BufferStream; - class BufferStream extends stream.Duplex { - constructor(options?: BufferStream.Opts); +declare class BufferStream extends stream.Duplex { + constructor(options?: BufferStream.Opts); - /* - different buffer behaviors can be triggered by size: + /* + different buffer behaviors can be triggered by size: - none when output drains, bufferstream drains too - flexible buffers everthing that it gets and not piping out - TODO buffer has given size. buffers everthing until buffer is full. when buffer is full then the stream will drain - */ - setSize(size: string): void; // can be one of ['none', 'flexible', ] - setSize(size: number): void; // can be one of ['none', 'flexible', ] - /* - enables stream buffering default - */ - enable(): void; - /* - flushes buffer and disables stream buffering. BufferStream now pipes all data as long as the output accepting data. when the output is draining BufferStream will buffer all input temporary. + none when output drains, bufferstream drains too + flexible buffers everthing that it gets and not piping out + TODO buffer has given size. buffers everthing until buffer is full. when buffer is full then the stream will drain + */ + setSize(size: string | number): void; // can be one of ['none', 'flexible', ] + /* + enables stream buffering default + */ + enable(): void; + /* + flushes buffer and disables stream buffering. BufferStream now pipes all data as long as the output accepting data. when the output is draining BufferStream will buffer all input temporary. - token[s] buffer splitters (should be String or Buffer) + token[s] buffer splitters (should be String or Buffer) - disables given tokens. wont flush until no splitter tokens are left. - */ - disable(): void; - disable(token: string, ...tokens: string[]): void; - disable(tokens: string[]): void; // Array - disable(token: Buffer, ...tokens: Buffer[]): void; - disable(tokens: Buffer[]): void; // Array - /* - each time BufferStream finds a splitter token in the input data it will emit a split event. this also works for binary data. + disables given tokens. wont flush until no splitter tokens are left. + */ + disable(tokens?: string[] | Buffer[]): void; + disable(token: string, ...tokens: string[]): void; + disable(token: Buffer, ...tokens: Buffer[]): void; + /* + each time BufferStream finds a splitter token in the input data it will emit a split event. this also works for binary data. - token[s] buffer splitters (should be String or Buffer) - */ - split(token: string, ...tokens: string[]): void; - split(tokens: string[]): void; // Array - split(token: Buffer, ...tokens: Buffer[]): void; - split(tokens: Buffer[]): void; // Array - /* - returns Buffer. - */ - getBuffer(): Buffer; - /* - returns Buffer. - */ - buffer: Buffer; - /* - shortcut for buffer.toString() - */ - toString(): string; - /* - shortcut for buffer.length - */ - length: number; - } - namespace BufferStream { - - export interface Opts { - /* - default encoding for writing strings - */ - encoding?: string; - /* - if true and the source is a child_process the stream will block the entire process (timeouts wont work anymore, but splitting and listening on data still works, because they work sync) - */ - blocking?: boolean; - /* - defines buffer level or sets buffer to given size (see ↓setSize for more) - */ - size?: any; - /* - immediately call disable - */ - disabled?: boolean; - /* - short form for: - split(token, function (chunk) {emit('data', chunk)}) - */ - // String or Buffer - split?: any; - } - export var fn: {warn: boolean}; - } + token[s] buffer splitters (should be String or Buffer) + */ + split(tokens: string[] | Buffer[]): void; + split(token: string, ...tokens: string[]): void; + split(token: Buffer, ...tokens: Buffer[]): void; + /* + returns Buffer. + */ + getBuffer(): Buffer; + /* + returns Buffer. + */ + buffer: Buffer; + /* + shortcut for buffer.toString() + */ + toString(): string; + /* + shortcut for buffer.length + */ + length: number; } +declare namespace BufferStream { -declare module 'bufferstream/postbuffer' { - import http = require('http'); - import BufferStream = require('bufferstream'); - - class PostBuffer extends BufferStream { + export interface Opts { /* - for if you want to get all the post data from a http server request and do some db reqeust before. - - http client buffer + default encoding for writing strings */ - constructor(req: http.IncomingMessage); + encoding?: string; /* - set a callback to get all post data from a http server request + if true and the source is a child_process the stream will block the entire process (timeouts wont work anymore, but splitting and listening on data still works, because they work sync) */ - onEnd(callback: (data: any) => void): void; + blocking?: boolean; /* - pumps data into another stream to allow incoming streams given options will be passed to Stream.pipe + defines buffer level or sets buffer to given size (see ↓setSize for more) */ - pipe(stream: NodeJS.WritableStream, options?: BufferStream.Opts): NodeJS.ReadableStream; + size?: any; + /* + immediately call disable + */ + disabled?: boolean; + /* + short form for: + split(token, function (chunk) {emit('data', chunk)}) + */ + // String or Buffer + split?: any; } - - export = PostBuffer; + export var fn: {warn: boolean}; } diff --git a/bufferstream/postbuffer.d.ts b/bufferstream/postbuffer.d.ts new file mode 100644 index 0000000000..f8591771cc --- /dev/null +++ b/bufferstream/postbuffer.d.ts @@ -0,0 +1,12 @@ +import http = require('http'); +import BufferStream = require('./index'); + +export = PostBuffer; +declare class PostBuffer extends BufferStream { + /** for if you want to get all the post data from a http server request and do some db request before. */ + constructor(req: http.IncomingMessage); + /** set a callback to get all post data from a http server request */ + onEnd(callback: (data: any) => void): void; + /** pumps data into another stream to allow incoming streams given options will be passed to Stream.pipe */ + pipe(stream: NodeJS.WritableStream, options?: BufferStream.Opts): NodeJS.ReadableStream; +} diff --git a/bufferstream/tsconfig.json b/bufferstream/tsconfig.json index 2d0055c5f2..b7a18fa043 100644 --- a/bufferstream/tsconfig.json +++ b/bufferstream/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -15,6 +17,7 @@ }, "files": [ "index.d.ts", + "postbuffer.d.ts", "bufferstream-tests.ts" ] } \ No newline at end of file diff --git a/bufferstream/tslint.json b/bufferstream/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/bufferstream/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/bugsnag/tsconfig.json b/bugsnag/tsconfig.json index 34e7a6fa4f..480f98a223 100644 --- a/bugsnag/tsconfig.json +++ b/bugsnag/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bull/tsconfig.json b/bull/tsconfig.json index 8ee650885d..56a53750f3 100644 --- a/bull/tsconfig.json +++ b/bull/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bunnymq/tsconfig.json b/bunnymq/tsconfig.json index b061b72bac..fe2f7d19dd 100644 --- a/bunnymq/tsconfig.json +++ b/bunnymq/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bunyan-config/tsconfig.json b/bunyan-config/tsconfig.json index 994b268230..316e779857 100644 --- a/bunyan-config/tsconfig.json +++ b/bunyan-config/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bunyan-logentries/tsconfig.json b/bunyan-logentries/tsconfig.json index f50f595e76..fab7ab8adf 100644 --- a/bunyan-logentries/tsconfig.json +++ b/bunyan-logentries/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bunyan-prettystream/tsconfig.json b/bunyan-prettystream/tsconfig.json index 57900123eb..681f08207f 100644 --- a/bunyan-prettystream/tsconfig.json +++ b/bunyan-prettystream/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bunyan/tsconfig.json b/bunyan/tsconfig.json index 2349bbd240..9564bbdbc9 100644 --- a/bunyan/tsconfig.json +++ b/bunyan/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/busboy/tsconfig.json b/busboy/tsconfig.json index aee3c8ccae..1879cda2a9 100644 --- a/busboy/tsconfig.json +++ b/busboy/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/business-rules-engine/tsconfig.json b/business-rules-engine/tsconfig.json index 290905450c..008e622d1f 100644 --- a/business-rules-engine/tsconfig.json +++ b/business-rules-engine/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bwip-js/tsconfig.json b/bwip-js/tsconfig.json index 66f010939e..9c80d3dd4a 100644 --- a/bwip-js/tsconfig.json +++ b/bwip-js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/byline/tsconfig.json b/byline/tsconfig.json index bad6eafe23..1b19defc70 100644 --- a/byline/tsconfig.json +++ b/byline/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bytebuffer/tsconfig.json b/bytebuffer/tsconfig.json index caa21be4bb..4c483ce2a5 100644 --- a/bytebuffer/tsconfig.json +++ b/bytebuffer/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/bytes/tsconfig.json b/bytes/tsconfig.json index 027930acd8..49c5cc8c74 100644 --- a/bytes/tsconfig.json +++ b/bytes/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/c3/index.d.ts b/c3/index.d.ts index 90b670c73c..aa960b0b60 100644 --- a/c3/index.d.ts +++ b/c3/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Marc Climent // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +import * as d3 from "d3"; export = c3; export as namespace c3; diff --git a/c3/package.json b/c3/package.json deleted file mode 100644 index 5e771f4dcd..0000000000 --- a/c3/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/d3": "^3.5.36" - } -} diff --git a/c3/tsconfig.json b/c3/tsconfig.json index f439630232..640f7156af 100644 --- a/c3/tsconfig.json +++ b/c3/tsconfig.json @@ -1,10 +1,21 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "paths": { + "d3": ["d3/v3"] + }, "noEmit": true, "forceConsistentCasingInFileNames": true }, diff --git a/cache-manager/tsconfig.json b/cache-manager/tsconfig.json index b32e787047..522fd22794 100644 --- a/cache-manager/tsconfig.json +++ b/cache-manager/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cachefactory/tsconfig.json b/cachefactory/tsconfig.json index 86d3b5a1e3..f39484366b 100644 --- a/cachefactory/tsconfig.json +++ b/cachefactory/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cal-heatmap/index.d.ts b/cal-heatmap/index.d.ts index 4ecc4d3d87..194d9fa128 100644 --- a/cal-heatmap/index.d.ts +++ b/cal-heatmap/index.d.ts @@ -3,512 +3,514 @@ // Definitions by: Chris Baker // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +import * as d3 from "d3"; -declare namespace CalHeatMap -{ - interface CalHeatMapStatic +declare global { + namespace CalHeatMap { - new (): CalHeatMap; - } + interface CalHeatMapStatic + { + new (): CalHeatMap; + } - interface CalHeatMap - { - /** - * Initialise the CalHeatMap with the specified options - * @param {InitOptions} options The CalHeatMap options - */ - init(options?: InitOptions): void; + interface CalHeatMap + { + /** + * Initialise the CalHeatMap with the specified options + * @param {InitOptions} options The CalHeatMap options + */ + init(options?: InitOptions): void; - options: RuntimeOptions; + options: RuntimeOptions; - // Various update mode when using the update() API - /** Reset the whole calendar data before inserting the new data. */ - RESET_ALL_ON_UPDATE: number; - /** - * Update only the dates (subDomain) you pass in the data argument, replace their value by the new ones. - * All other dates are leaved untouched. - */ - RESET_SINGLE_ON_UPDATE: number; - /** - * Instead of replacing a date's value by a new one, increment it by the new value. All other dates are leaved untouched. - * That's the one you want to use of you're populating the calendar in realtime! - */ - APPEND_ON_UPDATE: number; + // Various update mode when using the update() API + /** Reset the whole calendar data before inserting the new data. */ + RESET_ALL_ON_UPDATE: number; + /** + * Update only the dates (subDomain) you pass in the data argument, replace their value by the new ones. + * All other dates are leaved untouched. + */ + RESET_SINGLE_ON_UPDATE: number; + /** + * Instead of replacing a date's value by a new one, increment it by the new value. All other dates are leaved untouched. + * That's the one you want to use of you're populating the calendar in realtime! + */ + APPEND_ON_UPDATE: number; - /** - * Shift the calendar n domains back - * @param {number} n The number of domains to shift back. The default is 1. - */ - previous(n?: number): void; - /** - * Shift the calendar n domains forward - * @param {number} n The number of domains to shift forward. The default is 1. - */ - next(n?: number): void; - /** - * Jump the calendar to the specified date - * This method will shift the calendar backward or forward, until the domain containing the specified date is visible. - * @param {Date} date The date to jump to. - * @param {boolean} reset Whether to set the domain with the specified as the calendar's first domain. - */ - jumpTo(date: Date, reset?: boolean): void; - /** Reset the calendar back to the start date */ - rewind(): void; - /** - * Update the calendar with new data - * Use update() when you want to refresh the calendar with a new set of data. - * Particularly useful if you're filling the calendar in realtime, or if you want to display a subset of the current data. - * @param {string|Object} data Accept the same format as the data option. - * @param {} afterLoad Whether to execute the afterLoad() callback to convert your data into the json object, expected by cal-heatmap. - * It can also directly takes a function, in case your data can not be converted with the afterLoad() function you defined. - * @param {} updateMode Define how to insert the new data into the calendar. - * Accepted values are: - * Instance.RESET_ALL_ON_UPDATE (default) Reset the whole calendar data before inserting the new data. - * Instance.RESET_SINGLE_ON_UPDATE Update only the dates (subDomain) you pass in the data argument, - * replace their value by the new ones. All other dates are leaved untouched. - * Instance.APPEND_ON_UPDATE Instead of replacing a date's value by a new one, increment it by the new value. - * All other dates are leaved untouched. That's the one you want to use of you're - * populating the calendar in realtime! - */ - update(data: string | Object, afterLoad?: boolean | Function, updateMode?: number): void; - /** - * Change the highlighted dates. - * Takes an array of Date object. Can also accepts the now string, equivalent to Date.now(). - * @param {string|Date|Date[]} dates The date or dates to highlight. - */ - highlight(dates: string | Date | Date[]): void; - /** - * Return the SVG source code with the appropriate CSS - * The returned string code is valid and ready to be placed in a .svg file. - * @returns SVG source code with the appropriate CSS. - */ - getSVG(): string; - /** - * Change the legend settings and/or threshold - * When called without arguments, setLegend() will just redraw the legend. - * @param {} legend Same as legend : an array of thresholds - * @param {} legendColor Same as legendColors : an object with the heatmap's colors, or an array of 2 colors - */ - setLegend(legend?: number[], legendColors?: LegendColor | string[]): void; - /** - * Remove the legend from the calendar - * Settings are kept and you can re-add the legend with the same settings using showLegend(). - */ - removeLegend(): void; - /** Display the legend, if not already shown. */ - showLegend(): void; - /** - * Remove the calendar from the DOM - * Remember to self-assign the result of destroy() to your calendar instance, or it'll lead to a memory leak. - * @param {Function} callback function that will be executed when the calendar is removed from the DOM, at the end of the animation. - * @returns always returns null. - */ - destroy(callback?: Function): CalHeatMap; - } + /** + * Shift the calendar n domains back + * @param {number} n The number of domains to shift back. The default is 1. + */ + previous(n?: number): void; + /** + * Shift the calendar n domains forward + * @param {number} n The number of domains to shift forward. The default is 1. + */ + next(n?: number): void; + /** + * Jump the calendar to the specified date + * This method will shift the calendar backward or forward, until the domain containing the specified date is visible. + * @param {Date} date The date to jump to. + * @param {boolean} reset Whether to set the domain with the specified as the calendar's first domain. + */ + jumpTo(date: Date, reset?: boolean): void; + /** Reset the calendar back to the start date */ + rewind(): void; + /** + * Update the calendar with new data + * Use update() when you want to refresh the calendar with a new set of data. + * Particularly useful if you're filling the calendar in realtime, or if you want to display a subset of the current data. + * @param {string|Object} data Accept the same format as the data option. + * @param {} afterLoad Whether to execute the afterLoad() callback to convert your data into the json object, expected by cal-heatmap. + * It can also directly takes a function, in case your data can not be converted with the afterLoad() function you defined. + * @param {} updateMode Define how to insert the new data into the calendar. + * Accepted values are: + * Instance.RESET_ALL_ON_UPDATE (default) Reset the whole calendar data before inserting the new data. + * Instance.RESET_SINGLE_ON_UPDATE Update only the dates (subDomain) you pass in the data argument, + * replace their value by the new ones. All other dates are leaved untouched. + * Instance.APPEND_ON_UPDATE Instead of replacing a date's value by a new one, increment it by the new value. + * All other dates are leaved untouched. That's the one you want to use of you're + * populating the calendar in realtime! + */ + update(data: string | Object, afterLoad?: boolean | Function, updateMode?: number): void; + /** + * Change the highlighted dates. + * Takes an array of Date object. Can also accepts the now string, equivalent to Date.now(). + * @param {string|Date|Date[]} dates The date or dates to highlight. + */ + highlight(dates: string | Date | Date[]): void; + /** + * Return the SVG source code with the appropriate CSS + * The returned string code is valid and ready to be placed in a .svg file. + * @returns SVG source code with the appropriate CSS. + */ + getSVG(): string; + /** + * Change the legend settings and/or threshold + * When called without arguments, setLegend() will just redraw the legend. + * @param {} legend Same as legend : an array of thresholds + * @param {} legendColor Same as legendColors : an object with the heatmap's colors, or an array of 2 colors + */ + setLegend(legend?: number[], legendColors?: LegendColor | string[]): void; + /** + * Remove the legend from the calendar + * Settings are kept and you can re-add the legend with the same settings using showLegend(). + */ + removeLegend(): void; + /** Display the legend, if not already shown. */ + showLegend(): void; + /** + * Remove the calendar from the DOM + * Remember to self-assign the result of destroy() to your calendar instance, or it'll lead to a memory leak. + * @param {Function} callback function that will be executed when the calendar is removed from the DOM, at the end of the animation. + * @returns always returns null. + */ + destroy(callback?: Function): CalHeatMap; + } - interface LegendColor - { - /** Color of the smallest value on the legend */ - min: string; - /** Color of the highest value on the legend */ - max: string; - /** Color for the dates with value == 0 */ - empty?: string; - /** Base color of the date cells */ - base?: string; - /** Color for the special value */ - overflow?: string; - } + interface LegendColor + { + /** Color of the smallest value on the legend */ + min: string; + /** Color of the highest value on the legend */ + max: string; + /** Color for the dates with value == 0 */ + empty?: string; + /** Base color of the date cells */ + base?: string; + /** Color for the special value */ + overflow?: string; + } - interface InitOptions - { - // ================================================ - // Presentation - // ================================================ + interface InitOptions + { + // ================================================ + // Presentation + // ================================================ - /** DOM node to insert the calendar in. Default: "#cal-heatmap" */ - itemSelector?: string | HTMLElement | Element | EventTarget; + /** DOM node to insert the calendar in. Default: "#cal-heatmap" */ + itemSelector?: string | HTMLElement | Element | EventTarget; - /** - * Type of domain. Default: "hour" - * Valid domains: {"hour", "day", "week", "month", "year"} - */ - domain?: string; + /** + * Type of domain. Default: "hour" + * Valid domains: {"hour", "day", "week", "month", "year"} + */ + domain?: string; - /** - * Type of subDomain. Default: "min" - * Valid subDomains: {"min", "x_min", "hour", "x_hour", "day", "x_day", "week", "x_week", "month", "x_month"} - */ - subDomain?: string; + /** + * Type of subDomain. Default: "min" + * Valid subDomains: {"min", "x_min", "hour", "x_hour", "day", "x_day", "week", "x_week", "month", "x_month"} + */ + subDomain?: string; - /** Number of domain to display. Default: 12 */ - range?: number; + /** Number of domain to display. Default: 12 */ + range?: number; - /** Size of each subDomain cell, in pixels. Default: 10 */ - cellSize?: number; + /** Size of each subDomain cell, in pixels. Default: 10 */ + cellSize?: number; - /** Space between each subDomain cell, in pixel. Default: 2 */ - cellPadding?: number; + /** Space between each subDomain cell, in pixel. Default: 2 */ + cellPadding?: number; - /** subDomain cell's border radius, for rounder corner, in pixel. Default: 0 */ - cellRadius?: number; + /** subDomain cell's border radius, for rounder corner, in pixel. Default: 0 */ + cellRadius?: number; - /** Space between each domain, in pixel. Default: 2 */ - domainGutter?: number; + /** Space between each domain, in pixel. Default: 2 */ + domainGutter?: number; - /** - * Margin around each domain, in pixel. Default: [0,0,0,0] - * Ordered like in CSS (top, right, bottom, left), it also accepts CSS like values - */ - domainMargin?: number | number[]; + /** + * Margin around each domain, in pixel. Default: [0,0,0,0] + * Ordered like in CSS (top, right, bottom, left), it also accepts CSS like values + */ + domainMargin?: number | number[]; - /** - * Whether to enable domain dynamic width and height. Default: true - * Some domain>subdomain couple, like month>days, doesn't always have the same number of - * subDomain cells. Some months have 6 weeks, some only 4. - * With dynamic dimension enabled, the domain width and height will be adjusted to fit the - * domain content, whereas when it's disabled, all domains will have the same dimension : the biggest. - */ - domainDynamicDimension?: boolean; + /** + * Whether to enable domain dynamic width and height. Default: true + * Some domain>subdomain couple, like month>days, doesn't always have the same number of + * subDomain cells. Some months have 6 weeks, some only 4. + * With dynamic dimension enabled, the domain width and height will be adjusted to fit the + * domain content, whereas when it's disabled, all domains will have the same dimension : the biggest. + */ + domainDynamicDimension?: boolean; - /** To display the calendar vertically, with each domain one under the other. Default: false */ - verticalOrientation?: boolean; + /** To display the calendar vertically, with each domain one under the other. Default: false */ + verticalOrientation?: boolean; + + /** Position and alignment of the domain label. */ + label?: Label; + + /** + * Control the number of columns to split the domain dates into. Default: null + * Each domain is split into an arbitrary number of columns (or rows depending on the + * reading direction). You can overwrite that number with colLimit, and force all dates on the + * same line, or split them into more columns. + * That setting limit the maximum number of columns, and doesn't necessary means that each rows will + * contains that number of columns. + */ + colLimit?: number; + + /** Control the number of rows to split the domain dates into. Default: null + * If rowLimit and colLimit are both used, rowLimit will be ignored. */ + rowLimit?: number; + + /** Whether to display a tooltip when hovering over a date. Default: false */ + tooltip?: boolean; + + // ================================================ + // Data + // ================================================ + + /** + * Starting date of the calendar. Default: new Date() + * It doesn't have to be precise, the calendar will not start at that date, but at the first domain containing that date. + */ + start?: Date; + /** + * Data used to fill the calendar. Default: "" + * String is interpreted as a URL to an API, which should be returning the data used to fill the calendar. + */ + + data?: string | Object; + + /** + * Engine used to parse the data. Default: json + * Valid values: + * "json" - Interpret the data as json. + * "csv" - Interpret the data as csv. + * "tsv" - Interpret the data exactly like csv, but are delimited with a tab character, instead of comma. + * "txt" - Just return the data as a string. + */ + dataType?: string; + + /** + * Highlight selected subDomain cells. Default: false + * Takes an array of Date object. Can also accepts the now string, equivalent to Date.now(). + */ + highlight?: string | string[] | Date[] | any[]; + + /** Whether to start the week on Monday, instead of Sunday. Default: true */ + weekStartOnMonday?: boolean; + + /** + * Lower limit of the domain navigation, preventing navigating beyond a certain date. Default: null + * When set, calling previous() will only work only until the leftmost domain containing minDate. + * Like with start, minDate does not have to be precise, and just have to be a date inside the domain. + * previous() will always return true, unless the domain containing minDate is reached, in which case, it'll return false. + */ + minDate?: Date; + + /** Upper limit of the domain navigation, preventing navigating beyond a certain date. Default: null */ + maxDate?: Date; + + /** + * Whether to consider missing date:value couple in the data source as equal to 0. Default: false + * By default, when the a date is not associated to a value, it's considered as null, and rendered as a no value cell. + * You should ask yourself, if the API is not returning result for a date, is it because there is really no value + * associated to this date, or because it's supposed to be equal to 0, and it's skipped in order to save bandwidth ? + */ + considerMissingDataAsZero?: boolean; + + // ================================================ + // Legend + // ================================================ + + /** Assign each range of values to a color. Default: [10, 20, 30, 40] */ + legend?: number[]; + + /** Whether to display the legend. Default: true */ + displayLegend?: boolean; + + /** Size of the legend cells, in pixels. Default: 10 */ + legendCellSize?: number; + + /** Padding between each legend cell, in pixels. Default: 2 */ + legendCellPadding?: number; + + /** Margin around the legend, in pixels. Default: [10, 0, 0, 0] */ + legendMargin?: number | number[]; + + /** + * Vertical position of the legend. Default: "bottom" + * Valid values: + * "top" - Place the legend above the calendar + * "center" - Place the legend on the calendar's side + * Use with legendHorizontalPosition, to position the legend on the left (default) or on the right. + * "bottom" - Place the legend on below the calendar + */ + legendVerticalPosition?: string; + + /** + * Horizontal position of the legend. Default: "left" + * Valid values: + * "left" - Align the legend to the left + * "center" - Center the legend + * "right" - Align the legend to the right + */ + legendHorizontalPosition?: string; + + /** + * Orientation of the legend. Default: "horizontal" + * legendOrientation is best used together with legendHorizontalPosition when the legend is positioned on the side. + * Valid values: + * "horizontal" - Legend is displayed horizontally, from left to right + * "vertical" - Legend is displayed vertically, from top to bottom + */ + legendOrientation?: string; + + /** + * Set of colors to automagically compute the heatmap colors. + * Instead of relying on the CSS for your heatmap's colors, you can also set the heatmap's colors directly with + * cal-heatmap on initialization, or even dynamically change them after. + * All legend settings can be changed dynamically after calendar initialisation, with setLegend(). + */ + legendColors?: LegendColor | string[]; + + // ================================================ + // i18n + // ================================================ + + /** + * Name of the entity you're representing on the calendar. + * Takes an array of string, with the first index as the singular form, and the second index the plural form. + * For the lazy, you can also pass a simple string, ar a single element array, and it'll automatically guess + * the plural form, as long as it's the singular form plus the "s" suffix. + */ + itemName?: string | string[]; + /** + * Format of the title displayed when hovering a subDomain. + * Some template strings are available, and enclosed in braces. + * {name} Name of the entity represented in the calendar (see itemName) + * {count} The value associated to the date. + * {date} The date of the cell. It's automatically formatted according to the type of subDomain. + * See subDomainDateFormat to further customize that date formatting. + * {connector} An English preposition placed before a datetime (on Monday, at 15:00, etc.). Each subDomain + * have their own default connector, corresponding to the default date format. + */ + subDomainTitleFormat?: SubDomainFormatTemplates; + /** + * Format of the {date} template string inside subDomainTitleFormat. + * {date} is by default formatted according to the subDomain type. + * subDomainFormat can accept any string with directive accepted by d3.time.format(), like "%Y-%m-%d". + * As d3.time.format() will only output English dates, subDomainDateFormat can also accept a function, + * with the subDomain date as the argument. + */ + subDomainDateFormat?: string | Function; + /** + * Format of the text inside a subDomain cell. + * Disabled by default, you can display a text inside each subDomain cell. + * Works exactly like subDomainDateFormat, except that the function takes the cell value as second argument. + */ + subDomainTextFormat?: string | Function; + /** + * Format of the domain label. + * Works exactly like subDomainDateFormat, and will format the domain label with any string accepted by d3.time.format(), or a function. + * To not display the domain label, set domainLabelFormat to "" (empty string). + */ + domainLabelFormat?: string | Function; + /** + * Formatting of the legend title, displayed when hovering a legend cell. + * Some template strings are available, and enclosed in braces. + * {name} Name of the entity represented in the calendar (see itemName) + * {min} The first value of the legend array. + * {max} The last value of the legend array. + * {down} The lower bound of a color + * {up} The upper bound of a color + */ + legendTitleFormat?: LegendTitleTemplates; + + // ================================================ + // Other + // ================================================ + + /** Animation duration, in milliseconds. Default value: 500 */ + animationDuration?: number; + /** + * Will attach the previous() event to the specified element, on a mouse click, shifting the calendar one domain back. Default value: false + * If you want to shift by more than one domain, see the previous() method. + */ + previousSelector?: string | HTMLElement; + /** + * Will attach the next() event to the specified element, on a mouse click, shifting the calendar one domain forward. Default value: false + * If you want to shift by more than one domain, see the next() method. + */ + nextSelector?: string | HTMLElement; + /** + * The calendar instance namespace. + * If you have more than one instance of Cal-Heatmap, you should assign each instance its own namespace, in order to isolate each instance event handler. + */ + itemNamespace?: string; + + // ================================================ + // Events + // ================================================ + + /** Called after a mouse click event on a subDomain cell. */ + onClick?: (date: Date, value: number) => void; + /** Called after drawing the empty calendar, and before filling it with data. */ + afterLoad?: () => void; + /** + * Called after shifting the calendar one domain back. + * The date argument is the start date of the domain that was added. + */ + afterLoadPreviousDomain?: (date: Date) => void; + /** + * Called after shifting the calendar one domain forward. + * The date argument is the start date of the domain that was added. + */ + afterLoadNextDomain?: (date: Date) => void; + /** + * Called after drawing and filling the calendar. + * Useful in case you're loading data via ajax, as it's loading data asynchronously. This event will wait for the ajax + * request to complete before triggering. + * This event will only trigger once, on the initial setup. See afterLoadPreviousDomain and afterLoadNextDomain for + * callback events after a domain navigation. + */ + onComplete?: () => void; + /** + * Called after getting the data from source, but before filling the calendar. + * This callback must return a json object formatted in the expected data format. + * afterLoadData() is used to do some works on the data, especially when the data source is not returning data in the expected format. + */ + afterLoadData?: (data: any) => DataFormat; + /** + * Triggered after previous(), when the incoming domain is containing minDate. + * When the leftmost domain set by minDate is loaded into the calendar, onMinDomainReached() will be triggered with true as argument. + * This event is useful if you want to disable your previous button, since there is no more previous domains to load. + * In order to reverse the action, onMinDomainReached() will be called with false as argument afer next(), only once, and only if the + * leftmost domain is not the lower limit domain anymore. + */ + onMinDomainReached?: (reached: boolean) => void; + /** + * Triggered after next(), when the incoming domain is containing maxDate. + * See onMinDomainReached(). + */ + onMaxDomainReached?: (reached: boolean) => void; + } + + interface RuntimeOptions extends InitOptions + { + /** Margin around each domain, in pixels. Ordered like in CSS (top, right, bottom, left) */ + domainMargin: number[]; + /** Margin around the legend, in pixels. Ordered like in CSS (top, right, bottom, left) */ + legendMargin: number[]; + /** List of dates to highlight */ + highlight: Date[]; + /** + * Name of the items to represent in the calendar. + * First index is singular form, and the second index, the plural form. + */ + itemName: string[]; + } + + interface LegendTitleTemplates + { + /** Formatting of the smallest (leftmost) value of the legend. Default value: "less than {min} {name}" */ + lower?: string; + /** Formatting of all the value but the first and the last. Default value: "between {down} and {up} {name}" */ + inner?: string; + /** Formatting of the biggest (rightmost) value of the legend. Default value: "more than {max} {name}" */ + upper?: string; + } + + interface SubDomainFormatTemplates + { + /** Format of the title when there is no value associated to the date. Default value: "{date}" */ + empty?: string; + /** Format of the title when it's associated to a value. Default value: "{count} {name} {connector} {date}" */ + filled?: string; + } + + interface DataFormat + { + /** timestamp are in seconds, value can be any number (integer or float) */ + [timestamp: string]: number; + } + + interface LabelOffset + { + x: number; + y: number; + } /** Position and alignment of the domain label. */ - label?: Label; + interface Label + { + /** + * Position of the label, relative to the domain. Default: "bottom" + * Valid values: {"top", "right", "bottom", "left"} + */ + position?: string; - /** - * Control the number of columns to split the domain dates into. Default: null - * Each domain is split into an arbitrary number of columns (or rows depending on the - * reading direction). You can overwrite that number with colLimit, and force all dates on the - * same line, or split them into more columns. - * That setting limit the maximum number of columns, and doesn't necessary means that each rows will - * contains that number of columns. - */ - colLimit?: number; - - /** Control the number of rows to split the domain dates into. Default: null - * If rowLimit and colLimit are both used, rowLimit will be ignored. */ - rowLimit?: number; - - /** Whether to display a tooltip when hovering over a date. Default: false */ - tooltip?: boolean; - - // ================================================ - // Data - // ================================================ - - /** - * Starting date of the calendar. Default: new Date() - * It doesn't have to be precise, the calendar will not start at that date, but at the first domain containing that date. - */ - start?: Date; - /** - * Data used to fill the calendar. Default: "" - * String is interpreted as a URL to an API, which should be returning the data used to fill the calendar. - */ - - data?: string | Object; - - /** - * Engine used to parse the data. Default: json - * Valid values: - * "json" - Interpret the data as json. - * "csv" - Interpret the data as csv. - * "tsv" - Interpret the data exactly like csv, but are delimited with a tab character, instead of comma. - * "txt" - Just return the data as a string. - */ - dataType?: string; - - /** - * Highlight selected subDomain cells. Default: false - * Takes an array of Date object. Can also accepts the now string, equivalent to Date.now(). - */ - highlight?: string | string[] | Date[] | any[]; - - /** Whether to start the week on Monday, instead of Sunday. Default: true */ - weekStartOnMonday?: boolean; - - /** - * Lower limit of the domain navigation, preventing navigating beyond a certain date. Default: null - * When set, calling previous() will only work only until the leftmost domain containing minDate. - * Like with start, minDate does not have to be precise, and just have to be a date inside the domain. - * previous() will always return true, unless the domain containing minDate is reached, in which case, it'll return false. - */ - minDate?: Date; - - /** Upper limit of the domain navigation, preventing navigating beyond a certain date. Default: null */ - maxDate?: Date; - - /** - * Whether to consider missing date:value couple in the data source as equal to 0. Default: false - * By default, when the a date is not associated to a value, it's considered as null, and rendered as a no value cell. - * You should ask yourself, if the API is not returning result for a date, is it because there is really no value - * associated to this date, or because it's supposed to be equal to 0, and it's skipped in order to save bandwidth ? - */ - considerMissingDataAsZero?: boolean; - - // ================================================ - // Legend - // ================================================ - - /** Assign each range of values to a color. Default: [10, 20, 30, 40] */ - legend?: number[]; - - /** Whether to display the legend. Default: true */ - displayLegend?: boolean; - - /** Size of the legend cells, in pixels. Default: 10 */ - legendCellSize?: number; - - /** Padding between each legend cell, in pixels. Default: 2 */ - legendCellPadding?: number; - - /** Margin around the legend, in pixels. Default: [10, 0, 0, 0] */ - legendMargin?: number | number[]; - - /** - * Vertical position of the legend. Default: "bottom" - * Valid values: - * "top" - Place the legend above the calendar - * "center" - Place the legend on the calendar's side - * Use with legendHorizontalPosition, to position the legend on the left (default) or on the right. - * "bottom" - Place the legend on below the calendar - */ - legendVerticalPosition?: string; - - /** - * Horizontal position of the legend. Default: "left" - * Valid values: - * "left" - Align the legend to the left - * "center" - Center the legend - * "right" - Align the legend to the right - */ - legendHorizontalPosition?: string; - - /** - * Orientation of the legend. Default: "horizontal" - * legendOrientation is best used together with legendHorizontalPosition when the legend is positioned on the side. - * Valid values: - * "horizontal" - Legend is displayed horizontally, from left to right - * "vertical" - Legend is displayed vertically, from top to bottom - */ - legendOrientation?: string; - - /** - * Set of colors to automagically compute the heatmap colors. - * Instead of relying on the CSS for your heatmap's colors, you can also set the heatmap's colors directly with - * cal-heatmap on initialization, or even dynamically change them after. - * All legend settings can be changed dynamically after calendar initialisation, with setLegend(). - */ - legendColors?: LegendColor | string[]; - - // ================================================ - // i18n - // ================================================ - - /** - * Name of the entity you're representing on the calendar. - * Takes an array of string, with the first index as the singular form, and the second index the plural form. - * For the lazy, you can also pass a simple string, ar a single element array, and it'll automatically guess - * the plural form, as long as it's the singular form plus the "s" suffix. - */ - itemName?: string | string[]; - /** - * Format of the title displayed when hovering a subDomain. - * Some template strings are available, and enclosed in braces. - * {name} Name of the entity represented in the calendar (see itemName) - * {count} The value associated to the date. - * {date} The date of the cell. It's automatically formatted according to the type of subDomain. - * See subDomainDateFormat to further customize that date formatting. - * {connector} An English preposition placed before a datetime (on Monday, at 15:00, etc.). Each subDomain - * have their own default connector, corresponding to the default date format. - */ - subDomainTitleFormat?: SubDomainFormatTemplates; - /** - * Format of the {date} template string inside subDomainTitleFormat. - * {date} is by default formatted according to the subDomain type. - * subDomainFormat can accept any string with directive accepted by d3.time.format(), like "%Y-%m-%d". - * As d3.time.format() will only output English dates, subDomainDateFormat can also accept a function, - * with the subDomain date as the argument. - */ - subDomainDateFormat?: string | Function; - /** - * Format of the text inside a subDomain cell. - * Disabled by default, you can display a text inside each subDomain cell. - * Works exactly like subDomainDateFormat, except that the function takes the cell value as second argument. - */ - subDomainTextFormat?: string | Function; - /** - * Format of the domain label. - * Works exactly like subDomainDateFormat, and will format the domain label with any string accepted by d3.time.format(), or a function. - * To not display the domain label, set domainLabelFormat to "" (empty string). - */ - domainLabelFormat?: string | Function; - /** - * Formatting of the legend title, displayed when hovering a legend cell. - * Some template strings are available, and enclosed in braces. - * {name} Name of the entity represented in the calendar (see itemName) - * {min} The first value of the legend array. - * {max} The last value of the legend array. - * {down} The lower bound of a color - * {up} The upper bound of a color - */ - legendTitleFormat?: LegendTitleTemplates; - - // ================================================ - // Other - // ================================================ - - /** Animation duration, in milliseconds. Default value: 500 */ - animationDuration?: number; - /** - * Will attach the previous() event to the specified element, on a mouse click, shifting the calendar one domain back. Default value: false - * If you want to shift by more than one domain, see the previous() method. - */ - previousSelector?: string | HTMLElement; - /** - * Will attach the next() event to the specified element, on a mouse click, shifting the calendar one domain forward. Default value: false - * If you want to shift by more than one domain, see the next() method. - */ - nextSelector?: string | HTMLElement; - /** - * The calendar instance namespace. - * If you have more than one instance of Cal-Heatmap, you should assign each instance its own namespace, in order to isolate each instance event handler. - */ - itemNamespace?: string; - - // ================================================ - // Events - // ================================================ - - /** Called after a mouse click event on a subDomain cell. */ - onClick?: (date: Date, value: number) => void; - /** Called after drawing the empty calendar, and before filling it with data. */ - afterLoad?: () => void; - /** - * Called after shifting the calendar one domain back. - * The date argument is the start date of the domain that was added. - */ - afterLoadPreviousDomain?: (date: Date) => void; - /** - * Called after shifting the calendar one domain forward. - * The date argument is the start date of the domain that was added. - */ - afterLoadNextDomain?: (date: Date) => void; - /** - * Called after drawing and filling the calendar. - * Useful in case you're loading data via ajax, as it's loading data asynchronously. This event will wait for the ajax - * request to complete before triggering. - * This event will only trigger once, on the initial setup. See afterLoadPreviousDomain and afterLoadNextDomain for - * callback events after a domain navigation. - */ - onComplete?: () => void; - /** - * Called after getting the data from source, but before filling the calendar. - * This callback must return a json object formatted in the expected data format. - * afterLoadData() is used to do some works on the data, especially when the data source is not returning data in the expected format. - */ - afterLoadData?: (data: any) => DataFormat; - /** - * Triggered after previous(), when the incoming domain is containing minDate. - * When the leftmost domain set by minDate is loaded into the calendar, onMinDomainReached() will be triggered with true as argument. - * This event is useful if you want to disable your previous button, since there is no more previous domains to load. - * In order to reverse the action, onMinDomainReached() will be called with false as argument afer next(), only once, and only if the - * leftmost domain is not the lower limit domain anymore. - */ - onMinDomainReached?: (reached: boolean) => void; - /** - * Triggered after next(), when the incoming domain is containing maxDate. - * See onMinDomainReached(). - */ - onMaxDomainReached?: (reached: boolean) => void; + /** + * Horizontal align of the domain. Default: "center" + * Valid values: {"left", "center", "right"} + */ + align?: string; + /** + * Rotation for a vertical label. Default: null + * Valid values: {null, "left", "right"} + */ + rotate?: string; + /** + * Only used when label is rotated, defines the width of the label. Default: 100 + * Valid values: any intger + */ + width?: number; + /** + * More control about label positioning, if the default value does not fit your need, + * especially when label is rotated, or when using a big font-size. Default: {x:0, y:0} + */ + offset?: LabelOffset; + /** + * Height of the domain label in pixels. + * By leaving it to null, the label will be set to 2 times the height of the subDomain cell. + * If you want to remove the label, set domainLabelFormat to "" (empty string), instead + * of setting the label height to 0. Default: null + * Valid values: any integer + */ + height?: number; + } } - interface RuntimeOptions extends InitOptions - { - /** Margin around each domain, in pixels. Ordered like in CSS (top, right, bottom, left) */ - domainMargin: number[]; - /** Margin around the legend, in pixels. Ordered like in CSS (top, right, bottom, left) */ - legendMargin: number[]; - /** List of dates to highlight */ - highlight: Date[]; - /** - * Name of the items to represent in the calendar. - * First index is singular form, and the second index, the plural form. - */ - itemName: string[]; - } - - interface LegendTitleTemplates - { - /** Formatting of the smallest (leftmost) value of the legend. Default value: "less than {min} {name}" */ - lower?: string; - /** Formatting of all the value but the first and the last. Default value: "between {down} and {up} {name}" */ - inner?: string; - /** Formatting of the biggest (rightmost) value of the legend. Default value: "more than {max} {name}" */ - upper?: string; - } - - interface SubDomainFormatTemplates - { - /** Format of the title when there is no value associated to the date. Default value: "{date}" */ - empty?: string; - /** Format of the title when it's associated to a value. Default value: "{count} {name} {connector} {date}" */ - filled?: string; - } - - interface DataFormat - { - /** timestamp are in seconds, value can be any number (integer or float) */ - [timestamp: string]: number; - } - - interface LabelOffset - { - x: number; - y: number; - } - - /** Position and alignment of the domain label. */ - interface Label - { - /** - * Position of the label, relative to the domain. Default: "bottom" - * Valid values: {"top", "right", "bottom", "left"} - */ - position?: string; - - /** - * Horizontal align of the domain. Default: "center" - * Valid values: {"left", "center", "right"} - */ - align?: string; - /** - * Rotation for a vertical label. Default: null - * Valid values: {null, "left", "right"} - */ - rotate?: string; - /** - * Only used when label is rotated, defines the width of the label. Default: 100 - * Valid values: any intger - */ - width?: number; - /** - * More control about label positioning, if the default value does not fit your need, - * especially when label is rotated, or when using a big font-size. Default: {x:0, y:0} - */ - offset?: LabelOffset; - /** - * Height of the domain label in pixels. - * By leaving it to null, the label will be set to 2 times the height of the subDomain cell. - * If you want to remove the label, set domainLabelFormat to "" (empty string), instead - * of setting the label height to 0. Default: null - * Valid values: any integer - */ - height?: number; - } + var CalHeatMap: CalHeatMap.CalHeatMapStatic; } - -declare var CalHeatMap: CalHeatMap.CalHeatMapStatic; diff --git a/cal-heatmap/package.json b/cal-heatmap/package.json deleted file mode 100644 index 5e771f4dcd..0000000000 --- a/cal-heatmap/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/d3": "^3.5.36" - } -} diff --git a/cal-heatmap/tsconfig.json b/cal-heatmap/tsconfig.json index fb5a562148..7edf3d8067 100644 --- a/cal-heatmap/tsconfig.json +++ b/cal-heatmap/tsconfig.json @@ -1,16 +1,21 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, "baseUrl": "../", "typeRoots": [ - "node_modules/@types", "../" ], "types": [], + "paths": { + "d3": ["d3/v3"] + }, "noEmit": true, "forceConsistentCasingInFileNames": true }, diff --git a/callsite/tsconfig.json b/callsite/tsconfig.json index 9fe360ce2b..cadb982eda 100644 --- a/callsite/tsconfig.json +++ b/callsite/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/calq/tsconfig.json b/calq/tsconfig.json index 7629a025e1..3e0167d2a7 100644 --- a/calq/tsconfig.json +++ b/calq/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/camelcase-keys/tsconfig.json b/camelcase-keys/tsconfig.json index e7b25d69e5..a0216c0338 100644 --- a/camelcase-keys/tsconfig.json +++ b/camelcase-keys/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "camelcase-keys-tests.ts" ] -} +} \ No newline at end of file diff --git a/camelcase/tsconfig.json b/camelcase/tsconfig.json index 5fc9824568..872bd51e96 100644 --- a/camelcase/tsconfig.json +++ b/camelcase/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/camljs/tsconfig.json b/camljs/tsconfig.json index d583ec258e..a606320418 100644 --- a/camljs/tsconfig.json +++ b/camljs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/camo/tsconfig.json b/camo/tsconfig.json index d53c982b25..0e45c8b3f5 100644 --- a/camo/tsconfig.json +++ b/camo/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/canvas-gauges/tsconfig.json b/canvas-gauges/tsconfig.json index 6f6aa11e1d..f33b09f813 100644 --- a/canvas-gauges/tsconfig.json +++ b/canvas-gauges/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/canvasjs/tsconfig.json b/canvasjs/tsconfig.json index e609a4a9c4..218036fa08 100644 --- a/canvasjs/tsconfig.json +++ b/canvasjs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cash/tsconfig.json b/cash/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/cash/tsconfig.json +++ b/cash/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/casperjs/tsconfig.json b/casperjs/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/casperjs/tsconfig.json +++ b/casperjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cassandra-driver/tsconfig.json b/cassandra-driver/tsconfig.json index 2cc6b7e782..9793b9a1b1 100644 --- a/cassandra-driver/tsconfig.json +++ b/cassandra-driver/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cbor/tsconfig.json b/cbor/tsconfig.json index e3ece1c983..d9643467aa 100644 --- a/cbor/tsconfig.json +++ b/cbor/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/chai-as-promised/tsconfig.json b/chai-as-promised/tsconfig.json index be115c3f06..cdca01dc50 100644 --- a/chai-as-promised/tsconfig.json +++ b/chai-as-promised/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/chai-datetime/tsconfig.json b/chai-datetime/tsconfig.json index 43277c3b0d..02fa4af994 100644 --- a/chai-datetime/tsconfig.json +++ b/chai-datetime/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/chai-dom/tsconfig.json b/chai-dom/tsconfig.json index 84cd4a668d..7580cc278e 100644 --- a/chai-dom/tsconfig.json +++ b/chai-dom/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/chai-enzyme/tsconfig.json b/chai-enzyme/tsconfig.json index e04b4818ad..772105a437 100644 --- a/chai-enzyme/tsconfig.json +++ b/chai-enzyme/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/chai-fuzzy/tsconfig.json b/chai-fuzzy/tsconfig.json index f173a4421c..0929562d02 100644 --- a/chai-fuzzy/tsconfig.json +++ b/chai-fuzzy/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/chai-http/tsconfig.json b/chai-http/tsconfig.json index 53cde6fe52..a3b913d24f 100644 --- a/chai-http/tsconfig.json +++ b/chai-http/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/chai-jquery/tsconfig.json b/chai-jquery/tsconfig.json index f101ab5f0e..ca1d1b88ab 100644 --- a/chai-jquery/tsconfig.json +++ b/chai-jquery/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/chai-json-schema/tsconfig.json b/chai-json-schema/tsconfig.json index e61b9daa61..80f35a1598 100644 --- a/chai-json-schema/tsconfig.json +++ b/chai-json-schema/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "chai-json-schema-tests.ts" ] -} +} \ No newline at end of file diff --git a/chai-oequal/tsconfig.json b/chai-oequal/tsconfig.json index a1f6103868..40e4a0b1bc 100644 --- a/chai-oequal/tsconfig.json +++ b/chai-oequal/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/chai-spies/tsconfig.json b/chai-spies/tsconfig.json index 88143d7886..86f86541d9 100644 --- a/chai-spies/tsconfig.json +++ b/chai-spies/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/chai-string/tsconfig.json b/chai-string/tsconfig.json index 9eaaa0490d..9bca70cbb8 100644 --- a/chai-string/tsconfig.json +++ b/chai-string/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/chai-subset/tsconfig.json b/chai-subset/tsconfig.json index 1a7f852ff5..21d5108f1c 100644 --- a/chai-subset/tsconfig.json +++ b/chai-subset/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/chai-things/tsconfig.json b/chai-things/tsconfig.json index a59ed9561c..e426da66a1 100644 --- a/chai-things/tsconfig.json +++ b/chai-things/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/chai-xml/tsconfig.json b/chai-xml/tsconfig.json index abd4d0df2b..f91b76a16c 100644 --- a/chai-xml/tsconfig.json +++ b/chai-xml/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/chai/tsconfig.json b/chai/tsconfig.json index 399af1570c..1e16e4cbf9 100644 --- a/chai/tsconfig.json +++ b/chai/tsconfig.json @@ -5,7 +5,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/chai/v2/tsconfig.json b/chai/v2/tsconfig.json index 4eb64088fc..bc5f6dc588 100644 --- a/chai/v2/tsconfig.json +++ b/chai/v2/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -11,7 +13,9 @@ ], "types": [], "paths": { - "chai": ["chai/v2"] + "chai": [ + "chai/v2" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/chalk/tsconfig.json b/chalk/tsconfig.json index 170f4bea66..7cf506fcc1 100644 --- a/chalk/tsconfig.json +++ b/chalk/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/chance/tsconfig.json b/chance/tsconfig.json index ae3cd15626..86e165072d 100644 --- a/chance/tsconfig.json +++ b/chance/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/change-emitter/tsconfig.json b/change-emitter/tsconfig.json index 729895e968..c009c08554 100644 --- a/change-emitter/tsconfig.json +++ b/change-emitter/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/charm/tsconfig.json b/charm/tsconfig.json index 931b421062..e8bb4426f8 100644 --- a/charm/tsconfig.json +++ b/charm/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "charm-tests.ts" ] -} +} \ No newline at end of file diff --git a/chart.js/tsconfig.json b/chart.js/tsconfig.json index e55a6fd51b..a798d69e23 100644 --- a/chart.js/tsconfig.json +++ b/chart.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/chartist/tsconfig.json b/chartist/tsconfig.json index b5d5a88498..ee8ba7d34f 100644 --- a/chartist/tsconfig.json +++ b/chartist/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/chartjs/tsconfig.json b/chartjs/tsconfig.json index e6b3a63e91..6523e4bd77 100644 --- a/chartjs/tsconfig.json +++ b/chartjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cheap-ruler/tsconfig.json b/cheap-ruler/tsconfig.json index e84a59808f..a693c8bcf3 100644 --- a/cheap-ruler/tsconfig.json +++ b/cheap-ruler/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/checkstyle-formatter/tsconfig.json b/checkstyle-formatter/tsconfig.json index 87eb6217d4..3bc13b0278 100644 --- a/checkstyle-formatter/tsconfig.json +++ b/checkstyle-formatter/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -16,4 +18,4 @@ "files": [ "index.d.ts" ] -} +} \ No newline at end of file diff --git a/checksum/tsconfig.json b/checksum/tsconfig.json index 1f6ac88a01..9fe2d44312 100644 --- a/checksum/tsconfig.json +++ b/checksum/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cheerio/tsconfig.json b/cheerio/tsconfig.json index 9650ec4b5c..d046b455e6 100644 --- a/cheerio/tsconfig.json +++ b/cheerio/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/chocolatechipjs/tsconfig.json b/chocolatechipjs/tsconfig.json index f2b634193f..a94278ac9e 100644 --- a/chocolatechipjs/tsconfig.json +++ b/chocolatechipjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/chokidar/tsconfig.json b/chokidar/tsconfig.json index c456984842..8782979f09 100644 --- a/chokidar/tsconfig.json +++ b/chokidar/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/chosen-js/tsconfig.json b/chosen-js/tsconfig.json index 820e0164df..1e2148076b 100644 --- a/chosen-js/tsconfig.json +++ b/chosen-js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/chroma-js/tsconfig.json b/chroma-js/tsconfig.json index 5dc7522d18..66384ba080 100644 --- a/chroma-js/tsconfig.json +++ b/chroma-js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/chroma-js/v0/tsconfig.json b/chroma-js/v0/tsconfig.json index f4be951841..691743104e 100644 --- a/chroma-js/v0/tsconfig.json +++ b/chroma-js/v0/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -11,7 +13,9 @@ ], "types": [], "paths": { - "chroma-js": ["chroma-js/v0"] + "chroma-js": [ + "chroma-js/v0" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/chrome/tsconfig.json b/chrome/tsconfig.json index 33947734d9..2512d73c9d 100644 --- a/chrome/tsconfig.json +++ b/chrome/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": true, diff --git a/chui/tsconfig.json b/chui/tsconfig.json index 513422c456..a3163f3e43 100644 --- a/chui/tsconfig.json +++ b/chui/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/chunked-dc/tsconfig.json b/chunked-dc/tsconfig.json index 20ce90a8c3..0adf199b05 100644 --- a/chunked-dc/tsconfig.json +++ b/chunked-dc/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/circular-json/tsconfig.json b/circular-json/tsconfig.json index b809a6907a..cdb4636702 100644 --- a/circular-json/tsconfig.json +++ b/circular-json/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ckeditor/ckeditor-tests.ts b/ckeditor/ckeditor-tests.ts index 3ec9b64fd5..289e97168a 100644 --- a/ckeditor/ckeditor-tests.ts +++ b/ckeditor/ckeditor-tests.ts @@ -389,3 +389,21 @@ function test_htmlWriter() { writer.lineBreak(); writer.setRules('img', {breakBeforeOpen: true, breakAfterOpen: true}); } + +function test_sharedSpace() { + CKEDITOR.inline('content', { + removePlugins: 'maximize,resize', + sharedSpaces: { + top: 'someElementId', + bottom: document.getElementById('anotherId') + } + }); + + CKEDITOR.inline('content', { + sharedSpaces: { } + }); +} + +function test_specifying_editor_path() { + window.CKEDITOR_BASEPATH = '/ckeditor/'; +} diff --git a/ckeditor/index.d.ts b/ckeditor/index.d.ts index 271ca0b678..55a748e4c5 100644 --- a/ckeditor/index.d.ts +++ b/ckeditor/index.d.ts @@ -5,6 +5,10 @@ // WORK-IN-PROGRESS: Any contribution support welcomed. // See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/1827 for more informations. +interface Window { + CKEDITOR_BASEPATH: string; +} + declare namespace CKEDITOR { // Config options @@ -784,7 +788,7 @@ declare namespace CKEDITOR { scayt_uiTabs?: string; scayt_userDictionaryName?: string; - sharedSpaces?: Object; + sharedSpaces?: CKEDITOR.sharedSpace; shiftEnterMode?: number; skin?: string; smiley_columns?: number; @@ -834,6 +838,12 @@ declare namespace CKEDITOR { } + interface sharedSpace { + top?: string | HTMLElement; + bottom?: string | HTMLElement; + } + + interface style { } diff --git a/ckeditor/tsconfig.json b/ckeditor/tsconfig.json index 575936ac28..49fc367e30 100644 --- a/ckeditor/tsconfig.json +++ b/ckeditor/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/clamp-js/clamp-js-tests.ts b/clamp-js/clamp-js-tests.ts new file mode 100755 index 0000000000..33accec319 --- /dev/null +++ b/clamp-js/clamp-js-tests.ts @@ -0,0 +1,28 @@ +import * as clamp from 'clamp-js'; + +const lineElement: HTMLElement = document.createElement('div'); +lineElement.style.setProperty('font-size', '3px'); +lineElement.style.setProperty('line-height', '5px'); +lineElement.style.setProperty('height', '11px'); +lineElement.style.setProperty('width', '15px'); + +const newtext: Text = document.createTextNode('Lorem ipsum, dolor sit amet.'); +lineElement.appendChild(newtext); + +const clampFromElement = clamp(lineElement); +const clampFromDefaults = clamp(lineElement, { + clamp: 'auto', + useNativeClamp: true, + splitOnChars: ['.', '-', '–', '—', ' '], + animate: false, + truncationChar: '…', + truncationHTML: null +}); +const clampWithOptions = clamp(lineElement, { + clamp: 1, + useNativeClamp: false, + splitOnChars: [','], + animate: true, + truncationChar: '--', + truncationHTML: '' +}); diff --git a/clamp-js/index.d.ts b/clamp-js/index.d.ts new file mode 100755 index 0000000000..2e86e544f7 --- /dev/null +++ b/clamp-js/index.d.ts @@ -0,0 +1,25 @@ +// Type definitions for clamp-js 0.7 +// Project: https://github.com/xavi160/Clamp.js +// Definitions by: Sebastiaan de Rooij +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace clamp { + export interface ClampOptions { + clamp?: number|string; + useNativeClamp?: boolean; + splitOnChars?: string[]; + animate?: boolean; + truncationChar?: string; + truncationHTML?: string | null; + } + + export interface ClampResponse { + 'original': string; + 'clamped': string; + } +} + +declare function clamp(element: HTMLElement, options?: clamp.ClampOptions): clamp.ClampResponse; + +export = clamp; +export as namespace clamp; diff --git a/clamp-js/tsconfig.json b/clamp-js/tsconfig.json new file mode 100755 index 0000000000..f70837d86f --- /dev/null +++ b/clamp-js/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "clamp-js-tests.ts" + ] +} diff --git a/clamp-js/tslint.json b/clamp-js/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/clamp-js/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/classnames/tsconfig.json b/classnames/tsconfig.json index e1958c6b84..8eeaf9b1ca 100644 --- a/classnames/tsconfig.json +++ b/classnames/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cldrjs/tsconfig.json b/cldrjs/tsconfig.json index 2d2559c670..e3260d69a7 100644 --- a/cldrjs/tsconfig.json +++ b/cldrjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/clean-css/tsconfig.json b/clean-css/tsconfig.json index 8a96d9125b..bf5cc0f80c 100644 --- a/clean-css/tsconfig.json +++ b/clean-css/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cli-color/tsconfig.json b/cli-color/tsconfig.json index d084404c17..b0fe194172 100644 --- a/cli-color/tsconfig.json +++ b/cli-color/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cli/tsconfig.json b/cli/tsconfig.json index 18028897c9..8ba822df5e 100644 --- a/cli/tsconfig.json +++ b/cli/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/cliff/tsconfig.json b/cliff/tsconfig.json index d0dbd8162c..d338d0b253 100644 --- a/cliff/tsconfig.json +++ b/cliff/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/clipboard-js/tsconfig.json b/clipboard-js/tsconfig.json index d183b6762a..bb95836c8a 100644 --- a/clipboard-js/tsconfig.json +++ b/clipboard-js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/clipboard/tsconfig.json b/clipboard/tsconfig.json index 8aac4fe040..f1033c0218 100644 --- a/clipboard/tsconfig.json +++ b/clipboard/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/clndr/tsconfig.json b/clndr/tsconfig.json index ba5b4cfb6d..8e68c59399 100644 --- a/clndr/tsconfig.json +++ b/clndr/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "clndr-tests.ts" ] -} +} \ No newline at end of file diff --git a/clone/tsconfig.json b/clone/tsconfig.json index 353f9f87cc..3594995add 100644 --- a/clone/tsconfig.json +++ b/clone/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/closure-compiler/tsconfig.json b/closure-compiler/tsconfig.json index 6bc431b0da..c5b91de6be 100644 --- a/closure-compiler/tsconfig.json +++ b/closure-compiler/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/co-body/tsconfig.json b/co-body/tsconfig.json index b0a4ebc5cf..5c7e4122cc 100644 --- a/co-body/tsconfig.json +++ b/co-body/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/co-views/tsconfig.json b/co-views/tsconfig.json index 359d264aed..a3aec989e0 100644 --- a/co-views/tsconfig.json +++ b/co-views/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/code/tsconfig.json b/code/tsconfig.json index 6846645005..78682fb6c2 100644 --- a/code/tsconfig.json +++ b/code/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/codemirror/tsconfig.json b/codemirror/tsconfig.json index 01c0253447..af9dc54023 100644 --- a/codemirror/tsconfig.json +++ b/codemirror/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/codependency/index.d.ts b/codependency/index.d.ts index 0376bee4bb..2ec424588d 100644 --- a/codependency/index.d.ts +++ b/codependency/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for codependency v0.1.3 +// Type definitions for codependency 0.1 // Project: https://github.com/Wizcorp/codependency // Definitions by: Morgan Benton // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/codependency/package.json b/codependency/package.json deleted file mode 100644 index 2fa5bde2e9..0000000000 --- a/codependency/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/node": "^6.0.0" - } -} \ No newline at end of file diff --git a/codependency/tsconfig.json b/codependency/tsconfig.json index 226c3226a8..2966809543 100644 --- a/codependency/tsconfig.json +++ b/codependency/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/codependency/tslint.json b/codependency/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/codependency/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/coffeeify/tsconfig.json b/coffeeify/tsconfig.json index 83d510ff81..35cd981884 100644 --- a/coffeeify/tsconfig.json +++ b/coffeeify/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/coinstring/tsconfig.json b/coinstring/tsconfig.json index bf0c095e30..02daf5871a 100644 --- a/coinstring/tsconfig.json +++ b/coinstring/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "coinstring-tests.ts" ] -} +} \ No newline at end of file diff --git a/color/tsconfig.json b/color/tsconfig.json index ea7d415a15..3034984bd5 100644 --- a/color/tsconfig.json +++ b/color/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/color/v0/tsconfig.json b/color/v0/tsconfig.json index c57fbb0ba1..6039458199 100644 --- a/color/v0/tsconfig.json +++ b/color/v0/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -11,7 +13,9 @@ ], "types": [], "paths": { - "color": ["color/v0"] + "color": [ + "color/v0" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/colorbrewer/tsconfig.json b/colorbrewer/tsconfig.json index d8afd009e6..7adac10930 100644 --- a/colorbrewer/tsconfig.json +++ b/colorbrewer/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/colors/tsconfig.json b/colors/tsconfig.json index b41138a449..2455a21c79 100644 --- a/colors/tsconfig.json +++ b/colors/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/com.darktalker.cordova.screenshot/tsconfig.json b/com.darktalker.cordova.screenshot/tsconfig.json index a53a1e22ca..b9e395e7c0 100644 --- a/com.darktalker.cordova.screenshot/tsconfig.json +++ b/com.darktalker.cordova.screenshot/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/combokeys/tsconfig.json b/combokeys/tsconfig.json index a28720760d..17af434c7d 100644 --- a/combokeys/tsconfig.json +++ b/combokeys/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cometd/tsconfig.json b/cometd/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/cometd/tsconfig.json +++ b/cometd/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/commander/tsconfig.json b/commander/tsconfig.json index 8e9c0176c6..0db54c9488 100644 --- a/commander/tsconfig.json +++ b/commander/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/commangular/tsconfig.json b/commangular/tsconfig.json index fa86db21ae..1491e780c2 100644 --- a/commangular/tsconfig.json +++ b/commangular/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/common-tags/tsconfig.json b/common-tags/tsconfig.json index 459ad8d20c..29c1a44652 100644 --- a/common-tags/tsconfig.json +++ b/common-tags/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/commonmark/tsconfig.json b/commonmark/tsconfig.json index 0b9f1c06f0..e424e972ca 100644 --- a/commonmark/tsconfig.json +++ b/commonmark/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/compare-version/tsconfig.json b/compare-version/tsconfig.json index 5b01fa2c88..fd75d47da6 100644 --- a/compare-version/tsconfig.json +++ b/compare-version/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/complex/tsconfig.json b/complex/tsconfig.json index b958f7df69..c4a5dfc9f8 100644 --- a/complex/tsconfig.json +++ b/complex/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/component-emitter/tsconfig.json b/component-emitter/tsconfig.json index f06aef9ef2..265fa2d955 100644 --- a/component-emitter/tsconfig.json +++ b/component-emitter/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/compose-function/tsconfig.json b/compose-function/tsconfig.json index 2540821315..fd6529f97c 100644 --- a/compose-function/tsconfig.json +++ b/compose-function/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/compression/tsconfig.json b/compression/tsconfig.json index ad43e60acf..8fef7d56d4 100644 --- a/compression/tsconfig.json +++ b/compression/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/concat-stream/tsconfig.json b/concat-stream/tsconfig.json index 3e6c0e2260..a02b39c8ce 100644 --- a/concat-stream/tsconfig.json +++ b/concat-stream/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "concat-stream-tests.ts" ] -} +} \ No newline at end of file diff --git a/concaveman/tsconfig.json b/concaveman/tsconfig.json index 7c9242a551..99348e7ba6 100644 --- a/concaveman/tsconfig.json +++ b/concaveman/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/conf/tsconfig.json b/conf/tsconfig.json index b7166ee44b..8bb74358fa 100644 --- a/conf/tsconfig.json +++ b/conf/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -17,4 +20,4 @@ "index.d.ts", "conf-tests.ts" ] -} +} \ No newline at end of file diff --git a/confidence/tsconfig.json b/confidence/tsconfig.json index 5ed4a5fe05..3032693704 100644 --- a/confidence/tsconfig.json +++ b/confidence/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/config/tsconfig.json b/config/tsconfig.json index ce63061849..8ebae968ac 100644 --- a/config/tsconfig.json +++ b/config/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/configstore/tsconfig.json b/configstore/tsconfig.json index a67444aa3d..2bff288f39 100644 --- a/configstore/tsconfig.json +++ b/configstore/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/confit/tsconfig.json b/confit/tsconfig.json index d035477089..fb3580f31f 100644 --- a/confit/tsconfig.json +++ b/confit/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/connect-ensure-login/tsconfig.json b/connect-ensure-login/tsconfig.json index d683bed903..1440c86913 100644 --- a/connect-ensure-login/tsconfig.json +++ b/connect-ensure-login/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/connect-flash/tsconfig.json b/connect-flash/tsconfig.json index 7fe8912d21..a89c345bee 100644 --- a/connect-flash/tsconfig.json +++ b/connect-flash/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/connect-livereload/tsconfig.json b/connect-livereload/tsconfig.json index 41a8b4caeb..f8574cb409 100644 --- a/connect-livereload/tsconfig.json +++ b/connect-livereload/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/connect-modrewrite/tsconfig.json b/connect-modrewrite/tsconfig.json index 74d78a7d05..63cf878ef5 100644 --- a/connect-modrewrite/tsconfig.json +++ b/connect-modrewrite/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/connect-mongo/tsconfig.json b/connect-mongo/tsconfig.json index b9173e6bde..7cf4cc0975 100644 --- a/connect-mongo/tsconfig.json +++ b/connect-mongo/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/connect-redis/tsconfig.json b/connect-redis/tsconfig.json index 6217f24b07..ebbef60825 100644 --- a/connect-redis/tsconfig.json +++ b/connect-redis/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/connect-slashes/tsconfig.json b/connect-slashes/tsconfig.json index 4388cfb9bf..cceb646faf 100644 --- a/connect-slashes/tsconfig.json +++ b/connect-slashes/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/connect-timeout/tsconfig.json b/connect-timeout/tsconfig.json index ccff02eeb3..52eff5e6b3 100644 --- a/connect-timeout/tsconfig.json +++ b/connect-timeout/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/connect/tsconfig.json b/connect/tsconfig.json index 590831c9d8..f0bf140567 100644 --- a/connect/tsconfig.json +++ b/connect/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/console-stamp/tsconfig.json b/console-stamp/tsconfig.json index 1dfa069297..a8ba0aae9b 100644 --- a/console-stamp/tsconfig.json +++ b/console-stamp/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/consolidate/tsconfig.json b/consolidate/tsconfig.json index e7ba412b66..a7ae476c88 100644 --- a/consolidate/tsconfig.json +++ b/consolidate/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/consul/tsconfig.json b/consul/tsconfig.json index 838c80f127..96f66d5c7d 100644 --- a/consul/tsconfig.json +++ b/consul/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/content-disposition/tsconfig.json b/content-disposition/tsconfig.json index b73c153fb2..459ad4c307 100644 --- a/content-disposition/tsconfig.json +++ b/content-disposition/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/content-type/tsconfig.json b/content-type/tsconfig.json index 539d27124d..4eaa2f42f4 100644 --- a/content-type/tsconfig.json +++ b/content-type/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/contentful-resolve-response/tsconfig.json b/contentful-resolve-response/tsconfig.json index 28d65f4d1d..04b6576fee 100644 --- a/contentful-resolve-response/tsconfig.json +++ b/contentful-resolve-response/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/contextjs/tsconfig.json b/contextjs/tsconfig.json index bfd596b5e7..f307972922 100644 --- a/contextjs/tsconfig.json +++ b/contextjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/continuation-local-storage/tsconfig.json b/continuation-local-storage/tsconfig.json index 3c347ff1d4..b7d515235d 100644 --- a/continuation-local-storage/tsconfig.json +++ b/continuation-local-storage/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "module": "commonjs", "moduleResolution": "node", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": true, diff --git a/convert-source-map/tsconfig.json b/convert-source-map/tsconfig.json index 538f11e227..4e5ff0aa9f 100644 --- a/convert-source-map/tsconfig.json +++ b/convert-source-map/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/convict/tsconfig.json b/convict/tsconfig.json index 62461c8840..9c86c0db34 100644 --- a/convict/tsconfig.json +++ b/convict/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cookie-parser/tsconfig.json b/cookie-parser/tsconfig.json index f31c6d69e3..3eb1356a9d 100644 --- a/cookie-parser/tsconfig.json +++ b/cookie-parser/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cookie-session/tsconfig.json b/cookie-session/tsconfig.json index 6649ef38bc..14e5bffe19 100644 --- a/cookie-session/tsconfig.json +++ b/cookie-session/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cookie/tsconfig.json b/cookie/tsconfig.json index d446f9b766..3a3a4b60f9 100644 --- a/cookie/tsconfig.json +++ b/cookie/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cookiejs/tsconfig.json b/cookiejs/tsconfig.json index 00349ecb29..310990fba6 100644 --- a/cookiejs/tsconfig.json +++ b/cookiejs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cookies/tsconfig.json b/cookies/tsconfig.json index ee39b1bfec..cba6e21671 100644 --- a/cookies/tsconfig.json +++ b/cookies/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/copy-paste/tsconfig.json b/copy-paste/tsconfig.json index d0b1a06fce..2995ec5145 100644 --- a/copy-paste/tsconfig.json +++ b/copy-paste/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/copy-webpack-plugin/tsconfig.json b/copy-webpack-plugin/tsconfig.json index aec2166153..6952c8998f 100644 --- a/copy-webpack-plugin/tsconfig.json +++ b/copy-webpack-plugin/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/cordova-ionic/tsconfig.json b/cordova-ionic/tsconfig.json index 08f11aa218..9468064357 100644 --- a/cordova-ionic/tsconfig.json +++ b/cordova-ionic/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-app-version/tsconfig.json b/cordova-plugin-app-version/tsconfig.json index 197a02f884..935b5b77de 100644 --- a/cordova-plugin-app-version/tsconfig.json +++ b/cordova-plugin-app-version/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-background-mode/tsconfig.json b/cordova-plugin-background-mode/tsconfig.json index 52a1b601d8..40b785d13b 100644 --- a/cordova-plugin-background-mode/tsconfig.json +++ b/cordova-plugin-background-mode/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-battery-status/tsconfig.json b/cordova-plugin-battery-status/tsconfig.json index 8b8d0dd9a0..cac92776c8 100644 --- a/cordova-plugin-battery-status/tsconfig.json +++ b/cordova-plugin-battery-status/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-ble-central/tsconfig.json b/cordova-plugin-ble-central/tsconfig.json index f5e39c3e42..82135ca8f7 100644 --- a/cordova-plugin-ble-central/tsconfig.json +++ b/cordova-plugin-ble-central/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/cordova-plugin-camera/tsconfig.json b/cordova-plugin-camera/tsconfig.json index de59057b16..d0afcc73be 100644 --- a/cordova-plugin-camera/tsconfig.json +++ b/cordova-plugin-camera/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-contacts/tsconfig.json b/cordova-plugin-contacts/tsconfig.json index 7a2cdd8a71..b582025b43 100644 --- a/cordova-plugin-contacts/tsconfig.json +++ b/cordova-plugin-contacts/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-device-motion/tsconfig.json b/cordova-plugin-device-motion/tsconfig.json index 7103a190fb..a7dab35ed9 100644 --- a/cordova-plugin-device-motion/tsconfig.json +++ b/cordova-plugin-device-motion/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-device-orientation/tsconfig.json b/cordova-plugin-device-orientation/tsconfig.json index 2cb3f53eba..8ffb719195 100644 --- a/cordova-plugin-device-orientation/tsconfig.json +++ b/cordova-plugin-device-orientation/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/cordova-plugin-device/tsconfig.json b/cordova-plugin-device/tsconfig.json index 770035677b..1ef065998e 100644 --- a/cordova-plugin-device/tsconfig.json +++ b/cordova-plugin-device/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-dialogs/tsconfig.json b/cordova-plugin-dialogs/tsconfig.json index 5b58970648..0e77b0519a 100644 --- a/cordova-plugin-dialogs/tsconfig.json +++ b/cordova-plugin-dialogs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-email-composer/tsconfig.json b/cordova-plugin-email-composer/tsconfig.json index dbf1e20d04..c01c309dc3 100644 --- a/cordova-plugin-email-composer/tsconfig.json +++ b/cordova-plugin-email-composer/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-file-transfer/tsconfig.json b/cordova-plugin-file-transfer/tsconfig.json index fa23de9d32..558186b6a7 100644 --- a/cordova-plugin-file-transfer/tsconfig.json +++ b/cordova-plugin-file-transfer/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-file/tsconfig.json b/cordova-plugin-file/tsconfig.json index 2d6757de6f..c735f5876b 100644 --- a/cordova-plugin-file/tsconfig.json +++ b/cordova-plugin-file/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-globalization/tsconfig.json b/cordova-plugin-globalization/tsconfig.json index b8578ee58a..790fa07cb9 100644 --- a/cordova-plugin-globalization/tsconfig.json +++ b/cordova-plugin-globalization/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-ibeacon/tsconfig.json b/cordova-plugin-ibeacon/tsconfig.json index 70ae7003fc..603b991c64 100644 --- a/cordova-plugin-ibeacon/tsconfig.json +++ b/cordova-plugin-ibeacon/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/cordova-plugin-inappbrowser/tsconfig.json b/cordova-plugin-inappbrowser/tsconfig.json index a07866f8cc..7375c17d5e 100644 --- a/cordova-plugin-inappbrowser/tsconfig.json +++ b/cordova-plugin-inappbrowser/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-insomnia/tsconfig.json b/cordova-plugin-insomnia/tsconfig.json index c718b88f82..27dec59de9 100644 --- a/cordova-plugin-insomnia/tsconfig.json +++ b/cordova-plugin-insomnia/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-keyboard/tsconfig.json b/cordova-plugin-keyboard/tsconfig.json index 055b29f90d..f779a05b7a 100644 --- a/cordova-plugin-keyboard/tsconfig.json +++ b/cordova-plugin-keyboard/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-mapsforge/tsconfig.json b/cordova-plugin-mapsforge/tsconfig.json index c6c33ecb36..47574a27f4 100644 --- a/cordova-plugin-mapsforge/tsconfig.json +++ b/cordova-plugin-mapsforge/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/cordova-plugin-media-capture/tsconfig.json b/cordova-plugin-media-capture/tsconfig.json index 08a872e71c..06cb2a424f 100644 --- a/cordova-plugin-media-capture/tsconfig.json +++ b/cordova-plugin-media-capture/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/cordova-plugin-media/tsconfig.json b/cordova-plugin-media/tsconfig.json index aab9a54f98..31ca665ed4 100644 --- a/cordova-plugin-media/tsconfig.json +++ b/cordova-plugin-media/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-ms-adal/tsconfig.json b/cordova-plugin-ms-adal/tsconfig.json index cfe65b091f..fb114e9983 100644 --- a/cordova-plugin-ms-adal/tsconfig.json +++ b/cordova-plugin-ms-adal/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-network-information/tsconfig.json b/cordova-plugin-network-information/tsconfig.json index a17dfe6bb3..8e10e94b39 100644 --- a/cordova-plugin-network-information/tsconfig.json +++ b/cordova-plugin-network-information/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/cordova-plugin-ouralabs/tsconfig.json b/cordova-plugin-ouralabs/tsconfig.json index 95f5b51784..6f49ddee6d 100644 --- a/cordova-plugin-ouralabs/tsconfig.json +++ b/cordova-plugin-ouralabs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-qrscanner/tsconfig.json b/cordova-plugin-qrscanner/tsconfig.json index 80c1eef44e..bb4c00016f 100644 --- a/cordova-plugin-qrscanner/tsconfig.json +++ b/cordova-plugin-qrscanner/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-spinner/tsconfig.json b/cordova-plugin-spinner/tsconfig.json index cd075a5398..71540baad3 100644 --- a/cordova-plugin-spinner/tsconfig.json +++ b/cordova-plugin-spinner/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-splashscreen/tsconfig.json b/cordova-plugin-splashscreen/tsconfig.json index 1c161dd254..c3c3c5836a 100644 --- a/cordova-plugin-splashscreen/tsconfig.json +++ b/cordova-plugin-splashscreen/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-statusbar/tsconfig.json b/cordova-plugin-statusbar/tsconfig.json index 7b7eec9d27..daeea4a492 100644 --- a/cordova-plugin-statusbar/tsconfig.json +++ b/cordova-plugin-statusbar/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-vibration/tsconfig.json b/cordova-plugin-vibration/tsconfig.json index 14685dd5e7..d0752c4764 100644 --- a/cordova-plugin-vibration/tsconfig.json +++ b/cordova-plugin-vibration/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-websql/tsconfig.json b/cordova-plugin-websql/tsconfig.json index cd6e3687e1..7f66d4fe25 100644 --- a/cordova-plugin-websql/tsconfig.json +++ b/cordova-plugin-websql/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-plugin-x-socialsharing/tsconfig.json b/cordova-plugin-x-socialsharing/tsconfig.json index 55beb0246e..6dc2e352c9 100644 --- a/cordova-plugin-x-socialsharing/tsconfig.json +++ b/cordova-plugin-x-socialsharing/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova-sqlite-storage/tsconfig.json b/cordova-sqlite-storage/tsconfig.json index 7af97b032e..45a90093e7 100644 --- a/cordova-sqlite-storage/tsconfig.json +++ b/cordova-sqlite-storage/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "cordova-sqlite-storage-tests.ts" ] -} +} \ No newline at end of file diff --git a/cordova.plugins.diagnostic/tsconfig.json b/cordova.plugins.diagnostic/tsconfig.json index 382c85a216..0c89cc0ff4 100644 --- a/cordova.plugins.diagnostic/tsconfig.json +++ b/cordova.plugins.diagnostic/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordova/tsconfig.json b/cordova/tsconfig.json index fefe6b3f5e..f6a6b7ae87 100644 --- a/cordova/tsconfig.json +++ b/cordova/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cordovarduino/tsconfig.json b/cordovarduino/tsconfig.json index 528ac2324b..e10237b685 100644 --- a/cordovarduino/tsconfig.json +++ b/cordovarduino/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/core-decorators/tsconfig.json b/core-decorators/tsconfig.json index dea6ef9a2e..dee0784eed 100644 --- a/core-decorators/tsconfig.json +++ b/core-decorators/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/core-js/tsconfig.json b/core-js/tsconfig.json index 51105b11d0..b37502a626 100644 --- a/core-js/tsconfig.json +++ b/core-js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es5", + "lib": [ + "es5", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cors/tsconfig.json b/cors/tsconfig.json index ac0afad95c..92608af1c2 100644 --- a/cors/tsconfig.json +++ b/cors/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/couchbase/tsconfig.json b/couchbase/tsconfig.json index 6dc373810d..42b654bc76 100644 --- a/couchbase/tsconfig.json +++ b/couchbase/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/countdown/tsconfig.json b/countdown/tsconfig.json index 38f2bcd0ef..13f9392c88 100644 --- a/countdown/tsconfig.json +++ b/countdown/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cpy/tsconfig.json b/cpy/tsconfig.json index 10d0fca79e..6cb55952aa 100644 --- a/cpy/tsconfig.json +++ b/cpy/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "cpy-tests.ts" ] -} +} \ No newline at end of file diff --git a/cradle/tsconfig.json b/cradle/tsconfig.json index 1922ab89f1..c4e14edbf5 100644 --- a/cradle/tsconfig.json +++ b/cradle/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/crc/tsconfig.json b/crc/tsconfig.json index 1ff4637974..1cf7c2f4ff 100644 --- a/crc/tsconfig.json +++ b/crc/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "crc-tests.ts" ] -} +} \ No newline at end of file diff --git a/create-error/tsconfig.json b/create-error/tsconfig.json index 9dfbe8f269..0483cd70bf 100644 --- a/create-error/tsconfig.json +++ b/create-error/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/createjs-lib/tsconfig.json b/createjs-lib/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/createjs-lib/tsconfig.json +++ b/createjs-lib/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/createjs/tsconfig.json b/createjs/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/createjs/tsconfig.json +++ b/createjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/credential/tsconfig.json b/credential/tsconfig.json index eab2b08998..627a597d83 100644 --- a/credential/tsconfig.json +++ b/credential/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/credit-card-type/tsconfig.json b/credit-card-type/tsconfig.json index 44fe61b454..350e87fba3 100644 --- a/credit-card-type/tsconfig.json +++ b/credit-card-type/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/cron/tsconfig.json b/cron/tsconfig.json index 661924d57c..926752dcc8 100644 --- a/cron/tsconfig.json +++ b/cron/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cropperjs/tsconfig.json b/cropperjs/tsconfig.json index ffc9bb4832..4100fb8912 100644 --- a/cropperjs/tsconfig.json +++ b/cropperjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/croppie/tsconfig.json b/croppie/tsconfig.json index 7d8a49376a..488e016fce 100644 --- a/croppie/tsconfig.json +++ b/croppie/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cross-storage/tsconfig.json b/cross-storage/tsconfig.json index b0f12d2d0c..58cd7f5807 100644 --- a/cross-storage/tsconfig.json +++ b/cross-storage/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/crossfilter/tsconfig.json b/crossfilter/tsconfig.json index 0bf6022be6..4512ebdb3c 100644 --- a/crossfilter/tsconfig.json +++ b/crossfilter/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/crossroads/tsconfig.json b/crossroads/tsconfig.json index 2c871a9749..4560977b00 100644 --- a/crossroads/tsconfig.json +++ b/crossroads/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/crypto-js/tsconfig.json b/crypto-js/tsconfig.json index a258e681fc..94793c83ae 100644 --- a/crypto-js/tsconfig.json +++ b/crypto-js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cryptojs/tsconfig.json b/cryptojs/tsconfig.json index ffc46b0202..37c28e35d8 100644 --- a/cryptojs/tsconfig.json +++ b/cryptojs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/cson/tsconfig.json b/cson/tsconfig.json index c8bba3d4b2..dc01e869d3 100644 --- a/cson/tsconfig.json +++ b/cson/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/css-modules-require-hook/tsconfig.json b/css-modules-require-hook/tsconfig.json index 42812bcc66..3343450de2 100644 --- a/css-modules-require-hook/tsconfig.json +++ b/css-modules-require-hook/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/css/tsconfig.json b/css/tsconfig.json index 54cbf6833c..5e942dfd7c 100644 --- a/css/tsconfig.json +++ b/css/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cssbeautify/tsconfig.json b/cssbeautify/tsconfig.json index 6d7988ae44..622328ac5d 100644 --- a/cssbeautify/tsconfig.json +++ b/cssbeautify/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/csurf/tsconfig.json b/csurf/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/csurf/tsconfig.json +++ b/csurf/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/csv-parse/tsconfig.json b/csv-parse/tsconfig.json index 2f7c1d736b..36611c4d1d 100644 --- a/csv-parse/tsconfig.json +++ b/csv-parse/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/csv-stringify/tsconfig.json b/csv-stringify/tsconfig.json index 3d5cea5c60..12aac1d2a0 100644 --- a/csv-stringify/tsconfig.json +++ b/csv-stringify/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cucumber/tsconfig.json b/cucumber/tsconfig.json index 992cca7723..c7fe6d2258 100644 --- a/cucumber/tsconfig.json +++ b/cucumber/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/cuid/tsconfig.json b/cuid/tsconfig.json index a53e95b748..838a40b34e 100644 --- a/cuid/tsconfig.json +++ b/cuid/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/currency-formatter/tsconfig.json b/currency-formatter/tsconfig.json index ef7acd7ccf..1b94e5fe16 100644 --- a/currency-formatter/tsconfig.json +++ b/currency-formatter/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -18,4 +20,4 @@ "currencies.d.ts", "currency-formatter-tests.ts" ] -} +} \ No newline at end of file diff --git a/custom-error-generator/tsconfig.json b/custom-error-generator/tsconfig.json index a7d6a412db..78356d1c2a 100644 --- a/custom-error-generator/tsconfig.json +++ b/custom-error-generator/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/cybozulabs-md5/tsconfig.json b/cybozulabs-md5/tsconfig.json index 37774f4c4e..2bfbaca631 100644 --- a/cybozulabs-md5/tsconfig.json +++ b/cybozulabs-md5/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/d3-array/tsconfig.json b/d3-array/tsconfig.json index d9e272054d..db900a4087 100644 --- a/d3-array/tsconfig.json +++ b/d3-array/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/d3-axis/tsconfig.json b/d3-axis/tsconfig.json index 40e3b568f4..5a9af63a15 100644 --- a/d3-axis/tsconfig.json +++ b/d3-axis/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/d3-box/package.json b/d3-box/package.json deleted file mode 100644 index ca67ffd471..0000000000 --- a/d3-box/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/d3": "^3.5.36" - } -} \ No newline at end of file diff --git a/d3-box/tsconfig.json b/d3-box/tsconfig.json index 7d303bdd61..57c83445a9 100644 --- a/d3-box/tsconfig.json +++ b/d3-box/tsconfig.json @@ -1,10 +1,21 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "paths": { + "d3": ["d3/v3"] + }, "noEmit": true, "forceConsistentCasingInFileNames": true }, diff --git a/d3-brush/tsconfig.json b/d3-brush/tsconfig.json index 6d8656f23b..017b6001da 100644 --- a/d3-brush/tsconfig.json +++ b/d3-brush/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/d3-chord/tsconfig.json b/d3-chord/tsconfig.json index 629c95be8b..bac0f16968 100644 --- a/d3-chord/tsconfig.json +++ b/d3-chord/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/d3-collection/tsconfig.json b/d3-collection/tsconfig.json index abd7919662..e4870c413c 100644 --- a/d3-collection/tsconfig.json +++ b/d3-collection/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/d3-color/tsconfig.json b/d3-color/tsconfig.json index e2e62e5ac3..7237aab597 100644 --- a/d3-color/tsconfig.json +++ b/d3-color/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/d3-dispatch/tsconfig.json b/d3-dispatch/tsconfig.json index 5329b9b870..236dac7276 100644 --- a/d3-dispatch/tsconfig.json +++ b/d3-dispatch/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/d3-drag/tsconfig.json b/d3-drag/tsconfig.json index 8c842c965b..5974212b94 100644 --- a/d3-drag/tsconfig.json +++ b/d3-drag/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/d3-dsv/tsconfig.json b/d3-dsv/tsconfig.json index eb275db8e8..48d5f2eac6 100644 --- a/d3-dsv/tsconfig.json +++ b/d3-dsv/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/d3-dsv/v0/tsconfig.json b/d3-dsv/v0/tsconfig.json index b0d37a9812..87a2df205f 100644 --- a/d3-dsv/v0/tsconfig.json +++ b/d3-dsv/v0/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -11,7 +13,9 @@ ], "types": [], "paths": { - "d3-dsv": ["d3-dsv/v0"] + "d3-dsv": [ + "d3-dsv/v0" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/d3-ease/tsconfig.json b/d3-ease/tsconfig.json index 286fd42f7f..9e26ce19f5 100644 --- a/d3-ease/tsconfig.json +++ b/d3-ease/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "d3-ease-tests.ts" ] -} +} \ No newline at end of file diff --git a/d3-force/tsconfig.json b/d3-force/tsconfig.json index 8bb643a3e1..699078ccdc 100644 --- a/d3-force/tsconfig.json +++ b/d3-force/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/d3-format/tsconfig.json b/d3-format/tsconfig.json index 44cf02f1d0..8572936846 100644 --- a/d3-format/tsconfig.json +++ b/d3-format/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/d3-geo/tsconfig.json b/d3-geo/tsconfig.json index 707a8bda7e..e342102139 100644 --- a/d3-geo/tsconfig.json +++ b/d3-geo/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/d3-hexbin/tsconfig.json b/d3-hexbin/tsconfig.json index d90193a58d..f46c9e304b 100644 --- a/d3-hexbin/tsconfig.json +++ b/d3-hexbin/tsconfig.json @@ -1,20 +1,22 @@ { - "compilerOptions": { - "module": "commonjs", - "target": "es6", - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": false, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "d3-hexbin-tests.ts" - ] -} + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "d3-hexbin-tests.ts" + ] +} \ No newline at end of file diff --git a/d3-hierarchy/tsconfig.json b/d3-hierarchy/tsconfig.json index 7dc8a4a49a..93d3ad11b7 100644 --- a/d3-hierarchy/tsconfig.json +++ b/d3-hierarchy/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/d3-hsv/tsconfig.json b/d3-hsv/tsconfig.json index 60524d6e6f..0f872942fe 100644 --- a/d3-hsv/tsconfig.json +++ b/d3-hsv/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/d3-interpolate/tsconfig.json b/d3-interpolate/tsconfig.json index 80e9a2874a..bc1aa2f903 100644 --- a/d3-interpolate/tsconfig.json +++ b/d3-interpolate/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/d3-path/tsconfig.json b/d3-path/tsconfig.json index 644bb571d9..f9a1e4e0b9 100644 --- a/d3-path/tsconfig.json +++ b/d3-path/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/d3-polygon/tsconfig.json b/d3-polygon/tsconfig.json index 75b9b7877b..2a955a7956 100644 --- a/d3-polygon/tsconfig.json +++ b/d3-polygon/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/d3-quadtree/tsconfig.json b/d3-quadtree/tsconfig.json index 7306e1d3a4..ee764403c4 100644 --- a/d3-quadtree/tsconfig.json +++ b/d3-quadtree/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/d3-queue/tsconfig.json b/d3-queue/tsconfig.json index 37b616b4e4..a565283a30 100644 --- a/d3-queue/tsconfig.json +++ b/d3-queue/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/d3-random/tsconfig.json b/d3-random/tsconfig.json index f401f66dc4..20a20f04f1 100644 --- a/d3-random/tsconfig.json +++ b/d3-random/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/d3-request/tsconfig.json b/d3-request/tsconfig.json index 6014c45ff1..c82a674e44 100644 --- a/d3-request/tsconfig.json +++ b/d3-request/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/d3-scale-chromatic/tsconfig.json b/d3-scale-chromatic/tsconfig.json index d65c895814..090fd4f242 100644 --- a/d3-scale-chromatic/tsconfig.json +++ b/d3-scale-chromatic/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/d3-scale/tsconfig.json b/d3-scale/tsconfig.json index 597609a643..d6361411a4 100644 --- a/d3-scale/tsconfig.json +++ b/d3-scale/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/d3-selection-multi/tsconfig.json b/d3-selection-multi/tsconfig.json index 5d4a3a1114..b5ef37ac44 100644 --- a/d3-selection-multi/tsconfig.json +++ b/d3-selection-multi/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/d3-selection/tsconfig.json b/d3-selection/tsconfig.json index a217cfd905..0b437cdda7 100644 --- a/d3-selection/tsconfig.json +++ b/d3-selection/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/d3-shape/tsconfig.json b/d3-shape/tsconfig.json index 311aea0647..d80ba9d5f0 100644 --- a/d3-shape/tsconfig.json +++ b/d3-shape/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/d3-time-format/tsconfig.json b/d3-time-format/tsconfig.json index 0047045e92..2f6f2ab56a 100644 --- a/d3-time-format/tsconfig.json +++ b/d3-time-format/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/d3-time/tsconfig.json b/d3-time/tsconfig.json index 127622abc9..37ad648870 100644 --- a/d3-time/tsconfig.json +++ b/d3-time/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/d3-timer/tsconfig.json b/d3-timer/tsconfig.json index 5dabc7477e..bd1369fa5d 100644 --- a/d3-timer/tsconfig.json +++ b/d3-timer/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/d3-tip/package.json b/d3-tip/package.json deleted file mode 100644 index 6819221ead..0000000000 --- a/d3-tip/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/d3": "^3.5.36" - } -} diff --git a/d3-tip/tsconfig.json b/d3-tip/tsconfig.json index 8e1fb64ba1..8ac2d487e9 100644 --- a/d3-tip/tsconfig.json +++ b/d3-tip/tsconfig.json @@ -1,10 +1,21 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "paths": { + "d3": ["d3/v3"] + }, "noEmit": true, "forceConsistentCasingInFileNames": true }, diff --git a/d3-transition/tsconfig.json b/d3-transition/tsconfig.json index 84e0d271d7..ae927077dc 100644 --- a/d3-transition/tsconfig.json +++ b/d3-transition/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/d3-voronoi/tsconfig.json b/d3-voronoi/tsconfig.json index 1be6d656e5..473b2a139d 100644 --- a/d3-voronoi/tsconfig.json +++ b/d3-voronoi/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/d3-zoom/tsconfig.json b/d3-zoom/tsconfig.json index cb308465f0..5513e1328f 100644 --- a/d3-zoom/tsconfig.json +++ b/d3-zoom/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/d3.cloud.layout/package.json b/d3.cloud.layout/package.json deleted file mode 100644 index 5e771f4dcd..0000000000 --- a/d3.cloud.layout/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/d3": "^3.5.36" - } -} diff --git a/d3.cloud.layout/tsconfig.json b/d3.cloud.layout/tsconfig.json index 8ea8609e35..39eb337ea0 100644 --- a/d3.cloud.layout/tsconfig.json +++ b/d3.cloud.layout/tsconfig.json @@ -1,10 +1,21 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "paths": { + "d3": ["d3/v3"] + }, "noEmit": true, "forceConsistentCasingInFileNames": true }, diff --git a/d3.slider/package.json b/d3.slider/package.json deleted file mode 100644 index ca67ffd471..0000000000 --- a/d3.slider/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/d3": "^3.5.36" - } -} \ No newline at end of file diff --git a/d3.slider/tsconfig.json b/d3.slider/tsconfig.json index 5101924cfe..48b49c9a2d 100644 --- a/d3.slider/tsconfig.json +++ b/d3.slider/tsconfig.json @@ -1,10 +1,21 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "paths": { + "d3": ["d3/v3"] + }, "noEmit": true, "forceConsistentCasingInFileNames": true }, diff --git a/d3/package.json b/d3/package.json deleted file mode 100644 index 6101422996..0000000000 --- a/d3/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "dependencies": { - "@types/d3-array": "1.0", - "@types/d3-axis": "1.0", - "@types/d3-brush": "1.0", - "@types/d3-chord": "1.0", - "@types/d3-collection": "1.0", - "@types/d3-color": "1.0", - "@types/d3-dispatch": "1.0", - "@types/d3-drag": "1.0", - "@types/d3-dsv": "1.0", - "@types/d3-ease": "1.0", - "@types/d3-force": "1.0", - "@types/d3-format": "1.0", - "@types/d3-geo": "1.4", - "@types/d3-hierarchy": "1.0", - "@types/d3-interpolate": "1.1", - "@types/d3-path": "1.0", - "@types/d3-polygon": "1.0", - "@types/d3-quadtree": "1.0", - "@types/d3-queue": "3.0", - "@types/d3-random": "1.0", - "@types/d3-request": "1.0", - "@types/d3-scale": "1.0", - "@types/d3-selection": "1.0", - "@types/d3-shape": "1.0", - "@types/d3-time": "1.0", - "@types/d3-time-format": "2.0", - "@types/d3-timer": "1.0", - "@types/d3-transition": "1.0", - "@types/d3-voronoi": "1.1", - "@types/d3-zoom": "1.1" - } -} diff --git a/d3/tsconfig.json b/d3/tsconfig.json index f206050216..03db6e8b39 100644 --- a/d3/tsconfig.json +++ b/d3/tsconfig.json @@ -1,13 +1,15 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, "baseUrl": "../", "typeRoots": [ - "node_modules/@types", "../" ], "types": [], diff --git a/d3/tslint.json b/d3/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/d3/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/d3/v3/tsconfig.json b/d3/v3/tsconfig.json index 1401acf865..b6c46bd8cf 100644 --- a/d3/v3/tsconfig.json +++ b/d3/v3/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "d3": ["d3/v3"] + "d3": [ + "d3/v3" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/d3kit/package.json b/d3kit/package.json deleted file mode 100644 index 8eabdc01d2..0000000000 --- a/d3kit/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/d3": "^4.2.38" - } -} diff --git a/d3kit/tsconfig.json b/d3kit/tsconfig.json index 2c945e5729..dac05091a5 100644 --- a/d3kit/tsconfig.json +++ b/d3kit/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/d3kit/v1/tsconfig.json b/d3kit/v1/tsconfig.json index 870e3487a1..b44561f414 100644 --- a/d3kit/v1/tsconfig.json +++ b/d3kit/v1/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -11,8 +14,12 @@ ], "types": [], "paths": { - "d3": ["d3/v3"], - "d3kit": ["d3kit/v1"] + "d3": [ + "d3/v3" + ], + "d3kit": [ + "d3kit/v1" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/d3pie/tsconfig.json b/d3pie/tsconfig.json index 2743ccf885..1861cb7f31 100644 --- a/d3pie/tsconfig.json +++ b/d3pie/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dagre-d3/dagre-d3-tests.ts b/dagre-d3/dagre-d3-tests.ts index 30f9f682de..2b1a958ef7 100644 --- a/dagre-d3/dagre-d3-tests.ts +++ b/dagre-d3/dagre-d3-tests.ts @@ -17,6 +17,6 @@ namespace DagreD3Tests { const render = new dagreD3.render(); const svg = d3.select("svg"); - render.arrows()["arrowType"] = (parent: d3.Selection, id: string, edge: Dagre.Edge, type: string) => {}; + render.arrows()["arrowType"] = (parent: d3.Selection, id: string, edge: dagre.Edge, type: string) => {}; render(svg, graph); } diff --git a/dagre-d3/index.d.ts b/dagre-d3/index.d.ts index a502251124..480ca6b402 100644 --- a/dagre-d3/index.d.ts +++ b/dagre-d3/index.d.ts @@ -1,40 +1,34 @@ -// Type definitions for dagre-d3.core.js v0.4.10 +// Type definitions for dagre-d3.core.js 0.4 // Project: https://github.com/cpettitt/dagre-d3 // Definitions by: Mark Wong Siang Kai // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// -/// +import * as d3 from "d3"; +import * as dagre from "dagre"; -declare namespace Dagre { +export as namespace dagreD3; - interface DagreD3Factory extends Dagre.DagreFactory { - render: Render; - } +export * from "dagre"; +export const render: { new(): Render }; - // coupled with dagre.d.ts' Graph - // a lot of these methods come from graphlib.core.js - interface Graph { - graph(): Graph; - height: number; - predecessors(id: string): string[]; - successors(id: string): string[]; - // see source of http://cpettitt.github.io/project/dagre-d3/latest/demo/interactive-demo.html - transition?(selection: d3.Selection): d3.Transition; - width: number; - } - - interface Render { - // see http://cpettitt.github.io/project/dagre-d3/latest/demo/user-defined.html for example usage - arrows (): { [arrowStyleName: string]: (parent: d3.Selection, id: string, edge: Dagre.Edge, type: string) => void }; - new (): Render; - (selection: d3.Selection, g: Dagre.Graph): void; +declare module "dagre" { + namespace graphlib { + // coupled with dagre.d.ts' Graph + // a lot of these methods come from graphlib.core.js + interface Graph { + graph(): Graph; + height: number; + predecessors(id: string): string[]; + successors(id: string): string[]; + // see source of http://cpettitt.github.io/project/dagre-d3/latest/demo/interactive-demo.html + transition?(selection: d3.Selection): d3.Transition; + width: number; + } } } -declare var dagreD3: Dagre.DagreD3Factory; - -declare module "dagre-d3" { - export = dagreD3; +interface Render { + // see http://cpettitt.github.io/project/dagre-d3/latest/demo/user-defined.html for example usage + arrows(): { [arrowStyleName: string]: (parent: d3.Selection, id: string, edge: dagre.Edge, type: string) => void }; + (selection: d3.Selection, g: dagre.graphlib.Graph): void; } diff --git a/dagre-d3/package.json b/dagre-d3/package.json deleted file mode 100644 index 5e771f4dcd..0000000000 --- a/dagre-d3/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/d3": "^3.5.36" - } -} diff --git a/dagre-d3/tsconfig.json b/dagre-d3/tsconfig.json index 3a465b3c81..438fca5ff3 100644 --- a/dagre-d3/tsconfig.json +++ b/dagre-d3/tsconfig.json @@ -1,16 +1,21 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, "baseUrl": "../", "typeRoots": [ - "node_modules/@types", "../" ], "types": [], + "paths": { + "d3": ["d3/v3"] + }, "noEmit": true, "forceConsistentCasingInFileNames": true }, diff --git a/dagre-d3/tslint.json b/dagre-d3/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/dagre-d3/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/dagre/index.d.ts b/dagre/index.d.ts index 7caa1b5590..96484e296f 100644 --- a/dagre/index.d.ts +++ b/dagre/index.d.ts @@ -1,16 +1,12 @@ -// Type definitions for dagre 0.7.0 +// Type definitions for dagre 0.7 // Project: https://github.com/cpettitt/dagre // Definitions by: Qinfeng Chen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare namespace Dagre { - interface DagreFactory { - graphlib: GraphLib; - layout(graph: Graph): void; - } +export as namespace dagre; - interface Graph { - new (): Graph; +export namespace graphlib { + class Graph { edges(): Edge[]; edge(id: any): any; nodes(): string[]; @@ -20,19 +16,11 @@ declare namespace Dagre { setGraph(options: { [key: string]: any }): Graph; setNode(id: string, node: { [key: string]: any }): Graph; } - - interface Edge { - v: string; - w: string; - } - - interface GraphLib { - Graph: Graph; - } } -declare var dagre: Dagre.DagreFactory; +export function layout(graph: graphlib.Graph): void; -declare module "dagre" { - export = dagre; +interface Edge { + v: string; + w: string; } diff --git a/dagre/tsconfig.json b/dagre/tsconfig.json index 4badf51de2..1a54cc4b6b 100644 --- a/dagre/tsconfig.json +++ b/dagre/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dagre/tslint.json b/dagre/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/dagre/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/dat-gui/tsconfig.json b/dat-gui/tsconfig.json index c37d5ed72c..038e9528ad 100644 --- a/dat-gui/tsconfig.json +++ b/dat-gui/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/data-driven/tsconfig.json b/data-driven/tsconfig.json index c6a0e336a8..1215731ac2 100644 --- a/data-driven/tsconfig.json +++ b/data-driven/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/datatables-buttons/tsconfig.json b/datatables-buttons/tsconfig.json index 2fe9947e8c..0793cd2eb3 100644 --- a/datatables-buttons/tsconfig.json +++ b/datatables-buttons/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/datatables.net-fixedheader/tsconfig.json b/datatables.net-fixedheader/tsconfig.json index d3fb0489c7..e681e2d722 100644 --- a/datatables.net-fixedheader/tsconfig.json +++ b/datatables.net-fixedheader/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "datatables.net-fixedheader-tests.ts" ] -} +} \ No newline at end of file diff --git a/datatables.net-select/tsconfig.json b/datatables.net-select/tsconfig.json index a4bcd655c6..927e663144 100644 --- a/datatables.net-select/tsconfig.json +++ b/datatables.net-select/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "datatables.net-select-tests.ts" ] -} +} \ No newline at end of file diff --git a/date.format.js/tsconfig.json b/date.format.js/tsconfig.json index 794c0f0e15..934970a7d4 100644 --- a/date.format.js/tsconfig.json +++ b/date.format.js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dateformat/tsconfig.json b/dateformat/tsconfig.json index faf27b5301..afd0e9fcaa 100644 --- a/dateformat/tsconfig.json +++ b/dateformat/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/datejs/tsconfig.json b/datejs/tsconfig.json index fb85d4ab6d..853a92665e 100644 --- a/datejs/tsconfig.json +++ b/datejs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/daterangepicker/daterangepicker-tests.ts b/daterangepicker/daterangepicker-tests.ts index 38264bb0b3..04ff80c0e8 100644 --- a/daterangepicker/daterangepicker-tests.ts +++ b/daterangepicker/daterangepicker-tests.ts @@ -55,5 +55,15 @@ function tests_simple() { } }, cb); + $('#reportrange').daterangepicker({ + ranges: { + 'Today': [moment(), moment()], + 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], + 'Last 7 Days': [moment().subtract(6, 'days'), moment()], + 'Last 30 Days': [moment().subtract(29, 'days'), moment()] + }, + showCustomRangeLabel: false + }, cb); + }); } diff --git a/daterangepicker/index.d.ts b/daterangepicker/index.d.ts index 68ae67c485..7929474994 100644 --- a/daterangepicker/index.d.ts +++ b/daterangepicker/index.d.ts @@ -125,6 +125,10 @@ declare namespace daterangepicker { * Normally, if you use the ranges option to specify pre- defined date ranges, calendars for choosing a custom date range are not shown until the user clicks "Custom Range".When this option is set to true, the calendars for choosing a custom date range are always shown instead. */ alwaysShowCalendars?: boolean; + /** + * Whether to show the 'Custom Range' label or just pre-defined ranges + */ + showCustomRangeLabel?: boolean; } interface Locale { diff --git a/daterangepicker/tsconfig.json b/daterangepicker/tsconfig.json index 3c70a56bd2..51177c8463 100644 --- a/daterangepicker/tsconfig.json +++ b/daterangepicker/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/db-migrate-base/tsconfig.json b/db-migrate-base/tsconfig.json index 8d6e5dcde0..1460e014b5 100644 --- a/db-migrate-base/tsconfig.json +++ b/db-migrate-base/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/db-migrate-pg/tsconfig.json b/db-migrate-pg/tsconfig.json index 953356144d..edf3e0d8c1 100644 --- a/db-migrate-pg/tsconfig.json +++ b/db-migrate-pg/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/db.js/tsconfig.json b/db.js/tsconfig.json index 3ef17b0d2f..456eee6635 100644 --- a/db.js/tsconfig.json +++ b/db.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dc/dc-tests.ts b/dc/dc-tests.ts index 38ae18fe98..9d2688fdf0 100644 --- a/dc/dc-tests.ts +++ b/dc/dc-tests.ts @@ -1,6 +1,3 @@ -/// -/// - interface IYelpData { city: string; review_count: number; @@ -45,12 +42,12 @@ d3.json("data/yelp_test_set_business.json", (yelp_data:IYelpData[]) => { * Step1: Create the dc.js chart objects & ling to div * * * ********************************************************/ - var bubbleChart: DC.BubbleChart = dc.bubbleChart("#dc-bubble-graph"); - var pieChart: DC.PieChart = dc.pieChart("#dc-pie-graph"); - var volumeChart: DC.BarChart = dc.barChart("#dc-volume-chart"); - var lineChart: DC.LineChart = dc.lineChart("#dc-line-chart"); - var dataTable: DC.DataTableWidget = dc.dataTable("#dc-table-graph"); - var rowChart: DC.RowChart = dc.rowChart("#dc-row-graph"); + var bubbleChart: dc.BubbleChart = dc.bubbleChart("#dc-bubble-graph"); + var pieChart: dc.PieChart = dc.pieChart("#dc-pie-graph"); + var volumeChart: dc.BarChart = dc.barChart("#dc-volume-chart"); + var lineChart: dc.LineChart = dc.lineChart("#dc-line-chart"); + var dataTable: dc.DataTableWidget = dc.dataTable("#dc-table-graph"); + var rowChart: dc.RowChart = dc.rowChart("#dc-row-graph"); /******************************************************** * * @@ -125,8 +122,8 @@ d3.json("data/yelp_test_set_business.json", (yelp_data:IYelpData[]) => { .xAxisPadding(1) .label((p: any) => p.key) .renderLabel(true) - .renderlet((chart: DC.BubbleChart) => rowChart.filter(chart.filter())) - .on("postRedraw", (chart: DC.BubbleChart) => dc.events.trigger(() => rowChart.filter(chart.filter()))); + .renderlet((chart: dc.BubbleChart) => rowChart.filter(chart.filter())) + .on("postRedraw", (chart: dc.BubbleChart) => dc.events.trigger(() => rowChart.filter(chart.filter()))); pieChart .width(200) @@ -137,7 +134,7 @@ d3.json("data/yelp_test_set_business.json", (yelp_data:IYelpData[]) => { .radius(90) .minAngleForLabel(0) .label((d: any) => d.data.key) - .on("filtered", (chart: DC.PieChart) => + .on("filtered", (chart: dc.PieChart) => dc.events.trigger(() => { if (chart.filter()) { console.log(chart.filter()); @@ -156,7 +153,7 @@ d3.json("data/yelp_test_set_business.json", (yelp_data:IYelpData[]) => { .gap(17) .x(d3.scale.linear().domain([0.5, 5.5])) .elasticY(true) - .on("filtered", (chart: DC.BarChart) => + .on("filtered", (chart: dc.BarChart) => dc.events.trigger(() => { if(chart.filter()) { console.log(chart.filter()); @@ -191,8 +188,8 @@ d3.json("data/yelp_test_set_business.json", (yelp_data:IYelpData[]) => { .renderLabel(true) .colors(["#a60000","#ff0000", "#ff4040","#ff7373","#67e667","#39e639","#00cc00"]) .colorDomain([0, 0]) - .renderlet((chart: DC.RowChart) => bubbleChart.filter(chart.filter())) - .on("filtered", (chart: DC.RowChart) => + .renderlet((chart: dc.RowChart) => bubbleChart.filter(chart.filter())) + .on("filtered", (chart: dc.RowChart) => dc.events.trigger(() => bubbleChart.filter(chart.filter()))); diff --git a/dc/index.d.ts b/dc/index.d.ts index b0291d703c..e7be4f86aa 100644 --- a/dc/index.d.ts +++ b/dc/index.d.ts @@ -5,10 +5,15 @@ // this makes only sense together with d3 and crossfilter so you need the d3.d.ts and crossfilter.d.ts files -/// /// -declare namespace DC { +import * as d3 from "d3"; + +export = dc; +declare var dc: dc.Base; +export as namespace dc; + +declare namespace dc { // helper for get/set situation export interface IGetSet { (): T; @@ -452,8 +457,3 @@ declare namespace DC { } } -declare var dc: DC.Base; - -declare module 'dc' { - export = dc; -} diff --git a/dc/package.json b/dc/package.json deleted file mode 100644 index 5e771f4dcd..0000000000 --- a/dc/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/d3": "^3.5.36" - } -} diff --git a/dc/tsconfig.json b/dc/tsconfig.json index 6b2f1b0e6e..d9a65d56dd 100644 --- a/dc/tsconfig.json +++ b/dc/tsconfig.json @@ -5,16 +5,21 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, "baseUrl": "../", "typeRoots": [ - "node_modules/@types", "../" ], "types": [], + "paths": { + "d3": ["d3/v3"] + }, "noEmit": true, "forceConsistentCasingInFileNames": true } diff --git a/debounce/tsconfig.json b/debounce/tsconfig.json index b3ea25af57..729b1c0024 100644 --- a/debounce/tsconfig.json +++ b/debounce/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/debug/tsconfig.json b/debug/tsconfig.json index 6334c6c989..5788679d0f 100644 --- a/debug/tsconfig.json +++ b/debug/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/decamelize/tsconfig.json b/decamelize/tsconfig.json index 7f8a1d2364..ac086e266d 100644 --- a/decamelize/tsconfig.json +++ b/decamelize/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/decay/tsconfig.json b/decay/tsconfig.json index bd236be020..6169ec4e18 100644 --- a/decay/tsconfig.json +++ b/decay/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/decimal.js/tsconfig.json b/decimal.js/tsconfig.json index d757c3e5c5..dd07e5cf8b 100644 --- a/decimal.js/tsconfig.json +++ b/decimal.js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/decorum/tsconfig.json b/decorum/tsconfig.json index 345760126c..d8af61c395 100644 --- a/decorum/tsconfig.json +++ b/decorum/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/deep-assign/tsconfig.json b/deep-assign/tsconfig.json index be1b87d8f9..6ad0581691 100644 --- a/deep-assign/tsconfig.json +++ b/deep-assign/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/deep-diff/index.d.ts b/deep-diff/index.d.ts index a0becbf970..f07fc39ef6 100644 --- a/deep-diff/index.d.ts +++ b/deep-diff/index.d.ts @@ -22,9 +22,9 @@ declare namespace deepDiff { (path: string[], key: string): boolean; } - interface IDeepDiff { - diff(): IDiff; + interface IDeepDiff { diff(lhs: Object, rhs: Object, prefilter?: IPrefilter, acc?: IAccumulator): IDiff[]; + diff(): IDiff; observableDiff(lhs: Object, rhs: Object, changes: Function, prefilter?: IPrefilter, path?: string[], key?: string, stack?: Object[]): void; applyDiff(target: Object, source: Object, filter: Function): void; applyChange(target: Object, source: Object, change: IDiff): void; diff --git a/deep-diff/tsconfig.json b/deep-diff/tsconfig.json index 807d552d7b..9548124d65 100644 --- a/deep-diff/tsconfig.json +++ b/deep-diff/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/deep-equal/tsconfig.json b/deep-equal/tsconfig.json index 3b035b8b93..b192443e3f 100644 --- a/deep-equal/tsconfig.json +++ b/deep-equal/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/deep-extend/tsconfig.json b/deep-extend/tsconfig.json index 592919c89e..9b7dc83a56 100644 --- a/deep-extend/tsconfig.json +++ b/deep-extend/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/deep-freeze-strict/tsconfig.json b/deep-freeze-strict/tsconfig.json index 87eb6217d4..3bc13b0278 100644 --- a/deep-freeze-strict/tsconfig.json +++ b/deep-freeze-strict/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -16,4 +18,4 @@ "files": [ "index.d.ts" ] -} +} \ No newline at end of file diff --git a/deep-freeze/tsconfig.json b/deep-freeze/tsconfig.json index 0c7eb56e3f..5ade4f533c 100644 --- a/deep-freeze/tsconfig.json +++ b/deep-freeze/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/deepmerge/tsconfig.json b/deepmerge/tsconfig.json index 750aeec703..587ab97438 100644 --- a/deepmerge/tsconfig.json +++ b/deepmerge/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "deepmerge-tests.ts" ] -} +} \ No newline at end of file diff --git a/defaults/tsconfig.json b/defaults/tsconfig.json index 0534365257..3c689ee2fd 100644 --- a/defaults/tsconfig.json +++ b/defaults/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/deku/tsconfig.json b/deku/tsconfig.json index 8c30d9ed1d..44bbb18182 100644 --- a/deku/tsconfig.json +++ b/deku/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/del/index.d.ts b/del/index.d.ts index fd37a8ff91..50634e39eb 100644 --- a/del/index.d.ts +++ b/del/index.d.ts @@ -1,21 +1,14 @@ -// Type definitions for del v2.2.0 +// Type definitions for del 2.2 // Project: https://github.com/sindresorhus/del // Definitions by: Asana , Aya Morisawa // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - import glob = require("glob"); -declare function Del(pattern: string): Promise; -declare function Del(pattern: string, options: Del.Options): Promise; +declare function del(patterns: string | string[], options?: del.Options): Promise; -declare function Del(patterns: string[]): Promise; -declare function Del(patterns: string[], options: Del.Options): Promise; - -declare namespace Del { - function sync(pattern: string, options?: Options): string[]; - function sync(patterns: string[], options?: Options): string[]; +declare namespace del { + function sync(patterns: string | string[], options?: Options): string[]; interface Options extends glob.IOptions { force?: boolean; @@ -23,4 +16,4 @@ declare namespace Del { } } -export = Del; +export = del; diff --git a/del/tsconfig.json b/del/tsconfig.json index c9851e781c..dd4981bd08 100644 --- a/del/tsconfig.json +++ b/del/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/del/tslint.json b/del/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/del/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/denodeify/tsconfig.json b/denodeify/tsconfig.json index 74cdb1bc30..39e2a69ba3 100644 --- a/denodeify/tsconfig.json +++ b/denodeify/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/deoxxa-content-type/tsconfig.json b/deoxxa-content-type/tsconfig.json index 793886eb62..31d7604887 100644 --- a/deoxxa-content-type/tsconfig.json +++ b/deoxxa-content-type/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/depd/tsconfig.json b/depd/tsconfig.json index f51907b8c9..14bec0a373 100644 --- a/depd/tsconfig.json +++ b/depd/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/deployjava/tsconfig.json b/deployjava/tsconfig.json index ffd4d28173..e0a37b8c86 100644 --- a/deployjava/tsconfig.json +++ b/deployjava/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/detect-browser/tsconfig.json b/detect-browser/tsconfig.json index adaefa98d2..300222b307 100644 --- a/detect-browser/tsconfig.json +++ b/detect-browser/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/detect-indent/tsconfig.json b/detect-indent/tsconfig.json index 94a792cb9d..4eae731f48 100644 --- a/detect-indent/tsconfig.json +++ b/detect-indent/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/devexpress-web/tsconfig.json b/devexpress-web/tsconfig.json index 58b04034e5..e879af1e9e 100644 --- a/devexpress-web/tsconfig.json +++ b/devexpress-web/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/devextreme/tsconfig.json b/devextreme/tsconfig.json index df219b86db..da45f2fbe0 100644 --- a/devextreme/tsconfig.json +++ b/devextreme/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/devextreme/v15/tsconfig.json b/devextreme/v15/tsconfig.json index a94cf731c1..885e677c62 100644 --- a/devextreme/v15/tsconfig.json +++ b/devextreme/v15/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "devextreme": ["devextreme/v15"] + "devextreme": [ + "devextreme/v15" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/devtools-detect/tsconfig.json b/devtools-detect/tsconfig.json index fc6a2e2501..b19e809c08 100644 --- a/devtools-detect/tsconfig.json +++ b/devtools-detect/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/df-visible/tsconfig.json b/df-visible/tsconfig.json index 326a233349..6f73878f77 100644 --- a/df-visible/tsconfig.json +++ b/df-visible/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/dhtmlxgantt/tsconfig.json b/dhtmlxgantt/tsconfig.json index 14f1ed6db7..da8ed7891b 100644 --- a/dhtmlxgantt/tsconfig.json +++ b/dhtmlxgantt/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dhtmlxscheduler/tsconfig.json b/dhtmlxscheduler/tsconfig.json index e144f49017..cd3877fced 100644 --- a/dhtmlxscheduler/tsconfig.json +++ b/dhtmlxscheduler/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/di-lite/tsconfig.json b/di-lite/tsconfig.json index 8cee3262d0..7ec26b6dde 100644 --- a/di-lite/tsconfig.json +++ b/di-lite/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/diff-match-patch/tsconfig.json b/diff-match-patch/tsconfig.json index b53e7b52bb..275bed6723 100644 --- a/diff-match-patch/tsconfig.json +++ b/diff-match-patch/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/diff/tsconfig.json b/diff/tsconfig.json index 2fca3c638a..96385c4e2a 100644 --- a/diff/tsconfig.json +++ b/diff/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/diff2html/tsconfig.json b/diff2html/tsconfig.json index c428b47abf..177597e8cd 100644 --- a/diff2html/tsconfig.json +++ b/diff2html/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/discontinuous-range/tsconfig.json b/discontinuous-range/tsconfig.json index dd387dbe67..9aa84910b6 100644 --- a/discontinuous-range/tsconfig.json +++ b/discontinuous-range/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/disposable-email-domains/tsconfig.json b/disposable-email-domains/tsconfig.json index a0105efe77..eb54d0c49f 100644 --- a/disposable-email-domains/tsconfig.json +++ b/disposable-email-domains/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/doccookies/tsconfig.json b/doccookies/tsconfig.json index ef167447be..f8dcf939f1 100644 --- a/doccookies/tsconfig.json +++ b/doccookies/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dock-spawn/tsconfig.json b/dock-spawn/tsconfig.json index 08c19e709e..92eac29967 100644 --- a/dock-spawn/tsconfig.json +++ b/dock-spawn/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/docopt/tsconfig.json b/docopt/tsconfig.json index a1863be81b..60b0174d95 100644 --- a/docopt/tsconfig.json +++ b/docopt/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/doctrine/tsconfig.json b/doctrine/tsconfig.json index a92eaa2e4b..d7d81a7c16 100644 --- a/doctrine/tsconfig.json +++ b/doctrine/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/documentdb-server/tsconfig.json b/documentdb-server/tsconfig.json index 3d19fcc5d5..7c96754e6c 100644 --- a/documentdb-server/tsconfig.json +++ b/documentdb-server/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/documentdb/tsconfig.json b/documentdb/tsconfig.json index a27fd7803a..552149e7db 100644 --- a/documentdb/tsconfig.json +++ b/documentdb/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dojo/tsconfig.json b/dojo/tsconfig.json index fbf76b15f5..d20f843c14 100644 --- a/dojo/tsconfig.json +++ b/dojo/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dom4/tsconfig.json b/dom4/tsconfig.json index 4517784373..c10c96f75a 100644 --- a/dom4/tsconfig.json +++ b/dom4/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/domo/tsconfig.json b/domo/tsconfig.json index 5a55c0ca8e..ca34816a7d 100644 --- a/domo/tsconfig.json +++ b/domo/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dompurify/tsconfig.json b/dompurify/tsconfig.json index 93f7bde000..44703bdcd5 100644 --- a/dompurify/tsconfig.json +++ b/dompurify/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/domready/tsconfig.json b/domready/tsconfig.json index 4a6ca208f5..54d5225b58 100644 --- a/domready/tsconfig.json +++ b/domready/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/domurl/tsconfig.json b/domurl/tsconfig.json index 43d14370e2..86a6ff8fb7 100644 --- a/domurl/tsconfig.json +++ b/domurl/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/donna/tsconfig.json b/donna/tsconfig.json index 2e45cf57af..5df1095e12 100644 --- a/donna/tsconfig.json +++ b/donna/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dookie/dookie-tests.ts b/dookie/dookie-tests.ts new file mode 100644 index 0000000000..d2fa907669 --- /dev/null +++ b/dookie/dookie-tests.ts @@ -0,0 +1,8 @@ + +import {push, pull} from './index'; + +(async ()=>{ + + await push('mongodb://localhost:27017/test', {test:[{ok:1},{ok:2}]}); + +})(); diff --git a/dookie/index.d.ts b/dookie/index.d.ts new file mode 100644 index 0000000000..bd3f6ea06b --- /dev/null +++ b/dookie/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for dookie 0.1 +// Project: https://github.com/vkarpov15/dookie#readme +// Definitions by: Swanest +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface PushOpts { + filename?: string; + dropDatabase: boolean; +} + +// Our exports: +export function push(uri: string, data: any, opts?: PushOpts): Promise; + +export function pull(uri: string): Promise; + +export function pullToStream(uri: string, stream: any): Promise; + +// Make this available as a global for non-module code. +export as namespace dookie; diff --git a/vue-router/tsconfig.json b/dookie/tsconfig.json similarity index 84% rename from vue-router/tsconfig.json rename to dookie/tsconfig.json index ec3371b3e8..d795a39145 100644 --- a/vue-router/tsconfig.json +++ b/dookie/tsconfig.json @@ -4,7 +4,7 @@ "target": "es6", "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -15,6 +15,6 @@ }, "files": [ "index.d.ts", - "vue-router-tests.ts" + "dookie-tests.ts" ] -} \ No newline at end of file +} diff --git a/dookie/tslint.json b/dookie/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/dookie/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/dot-object/tsconfig.json b/dot-object/tsconfig.json index 2f3f99dd6a..505abd7f41 100644 --- a/dot-object/tsconfig.json +++ b/dot-object/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dot-prop/tsconfig.json b/dot-prop/tsconfig.json index 453d3fd81f..f404606239 100644 --- a/dot-prop/tsconfig.json +++ b/dot-prop/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dot/tsconfig.json b/dot/tsconfig.json index b2e99e29d3..90dfddee0a 100644 --- a/dot/tsconfig.json +++ b/dot/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dotdotdot/tsconfig.json b/dotdotdot/tsconfig.json index e471e49cd2..01346ccccc 100644 --- a/dotdotdot/tsconfig.json +++ b/dotdotdot/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dotenv/tsconfig.json b/dotenv/tsconfig.json index 2fc29c83a9..1f7cfcfcca 100644 --- a/dotenv/tsconfig.json +++ b/dotenv/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/doublearray/tsconfig.json b/doublearray/tsconfig.json index d300061db5..c82acdd4e0 100644 --- a/doublearray/tsconfig.json +++ b/doublearray/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/doubleclick-gpt/tsconfig.json b/doubleclick-gpt/tsconfig.json index bee3262730..c06fe9ff3c 100644 --- a/doubleclick-gpt/tsconfig.json +++ b/doubleclick-gpt/tsconfig.json @@ -2,7 +2,10 @@ "compileOnSave": false, "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/draft-js/tsconfig.json b/draft-js/tsconfig.json index a984daf1a3..2b3ffe8ec7 100644 --- a/draft-js/tsconfig.json +++ b/draft-js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dragula/tsconfig.json b/dragula/tsconfig.json index bcc3d80e81..33f4e1e247 100644 --- a/dragula/tsconfig.json +++ b/dragula/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dropboxjs/tsconfig.json b/dropboxjs/tsconfig.json index 5399b6d59f..3e55f0136c 100644 --- a/dropboxjs/tsconfig.json +++ b/dropboxjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dropzone/tsconfig.json b/dropzone/tsconfig.json index c190c8f602..ff427c95f0 100644 --- a/dropzone/tsconfig.json +++ b/dropzone/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dsv/tsconfig.json b/dsv/tsconfig.json index 9d9965eba1..e5f4e1b7c3 100644 --- a/dsv/tsconfig.json +++ b/dsv/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dts-bundle/tsconfig.json b/dts-bundle/tsconfig.json index 1a97ecec63..8e871ab4a2 100644 --- a/dts-bundle/tsconfig.json +++ b/dts-bundle/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/duplexer2/tsconfig.json b/duplexer2/tsconfig.json index 61d21210f6..08cf6d3426 100644 --- a/duplexer2/tsconfig.json +++ b/duplexer2/tsconfig.json @@ -5,7 +5,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "strictNullChecks": false, "noImplicitThis": true, diff --git a/durandal/tsconfig.json b/durandal/tsconfig.json index 5692e5627e..1401eeeedb 100644 --- a/durandal/tsconfig.json +++ b/durandal/tsconfig.json @@ -4,7 +4,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/durandal/v1/tsconfig.json b/durandal/v1/tsconfig.json index 333827a63e..72d8336896 100644 --- a/durandal/v1/tsconfig.json +++ b/durandal/v1/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": true, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "durandal": ["durandal/v1"] + "durandal": [ + "durandal/v1" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/dustjs-linkedin/tsconfig.json b/dustjs-linkedin/tsconfig.json index 9d59de2c9b..73305e5459 100644 --- a/dustjs-linkedin/tsconfig.json +++ b/dustjs-linkedin/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dw-bxslider-4/tsconfig.json b/dw-bxslider-4/tsconfig.json index 51c1ad52dd..4686df733a 100644 --- a/dw-bxslider-4/tsconfig.json +++ b/dw-bxslider-4/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dygraphs/tsconfig.json b/dygraphs/tsconfig.json index a5e9f16f32..cd2465aaad 100644 --- a/dygraphs/tsconfig.json +++ b/dygraphs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dymo-label-framework/tsconfig.json b/dymo-label-framework/tsconfig.json index 53b51da7d8..70192c3366 100644 --- a/dymo-label-framework/tsconfig.json +++ b/dymo-label-framework/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/dynatable/tsconfig.json b/dynatable/tsconfig.json index 1a16c19697..6d37ddabf5 100644 --- a/dynatable/tsconfig.json +++ b/dynatable/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/each/tsconfig.json b/each/tsconfig.json index 54e305417c..99df044c84 100644 --- a/each/tsconfig.json +++ b/each/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/easeljs/tsconfig.json b/easeljs/tsconfig.json index 8706859837..106e84b3dc 100644 --- a/easeljs/tsconfig.json +++ b/easeljs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/easy-api-request/tsconfig.json b/easy-api-request/tsconfig.json index 4001829009..663d9a15d0 100644 --- a/easy-api-request/tsconfig.json +++ b/easy-api-request/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/easy-jsend/tsconfig.json b/easy-jsend/tsconfig.json index 2ab6004773..d3fae576d7 100644 --- a/easy-jsend/tsconfig.json +++ b/easy-jsend/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/easy-session/tsconfig.json b/easy-session/tsconfig.json index 6242b8506f..55a2221348 100644 --- a/easy-session/tsconfig.json +++ b/easy-session/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/easy-table/tsconfig.json b/easy-table/tsconfig.json index 3587b33cdb..6e1d6842b5 100644 --- a/easy-table/tsconfig.json +++ b/easy-table/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/easy-x-headers/tsconfig.json b/easy-x-headers/tsconfig.json index 23c293a602..21fd3e6cda 100644 --- a/easy-x-headers/tsconfig.json +++ b/easy-x-headers/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/easy-xapi-supertest/tsconfig.json b/easy-xapi-supertest/tsconfig.json index 3bb4e7ff3c..ff088ea5e3 100644 --- a/easy-xapi-supertest/tsconfig.json +++ b/easy-xapi-supertest/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/easy-xapi-utils/tsconfig.json b/easy-xapi-utils/tsconfig.json index f70d71f3e3..5a38347e84 100644 --- a/easy-xapi-utils/tsconfig.json +++ b/easy-xapi-utils/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/easy-xapi/tsconfig.json b/easy-xapi/tsconfig.json index 222ea50b29..b995d431ae 100644 --- a/easy-xapi/tsconfig.json +++ b/easy-xapi/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/easystarjs/tsconfig.json b/easystarjs/tsconfig.json index 6068b24c59..9c5d14bf1d 100644 --- a/easystarjs/tsconfig.json +++ b/easystarjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/echarts/tsconfig.json b/echarts/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/echarts/tsconfig.json +++ b/echarts/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ecmarkup/tsconfig.json b/ecmarkup/tsconfig.json index d3bef17b3a..2a9343d5ec 100644 --- a/ecmarkup/tsconfig.json +++ b/ecmarkup/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ecurve/tsconfig.json b/ecurve/tsconfig.json index 125dfbe787..e1fbd679a4 100644 --- a/ecurve/tsconfig.json +++ b/ecurve/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "ecurve-tests.ts" ] -} +} \ No newline at end of file diff --git a/egg.js/tsconfig.json b/egg.js/tsconfig.json index c6b83b95fd..00ca6481ae 100644 --- a/egg.js/tsconfig.json +++ b/egg.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/ej.web.all/tsconfig.json b/ej.web.all/tsconfig.json index e3f12bcda5..3a1cd27967 100644 --- a/ej.web.all/tsconfig.json +++ b/ej.web.all/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/ejs-locals/tsconfig.json b/ejs-locals/tsconfig.json index 546031bb2f..ee2ef81723 100644 --- a/ejs-locals/tsconfig.json +++ b/ejs-locals/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ejs/tsconfig.json b/ejs/tsconfig.json index 7ef3389d19..ce3a024d24 100644 --- a/ejs/tsconfig.json +++ b/ejs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ejson/tsconfig.json b/ejson/tsconfig.json index 52ab4c1534..95efe7696b 100644 --- a/ejson/tsconfig.json +++ b/ejson/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/elastic.js/tsconfig.json b/elastic.js/tsconfig.json index a735abad21..219dffce02 100644 --- a/elastic.js/tsconfig.json +++ b/elastic.js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/elasticsearch/elasticsearch-tests.ts b/elasticsearch/elasticsearch-tests.ts index 98d5a6c925..1be3f740bc 100644 --- a/elasticsearch/elasticsearch-tests.ts +++ b/elasticsearch/elasticsearch-tests.ts @@ -32,6 +32,17 @@ client.indices.delete({ }, function (error) { }); +client.deleteByQuery({ + index: 'test_index', + type: 'test_type', + body: { + query: { + } + } +}).then(function (response) { +}, function (error) { +}); + client.create({ index: 'index', type: 'type' diff --git a/elasticsearch/index.d.ts b/elasticsearch/index.d.ts index 6558c94f2f..84c8f281f9 100644 --- a/elasticsearch/index.d.ts +++ b/elasticsearch/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for elasticsearch 5.0 // Project: https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html -// Definitions by: Casper Skydt , Blake Smith , Dave Dunkin , Jeffery Grajkowski +// Definitions by: Casper Skydt , Blake Smith , Dave Dunkin , Jeffery Grajkowski , Margus Lamp , Ahmad Ferdous Bin Alam // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module Elasticsearch { @@ -143,6 +143,7 @@ declare module Elasticsearch { export type VersionType = "internal" | "external" | "external_gte" | "force"; export type ExpandWildcards = "open" | "closed" | "none" | "all"; export type DefaultOperator = "AND" | "OR"; + export type Conflicts = "abort" | "proceed"; export interface BulkIndexDocumentsParams extends GenericParams { waitForActiveShards?: string; @@ -234,16 +235,40 @@ declare module Elasticsearch { } export interface DeleteDocumentByQueryParams extends GenericParams { - waitForActiveShards?: string; - parent?: string; - refresh?: Refresh; - routing?: string; - timeout?: TimeSpan; + analyzer?: string; + analyzeWildcard?: boolean; + defaultOperator?: DefaultOperator; + df?: string; + from?: number; + ignoreUnavailable?: boolean; + allowNoIndices?: boolean; + conflicts?: Conflicts; + expandWildcards?: ExpandWildcards; + lenient?: boolean; + lowercaseExpandedTerms?: boolean; + preference?: string; + q?: string; + routing?: string | string[] | boolean; + scroll?: string; + searchType?: "query_then_fetch" | "dfs_query_then_fetch"; + searchTimeout?: TimeSpan; + size?: number; + sort?: NameList; + _source?: NameList; + _sourceExclude?: NameList; + _sourceInclude?: NameList; + terminateAfter?: number; + stats?: string | string[] | boolean; version?: number; - versionType?: VersionType; - index: string; - type: string; - id: string; + requestCache?: boolean; + refresh?: Refresh; + timeout?: TimeSpan; + waitForActiveShards?: string; + scrollSize?: number; + waitForCompletion?: boolean; + requestsPerSecond?: number; + index?: string; + type?: string; } export interface DeleteDocumentByQueryResponse { @@ -710,7 +735,7 @@ declare module Elasticsearch { from?: number; ignoreUnavailable?: boolean; allowNoIndices?: boolean; - conflicts?: "abort" | "proceed"; + conflicts?: Conflicts; expandWildcards?: ExpandWildcards; lenient?: boolean; lowercaseExpandedTerms?: boolean; diff --git a/elasticsearch/tsconfig.json b/elasticsearch/tsconfig.json index 287c983130..af051e1a4f 100644 --- a/elasticsearch/tsconfig.json +++ b/elasticsearch/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/electron-builder/tsconfig.json b/electron-builder/tsconfig.json index 9519423b02..c1cf1c01eb 100644 --- a/electron-builder/tsconfig.json +++ b/electron-builder/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/electron-debug/tsconfig.json b/electron-debug/tsconfig.json index 5252723379..4279922d08 100644 --- a/electron-debug/tsconfig.json +++ b/electron-debug/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/electron-devtools-installer/tsconfig.json b/electron-devtools-installer/tsconfig.json index 75bf78de62..66e41ee094 100644 --- a/electron-devtools-installer/tsconfig.json +++ b/electron-devtools-installer/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/electron-json-storage/tsconfig.json b/electron-json-storage/tsconfig.json index 149ae11d8d..66c91844db 100644 --- a/electron-json-storage/tsconfig.json +++ b/electron-json-storage/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/electron-notifications/tsconfig.json b/electron-notifications/tsconfig.json index adba6ee9c5..cfe77deb03 100644 --- a/electron-notifications/tsconfig.json +++ b/electron-notifications/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/electron-notify/tsconfig.json b/electron-notify/tsconfig.json index 1e63f414e9..6bdc138b0b 100644 --- a/electron-notify/tsconfig.json +++ b/electron-notify/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/electron-packager/tsconfig.json b/electron-packager/tsconfig.json index 6e968aa378..789b385fea 100644 --- a/electron-packager/tsconfig.json +++ b/electron-packager/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/electron-window-state/tsconfig.json b/electron-window-state/tsconfig.json index fe8785b215..3b9710d961 100644 --- a/electron-window-state/tsconfig.json +++ b/electron-window-state/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/electron/tsconfig.json b/electron/tsconfig.json index 8b0d4b6952..bf2299ea31 100644 --- a/electron/tsconfig.json +++ b/electron/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/element-resize-event/tsconfig.json b/element-resize-event/tsconfig.json index 2bc70f4e30..74215ead8a 100644 --- a/element-resize-event/tsconfig.json +++ b/element-resize-event/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/elm/tsconfig.json b/elm/tsconfig.json index 0a92355f9b..0d8045c6c7 100644 --- a/elm/tsconfig.json +++ b/elm/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/email-addresses/tsconfig.json b/email-addresses/tsconfig.json index 15c6adf404..b8b983cf3a 100644 --- a/email-addresses/tsconfig.json +++ b/email-addresses/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/email-templates/tsconfig.json b/email-templates/tsconfig.json index 3f68460991..bc97b20dbc 100644 --- a/email-templates/tsconfig.json +++ b/email-templates/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/email-validator/tsconfig.json b/email-validator/tsconfig.json index bab531c452..b2af15fd62 100644 --- a/email-validator/tsconfig.json +++ b/email-validator/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ember/tsconfig.json b/ember/tsconfig.json index d3d58eb3e6..d2f27dfec9 100644 --- a/ember/tsconfig.json +++ b/ember/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": true, diff --git a/ember/v1/tsconfig.json b/ember/v1/tsconfig.json index 2354a6e4db..a03fae9fbe 100644 --- a/ember/v1/tsconfig.json +++ b/ember/v1/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "ember": ["ember/v1"] + "ember": [ + "ember/v1" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/emissary/tsconfig.json b/emissary/tsconfig.json index 61a5a39ea2..99a5433b1e 100644 --- a/emissary/tsconfig.json +++ b/emissary/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/emojione/tsconfig.json b/emojione/tsconfig.json index c0912932ac..a772ceb6dd 100644 --- a/emojione/tsconfig.json +++ b/emojione/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/empower/tsconfig.json b/empower/tsconfig.json index fcf333f09b..25ea756fdd 100644 --- a/empower/tsconfig.json +++ b/empower/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/emscripten/tsconfig.json b/emscripten/tsconfig.json index 64a903bfeb..d12d0b996a 100644 --- a/emscripten/tsconfig.json +++ b/emscripten/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/encoding-japanese/tsconfig.json b/encoding-japanese/tsconfig.json index 600268d208..f3e5ea83dd 100644 --- a/encoding-japanese/tsconfig.json +++ b/encoding-japanese/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/enhanced-resolve/tsconfig.json b/enhanced-resolve/tsconfig.json index b1a5b475ef..23f724b261 100644 --- a/enhanced-resolve/tsconfig.json +++ b/enhanced-resolve/tsconfig.json @@ -1,54 +1,56 @@ { - "compilerOptions": { - "module": "commonjs", - "target": "es6", - "noImplicitThis": true, - "noImplicitAny": true, - "strictNullChecks": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "lib/AliasFieldPlugin.d.ts", - "lib/AliasPlugin.d.ts", - "lib/AppendPlugin.d.ts", - "lib/CloneBasenamePlugin.d.ts", - "lib/common-types.d.ts", - "lib/concord.d.ts", - "lib/ConcordExtensionsPlugin.d.ts", - "lib/ConcordMainPlugin.d.ts", - "lib/ConcordModulesPlugin.d.ts", - "lib/DescriptionFilePlugin.d.ts", - "lib/DescriptionFileUtils.d.ts", - "lib/DirectoryExistsPlugin.d.ts", - "lib/FileExistsPlugin.d.ts", - "lib/FileKindPlugin.d.ts", - "lib/getPaths.d.ts", - "lib/globToRegExp.d.ts", - "lib/JoinRequestPlugin.d.ts", - "lib/LogInfoPlugin.d.ts", - "lib/MainFieldPlugin.d.ts", - "lib/ModuleAppendPlugin.d.ts", - "lib/ModuleKindPlugin.d.ts", - "lib/ModulesInHierachicDirectoriesPlugin.d.ts", - "lib/ModulesInRootPlugin.d.ts", - "lib/NextPlugin.d.ts", - "lib/ParsePlugin.d.ts", - "lib/Resolver.d.ts", - "lib/ResultPlugin.d.ts", - "lib/Storage.d.ts", - "lib/SymlinkPlugin.d.ts", - "lib/SyncAsyncFileSystemDecorator.d.ts", - "lib/TryNextPlugin.d.ts", - "lib/UnsafeCachePlugin.d.ts", - "lib/UseFilePlugin.d.ts", - "test/index.ts", - "test/lib.ts" - ] -} + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitThis": true, + "noImplicitAny": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "lib/AliasFieldPlugin.d.ts", + "lib/AliasPlugin.d.ts", + "lib/AppendPlugin.d.ts", + "lib/CloneBasenamePlugin.d.ts", + "lib/common-types.d.ts", + "lib/concord.d.ts", + "lib/ConcordExtensionsPlugin.d.ts", + "lib/ConcordMainPlugin.d.ts", + "lib/ConcordModulesPlugin.d.ts", + "lib/DescriptionFilePlugin.d.ts", + "lib/DescriptionFileUtils.d.ts", + "lib/DirectoryExistsPlugin.d.ts", + "lib/FileExistsPlugin.d.ts", + "lib/FileKindPlugin.d.ts", + "lib/getPaths.d.ts", + "lib/globToRegExp.d.ts", + "lib/JoinRequestPlugin.d.ts", + "lib/LogInfoPlugin.d.ts", + "lib/MainFieldPlugin.d.ts", + "lib/ModuleAppendPlugin.d.ts", + "lib/ModuleKindPlugin.d.ts", + "lib/ModulesInHierachicDirectoriesPlugin.d.ts", + "lib/ModulesInRootPlugin.d.ts", + "lib/NextPlugin.d.ts", + "lib/ParsePlugin.d.ts", + "lib/Resolver.d.ts", + "lib/ResultPlugin.d.ts", + "lib/Storage.d.ts", + "lib/SymlinkPlugin.d.ts", + "lib/SyncAsyncFileSystemDecorator.d.ts", + "lib/TryNextPlugin.d.ts", + "lib/UnsafeCachePlugin.d.ts", + "lib/UseFilePlugin.d.ts", + "test/index.ts", + "test/lib.ts" + ] +} \ No newline at end of file diff --git a/ent/tsconfig.json b/ent/tsconfig.json index 0944ccffd7..4c9289ae86 100644 --- a/ent/tsconfig.json +++ b/ent/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/envify/tsconfig.json b/envify/tsconfig.json index 9d42c2c3b8..a3f80b63ec 100644 --- a/envify/tsconfig.json +++ b/envify/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/enzyme/tsconfig.json b/enzyme/tsconfig.json index 36e7c95f0e..83f549d65c 100644 --- a/enzyme/tsconfig.json +++ b/enzyme/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/eonasdan-bootstrap-datetimepicker/tsconfig.json b/eonasdan-bootstrap-datetimepicker/tsconfig.json index 4f52c9b6ca..6970636ceb 100644 --- a/eonasdan-bootstrap-datetimepicker/tsconfig.json +++ b/eonasdan-bootstrap-datetimepicker/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/epiceditor/tsconfig.json b/epiceditor/tsconfig.json index bd8de147cf..410f7bee8d 100644 --- a/epiceditor/tsconfig.json +++ b/epiceditor/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/epub/tsconfig.json b/epub/tsconfig.json index b94ee8f415..9a409c3ae1 100644 --- a/epub/tsconfig.json +++ b/epub/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/eq.js/tsconfig.json b/eq.js/tsconfig.json index a142a97c54..6cd21718b8 100644 --- a/eq.js/tsconfig.json +++ b/eq.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/error-stack-parser/tsconfig.json b/error-stack-parser/tsconfig.json index 6c63c0e6fb..11e1863b89 100644 --- a/error-stack-parser/tsconfig.json +++ b/error-stack-parser/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/errorhandler/tsconfig.json b/errorhandler/tsconfig.json index c22376c116..fd9a3b1665 100644 --- a/errorhandler/tsconfig.json +++ b/errorhandler/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/es6-collections/tsconfig.json b/es6-collections/tsconfig.json index d793e9ed90..b09ee9b48b 100644 --- a/es6-collections/tsconfig.json +++ b/es6-collections/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es5", + "lib": [ + "es5", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/es6-error/tsconfig.json b/es6-error/tsconfig.json index 4a23838b2d..f0becf44db 100644 --- a/es6-error/tsconfig.json +++ b/es6-error/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/es6-promise/tsconfig.json b/es6-promise/tsconfig.json index 72707cbc0e..bc50e7c4fb 100644 --- a/es6-promise/tsconfig.json +++ b/es6-promise/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es5", + "lib": [ + "es5", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/es6-shim/tsconfig.json b/es6-shim/tsconfig.json index d295d24675..1243a36ddb 100644 --- a/es6-shim/tsconfig.json +++ b/es6-shim/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es5", + "lib": [ + "es5", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/escape-html/tsconfig.json b/escape-html/tsconfig.json index d52ca70250..7c08568a1e 100644 --- a/escape-html/tsconfig.json +++ b/escape-html/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/escape-latex/tsconfig.json b/escape-latex/tsconfig.json index 138ebb37fd..8a925ce6a2 100644 --- a/escape-latex/tsconfig.json +++ b/escape-latex/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/escape-string-regexp/tsconfig.json b/escape-string-regexp/tsconfig.json index 6b780ce2d5..9017be036c 100644 --- a/escape-string-regexp/tsconfig.json +++ b/escape-string-regexp/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/escodegen/tsconfig.json b/escodegen/tsconfig.json index aaed59a511..7df2dba0cf 100644 --- a/escodegen/tsconfig.json +++ b/escodegen/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/esprima-walk/tsconfig.json b/esprima-walk/tsconfig.json index a4610b542b..f91f558c64 100644 --- a/esprima-walk/tsconfig.json +++ b/esprima-walk/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/esprima/tsconfig.json b/esprima/tsconfig.json index 90209d69d5..b94d0875ed 100644 --- a/esprima/tsconfig.json +++ b/esprima/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/estraverse/tsconfig.json b/estraverse/tsconfig.json index 75f8ac7884..45cfe5301c 100644 --- a/estraverse/tsconfig.json +++ b/estraverse/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/estree/tsconfig.json b/estree/tsconfig.json index 94cc3546b6..cdee8b7fa3 100644 --- a/estree/tsconfig.json +++ b/estree/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/evaporate/tsconfig.json b/evaporate/tsconfig.json index 2a877b9fd5..d0668e49d9 100644 --- a/evaporate/tsconfig.json +++ b/evaporate/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/event-kit/tsconfig.json b/event-kit/tsconfig.json index 143f34bc08..1682f77cb6 100644 --- a/event-kit/tsconfig.json +++ b/event-kit/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/event-loop-lag/tsconfig.json b/event-loop-lag/tsconfig.json index 4a4a41de47..839fd4263e 100644 --- a/event-loop-lag/tsconfig.json +++ b/event-loop-lag/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/event-stream/tsconfig.json b/event-stream/tsconfig.json index 8f749d93b5..208ff51fe0 100644 --- a/event-stream/tsconfig.json +++ b/event-stream/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/event-to-promise/tsconfig.json b/event-to-promise/tsconfig.json index 64f14351b5..7ec7626f4c 100644 --- a/event-to-promise/tsconfig.json +++ b/event-to-promise/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/eventemitter2/tsconfig.json b/eventemitter2/tsconfig.json index 81724e58e7..5df8f04c40 100644 --- a/eventemitter2/tsconfig.json +++ b/eventemitter2/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/eventemitter3/tsconfig.json b/eventemitter3/tsconfig.json index 5714fe51bd..cc19c9433b 100644 --- a/eventemitter3/tsconfig.json +++ b/eventemitter3/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/evernote/tsconfig.json b/evernote/tsconfig.json index 3724b2ac71..ee72e55520 100644 --- a/evernote/tsconfig.json +++ b/evernote/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/exit/tsconfig.json b/exit/tsconfig.json index 1546c4e44c..1966c83028 100644 --- a/exit/tsconfig.json +++ b/exit/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/exorcist/tsconfig.json b/exorcist/tsconfig.json index 20b19e5baa..d7f4d9cfd2 100644 --- a/exorcist/tsconfig.json +++ b/exorcist/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/expect.js/tsconfig.json b/expect.js/tsconfig.json index 5a50085673..a74bc1bdda 100644 --- a/expect.js/tsconfig.json +++ b/expect.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/expect/tsconfig.json b/expect/tsconfig.json index d0951714c3..a034e6b04d 100644 --- a/expect/tsconfig.json +++ b/expect/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/expectations/tsconfig.json b/expectations/tsconfig.json index 2bba50037a..e114451de7 100644 --- a/expectations/tsconfig.json +++ b/expectations/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/expr-eval/tsconfig.json b/expr-eval/tsconfig.json index 80230f8303..73b68bb278 100644 --- a/expr-eval/tsconfig.json +++ b/expr-eval/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "expr-eval-tests.ts" ] -} +} \ No newline at end of file diff --git a/express-brute-memcached/tsconfig.json b/express-brute-memcached/tsconfig.json index d8b35dcfa4..2518dc464a 100644 --- a/express-brute-memcached/tsconfig.json +++ b/express-brute-memcached/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/express-brute-mongo/tsconfig.json b/express-brute-mongo/tsconfig.json index a420e9ac53..40a6ef01df 100644 --- a/express-brute-mongo/tsconfig.json +++ b/express-brute-mongo/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/express-brute/tsconfig.json b/express-brute/tsconfig.json index 3b9c199b3a..30be640387 100644 --- a/express-brute/tsconfig.json +++ b/express-brute/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/express-debug/tsconfig.json b/express-debug/tsconfig.json index 826a832751..f3fa1043b9 100644 --- a/express-debug/tsconfig.json +++ b/express-debug/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/express-domain-middleware/tsconfig.json b/express-domain-middleware/tsconfig.json index c3a9ab1a66..59b736e887 100644 --- a/express-domain-middleware/tsconfig.json +++ b/express-domain-middleware/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/express-formidable/tsconfig.json b/express-formidable/tsconfig.json index 6fc2b97031..59c0860d7f 100644 --- a/express-formidable/tsconfig.json +++ b/express-formidable/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/express-graphql/tsconfig.json b/express-graphql/tsconfig.json index 2cbe212ca0..3394d7c54a 100644 --- a/express-graphql/tsconfig.json +++ b/express-graphql/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/express-handlebars/tsconfig.json b/express-handlebars/tsconfig.json index 42c08f6a57..9be12b0d0b 100644 --- a/express-handlebars/tsconfig.json +++ b/express-handlebars/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/express-jwt/tsconfig.json b/express-jwt/tsconfig.json index 041a2dbedf..d0c13dcb3e 100644 --- a/express-jwt/tsconfig.json +++ b/express-jwt/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/express-less/tsconfig.json b/express-less/tsconfig.json index 40a9e40fa3..558ccc0e96 100644 --- a/express-less/tsconfig.json +++ b/express-less/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/express-minify/tsconfig.json b/express-minify/tsconfig.json index f7dfdebee8..d6317db044 100644 --- a/express-minify/tsconfig.json +++ b/express-minify/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/express-mung/tsconfig.json b/express-mung/tsconfig.json index 4e798d527c..063b52f52d 100644 --- a/express-mung/tsconfig.json +++ b/express-mung/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/express-myconnection/tsconfig.json b/express-myconnection/tsconfig.json index 262ba970d4..5f0d2ca2b6 100644 --- a/express-myconnection/tsconfig.json +++ b/express-myconnection/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/express-openapi/tsconfig.json b/express-openapi/tsconfig.json index 95627f6d01..d6fea1fa8a 100644 --- a/express-openapi/tsconfig.json +++ b/express-openapi/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/express-partials/tsconfig.json b/express-partials/tsconfig.json index 59f2db277d..173210c180 100644 --- a/express-partials/tsconfig.json +++ b/express-partials/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/express-route-fs/tsconfig.json b/express-route-fs/tsconfig.json index 7af2cf8650..48849326c7 100644 --- a/express-route-fs/tsconfig.json +++ b/express-route-fs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/express-serve-static-core/tsconfig.json b/express-serve-static-core/tsconfig.json index 72a8a8dd93..40ee779963 100644 --- a/express-serve-static-core/tsconfig.json +++ b/express-serve-static-core/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/express-session/tsconfig.json b/express-session/tsconfig.json index 3ad3026c09..674aaf8385 100644 --- a/express-session/tsconfig.json +++ b/express-session/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/express-unless/tsconfig.json b/express-unless/tsconfig.json index c212effc16..2eaf41b0d5 100644 --- a/express-unless/tsconfig.json +++ b/express-unless/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/express-useragent/tsconfig.json b/express-useragent/tsconfig.json index e55d2ea819..804b3434a8 100644 --- a/express-useragent/tsconfig.json +++ b/express-useragent/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/express-validator/tsconfig.json b/express-validator/tsconfig.json index da1f6bbf71..cd9c9145d7 100644 --- a/express-validator/tsconfig.json +++ b/express-validator/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/express/index.d.ts b/express/index.d.ts index 7222c8d3d9..9b913db473 100644 --- a/express/index.d.ts +++ b/express/index.d.ts @@ -59,6 +59,7 @@ declare namespace e { interface Handler extends core.Handler { } interface IRoute extends core.IRoute { } interface IRouter extends core.IRouter { } + interface IRouterHandler extends core.IRouterHandler { } interface IRouterMatcher extends core.IRouterMatcher { } interface MediaType extends core.MediaType { } interface NextFunction extends core.NextFunction { } diff --git a/express/tsconfig.json b/express/tsconfig.json index e1c7f66b8a..0fc87c2800 100644 --- a/express/tsconfig.json +++ b/express/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/extend/tsconfig.json b/extend/tsconfig.json index ef9142e834..7e5d04a155 100644 --- a/extend/tsconfig.json +++ b/extend/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/extended-listbox/tsconfig.json b/extended-listbox/tsconfig.json index ff03fe4555..2943719a7f 100644 --- a/extended-listbox/tsconfig.json +++ b/extended-listbox/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/extjs/tsconfig.json b/extjs/tsconfig.json index 5c9476a7d1..77e9863d6a 100644 --- a/extjs/tsconfig.json +++ b/extjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/extract-text-webpack-plugin/tsconfig.json b/extract-text-webpack-plugin/tsconfig.json index 1b4a6c1b1b..b5e248c21d 100644 --- a/extract-text-webpack-plugin/tsconfig.json +++ b/extract-text-webpack-plugin/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/extract-zip/tsconfig.json b/extract-zip/tsconfig.json index 9a52a5d990..fc69a3fbc0 100644 --- a/extract-zip/tsconfig.json +++ b/extract-zip/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "extract-zip-tests.ts" ] -} +} \ No newline at end of file diff --git a/eyes/tsconfig.json b/eyes/tsconfig.json index f5b822508b..7711a38e68 100644 --- a/eyes/tsconfig.json +++ b/eyes/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/f1/tsconfig.json b/f1/tsconfig.json index 4cefcd6495..501e1649db 100644 --- a/f1/tsconfig.json +++ b/f1/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/fabric/tsconfig.json b/fabric/tsconfig.json index 60921d5263..13faaee670 100644 --- a/fabric/tsconfig.json +++ b/fabric/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/facebook-js-sdk/tsconfig.json b/facebook-js-sdk/tsconfig.json index 4fed5f6bc7..a37eb513c6 100644 --- a/facebook-js-sdk/tsconfig.json +++ b/facebook-js-sdk/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/facebook-pixel/tsconfig.json b/facebook-pixel/tsconfig.json index 14d6b995f9..cfbd7e82da 100644 --- a/facebook-pixel/tsconfig.json +++ b/facebook-pixel/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/faker/tsconfig.json b/faker/tsconfig.json index 1b623c5290..c2ce14c941 100644 --- a/faker/tsconfig.json +++ b/faker/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/falcor-express/tsconfig.json b/falcor-express/tsconfig.json index c6c66a09f0..8c31012eff 100644 --- a/falcor-express/tsconfig.json +++ b/falcor-express/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/falcor-http-datasource/tsconfig.json b/falcor-http-datasource/tsconfig.json index d523fb551e..8f7327c1f0 100644 --- a/falcor-http-datasource/tsconfig.json +++ b/falcor-http-datasource/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/falcor-json-graph/tsconfig.json b/falcor-json-graph/tsconfig.json index 14f3efe18d..b746208c00 100644 --- a/falcor-json-graph/tsconfig.json +++ b/falcor-json-graph/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/falcor-router/tsconfig.json b/falcor-router/tsconfig.json index b9407dadfd..dbcf71fc2c 100644 --- a/falcor-router/tsconfig.json +++ b/falcor-router/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/falcor/tsconfig.json b/falcor/tsconfig.json index d81a60d4ee..450a570778 100644 --- a/falcor/tsconfig.json +++ b/falcor/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/famous/tsconfig.json b/famous/tsconfig.json index f07754f5e5..efe289fcb5 100644 --- a/famous/tsconfig.json +++ b/famous/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fancybox/tsconfig.json b/fancybox/tsconfig.json index 788886ea04..0ed6ebd223 100644 --- a/fancybox/tsconfig.json +++ b/fancybox/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/farbtastic/tsconfig.json b/farbtastic/tsconfig.json index 1b83bfff38..4783d61749 100644 --- a/farbtastic/tsconfig.json +++ b/farbtastic/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fast-json-patch/tsconfig.json b/fast-json-patch/tsconfig.json index 8d4e7e0bd4..08d3a2703f 100644 --- a/fast-json-patch/tsconfig.json +++ b/fast-json-patch/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fast-levenshtein/tsconfig.json b/fast-levenshtein/tsconfig.json index 03f965ea2e..1c4790a9ac 100644 --- a/fast-levenshtein/tsconfig.json +++ b/fast-levenshtein/tsconfig.json @@ -5,7 +5,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fast-simplex-noise/tsconfig.json b/fast-simplex-noise/tsconfig.json index cef3ce6c6f..396315e587 100644 --- a/fast-simplex-noise/tsconfig.json +++ b/fast-simplex-noise/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fast-stats/tsconfig.json b/fast-stats/tsconfig.json index b6f3121d84..ac2826ea03 100644 --- a/fast-stats/tsconfig.json +++ b/fast-stats/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fastclick/tsconfig.json b/fastclick/tsconfig.json index faf920a449..7a0765f6e8 100644 --- a/fastclick/tsconfig.json +++ b/fastclick/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/favico.js/tsconfig.json b/favico.js/tsconfig.json index 2ea17650d1..38c83f7668 100644 --- a/favico.js/tsconfig.json +++ b/favico.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fb/tsconfig.json b/fb/tsconfig.json index a04f48e410..73e4d7ebac 100644 --- a/fb/tsconfig.json +++ b/fb/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fbemitter/tsconfig.json b/fbemitter/tsconfig.json index e29b52781a..a5fab49d7d 100644 --- a/fbemitter/tsconfig.json +++ b/fbemitter/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/featherlight/tsconfig.json b/featherlight/tsconfig.json index d49d7a1bb4..d675953e89 100644 --- a/featherlight/tsconfig.json +++ b/featherlight/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fetch-mock/tsconfig.json b/fetch-mock/tsconfig.json index 208d05e2d8..8d38620419 100644 --- a/fetch-mock/tsconfig.json +++ b/fetch-mock/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ffi/tsconfig.json b/ffi/tsconfig.json index 45c991ece0..5c4d36cac2 100644 --- a/ffi/tsconfig.json +++ b/ffi/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fhir/tsconfig.json b/fhir/tsconfig.json index 8b57b20bc7..4b7b598ca3 100644 --- a/fhir/tsconfig.json +++ b/fhir/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fibers/tsconfig.json b/fibers/tsconfig.json index 222ecea383..c9412a5365 100644 --- a/fibers/tsconfig.json +++ b/fibers/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/field/tsconfig.json b/field/tsconfig.json index 722570015b..cad072ad2d 100644 --- a/field/tsconfig.json +++ b/field/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/file-saver/tsconfig.json b/file-saver/tsconfig.json index 8aa772455a..7eae381719 100644 --- a/file-saver/tsconfig.json +++ b/file-saver/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/file-type/tsconfig.json b/file-type/tsconfig.json index a04df3cada..022412fea2 100644 --- a/file-type/tsconfig.json +++ b/file-type/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/file-url/tsconfig.json b/file-url/tsconfig.json index 66a6554ad9..a40e050026 100644 --- a/file-url/tsconfig.json +++ b/file-url/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/filesize/tsconfig.json b/filesize/tsconfig.json index a61f301d7e..e2992f2eb7 100644 --- a/filesize/tsconfig.json +++ b/filesize/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/filesystem/tsconfig.json b/filesystem/tsconfig.json index 5add2dc74a..ad6c29ed09 100644 --- a/filesystem/tsconfig.json +++ b/filesystem/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/filewriter/tsconfig.json b/filewriter/tsconfig.json index 27d1d8d844..24fee2ed61 100644 --- a/filewriter/tsconfig.json +++ b/filewriter/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fill-pdf/tsconfig.json b/fill-pdf/tsconfig.json index 5cb4dd9a57..f171cd8944 100644 --- a/fill-pdf/tsconfig.json +++ b/fill-pdf/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/finalhandler/tsconfig.json b/finalhandler/tsconfig.json index 78020869fe..75f6e6276e 100644 --- a/finalhandler/tsconfig.json +++ b/finalhandler/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/finch/tsconfig.json b/finch/tsconfig.json index 1ffe7db57e..886dab1e7a 100644 --- a/finch/tsconfig.json +++ b/finch/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/findup-sync/tsconfig.json b/findup-sync/tsconfig.json index 4628d9646f..5835f70080 100644 --- a/findup-sync/tsconfig.json +++ b/findup-sync/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fine-uploader/tsconfig.json b/fine-uploader/tsconfig.json index e4339da404..c02e485091 100644 --- a/fine-uploader/tsconfig.json +++ b/fine-uploader/tsconfig.json @@ -1,39 +1,42 @@ { - "files": [ - "index.d.ts", - "test/blobs.ts", - "test/camera.ts", - "test/chunking.ts", - "test/core.ts", - "test/cors.ts", - "test/deleteFile.ts", - "test/extraButtons.ts", - "test/form.ts", - "test/message.ts", - "test/paste.ts", - "test/resume.ts", - "test/retry.ts", - "test/request.ts", - "test/scaling.ts", - "test/session.ts", - "test/text.ts", - "test/validation.ts", - "test/workarounds.ts", - "test/method.ts", - "test/callbacks.ts" - ], - "compilerOptions": { - "module": "commonjs", - "target": "es6", - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "baseUrl": "../", - "typeRoots": [ - "../" + "files": [ + "index.d.ts", + "test/blobs.ts", + "test/camera.ts", + "test/chunking.ts", + "test/core.ts", + "test/cors.ts", + "test/deleteFile.ts", + "test/extraButtons.ts", + "test/form.ts", + "test/message.ts", + "test/paste.ts", + "test/resume.ts", + "test/retry.ts", + "test/request.ts", + "test/scaling.ts", + "test/session.ts", + "test/text.ts", + "test/validation.ts", + "test/workarounds.ts", + "test/method.ts", + "test/callbacks.ts" ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - } -} + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + } +} \ No newline at end of file diff --git a/fingerprintjs/tsconfig.json b/fingerprintjs/tsconfig.json index 146b0b572e..2538e47fab 100644 --- a/fingerprintjs/tsconfig.json +++ b/fingerprintjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/firebase-client/tsconfig.json b/firebase-client/tsconfig.json index 96073d0f7c..fdb35ab929 100644 --- a/firebase-client/tsconfig.json +++ b/firebase-client/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/firebase-token-generator/tsconfig.json b/firebase-token-generator/tsconfig.json index fba33ed898..9c0c0251ad 100644 --- a/firebase-token-generator/tsconfig.json +++ b/firebase-token-generator/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/firebase/tsconfig.json b/firebase/tsconfig.json index 38c3bea3d5..306e8bdb6e 100644 --- a/firebase/tsconfig.json +++ b/firebase/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/firefox/tsconfig.json b/firefox/tsconfig.json index 529f297f77..b9172a1c32 100644 --- a/firefox/tsconfig.json +++ b/firefox/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/first-mate/tsconfig.json b/first-mate/tsconfig.json index d699e09ee4..b8ae8bf954 100644 --- a/first-mate/tsconfig.json +++ b/first-mate/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fixed-data-table/tsconfig.json b/fixed-data-table/tsconfig.json index 3962b759bd..622eaa1d36 100644 --- a/fixed-data-table/tsconfig.json +++ b/fixed-data-table/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/flake-idgen/tsconfig.json b/flake-idgen/tsconfig.json index f3c63b048c..32c2e540f0 100644 --- a/flake-idgen/tsconfig.json +++ b/flake-idgen/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/flat/tsconfig.json b/flat/tsconfig.json index cb1cb66858..19684cdd32 100644 --- a/flat/tsconfig.json +++ b/flat/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/flatpickr/tsconfig.json b/flatpickr/tsconfig.json index fc0fd0f78a..f74514f614 100644 --- a/flatpickr/tsconfig.json +++ b/flatpickr/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "flatpickr-tests.ts" ] -} +} \ No newline at end of file diff --git a/flexslider/tsconfig.json b/flexslider/tsconfig.json index e856d242c2..f8ba67625d 100644 --- a/flexslider/tsconfig.json +++ b/flexslider/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/flickity/tsconfig.json b/flickity/tsconfig.json index 56c8d7db2d..6123aa5990 100644 --- a/flickity/tsconfig.json +++ b/flickity/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/flight/tsconfig.json b/flight/tsconfig.json index 62a00ba844..ef6310f96d 100644 --- a/flight/tsconfig.json +++ b/flight/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/flightplan/tsconfig.json b/flightplan/tsconfig.json index 51a9aec6a9..5fe870dd59 100644 --- a/flightplan/tsconfig.json +++ b/flightplan/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/flipsnap/tsconfig.json b/flipsnap/tsconfig.json index bdddbbb098..d8b39baa72 100644 --- a/flipsnap/tsconfig.json +++ b/flipsnap/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/flot/tsconfig.json b/flot/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/flot/tsconfig.json +++ b/flot/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/flowjs/tsconfig.json b/flowjs/tsconfig.json index eaccd331ab..b00c01cc54 100644 --- a/flowjs/tsconfig.json +++ b/flowjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fluent-ffmpeg/tsconfig.json b/fluent-ffmpeg/tsconfig.json index 8708980874..27024331f1 100644 --- a/fluent-ffmpeg/tsconfig.json +++ b/fluent-ffmpeg/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/flux-standard-action/tsconfig.json b/flux-standard-action/tsconfig.json index c565bfcd85..74ce6e361f 100644 --- a/flux-standard-action/tsconfig.json +++ b/flux-standard-action/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/flux/tsconfig.json b/flux/tsconfig.json index f5dd865c2f..45255c7d7a 100644 --- a/flux/tsconfig.json +++ b/flux/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fluxxor/tsconfig.json b/fluxxor/tsconfig.json index df0b373267..e6bbcbc2ac 100644 --- a/fluxxor/tsconfig.json +++ b/fluxxor/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fontfaceobserver/tsconfig.json b/fontfaceobserver/tsconfig.json index 2d114b86cf..e9a03f3541 100644 --- a/fontfaceobserver/tsconfig.json +++ b/fontfaceobserver/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fontoxml/tsconfig.json b/fontoxml/tsconfig.json index 408ea0539f..b7501d4042 100644 --- a/fontoxml/tsconfig.json +++ b/fontoxml/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/forge-di/tsconfig.json b/forge-di/tsconfig.json index dc34b4d365..4a16ed5dcf 100644 --- a/forge-di/tsconfig.json +++ b/forge-di/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/form-data/tsconfig.json b/form-data/tsconfig.json index 8b65885995..e97ed4a2c6 100644 --- a/form-data/tsconfig.json +++ b/form-data/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/form-serializer/tsconfig.json b/form-serializer/tsconfig.json index f980ae551c..8041f14ca5 100644 --- a/form-serializer/tsconfig.json +++ b/form-serializer/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/format-unicorn/tsconfig.json b/format-unicorn/tsconfig.json index 45bb7c114e..29d4f9a2e6 100644 --- a/format-unicorn/tsconfig.json +++ b/format-unicorn/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/formidable/tsconfig.json b/formidable/tsconfig.json index 3552db0714..4e495b8b04 100644 --- a/formidable/tsconfig.json +++ b/formidable/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fossil-delta/tsconfig.json b/fossil-delta/tsconfig.json index 0e1c6bcfd8..fa6922eea9 100644 --- a/fossil-delta/tsconfig.json +++ b/fossil-delta/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/foundation-sites/tsconfig.json b/foundation-sites/tsconfig.json index e648a90133..60e0a90e80 100644 --- a/foundation-sites/tsconfig.json +++ b/foundation-sites/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/foundation/tsconfig.json b/foundation/tsconfig.json index 9fe7c2aff4..2c912b6c88 100644 --- a/foundation/tsconfig.json +++ b/foundation/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fpsmeter/tsconfig.json b/fpsmeter/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/fpsmeter/tsconfig.json +++ b/fpsmeter/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/freedom/tsconfig.json b/freedom/tsconfig.json index dcd0c4fba3..3be620d6cd 100644 --- a/freedom/tsconfig.json +++ b/freedom/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/freeport/freeport-tests.ts b/freeport/freeport-tests.ts index 6f8ac0fd6b..d64a72f496 100644 --- a/freeport/freeport-tests.ts +++ b/freeport/freeport-tests.ts @@ -1,8 +1,10 @@ import freeport = require('freeport'); -var num: number; +let num: number, + error: Error; freeport((err, made) => { + error = err; num = made; }); diff --git a/freeport/index.d.ts b/freeport/index.d.ts index d8578f5eb5..6a9d4a8ab4 100644 --- a/freeport/index.d.ts +++ b/freeport/index.d.ts @@ -1,9 +1,8 @@ -// Type definitions for freeport 1.0.5 +// Type definitions for freeport 1.0 // Project: https://github.com/daaku/nodejs-freeport // Definitions by: Arne Schubert // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - declare function freeport(cb: (err: Error, port: number) => void): void; declare namespace freeport {} diff --git a/freeport/tsconfig.json b/freeport/tsconfig.json index 36066e65e6..b475d43da6 100644 --- a/freeport/tsconfig.json +++ b/freeport/tsconfig.json @@ -1,10 +1,12 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -17,4 +19,4 @@ "index.d.ts", "freeport-tests.ts" ] -} \ No newline at end of file +} diff --git a/freeport/tslint.json b/freeport/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/freeport/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/from/tsconfig.json b/from/tsconfig.json index 5d7082a7b7..7aa11b5c54 100644 --- a/from/tsconfig.json +++ b/from/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/fromjs/tsconfig.json b/fromjs/tsconfig.json index 78f1ca510c..92b3621ebb 100644 --- a/fromjs/tsconfig.json +++ b/fromjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fromnow/tsconfig.json b/fromnow/tsconfig.json index f72b744eca..48462d06eb 100644 --- a/fromnow/tsconfig.json +++ b/fromnow/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fs-ext/tsconfig.json b/fs-ext/tsconfig.json index 2c664cc7a4..ef216c4072 100644 --- a/fs-ext/tsconfig.json +++ b/fs-ext/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fs-extra-promise-es6/tsconfig.json b/fs-extra-promise-es6/tsconfig.json index a21cc4aac2..877953e8d6 100644 --- a/fs-extra-promise-es6/tsconfig.json +++ b/fs-extra-promise-es6/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fs-extra-promise/tsconfig.json b/fs-extra-promise/tsconfig.json index 7a4832b918..a233a1224c 100644 --- a/fs-extra-promise/tsconfig.json +++ b/fs-extra-promise/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fs-extra/tsconfig.json b/fs-extra/tsconfig.json index e7c5d7aa25..6337361eed 100644 --- a/fs-extra/tsconfig.json +++ b/fs-extra/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fs-finder/tsconfig.json b/fs-finder/tsconfig.json index c2bb43bac1..12014d7788 100644 --- a/fs-finder/tsconfig.json +++ b/fs-finder/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fs-mock/tsconfig.json b/fs-mock/tsconfig.json index 2074406fdc..55e0dc8136 100644 --- a/fs-mock/tsconfig.json +++ b/fs-mock/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fs-promise/tsconfig.json b/fs-promise/tsconfig.json index 0b76206679..8cf124c15b 100644 --- a/fs-promise/tsconfig.json +++ b/fs-promise/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/ftdomdelegate/tsconfig.json b/ftdomdelegate/tsconfig.json index 7753ff59f3..f68033bfb3 100644 --- a/ftdomdelegate/tsconfig.json +++ b/ftdomdelegate/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ftp/tsconfig.json b/ftp/tsconfig.json index 3dae56f613..bdae80b4ae 100644 --- a/ftp/tsconfig.json +++ b/ftp/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ftpd/tsconfig.json b/ftpd/tsconfig.json index 273ec70eec..16849e26c0 100644 --- a/ftpd/tsconfig.json +++ b/ftpd/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fullcalendar/tsconfig.json b/fullcalendar/tsconfig.json index 2d26610a8c..ceb59668c7 100644 --- a/fullcalendar/tsconfig.json +++ b/fullcalendar/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/fullcalendar/v1/tsconfig.json b/fullcalendar/v1/tsconfig.json index bf820ac863..810979b7a3 100644 --- a/fullcalendar/v1/tsconfig.json +++ b/fullcalendar/v1/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": true, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "fullcalendar": ["fullcalendar/v1"] + "fullcalendar": [ + "fullcalendar/v1" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/fullname/tsconfig.json b/fullname/tsconfig.json index 775f24a542..b1bbc33f6f 100644 --- a/fullname/tsconfig.json +++ b/fullname/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fullpage.js/tsconfig.json b/fullpage.js/tsconfig.json index f0a258d175..0b756489f1 100644 --- a/fullpage.js/tsconfig.json +++ b/fullpage.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fuse/tsconfig.json b/fuse/tsconfig.json index b3f6b4c7d5..8007ac69ea 100644 --- a/fuse/tsconfig.json +++ b/fuse/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fusioncharts/tsconfig.json b/fusioncharts/tsconfig.json index e7ffb46dd1..dc4436d64c 100644 --- a/fusioncharts/tsconfig.json +++ b/fusioncharts/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fuzzaldrin-plus/tsconfig.json b/fuzzaldrin-plus/tsconfig.json index d1862e59bc..9b8024fdab 100644 --- a/fuzzaldrin-plus/tsconfig.json +++ b/fuzzaldrin-plus/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/fuzzaldrin/tsconfig.json b/fuzzaldrin/tsconfig.json index 87eb6217d4..3bc13b0278 100644 --- a/fuzzaldrin/tsconfig.json +++ b/fuzzaldrin/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -16,4 +18,4 @@ "files": [ "index.d.ts" ] -} +} \ No newline at end of file diff --git a/fxn/tsconfig.json b/fxn/tsconfig.json index a1a40d7393..3bc13b0278 100644 --- a/fxn/tsconfig.json +++ b/fxn/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/gae.channel.api/tsconfig.json b/gae.channel.api/tsconfig.json index 00bc44f6a7..4ee5f96211 100644 --- a/gae.channel.api/tsconfig.json +++ b/gae.channel.api/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gamepad/tsconfig.json b/gamepad/tsconfig.json index 51357155f8..3f6b376405 100644 --- a/gamepad/tsconfig.json +++ b/gamepad/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gamequery/tsconfig.json b/gamequery/tsconfig.json index da24a150cd..fe46c19286 100644 --- a/gamequery/tsconfig.json +++ b/gamequery/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/gandi-livedns/tsconfig.json b/gandi-livedns/tsconfig.json index c7921932ad..d63ce7bcc4 100644 --- a/gandi-livedns/tsconfig.json +++ b/gandi-livedns/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gapi.analytics/tsconfig.json b/gapi.analytics/tsconfig.json index 8fd78b3902..15bf7f626b 100644 --- a/gapi.analytics/tsconfig.json +++ b/gapi.analytics/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/gapi.auth2/tsconfig.json b/gapi.auth2/tsconfig.json index c29ced0df3..18d8b4dc70 100644 --- a/gapi.auth2/tsconfig.json +++ b/gapi.auth2/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gapi.pagespeedonline/tsconfig.json b/gapi.pagespeedonline/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/gapi.pagespeedonline/tsconfig.json +++ b/gapi.pagespeedonline/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gapi.translate/tsconfig.json b/gapi.translate/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/gapi.translate/tsconfig.json +++ b/gapi.translate/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gapi.urlshortener/tsconfig.json b/gapi.urlshortener/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/gapi.urlshortener/tsconfig.json +++ b/gapi.urlshortener/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gapi.youtube/tsconfig.json b/gapi.youtube/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/gapi.youtube/tsconfig.json +++ b/gapi.youtube/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gapi.youtubeanalytics/tsconfig.json b/gapi.youtubeanalytics/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/gapi.youtubeanalytics/tsconfig.json +++ b/gapi.youtubeanalytics/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gapi/tsconfig.json b/gapi/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/gapi/tsconfig.json +++ b/gapi/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gaussian/tsconfig.json b/gaussian/tsconfig.json index f76c6bacc2..3334676bac 100644 --- a/gaussian/tsconfig.json +++ b/gaussian/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "gaussian-tests.ts" ] -} +} \ No newline at end of file diff --git a/generic-functions/tsconfig.json b/generic-functions/tsconfig.json index 7a46abfbd9..7a76665e2c 100644 --- a/generic-functions/tsconfig.json +++ b/generic-functions/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gently/tsconfig.json b/gently/tsconfig.json index 91afbecd77..3f0c264b9f 100644 --- a/gently/tsconfig.json +++ b/gently/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/geodesy/tsconfig.json b/geodesy/tsconfig.json index b73fab8bb3..65a4153f5f 100644 --- a/geodesy/tsconfig.json +++ b/geodesy/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/geoip-lite/tsconfig.json b/geoip-lite/tsconfig.json index 7029421649..25bcb989be 100644 --- a/geoip-lite/tsconfig.json +++ b/geoip-lite/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/geojson/tsconfig.json b/geojson/tsconfig.json index b2ff67d2ae..46bc9b0450 100644 --- a/geojson/tsconfig.json +++ b/geojson/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/geojson2osm/tsconfig.json b/geojson2osm/tsconfig.json index 5ba7c9065b..a6259af88a 100644 --- a/geojson2osm/tsconfig.json +++ b/geojson2osm/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/geolib/tsconfig.json b/geolib/tsconfig.json index aca799d836..54bb2ee947 100644 --- a/geolib/tsconfig.json +++ b/geolib/tsconfig.json @@ -1,20 +1,23 @@ { - "compilerOptions": { - "module": "commonjs", - "target": "es6", - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "geolib-tests.ts" - ] -} + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "geolib-tests.ts" + ] +} \ No newline at end of file diff --git a/geometry-dom/tsconfig.json b/geometry-dom/tsconfig.json index 669f02023b..7662d96888 100644 --- a/geometry-dom/tsconfig.json +++ b/geometry-dom/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/geopattern/tsconfig.json b/geopattern/tsconfig.json index 4dd9479920..d37cd7a2f8 100644 --- a/geopattern/tsconfig.json +++ b/geopattern/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "geopattern-tests.ts" ] -} +} \ No newline at end of file diff --git a/get-port/tsconfig.json b/get-port/tsconfig.json index db99c113ee..754878e2bf 100644 --- a/get-port/tsconfig.json +++ b/get-port/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/get-stdin/tsconfig.json b/get-stdin/tsconfig.json index 2d3c1a6c70..f21c0a9957 100644 --- a/get-stdin/tsconfig.json +++ b/get-stdin/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/gijgo/tsconfig.json b/gijgo/tsconfig.json index b6c04e62bb..963daa33cd 100644 --- a/gijgo/tsconfig.json +++ b/gijgo/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/giraffe/tsconfig.json b/giraffe/tsconfig.json index 1c0e13a97a..7c6be0462b 100644 --- a/giraffe/tsconfig.json +++ b/giraffe/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/git-config/tsconfig.json b/git-config/tsconfig.json index 0cf2078ca0..c3751c6d2d 100644 --- a/git-config/tsconfig.json +++ b/git-config/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/git-remote-origin-url/tsconfig.json b/git-remote-origin-url/tsconfig.json index 2abc29a970..8b9ea1a86e 100644 --- a/git-remote-origin-url/tsconfig.json +++ b/git-remote-origin-url/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "git-remote-origin-url-tests.ts" ] -} +} \ No newline at end of file diff --git a/git/tsconfig.json b/git/tsconfig.json index eccbc2065b..09054681dd 100644 --- a/git/tsconfig.json +++ b/git/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/github/tsconfig.json b/github/tsconfig.json index 4af2ec53a6..34008249b9 100644 --- a/github/tsconfig.json +++ b/github/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "github-tests.ts" ] -} +} \ No newline at end of file diff --git a/gl-matrix/tsconfig.json b/gl-matrix/tsconfig.json index 14294473ba..a382485f8e 100644 --- a/gl-matrix/tsconfig.json +++ b/gl-matrix/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/gldatepicker/tsconfig.json b/gldatepicker/tsconfig.json index b7b8bddab7..9066fad091 100644 --- a/gldatepicker/tsconfig.json +++ b/gldatepicker/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/glidejs/tsconfig.json b/glidejs/tsconfig.json index ac71b653aa..96969d09a5 100644 --- a/glidejs/tsconfig.json +++ b/glidejs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/glob-expand/tsconfig.json b/glob-expand/tsconfig.json index ed919c095c..ec9d652bb3 100644 --- a/glob-expand/tsconfig.json +++ b/glob-expand/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/glob-stream/tsconfig.json b/glob-stream/tsconfig.json index e134b568e5..f5e6289a1d 100644 --- a/glob-stream/tsconfig.json +++ b/glob-stream/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/glob/tsconfig.json b/glob/tsconfig.json index e0764339c5..dedec1a402 100644 --- a/glob/tsconfig.json +++ b/glob/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/globalize-compiler/tsconfig.json b/globalize-compiler/tsconfig.json index 99ba9c2530..99fac4d895 100644 --- a/globalize-compiler/tsconfig.json +++ b/globalize-compiler/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/globalize/tsconfig.json b/globalize/tsconfig.json index 5131824903..8bda5fdad9 100644 --- a/globalize/tsconfig.json +++ b/globalize/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gm/tsconfig.json b/gm/tsconfig.json index 915b2fd085..1a525d6d0c 100644 --- a/gm/tsconfig.json +++ b/gm/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/go/tsconfig.json b/go/tsconfig.json index cd76eca117..b4c220d790 100644 --- a/go/tsconfig.json +++ b/go/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/google-apps-script/tsconfig.json b/google-apps-script/tsconfig.json index d42e7d2acd..6ac2098e21 100644 --- a/google-apps-script/tsconfig.json +++ b/google-apps-script/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/google-closure-compiler/tsconfig.json b/google-closure-compiler/tsconfig.json index 9feb5f9bf8..80ccf11444 100644 --- a/google-closure-compiler/tsconfig.json +++ b/google-closure-compiler/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/google-drive-realtime-api/tsconfig.json b/google-drive-realtime-api/tsconfig.json index aab9688031..3541f0f1ef 100644 --- a/google-drive-realtime-api/tsconfig.json +++ b/google-drive-realtime-api/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/google-earth/tsconfig.json b/google-earth/tsconfig.json index 7f1420e7fe..1496596eb6 100644 --- a/google-earth/tsconfig.json +++ b/google-earth/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/google-libphonenumber/tsconfig.json b/google-libphonenumber/tsconfig.json index e7af478d29..2ff1e2713d 100644 --- a/google-libphonenumber/tsconfig.json +++ b/google-libphonenumber/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/google-maps/tsconfig.json b/google-maps/tsconfig.json index c523da6157..98a70abfb0 100644 --- a/google-maps/tsconfig.json +++ b/google-maps/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/google.analytics/tsconfig.json b/google.analytics/tsconfig.json index b954b6f821..debcac08fc 100644 --- a/google.analytics/tsconfig.json +++ b/google.analytics/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/google.feeds/tsconfig.json b/google.feeds/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/google.feeds/tsconfig.json +++ b/google.feeds/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/google.geolocation/tsconfig.json b/google.geolocation/tsconfig.json index 32019f7828..250bba19f9 100644 --- a/google.geolocation/tsconfig.json +++ b/google.geolocation/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/google.picker/tsconfig.json b/google.picker/tsconfig.json index 71e3335369..e32f3bf2c2 100644 --- a/google.picker/tsconfig.json +++ b/google.picker/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/google.visualization/tsconfig.json b/google.visualization/tsconfig.json index 6ee61bc43c..9747b09170 100644 --- a/google.visualization/tsconfig.json +++ b/google.visualization/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/googlemaps.infobubble/tsconfig.json b/googlemaps.infobubble/tsconfig.json index 42b03a0823..0904eec585 100644 --- a/googlemaps.infobubble/tsconfig.json +++ b/googlemaps.infobubble/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/googlemaps/tsconfig.json b/googlemaps/tsconfig.json index c858dfee0c..442301a80a 100644 --- a/googlemaps/tsconfig.json +++ b/googlemaps/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "googlemaps-tests.ts" ] -} +} \ No newline at end of file diff --git a/graceful-fs/tsconfig.json b/graceful-fs/tsconfig.json index 9c0a280533..d515b0a150 100644 --- a/graceful-fs/tsconfig.json +++ b/graceful-fs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/graham_scan/tsconfig.json b/graham_scan/tsconfig.json index c18044cd81..bc26ec09e2 100644 --- a/graham_scan/tsconfig.json +++ b/graham_scan/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/graphene-pk11/tsconfig.json b/graphene-pk11/tsconfig.json index df3b4ad0e0..6bf2174878 100644 --- a/graphene-pk11/tsconfig.json +++ b/graphene-pk11/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/graphlib/tsconfig.json b/graphlib/tsconfig.json index 6bb2bd68e4..06cf2189c6 100644 --- a/graphlib/tsconfig.json +++ b/graphlib/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/graphql-date/tsconfig.json b/graphql-date/tsconfig.json index 211b33bf22..6d39a621b9 100644 --- a/graphql-date/tsconfig.json +++ b/graphql-date/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "graphql-date-tests.ts" ] -} +} \ No newline at end of file diff --git a/graphql-relay/tsconfig.json b/graphql-relay/tsconfig.json index 4a26498184..3e6900c2c3 100644 --- a/graphql-relay/tsconfig.json +++ b/graphql-relay/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/graphql/tsconfig.json b/graphql/tsconfig.json index 074faa4e94..c6d95ebc38 100644 --- a/graphql/tsconfig.json +++ b/graphql/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/graphviz/tsconfig.json b/graphviz/tsconfig.json index bf378d1302..9b993c093c 100644 --- a/graphviz/tsconfig.json +++ b/graphviz/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gravatar/tsconfig.json b/gravatar/tsconfig.json index 68ca420384..0b7e72453d 100644 --- a/gravatar/tsconfig.json +++ b/gravatar/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/greasemonkey/tsconfig.json b/greasemonkey/tsconfig.json index a03172bb20..4aa237e2ae 100644 --- a/greasemonkey/tsconfig.json +++ b/greasemonkey/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/grecaptcha/tsconfig.json b/grecaptcha/tsconfig.json index e33355d32f..806102deaf 100644 --- a/grecaptcha/tsconfig.json +++ b/grecaptcha/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/greensock/tsconfig.json b/greensock/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/greensock/tsconfig.json +++ b/greensock/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gregorian-calendar/tsconfig.json b/gregorian-calendar/tsconfig.json index 6ab367237a..7c0be46566 100644 --- a/gregorian-calendar/tsconfig.json +++ b/gregorian-calendar/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gridfs-stream/tsconfig.json b/gridfs-stream/tsconfig.json index 4a8882064d..c985c6c2ff 100644 --- a/gridfs-stream/tsconfig.json +++ b/gridfs-stream/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gridstack/tsconfig.json b/gridstack/tsconfig.json index 544a5ee000..428ea32f48 100644 --- a/gridstack/tsconfig.json +++ b/gridstack/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/grunt/grunt-tests.ts b/grunt/grunt-tests.ts index 980cbd6997..5dd6550582 100644 --- a/grunt/grunt-tests.ts +++ b/grunt/grunt-tests.ts @@ -9,6 +9,7 @@ interface MyTaskData { interface MyOptions { sourceRoot: string; + repeat: number; } // exports should work same as module.exports @@ -35,8 +36,8 @@ exports = (grunt: IGrunt) => { grunt.registerTask('default', ['uglify']); grunt.registerMultiTask('mytask', "short description", function() { - var currenttask: grunt.task.IMultiTask = this; - var options = currenttask.options({ + var currenttask = this; + var options = currenttask.options({ sourceRoot: "default" }); var valid = false; diff --git a/grunt/index.d.ts b/grunt/index.d.ts index 03ee4c48aa..4c8198dee9 100644 --- a/grunt/index.d.ts +++ b/grunt/index.d.ts @@ -25,11 +25,11 @@ declare namespace node { * {@link http://npmjs.org/doc/json.html} */ interface NodePackage { - name: string - version: string - description?: string - keywords?: string[] - homepage?: string + name: string; + version: string; + description?: string; + keywords?: string[]; + homepage?: string; } } @@ -53,61 +53,61 @@ declare namespace minimatch { /** * Dump a ton of stuff to stderr. */ - debug?: boolean + debug?: boolean; /** * Do not expand {a,b} and {1..3} brace sets. */ - nobrace?: boolean + nobrace?: boolean; /** * Disable ** matching against multiple folder names. */ - noglobstar?: boolean + noglobstar?: boolean; /** * Allow patterns to match filenames starting with a period, * even if the pattern does not explicitly have a period in that spot. */ // Note that by default, a/**\/b will not match a/.d/b, unless dot is set. - dot?: boolean + dot?: boolean; /** * Disable "extglob" style patterns like +(a|b). */ - noext?: boolean + noext?: boolean; /** * Perform a case-insensitive match. */ - nocase?: boolean + nocase?: boolean; /** * When a match is not found by minimatch.match, return a list containing the pattern itself. * When set, an empty list is returned if there are no matches. */ - nonull?: boolean + nonull?: boolean; /** * If set, then patterns without slashes will be matched against the basename of the path if it contains slashes. * For example, a?b would match the path /xyz/123/acb, but not /xyz/acb/123. */ - matchBase?: boolean + matchBase?: boolean; /** * Suppress the behavior of treating # at the start of a pattern as a comment. */ - nocomment?: boolean + nocomment?: boolean; /** * Suppress the behavior of treating a leading ! character as negation. */ - nonegate?: boolean + nonegate?: boolean; /** * Returns from negate expressions the same as if they were not negated. (Ie, true on a hit, false on a miss.) */ - flipNegate?: boolean + flipNegate?: boolean; } } @@ -135,15 +135,15 @@ declare namespace grunt { * if two arguments are passed, grunt.config.set is called, * otherwise grunt.config.get is called. */ - (prop: string, value: any): any - (prop: string): any + (prop: string, value: any): any; + (prop: string): any; /** * Initialize a configuration object for the current project. * The specified configObject is used by tasks and can be accessed using the grunt.config method. * Nearly every project's Gruntfile will call this method. */ - init(config: IProjectConfig): void + init(config: IProjectConfig): void; /** * Get a value from the project's Grunt configuration. @@ -153,8 +153,8 @@ declare namespace grunt { * * @note Although this accepts a generic type, you may still get the wrong typed value. */ - get(prop: string): T - get(): ConfigModule + get(prop: string): T; + get(): ConfigModule; /** * Process a value, recursively expanding <% %> templates (via the grunt.template.process method) @@ -166,32 +166,32 @@ declare namespace grunt { * it will be expanded to the actual value. That, combined with grunt's task system automatically * flattening arrays, can be extremely useful. */ - process(value: string): T + process(value: string): T; /** * Get a raw value from the project's Grunt configuration, without processing <% %> template strings. * If prop is specified, that property's value is returned, or null if that property is not defined. * If prop isn't specified, a copy of the entire config object is returned. */ - getRaw(prop: string): T + getRaw(prop: string): T; /** * Set a value into the project's Grunt configuration. * @note any specified <% %> template strings will only be processed when config data is retrieved. */ - set(prop: string, value: T): T + set(prop: string, value: T): T; /** * Escape '.' dots in the given propString. This should be used for property names that contain dots. */ - escape(propString: string): string + escape(propString: string): string; /** * Fail the current task if one or more required config properties is missing, null or undefined. * One or more string or array config properties may be specified. */ - requires(prop: string, ...andProps: string[]): void - requires(prop: string[], ...andProps: string[][]): void + requires(prop: string, ...andProps: string[]): void; + requires(prop: string[], ...andProps: string[][]): void; /** * Recursively merges properties of the specified configObject into the current project configuration. @@ -210,42 +210,42 @@ declare namespace grunt { /** * Adds a listener to the end of the listeners array for the specified event. */ - addListener(event: string, listener: Function): EventModule - on(event: string, listener: Function): EventModule + addListener(event: string, listener: Function): EventModule; + on(event: string, listener: Function): EventModule; /** * Adds a listener that will be fired when any event is emitted. */ - onAny(listener: Function): EventModule + onAny(listener: Function): EventModule; /** * Removes the listener that will be fired when any event is emitted. */ - offAny(listener: Function): EventModule + offAny(listener: Function): EventModule; /** * Adds a one time listener for the event. * The listener is invoked only the first time the event is fired, after which it is removed. */ - once(event: string, listener: Function): EventModule + once(event: string, listener: Function): EventModule; /** * Adds a listener that will execute n times for the event before being removed. * The listener is invoked only the first time the event is fired, after which it is removed. */ - many(event: string, timesToListen: number, listener: Function): EventModule + many(event: string, timesToListen: number, listener: Function): EventModule; /** * Remove a listener from the listener array for the specified event. * Caution: changes array indices in the listener array behind the listener. */ - removeListener(event: string, listener: Function): EventModule - off(event: string, listener: Function): EventModule + removeListener(event: string, listener: Function): EventModule; + off(event: string, listener: Function): EventModule; /** * Removes all listeners, or those of the specified event. */ - removeAllListeners(event: string): EventModule + removeAllListeners(event: string): EventModule; /** * By default EventEmitters will print a warning if more than 10 listeners are added to it. @@ -254,25 +254,25 @@ declare namespace grunt { * * Set to zero for unlimited. */ - setMaxListener(n: number): void + setMaxListener(n: number): void; /** * Returns an array of listeners for the specified event. * This array can be manipulated, e.g. to remove listeners. */ - listeners(event: string): Function[] + listeners(event: string): Function[]; /** * Returns an array of listeners that are listening for any event that is specified. * This array can be manipulated, e.g. to remove listeners. */ - listenersAny(): Function[] + listenersAny(): Function[]; /** * Execute each of the listeners that may be listening for the specified event name * in order with the list of arguments. */ - emit(event: string, ...args: any[]): any + emit(event: string, ...args: any[]): any; } } @@ -294,14 +294,14 @@ declare namespace grunt { * Display a warning and abort Grunt immediately. * Grunt will continue processing tasks if the --force command-line option was specified. */ - warn(error: string, errorCode?: ErrorCode): void - warn(error: Error, errorCode?: ErrorCode): void + warn(error: string, errorCode?: ErrorCode): void; + warn(error: Error, errorCode?: ErrorCode): void; /** * Display a warning and abort Grunt immediately. */ - fatal(error: string, errorCode?: ErrorCode): void - fatal(error: Error, errorCode?: ErrorCode): void + fatal(error: string, errorCode?: ErrorCode): void; + fatal(error: Error, errorCode?: ErrorCode): void; } } @@ -311,7 +311,7 @@ declare namespace grunt { * {@link http://gruntjs.com/api/grunt.file#grunt.file.defaultencoding} */ interface IFileEncodedOption { - encoding: string + encoding: string; } /** @@ -329,7 +329,7 @@ declare namespace grunt { */ // noProcess?: string[] // noProcess?: boolean - noProcess?: any + noProcess?: any; } /** @@ -341,7 +341,7 @@ declare namespace grunt { * whose return value will be used as the destination file's contents. If * this function returns `false`, the file copy will be aborted. */ - process?: (buffer: Buffer) => boolean + process?: (buffer: Buffer) => boolean; } /** @@ -353,7 +353,7 @@ declare namespace grunt { * whose return value will be used as the destination file's contents. If * this function returns `false`, the file copy will be aborted. */ - process?: (file: string) => boolean + process?: (file: string) => boolean; } /** @@ -368,28 +368,28 @@ declare namespace grunt { * If you do have to change this value, it's recommended that you change * it as early as possible inside your Gruntfile. */ - defaultEncoding: string + defaultEncoding: string; /** * Read and return a file's contents. * Returns a string, unless options.encoding is null in which case it returns a Buffer. */ - read(filepath: string): string - read(filepath: string, options: IFileEncodedOption): Buffer + read(filepath: string): string; + read(filepath: string, options: IFileEncodedOption): Buffer; /** * Read a file's contents, parsing the data as JSON and returning the result. * @see FileModule.read for a list of supported options. */ - readJSON(filepath: string): any - readJSON(filepath: string, options: IFileEncodedOption): Buffer + readJSON(filepath: string): any; + readJSON(filepath: string, options: IFileEncodedOption): Buffer; /** * Read a file's contents, parsing the data as YAML and returning the result. * @see FileModule.read for a list of supported options. */ - readYAML(filepath: string): any - readYAML(filepath: string, options: IFileEncodedOption): Buffer + readYAML(filepath: string): any; + readYAML(filepath: string, options: IFileEncodedOption): Buffer; /** * Write the specified contents to a file, creating intermediate directories if necessary. @@ -398,28 +398,28 @@ declare namespace grunt { * @param contents If `contents` is a Buffer, encoding is ignored. * @param options If an encoding is not specified, default to grunt.file.defaultEncoding. */ - write(filepath: string, contents: string, options?: IFileEncodedOption): void - write(filepath: string, contents: Buffer): void + write(filepath: string, contents: string, options?: IFileEncodedOption): void; + write(filepath: string, contents: Buffer): void; /** * Copy a source file to a destination path, creating intermediate directories if necessary. */ - copy(srcpath: string, destpath: string): void - copy(srcpath: string, destpath: string, options: IFileWriteStringOption): void - copy(srcpath: string, destpath: string, options: IFileWriteBufferOption): void + copy(srcpath: string, destpath: string): void; + copy(srcpath: string, destpath: string, options: IFileWriteStringOption): void; + copy(srcpath: string, destpath: string, options: IFileWriteBufferOption): void; /** * Delete the specified filepath. Will delete files and folders recursively. * * @return true if the files could be deleted, otherwise false. */ - delete(filepath: string, options?: { force?: boolean }): boolean + delete(filepath: string, options?: { force?: boolean }): boolean; /** * Works like mkdir -p. Create a directory along with any intermediate directories. * If mode isn't specified, it defaults to 0777 & (~process.umask()). */ - mkdir(dirpath: string, mode?: string): void + mkdir(dirpath: string, mode?: string): void; /** * Recurse into a directory, executing callback for each file. @@ -434,7 +434,7 @@ declare namespace grunt { recurse( rootdir: string, callback: (abspath: string, rootdir: string, subdir: string, filename: string) => void - ): void + ): void; /** * Return a unique array of all file or directory paths that match the given globbing pattern(s). @@ -445,8 +445,8 @@ declare namespace grunt { * File paths are relative to the Gruntfile unless the current working directory is changed with * grunt.file.setBase or the --base command-line option. */ - expand(patterns: string[]): string[] - expand(options: IFilesConfig, patterns: string[]): string[] + expand(patterns: string[]): string[]; + expand(options: IFilesConfig, patterns: string[]): string[]; /** * Returns an array of src-dest file mapping objects. @@ -456,7 +456,7 @@ declare namespace grunt { * @see FileModule.expand method documentation for an explanation of how the patterns * and options arguments may be specified. */ - expandMapping(patterns: string[], dest: string, options: IExpandedFilesConfig): Array + expandMapping(patterns: string[], dest: string, options: IExpandedFilesConfig): Array; /** * Match one or more globbing patterns against one or more file paths. @@ -465,14 +465,14 @@ declare namespace grunt { * Paths matching patterns that begin with ! will be excluded from the returned array. * Patterns are processed in order, so inclusion and exclusion order is significant. */ - match(pattern: string, filepath: string): string[] - match(pattern: string, filepaths: string[]): string[] - match(patterns: string[], filepath: string): string[] - match(patterns: string[], filepaths: string[]): string[] - match(options: minimatch.IMinimatchOptions, pattern: string, filepath: string): string[] - match(options: minimatch.IMinimatchOptions, pattern: string, filepaths: string[]): string[] - match(options: minimatch.IMinimatchOptions, patterns: string[], filepath: string): string[] - match(options: minimatch.IMinimatchOptions, patterns: string[], filepaths: string[]): string[] + match(pattern: string, filepath: string): string[]; + match(pattern: string, filepaths: string[]): string[]; + match(patterns: string[], filepath: string): string[]; + match(patterns: string[], filepaths: string[]): string[]; + match(options: minimatch.IMinimatchOptions, pattern: string, filepath: string): string[]; + match(options: minimatch.IMinimatchOptions, pattern: string, filepaths: string[]): string[]; + match(options: minimatch.IMinimatchOptions, patterns: string[], filepath: string): string[]; + match(options: minimatch.IMinimatchOptions, patterns: string[], filepaths: string[]): string[]; /** * This method contains the same signature and logic as the grunt.file.match method, @@ -480,14 +480,14 @@ declare namespace grunt { * * @see FileModule.match */ - isMatch(pattern: string, filepath: string): boolean - isMatch(pattern: string, filepaths: string[]): boolean - isMatch(patterns: string[], filepath: string): boolean - isMatch(patterns: string[], filepaths: string[]): boolean - isMatch(options: minimatch.IMinimatchOptions, pattern: string, filepath: string): boolean - isMatch(options: minimatch.IMinimatchOptions, pattern: string, filepaths: string[]): boolean - isMatch(options: minimatch.IMinimatchOptions, patterns: string[], filepath: string): boolean - isMatch(options: minimatch.IMinimatchOptions, patterns: string[], filepaths: string[]): boolean + isMatch(pattern: string, filepath: string): boolean; + isMatch(pattern: string, filepaths: string[]): boolean; + isMatch(patterns: string[], filepath: string): boolean; + isMatch(patterns: string[], filepaths: string[]): boolean; + isMatch(options: minimatch.IMinimatchOptions, pattern: string, filepath: string): boolean; + isMatch(options: minimatch.IMinimatchOptions, pattern: string, filepaths: string[]): boolean; + isMatch(options: minimatch.IMinimatchOptions, patterns: string[], filepath: string): boolean; + isMatch(options: minimatch.IMinimatchOptions, patterns: string[], filepaths: string[]): boolean; /* @@ -498,55 +498,55 @@ declare namespace grunt { /** * Does the given path exist? */ - exists(path: string, ...append: string[]): boolean + exists(path: string, ...append: string[]): boolean; /** * Is the given path a symbolic link? */ - isLink(path: string, ...append: string[]): boolean + isLink(path: string, ...append: string[]): boolean; /** * Is the given path a symbolic link? */ - isDir(path: string, ...append: string[]): boolean + isDir(path: string, ...append: string[]): boolean; /** * Is the given path a file? */ - isFile(path: string, ...append: string[]): boolean + isFile(path: string, ...append: string[]): boolean; /** * Is a given file path absolute? */ - isPathAbsolute(path: string, ...append: string[]): boolean + isPathAbsolute(path: string, ...append: string[]): boolean; /** * Do all the specified paths refer to the same path? */ - arePathsEquivalent(path: string, ...append: string[]): boolean + arePathsEquivalent(path: string, ...append: string[]): boolean; /** * Are all descendant path(s) contained within the specified ancestor path? */ - doesPathContain(ancestorPath: string, decendantPaths: string[]): boolean + doesPathContain(ancestorPath: string, decendantPaths: string[]): boolean; /** * Is a given file path the current working directory (CWD)? */ - isPathCwd(path: string, ...append: string[]): boolean + isPathCwd(path: string, ...append: string[]): boolean; /** * Change grunt's current working directory (CWD). * By default, all file paths are relative to the Gruntfile. * This works just like the --base command-line option. */ - setBase(path: string, ...append: string[]): void + setBase(path: string, ...append: string[]): void; // External libraries // TODO: Create declarations - glob: any - minimatch: any - findup: any + glob: any; + minimatch: any; + findup: any; } /** @@ -564,18 +564,18 @@ declare namespace grunt { /** * Pattern(s) to match, relative to the {@link IExpandedFilesConfig.cwd}. */ - src?: string[] + src?: string[]; /** * Destination path prefix. */ - dest?: string + dest?: string; /** * Process a dynamic src-dest file mapping, * @see {@link http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically for more information. */ - expand?: boolean // = false + expand?: boolean; // = false /** * Either a valid fs.Stats method name: @@ -594,7 +594,7 @@ declare namespace grunt { */ // filter?: string // filter?: (src: string) => boolean - filter?: any + filter?: any; } /** @@ -605,22 +605,22 @@ declare namespace grunt { /** * Enables the following options */ - expand?: boolean // = true + expand?: boolean; // = true /** * All {@link IExpandedFilesConfig.src} matches are relative to (but don't include) this path. */ - cwd?: string + cwd?: string; /** * Replace any existing extension with this value in generated {@link IExpandedFilesConfig.dest} paths. */ - ext?: string + ext?: string; /** * Remove all path parts from generated {@link IExpandedFilesConfig.dest} paths. */ - flatten?: boolean + flatten?: boolean; /** * This function is called for each matched src file, (after extension renaming and flattening). @@ -628,7 +628,7 @@ declare namespace grunt { * and this function must return a new dest value. * If the same dest is returned more than once, each src which used it will be added to an array of sources for it. */ - rename?: Function + rename?: Function; } /** @@ -638,11 +638,11 @@ declare namespace grunt { /** * source filenames. */ - src: string[] + src: string[]; /** * destination filename. */ - dest: string + dest: string; } } @@ -658,48 +658,48 @@ declare namespace grunt { /** * Log the specified msg string, with no trailing newline. */ - write(msg: string): T + write(msg: string): T; /** * Log the specified msg string, with trailing newline. */ - writeln(msg: string): T + writeln(msg: string): T; /** * If msg string is omitted, logs ERROR in red, * otherwise logs >> msg, with trailing newline. */ - error(msg: string): T + error(msg: string): T; /** * Log an error with grunt.log.error, wrapping text to 80 columns using grunt.log.wraptext. */ - errorlns(msg: string): T + errorlns(msg: string): T; /** * If msg string is omitted, logs OK in green, otherwise logs >> msg, with trailing newline. */ - ok(msg: string): T + ok(msg: string): T; /** * Log an ok message with grunt.log.ok, wrapping text to 80 columns using grunt.log.wraptext. */ - oklns(msg: string): T + oklns(msg: string): T; /** * Log the specified msg string in bold, with trailing newline. */ - subhead(msg: string): T + subhead(msg: string): T; /** * Log a list of obj properties (good for debugging flags). */ - writeflags(obj: any): T + writeflags(obj: any): T; /** * Log an warning with grunt.log.warn */ - warn(msg: string): T + warn(msg: string): T; } /** @@ -707,7 +707,7 @@ declare namespace grunt { * but only log if the --verbose command-line option was specified. */ interface VerboseLogModule extends CommonLogging { - or: NotVerboseLogModule + or: NotVerboseLogModule; } /** @@ -715,15 +715,15 @@ declare namespace grunt { * but only log if the --verbose command-line option was not specified. */ interface NotVerboseLogModule extends CommonLogging { - or: VerboseLogModule + or: VerboseLogModule; } /** * {@link http://gruntjs.com/api/grunt.log} */ interface LogModule extends CommonLogging { - verbose: VerboseLogModule - notverbose: NotVerboseLogModule + verbose: VerboseLogModule; + notverbose: NotVerboseLogModule; } } @@ -742,20 +742,20 @@ declare namespace grunt { * var isDev = grunt.option('no-staging'); * assert(isDev === true) */ - (key: string, value: T): void - (key: string): T + (key: string, value: T): void; + (key: string): T; /** * Initialize grunt.option. * If initObject is omitted option will be initialized to an empty object * otherwise will be set to initObject. */ - init(initObject?: any): void + init(initObject?: any): void; /** * Returns the options as an array of command line parameters. */ - flags: grunt.IFlag[] + flags: grunt.IFlag[]; } } @@ -772,8 +772,8 @@ declare namespace grunt { * Whenever this "alias task" is run, every specified task in taskList will be run, in the order specified. * The taskList argument must be an array of tasks. */ - registerTask(taskName: string, taskList: string[]): void - registerTask(taskName: string, description: string, taskList: string[]): void + registerTask(taskName: string, taskList: string[]): void; + registerTask(taskName: string, description: string, taskList: string[]): void; /** * If a description and taskFunction are passed, the specified function will be executed @@ -785,8 +785,8 @@ declare namespace grunt { * * @note taskFunction.apply(scope: grunt.task.ITask, args: any[]) */ - registerTask(taskName: string, taskFunction: Function): void - registerTask(taskName: string, description: string, taskFunction: Function): void + registerTask(taskName: string, taskFunction: (this: ITask, ...args: any[]) => void): void; + registerTask(taskName: string, description: string, taskFunction: (this: ITask, ...args: any[]) => void): void; /** * Register a "multi task." A multi task is a task that implicitly iterates over all of its @@ -796,8 +796,8 @@ declare namespace grunt { * * @note taskFunction.apply(scope: grunt.task.IMultiTask, args: any[]) */ - registerMultiTask(taskName: string, taskFunction: Function): void - registerMultiTask(taskName: string, taskDescription: string, taskFunction: Function): void + registerMultiTask(taskName: string, taskFunction: (this: IMultiTask, ...args: any[]) => void): void; + registerMultiTask(taskName: string, taskDescription: string, taskFunction: (this: IMultiTask, ...args: any[]) => void): void; /** * Check with the name, if a task exists in the registered tasks. @@ -813,7 +813,7 @@ declare namespace grunt { * @param oldname The previous name of the task. * @param newname The new name for the task. */ - renameTask(oldname: string, newname: string): void + renameTask(oldname: string, newname: string): void; } /** @@ -825,25 +825,25 @@ declare namespace grunt { * Every specified task in taskList will be run immediately after the current task completes, * in the order specified. The task list can be an array of tasks or individual task arguments. */ - run(tasks: string[]): void - run(task: string, ...thenTasks: string[]): void + run(tasks: string[]): void; + run(task: string, ...thenTasks: string[]): void; /** * Empty the task queue completely. Unless additional tasks are enqueued, no more tasks will be run. */ - clearQueue(): void + clearQueue(): void; /** * Normalizes a task target configuration object into an array of src-dest file mappings. * This method is used internally by the multi task system this.files / grunt.task.current.files property. */ - normalizeMultiTaskFiles(data: grunt.config.IProjectConfig, targetname?: string): Array + normalizeMultiTaskFiles(data: grunt.config.IProjectConfig, targetname?: string): Array; /** * The currently running task or multitask. * @see http://gruntjs.com/api/inside-tasks */ - current: grunt.task.IMultiTask + current: grunt.task.IMultiTask; } interface AsyncResultCatcher { @@ -878,7 +878,7 @@ declare namespace grunt { * done(success); * }, 1000); */ - async(): AsyncResultCatcher + async(): AsyncResultCatcher; /** * If one task depends on the successful completion of another task (or tasks), @@ -898,41 +898,41 @@ declare namespace grunt { * One or more string or array config properties may be specified. * this.requiresConfig(prop [, prop [, ...]]) */ - requiresConfig(prop: string, ...andProps: string[]): void + requiresConfig(prop: string, ...andProps: string[]): void; /** * The name of the task, as defined in grunt.registerTask. * For example, if a "sample" task was run as grunt sample or grunt sample:foo, * inside the task function, this.name would be "sample". */ - name: string + name: string; /** * The name of the task, including any colon-separated arguments or flags specified on the command-line. * For example, if a "sample" task was run as grunt sample:foo, * inside the task function, this.nameArgs would be "sample:foo". */ - nameArgs: string + nameArgs: string; /** * An array of arguments passed to the task. * For example, if a "sample" task was run as grunt sample:foo:bar, * inside the task function, this.args would be ["foo", "bar"]. */ - args: string[] + args: string[]; /** * An object generated from the arguments passed to the task. * For example, if a "sample" task was run as grunt sample:foo:bar, * inside the task function, this.flags would be {foo: true, bar: true}. */ - flags: grunt.IFlag[] + flags: grunt.IFlag[]; /** * The number of grunt.log.error calls that occurred during this task. * This can be used to fail a task if errors were logged during the task. */ - errorCount: number + errorCount: number; /** * Returns an options object. @@ -940,8 +940,8 @@ declare namespace grunt { * object properties, which will be further overridden in multi tasks by any target-level * options object properties. */ - options(defaultsObj: any): ITaskOptions - options(defaultsObj: T): T + options(defaultsObj: T): T; + options(defaultsObj: any): ITaskOptions; } /** @@ -953,7 +953,7 @@ declare namespace grunt { * For example, if a "sample" multi task was run as grunt sample:foo with the config data * {sample: {foo: "bar"}}, inside the task function, this.target would be "foo". */ - target: string + target: string; /** * In a multi task, all files specified using any Grunt-supported file formats and options, @@ -973,14 +973,14 @@ declare namespace grunt { * @note it's possible that nonexistent files might be included in src values, * so you may want to explicitly test that source files exist before using them. */ - files: grunt.file.IFilesArray + files: grunt.file.IFilesArray; /** * In a multi task, all src files files specified via any file format are reduced to a single array. * If your task is "read only" and doesn't care about destination filepaths, * use this array instead of this.files. */ - filesSrc: string[] + filesSrc: string[]; /** * In a multi task, this is the actual data stored in the Grunt config object for the given target. @@ -990,7 +990,7 @@ declare namespace grunt { * @note It is recommended that this.options this.files and this.filesSrc are used instead of this.data, * as their values are normalized. */ - data: T + data: T; } /** @@ -1001,11 +1001,11 @@ declare namespace grunt { */ interface ITaskOptions { - options?: any + options?: any; // files?: grunt.file.IFilesArray // files?: grunt.file.IFilesMap - files?: any + files?: any; } /** @@ -1032,8 +1032,8 @@ declare namespace grunt { * * @note if the data object already has a grunt property, the grunt API will not be accessible in templates. */ - process(template: string): (options: any) => string - process(template: string, options: any): string + process(template: string): (options: any) => string; + process(template: string, options: any): string; /** * Set the Lo-Dash template delimiters to a predefined set in case you grunt.util._.template @@ -1041,7 +1041,7 @@ declare namespace grunt { * * The config delimiters <% %> are included by default. */ - setDelimiters(name: string): void + setDelimiters(name: string): void; /** * Add a named set of Lo-Dash template delimiters. @@ -1049,7 +1049,7 @@ declare namespace grunt { * You probably won't need to use this method, because the built-in delimiters should be sufficient, * but you could always add {% %} or [% %] style delimiters. */ - addDelimiters(name: string, opener: string, closer: string): void + addDelimiters(name: string, opener: string, closer: string): void; /** * Format a date using the dateformat library. @@ -1057,9 +1057,9 @@ declare namespace grunt { * * @note if you don't include the mask argument, dateFormat.masks.default is used */ - date(date?: Date, format?: string): string - date(date?: number, format?: string): string - date(date?: string, format?: string): string + date(date?: Date, format?: string): string; + date(date?: number, format?: string): string; + date(date?: string, format?: string): string; /** * Format today's date using the dateformat library using the current date and time. @@ -1067,7 +1067,7 @@ declare namespace grunt { * * @note if you don't include the mask argument, dateFormat.masks.default is used */ - today(format?: string): string + today(format?: string): string; } } @@ -1083,7 +1083,7 @@ declare namespace grunt { * Possible results are "number", "string", "boolean", "function", "regexp", "array", "date", * "error", "null", "undefined" and the catch-all "object". */ - kindOf(value: any): string + kindOf(value: any): string; /** * Return a new Error instance (that can be thrown) with the appropriate message. @@ -1091,38 +1091,38 @@ declare namespace grunt { * Also, if an Error object is specified for origError and Grunt was run with the --debug 9 option, * the original Error stack will be dumped. */ - error(message: string, origError?: Error): Error - error(error: Error, origError?: Error): Error - error(error: any, origError?: Error): Error + error(message: string, origError?: Error): Error; + error(error: Error, origError?: Error): Error; + error(error: any, origError?: Error): Error; /** * The linefeed character, normalized for the current operating system. * (\r\n on Windows, \n otherwise) */ - linefeed: string + linefeed: string; /** * Given a string, return a new string with all the linefeeds normalized for the current operating system. * (\r\n on Windows, \n otherwise) */ - normalizelf(str: string): string + normalizelf(str: string): string; /** * Recurse through nested objects and arrays, executing callbackFunction for each non-object value. * If continueFunction returns false, a given object or value will be skipped. */ - recurse(object: any, callbackFunction: (value: any) => void, continueFunction: (objOrValue: any) => boolean): void + recurse(object: any, callbackFunction: (value: any) => void, continueFunction: (objOrValue: any) => boolean): void; /** * Return string str repeated n times. */ - repeat(n: number, str: string): string + repeat(n: number, str: string): string; /** * Given str of "a/b", If n is 1, return "a" otherwise "b". * You can specify a custom separator if '/' doesn't work for you. */ - pluralize(n: number, str: string, separator?: string): string + pluralize(n: number, str: string, separator?: string): string; /** * Spawn a child process, keeping track of its stdout, stderr and exit code. @@ -1135,13 +1135,13 @@ declare namespace grunt { * result - The result object is an * code - The numeric exit code. */ - spawn(options: ISpawnOptions, done: (error: Error, result: ISpawnResult, code: number) => void): ISpawnedChild + spawn(options: ISpawnOptions, done: (error: Error, result: ISpawnResult, code: number) => void): ISpawnedChild; /** * Given an array or array-like object, return an array. * Great for converting arguments objects into arrays. */ - toArray(arrayLikeObject: any): T[] + toArray(arrayLikeObject: any): T[]; /** * Normalizes both "returns a value" and "passes result to a callback" functions to always @@ -1151,15 +1151,15 @@ declare namespace grunt { * it will continue to do so. */ callbackify(syncOrAsyncFunction: () => R): - (callback: (result: R) => void) => void + (callback: (result: R) => void) => void; callbackify(syncOrAsyncFunction: (a: A) => R): - (a: A, callback: (result: R) => void) => void + (a: A, callback: (result: R) => void) => void; callbackify(syncOrAsyncFunction: (a: A, b: B) => R): - (a: A, b: B, callback: (result: R) => void) => void + (a: A, b: B, callback: (result: R) => void) => void; callbackify(syncOrAsyncFunction: (a: A, b: B, c: C) => R): - (a: A, b: B, c: C, callback: (result: R) => void) => void + (a: A, b: B, c: C, callback: (result: R) => void) => void; callbackify(syncOrAsyncFunction: (a: A, b: B, c: C, d: D) => R): - (a: A, b: B, c: C, d: D, callback: (result: R) => void) => void + (a: A, b: B, c: C, d: D, callback: (result: R) => void) => void; // Internal libraries namespace: any @@ -1174,36 +1174,36 @@ declare namespace grunt { /** * The command to execute. It should be in the system path. */ - cmd?: string + cmd?: string; /** * If specified, the same grunt bin that is currently running will be * spawned as the child command, instead of the "cmd" option. * Defaults to false. */ - grunt?: boolean + grunt?: boolean; /** * An array of arguments to pass to the command. */ - args?: string[] + args?: string[]; /** * Additional options for the Node.js child_process spawn method. */ opts?: { - cwd?: string - stdio?: any - custom?: any - env?: any - detached?: boolean + cwd?: string; + stdio?: any; + custom?: any; + env?: any; + detached?: boolean; } /** * If this value is set and an error occurs, it will be used as the value * and null will be passed as the error value. */ - fallback?: any + fallback?: any; } /** @@ -1213,9 +1213,9 @@ declare namespace grunt { * not specified. */ interface ISpawnResult { - stdout: string - stderr: string - code: number + stdout: string; + stderr: string; + code: number; } /** @@ -1225,24 +1225,24 @@ declare namespace grunt { /** * Start the cmd with the options provided. */ - start(): void + start(): void; /** * Convenience function. Overrides options. restarts to 0. * Runs command exactly once no matter the options passed into the constructor. */ - once(): void + once(): void; /** * Convenience function. Overrides options.restarts to -1. * Runs command indefinitely no matter the options passed into the constructor. */ - forever(): void + forever(): void; /** * Shut down the child and don't let it restart. */ - kill(): void + kill(): void; } } @@ -1251,7 +1251,7 @@ declare namespace grunt { */ interface IFlag { - [flag: string]: boolean + [flag: string]: boolean; } /* @@ -1263,7 +1263,7 @@ declare namespace grunt { * An alias * @see grunt.config.ConfigModule.init */ - initConfig(config: grunt.config.IProjectConfig): void + initConfig(config: grunt.config.IProjectConfig): void; } interface ITaskComponents extends grunt.task.CommonTaskModule { @@ -1272,14 +1272,14 @@ declare namespace grunt { * This method can be used to load task-related files from a local Grunt plugin by * specifying the path to that plugin's "tasks" subdirectory. */ - loadTasks(tasksPath: string): void + loadTasks(tasksPath: string): void; /** * Load tasks from the specified Grunt plugin. * This plugin must be installed locally via npm, and must be relative to the Gruntfile. * Grunt plugins can be created by using the grunt-init gruntplugin template: grunt init:gruntplugin. */ - loadNpmTasks(pluginName: string): void + loadNpmTasks(pluginName: string): void; } } @@ -1293,28 +1293,28 @@ declare namespace grunt { */ interface IGrunt extends grunt.IConfigComponents, grunt.fail.FailModule, grunt.ITaskComponents { - config: grunt.config.ConfigModule + config: grunt.config.ConfigModule; - event: grunt.event.EventModule + event: grunt.event.EventModule; - fail: grunt.fail.FailModule + fail: grunt.fail.FailModule; - file: grunt.file.FileModule + file: grunt.file.FileModule; - log: grunt.log.LogModule + log: grunt.log.LogModule; - option: grunt.option.OptionModule + option: grunt.option.OptionModule; - task: grunt.task.TaskModule + task: grunt.task.TaskModule; - template: grunt.template.TemplateModule + template: grunt.template.TemplateModule; - util: grunt.util.UtilModule + util: grunt.util.UtilModule; /** * The current Grunt package.json metadata, as an object. */ - package: node.NodePackage + package: node.NodePackage; /** * The current Grunt version, as a string. This is just a shortcut to the grunt.package.version property. diff --git a/grunt/tsconfig.json b/grunt/tsconfig.json index ca11c8f477..c7a688e9b8 100644 --- a/grunt/tsconfig.json +++ b/grunt/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/gsap/tsconfig.json b/gsap/tsconfig.json index 795f528b6c..3fa7eecc03 100644 --- a/gsap/tsconfig.json +++ b/gsap/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-angular-templatecache/tsconfig.json b/gulp-angular-templatecache/tsconfig.json index 3bd2dc70e3..eda0469b48 100644 --- a/gulp-angular-templatecache/tsconfig.json +++ b/gulp-angular-templatecache/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-autoprefixer/tsconfig.json b/gulp-autoprefixer/tsconfig.json index 19328f4d2b..955f890f2b 100644 --- a/gulp-autoprefixer/tsconfig.json +++ b/gulp-autoprefixer/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-babel/tsconfig.json b/gulp-babel/tsconfig.json index 88b9b5a7de..66c958ba30 100644 --- a/gulp-babel/tsconfig.json +++ b/gulp-babel/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-cache/tsconfig.json b/gulp-cache/tsconfig.json index 656815d5f2..3126e1ef38 100644 --- a/gulp-cache/tsconfig.json +++ b/gulp-cache/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/gulp-cached/tsconfig.json b/gulp-cached/tsconfig.json index ec498013ca..32f3759409 100644 --- a/gulp-cached/tsconfig.json +++ b/gulp-cached/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-changed/tsconfig.json b/gulp-changed/tsconfig.json index 4db34c9923..4185d001ef 100644 --- a/gulp-changed/tsconfig.json +++ b/gulp-changed/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-cheerio/tsconfig.json b/gulp-cheerio/tsconfig.json index f923b98c6e..254698a94e 100644 --- a/gulp-cheerio/tsconfig.json +++ b/gulp-cheerio/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/gulp-coffeeify/tsconfig.json b/gulp-coffeeify/tsconfig.json index 422ff78a08..54406ca98a 100644 --- a/gulp-coffeeify/tsconfig.json +++ b/gulp-coffeeify/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-coffeelint/tsconfig.json b/gulp-coffeelint/tsconfig.json index 58ed9c6480..2cc883884b 100644 --- a/gulp-coffeelint/tsconfig.json +++ b/gulp-coffeelint/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/gulp-concat/tsconfig.json b/gulp-concat/tsconfig.json index 807f41c7a5..1f4acfd285 100644 --- a/gulp-concat/tsconfig.json +++ b/gulp-concat/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-copy/tsconfig.json b/gulp-copy/tsconfig.json index 83cebe7c02..cc4c620b9f 100644 --- a/gulp-copy/tsconfig.json +++ b/gulp-copy/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/gulp-csso/tsconfig.json b/gulp-csso/tsconfig.json index 6575a1460c..706fd106af 100644 --- a/gulp-csso/tsconfig.json +++ b/gulp-csso/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-debug/tsconfig.json b/gulp-debug/tsconfig.json index bd3e8691d1..accf822a92 100644 --- a/gulp-debug/tsconfig.json +++ b/gulp-debug/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-dtsm/tsconfig.json b/gulp-dtsm/tsconfig.json index b3438db319..6003ac335b 100644 --- a/gulp-dtsm/tsconfig.json +++ b/gulp-dtsm/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-espower/tsconfig.json b/gulp-espower/tsconfig.json index 94a1fe9f27..1140a956aa 100644 --- a/gulp-espower/tsconfig.json +++ b/gulp-espower/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-file-include/tsconfig.json b/gulp-file-include/tsconfig.json index 844431741f..d166690ec5 100644 --- a/gulp-file-include/tsconfig.json +++ b/gulp-file-include/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/gulp-filter/tsconfig.json b/gulp-filter/tsconfig.json index 2de729f2c4..f217497fa9 100644 --- a/gulp-filter/tsconfig.json +++ b/gulp-filter/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-flatten/tsconfig.json b/gulp-flatten/tsconfig.json index 9f40ce7a75..484a4e3aef 100644 --- a/gulp-flatten/tsconfig.json +++ b/gulp-flatten/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-gh-pages/tsconfig.json b/gulp-gh-pages/tsconfig.json index 4156fc1099..a6f5d411b1 100644 --- a/gulp-gh-pages/tsconfig.json +++ b/gulp-gh-pages/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-gzip/tsconfig.json b/gulp-gzip/tsconfig.json index 2070cbdec3..07e07f0cf5 100644 --- a/gulp-gzip/tsconfig.json +++ b/gulp-gzip/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-help-doc/tsconfig.json b/gulp-help-doc/tsconfig.json index 54c262774d..646e8ad141 100644 --- a/gulp-help-doc/tsconfig.json +++ b/gulp-help-doc/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-help/tsconfig.json b/gulp-help/tsconfig.json index 55e26fb16a..d0647ad22a 100644 --- a/gulp-help/tsconfig.json +++ b/gulp-help/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-html-replace/tsconfig.json b/gulp-html-replace/tsconfig.json index 581b46d07e..25eff60770 100644 --- a/gulp-html-replace/tsconfig.json +++ b/gulp-html-replace/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-htmlmin/tsconfig.json b/gulp-htmlmin/tsconfig.json index b3f888d796..5d12b48035 100644 --- a/gulp-htmlmin/tsconfig.json +++ b/gulp-htmlmin/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-if/tsconfig.json b/gulp-if/tsconfig.json index 2f14114d8a..f9db5297cf 100644 --- a/gulp-if/tsconfig.json +++ b/gulp-if/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-inject/tsconfig.json b/gulp-inject/tsconfig.json index 0d86a4f0a5..0201da00d9 100644 --- a/gulp-inject/tsconfig.json +++ b/gulp-inject/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-insert/tsconfig.json b/gulp-insert/tsconfig.json index 1da5bd793c..e548f022fa 100644 --- a/gulp-insert/tsconfig.json +++ b/gulp-insert/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-install/tsconfig.json b/gulp-install/tsconfig.json index 3db84a16bf..0b4494f7cd 100644 --- a/gulp-install/tsconfig.json +++ b/gulp-install/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-istanbul/tsconfig.json b/gulp-istanbul/tsconfig.json index 30fd3e534f..f7ca4e96c7 100644 --- a/gulp-istanbul/tsconfig.json +++ b/gulp-istanbul/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-jade/tsconfig.json b/gulp-jade/tsconfig.json index d5a0b1365f..b746e232bf 100644 --- a/gulp-jade/tsconfig.json +++ b/gulp-jade/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-jasmine-browser/tsconfig.json b/gulp-jasmine-browser/tsconfig.json index e22613b810..e5b112e90f 100644 --- a/gulp-jasmine-browser/tsconfig.json +++ b/gulp-jasmine-browser/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-json-editor/tsconfig.json b/gulp-json-editor/tsconfig.json index 7a7f0404e7..85846b46fd 100644 --- a/gulp-json-editor/tsconfig.json +++ b/gulp-json-editor/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-jspm/tsconfig.json b/gulp-jspm/tsconfig.json index 18c7835f71..fbf318afab 100644 --- a/gulp-jspm/tsconfig.json +++ b/gulp-jspm/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-less/tsconfig.json b/gulp-less/tsconfig.json index deea3371a2..be38992302 100644 --- a/gulp-less/tsconfig.json +++ b/gulp-less/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-load-plugins/tsconfig.json b/gulp-load-plugins/tsconfig.json index 5b8c64c574..77238a0e61 100644 --- a/gulp-load-plugins/tsconfig.json +++ b/gulp-load-plugins/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-minify-css/tsconfig.json b/gulp-minify-css/tsconfig.json index 2c831a76d7..2d59793675 100644 --- a/gulp-minify-css/tsconfig.json +++ b/gulp-minify-css/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-minify-html/tsconfig.json b/gulp-minify-html/tsconfig.json index 6ea7ebe878..3e37896bd2 100644 --- a/gulp-minify-html/tsconfig.json +++ b/gulp-minify-html/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-mocha/tsconfig.json b/gulp-mocha/tsconfig.json index 1414992d0c..aef5d2d758 100644 --- a/gulp-mocha/tsconfig.json +++ b/gulp-mocha/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-newer/tsconfig.json b/gulp-newer/tsconfig.json index 03c3f2ad10..ac02863c9b 100644 --- a/gulp-newer/tsconfig.json +++ b/gulp-newer/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-ng-annotate/tsconfig.json b/gulp-ng-annotate/tsconfig.json index b41c36618e..16f68955bb 100644 --- a/gulp-ng-annotate/tsconfig.json +++ b/gulp-ng-annotate/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-nodemon/tsconfig.json b/gulp-nodemon/tsconfig.json index 46fa7d1365..dc91f8e066 100644 --- a/gulp-nodemon/tsconfig.json +++ b/gulp-nodemon/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-plumber/tsconfig.json b/gulp-plumber/tsconfig.json index 3250508b93..878facc1f7 100644 --- a/gulp-plumber/tsconfig.json +++ b/gulp-plumber/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-protractor/tsconfig.json b/gulp-protractor/tsconfig.json index 49bbdf6eaa..1141cf2042 100644 --- a/gulp-protractor/tsconfig.json +++ b/gulp-protractor/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-remember/tsconfig.json b/gulp-remember/tsconfig.json index a9fe348e31..e8ecc18bdc 100644 --- a/gulp-remember/tsconfig.json +++ b/gulp-remember/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-rename/tsconfig.json b/gulp-rename/tsconfig.json index 5e9f0b1824..8a3a2c34dd 100644 --- a/gulp-rename/tsconfig.json +++ b/gulp-rename/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-replace/tsconfig.json b/gulp-replace/tsconfig.json index f7b7003ca6..5624a977d3 100644 --- a/gulp-replace/tsconfig.json +++ b/gulp-replace/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-rev-replace/tsconfig.json b/gulp-rev-replace/tsconfig.json index a67ef46a67..b3fb130952 100644 --- a/gulp-rev-replace/tsconfig.json +++ b/gulp-rev-replace/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-rev/tsconfig.json b/gulp-rev/tsconfig.json index 0d23af4b22..ea7647e39a 100644 --- a/gulp-rev/tsconfig.json +++ b/gulp-rev/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-ruby-sass/tsconfig.json b/gulp-ruby-sass/tsconfig.json index e9ba142444..9465184b37 100644 --- a/gulp-ruby-sass/tsconfig.json +++ b/gulp-ruby-sass/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-sass/tsconfig.json b/gulp-sass/tsconfig.json index aa8b901e99..26e1b2af4c 100644 --- a/gulp-sass/tsconfig.json +++ b/gulp-sass/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-shell/tsconfig.json b/gulp-shell/tsconfig.json index 9a4fb07a2a..81356de73d 100644 --- a/gulp-shell/tsconfig.json +++ b/gulp-shell/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-size/tsconfig.json b/gulp-size/tsconfig.json index f4406a0a19..b1be4ca1dc 100644 --- a/gulp-size/tsconfig.json +++ b/gulp-size/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-sort/tsconfig.json b/gulp-sort/tsconfig.json index 8c76049155..87097c7ad2 100644 --- a/gulp-sort/tsconfig.json +++ b/gulp-sort/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-sourcemaps/tsconfig.json b/gulp-sourcemaps/tsconfig.json index 305f32083b..e9c6d80281 100644 --- a/gulp-sourcemaps/tsconfig.json +++ b/gulp-sourcemaps/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-strip-debug/tsconfig.json b/gulp-strip-debug/tsconfig.json index c378a11723..db20e2db69 100644 --- a/gulp-strip-debug/tsconfig.json +++ b/gulp-strip-debug/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-svg-sprite/tsconfig.json b/gulp-svg-sprite/tsconfig.json index c3459a8e82..381d78b150 100644 --- a/gulp-svg-sprite/tsconfig.json +++ b/gulp-svg-sprite/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-task-listing/tsconfig.json b/gulp-task-listing/tsconfig.json index 298275b50b..1f3b796968 100644 --- a/gulp-task-listing/tsconfig.json +++ b/gulp-task-listing/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-tsd/tsconfig.json b/gulp-tsd/tsconfig.json index 34560794d8..a5738eb561 100644 --- a/gulp-tsd/tsconfig.json +++ b/gulp-tsd/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-tslint/tsconfig.json b/gulp-tslint/tsconfig.json index 8d1f4b5b34..91d3edf8a3 100644 --- a/gulp-tslint/tsconfig.json +++ b/gulp-tslint/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-typedoc/tsconfig.json b/gulp-typedoc/tsconfig.json index 5b58681283..9d0f620269 100644 --- a/gulp-typedoc/tsconfig.json +++ b/gulp-typedoc/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-typescript/tsconfig.json b/gulp-typescript/tsconfig.json index e3d1ed6b4c..fa6cbbc908 100644 --- a/gulp-typescript/tsconfig.json +++ b/gulp-typescript/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-uglify/tsconfig.json b/gulp-uglify/tsconfig.json index 9930a55243..43db40e019 100644 --- a/gulp-uglify/tsconfig.json +++ b/gulp-uglify/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-useref/tsconfig.json b/gulp-useref/tsconfig.json index 35d29c5da5..132913f9d8 100644 --- a/gulp-useref/tsconfig.json +++ b/gulp-useref/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp-util/tsconfig.json b/gulp-util/tsconfig.json index 26962b537c..06b269e0ed 100644 --- a/gulp-util/tsconfig.json +++ b/gulp-util/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/gulp-watch/tsconfig.json b/gulp-watch/tsconfig.json index 50be0269a7..7062be6f7e 100644 --- a/gulp-watch/tsconfig.json +++ b/gulp-watch/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/gulp/tsconfig.json b/gulp/tsconfig.json index ef4f0576a4..f6670453d1 100644 --- a/gulp/tsconfig.json +++ b/gulp/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/halfred/tsconfig.json b/halfred/tsconfig.json index f522ec22c5..4e002ebff3 100644 --- a/halfred/tsconfig.json +++ b/halfred/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/halogen/tsconfig.json b/halogen/tsconfig.json index c2c0018e1b..1de37993c0 100644 --- a/halogen/tsconfig.json +++ b/halogen/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/hammerjs/tsconfig.json b/hammerjs/tsconfig.json index cfe6673028..866e8d0a1f 100644 --- a/hammerjs/tsconfig.json +++ b/hammerjs/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/hammerjs/v1/tsconfig.json b/hammerjs/v1/tsconfig.json index 63de88e4e7..72ca2c960d 100644 --- a/hammerjs/v1/tsconfig.json +++ b/hammerjs/v1/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "hammerjs": ["hammerjs/v1"] + "hammerjs": [ + "hammerjs/v1" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/handlebars/tsconfig.json b/handlebars/tsconfig.json index c76c499f6e..ecb3323d57 100644 --- a/handlebars/tsconfig.json +++ b/handlebars/tsconfig.json @@ -5,7 +5,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/handlebars/v1/tsconfig.json b/handlebars/v1/tsconfig.json index 0813f4e359..d16d87d96d 100644 --- a/handlebars/v1/tsconfig.json +++ b/handlebars/v1/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -11,7 +13,9 @@ ], "types": [], "paths": { - "handlebars": ["handlebars/v1"] + "handlebars": [ + "handlebars/v1" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/handsontable/tsconfig.json b/handsontable/tsconfig.json index 578ca40774..fd32d1d335 100644 --- a/handsontable/tsconfig.json +++ b/handsontable/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/hapi-decorators/tsconfig.json b/hapi-decorators/tsconfig.json index 72f5fdb496..37e80b60a7 100644 --- a/hapi-decorators/tsconfig.json +++ b/hapi-decorators/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/hapi/index.d.ts b/hapi/index.d.ts index 5eaf43d7fa..b98e1cdf25 100644 --- a/hapi/index.d.ts +++ b/hapi/index.d.ts @@ -716,7 +716,11 @@ export interface IRouteAdditionalConfigurationOptions { /** ONLY WHEN ADDING NEW ROUTES (not when setting defaults). *route tags used for generating documentation (array of strings). */ - tags?: string[] + tags?: string[]; + + /** Enable logging of routes + */ + log?: boolean; } /** diff --git a/hapi/tsconfig.json b/hapi/tsconfig.json index e70c705d7b..c7385884c3 100644 --- a/hapi/tsconfig.json +++ b/hapi/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/hapi/v8/tsconfig.json b/hapi/v8/tsconfig.json index bc6ce3ca68..721be0b070 100644 --- a/hapi/v8/tsconfig.json +++ b/hapi/v8/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -11,7 +13,9 @@ ], "types": [], "paths": { - "hapi": ["hapi/v8"] + "hapi": [ + "hapi/v8" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/harmony-proxy/tsconfig.json b/harmony-proxy/tsconfig.json index 3d3405c46d..4be32be65d 100644 --- a/harmony-proxy/tsconfig.json +++ b/harmony-proxy/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/hasher/tsconfig.json b/hasher/tsconfig.json index 2f3a508608..cd51d136fa 100644 --- a/hasher/tsconfig.json +++ b/hasher/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/hashids/tsconfig.json b/hashids/tsconfig.json index 3d21df8610..3c81324c7f 100644 --- a/hashids/tsconfig.json +++ b/hashids/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/hashmap/tsconfig.json b/hashmap/tsconfig.json index 7ecd39e67a..5b8d8112dd 100644 --- a/hashmap/tsconfig.json +++ b/hashmap/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/hashmap/v1/tsconfig.json b/hashmap/v1/tsconfig.json index daf32660fb..b82818e3ad 100644 --- a/hashmap/v1/tsconfig.json +++ b/hashmap/v1/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "hashmap": ["hashmap/v1"] + "hashmap": [ + "hashmap/v1" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/hashset/tsconfig.json b/hashset/tsconfig.json index 35120dbce4..dea06062fb 100644 --- a/hashset/tsconfig.json +++ b/hashset/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/hashtable/tsconfig.json b/hashtable/tsconfig.json index fbc68818fc..f33b7d90a4 100644 --- a/hashtable/tsconfig.json +++ b/hashtable/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/he/tsconfig.json b/he/tsconfig.json index e04e52f581..95e4f0e6d4 100644 --- a/he/tsconfig.json +++ b/he/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/headroom/tsconfig.json b/headroom/tsconfig.json index 40f24b3df6..ef85c733d5 100644 --- a/headroom/tsconfig.json +++ b/headroom/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/heap/tsconfig.json b/heap/tsconfig.json index 19f2156148..6948c04509 100644 --- a/heap/tsconfig.json +++ b/heap/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/heatmap.js/tsconfig.json b/heatmap.js/tsconfig.json index e1b42b5bd1..1fd9be0a9c 100644 --- a/heatmap.js/tsconfig.json +++ b/heatmap.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/hellojs/tsconfig.json b/hellojs/tsconfig.json index 204f61ce53..971acf84e8 100644 --- a/hellojs/tsconfig.json +++ b/hellojs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/hellosign-embedded/tsconfig.json b/hellosign-embedded/tsconfig.json index d2d18780ae..2c28465905 100644 --- a/hellosign-embedded/tsconfig.json +++ b/hellosign-embedded/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/helmet/tsconfig.json b/helmet/tsconfig.json index 0099f29659..a44452e11a 100644 --- a/helmet/tsconfig.json +++ b/helmet/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/heremaps/tsconfig.json b/heremaps/tsconfig.json index b7e553319c..85f5ebfdc9 100644 --- a/heremaps/tsconfig.json +++ b/heremaps/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/highcharts-ng/tsconfig.json b/highcharts-ng/tsconfig.json index a738083bf0..a5620e430b 100644 --- a/highcharts-ng/tsconfig.json +++ b/highcharts-ng/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/highcharts/index.d.ts b/highcharts/index.d.ts index f0131bebe2..60a9fa15cb 100644 --- a/highcharts/index.d.ts +++ b/highcharts/index.d.ts @@ -805,6 +805,12 @@ declare namespace Highcharts { * @since 1.2.0 */ startOnTick?: boolean; + /** + * Solid gauge series only. Color stops for the solid gauge. + * Use this in cases where a linear gradient between a minColor and maxColor is not sufficient. + * The stops is an array of tuples, where the first item is a float between 0 and 1 assigning the relative position in the gradient, and the second item is the color. + */ + stops?: [number, string][]; /** * The amount of ticks to draw on the axis. This opens up for aligning the ticks of multiple charts or panes within * a chart. This option overrides the tickPixelInterval option. diff --git a/highcharts/tsconfig.json b/highcharts/tsconfig.json index 5d3e9ebe3f..3526f42da7 100644 --- a/highcharts/tsconfig.json +++ b/highcharts/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/highland/tsconfig.json b/highland/tsconfig.json index 75f9a8053a..30a728d380 100644 --- a/highland/tsconfig.json +++ b/highland/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/highlight.js/tsconfig.json b/highlight.js/tsconfig.json index 4b7c3117e1..19772348e6 100644 --- a/highlight.js/tsconfig.json +++ b/highlight.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/highlight.js/v7/tsconfig.json b/highlight.js/v7/tsconfig.json index 8954865798..fd254e62a6 100644 --- a/highlight.js/v7/tsconfig.json +++ b/highlight.js/v7/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "highlight.js": ["highlight.js/v7"] + "highlight.js": [ + "highlight.js/v7" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/hiredis/hiredis-tests.ts b/hiredis/hiredis-tests.ts new file mode 100644 index 0000000000..9a32fb9755 --- /dev/null +++ b/hiredis/hiredis-tests.ts @@ -0,0 +1,13 @@ +import { Reader, Config, createConnection } from "hiredis"; + +const socket = createConnection(6379, "localhost"); + +socket.write("INFO"); + +const reader = new Reader({ return_buffers: false }); + +// Data comes in +reader.feed("$5\r\nhello\r\n"); + +// Reply comes out +reader.get(); // => "hello" diff --git a/hiredis/index.d.ts b/hiredis/index.d.ts new file mode 100644 index 0000000000..727e4f4a03 --- /dev/null +++ b/hiredis/index.d.ts @@ -0,0 +1,20 @@ +// Type definitions for hiredis 0.5 +// Project: http://github.com/redis/hiredis-node +// Definitions by: Titan +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as net from "net"; + +export interface Config { + return_buffers: boolean; +} + +export class Reader { + constructor(config?: Config); + feed(reply: string | Buffer): void; + get(): string | Buffer; +} + +export function createConnection(port: number, host: string): net.Socket; diff --git a/hiredis/tsconfig.json b/hiredis/tsconfig.json new file mode 100644 index 0000000000..8f58ff798a --- /dev/null +++ b/hiredis/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "strictNullChecks": true, + "noImplicitThis": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "hiredis-tests.ts" + ] +} diff --git a/hiredis/tslint.json b/hiredis/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/hiredis/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/history.js/tsconfig.json b/history.js/tsconfig.json index 795d9a540f..f906d0884c 100644 --- a/history.js/tsconfig.json +++ b/history.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/history/tsconfig.json b/history/tsconfig.json index 76df1a3976..107d79617e 100644 --- a/history/tsconfig.json +++ b/history/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/history/v2/tsconfig.json b/history/v2/tsconfig.json index 3fb38bc95c..342bb3d25d 100644 --- a/history/v2/tsconfig.json +++ b/history/v2/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/hoek/tsconfig.json b/hoek/tsconfig.json index f5600ad032..2b605d3ae4 100644 --- a/hoek/tsconfig.json +++ b/hoek/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": true, diff --git a/hooker/tsconfig.json b/hooker/tsconfig.json index b43ede4e1c..f746a7c7a4 100644 --- a/hooker/tsconfig.json +++ b/hooker/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/hopscotch/tsconfig.json b/hopscotch/tsconfig.json index b75b071bad..f6c2fb553b 100644 --- a/hopscotch/tsconfig.json +++ b/hopscotch/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/howler/tsconfig.json b/howler/tsconfig.json index 8f996926d6..0c5e07318f 100644 --- a/howler/tsconfig.json +++ b/howler/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/html-entities/tsconfig.json b/html-entities/tsconfig.json index a07bf0dcea..f563445dea 100644 --- a/html-entities/tsconfig.json +++ b/html-entities/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/html-minifier/tsconfig.json b/html-minifier/tsconfig.json index 199844668b..4baadf6c99 100644 --- a/html-minifier/tsconfig.json +++ b/html-minifier/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/html-pdf/tsconfig.json b/html-pdf/tsconfig.json index 77e614684d..2c000624ad 100644 --- a/html-pdf/tsconfig.json +++ b/html-pdf/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/html-to-text/tsconfig.json b/html-to-text/tsconfig.json index fb4f7284d8..36f0c09901 100644 --- a/html-to-text/tsconfig.json +++ b/html-to-text/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/html-webpack-plugin/tsconfig.json b/html-webpack-plugin/tsconfig.json index c2dcadd4fa..10d5e8e835 100644 --- a/html-webpack-plugin/tsconfig.json +++ b/html-webpack-plugin/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "html-webpack-plugin-tests.ts" ] -} +} \ No newline at end of file diff --git a/html-webpack-template/tsconfig.json b/html-webpack-template/tsconfig.json index 8e51dd1f5c..ee25f30942 100644 --- a/html-webpack-template/tsconfig.json +++ b/html-webpack-template/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "html-webpack-template-tests.ts" ] -} +} \ No newline at end of file diff --git a/html2canvas/tsconfig.json b/html2canvas/tsconfig.json index 3309d5c3b0..309c089483 100644 --- a/html2canvas/tsconfig.json +++ b/html2canvas/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/htmlparser2/tsconfig.json b/htmlparser2/tsconfig.json index 978249142a..01742e875c 100644 --- a/htmlparser2/tsconfig.json +++ b/htmlparser2/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/htmltojsx/tsconfig.json b/htmltojsx/tsconfig.json index aa259071b6..488ecd327b 100644 --- a/htmltojsx/tsconfig.json +++ b/htmltojsx/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/http-assert/tsconfig.json b/http-assert/tsconfig.json index bef302b296..335ea59861 100644 --- a/http-assert/tsconfig.json +++ b/http-assert/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "http-assert-tests.ts" ] -} +} \ No newline at end of file diff --git a/http-codes/tsconfig.json b/http-codes/tsconfig.json index 87eb6217d4..3bc13b0278 100644 --- a/http-codes/tsconfig.json +++ b/http-codes/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -16,4 +18,4 @@ "files": [ "index.d.ts" ] -} +} \ No newline at end of file diff --git a/http-errors/tsconfig.json b/http-errors/tsconfig.json index 2d86ab7052..7b2948b792 100644 --- a/http-errors/tsconfig.json +++ b/http-errors/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/http-link-header/http-link-header-tests.ts b/http-link-header/http-link-header-tests.ts index 85145dc8eb..5005f58071 100644 --- a/http-link-header/http-link-header-tests.ts +++ b/http-link-header/http-link-header-tests.ts @@ -21,6 +21,7 @@ isBool(has); const get = link.get('title', 'Example Website'); isReference(get); const rel = link.rel('alternate'); +rel['title'] !== 'bar'; isReference(rel); const set = link.set({ rel: 'next', uri: 'http://example.com/next' }); isReference(set); diff --git a/http-link-header/index.d.ts b/http-link-header/index.d.ts index ba208d8595..a8dca563d2 100644 --- a/http-link-header/index.d.ts +++ b/http-link-header/index.d.ts @@ -6,7 +6,7 @@ export interface Reference { uri: string; rel: string; - title?: string; + [index: string]: string; } export interface Link { refs: Reference[]; diff --git a/http-link-header/tsconfig.json b/http-link-header/tsconfig.json index 9fb6d5e158..bd0c2793e6 100644 --- a/http-link-header/tsconfig.json +++ b/http-link-header/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "http-link-header-tests.ts" ] -} +} \ No newline at end of file diff --git a/http-status-codes/tsconfig.json b/http-status-codes/tsconfig.json index 319dd80136..e114747729 100644 --- a/http-status-codes/tsconfig.json +++ b/http-status-codes/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/http-status/tsconfig.json b/http-status/tsconfig.json index 0bec21c81c..11a8a8d963 100644 --- a/http-status/tsconfig.json +++ b/http-status/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/http-string-parser/tsconfig.json b/http-string-parser/tsconfig.json index da499b66b8..81569ff0a1 100644 --- a/http-string-parser/tsconfig.json +++ b/http-string-parser/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/httperr/tsconfig.json b/httperr/tsconfig.json index 82c34818d0..7f55de9d58 100644 --- a/httperr/tsconfig.json +++ b/httperr/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/hubspot-pace/tsconfig.json b/hubspot-pace/tsconfig.json index 1f7464eaa2..63dce2e88f 100644 --- a/hubspot-pace/tsconfig.json +++ b/hubspot-pace/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/humane/tsconfig.json b/humane/tsconfig.json index 511f9212b7..77ee4d370e 100644 --- a/humane/tsconfig.json +++ b/humane/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/humanparser/tsconfig.json b/humanparser/tsconfig.json index f918e433af..54b6d282d0 100644 --- a/humanparser/tsconfig.json +++ b/humanparser/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/humps/tsconfig.json b/humps/tsconfig.json index 4deb7c907a..2b02f594ae 100644 --- a/humps/tsconfig.json +++ b/humps/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/hyperscript/tsconfig.json b/hyperscript/tsconfig.json index dfbdc84518..64f57c346a 100644 --- a/hyperscript/tsconfig.json +++ b/hyperscript/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/hypertext-application-language/tsconfig.json b/hypertext-application-language/tsconfig.json index 2cab4b84f5..6c039ab061 100644 --- a/hypertext-application-language/tsconfig.json +++ b/hypertext-application-language/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/hystrixjs/tsconfig.json b/hystrixjs/tsconfig.json index 7148196ac2..c23c0c6875 100644 --- a/hystrixjs/tsconfig.json +++ b/hystrixjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/i18n/tsconfig.json b/i18n/tsconfig.json index 55f6a32871..c0f4ba7a10 100644 --- a/i18n/tsconfig.json +++ b/i18n/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/i18next-browser-languagedetector/tsconfig.json b/i18next-browser-languagedetector/tsconfig.json index 5e5217cc4e..15c0de0371 100644 --- a/i18next-browser-languagedetector/tsconfig.json +++ b/i18next-browser-languagedetector/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/i18next-express-middleware/tsconfig.json b/i18next-express-middleware/tsconfig.json index 9a6bb79121..b27b8c0aa1 100644 --- a/i18next-express-middleware/tsconfig.json +++ b/i18next-express-middleware/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/i18next-node-fs-backend/tsconfig.json b/i18next-node-fs-backend/tsconfig.json index c7558b6c94..bc20cc0a97 100644 --- a/i18next-node-fs-backend/tsconfig.json +++ b/i18next-node-fs-backend/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/i18next-sprintf-postprocessor/tsconfig.json b/i18next-sprintf-postprocessor/tsconfig.json index cf5474ff0d..8538552c58 100644 --- a/i18next-sprintf-postprocessor/tsconfig.json +++ b/i18next-sprintf-postprocessor/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/i18next-xhr-backend/tsconfig.json b/i18next-xhr-backend/tsconfig.json index 3846f699cf..2b08241bb5 100644 --- a/i18next-xhr-backend/tsconfig.json +++ b/i18next-xhr-backend/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/i18next/tsconfig.json b/i18next/tsconfig.json index 2784392036..429433ed11 100644 --- a/i18next/tsconfig.json +++ b/i18next/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/i2c-bus/tsconfig.json b/i2c-bus/tsconfig.json index 3a4d8c2502..d1b7843fdb 100644 --- a/i2c-bus/tsconfig.json +++ b/i2c-bus/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/iban/tsconfig.json b/iban/tsconfig.json index 72f929945e..0ddc7bcd4a 100644 --- a/iban/tsconfig.json +++ b/iban/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ibm-mobilefirst/tsconfig.json b/ibm-mobilefirst/tsconfig.json index d8fd8fdfa1..0e4e6e45d9 100644 --- a/ibm-mobilefirst/tsconfig.json +++ b/ibm-mobilefirst/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/icepick/tsconfig.json b/icepick/tsconfig.json index deb295d7da..18a951321c 100644 --- a/icepick/tsconfig.json +++ b/icepick/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/icheck/tsconfig.json b/icheck/tsconfig.json index f094cd0321..cadcfcd8d6 100644 --- a/icheck/tsconfig.json +++ b/icheck/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/iconv-lite/tsconfig.json b/iconv-lite/tsconfig.json index 9c7f9b6e95..6f87b287f5 100644 --- a/iconv-lite/tsconfig.json +++ b/iconv-lite/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/iconv/tsconfig.json b/iconv/tsconfig.json index c3143c8575..d79b335e7c 100644 --- a/iconv/tsconfig.json +++ b/iconv/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ids/tsconfig.json b/ids/tsconfig.json index 6af13979ec..556184fceb 100644 --- a/ids/tsconfig.json +++ b/ids/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/image-size/tsconfig.json b/image-size/tsconfig.json index 61c2696d45..bb3fe8cb49 100644 --- a/image-size/tsconfig.json +++ b/image-size/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/imagemagick-native/tsconfig.json b/imagemagick-native/tsconfig.json index 506a10b58c..95c028b28b 100644 --- a/imagemagick-native/tsconfig.json +++ b/imagemagick-native/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/imagemagick/tsconfig.json b/imagemagick/tsconfig.json index 06aed95001..80686f53b5 100644 --- a/imagemagick/tsconfig.json +++ b/imagemagick/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/imagemapster/tsconfig.json b/imagemapster/tsconfig.json index d0aad3fe33..dc96de2d3e 100644 --- a/imagemapster/tsconfig.json +++ b/imagemapster/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/imagesloaded/tsconfig.json b/imagesloaded/tsconfig.json index 6c9e4a682c..fb3f883f0b 100644 --- a/imagesloaded/tsconfig.json +++ b/imagesloaded/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/imap-simple/tsconfig.json b/imap-simple/tsconfig.json index ce50347343..3f51a787ac 100644 --- a/imap-simple/tsconfig.json +++ b/imap-simple/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/imap/tsconfig.json b/imap/tsconfig.json index 46c0268b3f..ec1c1b1b69 100644 --- a/imap/tsconfig.json +++ b/imap/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/imgur-rest-api/tsconfig.json b/imgur-rest-api/tsconfig.json index 8edfea9b9d..91f414e021 100644 --- a/imgur-rest-api/tsconfig.json +++ b/imgur-rest-api/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/immutability-helper/tsconfig.json b/immutability-helper/tsconfig.json index 3901b1e0cc..b8babd8c43 100644 --- a/immutability-helper/tsconfig.json +++ b/immutability-helper/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/impress/tsconfig.json b/impress/tsconfig.json index 6d1a71de6d..3f80cf37e7 100644 --- a/impress/tsconfig.json +++ b/impress/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/in-range/tsconfig.json b/in-range/tsconfig.json index 959b41a5bd..1f59573204 100644 --- a/in-range/tsconfig.json +++ b/in-range/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/incremental-dom/tsconfig.json b/incremental-dom/tsconfig.json index dc0ebb2f84..101179c675 100644 --- a/incremental-dom/tsconfig.json +++ b/incremental-dom/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/indent-string/tsconfig.json b/indent-string/tsconfig.json index 6e2b6f011d..4ff0142f89 100644 --- a/indent-string/tsconfig.json +++ b/indent-string/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "indent-string-tests.ts" ] -} +} \ No newline at end of file diff --git a/inert/tsconfig.json b/inert/tsconfig.json index 2614a83e22..5b805cfc2d 100644 --- a/inert/tsconfig.json +++ b/inert/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/inflected/tsconfig.json b/inflected/tsconfig.json index 3f7ec070da..3f5d7182e5 100644 --- a/inflected/tsconfig.json +++ b/inflected/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/inflection/tsconfig.json b/inflection/tsconfig.json index 39b0f370e9..00f7342815 100644 --- a/inflection/tsconfig.json +++ b/inflection/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/inherits/tsconfig.json b/inherits/tsconfig.json index 484b443dd2..6a0b0ce1c2 100644 --- a/inherits/tsconfig.json +++ b/inherits/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ini/tsconfig.json b/ini/tsconfig.json index 53644b4d94..f1e6fa5bc1 100644 --- a/ini/tsconfig.json +++ b/ini/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/iniparser/tsconfig.json b/iniparser/tsconfig.json index dc0c79cbb9..712d167a05 100644 --- a/iniparser/tsconfig.json +++ b/iniparser/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/inline-css/tsconfig.json b/inline-css/tsconfig.json index fa2a455dcf..45a73748a6 100644 --- a/inline-css/tsconfig.json +++ b/inline-css/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/inquirer/tsconfig.json b/inquirer/tsconfig.json index a06f09ccd2..08d34eac0e 100644 --- a/inquirer/tsconfig.json +++ b/inquirer/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/insight/tsconfig.json b/insight/tsconfig.json index d9cc368185..c69d2d64d9 100644 --- a/insight/tsconfig.json +++ b/insight/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/interact.js/tsconfig.json b/interact.js/tsconfig.json index 8dbabcade7..eb8868338a 100644 --- a/interact.js/tsconfig.json +++ b/interact.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/intercomjs/tsconfig.json b/intercomjs/tsconfig.json index 79163abfc4..42858e375a 100644 --- a/intercomjs/tsconfig.json +++ b/intercomjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/intl-messageformat/tsconfig.json b/intl-messageformat/tsconfig.json index 066dcd175c..1a4a156267 100644 --- a/intl-messageformat/tsconfig.json +++ b/intl-messageformat/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "intl-messageformat-tests.ts" ] -} +} \ No newline at end of file diff --git a/intl-tel-input/tsconfig.json b/intl-tel-input/tsconfig.json index f56e16cbb0..a9ca5094bc 100644 --- a/intl-tel-input/tsconfig.json +++ b/intl-tel-input/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/intro.js/index.d.ts b/intro.js/index.d.ts index 7d417eb9a2..d7893018c2 100644 --- a/intro.js/index.d.ts +++ b/intro.js/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for intro.js 2.0 +// Type definitions for intro.js 2.4 // Project: https://github.com/usablica/intro.js // Definitions by: Maxime Fabre // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -10,6 +10,12 @@ declare namespace IntroJs { position?: string; } + interface Hint { + hint: string; + element?: string|HTMLElement|Element; + hintPosition?: string; + } + interface Options { nextLabel?: string; prevLabel?: string; @@ -32,6 +38,7 @@ declare namespace IntroJs { hintPosition?: string; hintButtonLabel?: string; steps?: Step[]; + hints?: Hint[]; } interface IntroJs { @@ -56,6 +63,11 @@ declare namespace IntroJs { addHints(): IntroJs; + showHint(stepId: number): IntroJs; + showHints(): IntroJs; + hideHint(stepId: number): IntroJs; + hideHints(): IntroJs; + onhintsadded(callback: Function): IntroJs; onhintclick(callback: (hintElement: HTMLElement, item: Step, stepId: number) => any): IntroJs; onhintclose(callback: (stepId: number) => any): IntroJs; diff --git a/intro.js/intro.js-tests.ts b/intro.js/intro.js-tests.ts index f4356aa364..0d79c1bd21 100644 --- a/intro.js/intro.js-tests.ts +++ b/intro.js/intro.js-tests.ts @@ -35,6 +35,18 @@ intro.setOptions({ element: '#step5', intro : 'Get it, use it.' } + ], + hints: [ + { + element: '#step1', + hint: 'This is a hint', + hintPosition: 'middle-right' + }, + { + element: document.querySelectorAll('#step2')[0] as HTMLElement, + hint: 'This is another hint', + hintPosition: 'top-left' + } ] }); @@ -69,6 +81,10 @@ intro.start() alert('Hint close for Step ID ' + stepId); }) .addHints() + .showHint(1) + .showHints() + .hideHint(1) + .hideHints() .clone(); introWithElement.start() diff --git a/intro.js/tsconfig.json b/intro.js/tsconfig.json index d9130ae39e..0709adac52 100644 --- a/intro.js/tsconfig.json +++ b/intro.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/invariant/tsconfig.json b/invariant/tsconfig.json index 3eeb5b5ade..5f24d951b1 100644 --- a/invariant/tsconfig.json +++ b/invariant/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/inversify-devtools/tsconfig.json b/inversify-devtools/tsconfig.json index 451d07224b..a0953ef1ac 100644 --- a/inversify-devtools/tsconfig.json +++ b/inversify-devtools/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ion.rangeslider/tsconfig.json b/ion.rangeslider/tsconfig.json index aede38d763..9ddb909ef3 100644 --- a/ion.rangeslider/tsconfig.json +++ b/ion.rangeslider/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ion.rangeslider/v1/tsconfig.json b/ion.rangeslider/v1/tsconfig.json index 2460539a3f..1d748c4d46 100644 --- a/ion.rangeslider/v1/tsconfig.json +++ b/ion.rangeslider/v1/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "ion.rangeslider": ["ion.rangeslider/v1"] + "ion.rangeslider": [ + "ion.rangeslider/v1" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/ionic/tsconfig.json b/ionic/tsconfig.json index a575d24b88..b057fc1144 100644 --- a/ionic/tsconfig.json +++ b/ionic/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ioredis/tsconfig.json b/ioredis/tsconfig.json index b4e17b1761..908157d5f7 100644 --- a/ioredis/tsconfig.json +++ b/ioredis/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ip-regex/index.d.ts b/ip-regex/index.d.ts new file mode 100644 index 0000000000..c26cbaab3b --- /dev/null +++ b/ip-regex/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for ip-regex 2.0 +// Project: https://github.com/sindresorhus/ip-regex +// Definitions by: Daniel Perez Alvarez +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** Regular expression for matching IP addresses (IPv4 & IPv6). */ +declare function ipRegex(options?: { + /** Only match an exact string. Useful with RegExp#test to check if a string is an IP address. */ + exact?: boolean; +}): RegExp; + +export = ipRegex; diff --git a/ip-regex/ip-regex-tests.ts b/ip-regex/ip-regex-tests.ts new file mode 100644 index 0000000000..dcaa72c72d --- /dev/null +++ b/ip-regex/ip-regex-tests.ts @@ -0,0 +1,7 @@ +import ipRegex = require('ip-regex'); + +ipRegex().test('unicorn 192.168.0.1'); + +ipRegex({exact: true}).test('unicorn 192.168.0.1'); + +'unicorn 192.168.0.1 cake 1:2:3:4:5:6:7:8 rainbow'.match(ipRegex()); diff --git a/ip-regex/tsconfig.json b/ip-regex/tsconfig.json new file mode 100644 index 0000000000..4a5780ec8b --- /dev/null +++ b/ip-regex/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "ip-regex-tests.ts" + ] +} diff --git a/ip-regex/tslint.json b/ip-regex/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/ip-regex/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/ip/tsconfig.json b/ip/tsconfig.json index 4abc998147..ae5838138f 100644 --- a/ip/tsconfig.json +++ b/ip/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/irc/tsconfig.json b/irc/tsconfig.json index b9b4673383..cfa02bc06b 100644 --- a/irc/tsconfig.json +++ b/irc/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/is-absolute-url/tsconfig.json b/is-absolute-url/tsconfig.json index 56363cd768..aea408feb3 100644 --- a/is-absolute-url/tsconfig.json +++ b/is-absolute-url/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "is-absolute-url-tests.ts" ] -} +} \ No newline at end of file diff --git a/is-archive/tsconfig.json b/is-archive/tsconfig.json index 7c4fa0a536..53afd65081 100644 --- a/is-archive/tsconfig.json +++ b/is-archive/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "is-archive-tests.ts" ] -} +} \ No newline at end of file diff --git a/is-binary-path/tsconfig.json b/is-binary-path/tsconfig.json index 417e158ce0..062c21523b 100644 --- a/is-binary-path/tsconfig.json +++ b/is-binary-path/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/is-compressed/tsconfig.json b/is-compressed/tsconfig.json index 3cb6f8603c..51738f3ff4 100644 --- a/is-compressed/tsconfig.json +++ b/is-compressed/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "is-compressed-tests.ts" ] -} +} \ No newline at end of file diff --git a/is-finite/tsconfig.json b/is-finite/tsconfig.json index 87eb6217d4..3bc13b0278 100644 --- a/is-finite/tsconfig.json +++ b/is-finite/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -16,4 +18,4 @@ "files": [ "index.d.ts" ] -} +} \ No newline at end of file diff --git a/is-my-json-valid/tsconfig.json b/is-my-json-valid/tsconfig.json index c0eb5466c8..010220d6a3 100644 --- a/is-my-json-valid/tsconfig.json +++ b/is-my-json-valid/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/is-path-cwd/tsconfig.json b/is-path-cwd/tsconfig.json index 527ece0753..d656dedaf0 100644 --- a/is-path-cwd/tsconfig.json +++ b/is-path-cwd/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/is-path-in-cwd/tsconfig.json b/is-path-in-cwd/tsconfig.json index 87eb6217d4..3bc13b0278 100644 --- a/is-path-in-cwd/tsconfig.json +++ b/is-path-in-cwd/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -16,4 +18,4 @@ "files": [ "index.d.ts" ] -} +} \ No newline at end of file diff --git a/is-plain-object/tsconfig.json b/is-plain-object/tsconfig.json index bc2867db1c..f610df973d 100644 --- a/is-plain-object/tsconfig.json +++ b/is-plain-object/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/is-promise/tsconfig.json b/is-promise/tsconfig.json index f93430fecb..17a7477d06 100644 --- a/is-promise/tsconfig.json +++ b/is-promise/tsconfig.json @@ -5,7 +5,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/is-relative-url/tsconfig.json b/is-relative-url/tsconfig.json index 6d27996149..efc617ca79 100644 --- a/is-relative-url/tsconfig.json +++ b/is-relative-url/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "is-relative-url-tests.ts" ] -} +} \ No newline at end of file diff --git a/is-root-path/tsconfig.json b/is-root-path/tsconfig.json index d48e0020f4..6e33afc691 100644 --- a/is-root-path/tsconfig.json +++ b/is-root-path/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "is-root-path-tests.ts" ] -} +} \ No newline at end of file diff --git a/is-root/tsconfig.json b/is-root/tsconfig.json index 65a451e878..8e69782eae 100644 --- a/is-root/tsconfig.json +++ b/is-root/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "is-root-tests.ts" ] -} +} \ No newline at end of file diff --git a/is-text-path/tsconfig.json b/is-text-path/tsconfig.json index f56c2f4a4f..1ecb34ba3b 100644 --- a/is-text-path/tsconfig.json +++ b/is-text-path/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "is-text-path-tests.ts" ] -} +} \ No newline at end of file diff --git a/is-url/tsconfig.json b/is-url/tsconfig.json index 10bb2a6397..65d5f8a3b7 100644 --- a/is-url/tsconfig.json +++ b/is-url/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/is-windows/tsconfig.json b/is-windows/tsconfig.json index 9bac7c08a8..94b10d911f 100644 --- a/is-windows/tsconfig.json +++ b/is-windows/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "is-windows-tests.ts" ] -} +} \ No newline at end of file diff --git a/is/tsconfig.json b/is/tsconfig.json index 7afa0a2de1..1df1d26c20 100644 --- a/is/tsconfig.json +++ b/is/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/iscroll/tsconfig.json b/iscroll/tsconfig.json index 4e847b3981..d7642f9fe6 100644 --- a/iscroll/tsconfig.json +++ b/iscroll/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/iscroll/v4/tsconfig.json b/iscroll/v4/tsconfig.json index f393dcb124..e77d78c702 100644 --- a/iscroll/v4/tsconfig.json +++ b/iscroll/v4/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "iscroll": ["iscroll/v4"] + "iscroll": [ + "iscroll/v4" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/iso8601-localizer/tsconfig.json b/iso8601-localizer/tsconfig.json index 1a3d3b6135..047268c980 100644 --- a/iso8601-localizer/tsconfig.json +++ b/iso8601-localizer/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/isomorphic-fetch/tsconfig.json b/isomorphic-fetch/tsconfig.json index a521c357c1..a53b05cd73 100644 --- a/isomorphic-fetch/tsconfig.json +++ b/isomorphic-fetch/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/istanbul-middleware/tsconfig.json b/istanbul-middleware/tsconfig.json index 6e55ba542b..11a7dbca93 100644 --- a/istanbul-middleware/tsconfig.json +++ b/istanbul-middleware/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/istanbul/tsconfig.json b/istanbul/tsconfig.json index 47b30b151f..2f1e32e96f 100644 --- a/istanbul/tsconfig.json +++ b/istanbul/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ityped/tsconfig.json b/ityped/tsconfig.json index 101d9e3dd3..102956be32 100644 --- a/ityped/tsconfig.json +++ b/ityped/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "ityped-tests.ts" ] -} +} \ No newline at end of file diff --git a/ix.js/tsconfig.json b/ix.js/tsconfig.json index 7f476db666..ae75095c1f 100644 --- a/ix.js/tsconfig.json +++ b/ix.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jade/tsconfig.json b/jade/tsconfig.json index 9ae1ca0b1c..96cebcb690 100644 --- a/jade/tsconfig.json +++ b/jade/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jake/tsconfig.json b/jake/tsconfig.json index 1f87791515..640fc6c851 100644 --- a/jake/tsconfig.json +++ b/jake/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jalaali-js/tsconfig.json b/jalaali-js/tsconfig.json index 780ff29ad6..d7f1e781b3 100644 --- a/jalaali-js/tsconfig.json +++ b/jalaali-js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/jasmine-ajax/tsconfig.json b/jasmine-ajax/tsconfig.json index ee74778622..570eb5733d 100644 --- a/jasmine-ajax/tsconfig.json +++ b/jasmine-ajax/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jasmine-data_driven_tests/tsconfig.json b/jasmine-data_driven_tests/tsconfig.json index eedc107d0b..161fc72daf 100644 --- a/jasmine-data_driven_tests/tsconfig.json +++ b/jasmine-data_driven_tests/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jasmine-es6-promise-matchers/tsconfig.json b/jasmine-es6-promise-matchers/tsconfig.json index 3c9178fbbf..e1d8979dcd 100644 --- a/jasmine-es6-promise-matchers/tsconfig.json +++ b/jasmine-es6-promise-matchers/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jasmine-expect/tsconfig.json b/jasmine-expect/tsconfig.json index 9421a7d16b..9fdf033fba 100644 --- a/jasmine-expect/tsconfig.json +++ b/jasmine-expect/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jasmine-fixture/tsconfig.json b/jasmine-fixture/tsconfig.json index d0e127846f..9d5d258542 100644 --- a/jasmine-fixture/tsconfig.json +++ b/jasmine-fixture/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jasmine-jquery/tsconfig.json b/jasmine-jquery/tsconfig.json index 6722afd469..e574ccb60f 100644 --- a/jasmine-jquery/tsconfig.json +++ b/jasmine-jquery/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jasmine-matchers/tsconfig.json b/jasmine-matchers/tsconfig.json index cbd3cffe1a..5860949933 100644 --- a/jasmine-matchers/tsconfig.json +++ b/jasmine-matchers/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jasmine-node/tsconfig.json b/jasmine-node/tsconfig.json index ab8f2a17c5..269151c845 100644 --- a/jasmine-node/tsconfig.json +++ b/jasmine-node/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jasmine-promise-matchers/tsconfig.json b/jasmine-promise-matchers/tsconfig.json index b4c51c1553..928daedaf0 100644 --- a/jasmine-promise-matchers/tsconfig.json +++ b/jasmine-promise-matchers/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jasmine/index.d.ts b/jasmine/index.d.ts index 5dcf813628..7bf232acba 100644 --- a/jasmine/index.d.ts +++ b/jasmine/index.d.ts @@ -370,13 +370,18 @@ declare namespace jasmine { } interface CustomReporterResult { - description: string, - failedExpectations?: FailedExpectation[], - fullName: string, - id: string; - passedExpectations?: PassedExpectation[], - pendingReason?: string; - status?: string; + description: string, + failedExpectations?: FailedExpectation[], + fullName: string, + id: string; + passedExpectations?: PassedExpectation[], + pendingReason?: string; + status?: string; + } + + interface RunDetails { + failedExpectations: ExpectationResult[]; + order: jasmine.Order } interface CustomReporter { @@ -385,7 +390,7 @@ declare namespace jasmine { specStarted?(result: CustomReporterResult): void; specDone?(result: CustomReporterResult): void; suiteDone?(result: CustomReporterResult): void; - jasmineDone?(): any; + jasmineDone?(runDetails: RunDetails): void; } interface Runner { @@ -549,10 +554,7 @@ declare namespace jasmine { finished: boolean; result: any; messages: any; - runDetails: { - failedExpectations: ExpectationResult[]; - order: jasmine.Order - } + runDetails: RunDetails new (): any; diff --git a/jasmine/jasmine-tests.ts b/jasmine/jasmine-tests.ts index 87497e90c2..4632eb8b4c 100644 --- a/jasmine/jasmine-tests.ts +++ b/jasmine/jasmine-tests.ts @@ -872,6 +872,14 @@ var customMatchers: jasmine.CustomMatcherFactories = { } }; // add the custom matchers to interface jasmine.Matchers via TypeScript declaration merging +// if your test files import or export anything, you'll want to use: +// declare global { +// namespace jasmine { +// interface Matchers { +// ... +// } +// } +// } declare namespace jasmine { interface Matchers { toBeGoofy(expected?: any): boolean; @@ -926,7 +934,7 @@ var myReporter: jasmine.CustomReporter = { } console.log(result.passedExpectations.length); }, - + suiteDone: function (result: jasmine.CustomReporterResult) { console.log('Suite: ' + result.description + ' was ' + result.status); for (var i = 0; i < result.failedExpectations.length; i++) { @@ -935,29 +943,14 @@ var myReporter: jasmine.CustomReporter = { } }, - jasmineDone: function() { + jasmineDone: function(runDetails: jasmine.RunDetails) { console.log('Finished suite'); + console.log('Random:', runDetails.order.random); } }; jasmine.getEnv().addReporter(myReporter); -// test for custom reporter which return ES6 Promise in jasmineDone(): -var myShortReporter: jasmine.CustomReporter = { - jasmineDone: function() { - return new Promise(function(resolve, reject) { - setTimeout(() => resolve(), 10000); - }); - } -} - -var jasmineDoneResolved: Promise = myShortReporter.jasmineDone(); -jasmineDoneResolved.then(() => { - console.log("[ShortReporter] : jasmineDone Resolved"); -}); - -jasmine.getEnv().addReporter(myShortReporter); - describe("Randomize Tests", function() { it("should allow randomization of the order of tests", function() { expect(function() { diff --git a/jasmine/tsconfig.json b/jasmine/tsconfig.json index e7f9394641..9668002197 100644 --- a/jasmine/tsconfig.json +++ b/jasmine/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jasmine/v1/tsconfig.json b/jasmine/v1/tsconfig.json index 91e64eb5d2..197d3d9308 100644 --- a/jasmine/v1/tsconfig.json +++ b/jasmine/v1/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "jasmine": ["jasmine/v1"] + "jasmine": [ + "jasmine/v1" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/java-applet/tsconfig.json b/java-applet/tsconfig.json index ca587c4589..aa55b6d035 100644 --- a/java-applet/tsconfig.json +++ b/java-applet/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/java/tsconfig.json b/java/tsconfig.json index 8950d2bf27..91fc68d18c 100644 --- a/java/tsconfig.json +++ b/java/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/javascript-astar/tsconfig.json b/javascript-astar/tsconfig.json index adc00dc0cf..067fc70dd9 100644 --- a/javascript-astar/tsconfig.json +++ b/javascript-astar/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/javascript-bignum/tsconfig.json b/javascript-bignum/tsconfig.json index ce37762e26..8894412010 100644 --- a/javascript-bignum/tsconfig.json +++ b/javascript-bignum/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/javascript-obfuscator/tsconfig.json b/javascript-obfuscator/tsconfig.json index 331ae49482..5c46f1e074 100644 --- a/javascript-obfuscator/tsconfig.json +++ b/javascript-obfuscator/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jbinary/tsconfig.json b/jbinary/tsconfig.json index d73ffa8413..836b88296d 100644 --- a/jbinary/tsconfig.json +++ b/jbinary/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jcanvas/tsconfig.json b/jcanvas/tsconfig.json index 2ed60b2a58..de3dc06b89 100644 --- a/jcanvas/tsconfig.json +++ b/jcanvas/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jdataview/tsconfig.json b/jdataview/tsconfig.json index 2143c3949f..129d85d045 100644 --- a/jdataview/tsconfig.json +++ b/jdataview/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jdenticon/tsconfig.json b/jdenticon/tsconfig.json index 4078d1a078..78414f1426 100644 --- a/jdenticon/tsconfig.json +++ b/jdenticon/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/jee-jsf/tsconfig.json b/jee-jsf/tsconfig.json index e7b8594556..dc18e1f469 100644 --- a/jee-jsf/tsconfig.json +++ b/jee-jsf/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jenkins/index.d.ts b/jenkins/index.d.ts new file mode 100644 index 0000000000..5db91893a6 --- /dev/null +++ b/jenkins/index.d.ts @@ -0,0 +1,143 @@ +// Type definitions for jenkins 0.20 +// Project: https://github.com/silas/node-jenkins +// Definitions by: rhysd +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace create { + interface JenkinsAPI { + info(callback: (err: Error, data: any) => void): void; + build: { + get(name: string, n: number, callback: (err: Error, data: any) => void): void; + log(name: string, callback: (err: Error, data: any) => void): void; + log(name: string, n: number, callback: (err: Error, data: any) => void): void; + log(name: string, n: number, start: number, callback: (err: Error, data: any) => void): void; + log(name: string, n: number, start: number, type: 'text' | 'html', callback: (err: Error, data: any) => void): void; + log(name: string, n: number, start: number, type: 'text' | 'html', meta: boolean, callback: (err: Error, data: any) => void): void; + logStream(name: string, n: number, type?: 'text' | 'html', delay?: number): NodeJS.ReadableStream; + stop(name: string, n: number, callback: (err: Error) => void): void; + }; + job: { + build(name: string | JobBuildOptions, callback: (err: Error, data: any) => void): void; + build(name: string, parameters: any, callback: (err: Error, data: any) => void): void; + build(name: string, parameters: any, token: string, callback: (err: Error, data: any) => void): void; + config(name: string, callback: (err: Error, data: any) => void): void; + config(name: string, xml: string, callback: (err: Error, data: any) => void): void; + copy(name: string, from: string, callback: (err: Error) => void): void; + create(name: string, xml: string, callback: (err: Error) => void): void; + destroy(name: string, callback: (err: Error) => void): void; + disable(name: string, callback: (err: Error) => void): void; + enable(name: string, callback: (err: Error) => void): void; + exists(name: string, callback: (err: Error, exists: boolean) => void): void; + get(name: string, callback: (err: Error, data: any) => void): void; + list(callback: (err: Error, data: any) => void): void; + }; + node: { + config(name: string, callback: (err: Error, data: any) => void): void; + create(name: string, callback: (err: Error) => void): void; + destroy(name: string, callback: (err: Error) => void): void; + disconnect(name: string, callback: (err: Error) => void): void; + disconnect(name: string, message: string, callback: (err: Error) => void): void; + disable(name: string, callback: (err: Error) => void): void; + disable(name: string, message: string, callback: (err: Error) => void): void; + enable(name: string, callback: (err: Error) => void): void; + exists(name: string, callback: (err: Error, data: boolean) => void): void; + get(name: string, callback: (err: Error, data: any) => void): void; + list(callback: (err: Error, data: any) => void): void; + list(full: boolean, callback: (err: Error, data: any) => void): void; + }; + queue: { + list(callback: (err: Error, data: any) => void): void; + item(n: number, callback: (err: Error, data: any) => void): void; + cancel(n: number, callback: (err: Error) => void): void; + }; + view: { + config(name: string, callback: (err: Error, data: any) => void): void; + config(name: string, xml: string, callback: (err: Error, data: any) => void): void; + create(name: string, type: 'list' | 'my', callback: (err: Error) => void): void; + destroy(name: string, callback: (err: Error) => void): void; + exists(name: string, callback: (err: Error, exists: boolean) => void): void; + get(name: string, callback: (err: Error, data: any) => void): void; + list(callback: (err: Error, data: any) => void): void; + add(name: string, job: string, callback: (err: Error) => void): void; + remove(name: string, job: string, callback: (err: Error) => void): void; + }; + } + + export interface JenkinsPromisifiedAPI { + info(): Promise; + build: { + get(name: string, n: number): Promise; + log(name: string, n: number, start?: number, type?: 'text' | 'html', meta?: boolean): Promise; + logStream(name: string, n: number, type?: 'text' | 'html', delay?: number): Promise; + stop(name: string, n: number): Promise; + }; + job: { + build(name: string, parameters?: any, token?: string): Promise; + build(opts: JobBuildOptions): Promise; + config(name: string, xml?: string): Promise; + copy(name: string, from: string): Promise; + create(name: string, xml: string): Promise; + destroy(name: string): Promise; + disable(name: string): Promise; + enable(name: string): Promise; + exists(name: string): Promise; + get(name: string): Promise; + list(): Promise; + }; + node: { + config(name: string): Promise; + create(name: string): Promise; + destroy(name: string): Promise; + disconnect(name: string, message?: string): Promise; + disable(name: string, message?: string): Promise; + enable(name: string): Promise; + exists(name: string): Promise; + get(name: string): Promise; + list(full?: boolean): Promise; + }; + queue: { + list(): Promise; + item(n: number): Promise; + cancel(n: number): Promise; + }; + view: { + config(name: string, xml?: string): Promise; + create(name: string, type: 'list' | 'my'): Promise; + destroy(name: string): Promise; + exists(name: string): Promise; + get(name: string): Promise; + list(): Promise; + add(name: string, job: string): Promise; + remove(name: string, job: string): Promise; + }; + } + + interface JobBuildOptions { + name: string; + parameters?: any; + token?: string; + } + + interface JenkinsClientOptions { + baseUrl?: string; + crumbIssuer?: boolean; + headers?: any; + promisify?: boolean | ((...args: any[]) => any); + } +} + +declare function create(opts?: { + baseUrl?: string; + crumbIssuer?: boolean; + headers?: any; + promisify?: false; + }): create.JenkinsAPI; +declare function create(opts: { + baseUrl?: string; + crumbIssuer?: boolean; + headers?: any; + promisify: true; + }): create.JenkinsPromisifiedAPI; +export = create; diff --git a/jenkins/jenkins-tests.ts b/jenkins/jenkins-tests.ts new file mode 100644 index 0000000000..c3def89156 --- /dev/null +++ b/jenkins/jenkins-tests.ts @@ -0,0 +1,205 @@ +import * as J from 'jenkins'; + +const jenkins = J({ baseUrl: 'http://user:pass@localhost:8080', crumbIssuer: true }); + +jenkins.info(function(err, data) { + if (err) throw err; + + console.log('info', data); +}); + +jenkins.build.get('example', 1, function(err, data) { + if (err) throw err; + + console.log('build', data); +}); + +jenkins.build.log('example', 1, function(err, data) { + if (err) throw err; + + console.log('log', data); +}); + +var log = jenkins.build.logStream('example', 1); + +log.on('data', function(text: string) { + process.stdout.write(text); +}); + +log.on('error', function(err: Error) { + console.log('error', err); +}); + +log.on('end', function() { + console.log('end'); +}); + +jenkins.build.stop('example', 1, function(err) { + if (err) throw err; +}); + +jenkins.job.build('example', function(err, data) { + if (err) throw err; + + console.log('queue item number', data); +}); + +jenkins.job.build({ name: 'example', parameters: { name: 'value' } }, function(err) { + if (err) throw err; +}); + +jenkins.job.config('example', function(err, data) { + if (err) throw err; + + console.log('xml', data); +}); + +jenkins.job.config('example', '', function(err) { + if (err) throw err; +}); + +jenkins.job.copy('fromJob', 'example', function(err) { + if (err) throw err; +}); + +jenkins.job.create('example', '', function(err) { + if (err) throw err; +}); + +jenkins.job.destroy('example', function(err) { + if (err) throw err; +}); + +jenkins.job.disable('example', function(err) { + if (err) throw err; +}); + +jenkins.job.enable('example', function(err) { + if (err) throw err; +}); + +jenkins.job.exists('example', function(err, exists) { + if (err) throw err; + + console.log('exists', exists); +}); + +jenkins.job.get('example', function(err, data) { + if (err) throw err; + + console.log('job', data); +}); + +jenkins.job.list(function(err, data) { + if (err) throw err; + + console.log('jobs', data); +}); + +jenkins.node.config('example', function(err, data) { + if (err) throw err; + + console.log('xml', data); +}); + +jenkins.node.create('slave', function(err) { + if (err) throw err; +}); + +jenkins.node.destroy('slave', function(err) { + if (err) throw err; +}); + +jenkins.node.disconnect('slave', 'no longer used', function(err) { + if (err) throw err; +}); + +jenkins.node.disable('slave', 'network failure', function(err) { + if (err) throw err; +}); + +jenkins.node.enable('slave', function(err) { + if (err) throw err; +}); + +jenkins.node.exists('slave', function(err, exists) { + if (err) throw err; + + console.log('exists', exists); +}); + +jenkins.node.get('slave', function(err, data) { + if (err) throw err; + + console.log('node', data); +}); + +jenkins.node.list(function(err, data) { + if (err) throw err; + + console.log('nodes', data); +}); + +jenkins.queue.list(function(err, data) { + if (err) throw err; + + console.log('queues', data); +}); + +jenkins.queue.item(130, function(err, data) { + if (err) throw err; + + console.log('item', data); +}); + +jenkins.queue.cancel(23, function(err) { + if (err) throw err; +}); + +jenkins.view.config('example', function(err, data) { + if (err) throw err; + + console.log('xml', data); +}); + +jenkins.view.config('example', '', function(err) { + if (err) throw err; +}); + +jenkins.view.create('example', 'list', function(err) { + if (err) throw err; +}); + +jenkins.view.destroy('example', function(err) { + if (err) throw err; +}); + +jenkins.view.exists('example', function(err, exists) { + if (err) throw err; + + console.log('exists', exists); +}); + +jenkins.view.get('example', function(err, data) { + if (err) throw err; + + console.log('view', data); +}); + +jenkins.view.list(function(err, data) { + if (err) throw err; + + console.log('views', data); +}); + +jenkins.view.add('example', 'jobExample', function(err) { + if (err) throw err; +}); + +jenkins.view.remove('example', 'jobExample', function(err) { + if (err) throw 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; }); diff --git a/jenkins/tsconfig.json b/jenkins/tsconfig.json new file mode 100644 index 0000000000..be94244e2d --- /dev/null +++ b/jenkins/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jenkins-tests.ts" + ] +} diff --git a/jenkins/tslint.json b/jenkins/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/jenkins/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/jest/tsconfig.json b/jest/tsconfig.json index 0987fd539f..3f8a9c6af1 100644 --- a/jest/tsconfig.json +++ b/jest/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": true, diff --git a/jfp/tsconfig.json b/jfp/tsconfig.json index 84f74ceffb..95ad731d40 100644 --- a/jfp/tsconfig.json +++ b/jfp/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jjv/tsconfig.json b/jjv/tsconfig.json index 1247e95975..629fdeb617 100644 --- a/jjv/tsconfig.json +++ b/jjv/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jjve/tsconfig.json b/jjve/tsconfig.json index 3310ea1d01..bd4e171dad 100644 --- a/jjve/tsconfig.json +++ b/jjve/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jodata/tsconfig.json b/jodata/tsconfig.json index 28bcc5bb36..c63117eb21 100644 --- a/jodata/tsconfig.json +++ b/jodata/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/johnny-five/tsconfig.json b/johnny-five/tsconfig.json index f027f26c48..8220fe7f4f 100644 --- a/johnny-five/tsconfig.json +++ b/johnny-five/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/joi/tsconfig.json b/joi/tsconfig.json index e07fa18fed..8d3ca40052 100644 --- a/joi/tsconfig.json +++ b/joi/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/joi/v6/tsconfig.json b/joi/v6/tsconfig.json index b7167c5d4f..dc2b727546 100644 --- a/joi/v6/tsconfig.json +++ b/joi/v6/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -11,7 +13,9 @@ ], "types": [], "paths": { - "joi": ["joi/v6"] + "joi": [ + "joi/v6" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/jointjs/tsconfig.json b/jointjs/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/jointjs/tsconfig.json +++ b/jointjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jpm/tsconfig.json b/jpm/tsconfig.json index e45b537475..5051f9a7bd 100644 --- a/jpm/tsconfig.json +++ b/jpm/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jqgrid/tsconfig.json b/jqgrid/tsconfig.json index afa00f2638..1c50c95496 100644 --- a/jqgrid/tsconfig.json +++ b/jqgrid/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jqrangeslider/tsconfig.json b/jqrangeslider/tsconfig.json index 127eec164b..2484e06a5c 100644 --- a/jqrangeslider/tsconfig.json +++ b/jqrangeslider/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery-ajax-chain/tsconfig.json b/jquery-ajax-chain/tsconfig.json index e9809c97c3..183a1f0d2a 100644 --- a/jquery-ajax-chain/tsconfig.json +++ b/jquery-ajax-chain/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery-alertable/tsconfig.json b/jquery-alertable/tsconfig.json index a6533a8611..a098d1a39a 100644 --- a/jquery-alertable/tsconfig.json +++ b/jquery-alertable/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jquery-backstretch/tsconfig.json b/jquery-backstretch/tsconfig.json index a904d1d577..c8cdd7e38f 100644 --- a/jquery-backstretch/tsconfig.json +++ b/jquery-backstretch/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery-cropbox/tsconfig.json b/jquery-cropbox/tsconfig.json index 96f599725c..29f81906b4 100644 --- a/jquery-cropbox/tsconfig.json +++ b/jquery-cropbox/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery-deparam/tsconfig.json b/jquery-deparam/tsconfig.json index 10da5fb7e7..1ee54a472f 100644 --- a/jquery-deparam/tsconfig.json +++ b/jquery-deparam/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/jquery-easy-loading/tsconfig.json b/jquery-easy-loading/tsconfig.json index faaddb6777..392a80ff8c 100644 --- a/jquery-easy-loading/tsconfig.json +++ b/jquery-easy-loading/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery-fullscreen/tsconfig.json b/jquery-fullscreen/tsconfig.json index f5815d6823..ae805153ca 100644 --- a/jquery-fullscreen/tsconfig.json +++ b/jquery-fullscreen/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery-galleria/tsconfig.json b/jquery-galleria/tsconfig.json index eaf69020b3..a7e73a2902 100644 --- a/jquery-galleria/tsconfig.json +++ b/jquery-galleria/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jquery-handsontable/tsconfig.json b/jquery-handsontable/tsconfig.json index ce2c776521..3be8b88cce 100644 --- a/jquery-handsontable/tsconfig.json +++ b/jquery-handsontable/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery-jsonrpcclient/tsconfig.json b/jquery-jsonrpcclient/tsconfig.json index aa31f649d4..20d202d92d 100644 --- a/jquery-jsonrpcclient/tsconfig.json +++ b/jquery-jsonrpcclient/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery-knob/tsconfig.json b/jquery-knob/tsconfig.json index 5596ca6390..207c14495f 100644 --- a/jquery-knob/tsconfig.json +++ b/jquery-knob/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jquery-mask-plugin/tsconfig.json b/jquery-mask-plugin/tsconfig.json index e805aac8db..2b685d11cf 100644 --- a/jquery-mask-plugin/tsconfig.json +++ b/jquery-mask-plugin/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/jquery-mockjax/tsconfig.json b/jquery-mockjax/tsconfig.json index 2a2131ba87..95708b17ef 100644 --- a/jquery-mockjax/tsconfig.json +++ b/jquery-mockjax/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery-mousewheel/tsconfig.json b/jquery-mousewheel/tsconfig.json index ce8c919278..1285fe551e 100644 --- a/jquery-mousewheel/tsconfig.json +++ b/jquery-mousewheel/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery-param/tsconfig.json b/jquery-param/tsconfig.json index 874a59f15b..6b84279539 100644 --- a/jquery-param/tsconfig.json +++ b/jquery-param/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/jquery-sortable/tsconfig.json b/jquery-sortable/tsconfig.json index ef01bd3418..a01c9497b9 100644 --- a/jquery-sortable/tsconfig.json +++ b/jquery-sortable/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jquery-steps/tsconfig.json b/jquery-steps/tsconfig.json index 276d5e2034..f041763a67 100644 --- a/jquery-steps/tsconfig.json +++ b/jquery-steps/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery-timeentry/tsconfig.json b/jquery-timeentry/tsconfig.json index 1f8e8239ca..0afdeec58b 100644 --- a/jquery-timeentry/tsconfig.json +++ b/jquery-timeentry/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery-truncate-html/tsconfig.json b/jquery-truncate-html/tsconfig.json index cb4ec8418d..7ca5f8dc87 100644 --- a/jquery-truncate-html/tsconfig.json +++ b/jquery-truncate-html/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery-urlparam/tsconfig.json b/jquery-urlparam/tsconfig.json index 8d54bef2bb..868feb3104 100644 --- a/jquery-urlparam/tsconfig.json +++ b/jquery-urlparam/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery-validation-unobtrusive/tsconfig.json b/jquery-validation-unobtrusive/tsconfig.json index 6c0123cec8..11c359fd95 100644 --- a/jquery-validation-unobtrusive/tsconfig.json +++ b/jquery-validation-unobtrusive/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.address/tsconfig.json b/jquery.address/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/jquery.address/tsconfig.json +++ b/jquery.address/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.ajaxfile/tsconfig.json b/jquery.ajaxfile/tsconfig.json index 04879c4deb..f17ec1e4af 100644 --- a/jquery.ajaxfile/tsconfig.json +++ b/jquery.ajaxfile/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.are-you-sure/tsconfig.json b/jquery.are-you-sure/tsconfig.json index e5c17dc351..d4018d19e4 100644 --- a/jquery.are-you-sure/tsconfig.json +++ b/jquery.are-you-sure/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.autosize/tsconfig.json b/jquery.autosize/tsconfig.json index d07fa8f535..5a530e4173 100644 --- a/jquery.autosize/tsconfig.json +++ b/jquery.autosize/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.base64/tsconfig.json b/jquery.base64/tsconfig.json index 8c01f3e53c..db6880328f 100644 --- a/jquery.base64/tsconfig.json +++ b/jquery.base64/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.bbq/tsconfig.json b/jquery.bbq/tsconfig.json index a3d8adba49..776f038eab 100644 --- a/jquery.bbq/tsconfig.json +++ b/jquery.bbq/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jquery.blockui/tsconfig.json b/jquery.blockui/tsconfig.json index 70b0f9a8aa..33f90965d1 100644 --- a/jquery.blockui/tsconfig.json +++ b/jquery.blockui/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.bootstrap.wizard/tsconfig.json b/jquery.bootstrap.wizard/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/jquery.bootstrap.wizard/tsconfig.json +++ b/jquery.bootstrap.wizard/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.cleditor/tsconfig.json b/jquery.cleditor/tsconfig.json index c1b9f27e8e..e2c0c30f28 100644 --- a/jquery.cleditor/tsconfig.json +++ b/jquery.cleditor/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.clientsidelogging/tsconfig.json b/jquery.clientsidelogging/tsconfig.json index 0bfce0b33c..de9b88ffd8 100644 --- a/jquery.clientsidelogging/tsconfig.json +++ b/jquery.clientsidelogging/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jquery.color/tsconfig.json b/jquery.color/tsconfig.json index 77a9f845b0..e14fefd574 100644 --- a/jquery.color/tsconfig.json +++ b/jquery.color/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.colorbox/tsconfig.json b/jquery.colorbox/tsconfig.json index cc62dbd5cc..612676d352 100644 --- a/jquery.colorbox/tsconfig.json +++ b/jquery.colorbox/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jquery.colorpicker/tsconfig.json b/jquery.colorpicker/tsconfig.json index 013f368783..aa2710147b 100644 --- a/jquery.colorpicker/tsconfig.json +++ b/jquery.colorpicker/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jquery.contextmenu/tsconfig.json b/jquery.contextmenu/tsconfig.json index 4e684a80b0..46294d4b9c 100644 --- a/jquery.contextmenu/tsconfig.json +++ b/jquery.contextmenu/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.cookie/tsconfig.json b/jquery.cookie/tsconfig.json index 7515dcb539..4152cf2b73 100644 --- a/jquery.cookie/tsconfig.json +++ b/jquery.cookie/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.customselect/tsconfig.json b/jquery.customselect/tsconfig.json index a82625409d..1ba0efba9e 100644 --- a/jquery.customselect/tsconfig.json +++ b/jquery.customselect/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.cycle/tsconfig.json b/jquery.cycle/tsconfig.json index 9a3a9b93d2..6df1a02bb3 100644 --- a/jquery.cycle/tsconfig.json +++ b/jquery.cycle/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jquery.cycle2/tsconfig.json b/jquery.cycle2/tsconfig.json index abd6f3b0e4..d67131d9ad 100644 --- a/jquery.cycle2/tsconfig.json +++ b/jquery.cycle2/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jquery.datatables/tsconfig.json b/jquery.datatables/tsconfig.json index edb98f9b94..0831b7cc76 100644 --- a/jquery.datatables/tsconfig.json +++ b/jquery.datatables/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jquery.dropotron/tsconfig.json b/jquery.dropotron/tsconfig.json index 45264ed705..cd856d5abf 100644 --- a/jquery.dropotron/tsconfig.json +++ b/jquery.dropotron/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.dynatree/tsconfig.json b/jquery.dynatree/tsconfig.json index dba6191850..18a8b83b88 100644 --- a/jquery.dynatree/tsconfig.json +++ b/jquery.dynatree/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.elang/tsconfig.json b/jquery.elang/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/jquery.elang/tsconfig.json +++ b/jquery.elang/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.fancytree/tsconfig.json b/jquery.fancytree/tsconfig.json index 946827dd7a..0d9e0b9fd9 100644 --- a/jquery.fancytree/tsconfig.json +++ b/jquery.fancytree/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.fileupload/tsconfig.json b/jquery.fileupload/tsconfig.json index 5294cd54c7..2bdcd8e57a 100644 --- a/jquery.fileupload/tsconfig.json +++ b/jquery.fileupload/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.finger/tsconfig.json b/jquery.finger/tsconfig.json index c8579e72c0..52d43523c7 100644 --- a/jquery.finger/tsconfig.json +++ b/jquery.finger/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jquery.flagstrap/tsconfig.json b/jquery.flagstrap/tsconfig.json index 0339a961e4..0ef25065fb 100644 --- a/jquery.flagstrap/tsconfig.json +++ b/jquery.flagstrap/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.form/tsconfig.json b/jquery.form/tsconfig.json index 8a2e0a3b94..2b318e02d3 100644 --- a/jquery.form/tsconfig.json +++ b/jquery.form/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.fullscreen/tsconfig.json b/jquery.fullscreen/tsconfig.json index 6369a8e728..5d0d9c9b8e 100644 --- a/jquery.fullscreen/tsconfig.json +++ b/jquery.fullscreen/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.gridster/tsconfig.json b/jquery.gridster/tsconfig.json index 5bae952a15..194b6347b8 100644 --- a/jquery.gridster/tsconfig.json +++ b/jquery.gridster/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.highlight-bartaz/tsconfig.json b/jquery.highlight-bartaz/tsconfig.json index ebe7acecff..ac76c95cf0 100644 --- a/jquery.highlight-bartaz/tsconfig.json +++ b/jquery.highlight-bartaz/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.jnotify/tsconfig.json b/jquery.jnotify/tsconfig.json index 8834185f5e..18fa0b35f3 100644 --- a/jquery.jnotify/tsconfig.json +++ b/jquery.jnotify/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.joyride/tsconfig.json b/jquery.joyride/tsconfig.json index effdc2a77b..ceb432e871 100644 --- a/jquery.joyride/tsconfig.json +++ b/jquery.joyride/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jquery.jsignature/tsconfig.json b/jquery.jsignature/tsconfig.json index 5f0c68914d..51d24c12bb 100644 --- a/jquery.jsignature/tsconfig.json +++ b/jquery.jsignature/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.leanmodal/tsconfig.json b/jquery.leanmodal/tsconfig.json index a9a32b6d34..a4a5f01b57 100644 --- a/jquery.leanmodal/tsconfig.json +++ b/jquery.leanmodal/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.livestampjs/tsconfig.json b/jquery.livestampjs/tsconfig.json index 2e808698e8..397c2367a4 100644 --- a/jquery.livestampjs/tsconfig.json +++ b/jquery.livestampjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.menuaim/tsconfig.json b/jquery.menuaim/tsconfig.json index cc98144100..3d80f2be05 100644 --- a/jquery.menuaim/tsconfig.json +++ b/jquery.menuaim/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.mmenu/tsconfig.json b/jquery.mmenu/tsconfig.json index 33da17a3d3..09d17e6520 100644 --- a/jquery.mmenu/tsconfig.json +++ b/jquery.mmenu/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.notifybar/tsconfig.json b/jquery.notifybar/tsconfig.json index 587dec244d..7265920772 100644 --- a/jquery.notifybar/tsconfig.json +++ b/jquery.notifybar/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.noty/tsconfig.json b/jquery.noty/tsconfig.json index bf97b93a4d..9661cf12ad 100644 --- a/jquery.noty/tsconfig.json +++ b/jquery.noty/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.payment/tsconfig.json b/jquery.payment/tsconfig.json index 48dedd0dff..e9372ea856 100644 --- a/jquery.payment/tsconfig.json +++ b/jquery.payment/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.pjax.falsandtru/tsconfig.json b/jquery.pjax.falsandtru/tsconfig.json index 7c619d7288..3db6965589 100644 --- a/jquery.pjax.falsandtru/tsconfig.json +++ b/jquery.pjax.falsandtru/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.pjax/tsconfig.json b/jquery.pjax/tsconfig.json index eafe636c08..e48007101b 100644 --- a/jquery.pjax/tsconfig.json +++ b/jquery.pjax/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.placeholder/tsconfig.json b/jquery.placeholder/tsconfig.json index 98b5ff2795..af2cc1f64a 100644 --- a/jquery.placeholder/tsconfig.json +++ b/jquery.placeholder/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.pnotify/tsconfig.json b/jquery.pnotify/tsconfig.json index 6169458adc..d99c539d32 100644 --- a/jquery.pnotify/tsconfig.json +++ b/jquery.pnotify/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.postmessage/tsconfig.json b/jquery.postmessage/tsconfig.json index dd298d2aa0..771fb98481 100644 --- a/jquery.postmessage/tsconfig.json +++ b/jquery.postmessage/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.prettyphoto/tsconfig.json b/jquery.prettyphoto/tsconfig.json index a15dbc310d..ef0512e746 100644 --- a/jquery.prettyphoto/tsconfig.json +++ b/jquery.prettyphoto/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.qrcode/tsconfig.json b/jquery.qrcode/tsconfig.json index e9934bfde6..309365ed73 100644 --- a/jquery.qrcode/tsconfig.json +++ b/jquery.qrcode/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.rateit/tsconfig.json b/jquery.rateit/tsconfig.json index 50c9d67d7e..185c5f4e7d 100644 --- a/jquery.rateit/tsconfig.json +++ b/jquery.rateit/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/jquery.rowgrid/tsconfig.json b/jquery.rowgrid/tsconfig.json index 314bc2a671..84db5db709 100644 --- a/jquery.rowgrid/tsconfig.json +++ b/jquery.rowgrid/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.scrollto/tsconfig.json b/jquery.scrollto/tsconfig.json index 94f73774ed..76d7d92230 100644 --- a/jquery.scrollto/tsconfig.json +++ b/jquery.scrollto/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.simplemodal/tsconfig.json b/jquery.simplemodal/tsconfig.json index 35abee3b7e..07eb011fc3 100644 --- a/jquery.simplemodal/tsconfig.json +++ b/jquery.simplemodal/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.simplepagination/tsconfig.json b/jquery.simplepagination/tsconfig.json index 02376bb00c..d5bdf027a7 100644 --- a/jquery.simplepagination/tsconfig.json +++ b/jquery.simplepagination/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.simulate/tsconfig.json b/jquery.simulate/tsconfig.json index 6c7f6ee1c4..01f84a456c 100644 --- a/jquery.simulate/tsconfig.json +++ b/jquery.simulate/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.slimscroll/tsconfig.json b/jquery.slimscroll/tsconfig.json index 30c61554bc..7c9121b767 100644 --- a/jquery.slimscroll/tsconfig.json +++ b/jquery.slimscroll/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.soap/tsconfig.json b/jquery.soap/tsconfig.json index 709d4d6740..80ceefd908 100644 --- a/jquery.soap/tsconfig.json +++ b/jquery.soap/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jquery.sortelements/tsconfig.json b/jquery.sortelements/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/jquery.sortelements/tsconfig.json +++ b/jquery.sortelements/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.superlink/tsconfig.json b/jquery.superlink/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/jquery.superlink/tsconfig.json +++ b/jquery.superlink/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.tagsmanager/tsconfig.json b/jquery.tagsmanager/tsconfig.json index 6ddb3a1e63..8f2ee0be57 100644 --- a/jquery.tagsmanager/tsconfig.json +++ b/jquery.tagsmanager/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.tile/tsconfig.json b/jquery.tile/tsconfig.json index 242830aabb..6d92372e66 100644 --- a/jquery.tile/tsconfig.json +++ b/jquery.tile/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.timeago/tsconfig.json b/jquery.timeago/tsconfig.json index fc618e9d77..ed37be4b46 100644 --- a/jquery.timeago/tsconfig.json +++ b/jquery.timeago/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.timepicker/tsconfig.json b/jquery.timepicker/tsconfig.json index 2ddb71fe81..3245ae44b9 100644 --- a/jquery.timepicker/tsconfig.json +++ b/jquery.timepicker/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.timer/tsconfig.json b/jquery.timer/tsconfig.json index f86488d779..65cef6c01d 100644 --- a/jquery.timer/tsconfig.json +++ b/jquery.timer/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.tinycarousel/tsconfig.json b/jquery.tinycarousel/tsconfig.json index 99307d7b82..3963118c45 100644 --- a/jquery.tinycarousel/tsconfig.json +++ b/jquery.tinycarousel/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.tinyscrollbar/tsconfig.json b/jquery.tinyscrollbar/tsconfig.json index a1ecc1f49e..567041d00a 100644 --- a/jquery.tinyscrollbar/tsconfig.json +++ b/jquery.tinyscrollbar/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.tipsy/tsconfig.json b/jquery.tipsy/tsconfig.json index 528d81eb76..83ad4e016e 100644 --- a/jquery.tipsy/tsconfig.json +++ b/jquery.tipsy/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jquery.tooltipster/tsconfig.json b/jquery.tooltipster/tsconfig.json index 3c58e7c6a0..baa3c3bdc6 100644 --- a/jquery.tooltipster/tsconfig.json +++ b/jquery.tooltipster/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jquery.total-storage/tsconfig.json b/jquery.total-storage/tsconfig.json index 47c96c36ac..9348a6fe20 100644 --- a/jquery.total-storage/tsconfig.json +++ b/jquery.total-storage/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.transit/tsconfig.json b/jquery.transit/tsconfig.json index 2678792dd9..8afd176026 100644 --- a/jquery.transit/tsconfig.json +++ b/jquery.transit/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.ui.datetimepicker/tsconfig.json b/jquery.ui.datetimepicker/tsconfig.json index 613e675e35..877cb4a059 100644 --- a/jquery.ui.datetimepicker/tsconfig.json +++ b/jquery.ui.datetimepicker/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.ui.layout/tsconfig.json b/jquery.ui.layout/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/jquery.ui.layout/tsconfig.json +++ b/jquery.ui.layout/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.uniform/tsconfig.json b/jquery.uniform/tsconfig.json index 053756a842..a419dc1316 100644 --- a/jquery.uniform/tsconfig.json +++ b/jquery.uniform/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.validation/tsconfig.json b/jquery.validation/tsconfig.json index a7d80a04dc..6c399dc97d 100644 --- a/jquery.validation/tsconfig.json +++ b/jquery.validation/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jquery.watermark/tsconfig.json b/jquery.watermark/tsconfig.json index 9a0ebb3533..703e25a8f9 100644 --- a/jquery.watermark/tsconfig.json +++ b/jquery.watermark/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery.window/tsconfig.json b/jquery.window/tsconfig.json index 3c5352acbb..c8d0b1e197 100644 --- a/jquery.window/tsconfig.json +++ b/jquery.window/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jquery/tsconfig.json b/jquery/tsconfig.json index b9e1d74929..1edb6aed47 100644 --- a/jquery/tsconfig.json +++ b/jquery/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jquerymobile/tsconfig.json b/jquerymobile/tsconfig.json index 846f8eedc8..b98fd820f3 100644 --- a/jquerymobile/tsconfig.json +++ b/jquerymobile/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jqueryui/tsconfig.json b/jqueryui/tsconfig.json index 4dad6ec77a..af4d1d59a3 100644 --- a/jqueryui/tsconfig.json +++ b/jqueryui/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/js-base64/tsconfig.json b/js-base64/tsconfig.json index 89dca69d28..08d45d098d 100644 --- a/js-base64/tsconfig.json +++ b/js-base64/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/js-beautify/tsconfig.json b/js-beautify/tsconfig.json index 2e08bbd021..fb4bf8241a 100644 --- a/js-beautify/tsconfig.json +++ b/js-beautify/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/js-clipper/tsconfig.json b/js-clipper/tsconfig.json index 7b85bf4a2b..9429aa9612 100644 --- a/js-clipper/tsconfig.json +++ b/js-clipper/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/js-combinatorics/tsconfig.json b/js-combinatorics/tsconfig.json index 4db8a8c27c..d2c753f35b 100644 --- a/js-combinatorics/tsconfig.json +++ b/js-combinatorics/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/js-cookie/tsconfig.json b/js-cookie/tsconfig.json index ad6a773d0e..affebaaebb 100644 --- a/js-cookie/tsconfig.json +++ b/js-cookie/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/js-data-angular/tsconfig.json b/js-data-angular/tsconfig.json index 5017c6dc80..398cd19fdb 100644 --- a/js-data-angular/tsconfig.json +++ b/js-data-angular/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/js-data-http/tsconfig.json b/js-data-http/tsconfig.json index f734e9aa1f..d0a5b9be34 100644 --- a/js-data-http/tsconfig.json +++ b/js-data-http/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/js-data/tsconfig.json b/js-data/tsconfig.json index 704a0874a3..907e683d8f 100644 --- a/js-data/tsconfig.json +++ b/js-data/tsconfig.json @@ -5,7 +5,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/js-data/v1/tsconfig.json b/js-data/v1/tsconfig.json index c0af79f5ce..87913d79e6 100644 --- a/js-data/v1/tsconfig.json +++ b/js-data/v1/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, @@ -11,7 +13,9 @@ ], "types": [], "paths": { - "js-data": ["js-data/v1"] + "js-data": [ + "js-data/v1" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/js-fixtures/tsconfig.json b/js-fixtures/tsconfig.json index 3c1a51cf41..b67bb5ae6f 100644 --- a/js-fixtures/tsconfig.json +++ b/js-fixtures/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/js-git/tsconfig.json b/js-git/tsconfig.json index 13b6ca215a..ca3d040658 100644 --- a/js-git/tsconfig.json +++ b/js-git/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/js-md5/tsconfig.json b/js-md5/tsconfig.json index 1b5b2dd795..eceeb1fb3d 100644 --- a/js-md5/tsconfig.json +++ b/js-md5/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/js-priority-queue/tsconfig.json b/js-priority-queue/tsconfig.json index d2a1050e4d..d18a5435ed 100644 --- a/js-priority-queue/tsconfig.json +++ b/js-priority-queue/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/js-quantities/tsconfig.json b/js-quantities/tsconfig.json index c41d2d2197..4c9210e2f0 100644 --- a/js-quantities/tsconfig.json +++ b/js-quantities/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "js-quantities-tests.ts" ] -} +} \ No newline at end of file diff --git a/js-schema/tsconfig.json b/js-schema/tsconfig.json index b851d86f2d..2df3a57592 100644 --- a/js-schema/tsconfig.json +++ b/js-schema/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/js-url/tsconfig.json b/js-url/tsconfig.json index a0e23599ef..cac2845fc8 100644 --- a/js-url/tsconfig.json +++ b/js-url/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/js-yaml/tsconfig.json b/js-yaml/tsconfig.json index 5006b41c80..5e00bebcd7 100644 --- a/js-yaml/tsconfig.json +++ b/js-yaml/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsbn/tsconfig.json b/jsbn/tsconfig.json index efbe0adcc7..22fbcb3675 100644 --- a/jsbn/tsconfig.json +++ b/jsbn/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jscrollpane/tsconfig.json b/jscrollpane/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/jscrollpane/tsconfig.json +++ b/jscrollpane/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsdeferred/tsconfig.json b/jsdeferred/tsconfig.json index c264eabafa..b65528ce33 100644 --- a/jsdeferred/tsconfig.json +++ b/jsdeferred/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsdom/tsconfig.json b/jsdom/tsconfig.json index 87c4f4063f..b18f0d0264 100644 --- a/jsdom/tsconfig.json +++ b/jsdom/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsen/tsconfig.json b/jsen/tsconfig.json index 4396b0d5dd..946696fc78 100644 --- a/jsen/tsconfig.json +++ b/jsen/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsend/tsconfig.json b/jsend/tsconfig.json index 77a976107a..5614ffe7d9 100644 --- a/jsend/tsconfig.json +++ b/jsend/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsesc/tsconfig.json b/jsesc/tsconfig.json index 53ec6fda59..4ed5441108 100644 --- a/jsesc/tsconfig.json +++ b/jsesc/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsfl/tsconfig.json b/jsfl/tsconfig.json index 9549c831eb..b994fee043 100644 --- a/jsfl/tsconfig.json +++ b/jsfl/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jshamcrest/tsconfig.json b/jshamcrest/tsconfig.json index b005dc08cf..0f9cb7d631 100644 --- a/jshamcrest/tsconfig.json +++ b/jshamcrest/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsmockito/tsconfig.json b/jsmockito/tsconfig.json index 10ee15d676..8b3d3159c4 100644 --- a/jsmockito/tsconfig.json +++ b/jsmockito/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/jsnlog/tsconfig.json b/jsnlog/tsconfig.json index b43efb474f..c42c9adc71 100644 --- a/jsnlog/tsconfig.json +++ b/jsnlog/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsnox/tsconfig.json b/jsnox/tsconfig.json index cf186d6be8..0cbbb155a7 100644 --- a/jsnox/tsconfig.json +++ b/jsnox/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/json-editor/tsconfig.json b/json-editor/tsconfig.json index 116614c54a..bc5d6e584c 100644 --- a/json-editor/tsconfig.json +++ b/json-editor/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/json-merge-patch/tsconfig.json b/json-merge-patch/tsconfig.json index e2b7a55005..c6552713b4 100644 --- a/json-merge-patch/tsconfig.json +++ b/json-merge-patch/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/json-patch/tsconfig.json b/json-patch/tsconfig.json index 38e5e2f933..e3c8bb16c9 100644 --- a/json-patch/tsconfig.json +++ b/json-patch/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/json-pointer/tsconfig.json b/json-pointer/tsconfig.json index 3f21cc02c0..9c4e6d2268 100644 --- a/json-pointer/tsconfig.json +++ b/json-pointer/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/json-socket/tsconfig.json b/json-socket/tsconfig.json index af4416a528..1306eb983e 100644 --- a/json-socket/tsconfig.json +++ b/json-socket/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/json-stable-stringify/tsconfig.json b/json-stable-stringify/tsconfig.json index 2f1365f2e6..65e9568adf 100644 --- a/json-stable-stringify/tsconfig.json +++ b/json-stable-stringify/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/json5/tsconfig.json b/json5/tsconfig.json index 15c1be124c..4e568c642d 100644 --- a/json5/tsconfig.json +++ b/json5/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsoneditor/tsconfig.json b/jsoneditor/tsconfig.json index 6999622d66..3a2fdc86a6 100644 --- a/jsoneditor/tsconfig.json +++ b/jsoneditor/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsoneditoronline/tsconfig.json b/jsoneditoronline/tsconfig.json index 1b581e3fc9..0a67259635 100644 --- a/jsoneditoronline/tsconfig.json +++ b/jsoneditoronline/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsonminify/tsconfig.json b/jsonminify/tsconfig.json index d37f5f2d1d..64ee314bf6 100644 --- a/jsonminify/tsconfig.json +++ b/jsonminify/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/jsonnet/tsconfig.json b/jsonnet/tsconfig.json index a6bd34192c..f890873469 100644 --- a/jsonnet/tsconfig.json +++ b/jsonnet/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsonpath/tsconfig.json b/jsonpath/tsconfig.json index 040cb1f903..1ac9df8aba 100644 --- a/jsonpath/tsconfig.json +++ b/jsonpath/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsonschema/tsconfig.json b/jsonschema/tsconfig.json index a0f0ead3fe..d2f3e4dcab 100644 --- a/jsonschema/tsconfig.json +++ b/jsonschema/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsonstream/tsconfig.json b/jsonstream/tsconfig.json index 5bbfe2febc..84138c9dec 100644 --- a/jsonstream/tsconfig.json +++ b/jsonstream/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsonwebtoken/tsconfig.json b/jsonwebtoken/tsconfig.json index 4af6fb8236..058e7360ce 100644 --- a/jsonwebtoken/tsconfig.json +++ b/jsonwebtoken/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jspdf/tsconfig.json b/jspdf/tsconfig.json index e975982f3b..90c6d0a5b6 100644 --- a/jspdf/tsconfig.json +++ b/jspdf/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsplumb/tsconfig.json b/jsplumb/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/jsplumb/tsconfig.json +++ b/jsplumb/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsrender/tsconfig.json b/jsrender/tsconfig.json index 7320480007..5044b0e8ad 100644 --- a/jsrender/tsconfig.json +++ b/jsrender/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jss/tsconfig.json b/jss/tsconfig.json index 30bba23fd0..c600a58c9e 100644 --- a/jss/tsconfig.json +++ b/jss/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jssha/tsconfig.json b/jssha/tsconfig.json index 1b60bc3293..ce8218b5d7 100644 --- a/jssha/tsconfig.json +++ b/jssha/tsconfig.json @@ -5,7 +5,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jstimezonedetect/tsconfig.json b/jstimezonedetect/tsconfig.json index 7ba4265597..ba9295edd9 100644 --- a/jstimezonedetect/tsconfig.json +++ b/jstimezonedetect/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/jstorage/tsconfig.json b/jstorage/tsconfig.json index a7798855e3..554abb6d04 100644 --- a/jstorage/tsconfig.json +++ b/jstorage/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jstree/tsconfig.json b/jstree/tsconfig.json index 6c8e07b6e1..ba230e68f1 100644 --- a/jstree/tsconfig.json +++ b/jstree/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsts/tsconfig.json b/jsts/tsconfig.json index 71b20aa63c..302e50d103 100644 --- a/jsts/tsconfig.json +++ b/jsts/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsuite/tsconfig.json b/jsuite/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/jsuite/tsconfig.json +++ b/jsuite/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsuri/tsconfig.json b/jsuri/tsconfig.json index 67ed1bd3bf..d065e68f57 100644 --- a/jsuri/tsconfig.json +++ b/jsuri/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsurl/tsconfig.json b/jsurl/tsconfig.json index 5d4ec1fc24..0508fb02fc 100644 --- a/jsurl/tsconfig.json +++ b/jsurl/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jsx-chai/tsconfig.json b/jsx-chai/tsconfig.json index 4b00c46ca6..7995cb00dc 100644 --- a/jsx-chai/tsconfig.json +++ b/jsx-chai/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jszip/tsconfig.json b/jszip/tsconfig.json index 63366717a3..02f0123b77 100644 --- a/jszip/tsconfig.json +++ b/jszip/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jug/tsconfig.json b/jug/tsconfig.json index 02c0c38ebc..174d7c3d87 100644 --- a/jug/tsconfig.json +++ b/jug/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jui-core/index.d.ts b/jui-core/index.d.ts new file mode 100644 index 0000000000..0f1184c0a3 --- /dev/null +++ b/jui-core/index.d.ts @@ -0,0 +1,824 @@ +// Type definitions for jui-core 2.0 +// Project: https://github.com/juijs/jui-core +// Definitions by: JinHo Park +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare var jui: JuiStatic; + +interface UtilBase { + /** + * @property browser check browser agent + * @property {Boolean} browser.webkit Webkit 브라우저 체크 + * @property {Boolean} browser.mozilla Mozilla 브라우저 체크 + * @property {Boolean} browser.msie IE 브라우저 체크 */ + browser: { + webkit: boolean, + mozilla: boolean, + msie: boolean + }; + + /** + * @property {Boolean} isTouch + * check touch device + */ + isTouch: boolean; + + /** + * @method inherit + * + * 프로토타입 기반의 상속 제공 + * + * @param {Function} ctor base Class + * @param {Function} superCtor super Class + */ + inherit( ctor: ((...args: any[]) => any), superCtor: ((...args: any[]) => any) ): void; + + /** + * @method extend + * + * implements object extend + * + * @param {Object|Function} origin + * @param {Object|Function} add + * @param {Boolean} skip + * @return {Object} + */ + extend(origin: any, add: any, skip: boolean): any; + + /** + * convert px to integer + * @param {String or Number} px + * @return {Number} + */ + pxToInt(px: string| number): number; + + /** + * @method clone + * implements object clone + * @param {Array/Object} obj 복사할 객체 + * @return {Array} + */ + clone(obj: any): any[]; + + /** + * @method deepClone + * implements object deep clone + * @param obj + * @param emit + * @return {*} + */ + deepClone(obj: any, emit: any): any[]; + + /** + * @method sort + * use QuickSort + * @param {Array} array + * @return {QuickSort} + */ + sort(array: any[]): UtilQuickSort; + + /** + * @method runtime + * + * caculate callback runtime + * + * @param {String} name + * @param {Function} callback + */ + runtime(name: string, callback: ((...args: any[]) => void)): void; + + /** + * @method template + * parsing template string + * @param html + * @param obj + */ + template(html: string, obj?: any): ((obj: any) => string) | string; + + /** + * @method resize + * add event in window resize event + * @param {Function} callback + * @param {Number} ms delay time + */ + resize(callback: ((...args: any[]) => void), ms: number): void; + + /** + * @method index + * + * IndexParser 객체 생성 + * + * @return {KeyParser} + */ + index(): UtilKeyParser; + + /** + * @method chunk + * split array by length + * @param {Array} arr + * @param {Number} len + * @return {Array} + */ + chunk(arr: any[], len: number): any[]; + + /** + * @method typeCheck + * check data type + * @param {String} t type string + * @param {Object} v value object + * @return {Boolean} + */ + typeCheck(typeName: string, value: any): boolean; + + + typeCheckObj(uiObj: any, list: any): void; + + /** + * @method dataToCsv + * + * data 를 csv 로 변환한다. + * + * @param {Array} keys + * @param {Array} dataList + * @param {Number} dataSize + * @return {String} 변환된 csv 문자열 + */ + dataToCsv(keys: string[] , dataList: any[], dataSize: number): string; + + /** + * @method dataToCsv2 + * + * @param {Object} options + * @return {String} + */ + dataToCsv2(options: any): string; + + /** + * @method fileToCsv + * + * file 에서 csv 컨텐츠 로드 + * + * @param {File} file + * @param {Function} callback + */ + fileToCsv(fileText: string, callback: ((data: any) => void)): void; + + /** + * @method csvToBase64 + * + * csv 다운로드 링크로 변환 + * + * @param {String} csv + * @return {String} data uri string + */ + csvToBase64(csv: string): string; + + /** + * @method csvToData + * + * @param {Array} keys + * @param {String} csv + * @param {Number} csvNumber + * @return {Array} + */ + csvToData(keys: string[], csv: string, csvNumber: number): any[]; + + /** + * @method getCsvFields + * + * csv 에서 필드 얻어오기 + * + * @param {Array} fields + * @param {Array} csvFields + * @return {Array} + */ + getCsvFields(fields: string[], csvFields: string[]): string[]; + + /** + * @method svgToBase64 + * + * xml 문자열로 svg datauri 생성 + * + * @param {String} xml + * @return {String} 변환된 data uri 링크 + */ + svgToBase64(xml: string): string; + + /** + * @method dateFormat + * + * implements date format function + * + * yyyy : 4 digits year + * yy : 2 digits year + * y : 1 digit year + * + * @param {Date} date + * @param {String} format date format string + * @param {Boolean} utc + * @return {string} + */ + dateFormat(date: Date, format: string, utc?: boolean): string; + + /** + * @method createId + * + * 유니크 아이디 생성 + * + * @param {String} key prefix string + * @return {String} 생성된 아이디 문자열 + */ + createId(key: string): string; + + /** + * @method btoa + * + * Base64 인코딩 + * + * @return {String} + */ + btoa(input: any): string; + + /** + * @method atob + * + * Base64 디코딩 + * + * @return {Any} + */ + atob(input: string): any; + + /** + * implement async loop without blocking ui + * + * @param {Number} total loop count + * @param {Object} context + * @returns {Function} + */ + timeLoop(total: number, context?: any): ((index: number) => void); + + /** + * @method loop + * + * 최적화된 루프 생성 (5단계로 나눔) + * + * @param {Number} total loop count + * @param {Object} [context=null] + * @return {Function} 최적화된 루프 콜백 (index, groupIndex 2가지 파라미터를 받는다.) + */ + loop(total: number, context?: any): ((index: number, groupIndex: number) => void ); + + /** + * @method loopArray + * + * 배열을 사용해서 최적화된 루프로 생성한다. + * + * + * @param {Array} data 루프로 생성될 배열 + * @param {Object} [context=null] + * @return {Function} 최적화된 루프 콜백 (data, index, groupIndex 3가지 파라미터를 받는다.) + */ + loopArray(data: any[], context?: any): ((data: any, index: number, groupIndex: number) => void ); + + /** + * @method makeIndex + * + * 배열의 키 기반 인덱스를 생성한다. + * + * 개별 값 별로 멀티 인덱스를 생성한다. + * + * @param {Array} data + * @param {String} keyField + * @return {Object} 생성된 인덱스 + */ + makeIndex(data: any[], keyField: string): any; + + /** + * @method startsWith + * Check that it matches the starting string search string. + * + * @param {String} string + * @param {String} searchString + * @param {Number} [position=0] + * @return {Number} position + */ + startsWith(str: string, searchString: string, position?: number): number; + + /** + * @method endsWith + * Check that it matches the end of a string search string. + * + * @param {String} string + * @param {String} searchString + * @return {Number} position + */ + endsWith(str: string, searchString: string, position?: number): number; + + inArray(target: any, list: any[]): number; + + + trim(text: string): string; + + ready: ((...args: any[]) => void); + + param(data: any): string; + + ajax(data: any): void; + + scrollWidth(): number; +} + +interface JuiStatic { + /** + * @method ready + * + * ready 타임에 실행될 callback 정의 + * + * @param {Function} callback + */ + ready(depends?: string[], callback?: (...args: any[]) => void): void; + + /** + * @method defineUI + * + * 사용자가 실제로 사용할 수 있는 UI 클래스를 정의 + * + * @param {String} name 모듈 로드와 상속에 사용될 이름을 정한다. + * @param {Array} depends 'define'이나 'defineUI'로 정의된 클래스나 객체를 인자로 받을 수 있다. + * @param {Function} callback UI 클래스를 해당 콜백 함수 내에서 클래스 형태로 구현하고 리턴해야 한다. + */ + defineUI(name: string, depends: string[], callback: () => void, parent?: string): void; + + /** + * @method define + * + * UI 클래스에서 사용될 클래스를 정의하고, 자유롭게 상속할 수 있는 클래스를 정의 + * + * @param {String} name 모듈 로드와 상속에 사용될 이름을 정한다. + * @param {Array} depends 'define'이나 'defineUI'로 정의된 클래스나 객체를 인자로 받을 수 있다. + * @param {Function} callback UI 클래스를 해당 콜백 함수 내에서 클래스 형태로 구현하고 리턴해야 한다. + * @param {String} parent 상속받을 클래스 + */ + define(name: string, depends: string[], callback: () => void, parent?: string): void; + + /** + * @method redefine + * + * UI 클래스에서 사용될 클래스를 정의하고, 자유롭게 상속할 수 있는 클래스를 정의 + * + * @param {String} name 모듈 로드와 상속에 사용될 이름을 정한다. + * @param {Array} depends 'define'이나 'defineUI'로 정의된 클래스나 객체를 인자로 받을 수 있다. + * @param {Function} callback UI 클래스를 해당 콜백 함수 내에서 클래스 형태로 구현하고 리턴해야 한다. + * @param {String} parent 상속받을 클래스 + */ + redefine(name: string, depends: string[], callback: () => void, parent?: string): void; + + /** + * define과 defineUI로 정의된 클래스 또는 객체를 가져온다. + * + * @param name 가져온 클래스 또는 객체의 이름 + * @return {*} + */ + include(name: string): any; + + /** + * define과 defineUI로 정의된 모든 클래스와 객체를 가져온다. + * + * @return {Array} + */ + includeAll(): any[]; + + /** + * @method add + * Adds a component object created + * + * @param {Object} ui UI instance + */ + add(uiIns: any): void; + + + /** + * @method emit + * Generates a custom event to an applicable component + * + * @param {String} key Selector or UI type + * @param {String} type Event type + * @param {Array} args Event arguments + */ + emit(key: string, type: string, args: any[]): void; + + /** + * @method get + * Gets a component currently created + * + * @param {Integer/String} key + * @returns {Object/Array} UI instance + */ + get(key: number|string): any; + + /** + * @method getAll + * Gets all components currently created + * + * @return {Array} UI instances + */ + getAll(): any[]; + + /** + * @method create + * It is possible to create a component dynamically after the ready point + * + * @param {String} type UI type + * @param {String/DOMElement} selector + * @param {Object} options + * @return {Object} + */ + create(type: string, selector: any, options?: {}): any; +} + +interface UICollection { + destroy(): void; +} + +interface UICore { + + tpl?: any; + + event?: any; + + root?: any; + + /** + * @method emit + * Generates a custom event. The first parameter is the type of a custom event. A function defined as an option or on method is called + * + * @param {String} type Event type + * @param {Function} args Event Arguments + * @return {Mixed} + */ + emit(type: string, args: () => void): any; + + /** + * @method on + * A callback function defined as an on method is run when an emit method is called + * + * @param {String} type Event type + * @param {Function} callback + */ + on(type: string, callback: () => void): void; + + /** + * @method off + * Removes a custom event of an applicable type or callback handler + * + * @param {String} type Event type + */ + off(type: string): void; + + /** + * @method addValid + * Check the parameter type of a UI method and generates an alarm when a wrong value is entered + * + * @param {String} name Method name + * @param {Array} params Parameters + */ + addValid(name: string, params: any[]): void; + + /** + * @method callBefore + * Sets a callback function that is called before a UI method is run + * + * @param {String} name Method name + * @param {Function} callback + * @return {Mixed} + */ + callBefore(name: string, callback: () => void): void; + + /** + * @method callAfter + * Sets a callback function that is called after a UI method is run + * + * @param {String} name Method name + * @param {Function} callback + * @return {Mixed} + */ + callAfter(name: string, callback: () => void): void; + + /** + * @method callDelay + * Sets a callback function and the delay time before/after a UI method is run + * + * @param {String} name Method name + * @param {Function} callback + */ + callDelay(name: string, callObj: () => void): void; + + /** + * @method setTpl + * Dynamically defines the template method of a UI + * + * @param {String} name Template name + * @param {String} html Template markup + */ + setTpl(name: string, html: string): void; + + /** + * @method setOption + * Dynamically defines the options of a UI + * + * @param {String} key + * @param {Mixed} value + */ + setOption(key: string, value: any): void; + + /** + * @method destroy + * Removes all events set in a UI obejct and the DOM element + * + */ + destroy(): void; +} + +//noinspection TypeScriptUnresolvedVariable +export interface UIEvent extends UICore { + + root?: any; + + /** + * @method find + * Get the child element of the root element + * + * @param {String/HTMLElement} Selector + * @returns {*|jQuery} + */ + find(selector: any): JQuery; +} + +export class ColorScale { + domain(color: string, color2: string): this; + ticks(max: number): this; +} + +export interface UtilColor { + /** + * @method format + * + * convert color to format string + * + * // hex + * color.format({ r : 255, g : 255, b : 255 }, 'hex') // #FFFFFF + * + * // rgb + * color.format({ r : 255, g : 255, b : 255 }, 'rgb') // rgba(255, 255, 255, 0.5); + * + * // rgba + * color.format({ r : 255, g : 255, b : 255, a : 0.5 }, 'rgb') // rgba(255, 255, 255, 0.5); + * + * @param {Object} obj obj has r, g, b and a attributes + * @param {"hex"/"rgb"} type format string type + * @returns {*} + */ + format(obj: any, type: string): string; + + /** + * @method scale + * + * get color scale + * + * var c = color.scale().domain('#FF0000', '#00FF00'); + * + * // get middle color + * c(0.5) == #808000 + * + * // get middle color list + * c.ticks(20); // return array , [startColor, ......, endColor ] + * + * @returns {func} scale function + */ + scale(): ColorScale; + + /** + * @method map + * + * create color map + * + * var colorList = color.map(['#352a87', '#0f5cdd', '#00b5a6', '#ffc337', '#fdff00'], count) + * + * @param {Array} color_list + * @param {Number} count a divide number + * @returns {Array} converted color list + */ + map(color_list: string[], count: number): string[]; + + /** + * @method rgb + * + * parse string to rgb color + * + * color.rgb("#FF0000") === { r : 255, g : 0, b : 0 } + * + * color.rgb("rgb(255, 0, 0)") == { r : 255, g : 0, b : } + * + * @param {String} str color string + * @returns {Object} rgb object + */ + rgb(str: string): any; + + /** + * @method HSVtoRGB + * + * convert hsv to rgb + * + * color.HSVtoRGB(0,0,1) === #FFFFF === { r : 255, g : 0, b : 0 } + * + * @param {Number} H hue color number (min : 0, max : 360) + * @param {Number} S Saturation number (min : 0, max : 1) + * @param {Number} V Value number (min : 0, max : 1 ) + * @returns {Object} + */ + HSVtoRGB(H: number, S: number, V: number): any; + + /** + * @method RGBtoHSV + * + * convert rgb to hsv + * + * color.RGBtoHSV(0, 0, 255) === { h : 240, s : 1, v : 1 } === '#FFFF00' + * + * @param {Number} R red color value + * @param {Number} G green color value + * @param {Number} B blue color value + * @return {Object} hsv color code + */ + RGBtoHSV(R: number, G: number, B: number): any; + + /** + * @method lighten + * + * rgb 컬러 밝은 농도로 변환 + * + * @param {String} color RGB color code + * @param {Number} rate 밝은 농도 + * @return {String} + */ + lighten(color: string, rate: number): string; + + /** + * @method darken + * + * rgb 컬러 어두운 농도로 변환 + * + * @param {String} color RGB color code + * @param {Number} rate 어두운 농도 + * @return {String} + */ + darken(color: string, rate: number): string; +} + +interface UtilBase64 { + encode(input: string): string; + decode(input: string): string; +} + +interface UtilKeyParser { + /** + * @method isIndexDepth + * + * @param {String} index + * @return {Boolean} + */ + isIndexDepth(index: string): boolean; + + /** + * @method getIndexList + * + * @param {String} index + * @return {Array} + */ + getIndexList(index: string): boolean; + + /** + * @method changeIndex + * + * + * @param {String} index + * @param {String} targetIndex + * @param {String} rootIndex + * @return {String} + */ + changeIndex(index: string, targetIndex: string, rootIndex: string): string; + + /** + * @method getNextIndex + * + * @param {String} index + * @return {String} + */ + getNextIndex(index: string): string; + + /** + * @method getParentIndex + * + * + * @param {String} index + * @returns {*} + */ + getParentIndex(index: string): string; +} + +interface UtilMath { + /** + * @method rotate + * + * 2d rotate + * + * @param {Number} x + * @param {Number} y + * @param {Number} radian roate 할 radian + * @return {Object} + * @return {Number} return.x 변환된 x + * @return {Number} return.y 변환된 y + * + */ + rotate(x: number, y: number, radian: number): any; + + resize(maxWidth: number, maxHeight: number, objectWidth: number, objectHeight: number): any; + + /** + * @method radian + * + * convert degree to radian + * + * @param {Number} degree + * @return {Number} radian + */ + radian(degree: number): number; + + /** + * @method degree + * + * convert radian to degree + * + * @param {Number} radian + * @return {Number} degree + */ + degree(radian: number): number; + + angle(x1: number, y1: number, x2: number, y2: number): number; + + /** + * @method interpolateNumber + * + * a, b 의 중간값 계산을 위한 callback 함수 만들기 + * + * @param {Number} a first value + * @param {Number} b second value + * @return {Function} + */ + interpolateNumber(a: number, b: number): () => void; + + // 중간값 round 해서 계산하기 + interpolateRound(a: number, b: number): () => void; + + round(num: number, fixed: number): number; + + plus(a: number, b: number): number; + + minus(a: number, b: number): number; + + multi(a: number, b: number): number; + + div(a: number, b: number): number; + + remain(a: number, b: number): number; + + /** + * 특정 구간의 값을 자동으로 계산 + * + * @param {Object} min + * @param {Object} max + * @param {Object} ticks + * @param {Object} isNice + */ + nice(min: number, max: number, ticks: number, isNice: boolean): any; + + matrix(a: T[], b: T[]): T[]; + + matrix3d(a: T[], b: T[]): T[]; + + inverseMatrix3d(a: any[]): any[]; + +} + +export interface UtilScaleOrdinal extends Function { + (x: number): number; + domain(values: any[]): UtilScaleOrdinal; + range(values: any[]): UtilScaleOrdinal; + rangePoints(interval: number, padding?: number): () => void; + rangeBands(interval: number, padding?: number, outerPadding?: number): () => void; + invert(x: number): number; +} + +export type UtilQuickSort = (array: number[], isClone: boolean) => this; diff --git a/jui-core/jui-core-tests.ts b/jui-core/jui-core-tests.ts new file mode 100644 index 0000000000..6cf8a82c98 --- /dev/null +++ b/jui-core/jui-core-tests.ts @@ -0,0 +1,15 @@ +/// + +import {jui, UtilColor, UtilBase} from "./index"; + +jui.ready(["util.color"], function(color: UtilColor) { + console.log(color.rgb("#ff0000")); +}); + +let _ : UtilBase = jui.include("util.base"); + +let str: string = "10"; +console.log(_.typeCheck("string", str)); + +let i: number = 10; +console.log(_.typeCheck("string", i)); diff --git a/jui-core/tsconfig.json b/jui-core/tsconfig.json new file mode 100644 index 0000000000..1328971c9e --- /dev/null +++ b/jui-core/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jui-core-tests.ts" + ] +} diff --git a/jui-core/tslint.json b/jui-core/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/jui-core/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/jui-grid/index.d.ts b/jui-grid/index.d.ts new file mode 100644 index 0000000000..0fee7cc271 --- /dev/null +++ b/jui-grid/index.d.ts @@ -0,0 +1,996 @@ +// Type definitions for jui-grid 2.0 +// Project: https://github.com/juijs/jui-grid +// Definitions by: Jin-Ho Park +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import {UIEvent} from 'jui-core'; + +export interface GridColumn { + (index: number|string): this; + + /** @property {HTMLElement} [element=null] TH element of a specified column */ + element: any; + + /** @property {String} [order="asc"] Column sort state */ + order: "asc"|"desc"; + + /** @property {String} [name=null] Column name */ + name?: string; + + /** @property {Array} data Data from all rows belonging for a specified column */ + data: any[]; + + /** @property {Array} list TD element of all rows belonging to a specified column */ + list: any[]; + + /** @property {Integer} index Column index */ + index: number; + + /** @property {"show"/"hide"/"resize"} [type="show"] The current column state */ + type: "show"|"hide"|"resize"; + + /** @property {Integer} [width=null] Column width */ + width?: number; + + hide(): void; + show(): void; +} + +export interface GridRow { + /** @property {Array} data Data of a specifiedrow. */ + data: any[]; + + /** @property {Integer} seq Data of a sequence. */ + seq: number; + + /** @property {Integer} [rownum=null] The unique number of a child row under the specified parent row if a parent row exists. */ + rownum?: number; + + /** @property {String/Integer} [index=null] Index of a specified row. In the case of a tree structure, a depth is given. */ + index: number|string; + + /** @property {HTMLElement} [element=null] TR element of a specified row. */ + element: any; + + /** @property {Array} list List of TD elements of a specified row. */ + list: any[]; + + /** @property {Object} list List of hidden TD element. */ + hidden: {}; + + /** @property {uix.table.row} parent Variable that refers to the parent row. */ + parent?: GridRow; + + /** @property {Array} children List of child rows. */ + children: any[]; + + /** @property {Integer} [depth=0] The depth of the current row in the case of a tree structure. */ + depth: number; + + /** @property {"open"/"fold"} [type="fold"] State value that indicates whether a child row is shown or hidden. */ + type: "open"|"fold"; + + /** @property {Function} [type="null"] State value that indicates whether a child row is shown or hidden. */ + tpl?: () => void; + + setIndex(rownum: number|string): void; + reload(columns: GridColumn[], seq: any, xssFilter: any): void; + destroy(): void; + isLeaf(): boolean; + fold(): void; + open(): void; + appendChild(row: GridRow): void; + insertChild(rownum: number, row: GridRow, isReload?: any): void; + removeChild(index: number|string): void; + lastChild(): GridRow; + lastChildLeaf(lastRow: GridRow): GridRow|any; + showCell(index: number): void; + hideCell(index: number): void; +} + +export interface GridBase { + appendRow(index: number|string, data?: {}): GridRow; + insertRow(index: number|string, data: {}): GridRow; + updateRow(index: number|string, data: {}): GridRow; + moveRow(index: number|string, targetIndex: number|string): void; + removeRow(index: number|string): void; + openRow(index: number|string): void; + openRowAll(): void; + foldRow(index: number|string): void; + foldRowAll(): void; + removeRows(): void; + sortRows(name: string, isDesc: boolean): void; + appendColumn(tplType: string, dataList: any[]): void; + removeColumn(index: number|string): void; + hideColumn(index: number|string): void; + showColumn(index: number|string): void; + getColumnCount(): number; + getRowCount(): number; + getColumn(index?: number|string): GridColumn|GridColumn[]; + getRow(index?: number|string): GridRow|GridRow[]; + getRowAll(index: number|string): GridRow[]; + getRowParent(index: number|string): GridRow; + setColumn(index: number|string, column: GridColumn): void; + setRow(index: number|string, row: GridRow): void; +} + +export interface GridTable extends UIEvent { + (selector: any, options?: { + tpl?: any, + + event?: any, + /** + * @cfg {Array} [fields=null] + * Sets the name of columns in the order of being displayed on the table screen. + */ + fields?: any[], + + /** + * @cfg {Array} [csv=null] + * Sets the column key shown when converted to a CSV string. + */ + csv?: any[], + + /** + * @cfg {Array} [csvNames=null] + * Sets the name of a column shown when converting to a CSV string, which must be defined in the same order as the CSV option. + */ + csvNames?: any[], + + /** + * @cfg {Array} [csvNumber=null] + * Sets the column key to be changed to a number form when converted to a CSV string. + */ + csvNumber?: any[], + + /** + * @cfg {Array} data + * Sets the initial row list of a table. + */ + data?: any[], + + /** + * @cfg {Boolean/Array} [colshow=false] + * Sets a column index shown when the Show/Hide Column menu is enabled. + */ + colshow?: boolean|any[], + + /** + * @cfg {Boolean} [scroll=false] + * Determines whether to use a table scroll. + */ + scroll?: boolean, + + /** + * @cfg {Integer} [scrollHeight=200] + * Sets the reference height of a body area when using a table scroll. + */ + scrollHeight?: number, + + /** + * @cfg {Integer} [width=0] + * Sets the area of a table. + */ + width?: number, + + /** + * @cfg {Boolean} [expand=false] + * Determines whether to use an extended row area. + */ + expand?: boolean, + + /** + * @cfg {Boolean} [expandEvent=true] + * Sets the Show/Hide state of an extended row area when clicking on a row. + */ + expandEvent?: boolean, + + /** + * @cfg {Boolean|Array} [editRow=false] + * Determines whether to use a modified row area. + */ + editRow?: boolean|any[], + + /** + * @cfg {Boolean} [editEvent=true] + * Sets the Show/Hide state of an extended row area when doubleclicking on a row/cell. + */ + editEvent?: boolean, + + /** + * @cfg {Boolean} [resize=false] + * Determines whether to use the column resizing function. + */ + resize?: boolean, + + /** + * @cfg {Boolean/Array} [sort=false] + * Determines whether to use the table sort function. + */ + sort?: boolean|any[], + + /** + * @cfg {Integer} [sortIndex=null] + * Determines whether to use the table sort function. + */ + sortIndex?: number, + + /** + * @cfg {String} [sortOrder="asc"] + * Determines whether to use the table sort function. + */ + sortOrder?: "asc"|"desc", + + /** + * @cfg {Boolean} [sortEvent=true] + * Determines whether to use the sort function when you click on a column. + */ + sortEvent?: boolean, + + /** + * @cfg {Boolean} [moveRow=false] + * Determines whether to use the move function when you fire row draggable event. + */ + moveRow?: boolean, + + }): this; + + root?: any; + + /** + * @method update + * Updates the list of rows or modifies the row at a specified index. + * + * @param {Array} rows + */ + update(indexOrRows?: any, rows?: any): void; + /** + * @method updateTree + * It is possible to configure a tree table using an object array with the index and data properties. + * + * @param {Array} rows + */ + updateTree(rows: any[]): void; + + /** + * @method append + * Add a row or a child row to at a specified index. + * + * @param {RowObject} row + */ + append(rowOrIndex?: number|any, row?: any): void; + + /** + * @method insert + * Adds a row at a specified index. + * + * @param {Integer} index + * @param {RowObject} row + */ + insert(index: number, dataList: {}): void; + + /** + * @method select + * Adds a selected class to a row at a specified index and gets an instance of the applicable row. + * + * @param {Integer} index + * @return {RowObject} row + */ + select(index: number): GridRow; + + /** + * @method unselect + * Removes a selected class from a selected row and gets an instance of the row in question. + * + * @return {RowObject} row + */ + unselect(): GridRow; + + /** + * @method check + * Add a checked class to a row at a specified index. + * + * @param {Integer} index + */ + check(index: number): void; + + /** + * @method uncheck + * Removes a checked class from a row at a specified index. + * + * @param {Integer} index + */ + uncheck(index: number): void; + + /** + * @method uncheckAll + * Removes checked classes from all rows. + */ + uncheckAll(): void; + + /** + * @method remove + * Remove a row at a specified index. + * + * @param {Integer} index + */ + remove(index: number): void; + + /** + * @method reset + * Removes all rows. + */ + reset(): void; + + /** + * @method move + * Moves a row iat a specified index to the target index. + * + * @param {Integer} index + * @param {Integer} targetIndex + */ + move(index: number, targetIndex: number): void; + + /** + * @method sort + * Moves a row iat a specified index to the target index. + * + * @param {Integer} index + * @param {String} order "asc" or "desc" + */ + sort(index: number, order: string, e?: any): void; + + /** + * @method scroll + * Sets the scroll based on the height of a table. + * + * @param {Integer} height + */ + scroll(height: number): void; + + /** + * @method open + * Shows a child row of a specified index. + * + * @param {Integer} index + */ + open(index: number): void; + + /** + * @method fold + * Hides a child row of a specified index. + * + * @param {Integer} index + */ + fold(index: number): void; + + /** + * @method openAll + * Shows all child rows of a specified index. + */ + openAll(): void; + + /** + * @method foldAll + * Hides all child rows of a specified index. + */ + foldAll(): void; + + /** + * @method resize + * Resets the inner scroll and columns of a table. + */ + resize(): void; + + /** + * @method resizeColumns + * Resets the sizes of all columns of a table. + */ + resizeColumns(): void; + + /** + * @method size + * Gets the size of all the rows of a table. + * + * @return {Integer} size + */ + size(): number; + + /** + * @method count + * Gets the number of trows of a table. + * + * @return {Integer} count + */ + count(): number; + + /** + * @method list + * Gets all the rows of a table. + * + * @return {Array} rows + */ + list(): GridRow[]; + + /** + * @method listData + * Gets the data of all the rows of a table. + * + * @return {Array} datas + */ + listData(): any[]; + + /** + * @method listAll + * Gets all the rows of a table including child rows. + * + * @return {Array} rows + */ + listAll(): GridRow[]; + + /** + * @method listChecked + * Gets all rows in a check state. + * + * @return {Array} rows + */ + listChecked(): GridRow[]; + + /** + * @method listColumn + * Gets all columns. + * + * @return {Array} columns + */ + listColumn(): GridColumn; + + /** + * @method get + * Gets the row at the specified index. + * + * @param {Integer} index + * @return {RowObject} row + */ + get(index: number): GridRow; + + /** + * @method getAll + * Gets all rows of at the specified index including child rows. + * + * @param {Integer} index + * @return {Array} rows + */ + getAll(index: number): GridRow[]; + + /** + * @method getColumn + * Gets the column at the specified index. + * + * @param {"Integer"/"String"} key index or column key + * @return {ColumnObject} column + */ + getColumn(index: number|string): GridColumn; + + /** + * @method showColumn + * Shows the column index (or column name). + * + * @param {"Integer"/"String"} key index or column name + */ + showColumn(index: number|string, e?: any): void; + + /** + * @method hideColumn + * Hides the column index (or column name). + * + * @param {"Integer"/"String"} key index or column name + */ + hideColumn(index: number|string, e?: any): void; + + /** + * @method initColumns + * It is possible to determine the index or name of the column to be shown in an array. + * + * @param {"Integer"/"String"} key index or column name + */ + initColumns(keys: any): void; + + /** + * @method showColumnMenu + * Shows the Show/Hide Column menu at specified coordinates. + * + * @param {Integer} x + * @param {Integer} y + */ + showColumnMenu(x: number, y: number): void; + + /** + * @method hideColumnMenu + * Hides the Show/Hide Column menu. + */ + hideColumnMenu(): void; + + /** + * @method toggleColumnMenu + * Shows or hides the Show/Hide Column menu. + * + * @param {Integer} x + * @param {Integer} y + */ + toggleColumnMenu(x: number, y: number): void; + + /** + * @method showExpand + * Shows the extended row area of a specified index. + * + * @param {Integer} index + */ + showExpand(index: number, obj?: any, e?: any): void; + + /** + * @method hideExpand + * Hides the extended row area of a specified index. + */ + hideExpand(e?: any): void; + + /** + * @method getExpand + * Get a row in which the extended area is currently activated. + * + * @return {RowObject} row + */ + getExpand(): GridRow; + + /** + * @method showEditRow + * Shows the modified row area of a specified index. + * + * @param {Integer} index + */ + showEditRow(index: number, e?: any): void; + + /** + * @method hideEditRow + * Hides the modified row area of a specified index. + */ + hideEditRow(data?: any): void; + + /** + * @method getEditRow + * Get a row in which the modified area is currently activated. + * + * @return {RowObject} row + */ + getEditRow(): GridRow; + + /** + * @method setCsv + * Updates a table using a CVS string. + */ + setCsv(csvOrKey: any, key?: any): void; + + /** + * @method setCsvFile + * Updates a table using a CVS file. + */ + setCsvFile(fileOrKey: any, key?: any): void; + + /** + * @method getCsv + * Gets the data of a table as a CSV string. + * + * @param {Boolean} isTree + * @return {String} csv + */ + getCsv(isTree: boolean): string; + + /** + * @method getCsvBase64 + * Gets the data of a table as a CSV string encoded as base64. + * + * @param {Boolean} isTree + * @return {String} base64 + */ + getCsvBase64(isTree: boolean): string; + + /** + * @method downloadCsv + * Downloads the data of a table as a CSV file. + * + * @param {String} name + * @param {Boolean} isTree + */ + downloadCsv(name: string, isTree: boolean): void; + + /** + * @method activeIndex + * Gets the index of a row that is activated in an extended/modified/selected state. + * + * @return {Integer} index + */ + activeIndex(): number; +} + +export interface GridXTable extends UIEvent { + (selector: any, options?: { + + }): this; + + render(isTree?: boolean): void; + + /** + * @method select + * Adds a selected class to a row at a specified index and gets an instance of the applicable row. + * + * @param {Integer} index + * @return {RowObject} row + */ + select(index: number): GridRow; + + /** + * @method unselect + * Removes a selected class from a selected row and gets an instance of the row in question. + * + * @return {RowObject} row + */ + unselect(): GridRow; + + /** + * @method update + * Updates the list of rows or modifies the row at a specified index. + * + * @param {Array} rows + */ + update(dataList: any[]): void; + + /** + * @method updateTree + * It is possible to configure a tree table using an object array with the index and data properties. + * + * @param {Array} rows + */ + updateTree(tree: any[]): void; + + /** + * @method append + * Add a row or a child row to at a specified index. + * + * @param {RowObject} row + * @param {RowObject} row + */ + append(index: number, data: {}): void; + /** + * @method open + * Shows a child row of a specified index. + * + * @param {Integer} index + */ + open(index: number|string): void; + + /** + * @method fold + * Hides a child row of a specified index. + * + * @param {Integer} index + */ + fold(index: number|string): void; + + /** + * @method openAll + * Shows all child rows of a specified index. + */ + openAll(index: number|string): void; + + /** + * @method foldAll + * Hides all child rows of a specified index. + */ + foldAll(index: number|string): void; + + /** + * @method next + * Changes to the next page. + */ + next(): void; + + /** + * @method page + * Changes to the page of at a specified index. + * + * @param {Integer} index + */ + page(pNo: number): void; + + /** + * @method sort + * Moves a row iat a specified index to the target index. + * + * @param {Integer} index + * @param {String} order "asc" or "desc" + */ + sort(index: number, order: "asc"|"desc", e?: any, isNotLoading?: any): void; + + /** + * @method filter + * Filters columns at a specified to locate rows that contain keywords in the cell value. + * + * @param {Function} callback + */ + filter(callback: (data: any) => void): void; + + /** + * @method rollback + * Returns filtered rows to the original state. + */ + rollback(): void; + + /** + * @method clear + * Remove all row elements. + */ + clear(): void; + + /** + * @method clear + * Remove all data + */ + reset(): void; + + /** + * @method resize + * Resets the inner scroll and columns of a table. + */ + resize(): void; + + /** + * @method scrollWidth + * Sets the scroll based on the width of a table. + * + * @param {Integer} width + */ + scrollWidth(scrollWidth: number, isInit?: boolean): void; + + /** + * @method scrollHeight + * Sets the scroll based on the height of a table. + * + * @param {Integer} height + */ + scrollHeight(h: number): void; + + /** + * @method scrollTop + * Sets the scroll based on the height of a table. + * + * @param {Integer|String} index + * @param {Integer} dist + */ + scrollTop(index: number|string, dist: number): void; + + /** + * @deprecated + * @method height + * Sets the scroll based on the height of a table. + * + * @param {Integer} height + */ + height(h: number): void; + + /** + * @method size + * Gets the size of all the rows of a table. + * + * @return {Integer} size + */ + size(): number; + + /** + * @method count + * Gets the number of trows of a table. + * + * @return {Integer} count + */ + count(): number; + + /** + * @method list + * Gets all the rows of a table. + * + * @return {Array} rows + */ + list(): GridRow[]; + + /** + * @method listColumn + * Gets all columns. + * + * @return {Array} columns + */ + listColumn(): GridColumn[]; + + /** + * @method listData + * Gets the data of all the rows of a table. + * + * @return {Array} datas + */ + listData(): any[]; + + /** + * @method get + * Gets the row at the specified index. + * + * @param {Integer|String} index + * @return {RowObject} row + */ + get(index: number): GridRow; + + getAll(index: number, _result?: any): GridRow[]; + + /** + * @method getColumn + * Gets the column at the specified index. + * + * @param {"Integer"/"String"} key index or column key + * @return {ColumnObject} column + */ + getColumn(index: number|string): GridColumn; + + /** + * @method getData + * Gets the data at the specified index. + * + * @param {"Integer"/"String"} key index + * @return {ColumnObject} data + */ + getData(index: number|string): any; + + /** + * @method showColumn + * Shows the column index (or column name). + * + * @param {"Integer"/"String"} key index or column name + */ + showColumn(index: number|string): void; + + /** + * @method hideColumn + * Hides the column index (or column name). + * + * @param {"Integer"/"String"} key index or column name + */ + hideColumn(index: number|string): void; + + /** + * @method initColumns + * It is possible to determine the index or name of the column to be shown in an array. + * + * @param {"Integer"/"String"} key index or column name + */ + initColumns(keys: number|string): void; + + /** + * @method showColumnMenu + * Shows the Show/Hide Column menu at specified coordinates. + * + * @param {Integer} x + * @param {Integer} y + */ + showColumnMenu(x: number, y: number): void; + + /** + * @method hideColumnMenu + * Hides the Show/Hide Column menu. + */ + hideColumnMenu(): void; + + /** + * @method toggleColumnMenu + * Shows or hides the Show/Hide Column menu. + * + * @param {Integer} x + * @param {Integer} y + */ + toggleColumnMenu(x: number, y: number): void; + + /** + * @method showExpand + * Shows the extended row area of a specified index. + * + * @param {Integer} index + */ + showExpand(index: number, obj: any): void; + + /** + * @method hideExpand + * Hides the extended row area of a specified index. + */ + hideExpand(index: number): void; + + /** + * @method getExpand + * Get a row in which the extended area is currently activated. + * + * @return {RowObject} row + */ + getExpand(): GridRow; + + /** + * @method showLoading + * Shows the loading screen for the specified delay time. + * + * @param {Integer} delay + */ + showLoading(delay: number): void; + + /** + * @method hideLoading + * Hides the loading screen. + */ + hideLoading(): void; + + /** + * @method setCsv + * Updates a table using a CVS string. + */ + setCsv(csv: string): void; + + /** + * @method setCsvFile + * Updates a table using a CVS file. + */ + setCsvFile(file: any): void; + + /** + * @method getCsv + * Gets the data of a table as a CSV string. + * + * @param {Boolean} isTree + * @return {String} csv + */ + getCsv(): string; + + /** + * @method getCsvBase64 + * Gets the data of a table as a CSV string encoded as base64. + * + * @param {Boolean} isTree + * @return {String} base64 + */ + getCsvBase64(): string; + + /** + * @method downloadCsv + * Downloads the data of a table as a CSV file. + * + * @param {String} name + * @param {Boolean} isTree + */ + downloadCsv(name: string): void; + + /** + * @method rowFunc + * Ir is possible to use a function for all row data applicable to the column (or column name) of a specified column (or column name). Currently only SUM and AVG are supported. + * + * @param {"sum"/"svg"} funcType + * @param {Integer} columnIndex + * @param {Function} callback + */ + rowFunc(type: "sum"|"avg", index: number, callback: (data: any) => void): any; + + /** + * @method getPage + * Gets the current page of a table. + * + * @return {Integer} page + */ + getPage(): number; + + /** + * @method activeIndex + * Gets the index of a row that is activated in an extended/modified/selected state. + * + * @return {Integer} index + */ + activeIndex(): number; +} diff --git a/jui-grid/jui-grid-tests.ts b/jui-grid/jui-grid-tests.ts new file mode 100644 index 0000000000..1d29dd059b --- /dev/null +++ b/jui-grid/jui-grid-tests.ts @@ -0,0 +1,182 @@ +/// + +import {jui} from 'jui-core'; +import {GridTable, GridXTable, GridRow} from "./index"; + + +jui.ready([ "grid.table" ], function(table: GridTable) { + let table_1: GridTable = table("#table_1", { + data: [ + { name: "Hong", age: "20", location: "Ilsan" }, + { name: "Jung", age: "30", location: "Seoul" }, + { name: "Park", age: "15", location: "Yeosu" }, + { name: "Kang", age: "32", location: "Seoul" }, + { name: "Song", age: "12", location: "Gwangju" }, + { name: "Yoon", age: "22", location: "Damyang" }, + { name: "Kim", age: "33", location: "Busan" }, + { name: "Hwang", age: "21", location: "Seoul" } + ] + }); + + table_1.scroll(100); +}); + +jui.ready([ "grid.table" ], function(table: GridTable) { + let table_3:GridTable = table("#table_3", { + event: { + expand: function(row: any, e: any): void { + $(row.list[0]).html(""); + }, + expandend: function(row: any, e: any): void { + $(row.list[0]).html(""); + } + }, + expand: true + }); + + table_3.update([ + { name: "Hong", age: "20", location: "Ilsan" }, + { name: "Jung", age: "30", location: "Seoul" }, + { name: "Park", age: "10", location: "Dangjin" } + ]); + + let table_3_submit: Function = function(index: number) { + var name = $(table_3.root).find(".name").val(), + age = $(table_3.root).find(".age").val(), + location = $(table_3.root).find(".location").val(); + + //noinspection TypeScriptValidateTypes + table_3.update(index, { name: name, age: age, location: location }); + table_3.hideExpand(); + } +}); + +jui.ready([ "grid.xtable" ], function(xtable: GridXTable) { + var page = 1; + + let xtable_2: GridXTable = xtable("#xtable_2", { + fields: [ "name", "age", "location" ], + resize: true, + sort: true, + buffer: "page", + bufferCount: 20 + }); + + let xtable_2_submit: Function = function() { + var result: any[] = []; + + for(var i = 0; i < 1000000; i++) { + result.push({ name: "Alvin" + i, age: Math.floor(Math.random() * 100) + 1, location: "LA" }); + } + + page = 1; + xtable_2.update(result); + xtable_2.resize(); + } + + let xtable_2_page: Function = function(no: number) { + page += no; + page = (page < 1) ? 1 : page; + xtable_2.page(page); + } +}); + + +jui.ready([ "grid.xtable" ], function(xtable: GridXTable) { + let xtable_4:GridXTable = xtable("#xtable_4", { + fields: [ "name", "age", "location" ], + data: [ + { name: "Hong", age: "20", location: "Ilsan" }, + { name: "Jung", age: "30", location: "Seoul" }, + { name: "Park", age: "10", location: "Dangjin" } + ], + resize: true, + sort: true, + buffer: "s-page", + bufferCount: 20 + }); + + let xtable_4_submit: Function = function(isMulti: boolean) { + if(isMulti) { + xtable_4.filter(function(data: any) { + if(data.age >= 30 || data.name.indexOf("ng") != -1) { + return true; + } + }); + } else { + xtable_4.filter(function(data: any) { + if(data.location.indexOf("eo") != -1) { + return true; + } + }); + } + } +}); + +jui.ready([ "grid.xtable" ], function(xtable: GridXTable) { + let xtable_6: GridXTable = xtable("#xtable_6", { + fields: [ "name", "age", "location" ], + resize: true, + sort: true, + width: 800, + scrollWidth: 600, + scrollHeight: 400, + rowHeight: 26, + buffer: "vscroll", + tpl: { + row: "", + none: "Data does not exist." + } + }); + + let xtable_6_submit: Function = function() { + var result: any[] = []; + + for(var i = 0; i < 1000000; i++) { + result.push({ name: "Alvin" + i, age: Math.floor(Math.random() * 100) + 1, location: "LA" }); + } + + xtable_6.update(result); + } +}); + +jui.ready([ "grid.xtable" ], function(xtable: GridXTable) { + let xtable_8: GridXTable = xtable("#xtable_8", { + fields: [ "url", "count" ], + resize: true, + buffer: "vscroll", + rowHeight: 27, + scrollHeight: 300, + tpl: { + row: $("#tpl_row").html(), + none: $("#tpl_none").html() + }, + event: { + select: function(row: GridRow, e:any) { + if(row.type == "fold") { + xtable_8.open(row.index); + } else { + xtable_8.fold(row.index); + } + } + } + }); + + xtable_8.updateTree([ + { index: "0", type: "open", data: { url: "/", count: 105 } }, + { index: "0.0", type: "fold", data: { url: "/css", count: 35 } }, + { index: "0.0.0", type: "fold", data: { url: "/index.css", count: 15 } }, + { index: "0.0.1", type: "fold", data: { url: "/layout.css", count: 15 } }, + { index: "0.0.2", type: "fold", data: { url: "/login.css", count: 5 } }, + { index: "0.1", type: "fold", data: { url: "/js", count: 35 } }, + { index: "0.1.0", type: "fold", data: { url: "/index.js", count: 23 } }, + { index: "0.1.1", type: "fold", data: { url: "/jquery.js", count: 12 } }, + { index: "0.2", type: "fold", data: { url: "/img", count: 0 } }, + { index: "0.2.0", type: "fold", data: { url: "logo.ico", count: 0 } }, + { index: "0.3", type: "fold", data: { url: "/main.jsp", count: 10 } }, + { index: "0.4", type: "fold", data: { url: "/login.jsp", count: 10 } }, + { 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/jui-grid/tsconfig.json new file mode 100644 index 0000000000..e79594958e --- /dev/null +++ b/jui-grid/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jui-grid-tests.ts" + ] +} diff --git a/jui-grid/tslint.json b/jui-grid/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/jui-grid/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/jui/index.d.ts b/jui/index.d.ts new file mode 100644 index 0000000000..c1dec57e39 --- /dev/null +++ b/jui/index.d.ts @@ -0,0 +1,1380 @@ +// Type definitions for jui 2.0 +// Project: https://github.com/juijs/jui#readme +// Definitions by: Jin-Ho Park +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import {UIEvent} from 'jui-core'; + +export interface UIAccordion extends UIEvent { + + (selector: any, options?: { + tpl?: any, + event?: any, + /** + * @cfg {Integer} [index=null] + * Sets an enabled node + */ + index?: number, + + /** + * @cfg {Boolean} [autoFold=false] + * When you click on a node, the node folding + */ + autoFold?: boolean, + + /** + * @cfg {Boolean} [multipanel=false] + * + */ + multipanel?: boolean + }) : this; + + /** + * @method activeIndex + * Gets the index of the currently enabled node + * + * @return {Integer} Index + */ + activeIndex(): number; +} + +export interface UIAutoComplete { + (selector: any, options?: { + tpl?: any, + event?: any, + /** + * @cfg {String/DOMElement} [target=null] + * Designates a target selector when an autofill route is not a target + */ + target?: any, + + /** + * @cfg {Array} words + * Designates words subject to autofill + */ + words?: string[] + }) : this; + + /** + * @method update + * Updates words subject to autofill + * + * @param {Array} words + * + */ + update(newWords: string[]): void; + + /** + * @method close + * Close the active drop-down + * + */ + close(): void; + + /** + * @method list + * Gets filtered words subject to autofill + * + * @return {Array} words + */ + list(): string[]; +} + +export interface UIColorPicker { + (selector: any, options?: { + tpl?: any, + event?: any, + type?: string, + color?: string + }) : this; + + getColor(type: string): string|{}; + + setColor(value: string|{}): void; + +} + + +export interface UICombo { + (selector: any, options?: { + tpl?: any, + event?: any, + /** + * @cfg {Integer} [index=0] + * Determines an initial selection button with a specified index + */ + index?: number, + + /** + * @cfg {String} [value=0] + * Determines an initial selection button with a specified value + */ + value?: string, + + /** + * @cfg {Integer} [width=0] + * Determines the horizontal size of a combo box + */ + width?: number, + + /** + * @cfg {Integer} [height=100] + * Determines an initial selection button with a specified value + */ + height?: number, + + /** + * @cfg {Boolean} [keydown=false] + * It is possible to select a node using the keyboard + */ + keydown?: boolean, + + /** + * @cfg {"top"/"bottom"} [position="bottom"] + * It is possible to determine an initial selection button with a specified value + */ + position?: "top"|"bottom", + + /** + * @cfg {Boolean} [flex=true] + * Drop-down menu is varied by changing the width function + */ + flex?: boolean + }) : this; + + /** + * @method setIndex + * Selects a button of a specified index + * + * @param {Number} index + */ + setIndex(index: number): void; + + /** + * @method setValue + * Selects a button having a specified value + * + * @param {Mixed} value + */ + setValue(value: any): void; + + /** + * @method getData + * Gets the data of the button currently selected + * + * @return {Object} + */ + getData(): {}; + + /** + * @method getValue + * Gets the value of the button currently selected + * + * @return {Mixed} + */ + getValue(): any; + + /** + * @method getText + * Gets the markup text of the button currently selected + * + * @return {String} + */ + getText(): string; + + /** + * @method open + * Shows the element list of a combo box + */ + open(e: any): void; + + /** + * @method fold + * Hides the element list of a combo box + */ + fold(): void; + + /** + * @method reload + * Re-defines a combo box + */ + reload(): void; +} + + +export interface UIDatePicker { + (selector: any, options?: { + tpl?: any, + event?: any, + /** + * @cfg {"daily"/"monthly"/"yearly"} [type="daily"] + * Determines the type of a calendar + */ + type?: "daily"|"monthly"|"yearly", + + /** + * @cfg {String} [titleFormat="yyyy.MM"] + * Title format of a calendar + */ + titleFormat?: string, + + /** + * @cfg {String} [format="yyyy-MM-dd"] + * Format of the date handed over when selecting a specific date + */ + format?: string, + + /** + * @cfg {Date} [date="now"] + * Selects a specific date as a basic + */ + date?: "now"|Date, + + /** + * @cfg {Date} [minDate="null"] + * Selects a specific minimum date + */ + minDate?: Date, + + /** + * @cfg {Date} [maxDate="null"] + * Selects a specific maximum date + */ + maxDate?: Date + }) : this; + + /** + * @method page + * Outputs a calendar that fits the year/month entered + * + * @param {Integer} year + * @param {Integer} month + */ + page(y: number, m: number): void; + + /** + * @method prev + * Outputs a calendar that fits the previous year/month + * + */ + prev(e: any, moveYear?: boolean): void; + + /** + * @method next + * Outputs a calendar that fits the next year/month + * + */ + next(e: any, moveYear?: boolean): void; + + /** + * @method select + * Selects today if there is no value, or selects a date applicable to a timestamp or year/month/date + * + * @param {"year"/"month"/"date"/"timestamp"/"Date"} + */ + select( ...args: any[]): void; + + /** + * @method addTime + * Selects a date corresponding to the time added to the currently selected date + * + * @param {"Integer"/"Date"} time Timestamp or Date + */ + addTime(time: number|Date): void; + + /** + * @method getDate + * Gets the value of the date currently selected + * + * @return {Date} Date object + */ + getDate(): Date; + + /** + * @method getTime + * Gets the timestamp value of the date currently selected + * + * @return {Integer} Timestamp + */ + getTime(): number; + + /** + * @method getFormat + * Gets a date string that fits the format entered + * + * @return {String} format Formatted date string + */ + getFormat(format: string): string; + + /** + * @method reload + * Reloads the datepicker + */ + reload(): void; +} + +export interface UIDropdown { + (selector: any, options?: { + tpl?: any, + event?: any, + /** + * @cfg {Boolean} [close=true] + * Closes the Auto when clicking on the dropdown list + */ + close?: boolean, + + /** + * @cfg {Boolean} [keydown=false] + * It is possible to choose anything on the dropdown list with the arrow keys on the keyboard + */ + keydown?: boolean, + + /** + * @cfg {Integer} [left=0] + * Sets the X coordinate of the dropdown list + */ + left?: number, + + /** + * @cfg {Integer} [top=0] + * Sets the Y coordinate of the dropdown list + */ + top?: number, + + /** + * @cfg {Integer} [width=0] + * Determines the horizontal size of a dropdown list + */ + width?: number, + + /** + * @cfg {Integer} [height=0] + * Determines the vertical size of a dropdown list + */ + height?: number, + + /** + * @cfg {Array} nodes + * Sets a dropdown list to data rather than markup + */ + nodes?: any[] + }): this; + + /** + * @method update + * Changes the dropdown list + * + * @param {Array} nodes Dropdown list + */ + update(nodes: any[]): void; + + /** + * @method hide + * Hides the dropdown + */ + hide(): void; + + /** + * @method show + * Shows a dropdown at the specified coordinates + * + * @param {Integer} x + * @param {Integer} y + */ + show(x: number, y: number): void; + + /** + * @method move + * Moves a dropdown to the specified coordinates + * + * @param {Integer} x + * @param {Integer} y + */ + move(x: number, y: number): void; + + /** + * @method reload + * Reloads the dropdown list + */ + reload(): void; +} + + +export interface UIModal { + (selector: any, options?: { + tpl?: any, + event?: any, + /** + * @cfg {"black"/"gray"} [color="black"] + * Determines the color of a modal + */ + color?: "black"|"gray", + + /** + * @cfg {Float} [opacity=0.4] + * Sets the transparency of a modal + */ + opacity?: number, + + /** + * @cfg {String/DOMElement} [target="body"] + * Sets a selector on which a modal is shown + */ + target?: string|any, + + /** + * @cfg {Integer} [index=0] + * Determines the sequence (index) of a modal + */ + index?: number, + + /** + * @cfg {Boolean} [clone=false] + * Copies an existing modal and shows it + */ + clone?: boolean, + + /** + * @cfg {Boolean} [autoHide=true] + * Automatically hides a modal when clicking on it + */ + autoHide?: boolean + }): this; + + /** + * @method hide + * Hides a modal + */ + hide(): void; + + /** + * @method show + * Shows a modal + */ + show(): void; + + /** + * @method resize + * Re-adjust the location of a modal + */ + resize(): void; +} + + +export interface UINotify { + (selector: any, options?: { + tpl?: any, + event?: any, + /** + * @cfg {"top"/"top-lefet"/"top-right"/"bottom"/"bottom-left"/"bottom-right"} [position="top-right"] + * Designates the location where a notice message is added + */ + position?: "top"|"top-lefet"|"top-right"|"bottom"|"bottom-left"|"bottom-right", + + /** + * @cfg {Integer} [padding=12] + * Determines the margin value of a notice message (the margin value may be in object form rather than a numeric value) + */ + padding?: number, + + /** + * @cfg {Integer} [distance=5] + * Determines each margin value when there are multiple notice messages + */ + distance?: number, + + /** + * @cfg {Integer} [timeout=3000] + * Determines the duration for which a notice message is displayed (the message does not disappear when the value is 0) + */ + timeout?: number, + + /** + * @cfg {Integer} [showDuration=500] + * Determines the duration of an effect when a notice message is shown + */ + showDuration?: number, + + /** + * @cfg {Integer} [hideDuration=500] + * Determines the duration of an effect when a notice message disappears + */ + hideDuration?: number, + + /** + * @cfg {String} [showEasing="swing"] + * Determines an effect when a notice message is shown (see CSS3 specifications) + */ + showEasing?: string, + + /** + * @cfg {String} [hideEasing="linear"] + * Determines an effect when a notice message disappears (see CSS3 specifications) + */ + hideEasing?: string + }): this; + + /** + * @method add + * Adds a notice message. The value passed is the data object shown by the notice template + * + * @param {Object} data + * @param {Integer} timeout + */ + add(data: {}, timeout: number): void; + + /** + * @method reset + * Removes all notice messages that are enabled + */ + reset(): void; +} + +export interface UIPaging { + (selector: any, options?: { + tpl?: any, + event?: any, + /** + * @cfg {Integer} [count=0] + * Total number of data records subject to paging) + */ + count?: number, + + /** + * @cfg {Integer} [pageCount=10] + * Number of data records per page + */ + pageCount?: number, + + /** + * @cfg {Integer} [screenCount=5] + * Number of pages shown on the paging screen + */ + screenCount?: number + }): this; + + /** + * @method reload + * Reloads the number of specified data records, or reloads the initially configured number of data records if there is no parameter + * + * @param {Integer} count Data total count + */ + reload(count: number): void; + + /** + * @method page + * Changes to a specified page number, and gets the currently enabled page number if there is no parameter + * + * @param {Integer} pNo Page number + */ + page(pNo: number): void; + + /** + * @method next + * Changes to the next page + */ + next(): void; + + /** + * @method prev + * Changes to the previous page + */ + prev(): void; + + /** + * @method first + * Changes to the first page + */ + first(): void; + + /** + * @method last + * Changes to the last page + */ + last(): void; +} + +export interface UIProgress { + (selector: any, options?: { + tpl?: any, + event?: any, + type?: "simple" | "flat", // simple or flat + orient?: "horizontal"|"vertical", // or vertical, + min?: number, + max?: number, + value?: number, + striped?: boolean, // or true + animated?: boolean // or true + }): this; + + setAnimated(isAnimated: boolean): void; + setStriped(isStriped: boolean): void; + setValue(v: number): void; + getValue(): number; + +} + +export interface UIProperty { + (selector: any, options?: { + tpl?: any, + event?: any, + sort?: string, // name, group, type + viewport?: string, + items?: any[] + }): this; + + loadItems(newItems: any[]): void; + + addItem(item: {}|any[]): void; + + // remove item by key or title + removeItem(item: {}): void; + + /** + * @method getGroupList + * + * get a list of group's title. + */ + getGroupList(): any[]; + + /** + * @method collapsed + * + * collapse group's children + * + * @param {String} id + */ + collapsed(id: string): void; + + /** + * @method expanded + * + * expand group's children + * + * @param {String} id + */ + expanded(id: string): void; + + /** + * @method getValue + * + * get a list of property's value + * + * @param {String} [key=null] if key is null, value is all properties. + */ + getValue(key?: string): {} | any[]; + + getDefaultValue(): any[]; + + initValue(obj: {}): void; + + /** + * @method getValue + * + * set a list of property's value + * + * @param {Object} obj + */ + setValue(obj: {}): void; + + findRender(key: string): any; + findItem(key: string): any; + updateValue(key: string, value: any): void; + getAllValue(key: string): any; + refreshValue($dom: any, newValue: any): void; +} + +export interface UISelect { + (selector: any, options?: { + tpl?: any, + event?: any, + items?: any[], + placeholder?: string, + align?: 'left'|'right', + valign?: 'top'|'bottom', + multi?: boolean + }): this; + + setValue(value: any|any[]): void; + getValue(): any| any[]; + setSelectedIndex(index: number): void; + getSelectedIndex(): number; + update(data: any[]): void; +} + +export interface UISlider { + (selector: any, options?: { + tpl?: any, + event?: any, + type?: "single"|"double", // or double + orient?: "horizontal"|"vertical", // or vertical, + min?: number, + max?: number, + step?: number, + from?: number, + to?: number, + tooltip?: boolean, + format?: string, + progress?: boolean + + }): this; + + /** + * @method setFromValue + * set FromHandle's value + * + * @param {Number} + */ + setFromValue(value: number): void; + + /** + * @method setToValue + * set ToHandle's value + * + * @param {Number} + */ + setToValue(value: number): void; + + /** + * @method getFromValue + * get FromHandle's value + * + * @return {Number} value + */ + getFromValue(): number; + + /** + * @method getToValue + * get ToHandle's value + * + * @return {Number} value + */ + getToValue(): number; + +} + + +export interface UISplitter { + (selector: any, options?: { + tpl?: any, + event?: any, + /** + * @cfg {String} [splitterClass='ui-splitter'] + * set splitter's class for design + */ + splitterClass?: string, + + /** + * @cfg {String} [hideClass='hide'] + * set splitter's hide class for design + */ + hideClass?: string, + + /** + * @cfg {Number} [barSize=4] + * set splitter's bar size + */ + barSize?: number, + + /** + * @cfg {Object} [barStyle={}] + * set custom splitter bar style + */ + barStyle?: {}, + + /** + * @cfg {"vertical"/"horizontal"} [direction='vertical'] + * set bar's direction + */ + direction?: 'vertical'|'horizontal', + + /** + * @cfg {String/Number} [initSize='50%'] + * set first panel's default width or height + */ + initSize?: string|number, + + /** + * @cfg {Number/Array} [minSize=30] + * set panel's minimum width or height + * + * if minSize is number , minSize is conver to array + * + * minSize[0] is first panel's minimum size + * minSize[1] is second panel's minimum size + * + */ + minSize?: number|number[], + + /** + * @cfg {String} [items=[]] + * + * set items to placed in vertical or horizontal + * + * support max two times + * + */ + items?: any[], + + /** + * @cfg {Boolean} [fixed=false] + * + * if fixed is true, panels can not resize. + * + */ + fixed?: boolean + }): this; + + setDirection(d: 'horizontal' | 'vertical'): void; + + setInitSize(size: number): void; + setHide(index: number): void; + setShow(index: number): void; + toggle(index: number): void; +} + +export interface UISwitch { + (selector: any, options?: { + tpl?: any, + event?: any, + checked?: boolean, + toggleEvent?: string + }): this; + + getValue(): boolean; + + setValue(value: boolean): void; + + toggle(): void; +} + +export interface UITab { + + (selector: any, options?: { + tpl?: any, + event?: any, + /** + * @cfg {String/DOMElement} [target=""] + * Determines a selector in the area to become the content of a tab + */ + target?: string|any, + + /** + * @cfg {Integer} [index=0] + * Sets an enabled tab + */ + index?: number, + + /** + * @cfg {Boolean} [drag=false] + * Changes the tab location through dragging + */ + drag?: boolean, + + /** + * @cfg {Array} nodes + * Sets a tab list to data rather than markup + */ + nodes?: any[] + }): this; + /** + * @method update + * Changes the tab list + * + * @param {Array} nodes + */ + update(nodes: any[]): void; + + /** + * @method insert + * Adds a tab at a specified index + * + * @param {Integer} index + * @param {Object} node + */ + insert(index: number, node: {}): void; + + /** + * @method append + * Adds a tab to the last node + * + * @param {Object} node + */ + append(node: {}): void; + + /** + * @method prepend + * Adds a tab to the first node + * + * @param {Object} node + */ + prepend(node: {}): void; + + /** + * @method remove + * Removes a tab at a specified index + * + * @param {Integer} index + */ + remove(index: number): void; + + /** + * @method move + * Changes a specified tab to a tab at a target index + * + * @param {Integer} index + * @param {Integer} targetIndex + */ + move(index: number, targetIndex: number): void; + + /** + * @method show + * Enables the tab at a specified index + * + * @param {Integer} index + */ + show(index: number): void; + + /** + * @method enable + * Enables the tab at a specified index + * + * @param {Integer} index + */ + enable(index: number): void; + + /** + * @method disable + * Disables the tab at a specified index + * + * @param {Integer} index + */ + disable(index: number): void; + + /** + * @method activeIndex + * Gets the index of the currently enabled tab + * + * @return {Integer} + */ + activeIndex(): number; +} + +export interface UITooltip { + (selector: any, options?: { + tpl?: any, + event?: any, + /** + * @cfg {String} [color="black"] + * Determines the color of a tooltip + */ + color?: string, + + /** + * @cfg {"top"/"bottom"/"left"/"right"} [position="top"] + * Determines the location where a tooltip is shown + */ + position?: "top"|"bottom"|"left"|"right", + + /** + * @cfg {Integer} [width=150] + * Determines the horizontal size of a tooltip + */ + width?: number, + + /** + * @cfg {"left"/"right"/"center"} [align="left"] + * Determines the alignment state inside a tooltip + */ + align?: "left"|"right"|"center", + + /** + * @cfg {Integer} [delay=0] + * Determines the event time when a tooltip is shown + */ + delay?: number, + + /** + * @cfg {String} [showType="mouseover"] + * Determines the type of event that triggers a tooltip + */ + showType?: string, + + /** + * @cfg {String} [hideType="mouseout"] + * Determines the type of event that hides a tooltip + */ + hideType?: string, + + /** + * @cfg {String} [title=""] + * Sets the content of a tooltip (referring to the title properties in markup) + */ + title?: string, + + }): this; + + /** + * @method update + * Changes the content of a tooltip + * + * @param {String} text + */ + update(newTitle: string): void; +} + +export interface UITreeNode { + /** @property {Array} [data=null] Data of a specifiednode */ + data?: any[]; + + /** @property {HTMLElement} [element=null] LI element of a specified node */ + element?: any; + + /** @property {Integer} [index=null] Index of a specified node */ + index?: number; + + /** @property {Integer} [nodenum=null] Unique number of a specifiede node at the current depth */ + nodenum?: number; + + /** @property {ui.tree.node} [parent=null] Variable that refers to the parent of the current node */ + parent?: UITreeNode; + + /** @property {Array} [children=null] List of child nodes of a specified node */ + children?: UITreeNode[]; + + /** @property {Integer} [depth=0] Depth of a specified node */ + depth?: number; + + /** @property {String} [type='open'] State value that indicates whether a child node is shown or hidden */ + type?: string; +} + +export interface UITreeBase { + appendNode(...args: any[]): UITreeNode; + insertNode(index: string, data: any): UITreeNode; + updateNode(index: string, data: any): UITreeNode; + removeNode(index: string): void; + removeNodes(): void; + openNode(index: string): void; + foldNode(index: string): void; + openNodeAll(index: string): void; + foldNodeAll(index: string): void; + + moveNode(index: string, targetIndex: number): void; + + getNode(index: string): UITreeNode; + + getNodeAll(index: string): UITreeNode[]; + + getNodeParent(index: string): UITreeNode; + + getRoot(): UITreeNode; +} + +export interface UITree { + (selector: any, options?: { + tpl?: any, + event?: any, + /** + * @cfg {NodeObject} [root=null] + * Adds a root node (required). + */ + root?: UITreeNode, + + /** + * @cfg {Boolean} [rootHide=false] + * Hides a root node. + */ + rootHide?: boolean, + + /** + * @cfg {Boolean} [rootFold=false] + * Folds up a root node. + */ + rootFold?: boolean, + + /** + * @cfg {Boolean} [drag=false] + * It is possible to drag the movement of a node. + */ + drag?: boolean, + + /** + * @cfg {Boolean} [dragChild=true] + * It is possible to drag the node movement but the node is not changed to a child node of the target node. + */ + dragChild?: boolean + }): this; + + /** + * @method update + * Changes to the node at a specified index. + * + * @param {String} index + * @param {Array} data + */ + update(index: string, data: any[]): void; + + /** + * @method append + * Adds to a child node at a specified index. + * + * @param {Array/String} param1 index or data + * @param {Array} param2 null or data + */ + append(...args: any[]): void; + + /** + * @method insert + * Adds a node at a specified index. + * + * @param {String} index + * @param {Array} data + */ + insert(index: string, data: any[]): void; + + /** + * @method select + * Adds a node at a specified index. + * + * @param {String} index + * @return {NodeObject} node + */ + select(index: string): UITreeNode; + + /** + * @method unselect + * Removes the 'active' class from a selected node and gets an instance of the specified node. + */ + unselect(): void; + + /** + * @method remove + * Deletes a node at a specified index. + * + * @param {String} index + */ + remove(index: string): void; + /** + * @method reset + * Deletes all child nodes except for a root. + */ + reset(): void; + + /** + * @method move + * Moves a node at a specified index to the target index. + * + * @param {String} index + * @param {String} targetIndex + */ + move(index: string, targetIndex: string): void; + /** + * @method open + * Shows a child node at a specified index. + * + * @param {String} index + */ + open(index: string, e: any): void; + + /** + * @method fold + * Folds up a child node at a specified index. + * + * @param {String} index + */ + fold(index: string, e: any): void; + /** + * @method openAll + * Shows all child nodes at a specified index. + * + * @param {String} index + */ + openAll(index: string): void; + + /** + * @method foldAll + * Folds up all child nodes at a specified index. + * + * @param {String} index + */ + foldAll(index: string): void; + + /** + * @method list + * Return all nodes of the root. + * + * @return {Array} nodes + */ + list(): UITreeNode[]; + + /** + * @method listAll + * Returns all child nodes. + * + * @return {Array} nodes + */ + listAll(): UITreeNode[]; + + /** + * @method listParent + * Returns all parent nodes at a specified index. + * + * @param {String} index + * @return {Array} nodes + */ + listParents(index: string): UITreeNode[]; + + /** + * @method get + * Gets a node at a specified index + * + * @param {String} index + * @return {NodeObject} node + */ + get(index: string): UITreeNode; + + /** + * @method getAll + * Gets all nodes at a specified index including child nodes. + * + * @param {String} index + * @return {Array} nodes + */ + getAll(index: string): UITreeNode[]; + + /** + * @method activeIndex + * Gets the index of a node that is activated in an active state. + * + * @return {Integer} index + */ + activeIndex(): number; +} + +export interface UIWindow { + (selector: any, options?: { + tpl?: any, + event?: any, + /** + * @cfg {Integer} [width=400] + * Determines the horizontal size of a window + */ + width?: number, + + /** + * @cfg {Integer} [height=300] + * Determines the height of a window + */ + height?: number, + + /** + * @cfg {String/Integer} [left="auto"] + * Determines the X coordinate of a window + */ + left?: string|number, + + /** + * @cfg {String/Integer} [top="auto"] + * Determines the Y coordinate of a window + */ + top?: string|number, + + /** + * @cfg {String/Integer} [right="auto"] + * Determines the X coordinate based on the right side of a window + */ + right?: string|number, + + /** + * @cfg {String/Integer} [bottom="auto"] + * Determines the Y coordinate based on the bottom side of a window + */ + bottom?: string|number, + + /** + * @cfg {Boolean} [modal=false] + * Applies a modal UI to a window + */ + modal?: boolean, + + /** + * @cfg {Boolean} [move=true] + * It is possible to move a window + */ + move?: boolean, + + /** + * @cfg {Boolean} [resize=true] + * It is possible to resize a window + */ + resize?: boolean, + + /** + * @cfg {Integer} [modalIndex=0] + * Determines the z-index property of a modal UI + */ + modalIndex?: number + }): this; + + /** + * @method hide + * Hides a window + */ + hide(): void; + + /** + * @method show + * Shows a window at specified coordinates + * + * @param {Integer} x + * @param {Integer} y + */ + show(x: number, y: number): void; + + /** + * @method move + * Moves a window at specified coordinates + * + * @param {Integer} x + * @param {Integer} y + */ + move(x: number, y: number): void; + + /** + * @method update + * Changes the markup in the body area of a window + * + * @param {String} html + */ + update(html: string): void; + + /** + * @method setTitle + * Changes the markup of the title tag in the head area of a window + * + * @param {String} title + */ + setTitle(html: string): void; + + /** + * @method setSize + * Changes the horizontal/vertical size of a window + * + * @param {Integer} width + * @param {Integer} height + */ + setSize(w: number, h: number): void; + + /** + * @method resize + * Designates a scroll area if there is a lot of content in the window body area + */ + resize(): void; + + /** + * @method resizeModal + * Re-adjust the location of a modal window + */ + resizeModal(): void; +} diff --git a/jui/jui-tests.ts b/jui/jui-tests.ts new file mode 100644 index 0000000000..5bee2fdc2e --- /dev/null +++ b/jui/jui-tests.ts @@ -0,0 +1,124 @@ +/// + +import {jui} from 'jui-core'; +import { + UIAccordion, UIAutoComplete, UIColorPicker, UICombo, UIDatePicker, UIDropdown, UIModal, UINotify, + UIPaging, UIProgress, UIProperty, UISelect +} from 'jui'; + +jui.ready([ + 'ui.accordion', + 'ui.autocomplete', + 'ui.colorpicker', + 'ui.combo', + 'ui.datepicker', + 'ui.dropdown', + 'ui.modal', + 'ui.notify', + 'ui.paging', + 'ui.progress', + 'ui.property', + 'ui.select' +], function ( + accordion: UIAccordion, + autocomplete: UIAutoComplete, + colorpicker: UIColorPicker, + combo: UICombo, + datepicker: UIDatePicker, + dropdown: UIDropdown, + modal: UIModal, + notify: UINotify, + paging: UIPaging, + progress: UIProgress, + property: UIProperty, + select: UISelect +) { + let a: UIAccordion = accordion("#test", { + multipanel: false + }); + + console.log(a.activeIndex()); + + let autoComplete: UIAutoComplete = autocomplete("#test", { + words : [] + }); + + autoComplete.update([]); + + let colorPicker: UIColorPicker = colorpicker("#test", { + color: '#FFFF00' + }); + + console.log(colorPicker.getColor('hex')); + + let comboInstance: UICombo = combo("#test", { + keydown: true + }) + + console.log(comboInstance.getValue()); + + let datePicker: UIDatePicker = datepicker("#test", { + type: "daily" + }); + + datePicker.select(Date.now()); + + datePicker.select(2016, 1, 2); + + datePicker.select(new Date()); + + let dropdownInstance: UIDropdown = dropdown("#test", { + width: 100 + }) + + dropdownInstance.update([]); + + dropdownInstance.hide(); + + dropdownInstance.reload(); + + let m : UIModal = modal("#test", {autoHide: true}); + + m.show(); + + let n: UINotify = notify("#test"); + + n.add({ title: "Caution message Send!!!", message: "Feb 15, 2013-12-24 02:24:19", color: 'warning' }, 1000); + n.add({ title: "Caution message Send!!!", message: "Feb 15, 2013-12-24 02:24:19", color: 'success' }, 1000); + n.reset(); + + let p: UIPaging = paging("#test", { count :100, pageCount : 5 }); + + p.first(); + p.last(); + p.next(); + p.prev(); + p.page(10); + + let prog: UIProgress = progress("#test", { striped: true }); + + console.log(prog.getValue()); + + prog.setValue(100); + + let propertyView: UIProperty = property("#test", { + items : [ + { type : 'group', title : 'Sample Category'}, + { type : 'text', title : 'Category Name', key: 'sample-category-name', value : 'test'} + ] + }) + + console.log(propertyView.getValue()); + + let selectInstance: UISelect = select("#test", { + items : [ + { type : 'item', value : '0', text : 'first', html : '
test
', selected : true }, + { type : 'divider' } + ], + multi: true, + placeholder: 'Sample Select' + }); + + console.log(selectInstance.getValue()); + +}); diff --git a/jui/tsconfig.json b/jui/tsconfig.json new file mode 100644 index 0000000000..9137f72c78 --- /dev/null +++ b/jui/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jui-tests.ts" + ] +} diff --git a/jui/tslint.json b/jui/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/jui/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/jwplayer/tsconfig.json b/jwplayer/tsconfig.json index a1a40d7393..3bc13b0278 100644 --- a/jwplayer/tsconfig.json +++ b/jwplayer/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/jwt-client/tsconfig.json b/jwt-client/tsconfig.json index c7fd0fb6e4..1e833af482 100644 --- a/jwt-client/tsconfig.json +++ b/jwt-client/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jwt-decode/tsconfig.json b/jwt-decode/tsconfig.json index 7fe27153ab..34ce87d118 100644 --- a/jwt-decode/tsconfig.json +++ b/jwt-decode/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/jwt-simple/tsconfig.json b/jwt-simple/tsconfig.json index 58b890a2fc..1ac8cea6f1 100644 --- a/jwt-simple/tsconfig.json +++ b/jwt-simple/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/kafka-node/tsconfig.json b/kafka-node/tsconfig.json index f30a5cb74e..f049d379df 100644 --- a/kafka-node/tsconfig.json +++ b/kafka-node/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/karma-chai-sinon/tsconfig.json b/karma-chai-sinon/tsconfig.json index b0f3cc7558..48d0aaa5f2 100644 --- a/karma-chai-sinon/tsconfig.json +++ b/karma-chai-sinon/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/karma-coverage/tsconfig.json b/karma-coverage/tsconfig.json index 91d3107c6a..57290fb7be 100644 --- a/karma-coverage/tsconfig.json +++ b/karma-coverage/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/karma-fixture/tsconfig.json b/karma-fixture/tsconfig.json index e9146f7343..29d2f94e74 100644 --- a/karma-fixture/tsconfig.json +++ b/karma-fixture/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/karma-jasmine/tsconfig.json b/karma-jasmine/tsconfig.json index 182a93b7e2..22f2f52c79 100644 --- a/karma-jasmine/tsconfig.json +++ b/karma-jasmine/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/karma/tsconfig.json b/karma/tsconfig.json index 7c5098f9ed..2c74d40398 100644 --- a/karma/tsconfig.json +++ b/karma/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/katex/tsconfig.json b/katex/tsconfig.json index 7c187d0198..e5f500e3f4 100644 --- a/katex/tsconfig.json +++ b/katex/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/kcors/tsconfig.json b/kcors/tsconfig.json index 972c458d5a..017137b6dd 100644 --- a/kcors/tsconfig.json +++ b/kcors/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "kcors-tests.ts" ] -} +} \ No newline at end of file diff --git a/kefir/tsconfig.json b/kefir/tsconfig.json index 3cef58a95e..9f05950582 100644 --- a/kefir/tsconfig.json +++ b/kefir/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/kendo-ui/tsconfig.json b/kendo-ui/tsconfig.json index dd40c07f46..e43c0b12f2 100644 --- a/kendo-ui/tsconfig.json +++ b/kendo-ui/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/keyboardjs/tsconfig.json b/keyboardjs/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/keyboardjs/tsconfig.json +++ b/keyboardjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/keycloak-js/tsconfig.json b/keycloak-js/tsconfig.json index 3f7a16cbb9..02d8f5053a 100644 --- a/keycloak-js/tsconfig.json +++ b/keycloak-js/tsconfig.json @@ -1,20 +1,22 @@ { - "compilerOptions": { - "module": "commonjs", - "target": "es6", - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "keycloak-js-tests.ts" - ] -} + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "keycloak-js-tests.ts" + ] +} \ No newline at end of file diff --git a/keygrip/tsconfig.json b/keygrip/tsconfig.json index 07650e90f3..b5667e063a 100644 --- a/keygrip/tsconfig.json +++ b/keygrip/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "keygrip-tests.ts" ] -} +} \ No newline at end of file diff --git a/keymaster/tsconfig.json b/keymaster/tsconfig.json index 2abd87ec86..fb5fbe56d3 100644 --- a/keymaster/tsconfig.json +++ b/keymaster/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/keymirror/tsconfig.json b/keymirror/tsconfig.json index 618de6df3a..e29384c526 100644 --- a/keymirror/tsconfig.json +++ b/keymirror/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/keypress/tsconfig.json b/keypress/tsconfig.json index 7c8b849f96..873cb093bb 100644 --- a/keypress/tsconfig.json +++ b/keypress/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/keytar/tsconfig.json b/keytar/tsconfig.json index cfe0fa6eac..7fb028fabd 100644 --- a/keytar/tsconfig.json +++ b/keytar/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/kii-cloud-sdk/tsconfig.json b/kii-cloud-sdk/tsconfig.json index 9091e055fc..7c1fee614e 100644 --- a/kii-cloud-sdk/tsconfig.json +++ b/kii-cloud-sdk/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/kik-browser/tsconfig.json b/kik-browser/tsconfig.json index d5e68d7a9f..e5bd914ec0 100644 --- a/kik-browser/tsconfig.json +++ b/kik-browser/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/kineticjs/tsconfig.json b/kineticjs/tsconfig.json index 763bea8a59..aff40245f3 100644 --- a/kineticjs/tsconfig.json +++ b/kineticjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/klaw/tsconfig.json b/klaw/tsconfig.json index d1f1be0230..d9191309e7 100644 --- a/klaw/tsconfig.json +++ b/klaw/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/knex/tsconfig.json b/knex/tsconfig.json index 2028e3a19f..820352f41b 100644 --- a/knex/tsconfig.json +++ b/knex/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/knockback/tsconfig.json b/knockback/tsconfig.json index bf97b93a4d..9661cf12ad 100644 --- a/knockback/tsconfig.json +++ b/knockback/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/knockout-amd-helpers/tsconfig.json b/knockout-amd-helpers/tsconfig.json index f727ee9b93..83c42c0bd5 100644 --- a/knockout-amd-helpers/tsconfig.json +++ b/knockout-amd-helpers/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/knockout-paging/tsconfig.json b/knockout-paging/tsconfig.json index 4a5cc4e5c2..bbf9623f3e 100644 --- a/knockout-paging/tsconfig.json +++ b/knockout-paging/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/knockout-pre-rendered/tsconfig.json b/knockout-pre-rendered/tsconfig.json index a394fe1849..5724ccb55f 100644 --- a/knockout-pre-rendered/tsconfig.json +++ b/knockout-pre-rendered/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/knockout-secure-binding/tsconfig.json b/knockout-secure-binding/tsconfig.json index 6e1b926372..1f945cd202 100644 --- a/knockout-secure-binding/tsconfig.json +++ b/knockout-secure-binding/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/knockout-transformations/tsconfig.json b/knockout-transformations/tsconfig.json index 460d631fcc..296a2aa453 100644 --- a/knockout-transformations/tsconfig.json +++ b/knockout-transformations/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/knockout.deferred.updates/tsconfig.json b/knockout.deferred.updates/tsconfig.json index 393056dd4d..4dc316a17a 100644 --- a/knockout.deferred.updates/tsconfig.json +++ b/knockout.deferred.updates/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/knockout.editables/tsconfig.json b/knockout.editables/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/knockout.editables/tsconfig.json +++ b/knockout.editables/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/knockout.es5/tsconfig.json b/knockout.es5/tsconfig.json index 6713a46489..6d1c70fe3f 100644 --- a/knockout.es5/tsconfig.json +++ b/knockout.es5/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/knockout.kogrid/tsconfig.json b/knockout.kogrid/tsconfig.json index b635917e63..d46268534b 100644 --- a/knockout.kogrid/tsconfig.json +++ b/knockout.kogrid/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/knockout.mapper/tsconfig.json b/knockout.mapper/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/knockout.mapper/tsconfig.json +++ b/knockout.mapper/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/knockout.mapping/tsconfig.json b/knockout.mapping/tsconfig.json index 3744f74198..24b00ef829 100644 --- a/knockout.mapping/tsconfig.json +++ b/knockout.mapping/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/knockout.postbox/tsconfig.json b/knockout.postbox/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/knockout.postbox/tsconfig.json +++ b/knockout.postbox/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/knockout.projections/tsconfig.json b/knockout.projections/tsconfig.json index 0ed3ef83b0..d962e55fc5 100644 --- a/knockout.projections/tsconfig.json +++ b/knockout.projections/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/knockout.punches/tsconfig.json b/knockout.punches/tsconfig.json index 420e8704ca..f42d080001 100644 --- a/knockout.punches/tsconfig.json +++ b/knockout.punches/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/knockout.rx/tsconfig.json b/knockout.rx/tsconfig.json index 1baed3692f..d05b336095 100644 --- a/knockout.rx/tsconfig.json +++ b/knockout.rx/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/knockout.validation/tsconfig.json b/knockout.validation/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/knockout.validation/tsconfig.json +++ b/knockout.validation/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/knockout.viewmodel/tsconfig.json b/knockout.viewmodel/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/knockout.viewmodel/tsconfig.json +++ b/knockout.viewmodel/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/knockout/tsconfig.json b/knockout/tsconfig.json index b09f482a4a..f6f1635804 100644 --- a/knockout/tsconfig.json +++ b/knockout/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": true, diff --git a/knockstrap/tsconfig.json b/knockstrap/tsconfig.json index d076a0af54..abe418072e 100644 --- a/knockstrap/tsconfig.json +++ b/knockstrap/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ko.plus/tsconfig.json b/ko.plus/tsconfig.json index e1fd266de9..5c3f63d332 100644 --- a/ko.plus/tsconfig.json +++ b/ko.plus/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/koa-basic-auth/tsconfig.json b/koa-basic-auth/tsconfig.json index f6a79da82f..181d92bae2 100644 --- a/koa-basic-auth/tsconfig.json +++ b/koa-basic-auth/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "koa-basic-auth-tests.ts" ] -} +} \ No newline at end of file diff --git a/koa-bodyparser/tsconfig.json b/koa-bodyparser/tsconfig.json index 5ec7f82342..939c56b2c9 100644 --- a/koa-bodyparser/tsconfig.json +++ b/koa-bodyparser/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/koa-compose/tsconfig.json b/koa-compose/tsconfig.json index 39337f9197..452eee9f98 100644 --- a/koa-compose/tsconfig.json +++ b/koa-compose/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/koa-compress/tsconfig.json b/koa-compress/tsconfig.json index 4b385daa06..2f4485fbb0 100644 --- a/koa-compress/tsconfig.json +++ b/koa-compress/tsconfig.json @@ -5,7 +5,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/koa-favicon/tsconfig.json b/koa-favicon/tsconfig.json index 1a12665367..a375b967d4 100644 --- a/koa-favicon/tsconfig.json +++ b/koa-favicon/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/koa-hbs/tsconfig.json b/koa-hbs/tsconfig.json index e77eecc435..2cbbd3a89e 100644 --- a/koa-hbs/tsconfig.json +++ b/koa-hbs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/koa-json-error/tsconfig.json b/koa-json-error/tsconfig.json index a9c0903521..49d647a322 100644 --- a/koa-json-error/tsconfig.json +++ b/koa-json-error/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/koa-json/tsconfig.json b/koa-json/tsconfig.json index fe1944f358..32dcc5d9e4 100644 --- a/koa-json/tsconfig.json +++ b/koa-json/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/koa-jwt/tsconfig.json b/koa-jwt/tsconfig.json index 7862227259..6b8a12b3d2 100644 --- a/koa-jwt/tsconfig.json +++ b/koa-jwt/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "koa-jwt-tests.ts" ] -} +} \ No newline at end of file diff --git a/koa-logger/tsconfig.json b/koa-logger/tsconfig.json index 17e987f4da..b919cca987 100644 --- a/koa-logger/tsconfig.json +++ b/koa-logger/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/koa-mount/tsconfig.json b/koa-mount/tsconfig.json index 505bf4426f..511ea065f4 100644 --- a/koa-mount/tsconfig.json +++ b/koa-mount/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/koa-passport/tsconfig.json b/koa-passport/tsconfig.json index 6276189c86..d08d38dc0a 100644 --- a/koa-passport/tsconfig.json +++ b/koa-passport/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/koa-pug/tsconfig.json b/koa-pug/tsconfig.json index aa71442be9..c2a62396b1 100644 --- a/koa-pug/tsconfig.json +++ b/koa-pug/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/koa-router/tsconfig.json b/koa-router/tsconfig.json index 40d462c056..998f99cd59 100644 --- a/koa-router/tsconfig.json +++ b/koa-router/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/koa-send/tsconfig.json b/koa-send/tsconfig.json index 9eb1c1254b..fa9266e3c4 100644 --- a/koa-send/tsconfig.json +++ b/koa-send/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/koa-session-minimal/tsconfig.json b/koa-session-minimal/tsconfig.json index e9d4c5ddf1..b32297846a 100644 --- a/koa-session-minimal/tsconfig.json +++ b/koa-session-minimal/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/koa-static/tsconfig.json b/koa-static/tsconfig.json index a40f219764..8e8987ca6f 100644 --- a/koa-static/tsconfig.json +++ b/koa-static/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/koa/tsconfig.json b/koa/tsconfig.json index 04ebad9b4c..bd57bca4ac 100644 --- a/koa/tsconfig.json +++ b/koa/tsconfig.json @@ -5,7 +5,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/kolite/tsconfig.json b/kolite/tsconfig.json index 4e8b6d5672..b45c2a15e1 100644 --- a/kolite/tsconfig.json +++ b/kolite/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/konami.js/tsconfig.json b/konami.js/tsconfig.json index 6175df34c2..23556b0bde 100644 --- a/konami.js/tsconfig.json +++ b/konami.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/kue/tsconfig.json b/kue/tsconfig.json index 403a5e13b4..52aab9e4f3 100644 --- a/kue/tsconfig.json +++ b/kue/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/kuromoji/tsconfig.json b/kuromoji/tsconfig.json index 9af6764441..ba74d250d4 100644 --- a/kuromoji/tsconfig.json +++ b/kuromoji/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lab/tsconfig.json b/lab/tsconfig.json index d060f0c2bc..8af22fcd5c 100644 --- a/lab/tsconfig.json +++ b/lab/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/ladda/tsconfig.json b/ladda/tsconfig.json index 3a76e240ac..44d481481a 100644 --- a/ladda/tsconfig.json +++ b/ladda/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/later/tsconfig.json b/later/tsconfig.json index 3ae1d1a655..78a6cefd34 100644 --- a/later/tsconfig.json +++ b/later/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/latinize/tsconfig.json b/latinize/tsconfig.json index f89f9ecabe..00e8ec0f94 100644 --- a/latinize/tsconfig.json +++ b/latinize/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/launchpad/tsconfig.json b/launchpad/tsconfig.json index 240650d7c3..e8c758a80f 100644 --- a/launchpad/tsconfig.json +++ b/launchpad/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/lazy.js/tsconfig.json b/lazy.js/tsconfig.json index 4b549653d0..a994fa60a9 100644 --- a/lazy.js/tsconfig.json +++ b/lazy.js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lazypipe/tsconfig.json b/lazypipe/tsconfig.json index 29a0075ea4..675e6f38cc 100644 --- a/lazypipe/tsconfig.json +++ b/lazypipe/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ldapjs/tsconfig.json b/ldapjs/tsconfig.json index 4d7f8f907e..be88c48519 100644 --- a/ldapjs/tsconfig.json +++ b/ldapjs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ldclient-js/tsconfig.json b/ldclient-js/tsconfig.json index d6cb4d2f33..d341317f57 100644 --- a/ldclient-js/tsconfig.json +++ b/ldclient-js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/leadfoot/tsconfig.json b/leadfoot/tsconfig.json index 6c7eec547a..50a2f0042a 100644 --- a/leadfoot/tsconfig.json +++ b/leadfoot/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/leaflet-curve/tsconfig.json b/leaflet-curve/tsconfig.json index d3c07e8263..b093c40509 100644 --- a/leaflet-curve/tsconfig.json +++ b/leaflet-curve/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/leaflet-draw/tsconfig.json b/leaflet-draw/tsconfig.json index 5827e02ff7..dbb1fec45a 100644 --- a/leaflet-draw/tsconfig.json +++ b/leaflet-draw/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/leaflet-editable/tsconfig.json b/leaflet-editable/tsconfig.json index ca93aae9f0..264f610f6e 100644 --- a/leaflet-editable/tsconfig.json +++ b/leaflet-editable/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/leaflet-geocoder-mapzen/tsconfig.json b/leaflet-geocoder-mapzen/tsconfig.json index 37278fcb70..1737c5b81c 100644 --- a/leaflet-geocoder-mapzen/tsconfig.json +++ b/leaflet-geocoder-mapzen/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/leaflet-label/tsconfig.json b/leaflet-label/tsconfig.json index 6866cfea89..c9232660a0 100644 --- a/leaflet-label/tsconfig.json +++ b/leaflet-label/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/leaflet-markercluster/index.d.ts b/leaflet-markercluster/index.d.ts index cc840985ae..ab8b6d9431 100644 --- a/leaflet-markercluster/index.d.ts +++ b/leaflet-markercluster/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Leaflet.markercluster v0.4.0 +// Type definitions for Leaflet.markercluster 1.0 // Project: https://github.com/Leaflet/Leaflet.markercluster // Definitions by: Robert Imig // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -6,137 +6,165 @@ /// declare namespace L { + export interface MarkerCluster extends L.Marker { + + /* + * Recursively retrieve all child markers of this cluster. + */ + getAllChildMarkers(): Marker[]; + + /* + * Returns the count of how many child markers we have. + */ + getChildCount(): number; + + /* + * Zoom to the minimum of showing all of the child markers, or the extents of this cluster. + */ + zoomToBounds(): void; + + /* + * Returns the cluster bounds. + */ + getBounds(): LatLngBounds; + } + export interface MarkerClusterGroupOptions { - /* - * When you mouse over a cluster it shows the bounds of its markers. - */ - showCoverageOnHover?: boolean; + /* + * When you mouse over a cluster it shows the bounds of its markers. + */ + showCoverageOnHover?: boolean; - /* - * When you click a cluster we zoom to its bounds. - */ - zoomToBoundsOnClick?: boolean; + /* + * When you click a cluster we zoom to its bounds. + */ + zoomToBoundsOnClick?: boolean; - /* - * When you click a cluster at the bottom zoom level we spiderfy it - * so you can see all of its markers. - */ - spiderfyOnMaxZoom?: boolean; + /* + * When you click a cluster at the bottom zoom level we spiderfy it + * so you can see all of its markers. + */ + spiderfyOnMaxZoom?: boolean; - /* - * Clusters and markers too far from the viewport are removed from the map - * for performance. - */ - removeOutsideVisibleBounds?: boolean; + /* + * Clusters and markers too far from the viewport are removed from the map + * for performance. + */ + removeOutsideVisibleBounds?: boolean; - /* - * Smoothly split / merge cluster children when zooming and spiderfying. - * If L.DomUtil.TRANSITION is false, this option has no effect (no animation is possible). - */ - animate?: boolean; + /* + * Smoothly split / merge cluster children when zooming and spiderfying. + * If L.DomUtil.TRANSITION is false, this option has no effect (no animation is possible). + */ + animate?: boolean; - /* - * If set to true (and animate option is also true) then adding individual markers to the - * MarkerClusterGroup after it has been added to the map will add the marker and animate it - * into the cluster. Defaults to false as this gives better performance when bulk adding markers. - * addLayers does not support this, only addLayer with individual Markers. - */ - animateAddingMarkers?: boolean; + /* + * If set to true (and animate option is also true) then adding individual markers to the + * MarkerClusterGroup after it has been added to the map will add the marker and animate it + * into the cluster. Defaults to false as this gives better performance when bulk adding markers. + * addLayers does not support this, only addLayer with individual Markers. + */ + animateAddingMarkers?: boolean; - /* - * If set, at this zoom level and below markers will not be clustered. This defaults to disabled. - */ - disableClusteringAtZoom?: number; + /* + * If set, at this zoom level and below markers will not be clustered. This defaults to disabled. + */ + disableClusteringAtZoom?: number; - /* - * The maximum radius that a cluster will cover from the central marker (in pixels). Default 80. - * Decreasing will make more, smaller clusters. You can also use a function that accepts - * the current map zoom and returns the maximum cluster radius in pixels - */ - maxClusterRadius?: number | ((zoom: number) => number); + /* + * The maximum radius that a cluster will cover from the central marker (in pixels). Default 80. + * Decreasing will make more, smaller clusters. You can also use a function that accepts + * the current map zoom and returns the maximum cluster radius in pixels + */ + maxClusterRadius?: number | ((zoom: number) => number); - /* - * Options to pass when creating the L.Polygon(points, options) to show the bounds of a cluster. - * Defaults to empty - */ - polygonOptions?: PolylineOptions; + /* + * Options to pass when creating the L.Polygon(points, options) to show the bounds of a cluster. + * Defaults to empty + */ + polygonOptions?: PolylineOptions; - /* - * If set to true, overrides the icon for all added markers to make them appear as a 1 size cluster. - */ - singleMarkerMode?: boolean; + /* + * If set to true, overrides the icon for all added markers to make them appear as a 1 size cluster. + */ + singleMarkerMode?: boolean; - /* - * Allows you to specify PolylineOptions to style spider legs. - * By default, they are { weight: 1.5, color: '#222', opacity: 0.5 }. - */ - spiderLegPolylineOptions?: PolylineOptions; + /* + * Allows you to specify PolylineOptions to style spider legs. + * By default, they are { weight: 1.5, color: '#222', opacity: 0.5 }. + */ + spiderLegPolylineOptions?: PolylineOptions; - /* - * Increase from 1 to increase the distance away from the center that spiderfied markers are placed. - * Use if you are using big marker icons (Default: 1). - */ - spiderfyDistanceMultiplier?: number; + /* + * Increase from 1 to increase the distance away from the center that spiderfied markers are placed. + * Use if you are using big marker icons (Default: 1). + */ + spiderfyDistanceMultiplier?: number; - /* - * Function used to create the cluster icon - */ - iconCreateFunction?: any; + /* + * Function used to create the cluster icon + */ + iconCreateFunction?: ((cluster: L.MarkerCluster) => L.Icon); - /* - * Boolean to split the addLayers processing in to small intervals so that the page does not freeze. - */ - chunkedLoading?: boolean; + /* + * Boolean to split the addLayers processing in to small intervals so that the page does not freeze. + */ + chunkedLoading?: boolean; - /* - * Time delay (in ms) between consecutive periods of processing for addLayers. Default to 50ms. - */ - chunkDelay?: number; + /* + * Time delay (in ms) between consecutive periods of processing for addLayers. Default to 50ms. + */ + chunkDelay?: number; } - export class MarkerClusterGroup extends FeatureGroup { - constructor(); - constructor(options: MarkerClusterGroupOptions); + export interface MarkerClusterGroup extends FeatureGroup { - /* - * Bulk methods for adding and removing markers and should be favoured over the - * single versions when doing bulk addition/removal of markers. - */ - addLayers(layers:ILayer[]):MarkerClusterGroup; - removeLayers(layers:ILayer[]):MarkerClusterGroup; + /* + * Bulk methods for adding and removing markers and should be favoured over the + * single versions when doing bulk addition/removal of markers. + */ + addLayers(layers: Layer[]): this; + removeLayers(layers: Layer[]): this; - clearLayers():MarkerClusterGroup; + clearLayers(): this; - /* - * If you have a marker in your MarkerClusterGroup and you want to get the visible - * parent of it - */ - getVisibleParent(marker: Marker): Marker; + /* + * If you have a marker in your MarkerClusterGroup and you want to get the visible + * parent of it + */ + getVisibleParent(marker: Marker): Marker; - /* - * If you have customized the clusters icon to use some data from the contained markers, - * and later that data changes, use this method to force a refresh of the cluster icons. - */ - refreshClusters():MarkerClusterGroup; - refreshClusters(layerGroup:LayerGroup):MarkerClusterGroup; - refreshClusters(marker: Marker):MarkerClusterGroup; - refreshClusters(markers: Marker[]):MarkerClusterGroup; + /* + * If you have customized the clusters icon to use some data from the contained markers, + * and later that data changes, use this method to force a refresh of the cluster icons. + */ + refreshClusters(clusters?: Marker | Marker[] | LayerGroup | {[index: string]: Layer}): this; - /* - * Returns the total number of markers contained within that cluster. - */ - getChildCount(): number; + /* + * Returns the total number of markers contained within that cluster. + */ + getChildCount(): number; - /* - * Returns the array of total markers contained within that cluster. - */ - getAllChildMarkers(): Marker[]; + /* + * Returns the array of total markers contained within that cluster. + */ + getAllChildMarkers(): Marker[]; - /* - * Zooms to show the given marker (spiderfying if required), - * calls the callback when the marker is visible on the map. - */ - zoomToShowLayer(layer: any, callback: () => void): void; + /* + * Returns true if the given layer (marker) is in the cluster. + */ + hasLayer(layer: Layer): boolean; + + /* + * Zooms to show the given marker (spiderfying if required), + * calls the callback when the marker is visible on the map. + */ + zoomToShowLayer(layer: Layer, callback?: () => void): void; } + + /* + * Create a marker cluster group, optionally given marker cluster group options. + */ + export function markerClusterGroup(options?: MarkerClusterGroupOptions): MarkerClusterGroup; } diff --git a/leaflet-markercluster/leaflet-markercluster-tests.ts b/leaflet-markercluster/leaflet-markercluster-tests.ts index e579db5309..346239f836 100644 --- a/leaflet-markercluster/leaflet-markercluster-tests.ts +++ b/leaflet-markercluster/leaflet-markercluster-tests.ts @@ -1,19 +1,78 @@ -var map: L.Map; -var markerClusterGroup: L.MarkerClusterGroup; +const polylineOptions: L.PolylineOptions = {}; +const icon: L.Icon = L.icon({ iconUrl: 'foo' }); -// CircleMarker -var circleMarker: L.CircleMarker = new L.CircleMarker(new L.LatLng(0, 0)); +let markerClusterGroupOptions: L.MarkerClusterGroupOptions = {}; +markerClusterGroupOptions = { + showCoverageOnHover: true, + zoomToBoundsOnClick: false, + spiderfyOnMaxZoom: true, + removeOutsideVisibleBounds: false, + animate: true, + animateAddingMarkers: false, + disableClusteringAtZoom: 12, + maxClusterRadius: 40, + polygonOptions: polylineOptions, + singleMarkerMode: true, + spiderLegPolylineOptions: polylineOptions, + spiderfyDistanceMultiplier: 2, + iconCreateFunction: (cluster: L.MarkerCluster) => { + const childMarkers: L.Marker[] = cluster.getAllChildMarkers(); + const childCount: number = cluster.getChildCount(); + cluster.zoomToBounds(); + const bounds: L.LatLngBounds = cluster.getBounds(); + return icon; + }, + chunkedLoading: false, + chunkDelay: 100 +} -markerClusterGroup.addLayer(circleMarker); -map.addLayer(markerClusterGroup); -map.removeLayer(markerClusterGroup); +let markerClusterGroup: L.MarkerClusterGroup; +markerClusterGroup = L.markerClusterGroup(); +markerClusterGroup = L.markerClusterGroup(markerClusterGroupOptions); -// Marker -var marker = new L.Marker(new L.LatLng(0, 0)); +let map = L.map('foo'); -markerClusterGroup.addLayers([circleMarker, marker]); -map.addLayer(markerClusterGroup); -markerClusterGroup.refreshClusters(); -map.removeLayer(markerClusterGroup); +markerClusterGroup = markerClusterGroup.addTo(map); +map = map + .addLayer(markerClusterGroup) + .removeLayer(markerClusterGroup); + +const latLng: L.LatLng = L.latLng(10, 10); + +const layer: L.Layer = L.marker(latLng); +const layers: L.Layer[] = [layer]; + +let marker: L.Marker = L.marker(latLng); +let markers: L.Marker[] = [marker]; + +const layerGroup: L.LayerGroup = L.layerGroup(layers); + +marker = markerClusterGroup.getVisibleParent(marker); + +markerClusterGroup = markerClusterGroup + // Layers + .addLayer(layer) + .removeLayer(layer) + .addLayers(layers) + .removeLayers(layers) + .clearLayers() + // RefreshClusters + .refreshClusters() + .refreshClusters(layerGroup) + .refreshClusters(marker) + .refreshClusters(markers) + .refreshClusters(markerClusterGroup) + .refreshClusters({ id_any: layer }); + +const childCount: number = markerClusterGroup.getChildCount(); + +markers = markerClusterGroup.getAllChildMarkers(); + +markerClusterGroup.zoomToShowLayer(marker); +markerClusterGroup.zoomToShowLayer(marker, () => {}); + +let hasLayer: boolean; +hasLayer = markerClusterGroup.hasLayer(layer); +hasLayer = markerClusterGroup.hasLayer(marker); diff --git a/leaflet-markercluster/package.json b/leaflet-markercluster/package.json index 711ba15e43..b06daabe04 100644 --- a/leaflet-markercluster/package.json +++ b/leaflet-markercluster/package.json @@ -1,5 +1,5 @@ { "dependencies": { - "@types/leaflet": "^0.7" + "@types/leaflet": "^1.0" } } \ No newline at end of file diff --git a/leaflet-markercluster/tsconfig.json b/leaflet-markercluster/tsconfig.json index e07708e702..d5e7d33df8 100644 --- a/leaflet-markercluster/tsconfig.json +++ b/leaflet-markercluster/tsconfig.json @@ -1,11 +1,17 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", + "typeRoots": [ + "../" + ], "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/leaflet-markercluster/tslint.json b/leaflet-markercluster/tslint.json new file mode 100644 index 0000000000..192203ab54 --- /dev/null +++ b/leaflet-markercluster/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} \ No newline at end of file diff --git a/leaflet.awesome-markers/tsconfig.json b/leaflet.awesome-markers/tsconfig.json index 25996bc19d..a58d69863e 100644 --- a/leaflet.awesome-markers/tsconfig.json +++ b/leaflet.awesome-markers/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/leaflet.fullscreen/tsconfig.json b/leaflet.fullscreen/tsconfig.json index 93cc7fdf16..c877e598cf 100644 --- a/leaflet.fullscreen/tsconfig.json +++ b/leaflet.fullscreen/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/leaflet/package.json b/leaflet/package.json deleted file mode 100644 index 9605e3e506..0000000000 --- a/leaflet/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/geojson": "0.0.31" - } -} diff --git a/leaflet/tsconfig.json b/leaflet/tsconfig.json index 807b0e2e61..6eaf769059 100644 --- a/leaflet/tsconfig.json +++ b/leaflet/tsconfig.json @@ -1,13 +1,15 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, "baseUrl": "../", "typeRoots": [ - "node_modules/@types", "../" ], "types": [], diff --git a/leaflet/v0/tsconfig.json b/leaflet/v0/tsconfig.json index eee9d441fa..a37ed57eab 100644 --- a/leaflet/v0/tsconfig.json +++ b/leaflet/v0/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "leaflet": ["leaflet/v0"] + "leaflet": [ + "leaflet/v0" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/leapmotionts/tsconfig.json b/leapmotionts/tsconfig.json index f383c3dbeb..8417c33f63 100644 --- a/leapmotionts/tsconfig.json +++ b/leapmotionts/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/left-pad/tsconfig.json b/left-pad/tsconfig.json index 3138d79343..d8e429b77a 100644 --- a/left-pad/tsconfig.json +++ b/left-pad/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/less-middleware/tsconfig.json b/less-middleware/tsconfig.json index c65279a615..1ef75ffec3 100644 --- a/less-middleware/tsconfig.json +++ b/less-middleware/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/less/tsconfig.json b/less/tsconfig.json index 535517b840..6ed26dfe1a 100644 --- a/less/tsconfig.json +++ b/less/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lestate/tsconfig.json b/lestate/tsconfig.json index c1ad70e40c..6b25aa19f4 100644 --- a/lestate/tsconfig.json +++ b/lestate/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/level-sublevel/tsconfig.json b/level-sublevel/tsconfig.json index 6669254bcc..28c9e7a208 100644 --- a/level-sublevel/tsconfig.json +++ b/level-sublevel/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/levelup/tsconfig.json b/levelup/tsconfig.json index 309f065b79..1670ee86e6 100644 --- a/levelup/tsconfig.json +++ b/levelup/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/levenshtein/tsconfig.json b/levenshtein/tsconfig.json index 622c80747a..a8f2abee1a 100644 --- a/levenshtein/tsconfig.json +++ b/levenshtein/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/libpq/index.d.ts b/libpq/index.d.ts new file mode 100644 index 0000000000..df2135046a --- /dev/null +++ b/libpq/index.d.ts @@ -0,0 +1,428 @@ +// Type definitions for libpq 1.8 +// Project: https://github.com/brianc/node-libpq#readme +// Definitions by: Vlad Rindevich +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import {EventEmitter} from 'events'; +import {Buffer} from 'buffer'; + +declare namespace Libpq { + export interface NotifyMsg { + relname: string; + extra: string; + be_pid: number; + } + + export interface ResultError { + severity: string; + sqlState: string; + messagePrimary: string; + messageDetail?: string; + messageHint?: string; + statementPosition?: string; + internalPosition?: string; + internalQuery?: string; + context?: string; + schemaName?: string; + tableName?: string; + dataTypeName?: string; + constraintName?: string; + sourceFile: string; + sourceLine: string; + sourceFunction: string; + } +} + +declare class Libpq extends EventEmitter { + + /** + * Current connection state. + */ + connected: boolean; + + /** + * Issues a request to cancel the currently executing query on this instance of libpq. + * + * @returns {(boolean|string)} true if the cancel request was sent; a string error message if + * the cancel request failed for any reason. The string will + * contain the error message provided by libpq. + */ + cancel(): true|string; + + /** + * Manually frees the memory associated with a PGresult pointer. Generally this is called + * for you, but if you absolutely want to free the pointer yourself, you can. + */ + clear(): void; + + /** + * @returns {string} the status string associated with a result. Something akin to INSERT 3 0 + * if you inserted 3 rows. + */ + cmdStatus(): string; + + /** + * @returns {string} the number of tuples (rows) affected by the command. Even though this is a + * number, it is returned as a string to mirror libpq's behavior. + */ + cmdTuples(): string; + + /** + * (async) Connects to a PostgreSQL backend server process. + * + * This function actually calls the PQconnectdb blocking connection method in a background + * thread within node's internal thread-pool. There is a way to do non-blocking network I/O + * for some of the connecting with libpq directly, but it still blocks when your local file + * system looking for config files, SSL certificates, .pgpass file, and doing possible dns + * resolution. Because of this, the best way to get fully non-blocking is to juse use + * libuv_queue_work and let node do it's magic and so that's what I do. This function does + * not block. + * + * @param {string} connectParams an optional string + * @param {Function} callback mandatory. It is called when the connection has successfully been + * established. + */ + connect(connectParams: string, callback: (err?: Error) => void): void; + connect(callback: (err?: Error) => void): void; + + /** + * (sync) Attempts to connect to a PostgreSQL server. BLOCKS until it either succeedes, or + * fails. If it fails it will throw an exception. + * + * @param {string} connectionParams an optional string + */ + connectSync(connectionParams?: string): void; + + /** + * Reads waiting data from the socket. If the socket is not readable and you call this it will + * block so be careful and only call it within the readable callback for the most part. + * + * @returns {boolean} true if data was read; false if there was an error. You can access + * error details with [[Libpq.errorMessage]]. + */ + consumeInput(): boolean + + /** + * Retrieves the last error message from the connection. This is intended to be used after most + * functions which return an error code to get more detailed error information about the + * connection. You can also check this before issuing queries to see if your connection has + * been lost. + * + * @returns {string} + */ + errorMessage(): string; + + /** + * Exact copy of the PQescapeIdentifier function within libpq. Requires an established + * connection but does not perform any I/O. + * + * @param {string} input + */ + escapeIdentifier(input: string): string; + + /** + * Exact copy of the PQescapeLiteral function within libpq. Requires an established connection + * but does not perform any I/O. + * + * @param {string} input + */ + escapeLiteral(input: string): string; + + /** + * (sync) Sends a command to the backend and blocks until a result is received. + * + * @param {string} [commandText=""] a required string of the query. + */ + exec(commandText?: string): void; + + /** + * (sync) Sends a command and parameters to the backend and blocks until a result is received. + * + * @param {string} [commandText=""] a required string of the query. + * @param {Array.<(string|number)>} [parameters=[]] a required array of string values + * corresponding to each parameter in the + * commandText. + */ + execParams(commandText?: string, parameters?: Array): void; + + /** + * (sync) Sends a command to the server to execute a previously prepared statement. Blocks + * until the results are returned. + * + * @param {string} [statementName=""] a required string of the name of the prepared statement. + * @param {Array.<(string|number)>} [parameters=[]] the parameters to pass to the prepared + * statement. + */ + execPrepared(statementName?: string, parameters?: Array): void; + + /** + * Disconnects from the backend and cleans up all memory used by the libpq connection. + */ + finish(): void; + + /** + * Flushes buffered data to the socket. + * + * @returns {number} 1 if socket is not write-ready at which case you should call + * [[Libpq.writable]] with a callback and wait for the socket to be writable + * and then call [[Libpq.flush]] again; 0 if all data was flushed; -1 if + * there was an error. + */ + flush(): number; + + /** + * Retrieve the name of the field (column) at the given offset. Offset starts at 0. + * + * @param {number} fieldNumber + * @returns {string} + */ + fname(fieldNumber: number): string; + + /** + * Retrieve the Oid of the field (column) at the given offset. Offset starts at 0. + * + * @param {number} fieldNumber + * @returns {number} + */ + ftype(fieldNumber: number): number; + + /** + * After issuing a successfuly command like COPY table TO stdout gets copy data from the + * connection. + * + * @param {boolean} [async=false] a boolean. Pass false to block waiting for data from the + * backend. Defaults to false. + * + * @returns {Buffer|number} a node buffer if there is data available; 0 if the copy is still in + * progress (only if you have called [[Libpq.setNonBlocking]](true)); + * -1 if the copy is completed; -2 if there was an error. + */ + getCopyData(async?: boolean): Buffer|number; + + /** + * @param {number} tupleNumber + * @param {number} fieldNumber + * @returns {boolean} true if the value at the given offsets is actually null. Otherwise + * returns false. This is because [[Libpq.getvalue]] returns an empty + * string for both an actual empty string and for a null value. Weird, huh? + */ + getisnull(tupleNumber: number, fieldNumber: number): boolean; + + /** + * Parses received data from the server into a PGresult struct and sets a pointer internally to + * the connection object to this result. + * + * Warning: this function will block if libpq is waiting on async results to be returned from + * the server. Call [[Libpq.isBusy]] to determine if this command will block. + * + * @returns {boolean} true if libpq was able to read buffered data & parse a result object; + * false if there are no results waiting to be parsed. Generally doing async + * style queries you'll call this repeadedly until it returns false and then + * use the result accessor methods to pull results out of the current result + * set. + */ + getResult(): boolean; + + /** + * Retrieve the text value at a given tuple (row) and field (column) offset. Both offsets start + * at 0. A null value is returned as the empty string ''. + * + * @param {number} tupleNumber + * @param {number} [fieldNumber] + * @returns {string} + */ + getvalue(tupleNumber: number, fieldNumber?: number): string; + + /** + * @returns {boolean} true if calling [[Libpq.consumeInput]] would block waiting for more + * data; false if all data has been read from the socket. Once this returns false it is + * safe to call [[Libpq.getResult]]. + */ + isBusy(): boolean; + + /** + * @returns {boolean} true if non-blocking mode is enabled; false if disabled. + */ + isNonBlocking(): boolean; + + /** + * Retrieve the number of fields (columns) from the result. + * + * @returns {number} + */ + nfields(): number; + + /** + * Checks for NOTIFY messages that have come in. If any have been received they will be in the + * following format: + * + * @example ```ts + * + * var msg = { + * relname: 'name of channel', + * extra: 'message passed to notify command', + * be_pid: 130 + * } + * ``` + * + * @returns {Libpq.NotifyMsg} + */ + notifies(): Libpq.NotifyMsg; + + /** + * Retrieve the number of tuples (rows) from the result. + * + * @returns {number} + */ + ntuples(): number; + + /** + * After issuing a successful command like COPY table FROM stdin you can start putting buffers + * directly into the databse with this function. + * + * @param {Buffer} buffer a required node buffer of text data such as + * Buffer('column1\tcolumn2\n') + * + * @returns {number} 1 if sent succesfully; 0 if the command would block (only if you have + * called [[Libpq.setNonBlocking]](true)); -1 if there was an error sending + * the command. + */ + putCopyData(buffer: Buffer): number; + + /** + * Signals the backed your copy procedure is complete. If you pass errorMessage it will be sent + * to the backend and effectively cancel the copy operation. + * + * @param {string} [errorMessage] an optional string you can pass to cancel the copy operation. + * + * @returns {number} 1 if sent succesfully; 0 if the command would block (only if you have + * called [[Libpq.setNonBlocking]](true)); -1 if there was an error sending + * the command. + */ + putCopyEnd(errorMessage?: string): number; + + /** + * (sync) Sends a named statement to the server to be prepared for later execution. blocks + * until a result from the prepare operation is received. + * + * @param {string} [statementName=""] a required string of name of the statement to prepare. + * @param {string} [commandText=""] a required string of the query. + * @param {number} [nParams=0] a count of the number of parameters in the commandText. + */ + prepare(statementName?: string, commandText?: string, nParams?: number): void; + + /** + * Retrieves detailed error information from the current result object. Very similar to + * PQresultErrorField() except instead of passing a fieldCode and retrieving a single field, + * retrieves all fields from the error at once on a single object. The object returned is a + * simple hash, not an instance of an error object. + * + * If you wanted to access PG_DIAG_MESSAGE_DETAIL you would do the following: + * @example ```ts + * + * console.log(pq.errorFields().messageDetail); + * ``` + * @returns {Libpq.ResultError} + */ + resultErrorFields(): Libpq.ResultError; + + /** + * Retrieves the error message from the result. This will return null if the result does not + * have an error. + * + * @returns {string} + */ + resultErrorMessage(): string; + + /** + * @returns {string} either PGRES_COMMAND_OK or PGRES_FATAL_ERROR depending on the status of + * the last executed command. + */ + resultStatus(): string; + + /** + * (async) Sends a query to the server to be processed. + * + * @param {string} [commandText=""] a required string containing the query text. + * @returns {boolean} true if the command was sent succesfully or false if it failed to send. + */ + sendQuery(commandText?: string): boolean; + + /** + * (async) Sends a query and to the server to be processed. + * + * @param {string} [commandText=""] a required string containing the query text. + * @param {Array.<(string|number)>} [parameters=[]] an array of parameters as strings used in + * the parameterized query. + * @returns {boolean} true if the command was sent succesfully or false if it failed to send. + */ + sendQueryParams(commandText?: string, parameters?: Array): boolean; + + /** + * (async) Sends a request to the backend to prepare a named statement with the given name. + * + * @param {string} [statementName=""] a required string of name of the statement to prepare. + * @param {string} [commandText=""] a required string of the query. + * @param {number} [nParams=0] a count of the number of parameters in the commandText. + * @returns {boolean} true if the command was sent succesfully or false if it failed to send. + */ + sendPrepare(statementName?: string, commandText?: string, nParams?: number): boolean; + + /** + * (async) Sends a request to execute a previously prepared statement. + * + * @param {string} [statementName=""] a required string of the name of the prepared statement. + * @param {string[]} [parameters=[]] the parameters to pass to the prepared statement. + * @returns {boolean} true if the command was sent succesfully or false if it failed to send. + */ + sendQueryPrepared(statementName?: string, parameters?: string[]): boolean; + + /** + * @returns the version of the connected PostgreSQL backend server as a number. + */ + serverVersion(): number; + + /** + * Toggle the socket blocking on write. + * + * @param {boolean} [nonBlocking] true to set the connection to use non-blocking writes, false to + * use blocking writes. + * + * @returns {boolean} true if the socket's state was succesfully toggled, false if there was + * an error. + */ + setNonBlocking(nonBlocking?: boolean): boolean; + + /** + * @returns {number} an int representing the file descriptor for the socket used internally by + * the connection. + */ + socket(): number; + + /** + * This uses libuv to start a read watcher on the socket open to the backend. As soon as this + * socket becomes readable the pq instance will emit a readable event. It is up to you to call + * [[Libpq.consumeInput]] one or more times to clear this read notification or it will + * continue to emit read events over and over and over. The exact flow is outlined [here] under + * the documentation for PQisBusy. + */ + startReader(): void; + + /** + * Tells libuv to stop the read watcher on the connection socket. + */ + stopReader(): void; + + /** + * Call this to make sure the socket has flushed all data to the operating system. Once the + * socket is writable, your callback will be called. Usefully when using PQsetNonBlocking + * and PQflush for async writing. + * + * @param {Function} callback + */ + writable(callback: () => void): void; +} + +export = Libpq; diff --git a/libpq/libpq-tests.ts b/libpq/libpq-tests.ts new file mode 100644 index 0000000000..dda341a4bb --- /dev/null +++ b/libpq/libpq-tests.ts @@ -0,0 +1,828 @@ +/// +/// + +import {Buffer} from 'buffer'; +import * as assert from 'assert'; +import * as async from 'async'; +import * as PQ from 'libpq'; +import * as _ from 'lodash'; + +declare const ok: Function; + +const createTable = (pq: PQ) => { + pq.exec('CREATE TEMP TABLE test_data(name text, age int)'); + console.log(pq.resultErrorMessage()); + pq.exec("INSERT INTO test_data(name, age) VALUES ('brian', 32), ('aaron', 30), ('', null);") +}; + +const blink = (n: number, cb: Function) => { + const connections: PQ[] = []; + for (let i = 0; i < 30; i++) { + connections.push(new PQ()) + } + const connect = (con: PQ, cb: (err?: Error) => void) => { + con.connect(cb); + }; + async.each(connections, connect, ok(() => { + connections.forEach((con) => { + con.finish(); + }); + cb(); + })) +}; + +const queryText = "SELECT * FROM generate_series(1, 1000)"; + +const query = (pq: PQ, cb: Function) => { + const readError = (message?: string) => { + cleanup(); + return cb(new Error(message || pq.errorMessage())); + }; + + const onReadable = () => { + if (!pq.consumeInput()) { + return readError(); + } + + if (pq.isBusy()) { + return; + } + + pq.getResult(); + + if (pq.getResult()) { + return readError('Only one result at a time is accepted'); + } + cleanup(); + return cb(null, []) + }; + + const sent = pq.sendQuery(queryText); + if (!sent) return cb(new Error(pq.errorMessage())); + console.log('sent query'); + + const cleanup = () => { + pq.removeListener('readable', onReadable); + pq.stopReader(); + }; + + pq.on('readable', onReadable); + pq.startReader(); +}; + +describe('async connection', () => { + it('works', (done) => { + const pq = new PQ(); + assert(!pq.connected, 'should have connected set to falsy'); + pq.connect(err => { + assert.ifError(err); + pq.exec('SELECT NOW()'); + assert.equal(pq.ntuples(), 1); + done(); + }); + }); + + it('works with hard-coded connection parameters', (done) => { + const pq = new PQ(); + const conString = `host=${process.env.PGHOST || 'localhost'}`; + pq.connect(conString, done); + }); + + it('returns an error to the callback if connection fails', (done) => { + new PQ().connect('host=asldkfjasldkfjalskdfjasdf', err => { + assert(err, 'should have passed an error'); + done(); + }); + }); + + it('respects the active domain', (done) => { + const pq = new PQ(); + const domain = require('domain').create(); + domain.run(() => { + const activeDomain = process.domain; + assert(activeDomain, 'Should have an active domain'); + pq.connect(() => { + assert.strictEqual(process.domain, activeDomain, 'Active domain is lost'); + done(); + }); + }); + }); +}); + +const consume = (pq: PQ, cb: Function) => { + if (!pq.isBusy()) return cb(); + pq.startReader(); + const onReadable = () => { + assert(pq.consumeInput(), pq.errorMessage()); + if (pq.isBusy()) { + console.log('consuming a 2nd buffer of input later...'); + return; + } + pq.removeListener('readable', onReadable); + pq.stopReader(); + cb(); + }; + pq.on('readable', onReadable); +}; + +describe('async simple query', () => { + let pq: PQ; + + it('dispatches simple query', (done: Function) => { + assert(pq.setNonBlocking(true)); + pq.writable(() => { + const success = pq.sendQuery('SELECT 1'); + assert.strictEqual(pq.flush(), 0, 'Should have flushed all data to socket'); + assert(success, pq.errorMessage()); + consume(pq, () => { + assert.ifError(pq.errorMessage()); + assert(pq.getResult()); + assert.strictEqual(pq.getResult(), false); + assert.strictEqual(pq.ntuples(), 1); + assert.strictEqual(pq.getvalue(0, 0), '1'); + done(); + }); + }); + }); + + it('dispatches parameterized query', (done: Function) => { + const success = pq.sendQueryParams('SELECT $1::text as name', ['Brian']); + assert(success, pq.errorMessage()); + assert.strictEqual(pq.flush(), 0, 'Should have flushed query text & parameters'); + consume(pq, () => { + assert.ifError(pq.errorMessage()); + assert(pq.getResult()); + assert.strictEqual(pq.getResult(), false); + assert.strictEqual(pq.ntuples(), 1); + assert.equal(pq.getvalue(0, 0), 'Brian'); + done(); + }) + }); + + it('dispatches named query', (done: Function) => { + const statementName = 'async-get-name'; + const success = pq.sendPrepare(statementName, 'SELECT $1::text as name', 1); + assert(success, pq.errorMessage()); + assert.strictEqual(pq.flush(), 0, 'Should have flushed query text'); + consume(pq, () => { + assert.ifError(pq.errorMessage()); + + //first time there should be a result + assert(pq.getResult()); + + //call 'getResult' until it returns false indicating + //there is no more input to consume + assert.strictEqual(pq.getResult(), false); + + //since we only prepared a statement there should be + //0 tuples in the result + assert.equal(pq.ntuples(), 0); + + //now execute the previously prepared statement + const success = pq.sendQueryPrepared(statementName, ['Brian']); + assert(success, pq.errorMessage()); + assert.strictEqual(pq.flush(), 0, 'Should have flushed parameters'); + consume(pq, () => { + assert.ifError(pq.errorMessage()); + + //consume the result of the query execution + assert(pq.getResult()); + assert.equal(pq.ntuples(), 1); + assert.equal(pq.getvalue(0, 0), 'Brian'); + + //call 'getResult' again to ensure we're finished + assert.strictEqual(pq.getResult(), false); + done(); + }); + }); + }); +}); + +describe('cancel a request', () => { + it('works', (done) => { + const pq = new PQ(); + pq.connectSync(); + const sent = pq.sendQuery('pg_sleep(5000)'); + assert(sent, 'should have sent'); + const canceled = pq.cancel(); + assert.strictEqual(canceled, true, 'should have canceled'); + const hasResult = pq.getResult(); + assert(hasResult, 'should have a result'); + assert.equal(pq.resultStatus(), 'PGRES_FATAL_ERROR'); + assert.equal(pq.getResult(), false); + pq.exec('SELECT NOW()'); + done(); + }); +}); + +describe('Constructing multiple', () => { + it('works all at once', () => { + for (let i = 0; i < 1000; i++) { + const pq = new PQ(); + } + }); + + it('connects and disconnects each client', (done) => { + const connect = (n: number, cb: (err?: Error) => void) => { + const pq = new PQ(); + pq.connect(cb); + }; + async.times(30, connect, done); + }); +}); + +describe('COPY IN', () => { + let pq: PQ; + + before(() => { + pq = new PQ(); + pq.connectSync(); + createTable(pq); + }); + + after(() => { + pq.finish(); + }); + + it('check existing data assuptions', () => { + pq.exec('SELECT COUNT(*) FROM test_data'); + assert.equal(pq.getvalue(0, 0), 3); + }); + + it('copies data in', () => { + const success = pq.exec('COPY test_data FROM stdin'); + assert.equal(pq.resultStatus(), 'PGRES_COPY_IN'); + + const buffer = new Buffer("bob\t100\n", 'utf8'); + const res1 = pq.putCopyData(buffer); + assert.strictEqual(res1, 1); + + const res2 = pq.putCopyEnd(); + assert.strictEqual(res2, 1); + + while (pq.getResult()) { + } + + pq.exec('SELECT COUNT(*) FROM test_data'); + assert.equal(pq.getvalue(0, 0), 4); + }); + + it('can cancel copy data in', () => { + const success = pq.exec('COPY test_data FROM stdin'); + assert.equal(pq.resultStatus(), 'PGRES_COPY_IN'); + + const buffer = new Buffer("bob\t100\n", 'utf8'); + const res1 = pq.putCopyData(buffer); + assert.strictEqual(res1, 1); + + const res2 = pq.putCopyEnd('cancel!'); + assert.strictEqual(res2, 1); + + while (pq.getResult()) { + } + assert(pq.errorMessage()); + assert( + pq.errorMessage().includes('cancel!'), + `${pq.errorMessage()} should have contained "cancel!"` + ); + + pq.exec('SELECT COUNT(*) FROM test_data'); + assert.equal(pq.getvalue(0, 0), 4); + }); +}); + +describe('COPY OUT', () => { + let pq: PQ; + + before(() => { + pq = new PQ(); + pq.connectSync(); + createTable(pq); + }); + + after(() => { + pq.finish(); + }); + + const getRow = (pq: PQ, expected: string) => { + const result = pq.getCopyData(false); + assert(result instanceof Buffer, 'Result should be a buffer'); + assert.equal(result.toString('utf8'), expected); + }; + + it('copies data out', () => { + pq.exec('COPY test_data TO stdin'); + assert.equal(pq.resultStatus(), 'PGRES_COPY_OUT'); + getRow(pq, 'brian\t32\n'); + getRow(pq, 'aaron\t30\n'); + getRow(pq, '\t\\N\n'); + assert.strictEqual( pq.getCopyData(), -1); + }); +}); + +describe('without being connected', () => { + it('exec fails', () => { + const pq = new PQ(); + pq.exec(); + assert.equal(pq.resultStatus(), 'PGRES_FATAL_ERROR'); + assert(pq.errorMessage()); + }); + + it('fails on async query', () => { + const pq = new PQ(); + const success = pq.sendQuery('blah'); + assert.strictEqual(success, false); + assert.equal(pq.resultStatus(), 'PGRES_FATAL_ERROR'); + assert(pq.errorMessage()); + }); + + it('throws when reading while not connected', () => { + const pq = new PQ(); + assert.throws(() => { + pq.startReader(); + }); + }); + + it('throws when writing while not connected', () => { + const pq = new PQ(); + assert.throws(() => { + pq.writable(() => { + }); + }); + }); +}); + +describe('error info', () => { + let pq: PQ; + + before(() => { + pq = new PQ(); + pq.connectSync(); + createTable(pq); + }); + + after(() => { + pq.finish(); + }); + + describe('when there is no error', () => { + + it('everything is null', () => { + pq.exec('SELECT NOW()'); + assert(!pq.errorMessage(), pq.errorMessage()); + assert.equal(pq.ntuples(), 1); + assert(pq.resultErrorFields(), undefined); + }); + }); + + describe('when there is an error', () => { + it('sets all error codes', () => { + pq.exec('INSERT INTO test_data VALUES(1, NOW())'); + assert(pq.errorMessage()); + const err = pq.resultErrorFields(); + assert.notEqual(err, null); + assert.equal(err.severity, 'ERROR'); + assert.equal(err.sqlState, 42804); + assert.equal(err.messagePrimary, 'column "age" is of type integer but expression is of type timestamp with time zone'); + assert.equal(err.messageDetail, undefined); + assert.equal(err.messageHint, 'You will need to rewrite or cast the expression.'); + assert.equal(err.statementPosition, 33); + assert.equal(err.internalPosition, undefined); + assert.equal(err.internalQuery, undefined); + assert.equal(err.context, undefined); + assert.equal(err.schemaName, undefined); + assert.equal(err.tableName, undefined); + assert.equal(err.dataTypeName, undefined); + assert.equal(err.constraintName, undefined); + assert.equal(err.sourceFile, "parse_target.c"); + assert(parseInt(err.sourceLine)); + assert.equal(err.sourceFunction, "transformAssignedExpr"); + }); + }); +}); + +describe('escapeLiteral', () => { + it('fails to escape when the server is not connected', () => { + const pq = new PQ(); + const result = pq.escapeLiteral('test'); + assert.strictEqual(result, null); + assert(pq.errorMessage()); + }); + + it('escapes a simple string', () => { + const pq = new PQ(); + pq.connectSync(); + const result = pq.escapeLiteral('bang'); + assert.equal(result, "'bang'"); + }); + + it('escapes a bad string', () => { + const pq = new PQ(); + pq.connectSync(); + const result = pq.escapeLiteral("'; TRUNCATE TABLE blah;"); + assert.equal(result, "'''; TRUNCATE TABLE blah;'"); + }); +}); + +describe('escapeIdentifier', () => { + it('fails when the server is not connected', () => { + const pq = new PQ(); + const result = pq.escapeIdentifier('test'); + assert.strictEqual(result, null); + assert(pq.errorMessage()); + }); + + it('escapes a simple string', () => { + const pq = new PQ(); + pq.connectSync(); + const result = pq.escapeIdentifier('bang'); + assert.equal(result, '"bang"'); + }); +}); + +describe('connecting', () => { + it('works', () => { + const client = new PQ(); + client.connectSync(); + }); +}); + +describe('many connections', () => { + it('works', (done) => { + async.timesSeries(10, blink, done) + }) +}); + +describe('connectSync', () => { + it('works 50 times in a row', () => { + const pqs = _.times(50, () => new PQ()); + pqs.forEach((pq) => { + pq.connectSync(); + }); + pqs.forEach((pq) => { + pq.finish(); + }); + }); +}); + +describe('connect async', () => { + const total = 50; + it(`works ${total} times in a row`, (done) => { + const pqs = _.times(total, () => new PQ()); + + let count = 0; + const connect = (cb: Function) => { + pqs.forEach((pq) => { + pq.connect((err) => { + assert.ifError(err); + count++; + pq.startReader(); + if (count == total) { + cb(); + } + }); + }); + }; + connect(() => { + pqs.forEach((pq) => { + pq.stopReader(); + pq.finish(); + }); + done(); + }); + }); +}); + +describe('multiple queries', () => { + const pq = new PQ(); + + before((done) => { + pq.connect(done) + }); + + it('first query works', (done) => { + query(pq, done); + }); + + it('second query works', (done) => { + query(pq, done); + }); + + it('third query works', (done) => { + query(pq, done); + }); +}); + +describe('set & get non blocking', () => { + let pq: PQ; + + before(() => { + pq = new PQ(); + pq.connectSync(); + createTable(pq); + }); + + after(() => { + pq.finish(); + }); + + it('is initially set to false', () => { + assert.strictEqual(pq.isNonBlocking(), false); + }); + + it('can switch back and forth', () => { + assert.strictEqual(pq.setNonBlocking(true), true); + assert.strictEqual(pq.isNonBlocking(), true); + assert.strictEqual(pq.setNonBlocking(), true); + assert.strictEqual(pq.isNonBlocking(), false); + }); +}); + +describe('LISTEN/NOTIFY', () => { + let listener: PQ; + let notifier: PQ; + + before(() => { + listener = new PQ(); + notifier = new PQ(); + listener.connectSync(); + notifier.connectSync(); + }); + + it('works', () => { + notifier.exec("NOTIFY testing, 'My Payload'"); + let notice = listener.notifies(); + assert.equal(notice, null); + + listener.exec('LISTEN testing'); + notifier.exec("NOTIFY testing, 'My Second Payload'"); + listener.exec('SELECT NOW()'); + notice = listener.notifies(); + assert(notice, 'listener should have had a notification come in'); + assert.equal(notice.relname, 'testing', 'missing relname == testing'); + assert.equal(notice.extra, 'My Second Payload'); + assert(notice.be_pid); + }); + + after(() => { + listener.finish(); + notifier.finish(); + }); +}); + +describe('result accessors', () => { + let pq: PQ; + + before(() => { + pq = new PQ(); + pq.connectSync(); + createTable(pq); + }); + + after(() => { + pq.finish(); + }); + + before(() => { + pq.exec("INSERT INTO test_data(name, age) VALUES ('bob', 80) RETURNING *"); + assert(!pq.errorMessage()); + }); + + it('has ntuples', () => { + assert.strictEqual(pq.ntuples(), 1); + }); + + it('has cmdStatus', () => { + assert.equal(pq.cmdStatus(), 'INSERT 0 1'); + }); + + it('has command tuples', () => { + assert.strictEqual(pq.cmdTuples(), '1'); + }); +}); + +describe('Retrieve server version from connection', () => { + + it('return version number when connected', () => { + const pq = new PQ(); + pq.connectSync(); + const version = pq.serverVersion(); + assert.equal(typeof version, 'number'); + assert(version > 60000); + }); + + it('return zero when not connected', () => { + const pq = new PQ(); + const version = pq.serverVersion(); + assert.equal(typeof version, 'number'); + assert.equal(version, 0); + }); + +}); + +describe('getting socket', () => { + let pq: PQ; + + before(() => { + pq = new PQ(); + pq.connectSync(); + createTable(pq); + }); + + after(() => { + pq.finish(); + }); + + it('returns -1 when not connected', () => { + const pq = new PQ(); + assert.equal(pq.socket(), -1); + }); + + it('returns value when connected', () => { + assert(pq.socket() > 0); + }); +}); + +describe('connecting with bad credentials', () => { + it('throws an error', () => { + try { + new PQ().connectSync('asldkfjlasdf'); + } catch (e) { + assert.equal(e.toString().indexOf('connection pointer is NULL'), -1); + return; + } + + assert.fail(null, null, 'Should have thrown an exception', ''); + }); +}); + +describe('connecting with no credentials', () => { + let pq: PQ; + + before(() => { + pq = new PQ(); + pq.connectSync(); + }); + + it('is connected', () => { + assert(pq.connected, 'should have connected == true'); + }); + + after(() => { + pq.finish(); + assert(!pq.connected); + }); +}); + +describe('result checking', () => { + let pq: PQ; + + before(() => { + pq = new PQ(); + pq.connectSync(); + }); + + after(() => { + pq.finish(); + }); + + it('executes query', () => { + pq.exec('SELECT NOW() as my_col'); + assert.equal(pq.resultStatus(), 'PGRES_TUPLES_OK'); + }); + + it('has 1 tuple', () => { + assert.equal(pq.ntuples(), 1); + }); + + it('has 1 field', () => { + assert.strictEqual(pq.nfields(), 1); + }); + + it('has column name', () => { + assert.equal(pq.fname(0), 'my_col'); + }); + + it('has oid type of timestamptz', () => { + assert.strictEqual(pq.ftype(0), 1184); + }); + + it('has value as a date', () => { + const now = new Date(); + const val = pq.getvalue(0); + const date = new Date(Date.parse(val)); + assert.equal(date.getFullYear(), now.getFullYear()); + assert.equal(date.getMonth(), now.getMonth()); + }); + + it('can manually clear result multiple times', () => { + pq.clear(); + pq.clear(); + pq.clear(); + }); +}); + +describe('low-level query integration tests', () => { + let pq: PQ; + + before(() => { + pq = new PQ(); + pq.connectSync(); + createTable(pq); + }); + + after(() => { + pq.finish(); + }); + + describe('exec', () => { + before(() => { + pq.exec('SELECT * FROM test_data'); + }); + + it('has correct tuples', () => { + assert.strictEqual(pq.ntuples(), 3); + }); + + it('has correct field count', () => { + assert.strictEqual(pq.nfields(), 2); + }); + + it('has correct rows', () => { + assert.strictEqual(pq.getvalue(0, 0), 'brian'); + assert.strictEqual(pq.getvalue(1, 1), '30'); + assert.strictEqual(pq.getvalue(2, 0), ''); + assert.strictEqual(pq.getisnull(2, 0), false); + assert.strictEqual(pq.getvalue(2, 1), ''); + assert.strictEqual(pq.getisnull(2, 1), true); + }); + }); +}); + +describe('sync query with parameters', () => { + let pq: PQ; + + before(() => { + pq = new PQ(); + pq.connectSync(); + createTable(pq); + }); + + after(() => { + pq.finish(); + }); + + it('works with single string parameter', () => { + const queryText = 'SELECT $1::text as name'; + pq.execParams(queryText, ['Brian']); + assert.strictEqual(pq.ntuples(), 1); + assert.strictEqual(pq.getvalue(0, 0), 'Brian'); + }); + + it('works with a number parameter', () => { + const queryText = 'SELECT $1::int as age'; + pq.execParams(queryText, [32]); + assert.strictEqual(pq.ntuples(), 1); + assert.strictEqual(pq.getvalue(0, 0), '32'); + }); + + it('works with multiple parameters', () => { + const queryText = 'INSERT INTO test_data(name, age) VALUES($1, $2)'; + pq.execParams(queryText, ['Barkley', 4]); + assert.equal(pq.resultErrorMessage(), ''); + }); +}); + +describe('prepare and execPrepared', () => { + let pq: PQ; + + before(() => { + pq = new PQ(); + pq.connectSync(); + createTable(pq); + }); + + after(() => { + pq.finish(); + }); + + const statementName = 'get-name'; + + describe('preparing a statement', () => { + it('works properly', () => { + pq.prepare(statementName, 'SELECT $1::text as name', 1); + assert.ifError(pq.resultErrorMessage()); + assert.equal(pq.resultStatus(), 'PGRES_COMMAND_OK'); + }); + }); + + describe('executing a prepared statement', () => { + it('works properly', () => { + pq.execPrepared(statementName, ['Brian']); + assert.ifError(pq.resultErrorMessage()); + assert.strictEqual(pq.ntuples(), 1); + assert.strictEqual(pq.nfields(), 1); + assert.strictEqual(pq.getvalue(0, 0), 'Brian'); + }); + }); +}); diff --git a/libpq/tsconfig.json b/libpq/tsconfig.json new file mode 100644 index 0000000000..5ab89a06ee --- /dev/null +++ b/libpq/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "libpq-tests.ts" + ] +} diff --git a/libpq/tslint.json b/libpq/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/libpq/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/libxmljs/tsconfig.json b/libxmljs/tsconfig.json index a157750126..0b1cbca085 100644 --- a/libxmljs/tsconfig.json +++ b/libxmljs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/libxslt/tsconfig.json b/libxslt/tsconfig.json index 128beaef26..5819e6de24 100644 --- a/libxslt/tsconfig.json +++ b/libxslt/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lime-js/tsconfig.json b/lime-js/tsconfig.json index 6e98827190..1fbc4e9e82 100644 --- a/lime-js/tsconfig.json +++ b/lime-js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/line-reader/tsconfig.json b/line-reader/tsconfig.json index 596ef8667c..968735ad02 100644 --- a/line-reader/tsconfig.json +++ b/line-reader/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lls/tsconfig.json b/lls/tsconfig.json index a3033e8988..e159cb7263 100644 --- a/lls/tsconfig.json +++ b/lls/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/load-json-file/tsconfig.json b/load-json-file/tsconfig.json index 60e55f40fa..8d86c2506e 100644 --- a/load-json-file/tsconfig.json +++ b/load-json-file/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/loader-runner/tsconfig.json b/loader-runner/tsconfig.json index d87ded872d..4f926c24c2 100644 --- a/loader-runner/tsconfig.json +++ b/loader-runner/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/lobibox/tsconfig.json b/lobibox/tsconfig.json index 5566dfad14..923f2c88ec 100644 --- a/lobibox/tsconfig.json +++ b/lobibox/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/localforage-cordovasqlitedriver/tsconfig.json b/localforage-cordovasqlitedriver/tsconfig.json index 91e2a4fc98..21bd910eae 100644 --- a/localforage-cordovasqlitedriver/tsconfig.json +++ b/localforage-cordovasqlitedriver/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/localforage/tsconfig.json b/localforage/tsconfig.json index b2ebf8be91..1e3cbf9e63 100644 --- a/localforage/tsconfig.json +++ b/localforage/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lockfile/tsconfig.json b/lockfile/tsconfig.json index ed62b2ed03..2e9d40c42a 100644 --- a/lockfile/tsconfig.json +++ b/lockfile/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lockr/tsconfig.json b/lockr/tsconfig.json index 9fa05333b2..8aa1ca22ec 100644 --- a/lockr/tsconfig.json +++ b/lockr/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/locutus/tsconfig.json b/locutus/tsconfig.json index c4847306df..67e9c76747 100644 --- a/locutus/tsconfig.json +++ b/locutus/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash-decorators/tsconfig.json b/lodash-decorators/tsconfig.json index 6f09e7a699..f0e0708cde 100644 --- a/lodash-decorators/tsconfig.json +++ b/lodash-decorators/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash-es/tsconfig.json b/lodash-es/tsconfig.json index 7d7453cd56..9d2eae2c71 100644 --- a/lodash-es/tsconfig.json +++ b/lodash-es/tsconfig.json @@ -291,7 +291,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.add/tsconfig.json b/lodash.add/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.add/tsconfig.json +++ b/lodash.add/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.after/tsconfig.json b/lodash.after/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.after/tsconfig.json +++ b/lodash.after/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.ary/tsconfig.json b/lodash.ary/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.ary/tsconfig.json +++ b/lodash.ary/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.assign/tsconfig.json b/lodash.assign/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.assign/tsconfig.json +++ b/lodash.assign/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.assignin/tsconfig.json b/lodash.assignin/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.assignin/tsconfig.json +++ b/lodash.assignin/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.assigninwith/tsconfig.json b/lodash.assigninwith/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.assigninwith/tsconfig.json +++ b/lodash.assigninwith/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.assignwith/tsconfig.json b/lodash.assignwith/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.assignwith/tsconfig.json +++ b/lodash.assignwith/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.at/tsconfig.json b/lodash.at/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.at/tsconfig.json +++ b/lodash.at/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.attempt/tsconfig.json b/lodash.attempt/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.attempt/tsconfig.json +++ b/lodash.attempt/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.before/tsconfig.json b/lodash.before/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.before/tsconfig.json +++ b/lodash.before/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.bind/tsconfig.json b/lodash.bind/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.bind/tsconfig.json +++ b/lodash.bind/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.bindall/tsconfig.json b/lodash.bindall/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.bindall/tsconfig.json +++ b/lodash.bindall/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.bindkey/tsconfig.json b/lodash.bindkey/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.bindkey/tsconfig.json +++ b/lodash.bindkey/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.camelcase/tsconfig.json b/lodash.camelcase/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.camelcase/tsconfig.json +++ b/lodash.camelcase/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.capitalize/tsconfig.json b/lodash.capitalize/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.capitalize/tsconfig.json +++ b/lodash.capitalize/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.castarray/tsconfig.json b/lodash.castarray/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.castarray/tsconfig.json +++ b/lodash.castarray/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.ceil/tsconfig.json b/lodash.ceil/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.ceil/tsconfig.json +++ b/lodash.ceil/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.chunk/tsconfig.json b/lodash.chunk/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.chunk/tsconfig.json +++ b/lodash.chunk/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.clamp/tsconfig.json b/lodash.clamp/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.clamp/tsconfig.json +++ b/lodash.clamp/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.clone/tsconfig.json b/lodash.clone/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.clone/tsconfig.json +++ b/lodash.clone/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.clonedeep/tsconfig.json b/lodash.clonedeep/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.clonedeep/tsconfig.json +++ b/lodash.clonedeep/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.clonedeepwith/tsconfig.json b/lodash.clonedeepwith/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.clonedeepwith/tsconfig.json +++ b/lodash.clonedeepwith/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.clonewith/tsconfig.json b/lodash.clonewith/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.clonewith/tsconfig.json +++ b/lodash.clonewith/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.compact/tsconfig.json b/lodash.compact/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.compact/tsconfig.json +++ b/lodash.compact/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.concat/tsconfig.json b/lodash.concat/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.concat/tsconfig.json +++ b/lodash.concat/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.constant/tsconfig.json b/lodash.constant/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.constant/tsconfig.json +++ b/lodash.constant/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.countby/tsconfig.json b/lodash.countby/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.countby/tsconfig.json +++ b/lodash.countby/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.create/tsconfig.json b/lodash.create/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.create/tsconfig.json +++ b/lodash.create/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.curry/tsconfig.json b/lodash.curry/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.curry/tsconfig.json +++ b/lodash.curry/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.curryright/tsconfig.json b/lodash.curryright/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.curryright/tsconfig.json +++ b/lodash.curryright/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.debounce/tsconfig.json b/lodash.debounce/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.debounce/tsconfig.json +++ b/lodash.debounce/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.deburr/tsconfig.json b/lodash.deburr/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.deburr/tsconfig.json +++ b/lodash.deburr/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.defaults/tsconfig.json b/lodash.defaults/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.defaults/tsconfig.json +++ b/lodash.defaults/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.defaultsdeep/tsconfig.json b/lodash.defaultsdeep/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.defaultsdeep/tsconfig.json +++ b/lodash.defaultsdeep/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.defer/tsconfig.json b/lodash.defer/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.defer/tsconfig.json +++ b/lodash.defer/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.delay/tsconfig.json b/lodash.delay/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.delay/tsconfig.json +++ b/lodash.delay/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.difference/tsconfig.json b/lodash.difference/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.difference/tsconfig.json +++ b/lodash.difference/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.differenceby/tsconfig.json b/lodash.differenceby/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.differenceby/tsconfig.json +++ b/lodash.differenceby/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.differencewith/tsconfig.json b/lodash.differencewith/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.differencewith/tsconfig.json +++ b/lodash.differencewith/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.drop/tsconfig.json b/lodash.drop/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.drop/tsconfig.json +++ b/lodash.drop/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.dropright/tsconfig.json b/lodash.dropright/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.dropright/tsconfig.json +++ b/lodash.dropright/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.droprightwhile/tsconfig.json b/lodash.droprightwhile/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.droprightwhile/tsconfig.json +++ b/lodash.droprightwhile/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.dropwhile/tsconfig.json b/lodash.dropwhile/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.dropwhile/tsconfig.json +++ b/lodash.dropwhile/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.endswith/tsconfig.json b/lodash.endswith/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.endswith/tsconfig.json +++ b/lodash.endswith/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.eq/tsconfig.json b/lodash.eq/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.eq/tsconfig.json +++ b/lodash.eq/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.escape/tsconfig.json b/lodash.escape/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.escape/tsconfig.json +++ b/lodash.escape/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.escaperegexp/tsconfig.json b/lodash.escaperegexp/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.escaperegexp/tsconfig.json +++ b/lodash.escaperegexp/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.every/tsconfig.json b/lodash.every/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.every/tsconfig.json +++ b/lodash.every/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.fill/tsconfig.json b/lodash.fill/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.fill/tsconfig.json +++ b/lodash.fill/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.filter/tsconfig.json b/lodash.filter/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.filter/tsconfig.json +++ b/lodash.filter/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.find/tsconfig.json b/lodash.find/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.find/tsconfig.json +++ b/lodash.find/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.findindex/tsconfig.json b/lodash.findindex/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.findindex/tsconfig.json +++ b/lodash.findindex/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.findkey/tsconfig.json b/lodash.findkey/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.findkey/tsconfig.json +++ b/lodash.findkey/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.findlast/tsconfig.json b/lodash.findlast/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.findlast/tsconfig.json +++ b/lodash.findlast/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.findlastindex/tsconfig.json b/lodash.findlastindex/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.findlastindex/tsconfig.json +++ b/lodash.findlastindex/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.findlastkey/tsconfig.json b/lodash.findlastkey/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.findlastkey/tsconfig.json +++ b/lodash.findlastkey/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.first/tsconfig.json b/lodash.first/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.first/tsconfig.json +++ b/lodash.first/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.flatmap/tsconfig.json b/lodash.flatmap/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.flatmap/tsconfig.json +++ b/lodash.flatmap/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.flatten/tsconfig.json b/lodash.flatten/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.flatten/tsconfig.json +++ b/lodash.flatten/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.flattendeep/tsconfig.json b/lodash.flattendeep/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.flattendeep/tsconfig.json +++ b/lodash.flattendeep/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.flattendepth/tsconfig.json b/lodash.flattendepth/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.flattendepth/tsconfig.json +++ b/lodash.flattendepth/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.flip/tsconfig.json b/lodash.flip/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.flip/tsconfig.json +++ b/lodash.flip/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.floor/tsconfig.json b/lodash.floor/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.floor/tsconfig.json +++ b/lodash.floor/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.flow/tsconfig.json b/lodash.flow/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.flow/tsconfig.json +++ b/lodash.flow/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.flowright/tsconfig.json b/lodash.flowright/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.flowright/tsconfig.json +++ b/lodash.flowright/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.foreach/tsconfig.json b/lodash.foreach/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.foreach/tsconfig.json +++ b/lodash.foreach/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.foreachright/tsconfig.json b/lodash.foreachright/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.foreachright/tsconfig.json +++ b/lodash.foreachright/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.forin/tsconfig.json b/lodash.forin/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.forin/tsconfig.json +++ b/lodash.forin/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.forinright/tsconfig.json b/lodash.forinright/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.forinright/tsconfig.json +++ b/lodash.forinright/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.forown/tsconfig.json b/lodash.forown/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.forown/tsconfig.json +++ b/lodash.forown/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.forownright/tsconfig.json b/lodash.forownright/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.forownright/tsconfig.json +++ b/lodash.forownright/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.frompairs/tsconfig.json b/lodash.frompairs/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.frompairs/tsconfig.json +++ b/lodash.frompairs/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.functions/tsconfig.json b/lodash.functions/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.functions/tsconfig.json +++ b/lodash.functions/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.functionsin/tsconfig.json b/lodash.functionsin/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.functionsin/tsconfig.json +++ b/lodash.functionsin/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.get/tsconfig.json b/lodash.get/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.get/tsconfig.json +++ b/lodash.get/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.groupby/tsconfig.json b/lodash.groupby/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.groupby/tsconfig.json +++ b/lodash.groupby/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.gt/tsconfig.json b/lodash.gt/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.gt/tsconfig.json +++ b/lodash.gt/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.gte/tsconfig.json b/lodash.gte/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.gte/tsconfig.json +++ b/lodash.gte/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.has/tsconfig.json b/lodash.has/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.has/tsconfig.json +++ b/lodash.has/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.hasin/tsconfig.json b/lodash.hasin/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.hasin/tsconfig.json +++ b/lodash.hasin/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.head/tsconfig.json b/lodash.head/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.head/tsconfig.json +++ b/lodash.head/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.identity/tsconfig.json b/lodash.identity/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.identity/tsconfig.json +++ b/lodash.identity/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.includes/tsconfig.json b/lodash.includes/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.includes/tsconfig.json +++ b/lodash.includes/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.indexof/tsconfig.json b/lodash.indexof/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.indexof/tsconfig.json +++ b/lodash.indexof/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.initial/tsconfig.json b/lodash.initial/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.initial/tsconfig.json +++ b/lodash.initial/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.inrange/tsconfig.json b/lodash.inrange/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.inrange/tsconfig.json +++ b/lodash.inrange/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.intersection/tsconfig.json b/lodash.intersection/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.intersection/tsconfig.json +++ b/lodash.intersection/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.intersectionby/tsconfig.json b/lodash.intersectionby/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.intersectionby/tsconfig.json +++ b/lodash.intersectionby/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.intersectionwith/tsconfig.json b/lodash.intersectionwith/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.intersectionwith/tsconfig.json +++ b/lodash.intersectionwith/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.invert/tsconfig.json b/lodash.invert/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.invert/tsconfig.json +++ b/lodash.invert/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.invertby/tsconfig.json b/lodash.invertby/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.invertby/tsconfig.json +++ b/lodash.invertby/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.invoke/tsconfig.json b/lodash.invoke/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.invoke/tsconfig.json +++ b/lodash.invoke/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.invokemap/tsconfig.json b/lodash.invokemap/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.invokemap/tsconfig.json +++ b/lodash.invokemap/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isarguments/tsconfig.json b/lodash.isarguments/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isarguments/tsconfig.json +++ b/lodash.isarguments/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isarray/tsconfig.json b/lodash.isarray/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isarray/tsconfig.json +++ b/lodash.isarray/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isarraybuffer/tsconfig.json b/lodash.isarraybuffer/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isarraybuffer/tsconfig.json +++ b/lodash.isarraybuffer/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isarraylike/tsconfig.json b/lodash.isarraylike/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isarraylike/tsconfig.json +++ b/lodash.isarraylike/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isarraylikeobject/tsconfig.json b/lodash.isarraylikeobject/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isarraylikeobject/tsconfig.json +++ b/lodash.isarraylikeobject/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isboolean/tsconfig.json b/lodash.isboolean/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isboolean/tsconfig.json +++ b/lodash.isboolean/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isbuffer/tsconfig.json b/lodash.isbuffer/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isbuffer/tsconfig.json +++ b/lodash.isbuffer/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isdate/tsconfig.json b/lodash.isdate/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isdate/tsconfig.json +++ b/lodash.isdate/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.iselement/tsconfig.json b/lodash.iselement/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.iselement/tsconfig.json +++ b/lodash.iselement/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isempty/tsconfig.json b/lodash.isempty/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isempty/tsconfig.json +++ b/lodash.isempty/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isequal/tsconfig.json b/lodash.isequal/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isequal/tsconfig.json +++ b/lodash.isequal/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isequalwith/tsconfig.json b/lodash.isequalwith/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isequalwith/tsconfig.json +++ b/lodash.isequalwith/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.iserror/tsconfig.json b/lodash.iserror/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.iserror/tsconfig.json +++ b/lodash.iserror/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isfinite/tsconfig.json b/lodash.isfinite/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isfinite/tsconfig.json +++ b/lodash.isfinite/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isfunction/tsconfig.json b/lodash.isfunction/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isfunction/tsconfig.json +++ b/lodash.isfunction/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isinteger/tsconfig.json b/lodash.isinteger/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isinteger/tsconfig.json +++ b/lodash.isinteger/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.islength/tsconfig.json b/lodash.islength/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.islength/tsconfig.json +++ b/lodash.islength/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.ismap/tsconfig.json b/lodash.ismap/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.ismap/tsconfig.json +++ b/lodash.ismap/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.ismatch/tsconfig.json b/lodash.ismatch/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.ismatch/tsconfig.json +++ b/lodash.ismatch/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.ismatchwith/tsconfig.json b/lodash.ismatchwith/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.ismatchwith/tsconfig.json +++ b/lodash.ismatchwith/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isnan/tsconfig.json b/lodash.isnan/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isnan/tsconfig.json +++ b/lodash.isnan/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isnative/tsconfig.json b/lodash.isnative/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isnative/tsconfig.json +++ b/lodash.isnative/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isnil/tsconfig.json b/lodash.isnil/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isnil/tsconfig.json +++ b/lodash.isnil/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isnull/tsconfig.json b/lodash.isnull/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isnull/tsconfig.json +++ b/lodash.isnull/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isnumber/tsconfig.json b/lodash.isnumber/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isnumber/tsconfig.json +++ b/lodash.isnumber/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isobject/tsconfig.json b/lodash.isobject/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isobject/tsconfig.json +++ b/lodash.isobject/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isobjectlike/tsconfig.json b/lodash.isobjectlike/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isobjectlike/tsconfig.json +++ b/lodash.isobjectlike/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isplainobject/tsconfig.json b/lodash.isplainobject/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isplainobject/tsconfig.json +++ b/lodash.isplainobject/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isregexp/tsconfig.json b/lodash.isregexp/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isregexp/tsconfig.json +++ b/lodash.isregexp/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.issafeinteger/tsconfig.json b/lodash.issafeinteger/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.issafeinteger/tsconfig.json +++ b/lodash.issafeinteger/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isset/tsconfig.json b/lodash.isset/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isset/tsconfig.json +++ b/lodash.isset/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isstring/tsconfig.json b/lodash.isstring/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isstring/tsconfig.json +++ b/lodash.isstring/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.issymbol/tsconfig.json b/lodash.issymbol/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.issymbol/tsconfig.json +++ b/lodash.issymbol/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.istypedarray/tsconfig.json b/lodash.istypedarray/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.istypedarray/tsconfig.json +++ b/lodash.istypedarray/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isundefined/tsconfig.json b/lodash.isundefined/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isundefined/tsconfig.json +++ b/lodash.isundefined/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isweakmap/tsconfig.json b/lodash.isweakmap/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isweakmap/tsconfig.json +++ b/lodash.isweakmap/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.isweakset/tsconfig.json b/lodash.isweakset/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.isweakset/tsconfig.json +++ b/lodash.isweakset/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.iteratee/tsconfig.json b/lodash.iteratee/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.iteratee/tsconfig.json +++ b/lodash.iteratee/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.join/tsconfig.json b/lodash.join/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.join/tsconfig.json +++ b/lodash.join/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.kebabcase/tsconfig.json b/lodash.kebabcase/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.kebabcase/tsconfig.json +++ b/lodash.kebabcase/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.keyby/tsconfig.json b/lodash.keyby/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.keyby/tsconfig.json +++ b/lodash.keyby/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.keys/tsconfig.json b/lodash.keys/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.keys/tsconfig.json +++ b/lodash.keys/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.keysin/tsconfig.json b/lodash.keysin/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.keysin/tsconfig.json +++ b/lodash.keysin/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.last/tsconfig.json b/lodash.last/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.last/tsconfig.json +++ b/lodash.last/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.lastindexof/tsconfig.json b/lodash.lastindexof/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.lastindexof/tsconfig.json +++ b/lodash.lastindexof/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.lowercase/tsconfig.json b/lodash.lowercase/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.lowercase/tsconfig.json +++ b/lodash.lowercase/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.lowerfirst/tsconfig.json b/lodash.lowerfirst/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.lowerfirst/tsconfig.json +++ b/lodash.lowerfirst/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.lt/tsconfig.json b/lodash.lt/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.lt/tsconfig.json +++ b/lodash.lt/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.lte/tsconfig.json b/lodash.lte/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.lte/tsconfig.json +++ b/lodash.lte/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.mapkeys/tsconfig.json b/lodash.mapkeys/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.mapkeys/tsconfig.json +++ b/lodash.mapkeys/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.mapvalues/tsconfig.json b/lodash.mapvalues/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.mapvalues/tsconfig.json +++ b/lodash.mapvalues/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.matches/tsconfig.json b/lodash.matches/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.matches/tsconfig.json +++ b/lodash.matches/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.matchesproperty/tsconfig.json b/lodash.matchesproperty/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.matchesproperty/tsconfig.json +++ b/lodash.matchesproperty/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.max/tsconfig.json b/lodash.max/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.max/tsconfig.json +++ b/lodash.max/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.maxby/tsconfig.json b/lodash.maxby/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.maxby/tsconfig.json +++ b/lodash.maxby/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.mean/tsconfig.json b/lodash.mean/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.mean/tsconfig.json +++ b/lodash.mean/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.memoize/tsconfig.json b/lodash.memoize/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.memoize/tsconfig.json +++ b/lodash.memoize/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.merge/tsconfig.json b/lodash.merge/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.merge/tsconfig.json +++ b/lodash.merge/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.mergewith/tsconfig.json b/lodash.mergewith/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.mergewith/tsconfig.json +++ b/lodash.mergewith/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.method/tsconfig.json b/lodash.method/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.method/tsconfig.json +++ b/lodash.method/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.methodof/tsconfig.json b/lodash.methodof/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.methodof/tsconfig.json +++ b/lodash.methodof/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.min/tsconfig.json b/lodash.min/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.min/tsconfig.json +++ b/lodash.min/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.minby/tsconfig.json b/lodash.minby/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.minby/tsconfig.json +++ b/lodash.minby/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.mixin/tsconfig.json b/lodash.mixin/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.mixin/tsconfig.json +++ b/lodash.mixin/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.negate/tsconfig.json b/lodash.negate/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.negate/tsconfig.json +++ b/lodash.negate/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.noop/tsconfig.json b/lodash.noop/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.noop/tsconfig.json +++ b/lodash.noop/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.now/tsconfig.json b/lodash.now/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.now/tsconfig.json +++ b/lodash.now/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.ntharg/tsconfig.json b/lodash.ntharg/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.ntharg/tsconfig.json +++ b/lodash.ntharg/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.omit/tsconfig.json b/lodash.omit/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.omit/tsconfig.json +++ b/lodash.omit/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.omitby/tsconfig.json b/lodash.omitby/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.omitby/tsconfig.json +++ b/lodash.omitby/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.once/tsconfig.json b/lodash.once/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.once/tsconfig.json +++ b/lodash.once/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.orderby/tsconfig.json b/lodash.orderby/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.orderby/tsconfig.json +++ b/lodash.orderby/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.over/tsconfig.json b/lodash.over/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.over/tsconfig.json +++ b/lodash.over/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.overargs/tsconfig.json b/lodash.overargs/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.overargs/tsconfig.json +++ b/lodash.overargs/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.overevery/tsconfig.json b/lodash.overevery/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.overevery/tsconfig.json +++ b/lodash.overevery/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.oversome/tsconfig.json b/lodash.oversome/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.oversome/tsconfig.json +++ b/lodash.oversome/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.pad/tsconfig.json b/lodash.pad/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.pad/tsconfig.json +++ b/lodash.pad/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.padend/tsconfig.json b/lodash.padend/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.padend/tsconfig.json +++ b/lodash.padend/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.padstart/tsconfig.json b/lodash.padstart/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.padstart/tsconfig.json +++ b/lodash.padstart/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.parseint/tsconfig.json b/lodash.parseint/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.parseint/tsconfig.json +++ b/lodash.parseint/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.partial/tsconfig.json b/lodash.partial/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.partial/tsconfig.json +++ b/lodash.partial/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.partialright/tsconfig.json b/lodash.partialright/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.partialright/tsconfig.json +++ b/lodash.partialright/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.partition/tsconfig.json b/lodash.partition/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.partition/tsconfig.json +++ b/lodash.partition/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.pick/tsconfig.json b/lodash.pick/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.pick/tsconfig.json +++ b/lodash.pick/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.pickby/tsconfig.json b/lodash.pickby/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.pickby/tsconfig.json +++ b/lodash.pickby/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.property/tsconfig.json b/lodash.property/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.property/tsconfig.json +++ b/lodash.property/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.propertyof/tsconfig.json b/lodash.propertyof/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.propertyof/tsconfig.json +++ b/lodash.propertyof/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.pull/tsconfig.json b/lodash.pull/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.pull/tsconfig.json +++ b/lodash.pull/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.pullall/tsconfig.json b/lodash.pullall/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.pullall/tsconfig.json +++ b/lodash.pullall/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.pullallby/tsconfig.json b/lodash.pullallby/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.pullallby/tsconfig.json +++ b/lodash.pullallby/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.pullat/tsconfig.json b/lodash.pullat/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.pullat/tsconfig.json +++ b/lodash.pullat/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.random/tsconfig.json b/lodash.random/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.random/tsconfig.json +++ b/lodash.random/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.range/tsconfig.json b/lodash.range/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.range/tsconfig.json +++ b/lodash.range/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.rangeright/tsconfig.json b/lodash.rangeright/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.rangeright/tsconfig.json +++ b/lodash.rangeright/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.rearg/tsconfig.json b/lodash.rearg/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.rearg/tsconfig.json +++ b/lodash.rearg/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.reduce/tsconfig.json b/lodash.reduce/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.reduce/tsconfig.json +++ b/lodash.reduce/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.reduceright/tsconfig.json b/lodash.reduceright/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.reduceright/tsconfig.json +++ b/lodash.reduceright/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.reject/tsconfig.json b/lodash.reject/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.reject/tsconfig.json +++ b/lodash.reject/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.remove/tsconfig.json b/lodash.remove/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.remove/tsconfig.json +++ b/lodash.remove/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.repeat/tsconfig.json b/lodash.repeat/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.repeat/tsconfig.json +++ b/lodash.repeat/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.replace/tsconfig.json b/lodash.replace/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.replace/tsconfig.json +++ b/lodash.replace/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.rest/tsconfig.json b/lodash.rest/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.rest/tsconfig.json +++ b/lodash.rest/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.result/tsconfig.json b/lodash.result/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.result/tsconfig.json +++ b/lodash.result/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.reverse/tsconfig.json b/lodash.reverse/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.reverse/tsconfig.json +++ b/lodash.reverse/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.round/tsconfig.json b/lodash.round/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.round/tsconfig.json +++ b/lodash.round/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.sample/tsconfig.json b/lodash.sample/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.sample/tsconfig.json +++ b/lodash.sample/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.samplesize/tsconfig.json b/lodash.samplesize/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.samplesize/tsconfig.json +++ b/lodash.samplesize/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.set/tsconfig.json b/lodash.set/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.set/tsconfig.json +++ b/lodash.set/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.setwith/tsconfig.json b/lodash.setwith/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.setwith/tsconfig.json +++ b/lodash.setwith/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.shuffle/tsconfig.json b/lodash.shuffle/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.shuffle/tsconfig.json +++ b/lodash.shuffle/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.size/tsconfig.json b/lodash.size/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.size/tsconfig.json +++ b/lodash.size/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.slice/tsconfig.json b/lodash.slice/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.slice/tsconfig.json +++ b/lodash.slice/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.snakecase/tsconfig.json b/lodash.snakecase/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.snakecase/tsconfig.json +++ b/lodash.snakecase/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.some/tsconfig.json b/lodash.some/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.some/tsconfig.json +++ b/lodash.some/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.sortby/tsconfig.json b/lodash.sortby/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.sortby/tsconfig.json +++ b/lodash.sortby/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.sortedindex/tsconfig.json b/lodash.sortedindex/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.sortedindex/tsconfig.json +++ b/lodash.sortedindex/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.sortedindexby/tsconfig.json b/lodash.sortedindexby/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.sortedindexby/tsconfig.json +++ b/lodash.sortedindexby/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.sortedindexof/tsconfig.json b/lodash.sortedindexof/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.sortedindexof/tsconfig.json +++ b/lodash.sortedindexof/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.sortedlastindex/tsconfig.json b/lodash.sortedlastindex/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.sortedlastindex/tsconfig.json +++ b/lodash.sortedlastindex/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.sortedlastindexby/tsconfig.json b/lodash.sortedlastindexby/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.sortedlastindexby/tsconfig.json +++ b/lodash.sortedlastindexby/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.sortedlastindexof/tsconfig.json b/lodash.sortedlastindexof/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.sortedlastindexof/tsconfig.json +++ b/lodash.sortedlastindexof/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.sorteduniq/tsconfig.json b/lodash.sorteduniq/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.sorteduniq/tsconfig.json +++ b/lodash.sorteduniq/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.sorteduniqby/tsconfig.json b/lodash.sorteduniqby/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.sorteduniqby/tsconfig.json +++ b/lodash.sorteduniqby/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.split/tsconfig.json b/lodash.split/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.split/tsconfig.json +++ b/lodash.split/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.spread/tsconfig.json b/lodash.spread/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.spread/tsconfig.json +++ b/lodash.spread/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.startcase/tsconfig.json b/lodash.startcase/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.startcase/tsconfig.json +++ b/lodash.startcase/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.startswith/tsconfig.json b/lodash.startswith/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.startswith/tsconfig.json +++ b/lodash.startswith/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.subtract/tsconfig.json b/lodash.subtract/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.subtract/tsconfig.json +++ b/lodash.subtract/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.sum/tsconfig.json b/lodash.sum/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.sum/tsconfig.json +++ b/lodash.sum/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.sumby/tsconfig.json b/lodash.sumby/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.sumby/tsconfig.json +++ b/lodash.sumby/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.tail/tsconfig.json b/lodash.tail/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.tail/tsconfig.json +++ b/lodash.tail/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.take/tsconfig.json b/lodash.take/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.take/tsconfig.json +++ b/lodash.take/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.takeright/tsconfig.json b/lodash.takeright/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.takeright/tsconfig.json +++ b/lodash.takeright/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.takerightwhile/tsconfig.json b/lodash.takerightwhile/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.takerightwhile/tsconfig.json +++ b/lodash.takerightwhile/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.takewhile/tsconfig.json b/lodash.takewhile/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.takewhile/tsconfig.json +++ b/lodash.takewhile/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.template/tsconfig.json b/lodash.template/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.template/tsconfig.json +++ b/lodash.template/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.throttle/tsconfig.json b/lodash.throttle/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.throttle/tsconfig.json +++ b/lodash.throttle/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.times/tsconfig.json b/lodash.times/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.times/tsconfig.json +++ b/lodash.times/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.toarray/tsconfig.json b/lodash.toarray/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.toarray/tsconfig.json +++ b/lodash.toarray/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.tointeger/tsconfig.json b/lodash.tointeger/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.tointeger/tsconfig.json +++ b/lodash.tointeger/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.tolength/tsconfig.json b/lodash.tolength/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.tolength/tsconfig.json +++ b/lodash.tolength/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.tolower/tsconfig.json b/lodash.tolower/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.tolower/tsconfig.json +++ b/lodash.tolower/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.tonumber/tsconfig.json b/lodash.tonumber/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.tonumber/tsconfig.json +++ b/lodash.tonumber/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.topairs/tsconfig.json b/lodash.topairs/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.topairs/tsconfig.json +++ b/lodash.topairs/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.topairsin/tsconfig.json b/lodash.topairsin/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.topairsin/tsconfig.json +++ b/lodash.topairsin/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.topath/tsconfig.json b/lodash.topath/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.topath/tsconfig.json +++ b/lodash.topath/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.toplainobject/tsconfig.json b/lodash.toplainobject/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.toplainobject/tsconfig.json +++ b/lodash.toplainobject/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.tosafeinteger/tsconfig.json b/lodash.tosafeinteger/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.tosafeinteger/tsconfig.json +++ b/lodash.tosafeinteger/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.tostring/tsconfig.json b/lodash.tostring/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.tostring/tsconfig.json +++ b/lodash.tostring/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.toupper/tsconfig.json b/lodash.toupper/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.toupper/tsconfig.json +++ b/lodash.toupper/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.transform/tsconfig.json b/lodash.transform/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.transform/tsconfig.json +++ b/lodash.transform/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.trim/tsconfig.json b/lodash.trim/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.trim/tsconfig.json +++ b/lodash.trim/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.trimend/tsconfig.json b/lodash.trimend/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.trimend/tsconfig.json +++ b/lodash.trimend/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.trimstart/tsconfig.json b/lodash.trimstart/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.trimstart/tsconfig.json +++ b/lodash.trimstart/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.truncate/tsconfig.json b/lodash.truncate/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.truncate/tsconfig.json +++ b/lodash.truncate/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.unary/tsconfig.json b/lodash.unary/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.unary/tsconfig.json +++ b/lodash.unary/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.unescape/tsconfig.json b/lodash.unescape/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.unescape/tsconfig.json +++ b/lodash.unescape/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.union/tsconfig.json b/lodash.union/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.union/tsconfig.json +++ b/lodash.union/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.unionby/tsconfig.json b/lodash.unionby/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.unionby/tsconfig.json +++ b/lodash.unionby/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.unionwith/tsconfig.json b/lodash.unionwith/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.unionwith/tsconfig.json +++ b/lodash.unionwith/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.uniq/tsconfig.json b/lodash.uniq/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.uniq/tsconfig.json +++ b/lodash.uniq/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.uniqby/tsconfig.json b/lodash.uniqby/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.uniqby/tsconfig.json +++ b/lodash.uniqby/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.uniqueid/tsconfig.json b/lodash.uniqueid/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.uniqueid/tsconfig.json +++ b/lodash.uniqueid/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.uniqwith/tsconfig.json b/lodash.uniqwith/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.uniqwith/tsconfig.json +++ b/lodash.uniqwith/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.unset/tsconfig.json b/lodash.unset/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.unset/tsconfig.json +++ b/lodash.unset/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.unzip/tsconfig.json b/lodash.unzip/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.unzip/tsconfig.json +++ b/lodash.unzip/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.unzipwith/tsconfig.json b/lodash.unzipwith/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.unzipwith/tsconfig.json +++ b/lodash.unzipwith/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.update/tsconfig.json b/lodash.update/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.update/tsconfig.json +++ b/lodash.update/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.uppercase/tsconfig.json b/lodash.uppercase/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.uppercase/tsconfig.json +++ b/lodash.uppercase/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.upperfirst/tsconfig.json b/lodash.upperfirst/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.upperfirst/tsconfig.json +++ b/lodash.upperfirst/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.values/tsconfig.json b/lodash.values/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.values/tsconfig.json +++ b/lodash.values/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.valuesin/tsconfig.json b/lodash.valuesin/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.valuesin/tsconfig.json +++ b/lodash.valuesin/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.without/tsconfig.json b/lodash.without/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.without/tsconfig.json +++ b/lodash.without/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.words/tsconfig.json b/lodash.words/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.words/tsconfig.json +++ b/lodash.words/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.wrap/tsconfig.json b/lodash.wrap/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.wrap/tsconfig.json +++ b/lodash.wrap/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.xor/tsconfig.json b/lodash.xor/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.xor/tsconfig.json +++ b/lodash.xor/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.xorby/tsconfig.json b/lodash.xorby/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.xorby/tsconfig.json +++ b/lodash.xorby/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.xorwith/tsconfig.json b/lodash.xorwith/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.xorwith/tsconfig.json +++ b/lodash.xorwith/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.zip/tsconfig.json b/lodash.zip/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.zip/tsconfig.json +++ b/lodash.zip/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.zipobject/tsconfig.json b/lodash.zipobject/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.zipobject/tsconfig.json +++ b/lodash.zipobject/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash.zipwith/tsconfig.json b/lodash.zipwith/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.zipwith/tsconfig.json +++ b/lodash.zipwith/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash/tsconfig.json b/lodash/tsconfig.json index 3d17028275..3a760cfd1a 100644 --- a/lodash/tsconfig.json +++ b/lodash/tsconfig.json @@ -291,7 +291,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lodash/v3/tsconfig.json b/lodash/v3/tsconfig.json index 3cf7aba4f3..e57548c56a 100644 --- a/lodash/v3/tsconfig.json +++ b/lodash/v3/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "lodash": ["lodash/v3"] + "lodash": [ + "lodash/v3" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/log4javascript/tsconfig.json b/log4javascript/tsconfig.json index 06edbbf00d..4c90f25a3c 100644 --- a/log4javascript/tsconfig.json +++ b/log4javascript/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/log4js/tsconfig.json b/log4js/tsconfig.json index eb57f18d25..a71e03c82a 100644 --- a/log4js/tsconfig.json +++ b/log4js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/logat/tsconfig.json b/logat/tsconfig.json index f018cce3de..c8982e5798 100644 --- a/logat/tsconfig.json +++ b/logat/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/logg/tsconfig.json b/logg/tsconfig.json index 4a9f61348b..3527d06837 100644 --- a/logg/tsconfig.json +++ b/logg/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/loggly/tsconfig.json b/loggly/tsconfig.json index 32a3c933cf..181a492701 100644 --- a/loggly/tsconfig.json +++ b/loggly/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/loglevel/tsconfig.json b/loglevel/tsconfig.json index ce102f159c..858fabbb22 100644 --- a/loglevel/tsconfig.json +++ b/loglevel/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/logrotate-stream/tsconfig.json b/logrotate-stream/tsconfig.json index 8a9d0a0609..97c28a328c 100644 --- a/logrotate-stream/tsconfig.json +++ b/logrotate-stream/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lokijs/tsconfig.json b/lokijs/tsconfig.json index e5e25ce5c5..5ffde42e59 100644 --- a/lokijs/tsconfig.json +++ b/lokijs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lolex/index.d.ts b/lolex/index.d.ts index 544fb88fb6..de08060883 100644 --- a/lolex/index.d.ts +++ b/lolex/index.d.ts @@ -1,28 +1,187 @@ -// Type definitions for lolex 1.5.1 +// Type definitions for lolex 1.5 // Project: https://github.com/sinonjs/lolex -// Definitions by: Wim Looman +// Definitions by: Wim Looman , Josh Goldberg // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/** + * Timer object used in node. + */ +export interface NodeTimer { + /** + * Stub method call. Does nothing. + */ + ref(): void; -export interface Clock { + /** + * Stub method call. Does nothing. + */ + unref(): void; +} + +/** + * Timer identifier for clock scheduling. + */ +export type TimerId = number | NodeTimer; + +/** + * Lolex clock for a browser environment. + */ +type BrowserClock = LolexClock; + +/** + * Lolex clock for a Node environment. + */ +type NodeClock = LolexClock & { + /** + * Mimicks process.hrtime(). + * + * @param prevTime Previous system time to calculate time elapsed. + * @returns High resolution real time as [seconds, nanoseconds]. + */ + hrtime(prevTime?: [number, number]): [number, number]; +}; + +/** + * Clock object created by lolex. + */ +type Clock = BrowserClock | NodeClock; + +/** + * Names of clock methods that may be faked by install. + */ +type FakeMethod = "setTimeout" | "clearTimeout" | "setImmediate" | "clearImmediate" | "setInterval" | "clearInterval" | "Date"; + +/** + * Controls the flow of time. + */ +export interface LolexClock { + /** + * Current clock time. + */ now: number; - setTimeout(callback: () => any, timeout: number): number; - setInterval(callback: () => any, timeout: number): number; - setImmediate(callback: () => any): number; + /** + * Implements the Date object but using this clock to provide the correct time. + */ + Date: typeof Date; - clearTimeout(id: number): void; - clearInterval(id: number): void; - clearImmediate(id: number): void; + /** + * Schedules a callback to be fired once timeout milliseconds have ticked by. + * + * @param callback Callback to be fired. + * @param timeout How many ticks to wait to run the callback. + * @returns Time identifier for cancellation. + */ + setTimeout(callback: () => any, timeout: number): TTimerId; - setSystemTime(now: number): void; - setSystemTime(date: Date): void; + /** + * Clears a timer, as long as it was created using setTimeout. + * + * @param id Timer ID or object. + */ + clearTimeout(id: TTimerId): void; - tick(ms: number): void; + /** + * Schedules a callback to be fired every time timeout milliseconds have ticked by. + * + * @param callback Callback to be fired. + * @param timeout How many ticks to wait between callbacks. + * @returns Time identifier for cancellation. + */ + setInterval(callback: () => any, timeout: number): TTimerId; + + /** + * Clears a timer, as long as it was created using setInterval. + * + * @param id Timer ID or object. + */ + clearInterval(id: TTimerId): void; + + /** + * Schedules the callback to be fired once 0 milliseconds have ticked by. + * + * @param callback Callback to be fired. + * @remarks You'll still have to call clock.tick() for the callback to fire. + * @remarks If called during a tick the callback won't fire until 1 millisecond has ticked by. + */ + setImmediate(callback: () => any): TTimerId; + + /** + * Clears a timer, as long as it was created using setImmediate. + * + * @param id Timer ID or object. + */ + clearImmediate(id: TTimerId): void; + + /** + * Advances the clock to the the moment of the first scheduled timer, firing it. + */ + next(): void; + + /** + * Advance the clock, firing callbacks if necessary. + * + * @param time How many ticks to advance by. + */ + tick(time: number | string): void; + + /** + * Runs all pending timers until there are none remaining. + * + * @remarks If new timers are added while it is executing they will be run as well. + */ + runAll(): void; + + /** + * Takes note of the last scheduled timer when it is run, and advances the clock to + * that time firing callbacks as necessary. + */ + runToLast(): void; + + /** + * Simulates a user changing the system clock. + * + * @param now New system time. + * @remarks This affects the current time but it does not in itself cause timers to fire. + */ + setSystemTime(now?: number | Date): void; + + /** + * Restores the original methods on the context that was passed to lolex.install, + * or the native timers if no context was given. + */ uninstall(): void; } -export declare function createClock(now?: number): Clock; +/** + * Creates a clock. + * + * @param now Current time for the clock. + * @param loopLimit Maximum number of timers that will be run when calling runAll() + * before assuming that we have an infinite loop and throwing an error + * (by default, 1000). + * @type TClock Type of clock to create. + * @remarks The default epoch is 0. + */ +export declare function createClock(now?: number | Date, loopLimit?: number): TClock; -export declare function install(now?: number, toFake?: string[]): Clock; -export declare function install(context?: any, now?: number, toFake?: string[]): Clock; +/** + * Creates a clock and installs it globally. + * + * @param now Current time for the clock, as with lolex.createClock(). + * @param toFake Names of methods that should be faked. + * @type TClock Type of clock to create. + * @usage lolex.install(["setTimeout", "clearTimeout"]); + */ +export declare function install(now?: number | Date, toFake?: FakeMethod[]): TClock; + +/** + * Creates a clock and installs it onto the context object. + * + * @param context Context to install the clock onto. + * @param now Current time for the clock, as with lolex.createClock(). + * @param toFake Names of methods that should be faked. + * @type TClock Type of clock to create. + * @usage lolex.install(context, ["setTimeout", "clearTimeout"]); + */ +export declare function install(context?: any, now?: number | Date, toFake?: FakeMethod[]): TClock; diff --git a/lolex/lolex-tests.ts b/lolex/lolex-tests.ts index 00feecfdd6..876e4280c5 100644 --- a/lolex/lolex-tests.ts +++ b/lolex/lolex-tests.ts @@ -1,126 +1,84 @@ - import lolex = require("lolex"); -function a() { - var clock = lolex.createClock(); +let browserClock: lolex.BrowserClock = lolex.createClock() as lolex.BrowserClock; +let nodeClock: lolex.NodeClock = lolex.createClock() as lolex.NodeClock; - clock.setTimeout(function () { - console.log("The poblano is a mild chili pepper originating in the state of Puebla, Mexico."); - }, 15); +browserClock = lolex.createClock(); +nodeClock = lolex.createClock(); - // ... +lolex.createClock(7); +lolex.createClock(new Date()); +lolex.createClock(7, 9001); +lolex.createClock(new Date(), 9001); - clock.tick(15); -} +lolex.createClock(7); +lolex.createClock(new Date()); +lolex.createClock(7, 9001); +lolex.createClock(new Date(), 9001); -function b() { - var clock = lolex.install(window); +lolex.install(7); +lolex.install(new Date()); +lolex.install(7, ["setTimeout"]); +lolex.install(new Date(), ["setTimeout"]); - window.setTimeout(() => {}, 15); // Schedules with clock.setTimeout +lolex.install(7); +lolex.install(new Date()); +lolex.install(7, ["setTimeout"]); +lolex.install(new Date(), ["setTimeout"]); - clock.uninstall(); +lolex.install({}, 7); +lolex.install({}, new Date()); +lolex.install({}, 7, ["setTimeout"]); +lolex.install({}, new Date(), ["setTimeout"]); - // window.setTimeout is restored to the native implementation -} +lolex.install({}, 7); +lolex.install({}, new Date()); +lolex.install({}, 7, ["setTimeout"]); +lolex.install({}, new Date(), ["setTimeout"]); -function c() { - var clock = lolex.install(); +const browserNow: number = browserClock.now; +const browserDate: Date = new browserClock.Date(); - // Equivalent to - // var clock = lolex.install(typeof global !== "undefined" ? global : window); -} +const nodeNow: number = nodeClock.now; +const nodeDate: Date = new nodeClock.Date(); -var clock: lolex.Clock; +const browserTimeout: number = browserClock.setTimeout(() => {}, 7); +const browserInterval: number = browserClock.setInterval(() => {}, 7); +const browserImmediate: number = browserClock.setImmediate(() => {}); +const nodeTimeout: lolex.NodeTimer = nodeClock.setTimeout(() => {}, 7); +const nodeInterval: lolex.NodeTimer = nodeClock.setInterval(() => {}, 7); +const nodeImmediate: lolex.NodeTimer = nodeClock.setImmediate(() => {}); -/** - * var clock = lolex.createClock([now]) - */ +browserClock.clearTimeout(browserTimeout); +browserClock.clearInterval(browserInterval); +browserClock.clearImmediate(browserImmediate); -clock = lolex.createClock(); -clock = lolex.createClock(Date.now()); +nodeClock.clearTimeout(nodeTimeout); +nodeClock.clearInterval(nodeInterval); +nodeClock.clearImmediate(nodeImmediate); +browserClock.tick(7); +browserClock.tick("08"); -/** - * var clock = lolex.install([context[, now[, toFake]]]) - */ +nodeClock.tick(7); +nodeClock.tick("08"); -clock = lolex.install(); -clock = lolex.install(window); -clock = lolex.install(window, Date.now()); -clock = lolex.install(window, Date.now(), ['setTimeout', 'clearTimeout']); +browserClock.next(); +nodeClock.next(); +browserClock.runAll(); +nodeClock.runAll(); -/** - * var clock = lolex.install([now[, toFake]]) - */ +browserClock.runToLast(); +nodeClock.runToLast(); -clock = lolex.install(Date.now()); -clock = lolex.install(Date.now(), ['setTimeout', 'clearTimeout']); +browserClock.setSystemTime(); +browserClock.setSystemTime(7); +browserClock.setSystemTime(new Date()); -/** - * clock.now - */ -var n: number = clock.now; - - -var id: number; -/** - * var id = clock.setTimeout(callback, timeout) - */ - -id = clock.setTimeout(() => {}, 1000); - - -/** - * clock.clearTimeout(id) - */ - -clock.clearTimeout(id); - - -/** - * var id = clock.setInterval(callback, timeout) - */ - -id = clock.setInterval(() => {}, 1000); - - -/** - * clock.clearInterval(id) - */ - -clock.clearInterval(id); - - -/** - * var id = clock.setImmediate(callback) - */ - -id = clock.setImmediate(() => {}); - - -/** - * clock.clearImmediate(id) - */ - -clock.clearImmediate(id); - -/** - * clock.setSystemTime - */ -clock.setSystemTime(0); -clock.setSystemTime(new Date()); - -/** - * clock.tick(time) - */ - -clock.tick(1000); - - -/** - * clock.uninstall() - */ - -clock.uninstall(); +nodeClock.setSystemTime(); +nodeClock.setSystemTime(7); +nodeClock.setSystemTime(new Date()); +browserClock.uninstall(); +nodeClock.uninstall(); diff --git a/lolex/tsconfig.json b/lolex/tsconfig.json index c75a99ee25..92e5164d51 100644 --- a/lolex/tsconfig.json +++ b/lolex/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/long/tsconfig.json b/long/tsconfig.json index 8661825ea5..163a7db674 100644 --- a/long/tsconfig.json +++ b/long/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/loopback-boot/tsconfig.json b/loopback-boot/tsconfig.json index 3bd43c78fd..1dcded5dd7 100644 --- a/loopback-boot/tsconfig.json +++ b/loopback-boot/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/loopback/tsconfig.json b/loopback/tsconfig.json index 4ca6819f7e..3538e33fdf 100644 --- a/loopback/tsconfig.json +++ b/loopback/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/lory.js/tsconfig.json b/lory.js/tsconfig.json index 6b172e01df..70236e15c6 100644 --- a/lory.js/tsconfig.json +++ b/lory.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lovefield/tsconfig.json b/lovefield/tsconfig.json index a5fe561b40..9dd68ec326 100644 --- a/lovefield/tsconfig.json +++ b/lovefield/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lowlight/tsconfig.json b/lowlight/tsconfig.json index 2d9abf41f2..d3ad572247 100644 --- a/lowlight/tsconfig.json +++ b/lowlight/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/lru-cache/index.d.ts b/lru-cache/index.d.ts index c7b30e3551..b9216d3159 100644 --- a/lru-cache/index.d.ts +++ b/lru-cache/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for lru-cache v2.5.0 +// Type definitions for lru-cache v4.0 // Project: https://github.com/isaacs/node-lru-cache // Definitions by: Bart van der Schoor // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -9,26 +9,141 @@ declare function LRU(max: number): LRU.Cache; declare namespace LRU { interface Options { + /** + * The maximum size of the cache, checked by applying the length + * function to all values in the cache. Not setting this is kind of silly, + * since that's the whole purpose of this lib, but it defaults to `Infinity`. + */ max?: number; + + /** + * Maximum age in ms. Items are not pro-actively pruned out as they age, + * but if you try to get an item that is too old, it'll drop it and return + * undefined instead of giving it to you. + */ maxAge?: number; + + /** + * Function that is used to calculate the length of stored items. + * If you're storing strings or buffers, then you probably want to do + * something like `function(n, key){return n.length}`. The default + * is `function(){return 1}`, which is fine if you want to store + * `max` like-sized things. The item is passed as the first argument, + * and the key is passed as the second argumnet. + */ length?: (value: T) => number; + + /** + * Function that is called on items when they are dropped from the cache. + * This can be handy if you want to close file descriptors or do other + * cleanup tasks when items are no longer accessible. Called with `key, value`. + * It's called before actually removing the item from the internal cache, + * so if you want to immediately put it back in, you'll have to do that in + * a `nextTick` or `setTimeout` callback or it won't do anything. + */ dispose?: (key: any, value: T) => void; + + /** + * By default, if you set a `maxAge`, it'll only actually pull stale items + * out of the cache when you `get(key)`. (That is, it's not pre-emptively + * doing a `setTimeout` or anything.) If you set `stale:true`, it'll return + * the stale value before deleting it. If you don't set this, then it'll + * return `undefined` when you try to get a stale entry, + * as if it had already been deleted. + */ stale?: boolean; } interface Cache { + /** + * Will update the "recently used"-ness of the key. They do what you think. + * `maxAge` is optional and overrides the cache `maxAge` option if provided. + */ set(key: any, value: T, maxAge?: number): void; + + /** + * Will update the "recently used"-ness of the key. They do what you think. + * `maxAge` is optional and overrides the cache `maxAge` option if provided. + * + * If the key is not found, will return `undefined`. + */ get(key: any): T; + + /** + * Returns the key value (or `undefined` if not found) without updating + * the "recently used"-ness of the key. + * + * (If you find yourself using this a lot, you might be using the wrong + * sort of data structure, but there are some use cases where it's handy.) + */ peek(key: any): T; + + /** + * Check if a key is in the cache, without updating the recent-ness + * or deleting it for being stale. + */ has(key: any): boolean + + /** + * Deletes a key out of the cache. + */ del(key: any): void; + + /** + * Clear the cache entirely, throwing away all values. + */ reset(): void; + + /** + * Manually iterates over the entire cache proactively pruning old entries. + */ prune(): void; + + /** + * Just like `Array.prototype.forEach`. Iterates over all the keys in the cache, + * in order of recent-ness. (Ie, more recently used items are iterated over first.) + */ forEach(iter: (value: T, key: any, cache: Cache) => void, thisp?: any): void; + + /** + * The same as `cache.forEach(...)` but items are iterated over in reverse order. + * (ie, less recently used items are iterated over first.) + */ + rforEach(iter: (value: T, key: any, cache: Cache) => void, thisp?: any): void; + + /** + * Return total quantity of objects currently in cache. Note, + * that `stale` (see options) items are returned as part of this item count. + */ itemCount: number; - length: number + + /** + * Return total length of objects in cache taking into account `length` options function. + */ + length: number; + + /** + * Return an array of the keys in the cache. + */ keys(): any[]; + + /** + * Return an array of the values in the cache. + */ values(): T[]; + + /** + * Return an array of the cache entries ready for serialization and usage with `destinationCache.load(arr)`. + */ + dump(): T[]; + + /** + * Loads another cache entries array, obtained with `sourceCache.dump()`, + * into the cache. The destination cache is reset before loading new entries + * + * @param cacheEntries Obtained from `sourceCache.dump()` + */ + load(cacheEntries: T[]): void; } } diff --git a/lru-cache/tsconfig.json b/lru-cache/tsconfig.json index 30fca676b5..c5ec54f9af 100644 --- a/lru-cache/tsconfig.json +++ b/lru-cache/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lscache/tsconfig.json b/lscache/tsconfig.json index a73c708f87..d1db601117 100644 --- a/lscache/tsconfig.json +++ b/lscache/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/luaparse/tsconfig.json b/luaparse/tsconfig.json index 30772d94ce..fca0b48af4 100644 --- a/luaparse/tsconfig.json +++ b/luaparse/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lunr/tsconfig.json b/lunr/tsconfig.json index b55ff7b17d..608f88b0b2 100644 --- a/lunr/tsconfig.json +++ b/lunr/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/lwip/tsconfig.json b/lwip/tsconfig.json index 9269195be4..97e74d9626 100644 --- a/lwip/tsconfig.json +++ b/lwip/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lz-string/tsconfig.json b/lz-string/tsconfig.json index 1d76973112..397f8ff795 100644 --- a/lz-string/tsconfig.json +++ b/lz-string/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/magic-number/tsconfig.json b/magic-number/tsconfig.json index c7964da70b..079431a4c1 100644 --- a/magic-number/tsconfig.json +++ b/magic-number/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/magicsuggest/tsconfig.json b/magicsuggest/tsconfig.json index 92e337a34d..731d9a94e4 100644 --- a/magicsuggest/tsconfig.json +++ b/magicsuggest/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mailcheck/tsconfig.json b/mailcheck/tsconfig.json index a46ab9f52d..1e688725ac 100644 --- a/mailcheck/tsconfig.json +++ b/mailcheck/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/maildev/tsconfig.json b/maildev/tsconfig.json index 879e482ddc..f572171d40 100644 --- a/maildev/tsconfig.json +++ b/maildev/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mailgen/tsconfig.json b/mailgen/tsconfig.json index 43d9e9fa5e..5c85d2056c 100644 --- a/mailgen/tsconfig.json +++ b/mailgen/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "mailgen-tests.ts" ] -} +} \ No newline at end of file diff --git a/mailparser/tsconfig.json b/mailparser/tsconfig.json index de4c5371e7..a48e26aeab 100644 --- a/mailparser/tsconfig.json +++ b/mailparser/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/main-bower-files/tsconfig.json b/main-bower-files/tsconfig.json index 339ec4cb41..fcdebedf3d 100644 --- a/main-bower-files/tsconfig.json +++ b/main-bower-files/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mainloop.js/tsconfig.json b/mainloop.js/tsconfig.json index f54aa6048f..86c619379e 100644 --- a/mainloop.js/tsconfig.json +++ b/mainloop.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/maker.js/index.d.ts b/maker.js/index.d.ts index 7cf55d0448..ad06d7eb91 100644 --- a/maker.js/index.d.ts +++ b/maker.js/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Maker.js +// Type definitions for Maker.js 0.9.31 // Project: https://github.com/Microsoft/maker.js // Definitions by: Dan Marshall // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -17,6 +17,23 @@ * */ declare namespace MakerJs { + /** + * Version info + */ + var version: string; + /** + * Enumeration of environment types. + */ + var environmentTypes: { + BrowserUI: string; + NodeJs: string; + WebWorker: string; + Unknown: string; + }; + /** + * Current execution environment type, should be one of environmentTypes. + */ + var environment: string; /** * String-based enumeration of unit types: imperial, metric or otherwise. * A model may specify the unit system it is using, if any. When importing a model, it may have different units. @@ -543,6 +560,10 @@ declare namespace MakerJs { * The endpoints of the path, in absolute coords. */ endPoints: IPoint[]; + /** + * Length of the path. + */ + pathLength: number; } /** * A chain of paths which connect end to end. @@ -556,7 +577,17 @@ declare namespace MakerJs { * Flag if this chain forms a loop end to end. */ endless?: boolean; + /** + * Total length of all paths in the chain. + */ + pathLength: number; } + /** + * Test to see if an object implements the required properties of a chain. + * + * @param item The item to test. + */ + function isChain(item: any): boolean; /** * Callback to model.findChains() with resulting array of chains and unchained paths. */ @@ -839,7 +870,7 @@ declare namespace MakerJs.point { * @param rotationOrigin The center point of rotation. * @returns A new point. */ - function rotate(pointToRotate: IPoint, angleInDegrees: number, rotationOrigin: IPoint): IPoint; + function rotate(pointToRotate: IPoint, angleInDegrees: number, rotationOrigin?: IPoint): IPoint; /** * Scale a point's coordinates. * @@ -923,7 +954,7 @@ declare namespace MakerJs.path { * @param rotationOrigin The center point of rotation. * @returns The original path (for chaining). */ - function rotate(pathToRotate: IPath, angleInDegrees: number, rotationOrigin: IPoint): IPath; + function rotate(pathToRotate: IPath, angleInDegrees: number, rotationOrigin?: IPoint): IPath; /** * Scale a path. * @@ -950,6 +981,34 @@ declare namespace MakerJs.path { * @param useOriginB Optional flag to converge the origin point of lineB instead of the end point. */ function converge(lineA: IPathLine, lineB: IPathLine, useOriginA?: boolean, useOriginB?: boolean): IPoint; + /** + * Get points along a path. + * + * @param pathContext Path to get points from. + * @param numberOfPoints Number of points to divide the path. + * @returns Array of points which are on the path spread at a uniform interval. + */ + function toPoints(pathContext: IPath, numberOfPoints: number): IPoint[]; + /** + * Get key points (a minimal a number of points) along a path. + * + * @param pathContext Path to get points from. + * @param maxArcFacet Optional maximum length between points on an arc or circle. + * @returns Array of points which are on the path. + */ + function toKeyPoints(pathContext: IPath, maxArcFacet?: number): IPoint[]; + /** + * Center a path at [0, 0]. + * + * @param pathToCenter The path to center. + */ + function center(pathToCenter: IPath): IPath; + /** + * Move a path so its bounding box begins at [0, 0]. + * + * @param pathToZero The path to zero. + */ + function zero(pathToZero: IPath): IPath; } declare namespace MakerJs.path { /** @@ -1140,6 +1199,12 @@ declare namespace MakerJs.model { * @param origin Optional offset reference point. */ function originate(modelToOriginate: IModel, origin?: IPoint): IModel; + /** + * Center a model at [0, 0]. + * + * @param modelToCenter The model to center. + */ + function center(modelToCenter: IModel): IModel; /** * Create a clone of a model, mirrored on either or both x and y axes. * @@ -1181,7 +1246,7 @@ declare namespace MakerJs.model { * @param rotationOrigin The center point of rotation. * @returns The original model (for chaining). */ - function rotate(modelToRotate: IModel, angleInDegrees: number, rotationOrigin: IPoint): IModel; + function rotate(modelToRotate: IModel, angleInDegrees: number, rotationOrigin?: IPoint): IModel; /** * Scale a model. * @@ -1215,6 +1280,12 @@ declare namespace MakerJs.model { * @param modelCallbackAfterWalk Callback for each model after recursion. */ function walk(modelContext: IModel, options: IWalkOptions): void; + /** + * Move a model so its bounding box begins at [0, 0]. + * + * @param modelToZero The model to zero. + */ + function zero(modelToZero: IModel): IModel; } declare namespace MakerJs.model { /** @@ -1321,10 +1392,11 @@ declare namespace MakerJs.path { * * @param arc Arc to straighten. * @param bevel Optional flag to bevel the angle to prevent it from being too sharp. - * @param prefix Optional prefix to apply to path ids. + * @param prefix Optional string prefix to apply to path ids. + * @param close Optional flag to make a closed geometry by connecting the endpoints. * @returns Model of straight lines with same endpoints as the arc. */ - function straighten(arc: IPathArc, bevel?: boolean, prefix?: string): IModel; + function straighten(arc: IPathArc, bevel?: boolean, prefix?: string, close?: boolean): IModel; } declare namespace MakerJs.model { /** @@ -1423,7 +1495,7 @@ declare namespace MakerJs.measure { * @param arcA The arc to test. * @param arcB The arc to check for overlap. * @param excludeTangents Boolean to exclude exact endpoints and only look for deep overlaps. - * @returns Boolean true if arc1 is overlapped with arcB. + * @returns Boolean true if arcA is overlapped with arcB. */ function isArcOverlapping(arcA: IPathArc, arcB: IPathArc, excludeTangents: boolean): boolean; /** @@ -1467,7 +1539,7 @@ declare namespace MakerJs.measure { * @param lineA The line to test. * @param lineB The line to check for overlap. * @param excludeTangents Boolean to exclude exact endpoints and only look for deep overlaps. - * @returns Boolean true if line1 is overlapped with lineB. + * @returns Boolean true if lineA is overlapped with lineB. */ function isLineOverlapping(lineA: IPathLine, lineB: IPathLine, excludeTangents: boolean): boolean; /** @@ -1475,7 +1547,7 @@ declare namespace MakerJs.measure { * * @param measureA The measurement to test. * @param measureB The measurement to check for overlap. - * @returns Boolean true if measure1 is overlapped with measureB. + * @returns Boolean true if measureA is overlapped with measureB. */ function isMeasurementOverlapping(measureA: IMeasure, measureB: IMeasure): boolean; /** @@ -1665,10 +1737,22 @@ declare namespace MakerJs.path { * * @param pathA First path to fillet, which will be modified to fit the fillet. * @param pathB Second path to fillet, which will be modified to fit the fillet. + * @param filletRadius Radius of the fillet. + * @param options Optional IPointMatchOptions object to specify pointMatchingDistance. * @returns Arc path object of the new fillet. */ function fillet(pathA: IPath, pathB: IPath, filletRadius: number, options?: IPointMatchOptions): IPathArc; } +declare namespace MakerJs.chain { + /** + * Adds a fillet between each link in a chain. Each path will be cropped to fit a fillet, and all fillets will be returned as paths in a returned model object. + * + * @param chainToFillet The chain to add fillets to. + * @param filletRadius Radius of the fillet. + * @returns Model object containing paths which fillet the joints in the chain. + */ + function fillet(chainToFillet: IChain, filletRadius: number): IModel; +} declare namespace MakerJs.kit { /** * Helper function to use the JavaScript "apply" function in conjunction with the "new" keyword. @@ -1687,6 +1771,13 @@ declare namespace MakerJs.kit { function getParameterValues(ctor: IKit): any[]; } declare namespace MakerJs.model { + /** + * Find a single chain within a model, across all layers. Shorthand of findChains; useful when you know there is only one chain to find in your model. + * + * @param modelContext The model to search for a chain. + * @returns A chain object or null if chains were not found. + */ + function findSingleChain(modelContext: IModel): IChain; /** * Find paths that have common endpoints and form chains. * @@ -1695,6 +1786,25 @@ declare namespace MakerJs.model { */ function findChains(modelContext: IModel, callback: IChainCallback, options?: IFindChainsOptions): void; } +declare namespace MakerJs.chain { + /** + * Get points along a chain of paths. + * + * @param chainContext Chain of paths to get points from. + * @param distance Distance along the chain between points. + * @param maxPoints Maximum number of points to retrieve. + * @returns Array of points which are on the chain spread at a uniform interval. + */ + function toPoints(chainContext: IChain, distance: number, maxPoints?: number): IPoint[]; + /** + * Get key points (a minimal a number of points) along a chain of paths. + * + * @param chainContext Chain of paths to get points from. + * @param maxArcFacet The maximum length between points on an arc or circle. + * @returns Array of points which are on the chain. + */ + function toKeyPoints(chainContext: IChain, maxArcFacet?: number): IPoint[]; +} declare namespace MakerJs.model { /** * Find paths that have common endpoints and form loops. @@ -1836,14 +1946,29 @@ declare namespace MakerJs.exporter { } } declare namespace MakerJs.exporter { + /** + * Map of SVG Path Data by layer name. + */ + interface IPathDataByLayerMap { + [layer: string]: string; + } /** * Convert a chain to SVG path data. */ - function chainToSVGPathData(chain: IChain, offset: IPoint, scale: number): string; + function chainToSVGPathData(chain: IChain, offset: IPoint): string; /** * Convert a path to SVG path data. */ - function pathToSVGPathData(pathToExport: IPath, offset: IPoint, offset2: IPoint, scale: number): string; + function pathToSVGPathData(pathToExport: IPath, offset: IPoint, offset2: IPoint): string; + /** + * Convert a model to SVG path data. + * + * @param modelToExport Model to export. + * @param byLayers Boolean flag (default true) to return a map of path data by layer. + * @param origin Optional reference origin. + * @returns String of SVG path data (if byLayers is false) or an object map of path data by layer . + */ + function toSVGPathData(modelToExport: IModel, byLayers?: boolean, origin?: IPoint): IPathDataByLayerMap | string; function toSVG(modelToExport: IModel, options?: ISVGRenderOptions): string; function toSVG(pathsToExport: IPath[], options?: ISVGRenderOptions): string; function toSVG(pathToExport: IPath, options?: ISVGRenderOptions): string; @@ -1925,6 +2050,7 @@ declare namespace MakerJs.models { constructor(origin: IPoint, control1: IPoint, control2: IPoint, end: IPoint, accuracy?: number); static typeName: string; static getBezierSeeds(curve: BezierCurve, options?: IFindChainsOptions): IPathBezierSeed[]; + static computeLength(seed: IPathBezierSeed): number; static computePoint(seed: IPathBezierSeed, t: number): IPoint; } } @@ -2030,6 +2156,28 @@ declare namespace MakerJs.models { static getPoints(numberOfSides: number, radius: number, firstCornerAngleInDegrees?: number, circumscribed?: boolean): IPoint[]; } } +declare namespace MakerJs.models { + class Holes implements IModel { + paths: IPathMap; + /** + * Create an array of circles of the same radius from an array of center points. + * + * Example: + * ``` + * //Create some holes from an array of points + * var makerjs = require('makerjs'); + * var model = new makerjs.models.Holes(10, [[0, 0],[50, 0],[25, 40]]); + * var svg = makerjs.exporter.toSVG(model); + * document.write(svg); + * ``` + * + * @param holeRadius Hole radius. + * @param points Array of points for origin of each hole. + * @param ids Optional array of corresponding path ids for the holes. + */ + constructor(holeRadius: number, points: IPoint[], ids?: string[]); + } +} declare namespace MakerJs.models { class BoltCircle implements IModel { paths: IPathMap; @@ -2042,6 +2190,26 @@ declare namespace MakerJs.models { constructor(width: number, height: number, holeRadius: number); } } +declare namespace MakerJs.models { + class Dogbone implements IModel { + paths: IPathMap; + /** + * Create a dogbone from width, height, corner radius, style, and bottomless flag. + * + * Example: + * ``` + * var d = new makerjs.models.Dogbone(50, 100, 5); + * ``` + * + * @param width Width of the rectangle. + * @param height Height of the rectangle. + * @param radius Corner radius. + * @param style Optional corner style: 0 (default) for dogbone, 1 for vertical, -1 for horizontal. + * @param bottomless Optional flag to omit the bottom line and bottom corners (default false). + */ + constructor(width: number, height: number, radius: number, style?: number, bottomless?: boolean); + } +} declare namespace MakerJs.models { class Dome implements IModel { paths: IPathMap; @@ -2102,7 +2270,11 @@ declare namespace MakerJs.models { * * Example: * ``` - * var r = new makerjs.models.Rectangle(100, 50); + * //Create a rectangle from width and height + * var makerjs = require('makerjs'); + * var model = new makerjs.models.Rectangle(50, 100); + * var svg = makerjs.exporter.toSVG(model); + * document.write(svg); * ``` * * @param width Width of the rectangle. @@ -2114,8 +2286,12 @@ declare namespace MakerJs.models { * * Example: * ``` + * //Create a rectangle which will surround a model + * var makerjs = require('makerjs'); * var e = new makerjs.models.Ellipse(17, 10); // draw an ellipse so we have something to surround. * var r = new makerjs.models.Rectangle(e, 3); // draws a rectangle surrounding the ellipse by 3 units. + * var svg = makerjs.exporter.toSVG({ models: { e: e, r: r }}); + * document.write(svg); * ``` * * @param modelToSurround IModel object. @@ -2127,9 +2303,13 @@ declare namespace MakerJs.models { * * Example: * ``` + * //Create a rectangle from a measurement. + * var makerjs = require('makerjs'); * var e = new makerjs.models.Ellipse(17, 10); // draw an ellipse so we have something to measure. * var m = makerjs.measure.modelExtents(e); // measure the ellipse. * var r = new makerjs.models.Rectangle(m); // draws a rectangle surrounding the ellipse. + * var svg = makerjs.exporter.toSVG({ models: { e: e, r: r }}); + * document.write(svg); * ``` * * @param measurement IMeasure object. See http://microsoft.github.io/maker.js/docs/api/modules/makerjs.measure.html#pathextents and http://microsoft.github.io/maker.js/docs/api/modules/makerjs.measure.html#modelextents to get measurements of paths and models. @@ -2173,6 +2353,6 @@ declare namespace MakerJs.models { declare namespace MakerJs.models { class Text implements IModel { models: IModelMap; - constructor(font: opentype.Font, text: string, fontSize: number, combine?: boolean); + constructor(font: opentype.Font, text: string, fontSize: number, combine?: boolean, centerCharacterOrigin?: boolean, bezierAccuracy?: number); } } diff --git a/maker.js/maker.js-tests.ts b/maker.js/maker.js-tests.ts index cc7cc0804d..4c7dbc25f0 100644 --- a/maker.js/maker.js-tests.ts +++ b/maker.js/maker.js-tests.ts @@ -9,11 +9,36 @@ function test() { var paths = testPaths(); var models = testModels(); var model: MakerJs.IModel = models[0]; + var seed: MakerJs.IPathBezierSeed = { type: makerjs.pathType.BezierSeed, origin: [0,0], end: [1,1], controls: []}; + var chain: MakerJs.IChain = { + endless: false, + links: [ + { + endPoints: [], + reversed: false, + pathLength: 0, + walkedPath: { + layer: '', + modelContext: model, + offset: p1, + pathContext: paths.line, + pathId: 'x', + route: [], + routeKey: '' + } + } + ], + pathLength: 0 + }; function testRoot() { + makerjs.version; + makerjs.environment; + makerjs.environmentTypes.BrowserUI; makerjs.cloneObject({}); makerjs.createRouteKey([]); makerjs.extendObject({abc:123}, {xyz:789}); + makerjs.isChain({}); makerjs.isFunction(function(){}); makerjs.isNumber(0); makerjs.isObject({}); @@ -62,6 +87,7 @@ function test() { useSvgPathOnly: false, viewBox: false }); + makerjs.exporter.toSVGPathData(model); makerjs.exporter.tryGetModelUnits(model); } @@ -88,7 +114,7 @@ function test() { makerjs.measure.isBetween(7, 8, 9, false); makerjs.measure.isBetweenArcAngles(7, paths.arc, false); makerjs.measure.isBetweenPoints([1,1], paths.line, true); - makerjs.measure.isBezierSeedLinear({type: '', origin:[], end:[], controls:[]}); + makerjs.measure.isBezierSeedLinear(seed); makerjs.measure.isLineOverlapping(paths.line, paths.line, false); makerjs.measure.isMeasurementOverlapping(mm, mp); var mm = makerjs.measure.modelExtents(model); @@ -105,6 +131,7 @@ function test() { function testModel(){ makerjs.model.breakPathsAtIntersections(model, { paths:{ } }); + makerjs.model.center(model); var opts: MakerJs.ICombineOptions = { trimDeadEnds: true, pointMatchingDistance: 2 }; makerjs.model.combine(model, model, true, false, true, false, opts); makerjs.model.combineIntersection(model, model); @@ -116,6 +143,7 @@ function test() { makerjs.model.expandPaths(model, 7); makerjs.model.findChains(model, function (chains: MakerJs.IChain[], loose: MakerJs.IWalkPath[], layer: string) {}) makerjs.model.findLoops(model); + makerjs.model.findSingleChain(model); makerjs.model.getSimilarModelId(model, 'foo'); makerjs.model.getSimilarPathId(model, 'foo'); makerjs.model.isPathInsideModel(paths.line, model); @@ -131,18 +159,24 @@ function test() { makerjs.model.simplify(model); makerjs.model.walk(model, {}); makerjs.model.walkPaths(model, (modelContext: MakerJs.IModel, pathId: string, pathContext: MakerJs.IPath) => {}); + makerjs.model.zero(model); model.exporterOptions = { foo: 'bar' }; } function testModels(): MakerJs.IModel[] { + makerjs.models.BezierCurve.computeLength(seed); + makerjs.models.BezierCurve.computePoint(seed, 0); + makerjs.models.BezierCurve.getBezierSeeds(new makerjs.models.BezierCurve([])); return [ new makerjs.models.BezierCurve([]), new makerjs.models.BoltCircle(7, 7, 7, 7), new makerjs.models.BoltRectangle(2, 2, 2), new makerjs.models.ConnectTheDots(true, [ [0,0], [1,1] ]), + new makerjs.models.Dogbone(1,1,1), new makerjs.models.Dome(5, 7), new makerjs.models.Ellipse(2,2), new makerjs.models.EllipticArc(2,2,3,4), + new makerjs.models.Holes(1,[]), new makerjs.models.Oval(7, 7), new makerjs.models.OvalArc(6, 4, 2, 12, true), new makerjs.models.Polygon(7, 5), @@ -159,6 +193,7 @@ function test() { function testPath() { makerjs.path.breakAtPoint(paths.arc, [0,0]).type; + makerjs.path.center(paths.line); makerjs.path.clone(paths.line); makerjs.path.converge(paths.line, paths.line); makerjs.path.distort(paths.arc, 5, 6); @@ -173,6 +208,8 @@ function test() { makerjs.path.rotate(paths.line, 5, [0,0]); makerjs.path.scale(paths.arc, 8); makerjs.path.straighten(paths.arc); + makerjs.path.toKeyPoints(paths.arc, 1); + makerjs.path.toPoints(paths.circle, 1); } function testPaths() { @@ -217,6 +254,12 @@ function test() { makerjs.point.zero(); } + function testChain() { + makerjs.chain.fillet(chain, 1); + makerjs.chain.toKeyPoints(chain); + makerjs.chain.toPoints(chain, 1); + } + function testSolvers() { makerjs.solvers.solveTriangleASA(4, 4, 4); makerjs.solvers.solveTriangleSSS(9, 9, 9); diff --git a/maker.js/tsconfig.json b/maker.js/tsconfig.json index c3fe4a7a20..35dfa654de 100644 --- a/maker.js/tsconfig.json +++ b/maker.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mandrill-api/tsconfig.json b/mandrill-api/tsconfig.json index 25bf307996..e93086cbce 100644 --- a/mandrill-api/tsconfig.json +++ b/mandrill-api/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mapbox-gl/tsconfig.json b/mapbox-gl/tsconfig.json index f579526134..2fa39335f6 100644 --- a/mapbox-gl/tsconfig.json +++ b/mapbox-gl/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mapbox/tsconfig.json b/mapbox/tsconfig.json index 08379129cc..0fdf82e942 100644 --- a/mapbox/tsconfig.json +++ b/mapbox/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mapsjs/tsconfig.json b/mapsjs/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/mapsjs/tsconfig.json +++ b/mapsjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/maquette/tsconfig.json b/maquette/tsconfig.json index 74d86d2f0e..47fd795f6d 100644 --- a/maquette/tsconfig.json +++ b/maquette/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mariasql/tsconfig.json b/mariasql/tsconfig.json index bc1d6fa29f..13b15cddda 100644 --- a/mariasql/tsconfig.json +++ b/mariasql/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/markdown-it/tsconfig.json b/markdown-it/tsconfig.json index 6a588d5e50..1717771467 100644 --- a/markdown-it/tsconfig.json +++ b/markdown-it/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es5", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/marked/tsconfig.json b/marked/tsconfig.json index 79b92307e5..b51a9340d6 100644 --- a/marked/tsconfig.json +++ b/marked/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/marker-animate-unobtrusive/tsconfig.json b/marker-animate-unobtrusive/tsconfig.json index bc77ff1fcd..f95f612a71 100644 --- a/marker-animate-unobtrusive/tsconfig.json +++ b/marker-animate-unobtrusive/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/markerclustererplus/tsconfig.json b/markerclustererplus/tsconfig.json index d5d06f670b..e9fdb4efa9 100644 --- a/markerclustererplus/tsconfig.json +++ b/markerclustererplus/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/markitup/tsconfig.json b/markitup/tsconfig.json index 9748f52c94..91edea9865 100644 --- a/markitup/tsconfig.json +++ b/markitup/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/maskedinput/tsconfig.json b/maskedinput/tsconfig.json index e7b3e085e2..0010b13a2a 100644 --- a/maskedinput/tsconfig.json +++ b/maskedinput/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/masonry-layout/tsconfig.json b/masonry-layout/tsconfig.json index 509928d511..15980678b3 100644 --- a/masonry-layout/tsconfig.json +++ b/masonry-layout/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/match-media-mock/tsconfig.json b/match-media-mock/tsconfig.json index 7b21c1d099..6a0658a582 100644 --- a/match-media-mock/tsconfig.json +++ b/match-media-mock/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/material-design-lite/tsconfig.json b/material-design-lite/tsconfig.json index 4d9147506f..381b437b57 100644 --- a/material-design-lite/tsconfig.json +++ b/material-design-lite/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/material-ui/index.d.ts b/material-ui/index.d.ts index 08e926d043..716505987d 100644 --- a/material-ui/index.d.ts +++ b/material-ui/index.d.ts @@ -1765,7 +1765,7 @@ declare namespace __MaterialUI { multiLine?: boolean; name?: string; onBlur?: React.FocusEventHandler<{}>; - onChange?: React.FormEventHandler<{}>; + onChange?: (e: React.FormEvent<{}>, newValue: string) => void; onEnterKeyDown?: React.KeyboardEventHandler<{}>; onFocus?: React.FocusEventHandler<{}>; onKeyDown?: React.KeyboardEventHandler<{}>; diff --git a/material-ui/tsconfig.json b/material-ui/tsconfig.json index a39ca819a0..7f7f8d61c7 100644 --- a/material-ui/tsconfig.json +++ b/material-ui/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/materialize-css/tsconfig.json b/materialize-css/tsconfig.json index 04f7d8038a..1c24218f86 100644 --- a/materialize-css/tsconfig.json +++ b/materialize-css/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/math3d/tsconfig.json b/math3d/tsconfig.json index 98c27750da..dc28196f64 100644 --- a/math3d/tsconfig.json +++ b/math3d/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mathjax/tsconfig.json b/mathjax/tsconfig.json index f447361f68..262a975cef 100644 --- a/mathjax/tsconfig.json +++ b/mathjax/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mathjs/tsconfig.json b/mathjs/tsconfig.json index eb8ddd50fd..55499d6a34 100644 --- a/mathjs/tsconfig.json +++ b/mathjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/matter-js/tsconfig.json b/matter-js/tsconfig.json index fc54244c57..e67ee4f7a1 100644 --- a/matter-js/tsconfig.json +++ b/matter-js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/maxmind/tsconfig.json b/maxmind/tsconfig.json index eb17306ac3..995fba6e58 100644 --- a/maxmind/tsconfig.json +++ b/maxmind/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mcustomscrollbar/tsconfig.json b/mcustomscrollbar/tsconfig.json index 56a75dc8b2..5dba3829a9 100644 --- a/mcustomscrollbar/tsconfig.json +++ b/mcustomscrollbar/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/md5/tsconfig.json b/md5/tsconfig.json index cbccd9ae2e..23854bdbe1 100644 --- a/md5/tsconfig.json +++ b/md5/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mdns/tsconfig.json b/mdns/tsconfig.json index 8ed18778f1..905e8be032 100644 --- a/mdns/tsconfig.json +++ b/mdns/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/medium-editor/tsconfig.json b/medium-editor/tsconfig.json index 6a26273c56..1d05857b75 100644 --- a/medium-editor/tsconfig.json +++ b/medium-editor/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mem/tsconfig.json b/mem/tsconfig.json index edd23c0df6..96073a18a4 100644 --- a/mem/tsconfig.json +++ b/mem/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/memoizee/tsconfig.json b/memoizee/tsconfig.json index c2ccff1cab..bf28a77a50 100644 --- a/memoizee/tsconfig.json +++ b/memoizee/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "memoizee-tests.ts" ] -} +} \ No newline at end of file diff --git a/memory-cache/tsconfig.json b/memory-cache/tsconfig.json index 50ad98ae79..646c894d6d 100644 --- a/memory-cache/tsconfig.json +++ b/memory-cache/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/memory-fs/tsconfig.json b/memory-fs/tsconfig.json index f1afc33095..a6e90280a6 100644 --- a/memory-fs/tsconfig.json +++ b/memory-fs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/memwatch-next/tsconfig.json b/memwatch-next/tsconfig.json index 265b1f36fb..fd5931927e 100644 --- a/memwatch-next/tsconfig.json +++ b/memwatch-next/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mendixmodelsdk/tsconfig.json b/mendixmodelsdk/tsconfig.json index 063c52e82d..89ebf15fce 100644 --- a/mendixmodelsdk/tsconfig.json +++ b/mendixmodelsdk/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/menubar/tsconfig.json b/menubar/tsconfig.json index 3335dbcc63..a1751019e0 100644 --- a/menubar/tsconfig.json +++ b/menubar/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/meow/tsconfig.json b/meow/tsconfig.json index 813b4c637e..c9664cbcff 100644 --- a/meow/tsconfig.json +++ b/meow/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/merge-descriptors/tsconfig.json b/merge-descriptors/tsconfig.json index 59a4cf7929..50246ffb88 100644 --- a/merge-descriptors/tsconfig.json +++ b/merge-descriptors/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/merge-stream/tsconfig.json b/merge-stream/tsconfig.json index 7b21034a11..07500cf286 100644 --- a/merge-stream/tsconfig.json +++ b/merge-stream/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/merge2/tsconfig.json b/merge2/tsconfig.json index f6d1e01711..4fd4d60c3f 100644 --- a/merge2/tsconfig.json +++ b/merge2/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/meshblu/tsconfig.json b/meshblu/tsconfig.json index 76014128a5..7abf4e1e84 100644 --- a/meshblu/tsconfig.json +++ b/meshblu/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mess/tsconfig.json b/mess/tsconfig.json index a5f7d45bf9..272b27dbb6 100644 --- a/mess/tsconfig.json +++ b/mess/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/messenger/tsconfig.json b/messenger/tsconfig.json index 607632573d..a9382d1d9f 100644 --- a/messenger/tsconfig.json +++ b/messenger/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/meteor-accounts-phone/tsconfig.json b/meteor-accounts-phone/tsconfig.json index dbebc41b00..21ba959534 100644 --- a/meteor-accounts-phone/tsconfig.json +++ b/meteor-accounts-phone/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/meteor-jboulhous-dev/tsconfig.json b/meteor-jboulhous-dev/tsconfig.json index d8efbca930..74fabcdbfb 100644 --- a/meteor-jboulhous-dev/tsconfig.json +++ b/meteor-jboulhous-dev/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/meteor-persistent-session/tsconfig.json b/meteor-persistent-session/tsconfig.json index 0e4086faf6..fe76b9d4e3 100644 --- a/meteor-persistent-session/tsconfig.json +++ b/meteor-persistent-session/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/meteor-prime8consulting-oauth2/tsconfig.json b/meteor-prime8consulting-oauth2/tsconfig.json index 2cd16f610b..722d8e6fa1 100644 --- a/meteor-prime8consulting-oauth2/tsconfig.json +++ b/meteor-prime8consulting-oauth2/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/meteor-publish-composite/tsconfig.json b/meteor-publish-composite/tsconfig.json index 69b707ec09..23189eb80a 100644 --- a/meteor-publish-composite/tsconfig.json +++ b/meteor-publish-composite/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/meteor-roles/tsconfig.json b/meteor-roles/tsconfig.json index a0f92813dc..eab68b58ca 100644 --- a/meteor-roles/tsconfig.json +++ b/meteor-roles/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/meteor/tsconfig.json b/meteor/tsconfig.json index 8fcf6770fc..6bbd67fad1 100644 --- a/meteor/tsconfig.json +++ b/meteor/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/method-override/tsconfig.json b/method-override/tsconfig.json index 5276e8f232..a0c2ea2d18 100644 --- a/method-override/tsconfig.json +++ b/method-override/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/metismenu/tsconfig.json b/metismenu/tsconfig.json index 260a9a133e..2e3eb83e4f 100644 --- a/metismenu/tsconfig.json +++ b/metismenu/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/metric-suffix/tsconfig.json b/metric-suffix/tsconfig.json index c23b32a4e4..5f31731f40 100644 --- a/metric-suffix/tsconfig.json +++ b/metric-suffix/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/microgears/tsconfig.json b/microgears/tsconfig.json index f4b3054b73..f0fd628aa9 100644 --- a/microgears/tsconfig.json +++ b/microgears/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/micromatch/tsconfig.json b/micromatch/tsconfig.json index e70a25c93c..c2edc166e8 100644 --- a/micromatch/tsconfig.json +++ b/micromatch/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/microsoft-ajax/tsconfig.json b/microsoft-ajax/tsconfig.json index 3ed87d107e..b02b95aa5a 100644 --- a/microsoft-ajax/tsconfig.json +++ b/microsoft-ajax/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/microsoft-live-connect/tsconfig.json b/microsoft-live-connect/tsconfig.json index c2650a3401..b98f234db0 100644 --- a/microsoft-live-connect/tsconfig.json +++ b/microsoft-live-connect/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/microsoft-sdk-soap/tsconfig.json b/microsoft-sdk-soap/tsconfig.json index 399c82bee2..ef973bcb22 100644 --- a/microsoft-sdk-soap/tsconfig.json +++ b/microsoft-sdk-soap/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/milkcocoa/tsconfig.json b/milkcocoa/tsconfig.json index ba3810a161..e7df52214b 100644 --- a/milkcocoa/tsconfig.json +++ b/milkcocoa/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/milliseconds/tsconfig.json b/milliseconds/tsconfig.json index 05a2d8e775..34585cc8ed 100644 --- a/milliseconds/tsconfig.json +++ b/milliseconds/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mime/tsconfig.json b/mime/tsconfig.json index f5d395b087..ee63d84106 100644 --- a/mime/tsconfig.json +++ b/mime/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/minilog/tsconfig.json b/minilog/tsconfig.json index 336285a447..cc7db61f43 100644 --- a/minilog/tsconfig.json +++ b/minilog/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/minimatch/tsconfig.json b/minimatch/tsconfig.json index eb92138364..5a39cdda20 100644 --- a/minimatch/tsconfig.json +++ b/minimatch/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/minimist/tsconfig.json b/minimist/tsconfig.json index 188ccf114d..994d8d3b05 100644 --- a/minimist/tsconfig.json +++ b/minimist/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mithril/tsconfig.json b/mithril/tsconfig.json index 1518d12192..a80a6ce9f2 100644 --- a/mithril/tsconfig.json +++ b/mithril/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/mitm/tsconfig.json b/mitm/tsconfig.json index 981780e6d7..7b49290ebd 100644 --- a/mitm/tsconfig.json +++ b/mitm/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mixpanel/tsconfig.json b/mixpanel/tsconfig.json index e893c689c2..332e01d6a1 100644 --- a/mixpanel/tsconfig.json +++ b/mixpanel/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mixto/tsconfig.json b/mixto/tsconfig.json index 09fdb3f2ce..2a36103c77 100644 --- a/mixto/tsconfig.json +++ b/mixto/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mkdirp/tsconfig.json b/mkdirp/tsconfig.json index 56d3bc8e71..3022b602d3 100644 --- a/mkdirp/tsconfig.json +++ b/mkdirp/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mkpath/tsconfig.json b/mkpath/tsconfig.json index 6ba1003842..ea4d563111 100644 --- a/mkpath/tsconfig.json +++ b/mkpath/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mmmagic/tsconfig.json b/mmmagic/tsconfig.json index b04cf4cf90..56c0a9a623 100644 --- a/mmmagic/tsconfig.json +++ b/mmmagic/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mobile-detect/tsconfig.json b/mobile-detect/tsconfig.json index 30a8d3e734..58e74f0636 100644 --- a/mobile-detect/tsconfig.json +++ b/mobile-detect/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mobservable-react/tsconfig.json b/mobservable-react/tsconfig.json index ec18ae9037..a09148404e 100644 --- a/mobservable-react/tsconfig.json +++ b/mobservable-react/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mobservable/tsconfig.json b/mobservable/tsconfig.json index ec716a048b..26c2a7df47 100644 --- a/mobservable/tsconfig.json +++ b/mobservable/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mocha-phantomjs/tsconfig.json b/mocha-phantomjs/tsconfig.json index 1bfefe06fd..0b88eaff24 100644 --- a/mocha-phantomjs/tsconfig.json +++ b/mocha-phantomjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mocha/index.d.ts b/mocha/index.d.ts index 9ac84fa097..41d08c685d 100644 --- a/mocha/index.d.ts +++ b/mocha/index.d.ts @@ -69,6 +69,8 @@ declare class Mocha { ui?: string; reporter?: string; timeout?: number; + reporterOptions?: any; + slow?: number; bail?: boolean; }); diff --git a/mocha/tsconfig.json b/mocha/tsconfig.json index 94ab1840b4..d38cd37afd 100644 --- a/mocha/tsconfig.json +++ b/mocha/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/mock-fs/tsconfig.json b/mock-fs/tsconfig.json index f80521c925..c9f837a67e 100644 --- a/mock-fs/tsconfig.json +++ b/mock-fs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mock-require/tsconfig.json b/mock-require/tsconfig.json index 5daad87ee1..9b02a7c5c6 100644 --- a/mock-require/tsconfig.json +++ b/mock-require/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mockdate/tsconfig.json b/mockdate/tsconfig.json index 9b92b9f946..e0a84362b9 100644 --- a/mockdate/tsconfig.json +++ b/mockdate/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "mockdate-tests.ts" ] -} +} \ No newline at end of file diff --git a/mockery/tsconfig.json b/mockery/tsconfig.json index 54d1ef27d8..2147e75e52 100644 --- a/mockery/tsconfig.json +++ b/mockery/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/modernizr/index.d.ts b/modernizr/index.d.ts index 7c8a0233af..a447f3acea 100644 --- a/modernizr/index.d.ts +++ b/modernizr/index.d.ts @@ -3,6 +3,9 @@ // Definitions by: Boris Yankov , Theodore Brown , Leon Yu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +export = Modernizr; // support AMD require +export as namespace Modernizr; // keep a global namespace + declare namespace __Modernizr { interface AudioBoolean { ogg: boolean; diff --git a/modernizr/tsconfig.json b/modernizr/tsconfig.json index d19a8abc47..fd2ef33847 100644 --- a/modernizr/tsconfig.json +++ b/modernizr/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/moment-duration-format/tsconfig.json b/moment-duration-format/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/moment-duration-format/tsconfig.json +++ b/moment-duration-format/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/moment-jalaali/tsconfig.json b/moment-jalaali/tsconfig.json index 5508cb1c79..cb540b61cc 100644 --- a/moment-jalaali/tsconfig.json +++ b/moment-jalaali/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/moment-range/tsconfig.json b/moment-range/tsconfig.json index 9427913948..7208f89157 100644 --- a/moment-range/tsconfig.json +++ b/moment-range/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/moment-timezone/tsconfig.json b/moment-timezone/tsconfig.json index 4b0a3b0e60..fd0a27b64d 100644 --- a/moment-timezone/tsconfig.json +++ b/moment-timezone/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mongodb/tsconfig.json b/mongodb/tsconfig.json index e9db4d672b..19e9086a8f 100644 --- a/mongodb/tsconfig.json +++ b/mongodb/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mongodb/v1/tsconfig.json b/mongodb/v1/tsconfig.json index 626beccaa7..da211f11a7 100644 --- a/mongodb/v1/tsconfig.json +++ b/mongodb/v1/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -11,7 +13,9 @@ ], "types": [], "paths": { - "mongodb": ["mongodb/v1"] + "mongodb": [ + "mongodb/v1" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/mongoose-auto-increment/tsconfig.json b/mongoose-auto-increment/tsconfig.json index 91fd1eca6d..20df7ba15a 100644 --- a/mongoose-auto-increment/tsconfig.json +++ b/mongoose-auto-increment/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mongoose-deep-populate/tsconfig.json b/mongoose-deep-populate/tsconfig.json index 5b4024e1e9..5d7a18e0d7 100644 --- a/mongoose-deep-populate/tsconfig.json +++ b/mongoose-deep-populate/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mongoose-mock/tsconfig.json b/mongoose-mock/tsconfig.json index bc503d2910..8ea3916ce1 100644 --- a/mongoose-mock/tsconfig.json +++ b/mongoose-mock/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mongoose-paginate/tsconfig.json b/mongoose-paginate/tsconfig.json index 77f4179cd8..89d88a5bdb 100644 --- a/mongoose-paginate/tsconfig.json +++ b/mongoose-paginate/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mongoose-promise/tsconfig.json b/mongoose-promise/tsconfig.json index 6338151836..128afbaa84 100644 --- a/mongoose-promise/tsconfig.json +++ b/mongoose-promise/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/mongoose-seeder/tsconfig.json b/mongoose-seeder/tsconfig.json index 89932bbd81..143fcc1ce4 100644 --- a/mongoose-seeder/tsconfig.json +++ b/mongoose-seeder/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mongoose-sequence/tsconfig.json b/mongoose-sequence/tsconfig.json index 6908abe759..63cde407d1 100644 --- a/mongoose-sequence/tsconfig.json +++ b/mongoose-sequence/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mongoose/tsconfig.json b/mongoose/tsconfig.json index c7445ccecd..0c7d49295c 100644 --- a/mongoose/tsconfig.json +++ b/mongoose/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/mongoose/v3/tsconfig.json b/mongoose/v3/tsconfig.json index 2910cdc186..e718e4bb13 100644 --- a/mongoose/v3/tsconfig.json +++ b/mongoose/v3/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, @@ -11,7 +13,9 @@ ], "types": [], "paths": { - "mongoose": ["mongoose/v3"] + "mongoose": [ + "mongoose/v3" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/monk/tsconfig.json b/monk/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/monk/tsconfig.json +++ b/monk/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/morgan/tsconfig.json b/morgan/tsconfig.json index 4427883ae7..2fbf55b262 100644 --- a/morgan/tsconfig.json +++ b/morgan/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/morris.js/tsconfig.json b/morris.js/tsconfig.json index 8d974bbae5..7ace6d11e7 100644 --- a/morris.js/tsconfig.json +++ b/morris.js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mousetrap/tsconfig.json b/mousetrap/tsconfig.json index d7def634a2..e6d64d13e9 100644 --- a/mousetrap/tsconfig.json +++ b/mousetrap/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/moviedb/tsconfig.json b/moviedb/tsconfig.json index 2590dc3451..c943b58729 100644 --- a/moviedb/tsconfig.json +++ b/moviedb/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mpromise/tsconfig.json b/mpromise/tsconfig.json index ec9d7a3e35..1a2e40aa8a 100644 --- a/mpromise/tsconfig.json +++ b/mpromise/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mqtt/tsconfig.json b/mqtt/tsconfig.json index 2955c890d1..4d8e6cef5d 100644 --- a/mqtt/tsconfig.json +++ b/mqtt/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ms/tsconfig.json b/ms/tsconfig.json index 2bbe5025e0..e48ac1c207 100644 --- a/ms/tsconfig.json +++ b/ms/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/msgpack-lite/tsconfig.json b/msgpack-lite/tsconfig.json index 39588c1eef..9a06c485e9 100644 --- a/msgpack-lite/tsconfig.json +++ b/msgpack-lite/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/msgpack/tsconfig.json b/msgpack/tsconfig.json index 12c6bf2393..5593e7dc63 100644 --- a/msgpack/tsconfig.json +++ b/msgpack/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/msgpack5/tsconfig.json b/msgpack5/tsconfig.json index f3f0f081e2..2b67c37312 100644 --- a/msgpack5/tsconfig.json +++ b/msgpack5/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "module": "commonjs", "moduleResolution": "node", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/msnodesql/tsconfig.json b/msnodesql/tsconfig.json index ff5a3b021e..1619c42d99 100644 --- a/msnodesql/tsconfig.json +++ b/msnodesql/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/msportalfx-test/tsconfig.json b/msportalfx-test/tsconfig.json index 8e060b7cac..115af8c6ef 100644 --- a/msportalfx-test/tsconfig.json +++ b/msportalfx-test/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mssql/index.d.ts b/mssql/index.d.ts index 9d4d09a5f0..8aaca045e2 100644 --- a/mssql/index.d.ts +++ b/mssql/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for mssql v3.1.0 +// Type definitions for mssql 3.3 // Project: https://www.npmjs.com/package/mssql -// Definitions by: COLSA Corporation , Ben Farr , Vitor Buzinaro +// Definitions by: COLSA Corporation , Ben Farr , Vitor Buzinaro , Matt Richardson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -113,7 +113,13 @@ export declare var ISOLATION_LEVEL: { } export interface IOptions { - encrypt: boolean; + encrypt?: boolean; + instanceName?: string; + useUTC?: boolean; + tdsVersion?: string; + appName?: string; + abortTransactionOnError?: boolean; + trustedConnection?: boolean; } diff --git a/mssql/tsconfig.json b/mssql/tsconfig.json index 9c86f25fa7..fc4c11febd 100644 --- a/mssql/tsconfig.json +++ b/mssql/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mu2/tsconfig.json b/mu2/tsconfig.json index 24ba50b7e4..898824f909 100644 --- a/mu2/tsconfig.json +++ b/mu2/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/multer-s3/tsconfig.json b/multer-s3/tsconfig.json index e31116b8b6..8b5444cc52 100644 --- a/multer-s3/tsconfig.json +++ b/multer-s3/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/multer/tsconfig.json b/multer/tsconfig.json index 964414acc4..4a6fa797a4 100644 --- a/multer/tsconfig.json +++ b/multer/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/multi-typeof/tsconfig.json b/multi-typeof/tsconfig.json index 87eb6217d4..3bc13b0278 100644 --- a/multi-typeof/tsconfig.json +++ b/multi-typeof/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -16,4 +18,4 @@ "files": [ "index.d.ts" ] -} +} \ No newline at end of file diff --git a/multiparty/tsconfig.json b/multiparty/tsconfig.json index 2a639aab7b..f77ed2c0e2 100644 --- a/multiparty/tsconfig.json +++ b/multiparty/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/multiplexjs/tsconfig.json b/multiplexjs/tsconfig.json index 01f9c2ba95..a2fce51999 100644 --- a/multiplexjs/tsconfig.json +++ b/multiplexjs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/murmurhash-js/tsconfig.json b/murmurhash-js/tsconfig.json index fed6da8d69..f5d9b546a5 100644 --- a/murmurhash-js/tsconfig.json +++ b/murmurhash-js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/murmurhash3js/tsconfig.json b/murmurhash3js/tsconfig.json index e7987051cb..ac390b20d2 100644 --- a/murmurhash3js/tsconfig.json +++ b/murmurhash3js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/musicmetadata/tsconfig.json b/musicmetadata/tsconfig.json index 9c0fe2b096..4118943a6e 100644 --- a/musicmetadata/tsconfig.json +++ b/musicmetadata/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mustache/tsconfig.json b/mustache/tsconfig.json index 215e1f8df6..caa857f601 100644 --- a/mustache/tsconfig.json +++ b/mustache/tsconfig.json @@ -5,7 +5,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/mysql/tsconfig.json b/mysql/tsconfig.json index 0ad98be9b5..06d1fe0961 100644 --- a/mysql/tsconfig.json +++ b/mysql/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/mz/tsconfig.json b/mz/tsconfig.json index 90590c7dbd..072ee098f2 100644 --- a/mz/tsconfig.json +++ b/mz/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/n3/tsconfig.json b/n3/tsconfig.json index 9054ed7a87..65b94afeeb 100644 --- a/n3/tsconfig.json +++ b/n3/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/nanoajax/tsconfig.json b/nanoajax/tsconfig.json index 6af532ac1b..92ad1e1c95 100644 --- a/nanoajax/tsconfig.json +++ b/nanoajax/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/nanomsg/tsconfig.json b/nanomsg/tsconfig.json index 195f6d8ee5..25060725b5 100644 --- a/nanomsg/tsconfig.json +++ b/nanomsg/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/nanp/tsconfig.json b/nanp/tsconfig.json index b23b8a6f94..e240841011 100644 --- a/nanp/tsconfig.json +++ b/nanp/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/natural-sort/tsconfig.json b/natural-sort/tsconfig.json index 76fcfd3470..a850693803 100644 --- a/natural-sort/tsconfig.json +++ b/natural-sort/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/natural/tsconfig.json b/natural/tsconfig.json index 069f4c6978..2c58eef33c 100644 --- a/natural/tsconfig.json +++ b/natural/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/navigation-react/tsconfig.json b/navigation-react/tsconfig.json index eaf6fc7605..e98deeb536 100644 --- a/navigation-react/tsconfig.json +++ b/navigation-react/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/navigation/tsconfig.json b/navigation/tsconfig.json index c0796ff0ca..5f8c7ebc76 100644 --- a/navigation/tsconfig.json +++ b/navigation/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/nblas/tsconfig.json b/nblas/tsconfig.json index a0d9912018..243cdbd0b7 100644 --- a/nblas/tsconfig.json +++ b/nblas/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "nblas-tests.ts" ] -} +} \ No newline at end of file diff --git a/nconf/tsconfig.json b/nconf/tsconfig.json index 8cc217357b..8e79b8ffc7 100644 --- a/nconf/tsconfig.json +++ b/nconf/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ncp/tsconfig.json b/ncp/tsconfig.json index 9522b66ff3..1183234ffb 100644 --- a/ncp/tsconfig.json +++ b/ncp/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ndarray/tsconfig.json b/ndarray/tsconfig.json index ee1ebeae2c..986486003c 100644 --- a/ndarray/tsconfig.json +++ b/ndarray/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/nedb/tsconfig.json b/nedb/tsconfig.json index 7e1f867bdb..b04339e6e8 100644 --- a/nedb/tsconfig.json +++ b/nedb/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/needle/tsconfig.json b/needle/tsconfig.json index f67e545b29..5af602dd4f 100644 --- a/needle/tsconfig.json +++ b/needle/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/neo4j/tsconfig.json b/neo4j/tsconfig.json index 630589420f..c81dad245f 100644 --- a/neo4j/tsconfig.json +++ b/neo4j/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/nes/tsconfig.json b/nes/tsconfig.json index f0126a1b5c..74c7bfef19 100644 --- a/nes/tsconfig.json +++ b/nes/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/netmask/tsconfig.json b/netmask/tsconfig.json index 132aba9009..80cd2fedc3 100644 --- a/netmask/tsconfig.json +++ b/netmask/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/nexpect/tsconfig.json b/nexpect/tsconfig.json index 7e61089236..3026b14835 100644 --- a/nexpect/tsconfig.json +++ b/nexpect/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ng-command/tsconfig.json b/ng-command/tsconfig.json index fee4d8ec1f..7af8d6ad1f 100644 --- a/ng-command/tsconfig.json +++ b/ng-command/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ng-cordova/tsconfig.json b/ng-cordova/tsconfig.json index 68f86a18f9..86b26ec661 100644 --- a/ng-cordova/tsconfig.json +++ b/ng-cordova/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/ng-dialog/tsconfig.json b/ng-dialog/tsconfig.json index 961ea66c75..ef30259705 100644 --- a/ng-dialog/tsconfig.json +++ b/ng-dialog/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ng-facebook/tsconfig.json b/ng-facebook/tsconfig.json index 7fafa6695f..c7d1184665 100644 --- a/ng-facebook/tsconfig.json +++ b/ng-facebook/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ng-file-upload/tsconfig.json b/ng-file-upload/tsconfig.json index 788c4f151f..38431b0efb 100644 --- a/ng-file-upload/tsconfig.json +++ b/ng-file-upload/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ng-flow/tsconfig.json b/ng-flow/tsconfig.json index ad8f931a10..a40de884dd 100644 --- a/ng-flow/tsconfig.json +++ b/ng-flow/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ng-grid/tsconfig.json b/ng-grid/tsconfig.json index 004a36a62b..e109a6e469 100644 --- a/ng-grid/tsconfig.json +++ b/ng-grid/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ng-i18next/tsconfig.json b/ng-i18next/tsconfig.json index 57a3989f9f..a018b2f3c5 100644 --- a/ng-i18next/tsconfig.json +++ b/ng-i18next/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ng-notify/tsconfig.json b/ng-notify/tsconfig.json index c992e59ce4..5622eb70d1 100644 --- a/ng-notify/tsconfig.json +++ b/ng-notify/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ng-stomp/tsconfig.json b/ng-stomp/tsconfig.json index 09513f0979..5fc937e972 100644 --- a/ng-stomp/tsconfig.json +++ b/ng-stomp/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/ngbootbox/tsconfig.json b/ngbootbox/tsconfig.json index db584f8726..b53b786001 100644 --- a/ngbootbox/tsconfig.json +++ b/ngbootbox/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ngeohash/tsconfig.json b/ngeohash/tsconfig.json index 0ffb3e117f..6b3829293b 100644 --- a/ngeohash/tsconfig.json +++ b/ngeohash/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ngkookies/tsconfig.json b/ngkookies/tsconfig.json index 7ac7d2c610..739674161a 100644 --- a/ngkookies/tsconfig.json +++ b/ngkookies/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ngmap/tsconfig.json b/ngmap/tsconfig.json index 38936ad5aa..c0385849f3 100644 --- a/ngmap/tsconfig.json +++ b/ngmap/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ngprogress-lite/tsconfig.json b/ngprogress-lite/tsconfig.json index fcf53ebd72..ddbd06479b 100644 --- a/ngprogress-lite/tsconfig.json +++ b/ngprogress-lite/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ngprogress/tsconfig.json b/ngprogress/tsconfig.json index 0d65d9de68..359b6d5a3f 100644 --- a/ngprogress/tsconfig.json +++ b/ngprogress/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ngreact/tsconfig.json b/ngreact/tsconfig.json index 6bda87700f..2ed818098d 100644 --- a/ngreact/tsconfig.json +++ b/ngreact/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/ngstorage/tsconfig.json b/ngstorage/tsconfig.json index 85bd05d6df..691875db20 100644 --- a/ngstorage/tsconfig.json +++ b/ngstorage/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ngtoaster/tsconfig.json b/ngtoaster/tsconfig.json index 67970d092e..8644727777 100644 --- a/ngtoaster/tsconfig.json +++ b/ngtoaster/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ngwysiwyg/tsconfig.json b/ngwysiwyg/tsconfig.json index b15aae220e..ba0d14ce01 100644 --- a/ngwysiwyg/tsconfig.json +++ b/ngwysiwyg/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/nightmare/tsconfig.json b/nightmare/tsconfig.json index af1a18ff51..4cebafb384 100644 --- a/nightmare/tsconfig.json +++ b/nightmare/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/noble/tsconfig.json b/noble/tsconfig.json index c4128e041b..5821c4f99e 100644 --- a/noble/tsconfig.json +++ b/noble/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/nock/tsconfig.json b/nock/tsconfig.json index 43b8163553..25f3704be5 100644 --- a/nock/tsconfig.json +++ b/nock/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/nodal/tsconfig.json b/nodal/tsconfig.json index 6de3507e0f..1926531290 100644 --- a/nodal/tsconfig.json +++ b/nodal/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/node-7z/tsconfig.json b/node-7z/tsconfig.json index 097133b35f..234991dd83 100644 --- a/node-7z/tsconfig.json +++ b/node-7z/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-array-ext/tsconfig.json b/node-array-ext/tsconfig.json index 285a724be9..8606f3abd3 100644 --- a/node-array-ext/tsconfig.json +++ b/node-array-ext/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-cache/index.d.ts b/node-cache/index.d.ts index c9d82eb8cc..37b4389d69 100644 --- a/node-cache/index.d.ts +++ b/node-cache/index.d.ts @@ -122,6 +122,7 @@ declare namespace NodeCache { stdTTL?: number; checkperiod?: number; useClones?: boolean; + errorOnMissing?: boolean; } interface Stats { diff --git a/node-cache/tsconfig.json b/node-cache/tsconfig.json index 17369c13e8..7d2199b01a 100644 --- a/node-cache/tsconfig.json +++ b/node-cache/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-calendar/tsconfig.json b/node-calendar/tsconfig.json index c377815f5e..a37a9c56c8 100644 --- a/node-calendar/tsconfig.json +++ b/node-calendar/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-config-manager/tsconfig.json b/node-config-manager/tsconfig.json index a417567e00..46b55675ea 100644 --- a/node-config-manager/tsconfig.json +++ b/node-config-manager/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-dir/tsconfig.json b/node-dir/tsconfig.json index 8340cefc06..721afc5ea2 100644 --- a/node-dir/tsconfig.json +++ b/node-dir/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-dogstatsd/tsconfig.json b/node-dogstatsd/tsconfig.json index 81937ab2d3..f428056382 100644 --- a/node-dogstatsd/tsconfig.json +++ b/node-dogstatsd/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-emoji/tsconfig.json b/node-emoji/tsconfig.json index cf3dadcb94..babbfb054a 100644 --- a/node-emoji/tsconfig.json +++ b/node-emoji/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "node-emoji-tests.ts" ] -} +} \ No newline at end of file diff --git a/node-fetch/tsconfig.json b/node-fetch/tsconfig.json index 74e4a359a2..5f00ad6183 100644 --- a/node-fetch/tsconfig.json +++ b/node-fetch/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es5", + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -11,11 +14,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, - "lib": [ - "es5", - "es6" - ] + "forceConsistentCasingInFileNames": true }, "files": [ "index.d.ts", diff --git a/node-fibers/tsconfig.json b/node-fibers/tsconfig.json index c9ae000aff..ffde5ed236 100644 --- a/node-fibers/tsconfig.json +++ b/node-fibers/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-forge/tsconfig.json b/node-forge/tsconfig.json index 5bf2ecc24c..21c50fb705 100644 --- a/node-forge/tsconfig.json +++ b/node-forge/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-form/tsconfig.json b/node-form/tsconfig.json index 89199acbc8..1bb627df73 100644 --- a/node-form/tsconfig.json +++ b/node-form/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-gcm/tsconfig.json b/node-gcm/tsconfig.json index 57618ced14..11bad84e8d 100644 --- a/node-gcm/tsconfig.json +++ b/node-gcm/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-getopt/tsconfig.json b/node-getopt/tsconfig.json index 25a4fada5e..d3271b9cfe 100644 --- a/node-getopt/tsconfig.json +++ b/node-getopt/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-hid/tsconfig.json b/node-hid/tsconfig.json index 0f9e2fa1ce..960aa11c02 100644 --- a/node-hid/tsconfig.json +++ b/node-hid/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "node-hid-tests.ts" ] -} +} \ No newline at end of file diff --git a/node-hue-api/tsconfig.json b/node-hue-api/tsconfig.json index 7ac7fc76d8..201c60cd0c 100644 --- a/node-hue-api/tsconfig.json +++ b/node-hue-api/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/node-int64/tsconfig.json b/node-int64/tsconfig.json index 0b1d66b868..04f9e046de 100644 --- a/node-int64/tsconfig.json +++ b/node-int64/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-jsfl-runner/tsconfig.json b/node-jsfl-runner/tsconfig.json index 230251034b..8345033598 100644 --- a/node-jsfl-runner/tsconfig.json +++ b/node-jsfl-runner/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-json-db/tsconfig.json b/node-json-db/tsconfig.json index f5ef726515..629e9ecc86 100644 --- a/node-json-db/tsconfig.json +++ b/node-json-db/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/node-mysql-wrapper/tsconfig.json b/node-mysql-wrapper/tsconfig.json index ab57698a8a..7c97d0fe46 100644 --- a/node-mysql-wrapper/tsconfig.json +++ b/node-mysql-wrapper/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-notifier/tsconfig.json b/node-notifier/tsconfig.json index b35d6c0c89..afc934deb7 100644 --- a/node-notifier/tsconfig.json +++ b/node-notifier/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-persist/tsconfig.json b/node-persist/tsconfig.json index 22477780a9..f6bd656274 100644 --- a/node-persist/tsconfig.json +++ b/node-persist/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-polyglot/tsconfig.json b/node-polyglot/tsconfig.json index 2f4b2970be..06a5d98957 100644 --- a/node-polyglot/tsconfig.json +++ b/node-polyglot/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-sass-middleware/tsconfig.json b/node-sass-middleware/tsconfig.json index 5bb5d002aa..9c0992fe75 100644 --- a/node-sass-middleware/tsconfig.json +++ b/node-sass-middleware/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-sass/tsconfig.json b/node-sass/tsconfig.json index 60cb3b880b..37a5f52d96 100644 --- a/node-sass/tsconfig.json +++ b/node-sass/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-schedule/tsconfig.json b/node-schedule/tsconfig.json index ba1dc29b5b..104ed7765d 100644 --- a/node-schedule/tsconfig.json +++ b/node-schedule/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-slack/tsconfig.json b/node-slack/tsconfig.json index 1ceb141acc..caed4009ff 100644 --- a/node-slack/tsconfig.json +++ b/node-slack/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-snap7/tsconfig.json b/node-snap7/tsconfig.json index 07f2988965..f4c56a98e4 100644 --- a/node-snap7/tsconfig.json +++ b/node-snap7/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-uuid/tsconfig.json b/node-uuid/tsconfig.json index 51116474a7..2ac7435d61 100644 --- a/node-uuid/tsconfig.json +++ b/node-uuid/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-validator/tsconfig.json b/node-validator/tsconfig.json index 4afa52335c..a90813621d 100644 --- a/node-validator/tsconfig.json +++ b/node-validator/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node-wit/tsconfig.json b/node-wit/tsconfig.json index 28e685c088..64025cf24e 100644 --- a/node-wit/tsconfig.json +++ b/node-wit/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "node-wit-tests.ts" ] -} +} \ No newline at end of file diff --git a/node/tsconfig.json b/node/tsconfig.json index 15c5691724..640b4f775e 100644 --- a/node/tsconfig.json +++ b/node/tsconfig.json @@ -5,7 +5,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/node/v0/tsconfig.json b/node/v0/tsconfig.json index db6f424151..4111c68b3c 100644 --- a/node/v0/tsconfig.json +++ b/node/v0/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "node": ["node/v0"] + "node": [ + "node/v0" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/node/v4/tsconfig.json b/node/v4/tsconfig.json index c91196fd30..c67866714f 100644 --- a/node/v4/tsconfig.json +++ b/node/v4/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "node": ["node/v4"] + "node": [ + "node/v4" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/node/v6/tsconfig.json b/node/v6/tsconfig.json index 2663e36364..0a1a39d7e1 100644 --- a/node/v6/tsconfig.json +++ b/node/v6/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -11,7 +13,9 @@ ], "types": [], "paths": { - "node": ["node/v6"] + "node": [ + "node/v6" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/node_redis/tsconfig.json b/node_redis/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/node_redis/tsconfig.json +++ b/node_redis/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/nodemailer-direct-transport/tsconfig.json b/nodemailer-direct-transport/tsconfig.json index e56a890c73..4fb7a7f2f3 100644 --- a/nodemailer-direct-transport/tsconfig.json +++ b/nodemailer-direct-transport/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/nodemailer-pickup-transport/tsconfig.json b/nodemailer-pickup-transport/tsconfig.json index f2126be110..f2b97d05f7 100644 --- a/nodemailer-pickup-transport/tsconfig.json +++ b/nodemailer-pickup-transport/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/nodemailer-ses-transport/tsconfig.json b/nodemailer-ses-transport/tsconfig.json index 731565ccbb..f193aa4436 100644 --- a/nodemailer-ses-transport/tsconfig.json +++ b/nodemailer-ses-transport/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/nodemailer-smtp-pool/tsconfig.json b/nodemailer-smtp-pool/tsconfig.json index 835981aaed..43c2b697ef 100644 --- a/nodemailer-smtp-pool/tsconfig.json +++ b/nodemailer-smtp-pool/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/nodemailer-smtp-transport/tsconfig.json b/nodemailer-smtp-transport/tsconfig.json index d590046a09..2ad534a972 100644 --- a/nodemailer-smtp-transport/tsconfig.json +++ b/nodemailer-smtp-transport/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/nodemailer-stub-transport/tsconfig.json b/nodemailer-stub-transport/tsconfig.json index db2c146c26..3ebd3a309a 100644 --- a/nodemailer-stub-transport/tsconfig.json +++ b/nodemailer-stub-transport/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/nodemailer/tsconfig.json b/nodemailer/tsconfig.json index 49feb99a02..cde9a08acf 100644 --- a/nodemailer/tsconfig.json +++ b/nodemailer/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/nodeunit/tsconfig.json b/nodeunit/tsconfig.json index 6b89a21c76..5dbba387ac 100644 --- a/nodeunit/tsconfig.json +++ b/nodeunit/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/noisejs/tsconfig.json b/noisejs/tsconfig.json index 83a281d203..12e08dbc3a 100644 --- a/noisejs/tsconfig.json +++ b/noisejs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/nomnom/tsconfig.json b/nomnom/tsconfig.json index 97ed810f73..08af53a375 100644 --- a/nomnom/tsconfig.json +++ b/nomnom/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/nopt/tsconfig.json b/nopt/tsconfig.json index c767a88883..c1b2f5d5ea 100644 --- a/nopt/tsconfig.json +++ b/nopt/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/notNeededPackages.json b/notNeededPackages.json index ad8e9733d2..e6fc627970 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -275,6 +275,12 @@ "typingsPackageName": "scanf", "sourceRepoURL": "https://github.com/Lellansin/node-scanf", "asOfVersion": "0.7.3" + }, + { + "libraryName": "vue-router", + "typingsPackageName": "vue-router", + "sourceRepoURL": "https://github.com/vuejs/vue-router", + "asOfVersion": "2.0.0" } ] } \ No newline at end of file diff --git a/notie/tsconfig.json b/notie/tsconfig.json index a0835b2893..74ddc340c2 100644 --- a/notie/tsconfig.json +++ b/notie/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/notify.js/tsconfig.json b/notify.js/tsconfig.json index 36cd2f3194..09f11bc13c 100644 --- a/notify.js/tsconfig.json +++ b/notify.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/notify/tsconfig.json b/notify/tsconfig.json index eca9f166b6..282bc8fe35 100644 --- a/notify/tsconfig.json +++ b/notify/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/notifyjs/tsconfig.json b/notifyjs/tsconfig.json index 81cf4cd58c..d74737e50c 100644 --- a/notifyjs/tsconfig.json +++ b/notifyjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/nouislider/tsconfig.json b/nouislider/tsconfig.json index d8502b7941..22354d1a33 100644 --- a/nouislider/tsconfig.json +++ b/nouislider/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/nouislider/v7/tsconfig.json b/nouislider/v7/tsconfig.json index 1a15cc840f..0a6e463c0e 100644 --- a/nouislider/v7/tsconfig.json +++ b/nouislider/v7/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "nouislider": ["nouislider/v7"] + "nouislider": [ + "nouislider/v7" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/nouislider/v8/tsconfig.json b/nouislider/v8/tsconfig.json index 7076693ad8..b746f14043 100644 --- a/nouislider/v8/tsconfig.json +++ b/nouislider/v8/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "nouislider": ["nouislider/v8"] + "nouislider": [ + "nouislider/v8" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/novnc/tsconfig.json b/novnc/tsconfig.json index 3c88833118..f5598a88bf 100644 --- a/novnc/tsconfig.json +++ b/novnc/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/npm/tsconfig.json b/npm/tsconfig.json index 898cd8bba1..5eb669f2f3 100644 --- a/npm/tsconfig.json +++ b/npm/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/nprogress/tsconfig.json b/nprogress/tsconfig.json index 69ec4ba4e3..cc183c5885 100644 --- a/nprogress/tsconfig.json +++ b/nprogress/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/number-is-nan/tsconfig.json b/number-is-nan/tsconfig.json index 87eb6217d4..3bc13b0278 100644 --- a/number-is-nan/tsconfig.json +++ b/number-is-nan/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -16,4 +18,4 @@ "files": [ "index.d.ts" ] -} +} \ No newline at end of file diff --git a/numbro/tsconfig.json b/numbro/tsconfig.json index 951ca8ff44..4a55ffe0ab 100644 --- a/numbro/tsconfig.json +++ b/numbro/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/numeral/tsconfig.json b/numeral/tsconfig.json index 5d51b7d6cc..482da37c2d 100644 --- a/numeral/tsconfig.json +++ b/numeral/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/nunjucks-date/tsconfig.json b/nunjucks-date/tsconfig.json index 4536cd269c..16cd14c98d 100644 --- a/nunjucks-date/tsconfig.json +++ b/nunjucks-date/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/nunjucks/tsconfig.json b/nunjucks/tsconfig.json index eec1656d8c..78cd25bb53 100644 --- a/nunjucks/tsconfig.json +++ b/nunjucks/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/nvd3/index.d.ts b/nvd3/index.d.ts index b2f4fa8aec..45e933eb82 100644 --- a/nvd3/index.d.ts +++ b/nvd3/index.d.ts @@ -3,7 +3,13 @@ // Definitions by: Peter Mitchell // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +import * as d3 from "d3"; + +export = nv; +export as namespace nv; + +declare var nv: nv.Nvd3Static; + declare namespace nv { //#region Core Interfaces @@ -3403,8 +3409,3 @@ id(value: number|string): this; log(arg: any[]): any //returns last argument } } -declare var nv : nv.Nvd3Static; - -declare module "nvd3" { - export = nv; -} diff --git a/nvd3/package.json b/nvd3/package.json deleted file mode 100644 index 5e771f4dcd..0000000000 --- a/nvd3/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/d3": "^3.5.36" - } -} diff --git a/nvd3/test/boxplot.ts b/nvd3/test/boxplot.ts index 50b6a0b0bb..530860b00f 100644 --- a/nvd3/test/boxplot.ts +++ b/nvd3/test/boxplot.ts @@ -1,5 +1,3 @@ -/// - nv.addGraph(function() { var chart = nv.models.boxPlotChart() .x(function(d) { return d.label }) diff --git a/nvd3/test/bullet.ts b/nvd3/test/bullet.ts index f985f5f47e..2e78280cb9 100644 --- a/nvd3/test/bullet.ts +++ b/nvd3/test/bullet.ts @@ -1,5 +1,3 @@ -/// - namespace nvd3_test_bullet { var width = 960, height = 55, diff --git a/nvd3/test/bulletChart.ts b/nvd3/test/bulletChart.ts index 082e508d74..1b1b0911f6 100644 --- a/nvd3/test/bulletChart.ts +++ b/nvd3/test/bulletChart.ts @@ -1,5 +1,3 @@ -/// - namespace nvd3_test_bulletChart { var width = 960, height = 80, diff --git a/nvd3/test/historicalBar.ts b/nvd3/test/historicalBar.ts index e21264ab08..6a1a179876 100644 --- a/nvd3/test/historicalBar.ts +++ b/nvd3/test/historicalBar.ts @@ -1,59 +1,57 @@ -/// +nv.addGraph({ + generate: function() { + var chart = nv.models.historicalBar(); -nv.addGraph({ - generate: function() { - var chart = nv.models.historicalBar(); + d3.select("#test1") + .datum(sinData()) + .datum(sinData()) + .transition() + .call(chart); - d3.select("#test1") - .datum(sinData()) - .datum(sinData()) - .transition() - .call(chart); + return chart; + }, + callback: function(graph) { + graph.dispatch.on('elementMouseover', function(e) { + var offsetElement = document.getElementById("chart"), + left = e.pos[0], + top = e.pos[1]; + var content = '

' + e.point.y + '

'; - return chart; - }, - callback: function(graph) { - graph.dispatch.on('elementMouseover', function(e) { - var offsetElement = document.getElementById("chart"), - left = e.pos[0], - top = e.pos[1]; - var content = '

' + e.point.y + '

'; + nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's'); + }); - nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's'); - }); - - graph.dispatch.on('elementMouseout', function(e) { - nv.tooltip.cleanup(); - }); + graph.dispatch.on('elementMouseout', function(e) { + nv.tooltip.cleanup(); + }); } -}); +}); -//Simple test data generators -function sinAndCos() { - var sin = [], - cos = []; +//Simple test data generators +function sinAndCos() { + var sin = [], + cos = []; - for (var i = 0; i < 100; i++) { - sin.push({x: i, y: Math.sin(i/10)}); - cos.push({x: i, y: .5 * Math.cos(i/10)}); - } + for (var i = 0; i < 100; i++) { + sin.push({x: i, y: Math.sin(i/10)}); + cos.push({x: i, y: .5 * Math.cos(i/10)}); + } - return [ - {values: sin, key: "Sine Wave", color: "#ff7f0e"}, - {values: cos, key: "Cosine Wave", color: "#2ca02c"} - ]; -} + return [ + {values: sin, key: "Sine Wave", color: "#ff7f0e"}, + {values: cos, key: "Cosine Wave", color: "#2ca02c"} + ]; +} -function sinData() { - var sin = []; +function sinData() { + var sin = []; - for (var i = 0; i < 100; i++) { - sin.push({x: i, y: Math.sin(i/10)}); - } + for (var i = 0; i < 100; i++) { + sin.push({x: i, y: Math.sin(i/10)}); + } - return [{ - values: sin, - key: "Sine Wave", - color: "#ff7f0e" - }]; -} \ No newline at end of file + return [{ + values: sin, + key: "Sine Wave", + color: "#ff7f0e" + }]; +} \ No newline at end of file diff --git a/nvd3/test/historicalBarChart.ts b/nvd3/test/historicalBarChart.ts index f4e8595913..1facd773a2 100644 --- a/nvd3/test/historicalBarChart.ts +++ b/nvd3/test/historicalBarChart.ts @@ -1,165 +1,163 @@ -/// +var data = [{ + values : [] + }]; -var data = [{ - values : [] - }]; - - var i, x; - var gap = false; - var prevVal = 3000; - var tickCount = 100; - var probEnterGap = 0.1; - var probExitGap = 0.2; - var barTimespan = 30 * 60; // thirty minutes in seconds - var startOfTime = 1425096000; - for (i = 0; i < tickCount; i++) { - x = startOfTime + i * barTimespan; - if (!gap) { - if (Math.random() > probEnterGap) { - prevVal += (Math.random() - 0.5) * 500; - if (prevVal <= 0) { - prevVal = Math.random() * 100; - } - data[0].values.push({x: x * 1000, y: prevVal}); - } - else { - gap = true; - } - } - else { - if (Math.random() < probExitGap) { - gap = false; - } - } - } - - var chart : nv.HistoricalBarChart; - - var halfBarXMin = data[0].values[0].x - barTimespan / 2 * 1000; - var halfBarXMax = data[0].values[data[0].values.length-1].x + barTimespan / 2 * 1000; - - function renderChart(location, meaning) { - nv.addGraph(function() { - chart = nv.models.historicalBarChart(); - chart - .xScale(d3.time.scale()) // use a time scale instead of plain numbers in order to get nice round default values in the axis - .color(['#68c']) - .forceX([halfBarXMin, halfBarXMax]) // fix half-bar problem on the first and last bars - .useInteractiveGuideline(true) // check out the css that turns the guideline into this nice thing - .margin({"left": 80, "right": 50, "top": 20, "bottom": 30}) - .duration(0) - ; - - var tickMultiFormat = d3.time.format.multi([ - ["%-I:%M%p", function(d) { return d.getMinutes(); }], // not the beginning of the hour - ["%-I%p", function(d) { return d.getHours(); }], // not midnight - ["%b %-d", function(d) { return d.getDate() != 1; }], // not the first of the month - ["%b %-d", function(d) { return d.getMonth(); }], // not Jan 1st - ["%Y", function() { return true; }] - ]); - chart.xAxis - .showMaxMin(false) - .tickPadding(10) - .tickFormat(function (d) { return tickMultiFormat(new Date(d)); }) - ; - - chart.yAxis - .showMaxMin(false) - .tickFormat(d3.format(",.0f")) - ; - - var svgElem = d3.select(location); - svgElem - .datum(data) - .transition() - .call(chart); - - // make our own x-axis tick marks because NVD3 doesn't provide any - var tickY2 = chart.yAxis.scale().range()[1]; - var lineElems = svgElem - .select('.nv-x.nv-axis.nvd3-svg') - .select('.nvd3.nv-wrap.nv-axis') - .select('g') - .selectAll('.tick') - .data(chart.xScale().ticks()) - .append('line') - .attr('class', 'x-axis-tick-mark') - .attr('x2', 0) - .attr('y1', tickY2 + 4) - .attr('y2', tickY2) - .attr('stroke-width', 1) - ; - - // set up the tooltip to display full dates - var tsFormat = d3.time.format('%b %-d, %Y %I:%M%p'); - var contentGenerator = chart.interactiveLayer.tooltip.contentGenerator(); - var tooltip = chart.interactiveLayer.tooltip; - tooltip.contentGenerator(function (d) { d.value = d.series[0].data.x; return contentGenerator(d); }); - tooltip.headerFormatter(function (d) { return tsFormat(new Date(d)); }); - - // common stuff for the sections below - var xScale = chart.xScale(); - var xPixelFirstBar = xScale(data[0].values[0].x); - var xPixelSecondBar = xScale(data[0].values[0].x + barTimespan * 1000); - var barWidth = xPixelSecondBar - xPixelFirstBar; // number of pixels representing time delta per bar - - // fix the bar widths so they don't overlap when there are gaps - function fixBarWidths(barSpacingFraction) { - svgElem - .selectAll('.nv-bars') - .selectAll('rect') - .attr('width', (1 - barSpacingFraction) * barWidth) - .attr('transform', function(d, i) { - var deltaX = xScale(data[0].values[i].x) - xPixelFirstBar; - deltaX += barSpacingFraction / 2 * barWidth; - return 'translate(' + deltaX + ', 0)'; - }) - ; - } - - /* - If you're representing sample measurements spaced a certain time apart, the tick marks should - be in the middle of the bars and some spacing between bars is recommended to aid with interpretation. - On the other hand, if you want to represent a quantity measured over a span of time (one bar), you're - better off placing the ticks on the edge of the bar and leaving no gap in between bars. - */ - function shiftXAxis() { - var xAxisElem = svgElem.select('.nv-axis.nv-x'); - var transform = xAxisElem.attr('transform'); - var xShift = -barWidth/2; - transform = transform.replace('0,', xShift + ','); - xAxisElem.attr('transform', transform); - } - - if (meaning === 'instant') { - fixBarWidths(0.2); - } - else if (meaning === 'timespan') { - fixBarWidths(0.0); - shiftXAxis(); - } - - return chart; - }); - } - - renderChart('#test1', 'instant'); - renderChart('#test2', 'timespan'); - - window.setTimeout(function() { - window.setTimeout(function() { - document.getElementById('sc-one').style.display = 'block'; - document.getElementById('sc-two').style.display = 'none'; - }, 0); - }, 0); - - function switchChartStyle(style) { - if (style === 'instant') { - document.getElementById('sc-one').style.display = 'block'; - document.getElementById('sc-two').style.display = 'none'; - } - else if (style === 'timespan') { - document.getElementById('sc-one').style.display = 'none'; - document.getElementById('sc-two').style.display = 'block'; - } - } + var i, x; + var gap = false; + var prevVal = 3000; + var tickCount = 100; + var probEnterGap = 0.1; + var probExitGap = 0.2; + var barTimespan = 30 * 60; // thirty minutes in seconds + var startOfTime = 1425096000; + for (i = 0; i < tickCount; i++) { + x = startOfTime + i * barTimespan; + if (!gap) { + if (Math.random() > probEnterGap) { + prevVal += (Math.random() - 0.5) * 500; + if (prevVal <= 0) { + prevVal = Math.random() * 100; + } + data[0].values.push({x: x * 1000, y: prevVal}); + } + else { + gap = true; + } + } + else { + if (Math.random() < probExitGap) { + gap = false; + } + } + } + + var chart : nv.HistoricalBarChart; + + var halfBarXMin = data[0].values[0].x - barTimespan / 2 * 1000; + var halfBarXMax = data[0].values[data[0].values.length-1].x + barTimespan / 2 * 1000; + + function renderChart(location, meaning) { + nv.addGraph(function() { + chart = nv.models.historicalBarChart(); + chart + .xScale(d3.time.scale()) // use a time scale instead of plain numbers in order to get nice round default values in the axis + .color(['#68c']) + .forceX([halfBarXMin, halfBarXMax]) // fix half-bar problem on the first and last bars + .useInteractiveGuideline(true) // check out the css that turns the guideline into this nice thing + .margin({"left": 80, "right": 50, "top": 20, "bottom": 30}) + .duration(0) + ; + + var tickMultiFormat = d3.time.format.multi([ + ["%-I:%M%p", function(d) { return d.getMinutes(); }], // not the beginning of the hour + ["%-I%p", function(d) { return d.getHours(); }], // not midnight + ["%b %-d", function(d) { return d.getDate() != 1; }], // not the first of the month + ["%b %-d", function(d) { return d.getMonth(); }], // not Jan 1st + ["%Y", function() { return true; }] + ]); + chart.xAxis + .showMaxMin(false) + .tickPadding(10) + .tickFormat(function (d) { return tickMultiFormat(new Date(d)); }) + ; + + chart.yAxis + .showMaxMin(false) + .tickFormat(d3.format(",.0f")) + ; + + var svgElem = d3.select(location); + svgElem + .datum(data) + .transition() + .call(chart); + + // make our own x-axis tick marks because NVD3 doesn't provide any + var tickY2 = chart.yAxis.scale().range()[1]; + var lineElems = svgElem + .select('.nv-x.nv-axis.nvd3-svg') + .select('.nvd3.nv-wrap.nv-axis') + .select('g') + .selectAll('.tick') + .data(chart.xScale().ticks()) + .append('line') + .attr('class', 'x-axis-tick-mark') + .attr('x2', 0) + .attr('y1', tickY2 + 4) + .attr('y2', tickY2) + .attr('stroke-width', 1) + ; + + // set up the tooltip to display full dates + var tsFormat = d3.time.format('%b %-d, %Y %I:%M%p'); + var contentGenerator = chart.interactiveLayer.tooltip.contentGenerator(); + var tooltip = chart.interactiveLayer.tooltip; + tooltip.contentGenerator(function (d) { d.value = d.series[0].data.x; return contentGenerator(d); }); + tooltip.headerFormatter(function (d) { return tsFormat(new Date(d)); }); + + // common stuff for the sections below + var xScale = chart.xScale(); + var xPixelFirstBar = xScale(data[0].values[0].x); + var xPixelSecondBar = xScale(data[0].values[0].x + barTimespan * 1000); + var barWidth = xPixelSecondBar - xPixelFirstBar; // number of pixels representing time delta per bar + + // fix the bar widths so they don't overlap when there are gaps + function fixBarWidths(barSpacingFraction) { + svgElem + .selectAll('.nv-bars') + .selectAll('rect') + .attr('width', (1 - barSpacingFraction) * barWidth) + .attr('transform', function(d, i) { + var deltaX = xScale(data[0].values[i].x) - xPixelFirstBar; + deltaX += barSpacingFraction / 2 * barWidth; + return 'translate(' + deltaX + ', 0)'; + }) + ; + } + + /* + If you're representing sample measurements spaced a certain time apart, the tick marks should + be in the middle of the bars and some spacing between bars is recommended to aid with interpretation. + On the other hand, if you want to represent a quantity measured over a span of time (one bar), you're + better off placing the ticks on the edge of the bar and leaving no gap in between bars. + */ + function shiftXAxis() { + var xAxisElem = svgElem.select('.nv-axis.nv-x'); + var transform = xAxisElem.attr('transform'); + var xShift = -barWidth/2; + transform = transform.replace('0,', xShift + ','); + xAxisElem.attr('transform', transform); + } + + if (meaning === 'instant') { + fixBarWidths(0.2); + } + else if (meaning === 'timespan') { + fixBarWidths(0.0); + shiftXAxis(); + } + + return chart; + }); + } + + renderChart('#test1', 'instant'); + renderChart('#test2', 'timespan'); + + window.setTimeout(function() { + window.setTimeout(function() { + document.getElementById('sc-one').style.display = 'block'; + document.getElementById('sc-two').style.display = 'none'; + }, 0); + }, 0); + + function switchChartStyle(style) { + if (style === 'instant') { + document.getElementById('sc-one').style.display = 'block'; + document.getElementById('sc-two').style.display = 'none'; + } + else if (style === 'timespan') { + document.getElementById('sc-one').style.display = 'none'; + document.getElementById('sc-two').style.display = 'block'; + } + } diff --git a/nvd3/test/legend.ts b/nvd3/test/legend.ts index 1329169de4..d518bc78c6 100644 --- a/nvd3/test/legend.ts +++ b/nvd3/test/legend.ts @@ -1,5 +1,3 @@ -/// - namespace nvd3_test_legend { var width = 500, height = 20; diff --git a/nvd3/test/ohlc.ts b/nvd3/test/ohlc.ts index 535c319a1a..2d352af2ca 100644 --- a/nvd3/test/ohlc.ts +++ b/nvd3/test/ohlc.ts @@ -1,5 +1,3 @@ -/// - namespace nvd3_test_ohlc { var data = [{ values: [ diff --git a/nvd3/test/ohlcChart.ts b/nvd3/test/ohlcChart.ts index e943397696..cfd454c1d5 100644 --- a/nvd3/test/ohlcChart.ts +++ b/nvd3/test/ohlcChart.ts @@ -1,5 +1,3 @@ -/// - namespace nvd3_test_ohlcChart { var data = [{ values: [ diff --git a/nvd3/test/parallelCoordinates.ts b/nvd3/test/parallelCoordinates.ts index de9501a242..bf6874724f 100644 --- a/nvd3/test/parallelCoordinates.ts +++ b/nvd3/test/parallelCoordinates.ts @@ -1,5 +1,3 @@ -/// - namespace nvd3_test_parallelCoordinates { var chart; nv.addGraph(function () { diff --git a/nvd3/test/parallelCoordinatesChart.ts b/nvd3/test/parallelCoordinatesChart.ts index 77191d712a..4b8e01a561 100644 --- a/nvd3/test/parallelCoordinatesChart.ts +++ b/nvd3/test/parallelCoordinatesChart.ts @@ -1,5 +1,3 @@ -/// - namespace nvd3_test_parallelCoordinatesChart { var chart; function resetBrush() { diff --git a/nvd3/test/pie.ts b/nvd3/test/pie.ts index ae79f81332..d193a11a69 100644 --- a/nvd3/test/pie.ts +++ b/nvd3/test/pie.ts @@ -1,5 +1,3 @@ -/// - namespace nvd3_test_pie { var testdata = [ diff --git a/nvd3/test/pieChart.ts b/nvd3/test/pieChart.ts index c7dc623bcd..402744c529 100644 --- a/nvd3/test/pieChart.ts +++ b/nvd3/test/pieChart.ts @@ -1,5 +1,3 @@ -/// - namespace nvd3_test_pieChart { var testdata = [ diff --git a/nvd3/test/tooltip.ts b/nvd3/test/tooltip.ts index 023645b6fa..ebb2053039 100644 --- a/nvd3/test/tooltip.ts +++ b/nvd3/test/tooltip.ts @@ -1,5 +1,3 @@ -/// - namespace nvd3_test_tooltip { var width = 500, height = 20; diff --git a/nvd3/tsconfig.json b/nvd3/tsconfig.json index dfd13f4b81..bd0c65ea17 100644 --- a/nvd3/tsconfig.json +++ b/nvd3/tsconfig.json @@ -1,10 +1,21 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "paths": { + "d3": ["d3/v3"] + }, "noEmit": true, "forceConsistentCasingInFileNames": true }, diff --git a/nw.gui/tsconfig.json b/nw.gui/tsconfig.json index d59063a0b2..5728b8331b 100644 --- a/nw.gui/tsconfig.json +++ b/nw.gui/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/nw.js/tsconfig.json b/nw.js/tsconfig.json index 38723f5007..6dd8ccc16c 100644 --- a/nw.js/tsconfig.json +++ b/nw.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/o.js/tsconfig.json b/o.js/tsconfig.json index e91ce0640f..a72850afef 100644 --- a/o.js/tsconfig.json +++ b/o.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/oauth.js/tsconfig.json b/oauth.js/tsconfig.json index aef34a0fb2..28a466b5f9 100644 --- a/oauth.js/tsconfig.json +++ b/oauth.js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/oauth2-server/tsconfig.json b/oauth2-server/tsconfig.json index 1b601bb7b3..0345961931 100644 --- a/oauth2-server/tsconfig.json +++ b/oauth2-server/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/oauth2orize/index.d.ts b/oauth2orize/index.d.ts index b36272dee6..2c4b0a7601 100644 --- a/oauth2orize/index.d.ts +++ b/oauth2orize/index.d.ts @@ -62,17 +62,35 @@ export namespace exchange { function code(options: Options, issue: (client: any, code: string, redirectURI: string, issued: IssuedFunction) => void): MiddlewareFunction; function code(issue: (client: any, code: string, redirectURI: string, issued: IssuedFunction) => void): MiddlewareFunction; + // arity == 5; issue(client, scope, req.body, req.authInfo, issued); + function clientCredentials(options: Options, issue: (client: any, scope: string[], body: any, authInfo: any, issued: IssuedFunction) => void): MiddlewareFunction; + // arity == 4; issue(client, scope, req.body, issued); + function clientCredentials(options: Options, issue: (client: any, scope: string[], body: any, issued: IssuedFunction) => void): MiddlewareFunction; + // arity == 3; issue(client, scope, issued); function clientCredentials(options: Options, issue: (client: any, scope: string[], issued: IssuedFunction) => void): MiddlewareFunction; + // arity == 2; issue(client, issued); function clientCredentials(options: Options, issue: (client: any, issued: IssuedFunction) => void): MiddlewareFunction; function clientCredentials(issue: (client: any, scope: string[], issued: IssuedFunction) => void): MiddlewareFunction; function clientCredentials(issue: (client: any, issued: IssuedFunction) => void): MiddlewareFunction; + // arity == 7; issue(client, username, passwd, scope, req.body, req.authInfo, issued); + function password(options: Options, issue: (client: any, username: string, password: string, scope: string[], body: any, authInfo: any, issued: IssuedFunction) => void): MiddlewareFunction; + // arity == 6; issue(client, username, passwd, scope, req.body, issued); + function password(options: Options, issue: (client: any, username: string, password: string, scope: string[], body: any, issued: IssuedFunction) => void): MiddlewareFunction; + // arity == 5; issue(client, username, passwd, scope, issued); function password(options: Options, issue: (client: any, username: string, password: string, scope: string[], issued: IssuedFunction) => void): MiddlewareFunction; + // arity == 4; issue(client, username, passwd, issued); function password(options: Options, issue: (client: any, username: string, password: string, issued: IssuedFunction) => void): MiddlewareFunction; function password(issue: (client: any, username: string, password: string, scope: string[], issued: IssuedFunction) => void): MiddlewareFunction; function password(issue: (client: any, username: string, password: string, issued: IssuedFunction) => void): MiddlewareFunction; + // arity == 6; issue(client, refreshToken, scope, req.body, req.authInfo, issued); + function refreshToken(options: Options, issue: (client: any, refreshToken: string, scope: string[], body: any, authInfo: any, issued: IssuedFunction) => void): MiddlewareFunction; + // arity == 5; issue(client, refreshToken, scope, req.body, issued); + function refreshToken(options: Options, issue: (client: any, refreshToken: string, scope: string[], body: any, issued: IssuedFunction) => void): MiddlewareFunction; + // arity == 4; issue(client, refreshToken, scope, issued); function refreshToken(options: Options, issue: (client: any, refreshToken: string, scope: string[], issued: IssuedFunction) => void): MiddlewareFunction; + // arity == 3; issue(client, refreshToken, issued); function refreshToken(options: Options, issue: (client: any, refreshToken: string, issued: IssuedFunction) => void): MiddlewareFunction; function refreshToken(issue: (client: any, refreshToken: string, scope: string[], issued: IssuedFunction) => void): MiddlewareFunction; function refreshToken(issue: (client: any, refreshToken: string, issued: IssuedFunction) => void): MiddlewareFunction; diff --git a/oauth2orize/tsconfig.json b/oauth2orize/tsconfig.json index 82028341b5..ba482c2e81 100644 --- a/oauth2orize/tsconfig.json +++ b/oauth2orize/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "module": "commonjs", "moduleResolution": "node", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/obelisk.js/tsconfig.json b/obelisk.js/tsconfig.json index b57a295ba5..5cfe359001 100644 --- a/obelisk.js/tsconfig.json +++ b/obelisk.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/object-assign/tsconfig.json b/object-assign/tsconfig.json index 443ee02ef7..152acb7e02 100644 --- a/object-assign/tsconfig.json +++ b/object-assign/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/object-diff/tsconfig.json b/object-diff/tsconfig.json index dbfbe61b8c..bbec24931c 100644 --- a/object-diff/tsconfig.json +++ b/object-diff/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/object-hash/tsconfig.json b/object-hash/tsconfig.json index 0cdf894fce..8fa75bf05e 100644 --- a/object-hash/tsconfig.json +++ b/object-hash/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/object-path/tsconfig.json b/object-path/tsconfig.json index a0ccff6475..bd115ef4c2 100644 --- a/object-path/tsconfig.json +++ b/object-path/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/object-refs/tsconfig.json b/object-refs/tsconfig.json index 3f23d50c7e..f4106c84af 100644 --- a/object-refs/tsconfig.json +++ b/object-refs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/oblo-util/tsconfig.json b/oblo-util/tsconfig.json index a5ecc7762e..a08661b4aa 100644 --- a/oblo-util/tsconfig.json +++ b/oblo-util/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/oboe/tsconfig.json b/oboe/tsconfig.json index 0a750a0389..6f30545b15 100644 --- a/oboe/tsconfig.json +++ b/oboe/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/observe-js/tsconfig.json b/observe-js/tsconfig.json index ac8021088d..eb2947c5e0 100644 --- a/observe-js/tsconfig.json +++ b/observe-js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/oclazyload/tsconfig.json b/oclazyload/tsconfig.json index 19ff83d60d..7c70c7607d 100644 --- a/oclazyload/tsconfig.json +++ b/oclazyload/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/office-js/tsconfig.json b/office-js/tsconfig.json index 44655ed535..3e113745ef 100644 --- a/office-js/tsconfig.json +++ b/office-js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/offline-js/tsconfig.json b/offline-js/tsconfig.json index 8cefbddddc..032b471c22 100644 --- a/offline-js/tsconfig.json +++ b/offline-js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/oibackoff/tsconfig.json b/oibackoff/tsconfig.json index 97e0b3e790..1407693c66 100644 --- a/oibackoff/tsconfig.json +++ b/oibackoff/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/oidc-token-manager/tsconfig.json b/oidc-token-manager/tsconfig.json index a362fb3cc9..6e08824c8e 100644 --- a/oidc-token-manager/tsconfig.json +++ b/oidc-token-manager/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/on-finished/tsconfig.json b/on-finished/tsconfig.json index bb1de33359..eef95ef71e 100644 --- a/on-finished/tsconfig.json +++ b/on-finished/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/on-headers/tsconfig.json b/on-headers/tsconfig.json index 561f42ce6e..0426c92551 100644 --- a/on-headers/tsconfig.json +++ b/on-headers/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/once/tsconfig.json b/once/tsconfig.json index 07df1b99ac..eb26ee77e7 100644 --- a/once/tsconfig.json +++ b/once/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/onoff/tsconfig.json b/onoff/tsconfig.json index eed4d6b3ff..4624eff8b7 100644 --- a/onoff/tsconfig.json +++ b/onoff/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/onsenui/index.d.ts b/onsenui/index.d.ts index 41b853250c..efe1be081a 100644 --- a/onsenui/index.d.ts +++ b/onsenui/index.d.ts @@ -464,6 +464,7 @@ interface ModalView { interface navigatorOptions { animation?: string; onTransitionEnd?: any; + [key: string]: any; //for options } /** @@ -806,7 +807,7 @@ interface onsStatic { * @return {Promise} Promise object that resolves to the alert dialog component object * @description Create a alert dialog instance from a template */ - createAlertDialog(page: string): any; + createAlertDialog(page: string, options?: any): any; /** * @param {String} page Page name. Can be either an HTML file or an containing a component * @param {Object} [options] Parameter object @@ -814,7 +815,7 @@ interface onsStatic { * @return {Promise} Promise object that resolves to the dialog component object * @description Create a dialog instance from a template */ - createDialog(page: string): any; + createDialog(page: string, options?: any): any; /** * @param {String} page Page name. Can be either an HTML file or an containing a component * @param {Object} [options] Parameter object @@ -822,7 +823,7 @@ interface onsStatic { * @return {Promise} Promise object that resolves to the popover component object * @description Create a popover instance from a template */ - createPopover(page: string): any; + createPopover(page: string, options?: any): any; /** * @description Utility methods to create different kinds of alert dialogs. There are three methods available: alert, confirm and prompt diff --git a/onsenui/tsconfig.json b/onsenui/tsconfig.json index 0e3ac508b3..a84d7236de 100644 --- a/onsenui/tsconfig.json +++ b/onsenui/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/open/tsconfig.json b/open/tsconfig.json index 153313f1c0..68db8d5149 100644 --- a/open/tsconfig.json +++ b/open/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/openfin/index.d.ts b/openfin/index.d.ts new file mode 100644 index 0000000000..2c1cfd648e --- /dev/null +++ b/openfin/index.d.ts @@ -0,0 +1,1581 @@ +// Type definitions for OpenFin API 16.0 +// Project: https://openfin.co/ +// Definitions by: Chris Barker +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// based on v6.49.16.16 +// see https://openfin.co/support/technical-faq/#what-do-the-numbers-in-the-runtime-version-mean + +/** + * JavaScript API + * The JavaScript API allows you to create an HTML/JavaScript application that has access to the native windowing environment, can communicate with other applications and has access to sandboxed system-level features. + * + * API Ready + * When using the OpenFin API, it is important to ensure that it has been fully loaded before making any API calls. To verify that the API is in fact ready, be sure to make any API calls either from within the fin.desktop.main() method or explicitly after it has returned. This avoids the situation of trying to access methods that are not yet fully injected. + * + * Overview + * When running within the OpenFin Runtime your web applications have access to the "fin" namespace and all the modules within the API without the need to include additional source files. You can treat the "fin" namespace as you would the "window", "navigator" or "document" objects. + **/ +declare namespace fin { + const desktop: OpenFinDesktop; + + interface OpenFinDesktop { + main(f: () => any): void; + Application: OpenFinApplicationStatic; + ExternalApp: OpenFinExternalApplicationStatic; + InterApplicationBus: OpenFinInterApplicationBus; + Notification: OpenFinNotificationStatic; + System: OpenFinSystem; + Window: OpenFinWindowStatic; + } + + interface OpenFinApplicationStatic { + /** + * Creates a new Application. + * An object representing an application. Allows the developer to create, execute, show/close an application as well as listen to application events. + */ + new (options: ApplicationOptions, callback?: (successObj: { httpResponseCode: number }) => void, errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): OpenFinApplication; + /** + * Returns an Application object that represents an existing application. + */ + getCurrent(): OpenFinApplication; + /** + * Returns an Application object that represents an existing application. + */ + wrap(uuid: string): OpenFinApplication; + } + + /** + * Application + * An object representing an application.Allows the developer to create, execute, show / close an application as well as listen to application events. + */ + interface OpenFinApplication { + /** + * Returns an instance of the main Window of the application + */ + getWindow(): OpenFinWindow; + /** + * Registers an event listener on the specified event. + */ + addEventListener(type: OpenFinApplicationEventType, listener: (event: ApplicationBaseEvent | TrayIconClickedEvent | WindowEvent | WindowAlertRequestedEvent | WindowAuthRequested | WindowNavigationRejectedEvent | WindowEndLoadEvent) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Closes the application and any child windows created by the application. + */ + close(force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of wrapped fin.desktop.Windows for each of the applications child windows. + */ + getChildWindows(callback?: (children: OpenFinWindow[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of active window groups for all of the application's windows. Each group is represented as an array of wrapped fin.desktop.Windows. + */ + getGroups(callback?: (groups: OpenFinWindow[][]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the JSON manifest that was used to create the application. Invokes the error callback if the application was not created from a manifest. + */ + getManifest(callback?: (manifest: any) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves UUID of the application that launches this application. Invokes the error callback if the application was created from a manifest. + */ + getParentUuid(callback?: (uuid: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves current configuration of application's shortcuts. + */ + getShortcuts(callback?: (config: ShortCutConfig) => void, errorCallback?: (reason: string) => void): void; + /** + * Determines if the application is currently running. + */ + isRunning(callback?: (running: boolean) => void, errorCallback?: (reason: string) => void): void; + /** + * Passes in custom data that will be relayed to the RVM + */ + registerCustomData(data: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Removes a previously registered event listener from the specified event. + */ + removeEventListener(type: OpenFinApplicationEventType, previouslyRegisteredListener: (event: ApplicationBaseEvent | TrayIconClickedEvent | WindowEvent | WindowAlertRequestedEvent | WindowAuthRequested | WindowNavigationRejectedEvent | WindowEndLoadEvent) => any, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Removes the applications icon from the tray. + */ + removeTrayIcon(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Restarts the application. + */ + restart(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Runs the application. When the application is created, run must be called. + */ + run(callback?: (successObj: SuccessObj) => void, errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): void; + /** + * Tells the rvm to relaunch the main application once upon a complete shutdown + */ + scheduleRestart(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Sets new shortcut configuration for current application. Application has to be launched with a manifest and has to have shortcut configuration (icon url, name, etc.) in its manifest to be able to change shortcut states. + */ + setShortcuts(config: ShortCutConfig, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Adds a customizable icon in the system tray and notifies the application when clicked. + */ + setTrayIcon(iconUrl: string, listener: (clickInfo: TrayIconClickedEvent) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Closes the application by terminating its process. + */ + terminate(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Waits for a hanging application. This method can be called in response to an application "not-responding" to allow the application to continue and to generate another "not-responding" message after a certain period of time. + */ + wait(callback?: () => void, errorCallback?: (reason: string) => void): void; + } + + interface ShortCutConfig { + /** + * application has a shortcut on the desktop + */ + desktop?: boolean; + /** + * application has no shortcut in the start menu + */ + startMenu?: boolean; + /** + * application will be launched on system startup + */ + systemStartup?: boolean; + } + + interface SuccessObj { + httpResponseCode: number; + } + + interface NetworkErrorInfo extends ErrorInfo { + networkErrorCode: number; + } + + interface ErrorInfo { + stack: string; + message: string; + } + + interface ApplicationOptions { + /** + * The name of the application. + */ + name?: string; + /** + * The url to the application. + */ + url?: string; + /** + * The UUID of the application, unique within the set of all other applications running in the OpenFin Runtime. name and uuid must match. + */ + uuid?: string; + /** + * Enable Flash at the application level. Default: false. + */ + plugins?: boolean; + /** + * The options of the main window of the application. + */ + mainWindowOptions?: WindowOptions; + } + + interface WindowOptions { + /** + * Enable keyboard shortcuts for devtools and zoom. Default: false for both. + */ + accelerator?: { + devtools?: boolean, + zoom?: boolean + }; + /** + * A flag to always position the window at the top of the window stack. Default: false. + */ + alwaysOnTop?: boolean; + /** + * A flag to automatically show the Window when it is created. Default: false. + */ + autoShow?: boolean; + /** + * A flag to show the context menu when right-clicking on a window. Gives access to the Developer Console for the Window. Default: true + */ + contextMenu?: boolean; + /** + * This defines and applies rounded corners for a frameless window. Default for both width and height: 0. + */ + cornerRounding?: { + width?: number; + height?: number; + }; + /** + * A field that the user can attach serializable data to to be ferried around with the window options. Default: ''. + */ + customData?: any; + /** + * Specifies that the window will be positioned in the center of the primary monitor when loaded for the first time on a machine. When the window corresponding to that id is loaded again, the position from before the window was closed is used. This option overrides defaultLeft and defaultTop. Default: false. + */ + defaultCentered?: boolean; + /** + * The default height of the window. Specifies the height of the window when loaded for the first time on a machine. When the window corresponding to that id is loaded again, the height is taken to be the last height of the window before it was closed. Default: 500. + */ + defaultHeight?: number; + /** + * The default left position of the window. Specifies the position of the left of the window when loaded for the first time on a machine. When the window corresponding to that id is loaded again, the value of left is taken to be the last value before the window was closed. Default: 100. + */ + defaultWidth?: number; + /** + * The default top position of the window. Specifies the position of the top of the window when loaded for the first time on a machine. When the window corresponding to that id is loaded again, the value of top is taken to be the last value before the window was closed. Default: 100. + */ + defaultTop?: number; + /** + * The default width of the window. Specifies the width of the window when loaded for the first time on a machine. When the window corresponding to that id is loaded again, the width is taken to be the last width of the window before it was closed. Default: 800. + */ + defaultLeft?: number; + /** + * A flag to show the frame. Default: true. + */ + frame?: boolean; + /** + * A flag to allow a window to be hidden when the close button is clicked.Default: false. + */ + hideOnClose?: boolean; + /** + * A URL for the icon to be shown in the window title bar and the taskbar.Default: The parent application's applicationIcon. + */ + icon?: string; + /** + * The maximum height of a window.Will default to the OS defined value if set to - 1. Default: -1. + */ + maxHeight?: number; + /** + * A flag that lets the window be maximized.Default: true. + */ + maximizable?: boolean; + /** + * The maximum width of a window.Will default to the OS defined value if set to - 1. Default: -1. + */ + maxWidth?: number; + /** + * The minimum height of a window.Default: 0. + */ + minHeight?: number; + /** + * A flag that lets the window be minimized.Default: true. + */ + minimizable?: boolean; + /** + * The minimum width of a window.Default: 0. + */ + minWidth?: number; + /** + * The name for the window which must be unique within the context of the invoking Application. + */ + name?: string; + /** + * A flag that specifies how transparent the window will be.This value is clamped between 0.0 and 1.0.Default: 1.0. + */ + opacity?: number; + /** + * A flag to drop to allow the user to resize the window.Default: true. + */ + resizable?: boolean; + /** + * Defines a region in pixels that will respond to user mouse interaction for resizing a frameless window. + */ + resizeRegion?: { + /** + * The size in pixels (Default: 2), + */ + size?: number; + /** + * The size in pixels of an additional + * square resizable region located at the + * bottom right corner of a + * frameless window. (Default: 4) + */ + bottomRightCorner?: number; + }; + /** + * A flag to show the Window's icon in the taskbar. Default: true. + */ + showTaskbarIcon?: boolean; + /** + * A flag to cache the location of the window or not. Default: true. + */ + saveWindowState?: boolean; + /** + * Specify a taskbar group for the window. Default: app's uuid. + */ + taskbarIconGroup?: string; + /** + * A string that sets the window to be "minimized", "maximized", or "normal" on creation. Default: "normal". + */ + state?: string; + /** + * The URL of the window. Default: "about:blank". + */ + url?: string; + /** + * When set to false, the window will render before the "load" event is fired on the content's window. Caution, when false you will see an initial empty white window. Default: true. + */ + waitForPageLoad?: boolean; + } + + /** + * Clipboard + * Clipboard API allows reading and writting to the clipboard in multiple formats. + */ + interface OpenFinClipboard { + /** + * Reads available formats for the clipboard type + */ + availableFormats(type: string | null, callback?: (formats: string[]) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Reads available formats for the clipboard type + */ + readHtml(type: string | null, callback?: (html: string) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Read the content of the clipboard as Rtf + */ + readRtf(type: string | null, callback?: (rtf: string) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Read the content of the clipboard as plain text + */ + readText(type: string | null, callback?: (text: string) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Writes data into the clipboard + */ + write(data: any, type: string | null, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Writes data into the clipboard as Html + */ + writeHtml(data: string, type: string | null, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Writes data into the clipboard as Rtf + */ + writeRtf(data: string, type: string | null, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Writes data into the clipboard as plain text + */ + writeText(data: string, type: string | null, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + } + + interface OpenFinExternalApplicationStatic { + /** + * Returns an External Application object that represents an existing external application. + */ + wrap(uuid: string): OpenFinExternalApplication; + } + /** + * ExternalApplication + * An object representing an application. Allows the developer to create, execute, show and close an application, as well as listen to application events. + */ + interface OpenFinExternalApplication { + /** + * Registers an event listener on the specified event. + */ + addEventListener(type: OpenFinExternalApplicationEventType, listener: () => void, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Removes a previously registered event listener from the specified event. + */ + removeEventListener(type: OpenFinExternalApplicationEventType, listener: () => void, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + } + + /** + * InterApplicationBus + * A messaging bus that allows for pub/sub messaging between different applications. + */ + interface OpenFinInterApplicationBus { + /** + * Adds a listener that gets called when applications subscribe to the current application's messages. + */ + addSubscribeListener(listener: (uuid: string, topic: string, name: string) => void): void; + /** + * Adds a listener that gets called when applications unsubscribe to the current application's messages. + */ + addUnsubscribeListener(listener: (uuid: string, topic: string, name: string) => void): void; + /** + * Removes a previously registered subscribe listener. + */ + removeSubscribeListener(listener: (uuid: string, topic: string, name: string) => void): void; + /** + * Removes a previously registered unsubscribe listener. + */ + removeUnsubscribeListener(listener: (uuid: string, topic: string, name: string) => void): void; + /** + * Publishes a message to all applications running on OpenFin Runtime that are subscribed to the specified topic. + */ + publish(topic: string, message: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Sends a message to a specific application on a specific topic. + */ + send(destinationUuid: string, name: string, topic: string, message: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + send(destinationUuid: string, topic: string, message: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Subscribes to messages from the specified application on the specified topic. If the subscription is for a uuid, [name], topic combination that has already been published to upon subscription you will receive the last 20 missed messages in the order they were published. + */ + subscribe(senderUuid: string, name: string, topic: string, listener: (message: any, uuid: string, name: string) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + subscribe(senderUuid: string, topic: string, listener: (message: any, uuid: string, name: string) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Unsubscribes to messages from the specified application on the specified topic. + */ + unsubscribe(senderUuid: string, name: string, topic: string, listener: (message: any, uuid: string, name: string) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + unsubscribe(senderUuid: string, topic: string, listener: (message: any, uuid: string, name: string) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + } + + interface OpenFinNotificationStatic { + /** + * ctor + */ + new (options: NotificationOptions, callback?: () => void, errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): OpenFinNotification; + /** + * Gets an instance of the current notification. For use within a notification window to close the window or send a message back to its parent application. + */ + getCurrent(): OpenFinNotification; + } + + /** + * Notification + * Notification represents a window on OpenFin Runtime which is shown briefly to the user on the bottom-right corner of the primary monitor. A notification is typically used to alert the user of some important event which requires his or her attention. Notifications are a child or your application that are controlled by the runtime. + */ + interface OpenFinNotification { + /** + * Closes the notification. + */ + close(callback?: () => void): void; + /** + * Sends a message to the notification. + */ + sendMessage(message: any, callback?: () => void): void; + /** + * Sends a message from the notification to the application that created the notification. The message is handled by the notification's onMessage callback. + */ + sendMessageToApplication(message: any, callback?: () => void): void; + } + + interface NotificationOptions { + /** + * A boolean that will force dismissal even if the mouse is hovering over the notification + */ + ignoreMouseOver?: boolean; + /** + * A message of any primitive or composite-primitive type to be passed to the notification upon creation. + */ + message?: any; + /** + * The timeout for displaying a notification.Can be in milliseconds or "never". + */ + duration?: number | "never"; + /** + * The url of the notification + */ + url?: string; + /** + * A function that is called when a notification is clicked. + */ + onClick?(callback: () => void): void; + /** + * Invoked when the notification is closed via .close() method on the created notification instance or the by the notification itself via fin.desktop.Notification.getCurrent().close(). NOTE: this is not invoked when the notification is dismissed via a swipe. For the swipe dismissal callback see onDismiss + */ + onClose?(callback: () => void): void; + /** + * Invoked when a the notification is dismissed by swiping it off the screen to the right. NOTE: this is no fired on a programmatic close. + */ + onDismiss?(callback: () => void): void; + /** + * A function that is called when an error occurs.The reason for the error is passed as an argument. + */ + onError?(errorCallback: (reason: string, errorObj: NetworkErrorInfo) => void): void; + /** + * The onMessage function will respond to messages sent from notification.sendMessageToApplication.The function is passed the message, which can be of any primitive or composite-primitive type. + */ + onMessage?(callback: (message: any) => void): void; + /** + * A function that is called when a notification is shown. + */ + onShow?(callback: (successObj: SuccessObj) => void): void; + } + + /** + * System + * An object representing the core of OpenFin Runtime. Allows the developer to perform system-level actions, such as accessing logs, viewing processes, clearing the cache and exiting the runtime. + */ + interface OpenFinSystem { + /** + * + */ + Clipboard: OpenFinClipboard; + /** + * Registers an event listener on the specified event. + */ + addEventListener(type: OpenFinSystemEventType, listener: (event: SystemBaseEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Clears cached data containing window state/positions, application resource files (images, HTML, JavaScript files), cookies, and items stored in the Local Storage. + */ + clearCache(options: CacheOptions, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Clears all cached data when OpenFin Runtime exits. + */ + deleteCacheOnExit(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Downloads the given application asset + */ + downloadAsset(assetObj: AppAssetInfo, progressListener?: (progress: { downloadedBytes: number, totalBytes: number }) => void, callback?: (successObj: { path: string }) => void, errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): void; + /** + * Exits the Runtime. + */ + exit(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of data for all applications. + */ + getAllApplications(callback?: (applicationInfoList: ApplicationInfo[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of data for all external applications. + */ + getAllExternalApplications(callback?: (applicationInfoList: ApplicationInfo[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of data (name, ids, bounds) for all application windows. + */ + getAllWindows(callback?: (windowInfoList: WindowDetails[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the command line argument string that started OpenFin Runtime. + */ + getCommandLineArguments(callback?: (args: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the configuration object that started the OpenFin Runtime. + */ + getDeviceId(callback?: (uuid: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Gets the value of a given environment variable on the computer on which the runtime is installed. + */ + getEnvironmentVariable(envVar: string, callback?: (variable: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves system information. + */ + getHostSpecs(callback?: (info: HostSpecInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the contents of the log with the specified filename. + */ + getLog(logFileName: string, callback?: (variable: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array containing information for each log file. + */ + getLogList(callback?: (logInfoList: LogInfo[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an object that contains data about the about the monitor setup of the computer that the runtime is running on. + */ + getMonitorInfo(callback?: (monitorInfo: MonitorInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Returns the mouse in virtual screen coordinates (left, top). + */ + getMousePosition(callback?: (mousePosition: VirtualScreenCoordinates) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of all of the runtime processes that are currently running. Each element in the array is an object containing the uuid and the name of the application to which the process belongs. + */ + getProcessList(callback?: (processInfoList: ProcessInfo[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the Proxy settings. + */ + getProxySettings(callback?: (proxy: ProxyInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Returns information about the running RVM in an object. + */ + getRvmInfo(callback?: (rvmInfo: RvmInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Returns the version of the runtime. The version contains the major, minor, build and revision numbers. + */ + getVersion(callback?: (version: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Runs an executable or batch file. + */ + launchExternalProcess(options: ExternalProcessLaunchInfo, callback?: (payload: { uuid: string }) => void, errorCallback?: (reason: string) => void): void; + /** + * Writes the passed message into both the log file and the console. + */ + log(level: "debug" | "info" | "warn" | "error", message: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Monitors a running process. + */ + monitorExternalProcess(options: ExternalProcessInfo, callback?: (payload: { uuid: string }) => void, errorCallback?: (reason: string) => void): void; + /** + * Opens the passed URL in the default web browser. + */ + openUrlWithBrowser(url: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * This function call will register a unique id and produce a token. The token can be used to broker an external connection. + */ + registerExternalConnection(uuid: string, callback?: (detail: { + /** + * this will be unique each time + */ + token: string; + /** + * "remote-connection-uuid" + */ + uuid: string; + }) => void, errorCallback?: (reason: string) => void): void; + /** + * Removes the process entry for the passed UUID obtained from a prior call of fin.desktop.System.launchExternalProcess(). + */ + releaseExternalProcess(processUuid: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Removes a previously registered event listener from the specified event. + */ + removeEventListener(type: OpenFinSystemEventType, listener: (event: SystemBaseEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Shows the Chrome Developer Tools for the specified window. + */ + showDeveloperTools(uuid: string, name: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Attempt to close an external process. The process will be terminated if it has not closed after the elapsed timeout in milliseconds. + */ + terminateExternalProcess(processUuid: string, timeout: number, killTree: boolean, callback?: (info: { result: "clean" | "terminated" | "failed" }) => void, errorCallback?: (reason: string) => void): void; + terminateExternalProcess(processUuid: string, timeout: number, callback?: (info: { result: "clean" | "terminated" | "failed" }) => void, errorCallback?: (reason: string) => void): void; + /** + * Update the OpenFin Runtime Proxy settings. + */ + updateProxySettings(type: string, address: string, port: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + + } + + interface CacheOptions { + cache?: boolean; + cookies?: boolean; + localStorage?: boolean; + appcache?: boolean; + userData?: boolean; + } + + interface AppAssetInfo { + src?: string; + alias?: string; + version?: string; + target?: string; + args?: string; + } + + interface ApplicationInfo { + /** + * true when the application is running. + */ + isRunning?: boolean; + /** + * uuid of the application. + */ + uuid?: string; + /** + * uuid of the application that launches this application. + */ + parentUuid?: string; + } + + interface WindowDetails { + uuid?: string; + mainWindow?: WindowInfo; + childWindows?: WindowInfo[]; + } + + interface WindowInfo { + /** + * name of the child window + */ + name?: string; + /** + * top-most coordinate of the child window + */ + top?: number; + /** + * right-most coordinate of the child window + */ + right?: number; + /** + * bottom-most coordinate of the child window + */ + bottom?: number; + /** + * left-most coordinate of the child window + */ + left?: number; + } + + interface HostSpecInfo { + /** + * "x86" for 32-bit or "x86_64" for 64-bit + */ + arch: string; + /** + * Same payload as Node's os.cpus() + */ + cpus: NodeCpuInfo[]; + /** + * + */ + gpu: { + /** + * Graphics card name + */ + name: string; + }; + /** + * Same payload as Node's os.totalmem() + */ + memory: number; + /** + * OS name and version/edition + */ + name: string; + } + + interface NodeCpuInfo { + model: string; + /** + * in MHz + */ + speed: number; + times: { + /** + * The number of milliseconds the CPU has spent in user mode. + */ + user: number; + /** + * The number of milliseconds the CPU has spent in nice mode. + */ + nice: number; + /** + * The number of milliseconds the CPU has spent in sys mode. + */ + sys: number; + /** + * The number of milliseconds the CPU has spent in idle mode. + */ + idle: number; + /** + * The number of milliseconds the CPU has spent in irq mode. + */ + irq: number; + }; + } + + interface LogInfo { + /** + * the filename of the log + */ + name?: string; + /** + * the size of the log in bytes + */ + size?: number; + /** + * the unix time at which the log was created "Thu Jan 08 2015 14:40:30 GMT-0500 (Eastern Standard Time)" + */ + date?: string; + } + + interface ProcessInfo { + /** + * the percentage of total CPU usage + */ + cpuUsage?: number; + /** + * the application name + */ + name?: string; + /** + * the current nonpaged pool usage in bytes + */ + nonPagedPoolUsage?: number; + /** + * the number of page faults + */ + pageFaultCount?: number; + /** + * the current paged pool usage in bytes + */ + pagedPoolUsage?: number; + /** + * the total amount of memory in bytes that the memory manager has committed + */ + pagefileUsage?: number; + /** + * the peak nonpaged pool usage in bytes + */ + peakNonPagedPoolUsage?: number; + /** + * the peak paged pool usage in bytes + */ + peakPagedPoolUsage?: number; + /** + * the peak value in bytes of pagefileUsage during the lifetime of this process + */ + peakPagefileUsage?: number; + /** + * the peak working set size in bytes + */ + peakWorkingSetSize?: number; + /** + * the native process identifier + */ + processId?: number; + /** + * the application UUID + */ + uuid?: string; + /** + * the current working set size (both shared and private data) in bytes + */ + workingSetSize?: number; + } + + interface ProxyInfo { + /** + * the configured Proxy Address + */ + proxyAddress?: string; + /** + * the configured Proxy port + */ + proxyPort?: number; + /** + * Proxy Type + */ + type?: string; + } + + interface RvmInfo { + version?: string; + "start-time"?: string; + } + + interface ExternalProcessLaunchInfo { + path?: string; + /** + * Additionally note that the executable found in the zip file specified in appAssets + * will default to the one mentioned by appAssets.target + * If the the path below refers to a specific path it will override this default + */ + alias?: string; + /** + * When using alias; if no arguments are passed then the arguments (if any) + * are taken from the 'app.json' file, from the 'args' parameter + * of the 'appAssets' Object with the relevant 'alias'. + * If 'arguments' is passed as a parameter it takes precedence + * over any 'args' set in the 'app.json'. + */ + arguments?: string; + listener?: (result: { + /** + * "Exited" Or "released" on a call to releaseExternalProcess + */ + topic?: string; + /** + * The mapped UUID which identifies the launched process + */ + uuid?: string; + /* + * Process exit code + */ + exitCode?: number; + }) => void; + certificate?: CertificationInfo; + } + + interface CertificationInfo { + /** + * A hex string with or without spaces + */ + serial?: string; + /** + * An internally tokenized and comma delimited string allowing partial or full checks of the subject fields + */ + subject?: string; + /** + * A hex string with or without spaces + */ + publickey?: string; + /** + * A hex string with or without spaces + */ + thumbprint?: string; + /** + * A boolean indicating that the certificate is trusted and not revoked + */ + trusted?: boolean; + } + + interface ExternalProcessInfo { + pid?: number; + listener?: (result: { + /** + * "Exited" Or "released" on a call to releaseExternalProcess + */ + topic?: string; + /** + * The mapped UUID which identifies the launched process + */ + uuid?: string; + /* + * Process exit code + */ + exitCode?: number; + }) => void; + } + + interface OpenFinWindowStatic { + /** + * Class: Window + * + * new Window(options, callbackopt, errorCallbackopt) + * + * Creates a new OpenFin Window + * + * A basic window that wraps a native HTML window. Provides more fine-grained control over the window state such as the ability to minimize, maximize, restore, etc. By default a window does not show upon instantiation; instead the window's show() method must be invoked manually. The new window appears in the same process as the parent window. + * @param {any} options - The options of the window + * @param {Function} [callback] - Called if the window creation was successful + * @param {number} [callback.successObj] - httpResponseCode + */ + new (options: WindowOptions, callback?: (successObj: { httpResponseCode: number }) => void, errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): OpenFinWindow; + /** + * Returns an instance of the current window. + * @returns {OpenFinWindow} Current window + */ + getCurrent(): OpenFinWindow; + /** + * Returns a Window object that wraps an existing window. + */ + wrap(appUuid: string, windowName: string): OpenFinWindow; + } + + /** + * Window + * A basic window that wraps a native HTML window. Provides more fine-grained control over the window state such as the ability to minimize, maximize, restore, etc. By default a window does not show upon instantiation; instead the window's show() method must be invoked manually. The new window appears in the same process as the parent window. + */ + interface OpenFinWindow { + /** + * Name of window + */ + name: string; + /** + * Returns the native JavaScript "window" object for the window. This method can only be used by the parent application or the window itself, otherwise it will return undefined. The same Single-Origin-Policy (SOP) rules apply for child windows created by window.open(url) in that the contents of the window object are only accessible if the URL has the same origin as the invoking window. See example below. Also, will not work with fin.desktop.Window objects created with fin.desktop.Window.wrap(). + * @returns {Window} Native window + */ + getNativeWindow(): Window; + /** + * Gets the parent application. + * @returns {OpenFinApplication} Parent application + */ + getParentApplication(): OpenFinApplication; + /** + * Gets the parent window. + */ + getParentWindow(): OpenFinWindow; + /** + * Registers an event listener on the specified event. + */ + addEventListener(type: OpenFinWindowEventType, listener: (event: WindowBaseEvent | WindowAuthRequestedEvent | WindowBoundsEvent | WindowExternalProcessStartedEvent | WindowExternalProcessExited | WindowGroupChangedEvent | WindowHiddenEvent | Window_NavigationRejectedEvent) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Performs the specified window transitions + */ + animate(transitions: AnimationTransition, options: AnimationOptions, callback?: (event: any) => void, errorCallback?: (reason: string) => void): void; + /** + * Provides credentials to authentication requests + */ + authenticate(userName: string, password: string, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Removes focus from the window. + */ + blur(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Brings the window to the front of the OpenFin window stack. + */ + bringToFront(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Closes the window. + * @param {force} Close will be prevented from closing when force is false and close-requested has been subscribed to for applications main window. + */ + close(force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Prevents a user from changing a window's size/position when using the window's frame. + * 'disabled-frame-bounds-changing' is generated at the start of and during a user move/size operation. + * 'disabled-frame-bounds-changed' is generated after a user move/size operation. + * The events provide the bounds that would have been applied if the frame was enabled. + * 'frame-disabled' is generated when an enabled frame becomes disabled. + */ + disableFrame(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Re-enables user changes to a window's size/position when using the window's frame. + * 'disabled-frame-bounds-changing' is generated at the start of and during a user move/size operation. + * 'disabled-frame-bounds-changed' is generated after a user move/size operation. + * The events provide the bounds that would have been applied if the frame was enabled. + * 'frame-enabled' is generated when a disabled frame has becomes enabled. + */ + enableFrame(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Flashes the windows frame and taskbar icon until the window is activated. + */ + flash(options?: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Gives focus to the window. + */ + focus(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Gets the current bounds (top, left, width, height) of the window. + */ + getBounds(callback?: (bounds: WindowBounds) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array containing wrapped fin.desktop.Windows that are grouped with this window. If a window is not in a group an empty array is returned. Please note that calling window is included in the result array. + */ + getGroup(callback?: (group: OpenFinWindow[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Gets the current settings of the window. + */ + getOptions(callback?: (options: WindowOptions) => void, errorCallback?: (reason: string) => void): void; + /** + * Gets a base64 encoded PNG snapshot of the window. + */ + getSnapshot(callback?: (base64Snapshot: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Gets the current state ("minimized", "maximized", or "restored") of the window. + */ + getState(callback?: (state: "minimized" | "maximized" | "restored") => void, errorCallback?: (reason: string) => void): void; + /** + * Returns the zoom level of the window. + */ + getZoomLevel(callback?: (level: number) => void, errorCallback?: (reason: string) => void): void; + /** + * Hides the window. + */ + hide(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Determines if the window is currently showing. + */ + isShowing(callback?: (showing: boolean) => void, errorCallback?: (reason: string) => void): void; + /** + * Joins the same window group as the specified window. + */ + joinGroup(target: OpenFinWindow, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Leaves the current window group so that the window can be move independently of those in the group. + */ + leaveGroup(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Maximizes the window. + */ + maximize(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Merges the instance's window group with the same window group as the specified window + */ + mergeGroups(target: OpenFinWindow, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Minimizes the window. + */ + minimize(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Moves the window by a specified amount. + */ + moveBy(deltaLeft: number, deltaTop: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Moves the window to a specified location. + */ + moveTo(left: number, top: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Removes a previously registered event listener from the specified event. + */ + removeEventListener(type: OpenFinWindowEventType, listener: (event: WindowBaseEvent | WindowAuthRequestedEvent | WindowBoundsEvent | WindowExternalProcessStartedEvent | WindowExternalProcessExited | WindowGroupChangedEvent | WindowHiddenEvent | Window_NavigationRejectedEvent) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Resizes the window by a specified amount. + */ + resizeBy(deltaWidth: number, deltaHeight: number, anchor: OpenFinAnchor, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Resizes the window by a specified amount. + */ + resizeTo(width: number, height: number, anchor: OpenFinAnchor, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Restores the window to its normal state (i.e., unminimized, unmaximized). + */ + restore(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Will bring the window to the front of the entire stack and give it focus. + */ + setAsForeground(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Sets the window's size and position + */ + setBounds(left: number, top: number, width: number, height: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Sets the zoom level of the window. + */ + setZoomLevel(level: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Shows the window if it is hidden. + * @param {force} Show will be prevented from closing when force is false and show-requested has been subscribed to for applications main window. + */ + show(force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Shows the window if it is hidden at the specified location. If the toggle parameter is set to true, the window will alternate between showing and hiding. + */ + showAt(left: number, top: number, force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Stops the taskbar icon from flashing. + */ + stopFlashing(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Updates the window using the passed options + */ + updateOptions(options: WindowOptions, callback?: () => void, errorCallback?: (reason: string) => void): void; + } + + interface ApplicationBaseEvent { + topic: string; + type: OpenFinApplicationEventType; + uuid: string; + } + + interface TrayIconClickedEvent extends ApplicationBaseEvent { + button: number; // 0 for left, 1 for middle, 2 for right + monitorInfo: MonitorInfo; + x: number; // the cursor x coordinate + y: number; // the cursor y coordinate + } + + interface WindowEvent extends ApplicationBaseEvent { + name: string; + } + + interface WindowAlertRequestedEvent extends WindowEvent { + message: string; + url: string; + } + + interface WindowAuthRequested extends WindowEvent { + authInfo: { + host: string; + isProxy: boolean; + port: number; + realm: string; + scheme: string; + }; + } + + interface WindowNavigationRejectedEvent extends WindowEvent { + sourceName: string; + url: string; + } + + interface WindowEndLoadEvent extends WindowEvent { + documentName: string; + isMain: boolean; + } + + interface MonitorInfoChangedEvent extends MonitorInfo { + topic: "system"; + type: "monitor-info-changed"; + } + + interface MonitorInfo { + nonPrimaryMonitors: MonitorInfoDetail[]; + primaryMonitor: MonitorInfoDetail; + reason: string; + taskbar: { + edge: "left" | "right" | "top" | "bottom", + rect: MontiorCoordinates + }; + topic: "system"; + type: "monitor-info-changed"; + virtualScreen: MontiorCoordinates; + } + + interface MonitorInfoDetail { + availableRect: MontiorCoordinates; + deviceId: string; + displayDeviceActive: boolean; + monitorRect: MontiorCoordinates; + name: string; + } + + interface MontiorCoordinates { + bottom: number; + left: number; + right: number; + top: number; + } + + interface VirtualScreenCoordinates { + left: number; + top: number; + } + + interface SystemBaseEvent { + topic: string; + type: OpenFinSystemEventType; + uuid: string; + } + + interface DesktopIconClickedEvent { + mouse: { + /** + * the left virtual screen coordinate of the mouse + */ + left: number, + /** + * the top virtual screen coordinate of the mouse + */ + top: number + }; + /** + * the number of milliseconds that have elapsed since the system was started, + */ + tickCount: number; + topic: "system"; + type: "desktop-icon-clicked"; + } + + interface IdleStateChangedEvent { + /** + * How long in milliseconds since the user has been idle. + */ + elapsedTime: number; + /** + * true when the user is idle,false when the user has returned; + */ + isIdle: boolean; + topic: "system"; + type: "idle-state-changed"; + } + + interface WindowBaseEvent { + /** + * the name of the window + */ + name: string; + /** + * always window + */ + topic: "window"; + /** + * window event type + */ + type: OpenFinWindowEventType; + /** + * the UUID of the application the window belongs to + */ + uuid: string; + } + + interface WindowAuthRequestedEvent extends WindowBaseEvent { + authInfo: { + host: string; + isProxy: boolean; + port: number; + realm: string; + scheme: string; + }; + } + + interface WindowBoundsEvent extends WindowBaseEvent { + /** + * describes what kind of change occurred. + * 0 means a change in position. + * 1 means a change in size. + * 2 means a change in position and size. + */ + changeType: number; + /** + * true when pending changes have been applied to the window. + */ + deferred: boolean; + /** + * the new height of the window. + */ + height: number; + /** + * the left-most coordinate of the window. + */ + left: number; + /** + * the top-most coordinate of the window. + */ + top: number; + /** + * + */ + type: "bounds-changed" | "bounds-changing" | "disabled-frame-bounds-changed" | "disabled-frame-bounds-changing"; + /** + * the new width of the window. + */ + width: number; + } + + interface WindowExternalProcessStartedEvent extends WindowBaseEvent { + /** + * the process handle uuid + */ + processUuid: string; + type: "external-process-started"; + } + + interface WindowExternalProcessExited extends WindowBaseEvent { + /** + * the process exit code + */ + exitCode: number; + /** + * the process handle uuid + */ + processUuid: string; + type: "external-process-exited"; + } + + interface WindowGroupChangedEvent extends WindowBaseEvent { + /** + * Which group array the window that the event listener was registered on is included in: + * 'source' The window is included in sourceGroup. + * 'target' The window is included in targetGroup. + * 'nothing' The window is not included in sourceGroup nor targetGroup. + */ + memberOf: "source" | "target" | "nothing"; + /** + * The reason this event was triggered. + * 'leave' A window has left the group due to a leave or merge with group. + * 'join' A window has joined the group. + * 'merge' Two groups have been merged together. + * 'disband' There are no other windows in the group. + */ + reason: "leave" | "join" | "merge" | "disband"; + /** + * All the windows in the group the sourceWindow originated from. + */ + sourceGroup: WindowOfGroupInfo[]; + /** + * The UUID of the application the sourceWindow belongs to The source window is the window in which (merge/join/leave)group(s) was called. + */ + sourceWindowAppUuid: string; + /** + * the name of the sourcewindow.The source window is the window in which(merge / join / leave) group(s) was called. + */ + sourceWindowName: string; + /** + * All the windows in the group the targetWindow orginated from + */ + targetGroup: WindowOfGroupInfo[]; + /** + * The UUID of the application the targetWindow belongs to. The target window is the window that was passed into (merge/join) group(s). + */ + targetWindowAppUuid: string; + /** + * The name of the targetWindow. The target window is the window that was passed into (merge/join) group(s). + */ + targetWindowName: string; + type: "group-changed"; + } + + interface WindowOfGroupInfo { + /** + * The UUID of the application this window entry belongs to. + */ + appUuid: string; + /** + * The name of this window entry. + */ + windowName: string; + } + + interface WindowHiddenEvent extends WindowBaseEvent { + /** + * What action prompted the close. + * The reasons are: "hide", "hide-on-close" + */ + reason: "hide" | "hide-on-close"; + type: "hidden"; + } + + interface Window_NavigationRejectedEvent { + name: string; + /** + * source of navigation window name + */ + sourceName: string; + topic: "navigation-rejected"; + /** + * Url that was not reached "http://blocked-content.url" + */ + url: string; + /** + * the UUID of the application the window belongs to. + */ + uuid: string; + } + + interface AnimationTransition { + opacity?: { + /** + * This value is clamped from 0.0 to 1.0 + */ + opacity?: number; + /** + * The total time in milliseconds this transition should take. + */ + duration?: number; + /** + * Treat 'opacity' as absolute or as a delta. Defaults to false. + */ + relative?: boolean; + }; + position?: { + /** + * Defaults to the window's current left position in virtual screen coordinates. + */ + left?: number; + /** + * Defaults to the window's current top position in virtual screen coordinates. + */ + top?: number; + /** + * The total time in milliseconds this transition should take. + */ + duration?: number; + /** + * Treat 'left' and 'top' as absolute or as deltas. Defaults to false. + */ + relative?: boolean; + }; + size?: { + /** + * Optional if height is present. Defaults to the window's current width. + */ + width?: number; + /** + * Optional if width is present. Defaults to the window's current height. + */ + height?: number; + /** + * The total time in milliseconds this transition should take. + */ + duration?: number; + /** + * Treat 'width' and 'height' as absolute or as deltas. Defaults to false. + */ + relative?: boolean; + }; + } + + interface AnimationOptions { + /** + * This option interrupts the current animation. When false it pushes this animation onto the end of the animation queue. + */ + interrupt?: boolean; + /** + * Transition effect. Defaults to 'ease-in-out'. + */ + tween?: OpenFinTweenType; + } + + interface WindowBounds { + /** + * the height of the window. + */ + height?: number; + /** + * left-most coordinate of the window. + */ + left?: number; + /** + * top-most coordinate of the window. + */ + top?: number; + /** + * the width of the window. + */ + width?: number; + } + + interface SessionChangedEvent { + /** + * the action that triggered this event: + */ + reason: "lock" + | "unlock" + | "remote-connect" + | "remote-disconnect" + | "unknown"; + topic: "system"; + type: "session-changed"; + } + + type OpenFinTweenType = "linear" + | "ease-in" + | "ease-out" + | "ease-in-out" + | "ease-in-quad" + | "ease-out-quad" + | "ease-in-out-quad" + | "ease-in-cubic" + | "ease-out-cubic" + | "ease-in-out-cubic" + | "ease-out-bounce" + | "ease-in-back" + | "ease-out-back" + | "ease-in-out-back" + | "ease-in-elastic" + | "ease-out-elastic" + | "ease-in-out-elastic"; + + type OpenFinApplicationEventType = "closed" + | "connected" + | "crashed" + | "initialized" + | "manifest-changed" + | "not-responding" + | "out-of-memory" + | "responding" + | "run-requested" + | "started" + | "tray-icon-clicked" + | "window-alert-requested" + | "window-auth-requested" + | "window-closed" + | "window-created" + | "window-end-load" + | "window-navigation-rejected" + | "window-show-requested" + | "window-start-load"; + + type OpenFinExternalApplicationEventType = "connected" + | "disconnected"; + + type OpenFinSystemEventType = "application-closed" + | "application-crashed" + | "application-created" + | "application-started" + | "desktop-icon-clicked" + | "idle-state-changed" + | "monitor-info-changed" + | "session-changed"; + + type OpenFinWindowEventType = "auth-requested" + | "blurred" + | "bounds-changed" + | "bounds-changing" + | "close-requested" + | "closed" + | "disabled-frame-bounds-changed" + | "disabled-frame-bounds-changing" + | "embedded" + | "external-process-exited" + | "external-process-started" + | "focused" + | "frame-disabled" + | "frame-enabled" + | "group-changed" + | "hidden" + | "initialized" + | "maximized" + | "minimized" + | "navigation-rejected" + | "restored" + | "show-requested" + | "shown"; + + type OpenFinAnchor = "top-left" + | "top-right" + | "bottom-left" + | "bottom-right"; +} \ No newline at end of file diff --git a/openfin/openfin-tests.ts b/openfin/openfin-tests.ts new file mode 100644 index 0000000000..81ac24f937 --- /dev/null +++ b/openfin/openfin-tests.ts @@ -0,0 +1,724 @@ +function test_application() { + let application: fin.OpenFinApplication; + // constructor + application = new fin.desktop.Application({ + url: "application.html", + uuid: "74BED629-2D8E-4141-8582-73E364BDFA74", + name: "Application Name", + plugins: false, + mainWindowOptions: { + defaultHeight: 600, + defaultWidth: 800, + defaultTop: 300, + defaultLeft: 300, + autoShow: true + } + }, function (successObj) { + console.log("Application successfully created, HTTP response code:", successObj); + application.run(); + }, function (error) { + console.log("Error creating application:", error); + }); + // getCurrent + application = fin.desktop.Application.getCurrent(); + // wrap + application = fin.desktop.Application.wrap("454C7F31-A915-4EA2-83F2-CFA655453C52"); + // getWindow + application.getWindow(); + // addEventListener + application.addEventListener("closed", function (event) { + console.log("The application has closed"); + }, function () { + console.log("The registration was successful"); + }, function (reason) { + console.log("failure: " + reason); + }); + // close + application.close(); + // getChildWindows + application.getChildWindows(function (children) { + children.forEach(function (childWindow) { + console.log("Showing child: " + childWindow.name); + childWindow.show(); + }); + }); + // getGroups + application.getGroups(function (allGroups) { + console.log("There are a total of " + allGroups.length + " groups."); + + var groupCounter = 1; + allGroups.forEach(function (windowGroup) { + console.log("Group " + groupCounter + " contains " + + windowGroup.length + " windows."); + ++groupCounter; + }); + }); + // getManifest + application.getManifest(function (manifest) { + console.log("Application manifest:"); + console.log(manifest); + }); + // getParentUuid + application.getParentUuid(function (parentUuid) { + console.log("UUID of parent application:"); + console.log(parentUuid); + }); + // getShortcuts + application.getShortcuts(function (config) { + console.log("Desktop shortcut is enabled: ", config.desktop); + console.log("Start Menu shortcut is enabled: ", config.startMenu); + console.log("System Startup shortcut is enabled: ", config.systemStartup); + }); + // isRunning + application.isRunning(function (running) { + console.log("the application is", running ? "running" : "not running"); + }); + // registerCustomData + application.registerCustomData({ + someData: "this is custom" + }, function () { + console.log("You will not read this."); + }, function (err) { + console.log("failure:", err); + }); + // removeEventListener + let previousCallback = function (event: fin.WindowEvent) { }; + application.removeEventListener("closed", previousCallback, function () { + console.log("The unregistration was successful"); + }, function (err) { + console.log("failure:", err); + }); + // removeTrayIcon + application.removeTrayIcon(function () { + console.log("Removed the tray icon."); + }, function (err) { + console.log("failure:", err); + }); + // restart + application.restart(function () { + console.log("You will not read this."); + }, function (err) { + console.log("failure:", err); + }); + // schedule restart + application.scheduleRestart(function () { + console.log("You will not read this."); + }, function (err) { + console.log("failure:", err); + }); + // setShortcuts + application.setShortcuts({ + desktop: true, + startMenu: false, + systemStartup: true + }, function () { + console.log("Successfully set new shortcut states"); + }, function (error) { + console.log("Failed to set new shortcut states. Error: ", error); + }); + // setTrayIcon + application.setTrayIcon("https://developer.openf.in/download/openfin.png", function (clickInfo) { + console.log("The mouse has clicked at (" + clickInfo.x + "," + clickInfo.y + ")"); + }); + // terminate + application.terminate(); + // wait + application.addEventListener("not-responding", function () { + console.log("waiting for hung application"); + application.wait(); + }); +} + +function test_external_application() { + let externalApp: fin.OpenFinExternalApplication; + // wrap + externalApp = fin.desktop.ExternalApp.wrap('my-uuid'); + // addEventListener + externalApp.addEventListener('connected', () => { + console.log('external app connected'); + }, () => { + console.log('The registration was successful'); + }, (reason, err) => { + console.log(`Error Message: ${err.message} Error Stack: ${err.stack}`); + }); + // removeEventListener + let previousCallback = function () { }; + externalApp.removeEventListener('connected', previousCallback, () => { + console.log('The unregistration was successful'); + }, (reason, err) => { + console.log(`Error Message: ${err.message} Error Stack: ${err.stack}`); + }); +} + +function test_inter_application_bus() { + // addSubscribeListener + fin.desktop.InterApplicationBus.addSubscribeListener(function (uuid, topic, name) { + console.log("The application " + uuid + " has subscribed to " + topic); + }); + // addUnsubscribeListener + fin.desktop.InterApplicationBus.addUnsubscribeListener(function (uuid, topic, name) { + console.log("The application " + uuid + " has unsubscribed to " + topic); + }); + // removeSubscribeListener + let aRegisteredListener = function (uuid: string, topic: string, name: string) { }; + fin.desktop.InterApplicationBus.removeSubscribeListener(aRegisteredListener); + // removeUnsubscribeListener + fin.desktop.InterApplicationBus.removeUnsubscribeListener(aRegisteredListener); + // publish + fin.desktop.InterApplicationBus.publish("a topic", { + field1: "value1", + field2: "value2" + }); + // send + fin.desktop.InterApplicationBus.send("an application's uuid", "a topic", { + field1: "value1", + field2: "value2" + }); + // subscribe + fin.desktop.InterApplicationBus.subscribe("*", "a topic", function (message, uuid, name) { + console.log("The application " + uuid + " sent this message: " + message); + }); + // unsubscribe + let aRegisteredMessageListener = function (message: any, senderUuid: string) { + console.log(message, senderUuid); + }; + fin.desktop.InterApplicationBus.unsubscribe("*", "a topic", aRegisteredMessageListener); +} + +function test_notification() { + let notification: fin.OpenFinNotification; + // getCurrent + notification = fin.desktop.Notification.getCurrent(); + // close + notification.close(); + // sendMessage + notification = new fin.desktop.Notification({ + duration: 10, + url: "http://localhost:5000/Account/Register", + message: "Hello", + onShow: () => { }, + //onClose: () => { }, + onDismiss: () => { }, + //onClick: () => { }, + onMessage: () => { }, + onError: () => { } + }); + // sendMessageToApplication + notification.sendMessageToApplication("some message"); +} + +function test_system() { + // addEventListener + fin.desktop.System.addEventListener('monitor-info-changed', function (event) { + console.log("The monitor information has changed to: ", event); + }, function () { + console.log("The registration was successful"); + }, function (err) { + console.log("failure: " + err); + }); + // clearCache + fin.desktop.System.clearCache({ + cache: true, + cookies: true, + localStorage: true, + appcache: true, + userData: true + }); + // deleteCacheOnExit + fin.desktop.System.deleteCacheOnExit(function () { + console.log("successful"); + }, function (err) { + console.log("failure: " + err); + }); + // downloadAsset + let dirAppAsset = { + 'src': 'http://local:8000/dir.zip', + 'alias': 'dirApp', + 'version': '1.23.24', + 'target': 'dir.bat', + 'args': '' + }; + fin.desktop.System.downloadAsset(dirAppAsset, progress => { + let downloadedPercent = Math.floor((progress.downloadedBytes / progress.totalBytes) * 100); + console.log(`Downloaded ${downloadedPercent}%`); + }, p => { + console.log(`Downlod complete, can be found on ${p.path}`); + //lets launch our application asset. + //launchDirApp(); + }, (reason, err) => { + console.log(reason, err); + }); + // exit + fin.desktop.System.exit(function () { + console.log("successful"); + }, function (err) { + console.log("failure: " + err); + }); + // getAllApplications + fin.desktop.System.getAllApplications(function (applicationInfoList) { + applicationInfoList.forEach(function (applicationInfo) { + console.log("Showing information for application with uuid: " + + applicationInfo.uuid); + console.log("isRunning: ", applicationInfo.isRunning); + }); + }); + // getAllExternalApplications + fin.desktop.System.getAllExternalApplications(externalAppsInfoList => { + externalAppsInfoList.forEach(appInfo => { + console.log(`External app connected to the runtime with UUID ${appInfo.uuid}`); + }); + }); + // getAllWindows + fin.desktop.System.getAllWindows(function (windowInfoList) { + windowInfoList.forEach(function (windowInfo) { + console.log("Showing information for application with uuid: ", windowInfo.uuid); + console.log("Main window: ", windowInfo.mainWindow); + console.log("Child windows: ", windowInfo.childWindows); + }); + }); + // getCommandLineArguments + fin.desktop.System.getCommandLineArguments(function (args) { + console.log("The command line arguments are " + args); + }); + // getDeviceId + fin.desktop.System.getDeviceId(function (id) { + console.log("The id of the device is: " + id); + }); + // getEnvironmentVariable + fin.desktop.System.getEnvironmentVariable("APPDATA", function (variable) { + console.log("this is the APPDATA value", variable); + }); + // getHostSpecs + fin.desktop.System.getHostSpecs(function (info) { + console.log(info); + }, function (error) { + console.log('There was an error:', error); + }); + // getLog + fin.desktop.System.getLog('debug-2015-01-08-22-27-53.log', function (log) { + console.log(log); + }); + // getLogList + fin.desktop.System.getLogList(function (logList) { + logList.forEach(function (logInfo) { + console.log("The filename of the log is " + + logInfo.name + ", the size is " + + logInfo.size + ", and the date of creation is " + + logInfo.date); + }); + }); + // getMonitorInfo + fin.desktop.System.getMonitorInfo(function (monitorInfo) { + console.log("This object contains information about all monitors: ", monitorInfo); + }); + // getMousePosition + fin.desktop.System.getMousePosition(function (mousePosition) { + console.log("The mouse is located at left: " + mousePosition.left + ", top: " + mousePosition.top); + }); + // getProcessList + fin.desktop.System.getProcessList(function (list) { + list.forEach(function (process) { + console.log("UUID: " + process.uuid + ", Application Name: " + process.name); + }); + }); + // getProxySettings + fin.desktop.System.getProxySettings(function (proxy) { + console.log(proxy); + }); + // getRvmInfo + fin.desktop.System.getRvmInfo(function (rvmInfoObject) { + console.log("RVM version:", rvmInfoObject.version); + console.log("RVM has been running since:", rvmInfoObject["start-time"]); + }, function (err) { + console.log("Failed to get rvm info, error message:", err); + }); + // getVersion + fin.desktop.System.getVersion(function (version) { + console.log("The version is " + version); + }); + // launchExternalProcess + fin.desktop.System.launchExternalProcess({ + path: "notepad", + arguments: "", + listener: function (result) { + console.log('the exit code', result.exitCode); + } + }, function (payload) { + console.log('Success:', payload.uuid); + }, function (error) { + console.log('Error:', error); + }); + // + fin.desktop.System.launchExternalProcess({ + //Additionally note that the executable found in the zip file specified in appAssets + //will default to the one mentioned by appAssets.target + //If the the path below refers to a specific path it will override this default + alias: "myApp", + listener: function (result) { + console.log('the exit code', result.exitCode); + } + }, function (payload) { + console.log('Success:', payload.uuid); + }, function (error) { + console.log('Error:', error); + }); + // + fin.desktop.System.launchExternalProcess({ + alias: "myApp", + arguments: "e f g", + listener: function (result) { + console.log('the exit code', result.exitCode); + } + }, function (payload) { + console.log('Success:', payload.uuid); + }, function (error) { + console.log('Error:', error); + }); + // + fin.desktop.System.launchExternalProcess({ + path: "C:\Users\ExampleUser\AppData\Local\OpenFin\OpenFinRVM.exe", + arguments: "--version", + certificate: { + trusted: true, + subject: 'O=OpenFin INC., L=New York, S=NY, C=US', + thumbprint: '‎3c a5 28 19 83 05 fe 69 88 e6 8f 4b 3a af c5 c5 1b 07 80 5b' + }, + listener: function (result) { + console.log('the exit code', result.exitCode); + } + }, function (payload) { + console.log('Success:', payload.uuid); + }, function (error) { + console.log('Error:', error); + }); + // log + fin.desktop.System.log("info", "An example log message", function () { + console.log("message successfully logged"); + }, function (err) { + console.log(err); + }); + // monitorExternalProcess + fin.desktop.System.monitorExternalProcess({ + pid: 2508, + listener: function (result) { + console.log('the exit code', result.exitCode); + } + }, function (payload) { + console.log("The process is now being monitored: ", payload.uuid); + }, function (error) { + console.log("Error:", error); + }); + // openUrlWithBrowser + fin.desktop.System.openUrlWithBrowser("https://developer.openf.in/", function () { + console.log("successful"); + }, function (err) { + console.log("failure: " + err); + }); + // registerExternalConnection + fin.desktop.System.registerExternalConnection("remote-connection-uuid", function () { + console.log(arguments); + }); + // releaseExternalProcess + fin.desktop.System.launchExternalProcess({ + path: "notepad", + arguments: "", + listener: function (result) { + console.log("The exit code", result.exitCode); + } + }, function (result) { + console.log("Result UUID is " + result.uuid); + + //release it. + fin.desktop.System.releaseExternalProcess(result.uuid, function () { + console.log("Process has been unmapped!"); + }, function (reason) { + console.log("failure: " + reason); + }); + }); + // removeEventListener + let aRegisteredListener = (event: fin.SystemBaseEvent) => { }; + fin.desktop.System.removeEventListener("monitor-info-changed", aRegisteredListener, function () { + console.log("successful"); + }, function (err) { + console.log("failure: " + err); + }); + // showDeveloperTools + fin.desktop.System.showDeveloperTools("uuid", "name", function () { + console.log("successful"); + }, function (err) { + console.log("failure: " + err); + }); + // terminateExternalProcess + fin.desktop.System.launchExternalProcess({ + // notepad is in the system’s PATH + path: "notepad", + arguments: "", + listener: function (result) { + console.log("The exit code", result.exitCode); + } + }, function (result) { + console.log("Result UUID is " + result.uuid); + + // Attempt to close the process. Terminate after 4 seconds if it + // has not done so. + fin.desktop.System.terminateExternalProcess(result.uuid, 4000, function (info) { + console.log("Termination result " + info.result); + }, function (reason) { + console.log("failure: " + reason); + }); + }); + // updateProxySettings + fin.desktop.System.updateProxySettings("type", "proxyAddress", 8080, function () { + console.log('success'); + }, function (err) { + console.log(err); + }); +} + +function test_system_clipboard() { + // availableFormats + fin.desktop.System.Clipboard.availableFormats(null, formats => { + formats.forEach(format => console.log(`The format ${format} is available to read`)); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // readHtml + fin.desktop.System.Clipboard.readHtml(null, html => { + console.log(`This is the html from the clipboard: ${html}`); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // readRtf + fin.desktop.System.Clipboard.readRtf(null, rtf => { + console.log(`This is the rtf from the clipboard: ${rtf}`); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // readText + fin.desktop.System.Clipboard.readText(null, text => { + console.log(`This is the text from the clipboard: ${text}`); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // write + fin.desktop.System.Clipboard.write({ + text: 'Hello Text!', + html: '

Hello Html

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

Hello World

', null, () => { + console.log('Success!!'); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // writeRtf + fin.desktop.System.Clipboard.writeRtf('Hello World!', null, () => { + console.log('Success!!'); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // writeText + fin.desktop.System.Clipboard.writeText('Hello World', null, () => { + console.log('Success!!'); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); +} + +function test_window() { + let finWindow: fin.OpenFinWindow; + // constructor + finWindow = new fin.desktop.Window({ + name: "childWindow", + url: "child.html", + defaultWidth: 320, + defaultHeight: 320, + defaultTop: 10, + defaultLeft: 300, + frame: false, + resizable: false, + state: "normal" + }, 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/openfin/tsconfig.json b/openfin/tsconfig.json new file mode 100644 index 0000000000..5317cc92ce --- /dev/null +++ b/openfin/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "openfin-tests.ts" + ] +} diff --git a/openfin/tslint.json b/openfin/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/openfin/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/openfin/v15/index.d.ts b/openfin/v15/index.d.ts new file mode 100644 index 0000000000..4350d1ac27 --- /dev/null +++ b/openfin/v15/index.d.ts @@ -0,0 +1,1504 @@ +// Type definitions for OpenFin API 15.0 +// Project: https://openfin.co/ +// Definitions by: Chris Barker +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// based on v6.49.15.18 +// see https://openfin.co/support/technical-faq/#what-do-the-numbers-in-the-runtime-version-mean + + +/** + * JavaScript API + * The JavaScript API allows you to create an HTML/JavaScript application that has access to the native windowing environment, can communicate with other applications and has access to sandboxed system-level features. + * + * API Ready + * When using the OpenFin API, it is important to ensure that it has been fully loaded before making any API calls. To verify that the API is in fact ready, be sure to make any API calls either from within the fin.desktop.main() method or explicitly after it has returned. This avoids the situation of trying to access methods that are not yet fully injected. + * + * Overview + * When running within the OpenFin Runtime your web applications have access to the "fin" namespace and all the modules within the API without the need to include additional source files. You can treat the "fin" namespace as you would the "window", "navigator" or "document" objects. + **/ +declare namespace fin { + const desktop: OpenFinDesktop; + + interface OpenFinDesktop { + main(f: () => any): void; + Application: OpenFinApplicationStatic; + ExternalApp: OpenFinExternalApplicationStatic; + InterApplicationBus: OpenFinInterApplicationBus; + Notification: OpenFinNotificationStatic; + System: OpenFinSystem; + Window: OpenFinWindowStatic; + } + + interface OpenFinApplicationStatic { + /** + * Creates a new Application. + * An object representing an application. Allows the developer to create, execute, show/close an application as well as listen to application events. + */ + new (options: ApplicationOptions, callback?: (successObj: { httpResponseCode: number }) => void, errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): OpenFinApplication; + /** + * Returns an Application object that represents an existing application. + */ + getCurrent(): OpenFinApplication; + /** + * Returns an Application object that represents an existing application. + */ + wrap(uuid: string): OpenFinApplication; + } + + /** + * Application + * An object representing an application.Allows the developer to create, execute, show / close an application as well as listen to application events. + */ + interface OpenFinApplication { + /** + * Returns an instance of the main Window of the application + */ + getWindow(): OpenFinWindow; + /** + * Registers an event listener on the specified event. + */ + addEventListener(type: OpenFinApplicationEventType, listener: (event: ApplicationBaseEvent | TrayIconClickedEvent | WindowEvent | WindowAlertRequestedEvent | WindowAuthRequested | WindowNavigationRejectedEvent | WindowEndLoadEvent) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Closes the application and any child windows created by the application. + */ + close(force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of wrapped fin.desktop.Windows for each of the applications child windows. + */ + getChildWindows(callback?: (children: OpenFinWindow[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of active window groups for all of the application's windows. Each group is represented as an array of wrapped fin.desktop.Windows. + */ + getGroups(callback?: (groups: OpenFinWindow[][]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the JSON manifest that was used to create the application. Invokes the error callback if the application was not created from a manifest. + */ + getManifest(callback?: (manifest: any) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves UUID of the application that launches this application. Invokes the error callback if the application was created from a manifest. + */ + getParentUuid(callback?: (uuid: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves current configuration of application's shortcuts. + */ + getShortcuts(callback?: (config: ShortCutConfig) => void, errorCallback?: (reason: string) => void): void; + /** + * Determines if the application is currently running. + */ + isRunning(callback?: (running: boolean) => void, errorCallback?: (reason: string) => void): void; + /** + * Passes in custom data that will be relayed to the RVM + */ + registerCustomData(data: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Removes a previously registered event listener from the specified event. + */ + removeEventListener(type: OpenFinApplicationEventType, previouslyRegisteredListener: (event: ApplicationBaseEvent | TrayIconClickedEvent | WindowEvent | WindowAlertRequestedEvent | WindowAuthRequested | WindowNavigationRejectedEvent | WindowEndLoadEvent) => any, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Removes the applications icon from the tray. + */ + removeTrayIcon(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Restarts the application. + */ + restart(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Runs the application. When the application is created, run must be called. + */ + run(callback?: (successObj: SuccessObj) => void, errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): void; + /** + * Tells the rvm to relaunch the main application once upon a complete shutdown + */ + scheduleRestart(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Sets new shortcut configuration for current application. Application has to be launched with a manifest and has to have shortcut configuration (icon url, name, etc.) in its manifest to be able to change shortcut states. + */ + setShortcuts(config: ShortCutConfig, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Adds a customizable icon in the system tray and notifies the application when clicked. + */ + setTrayIcon(iconUrl: string, listener: (clickInfo: TrayIconClickedEvent) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Closes the application by terminating its process. + */ + terminate(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Waits for a hanging application. This method can be called in response to an application "not-responding" to allow the application to continue and to generate another "not-responding" message after a certain period of time. + */ + wait(callback?: () => void, errorCallback?: (reason: string) => void): void; + } + + interface ShortCutConfig { + /** + * application has a shortcut on the desktop + */ + desktop?: boolean; + /** + * application has no shortcut in the start menu + */ + startMenu?: boolean; + /** + * application will be launched on system startup + */ + systemStartup?: boolean; + } + + interface SuccessObj { + httpResponseCode: number; + } + + interface NetworkErrorInfo extends ErrorInfo { + networkErrorCode: number; + } + + interface ErrorInfo { + stack: string; + message: string; + } + + interface ApplicationOptions { + url?: string; + uuid?: string; + name?: string; + mainWindowOptions?: WindowOptions; + } + + interface WindowOptions { + /** + * Enable keyboard shortcuts for devtools and zoom. Default: false for both. + */ + accelerator?: { + devtools?: boolean, + zoom?: boolean + }; + /** + * A flag to always position the window at the top of the window stack. Default: false. + */ + alwaysOnTop?: boolean; + /** + * A flag to automatically show the Window when it is created. Default: false. + */ + autoShow?: boolean; + /** + * A flag to show the context menu when right-clicking on a window. Gives access to the Developer Console for the Window. Default: true + */ + contextMenu?: boolean; + /** + * This defines and applies rounded corners for a frameless window. Default for both width and height: 0. + */ + cornerRounding?: { + width?: number; + height?: number; + }; + /** + * A field that the user can attach serializable data to to be ferried around with the window options. Default: ''. + */ + customData?: any; + /** + * Specifies that the window will be positioned in the center of the primary monitor when loaded for the first time on a machine. When the window corresponding to that id is loaded again, the position from before the window was closed is used. This option overrides defaultLeft and defaultTop. Default: false. + */ + defaultCentered?: boolean; + /** + * The default height of the window. Specifies the height of the window when loaded for the first time on a machine. When the window corresponding to that id is loaded again, the height is taken to be the last height of the window before it was closed. Default: 500. + */ + defaultHeight?: number; + /** + * The default left position of the window. Specifies the position of the left of the window when loaded for the first time on a machine. When the window corresponding to that id is loaded again, the value of left is taken to be the last value before the window was closed. Default: 100. + */ + defaultWidth?: number; + /** + * The default top position of the window. Specifies the position of the top of the window when loaded for the first time on a machine. When the window corresponding to that id is loaded again, the value of top is taken to be the last value before the window was closed. Default: 100. + */ + defaultTop?: number; + /** + * The default width of the window. Specifies the width of the window when loaded for the first time on a machine. When the window corresponding to that id is loaded again, the width is taken to be the last width of the window before it was closed. Default: 800. + */ + defaultLeft?: number; + /** + * A flag to show the frame. Default: true. + */ + frame?: boolean; + /** + * A flag to allow a window to be hidden when the close button is clicked.Default: false. + */ + hideOnClose?: boolean; + /** + * A URL for the icon to be shown in the window title bar and the taskbar.Default: The parent application's applicationIcon. + */ + icon?: string; + /** + * The maximum height of a window.Will default to the OS defined value if set to - 1. Default: -1. + */ + maxHeight?: number; + /** + * A flag that lets the window be maximized.Default: true. + */ + maximizable?: boolean; + /** + * The maximum width of a window.Will default to the OS defined value if set to - 1. Default: -1. + */ + maxWidth?: number; + /** + * The minimum height of a window.Default: 0. + */ + minHeight?: number; + /** + * A flag that lets the window be minimized.Default: true. + */ + minimizable?: boolean; + /** + * The minimum width of a window.Default: 0. + */ + minWidth?: number; + /** + * The name for the window which must be unique within the context of the invoking Application. + */ + name?: string; + /** + * A flag that specifies how transparent the window will be.This value is clamped between 0.0 and 1.0.Default: 1.0. + */ + opacity?: number; + /** + * A flag to drop to allow the user to resize the window.Default: true. + */ + resizable?: boolean; + /** + * Defines a region in pixels that will respond to user mouse interaction for resizing a frameless window. + */ + resizeRegion?: { + /** + * The size in pixels (Default: 2), + */ + size?: number; + /** + * The size in pixels of an additional + * square resizable region located at the + * bottom right corner of a + * frameless window. (Default: 4) + */ + bottomRightCorner?: number; + }; + /** + * A flag to show the Window's icon in the taskbar. Default: true. + */ + showTaskbarIcon?: boolean; + /** + * A flag to cache the location of the window or not. Default: true. + */ + saveWindowState?: boolean; + /** + * Specify a taskbar group for the window. Default: app's uuid. + */ + taskbarIconGroup?: string; + /** + * A string that sets the window to be "minimized", "maximized", or "normal" on creation. Default: "normal". + */ + state?: string; + /** + * The URL of the window. Default: "about:blank". + */ + url?: string; + /** + * When set to false, the window will render before the "load" event is fired on the content's window. Caution, when false you will see an initial empty white window. Default: true. + */ + waitForPageLoad?: boolean; + } + + /** + * Clipboard + * Clipboard API allows reading and writting to the clipboard in multiple formats. + */ + interface OpenFinClipboard { + /** + * Reads available formats for the clipboard type + */ + availableFormats(type: string | null, callback?: (formats: string[]) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Reads available formats for the clipboard type + */ + readHtml(type: string | null, callback?: (html: string) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Read the content of the clipboard as Rtf + */ + readRtf(type: string | null, callback?: (rtf: string) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Read the content of the clipboard as plain text + */ + readText(type: string | null, callback?: (text: string) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Writes data into the clipboard + */ + write(data: any, type: string | null, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Writes data into the clipboard as Html + */ + writeHtml(data: string, type: string | null, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Writes data into the clipboard as Rtf + */ + writeRtf(data: string, type: string | null, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Writes data into the clipboard as plain text + */ + writeText(data: string, type: string | null, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + } + + interface OpenFinExternalApplicationStatic { + /** + * Returns an External Application object that represents an existing external application. + */ + wrap(uuid: string): OpenFinExternalApplication; + } + /** + * ExternalApplication + * An object representing an application. Allows the developer to create, execute, show and close an application, as well as listen to application events. + */ + interface OpenFinExternalApplication { + /** + * Registers an event listener on the specified event. + */ + addEventListener(type: OpenFinExternalApplicationEventType, listener: () => void, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Removes a previously registered event listener from the specified event. + */ + removeEventListener(type: OpenFinExternalApplicationEventType, listener: () => void, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + } + + /** + * InterApplicationBus + * A messaging bus that allows for pub/sub messaging between different applications. + */ + interface OpenFinInterApplicationBus { + /** + * Adds a listener that gets called when applications subscribe to the current application's messages. + */ + addSubscribeListener(listener: (uuid: string, topic: string, name: string) => void): void; + /** + * Adds a listener that gets called when applications unsubscribe to the current application's messages. + */ + addUnsubscribeListener(listener: (uuid: string, topic: string, name: string) => void): void; + /** + * Removes a previously registered subscribe listener. + */ + removeSubscribeListener(listener: (uuid: string, topic: string, name: string) => void): void; + /** + * Removes a previously registered unsubscribe listener. + */ + removeUnsubscribeListener(listener: (uuid: string, topic: string, name: string) => void): void; + /** + * Publishes a message to all applications running on OpenFin Runtime that are subscribed to the specified topic. + */ + publish(topic: string, message: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Sends a message to a specific application on a specific topic. + */ + send(destinationUuid: string, name: string, topic: string, message: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + send(destinationUuid: string, topic: string, message: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Subscribes to messages from the specified application on the specified topic. If the subscription is for a uuid, [name], topic combination that has already been published to upon subscription you will receive the last 20 missed messages in the order they were published. + */ + subscribe(senderUuid: string, name: string, topic: string, listener: (message: any, uuid: string, name: string) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + subscribe(senderUuid: string, topic: string, listener: (message: any, uuid: string, name: string) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Unsubscribes to messages from the specified application on the specified topic. + */ + unsubscribe(senderUuid: string, name: string, topic: string, listener: (message: any, uuid: string, name: string) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + unsubscribe(senderUuid: string, topic: string, listener: (message: any, uuid: string, name: string) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + } + + interface OpenFinNotificationStatic { + /** + * ctor + */ + new (options: NotificationOptions, callback?: () => void, errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): OpenFinNotification; + /** + * Gets an instance of the current notification. For use within a notification window to close the window or send a message back to its parent application. + */ + getCurrent(): OpenFinNotification; + } + + /** + * Notification + * Notification represents a window on OpenFin Runtime which is shown briefly to the user on the bottom-right corner of the primary monitor. A notification is typically used to alert the user of some important event which requires his or her attention. Notifications are a child or your application that are controlled by the runtime. + */ + interface OpenFinNotification { + /** + * Closes the notification. + */ + close(callback?: () => void): void; + /** + * Sends a message to the notification. + */ + sendMessage(message: any, callback?: () => void): void; + /** + * Sends a message from the notification to the application that created the notification. The message is handled by the notification's onMessage callback. + */ + sendMessageToApplication(message: any, callback?: () => void): void; + } + + interface NotificationOptions { + /** + * A boolean that will force dismissal even if the mouse is hovering over the notification + */ + ignoreMouseOver?: boolean; + /** + * A message of any primitive or composite-primitive type to be passed to the notification upon creation. + */ + message?: any; + /** + * The timeout for displaying a notification.Can be in milliseconds or "never". + */ + duration?: number | "never"; + /** + * The url of the notification + */ + url?: string; + /** + * A function that is called when a notification is clicked. + */ + onClick?(callback: () => void): void; + /** + * Invoked when the notification is closed via .close() method on the created notification instance or the by the notification itself via fin.desktop.Notification.getCurrent().close(). NOTE: this is not invoked when the notification is dismissed via a swipe. For the swipe dismissal callback see onDismiss + */ + onClose?(callback: () => void): void; + /** + * Invoked when a the notification is dismissed by swiping it off the screen to the right. NOTE: this is no fired on a programmatic close. + */ + onDismiss?(callback: () => void): void; + /** + * A function that is called when an error occurs.The reason for the error is passed as an argument. + */ + onError?(errorCallback: (reason: string, errorObj: NetworkErrorInfo) => void): void; + /** + * The onMessage function will respond to messages sent from notification.sendMessageToApplication.The function is passed the message, which can be of any primitive or composite-primitive type. + */ + onMessage?(callback: (message: any) => void): void; + /** + * A function that is called when a notification is shown. + */ + onShow?(callback: (successObj: SuccessObj) => void): void; + } + + /** + * System + * An object representing the core of OpenFin Runtime. Allows the developer to perform system-level actions, such as accessing logs, viewing processes, clearing the cache and exiting the runtime. + */ + interface OpenFinSystem { + /** + * + */ + Clipboard: OpenFinClipboard; + /** + * Registers an event listener on the specified event. + */ + addEventListener(type: OpenFinSystemEventType, listener: (event: SystemBaseEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Clears cached data containing window state/positions, application resource files (images, HTML, JavaScript files), cookies, and items stored in the Local Storage. + */ + clearCache(options: CacheOptions, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Clears all cached data when OpenFin Runtime exits. + */ + deleteCacheOnExit(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Downloads the given application asset + */ + downloadAsset(assetObj: AppAssetInfo, progressListener?: (progress: { downloadedBytes: number, totalBytes: number }) => void, callback?: (successObj: { path: string }) => void, errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): void; + /** + * Exits the Runtime. + */ + exit(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of data for all applications. + */ + getAllApplications(callback?: (applicationInfoList: ApplicationInfo[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of data for all external applications. + */ + getAllExternalApplications(callback?: (applicationInfoList: ApplicationInfo[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of data (name, ids, bounds) for all application windows. + */ + getAllWindows(callback?: (windowInfoList: WindowDetails[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the command line argument string that started OpenFin Runtime. + */ + getCommandLineArguments(callback?: (args: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the configuration object that started the OpenFin Runtime. + */ + getDeviceId(callback?: (uuid: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Gets the value of a given environment variable on the computer on which the runtime is installed. + */ + getEnvironmentVariable(envVar: string, callback?: (variable: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the contents of the log with the specified filename. + */ + getLog(logFileName: string, callback?: (variable: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array containing information for each log file. + */ + getLogList(callback?: (logInfoList: LogInfo[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an object that contains data about the about the monitor setup of the computer that the runtime is running on. + */ + getMonitorInfo(callback?: (monitorInfo: MonitorInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Returns the mouse in virtual screen coordinates (left, top). + */ + getMousePosition(callback?: (mousePosition: VirtualScreenCoordinates) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of all of the runtime processes that are currently running. Each element in the array is an object containing the uuid and the name of the application to which the process belongs. + */ + getProcessList(callback?: (processInfoList: ProcessInfo[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the Proxy settings. + */ + getProxySettings(callback?: (proxy: ProxyInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Returns information about the running RVM in an object. + */ + getRvmInfo(callback?: (rvmInfo: RvmInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Returns the version of the runtime. The version contains the major, minor, build and revision numbers. + */ + getVersion(callback?: (version: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Runs an executable or batch file. + */ + launchExternalProcess(options: ExternalProcessLaunchInfo, callback?: (payload: { uuid: string }) => void, errorCallback?: (reason: string) => void): void; + /** + * Writes the passed message into both the log file and the console. + */ + log(level: "debug" | "info" | "warn" | "error", message: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Monitors a running process. + */ + monitorExternalProcess(options: ExternalProcessInfo, callback?: (payload: { uuid: string }) => void, errorCallback?: (reason: string) => void): void; + /** + * Opens the passed URL in the default web browser. + */ + openUrlWithBrowser(url: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * This function call will register a unique id and produce a token. The token can be used to broker an external connection. + */ + registerExternalConnection(uuid: string, callback?: (detail: { + /** + * this will be unique each time + */ + token: string; + /** + * "remote-connection-uuid" + */ + uuid: string; + }) => void, errorCallback?: (reason: string) => void): void; + /** + * Removes the process entry for the passed UUID obtained from a prior call of fin.desktop.System.launchExternalProcess(). + */ + releaseExternalProcess(processUuid: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Removes a previously registered event listener from the specified event. + */ + removeEventListener(type: OpenFinSystemEventType, listener: (event: SystemBaseEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Shows the Chrome Developer Tools for the specified window. + */ + showDeveloperTools(uuid: string, name: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Attempt to close an external process. The process will be terminated if it has not closed after the elapsed timeout in milliseconds. + */ + terminateExternalProcess(processUuid: string, timeout: number, killTree: boolean, callback?: (info: { result: "clean" | "terminated" | "failed" }) => void, errorCallback?: (reason: string) => void): void; + terminateExternalProcess(processUuid: string, timeout: number, callback?: (info: { result: "clean" | "terminated" | "failed" }) => void, errorCallback?: (reason: string) => void): void; + /** + * Update the OpenFin Runtime Proxy settings. + */ + updateProxySettings(type: string, address: string, port: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + + } + + interface CacheOptions { + cache?: boolean; + cookies?: boolean; + localStorage?: boolean; + appcache?: boolean; + userData?: boolean; + } + + interface AppAssetInfo { + src?: string; + alias?: string; + version?: string; + target?: string; + args?: string; + } + + interface ApplicationInfo { + /** + * true when the application is running. + */ + isRunning?: boolean; + /** + * uuid of the application. + */ + uuid?: string; + /** + * uuid of the application that launches this application. + */ + parentUuid?: string; + } + + interface WindowDetails { + uuid?: string; + mainWindow?: WindowInfo; + childWindows?: WindowInfo[]; + } + + interface WindowInfo { + /** + * name of the child window + */ + name?: string; + /** + * top-most coordinate of the child window + */ + top?: number; + /** + * right-most coordinate of the child window + */ + right?: number; + /** + * bottom-most coordinate of the child window + */ + bottom?: number; + /** + * left-most coordinate of the child window + */ + left?: number; + } + + interface LogInfo { + /** + * the filename of the log + */ + name?: string; + /** + * the size of the log in bytes + */ + size?: number; + /** + * the unix time at which the log was created "Thu Jan 08 2015 14:40:30 GMT-0500 (Eastern Standard Time)" + */ + date?: string; + } + + interface ProcessInfo { + /** + * the percentage of total CPU usage + */ + cpuUsage?: number; + /** + * the application name + */ + name?: string; + /** + * the current nonpaged pool usage in bytes + */ + nonPagedPoolUsage?: number; + /** + * the number of page faults + */ + pageFaultCount?: number; + /** + * the current paged pool usage in bytes + */ + pagedPoolUsage?: number; + /** + * the total amount of memory in bytes that the memory manager has committed + */ + pagefileUsage?: number; + /** + * the peak nonpaged pool usage in bytes + */ + peakNonPagedPoolUsage?: number; + /** + * the peak paged pool usage in bytes + */ + peakPagedPoolUsage?: number; + /** + * the peak value in bytes of pagefileUsage during the lifetime of this process + */ + peakPagefileUsage?: number; + /** + * the peak working set size in bytes + */ + peakWorkingSetSize?: number; + /** + * the native process identifier + */ + processId?: number; + /** + * the application UUID + */ + uuid?: string; + /** + * the current working set size (both shared and private data) in bytes + */ + workingSetSize?: number; + } + + interface ProxyInfo { + /** + * the configured Proxy Address + */ + proxyAddress?: string; + /** + * the configured Proxy port + */ + proxyPort?: number; + /** + * Proxy Type + */ + type?: string; + } + + interface RvmInfo { + version?: string; + "start-time"?: string; + } + + interface ExternalProcessLaunchInfo { + path?: string; + /** + * Additionally note that the executable found in the zip file specified in appAssets + * will default to the one mentioned by appAssets.target + * If the the path below refers to a specific path it will override this default + */ + alias?: string; + /** + * When using alias; if no arguments are passed then the arguments (if any) + * are taken from the 'app.json' file, from the 'args' parameter + * of the 'appAssets' Object with the relevant 'alias'. + * If 'arguments' is passed as a parameter it takes precedence + * over any 'args' set in the 'app.json'. + */ + arguments?: string; + listener?: (result: { + /** + * "Exited" Or "released" on a call to releaseExternalProcess + */ + topic?: string; + /** + * The mapped UUID which identifies the launched process + */ + uuid?: string; + /* + * Process exit code + */ + exitCode?: number; + }) => void; + certificate?: CertificationInfo; + } + + interface CertificationInfo { + /** + * A hex string with or without spaces + */ + serial?: string; + /** + * An internally tokenized and comma delimited string allowing partial or full checks of the subject fields + */ + subject?: string; + /** + * A hex string with or without spaces + */ + publickey?: string; + /** + * A hex string with or without spaces + */ + thumbprint?: string; + /** + * A boolean indicating that the certificate is trusted and not revoked + */ + trusted?: boolean; + } + + interface ExternalProcessInfo { + pid?: number; + listener?: (result: { + /** + * "Exited" Or "released" on a call to releaseExternalProcess + */ + topic?: string; + /** + * The mapped UUID which identifies the launched process + */ + uuid?: string; + /* + * Process exit code + */ + exitCode?: number; + }) => void; + } + + interface OpenFinWindowStatic { + /** + * Class: Window + * + * new Window(options, callbackopt, errorCallbackopt) + * + * Creates a new OpenFin Window + * + * A basic window that wraps a native HTML window. Provides more fine-grained control over the window state such as the ability to minimize, maximize, restore, etc. By default a window does not show upon instantiation; instead the window's show() method must be invoked manually. The new window appears in the same process as the parent window. + * @param {any} options - The options of the window + * @param {Function} [callback] - Called if the window creation was successful + * @param {number} [callback.successObj] - httpResponseCode + */ + new (options: WindowOptions, callback?: (successObj: { httpResponseCode: number }) => void, errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): OpenFinWindow; + /** + * Returns an instance of the current window. + * @returns {OpenFinWindow} Current window + */ + getCurrent(): OpenFinWindow; + /** + * Returns a Window object that wraps an existing window. + */ + wrap(appUuid: string, windowName: string): OpenFinWindow; + } + + /** + * Window + * A basic window that wraps a native HTML window. Provides more fine-grained control over the window state such as the ability to minimize, maximize, restore, etc. By default a window does not show upon instantiation; instead the window's show() method must be invoked manually. The new window appears in the same process as the parent window. + */ + interface OpenFinWindow { + /** + * Name of window + */ + name: string; + /** + * Returns the native JavaScript "window" object for the window. This method can only be used by the parent application or the window itself, otherwise it will return undefined. The same Single-Origin-Policy (SOP) rules apply for child windows created by window.open(url) in that the contents of the window object are only accessible if the URL has the same origin as the invoking window. See example below. Also, will not work with fin.desktop.Window objects created with fin.desktop.Window.wrap(). + * @returns {Window} Native window + */ + getNativeWindow(): Window; + /** + * Gets the parent application. + * @returns {OpenFinApplication} Parent application + */ + getParentApplication(): OpenFinApplication; + /** + * Gets the parent window. + */ + getParentWindow(): OpenFinWindow; + /** + * Registers an event listener on the specified event. + */ + addEventListener(type: OpenFinWindowEventType, listener: (event: WindowBaseEvent | WindowAuthRequestedEvent | WindowBoundsEvent | WindowExternalProcessStartedEvent | WindowExternalProcessExited | WindowGroupChangedEvent | WindowHiddenEvent | Window_NavigationRejectedEvent) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Performs the specified window transitions + */ + animate(transitions: AnimationTransition, options: AnimationOptions, callback?: (event: any) => void, errorCallback?: (reason: string) => void): void; + /** + * Provides credentials to authentication requests + */ + authenticate(userName: string, password: string, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Removes focus from the window. + */ + blur(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Brings the window to the front of the OpenFin window stack. + */ + bringToFront(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Closes the window. + * @param {force} Close will be prevented from closing when force is false and close-requested has been subscribed to for applications main window. + */ + close(force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Prevents a user from changing a window's size/position when using the window's frame. + * 'disabled-frame-bounds-changing' is generated at the start of and during a user move/size operation. + * 'disabled-frame-bounds-changed' is generated after a user move/size operation. + * The events provide the bounds that would have been applied if the frame was enabled. + * 'frame-disabled' is generated when an enabled frame becomes disabled. + */ + disableFrame(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Re-enables user changes to a window's size/position when using the window's frame. + * 'disabled-frame-bounds-changing' is generated at the start of and during a user move/size operation. + * 'disabled-frame-bounds-changed' is generated after a user move/size operation. + * The events provide the bounds that would have been applied if the frame was enabled. + * 'frame-enabled' is generated when a disabled frame has becomes enabled. + */ + enableFrame(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Flashes the windows frame and taskbar icon until the window is activated. + */ + flash(options?: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Gives focus to the window. + */ + focus(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Gets the current bounds (top, left, width, height) of the window. + */ + getBounds(callback?: (bounds: WindowBounds) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array containing wrapped fin.desktop.Windows that are grouped with this window. If a window is not in a group an empty array is returned. Please note that calling window is included in the result array. + */ + getGroup(callback?: (group: OpenFinWindow[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Gets the current settings of the window. + */ + getOptions(callback?: (options: WindowOptions) => void, errorCallback?: (reason: string) => void): void; + /** + * Gets a base64 encoded PNG snapshot of the window. + */ + getSnapshot(callback?: (base64Snapshot: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Gets the current state ("minimized", "maximized", or "restored") of the window. + */ + getState(callback?: (state: "minimized" | "maximized" | "restored") => void, errorCallback?: (reason: string) => void): void; + /** + * Returns the zoom level of the window. + */ + getZoomLevel(callback?: (level: number) => void, errorCallback?: (reason: string) => void): void; + /** + * Hides the window. + */ + hide(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Determines if the window is currently showing. + */ + isShowing(callback?: (showing: boolean) => void, errorCallback?: (reason: string) => void): void; + /** + * Joins the same window group as the specified window. + */ + joinGroup(target: OpenFinWindow, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Leaves the current window group so that the window can be move independently of those in the group. + */ + leaveGroup(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Maximizes the window. + */ + maximize(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Merges the instance's window group with the same window group as the specified window + */ + mergeGroups(target: OpenFinWindow, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Minimizes the window. + */ + minimize(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Moves the window by a specified amount. + */ + moveBy(deltaLeft: number, deltaTop: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Moves the window to a specified location. + */ + moveTo(left: number, top: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Removes a previously registered event listener from the specified event. + */ + removeEventListener(type: OpenFinWindowEventType, listener: (event: WindowBaseEvent | WindowAuthRequestedEvent | WindowBoundsEvent | WindowExternalProcessStartedEvent | WindowExternalProcessExited | WindowGroupChangedEvent | WindowHiddenEvent | Window_NavigationRejectedEvent) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Resizes the window by a specified amount. + */ + resizeBy(deltaWidth: number, deltaHeight: number, anchor: OpenFinAnchor, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Resizes the window by a specified amount. + */ + resizeTo(width: number, height: number, anchor: OpenFinAnchor, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Restores the window to its normal state (i.e., unminimized, unmaximized). + */ + restore(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Will bring the window to the front of the entire stack and give it focus. + */ + setAsForeground(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Sets the window's size and position + */ + setBounds(left: number, top: number, width: number, height: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Sets the zoom level of the window. + */ + setZoomLevel(level: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Shows the window if it is hidden. + * @param {force} Show will be prevented from closing when force is false and show-requested has been subscribed to for applications main window. + */ + show(force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Shows the window if it is hidden at the specified location. If the toggle parameter is set to true, the window will alternate between showing and hiding. + */ + showAt(left: number, top: number, force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Stops the taskbar icon from flashing. + */ + stopFlashing(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Updates the window using the passed options + */ + updateOptions(options: WindowOptions, callback?: () => void, errorCallback?: (reason: string) => void): void; + } + + interface ApplicationBaseEvent { + topic: string; + type: OpenFinApplicationEventType; + uuid: string; + } + + interface TrayIconClickedEvent extends ApplicationBaseEvent { + button: number; // 0 for left, 1 for middle, 2 for right + monitorInfo: MonitorInfo; + x: number; // the cursor x coordinate + y: number; // the cursor y coordinate + } + + interface WindowEvent extends ApplicationBaseEvent { + name: string; + } + + interface WindowAlertRequestedEvent extends WindowEvent { + message: string; + url: string; + } + + interface WindowAuthRequested extends WindowEvent { + authInfo: { + host: string; + isProxy: boolean; + port: number; + realm: string; + scheme: string; + }; + } + + interface WindowNavigationRejectedEvent extends WindowEvent { + sourceName: string; + url: string; + } + + interface WindowEndLoadEvent extends WindowEvent { + documentName: string; + isMain: boolean; + } + + interface MonitorInfoChangedEvent extends MonitorInfo { + topic: "system"; + type: "monitor-info-changed"; + } + + interface MonitorInfo { + nonPrimaryMonitors: MonitorInfoDetail[]; + primaryMonitor: MonitorInfoDetail; + reason: string; + taskbar: { + edge: "left" | "right" | "top" | "bottom", + rect: MontiorCoordinates + }; + topic: "system"; + type: "monitor-info-changed"; + virtualScreen: MontiorCoordinates; + } + + interface MonitorInfoDetail { + availableRect: MontiorCoordinates; + deviceId: string; + displayDeviceActive: boolean; + monitorRect: MontiorCoordinates; + name: string; + } + + interface MontiorCoordinates { + bottom: number; + left: number; + right: number; + top: number; + } + + interface VirtualScreenCoordinates { + left: number; + top: number; + } + + interface SystemBaseEvent { + topic: string; + type: OpenFinSystemEventType; + uuid: string; + } + + interface DesktopIconClickedEvent { + mouse: { + /** + * the left virtual screen coordinate of the mouse + */ + left: number, + /** + * the top virtual screen coordinate of the mouse + */ + top: number + }; + /** + * the number of milliseconds that have elapsed since the system was started, + */ + tickCount: number; + topic: "system"; + type: "desktop-icon-clicked"; + } + + interface IdleStateChangedEvent { + /** + * How long in milliseconds since the user has been idle. + */ + elapsedTime: number; + /** + * true when the user is idle,false when the user has returned; + */ + isIdle: boolean; + topic: "system"; + type: "idle-state-changed"; + } + + interface WindowBaseEvent { + /** + * the name of the window + */ + name: string; + /** + * always window + */ + topic: "window"; + /** + * window event type + */ + type: OpenFinWindowEventType; + /** + * the UUID of the application the window belongs to + */ + uuid: string; + } + + interface WindowAuthRequestedEvent extends WindowBaseEvent { + authInfo: { + host: string; + isProxy: boolean; + port: number; + realm: string; + scheme: string; + }; + } + + interface WindowBoundsEvent extends WindowBaseEvent { + /** + * describes what kind of change occurred. + * 0 means a change in position. + * 1 means a change in size. + * 2 means a change in position and size. + */ + changeType: number; + /** + * true when pending changes have been applied to the window. + */ + deferred: boolean; + /** + * the new height of the window. + */ + height: number; + /** + * the left-most coordinate of the window. + */ + left: number; + /** + * the top-most coordinate of the window. + */ + top: number; + /** + * + */ + type: "bounds-changed" | "bounds-changing" | "disabled-frame-bounds-changed" | "disabled-frame-bounds-changing"; + /** + * the new width of the window. + */ + width: number; + } + + interface WindowExternalProcessStartedEvent extends WindowBaseEvent { + /** + * the process handle uuid + */ + processUuid: string; + type: "external-process-started"; + } + + interface WindowExternalProcessExited extends WindowBaseEvent { + /** + * the process exit code + */ + exitCode: number; + /** + * the process handle uuid + */ + processUuid: string; + type: "external-process-exited"; + } + + interface WindowGroupChangedEvent extends WindowBaseEvent { + /** + * Which group array the window that the event listener was registered on is included in: + * 'source' The window is included in sourceGroup. + * 'target' The window is included in targetGroup. + * 'nothing' The window is not included in sourceGroup nor targetGroup. + */ + memberOf: "source" | "target" | "nothing"; + /** + * The reason this event was triggered. + * 'leave' A window has left the group due to a leave or merge with group. + * 'join' A window has joined the group. + * 'merge' Two groups have been merged together. + * 'disband' There are no other windows in the group. + */ + reason: "leave" | "join" | "merge" | "disband"; + /** + * All the windows in the group the sourceWindow originated from. + */ + sourceGroup: WindowOfGroupInfo[]; + /** + * The UUID of the application the sourceWindow belongs to The source window is the window in which (merge/join/leave)group(s) was called. + */ + sourceWindowAppUuid: string; + /** + * the name of the sourcewindow.The source window is the window in which(merge / join / leave) group(s) was called. + */ + sourceWindowName: string; + /** + * All the windows in the group the targetWindow orginated from + */ + targetGroup: WindowOfGroupInfo[]; + /** + * The UUID of the application the targetWindow belongs to. The target window is the window that was passed into (merge/join) group(s). + */ + targetWindowAppUuid: string; + /** + * The name of the targetWindow. The target window is the window that was passed into (merge/join) group(s). + */ + targetWindowName: string; + type: "group-changed"; + } + + interface WindowOfGroupInfo { + /** + * The UUID of the application this window entry belongs to. + */ + appUuid: string; + /** + * The name of this window entry. + */ + windowName: string; + } + + interface WindowHiddenEvent extends WindowBaseEvent { + /** + * What action prompted the close. + * The reasons are: "hide", "hide-on-close" + */ + reason: "hide" | "hide-on-close"; + type: "hidden"; + } + + interface Window_NavigationRejectedEvent { + name: string; + /** + * source of navigation window name + */ + sourceName: string; + topic: "navigation-rejected"; + /** + * Url that was not reached "http://blocked-content.url" + */ + url: string; + /** + * the UUID of the application the window belongs to. + */ + uuid: string; + } + + interface AnimationTransition { + opacity?: { + /** + * This value is clamped from 0.0 to 1.0 + */ + opacity?: number; + /** + * The total time in milliseconds this transition should take. + */ + duration?: number; + /** + * Treat 'opacity' as absolute or as a delta. Defaults to false. + */ + relative?: boolean; + }; + position?: { + /** + * Defaults to the window's current left position in virtual screen coordinates. + */ + left?: number; + /** + * Defaults to the window's current top position in virtual screen coordinates. + */ + top?: number; + /** + * The total time in milliseconds this transition should take. + */ + duration?: number; + /** + * Treat 'left' and 'top' as absolute or as deltas. Defaults to false. + */ + relative?: boolean; + }; + size?: { + /** + * Optional if height is present. Defaults to the window's current width. + */ + width?: number; + /** + * Optional if width is present. Defaults to the window's current height. + */ + height?: number; + /** + * The total time in milliseconds this transition should take. + */ + duration?: number; + /** + * Treat 'width' and 'height' as absolute or as deltas. Defaults to false. + */ + relative?: boolean; + }; + } + + interface AnimationOptions { + /** + * This option interrupts the current animation. When false it pushes this animation onto the end of the animation queue. + */ + interrupt?: boolean; + /** + * Transition effect. Defaults to 'ease-in-out'. + */ + tween?: OpenFinTweenType; + } + + interface WindowBounds { + /** + * the height of the window. + */ + height?: number; + /** + * left-most coordinate of the window. + */ + left?: number; + /** + * top-most coordinate of the window. + */ + top?: number; + /** + * the width of the window. + */ + width?: number; + } + + interface SessionChangedEvent { + /** + * the action that triggered this event: + */ + reason: "lock" + | "unlock" + | "remote-connect" + | "remote-disconnect" + | "unknown"; + topic: "system"; + type: "session-changed"; + } + + type OpenFinTweenType = "linear" + | "ease-in" + | "ease-out" + | "ease-in-out" + | "ease-in-quad" + | "ease-out-quad" + | "ease-in-out-quad" + | "ease-in-cubic" + | "ease-out-cubic" + | "ease-in-out-cubic" + | "ease-out-bounce" + | "ease-in-back" + | "ease-out-back" + | "ease-in-out-back" + | "ease-in-elastic" + | "ease-out-elastic" + | "ease-in-out-elastic"; + + type OpenFinApplicationEventType = "closed" + | "connected" + | "crashed" + | "initialized" + | "manifest-changed" + | "not-responding" + | "out-of-memory" + | "responding" + | "run-requested" + | "started" + | "tray-icon-clicked" + | "window-alert-requested" + | "window-auth-requested" + | "window-closed" + | "window-created" + | "window-end-load" + | "window-navigation-rejected" + | "window-show-requested" + | "window-start-load"; + + type OpenFinExternalApplicationEventType = "connected" + | "disconnected"; + + type OpenFinSystemEventType = "application-closed" + | "application-crashed" + | "application-created" + | "application-started" + | "desktop-icon-clicked" + | "idle-state-changed" + | "monitor-info-changed" + | "session-changed"; + + type OpenFinWindowEventType = "auth-requested" + | "blurred" + | "bounds-changed" + | "bounds-changing" + | "close-requested" + | "closed" + | "disabled-frame-bounds-changed" + | "disabled-frame-bounds-changing" + | "embedded" + | "external-process-exited" + | "external-process-started" + | "focused" + | "frame-disabled" + | "frame-enabled" + | "group-changed" + | "hidden" + | "initialized" + | "maximized" + | "minimized" + | "navigation-rejected" + | "restored" + | "show-requested" + | "shown"; + + type OpenFinAnchor = "top-left" + | "top-right" + | "bottom-left" + | "bottom-right"; +} \ No newline at end of file diff --git a/openfin/v15/openfin-tests.ts b/openfin/v15/openfin-tests.ts new file mode 100644 index 0000000000..7aa2930089 --- /dev/null +++ b/openfin/v15/openfin-tests.ts @@ -0,0 +1,718 @@ + +function test_application() { + let application: fin.OpenFinApplication; + // constructor + application = new fin.desktop.Application({ + url: "application.html", + uuid: "74BED629-2D8E-4141-8582-73E364BDFA74", + name: "Application Name", + mainWindowOptions: { + defaultHeight: 600, + defaultWidth: 800, + defaultTop: 300, + defaultLeft: 300, + autoShow: true + } + }, function (successObj) { + console.log("Application successfully created, HTTP response code:", successObj); + application.run(); + }, function (error) { + console.log("Error creating application:", error); + }); + // getCurrent + application = fin.desktop.Application.getCurrent(); + // wrap + application = fin.desktop.Application.wrap("454C7F31-A915-4EA2-83F2-CFA655453C52"); + // getWindow + application.getWindow(); + // addEventListener + application.addEventListener("closed", function (event) { + console.log("The application has closed"); + }, function () { + console.log("The registration was successful"); + }, function (reason) { + console.log("failure: " + reason); + }); + // close + application.close(); + // getChildWindows + application.getChildWindows(function (children) { + children.forEach(function (childWindow) { + console.log("Showing child: " + childWindow.name); + childWindow.show(); + }); + }); + // getGroups + application.getGroups(function (allGroups) { + console.log("There are a total of " + allGroups.length + " groups."); + + var groupCounter = 1; + allGroups.forEach(function (windowGroup) { + console.log("Group " + groupCounter + " contains " + + windowGroup.length + " windows."); + ++groupCounter; + }); + }); + // getManifest + application.getManifest(function (manifest) { + console.log("Application manifest:"); + console.log(manifest); + }); + // getParentUuid + application.getParentUuid(function (parentUuid) { + console.log("UUID of parent application:"); + console.log(parentUuid); + }); + // getShortcuts + application.getShortcuts(function (config) { + console.log("Desktop shortcut is enabled: ", config.desktop); + console.log("Start Menu shortcut is enabled: ", config.startMenu); + console.log("System Startup shortcut is enabled: ", config.systemStartup); + }); + // isRunning + application.isRunning(function (running) { + console.log("the application is", running ? "running" : "not running"); + }); + // registerCustomData + application.registerCustomData({ + someData: "this is custom" + }, function () { + console.log("You will not read this."); + }, function (err) { + console.log("failure:", err); + }); + // removeEventListener + let previousCallback = function (event: fin.WindowEvent) { }; + application.removeEventListener("closed", previousCallback, function () { + console.log("The unregistration was successful"); + }, function (err) { + console.log("failure:", err); + }); + // removeTrayIcon + application.removeTrayIcon(function () { + console.log("Removed the tray icon."); + }, function (err) { + console.log("failure:", err); + }); + // restart + application.restart(function () { + console.log("You will not read this."); + }, function (err) { + console.log("failure:", err); + }); + // schedule restart + application.scheduleRestart(function () { + console.log("You will not read this."); + }, function (err) { + console.log("failure:", err); + }); + // setShortcuts + application.setShortcuts({ + desktop: true, + startMenu: false, + systemStartup: true + }, function () { + console.log("Successfully set new shortcut states"); + }, function (error) { + console.log("Failed to set new shortcut states. Error: ", error); + }); + // setTrayIcon + application.setTrayIcon("https://developer.openf.in/download/openfin.png", function (clickInfo) { + console.log("The mouse has clicked at (" + clickInfo.x + "," + clickInfo.y + ")"); + }); + // terminate + application.terminate(); + // wait + application.addEventListener("not-responding", function () { + console.log("waiting for hung application"); + application.wait(); + }); +} + +function test_external_application() { + let externalApp: fin.OpenFinExternalApplication; + // wrap + externalApp = fin.desktop.ExternalApp.wrap('my-uuid'); + // addEventListener + externalApp.addEventListener('connected', () => { + console.log('external app connected'); + }, () => { + console.log('The registration was successful'); + }, (reason, err) => { + console.log(`Error Message: ${err.message} Error Stack: ${err.stack}`); + }); + // removeEventListener + let previousCallback = function () { }; + externalApp.removeEventListener('connected', previousCallback, () => { + console.log('The unregistration was successful'); + }, (reason, err) => { + console.log(`Error Message: ${err.message} Error Stack: ${err.stack}`); + }); +} + +function test_inter_application_bus() { + // addSubscribeListener + fin.desktop.InterApplicationBus.addSubscribeListener(function (uuid, topic, name) { + console.log("The application " + uuid + " has subscribed to " + topic); + }); + // addUnsubscribeListener + fin.desktop.InterApplicationBus.addUnsubscribeListener(function (uuid, topic, name) { + console.log("The application " + uuid + " has unsubscribed to " + topic); + }); + // removeSubscribeListener + let aRegisteredListener = function (uuid: string, topic: string, name: string) { }; + fin.desktop.InterApplicationBus.removeSubscribeListener(aRegisteredListener); + // removeUnsubscribeListener + fin.desktop.InterApplicationBus.removeUnsubscribeListener(aRegisteredListener); + // publish + fin.desktop.InterApplicationBus.publish("a topic", { + field1: "value1", + field2: "value2" + }); + // send + fin.desktop.InterApplicationBus.send("an application's uuid", "a topic", { + field1: "value1", + field2: "value2" + }); + // subscribe + fin.desktop.InterApplicationBus.subscribe("*", "a topic", function (message, uuid, name) { + console.log("The application " + uuid + " sent this message: " + message); + }); + // unsubscribe + let aRegisteredMessageListener = function (message: any, senderUuid: string) { + console.log(message, senderUuid); + }; + fin.desktop.InterApplicationBus.unsubscribe("*", "a topic", aRegisteredMessageListener); +} + +function test_notification() { + let notification: fin.OpenFinNotification; + // getCurrent + notification = fin.desktop.Notification.getCurrent(); + // close + notification.close(); + // sendMessage + notification = new fin.desktop.Notification({ + duration: 10, + url: "http://localhost:5000/Account/Register", + message: "Hello", + onShow: () => { }, + //onClose: () => { }, + onDismiss: () => { }, + //onClick: () => { }, + onMessage: () => { }, + onError: () => { } + }); + // sendMessageToApplication + notification.sendMessageToApplication("some message"); +} + +function test_system() { + // addEventListener + fin.desktop.System.addEventListener('monitor-info-changed', function (event) { + console.log("The monitor information has changed to: ", event); + }, function () { + console.log("The registration was successful"); + }, function (err) { + console.log("failure: " + err); + }); + // clearCache + fin.desktop.System.clearCache({ + cache: true, + cookies: true, + localStorage: true, + appcache: true, + userData: true + }); + // deleteCacheOnExit + fin.desktop.System.deleteCacheOnExit(function () { + console.log("successful"); + }, function (err) { + console.log("failure: " + err); + }); + // downloadAsset + let dirAppAsset = { + 'src': 'http://local:8000/dir.zip', + 'alias': 'dirApp', + 'version': '1.23.24', + 'target': 'dir.bat', + 'args': '' + }; + fin.desktop.System.downloadAsset(dirAppAsset, progress => { + let downloadedPercent = Math.floor((progress.downloadedBytes / progress.totalBytes) * 100); + console.log(`Downloaded ${downloadedPercent}%`); + }, p => { + console.log(`Downlod complete, can be found on ${p.path}`); + //lets launch our application asset. + //launchDirApp(); + }, (reason, err) => { + console.log(reason, err); + }); + // exit + fin.desktop.System.exit(function () { + console.log("successful"); + }, function (err) { + console.log("failure: " + err); + }); + // getAllApplications + fin.desktop.System.getAllApplications(function (applicationInfoList) { + applicationInfoList.forEach(function (applicationInfo) { + console.log("Showing information for application with uuid: " + + applicationInfo.uuid); + console.log("isRunning: ", applicationInfo.isRunning); + }); + }); + // getAllExternalApplications + fin.desktop.System.getAllExternalApplications(externalAppsInfoList => { + externalAppsInfoList.forEach(appInfo => { + console.log(`External app connected to the runtime with UUID ${appInfo.uuid}`); + }); + }); + // getAllWindows + fin.desktop.System.getAllWindows(function (windowInfoList) { + windowInfoList.forEach(function (windowInfo) { + console.log("Showing information for application with uuid: ", windowInfo.uuid); + console.log("Main window: ", windowInfo.mainWindow); + console.log("Child windows: ", windowInfo.childWindows); + }); + }); + // getCommandLineArguments + fin.desktop.System.getCommandLineArguments(function (args) { + console.log("The command line arguments are " + args); + }); + // getDeviceId + fin.desktop.System.getDeviceId(function (id) { + console.log("The id of the device is: " + id); + }); + // getEnvironmentVariable + fin.desktop.System.getEnvironmentVariable("APPDATA", function (variable) { + console.log("this is the APPDATA value", variable); + }); + // getLog + fin.desktop.System.getLog('debug-2015-01-08-22-27-53.log', function (log) { + console.log(log); + }); + // getLogList + fin.desktop.System.getLogList(function (logList) { + logList.forEach(function (logInfo) { + console.log("The filename of the log is " + + logInfo.name + ", the size is " + + logInfo.size + ", and the date of creation is " + + logInfo.date); + }); + }); + // getMonitorInfo + fin.desktop.System.getMonitorInfo(function (monitorInfo) { + console.log("This object contains information about all monitors: ", monitorInfo); + }); + // getMousePosition + fin.desktop.System.getMousePosition(function (mousePosition) { + console.log("The mouse is located at left: " + mousePosition.left + ", top: " + mousePosition.top); + }); + // getProcessList + fin.desktop.System.getProcessList(function (list) { + list.forEach(function (process) { + console.log("UUID: " + process.uuid + ", Application Name: " + process.name); + }); + }); + // getProxySettings + fin.desktop.System.getProxySettings(function (proxy) { + console.log(proxy); + }); + // getRvmInfo + fin.desktop.System.getRvmInfo(function (rvmInfoObject) { + console.log("RVM version:", rvmInfoObject.version); + console.log("RVM has been running since:", rvmInfoObject["start-time"]); + }, function (err) { + console.log("Failed to get rvm info, error message:", err); + }); + // getVersion + fin.desktop.System.getVersion(function (version) { + console.log("The version is " + version); + }); + // launchExternalProcess + fin.desktop.System.launchExternalProcess({ + path: "notepad", + arguments: "", + listener: function (result) { + console.log('the exit code', result.exitCode); + } + }, function (payload) { + console.log('Success:', payload.uuid); + }, function (error) { + console.log('Error:', error); + }); + // + fin.desktop.System.launchExternalProcess({ + //Additionally note that the executable found in the zip file specified in appAssets + //will default to the one mentioned by appAssets.target + //If the the path below refers to a specific path it will override this default + alias: "myApp", + listener: function (result) { + console.log('the exit code', result.exitCode); + } + }, function (payload) { + console.log('Success:', payload.uuid); + }, function (error) { + console.log('Error:', error); + }); + // + fin.desktop.System.launchExternalProcess({ + alias: "myApp", + arguments: "e f g", + listener: function (result) { + console.log('the exit code', result.exitCode); + } + }, function (payload) { + console.log('Success:', payload.uuid); + }, function (error) { + console.log('Error:', error); + }); + // + fin.desktop.System.launchExternalProcess({ + path: "C:\Users\ExampleUser\AppData\Local\OpenFin\OpenFinRVM.exe", + arguments: "--version", + certificate: { + trusted: true, + subject: 'O=OpenFin INC., L=New York, S=NY, C=US', + thumbprint: '‎3c a5 28 19 83 05 fe 69 88 e6 8f 4b 3a af c5 c5 1b 07 80 5b' + }, + listener: function (result) { + console.log('the exit code', result.exitCode); + } + }, function (payload) { + console.log('Success:', payload.uuid); + }, function (error) { + console.log('Error:', error); + }); + // log + fin.desktop.System.log("info", "An example log message", function () { + console.log("message successfully logged"); + }, function (err) { + console.log(err); + }); + // monitorExternalProcess + fin.desktop.System.monitorExternalProcess({ + pid: 2508, + listener: function (result) { + console.log('the exit code', result.exitCode); + } + }, function (payload) { + console.log("The process is now being monitored: ", payload.uuid); + }, function (error) { + console.log("Error:", error); + }); + // openUrlWithBrowser + fin.desktop.System.openUrlWithBrowser("https://developer.openf.in/", function () { + console.log("successful"); + }, function (err) { + console.log("failure: " + err); + }); + // registerExternalConnection + fin.desktop.System.registerExternalConnection("remote-connection-uuid", function () { + console.log(arguments); + }); + // releaseExternalProcess + fin.desktop.System.launchExternalProcess({ + path: "notepad", + arguments: "", + listener: function (result) { + console.log("The exit code", result.exitCode); + } + }, function (result) { + console.log("Result UUID is " + result.uuid); + + //release it. + fin.desktop.System.releaseExternalProcess(result.uuid, function () { + console.log("Process has been unmapped!"); + }, function (reason) { + console.log("failure: " + reason); + }); + }); + // removeEventListener + let aRegisteredListener = (event: fin.SystemBaseEvent) => { }; + fin.desktop.System.removeEventListener("monitor-info-changed", aRegisteredListener, function () { + console.log("successful"); + }, function (err) { + console.log("failure: " + err); + }); + // showDeveloperTools + fin.desktop.System.showDeveloperTools("uuid", "name", function () { + console.log("successful"); + }, function (err) { + console.log("failure: " + err); + }); + // terminateExternalProcess + fin.desktop.System.launchExternalProcess({ + // notepad is in the system’s PATH + path: "notepad", + arguments: "", + listener: function (result) { + console.log("The exit code", result.exitCode); + } + }, function (result) { + console.log("Result UUID is " + result.uuid); + + // Attempt to close the process. Terminate after 4 seconds if it + // has not done so. + fin.desktop.System.terminateExternalProcess(result.uuid, 4000, function (info) { + console.log("Termination result " + info.result); + }, function (reason) { + console.log("failure: " + reason); + }); + }); + // updateProxySettings + fin.desktop.System.updateProxySettings("type", "proxyAddress", 8080, function () { + console.log('success'); + }, function (err) { + console.log(err); + }); +} + +function test_system_clipboard() { + // availableFormats + fin.desktop.System.Clipboard.availableFormats(null, formats => { + formats.forEach(format => console.log(`The format ${format} is available to read`)); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // readHtml + fin.desktop.System.Clipboard.readHtml(null, html => { + console.log(`This is the html from the clipboard: ${html}`); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // readRtf + fin.desktop.System.Clipboard.readRtf(null, rtf => { + console.log(`This is the rtf from the clipboard: ${rtf}`); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // readText + fin.desktop.System.Clipboard.readText(null, text => { + console.log(`This is the text from the clipboard: ${text}`); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // write + fin.desktop.System.Clipboard.write({ + text: 'Hello Text!', + html: '

Hello Html

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

Hello World

', null, () => { + console.log('Success!!'); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // writeRtf + fin.desktop.System.Clipboard.writeRtf('Hello World!', null, () => { + console.log('Success!!'); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // writeText + fin.desktop.System.Clipboard.writeText('Hello World', null, () => { + console.log('Success!!'); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); +} + +function test_window() { + let finWindow: fin.OpenFinWindow; + // constructor + finWindow = new fin.desktop.Window({ + name: "childWindow", + url: "child.html", + defaultWidth: 320, + defaultHeight: 320, + defaultTop: 10, + defaultLeft: 300, + frame: false, + resizable: false, + state: "normal" + }, 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/openfin/v15/tsconfig.json b/openfin/v15/tsconfig.json new file mode 100644 index 0000000000..894da85738 --- /dev/null +++ b/openfin/v15/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "paths": { + "openfin": [ + "openfin/v15" + ] + }, + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "openfin-tests.ts" + ] +} diff --git a/openfin/v15/tslint.json b/openfin/v15/tslint.json new file mode 100644 index 0000000000..af53769b6b --- /dev/null +++ b/openfin/v15/tslint.json @@ -0,0 +1 @@ +{ "extends": "../../tslint.json" } diff --git a/openjscad/tsconfig.json b/openjscad/tsconfig.json index cbe9ef903a..a43234fe34 100644 --- a/openjscad/tsconfig.json +++ b/openjscad/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/openlayers/tsconfig.json b/openlayers/tsconfig.json index aad70ddfa3..9e86dbffeb 100644 --- a/openlayers/tsconfig.json +++ b/openlayers/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/openlayers/v2/tsconfig.json b/openlayers/v2/tsconfig.json index 990ee92bbb..7f1aebdfe4 100644 --- a/openlayers/v2/tsconfig.json +++ b/openlayers/v2/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "openlayers": ["openlayers/v2"] + "openlayers": [ + "openlayers/v2" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/openpgp/tsconfig.json b/openpgp/tsconfig.json index 73f89c49fe..96cb0b8ce6 100644 --- a/openpgp/tsconfig.json +++ b/openpgp/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/opentok/tsconfig.json b/opentok/tsconfig.json index e505943957..53754e457d 100644 --- a/opentok/tsconfig.json +++ b/opentok/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/opentype.js/tsconfig.json b/opentype.js/tsconfig.json index 48e0006c29..c63c42c750 100644 --- a/opentype.js/tsconfig.json +++ b/opentype.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/openui5/tsconfig.json b/openui5/tsconfig.json index 97d54dd860..45c2bfccaa 100644 --- a/openui5/tsconfig.json +++ b/openui5/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/opn/tsconfig.json b/opn/tsconfig.json index 89026a7eb4..a53810b06c 100644 --- a/opn/tsconfig.json +++ b/opn/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/optics-agent/tsconfig.json b/optics-agent/tsconfig.json index 09833df249..efd9fbe826 100644 --- a/optics-agent/tsconfig.json +++ b/optics-agent/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "optics-agent-tests.ts" ] -} +} \ No newline at end of file diff --git a/optimist/tsconfig.json b/optimist/tsconfig.json index ae13c8e401..6e32ae57f8 100644 --- a/optimist/tsconfig.json +++ b/optimist/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ora/tsconfig.json b/ora/tsconfig.json index 98c8d2fcc5..62d5a8b2b7 100644 --- a/ora/tsconfig.json +++ b/ora/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/oracledb/tsconfig.json b/oracledb/tsconfig.json index 0b96c1a407..b9f6db2a88 100644 --- a/oracledb/tsconfig.json +++ b/oracledb/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/orchestrator/tsconfig.json b/orchestrator/tsconfig.json index 9731b1a55c..1ce0c08b62 100644 --- a/orchestrator/tsconfig.json +++ b/orchestrator/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/orientjs/tsconfig.json b/orientjs/tsconfig.json index 0aac982626..f0aee4d991 100644 --- a/orientjs/tsconfig.json +++ b/orientjs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/os-homedir/tsconfig.json b/os-homedir/tsconfig.json index 87eb6217d4..3bc13b0278 100644 --- a/os-homedir/tsconfig.json +++ b/os-homedir/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -16,4 +18,4 @@ "files": [ "index.d.ts" ] -} +} \ No newline at end of file diff --git a/os-locale/tsconfig.json b/os-locale/tsconfig.json index 550d73d42c..4cf5682e02 100644 --- a/os-locale/tsconfig.json +++ b/os-locale/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/os-tmpdir/tsconfig.json b/os-tmpdir/tsconfig.json index 87eb6217d4..3bc13b0278 100644 --- a/os-tmpdir/tsconfig.json +++ b/os-tmpdir/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -16,4 +18,4 @@ "files": [ "index.d.ts" ] -} +} \ No newline at end of file diff --git a/osmtogeojson/tsconfig.json b/osmtogeojson/tsconfig.json index f57213899d..1d6c6986c3 100644 --- a/osmtogeojson/tsconfig.json +++ b/osmtogeojson/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/owlcarousel/tsconfig.json b/owlcarousel/tsconfig.json index 40701ed917..a4cb1e6220 100644 --- a/owlcarousel/tsconfig.json +++ b/owlcarousel/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/p-defer/tsconfig.json b/p-defer/tsconfig.json index 96e8c00286..c0e0daf1e6 100644 --- a/p-defer/tsconfig.json +++ b/p-defer/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "p-defer-tests.ts" ] -} +} \ No newline at end of file diff --git a/p2/tsconfig.json b/p2/tsconfig.json index 48620510cd..494e05a79c 100644 --- a/p2/tsconfig.json +++ b/p2/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/packery/tsconfig.json b/packery/tsconfig.json index 61b8c1490b..60786abd4f 100644 --- a/packery/tsconfig.json +++ b/packery/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pad/tsconfig.json b/pad/tsconfig.json index 3fc7c77057..4a93c20fab 100644 --- a/pad/tsconfig.json +++ b/pad/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "pad-tests.ts" ] -} +} \ No newline at end of file diff --git a/page-icon/tsconfig.json b/page-icon/tsconfig.json index 88f08d40c4..6cedf08408 100644 --- a/page-icon/tsconfig.json +++ b/page-icon/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/page/tsconfig.json b/page/tsconfig.json index 0ec665707c..4609dcf236 100644 --- a/page/tsconfig.json +++ b/page/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pako/tsconfig.json b/pako/tsconfig.json index 5682368db5..b82b41525c 100644 --- a/pako/tsconfig.json +++ b/pako/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/papaparse/tsconfig.json b/papaparse/tsconfig.json index 17aaff253a..23f9082cd2 100644 --- a/papaparse/tsconfig.json +++ b/papaparse/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/paper/tsconfig.json b/paper/tsconfig.json index ff439ad991..be1ca740bc 100644 --- a/paper/tsconfig.json +++ b/paper/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/paralleljs/tsconfig.json b/paralleljs/tsconfig.json index f6ae0047ac..0f69036fbb 100644 --- a/paralleljs/tsconfig.json +++ b/paralleljs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/parse-glob/tsconfig.json b/parse-glob/tsconfig.json index 6ea4bb7c7c..a32dc73872 100644 --- a/parse-glob/tsconfig.json +++ b/parse-glob/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/parse-mockdb/tsconfig.json b/parse-mockdb/tsconfig.json index 0e6f73c022..8267c7c27f 100644 --- a/parse-mockdb/tsconfig.json +++ b/parse-mockdb/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/parse-torrent/tsconfig.json b/parse-torrent/tsconfig.json index e6de7df1ec..70f8227c59 100644 --- a/parse-torrent/tsconfig.json +++ b/parse-torrent/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/parse/tsconfig.json b/parse/tsconfig.json index eb4120e745..634ca903ac 100644 --- a/parse/tsconfig.json +++ b/parse/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/parse5/tsconfig.json b/parse5/tsconfig.json index e83cdd8d3b..c7f3ed711c 100644 --- a/parse5/tsconfig.json +++ b/parse5/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/parseurl/tsconfig.json b/parseurl/tsconfig.json index e0b28716d4..751dc28d31 100644 --- a/parseurl/tsconfig.json +++ b/parseurl/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/parsimmon/tsconfig.json b/parsimmon/tsconfig.json index d4e0be9c9e..05f997f419 100644 --- a/parsimmon/tsconfig.json +++ b/parsimmon/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/passport-anonymous/index.d.ts b/passport-anonymous/index.d.ts new file mode 100644 index 0000000000..a7c9e5b332 --- /dev/null +++ b/passport-anonymous/index.d.ts @@ -0,0 +1,10 @@ +// Type definitions for passport-anonymous 1.0 +// Project: https://github.com/jaredhanson/passport-anonymous +// Definitions by: Pavel Puchkov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as passport from "passport"; + +export class Strategy implements passport.Strategy { + authenticate: () => void; +} \ No newline at end of file diff --git a/passport-anonymous/passport-anonymous-tests.ts b/passport-anonymous/passport-anonymous-tests.ts new file mode 100644 index 0000000000..3daa2474cf --- /dev/null +++ b/passport-anonymous/passport-anonymous-tests.ts @@ -0,0 +1,4 @@ +import * as passport from "passport"; +import { Strategy } from "passport-anonymous"; + +passport.use(new Strategy()); diff --git a/passport-anonymous/tsconfig.json b/passport-anonymous/tsconfig.json new file mode 100644 index 0000000000..e7d114d6f7 --- /dev/null +++ b/passport-anonymous/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "passport-anonymous-tests.ts" + ] +} \ No newline at end of file diff --git a/passport-anonymous/tslint.json b/passport-anonymous/tslint.json new file mode 100644 index 0000000000..f9e30021f4 --- /dev/null +++ b/passport-anonymous/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} diff --git a/passport-beam/tsconfig.json b/passport-beam/tsconfig.json index 5c882b3279..22b12d0422 100644 --- a/passport-beam/tsconfig.json +++ b/passport-beam/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/passport-facebook-token/tsconfig.json b/passport-facebook-token/tsconfig.json index 0cf5971fb0..f0de7ab94f 100644 --- a/passport-facebook-token/tsconfig.json +++ b/passport-facebook-token/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/passport-facebook/tsconfig.json b/passport-facebook/tsconfig.json index caed0bec5e..4f16b8ee25 100644 --- a/passport-facebook/tsconfig.json +++ b/passport-facebook/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/passport-google-oauth/tsconfig.json b/passport-google-oauth/tsconfig.json index a2a1792ff2..c76668f33b 100644 --- a/passport-google-oauth/tsconfig.json +++ b/passport-google-oauth/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/passport-http-bearer/tsconfig.json b/passport-http-bearer/tsconfig.json index 215f39808f..64a8086f78 100644 --- a/passport-http-bearer/tsconfig.json +++ b/passport-http-bearer/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/passport-http/tsconfig.json b/passport-http/tsconfig.json index 7d9d5e55f3..51cc78d31a 100644 --- a/passport-http/tsconfig.json +++ b/passport-http/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/passport-jwt/tsconfig.json b/passport-jwt/tsconfig.json index bc0961f412..8f12dbfbfb 100644 --- a/passport-jwt/tsconfig.json +++ b/passport-jwt/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/passport-local-mongoose/tsconfig.json b/passport-local-mongoose/tsconfig.json index c6230b9aeb..28d15781c8 100644 --- a/passport-local-mongoose/tsconfig.json +++ b/passport-local-mongoose/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/passport-local/tsconfig.json b/passport-local/tsconfig.json index e82d9578ba..31f5ebca99 100644 --- a/passport-local/tsconfig.json +++ b/passport-local/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/passport-oauth2-client-password/tsconfig.json b/passport-oauth2-client-password/tsconfig.json index 124cc54e69..fd9b55b7f6 100644 --- a/passport-oauth2-client-password/tsconfig.json +++ b/passport-oauth2-client-password/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/passport-strategy/tsconfig.json b/passport-strategy/tsconfig.json index 84048b3dcd..3bd96f3908 100644 --- a/passport-strategy/tsconfig.json +++ b/passport-strategy/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/passport-twitter/tsconfig.json b/passport-twitter/tsconfig.json index 90342c4703..0971161910 100644 --- a/passport-twitter/tsconfig.json +++ b/passport-twitter/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/passport/tsconfig.json b/passport/tsconfig.json index 6b9ad22c50..4e9b96c953 100644 --- a/passport/tsconfig.json +++ b/passport/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "passport-tests.ts" ] -} +} \ No newline at end of file diff --git a/password-hash/tsconfig.json b/password-hash/tsconfig.json index 0f7f98fc45..eea6198680 100644 --- a/password-hash/tsconfig.json +++ b/password-hash/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/path-exists/tsconfig.json b/path-exists/tsconfig.json index feea631a2e..8edff6556b 100644 --- a/path-exists/tsconfig.json +++ b/path-exists/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/path-is-absolute/tsconfig.json b/path-is-absolute/tsconfig.json index 38663b8241..37ce52205e 100644 --- a/path-is-absolute/tsconfig.json +++ b/path-is-absolute/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "path-is-absolute-tests.ts" ] -} +} \ No newline at end of file diff --git a/path-parse/tsconfig.json b/path-parse/tsconfig.json index 7fbab018cb..a03b33267a 100644 --- a/path-parse/tsconfig.json +++ b/path-parse/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/path-to-regexp/tsconfig.json b/path-to-regexp/tsconfig.json index 812d6eec33..bee259111e 100644 --- a/path-to-regexp/tsconfig.json +++ b/path-to-regexp/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pathfinding/tsconfig.json b/pathfinding/tsconfig.json index 85dadf3a0b..21fb39ae72 100644 --- a/pathfinding/tsconfig.json +++ b/pathfinding/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pathjs/tsconfig.json b/pathjs/tsconfig.json index 9df61e0129..dc4adb6d63 100644 --- a/pathjs/tsconfig.json +++ b/pathjs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pathwatcher/tsconfig.json b/pathwatcher/tsconfig.json index a01c819693..199b1ce4e0 100644 --- a/pathwatcher/tsconfig.json +++ b/pathwatcher/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/paymentrequest/tsconfig.json b/paymentrequest/tsconfig.json index b09d2f29f6..221e0618af 100644 --- a/paymentrequest/tsconfig.json +++ b/paymentrequest/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/paypal-cordova-plugin/tsconfig.json b/paypal-cordova-plugin/tsconfig.json index c32cd43755..6aa10eef62 100644 --- a/paypal-cordova-plugin/tsconfig.json +++ b/paypal-cordova-plugin/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pbf/tsconfig.json b/pbf/tsconfig.json index f21d7ea25b..e5e21f23f4 100644 --- a/pbf/tsconfig.json +++ b/pbf/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/pdf/tsconfig.json b/pdf/tsconfig.json index 562adf5954..ad7d35deb6 100644 --- a/pdf/tsconfig.json +++ b/pdf/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pdfkit/tsconfig.json b/pdfkit/tsconfig.json index d8981315f0..00430ab1cd 100644 --- a/pdfkit/tsconfig.json +++ b/pdfkit/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pdfobject/tsconfig.json b/pdfobject/tsconfig.json index ba219f17ec..a1dab4b2b8 100644 --- a/pdfobject/tsconfig.json +++ b/pdfobject/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pebblekitjs/tsconfig.json b/pebblekitjs/tsconfig.json index 0279371f4e..9172299a17 100644 --- a/pebblekitjs/tsconfig.json +++ b/pebblekitjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/peerjs/tsconfig.json b/peerjs/tsconfig.json index f76ad7e52e..7cf22f8322 100644 --- a/peerjs/tsconfig.json +++ b/peerjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pegjs/tsconfig.json b/pegjs/tsconfig.json index 6ed1bcdc9d..4f3ff000cc 100644 --- a/pegjs/tsconfig.json +++ b/pegjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pem/tsconfig.json b/pem/tsconfig.json index 676e66113c..9af8892083 100644 --- a/pem/tsconfig.json +++ b/pem/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/perfect-scrollbar/tsconfig.json b/perfect-scrollbar/tsconfig.json index 4af56815a8..5c584bf17c 100644 --- a/perfect-scrollbar/tsconfig.json +++ b/perfect-scrollbar/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/persona/tsconfig.json b/persona/tsconfig.json index 1f462d6d83..eb489f55f7 100644 --- a/persona/tsconfig.json +++ b/persona/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pg-pool/tsconfig.json b/pg-pool/tsconfig.json index cecbbdd92d..d6e3aa4103 100644 --- a/pg-pool/tsconfig.json +++ b/pg-pool/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pg-promise/tsconfig.json b/pg-promise/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/pg-promise/tsconfig.json +++ b/pg-promise/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pg-query-stream/tsconfig.json b/pg-query-stream/tsconfig.json index ff01b055f9..aefc4020c0 100644 --- a/pg-query-stream/tsconfig.json +++ b/pg-query-stream/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "pg-query-stream-tests.ts" ] -} +} \ No newline at end of file diff --git a/pg-types/tsconfig.json b/pg-types/tsconfig.json index 33da56d960..2530c402a1 100644 --- a/pg-types/tsconfig.json +++ b/pg-types/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pg/tsconfig.json b/pg/tsconfig.json index fecd4ad859..3535f4d43f 100644 --- a/pg/tsconfig.json +++ b/pg/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pgwmodal/tsconfig.json b/pgwmodal/tsconfig.json index e7848f348a..f758335e9a 100644 --- a/pgwmodal/tsconfig.json +++ b/pgwmodal/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/phantom/tsconfig.json b/phantom/tsconfig.json index b133368b87..ff89ed0655 100644 --- a/phantom/tsconfig.json +++ b/phantom/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/phantomcss/tsconfig.json b/phantomcss/tsconfig.json index 69e234ced9..2a06f9be9d 100644 --- a/phantomcss/tsconfig.json +++ b/phantomcss/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/phantomjs/tsconfig.json b/phantomjs/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/phantomjs/tsconfig.json +++ b/phantomjs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/phoenix/tsconfig.json b/phoenix/tsconfig.json index ea32a97380..e2a5f53665 100644 --- a/phoenix/tsconfig.json +++ b/phoenix/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/phone-formatter/tsconfig.json b/phone-formatter/tsconfig.json index f9a0f1398e..d36c85e0ad 100644 --- a/phone-formatter/tsconfig.json +++ b/phone-formatter/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/phone/tsconfig.json b/phone/tsconfig.json index a81a2f3893..2ba4beb764 100644 --- a/phone/tsconfig.json +++ b/phone/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/phonegap-facebook-plugin/tsconfig.json b/phonegap-facebook-plugin/tsconfig.json index 7896ea5733..afa1570d1c 100644 --- a/phonegap-facebook-plugin/tsconfig.json +++ b/phonegap-facebook-plugin/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/phonegap-nfc/tsconfig.json b/phonegap-nfc/tsconfig.json index d338a9589e..ed6947b182 100644 --- a/phonegap-nfc/tsconfig.json +++ b/phonegap-nfc/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/phonegap-plugin-barcodescanner/tsconfig.json b/phonegap-plugin-barcodescanner/tsconfig.json index a863b4a810..690026998b 100644 --- a/phonegap-plugin-barcodescanner/tsconfig.json +++ b/phonegap-plugin-barcodescanner/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/phonegap-plugin-push/tsconfig.json b/phonegap-plugin-push/tsconfig.json index c70f8b1f3a..0541ae96a3 100644 --- a/phonegap-plugin-push/tsconfig.json +++ b/phonegap-plugin-push/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/phonegap/tsconfig.json b/phonegap/tsconfig.json index f64b2af705..60cf757964 100644 --- a/phonegap/tsconfig.json +++ b/phonegap/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/photonui/tsconfig.json b/photonui/tsconfig.json index cd9634a1dd..53612c4b5e 100644 --- a/photonui/tsconfig.json +++ b/photonui/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/photoswipe/tsconfig.json b/photoswipe/tsconfig.json index 457f361cc0..e7c4e42020 100644 --- a/photoswipe/tsconfig.json +++ b/photoswipe/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/physijs/tsconfig.json b/physijs/tsconfig.json index cd557f6d96..7ce8c2c431 100644 --- a/physijs/tsconfig.json +++ b/physijs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/pi-spi/tsconfig.json b/pi-spi/tsconfig.json index 03a9510102..b596a7f4bb 100644 --- a/pi-spi/tsconfig.json +++ b/pi-spi/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pickadate/tsconfig.json b/pickadate/tsconfig.json index c784f4cc94..70c069ed32 100644 --- a/pickadate/tsconfig.json +++ b/pickadate/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/pify/tsconfig.json b/pify/tsconfig.json index 9d194914d5..03f7ad008d 100644 --- a/pify/tsconfig.json +++ b/pify/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pikaday-time/tsconfig.json b/pikaday-time/tsconfig.json index 717b383482..25e9ff5370 100644 --- a/pikaday-time/tsconfig.json +++ b/pikaday-time/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/pikaday/tsconfig.json b/pikaday/tsconfig.json index 18e058c450..a748410434 100644 --- a/pikaday/tsconfig.json +++ b/pikaday/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/pinkyswear/tsconfig.json b/pinkyswear/tsconfig.json index 370d24ae1a..83098b4a73 100644 --- a/pinkyswear/tsconfig.json +++ b/pinkyswear/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pino/tsconfig.json b/pino/tsconfig.json index d730e5fd16..a5370240d2 100644 --- a/pino/tsconfig.json +++ b/pino/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pinterest-sdk/tsconfig.json b/pinterest-sdk/tsconfig.json index 82665e1e2f..0ab00f9ea9 100644 --- a/pinterest-sdk/tsconfig.json +++ b/pinterest-sdk/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/piwik-tracker/tsconfig.json b/piwik-tracker/tsconfig.json index c23019cbc8..bb177f4a2e 100644 --- a/piwik-tracker/tsconfig.json +++ b/piwik-tracker/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pixi-spine/tsconfig.json b/pixi-spine/tsconfig.json index 16ec10b298..8351a9fd60 100644 --- a/pixi-spine/tsconfig.json +++ b/pixi-spine/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pixi.js/tsconfig.json b/pixi.js/tsconfig.json index 61bebcbc3f..21341f5421 100644 --- a/pixi.js/tsconfig.json +++ b/pixi.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pixi.js/v3/tsconfig.json b/pixi.js/v3/tsconfig.json index 5b25974430..3fd699ff88 100644 --- a/pixi.js/v3/tsconfig.json +++ b/pixi.js/v3/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "pixi.js": ["pixi.js/v3"] + "pixi.js": [ + "pixi.js/v3" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/pkcs11js/tsconfig.json b/pkcs11js/tsconfig.json index 5f0e4c563c..7a57e68657 100644 --- a/pkcs11js/tsconfig.json +++ b/pkcs11js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/pkijs/tsconfig.json b/pkijs/tsconfig.json index 89676bc1b7..92f6ee5464 100644 --- a/pkijs/tsconfig.json +++ b/pkijs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/platform/tsconfig.json b/platform/tsconfig.json index a754119383..c7a29f12be 100644 --- a/platform/tsconfig.json +++ b/platform/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/playerframework/tsconfig.json b/playerframework/tsconfig.json index 34d9fe21d1..3e0b8a50fa 100644 --- a/playerframework/tsconfig.json +++ b/playerframework/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pleasejs/tsconfig.json b/pleasejs/tsconfig.json index 0a595973af..96a6fc89ae 100644 --- a/pleasejs/tsconfig.json +++ b/pleasejs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/plotly.js/tsconfig.json b/plotly.js/tsconfig.json index 295671da11..94a19223ed 100644 --- a/plotly.js/tsconfig.json +++ b/plotly.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/plottable/index.d.ts b/plottable/index.d.ts index 91f8447c03..ee52e5fc4d 100644 --- a/plottable/index.d.ts +++ b/plottable/index.d.ts @@ -3,4117 +3,4119 @@ // Definitions by: Plottable Team // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +import * as d3 from "d3"; -declare namespace Plottable { - namespace Utils { - namespace Math { - /** - * Checks if x is between a and b. - * - * @param {number} x The value to test if in range - * @param {number} a The beginning of the (inclusive) range - * @param {number} b The ending of the (inclusive) range - * @return {boolean} Whether x is in [a, b] - */ - function inRange(x: number, a: number, b: number): boolean; - /** - * Clamps x to the range [min, max]. - * - * @param {number} x The value to be clamped. - * @param {number} min The minimum value. - * @param {number} max The maximum value. - * @return {number} A clamped value in the range [min, max]. - */ - function clamp(x: number, min: number, max: number): number; - /** - * Applies the accessor, if provided, to each element of `array` and returns the maximum value. - * If no maximum value can be computed, returns defaultValue. - */ - function max(array: C[], defaultValue: C): C; - function max(array: T[], accessor: (t?: T, i?: number) => C, defaultValue: C): C; - /** - * Applies the accessor, if provided, to each element of `array` and returns the minimum value. - * If no minimum value can be computed, returns defaultValue. - */ - function min(array: C[], defaultValue: C): C; - function min(array: T[], accessor: (t?: T, i?: number) => C, defaultValue: C): C; - /** - * Returns true **only** if x is NaN - */ - function isNaN(n: any): boolean; - /** - * Returns true if the argument is a number, which is not NaN - * Numbers represented as strings do not pass this function - */ - function isValidNumber(n: any): boolean; - /** - * Generates an array of consecutive, strictly increasing numbers - * in the range [start, stop) separeted by step - */ - function range(start: number, stop: number, step?: number): number[]; - /** - * Returns the square of the distance between two points - * - * @param {Point} p1 - * @param {Point} p2 - * @return {number} dist(p1, p2)^2 - */ - function distanceSquared(p1: Point, p2: Point): number; +declare global { + namespace Plottable { + namespace Utils { + namespace Math { + /** + * Checks if x is between a and b. + * + * @param {number} x The value to test if in range + * @param {number} a The beginning of the (inclusive) range + * @param {number} b The ending of the (inclusive) range + * @return {boolean} Whether x is in [a, b] + */ + function inRange(x: number, a: number, b: number): boolean; + /** + * Clamps x to the range [min, max]. + * + * @param {number} x The value to be clamped. + * @param {number} min The minimum value. + * @param {number} max The maximum value. + * @return {number} A clamped value in the range [min, max]. + */ + function clamp(x: number, min: number, max: number): number; + /** + * Applies the accessor, if provided, to each element of `array` and returns the maximum value. + * If no maximum value can be computed, returns defaultValue. + */ + function max(array: C[], defaultValue: C): C; + function max(array: T[], accessor: (t?: T, i?: number) => C, defaultValue: C): C; + /** + * Applies the accessor, if provided, to each element of `array` and returns the minimum value. + * If no minimum value can be computed, returns defaultValue. + */ + function min(array: C[], defaultValue: C): C; + function min(array: T[], accessor: (t?: T, i?: number) => C, defaultValue: C): C; + /** + * Returns true **only** if x is NaN + */ + function isNaN(n: any): boolean; + /** + * Returns true if the argument is a number, which is not NaN + * Numbers represented as strings do not pass this function + */ + function isValidNumber(n: any): boolean; + /** + * Generates an array of consecutive, strictly increasing numbers + * in the range [start, stop) separeted by step + */ + function range(start: number, stop: number, step?: number): number[]; + /** + * Returns the square of the distance between two points + * + * @param {Point} p1 + * @param {Point} p2 + * @return {number} dist(p1, p2)^2 + */ + function distanceSquared(p1: Point, p2: Point): number; + } } } -} -declare namespace Plottable { - namespace Utils { - /** - * Shim for ES6 map. - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map - */ - class Map { - constructor(); - set(key: K, value: V): Map; - get(key: K): V; - has(key: K): boolean; - forEach(callbackFn: (value: V, key: K, map: Map) => void, thisArg?: any): void; - delete(key: K): boolean; + namespace Plottable { + namespace Utils { + /** + * Shim for ES6 map. + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map + */ + class Map { + constructor(); + set(key: K, value: V): Map; + get(key: K): V; + has(key: K): boolean; + forEach(callbackFn: (value: V, key: K, map: Map) => void, thisArg?: any): void; + delete(key: K): boolean; + } } } -} -declare namespace Plottable { - namespace Utils { - /** - * Shim for ES6 set. - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set - */ - class Set { - size: number; - constructor(); - add(value: T): Set; - delete(value: T): boolean; - has(value: T): boolean; - forEach(callback: (value: T, value2: T, set: Set) => void, thisArg?: any): void; + namespace Plottable { + namespace Utils { + /** + * Shim for ES6 set. + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set + */ + class Set { + size: number; + constructor(); + add(value: T): Set; + delete(value: T): boolean; + has(value: T): boolean; + forEach(callback: (value: T, value2: T, set: Set) => void, thisArg?: any): void; + } } } -} -declare namespace Plottable { - namespace Utils { - namespace DOM { - /** - * Gets the bounding box of an element. - * @param {d3.Selection} element - * @returns {SVGRed} The bounding box. - */ - function elementBBox(element: d3.Selection): SVGRect; - /** - * Screen refresh rate which is assumed to be 60fps - */ - var SCREEN_REFRESH_RATE_MILLISECONDS: number; - /** - * Polyfill for `window.requestAnimationFrame`. - * If the function exists, then we use the function directly. - * Otherwise, we set a timeout on `SCREEN_REFRESH_RATE_MILLISECONDS` and then perform the function. - * - * @param {() => void} callback The callback to call in the next animation frame - */ - function requestAnimationFramePolyfill(callback: () => void): void; - /** - * Calculates the width of the element. - * The width includes the padding and the border on the element's left and right sides. - * - * @param {Element} element The element to query - * @returns {number} The width of the element. - */ - function elementWidth(element: Element): number; - /** - * Calculates the height of the element. - * The height includes the padding the and the border on the element's top and bottom sides. - * - * @param {Element} element The element to query - * @returns {number} The height of the element - */ - function elementHeight(element: Element): number; - /** - * Retrieves the number array representing the translation for the selection - * - * @param {d3.Selection} selection The selection to query - * @returns {[number, number]} The number array representing the translation - */ - function translate(selection: d3.Selection): [number, number]; - /** - * Translates the given selection by the input x / y pixel amounts. - * - * @param {d3.Selection} selection The selection to translate - * @param {number} x The amount to translate in the x direction - * @param {number} y The amount to translate in the y direction - * @returns {d3.Selection} The input selection - */ - function translate(selection: d3.Selection, x: number, y: number): d3.Selection; - /** - * Checks if the first ClientRect overlaps the second. - * - * @param {ClientRect} clientRectA The first ClientRect - * @param {ClientRect} clientRectB The second ClientRect - * @returns {boolean} If the ClientRects overlap each other. - */ - function clientRectsOverlap(clientRectA: ClientRect, clientRectB: ClientRect): boolean; - /** - * Returns true if and only if innerClientRect is inside outerClientRect. - * - * @param {ClientRect} innerClientRect The first ClientRect - * @param {ClientRect} outerClientRect The second ClientRect - * @returns {boolean} If and only if the innerClientRect is inside outerClientRect. - */ - function clientRectInside(innerClientRect: ClientRect, outerClientRect: ClientRect): boolean; - /** - * Retrieves the bounding svg of the input element - * - * @param {SVGElement} element The element to query - * @returns {SVGElement} The bounding svg - */ - function boundingSVG(element: SVGElement): SVGElement; - /** - * Generates a ClipPath ID that is unique for this instance of Plottable - */ - function generateUniqueClipPathId(): string; - /** - * Returns true if the supplied coordinates or Ranges intersect or are contained by bbox. - * - * @param {number | Range} xValOrRange The x coordinate or Range to test - * @param {number | Range} yValOrRange The y coordinate or Range to test - * @param {SVGRect} bbox The bbox - * @param {number} tolerance Amount by which to expand bbox, in each dimension, before - * testing intersection - * - * @returns {boolean} True if the supplied coordinates or Ranges intersect or are - * contained by bbox, false otherwise. - */ - function intersectsBBox(xValOrRange: number | Range, yValOrRange: number | Range, bbox: SVGRect, tolerance?: number): boolean; + namespace Plottable { + namespace Utils { + namespace DOM { + /** + * Gets the bounding box of an element. + * @param {d3.Selection} element + * @returns {SVGRed} The bounding box. + */ + function elementBBox(element: d3.Selection): SVGRect; + /** + * Screen refresh rate which is assumed to be 60fps + */ + var SCREEN_REFRESH_RATE_MILLISECONDS: number; + /** + * Polyfill for `window.requestAnimationFrame`. + * If the function exists, then we use the function directly. + * Otherwise, we set a timeout on `SCREEN_REFRESH_RATE_MILLISECONDS` and then perform the function. + * + * @param {() => void} callback The callback to call in the next animation frame + */ + function requestAnimationFramePolyfill(callback: () => void): void; + /** + * Calculates the width of the element. + * The width includes the padding and the border on the element's left and right sides. + * + * @param {Element} element The element to query + * @returns {number} The width of the element. + */ + function elementWidth(element: Element): number; + /** + * Calculates the height of the element. + * The height includes the padding the and the border on the element's top and bottom sides. + * + * @param {Element} element The element to query + * @returns {number} The height of the element + */ + function elementHeight(element: Element): number; + /** + * Retrieves the number array representing the translation for the selection + * + * @param {d3.Selection} selection The selection to query + * @returns {[number, number]} The number array representing the translation + */ + function translate(selection: d3.Selection): [number, number]; + /** + * Translates the given selection by the input x / y pixel amounts. + * + * @param {d3.Selection} selection The selection to translate + * @param {number} x The amount to translate in the x direction + * @param {number} y The amount to translate in the y direction + * @returns {d3.Selection} The input selection + */ + function translate(selection: d3.Selection, x: number, y: number): d3.Selection; + /** + * Checks if the first ClientRect overlaps the second. + * + * @param {ClientRect} clientRectA The first ClientRect + * @param {ClientRect} clientRectB The second ClientRect + * @returns {boolean} If the ClientRects overlap each other. + */ + function clientRectsOverlap(clientRectA: ClientRect, clientRectB: ClientRect): boolean; + /** + * Returns true if and only if innerClientRect is inside outerClientRect. + * + * @param {ClientRect} innerClientRect The first ClientRect + * @param {ClientRect} outerClientRect The second ClientRect + * @returns {boolean} If and only if the innerClientRect is inside outerClientRect. + */ + function clientRectInside(innerClientRect: ClientRect, outerClientRect: ClientRect): boolean; + /** + * Retrieves the bounding svg of the input element + * + * @param {SVGElement} element The element to query + * @returns {SVGElement} The bounding svg + */ + function boundingSVG(element: SVGElement): SVGElement; + /** + * Generates a ClipPath ID that is unique for this instance of Plottable + */ + function generateUniqueClipPathId(): string; + /** + * Returns true if the supplied coordinates or Ranges intersect or are contained by bbox. + * + * @param {number | Range} xValOrRange The x coordinate or Range to test + * @param {number | Range} yValOrRange The y coordinate or Range to test + * @param {SVGRect} bbox The bbox + * @param {number} tolerance Amount by which to expand bbox, in each dimension, before + * testing intersection + * + * @returns {boolean} True if the supplied coordinates or Ranges intersect or are + * contained by bbox, false otherwise. + */ + function intersectsBBox(xValOrRange: number | Range, yValOrRange: number | Range, bbox: SVGRect, tolerance?: number): boolean; + } } } -} -declare namespace Plottable { - namespace Utils { - namespace Color { - /** - * Return contrast ratio between two colors - * Based on implementation from chroma.js by Gregor Aisch (gka) (licensed under BSD) - * chroma.js may be found here: https://github.com/gka/chroma.js - * License may be found here: https://github.com/gka/chroma.js/blob/master/LICENSE - * see http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef - */ - function contrast(a: string, b: string): number; - /** - * Returns a brighter copy of this color. Each channel is multiplied by 0.7 ^ -factor. - * Channel values are capped at the maximum value of 255, and the minimum value of 30. - */ - function lightenColor(color: string, factor: number): string; - /** - * Gets the Hex Code of the color resulting by applying the className CSS class to the - * colorTester selection. Returns null if the tester is transparent. - * - * @param {d3.Selection} colorTester The d3 selection to apply the CSS class to - * @param {string} className The name of the class to be applied - * @return {string} The hex code of the computed color - */ - function colorTest(colorTester: d3.Selection, className: string): string; + namespace Plottable { + namespace Utils { + namespace Color { + /** + * Return contrast ratio between two colors + * Based on implementation from chroma.js by Gregor Aisch (gka) (licensed under BSD) + * chroma.js may be found here: https://github.com/gka/chroma.js + * License may be found here: https://github.com/gka/chroma.js/blob/master/LICENSE + * see http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef + */ + function contrast(a: string, b: string): number; + /** + * Returns a brighter copy of this color. Each channel is multiplied by 0.7 ^ -factor. + * Channel values are capped at the maximum value of 255, and the minimum value of 30. + */ + function lightenColor(color: string, factor: number): string; + /** + * Gets the Hex Code of the color resulting by applying the className CSS class to the + * colorTester selection. Returns null if the tester is transparent. + * + * @param {d3.Selection} colorTester The d3 selection to apply the CSS class to + * @param {string} className The name of the class to be applied + * @return {string} The hex code of the computed color + */ + function colorTest(colorTester: d3.Selection, className: string): string; + } } } -} -declare namespace Plottable { - namespace Utils { - namespace Array { - /** - * Takes two arrays of numbers and adds them together - * - * @param {number[]} aList The first array of numbers - * @param {number[]} bList The second array of numbers - * @return {number[]} An array of numbers where x[i] = aList[i] + bList[i] - */ - function add(aList: number[], bList: number[]): number[]; - /** - * Take an array of values, and return the unique values. - * Will work iff ∀ a, b, a.toString() == b.toString() => a == b; will break on Object inputs - * - * @param {T[]} values The values to find uniqueness for - * @return {T[]} The unique values - */ - function uniq(arr: T[]): T[]; - /** - * @param {T[][]} a The 2D array that will have its elements joined together. - * @return {T[]} Every array in a, concatenated together in the order they appear. - */ - function flatten(a: T[][]): T[]; - /** - * Creates an array of length `count`, filled with value or (if value is a function), value() - * - * @param {T | ((index?: number) => T)} value The value to fill the array with or a value generator (called with index as arg) - * @param {number} count The length of the array to generate - * @return {any[]} - */ - function createFilledArray(value: T | ((index?: number) => T), count: number): T[]; + namespace Plottable { + namespace Utils { + namespace Array { + /** + * Takes two arrays of numbers and adds them together + * + * @param {number[]} aList The first array of numbers + * @param {number[]} bList The second array of numbers + * @return {number[]} An array of numbers where x[i] = aList[i] + bList[i] + */ + function add(aList: number[], bList: number[]): number[]; + /** + * Take an array of values, and return the unique values. + * Will work iff ∀ a, b, a.toString() == b.toString() => a == b; will break on Object inputs + * + * @param {T[]} values The values to find uniqueness for + * @return {T[]} The unique values + */ + function uniq(arr: T[]): T[]; + /** + * @param {T[][]} a The 2D array that will have its elements joined together. + * @return {T[]} Every array in a, concatenated together in the order they appear. + */ + function flatten(a: T[][]): T[]; + /** + * Creates an array of length `count`, filled with value or (if value is a function), value() + * + * @param {T | ((index?: number) => T)} value The value to fill the array with or a value generator (called with index as arg) + * @param {number} count The length of the array to generate + * @return {any[]} + */ + function createFilledArray(value: T | ((index?: number) => T), count: number): T[]; + } } } -} -declare namespace Plottable { - namespace Utils { - /** - * A set of callbacks which can be all invoked at once. - * Each callback exists at most once in the set (based on reference equality). - * All callbacks should have the same signature. - */ - class CallbackSet extends Set { - callCallbacks(...args: any[]): CallbackSet; - } - } -} - - -declare namespace Plottable { - namespace Utils { - namespace Stacking { - type StackedDatum = { - value: number; - offset: number; - }; - type StackingResult = Utils.Map>; + namespace Plottable { + namespace Utils { /** - * Computes the StackingResult (value and offset) for each data point in each Dataset. - * - * @param {Dataset[]} datasets The Datasets to be stacked on top of each other in the order of stacking - * @param {Accessor} keyAccessor Accessor for the key of the data - * @param {Accessor} valueAccessor Accessor for the value of the data - * @return {StackingResult} value and offset for each datapoint in each Dataset + * A set of callbacks which can be all invoked at once. + * Each callback exists at most once in the set (based on reference equality). + * All callbacks should have the same signature. */ - function stack(datasets: Dataset[], keyAccessor: Accessor, valueAccessor: Accessor): StackingResult; + class CallbackSet extends Set { + callCallbacks(...args: any[]): CallbackSet; + } + } + } + + + namespace Plottable { + namespace Utils { + namespace Stacking { + type StackedDatum = { + value: number; + offset: number; + }; + type StackingResult = Utils.Map>; + /** + * Computes the StackingResult (value and offset) for each data point in each Dataset. + * + * @param {Dataset[]} datasets The Datasets to be stacked on top of each other in the order of stacking + * @param {Accessor} keyAccessor Accessor for the key of the data + * @param {Accessor} valueAccessor Accessor for the value of the data + * @return {StackingResult} value and offset for each datapoint in each Dataset + */ + function stack(datasets: Dataset[], keyAccessor: Accessor, valueAccessor: Accessor): StackingResult; + /** + * Computes the total extent over all data points in all Datasets, taking stacking into consideration. + * + * @param {StackingResult} stackingResult The value and offset information for each datapoint in each dataset + * @oaram {Accessor} keyAccessor Accessor for the key of the data existent in the stackingResult + * @param {Accessor} filter A filter for data to be considered when computing the total extent + * @return {[number, number]} The total extent + */ + function stackedExtent(stackingResult: StackingResult, keyAccessor: Accessor, filter: Accessor): number[]; + /** + * Normalizes a key used for stacking + * + * @param {any} key The key to be normalized + * @return {string} The stringified key + */ + function normalizeKey(key: any): string; + } + } + } + + + namespace Plottable { + namespace Utils { + namespace Window { + /** + * Print a warning message to the console, if it is available. + * + * @param {string} The warnings to print + */ + function warn(warning: string): void; + /** + * Is like setTimeout, but activates synchronously if time=0 + * We special case 0 because of an observed issue where calling setTimeout causes visible flickering. + * We believe this is because when requestAnimationFrame calls into the paint function, as soon as that function finishes + * evaluating, the results are painted to the screen. As a result, if we want something to occur immediately but call setTimeout + * with time=0, then it is pushed to the call stack and rendered in the next frame, so the component that was rendered via + * setTimeout appears out-of-sync with the rest of the plot. + */ + function setTimeout(f: Function, time: number, ...args: any[]): number; + /** + * Sends a deprecation warning to the console. The warning includes the name of the deprecated method, + * version number of the deprecation, and an optional message. + * + * To be used in the first line of a deprecated method. + * + * @param {string} callingMethod The name of the method being deprecated + * @param {string} version The version when the tagged method became obsolete + * @param {string?} message Optional message to be shown with the warning + */ + function deprecated(callingMethod: string, version: string, message?: string): void; + } + } + } + + + namespace Plottable { + namespace Utils { + class ClientToSVGTranslator { + /** + * Returns the ClientToSVGTranslator for the containing elem. + * If one already exists on that , it will be returned; otherwise, a new one will be created. + */ + static getTranslator(elem: SVGElement): ClientToSVGTranslator; + constructor(svg: SVGElement); + /** + * Computes the position relative to the in svg-coordinate-space. + */ + computePosition(clientX: number, clientY: number): Point; + /** + * Checks whether event happened inside element. + */ + insideSVG(e: Event): boolean; + } + } + } + + + namespace Plottable { + namespace Configs { /** - * Computes the total extent over all data points in all Datasets, taking stacking into consideration. - * - * @param {StackingResult} stackingResult The value and offset information for each datapoint in each dataset - * @oaram {Accessor} keyAccessor Accessor for the key of the data existent in the stackingResult - * @param {Accessor} filter A filter for data to be considered when computing the total extent - * @return {[number, number]} The total extent + * Specifies if Plottable should show warnings. */ - function stackedExtent(stackingResult: StackingResult, keyAccessor: Accessor, filter: Accessor): number[]; + var SHOW_WARNINGS: boolean; + } + } + + + namespace Plottable { + var version: string; + } + + + namespace Plottable { + type DatasetCallback = (dataset: Dataset) => void; + class Dataset { /** - * Normalizes a key used for stacking - * - * @param {any} key The key to be normalized - * @return {string} The stringified key - */ - function normalizeKey(key: any): string; - } - } -} - - -declare namespace Plottable { - namespace Utils { - namespace Window { - /** - * Print a warning message to the console, if it is available. - * - * @param {string} The warnings to print - */ - function warn(warning: string): void; - /** - * Is like setTimeout, but activates synchronously if time=0 - * We special case 0 because of an observed issue where calling setTimeout causes visible flickering. - * We believe this is because when requestAnimationFrame calls into the paint function, as soon as that function finishes - * evaluating, the results are painted to the screen. As a result, if we want something to occur immediately but call setTimeout - * with time=0, then it is pushed to the call stack and rendered in the next frame, so the component that was rendered via - * setTimeout appears out-of-sync with the rest of the plot. - */ - function setTimeout(f: Function, time: number, ...args: any[]): number; - /** - * Sends a deprecation warning to the console. The warning includes the name of the deprecated method, - * version number of the deprecation, and an optional message. - * - * To be used in the first line of a deprecated method. - * - * @param {string} callingMethod The name of the method being deprecated - * @param {string} version The version when the tagged method became obsolete - * @param {string?} message Optional message to be shown with the warning - */ - function deprecated(callingMethod: string, version: string, message?: string): void; - } - } -} - - -declare namespace Plottable { - namespace Utils { - class ClientToSVGTranslator { - /** - * Returns the ClientToSVGTranslator for the containing elem. - * If one already exists on that , it will be returned; otherwise, a new one will be created. - */ - static getTranslator(elem: SVGElement): ClientToSVGTranslator; - constructor(svg: SVGElement); - /** - * Computes the position relative to the in svg-coordinate-space. - */ - computePosition(clientX: number, clientY: number): Point; - /** - * Checks whether event happened inside element. - */ - insideSVG(e: Event): boolean; - } - } -} - - -declare namespace Plottable { - namespace Configs { - /** - * Specifies if Plottable should show warnings. - */ - var SHOW_WARNINGS: boolean; - } -} - - -declare namespace Plottable { - var version: string; -} - - -declare namespace Plottable { - type DatasetCallback = (dataset: Dataset) => void; - class Dataset { - /** - * A Dataset contains an array of data and some metadata. - * Changes to the data or metadata will cause anything subscribed to the Dataset to update. - * - * @constructor - * @param {any[]} [data=[]] The data for this Dataset. - * @param {any} [metadata={}] An object containing additional information. - */ - constructor(data?: any[], metadata?: any); - /** - * Adds a callback to be called when the Dataset updates. - * - * @param {DatasetCallback} callback. - * @returns {Dataset} The calling Dataset. - */ - onUpdate(callback: DatasetCallback): Dataset; - /** - * Removes a callback that would be called when the Dataset updates. - * - * @param {DatasetCallback} callback - * @returns {Dataset} The calling Dataset. - */ - offUpdate(callback: DatasetCallback): Dataset; - /** - * Gets the data. - * - * @returns {any[]} - */ - data(): any[]; - /** - * Sets the data. - * - * @param {any[]} data - * @returns {Dataset} The calling Dataset. - */ - data(data: any[]): Dataset; - /** - * Gets the metadata. - * - * @returns {any} - */ - metadata(): any; - /** - * Sets the metadata. - * - * @param {any} metadata - * @returns {Dataset} The calling Dataset. - */ - metadata(metadata: any): Dataset; - } -} - - -declare namespace Plottable { - namespace RenderPolicies { - /** - * A policy for rendering Components. - */ - interface RenderPolicy { - render(): any; - } - /** - * Renders Components immediately after they are enqueued. - * Useful for debugging, horrible for performance. - */ - class Immediate implements RenderPolicy { - render(): void; - } - /** - * The default way to render, which only tries to render every frame - * (usually, 1/60th of a second). - */ - class AnimationFrame implements RenderPolicy { - render(): void; - } - /** - * Renders with `setTimeout()`. - * Generally an inferior way to render compared to `requestAnimationFrame`, - * but useful for browsers that don't suppoort `requestAnimationFrame`. - */ - class Timeout implements RenderPolicy { - render(): void; - } - } -} - - -declare namespace Plottable { - /** - * The RenderController is responsible for enqueueing and synchronizing - * layout and render calls for Components. - * - * Layout and render calls occur inside an animation callback - * (window.requestAnimationFrame if available). - * - * RenderController.flush() immediately lays out and renders all Components currently enqueued. - * - * To always have immediate rendering (useful for debugging), call - * ```typescript - * Plottable.RenderController.setRenderPolicy( - * new Plottable.RenderPolicies.Immediate() - * ); - * ``` - */ - namespace RenderController { - namespace Policy { - var IMMEDIATE: string; - var ANIMATION_FRAME: string; - var TIMEOUT: string; - } - function renderPolicy(): RenderPolicies.RenderPolicy; - function renderPolicy(renderPolicy: string): void; - /** - * Enqueues the Component for rendering. - * - * @param {Component} component - */ - function registerToRender(component: Component): void; - /** - * Enqueues the Component for layout and rendering. - * - * @param {Component} component - */ - function registerToComputeLayout(component: Component): void; - /** - * Renders all Components waiting to be rendered immediately - * instead of waiting until the next frame. - * - * Useful to call when debugging. - */ - function flush(): void; - } -} - -declare namespace Plottable { - /** - * Accesses a specific datum property. - */ - interface Accessor { - (datum: any, index: number, dataset: Dataset): T; - } - /** - * Retrieves a scaled datum property. - * Essentially passes the result of an Accessor through a Scale. - */ - type Projector = (datum: any, index: number, dataset: Dataset) => any; - /** - * A mapping from attributes ("x", "fill", etc.) to the functions that get - * that information out of the data. - */ - type AttributeToProjector = { - [attr: string]: Projector; - }; - /** - * A function that generates attribute values from the datum and index. - * Essentially a Projector with a particular Dataset rolled in. - */ - type AppliedProjector = (datum: any, index: number) => any; - /** - * A mapping from attributes to the AppliedProjectors used to generate them. - */ - type AttributeToAppliedProjector = { - [attr: string]: AppliedProjector; - }; - /** - * Space request used during layout negotiation. - * - * @member {number} minWidth The minimum acceptable width given the offered space. - * @member {number} minHeight the minimum acceptable height given the offered space. - */ - type SpaceRequest = { - minWidth: number; - minHeight: number; - }; - /** - * Min and max values for a particular property. - */ - type Range = { - min: number; - max: number; - }; - /** - * A location in pixel-space. - */ - type Point = { - x: number; - y: number; - }; - /** - * The corners of a box. - */ - type Bounds = { - topLeft: Point; - bottomRight: Point; - }; - /** - * An object representing a data-backed visual entity inside a Component. - */ - interface Entity { - datum: any; - position: Point; - selection: d3.Selection; - component: C; - } -} - - -declare namespace Plottable { - type Formatter = (d: any) => string; - /** - * This field is deprecated and will be removed in v2.0.0. - * - * The number of milliseconds between midnight one day and the next is - * not a fixed quantity. - * - * Use date.setDate(date.getDate() + number_of_days) instead. - * - */ - var MILLISECONDS_IN_ONE_DAY: number; - namespace Formatters { - /** - * Creates a formatter for currency values. - * - * @param {number} [precision] The number of decimal places to show (default 2). - * @param {string} [symbol] The currency symbol to use (default "$"). - * @param {boolean} [prefix] Whether to prepend or append the currency symbol (default true). - * @param {boolean} [onlyShowUnchanged] Whether to return a value if value changes after formatting (default true). - * - * @returns {Formatter} A formatter for currency values. - */ - function currency(precision?: number, symbol?: string, prefix?: boolean): (d: any) => string; - /** - * Creates a formatter that displays exactly [precision] decimal places. - * - * @param {number} [precision] The number of decimal places to show (default 3). - * @param {boolean} [onlyShowUnchanged] Whether to return a value if value changes after formatting (default true). - * - * @returns {Formatter} A formatter that displays exactly [precision] decimal places. - */ - function fixed(precision?: number): (d: any) => string; - /** - * Creates a formatter that formats numbers to show no more than - * [precision] decimal places. All other values are stringified. - * - * @param {number} [precision] The number of decimal places to show (default 3). - * @param {boolean} [onlyShowUnchanged] Whether to return a value if value changes after formatting (default true). - * - * @returns {Formatter} A formatter for general values. - */ - function general(precision?: number): (d: any) => string; - /** - * Creates a formatter that stringifies its input. - * - * @returns {Formatter} A formatter that stringifies its input. - */ - function identity(): (d: any) => string; - /** - * Creates a formatter for percentage values. - * Multiplies the input by 100 and appends "%". - * - * @param {number} [precision] The number of decimal places to show (default 0). - * @param {boolean} [onlyShowUnchanged] Whether to return a value if value changes after formatting (default true). - * - * @returns {Formatter} A formatter for percentage values. - */ - function percentage(precision?: number): (d: any) => string; - /** - * Creates a formatter for values that displays [precision] significant figures - * and puts SI notation. - * - * @param {number} [precision] The number of significant figures to show (default 3). - * - * @returns {Formatter} A formatter for SI values. - */ - function siSuffix(precision?: number): (d: any) => string; - /** - * Creates a multi time formatter that displays dates. - * - * @returns {Formatter} A formatter for time/date values. - */ - function multiTime(): (d: any) => string; - /** - * Creates a time formatter that displays time/date using given specifier. - * - * List of directives can be found on: https://github.com/mbostock/d3/wiki/Time-Formatting#format - * - * @param {string} [specifier] The specifier for the formatter. - * - * @returns {Formatter} A formatter for time/date values. - */ - function time(specifier: string): Formatter; - /** - * Creates a formatter for relative dates. - * - * @param {number} baseValue The start date (as epoch time) used in computing relative dates (default 0) - * @param {number} increment The unit used in calculating relative date values (default MILLISECONDS_IN_ONE_DAY) - * @param {string} label The label to append to the formatted string (default "") - * - * @returns {Formatter} A formatter for time/date values. - */ - function relativeDate(baseValue?: number, increment?: number, label?: string): (d: any) => string; - } -} - - -declare namespace Plottable { - /** - * A SymbolFactory is a function that takes in a symbolSize which is the edge length of the render area - * and returns a string representing the 'd' attribute of the resultant 'path' element - */ - type SymbolFactory = (symbolSize: number) => string; - namespace SymbolFactories { - function circle(): SymbolFactory; - function square(): SymbolFactory; - function cross(): SymbolFactory; - function diamond(): SymbolFactory; - function triangleUp(): SymbolFactory; - function triangleDown(): SymbolFactory; - } -} - - -declare namespace Plottable { - interface ScaleCallback> { - (scale: S): any; - } - namespace Scales { - /** - * A function that supplies domain values to be included into a Scale. - * - * @param {Scale} scale - * @returns {D[]} An array of values that should be included in the Scale. - */ - interface IncludedValuesProvider { - (scale: Scale): D[]; - } - /** - * A function that supplies padding exception values for the Scale. - * If one end of the domain is set to an excepted value as a result of autoDomain()-ing, - * that end of the domain will not be padded. - * - * @param {QuantitativeScale} scale - * @returns {D[]} An array of values that should not be padded. - */ - interface PaddingExceptionsProvider { - (scale: QuantitativeScale): D[]; - } - } - class Scale { - /** - * A Scale is a function (in the mathematical sense) that maps values from a domain to a range. - * - * @constructor - */ - constructor(); - /** - * Given an array of potential domain values, computes the extent of those values. - * - * @param {D[]} values - * @returns {D[]} The extent of the input values. - */ - extentOfValues(values: D[]): D[]; - protected _getAllIncludedValues(): D[]; - protected _getExtent(): D[]; - /** - * Adds a callback to be called when the Scale updates. - * - * @param {ScaleCallback} callback. - * @returns {Scale} The calling Scale. - */ - onUpdate(callback: ScaleCallback>): Scale; - /** - * Removes a callback that would be called when the Scale updates. - * - * @param {ScaleCallback} callback. - * @returns {Scale} The calling Scale. - */ - offUpdate(callback: ScaleCallback>): Scale; - protected _dispatchUpdate(): void; - /** - * Sets the Scale's domain so that it spans the Extents of all its ExtentsProviders. - * - * @returns {Scale} The calling Scale. - */ - autoDomain(): Scale; - protected _autoDomainIfAutomaticMode(): void; - /** - * Computes the range value corresponding to a given domain value. - * - * @param {D} value - * @returns {R} The range value corresponding to the supplied domain value. - */ - scale(value: D): R; - /** - * Gets the domain. - * - * @returns {D[]} The current domain. - */ - domain(): D[]; - /** - * Sets the domain. - * - * @param {D[]} values - * @returns {Scale} The calling Scale. - */ - domain(values: D[]): Scale; - protected _getDomain(): void; - protected _setDomain(values: D[]): void; - protected _setBackingScaleDomain(values: D[]): void; - /** - * Gets the range. - * - * @returns {R[]} The current range. - */ - range(): R[]; - /** - * Sets the range. - * - * @param {R[]} values - * @returns {Scale} The calling Scale. - */ - range(values: R[]): Scale; - protected _getRange(): void; - protected _setRange(values: R[]): void; - /** - * Adds an IncludedValuesProvider to the Scale. - * - * @param {Scales.IncludedValuesProvider} provider - * @returns {Scale} The calling Scale. - */ - addIncludedValuesProvider(provider: Scales.IncludedValuesProvider): Scale; - /** - * Removes the IncludedValuesProvider from the Scale. - * - * @param {Scales.IncludedValuesProvider} provider - * @returns {Scale} The calling Scale. - */ - removeIncludedValuesProvider(provider: Scales.IncludedValuesProvider): Scale; - } -} - - -declare namespace Plottable { - class QuantitativeScale extends Scale { - protected static _DEFAULT_NUM_TICKS: number; - /** - * A QuantitativeScale is a Scale that maps number-like values to numbers. - * It is invertible and continuous. - * - * @constructor - */ - constructor(); - autoDomain(): QuantitativeScale; - protected _autoDomainIfAutomaticMode(): void; - protected _getExtent(): D[]; - /** - * Adds a padding exception provider. - * If one end of the domain is set to an excepted value as a result of autoDomain()-ing, - * that end of the domain will not be padded. - * - * @param {Scales.PaddingExceptionProvider} provider The provider function. - * @returns {QuantitativeScale} The calling QuantitativeScale. - */ - addPaddingExceptionsProvider(provider: Scales.PaddingExceptionsProvider): QuantitativeScale; - /** - * Removes the padding exception provider. - * - * @param {Scales.PaddingExceptionProvider} provider The provider function. - * @returns {QuantitativeScale} The calling QuantitativeScale. - */ - removePaddingExceptionsProvider(provider: Scales.PaddingExceptionsProvider): QuantitativeScale; - /** - * Gets the padding proportion. - */ - padProportion(): number; - /** - * Sets the padding porportion. - * When autoDomain()-ing, the computed domain will be expanded by this proportion, - * then rounded to human-readable values. - * - * @param {number} padProportion The padding proportion. Passing 0 disables padding. - * @returns {QuantitativeScale} The calling QuantitativeScale. - */ - padProportion(padProportion: number): QuantitativeScale; - protected _expandSingleValueDomain(singleValueDomain: D[]): D[]; - /** - * Computes the domain value corresponding to a supplied range value. - * - * @param {number} value: A value from the Scale's range. - * @returns {D} The domain value corresponding to the supplied range value. - */ - invert(value: number): D; - domain(): D[]; - domain(values: D[]): QuantitativeScale; - /** - * Gets the lower end of the domain. - * - * @return {D} - */ - domainMin(): D; - /** - * Sets the lower end of the domain. - * - * @return {QuantitativeScale} The calling QuantitativeScale. - */ - domainMin(domainMin: D): QuantitativeScale; - /** - * Gets the upper end of the domain. - * - * @return {D} - */ - domainMax(): D; - /** - * Sets the upper end of the domain. - * - * @return {QuantitativeScale} The calling QuantitativeScale. - */ - domainMax(domainMax: D): QuantitativeScale; - extentOfValues(values: D[]): D[]; - protected _setDomain(values: D[]): void; - /** - * Gets the array of tick values generated by the default algorithm. - */ - defaultTicks(): D[]; - /** - * Gets an array of tick values spanning the domain. - * - * @returns {D[]} - */ - ticks(): D[]; - /** - * Given a domain, expands its domain onto "nice" values, e.g. whole - * numbers. - */ - protected _niceDomain(domain: D[], count?: number): D[]; - protected _defaultExtent(): D[]; - /** - * Gets the TickGenerator. - */ - tickGenerator(): Scales.TickGenerators.TickGenerator; - /** - * Sets the TickGenerator - * - * @param {TickGenerator} generator - * @return {QuantitativeScale} The calling QuantitativeScale. - */ - tickGenerator(generator: Scales.TickGenerators.TickGenerator): QuantitativeScale; - } -} - - -declare namespace Plottable { - namespace Scales { - class Linear extends QuantitativeScale { - /** - * @constructor - */ - constructor(); - protected _defaultExtent(): number[]; - protected _expandSingleValueDomain(singleValueDomain: number[]): number[]; - scale(value: number): number; - protected _getDomain(): number[]; - protected _setBackingScaleDomain(values: number[]): void; - protected _getRange(): number[]; - protected _setRange(values: number[]): void; - invert(value: number): number; - defaultTicks(): number[]; - protected _niceDomain(domain: number[], count?: number): number[]; - } - } -} - - -declare namespace Plottable { - namespace Scales { - class ModifiedLog extends QuantitativeScale { - /** - * A ModifiedLog Scale acts as a regular log scale for large numbers. - * As it approaches 0, it gradually becomes linear. - * Consequently, a ModifiedLog Scale can process 0 and negative numbers. + * A Dataset contains an array of data and some metadata. + * Changes to the data or metadata will cause anything subscribed to the Dataset to update. * * @constructor - * @param {number} [base=10] - * The base of the log. Must be > 1. - * - * For x <= base, scale(x) = log(x). - * - * For 0 < x < base, scale(x) will become more and more - * linear as it approaches 0. - * - * At x == 0, scale(x) == 0. - * - * For negative values, scale(-x) = -scale(x). + * @param {any[]} [data=[]] The data for this Dataset. + * @param {any} [metadata={}] An object containing additional information. */ - constructor(base?: number); - scale(x: number): number; - invert(x: number): number; - protected _getDomain(): number[]; - protected _setDomain(values: number[]): void; - protected _setBackingScaleDomain(values: number[]): void; - ticks(): number[]; - protected _niceDomain(domain: number[], count?: number): number[]; - protected _defaultExtent(): number[]; - protected _expandSingleValueDomain(singleValueDomain: number[]): number[]; - protected _getRange(): number[]; - protected _setRange(values: number[]): void; - defaultTicks(): number[]; + constructor(data?: any[], metadata?: any); + /** + * Adds a callback to be called when the Dataset updates. + * + * @param {DatasetCallback} callback. + * @returns {Dataset} The calling Dataset. + */ + onUpdate(callback: DatasetCallback): Dataset; + /** + * Removes a callback that would be called when the Dataset updates. + * + * @param {DatasetCallback} callback + * @returns {Dataset} The calling Dataset. + */ + offUpdate(callback: DatasetCallback): Dataset; + /** + * Gets the data. + * + * @returns {any[]} + */ + data(): any[]; + /** + * Sets the data. + * + * @param {any[]} data + * @returns {Dataset} The calling Dataset. + */ + data(data: any[]): Dataset; + /** + * Gets the metadata. + * + * @returns {any} + */ + metadata(): any; + /** + * Sets the metadata. + * + * @param {any} metadata + * @returns {Dataset} The calling Dataset. + */ + metadata(metadata: any): Dataset; } } -} -declare namespace Plottable { - namespace Scales { - class Category extends Scale { + namespace Plottable { + namespace RenderPolicies { /** - * A Category Scale maps strings to numbers. - * - * @constructor + * A policy for rendering Components. */ - constructor(); - extentOfValues(values: string[]): string[]; - protected _getExtent(): string[]; - domain(): string[]; - domain(values: string[]): Category; - protected _setDomain(values: string[]): void; - range(): [number, number]; - range(values: [number, number]): Category; - /** - * Returns the width of the range band. - * - * @returns {number} The range band width - */ - rangeBand(): number; - /** - * Returns the step width of the scale. - * - * The step width is the pixel distance between adjacent values in the domain. - * - * @returns {number} - */ - stepWidth(): number; - /** - * Gets the inner padding. - * - * The inner padding is defined as the padding in between bands on the scale, - * expressed as a multiple of the rangeBand(). - * - * @returns {number} - */ - innerPadding(): number; - /** - * Sets the inner padding. - * - * The inner padding is defined as the padding in between bands on the scale, - * expressed as a multiple of the rangeBand(). - * - * @returns {Category} The calling Category Scale. - */ - innerPadding(innerPadding: number): Category; - /** - * Gets the outer padding. - * - * The outer padding is the padding in between the outer bands and the edges of the range, - * expressed as a multiple of the rangeBand(). - * - * @returns {number} - */ - outerPadding(): number; - /** - * Sets the outer padding. - * - * The outer padding is the padding in between the outer bands and the edges of the range, - * expressed as a multiple of the rangeBand(). - * - * @returns {Category} The calling Category Scale. - */ - outerPadding(outerPadding: number): Category; - scale(value: string): number; - protected _getDomain(): string[]; - protected _setBackingScaleDomain(values: string[]): void; - protected _getRange(): number[]; - protected _setRange(values: number[]): void; - } - } -} - - -declare namespace Plottable { - namespace Scales { - class Color extends Scale { - /** - * A Color Scale maps string values to color hex values expressed as a string. - * - * @constructor - * @param {string} [scaleType] One of "Category10"/"Category20"/"Category20b"/"Category20c". - * (see https://github.com/mbostock/d3/wiki/Ordinal-Scales#categorical-colors) - * If not supplied, reads the colors defined using CSS -- see plottable.css. - */ - constructor(scaleType?: string); - extentOfValues(values: string[]): string[]; - protected _getExtent(): string[]; - static invalidateColorCache(): void; - /** - * Returns the color-string corresponding to a given string. - * If there are not enough colors in the range(), a lightened version of an existing color will be used. - * - * @param {string} value - * @returns {string} - */ - scale(value: string): string; - protected _getDomain(): string[]; - protected _setBackingScaleDomain(values: string[]): void; - protected _getRange(): string[]; - protected _setRange(values: string[]): void; - } - } -} - - -declare namespace Plottable { - namespace Scales { - class Time extends QuantitativeScale { - /** - * A Time Scale maps Date objects to numbers. - * - * @constructor - */ - constructor(); - /** - * Returns an array of ticks values separated by the specified interval. - * - * @param {string} interval A string specifying the interval unit. - * @param {number?} [step] The number of multiples of the interval between consecutive ticks. - * @return {Date[]} - */ - tickInterval(interval: string, step?: number): Date[]; - protected _setDomain(values: Date[]): void; - protected _defaultExtent(): Date[]; - protected _expandSingleValueDomain(singleValueDomain: Date[]): Date[]; - scale(value: Date): number; - protected _getDomain(): Date[]; - protected _setBackingScaleDomain(values: Date[]): void; - protected _getRange(): number[]; - protected _setRange(values: number[]): void; - invert(value: number): Date; - defaultTicks(): Date[]; - protected _niceDomain(domain: Date[]): Date[]; - /** - * Transforms the Plottable TimeInterval string into a d3 time interval equivalent. - * If the provided TimeInterval is incorrect, the default is d3.time.year - */ - static timeIntervalToD3Time(timeInterval: string): d3.time.Interval; - } - } -} - - -declare namespace Plottable { - namespace Scales { - class InterpolatedColor extends Scale { - static REDS: string[]; - static BLUES: string[]; - static POSNEG: string[]; - /** - * An InterpolatedColor Scale maps numbers to color hex values, expressed as strings. - * - * @param {string} [scaleType="linear"] One of "linear"/"log"/"sqrt"/"pow". - */ - constructor(scaleType?: string); - extentOfValues(values: number[]): number[]; - autoDomain(): InterpolatedColor; - scale(value: number): string; - protected _getDomain(): number[]; - protected _setBackingScaleDomain(values: number[]): void; - protected _getRange(): string[]; - protected _setRange(range: string[]): void; - } - } -} - - -declare namespace Plottable { - namespace Scales { - namespace TickGenerators { - /** - * Generates an array of tick values for the specified scale. - * - * @param {QuantitativeScale} scale - * @returns {D[]} - */ - interface TickGenerator { - (scale: Plottable.QuantitativeScale): D[]; + interface RenderPolicy { + render(): any; } /** - * Creates a TickGenerator using the specified interval. - * - * Generates ticks at multiples of the interval while also including the domain boundaries. - * - * @param {number} interval - * @returns {TickGenerator} + * Renders Components immediately after they are enqueued. + * Useful for debugging, horrible for performance. */ - function intervalTickGenerator(interval: number): TickGenerator; + class Immediate implements RenderPolicy { + render(): void; + } /** - * Creates a TickGenerator returns only integer tick values. - * - * @returns {TickGenerator} + * The default way to render, which only tries to render every frame + * (usually, 1/60th of a second). */ - function integerTickGenerator(): TickGenerator; - } - } -} - - -declare namespace Plottable { - namespace Drawers { - /** - * A step for the drawer to draw. - * - * Specifies how AttributeToProjector needs to be animated. - */ - type DrawStep = { - attrToProjector: AttributeToProjector; - animator: Animator; - }; - /** - * A DrawStep that carries an AttributeToAppliedProjector map. - */ - type AppliedDrawStep = { - attrToAppliedProjector: AttributeToAppliedProjector; - animator: Animator; - }; - } - class Drawer { - protected _svgElementName: string; - protected _className: string; - /** - * A Drawer draws svg elements based on the input Dataset. - * - * @constructor - * @param {Dataset} dataset The dataset associated with this Drawer - */ - constructor(dataset: Dataset); - /** - * Retrieves the renderArea selection for the Drawer. - */ - renderArea(): d3.Selection; - /** - * Sets the renderArea selection for the Drawer. - * - * @param {d3.Selection} Selection containing the to render to. - * @returns {Drawer} The calling Drawer. - */ - renderArea(area: d3.Selection): Drawer; - /** - * Removes the Drawer and its renderArea - */ - remove(): void; - protected _applyDefaultAttributes(selection: d3.Selection): void; - /** - * Calculates the total time it takes to use the input drawSteps to draw the input data - * - * @param {any[]} data The data that would have been drawn - * @param {Drawers.DrawStep[]} drawSteps The DrawSteps to use - * @returns {number} The total time it takes to draw - */ - totalDrawTime(data: any[], drawSteps: Drawers.DrawStep[]): number; - /** - * Draws the data into the renderArea using the spefic steps and metadata - * - * @param{any[]} data The data to be drawn - * @param{DrawStep[]} drawSteps The list of steps, which needs to be drawn - */ - draw(data: any[], drawSteps: Drawers.DrawStep[]): Drawer; - selection(): d3.Selection; - /** - * Returns the CSS selector for this Drawer's visual elements. - */ - selector(): string; - /** - * Returns the D3 selection corresponding to the datum with the specified index. - */ - selectionForIndex(index: number): d3.Selection; - } -} - - -declare namespace Plottable { - namespace Drawers { - class Line extends Drawer { - constructor(dataset: Dataset); - protected _applyDefaultAttributes(selection: d3.Selection): void; - selectionForIndex(index: number): d3.Selection; - } - } -} - - -declare namespace Plottable { - namespace Drawers { - class Area extends Drawer { - constructor(dataset: Dataset); - protected _applyDefaultAttributes(selection: d3.Selection): void; - selectionForIndex(index: number): d3.Selection; - } - } -} - - -declare namespace Plottable { - namespace Drawers { - class Rectangle extends Drawer { - constructor(dataset: Dataset); - } - } -} - - -declare namespace Plottable { - namespace Drawers { - class Arc extends Drawer { - constructor(dataset: Dataset); - } - } -} - - -declare namespace Plottable { - namespace Drawers { - class Symbol extends Drawer { - constructor(dataset: Dataset); - } - } -} - - -declare namespace Plottable { - namespace Drawers { - class Segment extends Drawer { - constructor(dataset: Dataset); - } - } -} - - -declare namespace Plottable { - type ComponentCallback = (component: Component) => void; - namespace Components { - class Alignment { - static TOP: string; - static BOTTOM: string; - static LEFT: string; - static RIGHT: string; - static CENTER: string; - } - } - class Component { - protected _boundingBox: d3.Selection; - protected _clipPathEnabled: boolean; - protected _isSetup: boolean; - protected _isAnchored: boolean; - constructor(); - /** - * Attaches the Component as a child of a given d3 Selection. - * - * @param {d3.Selection} selection. - * @returns {Component} The calling Component. - */ - anchor(selection: d3.Selection): Component; - /** - * Adds a callback to be called on anchoring the Component to the DOM. - * If the Component is already anchored, the callback is called immediately. - * - * @param {ComponentCallback} callback - * @return {Component} - */ - onAnchor(callback: ComponentCallback): Component; - /** - * Removes a callback that would be called on anchoring the Component to the DOM. - * The callback is identified by reference equality. - * - * @param {ComponentCallback} callback - * @return {Component} - */ - offAnchor(callback: ComponentCallback): Component; - /** - * Creates additional elements as necessary for the Component to function. - * Called during anchor() if the Component's element has not been created yet. - * Override in subclasses to provide additional functionality. - */ - protected _setup(): void; - /** - * Given available space in pixels, returns the minimum width and height this Component will need. - * - * @param {number} availableWidth - * @param {number} availableHeight - * @returns {SpaceRequest} - */ - requestedSpace(availableWidth: number, availableHeight: number): SpaceRequest; - /** - * Computes and sets the size, position, and alignment of the Component from the specified values. - * If no parameters are supplied and the Component is a root node, - * they are inferred from the size of the Component's element. - * - * @param {Point} [origin] Origin of the space offered to the Component. - * @param {number} [availableWidth] Available width in pixels. - * @param {number} [availableHeight] Available height in pixels. - * @returns {Component} The calling Component. - */ - computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): Component; - protected _sizeFromOffer(availableWidth: number, availableHeight: number): { - width: number; - height: number; - }; - /** - * Queues the Component for rendering. - * - * @returns {Component} The calling Component. - */ - render(): Component; - /** - * Renders the Component without waiting for the next frame. - */ - renderImmediately(): Component; - /** - * Causes the Component to re-layout and render. - * - * This function should be called when a CSS change has occured that could - * influence the layout of the Component, such as changing the font size. - * - * @returns {Component} The calling Component. - */ - redraw(): Component; - /** - * Renders the Component to a given . - * - * @param {String|d3.Selection} element A selector-string for the , or a d3 selection containing an . - * @returns {Component} The calling Component. - */ - renderTo(element: String | d3.Selection): Component; - /** - * Gets the x alignment of the Component. - */ - xAlignment(): string; - /** - * Sets the x alignment of the Component. - * - * @param {string} xAlignment The x alignment of the Component ("left"/"center"/"right"). - * @returns {Component} The calling Component. - */ - xAlignment(xAlignment: string): Component; - /** - * Gets the y alignment of the Component. - */ - yAlignment(): string; - /** - * Sets the y alignment of the Component. - * - * @param {string} yAlignment The y alignment of the Component ("top"/"center"/"bottom"). - * @returns {Component} The calling Component. - */ - yAlignment(yAlignment: string): Component; - /** - * Checks if the Component has a given CSS class. - * - * @param {string} cssClass The CSS class to check for. - */ - hasClass(cssClass: string): boolean; - /** - * Adds a given CSS class to the Component. - * - * @param {string} cssClass The CSS class to add. - * @returns {Component} The calling Component. - */ - addClass(cssClass: string): Component; - /** - * Removes a given CSS class from the Component. - * - * @param {string} cssClass The CSS class to remove. - * @returns {Component} The calling Component. - */ - removeClass(cssClass: string): Component; - /** - * Checks if the Component has a fixed width or if it grows to fill available space. - * Returns false by default on the base Component class. - */ - fixedWidth(): boolean; - /** - * Checks if the Component has a fixed height or if it grows to fill available space. - * Returns false by default on the base Component class. - */ - fixedHeight(): boolean; - /** - * Detaches a Component from the DOM. The Component can be reused. - * - * This should only be used if you plan on reusing the calling Component. Otherwise, use destroy(). - * - * @returns The calling Component. - */ - detach(): Component; - /** - * Adds a callback to be called when the Component is detach()-ed. - * - * @param {ComponentCallback} callback - * @return {Component} The calling Component. - */ - onDetach(callback: ComponentCallback): Component; - /** - * Removes a callback to be called when the Component is detach()-ed. - * The callback is identified by reference equality. - * - * @param {ComponentCallback} callback - * @return {Component} The calling Component. - */ - offDetach(callback: ComponentCallback): Component; - /** - * Gets the parent ComponentContainer for this Component. - */ - parent(): ComponentContainer; - /** - * Sets the parent ComponentContainer for this Component. - * An error will be thrown if the parent does not contain this Component. - * Adding a Component to a ComponentContainer should be done - * using the appropriate method on the ComponentContainer. - */ - parent(parent: ComponentContainer): Component; - /** - * Removes a Component from the DOM and disconnects all listeners. - */ - destroy(): void; - /** - * Gets the width of the Component in pixels. - */ - width(): number; - /** - * Gets the height of the Component in pixels. - */ - height(): number; - /** - * Gets the origin of the Component relative to its parent. - * - * @return {Point} - */ - origin(): Point; - /** - * Gets the origin of the Component relative to the root . - * - * @return {Point} - */ - originToSVG(): Point; - /** - * Gets the Selection containing the in front of the visual elements of the Component. - * - * Will return undefined if the Component has not been anchored. - * - * @return {d3.Selection} - */ - foreground(): d3.Selection; - /** - * Gets a Selection containing a that holds the visual elements of the Component. - * - * Will return undefined if the Component has not been anchored. - * - * @return {d3.Selection} content selection for the Component - */ - content(): d3.Selection; - /** - * Gets the Selection containing the behind the visual elements of the Component. - * - * Will return undefined if the Component has not been anchored. - * - * @return {d3.Selection} background selection for the Component - */ - background(): d3.Selection; - } -} - - -declare namespace Plottable { - class ComponentContainer extends Component { - constructor(); - anchor(selection: d3.Selection): ComponentContainer; - render(): ComponentContainer; - /** - * Checks whether the specified Component is in the ComponentContainer. - */ - has(component: Component): boolean; - protected _adoptAndAnchor(component: Component): void; - /** - * Removes the specified Component from the ComponentContainer. - */ - remove(component: Component): ComponentContainer; - /** - * Carry out the actual removal of a Component. - * Implementation dependent on the type of container. - * - * @return {boolean} true if the Component was successfully removed, false otherwise. - */ - protected _remove(component: Component): boolean; - /** - * Invokes a callback on each Component in the ComponentContainer. - */ - protected _forEach(callback: (component: Component) => void): void; - /** - * Destroys the ComponentContainer and all Components within it. - */ - destroy(): void; - } -} - - -declare namespace Plottable { - namespace Components { - class Group extends ComponentContainer { + class AnimationFrame implements RenderPolicy { + render(): void; + } /** - * Constructs a Group. + * Renders with `setTimeout()`. + * Generally an inferior way to render compared to `requestAnimationFrame`, + * but useful for browsers that don't suppoort `requestAnimationFrame`. + */ + class Timeout implements RenderPolicy { + render(): void; + } + } + } + + + namespace Plottable { + /** + * The RenderController is responsible for enqueueing and synchronizing + * layout and render calls for Components. + * + * Layout and render calls occur inside an animation callback + * (window.requestAnimationFrame if available). + * + * RenderController.flush() immediately lays out and renders all Components currently enqueued. + * + * To always have immediate rendering (useful for debugging), call + * ```typescript + * Plottable.RenderController.setRenderPolicy( + * new Plottable.RenderPolicies.Immediate() + * ); + * ``` + */ + namespace RenderController { + namespace Policy { + var IMMEDIATE: string; + var ANIMATION_FRAME: string; + var TIMEOUT: string; + } + function renderPolicy(): RenderPolicies.RenderPolicy; + function renderPolicy(renderPolicy: string): void; + /** + * Enqueues the Component for rendering. * - * A Group contains Components that will be rendered on top of each other. - * Components added later will be rendered above Components already in the Group. + * @param {Component} component + */ + function registerToRender(component: Component): void; + /** + * Enqueues the Component for layout and rendering. + * + * @param {Component} component + */ + function registerToComputeLayout(component: Component): void; + /** + * Renders all Components waiting to be rendered immediately + * instead of waiting until the next frame. + * + * Useful to call when debugging. + */ + function flush(): void; + } + } + + namespace Plottable { + /** + * Accesses a specific datum property. + */ + interface Accessor { + (datum: any, index: number, dataset: Dataset): T; + } + /** + * Retrieves a scaled datum property. + * Essentially passes the result of an Accessor through a Scale. + */ + type Projector = (datum: any, index: number, dataset: Dataset) => any; + /** + * A mapping from attributes ("x", "fill", etc.) to the functions that get + * that information out of the data. + */ + type AttributeToProjector = { + [attr: string]: Projector; + }; + /** + * A function that generates attribute values from the datum and index. + * Essentially a Projector with a particular Dataset rolled in. + */ + type AppliedProjector = (datum: any, index: number) => any; + /** + * A mapping from attributes to the AppliedProjectors used to generate them. + */ + type AttributeToAppliedProjector = { + [attr: string]: AppliedProjector; + }; + /** + * Space request used during layout negotiation. + * + * @member {number} minWidth The minimum acceptable width given the offered space. + * @member {number} minHeight the minimum acceptable height given the offered space. + */ + type SpaceRequest = { + minWidth: number; + minHeight: number; + }; + /** + * Min and max values for a particular property. + */ + type Range = { + min: number; + max: number; + }; + /** + * A location in pixel-space. + */ + type Point = { + x: number; + y: number; + }; + /** + * The corners of a box. + */ + type Bounds = { + topLeft: Point; + bottomRight: Point; + }; + /** + * An object representing a data-backed visual entity inside a Component. + */ + interface Entity { + datum: any; + position: Point; + selection: d3.Selection; + component: C; + } + } + + + namespace Plottable { + type Formatter = (d: any) => string; + /** + * This field is deprecated and will be removed in v2.0.0. + * + * The number of milliseconds between midnight one day and the next is + * not a fixed quantity. + * + * Use date.setDate(date.getDate() + number_of_days) instead. + * + */ + var MILLISECONDS_IN_ONE_DAY: number; + namespace Formatters { + /** + * Creates a formatter for currency values. + * + * @param {number} [precision] The number of decimal places to show (default 2). + * @param {string} [symbol] The currency symbol to use (default "$"). + * @param {boolean} [prefix] Whether to prepend or append the currency symbol (default true). + * @param {boolean} [onlyShowUnchanged] Whether to return a value if value changes after formatting (default true). + * + * @returns {Formatter} A formatter for currency values. + */ + function currency(precision?: number, symbol?: string, prefix?: boolean): (d: any) => string; + /** + * Creates a formatter that displays exactly [precision] decimal places. + * + * @param {number} [precision] The number of decimal places to show (default 3). + * @param {boolean} [onlyShowUnchanged] Whether to return a value if value changes after formatting (default true). + * + * @returns {Formatter} A formatter that displays exactly [precision] decimal places. + */ + function fixed(precision?: number): (d: any) => string; + /** + * Creates a formatter that formats numbers to show no more than + * [precision] decimal places. All other values are stringified. + * + * @param {number} [precision] The number of decimal places to show (default 3). + * @param {boolean} [onlyShowUnchanged] Whether to return a value if value changes after formatting (default true). + * + * @returns {Formatter} A formatter for general values. + */ + function general(precision?: number): (d: any) => string; + /** + * Creates a formatter that stringifies its input. + * + * @returns {Formatter} A formatter that stringifies its input. + */ + function identity(): (d: any) => string; + /** + * Creates a formatter for percentage values. + * Multiplies the input by 100 and appends "%". + * + * @param {number} [precision] The number of decimal places to show (default 0). + * @param {boolean} [onlyShowUnchanged] Whether to return a value if value changes after formatting (default true). + * + * @returns {Formatter} A formatter for percentage values. + */ + function percentage(precision?: number): (d: any) => string; + /** + * Creates a formatter for values that displays [precision] significant figures + * and puts SI notation. + * + * @param {number} [precision] The number of significant figures to show (default 3). + * + * @returns {Formatter} A formatter for SI values. + */ + function siSuffix(precision?: number): (d: any) => string; + /** + * Creates a multi time formatter that displays dates. + * + * @returns {Formatter} A formatter for time/date values. + */ + function multiTime(): (d: any) => string; + /** + * Creates a time formatter that displays time/date using given specifier. + * + * List of directives can be found on: https://github.com/mbostock/d3/wiki/Time-Formatting#format + * + * @param {string} [specifier] The specifier for the formatter. + * + * @returns {Formatter} A formatter for time/date values. + */ + function time(specifier: string): Formatter; + /** + * Creates a formatter for relative dates. + * + * @param {number} baseValue The start date (as epoch time) used in computing relative dates (default 0) + * @param {number} increment The unit used in calculating relative date values (default MILLISECONDS_IN_ONE_DAY) + * @param {string} label The label to append to the formatted string (default "") + * + * @returns {Formatter} A formatter for time/date values. + */ + function relativeDate(baseValue?: number, increment?: number, label?: string): (d: any) => string; + } + } + + + namespace Plottable { + /** + * A SymbolFactory is a function that takes in a symbolSize which is the edge length of the render area + * and returns a string representing the 'd' attribute of the resultant 'path' element + */ + type SymbolFactory = (symbolSize: number) => string; + namespace SymbolFactories { + function circle(): SymbolFactory; + function square(): SymbolFactory; + function cross(): SymbolFactory; + function diamond(): SymbolFactory; + function triangleUp(): SymbolFactory; + function triangleDown(): SymbolFactory; + } + } + + + namespace Plottable { + interface ScaleCallback> { + (scale: S): any; + } + namespace Scales { + /** + * A function that supplies domain values to be included into a Scale. + * + * @param {Scale} scale + * @returns {D[]} An array of values that should be included in the Scale. + */ + interface IncludedValuesProvider { + (scale: Scale): D[]; + } + /** + * A function that supplies padding exception values for the Scale. + * If one end of the domain is set to an excepted value as a result of autoDomain()-ing, + * that end of the domain will not be padded. + * + * @param {QuantitativeScale} scale + * @returns {D[]} An array of values that should not be padded. + */ + interface PaddingExceptionsProvider { + (scale: QuantitativeScale): D[]; + } + } + class Scale { + /** + * A Scale is a function (in the mathematical sense) that maps values from a domain to a range. * * @constructor - * @param {Component[]} [components=[]] Components to be added to the Group. */ - constructor(components?: Component[]); - protected _forEach(callback: (component: Component) => any): void; + constructor(); /** - * Checks whether the specified Component is in the Group. + * Given an array of potential domain values, computes the extent of those values. + * + * @param {D[]} values + * @returns {D[]} The extent of the input values. + */ + extentOfValues(values: D[]): D[]; + protected _getAllIncludedValues(): D[]; + protected _getExtent(): D[]; + /** + * Adds a callback to be called when the Scale updates. + * + * @param {ScaleCallback} callback. + * @returns {Scale} The calling Scale. + */ + onUpdate(callback: ScaleCallback>): Scale; + /** + * Removes a callback that would be called when the Scale updates. + * + * @param {ScaleCallback} callback. + * @returns {Scale} The calling Scale. + */ + offUpdate(callback: ScaleCallback>): Scale; + protected _dispatchUpdate(): void; + /** + * Sets the Scale's domain so that it spans the Extents of all its ExtentsProviders. + * + * @returns {Scale} The calling Scale. + */ + autoDomain(): Scale; + protected _autoDomainIfAutomaticMode(): void; + /** + * Computes the range value corresponding to a given domain value. + * + * @param {D} value + * @returns {R} The range value corresponding to the supplied domain value. + */ + scale(value: D): R; + /** + * Gets the domain. + * + * @returns {D[]} The current domain. + */ + domain(): D[]; + /** + * Sets the domain. + * + * @param {D[]} values + * @returns {Scale} The calling Scale. + */ + domain(values: D[]): Scale; + protected _getDomain(): void; + protected _setDomain(values: D[]): void; + protected _setBackingScaleDomain(values: D[]): void; + /** + * Gets the range. + * + * @returns {R[]} The current range. + */ + range(): R[]; + /** + * Sets the range. + * + * @param {R[]} values + * @returns {Scale} The calling Scale. + */ + range(values: R[]): Scale; + protected _getRange(): void; + protected _setRange(values: R[]): void; + /** + * Adds an IncludedValuesProvider to the Scale. + * + * @param {Scales.IncludedValuesProvider} provider + * @returns {Scale} The calling Scale. + */ + addIncludedValuesProvider(provider: Scales.IncludedValuesProvider): Scale; + /** + * Removes the IncludedValuesProvider from the Scale. + * + * @param {Scales.IncludedValuesProvider} provider + * @returns {Scale} The calling Scale. + */ + removeIncludedValuesProvider(provider: Scales.IncludedValuesProvider): Scale; + } + } + + + namespace Plottable { + class QuantitativeScale extends Scale { + protected static _DEFAULT_NUM_TICKS: number; + /** + * A QuantitativeScale is a Scale that maps number-like values to numbers. + * It is invertible and continuous. + * + * @constructor + */ + constructor(); + autoDomain(): QuantitativeScale; + protected _autoDomainIfAutomaticMode(): void; + protected _getExtent(): D[]; + /** + * Adds a padding exception provider. + * If one end of the domain is set to an excepted value as a result of autoDomain()-ing, + * that end of the domain will not be padded. + * + * @param {Scales.PaddingExceptionProvider} provider The provider function. + * @returns {QuantitativeScale} The calling QuantitativeScale. + */ + addPaddingExceptionsProvider(provider: Scales.PaddingExceptionsProvider): QuantitativeScale; + /** + * Removes the padding exception provider. + * + * @param {Scales.PaddingExceptionProvider} provider The provider function. + * @returns {QuantitativeScale} The calling QuantitativeScale. + */ + removePaddingExceptionsProvider(provider: Scales.PaddingExceptionsProvider): QuantitativeScale; + /** + * Gets the padding proportion. + */ + padProportion(): number; + /** + * Sets the padding porportion. + * When autoDomain()-ing, the computed domain will be expanded by this proportion, + * then rounded to human-readable values. + * + * @param {number} padProportion The padding proportion. Passing 0 disables padding. + * @returns {QuantitativeScale} The calling QuantitativeScale. + */ + padProportion(padProportion: number): QuantitativeScale; + protected _expandSingleValueDomain(singleValueDomain: D[]): D[]; + /** + * Computes the domain value corresponding to a supplied range value. + * + * @param {number} value: A value from the Scale's range. + * @returns {D} The domain value corresponding to the supplied range value. + */ + invert(value: number): D; + domain(): D[]; + domain(values: D[]): QuantitativeScale; + /** + * Gets the lower end of the domain. + * + * @return {D} + */ + domainMin(): D; + /** + * Sets the lower end of the domain. + * + * @return {QuantitativeScale} The calling QuantitativeScale. + */ + domainMin(domainMin: D): QuantitativeScale; + /** + * Gets the upper end of the domain. + * + * @return {D} + */ + domainMax(): D; + /** + * Sets the upper end of the domain. + * + * @return {QuantitativeScale} The calling QuantitativeScale. + */ + domainMax(domainMax: D): QuantitativeScale; + extentOfValues(values: D[]): D[]; + protected _setDomain(values: D[]): void; + /** + * Gets the array of tick values generated by the default algorithm. + */ + defaultTicks(): D[]; + /** + * Gets an array of tick values spanning the domain. + * + * @returns {D[]} + */ + ticks(): D[]; + /** + * Given a domain, expands its domain onto "nice" values, e.g. whole + * numbers. + */ + protected _niceDomain(domain: D[], count?: number): D[]; + protected _defaultExtent(): D[]; + /** + * Gets the TickGenerator. + */ + tickGenerator(): Scales.TickGenerators.TickGenerator; + /** + * Sets the TickGenerator + * + * @param {TickGenerator} generator + * @return {QuantitativeScale} The calling QuantitativeScale. + */ + tickGenerator(generator: Scales.TickGenerators.TickGenerator): QuantitativeScale; + } + } + + + namespace Plottable { + namespace Scales { + class Linear extends QuantitativeScale { + /** + * @constructor + */ + constructor(); + protected _defaultExtent(): number[]; + protected _expandSingleValueDomain(singleValueDomain: number[]): number[]; + scale(value: number): number; + protected _getDomain(): number[]; + protected _setBackingScaleDomain(values: number[]): void; + protected _getRange(): number[]; + protected _setRange(values: number[]): void; + invert(value: number): number; + defaultTicks(): number[]; + protected _niceDomain(domain: number[], count?: number): number[]; + } + } + } + + + namespace Plottable { + namespace Scales { + class ModifiedLog extends QuantitativeScale { + /** + * A ModifiedLog Scale acts as a regular log scale for large numbers. + * As it approaches 0, it gradually becomes linear. + * Consequently, a ModifiedLog Scale can process 0 and negative numbers. + * + * @constructor + * @param {number} [base=10] + * The base of the log. Must be > 1. + * + * For x <= base, scale(x) = log(x). + * + * For 0 < x < base, scale(x) will become more and more + * linear as it approaches 0. + * + * At x == 0, scale(x) == 0. + * + * For negative values, scale(-x) = -scale(x). + */ + constructor(base?: number); + scale(x: number): number; + invert(x: number): number; + protected _getDomain(): number[]; + protected _setDomain(values: number[]): void; + protected _setBackingScaleDomain(values: number[]): void; + ticks(): number[]; + protected _niceDomain(domain: number[], count?: number): number[]; + protected _defaultExtent(): number[]; + protected _expandSingleValueDomain(singleValueDomain: number[]): number[]; + protected _getRange(): number[]; + protected _setRange(values: number[]): void; + defaultTicks(): number[]; + } + } + } + + + namespace Plottable { + namespace Scales { + class Category extends Scale { + /** + * A Category Scale maps strings to numbers. + * + * @constructor + */ + constructor(); + extentOfValues(values: string[]): string[]; + protected _getExtent(): string[]; + domain(): string[]; + domain(values: string[]): Category; + protected _setDomain(values: string[]): void; + range(): [number, number]; + range(values: [number, number]): Category; + /** + * Returns the width of the range band. + * + * @returns {number} The range band width + */ + rangeBand(): number; + /** + * Returns the step width of the scale. + * + * The step width is the pixel distance between adjacent values in the domain. + * + * @returns {number} + */ + stepWidth(): number; + /** + * Gets the inner padding. + * + * The inner padding is defined as the padding in between bands on the scale, + * expressed as a multiple of the rangeBand(). + * + * @returns {number} + */ + innerPadding(): number; + /** + * Sets the inner padding. + * + * The inner padding is defined as the padding in between bands on the scale, + * expressed as a multiple of the rangeBand(). + * + * @returns {Category} The calling Category Scale. + */ + innerPadding(innerPadding: number): Category; + /** + * Gets the outer padding. + * + * The outer padding is the padding in between the outer bands and the edges of the range, + * expressed as a multiple of the rangeBand(). + * + * @returns {number} + */ + outerPadding(): number; + /** + * Sets the outer padding. + * + * The outer padding is the padding in between the outer bands and the edges of the range, + * expressed as a multiple of the rangeBand(). + * + * @returns {Category} The calling Category Scale. + */ + outerPadding(outerPadding: number): Category; + scale(value: string): number; + protected _getDomain(): string[]; + protected _setBackingScaleDomain(values: string[]): void; + protected _getRange(): number[]; + protected _setRange(values: number[]): void; + } + } + } + + + namespace Plottable { + namespace Scales { + class Color extends Scale { + /** + * A Color Scale maps string values to color hex values expressed as a string. + * + * @constructor + * @param {string} [scaleType] One of "Category10"/"Category20"/"Category20b"/"Category20c". + * (see https://github.com/mbostock/d3/wiki/Ordinal-Scales#categorical-colors) + * If not supplied, reads the colors defined using CSS -- see plottable.css. + */ + constructor(scaleType?: string); + extentOfValues(values: string[]): string[]; + protected _getExtent(): string[]; + static invalidateColorCache(): void; + /** + * Returns the color-string corresponding to a given string. + * If there are not enough colors in the range(), a lightened version of an existing color will be used. + * + * @param {string} value + * @returns {string} + */ + scale(value: string): string; + protected _getDomain(): string[]; + protected _setBackingScaleDomain(values: string[]): void; + protected _getRange(): string[]; + protected _setRange(values: string[]): void; + } + } + } + + + namespace Plottable { + namespace Scales { + class Time extends QuantitativeScale { + /** + * A Time Scale maps Date objects to numbers. + * + * @constructor + */ + constructor(); + /** + * Returns an array of ticks values separated by the specified interval. + * + * @param {string} interval A string specifying the interval unit. + * @param {number?} [step] The number of multiples of the interval between consecutive ticks. + * @return {Date[]} + */ + tickInterval(interval: string, step?: number): Date[]; + protected _setDomain(values: Date[]): void; + protected _defaultExtent(): Date[]; + protected _expandSingleValueDomain(singleValueDomain: Date[]): Date[]; + scale(value: Date): number; + protected _getDomain(): Date[]; + protected _setBackingScaleDomain(values: Date[]): void; + protected _getRange(): number[]; + protected _setRange(values: number[]): void; + invert(value: number): Date; + defaultTicks(): Date[]; + protected _niceDomain(domain: Date[]): Date[]; + /** + * Transforms the Plottable TimeInterval string into a d3 time interval equivalent. + * If the provided TimeInterval is incorrect, the default is d3.time.year + */ + static timeIntervalToD3Time(timeInterval: string): d3.time.Interval; + } + } + } + + + namespace Plottable { + namespace Scales { + class InterpolatedColor extends Scale { + static REDS: string[]; + static BLUES: string[]; + static POSNEG: string[]; + /** + * An InterpolatedColor Scale maps numbers to color hex values, expressed as strings. + * + * @param {string} [scaleType="linear"] One of "linear"/"log"/"sqrt"/"pow". + */ + constructor(scaleType?: string); + extentOfValues(values: number[]): number[]; + autoDomain(): InterpolatedColor; + scale(value: number): string; + protected _getDomain(): number[]; + protected _setBackingScaleDomain(values: number[]): void; + protected _getRange(): string[]; + protected _setRange(range: string[]): void; + } + } + } + + + namespace Plottable { + namespace Scales { + namespace TickGenerators { + /** + * Generates an array of tick values for the specified scale. + * + * @param {QuantitativeScale} scale + * @returns {D[]} + */ + interface TickGenerator { + (scale: Plottable.QuantitativeScale): D[]; + } + /** + * Creates a TickGenerator using the specified interval. + * + * Generates ticks at multiples of the interval while also including the domain boundaries. + * + * @param {number} interval + * @returns {TickGenerator} + */ + function intervalTickGenerator(interval: number): TickGenerator; + /** + * Creates a TickGenerator returns only integer tick values. + * + * @returns {TickGenerator} + */ + function integerTickGenerator(): TickGenerator; + } + } + } + + + namespace Plottable { + namespace Drawers { + /** + * A step for the drawer to draw. + * + * Specifies how AttributeToProjector needs to be animated. + */ + type DrawStep = { + attrToProjector: AttributeToProjector; + animator: Animator; + }; + /** + * A DrawStep that carries an AttributeToAppliedProjector map. + */ + type AppliedDrawStep = { + attrToAppliedProjector: AttributeToAppliedProjector; + animator: Animator; + }; + } + class Drawer { + protected _svgElementName: string; + protected _className: string; + /** + * A Drawer draws svg elements based on the input Dataset. + * + * @constructor + * @param {Dataset} dataset The dataset associated with this Drawer + */ + constructor(dataset: Dataset); + /** + * Retrieves the renderArea selection for the Drawer. + */ + renderArea(): d3.Selection; + /** + * Sets the renderArea selection for the Drawer. + * + * @param {d3.Selection} Selection containing the to render to. + * @returns {Drawer} The calling Drawer. + */ + renderArea(area: d3.Selection): Drawer; + /** + * Removes the Drawer and its renderArea + */ + remove(): void; + protected _applyDefaultAttributes(selection: d3.Selection): void; + /** + * Calculates the total time it takes to use the input drawSteps to draw the input data + * + * @param {any[]} data The data that would have been drawn + * @param {Drawers.DrawStep[]} drawSteps The DrawSteps to use + * @returns {number} The total time it takes to draw + */ + totalDrawTime(data: any[], drawSteps: Drawers.DrawStep[]): number; + /** + * Draws the data into the renderArea using the spefic steps and metadata + * + * @param{any[]} data The data to be drawn + * @param{DrawStep[]} drawSteps The list of steps, which needs to be drawn + */ + draw(data: any[], drawSteps: Drawers.DrawStep[]): Drawer; + selection(): d3.Selection; + /** + * Returns the CSS selector for this Drawer's visual elements. + */ + selector(): string; + /** + * Returns the D3 selection corresponding to the datum with the specified index. + */ + selectionForIndex(index: number): d3.Selection; + } + } + + + namespace Plottable { + namespace Drawers { + class Line extends Drawer { + constructor(dataset: Dataset); + protected _applyDefaultAttributes(selection: d3.Selection): void; + selectionForIndex(index: number): d3.Selection; + } + } + } + + + namespace Plottable { + namespace Drawers { + class Area extends Drawer { + constructor(dataset: Dataset); + protected _applyDefaultAttributes(selection: d3.Selection): void; + selectionForIndex(index: number): d3.Selection; + } + } + } + + + namespace Plottable { + namespace Drawers { + class Rectangle extends Drawer { + constructor(dataset: Dataset); + } + } + } + + + namespace Plottable { + namespace Drawers { + class Arc extends Drawer { + constructor(dataset: Dataset); + } + } + } + + + namespace Plottable { + namespace Drawers { + class Symbol extends Drawer { + constructor(dataset: Dataset); + } + } + } + + + namespace Plottable { + namespace Drawers { + class Segment extends Drawer { + constructor(dataset: Dataset); + } + } + } + + + namespace Plottable { + type ComponentCallback = (component: Component) => void; + namespace Components { + class Alignment { + static TOP: string; + static BOTTOM: string; + static LEFT: string; + static RIGHT: string; + static CENTER: string; + } + } + class Component { + protected _boundingBox: d3.Selection; + protected _clipPathEnabled: boolean; + protected _isSetup: boolean; + protected _isAnchored: boolean; + constructor(); + /** + * Attaches the Component as a child of a given d3 Selection. + * + * @param {d3.Selection} selection. + * @returns {Component} The calling Component. + */ + anchor(selection: d3.Selection): Component; + /** + * Adds a callback to be called on anchoring the Component to the DOM. + * If the Component is already anchored, the callback is called immediately. + * + * @param {ComponentCallback} callback + * @return {Component} + */ + onAnchor(callback: ComponentCallback): Component; + /** + * Removes a callback that would be called on anchoring the Component to the DOM. + * The callback is identified by reference equality. + * + * @param {ComponentCallback} callback + * @return {Component} + */ + offAnchor(callback: ComponentCallback): Component; + /** + * Creates additional elements as necessary for the Component to function. + * Called during anchor() if the Component's element has not been created yet. + * Override in subclasses to provide additional functionality. + */ + protected _setup(): void; + /** + * Given available space in pixels, returns the minimum width and height this Component will need. + * + * @param {number} availableWidth + * @param {number} availableHeight + * @returns {SpaceRequest} + */ + requestedSpace(availableWidth: number, availableHeight: number): SpaceRequest; + /** + * Computes and sets the size, position, and alignment of the Component from the specified values. + * If no parameters are supplied and the Component is a root node, + * they are inferred from the size of the Component's element. + * + * @param {Point} [origin] Origin of the space offered to the Component. + * @param {number} [availableWidth] Available width in pixels. + * @param {number} [availableHeight] Available height in pixels. + * @returns {Component} The calling Component. + */ + computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): Component; + protected _sizeFromOffer(availableWidth: number, availableHeight: number): { + width: number; + height: number; + }; + /** + * Queues the Component for rendering. + * + * @returns {Component} The calling Component. + */ + render(): Component; + /** + * Renders the Component without waiting for the next frame. + */ + renderImmediately(): Component; + /** + * Causes the Component to re-layout and render. + * + * This function should be called when a CSS change has occured that could + * influence the layout of the Component, such as changing the font size. + * + * @returns {Component} The calling Component. + */ + redraw(): Component; + /** + * Renders the Component to a given . + * + * @param {String|d3.Selection} element A selector-string for the , or a d3 selection containing an . + * @returns {Component} The calling Component. + */ + renderTo(element: String | d3.Selection): Component; + /** + * Gets the x alignment of the Component. + */ + xAlignment(): string; + /** + * Sets the x alignment of the Component. + * + * @param {string} xAlignment The x alignment of the Component ("left"/"center"/"right"). + * @returns {Component} The calling Component. + */ + xAlignment(xAlignment: string): Component; + /** + * Gets the y alignment of the Component. + */ + yAlignment(): string; + /** + * Sets the y alignment of the Component. + * + * @param {string} yAlignment The y alignment of the Component ("top"/"center"/"bottom"). + * @returns {Component} The calling Component. + */ + yAlignment(yAlignment: string): Component; + /** + * Checks if the Component has a given CSS class. + * + * @param {string} cssClass The CSS class to check for. + */ + hasClass(cssClass: string): boolean; + /** + * Adds a given CSS class to the Component. + * + * @param {string} cssClass The CSS class to add. + * @returns {Component} The calling Component. + */ + addClass(cssClass: string): Component; + /** + * Removes a given CSS class from the Component. + * + * @param {string} cssClass The CSS class to remove. + * @returns {Component} The calling Component. + */ + removeClass(cssClass: string): Component; + /** + * Checks if the Component has a fixed width or if it grows to fill available space. + * Returns false by default on the base Component class. + */ + fixedWidth(): boolean; + /** + * Checks if the Component has a fixed height or if it grows to fill available space. + * Returns false by default on the base Component class. + */ + fixedHeight(): boolean; + /** + * Detaches a Component from the DOM. The Component can be reused. + * + * This should only be used if you plan on reusing the calling Component. Otherwise, use destroy(). + * + * @returns The calling Component. + */ + detach(): Component; + /** + * Adds a callback to be called when the Component is detach()-ed. + * + * @param {ComponentCallback} callback + * @return {Component} The calling Component. + */ + onDetach(callback: ComponentCallback): Component; + /** + * Removes a callback to be called when the Component is detach()-ed. + * The callback is identified by reference equality. + * + * @param {ComponentCallback} callback + * @return {Component} The calling Component. + */ + offDetach(callback: ComponentCallback): Component; + /** + * Gets the parent ComponentContainer for this Component. + */ + parent(): ComponentContainer; + /** + * Sets the parent ComponentContainer for this Component. + * An error will be thrown if the parent does not contain this Component. + * Adding a Component to a ComponentContainer should be done + * using the appropriate method on the ComponentContainer. + */ + parent(parent: ComponentContainer): Component; + /** + * Removes a Component from the DOM and disconnects all listeners. + */ + destroy(): void; + /** + * Gets the width of the Component in pixels. + */ + width(): number; + /** + * Gets the height of the Component in pixels. + */ + height(): number; + /** + * Gets the origin of the Component relative to its parent. + * + * @return {Point} + */ + origin(): Point; + /** + * Gets the origin of the Component relative to the root . + * + * @return {Point} + */ + originToSVG(): Point; + /** + * Gets the Selection containing the in front of the visual elements of the Component. + * + * Will return undefined if the Component has not been anchored. + * + * @return {d3.Selection} + */ + foreground(): d3.Selection; + /** + * Gets a Selection containing a that holds the visual elements of the Component. + * + * Will return undefined if the Component has not been anchored. + * + * @return {d3.Selection} content selection for the Component + */ + content(): d3.Selection; + /** + * Gets the Selection containing the behind the visual elements of the Component. + * + * Will return undefined if the Component has not been anchored. + * + * @return {d3.Selection} background selection for the Component + */ + background(): d3.Selection; + } + } + + + namespace Plottable { + class ComponentContainer extends Component { + constructor(); + anchor(selection: d3.Selection): ComponentContainer; + render(): ComponentContainer; + /** + * Checks whether the specified Component is in the ComponentContainer. */ has(component: Component): boolean; - requestedSpace(offeredWidth: number, offeredHeight: number): SpaceRequest; - computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): Group; - protected _sizeFromOffer(availableWidth: number, availableHeight: number): { - width: number; - height: number; - }; - fixedWidth(): boolean; - fixedHeight(): boolean; + protected _adoptAndAnchor(component: Component): void; /** - * @return {Component[]} The Components in this Group. + * Removes the specified Component from the ComponentContainer. */ - components(): Component[]; + remove(component: Component): ComponentContainer; /** - * Adds a Component to this Group. - * The added Component will be rendered above Components already in the Group. + * Carry out the actual removal of a Component. + * Implementation dependent on the type of container. + * + * @return {boolean} true if the Component was successfully removed, false otherwise. */ - append(component: Component): Group; protected _remove(component: Component): boolean; + /** + * Invokes a callback on each Component in the ComponentContainer. + */ + protected _forEach(callback: (component: Component) => void): void; + /** + * Destroys the ComponentContainer and all Components within it. + */ + destroy(): void; } } -} -declare namespace Plottable { - class Axis extends Component { - /** - * The css class applied to each end tick mark (the line on the end tick). - */ - static END_TICK_MARK_CLASS: string; - /** - * The css class applied to each tick mark (the line on the tick). - */ - static TICK_MARK_CLASS: string; - /** - * The css class applied to each tick label (the text associated with the tick). - */ - static TICK_LABEL_CLASS: string; - protected _tickMarkContainer: d3.Selection; - protected _tickLabelContainer: d3.Selection; - protected _baseline: d3.Selection; - protected _scale: Scale; - protected _computedWidth: number; - protected _computedHeight: number; - /** - * Constructs an Axis. - * An Axis is a visual representation of a Scale. - * - * @constructor - * @param {Scale} scale - * @param {string} orientation One of "top"/"bottom"/"left"/"right". - */ - constructor(scale: Scale, orientation: string); - destroy(): void; - protected _isHorizontal(): boolean; - protected _computeWidth(): number; - protected _computeHeight(): number; - requestedSpace(offeredWidth: number, offeredHeight: number): SpaceRequest; - fixedHeight(): boolean; - fixedWidth(): boolean; - protected _rescale(): void; - computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): Axis; - protected _setup(): void; - protected _getTickValues(): D[]; - renderImmediately(): Axis; - protected _generateBaselineAttrHash(): { - [key: string]: number; - }; - protected _generateTickMarkAttrHash(isEndTickMark?: boolean): { - [key: string]: number | ((d: any) => number); - }; - redraw(): Component; - protected _setDefaultAlignment(): void; - /** - * Gets the Formatter on the Axis. Tick values are passed through the - * Formatter before being displayed. - */ - formatter(): Formatter; - /** - * Sets the Formatter on the Axis. Tick values are passed through the - * Formatter before being displayed. - * - * @param {Formatter} formatter - * @returns {Axis} The calling Axis. - */ - formatter(formatter: Formatter): Axis; - /** - * @deprecated As of release 1.3, replaced by innerTickLength() - * - * Gets the tick mark length in pixels. - */ - tickLength(): number; - /** - * Sets the tick mark length in pixels. - * - * @param {number} length - * @returns {Axis} The calling Axis. - */ - tickLength(length: number): Axis; - /** - * Gets the tick mark length in pixels. - */ - innerTickLength(): number; - /** - * Sets the tick mark length in pixels. - * - * @param {number} length - * @returns {Axis} The calling Axis. - */ - innerTickLength(length: number): Axis; - /** - * Gets the end tick mark length in pixels. - */ - endTickLength(): number; - /** - * Sets the end tick mark length in pixels. - * - * @param {number} length - * @returns {Axis} The calling Axis. - */ - endTickLength(length: number): Axis; - protected _maxLabelTickLength(): number; - /** - * Gets the padding between each tick mark and its associated label in pixels. - */ - tickLabelPadding(): number; - /** - * Sets the padding between each tick mark and its associated label in pixels. - * - * @param {number} padding - * @returns {Axis} The calling Axis. - */ - tickLabelPadding(padding: number): Axis; - /** - * Gets the margin in pixels. - * The margin is the amount of space between the tick labels and the outer edge of the Axis. - */ - margin(): number; - /** - * Sets the margin in pixels. - * The margin is the amount of space between the tick labels and the outer edge of the Axis. - * - * @param {number} size - * @returns {Axis} The calling Axis. - */ - margin(size: number): Axis; - /** - * Gets the orientation of the Axis. - */ - orientation(): string; - /** - * Sets the orientation of the Axis. - * - * @param {number} orientation One of "top"/"bottom"/"left"/"right". - * @returns {Axis} The calling Axis. - */ - orientation(orientation: string): Axis; - /** - * Gets whether the Axis shows the end tick labels. - */ - showEndTickLabels(): boolean; - /** - * Sets whether the Axis shows the end tick labels. - * - * @param {boolean} show - * @returns {Axis} The calling Axis. - */ - showEndTickLabels(show: boolean): Axis; - } -} - - -declare namespace Plottable { - namespace TimeInterval { - var second: string; - var minute: string; - var hour: string; - var day: string; - var week: string; - var month: string; - var year: string; - } - namespace Axes { - /** - * Defines a configuration for a Time Axis tier. - * For details on how ticks are generated see: https://github.com/mbostock/d3/wiki/Time-Scales#ticks - * interval - A time unit associated with this configuration (seconds, minutes, hours, etc). - * step - number of intervals between each tick. - * formatter - formatter used to format tick labels. - */ - type TimeAxisTierConfiguration = { - interval: string; - step: number; - formatter: Formatter; - }; - /** - * An array of linked TimeAxisTierConfigurations. - * Each configuration will be shown on a different tier. - * Currently, up to two tiers are supported. - */ - type TimeAxisConfiguration = TimeAxisTierConfiguration[]; - class Time extends Axis { - /** - * The CSS class applied to each Time Axis tier - */ - static TIME_AXIS_TIER_CLASS: string; - /** - * Constructs a Time Axis. - * - * A Time Axis is a visual representation of a Time Scale. - * - * @constructor - * @param {Scales.Time} scale - * @param {string} orientation One of "top"/"bottom". - */ - constructor(scale: Scales.Time, orientation: string); - /** - * Gets the label positions for each tier. - */ - tierLabelPositions(): string[]; - /** - * Sets the label positions for each tier. - * - * @param {string[]} newPositions The positions for each tier. "bottom" and "center" are the only supported values. - * @returns {Axes.Time} The calling Time Axis. - */ - tierLabelPositions(newPositions: string[]): Time; - /** - * Gets the possible TimeAxisConfigurations. - */ - axisConfigurations(): TimeAxisConfiguration[]; - /** - * Sets the possible TimeAxisConfigurations. - * The Time Axis will choose the most precise configuration that will display in the available space. - * - * @param {TimeAxisConfiguration[]} configurations - * @returns {Axes.Time} The calling Time Axis. - */ - axisConfigurations(configurations: TimeAxisConfiguration[]): Time; - orientation(): string; - orientation(orientation: string): Time; - protected _computeHeight(): number; - protected _sizeFromOffer(availableWidth: number, availableHeight: number): { - width: number; - height: number; - }; - protected _setup(): void; - protected _getTickValues(): any[]; - renderImmediately(): Time; + namespace Plottable { + namespace Components { + class Group extends ComponentContainer { + /** + * Constructs a Group. + * + * A Group contains Components that will be rendered on top of each other. + * Components added later will be rendered above Components already in the Group. + * + * @constructor + * @param {Component[]} [components=[]] Components to be added to the Group. + */ + constructor(components?: Component[]); + protected _forEach(callback: (component: Component) => any): void; + /** + * Checks whether the specified Component is in the Group. + */ + has(component: Component): boolean; + requestedSpace(offeredWidth: number, offeredHeight: number): SpaceRequest; + computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): Group; + protected _sizeFromOffer(availableWidth: number, availableHeight: number): { + width: number; + height: number; + }; + fixedWidth(): boolean; + fixedHeight(): boolean; + /** + * @return {Component[]} The Components in this Group. + */ + components(): Component[]; + /** + * Adds a Component to this Group. + * The added Component will be rendered above Components already in the Group. + */ + append(component: Component): Group; + protected _remove(component: Component): boolean; + } } } -} -declare namespace Plottable { - namespace Axes { - class Numeric extends Axis { + namespace Plottable { + class Axis extends Component { /** - * Constructs a Numeric Axis. - * - * A Numeric Axis is a visual representation of a QuantitativeScale. + * The css class applied to each end tick mark (the line on the end tick). + */ + static END_TICK_MARK_CLASS: string; + /** + * The css class applied to each tick mark (the line on the tick). + */ + static TICK_MARK_CLASS: string; + /** + * The css class applied to each tick label (the text associated with the tick). + */ + static TICK_LABEL_CLASS: string; + protected _tickMarkContainer: d3.Selection; + protected _tickLabelContainer: d3.Selection; + protected _baseline: d3.Selection; + protected _scale: Scale; + protected _computedWidth: number; + protected _computedHeight: number; + /** + * Constructs an Axis. + * An Axis is a visual representation of a Scale. * * @constructor - * @param {QuantitativeScale} scale + * @param {Scale} scale * @param {string} orientation One of "top"/"bottom"/"left"/"right". */ - constructor(scale: QuantitativeScale, orientation: string); - protected _setup(): void; + constructor(scale: Scale, orientation: string); + destroy(): void; + protected _isHorizontal(): boolean; protected _computeWidth(): number; protected _computeHeight(): number; - protected _getTickValues(): number[]; + requestedSpace(offeredWidth: number, offeredHeight: number): SpaceRequest; + fixedHeight(): boolean; + fixedWidth(): boolean; protected _rescale(): void; - renderImmediately(): Numeric; - /** - * Gets the tick label position relative to the tick marks. - * - * @returns {string} The current tick label position. - */ - tickLabelPosition(): string; - /** - * Sets the tick label position relative to the tick marks. - * - * @param {string} position "top"/"center"/"bottom" for a vertical Numeric Axis, - * "left"/"center"/"right" for a horizontal Numeric Axis. - * @returns {Numeric} The calling Numeric Axis. - */ - tickLabelPosition(position: string): Numeric; - } - } -} - - -declare namespace Plottable { - namespace Axes { - class Category extends Axis { - /** - * Constructs a Category Axis. - * - * A Category Axis is a visual representation of a Category Scale. - * - * @constructor - * @param {Scales.Category} scale - * @param {string} [orientation="bottom"] One of "top"/"bottom"/"left"/"right". - */ - constructor(scale: Scales.Category, orientation: string); + computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): Axis; protected _setup(): void; - protected _rescale(): Component; - requestedSpace(offeredWidth: number, offeredHeight: number): SpaceRequest; - protected _getTickValues(): string[]; + protected _getTickValues(): D[]; + renderImmediately(): Axis; + protected _generateBaselineAttrHash(): { + [key: string]: number; + }; + protected _generateTickMarkAttrHash(isEndTickMark?: boolean): { + [key: string]: number | ((d: any) => number); + }; + redraw(): Component; + protected _setDefaultAlignment(): void; /** - * Gets the tick label angle in degrees. - */ - tickLabelAngle(): number; - /** - * Sets the tick label angle in degrees. - * Right now only -90/0/90 are supported. 0 is horizontal. - * - * @param {number} angle - * @returns {Category} The calling Category Axis. - */ - tickLabelAngle(angle: number): Category; - renderImmediately(): Category; - computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): Axis; - } - } -} - - -declare namespace Plottable { - namespace Components { - class Label extends Component { - /** - * A Label is a Component that displays a single line of text. - * - * @constructor - * @param {string} [displayText=""] The text of the Label. - * @param {number} [angle=0] The angle of the Label in degrees (-90/0/90). 0 is horizontal. - */ - constructor(displayText?: string, angle?: number); - requestedSpace(offeredWidth: number, offeredHeight: number): SpaceRequest; - protected _setup(): void; - /** - * Gets the Label's text. - */ - text(): string; - /** - * Sets the Label's text. - * - * @param {string} displayText - * @returns {Label} The calling Label. - */ - text(displayText: string): Label; - /** - * Gets the angle of the Label in degrees. - */ - angle(): number; - /** - * Sets the angle of the Label in degrees. - * - * @param {number} angle One of -90/0/90. 0 is horizontal. - * @returns {Label} The calling Label. - */ - angle(angle: number): Label; - /** - * Gets the amount of padding around the Label in pixels. - */ - padding(): number; - /** - * Sets the amount of padding around the Label in pixels. - * - * @param {number} padAmount - * @returns {Label} The calling Label. - */ - padding(padAmount: number): Label; - fixedWidth(): boolean; - fixedHeight(): boolean; - renderImmediately(): Label; - } - class TitleLabel extends Label { - static TITLE_LABEL_CLASS: string; - /** - * @constructor - * @param {string} [text] - * @param {number} [angle] One of -90/0/90. 0 is horizontal. - */ - constructor(text?: string, angle?: number); - } - class AxisLabel extends Label { - static AXIS_LABEL_CLASS: string; - /** - * @constructor - * @param {string} [text] - * @param {number} [angle] One of -90/0/90. 0 is horizontal. - */ - constructor(text?: string, angle?: number); - } - } -} - - -declare namespace Plottable { - namespace Components { - class Legend extends Component { - /** - * The css class applied to each legend row - */ - static LEGEND_ROW_CLASS: string; - /** - * The css class applied to each legend entry - */ - static LEGEND_ENTRY_CLASS: string; - /** - * The css class applied to each legend symbol - */ - static LEGEND_SYMBOL_CLASS: string; - /** - * The Legend consists of a series of entries, each with a color and label taken from the Color Scale. - * - * @constructor - * @param {Scale.Color} scale - */ - constructor(colorScale: Scales.Color); - protected _setup(): void; - /** - * Gets the maximum number of entries per row. - * - * @returns {number} - */ - maxEntriesPerRow(): number; - /** - * Sets the maximum number of entries perrow. - * - * @param {number} maxEntriesPerRow - * @returns {Legend} The calling Legend. - */ - maxEntriesPerRow(maxEntriesPerRow: number): Legend; - /** - * Gets the current comparator for the Legend's entries. - * - * @returns {(a: string, b: string) => number} - */ - comparator(): (a: string, b: string) => number; - /** - * Sets a new comparator for the Legend's entries. - * The comparator is used to set the display order of the entries. - * - * @param {(a: string, b: string) => number} comparator - * @returns {Legend} The calling Legend. - */ - comparator(comparator: (a: string, b: string) => number): Legend; - /** - * Gets the Color Scale. - * - * @returns {Scales.Color} - */ - colorScale(): Scales.Color; - /** - * Sets the Color Scale. - * - * @param {Scales.Color} scale - * @returns {Legend} The calling Legend. - */ - colorScale(colorScale: Scales.Color): Legend; - destroy(): void; - requestedSpace(offeredWidth: number, offeredHeight: number): SpaceRequest; - /** - * Gets the Entities (representing Legend entries) at a particular point. - * Returns an empty array if no Entities are present at that location. - * - * @param {Point} p - * @returns {Entity[]} - */ - entitiesAt(p: Point): Entity[]; - renderImmediately(): Legend; - /** - * Gets the function determining the symbols of the Legend. - * - * @returns {(datum: any, index: number) => symbolFactory} - */ - symbol(): (datum: any, index: number) => SymbolFactory; - /** - * Sets the function determining the symbols of the Legend. - * - * @param {(datum: any, index: number) => SymbolFactory} symbol - * @returns {Legend} The calling Legend - */ - symbol(symbol: (datum: any, index: number) => SymbolFactory): Legend; - fixedWidth(): boolean; - fixedHeight(): boolean; - } - } -} - - -declare namespace Plottable { - namespace Components { - class InterpolatedColorLegend extends Component { - /** - * The css class applied to the legend labels. - */ - static LEGEND_LABEL_CLASS: string; - /** - * Creates an InterpolatedColorLegend. - * - * The InterpolatedColorLegend consists of a sequence of swatches that show the - * associated InterpolatedColor Scale sampled at various points. - * Two labels show the maximum and minimum values of the InterpolatedColor Scale. - * - * @constructor - * @param {Scales.InterpolatedColor} interpolatedColorScale - */ - constructor(interpolatedColorScale: Scales.InterpolatedColor); - destroy(): void; - /** - * Gets the Formatter for the labels. + * Gets the Formatter on the Axis. Tick values are passed through the + * Formatter before being displayed. */ formatter(): Formatter; /** - * Sets the Formatter for the labels. + * Sets the Formatter on the Axis. Tick values are passed through the + * Formatter before being displayed. * * @param {Formatter} formatter - * @returns {InterpolatedColorLegend} The calling InterpolatedColorLegend. + * @returns {Axis} The calling Axis. */ - formatter(formatter: Formatter): InterpolatedColorLegend; + formatter(formatter: Formatter): Axis; /** - * Gets the orientation. + * @deprecated As of release 1.3, replaced by innerTickLength() + * + * Gets the tick mark length in pixels. + */ + tickLength(): number; + /** + * Sets the tick mark length in pixels. + * + * @param {number} length + * @returns {Axis} The calling Axis. + */ + tickLength(length: number): Axis; + /** + * Gets the tick mark length in pixels. + */ + innerTickLength(): number; + /** + * Sets the tick mark length in pixels. + * + * @param {number} length + * @returns {Axis} The calling Axis. + */ + innerTickLength(length: number): Axis; + /** + * Gets the end tick mark length in pixels. + */ + endTickLength(): number; + /** + * Sets the end tick mark length in pixels. + * + * @param {number} length + * @returns {Axis} The calling Axis. + */ + endTickLength(length: number): Axis; + protected _maxLabelTickLength(): number; + /** + * Gets the padding between each tick mark and its associated label in pixels. + */ + tickLabelPadding(): number; + /** + * Sets the padding between each tick mark and its associated label in pixels. + * + * @param {number} padding + * @returns {Axis} The calling Axis. + */ + tickLabelPadding(padding: number): Axis; + /** + * Gets the margin in pixels. + * The margin is the amount of space between the tick labels and the outer edge of the Axis. + */ + margin(): number; + /** + * Sets the margin in pixels. + * The margin is the amount of space between the tick labels and the outer edge of the Axis. + * + * @param {number} size + * @returns {Axis} The calling Axis. + */ + margin(size: number): Axis; + /** + * Gets the orientation of the Axis. */ orientation(): string; /** - * Sets the orientation. + * Sets the orientation of the Axis. * - * @param {string} orientation One of "horizontal"/"left"/"right". - * @returns {InterpolatedColorLegend} The calling InterpolatedColorLegend. + * @param {number} orientation One of "top"/"bottom"/"left"/"right". + * @returns {Axis} The calling Axis. */ - orientation(orientation: string): InterpolatedColorLegend; - fixedWidth(): boolean; - fixedHeight(): boolean; - protected _setup(): void; - requestedSpace(offeredWidth: number, offeredHeight: number): SpaceRequest; - renderImmediately(): InterpolatedColorLegend; + orientation(orientation: string): Axis; + /** + * Gets whether the Axis shows the end tick labels. + */ + showEndTickLabels(): boolean; + /** + * Sets whether the Axis shows the end tick labels. + * + * @param {boolean} show + * @returns {Axis} The calling Axis. + */ + showEndTickLabels(show: boolean): Axis; } } -} -declare namespace Plottable { - namespace Components { - class Gridlines extends Component { - /** - * @constructor - * @param {QuantitativeScale} xScale The scale to base the x gridlines on. Pass null if no gridlines are desired. - * @param {QuantitativeScale} yScale The scale to base the y gridlines on. Pass null if no gridlines are desired. - */ - constructor(xScale: QuantitativeScale, yScale: QuantitativeScale); - destroy(): Gridlines; - protected _setup(): void; - renderImmediately(): Gridlines; + namespace Plottable { + namespace TimeInterval { + var second: string; + var minute: string; + var hour: string; + var day: string; + var week: string; + var month: string; + var year: string; } - } -} - - -declare namespace Plottable { - namespace Components { - class Table extends ComponentContainer { + namespace Axes { /** - * A Table combines Components in the form of a grid. A - * common case is combining a y-axis, x-axis, and the plotted data via - * ```typescript - * new Table([[yAxis, plot], - * [null, xAxis]]); - * ``` - * - * @constructor - * @param {Component[][]} [rows=[]] A 2-D array of Components to be added to the Table. - * null can be used if a cell is empty. + * Defines a configuration for a Time Axis tier. + * For details on how ticks are generated see: https://github.com/mbostock/d3/wiki/Time-Scales#ticks + * interval - A time unit associated with this configuration (seconds, minutes, hours, etc). + * step - number of intervals between each tick. + * formatter - formatter used to format tick labels. */ - constructor(rows?: Component[][]); - protected _forEach(callback: (component: Component) => any): void; - /** - * Checks whether the specified Component is in the Table. - */ - has(component: Component): boolean; - /** - * Adds a Component in the specified row and column position. - * - * For example, instead of calling `new Table([[a, b], [null, c]])`, you - * could call - * ```typescript - * var table = new Table(); - * table.add(a, 0, 0); - * table.add(b, 0, 1); - * table.add(c, 1, 1); - * ``` - * - * @param {Component} component The Component to be added. - * @param {number} row - * @param {number} col - * @returns {Table} The calling Table. - */ - add(component: Component, row: number, col: number): Table; - protected _remove(component: Component): boolean; - requestedSpace(offeredWidth: number, offeredHeight: number): SpaceRequest; - computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): Table; - /** - * Gets the padding above and below each row in pixels. - */ - rowPadding(): number; - /** - * Sets the padding above and below each row in pixels. - * - * @param {number} rowPadding - * @returns {Table} The calling Table. - */ - rowPadding(rowPadding: number): Table; - /** - * Gets the padding to the left and right of each column in pixels. - */ - columnPadding(): number; - /** - * Sets the padding to the left and right of each column in pixels. - * - * @param {number} columnPadding - * @returns {Table} The calling Table. - */ - columnPadding(columnPadding: number): Table; - /** - * Gets the weight of the specified row. - * - * @param {number} index - */ - rowWeight(index: number): number; - /** - * Sets the weight of the specified row. - * Space is allocated to rows based on their weight. Rows with higher weights receive proportionally more space. - * - * A common case would be to have one row take up 2/3rds of the space, - * and the other row take up 1/3rd. - * - * Example: - * - * ```JavaScript - * plot = new Plottable.Component.Table([ - * [row1], - * [row2] - * ]); - * - * // assign twice as much space to the first row - * plot - * .rowWeight(0, 2) - * .rowWeight(1, 1) - * ``` - * - * @param {number} index - * @param {number} weight - * @returns {Table} The calling Table. - */ - rowWeight(index: number, weight: number): Table; - /** - * Gets the weight of the specified column. - * - * @param {number} index - */ - columnWeight(index: number): number; - /** - * Sets the weight of the specified column. - * Space is allocated to columns based on their weight. Columns with higher weights receive proportionally more space. - * - * Please see `rowWeight` docs for an example. - * - * @param {number} index - * @param {number} weight - * @returns {Table} The calling Table. - */ - columnWeight(index: number, weight: number): Table; - fixedWidth(): boolean; - fixedHeight(): boolean; - } - } -} - - -declare namespace Plottable { - namespace Components { - class SelectionBoxLayer extends Component { - protected _box: d3.Selection; - constructor(); - protected _setup(): void; - protected _sizeFromOffer(availableWidth: number, availableHeight: number): { - width: number; - height: number; + type TimeAxisTierConfiguration = { + interval: string; + step: number; + formatter: Formatter; }; /** - * Gets the Bounds of the box. + * An array of linked TimeAxisTierConfigurations. + * Each configuration will be shown on a different tier. + * Currently, up to two tiers are supported. */ - bounds(): Bounds; + type TimeAxisConfiguration = TimeAxisTierConfiguration[]; + class Time extends Axis { + /** + * The CSS class applied to each Time Axis tier + */ + static TIME_AXIS_TIER_CLASS: string; + /** + * Constructs a Time Axis. + * + * A Time Axis is a visual representation of a Time Scale. + * + * @constructor + * @param {Scales.Time} scale + * @param {string} orientation One of "top"/"bottom". + */ + constructor(scale: Scales.Time, orientation: string); + /** + * Gets the label positions for each tier. + */ + tierLabelPositions(): string[]; + /** + * Sets the label positions for each tier. + * + * @param {string[]} newPositions The positions for each tier. "bottom" and "center" are the only supported values. + * @returns {Axes.Time} The calling Time Axis. + */ + tierLabelPositions(newPositions: string[]): Time; + /** + * Gets the possible TimeAxisConfigurations. + */ + axisConfigurations(): TimeAxisConfiguration[]; + /** + * Sets the possible TimeAxisConfigurations. + * The Time Axis will choose the most precise configuration that will display in the available space. + * + * @param {TimeAxisConfiguration[]} configurations + * @returns {Axes.Time} The calling Time Axis. + */ + axisConfigurations(configurations: TimeAxisConfiguration[]): Time; + orientation(): string; + orientation(orientation: string): Time; + protected _computeHeight(): number; + protected _sizeFromOffer(availableWidth: number, availableHeight: number): { + width: number; + height: number; + }; + protected _setup(): void; + protected _getTickValues(): any[]; + renderImmediately(): Time; + } + } + } + + + namespace Plottable { + namespace Axes { + class Numeric extends Axis { + /** + * Constructs a Numeric Axis. + * + * A Numeric Axis is a visual representation of a QuantitativeScale. + * + * @constructor + * @param {QuantitativeScale} scale + * @param {string} orientation One of "top"/"bottom"/"left"/"right". + */ + constructor(scale: QuantitativeScale, orientation: string); + protected _setup(): void; + protected _computeWidth(): number; + protected _computeHeight(): number; + protected _getTickValues(): number[]; + protected _rescale(): void; + renderImmediately(): Numeric; + /** + * Gets the tick label position relative to the tick marks. + * + * @returns {string} The current tick label position. + */ + tickLabelPosition(): string; + /** + * Sets the tick label position relative to the tick marks. + * + * @param {string} position "top"/"center"/"bottom" for a vertical Numeric Axis, + * "left"/"center"/"right" for a horizontal Numeric Axis. + * @returns {Numeric} The calling Numeric Axis. + */ + tickLabelPosition(position: string): Numeric; + } + } + } + + + namespace Plottable { + namespace Axes { + class Category extends Axis { + /** + * Constructs a Category Axis. + * + * A Category Axis is a visual representation of a Category Scale. + * + * @constructor + * @param {Scales.Category} scale + * @param {string} [orientation="bottom"] One of "top"/"bottom"/"left"/"right". + */ + constructor(scale: Scales.Category, orientation: string); + protected _setup(): void; + protected _rescale(): Component; + requestedSpace(offeredWidth: number, offeredHeight: number): SpaceRequest; + protected _getTickValues(): string[]; + /** + * Gets the tick label angle in degrees. + */ + tickLabelAngle(): number; + /** + * Sets the tick label angle in degrees. + * Right now only -90/0/90 are supported. 0 is horizontal. + * + * @param {number} angle + * @returns {Category} The calling Category Axis. + */ + tickLabelAngle(angle: number): Category; + renderImmediately(): Category; + computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): Axis; + } + } + } + + + namespace Plottable { + namespace Components { + class Label extends Component { + /** + * A Label is a Component that displays a single line of text. + * + * @constructor + * @param {string} [displayText=""] The text of the Label. + * @param {number} [angle=0] The angle of the Label in degrees (-90/0/90). 0 is horizontal. + */ + constructor(displayText?: string, angle?: number); + requestedSpace(offeredWidth: number, offeredHeight: number): SpaceRequest; + protected _setup(): void; + /** + * Gets the Label's text. + */ + text(): string; + /** + * Sets the Label's text. + * + * @param {string} displayText + * @returns {Label} The calling Label. + */ + text(displayText: string): Label; + /** + * Gets the angle of the Label in degrees. + */ + angle(): number; + /** + * Sets the angle of the Label in degrees. + * + * @param {number} angle One of -90/0/90. 0 is horizontal. + * @returns {Label} The calling Label. + */ + angle(angle: number): Label; + /** + * Gets the amount of padding around the Label in pixels. + */ + padding(): number; + /** + * Sets the amount of padding around the Label in pixels. + * + * @param {number} padAmount + * @returns {Label} The calling Label. + */ + padding(padAmount: number): Label; + fixedWidth(): boolean; + fixedHeight(): boolean; + renderImmediately(): Label; + } + class TitleLabel extends Label { + static TITLE_LABEL_CLASS: string; + /** + * @constructor + * @param {string} [text] + * @param {number} [angle] One of -90/0/90. 0 is horizontal. + */ + constructor(text?: string, angle?: number); + } + class AxisLabel extends Label { + static AXIS_LABEL_CLASS: string; + /** + * @constructor + * @param {string} [text] + * @param {number} [angle] One of -90/0/90. 0 is horizontal. + */ + constructor(text?: string, angle?: number); + } + } + } + + + namespace Plottable { + namespace Components { + class Legend extends Component { + /** + * The css class applied to each legend row + */ + static LEGEND_ROW_CLASS: string; + /** + * The css class applied to each legend entry + */ + static LEGEND_ENTRY_CLASS: string; + /** + * The css class applied to each legend symbol + */ + static LEGEND_SYMBOL_CLASS: string; + /** + * The Legend consists of a series of entries, each with a color and label taken from the Color Scale. + * + * @constructor + * @param {Scale.Color} scale + */ + constructor(colorScale: Scales.Color); + protected _setup(): void; + /** + * Gets the maximum number of entries per row. + * + * @returns {number} + */ + maxEntriesPerRow(): number; + /** + * Sets the maximum number of entries perrow. + * + * @param {number} maxEntriesPerRow + * @returns {Legend} The calling Legend. + */ + maxEntriesPerRow(maxEntriesPerRow: number): Legend; + /** + * Gets the current comparator for the Legend's entries. + * + * @returns {(a: string, b: string) => number} + */ + comparator(): (a: string, b: string) => number; + /** + * Sets a new comparator for the Legend's entries. + * The comparator is used to set the display order of the entries. + * + * @param {(a: string, b: string) => number} comparator + * @returns {Legend} The calling Legend. + */ + comparator(comparator: (a: string, b: string) => number): Legend; + /** + * Gets the Color Scale. + * + * @returns {Scales.Color} + */ + colorScale(): Scales.Color; + /** + * Sets the Color Scale. + * + * @param {Scales.Color} scale + * @returns {Legend} The calling Legend. + */ + colorScale(colorScale: Scales.Color): Legend; + destroy(): void; + requestedSpace(offeredWidth: number, offeredHeight: number): SpaceRequest; + /** + * Gets the Entities (representing Legend entries) at a particular point. + * Returns an empty array if no Entities are present at that location. + * + * @param {Point} p + * @returns {Entity[]} + */ + entitiesAt(p: Point): Entity[]; + renderImmediately(): Legend; + /** + * Gets the function determining the symbols of the Legend. + * + * @returns {(datum: any, index: number) => symbolFactory} + */ + symbol(): (datum: any, index: number) => SymbolFactory; + /** + * Sets the function determining the symbols of the Legend. + * + * @param {(datum: any, index: number) => SymbolFactory} symbol + * @returns {Legend} The calling Legend + */ + symbol(symbol: (datum: any, index: number) => SymbolFactory): Legend; + fixedWidth(): boolean; + fixedHeight(): boolean; + } + } + } + + + namespace Plottable { + namespace Components { + class InterpolatedColorLegend extends Component { + /** + * The css class applied to the legend labels. + */ + static LEGEND_LABEL_CLASS: string; + /** + * Creates an InterpolatedColorLegend. + * + * The InterpolatedColorLegend consists of a sequence of swatches that show the + * associated InterpolatedColor Scale sampled at various points. + * Two labels show the maximum and minimum values of the InterpolatedColor Scale. + * + * @constructor + * @param {Scales.InterpolatedColor} interpolatedColorScale + */ + constructor(interpolatedColorScale: Scales.InterpolatedColor); + destroy(): void; + /** + * Gets the Formatter for the labels. + */ + formatter(): Formatter; + /** + * Sets the Formatter for the labels. + * + * @param {Formatter} formatter + * @returns {InterpolatedColorLegend} The calling InterpolatedColorLegend. + */ + formatter(formatter: Formatter): InterpolatedColorLegend; + /** + * Gets the orientation. + */ + orientation(): string; + /** + * Sets the orientation. + * + * @param {string} orientation One of "horizontal"/"left"/"right". + * @returns {InterpolatedColorLegend} The calling InterpolatedColorLegend. + */ + orientation(orientation: string): InterpolatedColorLegend; + fixedWidth(): boolean; + fixedHeight(): boolean; + protected _setup(): void; + requestedSpace(offeredWidth: number, offeredHeight: number): SpaceRequest; + renderImmediately(): InterpolatedColorLegend; + } + } + } + + + namespace Plottable { + namespace Components { + class Gridlines extends Component { + /** + * @constructor + * @param {QuantitativeScale} xScale The scale to base the x gridlines on. Pass null if no gridlines are desired. + * @param {QuantitativeScale} yScale The scale to base the y gridlines on. Pass null if no gridlines are desired. + */ + constructor(xScale: QuantitativeScale, yScale: QuantitativeScale); + destroy(): Gridlines; + protected _setup(): void; + renderImmediately(): Gridlines; + } + } + } + + + namespace Plottable { + namespace Components { + class Table extends ComponentContainer { + /** + * A Table combines Components in the form of a grid. A + * common case is combining a y-axis, x-axis, and the plotted data via + * ```typescript + * new Table([[yAxis, plot], + * [null, xAxis]]); + * ``` + * + * @constructor + * @param {Component[][]} [rows=[]] A 2-D array of Components to be added to the Table. + * null can be used if a cell is empty. + */ + constructor(rows?: Component[][]); + protected _forEach(callback: (component: Component) => any): void; + /** + * Checks whether the specified Component is in the Table. + */ + has(component: Component): boolean; + /** + * Adds a Component in the specified row and column position. + * + * For example, instead of calling `new Table([[a, b], [null, c]])`, you + * could call + * ```typescript + * var table = new Table(); + * table.add(a, 0, 0); + * table.add(b, 0, 1); + * table.add(c, 1, 1); + * ``` + * + * @param {Component} component The Component to be added. + * @param {number} row + * @param {number} col + * @returns {Table} The calling Table. + */ + add(component: Component, row: number, col: number): Table; + protected _remove(component: Component): boolean; + requestedSpace(offeredWidth: number, offeredHeight: number): SpaceRequest; + computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): Table; + /** + * Gets the padding above and below each row in pixels. + */ + rowPadding(): number; + /** + * Sets the padding above and below each row in pixels. + * + * @param {number} rowPadding + * @returns {Table} The calling Table. + */ + rowPadding(rowPadding: number): Table; + /** + * Gets the padding to the left and right of each column in pixels. + */ + columnPadding(): number; + /** + * Sets the padding to the left and right of each column in pixels. + * + * @param {number} columnPadding + * @returns {Table} The calling Table. + */ + columnPadding(columnPadding: number): Table; + /** + * Gets the weight of the specified row. + * + * @param {number} index + */ + rowWeight(index: number): number; + /** + * Sets the weight of the specified row. + * Space is allocated to rows based on their weight. Rows with higher weights receive proportionally more space. + * + * A common case would be to have one row take up 2/3rds of the space, + * and the other row take up 1/3rd. + * + * Example: + * + * ```JavaScript + * plot = new Plottable.Component.Table([ + * [row1], + * [row2] + * ]); + * + * // assign twice as much space to the first row + * plot + * .rowWeight(0, 2) + * .rowWeight(1, 1) + * ``` + * + * @param {number} index + * @param {number} weight + * @returns {Table} The calling Table. + */ + rowWeight(index: number, weight: number): Table; + /** + * Gets the weight of the specified column. + * + * @param {number} index + */ + columnWeight(index: number): number; + /** + * Sets the weight of the specified column. + * Space is allocated to columns based on their weight. Columns with higher weights receive proportionally more space. + * + * Please see `rowWeight` docs for an example. + * + * @param {number} index + * @param {number} weight + * @returns {Table} The calling Table. + */ + columnWeight(index: number, weight: number): Table; + fixedWidth(): boolean; + fixedHeight(): boolean; + } + } + } + + + namespace Plottable { + namespace Components { + class SelectionBoxLayer extends Component { + protected _box: d3.Selection; + constructor(); + protected _setup(): void; + protected _sizeFromOffer(availableWidth: number, availableHeight: number): { + width: number; + height: number; + }; + /** + * Gets the Bounds of the box. + */ + bounds(): Bounds; + /** + * Sets the Bounds of the box. + * + * @param {Bounds} newBounds + * @return {SelectionBoxLayer} The calling SelectionBoxLayer. + */ + bounds(newBounds: Bounds): SelectionBoxLayer; + protected _setBounds(newBounds: Bounds): void; + renderImmediately(): SelectionBoxLayer; + /** + * Gets whether the box is being shown. + */ + boxVisible(): boolean; + /** + * Shows or hides the selection box. + * + * @param {boolean} show Whether or not to show the box. + * @return {SelectionBoxLayer} The calling SelectionBoxLayer. + */ + boxVisible(show: boolean): SelectionBoxLayer; + fixedWidth(): boolean; + fixedHeight(): boolean; + } + } + } + + + namespace Plottable { + namespace Plots { + interface PlotEntity extends Entity { + dataset: Dataset; + index: number; + component: Plot; + } + interface AccessorScaleBinding { + accessor: Accessor; + scale?: Scale; + } + namespace Animator { + var MAIN: string; + var RESET: string; + } + } + class Plot extends Component { + protected static _ANIMATION_MAX_DURATION: number; + protected _renderArea: d3.Selection; + protected _renderCallback: ScaleCallback>; + protected _propertyExtents: d3.Map; + protected _propertyBindings: d3.Map>; /** - * Sets the Bounds of the box. + * A Plot draws some visualization of the inputted Datasets. * - * @param {Bounds} newBounds - * @return {SelectionBoxLayer} The calling SelectionBoxLayer. - */ - bounds(newBounds: Bounds): SelectionBoxLayer; - protected _setBounds(newBounds: Bounds): void; - renderImmediately(): SelectionBoxLayer; - /** - * Gets whether the box is being shown. - */ - boxVisible(): boolean; - /** - * Shows or hides the selection box. - * - * @param {boolean} show Whether or not to show the box. - * @return {SelectionBoxLayer} The calling SelectionBoxLayer. - */ - boxVisible(show: boolean): SelectionBoxLayer; - fixedWidth(): boolean; - fixedHeight(): boolean; - } - } -} - - -declare namespace Plottable { - namespace Plots { - interface PlotEntity extends Entity { - dataset: Dataset; - index: number; - component: Plot; - } - interface AccessorScaleBinding { - accessor: Accessor; - scale?: Scale; - } - namespace Animator { - var MAIN: string; - var RESET: string; - } - } - class Plot extends Component { - protected static _ANIMATION_MAX_DURATION: number; - protected _renderArea: d3.Selection; - protected _renderCallback: ScaleCallback>; - protected _propertyExtents: d3.Map; - protected _propertyBindings: d3.Map>; - /** - * A Plot draws some visualization of the inputted Datasets. - * - * @constructor - */ - constructor(); - anchor(selection: d3.Selection): Plot; - protected _setup(): void; - destroy(): void; - /** - * Adds a Dataset to the Plot. - * - * @param {Dataset} dataset - * @returns {Plot} The calling Plot. - */ - addDataset(dataset: Dataset): Plot; - protected _createNodesForDataset(dataset: Dataset): Drawer; - protected _createDrawer(dataset: Dataset): Drawer; - protected _getAnimator(key: string): Animator; - protected _onDatasetUpdate(): void; - /** - * Gets the AccessorScaleBinding for a particular attribute. - * - * @param {string} attr - */ - attr(attr: string): Plots.AccessorScaleBinding; - /** - * Sets a particular attribute to a constant value or the result of an Accessor. - * - * @param {string} attr - * @param {number|string|Accessor|Accessor} attrValue - * @returns {Plot} The calling Plot. - */ - attr(attr: string, attrValue: number | string | Accessor | Accessor): Plot; - /** - * Sets a particular attribute to a scaled constant value or scaled result of an Accessor. - * The provided Scale will account for the attribute values when autoDomain()-ing. - * - * @param {string} attr - * @param {A|Accessor} attrValue - * @param {Scale} scale The Scale used to scale the attrValue. - * @returns {Plot} The calling Plot. - */ - attr(attr: string, attrValue: A | Accessor, scale: Scale): Plot; - protected _bindProperty(property: string, value: any, scale: Scale): void; - protected _generateAttrToProjector(): AttributeToProjector; - renderImmediately(): Plot; - /** - * Returns whether the plot will be animated. - */ - animated(): boolean; - /** - * Enables or disables animation. - */ - animated(willAnimate: boolean): Plot; - detach(): Plot; - /** - * Updates the extents associated with each attribute, then autodomains all scales the Plot uses. - */ - protected _updateExtents(): void; - protected _updateExtentsForProperty(property: string): void; - protected _filterForProperty(property: string): Accessor; - /** - * Override in subclass to add special extents, such as included values - */ - protected _extentsForProperty(property: string): any[]; - /** - * Get the Animator associated with the specified Animator key. - * - * @return {Animator} - */ - animator(animatorKey: string): Animator; - /** - * Set the Animator associated with the specified Animator key. - * - * @param {string} animatorKey - * @param {Animator} animator - * @returns {Plot} The calling Plot. - */ - animator(animatorKey: string, animator: Animator): Plot; - /** - * Removes a Dataset from the Plot. - * - * @param {Dataset} dataset - * @returns {Plot} The calling Plot. - */ - removeDataset(dataset: Dataset): Plot; - protected _removeDatasetNodes(dataset: Dataset): void; - datasets(): Dataset[]; - datasets(datasets: Dataset[]): Plot; - protected _getDrawersInOrder(): Drawer[]; - protected _generateDrawSteps(): Drawers.DrawStep[]; - protected _additionalPaint(time: number): void; - protected _getDataToDraw(): Utils.Map; - /** - * Retrieves Selections of this Plot for the specified Datasets. - * - * @param {Dataset[]} [datasets] The Datasets to retrieve the Selections for. - * If not provided, Selections will be retrieved for all Datasets on the Plot. - * @returns {d3.Selection} - */ - selections(datasets?: Dataset[]): d3.Selection; - /** - * Gets the Entities associated with the specified Datasets. - * - * @param {dataset[]} datasets The Datasets to retrieve the Entities for. - * If not provided, returns defaults to all Datasets on the Plot. - * @return {Plots.PlotEntity[]} - */ - entities(datasets?: Dataset[]): Plots.PlotEntity[]; - /** - * Returns the PlotEntity nearest to the query point by the Euclidian norm, or undefined if no PlotEntity can be found. - * - * @param {Point} queryPoint - * @returns {Plots.PlotEntity} The nearest PlotEntity, or undefined if no PlotEntity can be found. - */ - entityNearest(queryPoint: Point): Plots.PlotEntity; - protected _visibleOnPlot(datum: any, pixelPoint: Point, selection: d3.Selection): boolean; - protected _entityVisibleOnPlot(pixelPoint: Point, datum: any, index: number, dataset: Dataset): boolean; - protected _uninstallScaleForKey(scale: Scale, key: string): void; - protected _installScaleForKey(scale: Scale, key: string): void; - protected _propertyProjectors(): AttributeToProjector; - protected static _scaledAccessor(binding: Plots.AccessorScaleBinding): Accessor; - protected _pixelPoint(datum: any, index: number, dataset: Dataset): Point; - protected _animateOnNextRender(): boolean; - } -} - - -declare namespace Plottable { - namespace Plots { - class Pie extends Plot { - /** * @constructor */ constructor(); - computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): Pie; - addDataset(dataset: Dataset): Pie; - removeDataset(dataset: Dataset): Pie; + anchor(selection: d3.Selection): Plot; + protected _setup(): void; + destroy(): void; + /** + * Adds a Dataset to the Plot. + * + * @param {Dataset} dataset + * @returns {Plot} The calling Plot. + */ + addDataset(dataset: Dataset): Plot; + protected _createNodesForDataset(dataset: Dataset): Drawer; + protected _createDrawer(dataset: Dataset): Drawer; + protected _getAnimator(key: string): Animator; protected _onDatasetUpdate(): void; - protected _createDrawer(dataset: Dataset): Drawers.Arc; - entities(datasets?: Dataset[]): PlotEntity[]; /** - * Gets the AccessorScaleBinding for the sector value. - */ - sectorValue(): AccessorScaleBinding; - /** - * Sets the sector value to a constant number or the result of an Accessor. + * Gets the AccessorScaleBinding for a particular attribute. * - * @param {number|Accessor} sectorValue - * @returns {Pie} The calling Pie Plot. + * @param {string} attr */ - sectorValue(sectorValue: number | Accessor): Plots.Pie; + attr(attr: string): Plots.AccessorScaleBinding; /** - * Sets the sector value to a scaled constant value or scaled result of an Accessor. - * The provided Scale will account for the values when autoDomain()-ing. + * Sets a particular attribute to a constant value or the result of an Accessor. * - * @param {S|Accessor} sectorValue - * @param {Scale} scale - * @returns {Pie} The calling Pie Plot. + * @param {string} attr + * @param {number|string|Accessor|Accessor} attrValue + * @returns {Plot} The calling Plot. */ - sectorValue(sectorValue: S | Accessor, scale: Scale): Plots.Pie; + attr(attr: string, attrValue: number | string | Accessor | Accessor): Plot; /** - * Gets the AccessorScaleBinding for the inner radius. - */ - innerRadius(): AccessorScaleBinding; - /** - * Sets the inner radius to a constant number or the result of an Accessor. + * Sets a particular attribute to a scaled constant value or scaled result of an Accessor. + * The provided Scale will account for the attribute values when autoDomain()-ing. * - * @param {number|Accessor} innerRadius - * @returns {Pie} The calling Pie Plot. + * @param {string} attr + * @param {A|Accessor} attrValue + * @param {Scale} scale The Scale used to scale the attrValue. + * @returns {Plot} The calling Plot. */ - innerRadius(innerRadius: number | Accessor): Plots.Pie; + attr(attr: string, attrValue: A | Accessor, scale: Scale): Plot; + protected _bindProperty(property: string, value: any, scale: Scale): void; + protected _generateAttrToProjector(): AttributeToProjector; + renderImmediately(): Plot; /** - * Sets the inner radius to a scaled constant value or scaled result of an Accessor. - * The provided Scale will account for the values when autoDomain()-ing. + * Returns whether the plot will be animated. + */ + animated(): boolean; + /** + * Enables or disables animation. + */ + animated(willAnimate: boolean): Plot; + detach(): Plot; + /** + * Updates the extents associated with each attribute, then autodomains all scales the Plot uses. + */ + protected _updateExtents(): void; + protected _updateExtentsForProperty(property: string): void; + protected _filterForProperty(property: string): Accessor; + /** + * Override in subclass to add special extents, such as included values + */ + protected _extentsForProperty(property: string): any[]; + /** + * Get the Animator associated with the specified Animator key. * - * @param {R|Accessor} innerRadius - * @param {Scale} scale - * @returns {Pie} The calling Pie Plot. + * @return {Animator} */ - innerRadius(innerRadius: R | Accessor, scale: Scale): Plots.Pie; + animator(animatorKey: string): Animator; /** - * Gets the AccessorScaleBinding for the outer radius. - */ - outerRadius(): AccessorScaleBinding; - /** - * Sets the outer radius to a constant number or the result of an Accessor. + * Set the Animator associated with the specified Animator key. * - * @param {number|Accessor} outerRadius - * @returns {Pie} The calling Pie Plot. + * @param {string} animatorKey + * @param {Animator} animator + * @returns {Plot} The calling Plot. */ - outerRadius(outerRadius: number | Accessor): Plots.Pie; + animator(animatorKey: string, animator: Animator): Plot; /** - * Sets the outer radius to a scaled constant value or scaled result of an Accessor. - * The provided Scale will account for the values when autoDomain()-ing. + * Removes a Dataset from the Plot. * - * @param {R|Accessor} outerRadius - * @param {Scale} scale - * @returns {Pie} The calling Pie Plot. + * @param {Dataset} dataset + * @returns {Plot} The calling Plot. */ - outerRadius(outerRadius: R | Accessor, scale: Scale): Plots.Pie; - /** - * Get whether slice labels are enabled. - * - * @returns {boolean} Whether slices should display labels or not. - */ - labelsEnabled(): boolean; - /** - * Sets whether labels are enabled. - * - * @param {boolean} labelsEnabled - * @returns {Pie} The calling Pie Plot. - */ - labelsEnabled(enabled: boolean): Pie; - /** - * Gets the Formatter for the labels. - */ - labelFormatter(): Formatter; - /** - * Sets the Formatter for the labels. - * - * @param {Formatter} formatter - * @returns {Pie} The calling Pie Plot. - */ - labelFormatter(formatter: Formatter): Pie; - entitiesAt(queryPoint: Point): PlotEntity[]; - protected _propertyProjectors(): AttributeToProjector; - protected _getDataToDraw(): Utils.Map; - protected _pixelPoint(datum: any, index: number, dataset: Dataset): { - x: number; - y: number; - }; + removeDataset(dataset: Dataset): Plot; + protected _removeDatasetNodes(dataset: Dataset): void; + datasets(): Dataset[]; + datasets(datasets: Dataset[]): Plot; + protected _getDrawersInOrder(): Drawer[]; + protected _generateDrawSteps(): Drawers.DrawStep[]; protected _additionalPaint(time: number): void; + protected _getDataToDraw(): Utils.Map; + /** + * Retrieves Selections of this Plot for the specified Datasets. + * + * @param {Dataset[]} [datasets] The Datasets to retrieve the Selections for. + * If not provided, Selections will be retrieved for all Datasets on the Plot. + * @returns {d3.Selection} + */ + selections(datasets?: Dataset[]): d3.Selection; + /** + * Gets the Entities associated with the specified Datasets. + * + * @param {dataset[]} datasets The Datasets to retrieve the Entities for. + * If not provided, returns defaults to all Datasets on the Plot. + * @return {Plots.PlotEntity[]} + */ + entities(datasets?: Dataset[]): Plots.PlotEntity[]; + /** + * Returns the PlotEntity nearest to the query point by the Euclidian norm, or undefined if no PlotEntity can be found. + * + * @param {Point} queryPoint + * @returns {Plots.PlotEntity} The nearest PlotEntity, or undefined if no PlotEntity can be found. + */ + entityNearest(queryPoint: Point): Plots.PlotEntity; + protected _visibleOnPlot(datum: any, pixelPoint: Point, selection: d3.Selection): boolean; + protected _entityVisibleOnPlot(pixelPoint: Point, datum: any, index: number, dataset: Dataset): boolean; + protected _uninstallScaleForKey(scale: Scale, key: string): void; + protected _installScaleForKey(scale: Scale, key: string): void; + protected _propertyProjectors(): AttributeToProjector; + protected static _scaledAccessor(binding: Plots.AccessorScaleBinding): Accessor; + protected _pixelPoint(datum: any, index: number, dataset: Dataset): Point; + protected _animateOnNextRender(): boolean; } } -} -declare namespace Plottable { - class XYPlot extends Plot { - protected static _X_KEY: string; - protected static _Y_KEY: string; - /** - * An XYPlot is a Plot that displays data along two primary directions, X and Y. - * - * @constructor - * @param {Scale} xScale The x scale to use. - * @param {Scale} yScale The y scale to use. - */ - constructor(); - /** - * Returns the whether or not the rendering is deferred for performance boost. - * @return {boolean} The deferred rendering option - */ - deferredRendering(): boolean; - /** - * Sets / unsets the deferred rendering option - * Activating this option improves the performance of plot interaction (pan / zoom) by - * performing lazy renders, only after the interaction has stopped. Because re-rendering - * is no longer performed during the interaction, the zooming might experience a small - * resolution degradation, before the lazy re-render is performed. - * - * This option is intended for cases where performance is an issue. - */ - deferredRendering(deferredRendering: boolean): XYPlot; - /** - * Gets the AccessorScaleBinding for X. - */ - x(): Plots.AccessorScaleBinding; - /** - * Sets X to a constant number or the result of an Accessor. - * - * @param {number|Accessor} x - * @returns {XYPlot} The calling XYPlot. - */ - x(x: number | Accessor): XYPlot; - /** - * Sets X to a scaled constant value or scaled result of an Accessor. - * The provided Scale will account for the values when autoDomain()-ing. - * - * @param {X|Accessor} x - * @param {Scale} xScale - * @returns {XYPlot} The calling XYPlot. - */ - x(x: X | Accessor, xScale: Scale): XYPlot; - /** - * Gets the AccessorScaleBinding for Y. - */ - y(): Plots.AccessorScaleBinding; - /** - * Sets Y to a constant number or the result of an Accessor. - * - * @param {number|Accessor} y - * @returns {XYPlot} The calling XYPlot. - */ - y(y: number | Accessor): XYPlot; - /** - * Sets Y to a scaled constant value or scaled result of an Accessor. - * The provided Scale will account for the values when autoDomain()-ing. - * - * @param {Y|Accessor} y - * @param {Scale} yScale - * @returns {XYPlot} The calling XYPlot. - */ - y(y: Y | Accessor, yScale: Scale): XYPlot; - protected _filterForProperty(property: string): (datum: any, index: number, dataset: Dataset) => boolean; - protected _uninstallScaleForKey(scale: Scale, key: string): void; - protected _installScaleForKey(scale: Scale, key: string): void; - destroy(): XYPlot; - /** - * Gets the automatic domain adjustment mode for visible points. - */ - autorangeMode(): string; - /** - * Sets the automatic domain adjustment mode for visible points to operate against the X Scale, Y Scale, or neither. - * If "x" or "y" is specified the adjustment is immediately performed. - * - * @param {string} autorangeMode One of "x"/"y"/"none". - * "x" will adjust the x Scale in relation to changes in the y domain. - * "y" will adjust the y Scale in relation to changes in the x domain. - * "none" means neither Scale will change automatically. - * @returns {XYPlot} The calling XYPlot. - */ - autorangeMode(autorangeMode: string): XYPlot; - computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): XYPlot; - /** - * Adjusts the domains of both X and Y scales to show all data. - * This call does not override the autorange() behavior. - * - * @returns {XYPlot} The calling XYPlot. - */ - showAllData(): XYPlot; - protected _projectorsReady(): boolean; - protected _pixelPoint(datum: any, index: number, dataset: Dataset): Point; - protected _getDataToDraw(): Utils.Map; + namespace Plottable { + namespace Plots { + class Pie extends Plot { + /** + * @constructor + */ + constructor(); + computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): Pie; + addDataset(dataset: Dataset): Pie; + removeDataset(dataset: Dataset): Pie; + protected _onDatasetUpdate(): void; + protected _createDrawer(dataset: Dataset): Drawers.Arc; + entities(datasets?: Dataset[]): PlotEntity[]; + /** + * Gets the AccessorScaleBinding for the sector value. + */ + sectorValue(): AccessorScaleBinding; + /** + * Sets the sector value to a constant number or the result of an Accessor. + * + * @param {number|Accessor} sectorValue + * @returns {Pie} The calling Pie Plot. + */ + sectorValue(sectorValue: number | Accessor): Plots.Pie; + /** + * Sets the sector value to a scaled constant value or scaled result of an Accessor. + * The provided Scale will account for the values when autoDomain()-ing. + * + * @param {S|Accessor} sectorValue + * @param {Scale} scale + * @returns {Pie} The calling Pie Plot. + */ + sectorValue(sectorValue: S | Accessor, scale: Scale): Plots.Pie; + /** + * Gets the AccessorScaleBinding for the inner radius. + */ + innerRadius(): AccessorScaleBinding; + /** + * Sets the inner radius to a constant number or the result of an Accessor. + * + * @param {number|Accessor} innerRadius + * @returns {Pie} The calling Pie Plot. + */ + innerRadius(innerRadius: number | Accessor): Plots.Pie; + /** + * Sets the inner radius to a scaled constant value or scaled result of an Accessor. + * The provided Scale will account for the values when autoDomain()-ing. + * + * @param {R|Accessor} innerRadius + * @param {Scale} scale + * @returns {Pie} The calling Pie Plot. + */ + innerRadius(innerRadius: R | Accessor, scale: Scale): Plots.Pie; + /** + * Gets the AccessorScaleBinding for the outer radius. + */ + outerRadius(): AccessorScaleBinding; + /** + * Sets the outer radius to a constant number or the result of an Accessor. + * + * @param {number|Accessor} outerRadius + * @returns {Pie} The calling Pie Plot. + */ + outerRadius(outerRadius: number | Accessor): Plots.Pie; + /** + * Sets the outer radius to a scaled constant value or scaled result of an Accessor. + * The provided Scale will account for the values when autoDomain()-ing. + * + * @param {R|Accessor} outerRadius + * @param {Scale} scale + * @returns {Pie} The calling Pie Plot. + */ + outerRadius(outerRadius: R | Accessor, scale: Scale): Plots.Pie; + /** + * Get whether slice labels are enabled. + * + * @returns {boolean} Whether slices should display labels or not. + */ + labelsEnabled(): boolean; + /** + * Sets whether labels are enabled. + * + * @param {boolean} labelsEnabled + * @returns {Pie} The calling Pie Plot. + */ + labelsEnabled(enabled: boolean): Pie; + /** + * Gets the Formatter for the labels. + */ + labelFormatter(): Formatter; + /** + * Sets the Formatter for the labels. + * + * @param {Formatter} formatter + * @returns {Pie} The calling Pie Plot. + */ + labelFormatter(formatter: Formatter): Pie; + entitiesAt(queryPoint: Point): PlotEntity[]; + protected _propertyProjectors(): AttributeToProjector; + protected _getDataToDraw(): Utils.Map; + protected _pixelPoint(datum: any, index: number, dataset: Dataset): { + x: number; + y: number; + }; + protected _additionalPaint(time: number): void; + } + } } -} -declare namespace Plottable { - namespace Plots { - class Rectangle extends XYPlot { + namespace Plottable { + class XYPlot extends Plot { + protected static _X_KEY: string; + protected static _Y_KEY: string; /** - * A Rectangle Plot displays rectangles based on the data. - * The left and right edges of each rectangle can be set with x() and x2(). - * If only x() is set the Rectangle Plot will attempt to compute the correct left and right edge positions. - * The top and bottom edges of each rectangle can be set with y() and y2(). - * If only y() is set the Rectangle Plot will attempt to compute the correct top and bottom edge positions. + * An XYPlot is a Plot that displays data along two primary directions, X and Y. * * @constructor - * @param {Scale.Scale} xScale - * @param {Scale.Scale} yScale + * @param {Scale} xScale The x scale to use. + * @param {Scale} yScale The y scale to use. */ constructor(); - protected _createDrawer(dataset: Dataset): Drawers.Rectangle; - protected _generateAttrToProjector(): { - [attr: string]: (datum: any, index: number, dataset: Dataset) => any; - }; - protected _generateDrawSteps(): Drawers.DrawStep[]; - protected _updateExtentsForProperty(property: string): void; - protected _filterForProperty(property: string): (datum: any, index: number, dataset: Dataset) => boolean; + /** + * Returns the whether or not the rendering is deferred for performance boost. + * @return {boolean} The deferred rendering option + */ + deferredRendering(): boolean; + /** + * Sets / unsets the deferred rendering option + * Activating this option improves the performance of plot interaction (pan / zoom) by + * performing lazy renders, only after the interaction has stopped. Because re-rendering + * is no longer performed during the interaction, the zooming might experience a small + * resolution degradation, before the lazy re-render is performed. + * + * This option is intended for cases where performance is an issue. + */ + deferredRendering(deferredRendering: boolean): XYPlot; /** * Gets the AccessorScaleBinding for X. */ - x(): AccessorScaleBinding; + x(): Plots.AccessorScaleBinding; /** * Sets X to a constant number or the result of an Accessor. * * @param {number|Accessor} x - * @returns {Plots.Rectangle} The calling Rectangle Plot. + * @returns {XYPlot} The calling XYPlot. */ - x(x: number | Accessor): Plots.Rectangle; + x(x: number | Accessor): XYPlot; /** * Sets X to a scaled constant value or scaled result of an Accessor. * The provided Scale will account for the values when autoDomain()-ing. * * @param {X|Accessor} x * @param {Scale} xScale - * @returns {Plots.Rectangle} The calling Rectangle Plot. + * @returns {XYPlot} The calling XYPlot. */ - x(x: X | Accessor, xScale: Scale): Plots.Rectangle; - /** - * Gets the AccessorScaleBinding for X2. - */ - x2(): AccessorScaleBinding; - /** - * Sets X2 to a constant number or the result of an Accessor. - * If a Scale has been set for X, it will also be used to scale X2. - * - * @param {number|Accessor|X|Accessor} x2 - * @returns {Plots.Rectangle} The calling Rectangle Plot. - */ - x2(x2: number | Accessor | X | Accessor): Plots.Rectangle; + x(x: X | Accessor, xScale: Scale): XYPlot; /** * Gets the AccessorScaleBinding for Y. */ - y(): AccessorScaleBinding; + y(): Plots.AccessorScaleBinding; /** * Sets Y to a constant number or the result of an Accessor. * * @param {number|Accessor} y - * @returns {Plots.Rectangle} The calling Rectangle Plot. + * @returns {XYPlot} The calling XYPlot. */ - y(y: number | Accessor): Plots.Rectangle; + y(y: number | Accessor): XYPlot; /** * Sets Y to a scaled constant value or scaled result of an Accessor. * The provided Scale will account for the values when autoDomain()-ing. * * @param {Y|Accessor} y * @param {Scale} yScale - * @returns {Plots.Rectangle} The calling Rectangle Plot. + * @returns {XYPlot} The calling XYPlot. */ - y(y: Y | Accessor, yScale: Scale): Plots.Rectangle; - /** - * Gets the AccessorScaleBinding for Y2. - */ - y2(): AccessorScaleBinding; - /** - * Sets Y2 to a constant number or the result of an Accessor. - * If a Scale has been set for Y, it will also be used to scale Y2. - * - * @param {number|Accessor|Y|Accessor} y2 - * @returns {Plots.Rectangle} The calling Rectangle Plot. - */ - y2(y2: number | Accessor | Y | Accessor): Plots.Rectangle; - protected _propertyProjectors(): AttributeToProjector; - protected _pixelPoint(datum: any, index: number, dataset: Dataset): { - x: any; - y: any; - }; - protected _getDataToDraw(): Utils.Map; - } - } -} - - -declare namespace Plottable { - namespace Plots { - class Scatter extends XYPlot { - /** - * A Scatter Plot draws a symbol at each data point. - * - * @constructor - */ - constructor(); - protected _createDrawer(dataset: Dataset): Drawers.Symbol; - /** - * Gets the AccessorScaleBinding for the size property of the plot. - * The size property corresponds to the area of the symbol. - */ - size(): AccessorScaleBinding; - /** - * Sets the size property to a constant number or the result of an Accessor. - * - * @param {number|Accessor} size - * @returns {Plots.Scatter} The calling Scatter Plot. - */ - size(size: number | Accessor): Plots.Scatter; - /** - * Sets the size property to a scaled constant value or scaled result of an Accessor. - * The provided Scale will account for the values when autoDomain()-ing. - * - * @param {S|Accessor} sectorValue - * @param {Scale} scale - * @returns {Plots.Scatter} The calling Scatter Plot. - */ - size(size: S | Accessor, scale: Scale): Plots.Scatter; - /** - * Gets the AccessorScaleBinding for the symbol property of the plot. - * The symbol property corresponds to how the symbol will be drawn. - */ - symbol(): AccessorScaleBinding; - /** - * Sets the symbol property to an Accessor. - * - * @param {Accessor} symbol - * @returns {Plots.Scatter} The calling Scatter Plot. - */ - symbol(symbol: Accessor): Plots.Scatter; - protected _generateDrawSteps(): Drawers.DrawStep[]; - protected _visibleOnPlot(datum: any, pixelPoint: Point, selection: d3.Selection): boolean; - protected _entityVisibleOnPlot(pixelPoint: Point, datum: any, index: number, dataset: Dataset): boolean; - protected _propertyProjectors(): AttributeToProjector; - } - } -} - - -declare namespace Plottable { - namespace Plots { - class Bar extends XYPlot { - static ORIENTATION_VERTICAL: string; - static ORIENTATION_HORIZONTAL: string; - protected _isVertical: boolean; - /** - * A Bar Plot draws bars growing out from a baseline to some value - * - * @constructor - * @param {string} [orientation="vertical"] One of "vertical"/"horizontal". - */ - constructor(orientation?: string); - x(): Plots.AccessorScaleBinding; - x(x: number | Accessor): Bar; - x(x: X | Accessor, xScale: Scale): Bar; - y(): Plots.AccessorScaleBinding; - y(y: number | Accessor): Bar; - y(y: Y | Accessor, yScale: Scale): Bar; - /** - * Gets the orientation of the plot - * - * @return "vertical" | "horizontal" - */ - orientation(): string; - render(): Bar; - protected _createDrawer(dataset: Dataset): Drawers.Rectangle; - protected _setup(): void; - /** - * Gets the baseline value. - * The baseline is the line that the bars are drawn from. - * - * @returns {X|Y} - */ - baselineValue(): X | Y; - /** - * Sets the baseline value. - * The baseline is the line that the bars are drawn from. - * - * @param {X|Y} value - * @returns {Bar} The calling Bar Plot. - */ - baselineValue(value: X | Y): Bar; - addDataset(dataset: Dataset): Bar; - removeDataset(dataset: Dataset): Bar; - /** - * Get whether bar labels are enabled. - * - * @returns {boolean} Whether bars should display labels or not. - */ - labelsEnabled(): boolean; - /** - * Sets whether labels are enabled. - * - * @param {boolean} labelsEnabled - * @returns {Bar} The calling Bar Plot. - */ - labelsEnabled(enabled: boolean): Bar; - /** - * Gets the Formatter for the labels. - */ - labelFormatter(): Formatter; - /** - * Sets the Formatter for the labels. - * - * @param {Formatter} formatter - * @returns {Bar} The calling Bar Plot. - */ - labelFormatter(formatter: Formatter): Bar; - protected _createNodesForDataset(dataset: Dataset): Drawer; - protected _removeDatasetNodes(dataset: Dataset): void; - /** - * Returns the PlotEntity nearest to the query point according to the following algorithm: - * - If the query point is inside a bar, returns the PlotEntity for that bar. - * - Otherwise, gets the nearest PlotEntity by the primary direction (X for vertical, Y for horizontal), - * breaking ties with the secondary direction. - * Returns undefined if no PlotEntity can be found. - * - * @param {Point} queryPoint - * @returns {PlotEntity} The nearest PlotEntity, or undefined if no PlotEntity can be found. - */ - entityNearest(queryPoint: Point): PlotEntity; - protected _visibleOnPlot(datum: any, pixelPoint: Point, selection: d3.Selection): boolean; - protected _entityVisibleOnPlot(pixelPoint: Point, datum: any, index: number, dataset: Dataset): boolean; - /** - * Gets the Entities at a particular Point. - * - * @param {Point} p - * @returns {PlotEntity[]} - */ - entitiesAt(p: Point): PlotEntity[]; - /** - * Gets the Entities that intersect the Bounds. - * - * @param {Bounds} bounds - * @returns {PlotEntity[]} - */ - entitiesIn(bounds: Bounds): PlotEntity[]; - /** - * Gets the Entities that intersect the area defined by the ranges. - * - * @param {Range} xRange - * @param {Range} yRange - * @returns {PlotEntity[]} - */ - entitiesIn(xRange: Range, yRange: Range): PlotEntity[]; - protected _additionalPaint(time: number): void; - protected _generateDrawSteps(): Drawers.DrawStep[]; - protected _generateAttrToProjector(): { - [attr: string]: (datum: any, index: number, dataset: Dataset) => any; - }; - /** - * Computes the barPixelWidth of all the bars in the plot. - * - * If the position scale of the plot is a CategoryScale and in bands mode, then the rangeBands function will be used. - * If the position scale of the plot is a CategoryScale and in points mode, then - * from https://github.com/mbostock/d3/wiki/Ordinal-Scales#ordinal_rangePoints, the max barPixelWidth is step * padding - * If the position scale of the plot is a QuantitativeScale, then _getMinimumDataWidth is scaled to compute the barPixelWidth - */ - protected _getBarPixelWidth(): number; - entities(datasets?: Dataset[]): PlotEntity[]; - protected _pixelPoint(datum: any, index: number, dataset: Dataset): { - x: any; - y: any; - }; - protected _uninstallScaleForKey(scale: Scale, key: string): void; - protected _getDataToDraw(): Utils.Map; - } - } -} - - -declare namespace Plottable { - namespace Plots { - class Line extends XYPlot { - /** - * A Line Plot draws line segments starting from the first data point to the next. - * - * @constructor - */ - constructor(); - protected _createDrawer(dataset: Dataset): Drawer; - protected _getResetYFunction(): (d: any, i: number, dataset: Dataset) => number; - protected _generateDrawSteps(): Drawers.DrawStep[]; - protected _generateAttrToProjector(): { - [attr: string]: (datum: any, index: number, dataset: Dataset) => any; - }; - /** - * Returns the PlotEntity nearest to the query point by X then by Y, or undefined if no PlotEntity can be found. - * - * @param {Point} queryPoint - * @returns {PlotEntity} The nearest PlotEntity, or undefined if no PlotEntity can be found. - */ - entityNearest(queryPoint: Point): PlotEntity; - protected _propertyProjectors(): AttributeToProjector; - protected _constructLineProjector(xProjector: Projector, yProjector: Projector): (datum: any, index: number, dataset: Dataset) => string; - protected _getDataToDraw(): Utils.Map; - } - } -} - - -declare namespace Plottable { - namespace Plots { - class Area extends Line { - /** - * An Area Plot draws a filled region (area) between Y and Y0. - * - * @constructor - */ - constructor(); - protected _setup(): void; - y(): Plots.AccessorScaleBinding; - y(y: number | Accessor): Area; - y(y: number | Accessor, yScale: QuantitativeScale): Area; - /** - * Gets the AccessorScaleBinding for Y0. - */ - y0(): Plots.AccessorScaleBinding; - /** - * Sets Y0 to a constant number or the result of an Accessor. - * If a Scale has been set for Y, it will also be used to scale Y0. - * - * @param {number|Accessor} y0 - * @returns {Area} The calling Area Plot. - */ - y0(y0: number | Accessor): Area; - protected _onDatasetUpdate(): void; - addDataset(dataset: Dataset): Area; - protected _removeDatasetNodes(dataset: Dataset): void; - protected _additionalPaint(): void; - protected _createDrawer(dataset: Dataset): Drawers.Area; - protected _generateDrawSteps(): Drawers.DrawStep[]; - protected _updateYScale(): void; - protected _getResetYFunction(): Accessor; - protected _propertyProjectors(): AttributeToProjector; - selections(datasets?: Dataset[]): d3.Selection; - protected _constructAreaProjector(xProjector: Projector, yProjector: Projector, y0Projector: Projector): (datum: any[], index: number, dataset: Dataset) => string; - } - } -} - - -declare namespace Plottable { - namespace Plots { - class ClusteredBar extends Bar { - /** - * A ClusteredBar Plot groups bars across Datasets based on the primary value of the bars. - * On a vertical ClusteredBar Plot, the bars with the same X value are grouped. - * On a horizontal ClusteredBar Plot, the bars with the same Y value are grouped. - * - * @constructor - * @param {string} [orientation="vertical"] One of "vertical"/"horizontal". - */ - constructor(orientation?: string); - protected _generateAttrToProjector(): { - [attr: string]: (datum: any, index: number, dataset: Dataset) => any; - }; - protected _getDataToDraw(): Utils.Map; - } - } -} - - -declare namespace Plottable { - namespace Plots { - class StackedArea extends Area { - /** - * @constructor - */ - constructor(); - protected _getAnimator(key: string): Animator; - protected _setup(): void; - x(): Plots.AccessorScaleBinding; - x(x: number | Accessor): StackedArea; - x(x: X | Accessor, xScale: Scale): StackedArea; - y(): Plots.AccessorScaleBinding; - y(y: number | Accessor): StackedArea; - y(y: number | Accessor, yScale: QuantitativeScale): StackedArea; - protected _additionalPaint(): void; - protected _updateYScale(): void; - protected _onDatasetUpdate(): StackedArea; - protected _updateExtentsForProperty(property: string): void; - protected _extentsForProperty(attr: string): any[]; - protected _propertyProjectors(): AttributeToProjector; - protected _pixelPoint(datum: any, index: number, dataset: Dataset): Point; - } - } -} - - -declare namespace Plottable { - namespace Plots { - class StackedBar extends Bar { - /** - * A StackedBar Plot stacks bars across Datasets based on the primary value of the bars. - * On a vertical StackedBar Plot, the bars with the same X value are stacked. - * On a horizontal StackedBar Plot, the bars with the same Y value are stacked. - * - * @constructor - * @param {Scale} xScale - * @param {Scale} yScale - * @param {string} [orientation="vertical"] One of "vertical"/"horizontal". - */ - constructor(orientation?: string); - x(): Plots.AccessorScaleBinding; - x(x: number | Accessor): StackedBar; - x(x: X | Accessor, xScale: Scale): StackedBar; - y(): Plots.AccessorScaleBinding; - y(y: number | Accessor): StackedBar; - y(y: Y | Accessor, yScale: Scale): StackedBar; - protected _generateAttrToProjector(): { - [attr: string]: (datum: any, index: number, dataset: Dataset) => any; - }; - protected _onDatasetUpdate(): StackedBar; - protected _updateExtentsForProperty(property: string): void; - protected _extentsForProperty(attr: string): any[]; - } - } -} - - -declare namespace Plottable { - namespace Plots { - class Segment extends XYPlot { - /** - * A Segment Plot displays line segments based on the data. - * - * @constructor - */ - constructor(); - protected _createDrawer(dataset: Dataset): Drawers.Segment; - protected _generateDrawSteps(): Drawers.DrawStep[]; - protected _updateExtentsForProperty(property: string): void; + y(y: Y | Accessor, yScale: Scale): XYPlot; protected _filterForProperty(property: string): (datum: any, index: number, dataset: Dataset) => boolean; + protected _uninstallScaleForKey(scale: Scale, key: string): void; + protected _installScaleForKey(scale: Scale, key: string): void; + destroy(): XYPlot; /** - * Gets the AccessorScaleBinding for X + * Gets the automatic domain adjustment mode for visible points. */ - x(): AccessorScaleBinding; + autorangeMode(): string; /** - * Sets X to a constant value or the result of an Accessor. + * Sets the automatic domain adjustment mode for visible points to operate against the X Scale, Y Scale, or neither. + * If "x" or "y" is specified the adjustment is immediately performed. * - * @param {X|Accessor} x - * @returns {Plots.Segment} The calling Segment Plot. + * @param {string} autorangeMode One of "x"/"y"/"none". + * "x" will adjust the x Scale in relation to changes in the y domain. + * "y" will adjust the y Scale in relation to changes in the x domain. + * "none" means neither Scale will change automatically. + * @returns {XYPlot} The calling XYPlot. */ - x(x: number | Accessor): Plots.Segment; + autorangeMode(autorangeMode: string): XYPlot; + computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): XYPlot; /** - * Sets X to a scaled constant value or scaled result of an Accessor. - * The provided Scale will account for the values when autoDomain()-ing. + * Adjusts the domains of both X and Y scales to show all data. + * This call does not override the autorange() behavior. * - * @param {X|Accessor} x - * @param {Scale} xScale - * @returns {Plots.Segment} The calling Segment Plot. + * @returns {XYPlot} The calling XYPlot. */ - x(x: X | Accessor, xScale: Scale): Plots.Segment; - /** - * Gets the AccessorScaleBinding for X2 - */ - x2(): AccessorScaleBinding; - /** - * Sets X2 to a constant number or the result of an Accessor. - * If a Scale has been set for X, it will also be used to scale X2. - * - * @param {number|Accessor|Y|Accessor} y2 - * @returns {Plots.Segment} The calling Segment Plot - */ - x2(x2: number | Accessor | X | Accessor): Plots.Segment; - /** - * Gets the AccessorScaleBinding for Y - */ - y(): AccessorScaleBinding; - /** - * Sets Y to a constant value or the result of an Accessor. - * - * @param {Y|Accessor} y - * @returns {Plots.Segment} The calling Segment Plot. - */ - y(y: number | Accessor): Plots.Segment; - /** - * Sets Y to a scaled constant value or scaled result of an Accessor. - * The provided Scale will account for the values when autoDomain()-ing. - * - * @param {Y|Accessor} y - * @param {Scale} yScale - * @returns {Plots.Segment} The calling Segment Plot. - */ - y(y: Y | Accessor, yScale: Scale): Plots.Segment; - /** - * Gets the AccessorScaleBinding for Y2. - */ - y2(): AccessorScaleBinding; - /** - * Sets Y2 to a constant number or the result of an Accessor. - * If a Scale has been set for Y, it will also be used to scale Y2. - * - * @param {number|Accessor|Y|Accessor} y2 - * @returns {Plots.Segment} The calling Segment Plot. - */ - y2(y2: number | Accessor | Y | Accessor): Plots.Segment; - protected _propertyProjectors(): AttributeToProjector; + showAllData(): XYPlot; + protected _projectorsReady(): boolean; + protected _pixelPoint(datum: any, index: number, dataset: Dataset): Point; + protected _getDataToDraw(): Utils.Map; } } -} -declare namespace Plottable { - namespace Plots { - class Waterfall extends Bar { - constructor(); + namespace Plottable { + namespace Plots { + class Rectangle extends XYPlot { + /** + * A Rectangle Plot displays rectangles based on the data. + * The left and right edges of each rectangle can be set with x() and x2(). + * If only x() is set the Rectangle Plot will attempt to compute the correct left and right edge positions. + * The top and bottom edges of each rectangle can be set with y() and y2(). + * If only y() is set the Rectangle Plot will attempt to compute the correct top and bottom edge positions. + * + * @constructor + * @param {Scale.Scale} xScale + * @param {Scale.Scale} yScale + */ + constructor(); + protected _createDrawer(dataset: Dataset): Drawers.Rectangle; + protected _generateAttrToProjector(): { + [attr: string]: (datum: any, index: number, dataset: Dataset) => any; + }; + protected _generateDrawSteps(): Drawers.DrawStep[]; + protected _updateExtentsForProperty(property: string): void; + protected _filterForProperty(property: string): (datum: any, index: number, dataset: Dataset) => boolean; + /** + * Gets the AccessorScaleBinding for X. + */ + x(): AccessorScaleBinding; + /** + * Sets X to a constant number or the result of an Accessor. + * + * @param {number|Accessor} x + * @returns {Plots.Rectangle} The calling Rectangle Plot. + */ + x(x: number | Accessor): Plots.Rectangle; + /** + * Sets X to a scaled constant value or scaled result of an Accessor. + * The provided Scale will account for the values when autoDomain()-ing. + * + * @param {X|Accessor} x + * @param {Scale} xScale + * @returns {Plots.Rectangle} The calling Rectangle Plot. + */ + x(x: X | Accessor, xScale: Scale): Plots.Rectangle; + /** + * Gets the AccessorScaleBinding for X2. + */ + x2(): AccessorScaleBinding; + /** + * Sets X2 to a constant number or the result of an Accessor. + * If a Scale has been set for X, it will also be used to scale X2. + * + * @param {number|Accessor|X|Accessor} x2 + * @returns {Plots.Rectangle} The calling Rectangle Plot. + */ + x2(x2: number | Accessor | X | Accessor): Plots.Rectangle; + /** + * Gets the AccessorScaleBinding for Y. + */ + y(): AccessorScaleBinding; + /** + * Sets Y to a constant number or the result of an Accessor. + * + * @param {number|Accessor} y + * @returns {Plots.Rectangle} The calling Rectangle Plot. + */ + y(y: number | Accessor): Plots.Rectangle; + /** + * Sets Y to a scaled constant value or scaled result of an Accessor. + * The provided Scale will account for the values when autoDomain()-ing. + * + * @param {Y|Accessor} y + * @param {Scale} yScale + * @returns {Plots.Rectangle} The calling Rectangle Plot. + */ + y(y: Y | Accessor, yScale: Scale): Plots.Rectangle; + /** + * Gets the AccessorScaleBinding for Y2. + */ + y2(): AccessorScaleBinding; + /** + * Sets Y2 to a constant number or the result of an Accessor. + * If a Scale has been set for Y, it will also be used to scale Y2. + * + * @param {number|Accessor|Y|Accessor} y2 + * @returns {Plots.Rectangle} The calling Rectangle Plot. + */ + y2(y2: number | Accessor | Y | Accessor): Plots.Rectangle; + protected _propertyProjectors(): AttributeToProjector; + protected _pixelPoint(datum: any, index: number, dataset: Dataset): { + x: any; + y: any; + }; + protected _getDataToDraw(): Utils.Map; + } + } + } + + + namespace Plottable { + namespace Plots { + class Scatter extends XYPlot { + /** + * A Scatter Plot draws a symbol at each data point. + * + * @constructor + */ + constructor(); + protected _createDrawer(dataset: Dataset): Drawers.Symbol; + /** + * Gets the AccessorScaleBinding for the size property of the plot. + * The size property corresponds to the area of the symbol. + */ + size(): AccessorScaleBinding; + /** + * Sets the size property to a constant number or the result of an Accessor. + * + * @param {number|Accessor} size + * @returns {Plots.Scatter} The calling Scatter Plot. + */ + size(size: number | Accessor): Plots.Scatter; + /** + * Sets the size property to a scaled constant value or scaled result of an Accessor. + * The provided Scale will account for the values when autoDomain()-ing. + * + * @param {S|Accessor} sectorValue + * @param {Scale} scale + * @returns {Plots.Scatter} The calling Scatter Plot. + */ + size(size: S | Accessor, scale: Scale): Plots.Scatter; + /** + * Gets the AccessorScaleBinding for the symbol property of the plot. + * The symbol property corresponds to how the symbol will be drawn. + */ + symbol(): AccessorScaleBinding; + /** + * Sets the symbol property to an Accessor. + * + * @param {Accessor} symbol + * @returns {Plots.Scatter} The calling Scatter Plot. + */ + symbol(symbol: Accessor): Plots.Scatter; + protected _generateDrawSteps(): Drawers.DrawStep[]; + protected _visibleOnPlot(datum: any, pixelPoint: Point, selection: d3.Selection): boolean; + protected _entityVisibleOnPlot(pixelPoint: Point, datum: any, index: number, dataset: Dataset): boolean; + protected _propertyProjectors(): AttributeToProjector; + } + } + } + + + namespace Plottable { + namespace Plots { + class Bar extends XYPlot { + static ORIENTATION_VERTICAL: string; + static ORIENTATION_HORIZONTAL: string; + protected _isVertical: boolean; + /** + * A Bar Plot draws bars growing out from a baseline to some value + * + * @constructor + * @param {string} [orientation="vertical"] One of "vertical"/"horizontal". + */ + constructor(orientation?: string); + x(): Plots.AccessorScaleBinding; + x(x: number | Accessor): Bar; + x(x: X | Accessor, xScale: Scale): Bar; + y(): Plots.AccessorScaleBinding; + y(y: number | Accessor): Bar; + y(y: Y | Accessor, yScale: Scale): Bar; + /** + * Gets the orientation of the plot + * + * @return "vertical" | "horizontal" + */ + orientation(): string; + render(): Bar; + protected _createDrawer(dataset: Dataset): Drawers.Rectangle; + protected _setup(): void; + /** + * Gets the baseline value. + * The baseline is the line that the bars are drawn from. + * + * @returns {X|Y} + */ + baselineValue(): X | Y; + /** + * Sets the baseline value. + * The baseline is the line that the bars are drawn from. + * + * @param {X|Y} value + * @returns {Bar} The calling Bar Plot. + */ + baselineValue(value: X | Y): Bar; + addDataset(dataset: Dataset): Bar; + removeDataset(dataset: Dataset): Bar; + /** + * Get whether bar labels are enabled. + * + * @returns {boolean} Whether bars should display labels or not. + */ + labelsEnabled(): boolean; + /** + * Sets whether labels are enabled. + * + * @param {boolean} labelsEnabled + * @returns {Bar} The calling Bar Plot. + */ + labelsEnabled(enabled: boolean): Bar; + /** + * Gets the Formatter for the labels. + */ + labelFormatter(): Formatter; + /** + * Sets the Formatter for the labels. + * + * @param {Formatter} formatter + * @returns {Bar} The calling Bar Plot. + */ + labelFormatter(formatter: Formatter): Bar; + protected _createNodesForDataset(dataset: Dataset): Drawer; + protected _removeDatasetNodes(dataset: Dataset): void; + /** + * Returns the PlotEntity nearest to the query point according to the following algorithm: + * - If the query point is inside a bar, returns the PlotEntity for that bar. + * - Otherwise, gets the nearest PlotEntity by the primary direction (X for vertical, Y for horizontal), + * breaking ties with the secondary direction. + * Returns undefined if no PlotEntity can be found. + * + * @param {Point} queryPoint + * @returns {PlotEntity} The nearest PlotEntity, or undefined if no PlotEntity can be found. + */ + entityNearest(queryPoint: Point): PlotEntity; + protected _visibleOnPlot(datum: any, pixelPoint: Point, selection: d3.Selection): boolean; + protected _entityVisibleOnPlot(pixelPoint: Point, datum: any, index: number, dataset: Dataset): boolean; + /** + * Gets the Entities at a particular Point. + * + * @param {Point} p + * @returns {PlotEntity[]} + */ + entitiesAt(p: Point): PlotEntity[]; + /** + * Gets the Entities that intersect the Bounds. + * + * @param {Bounds} bounds + * @returns {PlotEntity[]} + */ + entitiesIn(bounds: Bounds): PlotEntity[]; + /** + * Gets the Entities that intersect the area defined by the ranges. + * + * @param {Range} xRange + * @param {Range} yRange + * @returns {PlotEntity[]} + */ + entitiesIn(xRange: Range, yRange: Range): PlotEntity[]; + protected _additionalPaint(time: number): void; + protected _generateDrawSteps(): Drawers.DrawStep[]; + protected _generateAttrToProjector(): { + [attr: string]: (datum: any, index: number, dataset: Dataset) => any; + }; + /** + * Computes the barPixelWidth of all the bars in the plot. + * + * If the position scale of the plot is a CategoryScale and in bands mode, then the rangeBands function will be used. + * If the position scale of the plot is a CategoryScale and in points mode, then + * from https://github.com/mbostock/d3/wiki/Ordinal-Scales#ordinal_rangePoints, the max barPixelWidth is step * padding + * If the position scale of the plot is a QuantitativeScale, then _getMinimumDataWidth is scaled to compute the barPixelWidth + */ + protected _getBarPixelWidth(): number; + entities(datasets?: Dataset[]): PlotEntity[]; + protected _pixelPoint(datum: any, index: number, dataset: Dataset): { + x: any; + y: any; + }; + protected _uninstallScaleForKey(scale: Scale, key: string): void; + protected _getDataToDraw(): Utils.Map; + } + } + } + + + namespace Plottable { + namespace Plots { + class Line extends XYPlot { + /** + * A Line Plot draws line segments starting from the first data point to the next. + * + * @constructor + */ + constructor(); + protected _createDrawer(dataset: Dataset): Drawer; + protected _getResetYFunction(): (d: any, i: number, dataset: Dataset) => number; + protected _generateDrawSteps(): Drawers.DrawStep[]; + protected _generateAttrToProjector(): { + [attr: string]: (datum: any, index: number, dataset: Dataset) => any; + }; + /** + * Returns the PlotEntity nearest to the query point by X then by Y, or undefined if no PlotEntity can be found. + * + * @param {Point} queryPoint + * @returns {PlotEntity} The nearest PlotEntity, or undefined if no PlotEntity can be found. + */ + entityNearest(queryPoint: Point): PlotEntity; + protected _propertyProjectors(): AttributeToProjector; + protected _constructLineProjector(xProjector: Projector, yProjector: Projector): (datum: any, index: number, dataset: Dataset) => string; + protected _getDataToDraw(): Utils.Map; + } + } + } + + + namespace Plottable { + namespace Plots { + class Area extends Line { + /** + * An Area Plot draws a filled region (area) between Y and Y0. + * + * @constructor + */ + constructor(); + protected _setup(): void; + y(): Plots.AccessorScaleBinding; + y(y: number | Accessor): Area; + y(y: number | Accessor, yScale: QuantitativeScale): Area; + /** + * Gets the AccessorScaleBinding for Y0. + */ + y0(): Plots.AccessorScaleBinding; + /** + * Sets Y0 to a constant number or the result of an Accessor. + * If a Scale has been set for Y, it will also be used to scale Y0. + * + * @param {number|Accessor} y0 + * @returns {Area} The calling Area Plot. + */ + y0(y0: number | Accessor): Area; + protected _onDatasetUpdate(): void; + addDataset(dataset: Dataset): Area; + protected _removeDatasetNodes(dataset: Dataset): void; + protected _additionalPaint(): void; + protected _createDrawer(dataset: Dataset): Drawers.Area; + protected _generateDrawSteps(): Drawers.DrawStep[]; + protected _updateYScale(): void; + protected _getResetYFunction(): Accessor; + protected _propertyProjectors(): AttributeToProjector; + selections(datasets?: Dataset[]): d3.Selection; + protected _constructAreaProjector(xProjector: Projector, yProjector: Projector, y0Projector: Projector): (datum: any[], index: number, dataset: Dataset) => string; + } + } + } + + + namespace Plottable { + namespace Plots { + class ClusteredBar extends Bar { + /** + * A ClusteredBar Plot groups bars across Datasets based on the primary value of the bars. + * On a vertical ClusteredBar Plot, the bars with the same X value are grouped. + * On a horizontal ClusteredBar Plot, the bars with the same Y value are grouped. + * + * @constructor + * @param {string} [orientation="vertical"] One of "vertical"/"horizontal". + */ + constructor(orientation?: string); + protected _generateAttrToProjector(): { + [attr: string]: (datum: any, index: number, dataset: Dataset) => any; + }; + protected _getDataToDraw(): Utils.Map; + } + } + } + + + namespace Plottable { + namespace Plots { + class StackedArea extends Area { + /** + * @constructor + */ + constructor(); + protected _getAnimator(key: string): Animator; + protected _setup(): void; + x(): Plots.AccessorScaleBinding; + x(x: number | Accessor): StackedArea; + x(x: X | Accessor, xScale: Scale): StackedArea; + y(): Plots.AccessorScaleBinding; + y(y: number | Accessor): StackedArea; + y(y: number | Accessor, yScale: QuantitativeScale): StackedArea; + protected _additionalPaint(): void; + protected _updateYScale(): void; + protected _onDatasetUpdate(): StackedArea; + protected _updateExtentsForProperty(property: string): void; + protected _extentsForProperty(attr: string): any[]; + protected _propertyProjectors(): AttributeToProjector; + protected _pixelPoint(datum: any, index: number, dataset: Dataset): Point; + } + } + } + + + namespace Plottable { + namespace Plots { + class StackedBar extends Bar { + /** + * A StackedBar Plot stacks bars across Datasets based on the primary value of the bars. + * On a vertical StackedBar Plot, the bars with the same X value are stacked. + * On a horizontal StackedBar Plot, the bars with the same Y value are stacked. + * + * @constructor + * @param {Scale} xScale + * @param {Scale} yScale + * @param {string} [orientation="vertical"] One of "vertical"/"horizontal". + */ + constructor(orientation?: string); + x(): Plots.AccessorScaleBinding; + x(x: number | Accessor): StackedBar; + x(x: X | Accessor, xScale: Scale): StackedBar; + y(): Plots.AccessorScaleBinding; + y(y: number | Accessor): StackedBar; + y(y: Y | Accessor, yScale: Scale): StackedBar; + protected _generateAttrToProjector(): { + [attr: string]: (datum: any, index: number, dataset: Dataset) => any; + }; + protected _onDatasetUpdate(): StackedBar; + protected _updateExtentsForProperty(property: string): void; + protected _extentsForProperty(attr: string): any[]; + } + } + } + + + namespace Plottable { + namespace Plots { + class Segment extends XYPlot { + /** + * A Segment Plot displays line segments based on the data. + * + * @constructor + */ + constructor(); + protected _createDrawer(dataset: Dataset): Drawers.Segment; + protected _generateDrawSteps(): Drawers.DrawStep[]; + protected _updateExtentsForProperty(property: string): void; + protected _filterForProperty(property: string): (datum: any, index: number, dataset: Dataset) => boolean; + /** + * Gets the AccessorScaleBinding for X + */ + x(): AccessorScaleBinding; + /** + * Sets X to a constant value or the result of an Accessor. + * + * @param {X|Accessor} x + * @returns {Plots.Segment} The calling Segment Plot. + */ + x(x: number | Accessor): Plots.Segment; + /** + * Sets X to a scaled constant value or scaled result of an Accessor. + * The provided Scale will account for the values when autoDomain()-ing. + * + * @param {X|Accessor} x + * @param {Scale} xScale + * @returns {Plots.Segment} The calling Segment Plot. + */ + x(x: X | Accessor, xScale: Scale): Plots.Segment; + /** + * Gets the AccessorScaleBinding for X2 + */ + x2(): AccessorScaleBinding; + /** + * Sets X2 to a constant number or the result of an Accessor. + * If a Scale has been set for X, it will also be used to scale X2. + * + * @param {number|Accessor|Y|Accessor} y2 + * @returns {Plots.Segment} The calling Segment Plot + */ + x2(x2: number | Accessor | X | Accessor): Plots.Segment; + /** + * Gets the AccessorScaleBinding for Y + */ + y(): AccessorScaleBinding; + /** + * Sets Y to a constant value or the result of an Accessor. + * + * @param {Y|Accessor} y + * @returns {Plots.Segment} The calling Segment Plot. + */ + y(y: number | Accessor): Plots.Segment; + /** + * Sets Y to a scaled constant value or scaled result of an Accessor. + * The provided Scale will account for the values when autoDomain()-ing. + * + * @param {Y|Accessor} y + * @param {Scale} yScale + * @returns {Plots.Segment} The calling Segment Plot. + */ + y(y: Y | Accessor, yScale: Scale): Plots.Segment; + /** + * Gets the AccessorScaleBinding for Y2. + */ + y2(): AccessorScaleBinding; + /** + * Sets Y2 to a constant number or the result of an Accessor. + * If a Scale has been set for Y, it will also be used to scale Y2. + * + * @param {number|Accessor|Y|Accessor} y2 + * @returns {Plots.Segment} The calling Segment Plot. + */ + y2(y2: number | Accessor | Y | Accessor): Plots.Segment; + protected _propertyProjectors(): AttributeToProjector; + } + } + } + + + namespace Plottable { + namespace Plots { + class Waterfall extends Bar { + constructor(); + /** + * Gets whether connectors are enabled. + * + * @returns {boolean} Whether connectors should be shown or not. + */ + connectorsEnabled(): boolean; + /** + * Sets whether connectors are enabled. + * + * @param {boolean} enabled + * @returns {Plots.Waterfall} The calling Waterfall Plot. + */ + connectorsEnabled(enabled: boolean): Waterfall; + /** + * Gets the AccessorScaleBinding for whether a bar represents a total or a delta. + */ + total(): Plots.AccessorScaleBinding; + /** + * Sets total to a constant number or the result of an Accessor + * + * @param {Accessor} + * @returns {Plots.Waterfall} The calling Waterfall Plot. + */ + total(total: Accessor): Waterfall; + protected _additionalPaint(time: number): void; + protected _createNodesForDataset(dataset: Dataset): Drawer; + protected _extentsForProperty(attr: string): any[]; + protected _generateAttrToProjector(): { + [attr: string]: (datum: any, index: number, dataset: Dataset) => any; + }; + protected _onDatasetUpdate(): Waterfall; + } + } + } + + + namespace Plottable { + interface Animator { /** - * Gets whether connectors are enabled. + * Applies the supplied attributes to a d3.Selection with some animation. * - * @returns {boolean} Whether connectors should be shown or not. + * @param {d3.Selection} selection The update selection or transition selection that we wish to animate. + * @param {AttributeToAppliedProjector} attrToAppliedProjector The set of + * AppliedProjectors that we will use to set attributes on the selection. + * @return {any} Animators should return the selection or + * transition object so that plots may chain the transitions between + * animators. */ - connectorsEnabled(): boolean; + animate(selection: d3.Selection, attrToAppliedProjector: AttributeToAppliedProjector): d3.Selection | d3.Transition; /** - * Sets whether connectors are enabled. + * Given the number of elements, return the total time the animation requires * - * @param {boolean} enabled - * @returns {Plots.Waterfall} The calling Waterfall Plot. + * @param {number} numberofIterations The number of elements that will be drawn + * @returns {number} */ - connectorsEnabled(enabled: boolean): Waterfall; + totalTime(numberOfIterations: number): number; + } + } + + + namespace Plottable { + namespace Animators { /** - * Gets the AccessorScaleBinding for whether a bar represents a total or a delta. + * An animator implementation with no animation. The attributes are + * immediately set on the selection. */ - total(): Plots.AccessorScaleBinding; + class Null implements Animator { + totalTime(selection: any): number; + animate(selection: d3.Selection, attrToAppliedProjector: AttributeToAppliedProjector): d3.Selection; + } + } + } + + + namespace Plottable { + namespace Animators { /** - * Sets total to a constant number or the result of an Accessor - * - * @param {Accessor} - * @returns {Plots.Waterfall} The calling Waterfall Plot. + * An Animator with easing and configurable durations and delays. */ - total(total: Accessor): Waterfall; - protected _additionalPaint(time: number): void; - protected _createNodesForDataset(dataset: Dataset): Drawer; - protected _extentsForProperty(attr: string): any[]; - protected _generateAttrToProjector(): { - [attr: string]: (datum: any, index: number, dataset: Dataset) => any; + class Easing implements Animator { + /** + * Constructs the default animator + * + * @constructor + */ + constructor(); + totalTime(numberOfSteps: number): number; + animate(selection: d3.Selection, attrToAppliedProjector: AttributeToAppliedProjector): d3.Transition; + /** + * Gets the start delay of the animation in milliseconds. + * + * @returns {number} The current start delay. + */ + startDelay(): number; + /** + * Sets the start delay of the animation in milliseconds. + * + * @param {number} startDelay The start delay in milliseconds. + * @returns {Easing} The calling Easing Animator. + */ + startDelay(startDelay: number): Easing; + /** + * Gets the duration of one animation step in milliseconds. + * + * @returns {number} The current duration. + */ + stepDuration(): number; + /** + * Sets the duration of one animation step in milliseconds. + * + * @param {number} stepDuration The duration in milliseconds. + * @returns {Easing} The calling Easing Animator. + */ + stepDuration(stepDuration: number): Easing; + /** + * Gets the maximum start delay between animation steps in milliseconds. + * + * @returns {number} The current maximum iterative delay. + */ + stepDelay(): number; + /** + * Sets the maximum start delay between animation steps in milliseconds. + * + * @param {number} stepDelay The maximum iterative delay in milliseconds. + * @returns {Easing} The calling Easing Animator. + */ + stepDelay(stepDelay: number): Easing; + /** + * Gets the maximum total animation duration constraint in milliseconds. + * + * If the animation time would exceed the specified time, the duration of each step + * and the delay between each step will be reduced until the animation fits within + * the specified time. + * + * @returns {number} The current maximum total animation duration. + */ + maxTotalDuration(): number; + /** + * Sets the maximum total animation duration constraint in miliseconds. + * + * If the animation time would exceed the specified time, the duration of each step + * and the delay between each step will be reduced until the animation fits within + * the specified time. + * + * @param {number} maxTotalDuration The maximum total animation duration in milliseconds. + * @returns {Easing} The calling Easing Animator. + */ + maxTotalDuration(maxTotalDuration: number): Easing; + /** + * Gets the current easing mode of the animation. + * + * @returns {string} the current easing mode. + */ + easingMode(): string; + /** + * Sets the easing mode of the animation. + * + * @param {string} easingMode The desired easing mode. + * @returns {Easing} The calling Easing Animator. + */ + easingMode(easingMode: string): Easing; + } + } + } + + + namespace Plottable { + class Dispatcher { + protected _eventToCallback: { + [eventName: string]: (e: Event) => any; }; - protected _onDatasetUpdate(): Waterfall; + protected _callbacks: Utils.CallbackSet[]; + protected _setCallback(callbackSet: Utils.CallbackSet, callback: Function): void; + protected _unsetCallback(callbackSet: Utils.CallbackSet, callback: Function): void; } } -} -declare namespace Plottable { - interface Animator { - /** - * Applies the supplied attributes to a d3.Selection with some animation. - * - * @param {d3.Selection} selection The update selection or transition selection that we wish to animate. - * @param {AttributeToAppliedProjector} attrToAppliedProjector The set of - * AppliedProjectors that we will use to set attributes on the selection. - * @return {any} Animators should return the selection or - * transition object so that plots may chain the transitions between - * animators. - */ - animate(selection: d3.Selection, attrToAppliedProjector: AttributeToAppliedProjector): d3.Selection | d3.Transition; - /** - * Given the number of elements, return the total time the animation requires - * - * @param {number} numberofIterations The number of elements that will be drawn - * @returns {number} - */ - totalTime(numberOfIterations: number): number; - } -} - - -declare namespace Plottable { - namespace Animators { - /** - * An animator implementation with no animation. The attributes are - * immediately set on the selection. - */ - class Null implements Animator { - totalTime(selection: any): number; - animate(selection: d3.Selection, attrToAppliedProjector: AttributeToAppliedProjector): d3.Selection; + namespace Plottable { + namespace Dispatchers { + type MouseCallback = (p: Point, event: MouseEvent) => void; + class Mouse extends Dispatcher { + /** + * Get a Mouse Dispatcher for the containing elem. + * If one already exists on that , it will be returned; otherwise, a new one will be created. + * + * @param {SVGElement} elem + * @return {Dispatchers.Mouse} + */ + static getDispatcher(elem: SVGElement): Dispatchers.Mouse; + /** + * This constructor not be invoked directly. + * + * @constructor + * @param {SVGElement} svg The root to attach to. + */ + constructor(svg: SVGElement); + /** + * Registers a callback to be called when the mouse position changes. + * + * @param {MouseCallback} callback + * @return {Dispatchers.Mouse} The calling Mouse Dispatcher. + */ + onMouseMove(callback: MouseCallback): Dispatchers.Mouse; + /** + * Removes a callback that would be called when the mouse position changes. + * + * @param {MouseCallback} callback + * @return {Dispatchers.Mouse} The calling Mouse Dispatcher. + */ + offMouseMove(callback: MouseCallback): Dispatchers.Mouse; + /** + * Registers a callback to be called when a mousedown occurs. + * + * @param {MouseCallback} callback + * @return {Dispatchers.Mouse} The calling Mouse Dispatcher. + */ + onMouseDown(callback: MouseCallback): Dispatchers.Mouse; + /** + * Removes a callback that would be called when a mousedown occurs. + * + * @param {MouseCallback} callback + * @return {Dispatchers.Mouse} The calling Mouse Dispatcher. + */ + offMouseDown(callback: MouseCallback): Dispatchers.Mouse; + /** + * Registers a callback to be called when a mouseup occurs. + * + * @param {MouseCallback} callback + * @return {Dispatchers.Mouse} The calling Mouse Dispatcher. + */ + onMouseUp(callback: MouseCallback): Dispatchers.Mouse; + /** + * Removes a callback that would be called when a mouseup occurs. + * + * @param {MouseCallback} callback + * @return {Dispatchers.Mouse} The calling Mouse Dispatcher. + */ + offMouseUp(callback: MouseCallback): Dispatchers.Mouse; + /** + * Registers a callback to be called when a wheel event occurs. + * + * @param {MouseCallback} callback + * @return {Dispatchers.Mouse} The calling Mouse Dispatcher. + */ + onWheel(callback: MouseCallback): Dispatchers.Mouse; + /** + * Removes a callback that would be called when a wheel event occurs. + * + * @param {MouseCallback} callback + * @return {Dispatchers.Mouse} The calling Mouse Dispatcher. + */ + offWheel(callback: MouseCallback): Dispatchers.Mouse; + /** + * Registers a callback to be called when a dblClick occurs. + * + * @param {MouseCallback} callback + * @return {Dispatchers.Mouse} The calling Mouse Dispatcher. + */ + onDblClick(callback: MouseCallback): Dispatchers.Mouse; + /** + * Removes a callback that would be called when a dblClick occurs. + * + * @param {MouseCallback} callback + * @return {Dispatchers.Mouse} The calling Mouse Dispatcher. + */ + offDblClick(callback: MouseCallback): Dispatchers.Mouse; + /** + * Returns the last computed mouse position in coordinate space. + * + * @return {Point} + */ + lastMousePosition(): Point; + } } } -} -declare namespace Plottable { - namespace Animators { - /** - * An Animator with easing and configurable durations and delays. - */ - class Easing implements Animator { - /** - * Constructs the default animator - * - * @constructor - */ - constructor(); - totalTime(numberOfSteps: number): number; - animate(selection: d3.Selection, attrToAppliedProjector: AttributeToAppliedProjector): d3.Transition; - /** - * Gets the start delay of the animation in milliseconds. - * - * @returns {number} The current start delay. - */ - startDelay(): number; - /** - * Sets the start delay of the animation in milliseconds. - * - * @param {number} startDelay The start delay in milliseconds. - * @returns {Easing} The calling Easing Animator. - */ - startDelay(startDelay: number): Easing; - /** - * Gets the duration of one animation step in milliseconds. - * - * @returns {number} The current duration. - */ - stepDuration(): number; - /** - * Sets the duration of one animation step in milliseconds. - * - * @param {number} stepDuration The duration in milliseconds. - * @returns {Easing} The calling Easing Animator. - */ - stepDuration(stepDuration: number): Easing; - /** - * Gets the maximum start delay between animation steps in milliseconds. - * - * @returns {number} The current maximum iterative delay. - */ - stepDelay(): number; - /** - * Sets the maximum start delay between animation steps in milliseconds. - * - * @param {number} stepDelay The maximum iterative delay in milliseconds. - * @returns {Easing} The calling Easing Animator. - */ - stepDelay(stepDelay: number): Easing; - /** - * Gets the maximum total animation duration constraint in milliseconds. - * - * If the animation time would exceed the specified time, the duration of each step - * and the delay between each step will be reduced until the animation fits within - * the specified time. - * - * @returns {number} The current maximum total animation duration. - */ - maxTotalDuration(): number; - /** - * Sets the maximum total animation duration constraint in miliseconds. - * - * If the animation time would exceed the specified time, the duration of each step - * and the delay between each step will be reduced until the animation fits within - * the specified time. - * - * @param {number} maxTotalDuration The maximum total animation duration in milliseconds. - * @returns {Easing} The calling Easing Animator. - */ - maxTotalDuration(maxTotalDuration: number): Easing; - /** - * Gets the current easing mode of the animation. - * - * @returns {string} the current easing mode. - */ - easingMode(): string; - /** - * Sets the easing mode of the animation. - * - * @param {string} easingMode The desired easing mode. - * @returns {Easing} The calling Easing Animator. - */ - easingMode(easingMode: string): Easing; + namespace Plottable { + namespace Dispatchers { + type TouchCallback = (ids: number[], idToPoint: { + [id: number]: Point; + }, event: TouchEvent) => void; + class Touch extends Dispatcher { + /** + * Gets a Touch Dispatcher for the containing elem. + * If one already exists on that , it will be returned; otherwise, a new one will be created. + * + * @param {SVGElement} elem + * @return {Dispatchers.Touch} + */ + static getDispatcher(elem: SVGElement): Dispatchers.Touch; + /** + * This constructor should not be invoked directly. + * + * @constructor + * @param {SVGElement} svg The root to attach to. + */ + constructor(svg: SVGElement); + /** + * Registers a callback to be called when a touch starts. + * + * @param {TouchCallback} callback + * @return {Dispatchers.Touch} The calling Touch Dispatcher. + */ + onTouchStart(callback: TouchCallback): Dispatchers.Touch; + /** + * Removes a callback that would be called when a touch starts. + * + * @param {TouchCallback} callback + * @return {Dispatchers.Touch} The calling Touch Dispatcher. + */ + offTouchStart(callback: TouchCallback): Dispatchers.Touch; + /** + * Registers a callback to be called when the touch position changes. + * + * @param {TouchCallback} callback + * @return {Dispatchers.Touch} The calling Touch Dispatcher. + */ + onTouchMove(callback: TouchCallback): Dispatchers.Touch; + /** + * Removes a callback that would be called when the touch position changes. + * + * @param {TouchCallback} callback + * @return {Dispatchers.Touch} The calling Touch Dispatcher. + */ + offTouchMove(callback: TouchCallback): Dispatchers.Touch; + /** + * Registers a callback to be called when a touch ends. + * + * @param {TouchCallback} callback + * @return {Dispatchers.Touch} The calling Touch Dispatcher. + */ + onTouchEnd(callback: TouchCallback): Dispatchers.Touch; + /** + * Removes a callback that would be called when a touch ends. + * + * @param {TouchCallback} callback + * @return {Dispatchers.Touch} The calling Touch Dispatcher. + */ + offTouchEnd(callback: TouchCallback): Dispatchers.Touch; + /** + * Registers a callback to be called when a touch is cancelled. + * + * @param {TouchCallback} callback + * @return {Dispatchers.Touch} The calling Touch Dispatcher. + */ + onTouchCancel(callback: TouchCallback): Dispatchers.Touch; + /** + * Removes a callback that would be called when a touch is cancelled. + * + * @param {TouchCallback} callback + * @return {Dispatchers.Touch} The calling Touch Dispatcher. + */ + offTouchCancel(callback: TouchCallback): Dispatchers.Touch; + } } } -} -declare namespace Plottable { - class Dispatcher { - protected _eventToCallback: { - [eventName: string]: (e: Event) => any; - }; - protected _callbacks: Utils.CallbackSet[]; - protected _setCallback(callbackSet: Utils.CallbackSet, callback: Function): void; - protected _unsetCallback(callbackSet: Utils.CallbackSet, callback: Function): void; - } -} - - -declare namespace Plottable { - namespace Dispatchers { - type MouseCallback = (p: Point, event: MouseEvent) => void; - class Mouse extends Dispatcher { - /** - * Get a Mouse Dispatcher for the containing elem. - * If one already exists on that , it will be returned; otherwise, a new one will be created. - * - * @param {SVGElement} elem - * @return {Dispatchers.Mouse} - */ - static getDispatcher(elem: SVGElement): Dispatchers.Mouse; - /** - * This constructor not be invoked directly. - * - * @constructor - * @param {SVGElement} svg The root to attach to. - */ - constructor(svg: SVGElement); - /** - * Registers a callback to be called when the mouse position changes. - * - * @param {MouseCallback} callback - * @return {Dispatchers.Mouse} The calling Mouse Dispatcher. - */ - onMouseMove(callback: MouseCallback): Dispatchers.Mouse; - /** - * Removes a callback that would be called when the mouse position changes. - * - * @param {MouseCallback} callback - * @return {Dispatchers.Mouse} The calling Mouse Dispatcher. - */ - offMouseMove(callback: MouseCallback): Dispatchers.Mouse; - /** - * Registers a callback to be called when a mousedown occurs. - * - * @param {MouseCallback} callback - * @return {Dispatchers.Mouse} The calling Mouse Dispatcher. - */ - onMouseDown(callback: MouseCallback): Dispatchers.Mouse; - /** - * Removes a callback that would be called when a mousedown occurs. - * - * @param {MouseCallback} callback - * @return {Dispatchers.Mouse} The calling Mouse Dispatcher. - */ - offMouseDown(callback: MouseCallback): Dispatchers.Mouse; - /** - * Registers a callback to be called when a mouseup occurs. - * - * @param {MouseCallback} callback - * @return {Dispatchers.Mouse} The calling Mouse Dispatcher. - */ - onMouseUp(callback: MouseCallback): Dispatchers.Mouse; - /** - * Removes a callback that would be called when a mouseup occurs. - * - * @param {MouseCallback} callback - * @return {Dispatchers.Mouse} The calling Mouse Dispatcher. - */ - offMouseUp(callback: MouseCallback): Dispatchers.Mouse; - /** - * Registers a callback to be called when a wheel event occurs. - * - * @param {MouseCallback} callback - * @return {Dispatchers.Mouse} The calling Mouse Dispatcher. - */ - onWheel(callback: MouseCallback): Dispatchers.Mouse; - /** - * Removes a callback that would be called when a wheel event occurs. - * - * @param {MouseCallback} callback - * @return {Dispatchers.Mouse} The calling Mouse Dispatcher. - */ - offWheel(callback: MouseCallback): Dispatchers.Mouse; - /** - * Registers a callback to be called when a dblClick occurs. - * - * @param {MouseCallback} callback - * @return {Dispatchers.Mouse} The calling Mouse Dispatcher. - */ - onDblClick(callback: MouseCallback): Dispatchers.Mouse; - /** - * Removes a callback that would be called when a dblClick occurs. - * - * @param {MouseCallback} callback - * @return {Dispatchers.Mouse} The calling Mouse Dispatcher. - */ - offDblClick(callback: MouseCallback): Dispatchers.Mouse; - /** - * Returns the last computed mouse position in coordinate space. - * - * @return {Point} - */ - lastMousePosition(): Point; + namespace Plottable { + namespace Dispatchers { + type KeyCallback = (keyCode: number, event: KeyboardEvent) => void; + class Key extends Dispatcher { + /** + * Gets a Key Dispatcher. If one already exists it will be returned; + * otherwise, a new one will be created. + * + * @return {Dispatchers.Key} + */ + static getDispatcher(): Dispatchers.Key; + /** + * This constructor should not be invoked directly. + * + * @constructor + */ + constructor(); + /** + * Registers a callback to be called whenever a key is pressed. + * + * @param {KeyCallback} callback + * @return {Dispatchers.Key} The calling Key Dispatcher. + */ + onKeyDown(callback: KeyCallback): Key; + /** + * Removes the callback to be called whenever a key is pressed. + * + * @param {KeyCallback} callback + * @return {Dispatchers.Key} The calling Key Dispatcher. + */ + offKeyDown(callback: KeyCallback): Key; + } } } -} -declare namespace Plottable { - namespace Dispatchers { - type TouchCallback = (ids: number[], idToPoint: { - [id: number]: Point; - }, event: TouchEvent) => void; - class Touch extends Dispatcher { - /** - * Gets a Touch Dispatcher for the containing elem. - * If one already exists on that , it will be returned; otherwise, a new one will be created. - * - * @param {SVGElement} elem - * @return {Dispatchers.Touch} - */ - static getDispatcher(elem: SVGElement): Dispatchers.Touch; - /** - * This constructor should not be invoked directly. - * - * @constructor - * @param {SVGElement} svg The root to attach to. - */ - constructor(svg: SVGElement); - /** - * Registers a callback to be called when a touch starts. - * - * @param {TouchCallback} callback - * @return {Dispatchers.Touch} The calling Touch Dispatcher. - */ - onTouchStart(callback: TouchCallback): Dispatchers.Touch; - /** - * Removes a callback that would be called when a touch starts. - * - * @param {TouchCallback} callback - * @return {Dispatchers.Touch} The calling Touch Dispatcher. - */ - offTouchStart(callback: TouchCallback): Dispatchers.Touch; - /** - * Registers a callback to be called when the touch position changes. - * - * @param {TouchCallback} callback - * @return {Dispatchers.Touch} The calling Touch Dispatcher. - */ - onTouchMove(callback: TouchCallback): Dispatchers.Touch; - /** - * Removes a callback that would be called when the touch position changes. - * - * @param {TouchCallback} callback - * @return {Dispatchers.Touch} The calling Touch Dispatcher. - */ - offTouchMove(callback: TouchCallback): Dispatchers.Touch; - /** - * Registers a callback to be called when a touch ends. - * - * @param {TouchCallback} callback - * @return {Dispatchers.Touch} The calling Touch Dispatcher. - */ - onTouchEnd(callback: TouchCallback): Dispatchers.Touch; - /** - * Removes a callback that would be called when a touch ends. - * - * @param {TouchCallback} callback - * @return {Dispatchers.Touch} The calling Touch Dispatcher. - */ - offTouchEnd(callback: TouchCallback): Dispatchers.Touch; - /** - * Registers a callback to be called when a touch is cancelled. - * - * @param {TouchCallback} callback - * @return {Dispatchers.Touch} The calling Touch Dispatcher. - */ - onTouchCancel(callback: TouchCallback): Dispatchers.Touch; - /** - * Removes a callback that would be called when a touch is cancelled. - * - * @param {TouchCallback} callback - * @return {Dispatchers.Touch} The calling Touch Dispatcher. - */ - offTouchCancel(callback: TouchCallback): Dispatchers.Touch; - } - } -} - - -declare namespace Plottable { - namespace Dispatchers { - type KeyCallback = (keyCode: number, event: KeyboardEvent) => void; - class Key extends Dispatcher { - /** - * Gets a Key Dispatcher. If one already exists it will be returned; - * otherwise, a new one will be created. - * - * @return {Dispatchers.Key} - */ - static getDispatcher(): Dispatchers.Key; - /** - * This constructor should not be invoked directly. - * - * @constructor - */ - constructor(); - /** - * Registers a callback to be called whenever a key is pressed. - * - * @param {KeyCallback} callback - * @return {Dispatchers.Key} The calling Key Dispatcher. - */ - onKeyDown(callback: KeyCallback): Key; - /** - * Removes the callback to be called whenever a key is pressed. - * - * @param {KeyCallback} callback - * @return {Dispatchers.Key} The calling Key Dispatcher. - */ - offKeyDown(callback: KeyCallback): Key; - } - } -} - - -declare namespace Plottable { - class Interaction { - protected _componentAttachedTo: Component; - protected _anchor(component: Component): void; - protected _unanchor(): void; - /** - * Attaches this Interaction to a Component. - * If the Interaction was already attached to a Component, it first detaches itself from the old Component. - * - * @param {Component} component - * @returns {Interaction} The calling Interaction. - */ - attachTo(component: Component): Interaction; - /** - * Detaches this Interaction from the Component. - * This Interaction can be reused. - * - * @param {Component} component - * @returns {Interaction} The calling Interaction. - */ - detachFrom(component: Component): Interaction; - /** - * Gets whether this Interaction is enabled. - */ - enabled(): boolean; - /** - * Enables or disables this Interaction. - * - * @param {boolean} enabled Whether the Interaction should be enabled. - * @return {Interaction} The calling Interaction. - */ - enabled(enabled: boolean): Interaction; - /** - * Translates an -coordinate-space point to Component-space coordinates. - * - * @param {Point} p A Point in -space coordinates. - * @return {Point} The same location in Component-space coordinates. - */ - protected _translateToComponentSpace(p: Point): Point; - /** - * Checks whether a Component-coordinate-space Point is inside the Component. - * - * @param {Point} p A Point in Compoennt-space coordinates. - * @return {boolean} Whether or not the point is inside the Component. - */ - protected _isInsideComponent(p: Point): boolean; - } -} - - -declare namespace Plottable { - type ClickCallback = (point: Point) => void; - namespace Interactions { - class Click extends Interaction { + namespace Plottable { + class Interaction { + protected _componentAttachedTo: Component; protected _anchor(component: Component): void; protected _unanchor(): void; /** - * Adds a callback to be called when the Component is clicked. + * Attaches this Interaction to a Component. + * If the Interaction was already attached to a Component, it first detaches itself from the old Component. * - * @param {ClickCallback} callback - * @return {Interactions.Click} The calling Click Interaction. + * @param {Component} component + * @returns {Interaction} The calling Interaction. */ - onClick(callback: ClickCallback): Click; + attachTo(component: Component): Interaction; /** - * Removes a callback that would be called when the Component is clicked. + * Detaches this Interaction from the Component. + * This Interaction can be reused. * - * @param {ClickCallback} callback - * @return {Interactions.Click} The calling Click Interaction. + * @param {Component} component + * @returns {Interaction} The calling Interaction. */ - offClick(callback: ClickCallback): Click; - } - } -} - - -declare namespace Plottable { - namespace Interactions { - class DoubleClick extends Interaction { - protected _anchor(component: Component): void; - protected _unanchor(): void; + detachFrom(component: Component): Interaction; /** - * Adds a callback to be called when the Component is double-clicked. - * - * @param {ClickCallback} callback - * @return {Interactions.DoubleClick} The calling DoubleClick Interaction. - */ - onDoubleClick(callback: ClickCallback): DoubleClick; - /** - * Removes a callback that would be called when the Component is double-clicked. - * - * @param {ClickCallback} callback - * @return {Interactions.DoubleClick} The calling DoubleClick Interaction. - */ - offDoubleClick(callback: ClickCallback): DoubleClick; - } - } -} - - -declare namespace Plottable { - type KeyCallback = (keyCode: number) => void; - namespace Interactions { - class Key extends Interaction { - protected _anchor(component: Component): void; - protected _unanchor(): void; - /** - * Adds a callback to be called when the key with the given keyCode is - * pressed and the user is moused over the Component. - * - * @param {number} keyCode - * @param {KeyCallback} callback - * @returns {Interactions.Key} The calling Key Interaction. - */ - onKeyPress(keyCode: number, callback: KeyCallback): Key; - /** - * Removes a callback that would be called when the key with the given keyCode is - * pressed and the user is moused over the Component. - * - * @param {number} keyCode - * @param {KeyCallback} callback - * @returns {Interactions.Key} The calling Key Interaction. - */ - offKeyPress(keyCode: number, callback: KeyCallback): Key; - } - } -} - - -declare namespace Plottable { - type PointerCallback = (point: Point) => void; - namespace Interactions { - class Pointer extends Interaction { - protected _anchor(component: Component): void; - protected _unanchor(): void; - /** - * Adds a callback to be called when the pointer enters the Component. - * - * @param {PointerCallback} callback - * @return {Interactions.Pointer} The calling Pointer Interaction. - */ - onPointerEnter(callback: PointerCallback): Pointer; - /** - * Removes a callback that would be called when the pointer enters the Component. - * - * @param {PointerCallback} callback - * @return {Interactions.Pointer} The calling Pointer Interaction. - */ - offPointerEnter(callback: PointerCallback): Pointer; - /** - * Adds a callback to be called when the pointer moves within the Component. - * - * @param {PointerCallback} callback - * @return {Interactions.Pointer} The calling Pointer Interaction. - */ - onPointerMove(callback: PointerCallback): Pointer; - /** - * Removes a callback that would be called when the pointer moves within the Component. - * - * @param {PointerCallback} callback - * @return {Interactions.Pointer} The calling Pointer Interaction. - */ - offPointerMove(callback: PointerCallback): Pointer; - /** - * Adds a callback to be called when the pointer exits the Component. - * - * @param {PointerCallback} callback - * @return {Interactions.Pointer} The calling Pointer Interaction. - */ - onPointerExit(callback: PointerCallback): Pointer; - /** - * Removes a callback that would be called when the pointer exits the Component. - * - * @param {PointerCallback} callback - * @return {Interactions.Pointer} The calling Pointer Interaction. - */ - offPointerExit(callback: PointerCallback): Pointer; - } - } -} - - -declare namespace Plottable { - namespace Interactions { - class PanZoom extends Interaction { - /** - * A PanZoom Interaction updates the domains of an x-scale and/or a y-scale - * in response to the user panning or zooming. - * - * @constructor - * @param {QuantitativeScale} [xScale] The x-scale to update on panning/zooming. - * @param {QuantitativeScale} [yScale] The y-scale to update on panning/zooming. - */ - constructor(xScale?: QuantitativeScale, yScale?: QuantitativeScale); - protected _anchor(component: Component): void; - protected _unanchor(): void; - /** - * Gets the x scales for this PanZoom Interaction. - */ - xScales(): QuantitativeScale[]; - /** - * Sets the x scales for this PanZoom Interaction. - * - * @returns {Interactions.PanZoom} The calling PanZoom Interaction. - */ - xScales(xScales: QuantitativeScale[]): Interactions.PanZoom; - /** - * Gets the y scales for this PanZoom Interaction. - */ - yScales(): QuantitativeScale[]; - /** - * Sets the y scales for this PanZoom Interaction. - * - * @returns {Interactions.PanZoom} The calling PanZoom Interaction. - */ - yScales(yScales: QuantitativeScale[]): Interactions.PanZoom; - /** - * Adds an x scale to this PanZoom Interaction - * - * @param {QuantitativeScale} An x scale to add - * @returns {Interactions.PanZoom} The calling PanZoom Interaction. - */ - addXScale(xScale: QuantitativeScale): PanZoom; - /** - * Removes an x scale from this PanZoom Interaction - * - * @param {QuantitativeScale} An x scale to remove - * @returns {Interactions.PanZoom} The calling PanZoom Interaction. - */ - removeXScale(xScale: QuantitativeScale): PanZoom; - /** - * Adds a y scale to this PanZoom Interaction - * - * @param {QuantitativeScale} A y scale to add - * @returns {Interactions.PanZoom} The calling PanZoom Interaction. - */ - addYScale(yScale: QuantitativeScale): PanZoom; - /** - * Removes a y scale from this PanZoom Interaction - * - * @param {QuantitativeScale} A y scale to remove - * @returns {Interactions.PanZoom} The calling PanZoom Interaction. - */ - removeYScale(yScale: QuantitativeScale): PanZoom; - /** - * Gets the minimum domain extent for the scale, specifying the minimum allowable amount - * between the ends of the domain. - * - * Note that extents will mainly work on scales that work linearly like Linear Scale and Time Scale - * - * @param {QuantitativeScale} quantitativeScale The scale to query - * @returns {D} The minimum domain extent for the scale. - */ - minDomainExtent(quantitativeScale: QuantitativeScale): D; - /** - * Sets the minimum domain extent for the scale, specifying the minimum allowable amount - * between the ends of the domain. - * - * Note that extents will mainly work on scales that work linearly like Linear Scale and Time Scale - * - * @param {QuantitativeScale} quantitativeScale The scale to query - * @param {D} minDomainExtent The minimum domain extent for the scale. - * @returns {Interactions.PanZoom} The calling PanZoom Interaction. - */ - minDomainExtent(quantitativeScale: QuantitativeScale, minDomainExtent: D): Interactions.PanZoom; - /** - * Gets the maximum domain extent for the scale, specifying the maximum allowable amount - * between the ends of the domain. - * - * Note that extents will mainly work on scales that work linearly like Linear Scale and Time Scale - * - * @param {QuantitativeScale} quantitativeScale The scale to query - * @returns {D} The maximum domain extent for the scale. - */ - maxDomainExtent(quantitativeScale: QuantitativeScale): D; - /** - * Sets the maximum domain extent for the scale, specifying the maximum allowable amount - * between the ends of the domain. - * - * Note that extents will mainly work on scales that work linearly like Linear Scale and Time Scale - * - * @param {QuantitativeScale} quantitativeScale The scale to query - * @param {D} minDomainExtent The maximum domain extent for the scale. - * @returns {Interactions.PanZoom} The calling PanZoom Interaction. - */ - maxDomainExtent(quantitativeScale: QuantitativeScale, maxDomainExtent: D): Interactions.PanZoom; - } - } -} - - -declare namespace Plottable { - type DragCallback = (start: Point, end: Point) => void; - namespace Interactions { - class Drag extends Interaction { - protected _anchor(component: Component): void; - protected _unanchor(): void; - /** - * Gets whether the Drag Interaction constrains Points passed to its - * callbacks to lie inside its Component. - * - * If true, when the user drags outside of the Component, the closest Point - * inside the Component will be passed to the callback instead of the actual - * cursor position. - * - * @return {boolean} - */ - constrainedToComponent(): boolean; - /** - * Sets whether the Drag Interaction constrains Points passed to its - * callbacks to lie inside its Component. - * - * If true, when the user drags outside of the Component, the closest Point - * inside the Component will be passed to the callback instead of the actual - * cursor position. - * - * @param {boolean} - * @return {Interactions.Drag} The calling Drag Interaction. - */ - constrainedToComponent(constrainedToComponent: boolean): Drag; - /** - * Adds a callback to be called when dragging starts. - * - * @param {DragCallback} callback - * @returns {Drag} The calling Drag Interaction. - */ - onDragStart(callback: DragCallback): Drag; - /** - * Removes a callback that would be called when dragging starts. - * - * @param {DragCallback} callback - * @returns {Drag} The calling Drag Interaction. - */ - offDragStart(callback: DragCallback): Drag; - /** - * Adds a callback to be called during dragging. - * - * @param {DragCallback} callback - * @returns {Drag} The calling Drag Interaction. - */ - onDrag(callback: DragCallback): Drag; - /** - * Removes a callback that would be called during dragging. - * - * @param {DragCallback} callback - * @returns {Drag} The calling Drag Interaction. - */ - offDrag(callback: DragCallback): Drag; - /** - * Adds a callback to be called when dragging ends. - * - * @param {DragCallback} callback - * @returns {Drag} The calling Drag Interaction. - */ - onDragEnd(callback: DragCallback): Drag; - /** - * Removes a callback that would be called when dragging ends. - * - * @param {DragCallback} callback - * @returns {Drag} The calling Drag Interaction. - */ - offDragEnd(callback: DragCallback): Drag; - } - } -} - - -declare namespace Plottable { - type DragBoxCallback = (bounds: Bounds) => void; - namespace Components { - class DragBoxLayer extends Components.SelectionBoxLayer { - protected _hasCorners: boolean; - /** - * Constructs a DragBoxLayer. - * - * A DragBoxLayer is a SelectionBoxLayer with a built-in Drag Interaction. - * A drag gesture will set the Bounds of the box. - * If resizing is enabled using resizable(true), the edges of box can be repositioned. - * - * @constructor - */ - constructor(); - protected _setup(): void; - renderImmediately(): DragBoxLayer; - /** - * Gets the detection radius of the drag box in pixels. - */ - detectionRadius(): number; - /** - * Sets the detection radius of the drag box in pixels. - * - * @param {number} r - * @return {DragBoxLayer} The calling DragBoxLayer. - */ - detectionRadius(r: number): DragBoxLayer; - /** - * Gets whether or not the drag box is resizable. - */ - resizable(): boolean; - /** - * Sets whether or not the drag box is resizable. - * - * @param {boolean} canResize - * @return {DragBoxLayer} The calling DragBoxLayer. - */ - resizable(canResize: boolean): DragBoxLayer; - protected _setResizableClasses(canResize: boolean): void; - /** - * Sets the callback to be called when dragging starts. - * - * @param {DragBoxCallback} callback - * @returns {DragBoxLayer} The calling DragBoxLayer. - */ - onDragStart(callback: DragBoxCallback): DragBoxLayer; - /** - * Removes a callback to be called when dragging starts. - * - * @param {DragBoxCallback} callback - * @returns {DragBoxLayer} The calling DragBoxLayer. - */ - offDragStart(callback: DragBoxCallback): DragBoxLayer; - /** - * Sets a callback to be called during dragging. - * - * @param {DragBoxCallback} callback - * @returns {DragBoxLayer} The calling DragBoxLayer. - */ - onDrag(callback: DragBoxCallback): DragBoxLayer; - /** - * Removes a callback to be called during dragging. - * - * @param {DragBoxCallback} callback - * @returns {DragBoxLayer} The calling DragBoxLayer. - */ - offDrag(callback: DragBoxCallback): DragBoxLayer; - /** - * Sets a callback to be called when dragging ends. - * - * @param {DragBoxCallback} callback - * @returns {DragBoxLayer} The calling DragBoxLayer. - */ - onDragEnd(callback: DragBoxCallback): DragBoxLayer; - /** - * Removes a callback to be called when dragging ends. - * - * @param {DragBoxCallback} callback - * @returns {DragBoxLayer} The calling DragBoxLayer. - */ - offDragEnd(callback: DragBoxCallback): DragBoxLayer; - /** - * Gets the internal Interactions.Drag of the DragBoxLayer. - */ - dragInteraction(): Interactions.Drag; - /** - * Enables or disables the interaction and drag box. - */ - enabled(enabled: boolean): DragBoxLayer; - /** - * Gets the enabled state. + * Gets whether this Interaction is enabled. */ enabled(): boolean; - } - } -} - - -declare namespace Plottable { - namespace Components { - class XDragBoxLayer extends DragBoxLayer { /** - * An XDragBoxLayer is a DragBoxLayer whose size can only be set in the X-direction. - * The y-values of the bounds() are always set to 0 and the height() of the XDragBoxLayer. + * Enables or disables this Interaction. * - * @constructor + * @param {boolean} enabled Whether the Interaction should be enabled. + * @return {Interaction} The calling Interaction. */ - constructor(); - computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): XDragBoxLayer; - protected _setBounds(newBounds: Bounds): void; - protected _setResizableClasses(canResize: boolean): void; - } - } -} - - -declare namespace Plottable { - namespace Components { - class YDragBoxLayer extends DragBoxLayer { + enabled(enabled: boolean): Interaction; /** - * A YDragBoxLayer is a DragBoxLayer whose size can only be set in the Y-direction. - * The x-values of the bounds() are always set to 0 and the width() of the YDragBoxLayer. + * Translates an -coordinate-space point to Component-space coordinates. * - * @constructor + * @param {Point} p A Point in -space coordinates. + * @return {Point} The same location in Component-space coordinates. */ - constructor(); - computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): YDragBoxLayer; - protected _setBounds(newBounds: Bounds): void; - protected _setResizableClasses(canResize: boolean): void; + protected _translateToComponentSpace(p: Point): Point; + /** + * Checks whether a Component-coordinate-space Point is inside the Component. + * + * @param {Point} p A Point in Compoennt-space coordinates. + * @return {boolean} Whether or not the point is inside the Component. + */ + protected _isInsideComponent(p: Point): boolean; + } + } + + + namespace Plottable { + type ClickCallback = (point: Point) => void; + namespace Interactions { + class Click extends Interaction { + protected _anchor(component: Component): void; + protected _unanchor(): void; + /** + * Adds a callback to be called when the Component is clicked. + * + * @param {ClickCallback} callback + * @return {Interactions.Click} The calling Click Interaction. + */ + onClick(callback: ClickCallback): Click; + /** + * Removes a callback that would be called when the Component is clicked. + * + * @param {ClickCallback} callback + * @return {Interactions.Click} The calling Click Interaction. + */ + offClick(callback: ClickCallback): Click; + } + } + } + + + namespace Plottable { + namespace Interactions { + class DoubleClick extends Interaction { + protected _anchor(component: Component): void; + protected _unanchor(): void; + /** + * Adds a callback to be called when the Component is double-clicked. + * + * @param {ClickCallback} callback + * @return {Interactions.DoubleClick} The calling DoubleClick Interaction. + */ + onDoubleClick(callback: ClickCallback): DoubleClick; + /** + * Removes a callback that would be called when the Component is double-clicked. + * + * @param {ClickCallback} callback + * @return {Interactions.DoubleClick} The calling DoubleClick Interaction. + */ + offDoubleClick(callback: ClickCallback): DoubleClick; + } + } + } + + + namespace Plottable { + type KeyCallback = (keyCode: number) => void; + namespace Interactions { + class Key extends Interaction { + protected _anchor(component: Component): void; + protected _unanchor(): void; + /** + * Adds a callback to be called when the key with the given keyCode is + * pressed and the user is moused over the Component. + * + * @param {number} keyCode + * @param {KeyCallback} callback + * @returns {Interactions.Key} The calling Key Interaction. + */ + onKeyPress(keyCode: number, callback: KeyCallback): Key; + /** + * Removes a callback that would be called when the key with the given keyCode is + * pressed and the user is moused over the Component. + * + * @param {number} keyCode + * @param {KeyCallback} callback + * @returns {Interactions.Key} The calling Key Interaction. + */ + offKeyPress(keyCode: number, callback: KeyCallback): Key; + } + } + } + + + namespace Plottable { + type PointerCallback = (point: Point) => void; + namespace Interactions { + class Pointer extends Interaction { + protected _anchor(component: Component): void; + protected _unanchor(): void; + /** + * Adds a callback to be called when the pointer enters the Component. + * + * @param {PointerCallback} callback + * @return {Interactions.Pointer} The calling Pointer Interaction. + */ + onPointerEnter(callback: PointerCallback): Pointer; + /** + * Removes a callback that would be called when the pointer enters the Component. + * + * @param {PointerCallback} callback + * @return {Interactions.Pointer} The calling Pointer Interaction. + */ + offPointerEnter(callback: PointerCallback): Pointer; + /** + * Adds a callback to be called when the pointer moves within the Component. + * + * @param {PointerCallback} callback + * @return {Interactions.Pointer} The calling Pointer Interaction. + */ + onPointerMove(callback: PointerCallback): Pointer; + /** + * Removes a callback that would be called when the pointer moves within the Component. + * + * @param {PointerCallback} callback + * @return {Interactions.Pointer} The calling Pointer Interaction. + */ + offPointerMove(callback: PointerCallback): Pointer; + /** + * Adds a callback to be called when the pointer exits the Component. + * + * @param {PointerCallback} callback + * @return {Interactions.Pointer} The calling Pointer Interaction. + */ + onPointerExit(callback: PointerCallback): Pointer; + /** + * Removes a callback that would be called when the pointer exits the Component. + * + * @param {PointerCallback} callback + * @return {Interactions.Pointer} The calling Pointer Interaction. + */ + offPointerExit(callback: PointerCallback): Pointer; + } + } + } + + + namespace Plottable { + namespace Interactions { + class PanZoom extends Interaction { + /** + * A PanZoom Interaction updates the domains of an x-scale and/or a y-scale + * in response to the user panning or zooming. + * + * @constructor + * @param {QuantitativeScale} [xScale] The x-scale to update on panning/zooming. + * @param {QuantitativeScale} [yScale] The y-scale to update on panning/zooming. + */ + constructor(xScale?: QuantitativeScale, yScale?: QuantitativeScale); + protected _anchor(component: Component): void; + protected _unanchor(): void; + /** + * Gets the x scales for this PanZoom Interaction. + */ + xScales(): QuantitativeScale[]; + /** + * Sets the x scales for this PanZoom Interaction. + * + * @returns {Interactions.PanZoom} The calling PanZoom Interaction. + */ + xScales(xScales: QuantitativeScale[]): Interactions.PanZoom; + /** + * Gets the y scales for this PanZoom Interaction. + */ + yScales(): QuantitativeScale[]; + /** + * Sets the y scales for this PanZoom Interaction. + * + * @returns {Interactions.PanZoom} The calling PanZoom Interaction. + */ + yScales(yScales: QuantitativeScale[]): Interactions.PanZoom; + /** + * Adds an x scale to this PanZoom Interaction + * + * @param {QuantitativeScale} An x scale to add + * @returns {Interactions.PanZoom} The calling PanZoom Interaction. + */ + addXScale(xScale: QuantitativeScale): PanZoom; + /** + * Removes an x scale from this PanZoom Interaction + * + * @param {QuantitativeScale} An x scale to remove + * @returns {Interactions.PanZoom} The calling PanZoom Interaction. + */ + removeXScale(xScale: QuantitativeScale): PanZoom; + /** + * Adds a y scale to this PanZoom Interaction + * + * @param {QuantitativeScale} A y scale to add + * @returns {Interactions.PanZoom} The calling PanZoom Interaction. + */ + addYScale(yScale: QuantitativeScale): PanZoom; + /** + * Removes a y scale from this PanZoom Interaction + * + * @param {QuantitativeScale} A y scale to remove + * @returns {Interactions.PanZoom} The calling PanZoom Interaction. + */ + removeYScale(yScale: QuantitativeScale): PanZoom; + /** + * Gets the minimum domain extent for the scale, specifying the minimum allowable amount + * between the ends of the domain. + * + * Note that extents will mainly work on scales that work linearly like Linear Scale and Time Scale + * + * @param {QuantitativeScale} quantitativeScale The scale to query + * @returns {D} The minimum domain extent for the scale. + */ + minDomainExtent(quantitativeScale: QuantitativeScale): D; + /** + * Sets the minimum domain extent for the scale, specifying the minimum allowable amount + * between the ends of the domain. + * + * Note that extents will mainly work on scales that work linearly like Linear Scale and Time Scale + * + * @param {QuantitativeScale} quantitativeScale The scale to query + * @param {D} minDomainExtent The minimum domain extent for the scale. + * @returns {Interactions.PanZoom} The calling PanZoom Interaction. + */ + minDomainExtent(quantitativeScale: QuantitativeScale, minDomainExtent: D): Interactions.PanZoom; + /** + * Gets the maximum domain extent for the scale, specifying the maximum allowable amount + * between the ends of the domain. + * + * Note that extents will mainly work on scales that work linearly like Linear Scale and Time Scale + * + * @param {QuantitativeScale} quantitativeScale The scale to query + * @returns {D} The maximum domain extent for the scale. + */ + maxDomainExtent(quantitativeScale: QuantitativeScale): D; + /** + * Sets the maximum domain extent for the scale, specifying the maximum allowable amount + * between the ends of the domain. + * + * Note that extents will mainly work on scales that work linearly like Linear Scale and Time Scale + * + * @param {QuantitativeScale} quantitativeScale The scale to query + * @param {D} minDomainExtent The maximum domain extent for the scale. + * @returns {Interactions.PanZoom} The calling PanZoom Interaction. + */ + maxDomainExtent(quantitativeScale: QuantitativeScale, maxDomainExtent: D): Interactions.PanZoom; + } + } + } + + + namespace Plottable { + type DragCallback = (start: Point, end: Point) => void; + namespace Interactions { + class Drag extends Interaction { + protected _anchor(component: Component): void; + protected _unanchor(): void; + /** + * Gets whether the Drag Interaction constrains Points passed to its + * callbacks to lie inside its Component. + * + * If true, when the user drags outside of the Component, the closest Point + * inside the Component will be passed to the callback instead of the actual + * cursor position. + * + * @return {boolean} + */ + constrainedToComponent(): boolean; + /** + * Sets whether the Drag Interaction constrains Points passed to its + * callbacks to lie inside its Component. + * + * If true, when the user drags outside of the Component, the closest Point + * inside the Component will be passed to the callback instead of the actual + * cursor position. + * + * @param {boolean} + * @return {Interactions.Drag} The calling Drag Interaction. + */ + constrainedToComponent(constrainedToComponent: boolean): Drag; + /** + * Adds a callback to be called when dragging starts. + * + * @param {DragCallback} callback + * @returns {Drag} The calling Drag Interaction. + */ + onDragStart(callback: DragCallback): Drag; + /** + * Removes a callback that would be called when dragging starts. + * + * @param {DragCallback} callback + * @returns {Drag} The calling Drag Interaction. + */ + offDragStart(callback: DragCallback): Drag; + /** + * Adds a callback to be called during dragging. + * + * @param {DragCallback} callback + * @returns {Drag} The calling Drag Interaction. + */ + onDrag(callback: DragCallback): Drag; + /** + * Removes a callback that would be called during dragging. + * + * @param {DragCallback} callback + * @returns {Drag} The calling Drag Interaction. + */ + offDrag(callback: DragCallback): Drag; + /** + * Adds a callback to be called when dragging ends. + * + * @param {DragCallback} callback + * @returns {Drag} The calling Drag Interaction. + */ + onDragEnd(callback: DragCallback): Drag; + /** + * Removes a callback that would be called when dragging ends. + * + * @param {DragCallback} callback + * @returns {Drag} The calling Drag Interaction. + */ + offDragEnd(callback: DragCallback): Drag; + } + } + } + + + namespace Plottable { + type DragBoxCallback = (bounds: Bounds) => void; + namespace Components { + class DragBoxLayer extends Components.SelectionBoxLayer { + protected _hasCorners: boolean; + /** + * Constructs a DragBoxLayer. + * + * A DragBoxLayer is a SelectionBoxLayer with a built-in Drag Interaction. + * A drag gesture will set the Bounds of the box. + * If resizing is enabled using resizable(true), the edges of box can be repositioned. + * + * @constructor + */ + constructor(); + protected _setup(): void; + renderImmediately(): DragBoxLayer; + /** + * Gets the detection radius of the drag box in pixels. + */ + detectionRadius(): number; + /** + * Sets the detection radius of the drag box in pixels. + * + * @param {number} r + * @return {DragBoxLayer} The calling DragBoxLayer. + */ + detectionRadius(r: number): DragBoxLayer; + /** + * Gets whether or not the drag box is resizable. + */ + resizable(): boolean; + /** + * Sets whether or not the drag box is resizable. + * + * @param {boolean} canResize + * @return {DragBoxLayer} The calling DragBoxLayer. + */ + resizable(canResize: boolean): DragBoxLayer; + protected _setResizableClasses(canResize: boolean): void; + /** + * Sets the callback to be called when dragging starts. + * + * @param {DragBoxCallback} callback + * @returns {DragBoxLayer} The calling DragBoxLayer. + */ + onDragStart(callback: DragBoxCallback): DragBoxLayer; + /** + * Removes a callback to be called when dragging starts. + * + * @param {DragBoxCallback} callback + * @returns {DragBoxLayer} The calling DragBoxLayer. + */ + offDragStart(callback: DragBoxCallback): DragBoxLayer; + /** + * Sets a callback to be called during dragging. + * + * @param {DragBoxCallback} callback + * @returns {DragBoxLayer} The calling DragBoxLayer. + */ + onDrag(callback: DragBoxCallback): DragBoxLayer; + /** + * Removes a callback to be called during dragging. + * + * @param {DragBoxCallback} callback + * @returns {DragBoxLayer} The calling DragBoxLayer. + */ + offDrag(callback: DragBoxCallback): DragBoxLayer; + /** + * Sets a callback to be called when dragging ends. + * + * @param {DragBoxCallback} callback + * @returns {DragBoxLayer} The calling DragBoxLayer. + */ + onDragEnd(callback: DragBoxCallback): DragBoxLayer; + /** + * Removes a callback to be called when dragging ends. + * + * @param {DragBoxCallback} callback + * @returns {DragBoxLayer} The calling DragBoxLayer. + */ + offDragEnd(callback: DragBoxCallback): DragBoxLayer; + /** + * Gets the internal Interactions.Drag of the DragBoxLayer. + */ + dragInteraction(): Interactions.Drag; + /** + * Enables or disables the interaction and drag box. + */ + enabled(enabled: boolean): DragBoxLayer; + /** + * Gets the enabled state. + */ + enabled(): boolean; + } + } + } + + + namespace Plottable { + namespace Components { + class XDragBoxLayer extends DragBoxLayer { + /** + * An XDragBoxLayer is a DragBoxLayer whose size can only be set in the X-direction. + * The y-values of the bounds() are always set to 0 and the height() of the XDragBoxLayer. + * + * @constructor + */ + constructor(); + computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): XDragBoxLayer; + protected _setBounds(newBounds: Bounds): void; + protected _setResizableClasses(canResize: boolean): void; + } + } + } + + + namespace Plottable { + namespace Components { + class YDragBoxLayer extends DragBoxLayer { + /** + * A YDragBoxLayer is a DragBoxLayer whose size can only be set in the Y-direction. + * The x-values of the bounds() are always set to 0 and the width() of the YDragBoxLayer. + * + * @constructor + */ + constructor(); + computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number): YDragBoxLayer; + protected _setBounds(newBounds: Bounds): void; + protected _setResizableClasses(canResize: boolean): void; + } } } } diff --git a/plottable/package.json b/plottable/package.json deleted file mode 100644 index 5e771f4dcd..0000000000 --- a/plottable/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/d3": "^3.5.36" - } -} diff --git a/plottable/tsconfig.json b/plottable/tsconfig.json index c6c38190be..af320479a2 100644 --- a/plottable/tsconfig.json +++ b/plottable/tsconfig.json @@ -1,10 +1,21 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "paths": { + "d3": ["d3/v3"] + }, "noEmit": true, "forceConsistentCasingInFileNames": true }, diff --git a/plugapi/tsconfig.json b/plugapi/tsconfig.json index 67a5ac6ad3..3db8ce2c64 100644 --- a/plugapi/tsconfig.json +++ b/plugapi/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/plupload/tsconfig.json b/plupload/tsconfig.json index 32b8b40f76..a78276fac3 100644 --- a/plupload/tsconfig.json +++ b/plupload/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pluralize/tsconfig.json b/pluralize/tsconfig.json index dfc79c344f..7d877b9e83 100644 --- a/pluralize/tsconfig.json +++ b/pluralize/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/png-async/tsconfig.json b/png-async/tsconfig.json index 41f6eba88c..48e19acc23 100644 --- a/png-async/tsconfig.json +++ b/png-async/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/pngjs2/tsconfig.json b/pngjs2/tsconfig.json index 5a48f675f8..e89b001db8 100644 --- a/pngjs2/tsconfig.json +++ b/pngjs2/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/podcast/tsconfig.json b/podcast/tsconfig.json index 3bb3c82e56..dd33399b60 100644 --- a/podcast/tsconfig.json +++ b/podcast/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/point-in-polygon/tsconfig.json b/point-in-polygon/tsconfig.json index 04ef00a368..7f82e9f497 100644 --- a/point-in-polygon/tsconfig.json +++ b/point-in-polygon/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/poly2tri/tsconfig.json b/poly2tri/tsconfig.json index 2c0b244f81..1fb436fbcb 100644 --- a/poly2tri/tsconfig.json +++ b/poly2tri/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/polylabel/tsconfig.json b/polylabel/tsconfig.json index b04e036ce5..88d3cc8826 100644 --- a/polylabel/tsconfig.json +++ b/polylabel/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/polyline/tsconfig.json b/polyline/tsconfig.json index 9909047518..45f458afdc 100644 --- a/polyline/tsconfig.json +++ b/polyline/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/polymer-ts/tsconfig.json b/polymer-ts/tsconfig.json index 8a98defad7..90a6bcb740 100644 --- a/polymer-ts/tsconfig.json +++ b/polymer-ts/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/polymer/tsconfig.json b/polymer/tsconfig.json index b769e4b97e..cd072e5d74 100644 --- a/polymer/tsconfig.json +++ b/polymer/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/popcorn/tsconfig.json b/popcorn/tsconfig.json index bf97b93a4d..9661cf12ad 100644 --- a/popcorn/tsconfig.json +++ b/popcorn/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/popper.js/tsconfig.json b/popper.js/tsconfig.json index 599036ff15..9c055568cf 100644 --- a/popper.js/tsconfig.json +++ b/popper.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/postal/tsconfig.json b/postal/tsconfig.json index bd49884c21..2aff504c3f 100644 --- a/postal/tsconfig.json +++ b/postal/tsconfig.json @@ -5,7 +5,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/postal/v0/tsconfig.json b/postal/v0/tsconfig.json index 9a2c13c9ae..a9c4e9fca6 100644 --- a/postal/v0/tsconfig.json +++ b/postal/v0/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -11,7 +13,9 @@ ], "types": [], "paths": { - "postal": ["postal/v0"] + "postal": [ + "postal/v0" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/pouch-redux-middleware/tsconfig.json b/pouch-redux-middleware/tsconfig.json index fcb4676c45..92849c6885 100644 --- a/pouch-redux-middleware/tsconfig.json +++ b/pouch-redux-middleware/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "pouch-redux-middleware-tests.ts" ] -} +} \ No newline at end of file diff --git a/pouchdb-adapter-fruitdown/tsconfig.json b/pouchdb-adapter-fruitdown/tsconfig.json index 8d2caa6797..e362706244 100644 --- a/pouchdb-adapter-fruitdown/tsconfig.json +++ b/pouchdb-adapter-fruitdown/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pouchdb-adapter-http/tsconfig.json b/pouchdb-adapter-http/tsconfig.json index d851d1692f..172ab6891a 100644 --- a/pouchdb-adapter-http/tsconfig.json +++ b/pouchdb-adapter-http/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pouchdb-adapter-idb/tsconfig.json b/pouchdb-adapter-idb/tsconfig.json index 7dced64fec..6fd6b28b32 100644 --- a/pouchdb-adapter-idb/tsconfig.json +++ b/pouchdb-adapter-idb/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pouchdb-adapter-leveldb/tsconfig.json b/pouchdb-adapter-leveldb/tsconfig.json index ddd4e577ee..17848d370d 100644 --- a/pouchdb-adapter-leveldb/tsconfig.json +++ b/pouchdb-adapter-leveldb/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pouchdb-adapter-localstorage/tsconfig.json b/pouchdb-adapter-localstorage/tsconfig.json index e8a7e002b5..c181a0755b 100644 --- a/pouchdb-adapter-localstorage/tsconfig.json +++ b/pouchdb-adapter-localstorage/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pouchdb-adapter-memory/tsconfig.json b/pouchdb-adapter-memory/tsconfig.json index 048e1129fe..ffcbc69c25 100644 --- a/pouchdb-adapter-memory/tsconfig.json +++ b/pouchdb-adapter-memory/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pouchdb-adapter-node-websql/tsconfig.json b/pouchdb-adapter-node-websql/tsconfig.json index 9bf3fb93df..56c16d68c7 100644 --- a/pouchdb-adapter-node-websql/tsconfig.json +++ b/pouchdb-adapter-node-websql/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pouchdb-adapter-websql/tsconfig.json b/pouchdb-adapter-websql/tsconfig.json index 2fdc768fc6..a21a8de7e4 100644 --- a/pouchdb-adapter-websql/tsconfig.json +++ b/pouchdb-adapter-websql/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pouchdb-browser/tsconfig.json b/pouchdb-browser/tsconfig.json index 1e11db723e..9ec77f7822 100644 --- a/pouchdb-browser/tsconfig.json +++ b/pouchdb-browser/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pouchdb-core/tsconfig.json b/pouchdb-core/tsconfig.json index 2988367c43..0068067705 100644 --- a/pouchdb-core/tsconfig.json +++ b/pouchdb-core/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/pouchdb-find/tsconfig.json b/pouchdb-find/tsconfig.json index eebae705d1..25ea81c910 100644 --- a/pouchdb-find/tsconfig.json +++ b/pouchdb-find/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/pouchdb-http/tsconfig.json b/pouchdb-http/tsconfig.json index 7d30a5cce3..c23708f695 100644 --- a/pouchdb-http/tsconfig.json +++ b/pouchdb-http/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pouchdb-mapreduce/tsconfig.json b/pouchdb-mapreduce/tsconfig.json index 6cb851da72..cf01560ee9 100644 --- a/pouchdb-mapreduce/tsconfig.json +++ b/pouchdb-mapreduce/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pouchdb-node/tsconfig.json b/pouchdb-node/tsconfig.json index 82799a8452..60c68fd778 100644 --- a/pouchdb-node/tsconfig.json +++ b/pouchdb-node/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pouchdb-replication/tsconfig.json b/pouchdb-replication/tsconfig.json index c6ba46ec53..6ac34adb7d 100644 --- a/pouchdb-replication/tsconfig.json +++ b/pouchdb-replication/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pouchdb-upsert/tsconfig.json b/pouchdb-upsert/tsconfig.json index cf519bd5c6..1236a1af0e 100644 --- a/pouchdb-upsert/tsconfig.json +++ b/pouchdb-upsert/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pouchdb/tsconfig.json b/pouchdb/tsconfig.json index 09bc6a7440..7f9e1c05d9 100644 --- a/pouchdb/tsconfig.json +++ b/pouchdb/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/power-assert-formatter/tsconfig.json b/power-assert-formatter/tsconfig.json index 128ad87268..979f00a1ec 100644 --- a/power-assert-formatter/tsconfig.json +++ b/power-assert-formatter/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/power-assert/tsconfig.json b/power-assert/tsconfig.json index 87a98b3b9a..23d27b2404 100644 --- a/power-assert/tsconfig.json +++ b/power-assert/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/precise/tsconfig.json b/precise/tsconfig.json index 7c29833b61..5022e2b7c4 100644 --- a/precise/tsconfig.json +++ b/precise/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/precond/tsconfig.json b/precond/tsconfig.json index fc45929e11..2dd6dc2839 100644 --- a/precond/tsconfig.json +++ b/precond/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/preloadjs/tsconfig.json b/preloadjs/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/preloadjs/tsconfig.json +++ b/preloadjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/prelude-ls/tsconfig.json b/prelude-ls/tsconfig.json index 476559e1bd..c40f360c56 100644 --- a/prelude-ls/tsconfig.json +++ b/prelude-ls/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/prettyjson/tsconfig.json b/prettyjson/tsconfig.json index db46dbe179..1da749f732 100644 --- a/prettyjson/tsconfig.json +++ b/prettyjson/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/priorityqueuejs/tsconfig.json b/priorityqueuejs/tsconfig.json index 853c771773..1a961d83f5 100644 --- a/priorityqueuejs/tsconfig.json +++ b/priorityqueuejs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/prismjs/tsconfig.json b/prismjs/tsconfig.json index 972a24f9fe..b01a635b30 100644 --- a/prismjs/tsconfig.json +++ b/prismjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/progress/tsconfig.json b/progress/tsconfig.json index 0961490fd3..6881db26b9 100644 --- a/progress/tsconfig.json +++ b/progress/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/progressbar/index.d.ts b/progressbar/index.d.ts new file mode 100644 index 0000000000..d29a6b67c4 --- /dev/null +++ b/progressbar/index.d.ts @@ -0,0 +1,21 @@ +// Type definitions for progressbar 1.1 +// Project: https://github.com/bevry/progressbar +// Definitions by: Arne Schubert +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export class Progressbar { + step(step: string): this; + getStep(): string; + setStep(steps: string): this; + setTick(ticks: number): this; + addTick(steps?: number): this; + tick(steps?: number): this; + getTick(): number; + setTotal(total: number): this; + total(total: number): this; + addTotal(total?: number): this; + getTotal(): number; + finish(next?: () => void): this; +} + +export function create(): Progressbar; diff --git a/progressbar/progressbar-tests.ts b/progressbar/progressbar-tests.ts new file mode 100644 index 0000000000..f6cfa4dac4 --- /dev/null +++ b/progressbar/progressbar-tests.ts @@ -0,0 +1,25 @@ +import { Progressbar, create } from 'progressbar'; + +let str: string = '', + progressbar: Progressbar, + num: number = 1, + fn: () => void = () => {}; + +progressbar = create(); +progressbar = progressbar.step(str); +progressbar = progressbar.setStep(str); +progressbar = progressbar.setTick(num); +progressbar = progressbar.addTick(); +progressbar = progressbar.addTick(num); +progressbar = progressbar.tick(); +progressbar = progressbar.tick(num); +progressbar = progressbar.setTotal(num); +progressbar = progressbar.total(num); +progressbar = progressbar.addTotal(); +progressbar = progressbar.addTotal(num); +progressbar = progressbar.finish(fn); + +str = progressbar.getStep(); + +num = progressbar.getTick(); +num = progressbar.getTotal(); diff --git a/progressbar/tsconfig.json b/progressbar/tsconfig.json new file mode 100644 index 0000000000..3ee0810c0f --- /dev/null +++ b/progressbar/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "progressbar-tests.ts" + ] +} diff --git a/progressbar/tslint.json b/progressbar/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/progressbar/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/progressjs/tsconfig.json b/progressjs/tsconfig.json index c04d0442c1..fe96106632 100644 --- a/progressjs/tsconfig.json +++ b/progressjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/proj4/tsconfig.json b/proj4/tsconfig.json index 6323732d03..3822749b6d 100644 --- a/proj4/tsconfig.json +++ b/proj4/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/project-oxford/tsconfig.json b/project-oxford/tsconfig.json index fde012c3c2..aa0c674947 100644 --- a/project-oxford/tsconfig.json +++ b/project-oxford/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/promise-pg/tsconfig.json b/promise-pg/tsconfig.json index c2b230f9f7..0f74dbb52b 100644 --- a/promise-pg/tsconfig.json +++ b/promise-pg/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/promise-polyfill/tsconfig.json b/promise-polyfill/tsconfig.json index 43bfd4da7f..36a713b024 100644 --- a/promise-polyfill/tsconfig.json +++ b/promise-polyfill/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/promise-pool/tsconfig.json b/promise-pool/tsconfig.json index ce7f5a68f8..b72557a58b 100644 --- a/promise-pool/tsconfig.json +++ b/promise-pool/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/promise.prototype.finally/tsconfig.json b/promise.prototype.finally/tsconfig.json index 227b38bb57..1ca27b380f 100644 --- a/promise.prototype.finally/tsconfig.json +++ b/promise.prototype.finally/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/promise/promise-tests.ts b/promise/promise-tests.ts index 4e93bfa163..c90cf4bf5e 100644 --- a/promise/promise-tests.ts +++ b/promise/promise-tests.ts @@ -1,13 +1,13 @@ -var prom = new Promise((resolve, reject) => { +var prom = new Promise((resolve, reject) => { resolve(true); }); -var prom2 = new Promise((resolve, reject) => { +var prom2 = new Promise((resolve, reject) => { resolve(true); }); prom.then((val) => { - console.log(val); + const b: boolean = val; }).catch(() => { }); diff --git a/promise/tsconfig.json b/promise/tsconfig.json index d78e01e92f..5fc066d3e9 100644 --- a/promise/tsconfig.json +++ b/promise/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es5", + "lib": [ + "es5" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/promises-a-plus/tsconfig.json b/promises-a-plus/tsconfig.json index 49815ba658..d5ccf86f75 100644 --- a/promises-a-plus/tsconfig.json +++ b/promises-a-plus/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/promisify-node/tsconfig.json b/promisify-node/tsconfig.json index 94f99e2316..b0fa5bb453 100644 --- a/promisify-node/tsconfig.json +++ b/promisify-node/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/promisify-supertest/tsconfig.json b/promisify-supertest/tsconfig.json index 8173dea657..74970bfcd1 100644 --- a/promisify-supertest/tsconfig.json +++ b/promisify-supertest/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/prompt-sync-history/tsconfig.json b/prompt-sync-history/tsconfig.json index 9a9dbb174d..6a62e81c42 100644 --- a/prompt-sync-history/tsconfig.json +++ b/prompt-sync-history/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/prompt-sync/tsconfig.json b/prompt-sync/tsconfig.json index d4d436434a..55449f21aa 100644 --- a/prompt-sync/tsconfig.json +++ b/prompt-sync/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/promptly/tsconfig.json b/promptly/tsconfig.json index 1e581c0793..491028f3a6 100644 --- a/promptly/tsconfig.json +++ b/promptly/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/protobufjs/tsconfig.json b/protobufjs/tsconfig.json index a2a91679da..126f90ff82 100644 --- a/protobufjs/tsconfig.json +++ b/protobufjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/protractor-helpers/tsconfig.json b/protractor-helpers/tsconfig.json index 8c65fecba5..c3fc74ec13 100644 --- a/protractor-helpers/tsconfig.json +++ b/protractor-helpers/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/protractor-http-mock/tsconfig.json b/protractor-http-mock/tsconfig.json index af8649213c..1280c748d3 100644 --- a/protractor-http-mock/tsconfig.json +++ b/protractor-http-mock/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/proxyquire/tsconfig.json b/proxyquire/tsconfig.json index 79377dade6..8a9a8fa96f 100644 --- a/proxyquire/tsconfig.json +++ b/proxyquire/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pty.js/tsconfig.json b/pty.js/tsconfig.json index 0691cca26c..4fc0717cee 100644 --- a/pty.js/tsconfig.json +++ b/pty.js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pubsub-js/tsconfig.json b/pubsub-js/tsconfig.json index eda08b963b..ffe2578142 100644 --- a/pubsub-js/tsconfig.json +++ b/pubsub-js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pug/tsconfig.json b/pug/tsconfig.json index db13293a24..14a8b2785a 100644 --- a/pug/tsconfig.json +++ b/pug/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/pulltorefreshjs/tsconfig.json b/pulltorefreshjs/tsconfig.json index 26c3326609..f285033d9d 100644 --- a/pulltorefreshjs/tsconfig.json +++ b/pulltorefreshjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "pulltorefreshjs-tests.ts" ] -} +} \ No newline at end of file diff --git a/pure-render-decorator/tsconfig.json b/pure-render-decorator/tsconfig.json index 931bf84b59..0e1569aa3a 100644 --- a/pure-render-decorator/tsconfig.json +++ b/pure-render-decorator/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/purl/tsconfig.json b/purl/tsconfig.json index ff838c055a..1af6bbdfee 100644 --- a/purl/tsconfig.json +++ b/purl/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/pusher-js/tsconfig.json b/pusher-js/tsconfig.json index 8fddb6e595..564061e4e2 100644 --- a/pusher-js/tsconfig.json +++ b/pusher-js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/pvutils/tsconfig.json b/pvutils/tsconfig.json index 0b0c5a894f..c30dca654c 100644 --- a/pvutils/tsconfig.json +++ b/pvutils/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/python-shell/tsconfig.json b/python-shell/tsconfig.json index 27748977a6..e94fb0c548 100644 --- a/python-shell/tsconfig.json +++ b/python-shell/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/q-io/tsconfig.json b/q-io/tsconfig.json index 968be22335..a0afa359c6 100644 --- a/q-io/tsconfig.json +++ b/q-io/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/q-retry/tsconfig.json b/q-retry/tsconfig.json index e15360055b..8b9a3250f4 100644 --- a/q-retry/tsconfig.json +++ b/q-retry/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/q/tsconfig.json b/q/tsconfig.json index dab5534e85..ec30c7c1c5 100644 --- a/q/tsconfig.json +++ b/q/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/qajax/tsconfig.json b/qajax/tsconfig.json index 3cf0cd37f3..8ba8578ef5 100644 --- a/qajax/tsconfig.json +++ b/qajax/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/qrcode-generator/tsconfig.json b/qrcode-generator/tsconfig.json index 267c1f2d98..3edfcfe47f 100644 --- a/qrcode-generator/tsconfig.json +++ b/qrcode-generator/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/qrcode/tsconfig.json b/qrcode/tsconfig.json index b99e14e3cb..792bed6543 100644 --- a/qrcode/tsconfig.json +++ b/qrcode/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/qs/tsconfig.json b/qs/tsconfig.json index 999cad9332..13f816338d 100644 --- a/qs/tsconfig.json +++ b/qs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/qtip2/tsconfig.json b/qtip2/tsconfig.json index 53c1d013df..8ba351f2a4 100644 --- a/qtip2/tsconfig.json +++ b/qtip2/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/query-string/tsconfig.json b/query-string/tsconfig.json index fe763c21ee..c0a4860fb8 100644 --- a/query-string/tsconfig.json +++ b/query-string/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/quill/tsconfig.json b/quill/tsconfig.json index 1a2bb4fc98..5c353f17a3 100644 --- a/quill/tsconfig.json +++ b/quill/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/quixote/tsconfig.json b/quixote/tsconfig.json index 29b297e63a..625e81a419 100644 --- a/quixote/tsconfig.json +++ b/quixote/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/qunit/tsconfig.json b/qunit/tsconfig.json index 23fdabdbb0..00a8e979ad 100644 --- a/qunit/tsconfig.json +++ b/qunit/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/qunit/v1/tsconfig.json b/qunit/v1/tsconfig.json index 81f16d8cfc..9e30aaab22 100644 --- a/qunit/v1/tsconfig.json +++ b/qunit/v1/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "qunit": ["qunit/v1"] + "qunit": [ + "qunit/v1" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/quoted-printable/tsconfig.json b/quoted-printable/tsconfig.json index a85302a666..1b061c1715 100644 --- a/quoted-printable/tsconfig.json +++ b/quoted-printable/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/qwest/tsconfig.json b/qwest/tsconfig.json index 9834c6c68a..7c9ff25668 100644 --- a/qwest/tsconfig.json +++ b/qwest/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/rabbit.js/tsconfig.json b/rabbit.js/tsconfig.json index 130281068e..35908c2526 100644 --- a/rabbit.js/tsconfig.json +++ b/rabbit.js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ractive/tsconfig.json b/ractive/tsconfig.json index 9d1a421908..0921ffe272 100644 --- a/ractive/tsconfig.json +++ b/ractive/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/radium/tsconfig.json b/radium/tsconfig.json index 5202b1cbe6..bac345c1e1 100644 --- a/radium/tsconfig.json +++ b/radium/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/radius/tsconfig.json b/radius/tsconfig.json index 796108ebbc..f26dd6826c 100644 --- a/radius/tsconfig.json +++ b/radius/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ramda/index.d.ts b/ramda/index.d.ts index 04623bdada..114ba38d6d 100644 --- a/ramda/index.d.ts +++ b/ramda/index.d.ts @@ -679,9 +679,10 @@ declare namespace R { indexOf(target: T): (list: T[]) => number; /** - * Returns all but the last element of a list. + * Returns all but the last element of a list or string. */ init(list: T[]): T[]; + init(list: string): string; /** * Inserts the supplied element into the list, at index index. Note that @@ -1467,9 +1468,10 @@ declare namespace R { T(): boolean; /** - * Returns all but the first element of a list. + * Returns all but the first element of a list or string. */ tail(list: T[]): T[]; + tail(list: string): string; /** * Returns a new list containing the first `n` elements of the given list. If diff --git a/ramda/ramda-tests.ts b/ramda/ramda-tests.ts index fc4e188362..e42ae16c63 100644 --- a/ramda/ramda-tests.ts +++ b/ramda/ramda-tests.ts @@ -575,6 +575,8 @@ interface Obj { a: number; b: number }; R.head(['fi', 'fo', 'fum']); //=> 'fi' R.head([10, 'ten']); // => 10 R.head(['10', 10]); // => '10' + R.head('abc'); //=> 'a' + R.head(''); //=> '' } (() => { @@ -591,6 +593,8 @@ interface Obj { a: number; b: number }; () => { R.init(['fi', 'fo', 'fum']); //=> ['fi', 'fo'] + R.init('abc'); //=> 'ab' + R.init(''); //=> '' } () => { @@ -623,6 +627,8 @@ interface Obj { a: number; b: number }; () => { R.last(['fi', 'fo', 'fum']); //=> 'fum' + R.last('abc'); //=> 'c' + R.last(''); //=> '' } () => { @@ -862,6 +868,8 @@ type Pair = KeyValuePair () => { R.tail(['fi', 'fo', 'fum']); //=> ['fo', 'fum'] R.tail([1, 2, 3]); //=> [2, 3] + R.tail('abc'); //=> 'bc' + R.tail(''); //=> '' } () => { diff --git a/ramda/tsconfig.json b/ramda/tsconfig.json index 10da1394f6..25a2a4ef17 100644 --- a/ramda/tsconfig.json +++ b/ramda/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/random-js/tsconfig.json b/random-js/tsconfig.json index eb2e70e45c..1be01a5af8 100644 --- a/random-js/tsconfig.json +++ b/random-js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/random-seed/tsconfig.json b/random-seed/tsconfig.json index 125aa5db52..53a4e8347b 100644 --- a/random-seed/tsconfig.json +++ b/random-seed/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/random-string/tsconfig.json b/random-string/tsconfig.json index 138aee999a..c80fa79d8c 100644 --- a/random-string/tsconfig.json +++ b/random-string/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/randomcolor/tsconfig.json b/randomcolor/tsconfig.json index 3154dc3671..23f5126d10 100644 --- a/randomcolor/tsconfig.json +++ b/randomcolor/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/randomstring/tsconfig.json b/randomstring/tsconfig.json index b51d491e6b..893e1b15b6 100644 --- a/randomstring/tsconfig.json +++ b/randomstring/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rangy/tsconfig.json b/rangy/tsconfig.json index 5806c933d0..d803035059 100644 --- a/rangy/tsconfig.json +++ b/rangy/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rangyinputs/tsconfig.json b/rangyinputs/tsconfig.json index 6da4a648d4..70eb1c5b70 100644 --- a/rangyinputs/tsconfig.json +++ b/rangyinputs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/raphael/tsconfig.json b/raphael/tsconfig.json index 7dbd9ad1dd..739025bf33 100644 --- a/raphael/tsconfig.json +++ b/raphael/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rappid/tsconfig.json b/rappid/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/rappid/tsconfig.json +++ b/rappid/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ratelimiter/tsconfig.json b/ratelimiter/tsconfig.json index 8488df251a..21822d6390 100644 --- a/ratelimiter/tsconfig.json +++ b/ratelimiter/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/raty/tsconfig.json b/raty/tsconfig.json index d6a480b3e1..271d05fb77 100644 --- a/raty/tsconfig.json +++ b/raty/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/raven-js/tsconfig.json b/raven-js/tsconfig.json index 78f622e685..9b2f3354cf 100644 --- a/raven-js/tsconfig.json +++ b/raven-js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/raw-body/tsconfig.json b/raw-body/tsconfig.json index ab7c360b45..c90758891e 100644 --- a/raw-body/tsconfig.json +++ b/raw-body/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/raygun4js/tsconfig.json b/raygun4js/tsconfig.json index 1a37c183e6..f186c8c0e5 100644 --- a/raygun4js/tsconfig.json +++ b/raygun4js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "raygun4js-tests.ts" ] -} +} \ No newline at end of file diff --git a/rbush/tsconfig.json b/rbush/tsconfig.json index 144f485448..de0fb4e550 100644 --- a/rbush/tsconfig.json +++ b/rbush/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rc-select/tsconfig.json b/rc-select/tsconfig.json index 74cf8cbbe9..19f23db405 100644 --- a/rc-select/tsconfig.json +++ b/rc-select/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rc-tooltip/tsconfig.json b/rc-tooltip/tsconfig.json index 1299929a2b..ff8f56d6e8 100644 --- a/rc-tooltip/tsconfig.json +++ b/rc-tooltip/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rc/tsconfig.json b/rc/tsconfig.json index 9d8ca99ed2..a3c5bee88f 100644 --- a/rc/tsconfig.json +++ b/rc/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/rcloader/tsconfig.json b/rcloader/tsconfig.json index 3b24f1d555..f2da61d680 100644 --- a/rcloader/tsconfig.json +++ b/rcloader/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-addons-create-fragment/tsconfig.json b/react-addons-create-fragment/tsconfig.json index 5692e5627e..1401eeeedb 100644 --- a/react-addons-create-fragment/tsconfig.json +++ b/react-addons-create-fragment/tsconfig.json @@ -4,7 +4,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-addons-css-transition-group/tsconfig.json b/react-addons-css-transition-group/tsconfig.json index 5692e5627e..1401eeeedb 100644 --- a/react-addons-css-transition-group/tsconfig.json +++ b/react-addons-css-transition-group/tsconfig.json @@ -4,7 +4,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-addons-linked-state-mixin/tsconfig.json b/react-addons-linked-state-mixin/tsconfig.json index 5692e5627e..1401eeeedb 100644 --- a/react-addons-linked-state-mixin/tsconfig.json +++ b/react-addons-linked-state-mixin/tsconfig.json @@ -4,7 +4,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-addons-perf/tsconfig.json b/react-addons-perf/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/react-addons-perf/tsconfig.json +++ b/react-addons-perf/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-addons-pure-render-mixin/tsconfig.json b/react-addons-pure-render-mixin/tsconfig.json index 5692e5627e..1401eeeedb 100644 --- a/react-addons-pure-render-mixin/tsconfig.json +++ b/react-addons-pure-render-mixin/tsconfig.json @@ -4,7 +4,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-addons-shallow-compare/tsconfig.json b/react-addons-shallow-compare/tsconfig.json index 150e5d484e..86f50b0584 100644 --- a/react-addons-shallow-compare/tsconfig.json +++ b/react-addons-shallow-compare/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-addons-test-utils/tsconfig.json b/react-addons-test-utils/tsconfig.json index 5692e5627e..1401eeeedb 100644 --- a/react-addons-test-utils/tsconfig.json +++ b/react-addons-test-utils/tsconfig.json @@ -4,7 +4,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-addons-transition-group/tsconfig.json b/react-addons-transition-group/tsconfig.json index 5692e5627e..1401eeeedb 100644 --- a/react-addons-transition-group/tsconfig.json +++ b/react-addons-transition-group/tsconfig.json @@ -4,7 +4,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-addons-update/tsconfig.json b/react-addons-update/tsconfig.json index 5692e5627e..1401eeeedb 100644 --- a/react-addons-update/tsconfig.json +++ b/react-addons-update/tsconfig.json @@ -4,7 +4,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-autosuggest/tsconfig.json b/react-autosuggest/tsconfig.json index 7873ffff2f..f2cd9370b4 100644 --- a/react-autosuggest/tsconfig.json +++ b/react-autosuggest/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/react-big-calendar/tsconfig.json b/react-big-calendar/tsconfig.json index f3f7d83eeb..5869b8490a 100644 --- a/react-big-calendar/tsconfig.json +++ b/react-big-calendar/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/react-body-classname/tsconfig.json b/react-body-classname/tsconfig.json index da2bf47eb2..ca88f0e9aa 100644 --- a/react-body-classname/tsconfig.json +++ b/react-body-classname/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -18,4 +21,4 @@ "index.d.ts", "react-body-classname-tests.tsx" ] -} +} \ No newline at end of file diff --git a/react-bootstrap-date-picker/tsconfig.json b/react-bootstrap-date-picker/tsconfig.json index 26eee3c491..7b82f84844 100644 --- a/react-bootstrap-date-picker/tsconfig.json +++ b/react-bootstrap-date-picker/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -18,4 +21,4 @@ "index.d.ts", "react-bootstrap-date-picker-tests.tsx" ] -} +} \ No newline at end of file diff --git a/react-bootstrap-daterangepicker/tsconfig.json b/react-bootstrap-daterangepicker/tsconfig.json index 7fbb0a2828..8856de035a 100644 --- a/react-bootstrap-daterangepicker/tsconfig.json +++ b/react-bootstrap-daterangepicker/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-bootstrap-table/tsconfig.json b/react-bootstrap-table/tsconfig.json index 9a43a03df1..e088067e04 100644 --- a/react-bootstrap-table/tsconfig.json +++ b/react-bootstrap-table/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-bootstrap/index.d.ts b/react-bootstrap/index.d.ts index 7cfa207108..76d046e10d 100644 --- a/react-bootstrap/index.d.ts +++ b/react-bootstrap/index.d.ts @@ -1,10 +1,11 @@ // Type definitions for react-bootstrap // Project: https://github.com/react-bootstrap/react-bootstrap -// Definitions by: Walker Burgin , Vincent Siao , Danilo Barros , Batbold Gansukh +// Definitions by: Walker Burgin , Vincent Siao , Danilo Barros , Batbold Gansukh , Raymond May Jr. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import * as React from 'react'; export = ReactBootstrap; +export as namespace ReactBootstrap; declare namespace ReactBootstrap { @@ -285,10 +286,10 @@ declare namespace ReactBootstrap { onHide?: Function; onEnter?: Function; onEntered?: Function; - onEntering?: Function; + onEntering?: Function; onExit?: Function; onExited?: Function; - onExiting?: Function; + onExiting?: Function; } type ModalDialog = React.ClassicComponent; var ModalDialog: React.ClassicComponentClass; @@ -333,20 +334,30 @@ declare namespace ReactBootstrap { // Optional animation?: boolean; + autoFocus?: boolean; backdrop?: boolean | string; + backdropClassName?: string; + backdropStyle?: any; + backdropTransitionTimeout?: number; bsSize?: Sizes; container?: any; // TODO: Add more specific type + containerClassName?: string; dialogClassName?: string; dialogComponent?: any; // TODO: Add more specific type + dialogTransitionTimeout?: number; enforceFocus?: boolean; keyboard?: boolean; + onBackdropClick?: (node: HTMLElement) => any; onEnter?: (node: HTMLElement) => any; onEntered?: (node: HTMLElement) => any; onEntering?: (node: HTMLElement) => any; + onEscapeKeyUp?: (node: HTMLElement) => any; onExit?: (node: HTMLElement) => any; onExited?: (node: HTMLElement) => any; onExiting?: (node: HTMLElement) => any; + onShow?: (node: HTMLElement) => any; show?: boolean; + transition?: React.ReactElement; } interface ModalClass extends React.ClassicComponentClass { Body: typeof ModalBody; @@ -358,7 +369,6 @@ declare namespace ReactBootstrap { type Modal = React.ClassicComponent; var Modal: ModalClass; - // interface OverlayTriggerProps { // Required @@ -602,7 +612,17 @@ declare namespace ReactBootstrap { // interface TabProps extends React.HTMLProps { animation?: boolean; + 'aria-labelledby'?:string; + bsClass?:string; eventKey?: any; // TODO: Add more specific type + onEnter?: Function; + onEntered?: Function; + onEntering?: Function; + onExit?: Function; + onExited?: Function; + onExiting?: Function; + unmountOnExit?: boolean; + tabClassName?:string; } interface TabClass extends React.ClassicComponentClass { Container: TabContainer; diff --git a/react-bootstrap/react-bootstrap-tests.tsx b/react-bootstrap/react-bootstrap-tests.tsx index e04a993be7..00bfae517c 100644 --- a/react-bootstrap/react-bootstrap-tests.tsx +++ b/react-bootstrap/react-bootstrap-tests.tsx @@ -598,6 +598,21 @@ export class ReactBootstrapTest extends Component { +
+ + {}} + onEntering={() => {}} + onExit={() => {}} + onExited={() => {}} + onExiting={()=>{}} + unmountOnExit={true} + bsClass="some style" tabClassName="classname" eventKey={1} title='Tab 1'>Tab 1 content + Tab 2 content + Tab 3 content + +
+
diff --git a/react-bootstrap/tsconfig.json b/react-bootstrap/tsconfig.json index e66a0c7823..e4ea90fda2 100644 --- a/react-bootstrap/tsconfig.json +++ b/react-bootstrap/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-breadcrumbs/tsconfig.json b/react-breadcrumbs/tsconfig.json index 6ea9f28e53..0092616bce 100644 --- a/react-breadcrumbs/tsconfig.json +++ b/react-breadcrumbs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-bytesize-icons/tsconfig.json b/react-bytesize-icons/tsconfig.json index f55cd22f8a..74943485e6 100644 --- a/react-bytesize-icons/tsconfig.json +++ b/react-bytesize-icons/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/react-calendar-timeline/tsconfig.json b/react-calendar-timeline/tsconfig.json index 6ea72ac45d..4345a77faf 100644 --- a/react-calendar-timeline/tsconfig.json +++ b/react-calendar-timeline/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-codemirror/tsconfig.json b/react-codemirror/tsconfig.json index 50528a5ccb..53e0a59d05 100644 --- a/react-codemirror/tsconfig.json +++ b/react-codemirror/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-color/tsconfig.json b/react-color/tsconfig.json index e450243e01..a88182ffbc 100644 --- a/react-color/tsconfig.json +++ b/react-color/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/react-cropper/tsconfig.json b/react-cropper/tsconfig.json index 29f120b3b0..a4e8d361dd 100644 --- a/react-cropper/tsconfig.json +++ b/react-cropper/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-css-modules/tsconfig.json b/react-css-modules/tsconfig.json index 7a22e5accd..adbf9bd876 100644 --- a/react-css-modules/tsconfig.json +++ b/react-css-modules/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/react-css-transition-replace/tsconfig.json b/react-css-transition-replace/tsconfig.json index 82db05146c..6899c7e04f 100644 --- a/react-css-transition-replace/tsconfig.json +++ b/react-css-transition-replace/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/react-data-grid/tsconfig.json b/react-data-grid/tsconfig.json index 097864a2a6..681ae11040 100644 --- a/react-data-grid/tsconfig.json +++ b/react-data-grid/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/react-datagrid/tsconfig.json b/react-datagrid/tsconfig.json index 037dc4923a..187f70b933 100644 --- a/react-datagrid/tsconfig.json +++ b/react-datagrid/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-datepicker/index.d.ts b/react-datepicker/index.d.ts index a158ba2f5f..aec8b61b72 100644 --- a/react-datepicker/index.d.ts +++ b/react-datepicker/index.d.ts @@ -16,7 +16,7 @@ declare module "react-datepicker" { disabled?: boolean; endDate?: {}; excludeDates?: any[]; - filterDate?():any; + filterDate?(): any; fixedHeight?: boolean; id?: string; includeDates?: any[]; @@ -25,10 +25,9 @@ declare module "react-datepicker" { maxDate?: {}; minDate?: {}; name?: string; - onBlur?():any; - onChange():any; - onChange(date?:any):any; - onFocus?():any; + onBlur?(handler: (e: any) => void): any; + onChange(handler: (date?: any, e?: any) => void): any; + onFocus?(handler: (e: any) => void): any; peekNextMonth?: boolean; placeholderText?: string; popoverAttachment?: string; @@ -40,7 +39,7 @@ declare module "react-datepicker" { scrollableYearDropdown?: boolean; selected?: {}; selectsEnd?: boolean; - selectsStart?: boolean; + selectsStart?: boolean; showMonthDropdown?: boolean; showYearDropdown?: boolean; showWeekNumbers?: boolean; diff --git a/react-datepicker/tsconfig.json b/react-datepicker/tsconfig.json index e70de726b6..f27b7a14b6 100644 --- a/react-datepicker/tsconfig.json +++ b/react-datepicker/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/react-daterange-picker/tsconfig.json b/react-daterange-picker/tsconfig.json index ef3f5b7c35..c2c726ab72 100644 --- a/react-daterange-picker/tsconfig.json +++ b/react-daterange-picker/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-day-picker/index.d.ts b/react-day-picker/index.d.ts index c3eb4a3170..f1a987cab3 100644 --- a/react-day-picker/index.d.ts +++ b/react-day-picker/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/gpbl/react-day-picker // Definitions by: Giampaolo Bellavite , Jason Killian // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.0 /// @@ -22,9 +23,9 @@ declare namespace ReactDayPicker { } interface DayModifiers { - selected?: boolean; - disabled?: boolean; - [name: string]: boolean; + selected?: boolean; + disabled?: boolean; + [name: string]: boolean | undefined; } interface Modifiers { diff --git a/react-day-picker/react-day-picker-tests.tsx b/react-day-picker/react-day-picker-tests.tsx index 33fbadf900..e8a17b5087 100644 --- a/react-day-picker/react-day-picker-tests.tsx +++ b/react-day-picker/react-day-picker-tests.tsx @@ -24,6 +24,11 @@ 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-day-picker/tsconfig.json b/react-day-picker/tsconfig.json index a5b010b1a8..943c51e1e6 100644 --- a/react-day-picker/tsconfig.json +++ b/react-day-picker/tsconfig.json @@ -1,10 +1,13 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "jsx": "react", "typeRoots": [ @@ -18,4 +21,4 @@ "index.d.ts", "react-day-picker-tests.tsx" ] -} \ No newline at end of file +} diff --git a/react-dnd-html5-backend/tsconfig.json b/react-dnd-html5-backend/tsconfig.json index 898981e985..22d513103d 100644 --- a/react-dnd-html5-backend/tsconfig.json +++ b/react-dnd-html5-backend/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-dnd/tsconfig.json b/react-dnd/tsconfig.json index 592de57f0e..835b3264e5 100644 --- a/react-dnd/tsconfig.json +++ b/react-dnd/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-dom/tsconfig.json b/react-dom/tsconfig.json index 76ad038b8d..cb69f55d94 100644 --- a/react-dom/tsconfig.json +++ b/react-dom/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-dropzone/tsconfig.json b/react-dropzone/tsconfig.json index 12bb0ec6ed..4174dabe65 100644 --- a/react-dropzone/tsconfig.json +++ b/react-dropzone/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-easy-chart/tsconfig.json b/react-easy-chart/tsconfig.json index 5c2cb580af..119be62ce4 100644 --- a/react-easy-chart/tsconfig.json +++ b/react-easy-chart/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-event-listener/tsconfig.json b/react-event-listener/tsconfig.json index 619baa483a..71c0231e39 100644 --- a/react-event-listener/tsconfig.json +++ b/react-event-listener/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "jsx": "react", "noImplicitAny": true, "noImplicitThis": true, @@ -18,4 +21,4 @@ "index.d.ts", "react-event-listener-tests.tsx" ] -} +} \ No newline at end of file diff --git a/react-fa/tsconfig.json b/react-fa/tsconfig.json index 6031db346b..188401b1cd 100644 --- a/react-fa/tsconfig.json +++ b/react-fa/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -18,4 +21,4 @@ "index.d.ts", "react-fa-tests.tsx" ] -} +} \ No newline at end of file diff --git a/react-facebook-login/index.d.ts b/react-facebook-login/index.d.ts new file mode 100644 index 0000000000..3b95e684e4 --- /dev/null +++ b/react-facebook-login/index.d.ts @@ -0,0 +1,50 @@ +// Type definitions for react-facebook-login 3.4 +// Project: https://github.com/keppelen/react-facebook-login +// Definitions by: Alexandre Paré +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as React from "react"; + +declare namespace ReactFacebookLogin { + + export interface ReactFacebookLoginProps { + appId: string; + callback: (userInfo: ReactFacebookLoginInfo) => void; + + autoLoad?: boolean; + buttonStyle?: React.CSSProperties; + containerStyle?: React.CSSProperties; + cookie?: boolean; + cssClass?: string; + disableMobileRedirect?: boolean; + fields?: string; + icon?: string | React.ReactNode; + isDisabled?: boolean; + language?: string; + onClick?: () => void; + reAuthenticate?: boolean; + redirectUri?: string; + scope?: string; + size?: "small" | "medium" | "metro"; + textButton?: string; + typeButton?: string; + version?: string; + xfbml?: boolean; + } + + export interface ReactFacebookLoginInfo { + id: string; + name: string; + } + + export interface ReactFacebookLoginState { + isSdkLoaded?: boolean; + isProcessing?: boolean; + } + +} + +declare class ReactFacebookLogin extends React.Component { +} + +export = ReactFacebookLogin; \ No newline at end of file diff --git a/react-facebook-login/react-facebook-login-tests.tsx b/react-facebook-login/react-facebook-login-tests.tsx new file mode 100644 index 0000000000..0a57b598fe --- /dev/null +++ b/react-facebook-login/react-facebook-login-tests.tsx @@ -0,0 +1,99 @@ +import * as React from 'react'; +import * as ReactDOM from 'react-dom'; + +import FacebookLogin from 'react-facebook-login'; +import { ReactFacebookLoginInfo } from 'react-facebook-login'; + +const responseFacebook = (response: ReactFacebookLoginInfo) => { + console.log(response); +}; + +const componentClicked = () => { + console.log("component clicked"); +}; + +ReactDOM.render( + , + document.getElementById('demo') +); + + +ReactDOM.render( + , + document.getElementById('demo') +); + +ReactDOM.render( + } + />, + document.getElementById('demo') +); + +ReactDOM.render( + } + />, + document.getElementById('demo') +); + +class MyComponent extends React.Component { + + private responseFacebook(response: ReactFacebookLoginInfo) { + console.log(response); + } + + render() { + return ( + + ); + } +} + + +class MyComponent2 extends React.Component { + + private responseFacebook(response: ReactFacebookLoginInfo) { + console.log(response); + } + + render() { + return ( + + ) + } +} + diff --git a/react-facebook-login/tsconfig.json b/react-facebook-login/tsconfig.json new file mode 100644 index 0000000000..6803f928e3 --- /dev/null +++ b/react-facebook-login/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "jsx": "react", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "allowSyntheticDefaultImports": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-facebook-login-tests.tsx" + ] +} diff --git a/react-facebook-login/tslint.json b/react-facebook-login/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/react-facebook-login/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/react-file-input/tsconfig.json b/react-file-input/tsconfig.json index 8081fc6e98..3db5799d64 100644 --- a/react-file-input/tsconfig.json +++ b/react-file-input/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-file-reader-input/tsconfig.json b/react-file-reader-input/tsconfig.json index 0c6f5ad5cd..fa55727f01 100644 --- a/react-file-reader-input/tsconfig.json +++ b/react-file-reader-input/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-flex/tsconfig.json b/react-flex/tsconfig.json index ef7c9cba27..a50abecbb6 100644 --- a/react-flex/tsconfig.json +++ b/react-flex/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-flexr/tsconfig.json b/react-flexr/tsconfig.json index 9ff5585ae5..976c506be7 100644 --- a/react-flexr/tsconfig.json +++ b/react-flexr/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-fontawesome/tsconfig.json b/react-fontawesome/tsconfig.json index 6fa8b55146..a305b56a99 100644 --- a/react-fontawesome/tsconfig.json +++ b/react-fontawesome/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-ga/tsconfig.json b/react-ga/tsconfig.json index 38f886fc39..6d786d97ed 100644 --- a/react-ga/tsconfig.json +++ b/react-ga/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -12,7 +14,6 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, - "jsx": "react" }, "files": [ diff --git a/react-gravatar/tsconfig.json b/react-gravatar/tsconfig.json index c2b6badf45..83a0731b1c 100644 --- a/react-gravatar/tsconfig.json +++ b/react-gravatar/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": true, diff --git a/react-helmet/tsconfig.json b/react-helmet/tsconfig.json index 775b3e1d3c..cbf28cef27 100644 --- a/react-helmet/tsconfig.json +++ b/react-helmet/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-highlight-words/tsconfig.json b/react-highlight-words/tsconfig.json index baa4c9c691..fcd85363d6 100644 --- a/react-highlight-words/tsconfig.json +++ b/react-highlight-words/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -18,4 +21,4 @@ "index.d.ts", "react-highlight-words-tests.tsx" ] -} +} \ No newline at end of file diff --git a/react-highlighter/tsconfig.json b/react-highlighter/tsconfig.json index 973c6207af..d0ecf277f0 100644 --- a/react-highlighter/tsconfig.json +++ b/react-highlighter/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -12,7 +15,6 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, - "jsx": "react" }, "files": [ diff --git a/react-holder/tsconfig.json b/react-holder/tsconfig.json index 90216b78a1..2e70780102 100644 --- a/react-holder/tsconfig.json +++ b/react-holder/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-hot-loader/tsconfig.json b/react-hot-loader/tsconfig.json index 188a893310..f75cc89014 100644 --- a/react-hot-loader/tsconfig.json +++ b/react-hot-loader/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/react-i18next/tsconfig.json b/react-i18next/tsconfig.json index 1bb017982f..bba519bbd3 100644 --- a/react-i18next/tsconfig.json +++ b/react-i18next/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/react-imageloader/tsconfig.json b/react-imageloader/tsconfig.json index 66e2ee59a2..89127c41f8 100644 --- a/react-imageloader/tsconfig.json +++ b/react-imageloader/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-infinite/tsconfig.json b/react-infinite/tsconfig.json index 987d401061..3246777fd4 100644 --- a/react-infinite/tsconfig.json +++ b/react-infinite/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/react-input-calendar/tsconfig.json b/react-input-calendar/tsconfig.json index fcdb248be7..b828ec3f78 100644 --- a/react-input-calendar/tsconfig.json +++ b/react-input-calendar/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-input-mask/index.d.ts b/react-input-mask/index.d.ts new file mode 100644 index 0000000000..3764b61122 --- /dev/null +++ b/react-input-mask/index.d.ts @@ -0,0 +1,42 @@ +// Type definitions for react-input-mask 0.7 +// Project: https://github.com/sanniassin/react-input-mask +// Definitions by: Alexandre Paré +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as React from "react"; + +declare namespace reactInputMask { + export interface ReactInputMaskProps extends React.HTMLAttributes { + /** + * Mask string. Format characters are: + * * `9`: `0-9` + * * `a`: `A-Z, a-z` + * * `\*`: `A-Z, a-z, 0-9` + * + * Any character can be escaped with backslash, which usually will appear as double backslash in JS strings. For example, German phone mask with unremoveable prefix +49 will look like `mask="+4\\9 99 999 99"` or `mask={"+4\\\\9 99 999 99"}` + */ + mask: string; + /** + * Character to cover unfilled editable parts of mask. Default character is "_". If set to null, unfilled parts will be empty, like in ordinary input. + */ + maskChar?: string | null; + /** + * Defines format characters with characters as keys and corresponding RegExp string as values. Default ones: + * ``` + * { + * "9": "[0-9]", + * "a": "[A-Za-z]", + * "*": "[A-Za-z0-9]" + * }``` + */ + formatChars?: { [key: string]: string }; + /** + * Show mask even in empty input without focus. + */ + alwaysShowMask?: boolean; + } + export class ReactInputMask extends React.Component { + } +} +declare var ReactInputMask: typeof reactInputMask.ReactInputMask; +export = ReactInputMask; diff --git a/react-input-mask/react-input-mask-tests.tsx b/react-input-mask/react-input-mask-tests.tsx new file mode 100644 index 0000000000..955a6ce4b8 --- /dev/null +++ b/react-input-mask/react-input-mask-tests.tsx @@ -0,0 +1,10 @@ +import * as ReactInputMask from 'react-input-mask'; +import * as React from 'react'; + +
+ + + + + +
\ No newline at end of file diff --git a/react-input-mask/tsconfig.json b/react-input-mask/tsconfig.json new file mode 100644 index 0000000000..4eac1b496f --- /dev/null +++ b/react-input-mask/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "jsx": "react", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-input-mask-tests.tsx" + ] +} diff --git a/react-input-mask/tslint.json b/react-input-mask/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/react-input-mask/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/react-intl-redux/tsconfig.json b/react-intl-redux/tsconfig.json index cb40d4ea6e..2c8de4aeed 100644 --- a/react-intl-redux/tsconfig.json +++ b/react-intl-redux/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/react-intl/tsconfig.json b/react-intl/tsconfig.json index 64d2f82dc1..48c75940b2 100644 --- a/react-intl/tsconfig.json +++ b/react-intl/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-intl/v1/tsconfig.json b/react-intl/v1/tsconfig.json index 852a9ce482..6fa7e221bd 100644 --- a/react-intl/v1/tsconfig.json +++ b/react-intl/v1/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -11,11 +14,12 @@ ], "types": [], "paths": { - "react-intl": ["react-intl/v1"] + "react-intl": [ + "react-intl/v1" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true, - "jsx": "react", "experimentalDecorators": true }, diff --git a/react-is-deprecated/tsconfig.json b/react-is-deprecated/tsconfig.json index f5eb9b7960..005eec453a 100644 --- a/react-is-deprecated/tsconfig.json +++ b/react-is-deprecated/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/react-joyride/tsconfig.json b/react-joyride/tsconfig.json index d6f9b9ea2e..7cd2e1b540 100644 --- a/react-joyride/tsconfig.json +++ b/react-joyride/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "jsx": "preserve", "noImplicitAny": true, "noImplicitThis": true, @@ -18,4 +21,4 @@ "index.d.ts", "react-joyride-tests.tsx" ] -} +} \ No newline at end of file diff --git a/react-json-tree/tsconfig.json b/react-json-tree/tsconfig.json index 6d0c422e9c..e72b805bf3 100644 --- a/react-json-tree/tsconfig.json +++ b/react-json-tree/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/react-jsonschema-form/tsconfig.json b/react-jsonschema-form/tsconfig.json index 5d51609d66..44fcb510ce 100644 --- a/react-jsonschema-form/tsconfig.json +++ b/react-jsonschema-form/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-leaflet/index.d.ts b/react-leaflet/index.d.ts index 62b77852e5..f98b222acd 100644 --- a/react-leaflet/index.d.ts +++ b/react-leaflet/index.d.ts @@ -95,7 +95,7 @@ declare const Pane: React.ComponentClass; //There is no Layer class, these are the base props for all layers on the map -interface LayerProps { +interface LayerProps extends LeafletInteractionEvents { onadd?: (event: Leaflet.Event) => void; onremove?: (event: Leaflet.Event) => void; @@ -109,7 +109,7 @@ interface LayerProps { } -interface MarkerProps extends LayerProps, LeafletInteractionEvents, LeafletDraggingEvents { +interface MarkerProps extends LayerProps, LeafletDraggingEvents { position: Leaflet.LatLngExpression; draggable?: boolean; icon?: Leaflet.Icon; diff --git a/react-leaflet/tsconfig.json b/react-leaflet/tsconfig.json index 4ebf2bb5d3..8be1b3c2fe 100644 --- a/react-leaflet/tsconfig.json +++ b/react-leaflet/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/react-maskedinput/tsconfig.json b/react-maskedinput/tsconfig.json index 941d424dd6..8dcdaf409e 100644 --- a/react-maskedinput/tsconfig.json +++ b/react-maskedinput/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -18,4 +21,4 @@ "index.d.ts", "react-maskedinput-tests.tsx" ] -} +} \ No newline at end of file diff --git a/react-mdl/tsconfig.json b/react-mdl/tsconfig.json index da8478fa13..005decb768 100644 --- a/react-mdl/tsconfig.json +++ b/react-mdl/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/react-measure/tsconfig.json b/react-measure/tsconfig.json index ecbe7ae3f9..30d4fbe30f 100644 --- a/react-measure/tsconfig.json +++ b/react-measure/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-mixin/tsconfig.json b/react-mixin/tsconfig.json index 124312539a..b8b9f60cdb 100644 --- a/react-mixin/tsconfig.json +++ b/react-mixin/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/react-modal/tsconfig.json b/react-modal/tsconfig.json index 16e1e434dc..dee457f8cb 100644 --- a/react-modal/tsconfig.json +++ b/react-modal/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-motion-slider/tsconfig.json b/react-motion-slider/tsconfig.json index 1916996b23..db55a702e8 100644 --- a/react-motion-slider/tsconfig.json +++ b/react-motion-slider/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-motion/tsconfig.json b/react-motion/tsconfig.json index e7d0c7d755..eea3e82af0 100644 --- a/react-motion/tsconfig.json +++ b/react-motion/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-native-fs/tsconfig.json b/react-native-fs/tsconfig.json index fb1a8daab2..614543661c 100644 --- a/react-native-fs/tsconfig.json +++ b/react-native-fs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/react-native-orientation/tsconfig.json b/react-native-orientation/tsconfig.json index 8e42f43fdf..58b87f9214 100644 --- a/react-native-orientation/tsconfig.json +++ b/react-native-orientation/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/react-native-scrollable-tab-view/index.d.ts b/react-native-scrollable-tab-view/index.d.ts new file mode 100644 index 0000000000..b2d447c23c --- /dev/null +++ b/react-native-scrollable-tab-view/index.d.ts @@ -0,0 +1,107 @@ +// Type definitions for react-native-scrollable-tab-view 0.7 +// Project: https://github.com/brentvatne/react-native-scrollable-tab-view#readme +// Definitions by: CaiHuan +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as React from 'react'; +import { + Animated, + ViewStyle +} from 'react-native'; + +export interface onChangeTabProperties { + // currentPage + i: number; + + // currentPage object + ref: JSX.Element; + + // previousPage + from: number; +} + +export interface renderTabBarProperties { + + goToPage: (pageNumber: number) => void; + + tabs: JSX.Element; + + activeTab: number; + + scrollValue: Animated.Value; + + containerWidth: number; +} + +interface ScrollableTabViewProperties extends React.Props { + + /** + * tabBarPosition (String) Defaults to "top". + * "bottom" to position the tab bar below content. + * "overlayTop" or "overlayBottom" for a semitransparent tab bar that overlays content. Custom + * tab bars must consume a style prop on their outer element to support this feature: style={this.props.style}. + */ + tabBarPosition?: 'top' | 'bottom' | 'overlayTop' | 'overlayBottom'; + + /** + * (Integer) - the index of the initially selected tab, defaults to 0 === first tab + */ + initialPage?: number; + + /** + * (Integer) - set selected tab(can be buggy see + * https://github.com/skv-headless/react-native-scrollable-tab-view/issues/126 + */ + page?: number; + + /** + * onChangeTab (Function) - function to call when tab changes, should accept 1 argument which is + * an Object containing two keys: i: the index of the tab that is selected, ref: the ref of the + * tab that is selected + */ + onChangeTab?: (value: onChangeTabProperties) => void; + + /** + * onScroll (Function) - function to call when the pages are sliding, + * should accept 1 argument which is an Float number representing the page position in the slide frame. + */ + onScroll?: (value: number) => void; + + /** + * renderTabBar (Function:ReactComponent) - accept 1 argument props and should return a component + * to use as the tab bar. The component has goToPage, tabs, activeTab and ref added to the props, + * and should implement setAnimationValue to be able to animate itself along with the tab content. + * You can manually pass the props to the TabBar component. + */ + renderTabBar?: (value: JSX.Element) => JSX.Element; + + /** + * style (View.propTypes.style) + */ + style?: ViewStyle; + + /** + * 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; + + /** + * scrollWithoutAnimation (Bool) - on tab press change tab without animation. + */ + scrollWithoutAnimation?: boolean; + + /** + * locked (Bool) - disables horizontal dragging to scroll between tabs, default is false. + */ + locked?: boolean; + + /** + * prerenderingSiblingsNumber (Integer) - pre-render nearby # sibling, Infinity === render all + * the siblings, default to 0 === render current page. + */ + prerenderingSiblingsNumber?: number; +} + +export default class ScrollableTabView extends React.Component { +} diff --git a/react-native-scrollable-tab-view/react-native-scrollable-tab-view-tests.tsx b/react-native-scrollable-tab-view/react-native-scrollable-tab-view-tests.tsx new file mode 100644 index 0000000000..be501febf9 --- /dev/null +++ b/react-native-scrollable-tab-view/react-native-scrollable-tab-view-tests.tsx @@ -0,0 +1,48 @@ +import * as React from 'react'; +import { + Text +} from 'react-native'; +import ScrollableTabView from 'react-native-scrollable-tab-view'; + +interface MyTextProperties extends React.Props { + tabLabel: string; + + text: string; +} +class MyText extends React.Component { + public constructor(props: MyTextProperties) { + super(props); + } + + public render(): JSX.Element { + return( + this.props.text + ); + } +} + +interface ScrollableTabViewDemoProperties { + +} +class ScrollableTabViewDemo extends React.Component { + + public constructor(props: ScrollableTabViewDemo) { + super(props); + } + + public render(): JSX.Element { + return ( + + + + + + ); + } + + protected componentWillMount?(): void { + } + + protected componentWillUnmount?(): void { + } +} \ No newline at end of file diff --git a/react-native-scrollable-tab-view/tsconfig.json b/react-native-scrollable-tab-view/tsconfig.json new file mode 100644 index 0000000000..7953defd5f --- /dev/null +++ b/react-native-scrollable-tab-view/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react" + }, + "files": [ + "index.d.ts", + "react-native-scrollable-tab-view-tests.tsx" + ] +} diff --git a/react-native-scrollable-tab-view/tslint.json b/react-native-scrollable-tab-view/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/react-native-scrollable-tab-view/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/react-native-sortable-list/tsconfig.json b/react-native-sortable-list/tsconfig.json index 10ca24bfd0..a7ef962b89 100644 --- a/react-native-sortable-list/tsconfig.json +++ b/react-native-sortable-list/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/react-native-swiper/index.d.ts b/react-native-swiper/index.d.ts index 9b6a0f345c..f1ff914346 100644 --- a/react-native-swiper/index.d.ts +++ b/react-native-swiper/index.d.ts @@ -12,7 +12,7 @@ interface SwiperProperties extends React.Props { horizontal?: boolean; - style: ViewStyle; + style?: ViewStyle; pagingEnabled?: boolean; diff --git a/react-native-swiper/tsconfig.json b/react-native-swiper/tsconfig.json index d83bfd5bdb..ddd3a131f4 100644 --- a/react-native-swiper/tsconfig.json +++ b/react-native-swiper/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/react-native/index.d.ts b/react-native/index.d.ts index c9a9b76dc5..edf2822dd6 100644 --- a/react-native/index.d.ts +++ b/react-native/index.d.ts @@ -4390,9 +4390,9 @@ declare module "react" { export interface NavigationBarRouteMapper { - Title: (route: Route, nav: Navigator, index: number, navState: NavState) => React.ReactElement; - LeftButton: (route: Route, nav: Navigator, index: number, navState: NavState) => React.ReactElement; - RightButton: (route: Route, nav: Navigator, index: number, navState: NavState) => React.ReactElement; + 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; } /** diff --git a/react-native/tsconfig.json b/react-native/tsconfig.json index 930ac3d811..b43ed5e7d5 100644 --- a/react-native/tsconfig.json +++ b/react-native/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -19,4 +22,4 @@ "test/index.tsx", "test/animated.tsx" ] -} \ No newline at end of file +} diff --git a/react-notification-system-redux/tsconfig.json b/react-notification-system-redux/tsconfig.json index a57c172ff2..b7ef269613 100644 --- a/react-notification-system-redux/tsconfig.json +++ b/react-notification-system-redux/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -18,4 +21,4 @@ "index.d.ts", "react-notification-system-redux-tests.tsx" ] -} +} \ No newline at end of file diff --git a/react-notification-system/tsconfig.json b/react-notification-system/tsconfig.json index 28758d30ae..88fa31eeb8 100644 --- a/react-notification-system/tsconfig.json +++ b/react-notification-system/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-onclickoutside/tsconfig.json b/react-onclickoutside/tsconfig.json index 69ecb2636f..07b04b8fee 100644 --- a/react-onclickoutside/tsconfig.json +++ b/react-onclickoutside/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/react-overlays/tsconfig.json b/react-overlays/tsconfig.json index 5bb576b098..65d976b3af 100644 --- a/react-overlays/tsconfig.json +++ b/react-overlays/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-paginate/tsconfig.json b/react-paginate/tsconfig.json index b60118ab3b..c7215760aa 100644 --- a/react-paginate/tsconfig.json +++ b/react-paginate/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-props-decorators/tsconfig.json b/react-props-decorators/tsconfig.json index 9d3326b2c1..9f4b3ee1d3 100644 --- a/react-props-decorators/tsconfig.json +++ b/react-props-decorators/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-recaptcha/tsconfig.json b/react-recaptcha/tsconfig.json index cdfdfaf376..97995bcee5 100644 --- a/react-recaptcha/tsconfig.json +++ b/react-recaptcha/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -18,4 +21,4 @@ "index.d.ts", "react-recaptcha-tests.tsx" ] -} +} \ No newline at end of file diff --git a/react-redux-i18n/tsconfig.json b/react-redux-i18n/tsconfig.json index 2d86cdbf66..7f0274cac8 100644 --- a/react-redux-i18n/tsconfig.json +++ b/react-redux-i18n/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/react-redux-toastr/tsconfig.json b/react-redux-toastr/tsconfig.json index bb83b66857..b4d5bbf8be 100644 --- a/react-redux-toastr/tsconfig.json +++ b/react-redux-toastr/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-redux/react-redux-tests.tsx b/react-redux/react-redux-tests.tsx index 8c552c8272..bbe84289ff 100644 --- a/react-redux/react-redux-tests.tsx +++ b/react-redux/react-redux-tests.tsx @@ -1,17 +1,9 @@ -/// -/// -/// -/// -/// - import { Component, ReactElement } from 'react'; import * as React from 'react'; import * as ReactDOM from 'react-dom'; -import { Router, RouterState } from 'react-router'; import { Store, Dispatch, bindActionCreators } from 'redux'; import { connect, Provider } from 'react-redux'; import objectAssign = require('object-assign'); -import * as History from 'history'; // // Quick Start @@ -107,8 +99,6 @@ ReactDOM.render(( // https://github.com/rackt/react-redux/blob/master/docs/api.md // declare var store: Store; -declare var routerState: RouterState; -declare var history: History.History; class MyRootComponent extends Component { } @@ -155,15 +145,6 @@ ReactDOM.render( // ); //}); - -//TODO: for React Router 1.0 -ReactDOM.render( - - {() => ...} - , - targetEl -); - // Inject just dispatch and don't listen to store connect()(TodoApp); diff --git a/react-redux/tsconfig.json b/react-redux/tsconfig.json index 687a8efab0..cca7c7e05c 100644 --- a/react-redux/tsconfig.json +++ b/react-redux/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-relay/tsconfig.json b/react-relay/tsconfig.json index 7607a38900..90680fbafc 100644 --- a/react-relay/tsconfig.json +++ b/react-relay/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-responsive/tsconfig.json b/react-responsive/tsconfig.json index c04b97712d..1495e72438 100644 --- a/react-responsive/tsconfig.json +++ b/react-responsive/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-router-bootstrap/tsconfig.json b/react-router-bootstrap/tsconfig.json index 6317ef7bef..7e111b1004 100644 --- a/react-router-bootstrap/tsconfig.json +++ b/react-router-bootstrap/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-router-redux/tsconfig.json b/react-router-redux/tsconfig.json index b2efdcc111..66c3e91f9b 100644 --- a/react-router-redux/tsconfig.json +++ b/react-router-redux/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -20,4 +23,4 @@ "noEmit": true, "forceConsistentCasingInFileNames": true } -} +} \ No newline at end of file diff --git a/react-router-redux/v3/tsconfig.json b/react-router-redux/v3/tsconfig.json index c2948e546c..ee406e1759 100644 --- a/react-router-redux/v3/tsconfig.json +++ b/react-router-redux/v3/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/react-router/index.d.ts.orig b/react-router/index.d.ts.orig new file mode 100644 index 0000000000..52227f4d95 --- /dev/null +++ b/react-router/index.d.ts.orig @@ -0,0 +1,109 @@ +<<<<<<< HEAD +// Type definitions for react-router 3.0 +======= +// Type definitions for react-router 2.0 +>>>>>>> upstream/master +// Project: https://github.com/rackt/react-router +// Definitions by: Sergey Buturlakin , Yuichi Murata , Václav Ostrožlík , Nathan Brown , Alex Wendland , Kostya Esmukov , Karol Janyst +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/* Replacement from old history definitions */ +export interface HistoryOptions { + getCurrentLocation?(): Location; + getUserConfirmation?(message: string, callback: (result: boolean) => void): void; + pushLocation?(nextLocation: Location): void; + replaceLocation?(nextLocation: Location): void; + go?(n: number): void; + keyLength?: number; +} + +export type CreateHistory = (options?: HistoryOptions) => T; +export type CreateHistoryEnhancer = (createHistory: CreateHistory) => CreateHistory; + +<<<<<<< HEAD +export { + Basename, + ChangeHook, + EnterHook, + InjectedRouter, + LeaveHook, + Location, + LocationDescriptor, + ParseQueryString, + RouteComponent, + RouteComponents, + RouteComponentProps, + RouteConfig, + RoutePattern, + RouterProps, + RouterState, + StringifyQuery, + Query +} from "react-router/lib/Router"; +export { LinkProps } from "react-router/lib/Link"; +export { IndexLinkProps } from "react-router/lib/IndexLink"; +export { RouteProps, PlainRoute } from "react-router/lib/Route"; +export { IndexRouteProps } from "react-router/lib/IndexRoute"; +export { RedirectProps } from "react-router/lib/Redirect"; +export { IndexRedirectProps } from "react-router/lib/IndexRedirect"; +======= +import * as React from 'react'; + +export const routerShape: React.Requireable; + +export const locationShape: React.Requireable; + +import Router from "./lib/Router"; +import Link from "./lib/Link"; +import IndexLink from "./lib/IndexLink"; +import IndexRedirect from "./lib/IndexRedirect"; +import IndexRoute from "./lib/IndexRoute"; +import Redirect from "./lib/Redirect"; +import Route from "./lib/Route"; +import * as History from "./lib/routerHistory"; +import Lifecycle from "./lib/Lifecycle"; +import RouteContext from "./lib/RouteContext"; +import browserHistory from "./lib/browserHistory"; +import hashHistory from "./lib/hashHistory"; +import useRoutes from "./lib/useRoutes"; +import { createRoutes } from "./lib/RouteUtils"; +import { formatPattern } from "./lib/PatternUtils"; +import RouterContext from "./lib/RouterContext"; +import PropTypes from "./lib/PropTypes"; +import match from "./lib/match"; +import useRouterHistory from "./lib/useRouterHistory"; +import createMemoryHistory from "./lib/createMemoryHistory"; +import withRouter from "./lib/withRouter"; +import applyRouterMiddleware from "./lib/applyRouterMiddleware"; + +// PlainRoute is defined in the API documented at: +// https://github.com/rackt/react-router/blob/master/docs/API.md +// but not included in any of the .../lib modules above. +export type PlainRoute = Router.PlainRoute; +>>>>>>> upstream/master + +/* components */ +export { default as Router } from "react-router/lib/Router"; +export { default as Link } from "react-router/lib/Link"; +export { default as IndexLink } from "react-router/lib/IndexLink"; +export { default as withRouter } from "react-router/lib/withRouter"; + +/* components (configuration) */ +export { default as IndexRedirect } from "react-router/lib/IndexRedirect"; +export { default as IndexRoute } from "react-router/lib/IndexRoute"; +export { default as Redirect } from "react-router/lib/Redirect"; +export { default as Route } from "react-router/lib/Route"; + +/* utils */ +export { createRoutes } from "react-router/lib/RouteUtils"; +export { default as RouterContext } from "react-router/lib/RouterContext"; +export { routerShape, locationShape } from "react-router/lib/PropTypes"; +export { default as match } from "react-router/lib/match"; +export { default as useRouterHistory } from "react-router/lib/useRouterHistory"; +export { formatPattern } from "react-router/lib/PatternUtils"; +export { default as applyRouterMiddleware } from "react-router/lib/applyRouterMiddleware"; + +/* histories */ +export { default as browserHistory } from "react-router/lib/browserHistory"; +export { default as hashHistory } from "react-router/lib/hashHistory"; +export { default as createMemoryHistory } from "react-router/lib/createMemoryHistory"; diff --git a/react-router/lib/Route.d.ts.orig b/react-router/lib/Route.d.ts.orig new file mode 100644 index 0000000000..c8a211517c --- /dev/null +++ b/react-router/lib/Route.d.ts.orig @@ -0,0 +1,49 @@ +import { ComponentClass, ClassAttributes } from "react"; +import { LocationState } from "history"; +import { + EnterHook, + ChangeHook, + LeaveHook, + RouteComponent, + RouteComponents, + RoutePattern, + RouterState +} from "react-router"; +import { IndexRouteProps } from "react-router/lib/IndexRoute"; + +export interface RouteProps extends IndexRouteProps { + path?: RoutePattern; +} + +type Route = ComponentClass; +declare const Route: Route; + +<<<<<<< HEAD +export default Route; + +type RouteCallback = (err: any, route: PlainRoute) => void; +type RoutesCallback = (err: any, routesArray: PlainRoute[]) => void; + +export interface PlainRoute extends RouteProps { + childRoutes?: PlainRoute[]; + getChildRoutes?(partialNextState: LocationState, callback: RoutesCallback): void; + indexRoute?: PlainRoute; + getIndexRoute?(partialNextState: LocationState, callback: RouteCallback): void; +} +======= + interface RouteProps extends React.Props { + path?: Router.RoutePattern; + component?: Router.RouteComponent; + components?: Router.RouteComponents; + getComponent?: (nextState: Router.RouterState, cb: (error: any, component?: Router.RouteComponent) => void) => void; + getComponents?: (nextState: Router.RouterState, cb: (error: any, components?: Router.RouteComponents) => void) => void; + onEnter?: Router.EnterHook; + onLeave?: Router.LeaveHook; + onChange?: Router.ChangeHook; + getIndexRoute?: (location: Location, cb: (error: any, indexRoute: Router.RouteConfig) => void) => void; + getChildRoutes?: (location: Location, cb: (error: any, childRoutes: Router.RouteConfig) => void) => void; + } + interface Route extends React.ComponentClass {} + interface RouteElement extends React.ReactElement {} +} +>>>>>>> upstream/master diff --git a/react-router/lib/Router.d.ts.orig b/react-router/lib/Router.d.ts.orig new file mode 100644 index 0000000000..8b77e41bdf --- /dev/null +++ b/react-router/lib/Router.d.ts.orig @@ -0,0 +1,213 @@ +import { Component, ComponentClass, ClassAttributes, ReactNode, StatelessComponent } from "react"; +import { + Action, + Hash, + History, + Href, + LocationKey, + LocationState, + Path, + Pathname, + Search +} from "history"; +import { PlainRoute } from "react-router"; + +/* Replacement from old history definitions */ +export type Basename = string; +export type Query = any; +export interface Params { + [key: string]: string; +} + +export type RoutePattern = string; +export type RouteComponent = ComponentClass | StatelessComponent; +export interface RouteComponents { + [name: string]: RouteComponent; +} +export type RouteConfig = ReactNode | PlainRoute | PlainRoute[]; + +export type ParseQueryString = (queryString: Search) => Query; +export type StringifyQuery = (queryObject: Query) => Search; + +type AnyFunction = (...args: any[]) => any; + +export type EnterHook = (nextState: RouterState, replace: RedirectFunction, callback?: AnyFunction) => any; +export type LeaveHook = (prevState: RouterState) => any; +export type ChangeHook = (prevState: RouterState, nextState: RouterState, replace: RedirectFunction, callback?: AnyFunction) => any; +export type RouteHook = (nextLocation?: Location) => any; + +<<<<<<< HEAD +export interface Location { + patname: Pathname; + search: Search; + query: Query; + state: LocationState; + action: Action; + key: LocationKey; +======= +// types based on https://github.com/rackt/react-router/blob/master/docs/Glossary.md + +declare namespace Router { + type RouteConfig = React.ReactNode | PlainRoute | PlainRoute[]; + type RoutePattern = string; + interface RouteComponents { [key: string]: RouteComponent; } + + type ParseQueryString = (queryString: QueryString) => Query; + type StringifyQuery = (queryObject: Query) => QueryString; + + type Component = React.ReactType; + type RouteComponent = Component; + + type EnterHook = (nextState: RouterState, replace: RedirectFunction, callback?: Function) => void; + type LeaveHook = () => void; + type ChangeHook = (prevState: RouterState, nextState: RouterState, replace: RedirectFunction, callback: Function) => void; + type RouteHook = (nextLocation?: Location) => any; + + interface Params { [param: string]: string; } + + type RouterListener = (error: Error, nextState: RouterState) => void; + + interface LocationDescriptor { + pathname?: Pathname; + query?: Query; + hash?: Href; + state?: HLocationState; + } + + interface RedirectFunction { + (location: LocationDescriptor): void; + /** + * @deprecated `replaceState(state, pathname, query) is deprecated; Use `replace(location)` with a location descriptor instead. http://tiny.cc/router-isActivedeprecated + */ + (state: HLocationState, pathname: Pathname | Path, query?: Query): void; + } + + interface RouterState { + location: Location; + routes: PlainRoute[]; + params: Params; + components: RouteComponent[]; + } + + interface RouterProps extends React.Props { + history?: History; + routes?: RouteConfig; // alias for children + createElement?: (component: RouteComponent, props: Object) => any; + onError?: (error: any) => any; + onUpdate?: () => any; + parseQueryString?: ParseQueryString; + stringifyQuery?: StringifyQuery; + basename?: string; + render?: (renderProps: React.Props<{}>) => RouterContext; + } + + interface PlainRoute { + path?: RoutePattern; + component?: RouteComponent; + components?: RouteComponents; + getComponent?: (location: Location, cb: (error: any, component?: RouteComponent) => void) => void; + getComponents?: (location: Location, cb: (error: any, components?: RouteComponents) => void) => void; + onEnter?: EnterHook; + onLeave?: LeaveHook; + indexRoute?: PlainRoute; + getIndexRoute?: (location: Location, cb: (error: any, indexRoute: RouteConfig) => void) => void; + childRoutes?: PlainRoute[]; + getChildRoutes?: (location: Location, cb: (error: any, childRoutes: RouteConfig) => void) => void; + } + + interface RouteComponentProps { + history?: History; + location?: Location; + params?: P; + route?: PlainRoute; + routeParams?: R; + routes?: PlainRoute[]; + children?: React.ReactElement; + } + + interface RouterOnContext extends History { + setRouteLeaveHook(route: PlainRoute, hook?: RouteHook): () => void; + isActive(pathOrLoc: Path | LocationDescriptor, indexOnly?: boolean): boolean; + } + + // Wrap a component using withRouter(Component) to provide a router object + // to the Component's props, allowing the Component to programmatically call + // push and other functions. + // + // https://github.com/reactjs/react-router/blob/v2.4.0/upgrade-guides/v2.4.0.md + + interface InjectedRouter { + push: (pathOrLoc: Path | LocationDescriptor) => void; + replace: (pathOrLoc: Path | LocationDescriptor) => void; + go: (n: number) => void; + goBack: () => void; + goForward: () => void; + setRouteLeaveHook(route: PlainRoute, callback: RouteHook): void; + createPath(path: History.Path, query?: History.Query): History.Path; + createHref(path: History.Path, query?: History.Query): History.Href; + isActive: (pathOrLoc: Path | LocationDescriptor, indexOnly?: boolean) => boolean; + } +>>>>>>> upstream/master +} + +export interface LocationDescriptorObject { + pathname?: Pathname; + query?: Query; + hash?: Hash; + state?: LocationState; +} + +export type LocationDescriptor = Path | LocationDescriptorObject; + +export interface RedirectFunction { + (location: LocationDescriptor): void; + (state: LocationState, pathname: Pathname | Path, query?: Query): void; +} + +export interface RouterState { + location: Location; + routes: PlainRoute[]; + params: Params; + components: RouteComponent[]; +} + +type LocationFunction = (location: LocationDescriptor) => void; +type GoFunction = (n: number) => void; +type NavigateFunction = () => void; +type ActiveFunction = (location: LocationDescriptor, indexOnly?: boolean) => boolean; +type LeaveHookFunction = (route: any, callback: RouteHook) => void; +type CreatePartFunction = (path: Path, query?: any) => Part; + +export interface InjectedRouter { + push: LocationFunction; + replace: LocationFunction; + go: GoFunction; + goBack: NavigateFunction; + goForward: NavigateFunction; + setRouteLeaveHook: LeaveHookFunction; + createPath: CreatePartFunction; + createHref: CreatePartFunction; + isActive: ActiveFunction; +} + +export interface RouteComponentProps { + location?: Location; + params?: P & R; + route?: PlainRoute; + router?: InjectedRouter; + routeParams?: R; +} + +export interface RouterProps extends ClassAttributes { + routes?: RouteConfig; + history?: History; + createElement?(component: RouteComponent, props: any): any; + onError?(error: any): any; + onUpdate?(): any; + render?(props: any): ReactNode; +} + +type Router = ComponentClass; +declare const Router: Router; + +export default Router; diff --git a/react-router/lib/useRouterHistory.d.ts.orig b/react-router/lib/useRouterHistory.d.ts.orig new file mode 100644 index 0000000000..01609c5a48 --- /dev/null +++ b/react-router/lib/useRouterHistory.d.ts.orig @@ -0,0 +1,10 @@ +import { History } from "history"; +import { CreateHistoryEnhancer } from "react-router"; + +<<<<<<< HEAD +declare const useRouterHistory: CreateHistoryEnhancer; + +export default useRouterHistory; +======= +export default function useRouterHistory(createHistory: CreateHistory): (options?: HistoryOptions) => History & HistoryQueries; +>>>>>>> upstream/master diff --git a/react-router/lib/withRouter.d.ts.orig b/react-router/lib/withRouter.d.ts.orig new file mode 100644 index 0000000000..ab51b2111e --- /dev/null +++ b/react-router/lib/withRouter.d.ts.orig @@ -0,0 +1,14 @@ +import { ComponentClass, StatelessComponent } from "react"; + +<<<<<<< HEAD +interface Options { + withRef?: boolean; +} + +type ComponentConstructor

= ComponentClass

| StatelessComponent

; + +export default function withRouter

(component: ComponentConstructor

, options?: Options): ComponentClass

; +======= +declare function withRouter | React.StatelessComponent | React.PureComponent>(component: C): C; +export default withRouter; +>>>>>>> upstream/master diff --git a/react-router/tsconfig.json b/react-router/tsconfig.json index 47b5b439bf..8e5f5d47b6 100644 --- a/react-router/tsconfig.json +++ b/react-router/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-router/tslint.json b/react-router/tslint.json new file mode 100644 index 0000000000..e050abdce9 --- /dev/null +++ b/react-router/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "../tslint.json", + "rules": { + "forbidden-types": false, + "no-empty-interface": false + } +} \ No newline at end of file diff --git a/react-router/v2/index.d.ts b/react-router/v2/index.d.ts index 59f33e1960..80b1b97154 100644 --- a/react-router/v2/index.d.ts +++ b/react-router/v2/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-router v2.0.0 +// Type definitions for react-router 2.0 // Project: https://github.com/rackt/react-router // Definitions by: Sergey Buturlakin , Yuichi Murata , Václav Ostrožlík , Nathan Brown , Alex Wendland , Kostya Esmukov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -9,9 +9,9 @@ export as namespace ReactRouter; import * as React from 'react'; -export const routerShape: React.Requireable +export const routerShape: React.Requireable; -export const locationShape: React.Requireable +export const locationShape: React.Requireable; import Router from "./lib/Router"; import Link from "./lib/Link"; diff --git a/react-router/v2/lib/Route.d.ts b/react-router/v2/lib/Route.d.ts index 2f5425b55a..7e4b548a21 100644 --- a/react-router/v2/lib/Route.d.ts +++ b/react-router/v2/lib/Route.d.ts @@ -12,8 +12,8 @@ declare namespace self { path?: Router.RoutePattern; component?: Router.RouteComponent; components?: Router.RouteComponents; - getComponent?: (nextState: Router.RouterState, cb: (error: any, component?: Router.RouteComponent) => void) => void - getComponents?: (nextState: Router.RouterState, cb: (error: any, components?: Router.RouteComponents) => void) => void + getComponent?: (nextState: Router.RouterState, cb: (error: any, component?: Router.RouteComponent) => void) => void; + getComponents?: (nextState: Router.RouterState, cb: (error: any, components?: Router.RouteComponents) => void) => void; onEnter?: Router.EnterHook; onLeave?: Router.LeaveHook; onChange?: Router.ChangeHook; @@ -22,4 +22,4 @@ declare namespace self { } interface Route extends React.ComponentClass {} interface RouteElement extends React.ReactElement {} -} \ No newline at end of file +} diff --git a/react-router/v2/lib/RouteContext.d.ts b/react-router/v2/lib/RouteContext.d.ts index c35ab92a80..19225af17e 100644 --- a/react-router/v2/lib/RouteContext.d.ts +++ b/react-router/v2/lib/RouteContext.d.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -declare const RouteContext: React.Mixin +declare const RouteContext: React.Mixin; export default RouteContext; diff --git a/react-router/v2/lib/Router.d.ts b/react-router/v2/lib/Router.d.ts index a9c5417f47..a7dff58369 100644 --- a/react-router/v2/lib/Router.d.ts +++ b/react-router/v2/lib/Router.d.ts @@ -16,7 +16,7 @@ export default Router; declare namespace Router { type RouteConfig = React.ReactNode | PlainRoute | PlainRoute[]; type RoutePattern = string; - type RouteComponents = { [key: string]: RouteComponent }; + interface RouteComponents { [key: string]: RouteComponent; } type ParseQueryString = (queryString: QueryString) => Query; type StringifyQuery = (queryObject: Query) => QueryString; @@ -29,15 +29,15 @@ declare namespace Router { type ChangeHook = (prevState: RouterState, nextState: RouterState, replace: RedirectFunction, callback: Function) => void; type RouteHook = (nextLocation?: Location) => any; - type Params = { [param: string]: string }; + interface Params { [param: string]: string; } type RouterListener = (error: Error, nextState: RouterState) => void; - type LocationDescriptor = { - pathname?: Pathname - query?: Query - hash?: Href - state?: HLocationState + interface LocationDescriptor { + pathname?: Pathname; + query?: Query; + hash?: Href; + state?: HLocationState; } interface RedirectFunction { @@ -103,14 +103,14 @@ declare namespace Router { // https://github.com/reactjs/react-router/blob/v2.4.0/upgrade-guides/v2.4.0.md interface InjectedRouter { - push: (pathOrLoc: Path | LocationDescriptor) => void - replace: (pathOrLoc: Path | LocationDescriptor) => void - go: (n: number) => void - goBack: () => void - goForward: () => void - setRouteLeaveHook(route: PlainRoute, callback: RouteHook): void - createPath(path: History.Path, query?: History.Query): History.Path - createHref(path: History.Path, query?: History.Query): History.Href - isActive: (pathOrLoc: Path | LocationDescriptor, indexOnly?: boolean) => boolean + push: (pathOrLoc: Path | LocationDescriptor) => void; + replace: (pathOrLoc: Path | LocationDescriptor) => void; + go: (n: number) => void; + goBack: () => void; + goForward: () => void; + setRouteLeaveHook(route: PlainRoute, callback: RouteHook): void; + createPath(path: History.Path, query?: History.Query): History.Path; + createHref(path: History.Path, query?: History.Query): History.Href; + isActive: (pathOrLoc: Path | LocationDescriptor, indexOnly?: boolean) => boolean; } } diff --git a/react-router/v2/lib/routerHistory.d.ts b/react-router/v2/lib/routerHistory.d.ts index 660af424b4..93558ff11f 100644 --- a/react-router/v2/lib/routerHistory.d.ts +++ b/react-router/v2/lib/routerHistory.d.ts @@ -4,11 +4,11 @@ import * as H from 'history'; export default History; export interface HistoryRoutes { - listen(listener: Router.RouterListener): Function - listenBeforeLeavingRoute(route: Router.PlainRoute, hook: Router.RouteHook): void - match(location: H.Location, callback: (error: any, nextState: Router.RouterState, nextLocation: H.Location) => void): void - isActive(pathname: H.Pathname, query?: H.Query, indexOnly?: boolean): boolean - setRouteLeaveHook(route: Router.PlainRoute, callback: Router.RouteHook): void + listen(listener: Router.RouterListener): Function; + listenBeforeLeavingRoute(route: Router.PlainRoute, hook: Router.RouteHook): void; + match(location: H.Location, callback: (error: any, nextState: Router.RouterState, nextLocation: H.Location) => void): void; + isActive(pathname: H.Pathname, query?: H.Query, indexOnly?: boolean): boolean; + setRouteLeaveHook(route: Router.PlainRoute, callback: Router.RouteHook): void; } export interface HistoryBase extends H.History { diff --git a/react-router/v2/lib/useRouterHistory.d.ts b/react-router/v2/lib/useRouterHistory.d.ts index d3e043b609..160375d2f0 100644 --- a/react-router/v2/lib/useRouterHistory.d.ts +++ b/react-router/v2/lib/useRouterHistory.d.ts @@ -1,7 +1,3 @@ import { History, HistoryOptions, HistoryQueries, CreateHistory } from 'history'; -interface CreateRouterHistory { - (options?: HistoryOptions): History & HistoryQueries; -} - -export default function useRouterHistory(createHistory: CreateHistory): CreateRouterHistory; +export default function useRouterHistory(createHistory: CreateHistory): (options?: HistoryOptions) => History & HistoryQueries; diff --git a/react-router/v2/lib/withRouter.d.ts b/react-router/v2/lib/withRouter.d.ts index f698d94fd0..71330bbb21 100644 --- a/react-router/v2/lib/withRouter.d.ts +++ b/react-router/v2/lib/withRouter.d.ts @@ -1,4 +1,4 @@ import * as React from 'react'; -declare function withRouter | React.StatelessComponent | React.PureComponent>(component: C): C +declare function withRouter | React.StatelessComponent | React.PureComponent>(component: C): C; export default withRouter; diff --git a/react-router/v2/tslint.json b/react-router/v2/tslint.json new file mode 100644 index 0000000000..d032145676 --- /dev/null +++ b/react-router/v2/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "../tslint.json", + "rules": { + "forbidden-types": false, + "no-empty-interface": false + } +} diff --git a/react-scroll/tsconfig.json b/react-scroll/tsconfig.json index 5361863f7c..82e3ee3f92 100644 --- a/react-scroll/tsconfig.json +++ b/react-scroll/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-scrollbar/tsconfig.json b/react-scrollbar/tsconfig.json index 5c4b016ffa..4e21a07f50 100644 --- a/react-scrollbar/tsconfig.json +++ b/react-scrollbar/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-select/tsconfig.json b/react-select/tsconfig.json index 148ed2b827..e5be4f2e31 100644 --- a/react-select/tsconfig.json +++ b/react-select/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/react-side-effect/tsconfig.json b/react-side-effect/tsconfig.json index 31fd9ad19a..e19ac20159 100644 --- a/react-side-effect/tsconfig.json +++ b/react-side-effect/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/react-sidebar/tsconfig.json b/react-sidebar/tsconfig.json index 05a003cefa..f9e7bafa03 100644 --- a/react-sidebar/tsconfig.json +++ b/react-sidebar/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -18,4 +21,4 @@ "index.d.ts", "react-sidebar-tests.tsx" ] -} +} \ No newline at end of file diff --git a/react-slick/tsconfig.json b/react-slick/tsconfig.json index 3ff5fb4a0b..295e4cd738 100644 --- a/react-slick/tsconfig.json +++ b/react-slick/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-smooth-scrollbar/tsconfig.json b/react-smooth-scrollbar/tsconfig.json index aef8e9bced..df9b7c5fa0 100644 --- a/react-smooth-scrollbar/tsconfig.json +++ b/react-smooth-scrollbar/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "jsx": "react", "noImplicitAny": true, "noImplicitThis": true, @@ -18,4 +21,4 @@ "index.d.ts", "react-smooth-scrollbar-tests.tsx" ] -} +} \ No newline at end of file diff --git a/react-sortable-hoc/tsconfig.json b/react-sortable-hoc/tsconfig.json index 932dd8e536..d41b62bf34 100644 --- a/react-sortable-hoc/tsconfig.json +++ b/react-sortable-hoc/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-spinkit/tsconfig.json b/react-spinkit/tsconfig.json index 31fa9ecafd..6fcb500bb5 100644 --- a/react-spinkit/tsconfig.json +++ b/react-spinkit/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-split-pane/tsconfig.json b/react-split-pane/tsconfig.json index 26b5a0f228..86e7eafcec 100644 --- a/react-split-pane/tsconfig.json +++ b/react-split-pane/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-swf/tsconfig.json b/react-swf/tsconfig.json index 30edbfb62d..495fff7922 100644 --- a/react-swf/tsconfig.json +++ b/react-swf/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-swipeable-views/tsconfig.json b/react-swipeable-views/tsconfig.json index 15d6541452..8c20b95d3c 100644 --- a/react-swipeable-views/tsconfig.json +++ b/react-swipeable-views/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-swipeable/tsconfig.json b/react-swipeable/tsconfig.json index 7a6a1ef2bc..6a45fa01e1 100644 --- a/react-swipeable/tsconfig.json +++ b/react-swipeable/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/react-syntax-highlighter/tsconfig.json b/react-syntax-highlighter/tsconfig.json index 1cb6500645..4d3e034d16 100644 --- a/react-syntax-highlighter/tsconfig.json +++ b/react-syntax-highlighter/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/react-tabs/tsconfig.json b/react-tabs/tsconfig.json index b32c5cc85a..4da6351bcf 100644 --- a/react-tabs/tsconfig.json +++ b/react-tabs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-tagcloud/tsconfig.json b/react-tagcloud/tsconfig.json index 876aa4aedc..938a3e1028 100644 --- a/react-tagcloud/tsconfig.json +++ b/react-tagcloud/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-tap-event-plugin/tsconfig.json b/react-tap-event-plugin/tsconfig.json index 31fb7d5436..9a2507463b 100644 --- a/react-tap-event-plugin/tsconfig.json +++ b/react-tap-event-plugin/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-test-renderer/tsconfig.json b/react-test-renderer/tsconfig.json index 790b3dde5c..0bff5e3068 100644 --- a/react-test-renderer/tsconfig.json +++ b/react-test-renderer/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/react-textarea-autosize/tsconfig.json b/react-textarea-autosize/tsconfig.json index 988e334b5c..3f37c05560 100644 --- a/react-textarea-autosize/tsconfig.json +++ b/react-textarea-autosize/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-toggle/tsconfig.json b/react-toggle/tsconfig.json index 60c82377b0..ad0214db82 100644 --- a/react-toggle/tsconfig.json +++ b/react-toggle/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -18,4 +21,4 @@ "index.d.ts", "react-toggle-tests.tsx" ] -} +} \ No newline at end of file diff --git a/react-user-tour/tsconfig.json b/react-user-tour/tsconfig.json index 3498c83c1b..694e401c2c 100644 --- a/react-user-tour/tsconfig.json +++ b/react-user-tour/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-virtualized/tsconfig.json b/react-virtualized/tsconfig.json index 629ed8a0f2..ac62cf83d8 100644 --- a/react-virtualized/tsconfig.json +++ b/react-virtualized/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react-widgets/tsconfig.json b/react-widgets/tsconfig.json index eb7e4d9225..96da2ce11e 100644 --- a/react-widgets/tsconfig.json +++ b/react-widgets/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/react/tsconfig.json b/react/tsconfig.json index f26f721c8c..18a4fb19fb 100644 --- a/react/tsconfig.json +++ b/react/tsconfig.json @@ -6,7 +6,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": true, diff --git a/reactcss/tsconfig.json b/reactcss/tsconfig.json index 6a0887a398..55d37b9317 100644 --- a/reactcss/tsconfig.json +++ b/reactcss/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/read/tsconfig.json b/read/tsconfig.json index 3cf5cb773b..634526583b 100644 --- a/read/tsconfig.json +++ b/read/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/readdir-stream/tsconfig.json b/readdir-stream/tsconfig.json index 5d09e1abd9..2a917b34a9 100644 --- a/readdir-stream/tsconfig.json +++ b/readdir-stream/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/readline-sync/tsconfig.json b/readline-sync/tsconfig.json index 144427ec3c..63e57a7ec0 100644 --- a/readline-sync/tsconfig.json +++ b/readline-sync/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "readline-sync-tests.ts" ] -} +} \ No newline at end of file diff --git a/realm/tsconfig.json b/realm/tsconfig.json index e0e174a507..0dc37a0163 100644 --- a/realm/tsconfig.json +++ b/realm/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/rebass/tsconfig.json b/rebass/tsconfig.json index 13ab6692d7..a1d0e53f4e 100644 --- a/rebass/tsconfig.json +++ b/rebass/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/recaptcha/tsconfig.json b/recaptcha/tsconfig.json index fdcd0294fb..b75f52a9f8 100644 --- a/recaptcha/tsconfig.json +++ b/recaptcha/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/recompose/tsconfig.json b/recompose/tsconfig.json index 3ddf0e418c..f457850be5 100644 --- a/recompose/tsconfig.json +++ b/recompose/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -12,7 +15,6 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, - "jsx": "react" }, "files": [ diff --git a/recursive-readdir/tsconfig.json b/recursive-readdir/tsconfig.json index a77857e7c6..9c9110dd5f 100644 --- a/recursive-readdir/tsconfig.json +++ b/recursive-readdir/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/redis-rate-limiter/tsconfig.json b/redis-rate-limiter/tsconfig.json index a930f2ec5a..c3258cf3d9 100644 --- a/redis-rate-limiter/tsconfig.json +++ b/redis-rate-limiter/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/redis-scripto/tsconfig.json b/redis-scripto/tsconfig.json index ef7aa8b922..28581baedc 100644 --- a/redis-scripto/tsconfig.json +++ b/redis-scripto/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/redis/tsconfig.json b/redis/tsconfig.json index 7e67aa58ca..68bf431633 100644 --- a/redis/tsconfig.json +++ b/redis/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/redlock/tsconfig.json b/redlock/tsconfig.json index b42e6f82f3..827a006b43 100644 --- a/redlock/tsconfig.json +++ b/redlock/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/redux-action-utils/tsconfig.json b/redux-action-utils/tsconfig.json index 130b9de606..f4251ee766 100644 --- a/redux-action-utils/tsconfig.json +++ b/redux-action-utils/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/redux-actions/tsconfig.json b/redux-actions/tsconfig.json index 5ab10790dc..56c720e972 100644 --- a/redux-actions/tsconfig.json +++ b/redux-actions/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/redux-batched-actions/tsconfig.json b/redux-batched-actions/tsconfig.json index bb2fc358f5..195278b1ea 100644 --- a/redux-batched-actions/tsconfig.json +++ b/redux-batched-actions/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/redux-bootstrap/tsconfig.json b/redux-bootstrap/tsconfig.json index 037ad9ef80..a5c0900ca4 100644 --- a/redux-bootstrap/tsconfig.json +++ b/redux-bootstrap/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/redux-debounced/tsconfig.json b/redux-debounced/tsconfig.json index dbb802427d..4b1878495f 100644 --- a/redux-debounced/tsconfig.json +++ b/redux-debounced/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/redux-devtools-dock-monitor/tsconfig.json b/redux-devtools-dock-monitor/tsconfig.json index fd91d53d21..cadbae24ba 100644 --- a/redux-devtools-dock-monitor/tsconfig.json +++ b/redux-devtools-dock-monitor/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/redux-devtools-log-monitor/tsconfig.json b/redux-devtools-log-monitor/tsconfig.json index 2e4cbd2b2d..6744123285 100644 --- a/redux-devtools-log-monitor/tsconfig.json +++ b/redux-devtools-log-monitor/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/redux-devtools/tsconfig.json b/redux-devtools/tsconfig.json index 119392f3ad..887dc97f89 100644 --- a/redux-devtools/tsconfig.json +++ b/redux-devtools/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/redux-form/tsconfig.json b/redux-form/tsconfig.json index 18cf4cf592..18300e561e 100644 --- a/redux-form/tsconfig.json +++ b/redux-form/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "experimentalDecorators": true, "noImplicitAny": true, "noImplicitReturns": true, @@ -20,4 +23,4 @@ "index.d.ts", "redux-form-tests.tsx" ] -} +} \ No newline at end of file diff --git a/redux-form/v4/tsconfig.json b/redux-form/v4/tsconfig.json index 6bad90e11b..26861a00e5 100644 --- a/redux-form/v4/tsconfig.json +++ b/redux-form/v4/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -11,11 +14,12 @@ ], "types": [], "paths": { - "redux-form": ["redux-form/v4"] + "redux-form": [ + "redux-form/v4" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true, - "jsx": "react" }, "files": [ diff --git a/redux-immutable-state-invariant/tsconfig.json b/redux-immutable-state-invariant/tsconfig.json index ef82ec743f..0ff12cf95e 100644 --- a/redux-immutable-state-invariant/tsconfig.json +++ b/redux-immutable-state-invariant/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/redux-immutable/tsconfig.json b/redux-immutable/tsconfig.json index 4a84343b29..d895744905 100644 --- a/redux-immutable/tsconfig.json +++ b/redux-immutable/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/redux-localstorage-debounce/tsconfig.json b/redux-localstorage-debounce/tsconfig.json index 8009e2a7ec..de9e528090 100644 --- a/redux-localstorage-debounce/tsconfig.json +++ b/redux-localstorage-debounce/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/redux-localstorage-filter/tsconfig.json b/redux-localstorage-filter/tsconfig.json index 93d6adc86b..ff32cb9e77 100644 --- a/redux-localstorage-filter/tsconfig.json +++ b/redux-localstorage-filter/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/redux-localstorage/tsconfig.json b/redux-localstorage/tsconfig.json index 476dd8e695..36c6c8274d 100644 --- a/redux-localstorage/tsconfig.json +++ b/redux-localstorage/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/redux-logger/tsconfig.json b/redux-logger/tsconfig.json index ae49c0a029..3aca2ed3f7 100644 --- a/redux-logger/tsconfig.json +++ b/redux-logger/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/redux-mock-store/tsconfig.json b/redux-mock-store/tsconfig.json index eb4e3ffce6..c8448e51d7 100644 --- a/redux-mock-store/tsconfig.json +++ b/redux-mock-store/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/redux-optimistic-ui/tsconfig.json b/redux-optimistic-ui/tsconfig.json index 5d5b7d6ab6..abd42681ee 100644 --- a/redux-optimistic-ui/tsconfig.json +++ b/redux-optimistic-ui/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/redux-persist-transform-compress/tsconfig.json b/redux-persist-transform-compress/tsconfig.json index 71e151e454..5e33f4960f 100644 --- a/redux-persist-transform-compress/tsconfig.json +++ b/redux-persist-transform-compress/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "redux-persist-transform-compress-tests.ts" ] -} +} \ No newline at end of file diff --git a/redux-persist-transform-encrypt/tsconfig.json b/redux-persist-transform-encrypt/tsconfig.json index 5e22bdb486..b0a989e85a 100644 --- a/redux-persist-transform-encrypt/tsconfig.json +++ b/redux-persist-transform-encrypt/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "redux-persist-transform-encrypt-tests.ts" ] -} +} \ No newline at end of file diff --git a/redux-persist-transform-filter/tsconfig.json b/redux-persist-transform-filter/tsconfig.json index 130c18b202..ac08736562 100644 --- a/redux-persist-transform-filter/tsconfig.json +++ b/redux-persist-transform-filter/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "redux-persist-transform-filter-tests.ts" ] -} +} \ No newline at end of file diff --git a/redux-persist/tsconfig.json b/redux-persist/tsconfig.json index ebe042eaec..53bbe4f198 100644 --- a/redux-persist/tsconfig.json +++ b/redux-persist/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -19,4 +21,4 @@ "storages.d.ts", "redux-persist-tests.ts" ] -} +} \ No newline at end of file diff --git a/redux-promise-middleware/tsconfig.json b/redux-promise-middleware/tsconfig.json index f9521873e3..0d4adaee3d 100644 --- a/redux-promise-middleware/tsconfig.json +++ b/redux-promise-middleware/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/redux-promise/tsconfig.json b/redux-promise/tsconfig.json index 8198408b7e..f17e52e096 100644 --- a/redux-promise/tsconfig.json +++ b/redux-promise/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/redux-recycle/tsconfig.json b/redux-recycle/tsconfig.json index b5c52bb0f8..60718a1fa3 100644 --- a/redux-recycle/tsconfig.json +++ b/redux-recycle/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "redux-recycle-tests.ts" ] -} +} \ No newline at end of file diff --git a/redux-router/tsconfig.json b/redux-router/tsconfig.json index 34637231c1..786008c59c 100644 --- a/redux-router/tsconfig.json +++ b/redux-router/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/redux-saga/tsconfig.json b/redux-saga/tsconfig.json index b7fc82b0c6..a844a73999 100644 --- a/redux-saga/tsconfig.json +++ b/redux-saga/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/redux-storage/tsconfig.json b/redux-storage/tsconfig.json index 2456bdfc0d..1a5c88a9bb 100644 --- a/redux-storage/tsconfig.json +++ b/redux-storage/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/redux-ui/tsconfig.json b/redux-ui/tsconfig.json index 85175cdab3..3449a58d93 100644 --- a/redux-ui/tsconfig.json +++ b/redux-ui/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/ref-array/tsconfig.json b/ref-array/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/ref-array/tsconfig.json +++ b/ref-array/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ref-struct/tsconfig.json b/ref-struct/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/ref-struct/tsconfig.json +++ b/ref-struct/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ref-union/tsconfig.json b/ref-union/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/ref-union/tsconfig.json +++ b/ref-union/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ref/tsconfig.json b/ref/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/ref/tsconfig.json +++ b/ref/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/reflect-metadata/tsconfig.json b/reflect-metadata/tsconfig.json index 3b32604d72..b30f6c6282 100644 --- a/reflect-metadata/tsconfig.json +++ b/reflect-metadata/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -12,7 +14,6 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, - "experimentalDecorators": true }, "files": [ diff --git a/reflux/tsconfig.json b/reflux/tsconfig.json index 5dc86e9680..dd4b46b6d9 100644 --- a/reflux/tsconfig.json +++ b/reflux/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/relateurl/tsconfig.json b/relateurl/tsconfig.json index 22fb084752..cde924b0b6 100644 --- a/relateurl/tsconfig.json +++ b/relateurl/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/remote-redux-devtools/tsconfig.json b/remote-redux-devtools/tsconfig.json index 2637f7e8ec..67d6cba7a8 100644 --- a/remote-redux-devtools/tsconfig.json +++ b/remote-redux-devtools/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/replace-ext/tsconfig.json b/replace-ext/tsconfig.json index 65b3dce735..3863e37348 100644 --- a/replace-ext/tsconfig.json +++ b/replace-ext/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/request-ip/tsconfig.json b/request-ip/tsconfig.json index 1d5a604074..79c2d23ce6 100644 --- a/request-ip/tsconfig.json +++ b/request-ip/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/request-promise-native/tsconfig.json b/request-promise-native/tsconfig.json index 9648a4a80c..292c166bcf 100644 --- a/request-promise-native/tsconfig.json +++ b/request-promise-native/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/request-promise/tsconfig.json b/request-promise/tsconfig.json index 98af977b14..fcc424c4d5 100644 --- a/request-promise/tsconfig.json +++ b/request-promise/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/request/tsconfig.json b/request/tsconfig.json index a8630cab94..193c4f341a 100644 --- a/request/tsconfig.json +++ b/request/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/requirejs-domready/tsconfig.json b/requirejs-domready/tsconfig.json index 5d6731cbd1..e3dc1ae28b 100644 --- a/requirejs-domready/tsconfig.json +++ b/requirejs-domready/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/requirejs/tsconfig.json b/requirejs/tsconfig.json index 6d8c38c0c9..dc39908c79 100644 --- a/requirejs/tsconfig.json +++ b/requirejs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/reselect/tsconfig.json b/reselect/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/reselect/tsconfig.json +++ b/reselect/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/resemblejs/tsconfig.json b/resemblejs/tsconfig.json index e7457dec45..3066fdb276 100644 --- a/resemblejs/tsconfig.json +++ b/resemblejs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/resolve-from/tsconfig.json b/resolve-from/tsconfig.json index 2a6b97c07d..566411d37b 100644 --- a/resolve-from/tsconfig.json +++ b/resolve-from/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/resolve/tsconfig.json b/resolve/tsconfig.json index 251e98c38a..c2256b46eb 100644 --- a/resolve/tsconfig.json +++ b/resolve/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/response-time/tsconfig.json b/response-time/tsconfig.json index 3e1396ad37..7bd3a13a25 100644 --- a/response-time/tsconfig.json +++ b/response-time/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rest-io/tsconfig.json b/rest-io/tsconfig.json index 80885b8c43..80bae18ef5 100644 --- a/rest-io/tsconfig.json +++ b/rest-io/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rest/tsconfig.json b/rest/tsconfig.json index 1079eaf31b..656d3f1de0 100644 --- a/rest/tsconfig.json +++ b/rest/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/restangular/tsconfig.json b/restangular/tsconfig.json index 6b0847ff52..df878fb04c 100644 --- a/restangular/tsconfig.json +++ b/restangular/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/restful.js/tsconfig.json b/restful.js/tsconfig.json index 174b6ff90b..2a1f15e359 100644 --- a/restful.js/tsconfig.json +++ b/restful.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/restify-plugins/tsconfig.json b/restify-plugins/tsconfig.json index d4bfaff53b..c6b226b64b 100644 --- a/restify-plugins/tsconfig.json +++ b/restify-plugins/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "restify-plugins-tests.ts" ] -} +} \ No newline at end of file diff --git a/restify/index.d.ts b/restify/index.d.ts index 40a6938127..f53aa0eba9 100644 --- a/restify/index.d.ts +++ b/restify/index.d.ts @@ -380,6 +380,15 @@ interface Router { * @returns {String} the name of the deleted route (or false if it was not matched) */ unmount: (name: string) => string | boolean; + + /** + * finds the route for a given request and response. + * @param {Request} req the request object + * @param {Response} res the response object + * @param {Function} callback operation callback + * @returns {undefined} + */ + find: (req: Request, res: Response, callback: (err: Error, route: Route) => void) => void; } interface Server extends http.Server { diff --git a/restify/tsconfig.json b/restify/tsconfig.json index 053df8263b..4c145ff900 100644 --- a/restify/tsconfig.json +++ b/restify/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/restler/tsconfig.json b/restler/tsconfig.json index 0a94b8208c..907305699c 100644 --- a/restler/tsconfig.json +++ b/restler/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/resumablejs/tsconfig.json b/resumablejs/tsconfig.json index fc865fb7a0..a3d0c254f2 100644 --- a/resumablejs/tsconfig.json +++ b/resumablejs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rethinkdb/tsconfig.json b/rethinkdb/tsconfig.json index fa347b3438..02a4846f80 100644 --- a/rethinkdb/tsconfig.json +++ b/rethinkdb/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/revalidator/tsconfig.json b/revalidator/tsconfig.json index 9be8a52770..448d00d24e 100644 --- a/revalidator/tsconfig.json +++ b/revalidator/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/reveal/tsconfig.json b/reveal/tsconfig.json index e2b4d91709..22ce8167e0 100644 --- a/reveal/tsconfig.json +++ b/reveal/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rewire/tsconfig.json b/rewire/tsconfig.json index 78dd02117c..5e4c5549b4 100644 --- a/rewire/tsconfig.json +++ b/rewire/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rickshaw/tsconfig.json b/rickshaw/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/rickshaw/tsconfig.json +++ b/rickshaw/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rimraf/tsconfig.json b/rimraf/tsconfig.json index 151970021d..12a5f5d98f 100644 --- a/rimraf/tsconfig.json +++ b/rimraf/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/riot-api-nodejs/tsconfig.json b/riot-api-nodejs/tsconfig.json index 5ed8ca8f40..d86f96b3d3 100644 --- a/riot-api-nodejs/tsconfig.json +++ b/riot-api-nodejs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/riot-games-api/tsconfig.json b/riot-games-api/tsconfig.json index 7e042bd935..3058dbd249 100644 --- a/riot-games-api/tsconfig.json +++ b/riot-games-api/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/riot/tsconfig.json b/riot/tsconfig.json index fab1920ac1..468eb867ca 100644 --- a/riot/tsconfig.json +++ b/riot/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/riotcontrol/tsconfig.json b/riotcontrol/tsconfig.json index 9d65b39436..e39e995419 100644 --- a/riotcontrol/tsconfig.json +++ b/riotcontrol/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/riotjs/tsconfig.json b/riotjs/tsconfig.json index 1fc1ec7696..1a4f9346d9 100644 --- a/riotjs/tsconfig.json +++ b/riotjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rison/tsconfig.json b/rison/tsconfig.json index 534bf03174..c06f280e25 100644 --- a/rison/tsconfig.json +++ b/rison/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rivets/tsconfig.json b/rivets/tsconfig.json index 351447edd5..084584503e 100644 --- a/rivets/tsconfig.json +++ b/rivets/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/rosie/tsconfig.json b/rosie/tsconfig.json index de7b0b86c2..b467a1513b 100644 --- a/rosie/tsconfig.json +++ b/rosie/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/roslib/tsconfig.json b/roslib/tsconfig.json index 18ad669040..04af9e15a2 100644 --- a/roslib/tsconfig.json +++ b/roslib/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/route-recognizer/tsconfig.json b/route-recognizer/tsconfig.json index d2725f29a5..729884991a 100644 --- a/route-recognizer/tsconfig.json +++ b/route-recognizer/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/router5/tsconfig.json b/router5/tsconfig.json index e7088912f5..37c1347cad 100644 --- a/router5/tsconfig.json +++ b/router5/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/routie/tsconfig.json b/routie/tsconfig.json index cdd7d2873c..5937ebbe56 100644 --- a/routie/tsconfig.json +++ b/routie/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/royalslider/tsconfig.json b/royalslider/tsconfig.json index f49b409af2..b51a2aee85 100644 --- a/royalslider/tsconfig.json +++ b/royalslider/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rpio/tsconfig.json b/rpio/tsconfig.json index 60b633113a..2b40991af3 100644 --- a/rpio/tsconfig.json +++ b/rpio/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rrule/index.d.ts b/rrule/index.d.ts index 436af1c2cf..b09d47ff2a 100644 --- a/rrule/index.d.ts +++ b/rrule/index.d.ts @@ -1,10 +1,20 @@ -// Type definitions for rrule 2.1.0 +// Type definitions for rrule 2.1 // Project: https://github.com/jkbrzt/rrule // Definitions by: James Bracy // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare module 'rrule' { - export = RRule; +export as namespace RRule; + +/** + * Use `import rrule = require("rrule")` for AMD and `import { RRule } from "rrule"` for CommonJS loading. + */ +export = RRule; + +// For CommonJS it must be imported as `require("rrule").RRule`. +import RRuleAlias = RRule; +declare module "rrule" { + export type RRule = RRuleAlias; + export const RRule: typeof RRuleAlias; } declare namespace RRule { @@ -17,7 +27,7 @@ declare namespace RRule { freq: RRule.Frequency; dtstart?: Date; interval?: number; - wkst?: number | Weekday + wkst?: number | Weekday; count?: number; until?: Date; bysetpos?: number | number[]; @@ -25,7 +35,7 @@ declare namespace RRule { bymonthday?: number | number[]; byyearday?: number | number[]; byweekno?: number | number[]; - byweekday?: Weekday | Weekday[] | number | number[]; + byweekday?: Weekday | Weekday[] | number | number[]; byhour?: number | number[]; byminute?: number | number[]; bysecond?: number | number[]; diff --git a/rrule/test/commonJs.ts b/rrule/test/commonJs.ts new file mode 100644 index 0000000000..e6a2c86dac --- /dev/null +++ b/rrule/test/commonJs.ts @@ -0,0 +1,2 @@ +import { RRule } from "rrule"; +let rule: RRule = new RRule({ freq: RRule.WEEKLY }); diff --git a/rrule/test/global.ts b/rrule/test/global.ts new file mode 100644 index 0000000000..869d407e98 --- /dev/null +++ b/rrule/test/global.ts @@ -0,0 +1 @@ +let rule: RRule = new RRule({ freq: RRule.WEEKLY }); diff --git a/rrule/rrule-tests.ts b/rrule/test/rrule.ts similarity index 97% rename from rrule/rrule-tests.ts rename to rrule/test/rrule.ts index 64cfe72282..733a8546db 100644 --- a/rrule/rrule-tests.ts +++ b/rrule/test/rrule.ts @@ -1,4 +1,4 @@ -import * as RRule from 'rrule'; +import RRule = require('rrule'); // Create a rule: let rule: RRule = new RRule({ diff --git a/rrule/tsconfig.json b/rrule/tsconfig.json index 15b5cb19f9..473e6dcbaf 100644 --- a/rrule/tsconfig.json +++ b/rrule/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -15,6 +17,8 @@ }, "files": [ "index.d.ts", - "rrule-tests.ts" + "test/rrule.ts", + "test/commonJs.ts", + "test/global.ts" ] } \ No newline at end of file diff --git a/rrule/tslint.json b/rrule/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/rrule/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file diff --git a/rsmq-worker/tsconfig.json b/rsmq-worker/tsconfig.json index 3de02b8c69..3b36947454 100644 --- a/rsmq-worker/tsconfig.json +++ b/rsmq-worker/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rsmq/tsconfig.json b/rsmq/tsconfig.json index 30f21b967c..40a5e2470b 100644 --- a/rsmq/tsconfig.json +++ b/rsmq/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rss/tsconfig.json b/rss/tsconfig.json index 8d1493fd1a..00d3dca5b6 100644 --- a/rss/tsconfig.json +++ b/rss/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rsync/tsconfig.json b/rsync/tsconfig.json index 6727bc7470..85110bf487 100644 --- a/rsync/tsconfig.json +++ b/rsync/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rtree/tsconfig.json b/rtree/tsconfig.json index 2d812bd741..f794055b38 100644 --- a/rtree/tsconfig.json +++ b/rtree/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/run-sequence/tsconfig.json b/run-sequence/tsconfig.json index 4825c7825a..b03e01e277 100644 --- a/run-sequence/tsconfig.json +++ b/run-sequence/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rx-angular/tsconfig.json b/rx-angular/tsconfig.json index 084109bfb3..a2944ae540 100644 --- a/rx-angular/tsconfig.json +++ b/rx-angular/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/rx-core-binding/tsconfig.json b/rx-core-binding/tsconfig.json index 87eb6217d4..3bc13b0278 100644 --- a/rx-core-binding/tsconfig.json +++ b/rx-core-binding/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -16,4 +18,4 @@ "files": [ "index.d.ts" ] -} +} \ No newline at end of file diff --git a/rx-core/tsconfig.json b/rx-core/tsconfig.json index 87eb6217d4..3bc13b0278 100644 --- a/rx-core/tsconfig.json +++ b/rx-core/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -16,4 +18,4 @@ "files": [ "index.d.ts" ] -} +} \ No newline at end of file diff --git a/rx-dom/tsconfig.json b/rx-dom/tsconfig.json index 71cce2646b..3ea51547a2 100644 --- a/rx-dom/tsconfig.json +++ b/rx-dom/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rx-jquery/tsconfig.json b/rx-jquery/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/rx-jquery/tsconfig.json +++ b/rx-jquery/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rx-lite-aggregates/tsconfig.json b/rx-lite-aggregates/tsconfig.json index 87eb6217d4..3bc13b0278 100644 --- a/rx-lite-aggregates/tsconfig.json +++ b/rx-lite-aggregates/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -16,4 +18,4 @@ "files": [ "index.d.ts" ] -} +} \ No newline at end of file diff --git a/rx-lite-async/tsconfig.json b/rx-lite-async/tsconfig.json index 24c1c4d4c3..2ea6c2c382 100644 --- a/rx-lite-async/tsconfig.json +++ b/rx-lite-async/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "rx-lite-async-tests.ts" ] -} +} \ No newline at end of file diff --git a/rx-lite-backpressure/tsconfig.json b/rx-lite-backpressure/tsconfig.json index 312408129e..a5e1bd214e 100644 --- a/rx-lite-backpressure/tsconfig.json +++ b/rx-lite-backpressure/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "rx-lite-backpressure-tests.ts" ] -} +} \ No newline at end of file diff --git a/rx-lite-coincidence/tsconfig.json b/rx-lite-coincidence/tsconfig.json index 87eb6217d4..3bc13b0278 100644 --- a/rx-lite-coincidence/tsconfig.json +++ b/rx-lite-coincidence/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -16,4 +18,4 @@ "files": [ "index.d.ts" ] -} +} \ No newline at end of file diff --git a/rx-lite-experimental/tsconfig.json b/rx-lite-experimental/tsconfig.json index 87eb6217d4..3bc13b0278 100644 --- a/rx-lite-experimental/tsconfig.json +++ b/rx-lite-experimental/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -16,4 +18,4 @@ "files": [ "index.d.ts" ] -} +} \ No newline at end of file diff --git a/rx-lite-joinpatterns/tsconfig.json b/rx-lite-joinpatterns/tsconfig.json index 87eb6217d4..3bc13b0278 100644 --- a/rx-lite-joinpatterns/tsconfig.json +++ b/rx-lite-joinpatterns/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -16,4 +18,4 @@ "files": [ "index.d.ts" ] -} +} \ No newline at end of file diff --git a/rx-lite-testing/tsconfig.json b/rx-lite-testing/tsconfig.json index 87eb6217d4..3bc13b0278 100644 --- a/rx-lite-testing/tsconfig.json +++ b/rx-lite-testing/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -16,4 +18,4 @@ "files": [ "index.d.ts" ] -} +} \ No newline at end of file diff --git a/rx-lite-time/tsconfig.json b/rx-lite-time/tsconfig.json index 87eb6217d4..3bc13b0278 100644 --- a/rx-lite-time/tsconfig.json +++ b/rx-lite-time/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -16,4 +18,4 @@ "files": [ "index.d.ts" ] -} +} \ No newline at end of file diff --git a/rx-lite-virtualtime/tsconfig.json b/rx-lite-virtualtime/tsconfig.json index 87eb6217d4..3bc13b0278 100644 --- a/rx-lite-virtualtime/tsconfig.json +++ b/rx-lite-virtualtime/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -16,4 +18,4 @@ "files": [ "index.d.ts" ] -} +} \ No newline at end of file diff --git a/rx-lite/tsconfig.json b/rx-lite/tsconfig.json index 94b69bfab2..dcde9b5ed9 100644 --- a/rx-lite/tsconfig.json +++ b/rx-lite/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "rx-lite-tests.ts" ] -} +} \ No newline at end of file diff --git a/rx-node/tsconfig.json b/rx-node/tsconfig.json index 83aeccd5c8..ec43f1a7c6 100644 --- a/rx-node/tsconfig.json +++ b/rx-node/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rx.wamp/tsconfig.json b/rx.wamp/tsconfig.json index aaff5cc1e1..aa65ec323d 100644 --- a/rx.wamp/tsconfig.json +++ b/rx.wamp/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/rx/tsconfig.json b/rx/tsconfig.json index 87eb6217d4..3bc13b0278 100644 --- a/rx/tsconfig.json +++ b/rx/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -16,4 +18,4 @@ "files": [ "index.d.ts" ] -} +} \ No newline at end of file diff --git a/s3-upload-stream/tsconfig.json b/s3-upload-stream/tsconfig.json index 06aa4900ed..359cf6e23c 100644 --- a/s3-upload-stream/tsconfig.json +++ b/s3-upload-stream/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/s3-uploader/tsconfig.json b/s3-uploader/tsconfig.json index 8c60c4cb48..a3670e62d2 100644 --- a/s3-uploader/tsconfig.json +++ b/s3-uploader/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/s3rver/tsconfig.json b/s3rver/tsconfig.json index ec11bcd93b..734123d95e 100644 --- a/s3rver/tsconfig.json +++ b/s3rver/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/safari-extension-content/tsconfig.json b/safari-extension-content/tsconfig.json index 565cd1aac9..f3d859aef3 100644 --- a/safari-extension-content/tsconfig.json +++ b/safari-extension-content/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/safari-extension/tsconfig.json b/safari-extension/tsconfig.json index f48a7d219d..fa776ab3fb 100644 --- a/safari-extension/tsconfig.json +++ b/safari-extension/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/safe-regex/tsconfig.json b/safe-regex/tsconfig.json index ff598703d8..eb2e49ef69 100644 --- a/safe-regex/tsconfig.json +++ b/safe-regex/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "safe-regex-tests.ts" ] -} +} \ No newline at end of file diff --git a/sails.io.js/tsconfig.json b/sails.io.js/tsconfig.json index ed291f18e0..3265cc0d4f 100644 --- a/sails.io.js/tsconfig.json +++ b/sails.io.js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": true, diff --git a/samchon-collection/tsconfig.json b/samchon-collection/tsconfig.json index 626bb63e85..9fb0b1dd91 100644 --- a/samchon-collection/tsconfig.json +++ b/samchon-collection/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/samchon-framework/tsconfig.json b/samchon-framework/tsconfig.json index 67c8325e0b..3476386226 100644 --- a/samchon-framework/tsconfig.json +++ b/samchon-framework/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/samchon-library/tsconfig.json b/samchon-library/tsconfig.json index 828e95324b..3478991a10 100644 --- a/samchon-library/tsconfig.json +++ b/samchon-library/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/saml2-js/tsconfig.json b/saml2-js/tsconfig.json index 43e7cbc97b..278664ca4d 100644 --- a/saml2-js/tsconfig.json +++ b/saml2-js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/samlp/tsconfig.json b/samlp/tsconfig.json index 66b01a26b0..8d750b18e1 100644 --- a/samlp/tsconfig.json +++ b/samlp/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sammy/tsconfig.json b/sammy/tsconfig.json index 15b4050f9e..263c872869 100644 --- a/sammy/tsconfig.json +++ b/sammy/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/sandboxed-module/tsconfig.json b/sandboxed-module/tsconfig.json index 4163943bdd..6e26ababc5 100644 --- a/sandboxed-module/tsconfig.json +++ b/sandboxed-module/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sanitize-filename/tsconfig.json b/sanitize-filename/tsconfig.json index d9a2e283d2..09d90e9513 100644 --- a/sanitize-filename/tsconfig.json +++ b/sanitize-filename/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sanitize-html/tsconfig.json b/sanitize-html/tsconfig.json index d0140c02cf..a3303b550f 100644 --- a/sanitize-html/tsconfig.json +++ b/sanitize-html/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sanitizer/tsconfig.json b/sanitizer/tsconfig.json index 64fcfe677b..ebcff7fd3b 100644 --- a/sanitizer/tsconfig.json +++ b/sanitizer/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sass-graph/tsconfig.json b/sass-graph/tsconfig.json index 9beea5db46..3e858101f3 100644 --- a/sass-graph/tsconfig.json +++ b/sass-graph/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/sat/tsconfig.json b/sat/tsconfig.json index af82c57dfe..202364b603 100644 --- a/sat/tsconfig.json +++ b/sat/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/satnav/tsconfig.json b/satnav/tsconfig.json index 772face0ec..bc37d4d061 100644 --- a/satnav/tsconfig.json +++ b/satnav/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sax/tsconfig.json b/sax/tsconfig.json index 8b54b11066..16ab3820c4 100644 --- a/sax/tsconfig.json +++ b/sax/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/scalike/tsconfig.json b/scalike/tsconfig.json index 9554b2227a..0496ce0e29 100644 --- a/scalike/tsconfig.json +++ b/scalike/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/screenfull/tsconfig.json b/screenfull/tsconfig.json index df49dd77f2..a914bb689f 100644 --- a/screenfull/tsconfig.json +++ b/screenfull/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/scriptjs/tsconfig.json b/scriptjs/tsconfig.json index fc87385938..a049745b83 100644 --- a/scriptjs/tsconfig.json +++ b/scriptjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/scripts/delete-tscparams.ts b/scripts/delete-tscparams.ts deleted file mode 100644 index 49bfef899c..0000000000 --- a/scripts/delete-tscparams.ts +++ /dev/null @@ -1,40 +0,0 @@ -/// - -import * as fs from 'fs'; -import * as path from 'path'; - -const home = path.join(__dirname, '..'); - -function forEachTypingDir(callback: (fullPath: string, dirName: string) => void) { - fs.readdir(home, (err, dirs) => { - if (err) throw err; - for (const dir of dirs) { - const fullPath = path.join(home, dir); - fs.lstat(fullPath, (err, stats) => { - if (err) throw err; - if (stats.isDirectory()) { - callback(fullPath, dir); - } - }); - } - }); -} - -forEachTypingDir(typingPath => { - fs.readdir(typingPath, (err, files) => { - if(err) throw err; - for(const file of files) { - if (/tscparams$/.test(file)) { - const fullPath = path.join(typingPath, file); - - fs.readFile(fullPath, 'utf-8', (err, paramText) => { - if(err) throw err; - - if (paramText.length <= 2) { - fs.unlink(fullPath); - } - }); - } - } - }); -}); diff --git a/scripts/fix-reference-comments.ts b/scripts/fix-reference-comments.ts deleted file mode 100644 index ca2a18238b..0000000000 --- a/scripts/fix-reference-comments.ts +++ /dev/null @@ -1,50 +0,0 @@ -/// - -import * as fs from 'fs'; -import * as path from 'path'; - -const home = path.join(__dirname, '..'); - -function forEachTypingDir(callback: (fullPath: string, dirName: string) => void) { - fs.readdir(home, (err, dirs) => { - if (err) throw err; - for (const dir of dirs) { - const fullPath = path.join(home, dir); - fs.lstat(fullPath, (err, stats) => { - if (err) throw err; - if (stats.isDirectory()) { - callback(fullPath, dir); - } - }); - } - }); -} - -const referenceRegex = /^\/\/\/\s?\(\s*)$/gm; - -forEachTypingDir(typingPath => { - fs.readdir(typingPath, (err, files) => { - if (err) throw err; - for (const file of files) { - if (/\.ts(x?)$/.test(file)) { - const fullPath = path.join(typingPath, file); - - console.log('Read ' + fullPath); - let fileContent = fs.readFileSync(fullPath, 'utf-8'); - let match = referenceRegex.exec(fileContent); - while(match !== null) { - const referand = match[1]; - const referandFullPath = path.join(path.dirname(fullPath), referand); - if (!fs.existsSync(referandFullPath)) { - console.log(`${fullPath} references missing file ${referandFullPath}`); - fileContent = fileContent.replace(match[0], ''); - fs.writeFileSync(fullPath, fileContent, 'utf-8'); - } - - match = referenceRegex.exec(fileContent); - - } - } - } - }); -}); diff --git a/scripts/generate-tsconfigs.ts b/scripts/generate-tsconfigs.ts index c153f4d6dd..b72144bf40 100644 --- a/scripts/generate-tsconfigs.ts +++ b/scripts/generate-tsconfigs.ts @@ -1,4 +1,4 @@ -// Usage: ts-node generate-tsconfigs +// Usage: ts-node generate-tsconfigs.ts /// @@ -11,17 +11,31 @@ function repeat(s: string, count: number) { const home = path.join(__dirname, '..'); -const dirs = fs.readdirSync(home).filter(d => !(d.startsWith(".") || d === "node_modules" || d === "scripts")); -for (const dir of dirs.map(d => path.join(home, d))) { +for (const dirName of fs.readdirSync(home)) { + if (dirName.startsWith(".") || dirName === "node_modules" || dirName === "scripts") { + continue; + } + + const dir = path.join(home, dirName); const stats = fs.lstatSync(dir); if (stats.isDirectory()) { - const target = path.join(dir, 'tsconfig.json'); - let json = JSON.parse(fs.readFileSync(target, 'utf-8')); - json = fix(json); - fs.writeFileSync(target, JSON.stringify(json, undefined, 4), "utf-8"); + fixTsconfig(dir); + // Also do it for old versions + for (const subdir of fs.readdirSync(dir)) { + if (/^v\d+$/.test(subdir)) { + fixTsconfig(path.join(dir, subdir)); + } + } } } +function fixTsconfig(dir: string): void { + const target = path.join(dir, 'tsconfig.json'); + let json = JSON.parse(fs.readFileSync(target, 'utf-8')); + json = fix(json); + fs.writeFileSync(target, JSON.stringify(json, undefined, 4), "utf-8"); +} + function fix(config: any): any { const out: any = {}; for (const key in config) { @@ -38,9 +52,7 @@ function fixCompilerOptions(config: any): any { const out: any = {}; for (const key in config) { out[key] = config[key]; - if (key === "noImplicitAny") { - out.noImplicitThis = true; - } + // Do something interesting here } return out; } diff --git a/scripts/new-package.ts b/scripts/new-package.ts index db6192f248..6e9384c896 100644 --- a/scripts/new-package.ts +++ b/scripts/new-package.ts @@ -79,7 +79,7 @@ function getTSConfig() { return { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": ["es6"], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/scripts/rename-entry-points.ts b/scripts/rename-entry-points.ts deleted file mode 100644 index 14fce05ce3..0000000000 --- a/scripts/rename-entry-points.ts +++ /dev/null @@ -1,70 +0,0 @@ -/// - -import * as fs from 'fs'; -import * as path from 'path'; - -function repeat(s: string, count: number) { - return Array(count + 1).join(s); -} - -function checkDir(home: string, count: number) { - fs.readdir(home, (err, dirs) => { - if (err) throw err; - - for (const dir of dirs.map(d => path.join(home, d))) { - fs.lstat(dir, (err, stats) => { - if(dir.indexOf('.git') > 0) return; - - if (err) throw err; - if (stats.isDirectory()) { - checkDir(dir, count + 1); - fs.readdir(dir, (err, files) => { - if (err) throw err; - const target = path.join(dir, 'tsconfig.json'); - fs.exists(target, exists => { - if (exists) { - const old = JSON.parse(fs.readFileSync(target, 'utf-8')); - - let entryPoint: string; - let definitionFiles = files.filter(f => (f.indexOf('.d.ts') > 0)); - if (definitionFiles.length === 1) { - entryPoint = definitionFiles[0]; - } else if(fs.existsSync(path.join(dir, 'index.d.ts'))) { - entryPoint = 'index.d.ts'; - } else { - entryPoint = path.basename(dir) + '.d.ts'; - } - - if (!fs.existsSync(path.join(dir, entryPoint))) { - console.log('No file ' + entryPoint + ' exists in ' + dir + ' so deleting it'); - fs.unlink(target); - return; - } - - let testFile: string | undefined = path.join(dir, path.basename(dir) + '-tests.ts'); - if (!fs.existsSync(testFile)) { - let onlyTest = files.filter(f => f.toLowerCase().indexOf('-tests.ts') > 0)[0]; - if (onlyTest) { - testFile = path.join(dir, onlyTest); - } else { - testFile = undefined; - } - } - if (testFile) { - old['files'] = ['index.d.ts', path.basename(testFile)]; - } else { - old['files'] = ['index.d.ts']; - } - - fs.writeFileSync(target, JSON.stringify(old, undefined, 4)); - console.log('Write to ' + target); - } - }); - }); - } - }); - } - }); -} - -checkDir(path.join(__dirname, '..'), 1); diff --git a/scripts/rename-proper-modules.ts b/scripts/rename-proper-modules.ts deleted file mode 100644 index ae5179e401..0000000000 --- a/scripts/rename-proper-modules.ts +++ /dev/null @@ -1,18 +0,0 @@ -/// - -import * as fs from 'fs'; -import * as path from 'path'; - -const data = JSON.parse(fs.readFileSync(path.join(__dirname, '../../publish-typings/data/definitions.json'), 'utf-8')); - -Object.keys(data).forEach(libName => { - const libData = data[libName]; - if(libData.kind === 'ProperModule') { - if (libData.definitionFilename !== 'index.d.ts') { - console.log(`${libName} needs renaming from ${libData.definitionFilename}`); - const src = path.join(__dirname, '..', libName, libData.definitionFilename); - const dst = path.join(__dirname, '..', libName, 'index.d.ts'); - fs.rename(src, dst); - } - } -}); diff --git a/scroll-into-view/tsconfig.json b/scroll-into-view/tsconfig.json index 3b532b60f4..86fe762891 100644 --- a/scroll-into-view/tsconfig.json +++ b/scroll-into-view/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/scroller/tsconfig.json b/scroller/tsconfig.json index dd9a93bde3..74d413a0e8 100644 --- a/scroller/tsconfig.json +++ b/scroller/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/scrollreveal/tsconfig.json b/scrollreveal/tsconfig.json index c1f280d115..19298ec469 100644 --- a/scrollreveal/tsconfig.json +++ b/scrollreveal/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/scrolltofixed/tsconfig.json b/scrolltofixed/tsconfig.json index 38e0c5d278..ba86deb895 100644 --- a/scrolltofixed/tsconfig.json +++ b/scrolltofixed/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/scrypt-async/tsconfig.json b/scrypt-async/tsconfig.json index d09c4d8bfb..e22c6e20a1 100644 --- a/scrypt-async/tsconfig.json +++ b/scrypt-async/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/seamless-immutable/tsconfig.json b/seamless-immutable/tsconfig.json index 13d148a887..6ca679e6d8 100644 --- a/seamless-immutable/tsconfig.json +++ b/seamless-immutable/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/seamless/tsconfig.json b/seamless/tsconfig.json index 90ba74b704..183185bd9b 100644 --- a/seamless/tsconfig.json +++ b/seamless/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/seedrandom/tsconfig.json b/seedrandom/tsconfig.json index b3986805c9..c39261e8f5 100644 --- a/seedrandom/tsconfig.json +++ b/seedrandom/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/segment-analytics/tsconfig.json b/segment-analytics/tsconfig.json index 013ce75d55..ce8f0e1ea2 100644 --- a/segment-analytics/tsconfig.json +++ b/segment-analytics/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/select2/tsconfig.json b/select2/tsconfig.json index 28d9dbdc5a..5d7c2bc8a5 100644 --- a/select2/tsconfig.json +++ b/select2/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/selectize/tsconfig.json b/selectize/tsconfig.json index 56f1dee85c..57ec31a8f3 100644 --- a/selectize/tsconfig.json +++ b/selectize/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/selenium-webdriver/tsconfig.json b/selenium-webdriver/tsconfig.json index 3925dd11ee..a16c018a47 100644 --- a/selenium-webdriver/tsconfig.json +++ b/selenium-webdriver/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, @@ -29,4 +31,4 @@ "test/chrome.ts", "test/firefox.ts" ] -} +} \ No newline at end of file diff --git a/semaphore/tsconfig.json b/semaphore/tsconfig.json index b822008a77..64d10913c2 100644 --- a/semaphore/tsconfig.json +++ b/semaphore/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/semver-diff/tsconfig.json b/semver-diff/tsconfig.json index ba30ebc814..199f9ac3b2 100644 --- a/semver-diff/tsconfig.json +++ b/semver-diff/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/semver/tsconfig.json b/semver/tsconfig.json index ac46d3518f..5a1f0a742c 100644 --- a/semver/tsconfig.json +++ b/semver/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sencha_touch/tsconfig.json b/sencha_touch/tsconfig.json index a8a395e97a..4fbd567192 100644 --- a/sencha_touch/tsconfig.json +++ b/sencha_touch/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/send/tsconfig.json b/send/tsconfig.json index d7a050ba7f..8c484fa56f 100644 --- a/send/tsconfig.json +++ b/send/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/sendgrid/tsconfig.json b/sendgrid/tsconfig.json index a91e8af0c8..27de8f8500 100644 --- a/sendgrid/tsconfig.json +++ b/sendgrid/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sendgrid/v1/tsconfig.json b/sendgrid/v1/tsconfig.json index c2a5190741..f42c2783e0 100644 --- a/sendgrid/v1/tsconfig.json +++ b/sendgrid/v1/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -11,7 +13,9 @@ ], "types": [], "paths": { - "sendgrid": ["sendgrid/v1"] + "sendgrid": [ + "sendgrid/v1" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/seneca/tsconfig.json b/seneca/tsconfig.json index e470bae45d..506ebb0a97 100644 --- a/seneca/tsconfig.json +++ b/seneca/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sequelize-fixtures/tsconfig.json b/sequelize-fixtures/tsconfig.json index aeb73d8ed0..de19e05c15 100644 --- a/sequelize-fixtures/tsconfig.json +++ b/sequelize-fixtures/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sequelize/tsconfig.json b/sequelize/tsconfig.json index 6e83dcbeb8..5e393ff618 100644 --- a/sequelize/tsconfig.json +++ b/sequelize/tsconfig.json @@ -5,7 +5,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/sequelize/v3/tsconfig.json b/sequelize/v3/tsconfig.json index 60b0b8a536..3750e0d69b 100644 --- a/sequelize/v3/tsconfig.json +++ b/sequelize/v3/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, @@ -11,7 +13,9 @@ ], "types": [], "paths": { - "sequelize": ["sequelize/v3"] + "sequelize": [ + "sequelize/v3" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/sequester/tsconfig.json b/sequester/tsconfig.json index b51eb658fc..87881b4aa7 100644 --- a/sequester/tsconfig.json +++ b/sequester/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/serialport/tsconfig.json b/serialport/tsconfig.json index edb30d3838..f70ef60163 100644 --- a/serialport/tsconfig.json +++ b/serialport/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/serve-favicon/tsconfig.json b/serve-favicon/tsconfig.json index 0a2900e4d1..2334cc3424 100644 --- a/serve-favicon/tsconfig.json +++ b/serve-favicon/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/serve-index/tsconfig.json b/serve-index/tsconfig.json index 9b7dca0857..d3e7028fbb 100644 --- a/serve-index/tsconfig.json +++ b/serve-index/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/serve-static/tsconfig.json b/serve-static/tsconfig.json index 6fb5457b6e..2b8f21cbb4 100644 --- a/serve-static/tsconfig.json +++ b/serve-static/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/service_worker_api/tsconfig.json b/service_worker_api/tsconfig.json index 5e1f474010..0c7c7ed734 100644 --- a/service_worker_api/tsconfig.json +++ b/service_worker_api/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/set-cookie-parser/tsconfig.json b/set-cookie-parser/tsconfig.json index f9df431f6f..8e0d94c77b 100644 --- a/set-cookie-parser/tsconfig.json +++ b/set-cookie-parser/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sha1/tsconfig.json b/sha1/tsconfig.json index ec99de7c10..dbd1f7997e 100644 --- a/sha1/tsconfig.json +++ b/sha1/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -17,4 +19,4 @@ "index.d.ts", "sha1-tests.ts" ] -} +} \ No newline at end of file diff --git a/shallowequal/tsconfig.json b/shallowequal/tsconfig.json index 8c6e168f62..8f1898e84a 100644 --- a/shallowequal/tsconfig.json +++ b/shallowequal/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/shapefile/tsconfig.json b/shapefile/tsconfig.json index 60b288c5f9..9d9b6ac676 100644 --- a/shapefile/tsconfig.json +++ b/shapefile/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sharedworker/tsconfig.json b/sharedworker/tsconfig.json index 5fdd63ff77..cbf986bba0 100644 --- a/sharedworker/tsconfig.json +++ b/sharedworker/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sharepoint/index.d.ts b/sharepoint/index.d.ts index 75e67656b8..22bed0c0aa 100644 --- a/sharepoint/index.d.ts +++ b/sharepoint/index.d.ts @@ -1,30 +1,30 @@ -// Type definitions for SharePoint 2010 and 2013 +// Type definitions for SharePoint: 2010.1 / 2013.1 // Project: https://github.com/gandjustas/sptypescript // Definitions by: Stanislav Vyshchepan , Andrey Markeev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// -declare var _spBodyOnLoadFunctions: Function[]; +declare var _spBodyOnLoadFunctions: Array<() => void>; declare var _spBodyOnLoadFunctionNames: string[]; declare var _spBodyOnLoadCalled: boolean; declare function ExecuteOrDelayUntilBodyLoaded(initFunc: () => void): void; declare function ExecuteOrDelayUntilScriptLoaded(func: () => void, depScriptFileName: string): boolean; -declare function ExecuteOrDelayUntilEventNotified(func: Function, eventName: string): boolean; -declare var Strings:any; +declare function ExecuteOrDelayUntilEventNotified(func: (...args: any[]) => void, eventName: string): boolean; +declare var Strings: any; declare namespace SP { export class SOD { static execute(fileName: string, functionName: string, ...args: any[]): void; static executeFunc(fileName: string, typeName: string, fn: () => void): void; - static executeOrDelayUntilEventNotified(func: Function, eventName: string): boolean; + static executeOrDelayUntilEventNotified(func: (...args: any[]) => void, eventName: string): boolean; static executeOrDelayUntilScriptLoaded(func: () => void, depScriptFileName: string): boolean; static notifyScriptLoadedAndExecuteWaitingJobs(scriptFileName: string): void; static notifyEventAndExecuteWaitingJobs(eventName: string, args?: any[]): void; static registerSod(fileName: string, url: string): void; static registerSodDep(fileName: string, dependentFileName: string): void; static loadMultiple(keys: string[], fn: () => void, bSync?: boolean): void; - static delayUntilEventNotified(func: Function, eventName: string): void; + static delayUntilEventNotified(func: (...args: any[]) => void, eventName: string): void; static get_prefetch(): boolean; static set_prefetch(value: boolean): void; @@ -34,17 +34,17 @@ declare namespace SP { } export enum ListLevelPermissionMask { - viewListItems,//: 1, - insertListItems,//: 2, - editListItems,//: 4, - deleteListItems,//: 8, - approveItems,//: 16, - openItems,//: 32, - viewVersions,//: 64, - deleteVersions,//: 128, - breakCheckout,//: 256, - managePersonalViews,//: 512, - manageLists//: 2048 + viewListItems, //: 1, + insertListItems, //: 2, + editListItems, //: 4, + deleteListItems, //: 8, + approveItems, //: 16, + openItems, //: 32, + viewVersions, //: 64, + deleteVersions, //: 128, + breakCheckout, //: 256, + managePersonalViews, //: 512, + manageLists //: 2048 } export class HtmlBuilder { @@ -113,21 +113,21 @@ declare namespace SP { fromJson(json: { High: number; Low: number; }): void; } - export module ListOperation { - export module ViewOperation { + export namespace ListOperation { + export namespace ViewOperation { export function getSelectedView(): string; export function navigateUp(viewId: string): void; export function refreshView(viewId: string): void; } - export module Selection { + export namespace Selection { export function selectListItem(iid: string, bSelect: boolean): void; - export function getSelectedItems(): { id: number; fsObjType: FileSystemObjectType; }[]; + export function getSelectedItems(): Array<{ id: number; fsObjType: FileSystemObjectType; }>; export function getSelectedList(): string; export function getSelectedView(): string; export function navigateUp(viewId: string): void; export function deselectAllListItems(iid: string): void; } - export module Overrides { + export namespace Overrides { export function overrideDeleteConfirmation(listId: string, overrideText: string): void; } } @@ -191,9 +191,9 @@ declare function AddEvtHandler(element: HTMLElement, event: string, func: EventL declare function GetUrlKeyValue(key: string): string; declare class AjaxNavigate { - update(url: string, updateParts: Object, fullNavigate: boolean, anchorName: string): void; - add_navigate(handler: Function): void; - remove_navigate(handler: Function): void; + update(url: string, updateParts: { [name: string]: string | number }, fullNavigate: boolean, anchorName: string): void; + add_navigate(handler: (obj: any, eventArgs: any) => void): void; + remove_navigate(handler: (obj: any, eventArgs: any) => void): void; submit(formToSubmit: HTMLFormElement): void; getParam(paramName: string): string; getSavedFormAction(): string; @@ -246,7 +246,7 @@ declare class Browseris { win32: boolean; win64bit: boolean; winnt: boolean; - armProcessor: boolean + armProcessor: boolean; } declare var browseris: Browseris; @@ -268,7 +268,7 @@ interface ContextInfo extends SPClientTemplates.RenderContext { LastSelectedItemIID: number; LastRowIndexSelected: number; RowFocusTimerID: number; - ListData: any;// SPClientTemplates.ListData_InView | SPClientTemplates.ListData_InForm + ListData: any; //SPClientTemplates.ListData_InView | SPClientTemplates.ListData_InForm ListSchema: SPClientTemplates.ListSchema; ModerationStatus: number; PortalUrl: string; @@ -277,8 +277,8 @@ interface ContextInfo extends SPClientTemplates.RenderContext { SendToLocationName: string; SendToLocationUrl: string; StateInitDone: boolean; - TableCbxFocusHandler: Function; - TableMouseoverHandler: Function; + TableCbxFocusHandler: (instance: any, eventArgs: any) => void; + TableMouseoverHandler: (instance: any, eventArgs: any) => void; TotalListItems: number; WorkflowsAssociated: boolean; clvp: any; @@ -302,7 +302,7 @@ interface ContextInfo extends SPClientTemplates.RenderContext { listTemplate: string; listUrlDir: string; newFormUrl: string; - onRefreshFailed: Function; + onRefreshFailed: (context: any, requrest: any, response: any) => void; overrideDeleteConfirmation: string; overrideFilterQstring: string; recursiveView: boolean; @@ -385,20 +385,16 @@ declare namespace SP { createWebRequestExecutor(): ProxyWebRequestExecutor; } } + interface MQuery { (selector: string, context?: any): MQueryResultSetElements; - (element: HTMLElement): MQueryResultSetElements; - (object: MQueryResultSetElements): MQueryResultSetElements; - (object: MQueryResultSet): MQueryResultSet; - (object: T): MQueryResultSet; - (elementArray: HTMLElement[]): MQueryResultSetElements; - (array: T[]): MQueryResultSet; - (): MQueryResultSet; + (objectOrElement: MQueryResultSetElements | HTMLElement | HTMLElement[]): MQueryResultSetElements; + (object?: MQueryResultSet | T | T[]): MQueryResultSet; - throttle(fn: Function, interval: number, shouldOverrideThrottle: boolean): Function; + throttle any>(fn: T, interval: number, shouldOverrideThrottle: boolean): T; - extend(target: any, ...objs: any[]): Object; - extend(deep: boolean, target: any, ...objs: any[]): Object; + extend(target: any, ...objs: any[]): any; + extend(deep: boolean, target: any, ...objs: any[]): any; makeArray(obj: any): any[]; @@ -422,49 +418,31 @@ interface MQuery { ready(callback: () => void): void; contains(container: HTMLElement, contained: HTMLElement): boolean; - proxy(fn: (...args: any[]) => any, context: any, ...args: any[]): Function; + proxy(fn: (...args: any[]) => any, context: any, ...args: any[]): (...args: any[]) => any; proxy(context: any, name: string, ...args: any[]): any; - every(obj: T[], fn: (elementOfArray: T, indexInArray: number) => boolean, context?: any): boolean; - every(obj: MQueryResultSet, fn: (elementOfArray: T, indexInArray: number) => boolean, context?: any): boolean; - every(obj: T[], fn: (elementOfArray: T) => boolean, context?: any): boolean; - every(obj: MQueryResultSet, fn: (elementOfArray: any) => boolean, context?: any): boolean; + every(obj: T[] | MQueryResultSet, fn: (elementOfArray: T, indexInArray?: number) => boolean, context?: any): boolean; + some(obj: T[] | MQueryResultSet, fn: (elementOfArray: T, indexInArray?: number) => boolean, context?: any): boolean; - some(obj: T[], fn: (elementOfArray: T, indexInArray: number) => boolean, context?: any): boolean; - some(obj: MQueryResultSet, fn: (elementOfArray: T, indexInArray: number) => boolean, context?: any): boolean; - some(obj: T[], fn: (elementOfArray: T) => boolean, context?: any): boolean; - some(obj: MQueryResultSet, fn: (elementOfArray: T) => boolean, context?: any): boolean; + filter(obj: T[], fn: (elementOfArray: T, indexInArray?: number) => boolean, context?: any): T[]; + filter(obj: MQueryResultSet, fn: (elementOfArray: T, indexInArray?: number) => boolean, context?: any): MQueryResultSet; - filter(obj: T[], fn: (elementOfArray: T, indexInArray: number) => boolean, context?: any): T[]; - filter(obj: MQueryResultSet, fn: (elementOfArray: T, indexInArray: number) => boolean, context?: any): MQueryResultSet; - filter(obj: T[], fn: (elementOfArray: T) => boolean, context?: any): T[]; - filter(obj: MQueryResultSet, fn: (elementOfArray: T) => boolean, context?: any): MQueryResultSet; + forEach(obj: T[] | MQueryResultSet, fn: (elementOfArray: T, indexInArray?: number) => void, context?: any): void; - forEach(obj: T[], fn: (elementOfArray: T, indexInArray: number) => void, context?: any): void; - forEach(obj: MQueryResultSet, fn: (elementOfArray: T, indexInArray: number) => void, context?: any): void; - forEach(obj: T[], fn: (elementOfArray: T) => void, context?: any): void; - forEach(obj: MQueryResultSet, fn: (elementOfArray: T) => void, context?: any): void; - - map(array: T[], callback: (elementOfArray: T, indexInArray: number) => U): U[]; - map(array: MQueryResultSet, callback: (elementOfArray: T, indexInArray: number) => U): MQueryResultSet; - map(array: T[], callback: (elementOfArray: T) => U): U[]; - map(array: MQueryResultSet, callback: (elementOfArray: T) => U): MQueryResultSet; + map(array: T[], callback: (elementOfArray: T, indexInArray?: number) => U): U[]; + map(array: MQueryResultSet, callback: (elementOfArray: T, indexInArray?: number) => U): MQueryResultSet; indexOf(obj: T[], object: T, startIndex?: number): number; lastIndexOf(obj: T[], object: T, startIndex?: number): number; - data(element: HTMLElement, key: string, value: any): any; - data(element: HTMLElement, key: string): any; - data(element: HTMLElement): any; + data(element: HTMLElement, key?: string, value?: any): any; removeData(element: HTMLElement, name?: string): MQueryResultSetElements; hasData(element: HTMLElement): boolean; } interface MQueryResultSetElements extends MQueryResultSet { - append(node: HTMLElement): MQueryResultSetElements; - append(mQuerySet: MQueryResultSetElements): MQueryResultSetElements; - append(html: string): MQueryResultSetElements; + append(node: HTMLElement | MQueryResultSetElements | string): MQueryResultSetElements; bind(eventType: string, handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; unbind(eventType: string, handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; @@ -479,8 +457,7 @@ interface MQueryResultSetElements extends MQueryResultSet { offset(coordinates: { left: any; top: any; }): MQueryResultSetElements; filter(selector: string): MQueryResultSetElements; - filter(fn: (elementOfArray: HTMLElement, indexInArray: number) => boolean, context?: any): MQueryResultSetElements; - filter(fn: (elementOfArray: HTMLElement) => boolean, context?: any): MQueryResultSetElements; + filter(fn: (elementOfArray: HTMLElement, indexInArray?: number) => boolean, context?: any): MQueryResultSetElements; not(selector: string): MQueryResultSetElements; @@ -489,24 +466,22 @@ interface MQueryResultSetElements extends MQueryResultSet { offsetParent(selector?: string): MQueryResultSetElements; parents(selector?: string): MQueryResultSetElements; - parentsUntil(selector?: string, filter?: string): MQueryResultSetElements; - parentsUntil(element?: HTMLElement, filter?: string): MQueryResultSetElements; + parentsUntil(selectorOrElement?: string | HTMLElement, filter?: string): MQueryResultSetElements; position(): { top: number; left: number; }; attr(attributeName: string): string; - attr(attributeName: string, value: any): MQueryResultSetElements; + attr(attributeName: string, valueOrDelegate: any): MQueryResultSetElements; attr(map: { [key: string]: any; }): MQueryResultSetElements; + // tslint:disable-next-line: unified-signatures attr(attributeName: string, func: (index: number, attr: any) => any): MQueryResultSetElements; addClass(classNames: string): MQueryResultSetElements; removeClass(classNames: string): MQueryResultSetElements; - css(propertyName: string): string; - css(propertyNames: string[]): string; + css(propertyName: string | string[]): string; css(properties: any): MQueryResultSetElements; - css(propertyName: string, value: any): MQueryResultSetElements; - css(propertyName: any, value: any): MQueryResultSetElements; + css(propertyName: any | string, value: any): MQueryResultSetElements; remove(selector?: string): MQueryResultSetElements; children(selector?: string): MQueryResultSetElements; @@ -519,82 +494,45 @@ interface MQueryResultSetElements extends MQueryResultSet { removeData(key: string): MQueryResultSetElements; - map(callback: (elementOfArray: HTMLElement, indexInArray: number) => any): MQueryResultSetElements; - map(callback: (elementOfArray: HTMLElement) => any): MQueryResultSetElements; + map(callback?: (elementOfArray: HTMLElement, indexInArray: number) => any): MQueryResultSetElements; - blur(): MQueryResultSetElements; - blur(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - change(): MQueryResultSetElements; - change(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - click(): MQueryResultSetElements; - click(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - dblclick(): MQueryResultSetElements; - dblclick(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - error(): MQueryResultSetElements; - error(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - focus(): MQueryResultSetElements; + blur(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + change(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + click(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + dblclick(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + error(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; focus(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - focusin(): MQueryResultSetElements; - focusin(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - focusout(): MQueryResultSetElements; - focusout(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - keydown(): MQueryResultSetElements; - keydown(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - keypress(): MQueryResultSetElements; - keypress(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - keyup(): MQueryResultSetElements; - keyup(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - load(): MQueryResultSetElements; - load(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - mousedown(): MQueryResultSetElements; - mousedown(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - mouseenter(): MQueryResultSetElements; - mouseenter(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - mouseleave(): MQueryResultSetElements; - mouseleave(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - mousemove(): MQueryResultSetElements; - mousemove(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - mouseout(): MQueryResultSetElements; - mouseout(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - mouseover(): MQueryResultSetElements; - mouseover(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - mouseup(): MQueryResultSetElements; - mouseup(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - resize(): MQueryResultSetElements; - resize(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - scroll(): MQueryResultSetElements; - scroll(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - select(): MQueryResultSetElements; - select(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - submit(): MQueryResultSetElements; - submit(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - unload(): MQueryResultSetElements; - unload(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - + focusin(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + focusout(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + keydown(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + keypress(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + keyup(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + load(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + mousedown(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + mouseenter(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + mouseleave(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + mousemove(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + mouseout(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + mouseover(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + mouseup(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + resize(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + scroll(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + select(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + submit(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + unload(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements; } interface MQueryResultSet { [index: number]: T; contains(contained: T): boolean; - filter(fn: (elementOfArray: T, indexInArray: number) => boolean, context?: any): MQueryResultSet; - filter(fn: (elementOfArray: T) => boolean, context?: any): MQueryResultSet; - - every(fn: (elementOfArray: T, indexInArray: number) => boolean, context?: any): boolean; - every(fn: (elementOfArray: T) => boolean, context?: any): boolean; - - some(fn: (elementOfArray: T, indexInArray: number) => boolean, context?: any): boolean; - some(fn: (elementOfArray: T) => boolean, context?: any): boolean; - - map(callback: (elementOfArray: T, indexInArray: number) => any): MQueryResultSet; - map(callback: (elementOfArray: T) => any): MQueryResultSet; - - forEach(fn: (elementOfArray: T, indexInArray: number) => void, context?: any): void; - forEach(fn: (elementOfArray: T) => void, context?: any): void; - + filter(fn: (elementOfArray: T, indexInArray?: number) => boolean, context?: any): MQueryResultSet; + every(fn: (elementOfArray: T, indexInArray?: number) => boolean, context?: any): boolean; + some(fn: (elementOfArray: T, indexInArray?: number) => boolean, context?: any): boolean; + map(callback: (elementOfArray: T, indexInArray?: number) => any): MQueryResultSet; + forEach(fn: (elementOfArray: T, indexInArray?: number) => void, context?: any): void; indexOf(object: any, startIndex?: number): number; lastIndexOf(object: any, startIndex?: number): number; - } interface MQueryEvent extends Event { @@ -883,7 +821,7 @@ declare namespace SPClientTemplates { Only appears if Throttled property is true, i.e. the target lookup list is throttled. */ MaxQueryResult: string; /** List of choices for this field. */ - Choices: { LookupId: number; LookupValue: string; }[]; + Choices: Array<{ LookupId: number; LookupValue: string; }>; /** Number of choices. Appears only for Lookup field. */ ChoiceCount: number; @@ -1305,32 +1243,23 @@ declare namespace SPClientTemplates { Templates?: Templates; } - export interface SingleTemplateCallback { - /** Must return null in order to fall back to a more common template or to a system default template */ - (renderContext: RenderContext_InView): string; - } - export interface GroupCallback { - /** Must return null in order to fall back to a more common template or to a system default template */ - (renderContext: RenderContext_GroupInView): string; - } - export interface ItemCallback { - /** Must return null in order to fall back to a more common template or to a system default template */ - (renderContext: RenderContext): string; - } + /** Must return null in order to fall back to a more common template or to a system default template */ + export type SingleTemplateCallback = (renderContext: RenderContext_InView) => string; - export interface FieldCallback { - /** Must return null in order to fall back to a more common template or to a system default template */ - (renderContext: RenderContext): string; - } + /** Must return null in order to fall back to a more common template or to a system default template */ + export type GroupCallback = (renderContext: RenderContext_GroupInView) => string; - export interface FieldInFormCallback { - /** Must return null in order to fall back to a more common template or to a system default template */ - (renderContext: RenderContext_FieldInForm): string; - } - export interface FieldInViewCallback { - /** Must return null in order to fall back to a more common template or to a system default template */ - (renderContext: RenderContext_FieldInView): string; - } + /** Must return null in order to fall back to a more common template or to a system default template */ + export type ItemCallback = (renderContext: RenderContext) => string; + + /** Must return null in order to fall back to a more common template or to a system default template */ + export type FieldCallback = (renderContext: RenderContext) => string; + + /** Must return null in order to fall back to a more common template or to a system default template */ + export type FieldInFormCallback = (renderContext: RenderContext_FieldInForm) => string; + + /** Must return null in order to fall back to a more common template or to a system default template */ + export type FieldInViewCallback = (renderContext: RenderContext_FieldInView) => string; export interface FieldTemplateOverrides { /** Defines templates for rendering the field on a display form. */ @@ -1455,7 +1384,7 @@ declare namespace SPClientTemplates { /** Returns ";#" */ static UserLookupDelimitString: string; /** Returns ";#" */ - static UserMultiValueDelimitString:string; + static UserMultiValueDelimitString: string; } export class ClientFormContext { @@ -1508,9 +1437,9 @@ declare namespace SPClientForms { } export class ValidatorSet { - public RegisterValidator(validator: IValidator): void; + RegisterValidator(validator: IValidator): void; } - + // tslint:disable-next-line: interface-name export interface IValidator { Validate(value: any): ValidationResult; } @@ -1535,13 +1464,13 @@ declare namespace SPClientForms { } export enum FormManagerEvents { - Event_OnControlValueChanged,//: 1, - Event_OnControlInitializedCallback,//: 2, - Event_OnControlFocusSetCallback,//: 3, - Event_GetControlValueCallback,//: 4, - Event_OnControlValidationError,//: 5, - Event_RegisterControlValidator,//: 6, - Event_GetHasValueChangedCallback//: 7 + Event_OnControlValueChanged, //: 1, + Event_OnControlInitializedCallback, //: 2, + Event_OnControlFocusSetCallback, //: 3, + Event_GetControlValueCallback, //: 4, + Event_OnControlValidationError, //: 5, + Event_RegisterControlValidator, //: 6, + Event_GetHasValueChangedCallback //: 7 } export class ClientForm { @@ -1559,10 +1488,10 @@ declare namespace SPClientForms { } declare class SPMgr { - NewGroup(listItem: Object, fieldName: string): boolean; + NewGroup(listItem: { [name: string]: any }, fieldName: string): boolean; RenderHeader(renderCtx: SPClientTemplates.RenderContext, field: SPClientTemplates.FieldSchema): string; - RenderField(renderCtx: SPClientTemplates.RenderContext, field: SPClientTemplates.FieldSchema, listItem: Object, listSchema: SPClientTemplates.ListSchema): string; - RenderFieldByName(renderCtx: SPClientTemplates.RenderContext, fieldName: string, listItem: Object, listSchema: SPClientTemplates.ListSchema): string; + RenderField(renderCtx: SPClientTemplates.RenderContext, field: SPClientTemplates.FieldSchema, listItem: { [name: string]: any }, listSchema: SPClientTemplates.ListSchema): string; + RenderFieldByName(renderCtx: SPClientTemplates.RenderContext, fieldName: string, listItem: { [name: string]: any }, listSchema: SPClientTemplates.ListSchema): string; } declare var spMgr: SPMgr; @@ -1641,8 +1570,7 @@ declare namespace SPAnimation { } export class Object { - constructor(animationID: ID, delay: number, element: HTMLElement, finalState: State, finishFunc?: (data: any) => void, data?: any); - constructor(animationID: ID, delay: number, element: HTMLElement[], finalState: State, finishFunc?: (data: any) => void, data?: any); + constructor(animationID: ID, delay: number, element: HTMLElement | HTMLElement[], finalState: State, finishFunc?: (data: any) => void, data?: any); RunAnimation(): void; } } @@ -1670,12 +1598,14 @@ declare namespace SPAnimationUtility { } } +// tslint:disable-next-line: interface-name interface IEnumerator { get_current(): T; moveNext(): boolean; reset(): void; } +// tslint:disable-next-line: interface-name interface IEnumerable { getEnumerator(): IEnumerator; } @@ -1692,8 +1622,7 @@ declare namespace SP { static get_empty(): SP.Guid; static newGuid(): SP.Guid; static isValid(uuid: string): boolean; - toString(): string; - toString(format: string): string; + toString(format?: string): string; equals(uuid: SP.Guid): boolean; toSerialized(): string; } @@ -1781,13 +1710,13 @@ declare namespace SP { itemAtIndex(index: number): T; constructor(); } + // tslint:disable-next-line: interface-name export interface IFromJson { fromJson(initValue: any): void; customFromJson(initValue: any): boolean; } export class Base64EncodedByteArray { - constructor(); - constructor(base64Str: string); + constructor(base64Str?: string); get_length(): number; toBase64String(): string; append(b: any): void; @@ -1803,8 +1732,7 @@ declare namespace SP { customFromJson(initValue: any): boolean; } export class ClientObjectPropertyConditionalScope extends SP.ConditionalScopeBase { - constructor(clientObject: SP.ClientObject, propertyName: string, comparisonOperator: string, valueToCompare: any); - constructor(clientObject: SP.ClientObject, propertyName: string, comparisonOperator: string, valueToCompare: any, allowAllActions: boolean); + constructor(clientObject: SP.ClientObject, propertyName: string, comparisonOperator: string, valueToCompare: any, allowAllActions?: boolean); } //export class ClientResult { // get_value(): any; @@ -1890,6 +1818,8 @@ declare namespace SP { static createUtcDateTime(milliseconds: number): Date; static createLocalDateTime(milliseconds: number): Date; } + + // tslint:disable-next-line: interface-name export interface IWebRequestExecutorFactory { createWebRequestExecutor(): Sys.Net.WebRequestExecutor; } @@ -2114,9 +2044,8 @@ declare namespace SP { set_objectVersion(value: string): void; fromJson(initValue: any): void; customFromJson(initValue: any): boolean; - retrieve(): void; refreshLoad(): void; - retrieve(propertyNames: string[]): void; + retrieve(propertyNames?: string[]): void; isPropertyAvailable(propertyName: string): boolean; isObjectPropertyInstantiated(propertyName: string): boolean; get_serverObjectIsNull(): boolean; @@ -2144,14 +2073,14 @@ declare namespace SP { getItemAtIndex(index: number): T; fromJson(obj: any): void; } + export class ClientObjectList extends SP.ClientObjectCollection { constructor(context: SP.ClientRuntimeContext, objectPath: SP.ObjectPath, childItemType: any); fromJson(initValue: any): void; customFromJson(initValue: any): boolean; } export class ClientObjectPrototype { - retrieve(): void; - retrieve(propertyNames: string[]): void; + retrieve(propertyNames?: string[]): void; retrieveObject(propertyName: string): SP.ClientObjectPrototype; retrieveCollectionObject(propertyName: string): SP.ClientObjectCollectionPrototype; } @@ -2182,8 +2111,7 @@ declare namespace SP { get_request(): SP.ClientRequest; } export class ClientRequestFailedEventArgs extends SP.ClientRequestEventArgs { - constructor(request: SP.ClientRequest, message: string, stackTrace: string, errorCode: number, errorValue: string, errorTypeName: string, errorDetails: any); - constructor(request: SP.ClientRequest, message: string, stackTrace: string, errorCode: number, errorValue: string, errorTypeName: string, errorDetails: any, errorTraceCorrelationId: string); + constructor(request: SP.ClientRequest, message: string, stackTrace: string, errorCode: number, errorValue: string, errorTypeName: string, errorDetails: any, errorTraceCorrelationId?: string); get_message(): string; get_stackTrace(): string; get_errorCode(): number; @@ -2219,19 +2147,14 @@ declare namespace SP { remove_beginningRequest(value: (sender: any, args: SP.ClientRequestEventArgs) => void): void; get_requestTimeout(): number; set_requestTimeout(value: number): void; - executeQueryAsync(succeededCallback: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void, failedCallback: (sender: any, args: SP.ClientRequestFailedEventArgs) => void): void; - executeQueryAsync(succeededCallback: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void): void; - executeQueryAsync(): void; + executeQueryAsync(succeededCallback?: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void, failedCallback?: (sender: any, args: SP.ClientRequestFailedEventArgs) => void): void; get_staticObjects(): any; castTo(obj: SP.ClientObject, type: any): SP.ClientObject; addQuery(query: SP.ClientAction): void; addQueryIdAndResultObject(id: number, obj: any): void; - parseObjectFromJsonString(json: string): any; - parseObjectFromJsonString(json: string, skipTypeFixup: boolean): any; - load(clientObject: SP.ClientObject): void; - loadQuery(clientObjectCollection: SP.ClientObjectCollection, exp: string): any; + parseObjectFromJsonString(json: string, skipTypeFixup?: boolean): any; load(clientObject: SP.ClientObject, ...exps: string[]): void; - loadQuery(clientObjectCollection: SP.ClientObjectCollection): any; + loadQuery(clientObjectCollection: SP.ClientObjectCollection, exp?: string): any; get_serverSchemaVersion(): string; get_serverLibraryVersion(): string; get_traceCorrelationId(): string; @@ -2438,9 +2361,8 @@ declare namespace SP { wssMajorVersion: string; } export class ClientContext extends SP.ClientRuntimeContext { - constructor(serverRelativeUrlOrFullUrl: string); + constructor(serverRelativeUrlOrFullUrl?: string); static get_current(): SP.ClientContext; - constructor(); get_web(): SP.Web; get_site(): SP.Site; get_serverVersion(): string; @@ -2462,9 +2384,7 @@ declare namespace SP { /** Decreases the indentation for subsequent log messages. */ static decreaseIndent(): void; /** Traces when the function was entered. */ - static traceApiEnter(functionName: string, args: any[]): void; - /** Traces when the function was entered. */ - static traceApiEnter(functionName: string): void; + static traceApiEnter(functionName: string, args?: any[]): void; /** Traces when the function has finished. */ static traceApiLeave(): void; } @@ -3861,9 +3781,7 @@ declare namespace SP { /** Returns the list with the specified title from the collection. */ getByTitle(title: string): SP.List; /** Returns the list with the specified list identifier. */ - getById(id: SP.Guid): SP.List; - /** Returns the list with the specified list identifier. */ - getById(id: string): SP.List; + getById(id: string | SP.Guid): SP.List; /** Creates a new list or a document library. */ add(parameters: SP.ListCreationInformation): SP.List; /** Gets a list that is the default location for wiki pages. */ @@ -3981,8 +3899,7 @@ declare namespace SP { export class ListItemCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.ListItem; get_item(index: number): SP.ListItem; - getById(id: number): SP.ListItem; - getById(id: string): SP.ListItem; + getById(id: number | string): SP.ListItem; get_listItemCollectionPosition(): SP.ListItemCollectionPosition; } export class ListItemCollectionPosition extends SP.ClientValueObject { @@ -4975,8 +4892,8 @@ declare namespace SP { getByName(name: string): SP.WebTemplate; } - export module Application { - export module UI { + export namespace Application { + export namespace UI { export interface DefaultFormsInformationRequestor { onDefaultFormsInformationRetrieveSuccess(defaultForms: SP.Application.UI.DefaultFormsInformation): void; onDefaultFormsInformationRetrieveFailure(): void; @@ -5077,7 +4994,7 @@ declare namespace SP { } - export module Analytics { + export namespace Analytics { export class AnalyticsUsageEntry extends SP.ClientObject { static logAnalyticsEvent(context: SP.ClientRuntimeContext, eventTypeId: number, itemId: string): void; static logAnalyticsEvent2(context: SP.ClientRuntimeContext, eventTypeId: number, itemId: string, rollupScopeId: SP.Guid, siteId: SP.Guid, userId: string): void; @@ -5094,7 +5011,7 @@ declare namespace SP { } } - export module SiteHealth { + export namespace SiteHealth { export class SiteHealthResult extends SP.ClientValueObject { get_messageAsText(): string; get_ruleHelpLink(): string; @@ -5312,7 +5229,7 @@ declare namespace Microsoft.SharePoint.Client.Search { constructor(context: SP.ClientContext); itemAt: (index: number) => string; get_item: (index: number) => string; - get_childItemType: () => Object; + get_childItemType: () => typeof String; add: (property: string) => void; clear: () => void; } @@ -5392,7 +5309,7 @@ declare namespace Microsoft.SharePoint.Client.Search { export class ReorderingRuleCollection extends SP.ClientObjectCollection { itemAt: (index: number) => ReorderingRule; get_item: (index: number) => ReorderingRule; - get_childItemType: () => Object; + get_childItemType: () => typeof ReorderingRule; add: (property: ReorderingRule) => void; clear: () => void; } @@ -5423,7 +5340,7 @@ declare namespace Microsoft.SharePoint.Client.Search { export class SortCollection extends SP.ClientObjectCollection { itemAt: (index: number) => Sort; get_item: (index: number) => Sort; - get_childItemType: () => Object; + get_childItemType: () => typeof Sort; add: (strProperty: string, sortDirection: SortDirection) => void; clear: () => void; } @@ -5473,7 +5390,7 @@ declare namespace Microsoft.SharePoint.Client.Search { get_queryRuleId: () => string; - get_resultRows: () => { [key: string]: any; }[]; + get_resultRows: () => Array<{ [key: string]: any; }>; get_resultTitle: () => string; @@ -5644,7 +5561,7 @@ declare namespace Microsoft.SharePoint.Client.Search { } export class SearchConfigurationPortabilityPropertyNames { - static importWarnings: string;// = 'ImportWarnings' + static importWarnings: string; //= 'ImportWarnings' } } @@ -5682,7 +5599,7 @@ declare namespace Microsoft.SharePoint.Client.Search { } declare namespace SP { - export module BusinessData { + export namespace BusinessData { export class AppBdcCatalog extends SP.ClientObject { getEntity(namespace: string, name: string): SP.BusinessData.Entity; getLobSystemProperty(lobSystemName: string, propertyName: string): SP.StringResult; @@ -5776,7 +5693,7 @@ declare namespace SP { getChildTypeDescriptors(): SP.BusinessData.Collections.TypeDescriptorCollection; getParentTypeDescriptor(): SP.BusinessData.TypeDescriptor; } - export module Collections { + export namespace Collections { export class EntityFieldCollection extends SP.ClientObjectCollection { itemAt(index: number): SP.BusinessData.EntityField; get_item(index: number): SP.BusinessData.EntityField; @@ -5804,7 +5721,7 @@ declare namespace SP { } } - export module Infrastructure { + export namespace Infrastructure { export class ExternalSubscriptionStore extends SP.ClientObject { constructor(context: SP.ClientRuntimeContext, web: SP.Web); static newObject(context: SP.ClientRuntimeContext, web: SP.Web): SP.BusinessData.Infrastructure.ExternalSubscriptionStore; @@ -5812,7 +5729,7 @@ declare namespace SP { } } - export module Runtime { + export namespace Runtime { export enum EntityEventType { none, itemAdded, @@ -5871,7 +5788,7 @@ declare namespace SP { } declare namespace SP { - export module Sharing { + export namespace Sharing { export class DocumentSharingManager { static getRoleDefinition(context: SP.ClientRuntimeContext, role: SP.Sharing.Role): SP.RoleDefinition; static isDocumentSharingEnabled(context: SP.ClientRuntimeContext, list: SP.List): SP.BooleanResult; @@ -5909,7 +5826,7 @@ declare namespace SP { declare namespace SP { - export module Social { + export namespace Social { /** Identifies an actor as a user, document, site, or tag. */ export enum SocialActorType { user, @@ -6637,8 +6554,7 @@ declare namespace SP { addLanguage(lcid: number): void; commitAll(): void; - createGroup(name: string): TermGroup; - createGroup(name: string, groupId: SP.Guid): TermGroup; + createGroup(name: string, groupId?: SP.Guid): TermGroup; deleteLanguage(lcid: number): void; @@ -6734,9 +6650,8 @@ declare namespace SP { getAllTerms(): TermCollection; getChanges(changeInformation: ChangeInformation): ChangedItemCollection; getTerm(termId: SP.Guid): Term; - getTerms(pagingLimit: number): TermCollection; + getTerms(pagingLimit: number | LabelMatchInformation): TermCollection; getTerms(termLabel: string, trimUnavailable: boolean): TermCollection; - getTerms(labelMatchInformation: LabelMatchInformation): TermCollection; getTermsWithCustomProperty(customPropertyName: string, trimUnavailable: boolean): TermCollection; getTermsWithCustomProperty(customPropertyMatchInformation: CustomPropertyMatchInformation): TermCollection; move(targetGroup: TermGroup): void; @@ -6961,40 +6876,40 @@ declare namespace SP { } declare namespace SP { - export module DocumentSet { + export namespace DocumentSet { export class DocumentSet extends ClientObject { static create(context: ClientContext, parentFolder: Folder, name: string, ctid: ContentTypeId): StringResult; } } - export module Video { + export namespace Video { export class EmbedCodeConfiguration extends ClientValueObject { - public get_autoPlay(): boolean; - public set_autoPlay(value: boolean): boolean; + get_autoPlay(): boolean; + set_autoPlay(value: boolean): boolean; - public get_displayTitle(): boolean; - public set_displayTitle(value: boolean): boolean; + get_displayTitle(): boolean; + set_displayTitle(value: boolean): boolean; - public get_linkToOwnerProfilePage(): boolean; - public set_linkToOwnerProfilePage(value: boolean): boolean; + get_linkToOwnerProfilePage(): boolean; + set_linkToOwnerProfilePage(value: boolean): boolean; - public get_linkToVideoHomePage(): boolean; - public set_linkToVideoHomePage(value: boolean): boolean; + get_linkToVideoHomePage(): boolean; + set_linkToVideoHomePage(value: boolean): boolean; - public get_loop(): boolean; - public set_loop(value: boolean): boolean; + get_loop(): boolean; + set_loop(value: boolean): boolean; - public get_pixelHeight(): number; - public set_pixelHeight(value: number): number; + get_pixelHeight(): number; + set_pixelHeight(value: number): number; - public get_pixelWidth(): number; - public set_pixelWidth(value: number): number; + get_pixelWidth(): number; + set_pixelWidth(value: number): number; - public get_startTime(): number; - public set_startTime(value: number): number; + get_startTime(): number; + set_startTime(value: number): number; - public get_previewImagePath(): string; - public set_previewImagePath(value: string): string; + get_previewImagePath(): string; + set_previewImagePath(value: string): string; } export class VideoSet extends DocumentSet.DocumentSet { @@ -7008,12 +6923,13 @@ declare namespace SP { declare namespace SP { - export module UI { - export module ApplicationPages { + export namespace UI { + export namespace ApplicationPages { export class SelectorSelectionEventArgs extends Sys.EventArgs { constructor(entities: any); get_entities(): any; } + // tslint:disable-next-line: interface-name export interface ISelectorComponent { get_selectedEntities(): any; set_selectedEntities(value: any): void; @@ -7053,6 +6969,8 @@ declare namespace SP { removeEntity(ent: SP.UI.ApplicationPages.ResolveEntity): void; setEntity(ent: SP.UI.ApplicationPages.ResolveEntity): void; } + + // tslint:disable-next-line: interface-name export interface ICalendarController { moveToDate(date: string): void; moveToViewType(viewType: string): void; @@ -7142,7 +7060,7 @@ declare namespace SP { } declare namespace SP { - export module UI { + export namespace UI { export class PopoutMenu implements Sys.IDisposable { constructor(launcherId: string, menuId: string, iconId: string, launcherOpenCssClass: string, textDirection: string, closeIconUrl: string, isClustered: boolean, closeIconOffsetLeft: number, closeIconOffsetTop: number, closeIconHeight: number, closeIconWidth: number); launchMenu(): void; @@ -7164,7 +7082,7 @@ declare namespace SP { constructor(); } - export module Notify { + export namespace Notify { export function addNotification(strHtml: string, bSticky: boolean): string; export function removeNotification(nid: string): void; export function showLoadingNotification(bSticky: boolean): string; @@ -7194,7 +7112,7 @@ declare namespace SP { constructor(); } - export module Workspace { + export namespace Workspace { export function add_resized(handler: () => void): void; export function remove_resized(handler: () => void): void; } @@ -7225,10 +7143,9 @@ declare namespace SP { OK } /** Callback which processes dialog result value after dialog is closed */ - export interface DialogReturnValueCallback { - (dialogResult: DialogResult, returnValue: any): void; - } + export type DialogReturnValueCallback = (dialogResult: DialogResult, returnValue: any) => void; /** Options for dialog creation */ + // tslint:disable-next-line: interface-name export interface IDialogOptions { /** Text displayed in the title bar of the dialog box. If not defined, it will default to the title of the page defined by url property. */ title?: string; @@ -7404,21 +7321,21 @@ declare namespace SP { static ButtonIDs: { prev: number; next: number; - } + }; static ButtonState: { - hidden: number + hidden: number; disabled: number; enabled: number; - } + }; } - export module Workplace { - export function add_resized(handler: Function): void; - export function remove_resized(handler: Function): void; + export namespace Workplace { + export function add_resized(handler: (obj: any, args: any) => void): void; + export function remove_resized(handler: (obj: any, args: any) => void): void; } - export module UIUtility { + export namespace UIUtility { export function generateRandomElementId(): string; export function cancelEvent(evt: Event): void; export function clearChildNodes(elem: HTMLElement): void; @@ -7459,12 +7376,13 @@ declare namespace SPNotifications { declare class SPStatusNotificationData { constructor(text: string, subText: string, imageUrl: string, sip: string); } -declare function RefreshCommandUI():void; +declare function RefreshCommandUI(): void; declare namespace SP { - export module UI { - export module Controls { + export namespace UI { + export namespace Controls { + // tslint:disable-next-line: interface-name export interface INavigationOptions { assetId?: string; siteTitle?: string; @@ -7490,6 +7408,7 @@ declare namespace SP { export class NavigationOptions implements INavigationOptions { } + // tslint:disable-next-line: interface-name export interface ISettingsLink { linkUrl: string; displayName: string; @@ -7503,39 +7422,39 @@ declare namespace SP { export class Navigation { constructor(placeholderDOMElementId: string, options: INavigationOptions); - public get_assetId(): string; - public get_siteTitle(): string; - public get_siteUrl(): string; + get_assetId(): string; + get_siteTitle(): string; + get_siteUrl(): string; - public get_appTitle(): string; - public set_appTitle(value: string): string; + get_appTitle(): string; + set_appTitle(value: string): string; - public get_appTitleIconUrl(): string; - public set_appTitleIconUrl(value: string): string; + get_appTitleIconUrl(): string; + set_appTitleIconUrl(value: string): string; - public get_rightToLeft(): boolean; - public set_rightToLeft(value: boolean): boolean; + get_rightToLeft(): boolean; + set_rightToLeft(value: boolean): boolean; - public get_appStartPage(): string; - public set_appStartPage(value: string): string; + get_appStartPage(): string; + set_appStartPage(value: string): string; - public get_appIconUrl(): string; - public set_appIconUrl(value: string): string; + get_appIconUrl(): string; + set_appIconUrl(value: string): string; - public get_appHelpPageUrl(): string; - public set_appHelpPageUrl(value: string): string; + get_appHelpPageUrl(): string; + set_appHelpPageUrl(value: string): string; - public get_appHelpPageOnClick(): string; - public set_appHelpPageOnClick(value: string): string; + get_appHelpPageOnClick(): string; + set_appHelpPageOnClick(value: string): string; - public get_settingsLinks(): ISettingsLink[]; - public set_settingsLinks(value: ISettingsLink[]): ISettingsLink[]; + get_settingsLinks(): ISettingsLink[]; + set_settingsLinks(value: ISettingsLink[]): ISettingsLink[]; - public setVisible(value: boolean): void; + setVisible(value: boolean): void; - public setTopHeaderVisible(value: boolean): void; - public setBottomHeaderVisible(value: boolean): void; - public remove(): void; + setTopHeaderVisible(value: boolean): void; + setBottomHeaderVisible(value: boolean): void; + remove(): void; static getVersionedLayoutsUrl(pageName: string): string; } @@ -7550,7 +7469,7 @@ declare namespace SP { declare namespace SP { - export module UserProfiles { + export namespace UserProfiles { /** Specifies types of changes made in the user profile store. */ export enum ChangeTypes { /** No change was made */ @@ -7979,7 +7898,7 @@ declare namespace SP { declare namespace SP { - export module Utilities { + export namespace Utilities { export class Utility { lAYOUTS_LATESTVERSION_RELATIVE_URL: string; lAYOUTS_LATESTVERSION_URL: string; @@ -8137,7 +8056,7 @@ declare namespace SP { } - export module DateTimeUtil { + export namespace DateTimeUtil { export class SimpleDate { constructor(year: number, month: number, day: number, era: number); get_year(): number; @@ -8158,7 +8077,7 @@ declare namespace SP { } declare namespace SP { - export module WebParts { + export namespace WebParts { export class LimitedWebPartManager extends SP.ClientObject { get_hasPersonalizedParts(): boolean; get_scope(): SP.WebParts.PersonalizationScope; @@ -8218,7 +8137,7 @@ declare namespace SP { } declare namespace SP { - export module Workflow { + export namespace Workflow { export class WorkflowAssociation extends SP.ClientObject { get_allowManual(): boolean; set_allowManual(value: boolean): void; @@ -8616,41 +8535,40 @@ declare namespace SP.WorkflowServices { declare namespace SP { - export module Publishing { + export namespace Publishing { export class PublishingWeb extends ClientObject { static getPublishingWeb(context: ClientContext, web: Web): PublishingWeb; - public get_web(): Web; - public addPublishingPage(pageInformation: PublishingPageInformation): PublishingPage; + get_web(): Web; + addPublishingPage(pageInformation: PublishingPageInformation): PublishingPage; } export class PublishingPageInformation extends ClientValueObject { + get_folder(): Folder; + set_folder(value: Folder): Folder; - public get_folder(): Folder; - public set_folder(value: Folder): Folder; + get_name(): string; + set_name(value: string): string; - public get_name(): string; - public set_name(value: string): string; - - public get_pageLayoutListItem(): ListItem; - public set_pageLayoutListItem(value: ListItem): ListItem; + get_pageLayoutListItem(): ListItem; + set_pageLayoutListItem(value: ListItem): ListItem; } export class PublishingPage extends ScheduledItem { static getPublishingPage(context: ClientContext, sourceListItem: ListItem): PublishingPage; - public addFriendlyUrl(friendlyUrlSegment: string, editableParent: Navigation.NavigationTermSetItem, doAddToNavigation: boolean): StringResult; + addFriendlyUrl(friendlyUrlSegment: string, editableParent: Navigation.NavigationTermSetItem, doAddToNavigation: boolean): StringResult; } export class ScheduledItem extends ClientObject { - public get_listItem(): ListItem; + get_listItem(): ListItem; - public get_startDate(): Date; - public set_startDate(value: Date): Date; + get_startDate(): Date; + set_startDate(value: Date): Date; - public get_endDate(): Date; - public set_endDate(value: Date): Date; + get_endDate(): Date; + set_endDate(value: Date): Date; - public schedule(approvalComment: string): void; + schedule(approvalComment: string): void; } export class PublishingSite extends ClientObject { @@ -8658,20 +8576,20 @@ declare namespace SP { } export class PageLayoutCreationInformation extends ClientValueObject { - public get_web(): Web; - public set_web(value: Web): Web; + get_web(): Web; + set_web(value: Web): Web; - public get_associatedContentTypeId(): string; - public set_associatedContentTypeId(value: string): string; + get_associatedContentTypeId(): string; + set_associatedContentTypeId(value: string): string; - public get_masterPageUrl(): string; - public set_masterPageUrl(value: string): string; + get_masterPageUrl(): string; + set_masterPageUrl(value: string): string; - public get_newPageLayoutNameWithoutExtension(): string; - public set_newPageLayoutNameWithoutExtension(value: string): string; + get_newPageLayoutNameWithoutExtension(): string; + set_newPageLayoutNameWithoutExtension(value: string): string; - public get_newPageLayoutEditablePath(): string; - public set_newPageLayoutEditablePath(value: string): string; + get_newPageLayoutEditablePath(): string; + set_newPageLayoutEditablePath(value: string): string; } export class SiteServicesAddins { @@ -8687,45 +8605,45 @@ declare namespace SP { export class AddinSettings extends ClientObject { constructor(ctx: ClientContext, id: Guid); - public get_id(): Guid; + get_id(): Guid; - public get_title(): string; - public set_title(value: string): string; + get_title(): string; + set_title(value: string): string; - public get_description(): string; - public set_description(value: string): string; + get_description(): string; + set_description(value: string): string; - public get_enabled(): boolean; - public set_enabled(value: boolean): boolean; + get_enabled(): boolean; + set_enabled(value: boolean): boolean; - public get_namespace(): boolean; - public set_namespace(value: boolean): boolean; + get_namespace(): boolean; + set_namespace(value: boolean): boolean; - public get_headScript(): string; - public set_headScript(value: string): string; + get_headScript(): string; + set_headScript(value: string): string; - public get_htmlStartBody(): string; - public set_htmlStartBody(value: string): string; + get_htmlStartBody(): string; + set_htmlStartBody(value: string): string; - public get_htmlEndBody(): string; - public set_htmlEndBody(value: string): string; + get_htmlEndBody(): string; + set_htmlEndBody(value: string): string; - public get_metaTagPagePropertyMappings(): { [key: string]: string }; - public set_metaTagPagePropertyMappings(value: { [key: string]: string }): { [key: string]: string }; + get_metaTagPagePropertyMappings(): { [key: string]: string }; + set_metaTagPagePropertyMappings(value: { [key: string]: string }): { [key: string]: string }; } export class AddinPlugin extends ClientObject { constructor(ctx: ClientContext); - public get_description(): string; - public set_description(value: string): string; + get_description(): string; + set_description(value: string): string; - public get_markup(): string; - public set_markup(value: string): string; + get_markup(): string; + set_markup(value: string): string; - public get_title(): string; - public set_title(value: string): string; + get_title(): string; + set_title(value: string): string; } @@ -8738,17 +8656,17 @@ declare namespace SP { } export class DesignPackageInfo extends ClientValueObject { - public get_packageName(): string; - public set_packageName(value: string): string; + get_packageName(): string; + set_packageName(value: string): string; - public get_packageGuid(): Guid; - public set_packageGuid(value: Guid): Guid; + get_packageGuid(): Guid; + set_packageGuid(value: Guid): Guid; - public get_majorVersion(): number; - public set_majorVersion(value: number): number; + get_majorVersion(): number; + set_majorVersion(value: number): number; - public get_minorVersion(): number; - public set_minorVersion(value: number): number; + get_minorVersion(): number; + set_minorVersion(value: number): number; } export class SiteImageRenditions { @@ -8757,17 +8675,17 @@ declare namespace SP { } export class ImageRendition extends ClientValueObject { - public get_id(): number; - public get_version(): number; + get_id(): number; + get_version(): number; - public get_name(): string; - public set_name(value: string): string; + get_name(): string; + set_name(value: string): string; - public get_width(): number; - public set_width(value: number): number; + get_width(): number; + set_width(value: number): number; - public get_height(): number; - public set_height(value: number): number; + get_height(): number; + set_height(value: number): number; } export class Variations extends ClientObject { @@ -8777,38 +8695,38 @@ declare namespace SP { } export class VariationLabel extends ClientObject { - public get_displayName(): string; - public set_displayName(value: string): string; + get_displayName(): string; + set_displayName(value: string): string; - public get_isSource(): boolean; - public set_isSource(value: boolean): boolean; + get_isSource(): boolean; + set_isSource(value: boolean): boolean; - public get_language(): string; - public set_language(value: string): string; + get_language(): string; + set_language(value: string): string; - public get_locale(): string; - public set_locale(value: string): string; + get_locale(): string; + set_locale(value: string): string; - public get_title(): string; - public set_title(value: string): string; + get_title(): string; + set_title(value: string): string; - public get_topWebUrl(): string; - public set_topWebUrl(value: string): string; + get_topWebUrl(): string; + set_topWebUrl(value: string): string; } export class CustomizableString extends ClientObject { - public get_defaultValue(): string; + get_defaultValue(): string; - public get_value(): string; - public set_value(value: string): string; + get_value(): string; + set_value(value: string): string; - public get_usesDefaultValue(): boolean; - public set_usesDefaultValue(value: boolean): boolean; + get_usesDefaultValue(): boolean; + set_usesDefaultValue(value: boolean): boolean; } - export module Navigation { + export namespace Navigation { export enum NavigationLinkType { root, friendlyUrl, @@ -8823,30 +8741,30 @@ declare namespace SP { } export class NavigationTermSetItem extends ClientObject { - public get_id(): Guid; + get_id(): Guid; - public get_isReadOnly(): boolean; + get_isReadOnly(): boolean; - public get_linkType(): NavigationLinkType; - public set_linkType(value: NavigationLinkType): NavigationLinkType; + get_linkType(): NavigationLinkType; + set_linkType(value: NavigationLinkType): NavigationLinkType; - public get_targetUrlForChildTerms(): CustomizableString; + get_targetUrlForChildTerms(): CustomizableString; - public get_catalogTargetUrlForChildTerms(): CustomizableString; + get_catalogTargetUrlForChildTerms(): CustomizableString; - public get_taxonomyName(): string; + get_taxonomyName(): string; - public get_title(): CustomizableString; + get_title(): CustomizableString; - public get_terms(): NavigationTermCollection; + get_terms(): NavigationTermCollection; - public get_view(): NavigationTermSetView; + get_view(): NavigationTermSetView; - public createTerm(termName: string, linkType: NavigationLinkType, termId: Guid): Taxonomy.Term; + createTerm(termName: string, linkType: NavigationLinkType, termId: Guid): Taxonomy.Term; - public getTaxonomyTermStore(): Taxonomy.TermStore; + getTaxonomyTermStore(): Taxonomy.TermStore; - public getResolvedDisplayUrl(browserQueryString: string): StringResult; + getResolvedDisplayUrl(browserQueryString: string): StringResult; } export class NavigationTermCollection extends ClientObjectCollection { @@ -8854,60 +8772,60 @@ declare namespace SP { } export class NavigationTerm extends NavigationTermSetItem { - public get_associatedFolderUrl(): string; - public set_associatedFolderUrl(value: string): string; + get_associatedFolderUrl(): string; + set_associatedFolderUrl(value: string): string; - public get_catalogTargetUrl(): CustomizableString; + get_catalogTargetUrl(): CustomizableString; - public get_categoryImageUrl(): string; - public set_categoryImageUrl(value: string): string; + get_categoryImageUrl(): string; + set_categoryImageUrl(value: string): string; - public get_excludedProviders(): NavigationTermProviderNameCollection; + get_excludedProviders(): NavigationTermProviderNameCollection; - public get_excludeFromCurrentNavigation(): boolean; - public set_excludeFromCurrentNavigation(value: boolean): boolean; + get_excludeFromCurrentNavigation(): boolean; + set_excludeFromCurrentNavigation(value: boolean): boolean; - public get_excludeFromGlobalNavigation(): boolean; - public set_excludeFromGlobalNavigation(value: boolean): boolean; + get_excludeFromGlobalNavigation(): boolean; + set_excludeFromGlobalNavigation(value: boolean): boolean; - public get_friendlyUrlSegment(): CustomizableString; + get_friendlyUrlSegment(): CustomizableString; - public get_hoverText(): string; - public set_hoverText(value: string): string; + get_hoverText(): string; + set_hoverText(value: string): string; - public get_isDeprecated(): boolean; - public get_isPinned(): boolean; - public get_isPinnedRoot(): boolean; + get_isDeprecated(): boolean; + get_isPinned(): boolean; + get_isPinnedRoot(): boolean; - public get_parent(): NavigationTerm; + get_parent(): NavigationTerm; - public get_simpleLinkUrl(): string; + get_simpleLinkUrl(): string; - public set_simpleLinkUrl(value: string): string; + set_simpleLinkUrl(value: string): string; - public get_targetUrl(): CustomizableString; + get_targetUrl(): CustomizableString; - public get_termSet(): NavigationTermSet; + get_termSet(): NavigationTermSet; - public getAsEditable(taxonomySession: Taxonomy.TaxonomySession): NavigationTerm; + getAsEditable(taxonomySession: Taxonomy.TaxonomySession): NavigationTerm; - public getWithNewView(newView: NavigationTermSetView): NavigationTerm; + getWithNewView(newView: NavigationTermSetView): NavigationTerm; - public getResolvedTargetUrl(browserQueryString: string, remainingUrlSegments: string[]): StringResult; + getResolvedTargetUrl(browserQueryString: string, remainingUrlSegments: string[]): StringResult; - public getResolvedTargetUrlWithoutQuery(): StringResult; + getResolvedTargetUrlWithoutQuery(): StringResult; - public getResolvedAssociatedFolderUrl(): StringResult; + getResolvedAssociatedFolderUrl(): StringResult; - public getWebRelativeFriendlyUrl(): StringResult; + getWebRelativeFriendlyUrl(): StringResult; - public getAllParentTerms(): NavigationTermCollection; + getAllParentTerms(): NavigationTermCollection; - public getTaxonomyTerm(): Taxonomy.Term; + getTaxonomyTerm(): Taxonomy.Term; - public move(newParent: NavigationTermSetItem): void; + move(newParent: NavigationTermSetItem): void; - public deleteObject(): void; + deleteObject(): void; static getAsResolvedByWeb(context: ClientContext, term: Taxonomy.Term, web: Web, siteMapProviderName: string): NavigationTerm; static getAsResolvedByView(context: ClientContext, term: Taxonomy.Term, view: NavigationTermSetView): NavigationTerm; @@ -8915,25 +8833,25 @@ declare namespace SP { export class NavigationTermSet extends NavigationTermSetItem { - public get_isNavigationTermSet(): boolean; - public set_isNavigationTermSet(value: boolean): boolean; + get_isNavigationTermSet(): boolean; + set_isNavigationTermSet(value: boolean): boolean; - public get_lcid(): number; + get_lcid(): number; - public get_loadedFromPersistedData(): boolean; + get_loadedFromPersistedData(): boolean; - public get_termGroupId(): Guid; - public get_termStoreId(): Guid; + get_termGroupId(): Guid; + get_termStoreId(): Guid; - public getAsEditable(taxonomySession: Taxonomy.TaxonomySession): NavigationTermSet; + getAsEditable(taxonomySession: Taxonomy.TaxonomySession): NavigationTermSet; - public getWithNewView(newView: NavigationTermSetView): NavigationTermSet; + getWithNewView(newView: NavigationTermSetView): NavigationTermSet; - public getTaxonomyTermSet(): Taxonomy.TermSet; + getTaxonomyTermSet(): Taxonomy.TermSet; - public getAllTerms(): NavigationTermCollection; + getAllTerms(): NavigationTermCollection; - public findTermForUrl(url: string): NavigationTerm; + findTermForUrl(url: string): NavigationTerm; static getAsResolvedByWeb(context: ClientContext, termSet: Taxonomy.TermSet, web: Web, siteMapProviderName: string): NavigationTermSet; static getAsResolvedByView(context: ClientContext, termSet: Taxonomy.TermSet, view: NavigationTermSetView): NavigationTermSet; @@ -8941,34 +8859,34 @@ declare namespace SP { export class NavigationTermProviderNameCollection extends ClientObjectCollection { - public Add(item: string): void; - public Clear(): void; - public Remove(item: string): BooleanResult; + Add(item: string): void; + Clear(): void; + Remove(item: string): BooleanResult; } export class NavigationTermSetView extends ClientObject { constructor(context: ClientContext, web: Web, siteMapProviderName: string); - public get_excludeDeprecatedTerms(): boolean; - public set_excludeDeprecatedTerms(value: boolean): boolean; + get_excludeDeprecatedTerms(): boolean; + set_excludeDeprecatedTerms(value: boolean): boolean; - public get_excludeTermsByPermissions(): boolean; - public set_excludeTermsByPermissions(value: boolean): boolean; + get_excludeTermsByPermissions(): boolean; + set_excludeTermsByPermissions(value: boolean): boolean; - public get_excludeTermsByProvider(): boolean; - public set_excludeTermsByProvider(value: boolean): boolean; + get_excludeTermsByProvider(): boolean; + set_excludeTermsByProvider(value: boolean): boolean; - public get_serverRelativeSiteUrl(): string; + get_serverRelativeSiteUrl(): string; - public get_serverRelativeWebUrl(): string; + get_serverRelativeWebUrl(): string; - public get_siteMapProviderName(): string; - public set_siteMapProviderName(value: string): string; + get_siteMapProviderName(): string; + set_siteMapProviderName(value: string): string; - public get_webId(): Guid; - public get_webTitle(): string; + get_webId(): Guid; + get_webTitle(): string; - public getCopy(): NavigationTermSetView; + getCopy(): NavigationTermSetView; static createEmptyInstance(context: ClientContext): NavigationTermSetView; } @@ -8986,29 +8904,29 @@ declare namespace SP { export class WebNavigationSettings extends ClientObject { constructor(context: ClientContext, web: Web); - public get_addNewPagesToNavigation(): boolean; - public set_addNewPagesToNavigation(value: boolean): boolean; + get_addNewPagesToNavigation(): boolean; + set_addNewPagesToNavigation(value: boolean): boolean; - public get_createFriendlyUrlsForNewPages(): boolean; - public set_createFriendlyUrlsForNewPages(value: boolean): boolean; + get_createFriendlyUrlsForNewPages(): boolean; + set_createFriendlyUrlsForNewPages(value: boolean): boolean; - public get_currentNavigation(): StandardNavigationSettings; - public get_globalNavigation(): StandardNavigationSettings; + get_currentNavigation(): StandardNavigationSettings; + get_globalNavigation(): StandardNavigationSettings; - public update(taxonomySession: Taxonomy.TaxonomySession): void; - public resetToDefaults(): void; + update(taxonomySession: Taxonomy.TaxonomySession): void; + resetToDefaults(): void; } export class StandardNavigationSettings extends ClientObject { - public get_termSetId(): Guid; - public set_termSetId(value: Guid): Guid; + get_termSetId(): Guid; + set_termSetId(value: Guid): Guid; - public get_termStoreId(): Guid; - public set_termStoreId(value: Guid): Guid; + get_termStoreId(): Guid; + set_termStoreId(value: Guid): Guid; - public get_source(): StandardNavigationSource; + get_source(): StandardNavigationSource; - public set_source(value: StandardNavigationSource): StandardNavigationSource; + set_source(value: StandardNavigationSource): StandardNavigationSource; } } @@ -9016,11 +8934,11 @@ declare namespace SP { } declare namespace SP { - export module CompliancePolicy { + export namespace CompliancePolicy { export enum SPContainerType { - site,//: 0, - web,//: 1, - list//: 2 + site, //: 0, + web, //: 1, + list //: 2 } export class SPContainerId extends ClientObject { @@ -9282,13 +9200,13 @@ declare namespace SP { } - export module Discovery { + export namespace Discovery { export enum ExportStatus { - notStarted,//: 0, - started,//: 1, - complete,//: 2, - failed//: 3 + notStarted, //: 0, + started, //: 1, + complete, //: 2, + failed //: 3 } export class Case extends ClientObject { @@ -9304,7 +9222,7 @@ declare namespace SP { } } - export module InformationPolicy { + export namespace InformationPolicy { export class ProjectPolicy extends SP.ClientObject { constructor(context: ClientRuntimeContext, objectPath: ObjectPath); get_description(): string; @@ -9341,30 +9259,30 @@ declare class SPClientAutoFill { Footer: number; Separator: number; Loading: number; - } + }; static KeyProperty: string; //= 'AutoFillKey'; - static DisplayTextProperty: string;// = 'AutoFillDisplayText'; + static DisplayTextProperty: string; //= 'AutoFillDisplayText'; static SubDisplayTextProperty: string; //= 'AutoFillSubDisplayText'; static TitleTextProperty: string; //= 'AutoFillTitleText'; - static MenuOptionTypeProperty: string;//= 'AutoFillMenuOptionType'; + static MenuOptionTypeProperty: string; //= 'AutoFillMenuOptionType'; static GetAutoFillObjFromInput(elmText: HTMLInputElement): SPClientAutoFill; static GetAutoFillObjFromContainer(elmChild: HTMLElement): SPClientAutoFill; static GetAutoFillMenuItemFromOption(elmChild: HTMLElement): HTMLElement; constructor(elmTextId: string, elmContainerId: string, fnPopulateAutoFill: (targetElement: HTMLInputElement) => void); - public TextElementId: string; - public AutoFillContainerId: string; - public AutoFillMenuId: string; - public VisibleItemCount: number; - public CurrentFocusOption: number; - public AutoFillMinTextLength: number; - public AutoFillTimeout: number; - public AutoFillCallbackTimeoutID: string; - public FuncOnAutoFillClose: (elmTextId: string, ojData: ISPClientAutoFillData) => void; - public FuncPopulateAutoFill: (targetElement: HTMLElement) => void; - public AllOptionData: { [key: string]: ISPClientAutoFillData }; + TextElementId: string; + AutoFillContainerId: string; + AutoFillMenuId: string; + VisibleItemCount: number; + CurrentFocusOption: number; + AutoFillMinTextLength: number; + AutoFillTimeout: number; + AutoFillCallbackTimeoutID: string; + FuncOnAutoFillClose: (elmTextId: string, ojData: ISPClientAutoFillData) => void; + FuncPopulateAutoFill: (targetElement: HTMLElement) => void; + AllOptionData: { [key: string]: ISPClientAutoFillData }; PopulateAutoFill(jsonObjSuggestions: ISPClientAutoFillData[], fnOnAutoFillCloseFuncName: (elmTextId: string, objData: ISPClientAutoFillData) => void): void; IsAutoFillOpen(): boolean; @@ -9377,6 +9295,7 @@ declare class SPClientAutoFill { UpdateAutoFillPosition(): void; } +// tslint:disable-next-line: interface-name interface ISPClientAutoFillData { AutoFillKey?: any; AutoFillDisplayText?: string; @@ -9418,101 +9337,102 @@ declare class SPClientPeoplePicker { static CreateSPPrincipalType(acctStr: string): number; - public TopLevelElementId: string; // '', - public EditorElementId: string; //'', - public AutoFillElementId: string; //'', - public ResolvedListElementId: string; //'', - public InitialHelpTextElementId: string; //'', - public WaitImageId: string; //'', - public HiddenInputId: string; //'', - public AllowEmpty: boolean; //true, - public ForceClaims: boolean; //false, - public AutoFillEnabled: boolean; //true, - public AllowMultipleUsers: boolean; //false, - public OnValueChangedClientScript: (pickerElementId: string, users: ISPClientPeoplePickerEntity[]) => void; - public OnUserResolvedClientScript: (pickerElementId: string, users: ISPClientPeoplePickerEntity[]) => void; - public OnControlValidateClientScript: (pickerElementId: string, users: ISPClientPeoplePickerEntity[]) => void; - public UrlZone: SP.UrlZone; //null, - public AllUrlZones: boolean; //false, - public SharePointGroupID: number; //0, - public AllowEmailAddresses: boolean; //false, - public PPMRU: SPClientPeoplePickerMRU; - public UseLocalSuggestionCache: boolean; //true, - public CurrentQueryStr: string; //'', - public LatestSearchQueryStr: string; // '', - public InitialSuggestions: ISPClientPeoplePickerEntity[]; - public CurrentLocalSuggestions: ISPClientPeoplePickerEntity[]; - public CurrentLocalSuggestionsDict: ISPClientPeoplePickerEntity; - public VisibleSuggestions: number; //5, - public PrincipalAccountType: string; //'', - public PrincipalAccountTypeEnum: SP.Utilities.PrincipalType; - public EnabledClaimProviders: string; //'', - public SearchPrincipalSource: SP.Utilities.PrincipalSource; //null, - public ResolvePrincipalSource: SP.Utilities.PrincipalSource; //null, - public MaximumEntitySuggestions: number; //30, - public EditorWidthSet: boolean; //false, - public QueryScriptInit: boolean; //false, - public AutoFillControl: SPClientAutoFill; //null, - public TotalUserCount: number; //0, - public UnresolvedUserCount: number; //0, - public UserQueryDict: { [index: string]: SP.StringResult }; - public ProcessedUserList: { [index: string]: SPClientPeoplePickerProcessedUser }; - public HasInputError: boolean; //false, - public HasServerError: boolean; //false, - public ShowUserPresence: boolean; //true, - public TerminatingCharacter: string; //';', - public UnresolvedUserElmIdToReplace: string; //'', - public WebApplicationID: SP.Guid; //'{00000000-0000-0000-0000-000000000000}', - public GetAllUserInfo(): ISPClientPeoplePickerEntity[]; + TopLevelElementId: string; // '', + EditorElementId: string; //'', + AutoFillElementId: string; //'', + ResolvedListElementId: string; //'', + InitialHelpTextElementId: string; //'', + WaitImageId: string; //'', + HiddenInputId: string; //'', + AllowEmpty: boolean; //true, + ForceClaims: boolean; //false, + AutoFillEnabled: boolean; //true, + AllowMultipleUsers: boolean; //false, + OnValueChangedClientScript: (pickerElementId: string, users: ISPClientPeoplePickerEntity[]) => void; + OnUserResolvedClientScript: (pickerElementId: string, users: ISPClientPeoplePickerEntity[]) => void; + OnControlValidateClientScript: (pickerElementId: string, users: ISPClientPeoplePickerEntity[]) => void; + UrlZone: SP.UrlZone; //null, + AllUrlZones: boolean; //false, + SharePointGroupID: number; //0, + AllowEmailAddresses: boolean; //false, + PPMRU: SPClientPeoplePickerMRU; + UseLocalSuggestionCache: boolean; //true, + CurrentQueryStr: string; //'', + LatestSearchQueryStr: string; // '', + InitialSuggestions: ISPClientPeoplePickerEntity[]; + CurrentLocalSuggestions: ISPClientPeoplePickerEntity[]; + CurrentLocalSuggestionsDict: ISPClientPeoplePickerEntity; + VisibleSuggestions: number; //5, + PrincipalAccountType: string; //'', + PrincipalAccountTypeEnum: SP.Utilities.PrincipalType; + EnabledClaimProviders: string; //'', + SearchPrincipalSource: SP.Utilities.PrincipalSource; //null, + ResolvePrincipalSource: SP.Utilities.PrincipalSource; //null, + MaximumEntitySuggestions: number; //30, + EditorWidthSet: boolean; //false, + QueryScriptInit: boolean; //false, + AutoFillControl: SPClientAutoFill; //null, + TotalUserCount: number; //0, + UnresolvedUserCount: number; //0, + UserQueryDict: { [index: string]: SP.StringResult }; + ProcessedUserList: { [index: string]: SPClientPeoplePickerProcessedUser }; + HasInputError: boolean; //false, + HasServerError: boolean; //false, + ShowUserPresence: boolean; //true, + TerminatingCharacter: string; //';', + UnresolvedUserElmIdToReplace: string; //'', + WebApplicationID: SP.Guid; //'{00000000-0000-0000-0000-000000000000}', + GetAllUserInfo(): ISPClientPeoplePickerEntity[]; - public SetInitialValue(entities: ISPClientPeoplePickerEntity[], initialErrorMsg?: string): void - public AddUserKeys(userKeys: string, bSearch: boolean): void; - public BatchAddUserKeysOperation(allKeys: string[], numProcessed: number): void; - public ResolveAllUsers(fnContinuation: () => void): void; - public ExecutePickerQuery(queryIds: string, onSuccess: (queryId: string, result: SP.StringResult) => void, onFailure: (queryId: string, result: SP.StringResult) => void, fnContinuation: () => void): void; - public AddUnresolvedUserFromEditor(bRunQuery?: boolean): void; - public AddUnresolvedUser(unresolvedUserObj: ISPClientPeoplePickerEntity, bRunQuery?: boolean): void; - public UpdateUnresolvedUser(results: SP.StringResult, user: ISPClientPeoplePickerEntity): void; - public AddPickerSearchQuery(queryStr: string): string; - public AddPickerResolveQuery(queryStr: string): string; - public GetPeoplePickerQueryParameters(): SP.UI.ApplicationPages.ClientPeoplePickerQueryParameters; - public AddProcessedUser(userObject: ISPClientPeoplePickerEntity, fResolved?: boolean): string; - public DeleteProcessedUser(elmToRemove: HTMLElement): void; - public OnControlValueChanged(): void; - public OnControlResolvedUserChanged(): void; - public EnsureAutoFillControl(): void; - public ShowAutoFill(resultsTable: ISPClientAutoFillData[]): void; - public FocusAutoFill(): void; - public BlurAutoFill(): void; - public IsAutoFillOpen(): boolean; - public EnsureEditorWidth(): void; - public SetFocusOnEditorEnd(): void; - public ToggleWaitImageDisplay(bShowImage?: boolean): void; - public SaveAllUserKeysToHiddenInput(): void; - public GetCurrentEditorValue(): string; - public GetControlValueAsJSObject(): ISPClientPeoplePickerEntity[]; - public GetAllUserKeys(): string; - public GetControlValueAsText(): string; - public IsEmpty(): boolean; - public IterateEachProcessedUser(fnCallback: (index: number, user: SPClientPeoplePickerProcessedUser) => void): void; - public HasResolvedUsers(): boolean; - public Validate(): void; - public ValidateCurrentState(): void - public GetUnresolvedEntityErrorMessage(): string; - public ShowErrorMessage(msg: string): void; - public ClearServerError(): void; - public SetServerError(): void; - public OnControlValidate(): void; - public SetEnabledState(bEnabled: boolean): void; - public DisplayLocalSuggestions(): void; - public CompileLocalSuggestions(input: string): void; - public PlanningGlobalSearch(): boolean; - public AddLoadingSuggestionMenuOption(): void; - public ShowingLocalSuggestions(): boolean; - public ShouldUsePPMRU(): boolean; - public AddResolvedUserToLocalCache(resolvedEntity: ISPClientPeoplePickerEntity, resolveText: string): void; + SetInitialValue(entities: ISPClientPeoplePickerEntity[], initialErrorMsg?: string): void + AddUserKeys(userKeys: string, bSearch: boolean): void; + BatchAddUserKeysOperation(allKeys: string[], numProcessed: number): void; + ResolveAllUsers(fnContinuation: () => void): void; + ExecutePickerQuery(queryIds: string, onSuccess: (queryId: string, result: SP.StringResult) => void, onFailure: (queryId: string, result: SP.StringResult) => void, fnContinuation: () => void): void; + AddUnresolvedUserFromEditor(bRunQuery?: boolean): void; + AddUnresolvedUser(unresolvedUserObj: ISPClientPeoplePickerEntity, bRunQuery?: boolean): void; + UpdateUnresolvedUser(results: SP.StringResult, user: ISPClientPeoplePickerEntity): void; + AddPickerSearchQuery(queryStr: string): string; + AddPickerResolveQuery(queryStr: string): string; + GetPeoplePickerQueryParameters(): SP.UI.ApplicationPages.ClientPeoplePickerQueryParameters; + AddProcessedUser(userObject: ISPClientPeoplePickerEntity, fResolved?: boolean): string; + DeleteProcessedUser(elmToRemove: HTMLElement): void; + OnControlValueChanged(): void; + OnControlResolvedUserChanged(): void; + EnsureAutoFillControl(): void; + ShowAutoFill(resultsTable: ISPClientAutoFillData[]): void; + FocusAutoFill(): void; + BlurAutoFill(): void; + IsAutoFillOpen(): boolean; + EnsureEditorWidth(): void; + SetFocusOnEditorEnd(): void; + ToggleWaitImageDisplay(bShowImage?: boolean): void; + SaveAllUserKeysToHiddenInput(): void; + GetCurrentEditorValue(): string; + GetControlValueAsJSObject(): ISPClientPeoplePickerEntity[]; + GetAllUserKeys(): string; + GetControlValueAsText(): string; + IsEmpty(): boolean; + IterateEachProcessedUser(fnCallback: (index: number, user: SPClientPeoplePickerProcessedUser) => void): void; + HasResolvedUsers(): boolean; + Validate(): void; + ValidateCurrentState(): void + GetUnresolvedEntityErrorMessage(): string; + ShowErrorMessage(msg: string): void; + ClearServerError(): void; + SetServerError(): void; + OnControlValidate(): void; + SetEnabledState(bEnabled: boolean): void; + DisplayLocalSuggestions(): void; + CompileLocalSuggestions(input: string): void; + PlanningGlobalSearch(): boolean; + AddLoadingSuggestionMenuOption(): void; + ShowingLocalSuggestions(): boolean; + ShouldUsePPMRU(): boolean; + AddResolvedUserToLocalCache(resolvedEntity: ISPClientPeoplePickerEntity, resolveText: string): void; } +// tslint:disable-next-line: interface-name interface ISPClientPeoplePickerSchema { TopLevelElementId?: string; EditorElementId?: string; @@ -9562,16 +9482,17 @@ interface ISPClientPeoplePickerSchema { } declare class SPClientPeoplePickerMRU { - static PPMRUVersion: number;// = 1; - static MaxPPMRUItems: number;// = 200; - static PPMRUDomLocalStoreKey: string;// = "ClientPeoplePickerMRU"; + static PPMRUVersion: number; //= 1; + static MaxPPMRUItems: number; //= 200; + static PPMRUDomLocalStoreKey: string; //= "ClientPeoplePickerMRU"; static GetSPClientPeoplePickerMRU(): SPClientPeoplePickerMRU; - GetItems(strKey: string): Object[]; - SetItem(strSearchTerm: string, objEntity: Object): void; + GetItems(strKey: string): { Key: string, [name: string]: any }; + SetItem(strSearchTerm: string, objEntity: T): void; ResetCache(): void; } +// tslint:disable-next-line: interface-name interface ISPClientPeoplePickerEntity { Key?: string; Description?: string; @@ -9592,23 +9513,23 @@ interface ISPClientPeoplePickerEntity { } declare class SPClientPeoplePickerProcessedUser { - UserContainerElementId: string;// '', - DisplayElementId: string;// '', - PresenceElementId: string;// '', - DeleteUserElementId: string;// '', - SID: string;// '', - DisplayName: string;// '', - SIPAddress: string;// '', - UserInfo: ISPClientPeoplePickerEntity;// null, - ResolvedUser: boolean;// true, - Suggestions: ISPClientAutoFillData[];// null, - ErrorDescription: string;// '', - ResolveText: string;// '', - public UpdateResolvedUser(newUserInfo: ISPClientPeoplePickerEntity, strNewElementId: string): void; - public UpdateSuggestions(entity: ISPClientPeoplePickerEntity): void; - public BuildUserHTML(): string; - public UpdateUserMaxWidth(): void; - public ResolvedAsUnverifiedEmail(): string; + UserContainerElementId: string; //'', + DisplayElementId: string; //'', + PresenceElementId: string; //'', + DeleteUserElementId: string; //'', + SID: string; //'', + DisplayName: string; //'', + SIPAddress: string; //'', + UserInfo: ISPClientPeoplePickerEntity; //null, + ResolvedUser: boolean; //true, + Suggestions: ISPClientAutoFillData[]; //null, + ErrorDescription: string; //'', + ResolveText: string; //'', + UpdateResolvedUser(newUserInfo: ISPClientPeoplePickerEntity, strNewElementId: string): void; + UpdateSuggestions(entity: ISPClientPeoplePickerEntity): void; + BuildUserHTML(): string; + UpdateUserMaxWidth(): void; + ResolvedAsUnverifiedEmail(): string; static BuildUserPresenceHtml(elmId: string, strSip: string, bResolved?: boolean): string; static GetUserContainerElement(elmChild: HTMLElement): HTMLElement; @@ -9619,9 +9540,9 @@ declare class SPClientPeoplePickerProcessedUser { } declare namespace Microsoft { - export module Office { - export module Server { - export module ReputationModel { + export namespace Office { + export namespace Server { + export namespace ReputationModel { export class Reputation { constructor(); static setLike(context: SP.ClientContext, listId: string, itemId: number, like: boolean): void; @@ -9636,10 +9557,10 @@ declare namespace Microsoft { declare namespace Define { export function loadScript(url: string, successCallback: () => void, errCallback: () => void): void; /** Loads script from _layouts/15/[req].js */ - export function require(req: string, callback: Function): void; + export function require(req: string, callback: (arg: any[]) => void): void; /** Loads script from _layouts/15/[req].js */ - export function require(req: string[], callback: Function): void; - export function define(name: string, deps: string[], def: Function): void; + export function require(req: string[], callback: (...args: any[]) => void): void; + export function define(name: string, deps: string[], def: (...args: any[]) => any): void; } /** Available only in SharePoint Online*/ @@ -9695,7 +9616,7 @@ declare namespace DOM { export function GetEventSrcElement(evt: Event): HTMLElement; export function GetInnerText(el: HTMLElement): string; export function PreventDefaultNavigation(evt: Event): void; - export function SetEvent(eventName: string, eventFunc: Function, el: HTMLElement): void; + export function SetEvent(eventName: string, eventFunc: (eventName: string, fnContent: (evt: Event) => void, window?: Window) => void, el: HTMLElement): void; } /** Available only in SharePoint Online*/ @@ -9712,7 +9633,7 @@ declare namespace Encoding { /** Available only in SharePoint Online*/ declare namespace IE8Support { export function arrayIndexOf(array: T[], item: T, startIdx?: number): number; - export function attachDOMContentLoaded(handler: Function): void; + export function attachDOMContentLoaded(handler: () => void): void; export function getComputedStyle(domObj: HTMLElement, camelStyleName: string, dashStyleName: string): string; export function stopPropagation(evt: Event): void; } @@ -9747,10 +9668,10 @@ declare namespace Nav { export function goToDiscussion(url: string): void; export function onClickHook(evt: Event, topElm: HTMLElement): void; export function pageUrlValidation(url: string, alertString: string): string; - export function parseHash(hash: string): Object; + export function parseHash(hash: string): { [name: string]: string }; export function navigate(url: string): void; export function removeMDSQueryParametersFromUrl(url: string): string; - export function urlFromHashBag(hashObject: Object): string; + export function urlFromHashBag(hashObject: { [name: string]: string }): string; export function wantsNewTab(evt: Event): boolean; } @@ -9760,19 +9681,19 @@ declare namespace URI_Encoding { export function escapeUrlForCallback(str: string): string; } -interface IListItem { +interface ListItem { ID: number; ContentTypeId: string; } /** Available only in SharePoint Online*/ declare namespace ListModule { - export module Util { - export function createViewEditUrl(renderCtx: SPClientTemplates.RenderContext, listItem: IListItem, useEditFormUrl?: boolean, appendSource?: boolean): string; - export function createItemPropertiesTitle(renderCtx: SPClientTemplates.RenderContext, listItem: IListItem): string; + export namespace Util { + export function createViewEditUrl(renderCtx: SPClientTemplates.RenderContext, listItem: ListItem, useEditFormUrl?: boolean, appendSource?: boolean): string; + export function createItemPropertiesTitle(renderCtx: SPClientTemplates.RenderContext, listItem: ListItem): string; export function clearSelectedItemsDict(context: any): void; export function ctxInitItemState(context: any): void; - export function getAttributeFromItemTable(itemTableParam: HTMLElement, strAttributeName: string, strAttributeOldName: string): string + export function getAttributeFromItemTable(itemTableParam: HTMLElement, strAttributeName: string, strAttributeOldName: string): string; export function getSelectedItemsDict(context: any): any; export function removeOnlyPagingArgs(url: string): string; export function removePagingArgs(url: string): string; @@ -9783,13 +9704,13 @@ declare namespace ListModule { /** Available only in SharePoint Online*/ declare namespace SPThemeUtils { export function ApplyCurrentTheme(): void; - export function WithCurrentTheme(resultCallback: Function): void; + export function WithCurrentTheme(resultCallback: (themesCache: any) => void): void; export function UseClientSideTheming(): boolean; export function Suspend(): void; } declare namespace SP { - export module JsGrid { + export namespace JsGrid { export enum TextDirection { Default, //0, @@ -9863,13 +9784,13 @@ declare namespace SP { None //0 } - export module RowHeaderStyleId { + export namespace RowHeaderStyleId { export var Transfer: string; //'Transfer', export var Conflict: string; //'Conflict' } - export module RowHeaderAutoStyleId { + export namespace RowHeaderAutoStyleId { export var Dirty: string; //'Dirty', export var Error: string; //'Error', export var NewRow: string; //'NewRow' @@ -9898,7 +9819,7 @@ declare namespace SP { PropBoth //4 } - export module UserAction { + export namespace UserAction { export var UserEdit: string; //'User Edit':string; export var DeleteRecord: string; //'Delete Record':string; export var InsertRecord: string; //'Insert Record':string; @@ -9914,6 +9835,7 @@ declare namespace SP { ReadOnlyDisabled, //1 } + // tslint:disable-next-line: interface-name export interface IValue { data?: any; localized?: string; @@ -9974,14 +9896,14 @@ declare namespace SP { /** Switches the currently selected cell into edit mode: displays edit control and sets focus into it. Returns true if success. */ TryBeginEdit(): boolean; - FinalizeEditing(fnContinue: Function, fnError: Function): void; + FinalizeEditing(fnContinue: () => void, fnError: () => void): void; /** Get diff tracker object that tracks changes to the grid data. */ GetDiffTracker(): SP.JsGrid.Internal.DiffTracker; /** Moves focus to the JsGrid control */ Focus(): void; /** Try saving the new record row (aka entry row) if it was edited. */ - TryCommitFirstEntryRecords(fnCommitComplete: { (): void }): void; + TryCommitFirstEntryRecords(fnCommitComplete: () => void): void; /** Removes all new record rows (aka entry rows), including unsaved and even empty ones. The latter seems to be a bug, as I haven't found any easy way to restore the empty entry row. */ ClearUncommitedEntryRecords(): void; @@ -10036,7 +9958,7 @@ declare namespace SP { ToggleExpandCollapse(recordKey: number): void; /** Attach event handler to a particular event type */ - AttachEvent(eventType: JsGrid.EventType, fnOnEvent: { (args: IEventArgs): void }): void; + AttachEvent(eventType: JsGrid.EventType, fnOnEvent: (args: IEventArgs) => void): void; /** Detach a previously set event handler */ DetachEvent(eventType: JsGrid.EventType, fnOnEvent: any): void; @@ -10138,11 +10060,11 @@ declare namespace SP { If minId is specified, method searches for an error with first id which is greater than minId. Scrolls to the Returns the id of the found record. If there aren't any errors, that satisfy the conditions, method does nothing and returns null. */ - ScrollToAndExpandNextError(minId?: number, fnFilter?: { (recordKey: number, fieldKey: string, id: number): boolean }): any; + ScrollToAndExpandNextError(minId?: number, fnFilter?: (recordKey: number, fieldKey: string, id: number) => boolean): any; /** Same as ScrollToAndExpandNextError, but searches within the specified record. recordKey should be not null, otherwise you'll get an exception. bDontExpand controls whether the error tooltip will be shown (if bDontExpand=true, tooltip will not be shown). */ - ScrollToAndExpandNextErrorOnRecord(minId?: number, recordKey?: number, fnFilter?: { (recordKey: number, fieldKey: string, id: number): boolean }, bDontExpand?: boolean): any; + ScrollToAndExpandNextErrorOnRecord(minId?: number, recordKey?: number, fnFilter?: (recordKey: number, fieldKey: string, id: number) => boolean, bDontExpand?: boolean): any; GetFocusedItem(): any; SendKeyDownEvent(eventInfo: Sys.UI.DomEvent): any; @@ -10192,6 +10114,7 @@ declare namespace SP { GetSpCsrRenderCtx(): any; } + // tslint:disable-next-line: interface-name export interface IChangeKey { Reserve(): void; Release(): void; @@ -10277,11 +10200,11 @@ declare namespace SP { } export class RowHeaderState { - constructor(id: string, img: SP.JsGrid.Image, priority: SP.JsGrid.RowHeaderStatePriorities, tooltip: string, fnOnClick: { (eventInfo: Sys.UI.DomEvent, recordKey: number): void }); + constructor(id: string, img: SP.JsGrid.Image, priority: SP.JsGrid.RowHeaderStatePriorities, tooltip: string, fnOnClick: (eventInfo: Sys.UI.DomEvent, recordKey: number) => void); GetId(): string; GetImg(): SP.JsGrid.Image; GetPriority(): SP.JsGrid.RowHeaderStatePriorities; - GetOnClick(): { (eventInfo: Sys.UI.DomEvent, recordKey: number): void }; + GetOnClick(): (eventInfo: Sys.UI.DomEvent, recordKey: number) => void; GetTooltip(): string; toString(): string; } @@ -10298,11 +10221,11 @@ declare namespace SP { bIsAnimated: boolean; /** Renders the image with specified alternative text and on-click handler. If bHideTooltip == false, then alternative text is also shown as the tooltip (title attribute). */ - Render(altText: string, clickFn: { (eventInfo: Sys.UI.DomEvent): void }, bHideTooltip: boolean): HTMLElement; + Render(altText: string, clickFn: (eventInfo: Sys.UI.DomEvent) => void, bHideTooltip: boolean): HTMLElement; } - + // tslint:disable-next-line: interface-name no-empty-interface export interface IEventArgs { } - export module EventArgs { + export namespace EventArgs { export class OnEntryRecordAdded implements IEventArgs { constructor(recordKey: number); recordKey: number; @@ -10389,7 +10312,7 @@ declare namespace SP { constructor(origRecKey: string, recordKey: number, changeKey: JsGrid.IChangeKey); originalRecordKey: number; recordKey: number; - changeKey: JsGrid.IChangeKey + changeKey: JsGrid.IChangeKey; } export class SingleCellClick implements IEventArgs { constructor(eventInfo: Sys.UI.DomEvent, recordKey: number, fieldKey: string); @@ -10399,11 +10322,11 @@ declare namespace SP { } export class PendingChangeKeyInitiallyComplete implements IEventArgs { constructor(changeKey: JsGrid.IChangeKey); - changeKey: JsGrid.IChangeKey + changeKey: JsGrid.IChangeKey; } export class VacateChange implements IEventArgs { constructor(changeKey: JsGrid.IChangeKey); - changeKey: JsGrid.IChangeKey + changeKey: JsGrid.IChangeKey; } export class GridErrorStateChanged implements IEventArgs { constructor(bAnyErrors: boolean); @@ -10432,16 +10355,16 @@ declare namespace SP { } export class OnBeginRedoDataUpdateChange implements IEventArgs { constructor(changeKey: JsGrid.IChangeKey); - changeKey: JsGrid.IChangeKey + changeKey: JsGrid.IChangeKey; } export class OnBeginUndoDataUpdateChange implements IEventArgs { constructor(changeKey: JsGrid.IChangeKey); - changeKey: JsGrid.IChangeKey + changeKey: JsGrid.IChangeKey; } } - export module JsGridControl { + export namespace JsGridControl { export class Parameters { tableCache: SP.JsGrid.TableCache; name: any; // TODO @@ -10488,16 +10411,16 @@ declare namespace SP { rowViewParams: RowViewParameters; } export class PivotedGridParameters { - //this.dateRange = null; - // this.ganttBarStyles = null; - // this.ganttZoomLevel = 3; - // this.fnRenderGanttRow = null; - // this.fnGetGanttBarDate = null; - // this.fnGetGanttBarStyleIds = null; - // this.fnGetPredecessors = null; - // this.workDayStart = _spRegionalSettings.workDayStart; - // this.workDayEnd = _spRegionalSettings.workDayEnd; - // this.fieldKeyRedrawFilter = null; + //this.dateRange = null; + // this.ganttBarStyles = null; + // this.ganttZoomLevel = 3; + // this.fnRenderGanttRow = null; + // this.fnGetGanttBarDate = null; + // this.fnGetGanttBarStyleIds = null; + // this.fnGetPredecessors = null; + // this.workDayStart = _spRegionalSettings.workDayStart; + // this.workDayEnd = _spRegionalSettings.workDayEnd; + // this.fieldKeyRedrawFilter = null; } export class GanttParameters { @@ -10533,6 +10456,7 @@ declare namespace SP { // todo } + // tslint:disable-next-line: interface-name export interface IStyleManager { gridPaneStyle: IStyleType.GridPane; columnHeaderStyleCollection: { @@ -10575,9 +10499,9 @@ declare namespace SP { UpdateDefaultCellStyleFromCss(styleObject: IStyleType.Cell, cssClass: string): void; UpdateGroupStylesFromCss(styleObject: IStyleType.Cell, prefix: string): void; } - + // tslint:disable-next-line: no-empty-interface interface-name export interface IStyleType { } - export module IStyleType { + export namespace IStyleType { export interface Splitter extends IStyleType { outerBorderColor: any; leftInnerBorderColor: any; @@ -10688,19 +10612,19 @@ declare namespace SP { Widget: IStyleType.Widget; }; - static SetRTL: { (rtlObject: any): void; }; - static MakeJsGridStyleManager: { (): IStyleManager }; - static CreateStyleFromCss: { (styleType: IStyleType, cssStyleName: string, optExistingStyle?: any, optClassId?: any): any; }; - static CreateStyle: { (styleType: IStyleType, styleProps: any): any; }; - static MergeCellStyles: { (majorStyle: any, minorStyle: any): any; }; - static ApplyCellStyle: { (td: HTMLTableCellElement, style: any): void; }; - static ApplyRowHeaderStyle: { (domObj: HTMLElement, style: any, fnGetHeaderSibling: Function): void; }; - static ApplyCornerHeaderBorderStyle: { (domObj: HTMLElement, colStyle: any, rowStyle: any): void; }; - static ApplyHeaderInnerBorderStyle: { (domObj: HTMLElement, bIsRowHeader: any, headerObject: any): void }; - static ApplyColumnContextMenuStyle: { (domObj: HTMLElement, style: any): void }; - static ApplySplitterStyle: { (domObj: HTMLElement, style: any): void }; - static MakeBorderString: { (width: number, style: string, color: string): string }; - static GetCellStyleDefaultBackgroundColor: { (): string }; + static SetRTL: (rtlObject: any) => void; + static MakeJsGridStyleManager: () => IStyleManager; + static CreateStyleFromCss: (styleType: IStyleType, cssStyleName: string, optExistingStyle?: any, optClassId?: any) => any; + static CreateStyle: (styleType: IStyleType, styleProps: any) => any; + static MergeCellStyles: (majorStyle: any, minorStyle: any) => any; + static ApplyCellStyle: (td: HTMLTableCellElement, style: any) => void; + static ApplyRowHeaderStyle: (domObj: HTMLElement, style: any, fnGetHeaderSibling: (elem: HTMLElement, previousElem: boolean) => void) => void; + static ApplyCornerHeaderBorderStyle: (domObj: HTMLElement, colStyle: any, rowStyle: any) => void; + static ApplyHeaderInnerBorderStyle: (domObj: HTMLElement, bIsRowHeader: any, headerObject: any) => void; + static ApplyColumnContextMenuStyle: (domObj: HTMLElement, style: any) => void; + static ApplySplitterStyle: (domObj: HTMLElement, style: any) => void; + static MakeBorderString: (width: number, style: string, color: string) => string; + static GetCellStyleDefaultBackgroundColor: () => string; } @@ -10750,32 +10674,33 @@ declare namespace SP { /** false by default */ isFooter: boolean; /** determine whether the cells in this column should be clickable */ - fnShouldLinkSingleValue: { (record: IRecord, fieldKey: string, dataValue: any, localizedValue: any): boolean }; + fnShouldLinkSingleValue: (record: IRecord, fieldKey: string, dataValue: any, localizedValue: any) => boolean; /** if a particular cell is determined as clickable by fnShouldLinkSingleValue, this function will be called when the cell is clicked */ - fnSingleValueClicked: { (record: IRecord, fieldKey: string, dataValue: any, localizedValue: any): void }; + fnSingleValueClicked: (record: IRecord, fieldKey: string, dataValue: any, localizedValue: any) => void; /** this is used when you need to make some of the cells in the column readonly, but at the same time keep others editable */ - fnGetCellEditMode: { (record: IRecord, fieldKey: string): JsGrid.EditMode }; + fnGetCellEditMode: (record: IRecord, fieldKey: string) => JsGrid.EditMode; /** this function should return name of the display control for the given cell in the column the name should be previously associated with the display control via SP.JsGrid.PropertyType.Utils.RegisterDisplayControl method */ - fnGetDisplayControlName: { (record: IRecord, fieldKey: string): string }; + fnGetDisplayControlName: (record: IRecord, fieldKey: string) => string; /** this function should return name of the edit control for the given cell in the column the name should be previously associated with the edit control via SP.JsGrid.PropertyType.Utils.RegisterEditControl method */ - fnGetEditControlName: { (record: IRecord, fieldKey: string): string }; + fnGetEditControlName: (record: IRecord, fieldKey: string) => string; /** set widget control names for a particular cell widgets are basically in-cell buttons with associated popup controls, e.g. date selector or address book button standard widget ids are defined in the SP.JsGrid.WidgetControl.Type enumeration it is also possible to create your own widgets usually this function is not used, and instead, widget control names are determined via PropertyType */ - fnGetWidgetControlNames: { (record: IRecord, fieldKey: string): string[] }; + fnGetWidgetControlNames: (record: IRecord, fieldKey: string) => string[]; /** this function should return id of the style for the given cell in the column styles and their ids are registered for a JsGridControl via jsGridParams.styleManager.RegisterCellStyle method */ - fnGetCellStyleId: { (record: IRecord, fieldKey: string, dataValue: any): string }; + fnGetCellStyleId: (record: IRecord, fieldKey: string, dataValue: any) => string; /** set custom tooltip for the given cell in the column. by default, localized value is displayed as the tooltip */ - fnGetSingleValueTooltip: { (record: IRecord, fieldKey: string, dataValue: any, localizedValue: any): string }; + fnGetSingleValueTooltip: (record: IRecord, fieldKey: string, dataValue: any, localizedValue: any) => string; } + // tslint:disable-next-line: interface-name export interface IRecord { /** True if this is an entry row */ bIsNewRow: boolean; @@ -10812,6 +10737,7 @@ declare namespace SP { MakeRecord(dataPropMap: any, localizedPropMap: any, bKeepRawData: boolean): IRecord; } + // tslint:disable-next-line: interface-name export interface IPropertyBase { HasLocalizedValue(): boolean; HasDataValue(): boolean; @@ -10847,6 +10773,7 @@ declare namespace SP { GetIsMultiValue(): boolean; } + // tslint:disable-next-line: interface-name export interface IEditActorGridContext { jsGridObj: JsGridControl; parentNode: HTMLElement; @@ -10854,19 +10781,22 @@ declare namespace SP { RTL: any; emptyValue: any; bLightFocus: boolean; - OnKeyDown: { (domEvent: Sys.UI.DomEvent): void; }; + OnKeyDown: (domEvent: Sys.UI.DomEvent) => void; } + // tslint:disable-next-line: interface-name export interface IEditControlGridContext extends IEditActorGridContext { OnActivateActor(): void; OnDeactivateActor(): void; } + // tslint:disable-next-line: interface-name export interface IPropertyType { ID: string; - BeginValidateNormalizeConvert(recordKey: number, fieldKey: string, newValue: any, bIsLocalized: boolean, fnCallback: { (args: { isValid: boolean; dataValue: any; normalizedLocValue: string }): void; }, fnError: any): void; + BeginValidateNormalizeConvert(recordKey: number, fieldKey: string, newValue: any, bIsLocalized: boolean, fnCallback: (args: { isValid: boolean; dataValue: any; normalizedLocValue: string }) => void, fnError: any): void; } + // tslint:disable-next-line: interface-name export interface ILookupPropertyType extends IPropertyType { GetItems(fnCallback: any): void; DataToLocalized(dataValue: any): string; @@ -10877,6 +10807,7 @@ declare namespace SP { GetSerializableLookupPropType(): { items: any[]; id: string; bLimitToList: boolean }; } + // tslint:disable-next-line: interface-name export interface IMultiValuePropertyType extends IPropertyType { bMultiValue: boolean; separator: string; @@ -10899,18 +10830,17 @@ declare namespace SP { /** Register a custom property type, where display and edit controls, and also widgets, are derived from the specified parent property type. */ static RegisterNewDerivedCustomPropType(propType: IPropertyType, baseTypeName: string): void; } - - export module PropertyType { + export namespace PropertyType { export class String implements IPropertyType { constructor(); ID: string; - BeginValidateNormalizeConvert(recordKey: number, fieldKey: string, newValue: any, bIsLocalized: boolean, fnCallback: { (args: { isValid: boolean; dataValue: any; normalizedLocValue: string }): void; }, fnError: any): void; + BeginValidateNormalizeConvert(recordKey: number, fieldKey: string, newValue: any, bIsLocalized: boolean, fnCallback: (args: { isValid: boolean; dataValue: any; normalizedLocValue: string }) => void, fnError: any): void; toString(): string; } export class LookupTable implements ILookupPropertyType { constructor(items: any[], id: string, bLimitToList: boolean); ID: string; - BeginValidateNormalizeConvert(recordKey: number, fieldKey: string, newValue: any, bIsLocalized: boolean, fnCallback: { (args: { isValid: boolean; dataValue: any; normalizedLocValue: string }): void; }, fnError: any): void; + BeginValidateNormalizeConvert(recordKey: number, fieldKey: string, newValue: any, bIsLocalized: boolean, fnCallback: (args: { isValid: boolean; dataValue: any; normalizedLocValue: string }) => void, fnError: any): void; GetItems(fnCallback: any): void; DataToLocalized(dataValue: any): string; LocalizedToData(localized: string): any; @@ -10923,7 +10853,7 @@ declare namespace SP { export class CheckBoxBoolean implements IPropertyType { constructor(); ID: string; - BeginValidateNormalizeConvert(recordKey: number, fieldKey: string, newValue: any, bIsLocalized: boolean, fnCallback: { (args: { isValid: boolean; dataValue: any; normalizedLocValue: string }): void; }, fnError: any): void; + BeginValidateNormalizeConvert(recordKey: number, fieldKey: string, newValue: any, bIsLocalized: boolean, fnCallback: (args: { isValid: boolean; dataValue: any; normalizedLocValue: string }) => void, fnError: any): void; DataToLocalized(dataValue: any): string; GetBool(dataValue: any): boolean; toString(): string; @@ -10931,14 +10861,14 @@ declare namespace SP { export class DropDownBoolean implements IPropertyType { constructor(); ID: string; - BeginValidateNormalizeConvert(recordKey: number, fieldKey: string, newValue: any, bIsLocalized: boolean, fnCallback: { (args: { isValid: boolean; dataValue: any; normalizedLocValue: string }): void; }, fnError: any): void; + BeginValidateNormalizeConvert(recordKey: number, fieldKey: string, newValue: any, bIsLocalized: boolean, fnCallback: (args: { isValid: boolean; dataValue: any; normalizedLocValue: string }) => void, fnError: any): void; DataToLocalized(dataValue: any): string; GetBool(dataValue: any): boolean; toString(): string; } export class MultiValuePropType implements IMultiValuePropertyType { ID: string; - BeginValidateNormalizeConvert(recordKey: number, fieldKey: string, newValue: any, bIsLocalized: boolean, fnCallback: { (args: { isValid: boolean; dataValue: any; normalizedLocValue: string }): void; }, fnError: any): void; + BeginValidateNormalizeConvert(recordKey: number, fieldKey: string, newValue: any, bIsLocalized: boolean, fnCallback: (args: { isValid: boolean; dataValue: any; normalizedLocValue: string }) => void, fnError: any): void; bMultiValue: boolean; separator: string; singleValuePropType: string; @@ -10949,7 +10879,7 @@ declare namespace SP { } export class HyperLink implements IPropertyType { ID: string; - BeginValidateNormalizeConvert(recordKey: number, fieldKey: string, newValue: any, bIsLocalized: boolean, fnCallback: { (args: { isValid: boolean; dataValue: any; normalizedLocValue: string }): void; }, fnError: any): void; + BeginValidateNormalizeConvert(recordKey: number, fieldKey: string, newValue: any, bIsLocalized: boolean, fnCallback: (args: { isValid: boolean; dataValue: any; normalizedLocValue: string }) => void, fnError: any): void; bHyperlink: boolean; DataToLocalized(dataValue: any): string; GetAddress(dataValue: any): string; @@ -10962,13 +10892,13 @@ declare namespace SP { export class Utils { static RegisterDisplayControl(name: string, singleton: any, requiredFunctionNames: string[]): void; static RegisterEditControl(name: string, factory: (gridContext: IEditControlGridContext, gridTextInputElement: HTMLElement) => IEditControl, requiredFunctionNames: string[]): void; - static RegisterWidgetControl(name: string, factory: { (ddContext: any): IPropertyType; }, requiredFunctionNames: string[]): void; + static RegisterWidgetControl(name: string, factory: (ddContext: any) => IPropertyType, requiredFunctionNames: string[]): void; static UpdateDisplayControlForPropType(propTypeName: string, displayControlType: string): void; } } - export module WidgetControl { + export namespace WidgetControl { export class Type { static Demo: string; static Date: string; @@ -10977,9 +10907,9 @@ declare namespace SP { } } - export module Internal { + export namespace Internal { export class DiffTracker { - constructor(objBag: any, fnGetChange: Function); + constructor(objBag: any, fnGetChange: (version: any, keys: any[], synchronized: boolean, includeInvalidPropUpdates: boolean) => any); ExternalAPI: { AnyChanges(): boolean; ChangeKeySliceInfo(): any; @@ -11004,6 +10934,7 @@ declare namespace SP { } } + // tslint:disable-next-line: interface-name export interface IEditActorCellContext { propType: IPropertyType; originalValue: IValue; @@ -11015,6 +10946,7 @@ declare namespace SP { SetCurrentValue(value: any): void; } + // tslint:disable-next-line: interface-name export interface IEditControlCellContext extends IEditActorCellContext { cellWidth: number; cellHeight: number; @@ -11027,10 +10959,11 @@ declare namespace SP { } - export module EditControl { + export namespace EditControl { } + // tslint:disable-next-line: interface-name export interface IEditControl { SupportedWriteMode?: SP.JsGrid.EditActorWriteType; SupportedReadMode?: SP.JsGrid.EditActorReadType; @@ -11052,14 +10985,15 @@ declare namespace SP { export class StaticDataSource { - constructor(jsGridData: IGridData, optFnGetPropType?: Function); - AddColumn(gridField: SP.JsGrid.GridField, values: IValue[]):void; - RemoveColumn(fieldKey: string):void; + constructor(jsGridData: IGridData, optFnGetPropType?: (recordKey: string, key: string, dataPropMap: { [name: string]: any }) => any); + AddColumn(gridField: SP.JsGrid.GridField, values: IValue[]): void; + RemoveColumn(fieldKey: string): void; InitJsGridParams(optGridParams?: JsGridControl.Parameters): JsGridControl.Parameters; } + // tslint:disable-next-line: interface-name export interface IGridData { - MetaData: IGridMetadata + MetaData: IGridMetadata; Fields: IFieldInfo[]; Columns: IColumnInfo[]; @@ -11088,6 +11022,7 @@ declare namespace SP { ViewDepKeys?: any[]; } + // tslint:disable-next-line: interface-name export interface IColumnInfo { /** Column title */ name: string; @@ -11117,6 +11052,7 @@ declare namespace SP { isFooter?: boolean; } + // tslint:disable-next-line: interface-name export interface IGridMetadata { KeyColumnName: string; IsGanttEnabled?: boolean; @@ -11130,6 +11066,7 @@ declare namespace SP { } + // tslint:disable-next-line: interface-name export interface IFieldInfo { fieldKey: string; propertyTypeId: string; @@ -11143,6 +11080,7 @@ declare namespace SP { } + // tslint:disable-next-line: interface-name export interface ILookupTableInfo { id: string; showImage?: boolean; @@ -11150,6 +11088,8 @@ declare namespace SP { limitToList?: boolean; lookup: ILookupInfo[]; } + + // tslint:disable-next-line: interface-name export interface ILookupInfo { localString: string; value: number; @@ -11158,9 +11098,10 @@ declare namespace SP { } - export module Utilities { + export namespace Utilities { export class Set { constructor(items?: { [item: string]: number }); + // tslint:disable-next-line: unified-signatures constructor(items?: { [item: number]: number }); /** Returns true if the set is empty */ IsEmpty(): boolean; @@ -11206,7 +11147,7 @@ declare namespace SP { export class GanttControl { static WaitForGanttCreation(callack: (control: GanttControl) => void): void; static Instances: GanttControl[]; - static FnGanttCreationCallback: { (control: GanttControl): void }[]; + static FnGanttCreationCallback: Array<(control: GanttControl) => void>; get_Columns(): SP.JsGrid.ColumnInfo[]; } @@ -11215,49 +11156,43 @@ declare namespace SP { // ------- Srch namespace ------- -declare namespace Srch -{ - export enum EventType - { - none, - queryReady, - queryIssuing, - batchQueryIssuing, - resultReady, - batchResultReady, - queryStateChanged, - resultRendered, - preLoad, - load, +declare namespace Srch { + export enum EventType { + none, + queryReady, + queryIssuing, + batchQueryIssuing, + resultReady, + batchResultReady, + queryStateChanged, + resultRendered, + preLoad, + load, postLoad } - export enum MessageLevel - { - information, - warning, - error + export enum MessageLevel { + information, + warning, + error } - export enum UserActionType - { - search, - pageNext, - pagePrev, - refine, - sort, + export enum UserActionType { + search, + pageNext, + pagePrev, + refine, + sort, filterLanguage } - export enum DateTimeKind - { - unspecified, - utc, + export enum DateTimeKind { + unspecified, + utc, local } - export class ClientControl extends Sys.UI.Control - { + export class ClientControl extends Sys.UI.Control { constructor(elem: Element); /** toggles visibility of children controls of the messageContainer */ @@ -11277,7 +11212,7 @@ declare namespace Srch /** If set to true, control will load scripts defined by the serverTemplateScriptsToLoad field after control load. True by default. */ set_delayLoadTemplateScripts(value: boolean): boolean; get_states(): any; - set_states(value: any): any; + set_states(value: any): any; get_messages(): any[]; set_messages(value: any[]): any[]; get_showDataErrors(): boolean; @@ -11294,7 +11229,7 @@ declare namespace Srch scriptApplication_PreLoad(sender: any, e: any): void; scriptApplication_Load(sender: any, e: any): void; scriptApplication_PostLoad(sender: any, e: any): void; - loadServerTemplateScripts():void; + loadServerTemplateScripts(): void; serverTemplateScriptsToLoad: any[]; serverTemplateScriptsCallback(): void; loadRenderTemplateScripts(scriptReferences: any, success: any, failure: any, timeout: any, loadStandAloneCustomScripts: any): boolean; @@ -11309,8 +11244,7 @@ declare namespace Srch clickHandler(e: Event): any; } - export class DataProvider extends ClientControl - { + export class DataProvider extends ClientControl { constructor(elem: Element); get_currentQueryState(): any; get_sourceID(): string; @@ -11440,8 +11374,7 @@ declare namespace Srch getSortName(): string; } - export class DisplayControl extends ClientControl - { + export class DisplayControl extends ClientControl { get_queryGroupName(): string; set_queryGroupName(value: string): string; get_dataProvider(): DataProvider; @@ -11473,8 +11406,7 @@ declare namespace Srch render(): void; } - export class Refinement extends DisplayControl - { + export class Refinement extends DisplayControl { static createRefinementTextbox(name: string): Element; static submitMultiRefinement(name: string, control: Refinement, useContains: boolean, useKQL: boolean): void; static ensureUserSpecifiedRefinerValueHasWhiteSpaceQuotes(inputText: string): string; @@ -11485,7 +11417,7 @@ declare namespace Srch /** Save expanded state of the specified filter to cookie */ static setExpanded(filterName: string, value: string): void; static multiRefinerSpecifyOtherFilterValue(refinerName: string, clientControl: Refinement, useContains: boolean, useKQL: boolean): void; - + constructor(elem: Element); get_selectedRefinementControls(): RefinementControl[]; @@ -11494,7 +11426,7 @@ declare namespace Srch set_useManagedNavigationRefiners(value: boolean): boolean; get_emptyRefinementMessageId(): string; set_emptyRefinementMessageId(value: string): string; - + scriptApplication_PreLoad(sender: any, e: any): void; render(): void; addRefinementFilter(filterName: string, filterToken: any): void; @@ -11521,8 +11453,7 @@ declare namespace Srch updateRefinementControls(newControls: RefinementControl[]): void; } - export class RefinementControl - { + export class RefinementControl { constructor(propertyName: string, spec: string, renderTemplateId: string); propertyName: string; @@ -11537,8 +11468,7 @@ declare namespace Srch deepHits: number; } - export class Result extends DisplayControl - { + export class Result extends DisplayControl { static parsePropertyMappingWithSlotDisplayNames(mappings: any): { [key: string]: any }; static parsePropertyMappingsString(mappings: any): { [key: string]: any }; static getSelectedPropertiesFromMappingDictionary(propMappings: any): any[]; @@ -11611,8 +11541,7 @@ declare namespace Srch } /** Represents the search box control */ - export class SearchBox extends ClientControl - { + export class SearchBox extends ClientControl { constructor(elem: Element); /** Returns the current search term */ @@ -11625,7 +11554,7 @@ declare namespace Srch get_queryGroupNames(): string[]; set_queryGroupNames(value: any): string[]; - + /** Gets the results page address, e.g. '~site/_layouts/15/osssearchresults.aspx?u={contexturl}' */ get_resultsPageAddress(): string; /** Sets the results page address, e.g. '~site/_layouts/15/osssearchresults.aspx?u={contexturl}' @@ -11633,19 +11562,19 @@ declare namespace Srch * e.g. specified site are returned. Omit this parameter if you want to search everywhere. */ set_resultsPageAddress(value: string): string; - + get_showAdvancedLink(): boolean; set_showAdvancedLink(value: boolean): boolean; - + get_showQuerySuggestions(): boolean; set_showQuerySuggestions(value: boolean): boolean; - + get_showNavigation(): boolean; set_showNavigation(value: boolean): boolean; - + get_showPeopleNameSuggestions(): boolean; set_showPeopleNameSuggestions(value: boolean): boolean; - + /** Gets the interval in milliseconds, if user is idle during this interval, suggestions retrieval will be initiated. * Default value is 250. */ @@ -11654,57 +11583,57 @@ declare namespace Srch * Default value is 250. */ set_querySuggestionCompletionInterval(value: number): number; - + /** Gets minimum length of the search term for suggestions to be retrieved. Default is 2 letters. */ get_querySuggestionMinimumPrefixLength(): number; /** Sets minimum length of the search term for suggestions to be retrieved. Default is 2 letters. */ set_querySuggestionMinimumPrefixLength(value: number): number; - + /** Gets number of suggestions to display. Default is 5. */ get_querySuggestionCount(): number; /** Sets number of suggestions to display. Default is 5. */ set_querySuggestionCount(value: number): number; - + get_personalResultCount(): number; set_personalResultCount(value: number): number; - + get_advancedSearchPageAddress(): string; set_advancedSearchPageAddress(value: string): string; - + get_showPreferencesLink(): boolean; set_showPreferencesLink(value: boolean): boolean; - + get_serverInitialRender(): boolean; set_serverInitialRender(value: boolean): boolean; - + get_setFocusOnPageLoad(): boolean; set_setFocusOnPageLoad(value: boolean): boolean; - + get_allowEmptySearch(): boolean; set_allowEmptySearch(value: boolean): boolean; - + get_updatePageTitle(): boolean; set_updatePageTitle(value: boolean): boolean; - + get_pageTitlePrefix(): string; set_pageTitlePrefix(value: string): string; - + /** Gets the search input placeholder text */ get_currentPrompt(): string; /** Sets the search input placeholder text */ set_currentPrompt(value: string): string; - + get_initialPrompt(): string; set_initialPrompt(value: string): string; - + /** Gets the css class/classes of the placeholder text. Default is 'ms-srch-sb-prompt ms-helperText' */ get_promptCssClass(): string; /** Sets the css class/classes of the placeholder text. Default is 'ms-srch-sb-prompt ms-helperText' */ set_promptCssClass(value: string): string; - + get_tryInplaceQuery(): boolean; set_tryInplaceQuery(value: boolean): boolean; - + /** Gets the id of the search box input element */ get_searchBoxInputId(): string; /** Sets the id of the search box input element */ @@ -11712,40 +11641,40 @@ declare namespace Srch get_searchBoxContainerId(): string; set_searchBoxContainerId(value: string): string; - + get_navigationButtonId(): string; set_navigationButtonId(value: string): string; - + get_suggestionsListId(): string; set_suggestionsListId(value: string): string; - + get_navigationListId(): string; set_navigationListId(value: string): string; - + get_searchBoxInputElement(): Element; - + get_searchBoxProgressClass(): string; set_searchBoxProgressClass(value: string): string; - + get_searchBoxContainerElement(): Element; - + get_searchBoxLinkId(): string; set_searchBoxLinkId(value: string): string; - + get_searchBoxLinkElement(): Element; - + get_navigationNodes(): any; set_navigationNodes(value: any): any; - + get_msBeforeShowingProgress(): number; set_msBeforeShowingProgress(value: number): number; - + get_maintainQueryState(): boolean; set_maintainQueryState(value: boolean): boolean; - + get_querySuggestionsSourceID(): string; set_querySuggestionsSourceID(value: string): string; - + scriptApplication_PreLoad(sender: any, e: any): void; scriptApplication_PostLoad(sender: any, e: any): void; serverTemplateScriptsCallback(): any; @@ -11778,19 +11707,20 @@ declare namespace Srch } - export class U - { + type RenderFunction = (ctx: any) => string; + + export class U { /** Returns true if the value parameter is null or empty string */ static e(value: string): boolean; /** Returns true if the value parameter is empty string */ - static w(value: any): boolean; + static w(value: any): boolean; /** Returns true if the value parameter is null or undefined */ static n(value: any): boolean; /** Returns true if current page is in edit mode */ static isPageInEditMode(): boolean; /** Returns true if current page is displayed in the Minimal Download Strategy (MDS) mode */ static isPageInMdsMode(): boolean; - + static isPagePartialLoad(): boolean; /** Returns true if the current page uses right-to-left mode (RTL) */ static isRTL(): boolean; @@ -11838,9 +11768,9 @@ declare namespace Srch static traceFormatted(c: Srch.ClientControl, method: string, format: string, ...values: string[]): void; /** Same as $addHandler with safety checks */ - static addHandler(element: Element, eventName: string, handler: Function): void; + static addHandler(element: Element, eventName: string, handler: (instance: any, eventArgs: any) => void): void; /** Same as $removeHandler with safety checks */ - static removeHandler(element: Element, eventName: string, handler: Function): void + static removeHandler(element: Element, eventName: string, handler: (instance: any, eventArgs: any) => void): void /** Returns true if the specified element is a descendant of the container element */ static isDescendant(element: Element, container: Element): boolean; @@ -11864,7 +11794,7 @@ declare namespace Srch static ensureAllowedProtocol(value: string): string; /** Indicates whether the specified protocol is allowed. */ static isProtocolAllowed(value: string, allowRelativeUrl: boolean): boolean; - + /** Returns true if the URL is a relative URL */ static isUrlRelative(url: string): boolean; /** Returns true if the URL is a server-relative URL (i.e. starts with '/') */ @@ -11874,7 +11804,7 @@ declare namespace Srch static logClick(e: any, clickType: any): void; static fillKeywordQuery(query: any, dp: any): void; - + /** Parses username out from SharePoint user field value */ static getUsernameFromAuthorField(authorField: string): string; /** Parses user display name out from SharePoint user field value */ @@ -11908,14 +11838,14 @@ declare namespace Srch /** Copies the specified string to clipboard, if possible */ static copyLink(link: string): void; - + /** Registers display template function in the system. * @param name Identifier of the template. Usually template is registered twice: by URL and by name. * @param template The display template. It can be either string, or function, that gets the CSR context object and returns HTML string */ - static registerRenderTemplateByName(name: string, templateFunction: string | { (ctx: any): string }): void; + static registerRenderTemplateByName(name: string, templateFunction: string | RenderFunction): void; /** Returns display template registered (can be either string or function) */ - static getRenderTemplateByName(name: string, renderCtx: any): string | { (ctx: any): string }; + static getRenderTemplateByName(name: string, renderCtx: any): string | RenderFunction; static addRenderContextCallback(renderCtx: any, callbackType: any, callbackFunction: any, enforceUnique: any, templateFunction: any): void; static setItemRenderWrapper(renderCtx: any, itemRenderWrapperFunction: any, templateFunction: any): any; @@ -11924,7 +11854,7 @@ declare namespace Srch static getTemplateUrlFromFunctionOrRenderCtx(templateFunctionOrRenderCtx: any): string; static createErrorObjectWithExecContext(messageText: any, operationName: any, templateFuncOrRenderCtx: any): any; /** Returns the CSR template that was previously registered using 'registerRenderTemplateByName' based on CSR template level */ - static resolveRenderTemplate(renderCtx: any, component: ClientControl, level: 'Item' | 'Group' | 'View' | 'Body'): string | { (ctx: any): string }; + static resolveRenderTemplate(renderCtx: any, component: ClientControl, level: 'Item' | 'Group' | 'View' | 'Body'): string | RenderFunction; /** Returns formatted time string from seconds string, which contains a number that represents amount of seconds passed since 00:00:00 today */ static getFormattedTimeFromSeconds(secondsStr: string): string; @@ -11945,14 +11875,14 @@ declare namespace Srch static getFolderIconUrl(): string; /** Returns URL of the appropriate file image based on the file type identifier (see getFriendlyNameForFileExtension) */ static getIconUrlByFileExtension(item: string, defaultIconPath?: string): string; - + /** Returns string that contains safe call to HP.Show, passing over the itemId, hpContainerId and templateUrl parameters, and supplying true for wide parameter. */ static getShowHoverPanelCallbackWide(itemId: string, hpContainerId: string, templateUrl: string): string; /** Returns string that contains safe call to HP.Show, passing over the itemId, hpContainerId and templateUrl parameters, and supplying false for wide parameter. */ static getShowHoverPanelCallback(itemId: string, hpContainerId: string, templateUrl: string): string; /** Returns string that contains safe call to HP.Hide */ static getHideHoverPanelCallback(): string; - + static getHighlightedProperty(key: string, result: any, property: string): any; static processHHXML(pre: string): string; static createXMLDocument(xml: string): XMLDocument; @@ -11970,7 +11900,7 @@ declare namespace Srch static isFirstRankedBlock(resultTable: Microsoft.SharePoint.Client.Search.Query.ResultTable): boolean; static isIntentTable(resultTable: Microsoft.SharePoint.Client.Search.Query.ResultTable): boolean; static createBehavior(id: string, type: any, properties: any, targetElementId: string): any; - + /** Uses SPAnimation to animate an element */ static animate(element: Element, animationID: any, finishFunc: any): void; static hideElement(element: Element): void; @@ -11979,11 +11909,11 @@ declare namespace Srch static resetElement(element: Element): void; static shouldAnimate(dp: any): boolean; static animateResults(result: Result, userAction: any): void; - + static loadScripts(scriptReferences: string[], success: any, failure: any, timeout: number): void; static appendScriptsToLoad(scripts: string[], script: string): void; static registerLoadedScripts(scripts: string[]): void; - + /** Returns HTML for collapsible refiner title */ static collapsibleRefinerTitle(propertyName: string, idPrefix: string, title: string, iconClass: string, customOnClick: string): string; /** Returns true if current page is osssearchresults.aspx */ @@ -11992,7 +11922,7 @@ declare namespace Srch static replaceUrlTokens(url: string): string; /** Adds ctag parameter to the URL and replaces URL tokens */ static urlTokenExpansion(jsLink: string): string; - + static includeCSS(templateLink: string, relativeLink: string): void; static includeScript(templateLink: string, scriptLink: string): void; static includeLanguageScript(templateLink: string, scriptLink: string): void; @@ -12001,9 +11931,9 @@ declare namespace Srch /** Retrieves localized string with the specified id */ static loadResource(id: string): string; /** Retrieves localized string with the specified id */ - static loadResourceForTemplate(id: string, templateFunc: {(ctx: any): string}): string; + static loadResourceForTemplate(id: string, templateFunc: (ctx: any) => string): string; /** Registers in system resources defined by the dictionary object */ - static registerResourceDictionary(locale:string, dict: {[key: string]: string}): void; + static registerResourceDictionary(locale: string, dict: { [key: string]: string }): void; static restorePath(el: Element, originalText: string, selectText: string): void; static selectPath(text: string, el: Element): void; @@ -12035,9 +11965,8 @@ declare namespace Srch static contentFixedWidthLength: number; } - export module U { - export class PropNames - { + export namespace U { + export class PropNames { static renderTemplates: 'RenderTemplates'; static renderTemplateId: 'RenderTemplateId'; static tableType: 'TableType'; @@ -12055,8 +11984,7 @@ declare namespace Srch static isFirstRankedBlock: 'IsFirstRankedResultBlock'; } - export class Ids - { + export class Ids { static group: '_group'; static groupTitle: '_groupTitle'; static groupLink: '_groupLink'; @@ -12079,23 +12007,20 @@ declare namespace Srch static postInfo: '_postInfo'; } - export class LoadScriptsState - { + export class LoadScriptsState { scriptsToLoad: any; progress: number; timeoutHandle: any; } - export enum LoadScriptsProgress - { + export enum LoadScriptsProgress { loading, success, failure } } - export class ScriptApplicationManager - { + export class ScriptApplicationManager { static get_current(): ScriptApplicationManager; static get_clientRuntimeContext(): SP.ClientRuntimeContext; /** Returns server-relative link to _layouts/EditUserPref.aspx */ @@ -12112,23 +12037,23 @@ declare namespace Srch get_pagePath(): string; /** Adds handler for the preload event */ - add_preLoad(handlerFunction: Function): void; + add_preLoad(handlerFunction: (instance: any, eventArgs: any) => void): void; /** Removes handler for the preload event */ - remove_preLoad(handlerFunction: Function): void; + remove_preLoad(handlerFunction: (instance: any, eventArgs: any) => void): void; /** Raises the preload event */ raisePreLoadEvent(): void; /** Adds handler for the load event */ - add_load(handlerFunction: Function): void; + add_load(handlerFunction: (instance: any, eventArgs: any) => void): void; /** Removes handler for the load event */ - remove_load(handlerFunction: Function): void; + remove_load(handlerFunction: (instance: any, eventArgs: any) => void): void; /** Raises the load event */ raiseLoadEvent(): void; /** Adds handler for the postload event */ - add_postLoad(handlerFunction: Function): void; + add_postLoad(handlerFunction: (instance: any, eventArgs: any) => void): void; /** Removes handler for the postload event */ - remove_postLoad(handlerFunction: Function): void; + remove_postLoad(handlerFunction: (instance: any, eventArgs: any) => void): void; /** Raises the postload event */ raisePostLoadEvent(): void; @@ -12139,7 +12064,7 @@ declare namespace Srch * After registration the controls will be correctly processed in the page search context. */ registerClientControl(clientControl: DisplayControl | DataProvider | SearchBox): void; - + /** Puts specified hash-key address into the current page location. * @param url The hash-key, e.g. '#k=test' */ @@ -12149,8 +12074,7 @@ declare namespace Srch get_searchSessionID(): void; } - export class Res - { + export class Res { static sb_ResultsPageTitle: string; static sb_EmptyQueryWarning: string; static sb_InvalidResultPageURL: string; @@ -12783,7 +12707,7 @@ declare namespace Srch static rs_PartialResultWarning_Line1: string; static rs_PartialResultWarning_Line2: string; static rs_HasParseExceptionWarning_Line1: string; - static rs_HasParseExceptionWarning_Line2: string; + static rs_HasParseExceptionWarning_Line2: string; } } @@ -12832,7 +12756,7 @@ declare function $includeScript(templateLink: string, relativeLink: string): voi declare function $includeCSS(templateLink: string, scriptLink: string): void; declare function $includeLanguageScript(templateLink: string, scriptLink: string): any; /** Registers in system resources defined by the dictionary object (alias for Srch.U.registerResourceDictionary) */ -declare function $registerResourceDictionary(locale:string, dict: {[key: string]: string}): void; +declare function $registerResourceDictionary(locale: string, dict: { [key: string]: string }): void; /** Retrieves localized string with the specified id */ declare function $resource(id: string): string; /** (calls Srch.U.setItemRenderWrapper) */ diff --git a/sharepoint/sharepoint-tests.ts b/sharepoint/sharepoint-tests.ts index 6155a0b096..9d75197d89 100644 --- a/sharepoint/sharepoint-tests.ts +++ b/sharepoint/sharepoint-tests.ts @@ -6,14 +6,14 @@ import * as ng from 'angular'; //code from http://sptypescript.codeplex.com/ //BasicTasksJSOM.ts // Website tasks -function retrieveWebsite(resultpanel:HTMLElement) { +function retrieveWebsite(resultpanel: HTMLElement) { var clientContext = SP.ClientContext.get_current(); var oWebsite = clientContext.get_web(); clientContext.load(oWebsite); clientContext.executeQueryAsync( - successHandler, - errorHandler + successHandler, + errorHandler ); function successHandler() { @@ -24,7 +24,6 @@ function retrieveWebsite(resultpanel:HTMLElement) { resultpanel.innerHTML = "Request failed: " + arguments[1].get_message(); } } - function retrieveWebsiteProps(resultpanel: HTMLElement) { var clientContext = SP.ClientContext.get_current(); @@ -32,7 +31,7 @@ function retrieveWebsiteProps(resultpanel: HTMLElement) { clientContext.load(oWebsite, "Description", "Created"); - clientContext.executeQueryAsync(successHandler,errorHandler); + clientContext.executeQueryAsync(successHandler, errorHandler); function successHandler() { resultpanel.innerHTML = "Description: " + oWebsite.get_description() + @@ -55,8 +54,8 @@ function writeWebsiteProps(resultpanel: HTMLElement) { clientContext.load(oWebsite, "Description"); clientContext.executeQueryAsync( - successHandler, - errorHandler + successHandler, + errorHandler ); @@ -79,8 +78,8 @@ function readAllProps(resultpanel: HTMLElement) { clientContext.load(collList); clientContext.executeQueryAsync( - successHandler, - errorHandler + successHandler, + errorHandler ); function successHandler() { @@ -112,8 +111,8 @@ function readSpecificProps(resultpanel: HTMLElement) { clientContext.load(collList, "Include(Title, Id)"); clientContext.executeQueryAsync( - successHandler, - errorHandler + successHandler, + errorHandler ); function successHandler() { @@ -144,14 +143,13 @@ function readColl(resultpanel: HTMLElement) { var listInfoCollection = clientContext.loadQuery(collList, "Include(Title, Id)"); clientContext.executeQueryAsync( - successHandler, - errorHandler + successHandler, + errorHandler ); function successHandler() { var listInfo = ""; - for (var i = 0; i < listInfoCollection.length; i++) { - var oList = listInfoCollection[i]; + for (var oList of listInfoCollection) { listInfo += "Title: " + oList.get_title() + " ID: " + oList.get_id().toString() + "
"; } @@ -173,14 +171,13 @@ function readFilter(resultpanel: HTMLElement) { "Include(Title,Fields.Include(Title,InternalName))"); clientContext.executeQueryAsync( - successHandler, - errorHandler + successHandler, + errorHandler ); function successHandler() { - for (var i = 0; i < listInfoArray.length; i++) { - var oList = listInfoArray[i]; + for (var oList of listInfoArray) { var collField = oList.get_fields(); var fieldEnumerator = collField.getEnumerator(); @@ -219,8 +216,8 @@ function createList(resultpanel: HTMLElement) { clientContext.load(oList); clientContext.executeQueryAsync( - successHandler, - errorHandler + successHandler, + errorHandler ); function successHandler() { @@ -243,8 +240,8 @@ function updateList(resultpanel: HTMLElement) { clientContext.load(oList); clientContext.executeQueryAsync( - successHandler, - errorHandler + successHandler, + errorHandler ); function successHandler() { @@ -268,7 +265,7 @@ function addField(resultpanel: HTMLElement) { SP.AddFieldOptions.defaultValue ); - var fieldNumber = clientContext.castTo(oField, SP.FieldNumber); + var fieldNumber = clientContext.castTo(oField, SP.FieldNumber) as SP.FieldNumber; fieldNumber.set_maximumValue(100); fieldNumber.set_minimumValue(35); fieldNumber.update(); @@ -276,8 +273,8 @@ function addField(resultpanel: HTMLElement) { clientContext.load(oField); clientContext.executeQueryAsync( - successHandler, - errorHandler + successHandler, + errorHandler ); function successHandler() { @@ -298,8 +295,8 @@ function deleteList(resultpanel: HTMLElement) { oList.deleteObject(); clientContext.executeQueryAsync( - successHandler, - errorHandler + successHandler, + errorHandler ); function successHandler() { @@ -325,8 +322,8 @@ function createFolder(resultpanel: HTMLElement) { clientContext.load(oListItem); clientContext.executeQueryAsync( - successHandler, - errorHandler + successHandler, + errorHandler ); function successHandler() { @@ -343,14 +340,14 @@ function updateFolder(resultpanel: HTMLElement) { var oWebsite = clientContext.get_web(); var oList = oWebsite.get_lists().getByTitle("Shared Documents"); - var oListItem = oList.getItemById(1); + var oListItem = oList.getItemById(1); oListItem.set_item("FileLeafRef", "My updated folder"); oListItem.update(); clientContext.load(oListItem); clientContext.executeQueryAsync( - successHandler, - errorHandler + successHandler, + errorHandler ); function successHandler() { @@ -363,7 +360,7 @@ function updateFolder(resultpanel: HTMLElement) { } function deleteFolder(resultpanel: HTMLElement) { - var clientContext = SP.ClientContext.get_current(); + var clientContext = SP.ClientContext.get_current(); var oWebsite = clientContext.get_web(); var oList = oWebsite.get_lists().getByTitle("Shared Documents"); @@ -371,8 +368,8 @@ function deleteFolder(resultpanel: HTMLElement) { oListItem.deleteObject(); clientContext.executeQueryAsync( - successHandler, - errorHandler + successHandler, + errorHandler ); function successHandler() { @@ -399,8 +396,8 @@ function readItems(resultpanel: HTMLElement) { clientContext.load(collListItem); clientContext.executeQueryAsync( - successHandler, - errorHandler + successHandler, + errorHandler ); function successHandler() { @@ -433,8 +430,8 @@ function readInclude(resultpanel: HTMLElement) { clientContext.load(collListItem, "Include(Id, DisplayName, HasUniqueRoleAssignments)"); clientContext.executeQueryAsync( - successHandler, - errorHandler + successHandler, + errorHandler ); function successHandler() { @@ -444,8 +441,8 @@ function readInclude(resultpanel: HTMLElement) { while (listItemEnumerator.moveNext()) { var oListItem = listItemEnumerator.get_current(); listItemInfo += "ID: " + oListItem.get_id() + "
" + - "Display name: " + oListItem.get_displayName() + "
" + - "Unique role assignments: " + oListItem.get_hasUniqueRoleAssignments() + "
"; + "Display name: " + oListItem.get_displayName() + "
" + + "Unique role assignments: " + oListItem.get_hasUniqueRoleAssignments() + "
"; } resultpanel.innerHTML = listItemInfo; @@ -470,8 +467,8 @@ function createListItem(resultpanel: HTMLElement) { clientContext.load(oListItem); clientContext.executeQueryAsync( - successHandler, - errorHandler + successHandler, + errorHandler ); function successHandler() { @@ -494,8 +491,8 @@ function updateListItem(resultpanel: HTMLElement) { clientContext.load(oListItem); clientContext.executeQueryAsync( - successHandler, - errorHandler + successHandler, + errorHandler ); function successHandler() { @@ -516,8 +513,8 @@ function deleteListItem(resultpanel: HTMLElement) { oListItem.deleteObject(); clientContext.executeQueryAsync( - successHandler, - errorHandler + successHandler, + errorHandler ); function successHandler() { @@ -534,25 +531,21 @@ function deleteListItem(resultpanel: HTMLElement) { /** Lightweight client-side rendering template overrides.*/ namespace CSR { - export interface UpdatedValueCallback { - (value: any, fieldSchema?: SPClientTemplates.FieldSchema_InForm): void; - } + export type UpdatedValueCallback = (value: any, fieldSchema?: SPClientTemplates.FieldSchema_InForm) => void; /** Creates new overrides. Call .register() at the end.*/ - export function override(listTemplateType?: number, baseViewId?: number|string): ICSR { + export function override(listTemplateType?: number, baseViewId?: number | string): CSR { return new csr(listTemplateType, baseViewId) .onPreRender(hookFormContext) .onPostRender(fixCsrCustomLayout); - function hookFormContext(ctx: IFormRenderContexWithHook) { - if (ctx.ControlMode == SPClientTemplates.ClientControlMode.EditForm - || ctx.ControlMode == SPClientTemplates.ClientControlMode.NewForm) { - - for (var i = 0; i < ctx.ListSchema.Field.length; i++) { - var fieldSchemaInForm = ctx.ListSchema.Field[i]; + function hookFormContext(ctx: FormRenderContexWithHook) { + if (ctx.ControlMode === SPClientTemplates.ClientControlMode.EditForm + || ctx.ControlMode === SPClientTemplates.ClientControlMode.NewForm) { + for (var fieldSchemaInForm of ctx.ListSchema.Field) { if (!ctx.FormContextHook) { - ctx.FormContextHook = {} + ctx.FormContextHook = {}; var oldRegisterGetValueCallback = ctx.FormContext.registerGetValueCallback; ctx.FormContext.registerGetValueCallback = (fieldName, callback) => { @@ -568,11 +561,11 @@ namespace CSR { hookedContext.lastValue = value; var updatedCallbacks = ctx.FormContextHook[fieldName].updatedValueCallbacks; - for (var i = 0; i < updatedCallbacks.length; i++) { - updatedCallbacks[i](value, hookedContext.fieldSchema); + for (var updatedCallback of updatedCallbacks) { + updatedCallback(value, hookedContext.fieldSchema); } - } + }; } ensureFormContextHookField(ctx.FormContextHook, fieldSchemaInForm.Name).fieldSchema = fieldSchemaInForm; } @@ -580,8 +573,8 @@ namespace CSR { } function fixCsrCustomLayout(ctx: SPClientTemplates.RenderContext_Form) { - if (ctx.ControlMode == SPClientTemplates.ClientControlMode.Invalid - || ctx.ControlMode == SPClientTemplates.ClientControlMode.View) { + if (ctx.ControlMode === SPClientTemplates.ClientControlMode.Invalid + || ctx.ControlMode === SPClientTemplates.ClientControlMode.View) { return; } @@ -604,8 +597,7 @@ namespace CSR { var old = ctx.CurrentItem; ctx.CurrentItem = ctx.ListData.Items[0]; var fields = ctx.ListSchema.Field; - for (var j = 0; j < fields.length; j++) { - var field = fields[j]; + for (var field of fields) { var pHolderId = wpq + ctx.FormContext.listAttributes.Id + field.Name; var span = $get(pHolderId); if (span) { @@ -621,12 +613,12 @@ namespace CSR { } -//typescripttempltes.ts - declare var Strings:any; + //typescripttempltes.ts + declare var Strings: any; export function getFieldValue(ctx: SPClientTemplates.RenderContext_Form, fieldName: string): any { - if (ctx.ControlMode == SPClientTemplates.ClientControlMode.EditForm - || ctx.ControlMode == SPClientTemplates.ClientControlMode.NewForm) { - var contextWithHook = ctx; + if (ctx.ControlMode === SPClientTemplates.ClientControlMode.EditForm + || ctx.ControlMode === SPClientTemplates.ClientControlMode.NewForm) { + var contextWithHook = ctx as FormRenderContexWithHook; if (contextWithHook.FormContextHook && contextWithHook.FormContextHook[fieldName] && contextWithHook.FormContextHook[fieldName].getValue) { @@ -637,9 +629,9 @@ namespace CSR { } export function getFieldSchema(ctx: SPClientTemplates.RenderContext_Form, fieldName: string): SPClientTemplates.FieldSchema_InForm { - if (ctx.ControlMode == SPClientTemplates.ClientControlMode.EditForm - || ctx.ControlMode == SPClientTemplates.ClientControlMode.NewForm) { - var contextWithHook = ctx; + if (ctx.ControlMode === SPClientTemplates.ClientControlMode.EditForm + || ctx.ControlMode === SPClientTemplates.ClientControlMode.NewForm) { + var contextWithHook = ctx as FormRenderContexWithHook; if (contextWithHook.FormContextHook && contextWithHook.FormContextHook[fieldName]) { return contextWithHook.FormContextHook[fieldName].fieldSchema; @@ -649,13 +641,13 @@ namespace CSR { } export function addUpdatedValueCallback(ctx: SPClientTemplates.RenderContext_Form, fieldName: string, callback: UpdatedValueCallback): void { - if (ctx.ControlMode == SPClientTemplates.ClientControlMode.EditForm - || ctx.ControlMode == SPClientTemplates.ClientControlMode.NewForm) { - var contextWithHook = ctx; + if (ctx.ControlMode === SPClientTemplates.ClientControlMode.EditForm + || ctx.ControlMode === SPClientTemplates.ClientControlMode.NewForm) { + var contextWithHook = ctx as FormRenderContexWithHook; if (contextWithHook.FormContextHook) { var f = ensureFormContextHookField(contextWithHook.FormContextHook, fieldName); var callbacks = f.updatedValueCallbacks; - if (callbacks.indexOf(callback) == -1) { + if (callbacks.indexOf(callback) === -1) { callbacks.push(callback); if (f.lastValue) { callback(f.lastValue, f.fieldSchema); @@ -667,13 +659,13 @@ namespace CSR { } export function removeUpdatedValueCallback(ctx: SPClientTemplates.RenderContext_Form, fieldName: string, callback: UpdatedValueCallback): void { - if (ctx.ControlMode == SPClientTemplates.ClientControlMode.EditForm - || ctx.ControlMode == SPClientTemplates.ClientControlMode.NewForm) { - var contextWithHook = ctx; + if (ctx.ControlMode === SPClientTemplates.ClientControlMode.EditForm + || ctx.ControlMode === SPClientTemplates.ClientControlMode.NewForm) { + var contextWithHook = ctx as FormRenderContexWithHook; if (contextWithHook.FormContextHook) { var callbacks = ensureFormContextHookField(contextWithHook.FormContextHook, fieldName).updatedValueCallbacks; var index = callbacks.indexOf(callback); - if (index != -1) { + if (index !== -1) { callbacks.splice(index, 1); } } @@ -683,7 +675,7 @@ namespace CSR { export function getControl(schema: SPClientTemplates.FieldSchema_InForm): HTMLInputElement { var id = schema.Name + '_' + schema.Id + '_$' + schema.FieldType + 'Field'; //TODO: Handle different input types - return $get(id); + return $get(id) as HTMLInputElement; } export function getFieldTemplate(field: SPClientTemplates.FieldSchema, mode: SPClientTemplates.ClientControlMode): SPClientTemplates.FieldCallback { @@ -694,148 +686,148 @@ namespace CSR { } - class csr implements ICSR, SPClientTemplates.TemplateOverridesOptions { + class csr implements CSR, SPClientTemplates.TemplateOverridesOptions { - public Templates: SPClientTemplates.TemplateOverrides; - public OnPreRender: SPClientTemplates.RenderCallback[]; - public OnPostRender: SPClientTemplates.RenderCallback[]; + Templates: SPClientTemplates.TemplateOverrides; + OnPreRender: SPClientTemplates.RenderCallback[]; + OnPostRender: SPClientTemplates.RenderCallback[]; private IsRegistered: boolean; constructor(public ListTemplateType?: number, public BaseViewID?: any) { this.Templates = { Fields: {} }; - this.OnPreRender = [] ; + this.OnPreRender = []; this.OnPostRender = []; this.IsRegistered = false; } /* tier 1 methods */ - view(template: any): ICSR { + view(template: any): CSR { this.Templates.View = template; return this; } - item(template: any): ICSR { + item(template: any): CSR { this.Templates.Item = template; return this; } - header(template: any): ICSR { + header(template: any): CSR { this.Templates.Header = template; return this; } - body(template: any): ICSR { + body(template: any): CSR { this.Templates.Body = template; return this; } - footer(template: any): ICSR { + footer(template: any): CSR { this.Templates.Footer = template; return this; } - fieldView(fieldName: string, template: any): ICSR { + fieldView(fieldName: string, template: any): CSR { this.Templates.Fields[fieldName] = this.Templates.Fields[fieldName] || {}; this.Templates.Fields[fieldName].View = template; return this; } - fieldDisplay(fieldName: string, template: any): ICSR { + fieldDisplay(fieldName: string, template: any): CSR { this.Templates.Fields[fieldName] = this.Templates.Fields[fieldName] || {}; this.Templates.Fields[fieldName].DisplayForm = template; return this; } - fieldNew(fieldName: string, template: any): ICSR { + fieldNew(fieldName: string, template: any): CSR { this.Templates.Fields[fieldName] = this.Templates.Fields[fieldName] || {}; this.Templates.Fields[fieldName].NewForm = template; return this; } - fieldEdit(fieldName: string, template: any): ICSR { + fieldEdit(fieldName: string, template: any): CSR { this.Templates.Fields[fieldName] = this.Templates.Fields[fieldName] || {}; this.Templates.Fields[fieldName].EditForm = template; return this; } /* tier 2 methods */ - template(name: string, template: any): ICSR { + template(name: string, template: any): CSR { this.Templates[name] = template; return this; } - fieldTemplate(fieldName: string, name: string, template: any): ICSR { + fieldTemplate(fieldName: string, name: string, template: any): CSR { this.Templates.Fields[fieldName] = this.Templates.Fields[fieldName] || {}; this.Templates.Fields[fieldName][name] = template; return this; } /* common */ - onPreRender(...callbacks: { (ctx: SPClientTemplates.RenderContext): void; }[]): ICSR { - for (var i = 0; i < callbacks.length; i++) { - this.OnPreRender.push(callbacks[i]); + onPreRender(...callbacks: Array<(ctx: SPClientTemplates.RenderContext) => void>): CSR { + for (var cb of callbacks) { + this.OnPreRender.push(cb); } return this; } - onPostRender(...callbacks: { (ctx: SPClientTemplates.RenderContext): void; }[]): ICSR { - for (var i = 0; i < callbacks.length; i++) { - this.OnPostRender.push(callbacks[i]); + onPostRender(...callbacks: Array<(ctx: SPClientTemplates.RenderContext) => void>): CSR { + for (var cb of callbacks) { + this.OnPostRender.push(cb); } return this; } - onPreRenderField(field: string, callback: { (schema: SPClientTemplates.FieldSchema, ctx: SPClientTemplates.RenderContext): void; }): ICSR { + onPreRenderField(field: string, callback: (schema: SPClientTemplates.FieldSchema, ctx: SPClientTemplates.RenderContext) => void): CSR { return this.onPreRender((ctx: SPClientTemplates.RenderContext) => { - var ctxInView = ctx; + var ctxInView = ctx as SPClientTemplates.RenderContext_InView; //ListSchema schma exists in Form and in View render context var fields = ctxInView.ListSchema.Field; if (fields) { - for (var i = 0; i < fields.length; i++) { - if (fields[i].Name === field) { - callback(fields[i], ctx); + for (var innerField of fields) { + if (innerField.Name === field) { + callback(innerField, ctx); } } } }); } - onPostRenderField(field: string, callback: { (schema: SPClientTemplates.FieldSchema, ctx: SPClientTemplates.RenderContext): void; }): ICSR { + onPostRenderField(field: string, callback: (schema: SPClientTemplates.FieldSchema, ctx: SPClientTemplates.RenderContext) => void): CSR { return this.onPostRender((ctx: SPClientTemplates.RenderContext) => { - var ctxInView = ctx; + var ctxInView = ctx as SPClientTemplates.RenderContext_InView; //ListSchema schma exists in Form and in View render context var fields = ctxInView.ListSchema.Field; if (fields) { - for (var i = 0; i < fields.length; i++) { - if (fields[i].Name === field) { - callback(fields[i], ctx); + for (var innerField of fields) { + if (innerField.Name === field) { + callback(innerField, ctx); } } } }); } - makeReadOnly(fieldName: string): ICSR { + makeReadOnly(fieldName: string): CSR { return this .onPreRenderField(fieldName, (schema, ctx) => { - if (ctx.ControlMode == SPClientTemplates.ClientControlMode.Invalid - || ctx.ControlMode == SPClientTemplates.ClientControlMode.DisplayForm) return; - (schema).ReadOnlyField = true; - (schema).ReadOnly = "TRUE"; + if (ctx.ControlMode === SPClientTemplates.ClientControlMode.Invalid + || ctx.ControlMode === SPClientTemplates.ClientControlMode.DisplayForm) return; + (schema as SPClientTemplates.FieldSchema_InForm).ReadOnlyField = true; + (schema as SPClientTemplates.FieldSchema_InView).ReadOnly = "TRUE"; - if (ctx.ControlMode == SPClientTemplates.ClientControlMode.View) { - var ctxInView = ctx; + if (ctx.ControlMode === SPClientTemplates.ClientControlMode.View) { + var ctxInView = ctx as SPClientTemplates.RenderContext_InView; if (ctxInView.inGridMode) { //TODO: Disable editing in grid mode } } else { - var ctxInForm = ctx; - if (schema.Type != 'User' && schema.Type != 'UserMulti') { + var ctxInForm = ctx as SPClientTemplates.RenderContext_FieldInForm; + if (schema.Type !== 'User' && schema.Type !== 'UserMulti') { var template = getFieldTemplate(schema, SPClientTemplates.ClientControlMode.DisplayForm); ctxInForm.Templates.Fields[fieldName] = template; @@ -846,9 +838,9 @@ namespace CSR { }) .onPostRenderField(fieldName, (schema: SPClientTemplates.FieldSchema_InForm_User, ctx) => { - if (ctx.ControlMode == SPClientTemplates.ClientControlMode.EditForm - || ctx.ControlMode == SPClientTemplates.ClientControlMode.NewForm) { - if (schema.Type == 'User' || schema.Type == 'UserMulti') { + if (ctx.ControlMode === SPClientTemplates.ClientControlMode.EditForm + || ctx.ControlMode === SPClientTemplates.ClientControlMode.NewForm) { + if (schema.Type === 'User' || schema.Type === 'UserMulti') { SP.SOD.executeFunc('clientpeoplepicker.js', 'SPClientPeoplePicker', () => { var topSpanId = schema.Name + '_' + schema.Id + '_$ClientPeoplePicker'; var retryCount = 10; @@ -858,7 +850,7 @@ namespace CSR { if (retryCount--) setTimeout(callback, 1); } else { pp.SetEnabledState(false); - pp.DeleteProcessedUser = function () { }; + pp.DeleteProcessedUser = function deleteProcessedUser() { /*dummy function*/}; } }; callback(); @@ -868,13 +860,13 @@ namespace CSR { }); } - makeHidden(fieldName: string): ICSR { + makeHidden(fieldName: string): CSR { return this.onPreRenderField(fieldName, (schema, ctx) => { - if (ctx.ControlMode == SPClientTemplates.ClientControlMode.Invalid) return; - (schema).Hidden = true; + if (ctx.ControlMode === SPClientTemplates.ClientControlMode.Invalid) return; + (schema as SPClientTemplates.FieldSchema_InForm).Hidden = true; - if (ctx.ControlMode == SPClientTemplates.ClientControlMode.View) { - var ctxInView = ctx; + if (ctx.ControlMode === SPClientTemplates.ClientControlMode.View) { + var ctxInView = ctx as SPClientTemplates.RenderContext_InView; if (ctxInView.inGridMode) { //TODO: Hide item in grid mode @@ -883,7 +875,7 @@ namespace CSR { } } else { - var ctxInForm = ctx; + var ctxInForm = ctx as SPClientTemplates.RenderContext_Form; var pHolderId = ctxInForm.FormUniqueId + ctxInForm.FormContext.listAttributes.Id + fieldName; var placeholder = $get(pHolderId); @@ -891,7 +883,7 @@ namespace CSR { while (current.tagName.toUpperCase() !== "TR") { current = current.parentElement; } - var row = current; + var row = current as HTMLTableRowElement; row.style.display = 'none'; } @@ -899,7 +891,7 @@ namespace CSR { }); } - filteredLookup(fieldName: string, camlFilter: string, listname?: string, lookupField?: string): ICSR { + filteredLookup(fieldName: string, camlFilter: string, listname?: string, lookupField?: string): CSR { return this.fieldEdit(fieldName, SPFieldCascadedLookup_Edit) @@ -911,7 +903,10 @@ namespace CSR { var parseRegex = /\{[^\}]+\}/g; var dependencyExpressions: string[] = []; var result: RegExpExecArray; - while ((result = parseRegex.exec(camlFilter))) { + function nextResult() { + return result = parseRegex.exec(camlFilter); + } + while (nextResult()) { dependencyExpressions.push(stripBraces(result[0])); } var dependencyValues: { [expr: string]: string } = {}; @@ -928,7 +923,7 @@ namespace CSR { return ''; - var _schema = _myData.fieldSchema; + var _schema = _myData.fieldSchema as SPClientTemplates.FieldSchema_InForm_Lookup; var validators = new SPClientForms.ClientValidation.ValidatorSet(); validators.RegisterValidator(new BooleanValueValidator(() => _optionsLoaded, "Wait until lookup values loaded and try again")); @@ -941,7 +936,7 @@ namespace CSR { var _dropdownId = _myData.fieldName + '_' + _myData.fieldSchema.Id + '_$LookupField'; var _valueStr = _myData.fieldValue != null ? _myData.fieldValue : ''; var _selectedValue = SPClientTemplates.Utility.ParseLookupValue(_valueStr).LookupId; - var _noValueSelected = _selectedValue == 0; + var _noValueSelected = _selectedValue === 0; var _optionsLoaded = false; var pendingLoads = 0; @@ -950,11 +945,11 @@ namespace CSR { _myData.registerInitCallback(_myData.fieldName, InitLookupControl); - _myData.registerFocusCallback(_myData.fieldName, function () { + _myData.registerFocusCallback(_myData.fieldName, function focusCallback() { if (_dropdownElt != null) _dropdownElt.focus(); }); - _myData.registerValidationErrorCallback(_myData.fieldName, function (errorResult) { + _myData.registerValidationErrorCallback(_myData.fieldName, function validationErrorCallback(errorResult) { SPFormControl_AppendValidationErrorMessage(_dropdownId, errorResult); }); _myData.registerGetValueCallback(_myData.fieldName, GetCurrentLookupValue); @@ -963,7 +958,7 @@ namespace CSR { return BuildLookupDropdownControl(); function InitLookupControl() { - _dropdownElt = document.getElementById(_dropdownId); + _dropdownElt = document.getElementById(_dropdownId) as HTMLSelectElement; if (_dropdownElt != null) AddEvtHandler(_dropdownElt, "onchange", OnLookupValueChanged); @@ -994,7 +989,7 @@ namespace CSR { function GetCurrentLookupValue() { if (_dropdownElt == null) return ''; - return _dropdownElt.value == '0' || _dropdownElt.value == '' ? '' : _dropdownElt.value + ';#' + (_dropdownElt.options[_dropdownElt.selectedIndex] as any /* TODO remove `as any` */).text; + return _dropdownElt.value === '0' || _dropdownElt.value === '' ? '' : _dropdownElt.value + ';#' + (_dropdownElt.options[_dropdownElt.selectedIndex] as any /* TODO remove `as any` */).text; } function stripBraces(input: string): string { @@ -1005,7 +1000,7 @@ namespace CSR { var isLookupValue = !!listId; if (isLookupValue) { var lookup = SPClientTemplates.Utility.ParseLookupValue(value); - if (expressionParts.length == 1 && expressionParts[0] == 'Value') { + if (expressionParts.length === 1 && expressionParts[0] === 'Value') { value = lookup.LookupValue; expressionParts.shift(); } else { @@ -1013,7 +1008,7 @@ namespace CSR { } } - if (expressionParts.length == 0) { + if (expressionParts.length === 0) { dependencyValues[expr] = value; callback(); } else { @@ -1029,11 +1024,11 @@ namespace CSR { ctx.executeQueryAsync((o, e) => { var value = item.get_item(field.get_internalName()); - if (field.get_typeAsString() == 'Lookup') { - field = ctx.castTo(field, SP.FieldLookup); - var lookup = (value); + if (field.get_typeAsString() === 'Lookup') { + field = ctx.castTo(field, SP.FieldLookup) as SP.Field; + var lookup = (value as SP.FieldLookupValue); value = lookup.get_lookupId() + ';#' + lookup.get_lookupValue(); - listId = (field).get_lookupList(); + listId = (field as SP.FieldLookup).get_lookupList(); } getDependencyValue(expr, value, listId, expressionParts, callback); @@ -1050,7 +1045,7 @@ namespace CSR { CSR.addUpdatedValueCallback(rCtx, field, (v, s) => { getDependencyValue(expr, v, - (s).LookupListId, + (s as SPClientTemplates.FieldSchema_InForm_Lookup).LookupListId, exprParts.slice(0), loadOptions); }); @@ -1076,7 +1071,7 @@ namespace CSR { }); //TODO: Handle ShowField attribure - if (predicate.substr(0, 5) == '' + @@ -1098,7 +1093,7 @@ namespace CSR { if (!_schema.Required) { var defaultOpt = new Option(Strings.STS.L_LookupFieldNoneOption, '0', selected, selected); (_dropdownElt.options as any /* TODO remove `as any` */).add(defaultOpt); - selected = _selectedValue == 0; + selected = _selectedValue === 0; } var isEmptyList = true; @@ -1112,11 +1107,11 @@ namespace CSR { id = c.get_id(); text = c.get_item('Title'); } else { - var value = c.get_item(lookupField); + var value = c.get_item(lookupField) as SP.FieldLookupValue; id = value.get_lookupId(); text = value.get_lookupValue(); } - var isSelected = _selectedValue == id; + var isSelected = _selectedValue === id; if (isSelected) { selected = true; } @@ -1128,12 +1123,12 @@ namespace CSR { _optionsLoaded = true; if (!pendingLoads) { if (isFirstLoad) { - if (_selectedValue == 0 && !selected) { + if (_selectedValue === 0 && !selected) { _dropdownElt.selectedIndex = 0; OnLookupValueChanged(); } } else { - if (_selectedValue != 0 && !selected) { + if (_selectedValue !== 0 && !selected) { _dropdownElt.selectedIndex = 0; } OnLookupValueChanged(); @@ -1147,9 +1142,9 @@ namespace CSR { } - koEditField(fieldName: string, template: string, vm: IKoFieldInForm, dependencyFields?: string[]): ICSR { + koEditField(fieldName: string, template: string, vm: KoFieldInForm, dependencyFields?: string[]): CSR { return this.fieldEdit(fieldName, koEditField_Edit) - .fieldNew(fieldName, koEditField_Edit); + .fieldNew(fieldName, koEditField_Edit); function koEditField_Edit(rCtx: SPClientTemplates.RenderContext_FieldInForm) { @@ -1166,12 +1161,12 @@ namespace CSR { if (dependencyFields) { dependencyFields.forEach(dependencyField => { - if (!vm[dependencyField]) { - vm[dependencyField] = ko.observable(CSR.getFieldValue(rCtx, dependencyField)); - } - CSR.addUpdatedValueCallback(rCtx, dependencyField, v => { - vm[dependencyField](v); - }); + if (!vm[dependencyField]) { + vm[dependencyField] = ko.observable(CSR.getFieldValue(rCtx, dependencyField)); + } + CSR.addUpdatedValueCallback(rCtx, dependencyField, v => { + vm[dependencyField](v); + }); }); } @@ -1188,17 +1183,17 @@ namespace CSR { ko.applyBindings(vm, $get(elementId)); }); - return '

'+template+'
'; + return '
' + template + '
'; } } - computedValue(targetField: string, transform: (...values: string[]) => string, ...sourceField: string[]): ICSR { + computedValue(targetField: string, transform: (...values: string[]) => string, ...sourceField: string[]): CSR { var dependentValues: { [field: string]: string } = {}; return this.onPostRenderField(targetField, (schema: SPClientTemplates.FieldSchema_InForm, ctx: SPClientTemplates.RenderContext_FieldInForm) => { - if (ctx.ControlMode == SPClientTemplates.ClientControlMode.EditForm - || ctx.ControlMode == SPClientTemplates.ClientControlMode.NewForm) { - var targetControl = CSR.getControl(schema); + if (ctx.ControlMode === SPClientTemplates.ClientControlMode.EditForm + || ctx.ControlMode === SPClientTemplates.ClientControlMode.NewForm) { + var targetControl = CSR.getControl(schema as SPClientTemplates.FieldSchema_InForm); sourceField.forEach((field) => { CSR.addUpdatedValueCallback(ctx, field, v => { dependentValues[field] = v; @@ -1211,7 +1206,7 @@ namespace CSR { }); } - setInitialValue(fieldName: string, value: any, ignoreNull?: boolean): ICSR { + setInitialValue(fieldName: string, value: any, ignoreNull?: boolean): CSR { if (value || !ignoreNull) { return this.onPreRenderField(fieldName, (schema, ctx: SPClientTemplates.RenderContext_FieldInForm) => { ctx.ListData.Items[0][fieldName] = value; @@ -1222,7 +1217,7 @@ namespace CSR { } - autofill(fieldName: string, init: (ctx: IAutoFillFieldContext) => () => void): ICSR { + autofill(fieldName: string, init: (ctx: AutoFillFieldContext) => () => void): CSR { return this .fieldNew(fieldName, SPFieldLookup_Autofill_Edit) .fieldEdit(fieldName, SPFieldLookup_Autofill_Edit); @@ -1247,11 +1242,11 @@ namespace CSR { _myData.registerClientValidator(_myData.fieldName, validators); _myData.registerInitCallback(_myData.fieldName, initAutoFillControl); - _myData.registerFocusCallback(_myData.fieldName, function () { + _myData.registerFocusCallback(_myData.fieldName, function focusCallback() { if (_textInputElt != null) _textInputElt.focus(); }); - _myData.registerValidationErrorCallback(_myData.fieldName, function (errorResult) { + _myData.registerValidationErrorCallback(_myData.fieldName, function validationErrorCallback(errorResult) { SPFormControl_AppendValidationErrorMessage(_textInputId, errorResult); }); _myData.registerGetValueCallback(_myData.fieldName, () => _myData.fieldValue); @@ -1260,7 +1255,7 @@ namespace CSR { return buildAutoFillControl(); function initAutoFillControl() { - _textInputElt = document.getElementById(_textInputId); + _textInputElt = document.getElementById(_textInputId) as HTMLInputElement; SP.SOD.executeFunc("autofill.js", "SPClientAutoFill", () => { _autoFillControl = new SPClientAutoFill(_textInputId, _autofillContainerId, (_) => callback()); @@ -1302,20 +1297,20 @@ namespace CSR { } - seachLookup(fieldName: string): ICSR { - return this.autofill(fieldName, (ctx: IAutoFillFieldContext) => { + seachLookup(fieldName: string): CSR { + return this.autofill(fieldName, (ctx: AutoFillFieldContext) => { var _myData = ctx.fieldContext; - var _schema = _myData.fieldSchema; - if (_myData.fieldSchema.Type != 'Lookup') { + var _schema = _myData.fieldSchema as SPClientTemplates.FieldSchema_InForm_Lookup; + if (_myData.fieldSchema.Type !== 'Lookup') { return null; } var _valueStr = _myData.fieldValue != null ? _myData.fieldValue : ''; var _selectedValue = SPClientTemplates.Utility.ParseLookupValue(_valueStr); - var _noValueSelected = _selectedValue.LookupId == 0; + var _noValueSelected = _selectedValue.LookupId === 0; ctx.control.value = _selectedValue.LookupValue; $addHandler(ctx.control, "blur", _ => { - if (ctx.control.value == '') { + if (ctx.control.value === '') { _myData.fieldValue = ''; _myData.updateControlValue(fieldName, _myData.fieldValue); } @@ -1356,13 +1351,13 @@ namespace CSR { var rows = relevantResults.get_resultRows(); var items = []; - for (var i = 0; i < rows.length; i++) { - items.push(AutoFillOptionBuilder.buildOptionItem(parseInt(rows[i]["ListItemId"], 10), rows[i]["Title"])); + for (var row of rows) { + items.push(AutoFillOptionBuilder.buildOptionItem(parseInt(row["ListItemId"], 10), row["Title"])); } items.push(AutoFillOptionBuilder.buildSeparatorItem()); - if (relevantResults.get_totalRows() == 0) + if (relevantResults.get_totalRows() === 0) items.push(AutoFillOptionBuilder.buildFooterItem("No results. Please refine your query.")); else items.push(AutoFillOptionBuilder.buildFooterItem("Showing " + rows.length + " of" + relevantResults.get_totalRows() + " items!")); @@ -1375,7 +1370,7 @@ namespace CSR { console.log(args.get_message()); }); }); - } + }; function onSelectItem(targetInputId, item: ISPClientAutoFillData) { var targetElement = ctx.control; @@ -1389,16 +1384,16 @@ namespace CSR { }); } - lookupAddNew(fieldName: string, prompt: string, showDialog?: boolean, contentTypeId?: string): ICSR { + lookupAddNew(fieldName: string, prompt: string, showDialog?: boolean, contentTypeId?: string): CSR { return this.onPostRenderField(fieldName, (schema: SPClientTemplates.FieldSchema_InForm_Lookup, ctx: SPClientTemplates.RenderContext_FieldInForm) => { - if (ctx.ControlMode == SPClientTemplates.ClientControlMode.EditForm - || ctx.ControlMode == SPClientTemplates.ClientControlMode.NewForm) + if (ctx.ControlMode === SPClientTemplates.ClientControlMode.EditForm + || ctx.ControlMode === SPClientTemplates.ClientControlMode.NewForm) var control = CSR.getControl(schema); if (control) { var weburl = _spPageContextInfo.webServerRelativeUrl; - if (weburl[weburl.length - 1] == '/') { + if (weburl[weburl.length - 1] === '/') { weburl = weburl.substring(0, weburl.length - 1); } var newFormUrl = weburl + '/_layouts/listform.aspx/listform.aspx?PageType=8' @@ -1476,56 +1471,48 @@ namespace CSR { } } - + type RenderContext = (ctx: SPClientTemplates.RenderContext) => T; /** Lightweight client-side rendering template overrides.*/ - export interface ICSR { + export interface CSR { /** Override rendering template. @param name Name of template to override. @param template New template. */ - template(name: string, template: string): ICSR; + template(name: string, template: string | RenderContext): CSR; /** Override rendering template. @param name Name of template to override. @param template New template. */ - template(name: string, template: (ctx: SPClientTemplates.RenderContext) => string): ICSR; /** Override field rendering template. @param name Internal name of field to override. @param name Name of template to override. @param template New template. */ - fieldTemplate(field: string, name: string, template: string): ICSR; - - /** Override field rendering template. - @param name Internal name of field to override. - @param name Name of template to override. - @param template New template. - */ - fieldTemplate(field: string, name: string, template: (ctx: SPClientTemplates.RenderContext) => string): ICSR; + fieldTemplate(field: string, name: string, template: string | RenderContext): CSR; /** Sets pre-render callbacks. Callback called before rendering starts. @param callbacks pre-render callbacks. */ - onPreRender(...callbacks: { (ctx: SPClientTemplates.RenderContext): void; }[]): ICSR; + onPreRender(...callbacks: Array>): CSR; /** Sets post-render callbacks. Callback called after rendered html inserted to DOM. @param callbacks post-render callbacks. */ - onPostRender(...callbacks: { (ctx: SPClientTemplates.RenderContext): void; }[]): ICSR; + onPostRender(...callbacks: Array>): CSR; /** Sets pre-render callbacks for field. Callback called before rendering starts. Correctly handles form rendering. @param fieldName Internal name of the field. @param callbacks pre-render callbacks. */ - onPreRenderField(field: string, callback: { (schema: SPClientTemplates.FieldSchema, ctx: SPClientTemplates.RenderContext): void; }): ICSR; + onPreRenderField(field: string, callback: (schema: SPClientTemplates.FieldSchema, ctx: SPClientTemplates.RenderContext) => void): CSR; /** Sets post-render callbacks. Callback called after rendered html inserted to DOM. Correctly handles form rendering. @param fieldName Internal name of the field. @param callbacks post-render callbacks. */ - onPostRenderField(field: string, callback: { (schema: SPClientTemplates.FieldSchema, ctx: SPClientTemplates.RenderContext): void; }): ICSR; + onPostRenderField(field: string, callback: (schema: SPClientTemplates.FieldSchema, ctx: SPClientTemplates.RenderContext) => void): CSR; /** Registers overrides in client-side templating engine.*/ register(): void; @@ -1533,179 +1520,168 @@ namespace CSR { /** Override View rendering template. @param template New view template. */ - view(template: string): ICSR; + view(template: string): CSR; /** Override View rendering template. @param template New view template. */ - view(template: (ctx: SPClientTemplates.RenderContext_InView) => string): ICSR; - view(template: (ctx: SPClientTemplates.RenderContext_Form) => string): ICSR; + // tslint:disable-next-line: unified-signatures + view(template: (ctx: SPClientTemplates.RenderContext_InView | SPClientTemplates.RenderContext_Form) => string): CSR; /** Override Item rendering template. @param template New item template. */ - item(template: string): ICSR; + item(template: string): CSR; /** Override Item rendering template. @param template New item template. */ - item(template: (ctx: SPClientTemplates.RenderContext_ItemInView) => string): ICSR; - item(template: (ctx: SPClientTemplates.RenderContext_Form) => string): ICSR; + // tslint:disable-next-line: unified-signatures + item(template: (ctx: SPClientTemplates.RenderContext_ItemInView | SPClientTemplates.RenderContext_Form) => string): CSR; /** Override Header rendering template. @param template New header template. */ - header(template: string): ICSR; - - /** Override Header rendering template. - @param template New header template. - */ - header(template: (ctx: SPClientTemplates.RenderContext) => string): ICSR; + header(template: string | RenderContext): CSR; /** Override Body rendering template. @param template New body template. */ - body(template: string): ICSR; - - /** Override Body rendering template. - @param template New body template. - */ - body(template: (ctx: SPClientTemplates.RenderContext) => string): ICSR; + body(template: string | RenderContext): CSR; /** Override Footer rendering template. @param template New footer template. */ - footer(template: string): ICSR; - - /** Override Footer rendering template. - @param template New footer template. - */ - footer(template: (ctx: SPClientTemplates.RenderContext) => string): ICSR; + footer(template: string | RenderContext): CSR; /** Override View rendering template for specified field. @param fieldName Internal name of the field. @param template New View template. */ - fieldView(fieldName: string, template: string): ICSR; + fieldView(fieldName: string, template: string): CSR; /** Override View rendering template for specified field. @param fieldName Internal name of the field. @param template New View template. */ - fieldView(fieldName: string, template: (ctx: SPClientTemplates.RenderContext_FieldInView) => string): ICSR; + // tslint:disable-next-line: unified-signatures + fieldView(fieldName: string, template: (ctx: SPClientTemplates.RenderContext_FieldInView) => string): CSR; /** Override DisplyForm rendering template for specified field. @param fieldName Internal name of the field. @param template New DisplyForm template. */ - fieldDisplay(fieldName: string, template: string): ICSR; + fieldDisplay(fieldName: string, template: string): CSR; /** Override DisplyForm rendering template. @param fieldName Internal name of the field. @param template New DisplyForm template. */ - fieldDisplay(fieldName: string, template: (ctx: SPClientTemplates.RenderContext_FieldInForm) => string): ICSR; + // tslint:disable-next-line: unified-signatures + fieldDisplay(fieldName: string, template: (ctx: SPClientTemplates.RenderContext_FieldInForm) => string): CSR; /** Override EditForm rendering template for specified field. @param fieldName Internal name of the field. @param template New EditForm template. */ - fieldEdit(fieldName: string, template: string): ICSR; + fieldEdit(fieldName: string, template: string): CSR; /** Override EditForm rendering template. @param fieldName Internal name of the field. @param template New EditForm template. */ - fieldEdit(fieldName: string, template: (ctx: SPClientTemplates.RenderContext_FieldInForm) => string): ICSR; + // tslint:disable-next-line: unified-signatures + fieldEdit(fieldName: string, template: (ctx: SPClientTemplates.RenderContext_FieldInForm) => string): CSR; /** Override NewForm rendering template for specified field. @param fieldName Internal name of the field. @param template New NewForm template. */ - fieldNew(fieldName: string, template: string): ICSR; + fieldNew(fieldName: string, template: string): CSR; /** Override NewForm rendering template. @param fieldName Internal name of the field. @param template New NewForm template. */ - fieldNew(fieldName: string, template: (ctx: SPClientTemplates.RenderContext_FieldInForm) => string): ICSR; + // tslint:disable-next-line: unified-signatures + fieldNew(fieldName: string, template: (ctx: SPClientTemplates.RenderContext_FieldInForm) => string): CSR; /** Set initial value for field. @param fieldName Internal name of the field. @param value Initial value for field. */ - setInitialValue(fieldName: string, value: any): ICSR; + setInitialValue(fieldName: string, value: any): CSR; /** Make field hidden in list view and standard forms. @param fieldName Internal name of the field. */ - makeHidden(fieldName: string): ICSR + makeHidden(fieldName: string): CSR; /** Replace New and Edit templates for field to Display template. @param fieldName Internal name of the field. */ - makeReadOnly(fieldName: string): ICSR + makeReadOnly(fieldName: string): CSR; /** Create cascaded Lookup Field. @param fieldName Internal name of the field. @param camlFilter CAML predicate expression (inside Where clause). Use {FieldName} tokens for dependency fields substitutions. */ - filteredLookup(fieldName: string, camlFilter: string, listname?: string, lookupField?: string): ICSR + filteredLookup(fieldName: string, camlFilter: string, listname?: string, lookupField?: string): CSR; /** Auto computes text-based field value based on another fields. @param targetField Internal name of the field. @param transform Function combines source field values. @param sourceField Internal names of source fields. */ - computedValue(targetField: string, transform: (...values: string[]) => string, ...sourceField: string[]): ICSR + computedValue(targetField: string, transform: (...values: string[]) => string, ...sourceField: string[]): CSR; /** Field text value with autocomplete based on autofill.js @param fieldName Internal name of the field. @param ctx AutoFill context. */ - autofill(fieldName: string, init: (ctx: IAutoFillFieldContext) => () => void): ICSR + autofill(fieldName: string, init: (ctx: AutoFillFieldContext) => () => void): CSR; /** Replace defult dropdown to search-based autocomplete for Lookup field. @param fieldName Internal name of the field. */ - seachLookup(fieldName: string): ICSR; + seachLookup(fieldName: string): CSR; /** Adds link to add new value to lookup list. @param fieldName Internal name of the field. @param prompt Text to display as a link to add new value. @param contentTypeID Default content type for new item. */ - lookupAddNew(fieldName: string, prompt: string, showDialog?: boolean, contentTypeId?: string): ICSR; + lookupAddNew(fieldName: string, prompt: string, showDialog?: boolean, contentTypeId?: string): CSR; - koEditField(fieldName: string, template: string, vm: IKoFieldInForm, dependencyFields?: string[]): ICSR; + koEditField(fieldName: string, template: string, vm: KoFieldInForm, dependencyFields?: string[]): CSR; } - export interface IAutoFillFieldContext { + export interface AutoFillFieldContext { renderContext: SPClientTemplates.RenderContext_FieldInForm; fieldContext: SPClientTemplates.ClientFormContext; autofill: SPClientAutoFill; control: HTMLInputElement; } - export interface IKoFieldInForm { - renderingContext?:SPClientTemplates.RenderContext_FieldInForm; - value?:KnockoutObservable; + export interface KoFieldInForm { + renderingContext?: SPClientTemplates.RenderContext_FieldInForm; + value?: KnockoutObservable; } - interface IFormRenderContexWithHook extends SPClientTemplates.RenderContext_FieldInForm { - FormContextHook: IFormContextHook; + interface FormRenderContexWithHook extends SPClientTemplates.RenderContext_FieldInForm { + FormContextHook: FormContextHook; } - interface IFormContextHook { - [fieldName: string]: IFormContextHookField; + interface FormContextHook { + [fieldName: string]: FormContextHookField; } - interface IFormContextHookField { + interface FormContextHookField { fieldSchema?: SPClientTemplates.FieldSchema_InForm; lastValue?: any; getValue?: () => any; @@ -1713,7 +1689,7 @@ namespace CSR { } - function ensureFormContextHookField(hook: IFormContextHook, fieldName: string): IFormContextHookField { + function ensureFormContextHookField(hook: FormContextHook, fieldName: string): FormContextHookField { return hook[fieldName] = hook[fieldName] || { updatedValueCallbacks: [] }; @@ -1730,7 +1706,7 @@ namespace CSR { } -if (typeof SP == 'object' && SP && typeof SP.SOD == 'object' && SP.SOD) { +if (typeof SP === 'object' && SP && typeof SP.SOD === 'object' && SP.SOD) { SP.SOD.notifyScriptLoadedAndExecuteWaitingJobs("typescripttemplates.ts"); } @@ -1741,15 +1717,15 @@ if (typeof SP == 'object' && SP && typeof SP.SOD == 'object' && SP.SOD) { namespace spdevlab { - export module mQuery { + export namespace mQuery { export class DynamicTable { // private fields - _domContainer:HTMLElement; - _tableContainer:MQueryResultSetElements; + _domContainer: HTMLElement; + _tableContainer: MQueryResultSetElements; - _rowTemplateId:string = null; - _rowTemplateContent:string = null; + _rowTemplateId: string = null; + _rowTemplateContent: string = null; _options = { tableCnt: '.spdev-rep-tb', @@ -1790,9 +1766,9 @@ namespace spdevlab { m$(this._tableContainer).append(this._rowTemplateContent); - m$("tr:last-child " + this._options.removeCnt, this._tableContainer).click( (e) => { + m$("tr:last-child " + this._options.removeCnt, this._tableContainer).click((e) => { - var targetElement = e.currentTarget; + var targetElement = e.currentTarget as HTMLElement; var parentRow = m$(targetElement).parents("tr").first(); m$(parentRow).remove(); @@ -1812,10 +1788,10 @@ namespace spdevlab { } } - static _templates:string[] = []; + static _templates: string[] = []; static initTables() { // init templates - m$('script').forEach((template:HTMLElement) => { + m$('script').forEach((template: HTMLElement) => { var id = m$(template).attr("dynamic-table-template-id"); @@ -1825,7 +1801,7 @@ namespace spdevlab { }); // init tables - m$(".spdev-rep-tb-cnt").forEach( divContainer => { + m$(".spdev-rep-tb-cnt").forEach(divContainer => { var dynamicTable = new DynamicTable(); @@ -1849,12 +1825,12 @@ m$.ready(() => { //whoisapppart.ts -module _ { +namespace _ { var queryString = parseQueryString(); - var isIframe = queryString['DisplayMode'] == 'iframe' + var isIframe = queryString['DisplayMode'] === 'iframe'; var spHostUrl = queryString['SPHostUrl']; var editmode = Number(queryString['editmode']); - var includeDetails = queryString['boolProp'] == 'true'; + var includeDetails = queryString['boolProp'] === 'true'; prepareVisual(); m$.ready(() => { @@ -1873,7 +1849,7 @@ module _ { AllowMultipleValues: false, Width: 300, OnUserResolvedClientScript: onUserResolvedClientScript - } + }; SPClientPeoplePicker.InitializeStandalonePeoplePicker(peoplePickerElementId, null, schema); } @@ -1905,6 +1881,8 @@ module _ { var properties = personProperties.get_userProfileProperties(); var messageText = ""; for (var key in properties) { + if(properties.hasOwnProperty(key)) + continue; messageText += "
[" + key + "]: \"" + properties[key] + "\""; } $get("detailInfo").innerHTML = messageText; @@ -1920,11 +1898,10 @@ module _ { function partProperties() { - if (editmode == 1) { + if (editmode === 1) { $get("editmodehdr").style.display = "inline"; $get("content").style.display = "none"; - } - else if (includeDetails) { + } else if (includeDetails) { $get('detailInfo').style.display = 'block'; $get("editmodehdr").style.display = "none"; @@ -1965,9 +1942,9 @@ module _ { var qs = document.location.search.split('?')[1]; if (qs) { var parts = qs.split('&'); - for (var i = 0; i < parts.length; i++) { - if (parts[i]) { - var pair = parts[i].split('='); + for (var part of parts) { + if (part) { + var pair = part.split('='); result[pair[0]] = decodeURIComponent(pair[1]); } } @@ -1984,12 +1961,12 @@ namespace MySP { /** To use this function, you must ensure that jQuery and CSOMPromise js files are loaded to the page */ executeQueryPromise(): JQueryPromise { var deferred = jQuery.Deferred(); - this.executeQueryAsync(function (sender, args) { + this.executeQueryAsync(function done(sender, args) { deferred.resolve(sender, args); }, - function (sender, args) { - deferred.reject(sender, args); - }) + function fail(sender, args) { + deferred.reject(sender, args); + }); return deferred.promise(); } @@ -2007,7 +1984,7 @@ namespace MySP { SP.SOD.notifyScriptLoadedAndExecuteWaitingJobs("CSOMPromise.ts"); -module _ { +namespace _ { var context: MySP.ClientContextPromise; var web: SP.Web; var site: SP.Site; @@ -2018,12 +1995,12 @@ module _ { // This code runs when the DOM is ready and creates a context object // which is needed to use the SharePoint object model. // It also wires up the click handlers for the two HTML buttons in Default.aspx. - $(document).ready(function () { + $(document).ready(function onready() { context = MySP.ClientContextPromise.get_current(); site = context.get_site(); web = context.get_web(); - $('#listExisting').click(function () { listGroups(); }); - $('#createTerms').click(function () { createTerms(); }); + $('#listExisting').click(function listExistingClick() { listGroups(); }); + $('#createTerms').click(function createTermsClick() { createTerms(); }); }); // When the listExisting button is clicked, start by loading @@ -2097,44 +2074,44 @@ module _ { context.load(currentGroup); var termSets: SP.Taxonomy.TermSetCollection; context.executeQueryPromise() - .then( - () => { - // The group is now available becuase this is the - // success callback. So now we'll load and populate the - // term set collection. We have to do this before we can - // iterate through the collection, so we can do this - // with the following nested executeQueryAsync method call. - termSets = currentGroup.get_termSets(); - context.load(termSets); - return context.executeQueryPromise() - }) - .then(() => { - // The term sets are now available becuase this is the - // success callback. So now we'll iterate through the collection - // and create the clickable div. Also note how we create a - // click event handler for each div on-the-fly, and that we pass in the - // current group ID and term set ID to that function. So when the user - // clicks one of these divs, we will know which - // one was clicked by its term set ID, and to which group it belongs by its - // group ID. We also pass in the event object, so that we can cancel the bubble - // because this clickable div will be inside a parent clickable div and we - // don't want the parent's event to fire. - var termSetEnum = termSets.getEnumerator(); - while (termSetEnum.moveNext()) { - (() => { - var currentTermSet = termSetEnum.get_current(); - var termSetName = document.createElement("div"); - termSetName.appendChild(document.createTextNode(" + " + currentTermSet.get_name())); - termSetName.setAttribute("style", "float:none;cursor:pointer;"); - var termSetID = currentTermSet.get_id(); - termSetName.setAttribute("id", termSetID.toString()); - $(termSetName).click(e => showTerms(e, groupID, termSetID)); - parentDiv.appendChild(termSetName); - })(); - } + .then( + () => { + // The group is now available becuase this is the + // success callback. So now we'll load and populate the + // term set collection. We have to do this before we can + // iterate through the collection, so we can do this + // with the following nested executeQueryAsync method call. + termSets = currentGroup.get_termSets(); + context.load(termSets); + return context.executeQueryPromise(); + }) + .then(() => { + // The term sets are now available becuase this is the + // success callback. So now we'll iterate through the collection + // and create the clickable div. Also note how we create a + // click event handler for each div on-the-fly, and that we pass in the + // current group ID and term set ID to that function. So when the user + // clicks one of these divs, we will know which + // one was clicked by its term set ID, and to which group it belongs by its + // group ID. We also pass in the event object, so that we can cancel the bubble + // because this clickable div will be inside a parent clickable div and we + // don't want the parent's event to fire. + var termSetEnum = termSets.getEnumerator(); + while (termSetEnum.moveNext()) { + (() => { + var currentTermSet = termSetEnum.get_current(); + var termSetName = document.createElement("div"); + termSetName.appendChild(document.createTextNode(" + " + currentTermSet.get_name())); + termSetName.setAttribute("style", "float:none;cursor:pointer;"); + var termSetID = currentTermSet.get_id(); + termSetName.setAttribute("id", termSetID.toString()); + $(termSetName).click(e => showTerms(e, groupID, termSetID)); + parentDiv.appendChild(termSetName); + })(); + } - }) - .fail(() => parentDiv.appendChild(document.createTextNode("An error occurred in loading the term sets for this group"))); + }) + .fail(() => parentDiv.appendChild(document.createTextNode("An error occurred in loading the term sets for this group"))); } @@ -2161,44 +2138,44 @@ module _ { // We need to load and populate the matching group first, or the // term sets that it contains will be inaccessible to our code. var currentGroup = groups.getById(groupID); - var termSets:SP.Taxonomy.TermSetCollection; - var currentTermSet:SP.Taxonomy.TermSet; - var terms:SP.Taxonomy.TermCollection; + var termSets: SP.Taxonomy.TermSetCollection; + var currentTermSet: SP.Taxonomy.TermSet; + var terms: SP.Taxonomy.TermCollection; context.load(currentGroup); context .executeQueryPromise() .then(() => { - // The group is now available becuase this is the - // success callback. So now we'll load and populate the - // term set collection. We have to do this before we can - // iterate through the collection, so we can do this - // with the following nested executeQueryAsync method call. - termSets = currentGroup.get_termSets(); - context.load(termSets); - return context.executeQueryPromise(); - }) + // The group is now available becuase this is the + // success callback. So now we'll load and populate the + // term set collection. We have to do this before we can + // iterate through the collection, so we can do this + // with the following nested executeQueryAsync method call. + termSets = currentGroup.get_termSets(); + context.load(termSets); + return context.executeQueryPromise(); + }) .then(() => { - currentTermSet = termSets.getById(termSetID); - context.load(currentTermSet); - return context.executeQueryPromise(); - }) + currentTermSet = termSets.getById(termSetID); + context.load(currentTermSet); + return context.executeQueryPromise(); + }) .then(() => { - terms = currentTermSet.get_terms(); - context.load(terms); - return context.executeQueryPromise(); - }) + terms = currentTermSet.get_terms(); + context.load(terms); + return context.executeQueryPromise(); + }) .then(() => { - var termsEnum = terms.getEnumerator(); - while (termsEnum.moveNext()) { - var currentTerm = termsEnum.get_current(); + var termsEnum = terms.getEnumerator(); + while (termsEnum.moveNext()) { + var currentTerm = termsEnum.get_current(); - var term = document.createElement("div"); - term.appendChild(document.createTextNode(" - " + currentTerm.get_name())); - term.setAttribute("style", "float:none;margin-left:10px;"); - parentDiv.appendChild(term); - } - }) + var term = document.createElement("div"); + term.appendChild(document.createTextNode(" - " + currentTerm.get_name())); + term.setAttribute("style", "float:none;margin-left:10px;"); + parentDiv.appendChild(term); + } + }) .fail(() => parentDiv.appendChild(document.createTextNode("An error occurred when trying to retrieve terms in this term set"))); } @@ -2297,61 +2274,61 @@ SP.SOD.execute('mquery.js', 'm$.ready', () => { function createPage(evt) { SP.SOD.execute('sp.js', 'SP.ClientConext', () => { SP.SOD.execute('sp.publishing.js', 'SP.Publishing', () => { - var context = SP.ClientContext.get_current(); + var context = SP.ClientContext.get_current(); - var hostUrl = decodeURIComponent(JSRequest.QueryString["SPHostUrl"]); - var hostcontext = new SP.AppContextSite(context, hostUrl); - var web = hostcontext.get_web(); - var pubWeb = SP.Publishing.PublishingWeb.getPublishingWeb(context, web); - context.load(web); - context.load(pubWeb); - context.executeQueryAsync( - // Success callback after getting the host Web as a PublishingWeb. - // We now want to add a new Publishing Page. - function () { - var pageInfo = new SP.Publishing.PublishingPageInformation(); - var newPage = pubWeb.addPublishingPage(pageInfo); - context.load(newPage); - context.executeQueryAsync( - function () { + var hostUrl = decodeURIComponent(JSRequest.QueryString["SPHostUrl"]); + var hostcontext = new SP.AppContextSite(context, hostUrl); + var web = hostcontext.get_web(); + var pubWeb = SP.Publishing.PublishingWeb.getPublishingWeb(context, web); + context.load(web); + context.load(pubWeb); + context.executeQueryAsync( + // Success callback after getting the host Web as a PublishingWeb. + // We now want to add a new Publishing Page. + function done() { + var pageInfo = new SP.Publishing.PublishingPageInformation(); + var newPage = pubWeb.addPublishingPage(pageInfo); + context.load(newPage); + context.executeQueryAsync( + function done() { - // Success callback after adding a new Publishing Page. - // We want to get the actual list item that is represented by the Publishing Page. - var listItem = newPage.get_listItem(); - context.load(listItem); - context.executeQueryAsync( + // Success callback after adding a new Publishing Page. + // We want to get the actual list item that is represented by the Publishing Page. + var listItem = newPage.get_listItem(); + context.load(listItem); + context.executeQueryAsync( - // Success callback after getting the actual list item that is - // represented by the Publishing Page. - // We can now get its FieldValues, one of which is its FileLeafRef value. - // We can then use that value to build the Url to the new page - // and set the href or our link to that Url. - function () { - var link = document.getElementById("linkToPage"); - link.setAttribute("href", web.get_url() + "/Pages/" + listItem.get_fieldValues().FileLeafRef); - link.innerText = "Go to new page!"; - }, + // Success callback after getting the actual list item that is + // represented by the Publishing Page. + // We can now get its FieldValues, one of which is its FileLeafRef value. + // We can then use that value to build the Url to the new page + // and set the href or our link to that Url. + function done() { + var link = document.getElementById("linkToPage"); + link.setAttribute("href", web.get_url() + "/Pages/" + listItem.get_fieldValues().FileLeafRef); + link.innerText = "Go to new page!"; + }, - // Failure callback after getting the actual list item that is - // represented by the Publishing Page. - function (sender, args) { - alert('Failed to get new page: ' + args.get_message()); - } - ); - }, - // Failure callback after trying to add a new Publishing Page. - function (sender, args) { - alert('Failed to Add Page: ' + args.get_message()); - } + // Failure callback after getting the actual list item that is + // represented by the Publishing Page. + function fail(sender, args) { + alert('Failed to get new page: ' + args.get_message()); + } ); - }, - // Failure callback after trying to get the host Web as a PublishingWeb. - function (sender, args) { - alert('Failed to get the PublishingWeb: ' + args.get_message()); - } + }, + // Failure callback after trying to add a new Publishing Page. + function fail(sender, args) { + alert('Failed to Add Page: ' + args.get_message()); + } ); - }); + }, + // Failure callback after trying to get the host Web as a PublishingWeb. + function fail(sender, args) { + alert('Failed to get the PublishingWeb: ' + args.get_message()); + } + ); + }); }); } @@ -2370,16 +2347,16 @@ namespace SampleReputation { isLikedByCurrentUser: boolean; constructor(public row: SPClientTemplates.Item) { - this.id = parseInt(row['ID']); + this.id = parseInt(row['ID'], 10); this.title = row['Title']; - this.likesCount = parseInt(row['LikesCount']) || 0; + this.likesCount = parseInt(row['LikesCount'], 10) || 0; this.isLikedByCurrentUser = this.getLike(row['LikedBy']); } private getLike(likedBy): boolean { if (likedBy && likedBy.length > 0) { - for (var i = 0; i < likedBy.length; i++) { - if (likedBy[i].id == _spPageContextInfo.userId) { + for (var likedByItem of likedBy) { + if (likedByItem.id === _spPageContextInfo.userId) { return true; } } @@ -2413,10 +2390,10 @@ namespace SampleReputation { function renderTemplate(ctx: MyList) { var rows = ctx.ListData.Row; var result = ''; - for (var i = 0; i < rows.length; i++) { - var item = new MyItem(rows[i]); + for (var row of rows) { + var item = new MyItem(row); result += '\ -
  • ' + item.title +'\ +
  • ' + item.title + '\ \ ' + getLikeText(item.isLikedByCurrentUser) + '' + item.likesCount + '\ \ @@ -2431,13 +2408,13 @@ namespace SampleReputation { export function setLike(itemId: number, listId: string): void { var context = SP.ClientContext.get_current(); - var isLiked = m$('#likesCountText' + itemId)[0].textContent == '\u2661'; - SP.SOD.executeFunc('reputation.js', 'Microsoft.Office.Server.ReputationModel.Reputation', function () { + var isLiked = m$('#likesCountText' + itemId)[0].textContent === '\u2661'; + SP.SOD.executeFunc('reputation.js', 'Microsoft.Office.Server.ReputationModel.Reputation', function fail() { Microsoft.Office.Server.ReputationModel.Reputation.setLike(context, listId, itemId, isLiked); context.executeQueryAsync( () => { m$('#likesCountText' + itemId)[0].textContent = getLikeText(isLiked); - var likesCount = parseInt(m$('#likesCount' + itemId)[0].textContent); + var likesCount = parseInt(m$('#likesCount' + itemId)[0].textContent, 10); m$('#likesCount' + itemId)[0].textContent = (isLiked ? likesCount + 1 : likesCount - 1).toString(); }, (sender, args) => { @@ -2454,7 +2431,7 @@ namespace SampleReputation { //code from https://github.com/gandjustas/SharePointAngularTS namespace App { "use strict"; -var app = angular.module("app", []); + var app = angular.module("app", []); } // Install the angularjs.TypeScript.DefinitelyTyped NuGet package @@ -2472,17 +2449,17 @@ namespace App { static $inject: string[] = ["$SharePoint", "$spnotify"]; - constructor(private $SharePoint: App.ISharePoint, private $n:App.ISpNotify) { + constructor(private $SharePoint: App.SharePoint, private $n: App.SpNotify) { this.activate(); } activate() { - var loading = this.$n.showLoading(true) + var loading = this.$n.showLoading(true); this.$SharePoint .getLists() - .then(l => this.lists = l ) + .then(l => this.lists = l) .catch((e: string) => this.$n.show(e, true)) - .finally(() => this.$n.remove(loading) ); + .finally(() => this.$n.remove(loading)); ; } @@ -2496,11 +2473,11 @@ namespace App { namespace App { "use strict"; - export interface ISharePoint { + export interface SharePoint { getLists: () => ng.IPromise; } - class SharePointServcie implements ISharePoint { + class SharePointServcie implements SharePoint { static $inject: string[] = ["$q"]; constructor(public $q: ng.IQService) { @@ -2518,7 +2495,7 @@ namespace App { ctx.executeQueryAsync(() => { var result: SP.List[] = []; - for (var e = lists.getEnumerator(); e.moveNext();) { + for (var e = lists.getEnumerator(); e.moveNext(); /* nothing */) { result.push(e.get_current()); } promise.resolve(result); @@ -2537,13 +2514,13 @@ namespace App { namespace App { "use strict"; - export interface ISpNotify { - showLoading(sticky?: boolean) : string; + export interface SpNotify { + showLoading(sticky?: boolean): string; show(msg: string, sticky?: boolean): string; - remove(id: string):void; + remove(id: string): void; } - class SpNotify implements ISpNotify { + class NotifyImpl implements SpNotify { static $inject: string[] = []; @@ -2560,6 +2537,6 @@ namespace App { } } - angular.module("app").service("$spnotify", SpNotify); + angular.module("app").service("$spnotify", NotifyImpl); } diff --git a/sharepoint/tsconfig.json b/sharepoint/tsconfig.json index e631b4c53e..74acd996fe 100644 --- a/sharepoint/tsconfig.json +++ b/sharepoint/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sharepoint/tslint.json b/sharepoint/tslint.json new file mode 100644 index 0000000000..192203ab54 --- /dev/null +++ b/sharepoint/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} \ No newline at end of file diff --git a/sheetify/tsconfig.json b/sheetify/tsconfig.json index 98d3f6335e..dc5d92fa24 100644 --- a/sheetify/tsconfig.json +++ b/sheetify/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/shelljs/tsconfig.json b/shelljs/tsconfig.json index 626c7e0976..a66a7f15bb 100644 --- a/shelljs/tsconfig.json +++ b/shelljs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/shopify-buy/tsconfig.json b/shopify-buy/tsconfig.json index 97d63070ec..f8019cfc27 100644 --- a/shopify-buy/tsconfig.json +++ b/shopify-buy/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/shortid/tsconfig.json b/shortid/tsconfig.json index f1d91e6f7c..dfe0b80c8d 100644 --- a/shortid/tsconfig.json +++ b/shortid/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/should-promised/tsconfig.json b/should-promised/tsconfig.json index 2d414f832d..626403ff2d 100644 --- a/should-promised/tsconfig.json +++ b/should-promised/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/should/tsconfig.json b/should/tsconfig.json index d1d11a9a0b..42bed321bc 100644 --- a/should/tsconfig.json +++ b/should/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/showdown/tsconfig.json b/showdown/tsconfig.json index 4ebb8c4fb4..348c4aedc9 100644 --- a/showdown/tsconfig.json +++ b/showdown/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/shuffle-array/tsconfig.json b/shuffle-array/tsconfig.json index 4cb34b8d65..6dea54fc87 100644 --- a/shuffle-array/tsconfig.json +++ b/shuffle-array/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/siema/tsconfig.json b/siema/tsconfig.json index b65c3dc04f..27e9ba3edc 100644 --- a/siema/tsconfig.json +++ b/siema/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "siema-tests.ts" ] -} +} \ No newline at end of file diff --git a/siesta/tsconfig.json b/siesta/tsconfig.json index b5795ca196..712b4c7074 100644 --- a/siesta/tsconfig.json +++ b/siesta/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sigmajs/tsconfig.json b/sigmajs/tsconfig.json index 2754727d32..b8f105a5f5 100644 --- a/sigmajs/tsconfig.json +++ b/sigmajs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/signalr/tsconfig.json b/signalr/tsconfig.json index 775e40f239..e081470409 100644 --- a/signalr/tsconfig.json +++ b/signalr/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/signalr/v1/tsconfig.json b/signalr/v1/tsconfig.json index 5ebdef7a6a..65ec4b6bb6 100644 --- a/signalr/v1/tsconfig.json +++ b/signalr/v1/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "signalr": ["signalr/v1"] + "signalr": [ + "signalr/v1" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/signals/tsconfig.json b/signals/tsconfig.json index 94b8397fd2..84187b7918 100644 --- a/signals/tsconfig.json +++ b/signals/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/signature_pad/tsconfig.json b/signature_pad/tsconfig.json index ce20503616..289b91c163 100644 --- a/signature_pad/tsconfig.json +++ b/signature_pad/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/simple-assign/tsconfig.json b/simple-assign/tsconfig.json index eb369ca374..7c715b3b05 100644 --- a/simple-assign/tsconfig.json +++ b/simple-assign/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/simple-cw-node/tsconfig.json b/simple-cw-node/tsconfig.json index ce1a150207..6e0fbf0bee 100644 --- a/simple-cw-node/tsconfig.json +++ b/simple-cw-node/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/simple-mock/tsconfig.json b/simple-mock/tsconfig.json index cfea5356d7..6a37c37525 100644 --- a/simple-mock/tsconfig.json +++ b/simple-mock/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/simple-oauth2/index.d.ts b/simple-oauth2/index.d.ts index 72d960f946..ec4c1eba83 100644 --- a/simple-oauth2/index.d.ts +++ b/simple-oauth2/index.d.ts @@ -24,7 +24,7 @@ interface ModuleOptions { tokenHost: string, /** String path to request an access token. Default to /oauth/token. */ tokenPath?: string, - /** String path to revoken an access token. Default to /oauth/revoke. */ + /** String path to revoke an access token. Default to /oauth/revoke. */ revokePath?: string, /** String used to set the host to request an "authorization code". Default to the value set on auth.tokenHost. */ authorizeHost?: string, @@ -34,8 +34,9 @@ interface ModuleOptions { /** optional object used to set global options to the internal http library (request-js). */ http?: {}; options?: { - /** Wheather or not the client.id/client.secret params are sent in the request body. Defaults to true. */ + /** Whether or not the client.id/client.secret params are sent in the request body. Defaults to true. */ useBodyAuth?: boolean, + /** Whether or not the Basic Authorization header should be sent at the token request. */ useBasicAuthorizationHeader?: boolean }; } diff --git a/simple-oauth2/tsconfig.json b/simple-oauth2/tsconfig.json index 3d28a8b9a5..61a1370a82 100644 --- a/simple-oauth2/tsconfig.json +++ b/simple-oauth2/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "simple-oauth2-tests.ts" ] -} +} \ No newline at end of file diff --git a/simple-peer/index.d.ts b/simple-peer/index.d.ts new file mode 100644 index 0000000000..86c7f08bfb --- /dev/null +++ b/simple-peer/index.d.ts @@ -0,0 +1,63 @@ +// Type definitions for simple-peer 6.1 +// Project: https://github.com/feross/simple-peer +// Definitions by: Tomasz Łaziuk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as stream from 'stream'; + +declare const SimplePeer: SimplePeer.SimplePeer; + +declare namespace SimplePeer { + export interface Options { + initiator?: boolean; // set to true if this is the initiating peer + channelConfig?: {}; // custom webrtc data channel configuration (used by createDataChannel) + channelName?: string; // custom webrtc data channel name + config?: {}; // custom webrtc configuration (used by RTCPeerConnection constructor) + constraints?: {}; // custom webrtc video/voice constraints (used by RTCPeerConnection constructor) + offerConstraints?: {}; // custom offer constraints (used by createOffer method) + answerConstraints?: {}; // custom answer constraints (used by createAnswer method) + reconnectTimer?: boolean | number; // wait __ milliseconds after ICE 'disconnect' for reconnect attempt before emitting 'close' + sdpTransform?: (sdp: T) => T; // function to transform the generated SDP signaling data (for advanced users) + stream?: boolean; // if video/voice is desired, pass stream returned from getUserMedia + trickle?: boolean; // set to false to disable trickle ICE and get a single 'signal' event (slower) + wrtc?: {}; // RTCPeerConnection/RTCSessionDescription/RTCIceCandidate + } + + // https://github.com/feross/simple-peer/tree/v6.1.5#peer--new-simplepeeropts + export interface SimplePeer { + new (opts?: Options): Instance; + (opts?: Options): Instance; + + // https://github.com/feross/simple-peer/tree/v6.1.5#peerwebrtc_support + readonly WEBRTC_SUPPORT: boolean; + } + + export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array; + + export type SimplePeerData = string | Buffer | TypedArray | ArrayBuffer | Blob; + + export interface SignalData { + sdp?: any; + candidate?: any; + } + + export interface Instance extends stream.Duplex { + + // https://github.com/feross/simple-peer/tree/v6.1.5#peersignaldata + signal(data: string | SignalData): void; + + // https://github.com/feross/simple-peer/tree/v6.1.5#peersenddata + send(data: SimplePeerData): void; + + // https://github.com/feross/simple-peer/tree/v6.1.5#peersenddata + destroy(onclose?: () => void): void; + + // methods which are not documented + readonly bufferSize: number; + address(): { port: string, family: string, address: string, }; + } +} + +export = SimplePeer; diff --git a/simple-peer/simple-peer-tests.ts b/simple-peer/simple-peer-tests.ts new file mode 100644 index 0000000000..97fa2e9e8e --- /dev/null +++ b/simple-peer/simple-peer-tests.ts @@ -0,0 +1,7 @@ +import * as SimplePeer from 'simple-peer'; + +const peer = new SimplePeer(); +peer.write(new Buffer('hey')); +peer.on('data', (chunk) => { + console.log(`got a chunk: ${chunk}`); +}); diff --git a/simple-peer/tsconfig.json b/simple-peer/tsconfig.json new file mode 100644 index 0000000000..f45d0067a5 --- /dev/null +++ b/simple-peer/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "simple-peer-tests.ts" + ] +} diff --git a/simple-peer/tslint.json b/simple-peer/tslint.json new file mode 100644 index 0000000000..ec365f164b --- /dev/null +++ b/simple-peer/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} diff --git a/simple-url-cache/tsconfig.json b/simple-url-cache/tsconfig.json index 9e9a2ad702..3d62affa6b 100644 --- a/simple-url-cache/tsconfig.json +++ b/simple-url-cache/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/simple-xml/tsconfig.json b/simple-xml/tsconfig.json index b88c5e7af7..af73b95b83 100644 --- a/simple-xml/tsconfig.json +++ b/simple-xml/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "simple-xml-tests.ts" ] -} +} \ No newline at end of file diff --git a/simplebar/tsconfig.json b/simplebar/tsconfig.json index 6af37d474a..94a09c5ba7 100644 --- a/simplebar/tsconfig.json +++ b/simplebar/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/simplemde/tsconfig.json b/simplemde/tsconfig.json index 5654774d1b..f7f978e7a6 100644 --- a/simplemde/tsconfig.json +++ b/simplemde/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/simplesmtp/tsconfig.json b/simplesmtp/tsconfig.json index f5f23373b7..f294555b0b 100644 --- a/simplesmtp/tsconfig.json +++ b/simplesmtp/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/simplestorage.js/tsconfig.json b/simplestorage.js/tsconfig.json index 53e909c7f8..fbb628724c 100644 --- a/simplestorage.js/tsconfig.json +++ b/simplestorage.js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sinon-as-promised/tsconfig.json b/sinon-as-promised/tsconfig.json index a5d84b4a3f..e56ef92bde 100644 --- a/sinon-as-promised/tsconfig.json +++ b/sinon-as-promised/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sinon-chai/tsconfig.json b/sinon-chai/tsconfig.json index 41e61b397c..8d70a9dbd3 100644 --- a/sinon-chai/tsconfig.json +++ b/sinon-chai/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sinon-chrome/tsconfig.json b/sinon-chrome/tsconfig.json index 66db2a0ec8..f2ab520cb6 100644 --- a/sinon-chrome/tsconfig.json +++ b/sinon-chrome/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sinon-mongoose/tsconfig.json b/sinon-mongoose/tsconfig.json index d41dfead80..05ce537d32 100644 --- a/sinon-mongoose/tsconfig.json +++ b/sinon-mongoose/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/sinon-stub-promise/tsconfig.json b/sinon-stub-promise/tsconfig.json index bc1a0edd23..a2dd8453da 100644 --- a/sinon-stub-promise/tsconfig.json +++ b/sinon-stub-promise/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sinon/tsconfig.json b/sinon/tsconfig.json index e2eb0cd56f..339ad66d1f 100644 --- a/sinon/tsconfig.json +++ b/sinon/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/sipml/tsconfig.json b/sipml/tsconfig.json index f5a10bc834..f7cc51c7b2 100644 --- a/sipml/tsconfig.json +++ b/sipml/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sjcl/tsconfig.json b/sjcl/tsconfig.json index 6a8dff1961..6ca825af77 100644 --- a/sjcl/tsconfig.json +++ b/sjcl/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ski/tsconfig.json b/ski/tsconfig.json index 0a15bf339b..fdf0aff6d0 100644 --- a/ski/tsconfig.json +++ b/ski/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/skyway/tsconfig.json b/skyway/tsconfig.json index fa37c6bb90..f5ee6dfaea 100644 --- a/skyway/tsconfig.json +++ b/skyway/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/slack-node/tsconfig.json b/slack-node/tsconfig.json index 0ee87e6e6d..fcf5041e0c 100644 --- a/slack-node/tsconfig.json +++ b/slack-node/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/slackify-html/tsconfig.json b/slackify-html/tsconfig.json index fb81613b9b..773829070f 100644 --- a/slackify-html/tsconfig.json +++ b/slackify-html/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/slate-irc/tsconfig.json b/slate-irc/tsconfig.json index 1729c803db..ee1a15b7fd 100644 --- a/slate-irc/tsconfig.json +++ b/slate-irc/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sleep/tsconfig.json b/sleep/tsconfig.json index 495d2c67a7..97d5e5cc93 100644 --- a/sleep/tsconfig.json +++ b/sleep/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/slick-carousel/tsconfig.json b/slick-carousel/tsconfig.json index dc15ecfade..36023adb78 100644 --- a/slick-carousel/tsconfig.json +++ b/slick-carousel/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/slickgrid/tsconfig.json b/slickgrid/tsconfig.json index 081819d112..35c5f7cb12 100644 --- a/slickgrid/tsconfig.json +++ b/slickgrid/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/slideout/tsconfig.json b/slideout/tsconfig.json index 64a83bc886..6afcb7ddcf 100644 --- a/slideout/tsconfig.json +++ b/slideout/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/slug/tsconfig.json b/slug/tsconfig.json index 180e505ec6..c192c19b53 100644 --- a/slug/tsconfig.json +++ b/slug/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "slug-tests.ts" ] -} +} \ No newline at end of file diff --git a/smart-fox-server/tsconfig.json b/smart-fox-server/tsconfig.json index 88d4e41448..a12105d463 100644 --- a/smart-fox-server/tsconfig.json +++ b/smart-fox-server/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/smooth-scrollbar/tsconfig.json b/smooth-scrollbar/tsconfig.json index be638b7a40..fcf9d316c9 100644 --- a/smooth-scrollbar/tsconfig.json +++ b/smooth-scrollbar/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "smooth-scrollbar-tests.ts" ] -} +} \ No newline at end of file diff --git a/smoothie/tsconfig.json b/smoothie/tsconfig.json index f73c1a13b5..77e7ce5be3 100644 --- a/smoothie/tsconfig.json +++ b/smoothie/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/smtp-server/tsconfig.json b/smtp-server/tsconfig.json index 92a6291f93..c32b149509 100644 --- a/smtp-server/tsconfig.json +++ b/smtp-server/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/smtpapi/tsconfig.json b/smtpapi/tsconfig.json index eeca931f00..b771ea4286 100644 --- a/smtpapi/tsconfig.json +++ b/smtpapi/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/snapsvg/tsconfig.json b/snapsvg/tsconfig.json index 9b781152d7..9e42ed48a9 100644 --- a/snapsvg/tsconfig.json +++ b/snapsvg/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/soap/tsconfig.json b/soap/tsconfig.json index 0dec0744e2..d40a1d415c 100644 --- a/soap/tsconfig.json +++ b/soap/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/socket.io-client/tsconfig.json b/socket.io-client/tsconfig.json index 4d0a100681..b9a3895e9e 100644 --- a/socket.io-client/tsconfig.json +++ b/socket.io-client/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/socket.io-parser/tsconfig.json b/socket.io-parser/tsconfig.json index 1059b7cc52..1f6da8d309 100644 --- a/socket.io-parser/tsconfig.json +++ b/socket.io-parser/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/socket.io-redis/tsconfig.json b/socket.io-redis/tsconfig.json index 2fde01d043..1e2568ad2b 100644 --- a/socket.io-redis/tsconfig.json +++ b/socket.io-redis/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/socket.io.users/tsconfig.json b/socket.io.users/tsconfig.json index 5cde4596b7..790cb84cd4 100644 --- a/socket.io.users/tsconfig.json +++ b/socket.io.users/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/socket.io/tsconfig.json b/socket.io/tsconfig.json index 7a16d267ee..686b05d05a 100644 --- a/socket.io/tsconfig.json +++ b/socket.io/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/socketty/tsconfig.json b/socketty/tsconfig.json index 3d47df8df1..32f32b3e16 100644 --- a/socketty/tsconfig.json +++ b/socketty/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sockjs-client/tsconfig.json b/sockjs-client/tsconfig.json index a036ad79d4..9ae13d000a 100644 --- a/sockjs-client/tsconfig.json +++ b/sockjs-client/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sockjs-node/tsconfig.json b/sockjs-node/tsconfig.json index add4694e8e..9f87470aa5 100644 --- a/sockjs-node/tsconfig.json +++ b/sockjs-node/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sockjs/tsconfig.json b/sockjs/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/sockjs/tsconfig.json +++ b/sockjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/solution-center-communicator/tsconfig.json b/solution-center-communicator/tsconfig.json index f0f5071e7c..74a4173516 100644 --- a/solution-center-communicator/tsconfig.json +++ b/solution-center-communicator/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sortablejs/tsconfig.json b/sortablejs/tsconfig.json index 6e2c1ffb03..9b8ba61eb3 100644 --- a/sortablejs/tsconfig.json +++ b/sortablejs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/soundjs/tsconfig.json b/soundjs/tsconfig.json index 49d3da27ba..6c6605b46c 100644 --- a/soundjs/tsconfig.json +++ b/soundjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/source-list-map/tsconfig.json b/source-list-map/tsconfig.json index a7fbf7b807..83de921b7e 100644 --- a/source-list-map/tsconfig.json +++ b/source-list-map/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/source-map-support/tsconfig.json b/source-map-support/tsconfig.json index ab0520144d..8a90e5ecec 100644 --- a/source-map-support/tsconfig.json +++ b/source-map-support/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/source-map/tsconfig.json b/source-map/tsconfig.json index da42f9e5e4..bd427e1f80 100644 --- a/source-map/tsconfig.json +++ b/source-map/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/space-pen/tsconfig.json b/space-pen/tsconfig.json index 475ac2f6f9..22c4f3b912 100644 --- a/space-pen/tsconfig.json +++ b/space-pen/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/sparkpost/tsconfig.json b/sparkpost/tsconfig.json index 38d1d97873..0ef33f26af 100644 --- a/sparkpost/tsconfig.json +++ b/sparkpost/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/spatialite/index.d.ts b/spatialite/index.d.ts new file mode 100644 index 0000000000..28a4a1ae70 --- /dev/null +++ b/spatialite/index.d.ts @@ -0,0 +1,21 @@ +// Type definitions for spatialite 0.0 +// Project: https://github.com/zhm/node-spatialite +// Definitions by: Arne Schubert +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export { + OPEN_READONLY, + OPEN_READWRITE, + OPEN_CREATE, + cached, + RunResult, + Statement, + verbose } from 'sqlite3'; +import { + Database as OriginalDatabase +} from 'sqlite3'; + +export class Database extends OriginalDatabase { + spatialite(cb: (err: Error) => void): void; +} + diff --git a/spatialite/spatialite-tests.ts b/spatialite/spatialite-tests.ts new file mode 100644 index 0000000000..eef51b3c18 --- /dev/null +++ b/spatialite/spatialite-tests.ts @@ -0,0 +1,118 @@ + +import spatialite = require("spatialite"); + +function applySpatialFunctions() { + console.log(""); + var spatialDb: spatialite.Database = new spatialite.Database('spatialite', () => { + spatialDb.spatialite((err) => { + if (err) { + console.error(err); + } + }); + }); +} + + +// Following tests taken from the sqlite3 typings + +spatialite.verbose(); + +// This line is enhanced to fulfill the `strictNullChecks` option +var db: spatialite.Database = new spatialite.Database('chain.sqlite3', () => {}); +// var db: spatialite.Database + +function createDb() { + console.log("createDb chain"); + db = new spatialite.Database('chain.sqlite3', createTable); +} + +function createTable() { + console.log("createTable lorem"); + db.run("CREATE TABLE IF NOT EXISTS lorem (info TEXT)", insertRows); +} + +function insertRows() { + console.log("insertRows Ipsum i"); + var stmt = db.prepare("INSERT INTO lorem VALUES (?)"); + + for (var i = 0; i < 10; i++) { + stmt.run("Ipsum " + i); + } + + stmt.finalize(readAllRows); +} + +function readAllRows() { + console.log("readAllRows lorem"); + db.all("SELECT rowid AS id, info FROM lorem", function(err, rows) { + rows.forEach(function (row) { + console.log(row.id + ": " + row.info); + }); + readSomeRows(); + }); +} + +function readSomeRows() { + console.log("readAllRows lorem"); + db.each("SELECT rowid AS id, info FROM lorem WHERE rowid < ? ", 5, function(err, row) { + console.log(row.id + ": " + row.info); + }, closeDb); +} + +function closeDb() { + console.log("closeDb"); + db.close(); +} + +function runChainExample() { + createDb(); +} + +runChainExample(); + +db.serialize(function() { + db.run("CREATE TABLE lorem (info TEXT)"); + + var stmt = db.prepare("INSERT INTO lorem VALUES (?)"); + for (var i = 0; i < 10; i++) { + stmt.run("Ipsum " + i); + } + stmt.finalize(); + + db.each("SELECT rowid AS id, info FROM lorem", function(err, row) { + console.log(row.id + ": " + row.info); + }); +}); + +db.serialize(function() { + // These two queries will run sequentially. + db.run("CREATE TABLE foo (num)"); + db.run("INSERT INTO foo VALUES (?)", 1, function(err) { + // These queries will run in parallel and the second query will probably + // fail because the table might not exist yet. + db.run("CREATE TABLE bar (num)"); + db.run("INSERT INTO bar VALUES (?)", 1); + }); +}); + +// Directly in the function arguments. +db.run("UPDATE tbl SET name = ? WHERE id = ?", "bar", 2); + +// As an array. +db.run("UPDATE tbl SET name = ? WHERE id = ?", [ "bar", 2 ]); + +// As an object with named parameters. +db.run("UPDATE tbl SET name = $name WHERE id = $id", { + $id: 2, + $name: "bar" +}); +db.run("UPDATE tbl SET name = $name WHERE id = $id", { $id: 2, $name: "bar" }, + function(err) { } +); + +db.run("UPDATE tbl SET name = ?5 WHERE id = ?", { + 1: 2, + 5: "bar" +}); + +db.close(); diff --git a/spatialite/tsconfig.json b/spatialite/tsconfig.json new file mode 100644 index 0000000000..6ad0b96035 --- /dev/null +++ b/spatialite/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "spatialite-tests.ts" + ] +} diff --git a/spatialite/tslint.json b/spatialite/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/spatialite/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/spdy/tsconfig.json b/spdy/tsconfig.json index c9e646ab30..6a2ac31184 100644 --- a/spdy/tsconfig.json +++ b/spdy/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/speakeasy/index.d.ts b/speakeasy/index.d.ts index 6c2245ad59..15ec90c09a 100644 --- a/speakeasy/index.d.ts +++ b/speakeasy/index.d.ts @@ -1,11 +1,9 @@ -// Type definitions for speakeasy v1.0.4 +// Type definitions for speakeasy v2.0.0 // Project: https://github.com/markbao/speakeasy -// Definitions by: Lucas Woo +// Definitions by: Lucas Woo , Alexander Batukhtin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - -interface IKey { +interface Key { ascii: string; base32: string; hex: string; @@ -13,6 +11,15 @@ interface IKey { qr_code_hex: string; qr_code_base32: string; google_auth_qr: string; + otpauth_url?: string; +} + +interface DigestOptions { + secret: string; + counter: string; + encoding?: string; + algorithm?: string; + key?: string; } interface GenerateOptions { @@ -23,13 +30,27 @@ interface GenerateOptions { name?: string; } +interface GenerateSecretOptions { + length?: number; + name?: string; + qr_codes?: boolean; + google_auth_qr?: boolean; + otpauth_url?: boolean; + symbols?: boolean; +} + interface TotpOptions { - key: string; + key?: string; step?: number; time?: number; initial_time?: number; length?: number; encoding?: string; + counter?: number; + epoch?: number; + secret?: string; + digest?: () => string; + algorithm?: string; } interface HotpOptions { @@ -37,9 +58,31 @@ interface HotpOptions { counter: number; length?: number; encoding?: string; + digits?: number; + digest?: () => string; } -export declare function generate_key(options: GenerateOptions): IKey; +interface OtpauthURLOptions { + secret: string; + label: string; + issuer?: any; + type?: string; + counter?: number; + algorithm?: string; + digits?: number; + period?: number; + encoding?: string; +} + +export declare function digest(options: DigestOptions): string; + +export declare function generate_key(options: GenerateOptions): Key; + +export declare function generateSecret(options: GenerateSecretOptions): Key; + +export declare function generateSecretASCII(length?: number, symbols?: boolean): string; + +export declare function otpauthURL(options: OtpauthURLOptions): string; export declare function hotp(options: HotpOptions): string; diff --git a/speakeasy/speakeasy-tests.ts b/speakeasy/speakeasy-tests.ts index 3c8da97140..ae1ed061da 100644 --- a/speakeasy/speakeasy-tests.ts +++ b/speakeasy/speakeasy-tests.ts @@ -1,4 +1,4 @@ -import speakeasy = require('speakeasy'); +import * as speakeasy from 'speakeasy'; speakeasy.generate_key({length: 20, google_auth_qr: true}); @@ -22,3 +22,19 @@ speakeasy.totp({key: 'secret', time: 159183717}); // use a initial time. speakeasy.totp({key: 'secret', initial_time: 4182881485}); + +speakeasy.generateSecret({ + length: 3, + name: 'testName', + qr_codes: true, + google_auth_qr: true, + otpauth_url: true, + symbols: true +}); + +speakeasy.generateSecretASCII(5, true); + +speakeasy.otpauthURL({ + secret: 'otpauthURLSecret', + label: 'otpauthURLLength' +}); \ No newline at end of file diff --git a/speakeasy/tsconfig.json b/speakeasy/tsconfig.json index 499049100c..330e714866 100644 --- a/speakeasy/tsconfig.json +++ b/speakeasy/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/speakingurl/tsconfig.json b/speakingurl/tsconfig.json index 1325ddc387..9a4b87e18b 100644 --- a/speakingurl/tsconfig.json +++ b/speakingurl/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/spectacle/tsconfig.json b/spectacle/tsconfig.json index 8f09a83d9d..766fa0b1e2 100644 --- a/spectacle/tsconfig.json +++ b/spectacle/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/spectrum/tsconfig.json b/spectrum/tsconfig.json index c09dcfcab7..480e58d5ee 100644 --- a/spectrum/tsconfig.json +++ b/spectrum/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/spin.js/tsconfig.json b/spin.js/tsconfig.json index f1e5eecf44..8536370b9e 100644 --- a/spin.js/tsconfig.json +++ b/spin.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/split/tsconfig.json b/split/tsconfig.json index c51b9e9d79..e8b089fcd9 100644 --- a/split/tsconfig.json +++ b/split/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/split2/tsconfig.json b/split2/tsconfig.json index fffbf14a33..303c1c0472 100644 --- a/split2/tsconfig.json +++ b/split2/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/spotify-api/tsconfig.json b/spotify-api/tsconfig.json index 1cb05528fb..a3d0d40332 100644 --- a/spotify-api/tsconfig.json +++ b/spotify-api/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sprintf-js/tsconfig.json b/sprintf-js/tsconfig.json index f3209176f2..a53c1db3cc 100644 --- a/sprintf-js/tsconfig.json +++ b/sprintf-js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sprintf/tsconfig.json b/sprintf/tsconfig.json index 51135a42a2..c71ae46eb4 100644 --- a/sprintf/tsconfig.json +++ b/sprintf/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sql.js/tsconfig.json b/sql.js/tsconfig.json index 2673fda05e..f32c384324 100644 --- a/sql.js/tsconfig.json +++ b/sql.js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sqlite3/tsconfig.json b/sqlite3/tsconfig.json index 70a42e33e3..b415b04d21 100644 --- a/sqlite3/tsconfig.json +++ b/sqlite3/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sqs-consumer/tsconfig.json b/sqs-consumer/tsconfig.json index 74679063d5..82fd8a9006 100644 --- a/sqs-consumer/tsconfig.json +++ b/sqs-consumer/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sqs-producer/tsconfig.json b/sqs-producer/tsconfig.json index 1ecf4a2284..ddd41564cd 100644 --- a/sqs-producer/tsconfig.json +++ b/sqs-producer/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/squirejs/tsconfig.json b/squirejs/tsconfig.json index 2e11f2bd14..7cf306afcb 100644 --- a/squirejs/tsconfig.json +++ b/squirejs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/srp/tsconfig.json b/srp/tsconfig.json index 8f50a247ac..6c3a3dc34c 100644 --- a/srp/tsconfig.json +++ b/srp/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ss-utils/tsconfig.json b/ss-utils/tsconfig.json index d222d652e3..9ce02c415c 100644 --- a/ss-utils/tsconfig.json +++ b/ss-utils/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ssh2-sftp-client/tsconfig.json b/ssh2-sftp-client/tsconfig.json index 819f8b53ea..e9546d644e 100644 --- a/ssh2-sftp-client/tsconfig.json +++ b/ssh2-sftp-client/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ssh2-streams/tsconfig.json b/ssh2-streams/tsconfig.json index 929622205f..86a655b210 100644 --- a/ssh2-streams/tsconfig.json +++ b/ssh2-streams/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ssh2/tsconfig.json b/ssh2/tsconfig.json index 071e5f89ca..80b1e88138 100644 --- a/ssh2/tsconfig.json +++ b/ssh2/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/sshpk/index.d.ts b/sshpk/index.d.ts new file mode 100644 index 0000000000..dd42683527 --- /dev/null +++ b/sshpk/index.d.ts @@ -0,0 +1,378 @@ +// Type definitions for sshpk 1.10 +// Project: github.com/arekinath/node-sshpk +// Definitions by: Meno Abels +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare class SshPK { +} + +declare namespace SshPK { + + export class Algo { + parts: string[]; + sizePart?: string; + normalize?: boolean; + } + + + export class algInfo { + dsa: Algo; + rsa: Algo; + ecdsa: Algo; + ed25519: Algo; + curve25519: Algo; + } + + export class algPrivInfo { + dsa: Algo; + rsa: Algo; + ecdsa: Algo; + ed25519: Algo; + curve25519: Algo; + } + + export class hashAlgs { + md5: boolean; + sha1: boolean; + sha256: boolean; + sha384: boolean; + sha512: boolean; + } + + export class Curve { + size: number; + pkcs8oid: string; + p: Buffer; + a: Buffer; + b: Buffer; + s: Buffer; + n: Buffer; + G: Buffer; + } + + export class curves { + nistp256: Curve; + nistp384: Curve; + nistp512: Curve; + } + + export class algs { + info: algInfo; + privInfo: algPrivInfo; + hashAlgs: hashAlgs; + curves: curves; + } + + + export class Certificate { + subjects: Identity[]; + issuer: string; + subjectKey: string; + issuerKey: string; + signatures: string; + serial: string; + validFrom: string; + validUntil: string; + static formats: Formats; + constructor(opts: any); + + toBuffer(format: string, options: any): Buffer; + + toString(format: string, options: any): string; + + fingerprint(algo: string): Fingerprint; + + hash(algo: string): string; + + isExpired(when: Date): boolean; + + isSignedBy(issuerCert: Certificate): boolean; + + isSignedByKey(issuerKey: Key): boolean; + + signWith(key: Key): void; + + static createSelfSigned(subjectOrSubjects: string, key: Key, options: any): Certificate; + + static create(subjectOrSubjects: string, key: Key, issuer: string, issuerKey: PrivateKey, options: any): Certificate; + + static parse(data: string|Buffer, format: string, options: any): Certificate; + + static isCertificate(data: string|Buffer, ver: string): boolean; + + } + + + export class DiffieHellman { + + constructor(key: Key); + + getPublicKey(): Key; + getPrivateKey(): PrivateKey; + getKey(): PrivateKey; + setKey(key: PrivateKey): void; + setPrivateKey(key: PrivateKey): void; + + computeSecret(otherpk: PrivateKey): Buffer; + + generateKey(): PrivateKey; + generateKeys(): PrivateKey; + } + + export class X9ECParameters { + G: any; + g: any; + n: any; + h: any; + } + + export class ECPublic { + constructor(params: X9ECParameters, buffer: Buffer); + } + + export class ECPrivate { + constructor(params: X9ECParameters, buffer: Buffer); + deriveSharedSecret(pk: Key): Buffer; + } + + + export class Verifier { + constructor(key: Key, hashAlgo: string); + + update(chunk: string|Buffer): void; + + verify(signature: string): boolean; + } + + export class Signer { + + constructor(key: Key, hashAlgo: string); + + update(chunk: string|Buffer): void; + sign(): Signature; + } + + + export class FingerprintFormatError implements Error { + name: string; + message: string; + constructor(fp: Fingerprint, format: string); + } + + export class InvalidAlgorithmError implements Error { + name: string; + message: string; + constructor(algo: string); + } + + export class KeyParseError implements Error { + name: string; + message: string; + constructor(name: string, format: string, innerErr: any); + } + + export class SignatureParseError implements Error { + name: string; + message: string; + constructor(type: string, format: string, innerErr: any); + } + + export class CertificateParseError implements Error { + name: string; + message: string; + constructor(name: string, format: string, innerErr: any); + } + + export class KeyEncryptedError implements Error { + name: string; + message: string; + constructor(name: string, format: string); + } + + + export class Fingerprint { + algorithm: string; + hash: string; + type: string; + constructor(opts: any); + + toString(format?: string): string; + matches(other: Fingerprint): boolean; + addColons(fp: string): string; + base64Strip(fp: string): string; + sshBase64Format(alg: string, h: string): string; + isFingerprint(obj: string|Buffer, ver: string): boolean; + + static parse(fp: string, options: any): Fingerprint; + + } + + export class Identity { + cn: string; + components: string[]; + componentLookup: any; + type: string; + hostname: string; + uid: string; + email: string; + constructor(opts: any); + + toString(): string; + + toAsn1(der: Buffer|string, tag: string): void; + + equals(other: Identity): boolean; + + static forHost(hostname: string): Identity; + static forUser(uid: string): Identity; + static forEmail(email: string): Identity; + static parseDN(dn: string): Identity; + static parseAsn1(dn: Buffer|string, top: string): Identity; + static isIdentity(dn: Buffer|string, ver: string): boolean; + } + + + export class Format { + read: (buf: Buffer, options?: any) => Buffer; + write: (key: Key, options?: any) => Buffer; + } + + export class Formats { + auto: Format; + pem: Format; + pkcs1: Format; + pkcs8: Format; + rfc4253: Format; + ssh: Format; + "ssh-private": Format; + openssh: Format; + } + + export class Verify { + verify(data: string, fmt: string): boolean; + } + + export class Key { + type: string; + parts: string; + part: string; + comment?: string; + source?: string; + curve?: string; + size: number; + constructor(opts: any); + + static formats: Formats; + + toBuffer(format: string, options: any): Buffer; + toString(format: string, options: any): string; + hash(algo: string): Buffer; + fingerprint(algo: string): Fingerprint; + defaultHashAlgorithm(): string; + createVerify(algo: string): Verify; + createDiffieHellman(): DiffieHellman; + createDH(): DiffieHellman; + + static parse(data: string|Buffer, format: string, options: any): Key; + + static isKey(obj: string|Buffer, ver: string): boolean; + + } + + export class PrivateKey { + constructor(opts: any); + static formats: Formats; + toBuffer(format: string, options: any): Buffer; + hash(algo: string): Buffer; + toPublic(): Key; + derive(newType: string, newSize: number): PrivateKey; + createVerify(hashAlgo: string): Key; + createSign(hashAlgo: string): Signer; + + static parse(data: string|Buffer, format: string, options: any): PrivateKey; + static isPrivateKey(data: string|Buffer, ver: string): boolean; + + } + + + export class Signature { + constructor(opts: any); + toBuffer(format: string): Buffer; + toString(format: string): string; + + static parse(data: string|Buffer, type: string, format: string): Signature; + + static isSignature(obj: string|Buffer, ver: string): boolean; + + } + + export class SSHPart { + data: Buffer; + } + + export class SSHBuffer { + constructor(opts: any); + toBuffer(): Buffer; + atEnd(): boolean; + remainder(): Buffer; + skip(n: number): void; + expand(): void; + readPart(): SSHPart; + readBuffer(): Buffer; + readString(): string; + readInt(): number; + readInt64(): Buffer; + readChar(): string; + writeBuffer(buf: Buffer): void; + writeString(buf: string): void; + writeCString(buf: string): void; + writeInt(buf: number): void; + writeInt64(buf: Buffer): void; + writeChar(buf: string): void; + writePart(buf: SSHPart): void; + write(buf: Buffer): void; + + } + + + export function bufferSplit(buf: Buffer, chr: string): Buffer[]; + export function addRSAMissing(key: PrivateKey): void; + export function calculateDSAPublic(g: Buffer, p: Buffer, x: Buffer): Buffer; + export function mpNormalize(buf: Buffer): Buffer; + export function ecNormalize(buf: Buffer, addZero: boolean): Buffer; + export function countZeros(buf: Buffer): number; + export function assertCompatible(obj: any, klass: any, needVer: string, name: string): void; + export function isCompatible(obj: any, klass: any, needVer: string): boolean; + export class OpenSllKeyDeriv { + key: Buffer; + iv: Buffer; + } + export function opensslKeyDeriv(cipher: string, salt: string, passphrase: string, count: number): OpenSllKeyDeriv; + + export class OpensshCipherInfo { + keySize: number; + blockSize: number; + opensslName: string; + } + export function opensshCipherInfo(cipber: string): OpensshCipherInfo; + + export function parseKey(data: string|Buffer, format: string, options?: any): Key; + export function parseFingerprint(fp: string, options?: any): Fingerprint; + export function parseSignature(data: string|Buffer, type: string, format: string): Signature; + export function parsePrivateKey(data: string|Buffer, format: string, options?: any): PrivateKey; + + export function parseCertificate(data: string|Buffer, format: string, options?: any): Certificate; + export function createSelfSignedCertificate(subjectOrSubjects: string, key: Key, options?: any): Certificate; + export function createCertificate(subjectOrSubjects: string, key: Key, issuer: string, + issuerKey: PrivateKey, options?: any): Certificate; + + export function identityFromDN(dn: string): Identity; + export function identityForHost(hostname: string): Identity; + export function identityForUser(uid: string): Identity; + export function identityForEmail(email: string): Identity; + +} + +export = SshPK; diff --git a/sshpk/sshpk-tests.ts b/sshpk/sshpk-tests.ts new file mode 100644 index 0000000000..832045549a --- /dev/null +++ b/sshpk/sshpk-tests.ts @@ -0,0 +1,6 @@ + +import * as sshpk from 'sshpk'; + +const cert = sshpk.parseCertificate("", "pem"); +const fpr = cert.fingerprint("sha256").toString("hex"); +const cn = cert.subjects[0].cn; diff --git a/sshpk/tsconfig.json b/sshpk/tsconfig.json new file mode 100644 index 0000000000..fcc7abf590 --- /dev/null +++ b/sshpk/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sshpk-tests.ts" + ] +} diff --git a/sshpk/tslint.json b/sshpk/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/sshpk/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/stack-mapper/tsconfig.json b/stack-mapper/tsconfig.json index dded782cec..6e67f8b176 100644 --- a/stack-mapper/tsconfig.json +++ b/stack-mapper/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/stack-trace/tsconfig.json b/stack-trace/tsconfig.json index 1ee1d717ab..cbcb589f52 100644 --- a/stack-trace/tsconfig.json +++ b/stack-trace/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/stacktrace-js/tsconfig.json b/stacktrace-js/tsconfig.json index 3d566631fb..6354523702 100644 --- a/stacktrace-js/tsconfig.json +++ b/stacktrace-js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/stampit/tsconfig.json b/stampit/tsconfig.json index 925eed6a49..0f6348edeb 100644 --- a/stampit/tsconfig.json +++ b/stampit/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/stamplay-js-sdk/tsconfig.json b/stamplay-js-sdk/tsconfig.json index e67d97a4f8..0df9bbf9db 100644 --- a/stamplay-js-sdk/tsconfig.json +++ b/stamplay-js-sdk/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/state-machine/tsconfig.json b/state-machine/tsconfig.json index 099ee8d9c4..3d1eaef3f7 100644 --- a/state-machine/tsconfig.json +++ b/state-machine/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/static-eval/tsconfig.json b/static-eval/tsconfig.json index f578593074..4df6f63403 100644 --- a/static-eval/tsconfig.json +++ b/static-eval/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/stats.js/tsconfig.json b/stats.js/tsconfig.json index 4831f2ae6b..fc7b57519b 100644 --- a/stats.js/tsconfig.json +++ b/stats.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/statsd-client/tsconfig.json b/statsd-client/tsconfig.json index fe66c7cbd9..764f3479ec 100644 --- a/statsd-client/tsconfig.json +++ b/statsd-client/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/status-bar/tsconfig.json b/status-bar/tsconfig.json index 9c3329012e..874ffb81d1 100644 --- a/status-bar/tsconfig.json +++ b/status-bar/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/statuses/tsconfig.json b/statuses/tsconfig.json index 38ebc487bf..28b7342180 100644 --- a/statuses/tsconfig.json +++ b/statuses/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/steam/tsconfig.json b/steam/tsconfig.json index d31f0669e1..d6a853e295 100644 --- a/steam/tsconfig.json +++ b/steam/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/stompjs/tsconfig.json b/stompjs/tsconfig.json index 4d7bb94a31..5849a68217 100644 --- a/stompjs/tsconfig.json +++ b/stompjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/storejs/tsconfig.json b/storejs/tsconfig.json index 61b71e042a..92685d36da 100644 --- a/storejs/tsconfig.json +++ b/storejs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/stream-meter/tsconfig.json b/stream-meter/tsconfig.json index b644b0272e..b4d805f46d 100644 --- a/stream-meter/tsconfig.json +++ b/stream-meter/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/stream-series/tsconfig.json b/stream-series/tsconfig.json index b4f4403cef..59cff92f54 100644 --- a/stream-series/tsconfig.json +++ b/stream-series/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/stream-to-array/tsconfig.json b/stream-to-array/tsconfig.json index 2ff37172e6..0d517fe75f 100644 --- a/stream-to-array/tsconfig.json +++ b/stream-to-array/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/streamjs/tsconfig.json b/streamjs/tsconfig.json index 04e78d381a..359e244cd4 100644 --- a/streamjs/tsconfig.json +++ b/streamjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/strftime/tsconfig.json b/strftime/tsconfig.json index d38f8a5130..101e98c1a9 100644 --- a/strftime/tsconfig.json +++ b/strftime/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/string-hash/tsconfig.json b/string-hash/tsconfig.json index 1dd70a5366..54dad889fa 100644 --- a/string-hash/tsconfig.json +++ b/string-hash/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/string-template/tsconfig.json b/string-template/tsconfig.json index 88a1f55db6..c67c055705 100644 --- a/string-template/tsconfig.json +++ b/string-template/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/string/tsconfig.json b/string/tsconfig.json index 7689e0c535..1edf9f88aa 100644 --- a/string/tsconfig.json +++ b/string/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/string_score/tsconfig.json b/string_score/tsconfig.json index 55978f168d..492a2f565e 100644 --- a/string_score/tsconfig.json +++ b/string_score/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/strip-ansi/tsconfig.json b/strip-ansi/tsconfig.json index fe78295d77..d8b6dc1a1d 100644 --- a/strip-ansi/tsconfig.json +++ b/strip-ansi/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "strip-ansi-tests.ts" ] -} +} \ No newline at end of file diff --git a/strip-bom/tsconfig.json b/strip-bom/tsconfig.json index 3d5c97f3bd..e65aeb6e0f 100644 --- a/strip-bom/tsconfig.json +++ b/strip-bom/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "strip-bom-tests.ts" ] -} +} \ No newline at end of file diff --git a/strip-json-comments/tsconfig.json b/strip-json-comments/tsconfig.json index ce91629804..afef907b29 100644 --- a/strip-json-comments/tsconfig.json +++ b/strip-json-comments/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/stripe-checkout/tsconfig.json b/stripe-checkout/tsconfig.json index e56529160a..cf13924505 100644 --- a/stripe-checkout/tsconfig.json +++ b/stripe-checkout/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/stripe-node/tsconfig.json b/stripe-node/tsconfig.json index 19f8f0abc7..357e210fed 100644 --- a/stripe-node/tsconfig.json +++ b/stripe-node/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/stripe/index.d.ts b/stripe/index.d.ts index fdfa1db96e..a7d887c747 100644 --- a/stripe/index.d.ts +++ b/stripe/index.d.ts @@ -11,7 +11,7 @@ interface StripeStatic { validateCardNumber(cardNumber: string): boolean; validateExpiry(month: string, year: string): boolean; validateCVC(cardCVC: string): boolean; - cardType(cardNumber: string): string; + cardType(cardNumber: string): StripeCardDataBrand; getToken(token: string, responseHandler: (status: number, response: StripeTokenResponse) => void): void; card: StripeCardData; createToken(data: StripeTokenData, responseHandler: (status: number, response: StripeTokenResponse) => void): void; @@ -51,7 +51,7 @@ interface StripeError { param?: string; } -type StripeCardDataBrand = 'Visa' | 'American Express' | 'MasterCard' | 'Discover JCB' | 'Diners Club' | 'Unknown'; +type StripeCardDataBrand = 'Visa' | 'American Express' | 'MasterCard' | 'Discover' | 'JCB' | 'Diners Club' | 'Unknown'; interface StripeCardData { object: string; diff --git a/stripe/tsconfig.json b/stripe/tsconfig.json index 7c33ab65c5..7ea61e6327 100644 --- a/stripe/tsconfig.json +++ b/stripe/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "stripe-tests.ts" ] -} +} \ No newline at end of file diff --git a/striptags/tsconfig.json b/striptags/tsconfig.json index 1b6546951d..c769b272c0 100644 --- a/striptags/tsconfig.json +++ b/striptags/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/strophe/tsconfig.json b/strophe/tsconfig.json index 2074301ac2..64f2d4ab19 100644 --- a/strophe/tsconfig.json +++ b/strophe/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/stylus/tsconfig.json b/stylus/tsconfig.json index 2830d804ac..205fe91965 100644 --- a/stylus/tsconfig.json +++ b/stylus/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/succinct/tsconfig.json b/succinct/tsconfig.json index 08f949fb0d..93d538f2b9 100644 --- a/succinct/tsconfig.json +++ b/succinct/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/suitescript/tsconfig.json b/suitescript/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/suitescript/tsconfig.json +++ b/suitescript/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/superagent/tsconfig.json b/superagent/tsconfig.json index 5f216b55da..1a20530571 100644 --- a/superagent/tsconfig.json +++ b/superagent/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/supertest-as-promised/tsconfig.json b/supertest-as-promised/tsconfig.json index 7d43842cfb..8c6f805556 100644 --- a/supertest-as-promised/tsconfig.json +++ b/supertest-as-promised/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/supertest/tsconfig.json b/supertest/tsconfig.json index d30efc8643..c27926b7d9 100644 --- a/supertest/tsconfig.json +++ b/supertest/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/supports-color/tsconfig.json b/supports-color/tsconfig.json index 640d259be1..899dd7f179 100644 --- a/supports-color/tsconfig.json +++ b/supports-color/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/survey-knockout/tsconfig.json b/survey-knockout/tsconfig.json index 72891d6de3..1cbb41272f 100644 --- a/survey-knockout/tsconfig.json +++ b/survey-knockout/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/svg-injector/tsconfig.json b/svg-injector/tsconfig.json index aad902679f..7c210f991a 100644 --- a/svg-injector/tsconfig.json +++ b/svg-injector/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/svg-pan-zoom/tsconfig.json b/svg-pan-zoom/tsconfig.json index ac6de0d307..3b59289d74 100644 --- a/svg-pan-zoom/tsconfig.json +++ b/svg-pan-zoom/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/svg-pan-zoom/v2/tsconfig.json b/svg-pan-zoom/v2/tsconfig.json index 5f6c111cfe..97410ce699 100644 --- a/svg-pan-zoom/v2/tsconfig.json +++ b/svg-pan-zoom/v2/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "svg-pan-zoom": ["svg-pan-zoom/v2"] + "svg-pan-zoom": [ + "svg-pan-zoom/v2" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/svg-sprite/tsconfig.json b/svg-sprite/tsconfig.json index d3f4634ae7..a53c6742fa 100644 --- a/svg-sprite/tsconfig.json +++ b/svg-sprite/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/svg.js/tsconfig.json b/svg.js/tsconfig.json index fe7ec62362..59d0fb29e9 100644 --- a/svg.js/tsconfig.json +++ b/svg.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/svg2png/tsconfig.json b/svg2png/tsconfig.json index 94d533f491..6de1eb76d1 100644 --- a/svg2png/tsconfig.json +++ b/svg2png/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/svgjs.draggable/tsconfig.json b/svgjs.draggable/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/svgjs.draggable/tsconfig.json +++ b/svgjs.draggable/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/svgjs.resize/tsconfig.json b/svgjs.resize/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/svgjs.resize/tsconfig.json +++ b/svgjs.resize/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/swag/tsconfig.json b/swag/tsconfig.json index 13b6de7935..0b38b33860 100644 --- a/swag/tsconfig.json +++ b/swag/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/swagger-express-middleware/tsconfig.json b/swagger-express-middleware/tsconfig.json index 6893576b26..40cc1dff17 100644 --- a/swagger-express-middleware/tsconfig.json +++ b/swagger-express-middleware/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/swagger-express-mw/tsconfig.json b/swagger-express-mw/tsconfig.json index 2c9cef1ae7..423a8846c8 100644 --- a/swagger-express-mw/tsconfig.json +++ b/swagger-express-mw/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "swagger-express-mw-tests.ts" ] -} +} \ No newline at end of file diff --git a/swagger-hapi/tsconfig.json b/swagger-hapi/tsconfig.json index d567fa1d44..a57f96ee46 100644 --- a/swagger-hapi/tsconfig.json +++ b/swagger-hapi/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "swagger-hapi-tests.ts" ] -} +} \ No newline at end of file diff --git a/swagger-jsdoc/tsconfig.json b/swagger-jsdoc/tsconfig.json index 03b95e7728..fe1c71b3bb 100644 --- a/swagger-jsdoc/tsconfig.json +++ b/swagger-jsdoc/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/swagger-node-runner/tsconfig.json b/swagger-node-runner/tsconfig.json index 0bc1e246de..0feed321ee 100644 --- a/swagger-node-runner/tsconfig.json +++ b/swagger-node-runner/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "swagger-node-runner-tests.ts" ] -} +} \ No newline at end of file diff --git a/swagger-parser/tsconfig.json b/swagger-parser/tsconfig.json index ee527806d6..b7f037b638 100644 --- a/swagger-parser/tsconfig.json +++ b/swagger-parser/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "swagger-parser-tests.ts" ] -} +} \ No newline at end of file diff --git a/swagger-restify-mw/tsconfig.json b/swagger-restify-mw/tsconfig.json index 373744af7c..7bff907bdc 100644 --- a/swagger-restify-mw/tsconfig.json +++ b/swagger-restify-mw/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "swagger-restify-mw-tests.ts" ] -} +} \ No newline at end of file diff --git a/swagger-sails-hook/tsconfig.json b/swagger-sails-hook/tsconfig.json index ac43d0e157..2ab6f31033 100644 --- a/swagger-sails-hook/tsconfig.json +++ b/swagger-sails-hook/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "swagger-sails-hook-tests.ts" ] -} +} \ No newline at end of file diff --git a/swagger-schema-official/tsconfig.json b/swagger-schema-official/tsconfig.json index 20c7a71092..0c1bd42407 100644 --- a/swagger-schema-official/tsconfig.json +++ b/swagger-schema-official/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/swaggerize-express/tsconfig.json b/swaggerize-express/tsconfig.json index ea014322c0..475ef5b234 100644 --- a/swaggerize-express/tsconfig.json +++ b/swaggerize-express/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sweetalert/tsconfig.json b/sweetalert/tsconfig.json index a7aba0756c..bd5860e214 100644 --- a/sweetalert/tsconfig.json +++ b/sweetalert/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/swfobject/tsconfig.json b/swfobject/tsconfig.json index 31a5713daf..d96af11554 100644 --- a/swfobject/tsconfig.json +++ b/swfobject/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/swiftclick/tsconfig.json b/swiftclick/tsconfig.json index 4843316c10..49d50f45d5 100644 --- a/swiftclick/tsconfig.json +++ b/swiftclick/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/swig-email-templates/tsconfig.json b/swig-email-templates/tsconfig.json index cde92c414e..14281a5ed6 100644 --- a/swig-email-templates/tsconfig.json +++ b/swig-email-templates/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/swig/tsconfig.json b/swig/tsconfig.json index 649549a0cd..4ef1cc2970 100644 --- a/swig/tsconfig.json +++ b/swig/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/swipe/tsconfig.json b/swipe/tsconfig.json index 483ebf83eb..25e8937628 100644 --- a/swipe/tsconfig.json +++ b/swipe/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/swiper/tsconfig.json b/swiper/tsconfig.json index 7bcb715838..6160384860 100644 --- a/swiper/tsconfig.json +++ b/swiper/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/swipeview/tsconfig.json b/swipeview/tsconfig.json index 886a349e94..c7e6f2ba5f 100644 --- a/swipeview/tsconfig.json +++ b/swipeview/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/switchery/tsconfig.json b/switchery/tsconfig.json index d880aaf83c..63103a8ebd 100644 --- a/switchery/tsconfig.json +++ b/switchery/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/swiz/tsconfig.json b/swiz/tsconfig.json index 3635aad794..95bdada8d1 100644 --- a/swiz/tsconfig.json +++ b/swiz/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/sylvester/tsconfig.json b/sylvester/tsconfig.json index 19b76ac910..92ea5d6fe5 100644 --- a/sylvester/tsconfig.json +++ b/sylvester/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/synaptic/tsconfig.json b/synaptic/tsconfig.json index 50bb48df3a..7b19b5910d 100644 --- a/synaptic/tsconfig.json +++ b/synaptic/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/systemjs/tsconfig.json b/systemjs/tsconfig.json index a705715622..14e365e030 100644 --- a/systemjs/tsconfig.json +++ b/systemjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/table/tsconfig.json b/table/tsconfig.json index bd8f8dda9c..deaa89022e 100644 --- a/table/tsconfig.json +++ b/table/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "table-tests.ts" ] -} +} \ No newline at end of file diff --git a/tabris/tsconfig.json b/tabris/tsconfig.json index 3a4fbef708..63b27de61a 100644 --- a/tabris/tsconfig.json +++ b/tabris/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tabtab/tsconfig.json b/tabtab/tsconfig.json index 2d798ee191..c95b49a200 100644 --- a/tabtab/tsconfig.json +++ b/tabtab/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tapable/tsconfig.json b/tapable/tsconfig.json index 6619f475d2..051e7cfe76 100644 --- a/tapable/tsconfig.json +++ b/tapable/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/tape/tsconfig.json b/tape/tsconfig.json index 2e33f7ef4d..0508492e1a 100644 --- a/tape/tsconfig.json +++ b/tape/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tar/tsconfig.json b/tar/tsconfig.json index db64491141..29d0170b3b 100644 --- a/tar/tsconfig.json +++ b/tar/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tcomb/tsconfig.json b/tcomb/tsconfig.json index c273a52135..214f9a631b 100644 --- a/tcomb/tsconfig.json +++ b/tcomb/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/tea-merge/tsconfig.json b/tea-merge/tsconfig.json index 22e1b19d70..c49ccda90b 100644 --- a/tea-merge/tsconfig.json +++ b/tea-merge/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tedious-connection-pool/tsconfig.json b/tedious-connection-pool/tsconfig.json index 2405553de4..3c88e6fb5c 100644 --- a/tedious-connection-pool/tsconfig.json +++ b/tedious-connection-pool/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tedious/tsconfig.json b/tedious/tsconfig.json index 7971fbcd67..e8edcb0a1a 100644 --- a/tedious/tsconfig.json +++ b/tedious/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/teechart/tsconfig.json b/teechart/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/teechart/tsconfig.json +++ b/teechart/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/temp-fs/tsconfig.json b/temp-fs/tsconfig.json index 82e9bb81eb..c741d6824b 100644 --- a/temp-fs/tsconfig.json +++ b/temp-fs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/temp/tsconfig.json b/temp/tsconfig.json index f6353a4d12..8544b283f1 100644 --- a/temp/tsconfig.json +++ b/temp/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tempfile/tsconfig.json b/tempfile/tsconfig.json index 674d96cba8..a39b2cdcb1 100644 --- a/tempfile/tsconfig.json +++ b/tempfile/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/terminal-menu/tsconfig.json b/terminal-menu/tsconfig.json index d410aaec6e..3b2a45653a 100644 --- a/terminal-menu/tsconfig.json +++ b/terminal-menu/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tesseract.js/tsconfig.json b/tesseract.js/tsconfig.json index 23579e7f31..00efae647e 100644 --- a/tesseract.js/tsconfig.json +++ b/tesseract.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/tether-drop/tsconfig.json b/tether-drop/tsconfig.json index 60d69fbf74..49ff4f1e23 100644 --- a/tether-drop/tsconfig.json +++ b/tether-drop/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tether-shepherd/tsconfig.json b/tether-shepherd/tsconfig.json index e7d2e67f71..d5b78d9443 100644 --- a/tether-shepherd/tsconfig.json +++ b/tether-shepherd/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tether/tsconfig.json b/tether/tsconfig.json index 5f1d4c4d17..587aad20ab 100644 --- a/tether/tsconfig.json +++ b/tether/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/text-buffer/tsconfig.json b/text-buffer/tsconfig.json index fea903165a..860c31d7f7 100644 --- a/text-buffer/tsconfig.json +++ b/text-buffer/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/text-encoding/tsconfig.json b/text-encoding/tsconfig.json index 27ae2db2b6..6fa9e20d3e 100644 --- a/text-encoding/tsconfig.json +++ b/text-encoding/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/three/index.d.ts b/three/index.d.ts index e502b76115..3b0917f577 100644 --- a/three/index.d.ts +++ b/three/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for three.js 0.81 +// Type definitions for three.js 0.83 // Project: http://mrdoob.github.com/three.js/ // Definitions by: Kon , Satoru Kimura , Florent Poujol , SereznoKot // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -1998,7 +1998,7 @@ declare namespace THREE { responseType: string; withCredentials: string - load(url: string, onLoad?: (response: any) => void, onProgress?: (request: XMLHttpRequest) => void, onError?:(event: any) => void): any; + load(url: string, onLoad?: (responseText: string) => void, onProgress?: (request: ProgressEvent) => void, onError?:(event: ErrorEvent) => void): any; setMimeType(mimeType: MimeType): FileLoader; setPath(path: string) : FileLoader; setResponseType(responseType: string) : FileLoader; @@ -2010,7 +2010,7 @@ declare namespace THREE { manager: LoadingManager; - load(url: string, onLoad?: (responseText: string) => void, onProgress?: (event: any) => void, onError?: (event: any) => void): void; + load(url: string, onLoad?: (responseText: string) => void, onProgress?: (event: ProgressEvent) => void, onError?: (event: ErrorEvent) => void): void; parse(json: string): Font; } @@ -2030,7 +2030,7 @@ declare namespace THREE { * Begin loading from url * @param url */ - load(url: string, onLoad?: (image: HTMLImageElement) => void, onProgress?: (event: any) => void, onError?: (event: any) => void): HTMLImageElement; + load(url: string, onLoad?: (image: HTMLImageElement) => void, onProgress?: (event: ProgressEvent) => void, onError?: (event: ErrorEvent) => void): HTMLImageElement; setCrossOrigin(crossOrigin: string): ImageLoader; setWithCredentials(value: string): ImageLoader; setPath(value: string): ImageLoader; @@ -2045,7 +2045,7 @@ declare namespace THREE { manager: LoadingManager; withCredentials: boolean; - load(url: string, onLoad?: (geometry: Geometry, materials: Material[]) => void, onProgress?: (event: any) => void, onError?: (event: any) => void): void; + load(url: string, onLoad?: (geometry: Geometry, materials: Material[]) => void, onProgress?: (event: ProgressEvent) => void, onError?: (event: ErrorEvent) => void): void; setTexturePath( value: string ): void; parse(json: any, texturePath?: string): { geometry: Geometry; materials?: Material[] }; } @@ -2140,7 +2140,7 @@ declare namespace THREE { * * @param url */ - load(url: string, onLoad?: (texture: Texture) => void): Texture; + load(url: string, onLoad?: (texture: Texture) => void, onProgress?: (event: ProgressEvent) => void, onError?: (event: ErrorEvent) => void): Texture; setCrossOrigin(crossOrigin: string): TextureLoader; setWithCredentials(value: string): TextureLoader; setPath(path: string): TextureLoader; @@ -2153,7 +2153,7 @@ declare namespace THREE { corssOrigin: string; path: string; - load(urls: Array, onLoad?: (texture: CubeTexture) => void, onProgress?: (event: any) => void, onError?: (event: any) => void): void; + load(urls: Array, onLoad?: (texture: CubeTexture) => void, onProgress?: (event: ProgressEvent) => void, onError?: (event: ErrorEvent) => void): void; setCrossOrigin(crossOrigin: string): CubeTextureLoader; setPath(path: string): CubeTextureLoader; } @@ -2163,7 +2163,7 @@ declare namespace THREE { manager: LoadingManager; - load(url: string, onLoad: (dataTexture: DataTexture) => void, onProgress?: (event: any) => void, onError?: (event: any) => void): void; + load(url: string, onLoad: (dataTexture: DataTexture) => void, onProgress?: (event: ProgressEvent) => void, onError?: (event: ErrorEvent) => void): void; } export class DataTextureLoader extends BinaryTextureLoader {} @@ -2173,7 +2173,7 @@ declare namespace THREE { manager: LoadingManager; path: string; - load(url: string, onLoad: (texture: CompressedTexture) => void, onProgress?: (event: any) => void, onError?: (event: any) => void): void; + load(url: string, onLoad: (texture: CompressedTexture) => void, onProgress?: (event: ProgressEvent) => void, onError?: (event: ErrorEvent) => void): void; setPath(path: string): CompressedTextureLoader; } diff --git a/three/tsconfig.json b/three/tsconfig.json index 4e1d58bcd1..e140c6668c 100644 --- a/three/tsconfig.json +++ b/three/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/thrift/tsconfig.json b/thrift/tsconfig.json index b0ea4ca03a..714c4108e9 100644 --- a/thrift/tsconfig.json +++ b/thrift/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/through/tsconfig.json b/through/tsconfig.json index e42578e294..4695bf66b7 100644 --- a/through/tsconfig.json +++ b/through/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/through2/tsconfig.json b/through2/tsconfig.json index 284c9e1cea..c979de9e7c 100644 --- a/through2/tsconfig.json +++ b/through2/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/through2/v0/tsconfig.json b/through2/v0/tsconfig.json index 6bcae83de3..82bfaceb14 100644 --- a/through2/v0/tsconfig.json +++ b/through2/v0/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": true, @@ -11,7 +13,9 @@ ], "types": [], "paths": { - "through2": ["through2/v0"] + "through2": [ + "through2/v0" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/tile-reduce/tsconfig.json b/tile-reduce/tsconfig.json index cdb61a6bbc..a2cfe5de53 100644 --- a/tile-reduce/tsconfig.json +++ b/tile-reduce/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/tilebelt/tsconfig.json b/tilebelt/tsconfig.json index 2933b6c4d4..52a90d089c 100644 --- a/tilebelt/tsconfig.json +++ b/tilebelt/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/timelinejs/tsconfig.json b/timelinejs/tsconfig.json index aa37953b16..eb55139ab4 100644 --- a/timelinejs/tsconfig.json +++ b/timelinejs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/timelinejs3/tsconfig.json b/timelinejs3/tsconfig.json index 7d0fbe1d43..89d36668ff 100644 --- a/timelinejs3/tsconfig.json +++ b/timelinejs3/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/timezone-js/tsconfig.json b/timezone-js/tsconfig.json index 5228aeb86b..3bff64219e 100644 --- a/timezone-js/tsconfig.json +++ b/timezone-js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/timezonecomplete/tsconfig.json b/timezonecomplete/tsconfig.json index 806dbe6fa2..15c628ec36 100644 --- a/timezonecomplete/tsconfig.json +++ b/timezonecomplete/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tinder/tsconfig.json b/tinder/tsconfig.json index a850cf413f..43c246b5bc 100644 --- a/tinder/tsconfig.json +++ b/tinder/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tinycolor2/tsconfig.json b/tinycolor2/tsconfig.json index 6f718558b5..2ffb410d0c 100644 --- a/tinycolor2/tsconfig.json +++ b/tinycolor2/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tinycopy/tsconfig.json b/tinycopy/tsconfig.json index fac854fb18..adb447485a 100644 --- a/tinycopy/tsconfig.json +++ b/tinycopy/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tinymce/tsconfig.json b/tinymce/tsconfig.json index 313fa73f47..4dedb0a510 100644 --- a/tinymce/tsconfig.json +++ b/tinymce/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "strictNullChecks": true, "noImplicitThis": true, @@ -17,4 +20,4 @@ "index.d.ts", "tinymce-tests.ts" ] -} +} \ No newline at end of file diff --git a/titanium/tsconfig.json b/titanium/tsconfig.json index a8b6b7664b..1a74532b51 100644 --- a/titanium/tsconfig.json +++ b/titanium/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/title/tsconfig.json b/title/tsconfig.json index dc0b69fc86..a137c2558d 100644 --- a/title/tsconfig.json +++ b/title/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tldjs/tsconfig.json b/tldjs/tsconfig.json index bc9a8dff88..321dd1ae3f 100644 --- a/tldjs/tsconfig.json +++ b/tldjs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tmp/tsconfig.json b/tmp/tsconfig.json index 8f0487645e..1564e6f13d 100644 --- a/tmp/tsconfig.json +++ b/tmp/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/to-title-case-gouch/tsconfig.json b/to-title-case-gouch/tsconfig.json index b8611afbc7..f470d1561c 100644 --- a/to-title-case-gouch/tsconfig.json +++ b/to-title-case-gouch/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/toastr/tsconfig.json b/toastr/tsconfig.json index c323a3ba70..a3c9da8ca3 100644 --- a/toastr/tsconfig.json +++ b/toastr/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tooltipster/tsconfig.json b/tooltipster/tsconfig.json index f32701f9d0..daa1d025d8 100644 --- a/tooltipster/tsconfig.json +++ b/tooltipster/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/torrent-stream/tsconfig.json b/torrent-stream/tsconfig.json index 92f6af7443..dd84f3eab4 100644 --- a/torrent-stream/tsconfig.json +++ b/torrent-stream/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/touch-events/tsconfig.json b/touch-events/tsconfig.json index 2d6a066fdf..1e40bfa787 100644 --- a/touch-events/tsconfig.json +++ b/touch-events/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/touch/tsconfig.json b/touch/tsconfig.json index 11888ba6dd..c0f6b7fd28 100644 --- a/touch/tsconfig.json +++ b/touch/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/traceback/tsconfig.json b/traceback/tsconfig.json index 159346e0f0..2ceed80a5f 100644 --- a/traceback/tsconfig.json +++ b/traceback/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tracking/tsconfig.json b/tracking/tsconfig.json index 48ae945595..4e8791c688 100644 --- a/tracking/tsconfig.json +++ b/tracking/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/transducers-js/tsconfig.json b/transducers-js/tsconfig.json index 1889c2abd8..02a9f8b69d 100644 --- a/transducers-js/tsconfig.json +++ b/transducers-js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/traverse/tsconfig.json b/traverse/tsconfig.json index d0e4026654..dc8ad3b6f9 100644 --- a/traverse/tsconfig.json +++ b/traverse/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/traverson/tsconfig.json b/traverson/tsconfig.json index 07df6da198..bcbcf61f9e 100644 --- a/traverson/tsconfig.json +++ b/traverson/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/trayballoon/tsconfig.json b/trayballoon/tsconfig.json index f3cb062976..95fcb69bdd 100644 --- a/trayballoon/tsconfig.json +++ b/trayballoon/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/trim/tsconfig.json b/trim/tsconfig.json index 3d22115488..dbdb33c2a2 100644 --- a/trim/tsconfig.json +++ b/trim/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/trunk8/tsconfig.json b/trunk8/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/trunk8/tsconfig.json +++ b/trunk8/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tsmonad/tsconfig.json b/tsmonad/tsconfig.json index 1b64bd19ab..1077fb13f0 100644 --- a/tsmonad/tsconfig.json +++ b/tsmonad/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tspromise/tsconfig.json b/tspromise/tsconfig.json index 1c749f9dac..140164ed23 100644 --- a/tspromise/tsconfig.json +++ b/tspromise/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/turf/tsconfig.json b/turf/tsconfig.json index 49b4273ea3..8e175eaeff 100644 --- a/turf/tsconfig.json +++ b/turf/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/turf/v2/tsconfig.json b/turf/v2/tsconfig.json index 4c1400c95c..17dfbed06a 100644 --- a/turf/v2/tsconfig.json +++ b/turf/v2/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -11,7 +13,9 @@ ], "types": [], "paths": { - "turf": ["turf/v2"] + "turf": [ + "turf/v2" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/tv4/tsconfig.json b/tv4/tsconfig.json index c85b05e181..9966506a52 100644 --- a/tv4/tsconfig.json +++ b/tv4/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tween.js/tsconfig.json b/tween.js/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/tween.js/tsconfig.json +++ b/tween.js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tweenjs/tsconfig.json b/tweenjs/tsconfig.json index beccf8c50c..21a7836deb 100644 --- a/tweenjs/tsconfig.json +++ b/tweenjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/twig/tsconfig.json b/twig/tsconfig.json index c66588e5e8..fd6b6b4b50 100644 --- a/twig/tsconfig.json +++ b/twig/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/twilio/tsconfig.json b/twilio/tsconfig.json index b3f39d47ed..997e9d8770 100644 --- a/twilio/tsconfig.json +++ b/twilio/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/twit/tsconfig.json b/twit/tsconfig.json index 7170dfd681..3281b7f556 100644 --- a/twit/tsconfig.json +++ b/twit/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/twitter-text/tsconfig.json b/twitter-text/tsconfig.json index 8c9a5ea21a..f8f5153059 100644 --- a/twitter-text/tsconfig.json +++ b/twitter-text/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/twitter/tsconfig.json b/twitter/tsconfig.json index 70f92a173c..0f9fb72507 100644 --- a/twitter/tsconfig.json +++ b/twitter/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/twix/tsconfig.json b/twix/tsconfig.json index 40c2917419..e766b0a90a 100644 --- a/twix/tsconfig.json +++ b/twix/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/type-check/tsconfig.json b/type-check/tsconfig.json index 07175ce672..fbf2a87095 100644 --- a/type-check/tsconfig.json +++ b/type-check/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/type-detect/tsconfig.json b/type-detect/tsconfig.json index 7cc15a4fbe..944294242b 100644 --- a/type-detect/tsconfig.json +++ b/type-detect/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/type-name/tsconfig.json b/type-name/tsconfig.json index f6ba3a71bb..e22da46f53 100644 --- a/type-name/tsconfig.json +++ b/type-name/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/typeahead/tsconfig.json b/typeahead/tsconfig.json index 0a273454d2..ce079b5520 100644 --- a/typeahead/tsconfig.json +++ b/typeahead/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/typedarray-pool/tsconfig.json b/typedarray-pool/tsconfig.json index 403710851c..f73dcf6120 100644 --- a/typedarray-pool/tsconfig.json +++ b/typedarray-pool/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/typescript-deferred/tsconfig.json b/typescript-deferred/tsconfig.json index 9bb97f0a9f..0a783ef810 100644 --- a/typescript-deferred/tsconfig.json +++ b/typescript-deferred/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/typescript-stl/tsconfig.json b/typescript-stl/tsconfig.json index 228f504ded..d7b39ef2d8 100644 --- a/typescript-stl/tsconfig.json +++ b/typescript-stl/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/tz-format/tsconfig.json b/tz-format/tsconfig.json index 643b206b10..0cf57971cb 100644 --- a/tz-format/tsconfig.json +++ b/tz-format/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ua-parser-js/tsconfig.json b/ua-parser-js/tsconfig.json index e3d929b760..32bd466dc1 100644 --- a/ua-parser-js/tsconfig.json +++ b/ua-parser-js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/uglify-js/tsconfig.json b/uglify-js/tsconfig.json index ae37bef012..755ecbfb10 100644 --- a/uglify-js/tsconfig.json +++ b/uglify-js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/uglifycss/tsconfig.json b/uglifycss/tsconfig.json index 8a290a83da..85ad50d22a 100644 --- a/uglifycss/tsconfig.json +++ b/uglifycss/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ui-grid/tsconfig.json b/ui-grid/tsconfig.json index 24ebccdfc2..e8794ad589 100644 --- a/ui-grid/tsconfig.json +++ b/ui-grid/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ui-router-extras/tsconfig.json b/ui-router-extras/tsconfig.json index 2a5a0faa28..f97c3a02d9 100644 --- a/ui-router-extras/tsconfig.json +++ b/ui-router-extras/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ui-select/tsconfig.json b/ui-select/tsconfig.json index 0802d2ad3e..14d28d2fd1 100644 --- a/ui-select/tsconfig.json +++ b/ui-select/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/uid-safe/tsconfig.json b/uid-safe/tsconfig.json index fd6fdcb881..19301a1a56 100644 --- a/uid-safe/tsconfig.json +++ b/uid-safe/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/uikit/tsconfig.json b/uikit/tsconfig.json index 98b6d59d50..59da9e6ea2 100644 --- a/uikit/tsconfig.json +++ b/uikit/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/uk.co.workingedge.phonegap.plugin.istablet/tsconfig.json b/uk.co.workingedge.phonegap.plugin.istablet/tsconfig.json index da8651d5a7..1d2c6677e0 100644 --- a/uk.co.workingedge.phonegap.plugin.istablet/tsconfig.json +++ b/uk.co.workingedge.phonegap.plugin.istablet/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/uk.co.workingedge.phonegap.plugin.launchnavigator/tsconfig.json b/uk.co.workingedge.phonegap.plugin.launchnavigator/tsconfig.json index c630765f15..d0333af9fa 100644 --- a/uk.co.workingedge.phonegap.plugin.launchnavigator/tsconfig.json +++ b/uk.co.workingedge.phonegap.plugin.launchnavigator/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/umbraco/tsconfig.json b/umbraco/tsconfig.json index 56ff69771a..d3d367b15c 100644 --- a/umbraco/tsconfig.json +++ b/umbraco/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/umzug/tsconfig.json b/umzug/tsconfig.json index da857bcc23..2ecd125878 100644 --- a/umzug/tsconfig.json +++ b/umzug/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/underscore-ko/tsconfig.json b/underscore-ko/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/underscore-ko/tsconfig.json +++ b/underscore-ko/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/underscore.string/tsconfig.json b/underscore.string/tsconfig.json index c533f2055c..2faf88bff9 100644 --- a/underscore.string/tsconfig.json +++ b/underscore.string/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/underscore/tsconfig.json b/underscore/tsconfig.json index 7af7f59118..efe53f654c 100644 --- a/underscore/tsconfig.json +++ b/underscore/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/undertaker/tsconfig.json b/undertaker/tsconfig.json index 47c6e7460d..a33eb2509a 100644 --- a/undertaker/tsconfig.json +++ b/undertaker/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/uniq/tsconfig.json b/uniq/tsconfig.json index bee51f09ff..94a4616a04 100644 --- a/uniq/tsconfig.json +++ b/uniq/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/unique-random/tsconfig.json b/unique-random/tsconfig.json index 37a49cff55..2a2190f467 100644 --- a/unique-random/tsconfig.json +++ b/unique-random/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/unity-webapi/tsconfig.json b/unity-webapi/tsconfig.json index e70d04c502..206ebe6339 100644 --- a/unity-webapi/tsconfig.json +++ b/unity-webapi/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/universal-analytics/tsconfig.json b/universal-analytics/tsconfig.json index 1b2dfe5169..cb5aa2ddc0 100644 --- a/universal-analytics/tsconfig.json +++ b/universal-analytics/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/universal-router/tsconfig.json b/universal-router/tsconfig.json index 2448cc13b7..18025f5a22 100644 --- a/universal-router/tsconfig.json +++ b/universal-router/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/unorm/tsconfig.json b/unorm/tsconfig.json index 252285a653..fb560bd2bf 100644 --- a/unorm/tsconfig.json +++ b/unorm/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/update-notifier/tsconfig.json b/update-notifier/tsconfig.json index d0c79d6b99..58d52df1bf 100644 --- a/update-notifier/tsconfig.json +++ b/update-notifier/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/urbanairship-cordova/tsconfig.json b/urbanairship-cordova/tsconfig.json index 19fa4d2a1c..72259a34bf 100644 --- a/urbanairship-cordova/tsconfig.json +++ b/urbanairship-cordova/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/uri-templates/tsconfig.json b/uri-templates/tsconfig.json index 582792c225..f6812b7767 100644 --- a/uri-templates/tsconfig.json +++ b/uri-templates/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/urijs/tsconfig.json b/urijs/tsconfig.json index 968305c463..6dc8501579 100644 --- a/urijs/tsconfig.json +++ b/urijs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/uritemplate/tsconfig.json b/uritemplate/tsconfig.json index 4692e22e26..fecfffe416 100644 --- a/uritemplate/tsconfig.json +++ b/uritemplate/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/url-join/tsconfig.json b/url-join/tsconfig.json index 6bd1781267..3f89e8f618 100644 --- a/url-join/tsconfig.json +++ b/url-join/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/url-regex/index.d.ts b/url-regex/index.d.ts new file mode 100644 index 0000000000..ed51c6e34d --- /dev/null +++ b/url-regex/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for url-regex 4.0 +// Project: https://github.com/kevva/url-regex +// Definitions by: Daniel Perez Alvarez +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** Regular expression for matching URLs. */ +declare function urlRegex(options?: { + /** Only match an exact string. Useful with RegExp#test to check if a string is a URL. */ + exact?: boolean; +}): RegExp; + +export = urlRegex; diff --git a/url-regex/tsconfig.json b/url-regex/tsconfig.json new file mode 100644 index 0000000000..702fe52acc --- /dev/null +++ b/url-regex/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "url-regex-tests.ts" + ] +} diff --git a/url-regex/tslint.json b/url-regex/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/url-regex/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/url-regex/url-regex-tests.ts b/url-regex/url-regex-tests.ts new file mode 100644 index 0000000000..e7063604b6 --- /dev/null +++ b/url-regex/url-regex-tests.ts @@ -0,0 +1,11 @@ +import urlRegex = require('url-regex'); + +urlRegex().test('http://github.com foo bar'); + +urlRegex().test('www.github.com foo bar'); + +urlRegex({exact: true}).test('http://github.com foo bar'); + +urlRegex({exact: true}).test('http://github.com'); + +'foo http://github.com bar //google.com'.match(urlRegex()); diff --git a/url-template/tsconfig.json b/url-template/tsconfig.json index 8662846c81..58e06bc684 100644 --- a/url-template/tsconfig.json +++ b/url-template/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/urlrouter/tsconfig.json b/urlrouter/tsconfig.json index c8d1f973ad..a5f19ed019 100644 --- a/urlrouter/tsconfig.json +++ b/urlrouter/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/urlsafe-base64/tsconfig.json b/urlsafe-base64/tsconfig.json index 675819649c..2cbec836ca 100644 --- a/urlsafe-base64/tsconfig.json +++ b/urlsafe-base64/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/usage/tsconfig.json b/usage/tsconfig.json index 70f29bf208..e4470ea69e 100644 --- a/usage/tsconfig.json +++ b/usage/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/usb/tsconfig.json b/usb/tsconfig.json index d355d8e99e..bcff308bef 100644 --- a/usb/tsconfig.json +++ b/usb/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/user-home/tsconfig.json b/user-home/tsconfig.json index 556b72aca2..8bba4b7597 100644 --- a/user-home/tsconfig.json +++ b/user-home/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "user-home-tests.ts" ] -} +} \ No newline at end of file diff --git a/useragent/tsconfig.json b/useragent/tsconfig.json index 2823ad003c..fe9ea46600 100644 --- a/useragent/tsconfig.json +++ b/useragent/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/username/tsconfig.json b/username/tsconfig.json index 36f0469451..77a82aef36 100644 --- a/username/tsconfig.json +++ b/username/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/utf8/tsconfig.json b/utf8/tsconfig.json index 007b2a5d4a..b65d93679a 100644 --- a/utf8/tsconfig.json +++ b/utf8/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/utils-merge/tsconfig.json b/utils-merge/tsconfig.json index a346f10cd5..4f41e448c0 100644 --- a/utils-merge/tsconfig.json +++ b/utils-merge/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/uuid-1345/tsconfig.json b/uuid-1345/tsconfig.json index 1bfb2c222a..e9b5a64370 100644 --- a/uuid-1345/tsconfig.json +++ b/uuid-1345/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/uuid-js/tsconfig.json b/uuid-js/tsconfig.json index 2a168056db..dbb214b17d 100644 --- a/uuid-js/tsconfig.json +++ b/uuid-js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "uuid-js-tests.ts" ] -} +} \ No newline at end of file diff --git a/uuid/tsconfig.json b/uuid/tsconfig.json index 7dfec7ba95..13ef9e9cca 100644 --- a/uuid/tsconfig.json +++ b/uuid/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/uuidjs/tsconfig.json b/uuidjs/tsconfig.json index 5de0c29bb1..2ebca98eba 100644 --- a/uuidjs/tsconfig.json +++ b/uuidjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/uws/tsconfig.json b/uws/tsconfig.json index 378929bae9..fbce3fad6f 100644 --- a/uws/tsconfig.json +++ b/uws/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -17,4 +19,4 @@ "index.d.ts", "uws-tests.ts" ] -} +} \ No newline at end of file diff --git a/v8-profiler/tsconfig.json b/v8-profiler/tsconfig.json index 8c486768c1..d5f038d38d 100644 --- a/v8-profiler/tsconfig.json +++ b/v8-profiler/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/valdr-message/tsconfig.json b/valdr-message/tsconfig.json index 36201b273e..d83b2c8513 100644 --- a/valdr-message/tsconfig.json +++ b/valdr-message/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/valdr/tsconfig.json b/valdr/tsconfig.json index 489c0164a1..d5814af6f4 100644 --- a/valdr/tsconfig.json +++ b/valdr/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/valerie/tsconfig.json b/valerie/tsconfig.json index 9059a89114..5b89a2b8ab 100644 --- a/valerie/tsconfig.json +++ b/valerie/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/valid-url/tsconfig.json b/valid-url/tsconfig.json index 28487f0148..a4da86ed13 100644 --- a/valid-url/tsconfig.json +++ b/valid-url/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/validate.js/tsconfig.json b/validate.js/tsconfig.json index 0db72de62f..31ed494863 100644 --- a/validate.js/tsconfig.json +++ b/validate.js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/validator/tsconfig.json b/validator/tsconfig.json index ac9f5435eb..480d163a25 100644 --- a/validator/tsconfig.json +++ b/validator/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/validatorjs/tsconfig.json b/validatorjs/tsconfig.json index ca2e335671..409dcef8df 100644 --- a/validatorjs/tsconfig.json +++ b/validatorjs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/vec3/tsconfig.json b/vec3/tsconfig.json index 34661179af..b7a9ca5a71 100644 --- a/vec3/tsconfig.json +++ b/vec3/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/vectorious/tsconfig.json b/vectorious/tsconfig.json index 94a220b448..6363fb29b0 100644 --- a/vectorious/tsconfig.json +++ b/vectorious/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/vega/tsconfig.json b/vega/tsconfig.json index ba1ddb9543..a15bdb6a7a 100644 --- a/vega/tsconfig.json +++ b/vega/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/velocity-animate/tsconfig.json b/velocity-animate/tsconfig.json index 9c26321d19..bbdc104c10 100644 --- a/velocity-animate/tsconfig.json +++ b/velocity-animate/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/verror/tsconfig.json b/verror/tsconfig.json index 1c5ea42467..16393e8995 100644 --- a/verror/tsconfig.json +++ b/verror/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +20,4 @@ "index.d.ts", "verror-tests.ts" ] -} +} \ No newline at end of file diff --git a/vex-js/tsconfig.json b/vex-js/tsconfig.json index 3428a5b5ed..569a24122c 100644 --- a/vex-js/tsconfig.json +++ b/vex-js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/vexflow/tsconfig.json b/vexflow/tsconfig.json index 3add2c063b..6a5a852ee3 100644 --- a/vexflow/tsconfig.json +++ b/vexflow/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/victor/tsconfig.json b/victor/tsconfig.json index 51f54b9ad0..b11cf5bbc8 100644 --- a/victor/tsconfig.json +++ b/victor/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/victory/tsconfig.json b/victory/tsconfig.json index f0b3061774..b088744528 100644 --- a/victory/tsconfig.json +++ b/victory/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/videojs/tsconfig.json b/videojs/tsconfig.json index 3aece7b4fc..b9feff990e 100644 --- a/videojs/tsconfig.json +++ b/videojs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/viewporter/tsconfig.json b/viewporter/tsconfig.json index 746c2f4fa8..88795d6b92 100644 --- a/viewporter/tsconfig.json +++ b/viewporter/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, diff --git a/vimeo/tsconfig.json b/vimeo/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/vimeo/tsconfig.json +++ b/vimeo/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/vinyl-buffer/tsconfig.json b/vinyl-buffer/tsconfig.json index cc35edd7d7..1208954da6 100644 --- a/vinyl-buffer/tsconfig.json +++ b/vinyl-buffer/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/vinyl-fs/tsconfig.json b/vinyl-fs/tsconfig.json index 6eb259e8a3..60247086b9 100644 --- a/vinyl-fs/tsconfig.json +++ b/vinyl-fs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/vinyl-paths/tsconfig.json b/vinyl-paths/tsconfig.json index 8c6e0a0142..4aa2ca1faa 100644 --- a/vinyl-paths/tsconfig.json +++ b/vinyl-paths/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/vinyl-source-stream/tsconfig.json b/vinyl-source-stream/tsconfig.json index 271031aa99..580c625e75 100644 --- a/vinyl-source-stream/tsconfig.json +++ b/vinyl-source-stream/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/vinyl/tsconfig.json b/vinyl/tsconfig.json index 8ba48aef14..d7dcf3a8a7 100644 --- a/vinyl/tsconfig.json +++ b/vinyl/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/vinyl/v0/tsconfig.json b/vinyl/v0/tsconfig.json index 7316524422..45573e7bf8 100644 --- a/vinyl/v0/tsconfig.json +++ b/vinyl/v0/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -11,7 +13,9 @@ ], "types": [], "paths": { - "vinyl": ["vinyl/v0"] + "vinyl": [ + "vinyl/v0" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/virtual-dom/tsconfig.json b/virtual-dom/tsconfig.json index d53dbb1790..bc201594e5 100644 --- a/virtual-dom/tsconfig.json +++ b/virtual-dom/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/vis/tsconfig.json b/vis/tsconfig.json index a81fc77241..2fec34328a 100644 --- a/vis/tsconfig.json +++ b/vis/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/vitalsigns/tsconfig.json b/vitalsigns/tsconfig.json index f013828d24..dac5b33c5b 100644 --- a/vitalsigns/tsconfig.json +++ b/vitalsigns/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/vivus/tsconfig.json b/vivus/tsconfig.json index 1afb932f4c..6f59145dee 100644 --- a/vivus/tsconfig.json +++ b/vivus/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/voronoi-diagram/tsconfig.json b/voronoi-diagram/tsconfig.json index b7c919ef57..b64a31b8ca 100644 --- a/voronoi-diagram/tsconfig.json +++ b/voronoi-diagram/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/vortex-web-client/tsconfig.json b/vortex-web-client/tsconfig.json index f8b31e56ed..9f0ae5d1d4 100644 --- a/vortex-web-client/tsconfig.json +++ b/vortex-web-client/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/voximplant-websdk/tsconfig.json b/voximplant-websdk/tsconfig.json index 981845ed4f..533fdac5d4 100644 --- a/voximplant-websdk/tsconfig.json +++ b/voximplant-websdk/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/vso-node-api/tsconfig.json b/vso-node-api/tsconfig.json index 0452550f76..17db4a2513 100644 --- a/vso-node-api/tsconfig.json +++ b/vso-node-api/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/vue-resource/tsconfig.json b/vue-resource/tsconfig.json index 02563f1bc7..b8a620e110 100644 --- a/vue-resource/tsconfig.json +++ b/vue-resource/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/vue-router/index.d.ts b/vue-router/index.d.ts deleted file mode 100644 index 9f5d1ef0c3..0000000000 --- a/vue-router/index.d.ts +++ /dev/null @@ -1,89 +0,0 @@ -// Type definitions for vue-router 0.7.10 -// Project: https://github.com/vuejs/vue-router -// Definitions by: kaorun343 -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -declare namespace vuejs { - - interface Transition { - from: $route; - to: $route; - next(data?: any): void; - abort(reason?: any): void; - redirect(path: string): void; - } - - interface RouterOption { - hashbang?: boolean; - history?: boolean; - abstract?: boolean; - root?: string; - linkActiveClass?: string; - saveScrollPosition?: boolean; - transitionOnLoad?: boolean; - suppressTransitionError?: boolean; - } - - interface RouterStatic { - new (option?: RouterOption): Router; - } - - interface RouteMapObject { - component: any; - subRoutes?: { [key: string]: RouteMapObject }; - [key: string]: any; - } - - interface Router { - - app: RootVueApp; - mode: string; - - start(App: any, el: string | Element): void; - stop(): void; - map(routeMap: { [path: string]: RouteMapObject }): void; - on(path: string, config: Object): void; - go(path: string | Object): void; - replace(path: string): void; - redirect(redirectMap: Object): void; - alias(aliasMap: Object): void; - beforeEach(hook: (transition: Transition) => any): void; - afterEach(hook: (transition: Transition) => any): void; - } - - interface $route { - path: string; - params: Params; - query: Query; - router: Router; - matched: string[]; - name: string; - [key: string]: any; - } - - interface TransitionHook { - data?(transition?: Transition): PromiseLike | void; - activate?(transition?: Transition): PromiseLike | void; - deactivate?(transition?: Transition): PromiseLike | void; - canActivate?(transition?: Transition): PromiseLike | boolean | void; - canDeactivate?(transition?: Transition): PromiseLike | boolean | void; - canReuse?: boolean | ((transition: Transition) => boolean); - } - - interface Vue { - $route: vuejs.$route; - $router: vuejs.Router; - } - - interface ComponentOption { - route?: vuejs.TransitionHook; - } -} - -declare var VueRouter: vuejs.RouterStatic; - -declare module "vue-router" { - export = VueRouter; -} diff --git a/vue-router/package.json b/vue-router/package.json deleted file mode 100644 index a393c6b160..0000000000 --- a/vue-router/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@types/vue": "^1.0.31" - } -} \ No newline at end of file diff --git a/vue-router/vue-router-tests.ts b/vue-router/vue-router-tests.ts deleted file mode 100644 index 70eb436132..0000000000 --- a/vue-router/vue-router-tests.ts +++ /dev/null @@ -1,110 +0,0 @@ - - -Vue.use(VueRouter); - -namespace TestBasic { - "use strict"; - - var Foo = Vue.extend({ - template: "

    This is foo!

    ", - route: { - canActivate(transition: vuejs.Transition) { - return true; - }, - activate: function() { - var p: PromiseLike; - return p; - }, - deactivate: function(transition: vuejs.Transition) { - transition.next(); - } - } - }); - - var Bar = Vue.extend({ - template: "

    This is bar!

    " - }); - - var App = Vue.extend({}); - var app = new App(); - app.$on("some event", function() { - var name: string = app.$route.name; - }); - - var router = new VueRouter(); - - router.map({ - "/foo": { - component: Foo - }, - "/bar": { - component: Bar - } - }); - - router.start(App, "#app"); -} - -namespace TestAdvanced { - "use strict"; - - namespace App { - - export class App extends Vue { - authenticating: boolean; - - data() { - return { - authenticating: false - }; - } - } - } - - namespace Inbox { - export class Index extends Vue { - } - } - - namespace RouteConfig { - export function configRouter(router: vuejs.Router) { - router.map({ - "/about": { - component: {}, - auth: false - }, - "*": { - component: {} - } - }); - - router.redirect({ - "/info": "/about", - "/hello/:userId": "/user/:userId" - }); - - router.beforeEach((transition) => { - if (transition.to.path === "/forbidden") { - router.app.authenticating = true; - setTimeout(() => { - router.app.authenticating = false; - alert(""); - transition.abort(); - }, 3000); - } else { - transition.next(); - } - }); - } - } - - import configRouter = RouteConfig.configRouter; - - const router = new VueRouter({ - history: true, - saveScrollPosition: true - }); - - configRouter(router); - router.start(App, "#app"); -} diff --git a/w2ui/tsconfig.json b/w2ui/tsconfig.json index 39f624787e..1e1ce363f7 100644 --- a/w2ui/tsconfig.json +++ b/w2ui/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/wake_on_lan/tsconfig.json b/wake_on_lan/tsconfig.json index 2b0ebf3545..7191eae30c 100644 --- a/wake_on_lan/tsconfig.json +++ b/wake_on_lan/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/wallabyjs/tsconfig.json b/wallabyjs/tsconfig.json index 7052079b49..7675d3aba5 100644 --- a/wallabyjs/tsconfig.json +++ b/wallabyjs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/wampy/tsconfig.json b/wampy/tsconfig.json index 581494a6b3..695d78ce64 100644 --- a/wampy/tsconfig.json +++ b/wampy/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/warning/tsconfig.json b/warning/tsconfig.json index 66af811991..397abc9591 100644 --- a/warning/tsconfig.json +++ b/warning/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/watch/tsconfig.json b/watch/tsconfig.json index 84bf3caa33..2936f899ce 100644 --- a/watch/tsconfig.json +++ b/watch/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/watchify/tsconfig.json b/watchify/tsconfig.json index 0123e2a34f..b436be9bf0 100644 --- a/watchify/tsconfig.json +++ b/watchify/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/watchpack/tsconfig.json b/watchpack/tsconfig.json index 21de56ae8b..c7fa4149f5 100644 --- a/watchpack/tsconfig.json +++ b/watchpack/tsconfig.json @@ -1,22 +1,24 @@ { - "compilerOptions": { - "module": "commonjs", - "target": "es6", - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "DirectoryWatcher.d.ts", - "Watcher.d.ts", - "watchpack-tests.ts" - ] -} + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "DirectoryWatcher.d.ts", + "Watcher.d.ts", + "watchpack-tests.ts" + ] +} \ No newline at end of file diff --git a/waterline/tsconfig.json b/waterline/tsconfig.json index 18dea772ed..b7ec4e8403 100644 --- a/waterline/tsconfig.json +++ b/waterline/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": true, diff --git a/weapp-api/tsconfig.json b/weapp-api/tsconfig.json index e20cf2b53f..471be5f98f 100644 --- a/weapp-api/tsconfig.json +++ b/weapp-api/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/web-bluetooth/tsconfig.json b/web-bluetooth/tsconfig.json index 5166c51c87..a8c4078637 100644 --- a/web-bluetooth/tsconfig.json +++ b/web-bluetooth/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/webappsec-credential-management/tsconfig.json b/webappsec-credential-management/tsconfig.json index 11cdce4938..b5de77bd93 100644 --- a/webappsec-credential-management/tsconfig.json +++ b/webappsec-credential-management/tsconfig.json @@ -1,20 +1,23 @@ { - "compilerOptions": { - "module": "commonjs", - "target": "es6", - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "webappsec-credential-management-tests.ts" - ] -} + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "webappsec-credential-management-tests.ts" + ] +} \ No newline at end of file diff --git a/webcl/tsconfig.json b/webcl/tsconfig.json index 968d949878..94ea6fea15 100644 --- a/webcl/tsconfig.json +++ b/webcl/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/webcola/tsconfig.json b/webcola/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/webcola/tsconfig.json +++ b/webcola/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/webcomponents.js/index.d.ts b/webcomponents.js/index.d.ts index 6b658b6be9..c4e03d9c91 100644 --- a/webcomponents.js/index.d.ts +++ b/webcomponents.js/index.d.ts @@ -40,6 +40,13 @@ declare namespace webcomponents { flags: any; } + /** + * I just slapped this in here - sure it could be better ... :-) + */ + export interface CustomElements { + define( tagName:string, elementClass:any ):void; + } + } declare module "webcomponents.js" { @@ -59,4 +66,6 @@ interface Window { CustomElements: webcomponents.CustomElementsPolyfill; HTMLImports: webcomponents.HTMLImportsPolyfill; WebComponents: webcomponents.Polyfill; -} + + customElements: webcomponents.CustomElements; +} \ No newline at end of file diff --git a/webcomponents.js/tsconfig.json b/webcomponents.js/tsconfig.json index 90dbd70656..3822282675 100644 --- a/webcomponents.js/tsconfig.json +++ b/webcomponents.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/webcomponents.js/webcomponents.js-tests.ts b/webcomponents.js/webcomponents.js-tests.ts index 28b1a42b5c..12738331a5 100644 --- a/webcomponents.js/webcomponents.js-tests.ts +++ b/webcomponents.js/webcomponents.js-tests.ts @@ -50,3 +50,17 @@ shadow.host; */ window.WebComponents.flags; +window.customElements.define( "lw-arrival-pie", + + /** + * ArrivalPie custom element + */ + class ArrivalPie extends HTMLElement { + // Can define constructor arguments if you wish. + constructor() { + // If you define a ctor, always call super() first! + // This is specific to CE and required by the spec. + super(); + } + } +); \ No newline at end of file diff --git a/webcrypto/tsconfig.json b/webcrypto/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/webcrypto/tsconfig.json +++ b/webcrypto/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/webdriverio/index.d.ts b/webdriverio/index.d.ts index fbc6925fa9..8f22d2e5aa 100644 --- a/webdriverio/index.d.ts +++ b/webdriverio/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for webdriverio 4.4.0 +// Type definitions for webdriverio 4.5.0 // Project: http://www.webdriver.io/ // Definitions by: Nick Malaguti // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -243,18 +243,61 @@ declare namespace WebdriverIO { // Mobile export interface Client { - // flick - // flickDown - // flickLeft - // flickRight - // flickUp - // getGeoLocation - // getOrientation - // hold - // release - // setGeoLocation - // setOrientation - // touch + background(seconds: number): Client; + closeApp(): Client; + context(id?: string): Client; + contexts(): Client; + currentActivity(): any; + deviceKeyEvent(keyValue: number): Client; + getAppStrings(language: string): Client; + getCurrentDeviceActivity(): Client; + getDeviceTime(): Client; + getGeoLocation(): Client; + getNetworkConnection(): Client; + getOrientation(): Client; + hideDeviceKeyboard(strategy: 'tapOutside' | 'pressKey'): Client; + hold(selector: string): Client; + installApp(path: string): Client; + isAppInstalled(bundleId: string): Client; + isLocked(): boolean; + launch(): Client; + lock(seconds: number): Client; + longPressKeycode(keyCode: string, metaState: string): Client; + openNotifications(): Client; + orientation(setTo?: 'landscape' | 'portrait'): 'landscape' | 'portrait'; + performMultiAction(touchAttributes: any): Client; + performTouchAction(touchAttributes: any): Client; + pressKeycode(keyCode: string, metaState: string): Client; + pullFile(path: string): Client; + pullFolder(path: string): Client; + pushFile(path: string, data: any): Client; + release(selector: string): Client; + removeApp(bundleId: string): Client; + reset(): Client; + rotate(x: number, y: number, duration?: number, radius?: number, rotation?: number, touchCount?: number): Client; + setGeoLocation(location: { latitude: number, longitude: number, altitude: number }): Client; + setImmediateValue(id: string, value: string | Array): Client; + setNetworkConnection(flags: 0 | 1 | 2 | 4 | 6): Client; + setOrientation(setTo: 'landscape' | 'portrait'): Client; + settings(settings?: { [key: string]: string }): Client; + shake(): Client; + startActivity(appPackage: string, activity: string): Client; + strings(language: string): Client; + swipe(selector?: string, xOffset?: number, yOffset?: number, speed?: number): Client; + swipeDown(selector: string, speed?: number): Client; + swipeLeft(selector: string, speed?: number): Client; + swipeRight(selector: string, speed?: number): Client; + swipeUp(selector: string, speed?: number): Client; + toggleAirplaneMode(): Client; + toggleData(): Client; + toggleLocationServices(): Client; + toggleWiFi(): Client; + touch(selector: string, longClick: boolean): Client; + touchAction(selector: string, action: 'tap' | 'press'): Client; + touchId(validFingerprint?: boolean): Client; + touchMultiPerform(actions: any): Client; + touchPerform(actions: any): Client; + unlock(): Client; } export interface CssProperty { @@ -441,6 +484,7 @@ declare namespace WebdriverIO { export interface RawResult { value: T; + error: string; } // Navigation @@ -548,9 +592,9 @@ declare namespace WebdriverIO { sessions(): Client>; sessions

    (): Client

    ; - // timeouts - // timeoutsAsyncScript - // timeoutsImplicitWait + timeouts

    (type: string, ms: number): Client

    ; + timeoutsAsyncScript

    (ms: number): Client

    ; + timeoutsImplicitWait

    (ms: number): Client

    ; // window // windowHandle diff --git a/webdriverio/tsconfig.json b/webdriverio/tsconfig.json index d726731092..1d911f125a 100644 --- a/webdriverio/tsconfig.json +++ b/webdriverio/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/webfontloader/index.d.ts b/webfontloader/index.d.ts index 44e43a0811..bffe96c560 100644 --- a/webfontloader/index.d.ts +++ b/webfontloader/index.d.ts @@ -42,7 +42,7 @@ declare namespace WebFont { text?: string; } export interface Typekit { - id?:Array; + id?:string; } export interface Custom { families?:Array; diff --git a/webfontloader/tsconfig.json b/webfontloader/tsconfig.json index 67ee4d6dd9..26fe6d5e7a 100644 --- a/webfontloader/tsconfig.json +++ b/webfontloader/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/webgl-ext/tsconfig.json b/webgl-ext/tsconfig.json index 6106de4185..151a5c0e4c 100644 --- a/webgl-ext/tsconfig.json +++ b/webgl-ext/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/webgme/tsconfig.json b/webgme/tsconfig.json index c5557c1f42..2d5184486f 100644 --- a/webgme/tsconfig.json +++ b/webgme/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/webix/tsconfig.json b/webix/tsconfig.json index 86c5810808..a745b2f766 100644 --- a/webix/tsconfig.json +++ b/webix/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/webmidi/tsconfig.json b/webmidi/tsconfig.json index 40eb24fb9b..e7957af823 100644 --- a/webmidi/tsconfig.json +++ b/webmidi/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/webpack-dev-middleware/index.d.ts b/webpack-dev-middleware/index.d.ts index e173d4e3d4..471a0f92ba 100644 --- a/webpack-dev-middleware/index.d.ts +++ b/webpack-dev-middleware/index.d.ts @@ -8,7 +8,10 @@ import { compiler } from 'webpack'; export = WebpackDevMiddleware; -declare function WebpackDevMiddleware(compiler: compiler.Compiler, options: WebpackDevMiddleware.Options): WebpackDevMiddleware.WebpackDevMiddleware & NextHandleFunction; +declare function WebpackDevMiddleware( + compiler: compiler.Compiler, + options?: WebpackDevMiddleware.Options +): WebpackDevMiddleware.WebpackDevMiddleware & NextHandleFunction; declare namespace WebpackDevMiddleware { interface Options { @@ -39,7 +42,7 @@ declare namespace WebpackDevMiddleware { type Reporter = (reporterOptions: ReporterOptions) => void; - type Logger = (message: any) => void; + type Logger = (message?: any, ...optionalParams: any[]) => void; interface WebpackDevMiddleware { close(callback?: () => void): void; diff --git a/webpack-dev-middleware/tsconfig.json b/webpack-dev-middleware/tsconfig.json index 4ed359215b..0db95df98f 100644 --- a/webpack-dev-middleware/tsconfig.json +++ b/webpack-dev-middleware/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/webpack-dev-middleware/webpack-dev-middleware-tests.ts b/webpack-dev-middleware/webpack-dev-middleware-tests.ts index b204fbe5d8..63d32332b5 100644 --- a/webpack-dev-middleware/webpack-dev-middleware-tests.ts +++ b/webpack-dev-middleware/webpack-dev-middleware-tests.ts @@ -3,7 +3,10 @@ import * as webpack from 'webpack'; import * as webpackDevMiddleware from 'webpack-dev-middleware'; const compiler = webpack({}); -const webpackDevMiddlewareInstance = webpackDevMiddleware(compiler, { + +let webpackDevMiddlewareInstance = webpackDevMiddleware(compiler); + +webpackDevMiddlewareInstance = webpackDevMiddleware(compiler, { noInfo: false, quiet: false, lazy: true, diff --git a/webpack-dev-server/index.d.ts b/webpack-dev-server/index.d.ts index 75651014b1..f794bd62d0 100644 --- a/webpack-dev-server/index.d.ts +++ b/webpack-dev-server/index.d.ts @@ -21,7 +21,7 @@ declare module "webpack-dev-server" { quiet?: boolean; noInfo?: boolean; lazy?: boolean; - filename?: string; + filename?: string| RegExp; watchOptions?: webpack.WatchOptions; publicPath: string; headers?: any; diff --git a/webpack-dev-server/tsconfig.json b/webpack-dev-server/tsconfig.json index b739c3bbfe..e34a6deb4e 100644 --- a/webpack-dev-server/tsconfig.json +++ b/webpack-dev-server/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/webpack-env/tsconfig.json b/webpack-env/tsconfig.json index 1d15dc3211..fc58944ec0 100644 --- a/webpack-env/tsconfig.json +++ b/webpack-env/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/webpack-fail-plugin/tsconfig.json b/webpack-fail-plugin/tsconfig.json index cf1ae62e81..87adc04e49 100644 --- a/webpack-fail-plugin/tsconfig.json +++ b/webpack-fail-plugin/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/webpack-hot-middleware/index.d.ts b/webpack-hot-middleware/index.d.ts new file mode 100644 index 0000000000..05821a486e --- /dev/null +++ b/webpack-hot-middleware/index.d.ts @@ -0,0 +1,24 @@ +// Type definitions for webpack-hot-middleware 2.15 +// Project: https://github.com/glenjamin/webpack-hot-middleware#readme +// Definitions by: Benjamin Lim +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { NextHandleFunction } from 'connect'; +import { compiler } from 'webpack'; + +export = WebpackHotMiddleware; + +declare function WebpackHotMiddleware( + compiler: compiler.Compiler, + options?: WebpackHotMiddleware.Options +): NextHandleFunction; + +declare namespace WebpackHotMiddleware { + interface Options { + log?: false | Logger; + path?: string; + heartbeat?: number; + } + + type Logger = (message?: any, ...optionalParams: any[]) => void; +} diff --git a/webpack-hot-middleware/tsconfig.json b/webpack-hot-middleware/tsconfig.json new file mode 100644 index 0000000000..b3eea261c5 --- /dev/null +++ b/webpack-hot-middleware/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "webpack-hot-middleware-tests.ts" + ] +} diff --git a/webpack-hot-middleware/tslint.json b/webpack-hot-middleware/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/webpack-hot-middleware/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } diff --git a/webpack-hot-middleware/webpack-hot-middleware-tests.ts b/webpack-hot-middleware/webpack-hot-middleware-tests.ts new file mode 100644 index 0000000000..e654d012d0 --- /dev/null +++ b/webpack-hot-middleware/webpack-hot-middleware-tests.ts @@ -0,0 +1,16 @@ +import * as express from 'express'; +import * as webpack from 'webpack'; +import * as webpackHotMiddleware from 'webpack-hot-middleware'; + +const compiler = webpack({}); + +let webpackHotMiddlewareInstance = webpackHotMiddleware(compiler); + +webpackHotMiddlewareInstance = webpackHotMiddleware(compiler, { + log: console.log.bind(console), + path: '/__what', + heartbeat: 2000, +}); + +const app = express(); +app.use(webpackHotMiddlewareInstance); diff --git a/webpack-merge/tsconfig.json b/webpack-merge/tsconfig.json index 8cdd686ede..f2368dc89d 100644 --- a/webpack-merge/tsconfig.json +++ b/webpack-merge/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/webpack-notifier/tsconfig.json b/webpack-notifier/tsconfig.json index bb80e63baf..41e0e3a541 100644 --- a/webpack-notifier/tsconfig.json +++ b/webpack-notifier/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/webpack-sources/tsconfig.json b/webpack-sources/tsconfig.json index cf3a949d80..3472f7ddee 100644 --- a/webpack-sources/tsconfig.json +++ b/webpack-sources/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/webpack-stream/tsconfig.json b/webpack-stream/tsconfig.json index 089de30959..e1986eac35 100644 --- a/webpack-stream/tsconfig.json +++ b/webpack-stream/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/webpack-validator/tsconfig.json b/webpack-validator/tsconfig.json index 86aebd1491..2307459c15 100644 --- a/webpack-validator/tsconfig.json +++ b/webpack-validator/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/webpack/index.d.ts b/webpack/index.d.ts index c2a435da6e..1ef2fa168f 100644 --- a/webpack/index.d.ts +++ b/webpack/index.d.ts @@ -1,10 +1,9 @@ // Type definitions for webpack 2.2 // Project: https://github.com/webpack/webpack -// Definitions by: Qubo , Matt Lewis +// Definitions by: Qubo , Matt Lewis , Benjamin Lim , Boris Cherny // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// +/// import * as UglifyJS from 'uglify-js'; import * as tapable from 'tapable'; @@ -13,8 +12,8 @@ declare namespace webpack { interface Configuration { context?: string; entry?: string | string[] | Entry; - /** Choose a developer tool to enhance debugging. */ - devtool?: string; + /** Choose a style of source mapping to enhance the debugging process. These values can affect build and rebuild speed dramatically. */ + 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; /** Options affecting the output. */ output?: Output; /** Options affecting the normal modules (NormalModuleFactory) */ @@ -66,6 +65,8 @@ declare namespace webpack { plugins?: Plugin[]; /** Stats options for logging */ stats?: compiler.StatsToStringOptions; + /** Performance options */ + performance?: PerformanceOptions; } interface Entry { @@ -276,14 +277,14 @@ declare namespace webpack { * * @deprecated Replaced by `mainFields` in webpack 2. */ - packageMains?: (string | string[])[]; + packageMains?: Array; /** * Check this field in the package.json for an object. Key-value-pairs are threaded as aliasing according to this spec * * @deprecated Replaced by `aliasFields` in webpack 2. */ - packageAlias?: (string | string[])[]; + packageAlias?: Array; /** * Enable aggressive but unsafe caching for the resolving of a part of your files. @@ -321,13 +322,13 @@ declare namespace webpack { [key: string]: boolean | string; } - interface ExternalsFunctionElement { - (context: any, request: any, callback: (error: any, result: any) => void): any; - } + type ExternalsFunctionElement = (context: any, request: any, callback: (error: any, result: any) => void) => any; interface WatchOptions { /** Delay the rebuilt after the first change. Value is a time in ms. */ aggregateTimeout?: number; + /** For some systems, watching many file systems can result in a lot of CPU or memory usage. It is possible to exclude a huge folder like node_modules. It is also possible to use anymatch patterns. */ + ignored?: RegExp | string; /** true: use polling, number: use polling with specified interval */ poll?: boolean | number; } @@ -366,6 +367,7 @@ declare namespace webpack { } type ConditionSpec = TestConditionSpec | OrConditionSpec | AndConditionSpec | NotConditionSpec; + // tslint:disable-next-line:no-empty-interface interface ConditionArray extends Array {} type Condition = string | RegExp | ((absPath: string) => boolean) | ConditionSpec | ConditionArray; @@ -467,7 +469,7 @@ declare namespace webpack { type Rule = LoaderRule | UseRule | RulesRule | OneOfRule; interface Plugin extends tapable.Plugin { - apply (thisArg: Webpack, ...args: any[]): void + apply(thisArg: Webpack, ...args: any[]): void; } interface Webpack { @@ -618,7 +620,7 @@ declare namespace webpack { } interface ContextReplacementPluginStatic { - new (resourceRegExp: any, newContentResource?: any, newContentRecursive?: any, newContentRegExp?: any): Plugin + new (resourceRegExp: any, newContentResource?: any, newContentRecursive?: any, newContentRegExp?: any): Plugin; } interface IgnorePluginStatic { @@ -626,6 +628,7 @@ declare namespace webpack { } interface PrefetchPluginStatic { + // tslint:disable-next-line:unified-signatures new (context: any, request: any): Plugin; new (request: any): Plugin; } @@ -664,31 +667,31 @@ declare namespace webpack { interface SourceMapDevToolPluginOptions { // output filename pattern (false/null to append) - filename?: string | false | null, + filename?: string | false | null; // source map comment pattern (false to not append) - append?: false | string, + append?: false | string; // template for the module filename inside the source map - moduleFilenameTemplate?: string, + moduleFilenameTemplate?: string; // fallback used when the moduleFilenameTemplate produces a collision - fallbackModuleFilenameTemplate?: string, + fallbackModuleFilenameTemplate?: string; // test/include/exclude files - test?: Condition | Condition[], - include?: Condition | Condition[], - exclude?: Condition | Condition[] + test?: Condition | Condition[]; + include?: Condition | Condition[]; + exclude?: Condition | Condition[]; // whether to include the footer comment with source information - noSources?: boolean, + noSources?: boolean; // the source map sourceRoot ("The URL root from which all sources are relative.") - sourceRoot?: string | null, + sourceRoot?: string | null; // whether to generate per-module source map - module?: boolean, + module?: boolean; // whether to include column information in the source map - columns?: boolean, + columns?: boolean; // whether to preserve line numbers between source and source map lineToLine?: boolean | { - test?: Condition | Condition[], - include?: Condition | Condition[], - exclude?: Condition | Condition[] - } + test?: Condition | Condition[]; + include?: Condition | Condition[]; + exclude?: Condition | Condition[]; + }; } interface EvalSourceMapDevToolPluginStatic { @@ -697,16 +700,16 @@ declare namespace webpack { } interface EvalSourceMapDevToolPluginOptions { - append?: false | string, - moduleFilenameTemplate?: string, - sourceRoot?: string, - module?: boolean, - columns?: boolean, + append?: false | string; + moduleFilenameTemplate?: string; + sourceRoot?: string; + module?: boolean; + columns?: boolean; lineToLine?: boolean | { - test?: Condition | Condition[], - include?: Condition | Condition[], - exclude?: Condition | Condition[] - } + test?: Condition | Condition[]; + include?: Condition | Condition[]; + exclude?: Condition | Condition[]; + }; } interface HotModuleReplacementPluginStatic { @@ -733,12 +736,282 @@ declare namespace webpack { new (options: any): Plugin; } + namespace loader { + + interface Loader extends Function { + (this: LoaderContext, source: string | Buffer, sourceMap: string | Buffer): string | Buffer | void | undefined; + + /** + * The order of chained loaders are always called from right to left. + * But, in some cases, loaders do not care about the results of the previous loader or the resource. + * They only care for metadata. The pitch method on the loaders is called from left to right before the loaders are called (from right to left). + * If a loader delivers a result in the pitch method the process turns around and skips the remaining loaders, + * continuing with the calls to the more left loaders. data can be passed between pitch and normal call. + * @param remainingRequest + * @param precedingRequest + * @param data + */ + pitch?(remainingRequest: string, precedingRequest: string, data: any): any | undefined; + + /** + * By default, the resource file is treated as utf-8 string and passed as String to the loader. + * By setting raw to true the loader is passed the raw Buffer. + * Every loader is allowed to deliver its result as String or as Buffer. + * The compiler converts them between loaders. + */ + raw?: boolean; + } + + type loaderCallback = (err: Error | undefined | null, content?: string | Buffer, sourceMap?: string | Buffer) => void; + + interface LoaderContext { + /** + * Loader API version. Currently 2. + * This is useful for providing backwards compatibility. + * Using the version you can specify custom logic or fallbacks for breaking changes. + */ + version: string; + + + /** + * The directory of the module. Can be used as context for resolving other stuff. + * In the example: /abc because resource.js is in this directory + */ + context: string; + + + /** + * The resolved request string. + * In the example: "/abc/loader1.js?xyz!/abc/node_modules/loader2/index.js!/abc/resource.js?rrr" + */ + request: string; + + + /** + * A string or any object. The query of the request for the current loader. + */ + query: any; + + + /** + * A data object shared between the pitch and the normal phase. + */ + data?: any; + + + callback: loaderCallback | void; + + + /** + * Make this loader async. + */ + async(): loaderCallback | undefined; + + /** + * Make this loader result cacheable. By default it's not cacheable. + * A cacheable loader must have a deterministic result, when inputs and dependencies haven't changed. + * This means the loader shouldn't have other dependencies than specified with this.addDependency. + * Most loaders are deterministic and cacheable. + */ + cacheable(flag?: boolean): void; + + /** + * loaders = [{request: string, path: string, query: string, module: function}] + * An array of all the loaders. It is writeable in the pitch phase. + * In the example: + * [ + * { request: "/abc/loader1.js?xyz", + * path: "/abc/loader1.js", + * query: "?xyz", + * module: [Function] + * }, + * { request: "/abc/node_modules/loader2/index.js", + * path: "/abc/node_modules/loader2/index.js", + * query: "", + * module: [Function] + * } + *] + */ + loaders: any[]; + + /** + * The index in the loaders array of the current loader. + * In the example: in loader1: 0, in loader2: 1 + */ + loaderIndex: number; + + /** + * The resource part of the request, including query. + * In the example: "/abc/resource.js?rrr" + */ + resource: string; + + /** + * The resource file. + * In the example: "/abc/resource.js" + */ + resourcePath: string + + /** + * The query of the resource. + * In the example: "?rrr" + */ + resourceQuery: string; + + /** + * Emit a warning. + * @param message + */ + emitWarning(message: string): void; + + /** + * Emit a error. + * @param message + */ + emitError(message: string): void; + + /** + * Execute some code fragment like a module. + * + * Don't use require(this.resourcePath), use this function to make loaders chainable! + * + * @param code + * @param filename + */ + exec(code: string, filename: string): any; + + + /** + * Resolve a request like a require expression. + * @param context + * @param request + * @param callback + */ + resolve(context: string, request: string, callback: (err: Error, result: string) => void): any + + /** + * Resolve a request like a require expression. + * @param context + * @param request + */ + resolveSync(context: string, request: string): string + + + /** + * Adds a file as dependency of the loader result in order to make them watchable. + * For example, html-loader uses this technique as it finds src and src-set attributes. + * Then, it sets the url's for those attributes as dependencies of the html file that is parsed. + * @param file + */ + addDependency(file: string): void; + + /** + * Adds a file as dependency of the loader result in order to make them watchable. + * For example, html-loader uses this technique as it finds src and src-set attributes. + * Then, it sets the url's for those attributes as dependencies of the html file that is parsed. + * @param file + */ + dependency(file: string): void; + + /** + * Add a directory as dependency of the loader result. + * @param directory + */ + addContextDependency(directory: string): void + + /** + * Remove all dependencies of the loader result. Even initial dependencies and these of other loaders. Consider using pitch. + */ + clearDependencies(): void; + + + /** + * Pass values to the next loader. + * If you know what your result exports if executed as module, set this value here (as a only element array). + */ + value: any; + + /** + * Passed from the last loader. + * If you would execute the input argument as module, consider reading this variable for a shortcut (for performance). + */ + inputValue: any; + + /** + * The options passed to the Compiler. + */ + options: any; + + /** + * A boolean flag. It is set when in debug mode. + */ + debug: boolean; + + /** + * Should the result be minimized. + */ + minimize: boolean; + + /** + * Should a SourceMap be generated. + */ + sourceMap: boolean; + + + /** + * Target of compilation. Passed from configuration options. + * Example values: "web", "node" + */ + target: 'web' | 'node' | string; + + /** + * This boolean is set to true when this is compiled by webpack. + * + * Loaders were originally designed to also work as Babel transforms. + * Therefore if you write a loader that works for both, you can use this property to know if + * there is access to additional loaderContext and webpack features. + */ + webpack: boolean; + + + /** + * Emit a file. This is webpack-specific. + * @param name + * @param content + * @param sourceMap + */ + emitFile(name: string, content: Buffer|String, sourceMap: any): void + + + /** + * Access to the compilation's inputFileSystem property. + */ + fs: any; + + /** + * Hacky access to the Compilation object of webpack. + */ + _compilation: any; + + /** + * Hacky access to the Compiler object of webpack. + */ + _compiler: compiler.Compiler; + + + /** + * Hacky access to the Module object being loaded. + */ + _module: any; + } + } + namespace optimize { interface DedupePluginStatic { new (): Plugin; } interface LimitChunkCountPluginStatic { - new (options: any): Plugin + new (options: any): Plugin; } interface MinChunkSizePluginStatic { new (options: any): Plugin; @@ -786,6 +1059,8 @@ declare namespace webpack { interface WatchOptions { /** After a change the watcher waits that time (in milliseconds) for more changes. Default: 300. */ aggregateTimeout?: number; + /** For some systems, watching many file systems can result in a lot of CPU or memory usage. It is possible to exclude a huge folder like node_modules. It is also possible to use anymatch patterns. */ + ignored?: RegExp | string; /** The watcher uses polling instead of native watchers. true uses the default interval, a number specifies a interval in milliseconds. Default: undefined (automatic). */ poll?: number | boolean; } @@ -802,40 +1077,46 @@ declare namespace webpack { } interface StatsOptions { - /** context directory for request shortening */ - context?: boolean; - /** add the hash of the compilation */ - hash?: boolean; - /** add webpack version information */ - version?: boolean; - /** add timing information */ - timings?: boolean; - /** add assets information */ + /** Add asset Information */ assets?: boolean; - /** add chunk information */ - chunks?: boolean; - /** add built modules information to chunk information */ - chunkModules?: boolean; - /** add built modules information */ - modules?: boolean; - /** add children information */ - children?: boolean; - /** add also information about cached (not built) modules */ - cached?: boolean; - /** add information about the reasons why modules are included */ - reasons?: boolean; - /** add the source code of modules */ - source?: boolean; - /** add details to errors (like resolving log) */ - errorDetails?: boolean; - /** add the origins of chunks and chunk merging info */ - chunkOrigins?: boolean; - /** sort the modules by that field */ - modulesSort?: string; - /** sort the chunks by that field */ - chunksSort?: string; - /** sort the assets by that field */ + /** Sort assets by a field */ assetsSort?: string; + /** Add information about cached (not built) modules */ + cached?: boolean; + /** Add children information */ + children?: boolean; + /** Add chunk information (setting this to `false` allows for a less verbose output) */ + chunks?: boolean; + /** Add built modules information to chunk information */ + chunkModules?: boolean; + /** Add the origins of chunks and chunk merging info */ + chunkOrigins?: boolean; + /** Sort the chunks by a field */ + chunksSort?: string; + /** Context directory for request shortening */ + context?: string; + /** Add errors */ + errors?: boolean; + /** Add details to errors (like resolving log) */ + errorDetails?: boolean; + /** Add the hash of the compilation */ + hash?: boolean; + /** Add built modules information */ + modules?: boolean; + /** Sort the modules by a field */ + modulesSort?: string; + /** Add public path information */ + publicPath?: boolean; + /** Add information about the reasons why modules are included */ + reasons?: boolean; + /** Add the source code of modules */ + source?: boolean; + /** Add timing information */ + timings?: boolean; + /** Add webpack version information */ + version?: boolean; + /** Add warnings */ + warnings?: boolean; } interface StatsToStringOptions extends StatsOptions { @@ -843,7 +1124,26 @@ declare namespace webpack { colors?: boolean; } - type CompilerCallback = (err: Error, stats: Stats) => void + type CompilerCallback = (err: Error, stats: Stats) => void; + } + + interface PerformanceOptions { + /** + * Turns hints on/off. In addition, tells webpack to throw either an error or a warning when hints are found. This property is set to "warning" by default. + */ + hints?: boolean | 'error' | 'warning'; + /** + * An entrypoint represents all assets that would be utilized during initial load time for a specific entry. This option controls when webpack should emit performance hints based on the maximum entrypoint size. The default value is 250000 (bytes). + */ + maxEntryPointSize?: number; + /** + * An asset is any emitted file from webpack. This option controls when webpack emits a performance hint based on individual asset size. The default value is 250000 (bytes). + */ + maxAssetSize?: number; + /** + * This property allows webpack to control what files are used to calculate performance hints. + */ + assetFilter?: (assetFilename: string) => boolean; } } diff --git a/webpack/tsconfig.json b/webpack/tsconfig.json index 03bfb240e7..f85a099ac3 100644 --- a/webpack/tsconfig.json +++ b/webpack/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": true, diff --git a/webpack/webpack-tests.ts b/webpack/webpack-tests.ts index 8cdb92c94b..086592b4de 100644 --- a/webpack/webpack-tests.ts +++ b/webpack/webpack-tests.ts @@ -188,7 +188,11 @@ configuration = { }; configuration = { - devtool: "#inline-source-map" + devtool: "inline-source-map" +}; + +configuration = { + devtool: false }; configuration = { @@ -395,7 +399,19 @@ compiler.watch({ // watch options: // pass a number to set the polling interval }, function(err, stats) { // ... -}); + }); +// or +compiler.watch({ // watch options: + ignored: 'foo/**/*' +}, function(err, stats) { + // ... + }); +// or +compiler.watch({ // watch options: + ignored: /node_modules/ +}, function(err, stats) { + // ... + }); declare function handleFatalError(err: Error): void; declare function handleSoftErrors(errs: string[]): void; @@ -408,6 +424,28 @@ webpack({ if(err) return handleFatalError(err); var jsonStats = stats.toJson(); + var jsonStatsWithAllOptions = stats.toJson({ + assets: true, + assetsSort: "field", + cached: true, + children: true, + chunks: true, + chunkModules: true, + chunkOrigins: true, + chunksSort: "field", + context: "../src/", + errors: true, + errorDetails: true, + hash: true, + modules: true, + modulesSort: "field", + publicPath: true, + reasons: true, + source: true, + timings: true, + version: true, + warnings: true + }); if(jsonStats.errors.length > 0) return handleSoftErrors(jsonStats.errors); if(jsonStats.warnings.length > 0) @@ -490,3 +528,37 @@ configuration = { const resolve: webpack.Resolve = { cachePredicate: 'boo' // why does this test _not_ fail!? } + +const performance: webpack.PerformanceOptions = { + hints: 'error', + maxEntryPointSize: 400000, + maxAssetSize: 100000, + assetFilter: function(assetFilename) { + return assetFilename.endsWith('.js'); + }, +}; + +configuration = { + performance, +}; + +function loader(this: webpack.loader.LoaderContext, source: string, sourcemap: string): void { + this.cacheable(); + + this.async(); + + this.addDependency(''); + + this.resolve('context', 'request', ( err: Error, result: string) => {}); + + this.emitError('wraning'); + + this.callback(null, source); +} + +module loader { + export const raw: boolean = true; + export const pitch = (remainingRequest: string, precedingRequest: string, data: any) => {}; +} +const loaderRef: webpack.loader.Loader = loader; +console.log(loaderRef.raw === true); diff --git a/webrtc/tsconfig.json b/webrtc/tsconfig.json index fdda3c7ab0..7fc71ab464 100644 --- a/webrtc/tsconfig.json +++ b/webrtc/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/website-scraper/tsconfig.json b/website-scraper/tsconfig.json index 1cfd003541..984767f360 100644 --- a/website-scraper/tsconfig.json +++ b/website-scraper/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/websocket/tsconfig.json b/websocket/tsconfig.json index a10e414c11..b57411e6ff 100644 --- a/websocket/tsconfig.json +++ b/websocket/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/webspeechapi/tsconfig.json b/webspeechapi/tsconfig.json index 07cc83d6e1..21c9d6298c 100644 --- a/webspeechapi/tsconfig.json +++ b/webspeechapi/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/websql/tsconfig.json b/websql/tsconfig.json index 5faa5767ff..4c9200819e 100644 --- a/websql/tsconfig.json +++ b/websql/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/webtorrent/index.d.ts b/webtorrent/index.d.ts index 3760e043ea..413dee9133 100644 --- a/webtorrent/index.d.ts +++ b/webtorrent/index.d.ts @@ -1,341 +1,155 @@ -// Type definitions for WebTorrent -// Project: https://webtorrent.io/ -// Definitions by: Bazyli Brzóska +// Type definitions for WebTorrent 0.98 +// Project: https://github.com/feross/webtorrent +// Definitions by: Bazyli Brzóska , Tomasz Łaziuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// -/// -import ParseTorrent = require("parse-torrent"); +import * as ParseTorrent from 'parse-torrent'; +import * as SimplePeer from 'simple-peer'; +import * as http from 'http'; -declare var webTorrentStatic:WebTorrent.ClientConstructor; -export = webTorrentStatic; -export as namespace WebTorrent; +declare const WebTorrent: WebTorrent.WebTorrent; declare namespace WebTorrent { - export interface ClientOptions { - dht?: boolean|Object, // Enable DHT (default=true), or options object for DHT - maxConns?: number, // Max number of connections per torrent (default=55) - nodeId?: string|Buffer, // DHT protocol node ID (default=randomly generated) - peerId?: string|Buffer, // Wire protocol peer ID (default=randomly generated) - rtcConfig?: Object, // RTCPeerConnection configuration object (default=STUN only) - tracker?: boolean|Object, // Whether or not to enable trackers (default=true) - wrtc?: Object // Custom webrtc implementation (in node, specify the [wrtc](https://www.npmjs.com/package/wrtc) package) - } - - export interface TorrentOptions { - announce?: Array, // Torrent trackers to use (added to list in .torrent or magnet uri) - path?: string, // Folder to download files to (default=`/tmp/webtorrent/`) - store?: Function // Custom chunk store (must follow [abstract-chunk-store](https://www.npmjs.com/package/abstract-chunk-store) API) - } - - export interface ClientConstructor { - new (config?:ClientOptions):Client; - } - - export interface Client extends NodeJS.EventEmitter, ClientConstructor { - on(event: string, listener: Function): this; - - /** - * Start downloading a new torrent. Aliased as client.download. - - torrentId can be one of: - - * magnet uri (string) - * torrent file (buffer) - * info hash (hex string or buffer) - * parsed torrent (from parse-torrent) - * http/https url to a torrent file (string) - * filesystem path to a torrent file (string) - - If ontorrent is specified, then it will be called when this torrent is ready to be used (i.e. metadata is available). Note: this is distinct from the 'torrent' event which will fire for all torrents. - - If you want access to the torrent object immediately in order to listen to events as the metadata is fetched from the network, then use the return value of client.add. If you just want the file data, then use ontorrent or the 'torrent' event. - */ - // add(torrentFileBufferOrMagnetUriOrPathOrInfoHash:string|Buffer|ParsedTorrent, opts?:TorrentOptions, onTorrentCallback?:(torrent:Torrent)=>void):Torrent; - add(magnetUriOrPathOrInfoHash:string, opts?:TorrentOptions, onTorrentCallback?:(torrent:Torrent)=>void):Torrent; - add(torrentFileOrInfoHash:Buffer, opts?:TorrentOptions, onTorrentCallback?:(torrent:Torrent)=>void):Torrent; - add(parsedTorrent:ParseTorrent.ParsedTorrent, opts?:TorrentOptions, onTorrentCallback?:(torrent:Torrent)=>void):Torrent; - - add(magnetUriOrPathOrInfoHash:string, onTorrentCallback?:(torrent:Torrent)=>void):Torrent; - add(torrentFileOrInfoHash:Buffer, onTorrentCallback?:(torrent:Torrent)=>void):Torrent; - add(parsedTorrent:ParseTorrent.ParsedTorrent, onTorrentCallback?:(torrent:Torrent)=>void):Torrent; - - /** - * Emitted when a torrent is ready to be used (i.e. metadata is available and store is ready). See the torrent section for more info on what methods a torrent has. - */ - on(event:'torrent', callback:(torrent:Torrent)=>void): this; - - /** - * Start seeding a new torrent. - - input can be any of the following: - - path to the file or folder on filesystem (string) (Node.js only) - W3C File object (from an or drag and drop) - W3C FileList object (basically an array of File objects) - Node Buffer object (works in the browser) - Or, an array of string, File, or Buffer objects. - - If opts is specified, it should contain the following types of options: - - options for create-torrent (to allow configuration of the .torrent file that is created) - options for client.add (see above) - If onseed is specified, it will be called when the client has begun seeding the file. - */ - seed(inputFileOrFolderPath:string, opts?:TorrentOptions|any, onSeed?:(torrent:Torrent)=>void):void; - seed(inputFile:File, opts?:TorrentOptions|any, onSeed?:(torrent:Torrent)=>void):void; - seed(inputFileList:FileList, opts?:TorrentOptions|any, onSeed?:(torrent:Torrent)=>void):void; - seed(inputBuffer:Buffer, opts?:TorrentOptions|any, onSeed?:(torrent:Torrent)=>void):void; - seed(inputBuffersFilesOrPaths:Array, opts?:TorrentOptions|any, onSeed?:(torrent:Torrent)=>void):void; - - seed(inputFileOrFolderPath:string, onSeed?:(torrent:Torrent)=>void):void; - seed(inputFile:File, onSeed?:(torrent:Torrent)=>void):void; - seed(inputFileList:FileList, onSeed?:(torrent:Torrent)=>void):void; - seed(inputBuffer:Buffer, onSeed?:(torrent:Torrent)=>void):void; - seed(inputBuffersFilesOrPaths:Array, onSeed?:(torrent:Torrent)=>void):void; - //TODO: opts - - /** - * Remove a torrent from the client. Destroy all connections to peers and delete all saved file data. If callback is specified, it will be called when file data is removed. - */ - remove(torrentId:string, callback?:(err:Error)=>void):void; - - /** - * Destroy the client, including all torrents and connections to peers. If callback is specified, it will be called when the client has gracefully closed. - */ - destroy(callback?:(err:Error)=>void):void; - - /** - * An array of all torrents in the client. - */ - torrents:Array; - - /** - * Returns the torrent with the given torrentId. Convenience method. Easier than searching through the client.torrents array. Returns null if no matching torrent found. - */ - get(torrentId:string):Torrent; - - /** - * Seed ratio for all torrents in the client. - */ - ratio:number; - } - - export interface Torrent extends NodeJS.EventEmitter { - on(event: string, listener: Function): this; - - /** - * Get the info hash of the torrent. - */ - infoHash:string; - - /** - * Get the magnet URI of the torrent. - */ - magnetURI:string; - - /** - * An array of all files in the torrent. See the file section for more info on what methods the file has. - */ - files:Array; - - /** - * The attached bittorrent-swarm instance. - */ - swarm:any; // TODO: return type - - /** - * Get total bytes received from peers (including invalid data). - */ - recieved:number; - - /** - * Get total bytes received from peers (excluding invalid data). - */ - downloaded:number; - - /** - * Get the time remaining in millis if downloading. - */ - timeRemaining:number; - - /** - * Get the total progress from 0 to 1. - */ - progress:number; - - /** - * Get the torrent ratio (seeded/downloaded). - */ - ratio:number; - - /** - * Returns the download speed. - */ - downloadSpeed():number; - - /** - * Returns the current upload speed. - */ - uploadSpeed():number; - - /** - * Get the torrent download location. - */ - path:string; - - /** - * Alias for client.remove(torrent). - */ - destroy():void; - - /** - * Adds a peer to the underlying bittorrent-swarm instance. - - Returns true if peer was added, false if peer was blocked by the loaded blocklist. - */ - addPeer(addr:string):boolean; - - /** - * Selects a range of pieces to prioritize starting with start and ending with end (both inclusive) at the given priority. notify is an optional callback to be called when the selection is updated with new data. - */ - select(start:number, end:number, priority?:number, notifyCallback?:() => void):void; - - /** - * Deprioritizes a range of previously selected pieces. - */ - deselect(start:number, end:number, priority:number):void; - - /** - * Marks a range of pieces as critical priority to be downloaded ASAP. From start to end (both inclusive). - */ - critical(start:number, end:number):void; - - /** - * Create an http server to serve the contents of this torrent, dynamically fetching the needed torrent pieces to satisfy http requests. Range requests are supported. - - Returns an http.Server instance (got from calling http.createServer). If opts is specified, it is passed to the http.createServer function. - - Visiting the root of the server / will show a list of links to individual files. Access individual files at / where is the index in the torrent.files array (e.g. /0, /1, etc.) - */ - createServer(opts?:any):any; // TODO: :http.Server; - - /** - * Temporarily stop connecting to new peers. Note that this does not pause new incoming connections, nor does it pause the streams of existing connections or their wires. - */ - pause():void; - - /** - * Resume connecting to new peers. - */ - resume():void; - - /** - * Emitted when all the torrent's files have been downloaded. - */ - on(event: 'done', callback:()=>void): this; - - /** - * Emitted every time a new chunk of data arrives, it's useful for reporting the current torrent status. - */ - on(event: 'download', callback:(chunkSize:number)=>void): this; - - /** - * Emitted whenever a new peer is connected for this torrent. wire is an instance of bittorrent-protocol, which is a node.js-style duplex stream to the remote peer. This event can be used to specify custom BitTorrent protocol extensions. - */ - on(event: 'wire', callback:(wire: any, addr: any) => void): this; - } - - export interface InTorrentFile extends NodeJS.EventEmitter { - on(event: string, listener: Function): this; - - /** - * File name, as specified by the torrent. Example: 'some-filename.txt' - */ - name:string; - - /** - * File path, as specified by the torrent. Example: 'some-folder/some-filename.txt' - */ - path:string; - - /** - * File length (in bytes), as specified by the torrent. Example: 12345 - */ - length:number; - - /** - * Selects the file to be downloaded, but at a lower priority than files with streams. Useful if you know you need the file at a later stage. - */ - select():void; - - /** - * Deselects the file, which means it won't be downloaded unless someone creates a stream for it. - */ - deselect():void; - - /** - * Create a readable stream to the file. Pieces needed by the stream will be prioritized highly and fetched from the swarm first. - * You can pass opts to stream only a slice of a file. - * Both start and end bytes are inclusive. - */ - createReadStream(opts?:{start:number, end:number}):NodeJS.ReadableStream; - - /** - * Get the file contents as a Buffer. - - The file will be fetched from the network with highest priority, and callback will be called once the file is ready. callback must be specified, and will be called with a an Error (or null) and the file contents as a Buffer. - - file.getBuffer(function (err, buffer) { - if (err) throw err - console.log(buffer) // - }) - - */ - getBuffer(callback: (err:Error, buffer:Buffer) => void):void; - - /** - * Show the file in a the browser by appending it to the DOM. This is a powerful function that handles many file types like video (.mp4, .webm, .m4v, etc.), audio (.m4a, .mp3, .wav, etc.), images (.jpg, .gif, .png, etc.), and other file formats (.pdf, .md, .txt, etc.). - - The file will be fetched from the network with highest priority and streamed into the page (if it's video or audio). In some cases, video or audio files will not be streamable because they're not in a format that the browser can stream so the file will be fully downloaded before being played. For other non-streamable file types like images and PDFs, the file will be downloaded then displayed. - - rootElem is a container element (CSS selector or reference to DOM node) that the content will be shown in. A new DOM node will be created for the content and appended to rootElem. - - callback will be called once the file is visible to the user. callback must be specified, and will be called with a an Error (or null) and the new DOM node that is displaying the content. - - file.appendTo('#containerElement', function (err, elem) { - if (err) throw err // file failed to download or display in the DOM - console.log('New DOM node with the content', elem) - }) - - */ - appendTo(rootElem:Element|string, callback?:(err:Error, elem:Element) => void):void; - - /** - * Like file.appendTo but renders directly into given element (or CSS selector). - */ - renderTo(elem:Element|string, callback?:(err:Error, elem:Element) => void):void; - - /** - * Get a url which can be used in the browser to refer to the file. - - The file will be fetched from the network with highest priority, and callback will be called once the file is ready. callback must be specified, and will be called with a an Error (or null) and the Blob URL (String). - - file.getBlobURL(function (err, url) { - if (err) throw err - var a = document.createElement('a') - a.download = file.name - a.href = url - a.textContent = 'Download ' + file.name - document.body.appendChild(a) - }) - */ - getBlobURL(callback:(err:Error, url:string) => void):void; - - /** - * Emitted when the file have been downloaded. - */ - on(event: 'done', callback:()=>void): this; - } + export interface WebTorrent { + new (config?: Options): Instance; + (config?: Options): Instance; + WEBRTC_SUPPORT: boolean; + } + export interface Options { + maxConns?: number; + nodeId?: string | Buffer; + peerId?: string | Buffer; + tracker?: boolean | {}; + dht?: boolean | {}; + webSeeds?: boolean; + } + + export interface TorrentOptions { + announce?: any[]; + getAnnounceOpts?: () => void; + maxWebConns?: number; + path?: string; + store?: (chunkLength: number, storeOpts: { length: number, files: File[], torrent: Torrent, }) => any; + } + + export interface Instance extends NodeJS.EventEmitter { + on(event: 'torrent', callback: (torrent: Torrent) => void): this; + on(event: 'error', callback: (err: Error | string) => void): this; + + add(torrent: string | Buffer | ParseTorrent.ParsedTorrent, opts?: TorrentOptions, cb?: (torrent: Torrent) => any): Torrent; + add(torrent: string | Buffer | ParseTorrent.ParsedTorrent, cb?: (torrent: Torrent) => any): Torrent; + + seed(input: string | string[] | File | File[] | FileList | Buffer | Buffer[] | NodeJS.ReadableStream | NodeJS.ReadableStream[], opts?: TorrentOptions, cb?: (torrent: Torrent) => any): Torrent; + seed(input: string | string[] | File | File[] | FileList | Buffer | Buffer[] | NodeJS.ReadableStream | NodeJS.ReadableStream[], cb?: (torrent: Torrent) => any): Torrent; + + remove(torrentId: Torrent | string | Buffer, callback?: (err: Error | string) => void): void; + + destroy(callback?: (err: Error | string) => void): void; + + readonly torrents: Torrent[]; + + get(torrentId: Torrent | string | Buffer): Torrent | void; + + readonly downloadSpeed: number; + + readonly uploadSpeed: number; + + readonly progress: number; + + readonly ratio: number; + } + + export interface Torrent extends NodeJS.EventEmitter { + readonly infoHash: string; + + readonly magnetURI: string; + + readonly torrentFile: Buffer; + + readonly torrentFileBlobURL: string; + + readonly files: TorrentFile[]; + + readonly timeRemaining: number; + + readonly received: number; + + readonly downloaded: number; + + readonly uploaded: number; + + readonly downloadSpeed: number; + + readonly uploadSpeed: number; + + readonly progress: number; + + readonly ratio: number; + + readonly numPeers: number; + + readonly path: string; + + destroy(cb?: (err: Error | string) => void): void; + + addPeer(peer: string | SimplePeer.Instance): boolean; + + addWebSeed(url: string): void; + + removePeer(peer: string | SimplePeer.Instance): void; + + select(start: number, end: number, priority?: number, notify?: () => void): void; + + deselect(start: number, end: number, priority: number): void; + + createServer(opts?: http.RequestOptions): http.Server; + + pause(): void; + + resume(): void; + + on(event: 'infoHash' | 'metadata' | 'ready' | 'done', callback: () => void): this; + + + on(event: 'warning' | 'error', callback: (err: Error | string) => void): this; + + on(event: 'download' | 'upload', callback: (bytes: number) => void): this; + + // TODO: wire is a bittorrent-protocol instance + on(event: 'wire', callback: (wire: any, addr?: string) => void): this; + + on(event: 'noPeers', callback: (announceType: 'tracker' | 'dht') => void): this; + } + + export interface TorrentFile extends NodeJS.EventEmitter { + readonly name: string; + + readonly path: string; + + readonly length: number; + + readonly downloaded: number; + + select(): void; + + deselect(): void; + + createReadStream(opts?: { start: number, end: number, }): NodeJS.ReadableStream; + + getBuffer(callback: (err: string | Error | undefined, buffer?: Buffer) => void): void; + + appendTo(rootElement: HTMLElement | string, opts?: { autoplay?: boolean, controls?: boolean, maxBlobLength?: number }, callback?: (err: Error | undefined, element: HTMLMediaElement) => void): void; + appendTo(rootElement: HTMLElement | string, callback?: (err: Error | undefined, element: HTMLMediaElement) => void): void; + + renderTo(rootElement: HTMLMediaElement | string, opts?: { autoplay?: boolean, controls?: boolean, maxBlobLength?: number }, callback?: (err: Error | undefined, element: HTMLMediaElement) => void): void; + renderTo(rootElement: HTMLMediaElement | string, callback?: (err: Error | undefined, element: HTMLMediaElement) => void): void; + + getBlob(callback: (err: string | Error | undefined, blob?: Blob) => void): void; + + getBlobURL(callback: (err: string | Error | undefined, blobURL?: string) => void): void; + } } + +export = WebTorrent; diff --git a/webtorrent/tsconfig.json b/webtorrent/tsconfig.json index a874a578e5..92d678f0a5 100644 --- a/webtorrent/tsconfig.json +++ b/webtorrent/tsconfig.json @@ -1,10 +1,13 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -17,4 +20,4 @@ "index.d.ts", "webtorrent-tests.ts" ] -} \ No newline at end of file +} diff --git a/webtorrent/tslint.json b/webtorrent/tslint.json new file mode 100644 index 0000000000..ec365f164b --- /dev/null +++ b/webtorrent/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +} diff --git a/webtorrent/webtorrent-tests.ts b/webtorrent/webtorrent-tests.ts index 96314de12d..895d734817 100644 --- a/webtorrent/webtorrent-tests.ts +++ b/webtorrent/webtorrent-tests.ts @@ -1,76 +1,76 @@ - - -import WebTorrent = require('webtorrent'); +import * as WebTorrent from 'webtorrent'; import * as fs from 'fs'; -var client = new WebTorrent() -var magnetURI = '...' +var client = new WebTorrent(); +var magnetURI = '...'; -client.add(magnetURI, {}, function (torrent) { - // Got torrent metadata! - console.log('Client is downloading:', torrent.infoHash) +client.add(magnetURI, {}, function(torrent) { + // Got torrent metadata! + console.log('Client is downloading:', torrent.infoHash); - torrent.files.forEach(function (file) { - // Display the file by appending it to the DOM. Supports video, audio, images, and - // more. Specify a container element (CSS selector or reference to DOM node). - file.appendTo('body') + torrent.files.forEach(function(file) { + // Display the file by appending it to the DOM. Supports video, audio, images, and + // more. Specify a container element (CSS selector or reference to DOM node). + file.appendTo('body'); - file.getBuffer(function (err, buffer) { - if (err) throw err - console.log(buffer) // - }) + file.getBuffer(function(err, buffer) { + if (err) throw err; + console.log(buffer); // + }); - file.appendTo('#containerElement', function (err, elem) { - if (err) throw err // file failed to download or display in the DOM - console.log('New DOM node with the content', elem) - }) + file.appendTo('#containerElement', function(err, elem) { + if (err) throw err; // file failed to download or display in the DOM + console.log('New DOM node with the content', elem); + }); - file.getBlobURL(function (err, url) { - if (err) throw err - var a = document.createElement('a') - // a.download = file.name - a.href = url - a.textContent = 'Download ' + file.name - document.body.appendChild(a) - }) - }) + file.getBlobURL(function(err, url) { + if (err) throw err; + var a = document.createElement('a'); + // a.download = file.name + if (url) { + a.href = url; + } + a.textContent = 'Download ' + file.name; + document.body.appendChild(a); + }); + }); - torrent.on('done', function(){ - console.log('torrent finished downloading'); - torrent.files.forEach(function(file){ - // do something with file - }) - }) + torrent.on('done', function() { + console.log('torrent finished downloading'); + torrent.files.forEach(function(file) { + // do something with file + }); + }); - torrent.on('download', function(chunkSize){ - console.log('chunk size: ' + chunkSize); - console.log('total downloaded: ' + torrent.downloaded); - console.log('download speed: ' + torrent.downloadSpeed); - console.log('progress: ' + torrent.progress); - console.log('======'); - }) + torrent.on('download', function(chunkSize) { + console.log('chunk size: ' + chunkSize); + console.log('total downloaded: ' + torrent.downloaded); + console.log('download speed: ' + torrent.downloadSpeed); + console.log('progress: ' + torrent.progress); + console.log('======'); + }); - torrent.on('wire', function (wire, addr) { - console.log('connected to peer with address ' + addr) - wire.use() - }) -}) + torrent.on('wire', function(wire, addr) { + console.log('connected to peer with address ' + addr); + wire.use(); + }); +}); -client.seed('./file.txt', {}, function (torrent) { - console.log('Client is seeding:', torrent.infoHash) -}) +client.seed('./file.txt', {}, function(torrent) { + console.log('Client is seeding:', torrent.infoHash); +}); -client.add(magnetURI, function (torrent) { - // create HTTP server for this torrent - var server = torrent.createServer() - server.listen(1234) // start the server listening to a port +client.add(magnetURI, function(torrent) { + // create HTTP server for this torrent + var server = torrent.createServer(); + server.listen(1234); // start the server listening to a port - // visit http://localhost:/ to see a list of files + // visit http://localhost:/ to see a list of files - // access individual files at http://localhost:/ where index is the index - // in the torrent.files array + // access individual files at http://localhost:/ where index is the index + // in the torrent.files array - // later, cleanup... - server.close() - client.destroy() -}) + // later, cleanup... + server.close(); + client.destroy(); +}); diff --git a/webvr-api/tsconfig.json b/webvr-api/tsconfig.json index 74b37a497e..3dbd3ccc46 100644 --- a/webvr-api/tsconfig.json +++ b/webvr-api/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/weighted/tsconfig.json b/weighted/tsconfig.json index 68f5121746..9b8cbaedfc 100644 --- a/weighted/tsconfig.json +++ b/weighted/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/whatwg-fetch/tsconfig.json b/whatwg-fetch/tsconfig.json index 2bb9427c7a..1855761487 100644 --- a/whatwg-fetch/tsconfig.json +++ b/whatwg-fetch/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/whatwg-streams/tsconfig.json b/whatwg-streams/tsconfig.json index c4a7462d1b..95a18214ff 100644 --- a/whatwg-streams/tsconfig.json +++ b/whatwg-streams/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/when/tsconfig.json b/when/tsconfig.json index 99412dac98..c8c295ea09 100644 --- a/when/tsconfig.json +++ b/when/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/which/tsconfig.json b/which/tsconfig.json index 1f2cdf91c4..fa7a35e452 100644 --- a/which/tsconfig.json +++ b/which/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/why-did-you-update/tsconfig.json b/why-did-you-update/tsconfig.json index e72629d16f..255e0bdf23 100644 --- a/why-did-you-update/tsconfig.json +++ b/why-did-you-update/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/wiiu/tsconfig.json b/wiiu/tsconfig.json index 841a91c0f7..6e96375fe9 100644 --- a/wiiu/tsconfig.json +++ b/wiiu/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/window-or-global/tsconfig.json b/window-or-global/tsconfig.json index f8998e0cda..ba9f7a5f05 100644 --- a/window-or-global/tsconfig.json +++ b/window-or-global/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/window-size/tsconfig.json b/window-size/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/window-size/tsconfig.json +++ b/window-size/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/windows-1251/tsconfig.json b/windows-1251/tsconfig.json index f8674c8c4d..b34d485178 100644 --- a/windows-1251/tsconfig.json +++ b/windows-1251/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/windows-service/tsconfig.json b/windows-service/tsconfig.json index a7925ef470..df34488d23 100644 --- a/windows-service/tsconfig.json +++ b/windows-service/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/winjs/tsconfig.json b/winjs/tsconfig.json index 5692e5627e..1401eeeedb 100644 --- a/winjs/tsconfig.json +++ b/winjs/tsconfig.json @@ -4,7 +4,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/winjs/v1/tsconfig.json b/winjs/v1/tsconfig.json index 03c0485abb..f6d6aedde9 100644 --- a/winjs/v1/tsconfig.json +++ b/winjs/v1/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "winjs": ["winjs/v1"] + "winjs": [ + "winjs/v1" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/winjs/v2/tsconfig.json b/winjs/v2/tsconfig.json index e2b36d3a08..857f810042 100644 --- a/winjs/v2/tsconfig.json +++ b/winjs/v2/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "winjs": ["winjs/v2"] + "winjs": [ + "winjs/v2" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/winreg/tsconfig.json b/winreg/tsconfig.json index f55b21084c..afcfe12c42 100644 --- a/winreg/tsconfig.json +++ b/winreg/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/winrt-uwp/tsconfig.json b/winrt-uwp/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/winrt-uwp/tsconfig.json +++ b/winrt-uwp/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/winrt/tsconfig.json b/winrt/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/winrt/tsconfig.json +++ b/winrt/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/winston-dynamodb/tsconfig.json b/winston-dynamodb/tsconfig.json index 4f34b30238..2e684e94de 100644 --- a/winston-dynamodb/tsconfig.json +++ b/winston-dynamodb/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/winston/tsconfig.json b/winston/tsconfig.json index 9cdcb3bc9e..b5fa9d9ccf 100644 --- a/winston/tsconfig.json +++ b/winston/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/wiredep/tsconfig.json b/wiredep/tsconfig.json index c6e4dd32f7..3794e2a3b2 100644 --- a/wiredep/tsconfig.json +++ b/wiredep/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/wiring-pi/tsconfig.json b/wiring-pi/tsconfig.json index 8e02deab5c..77cbb57262 100644 --- a/wiring-pi/tsconfig.json +++ b/wiring-pi/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/wnumb/tsconfig.json b/wnumb/tsconfig.json index ef3f675505..d8e656f34e 100644 --- a/wnumb/tsconfig.json +++ b/wnumb/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/wolfy87-eventemitter/tsconfig.json b/wolfy87-eventemitter/tsconfig.json index 6cbcaf2727..9829e08cfa 100644 --- a/wolfy87-eventemitter/tsconfig.json +++ b/wolfy87-eventemitter/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/wordcloud/tsconfig.json b/wordcloud/tsconfig.json index 45de126695..e957e72d27 100644 --- a/wordcloud/tsconfig.json +++ b/wordcloud/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/wrap-ansi/tsconfig.json b/wrap-ansi/tsconfig.json index a88c4e1186..748e251fe3 100644 --- a/wrap-ansi/tsconfig.json +++ b/wrap-ansi/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/wreck/tsconfig.json b/wreck/tsconfig.json index cd4517f6a7..0ab20c0c1d 100644 --- a/wreck/tsconfig.json +++ b/wreck/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/wrench/tsconfig.json b/wrench/tsconfig.json index e046663bbc..0644d7a8a6 100644 --- a/wrench/tsconfig.json +++ b/wrench/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ws/tsconfig.json b/ws/tsconfig.json index 85c1f15ef5..89cd6325e0 100644 --- a/ws/tsconfig.json +++ b/ws/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/wu/tsconfig.json b/wu/tsconfig.json index f85d0cad98..d416f96d9a 100644 --- a/wu/tsconfig.json +++ b/wu/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/x-editable/tsconfig.json b/x-editable/tsconfig.json index 1b1cda2c02..2f3014ef21 100644 --- a/x-editable/tsconfig.json +++ b/x-editable/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/x2js/tsconfig.json b/x2js/tsconfig.json index bb82a3b504..15e948c2ac 100644 --- a/x2js/tsconfig.json +++ b/x2js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/xadesjs/tsconfig.json b/xadesjs/tsconfig.json index 65d3a8c0f4..bcb7e26be4 100644 --- a/xadesjs/tsconfig.json +++ b/xadesjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/xdate/tsconfig.json b/xdate/tsconfig.json index ed4a312800..d87d20ca4f 100644 --- a/xdate/tsconfig.json +++ b/xdate/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/xdomain/tsconfig.json b/xdomain/tsconfig.json index 6bd9b092b1..8bac97a25d 100644 --- a/xdomain/tsconfig.json +++ b/xdomain/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/xlsx/tsconfig.json b/xlsx/tsconfig.json index 6d69f325fc..c202db1ea3 100644 --- a/xlsx/tsconfig.json +++ b/xlsx/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/xml-js/tsconfig.json b/xml-js/tsconfig.json index fc5657655e..09b2ed9cff 100644 --- a/xml-js/tsconfig.json +++ b/xml-js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/xml-parser/tsconfig.json b/xml-parser/tsconfig.json index 3f43c0a13a..7a8d5679d5 100644 --- a/xml-parser/tsconfig.json +++ b/xml-parser/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/xml/tsconfig.json b/xml/tsconfig.json index db69937dc5..2ed5a65a43 100644 --- a/xml/tsconfig.json +++ b/xml/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/xml2js/tsconfig.json b/xml2js/tsconfig.json index 01f9bcaad2..0449642c2f 100644 --- a/xml2js/tsconfig.json +++ b/xml2js/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/xml2json/tsconfig.json b/xml2json/tsconfig.json index ace1857003..2e96ea8c96 100644 --- a/xml2json/tsconfig.json +++ b/xml2json/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/xmlbuilder/tsconfig.json b/xmlbuilder/tsconfig.json index cf88610982..972e1b4bf1 100644 --- a/xmlbuilder/tsconfig.json +++ b/xmlbuilder/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/xmldoc/tsconfig.json b/xmldoc/tsconfig.json index bb457db2a6..ca7ade502f 100644 --- a/xmldoc/tsconfig.json +++ b/xmldoc/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/xmldom/tsconfig.json b/xmldom/tsconfig.json index 7f7767880d..80d1635035 100644 --- a/xmldom/tsconfig.json +++ b/xmldom/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/xmlpoke/tsconfig.json b/xmlpoke/tsconfig.json index 356a1020e2..461a2b8764 100644 --- a/xmlpoke/tsconfig.json +++ b/xmlpoke/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/xmlrpc/tsconfig.json b/xmlrpc/tsconfig.json index f1b2b8a17a..fb01ac427c 100644 --- a/xmlrpc/tsconfig.json +++ b/xmlrpc/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/xmltojson/tsconfig.json b/xmltojson/tsconfig.json index b55d1e92bf..463279a1c3 100644 --- a/xmltojson/tsconfig.json +++ b/xmltojson/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/xregexp/tsconfig.json b/xregexp/tsconfig.json index 1cf621236d..4b242b1071 100644 --- a/xregexp/tsconfig.json +++ b/xregexp/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/xrm/tsconfig.json b/xrm/tsconfig.json index fe0ed76793..8fa3542f3a 100644 --- a/xrm/tsconfig.json +++ b/xrm/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/xrm/v6/tsconfig.json b/xrm/v6/tsconfig.json index 71ce641f3a..8ea9f3240c 100644 --- a/xrm/v6/tsconfig.json +++ b/xrm/v6/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "xrm": ["xrm/v6"] + "xrm": [ + "xrm/v6" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/xrm/v7/tsconfig.json b/xrm/v7/tsconfig.json index e8865ca8e8..a3eb727035 100644 --- a/xrm/v7/tsconfig.json +++ b/xrm/v7/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "xrm": ["xrm/v7"] + "xrm": [ + "xrm/v7" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/xsd-schema-validator/tsconfig.json b/xsd-schema-validator/tsconfig.json index e720897bf8..dab88a34a3 100644 --- a/xsd-schema-validator/tsconfig.json +++ b/xsd-schema-validator/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,4 +19,4 @@ "index.d.ts", "xsd-schema-validator-tests.ts" ] -} +} \ No newline at end of file diff --git a/xsockets/tsconfig.json b/xsockets/tsconfig.json index 9e6f081d02..b9e8d65653 100644 --- a/xsockets/tsconfig.json +++ b/xsockets/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/xss-filters/tsconfig.json b/xss-filters/tsconfig.json index 9e3c61cc8f..bcf5ffba88 100644 --- a/xss-filters/tsconfig.json +++ b/xss-filters/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/xtend/tsconfig.json b/xtend/tsconfig.json index f2544d73e9..452c3d004d 100644 --- a/xtend/tsconfig.json +++ b/xtend/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/xterm/tsconfig.json b/xterm/tsconfig.json index df7d8f669f..2a3d8b3bd1 100644 --- a/xterm/tsconfig.json +++ b/xterm/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/yamljs/tsconfig.json b/yamljs/tsconfig.json index 790e5ca134..bcced464e6 100644 --- a/yamljs/tsconfig.json +++ b/yamljs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/yandex-money-sdk/tsconfig.json b/yandex-money-sdk/tsconfig.json index b1305c1b19..e5339abc94 100644 --- a/yandex-money-sdk/tsconfig.json +++ b/yandex-money-sdk/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/yargs/tsconfig.json b/yargs/tsconfig.json index e454b548e6..c666e5df04 100644 --- a/yargs/tsconfig.json +++ b/yargs/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/yayson/tsconfig.json b/yayson/tsconfig.json index 7d5d732922..4967e89920 100644 --- a/yayson/tsconfig.json +++ b/yayson/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/ydn-db/tsconfig.json b/ydn-db/tsconfig.json index 7263ee2b02..6a0807f737 100644 --- a/ydn-db/tsconfig.json +++ b/ydn-db/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/yeoman-generator/tsconfig.json b/yeoman-generator/tsconfig.json index 9e25a269e7..fdb69029f9 100644 --- a/yeoman-generator/tsconfig.json +++ b/yeoman-generator/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/yfiles/tsconfig.json b/yfiles/tsconfig.json index a32da5c0c8..6c5b8cd59e 100644 --- a/yfiles/tsconfig.json +++ b/yfiles/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/yosay/tsconfig.json b/yosay/tsconfig.json index 8d739f0ca0..362a9c4be2 100644 --- a/yosay/tsconfig.json +++ b/yosay/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/youtube/tsconfig.json b/youtube/tsconfig.json index cdcaca971c..8a67eaf271 100644 --- a/youtube/tsconfig.json +++ b/youtube/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/yui/tsconfig.json b/yui/tsconfig.json index cdcaca971c..27e01ecd7b 100644 --- a/yui/tsconfig.json +++ b/yui/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/z-schema/tsconfig.json b/z-schema/tsconfig.json index b7718dbd07..776b603b1e 100644 --- a/z-schema/tsconfig.json +++ b/z-schema/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/zepto/tsconfig.json b/zepto/tsconfig.json index fb2eea8f55..6c9e1fed78 100644 --- a/zepto/tsconfig.json +++ b/zepto/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/zeroclipboard/tsconfig.json b/zeroclipboard/tsconfig.json index 1933bc4b7b..91061c38ee 100644 --- a/zeroclipboard/tsconfig.json +++ b/zeroclipboard/tsconfig.json @@ -5,7 +5,10 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/zeroclipboard/v1/tsconfig.json b/zeroclipboard/v1/tsconfig.json index 4086147a3a..a2ecf0859b 100644 --- a/zeroclipboard/v1/tsconfig.json +++ b/zeroclipboard/v1/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, @@ -11,7 +14,9 @@ ], "types": [], "paths": { - "zeroclipboard": ["zeroclipboard/v1"] + "zeroclipboard": [ + "zeroclipboard/v1" + ] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/zip.js/tsconfig.json b/zip.js/tsconfig.json index eb6f5cc15a..008e8fd120 100644 --- a/zip.js/tsconfig.json +++ b/zip.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/zmq/tsconfig.json b/zmq/tsconfig.json index 6854129202..7e354f61c0 100644 --- a/zmq/tsconfig.json +++ b/zmq/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/zone.js/tsconfig.json b/zone.js/tsconfig.json index 8e2ce93f4d..c61351295e 100644 --- a/zone.js/tsconfig.json +++ b/zone.js/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/zynga-scroller/tsconfig.json b/zynga-scroller/tsconfig.json index 8ae7ba2056..62ef861ada 100644 --- a/zynga-scroller/tsconfig.json +++ b/zynga-scroller/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false,