From e028083a96c6ae2f38ce39b976facb21af0336e0 Mon Sep 17 00:00:00 2001 From: neeschit Date: Mon, 13 Feb 2017 15:26:15 -0500 Subject: [PATCH 1/4] Type definitions for modesl --- modesl/index.d.ts | 107 +++++++++++++++++++++++++++++++++++++++++ modesl/modesl-tests.ts | 34 +++++++++++++ modesl/tsconfig.json | 20 ++++++++ modesl/tslint.json | 1 + 4 files changed, 162 insertions(+) create mode 100644 modesl/index.d.ts create mode 100644 modesl/modesl-tests.ts create mode 100644 modesl/tsconfig.json create mode 100644 modesl/tslint.json diff --git a/modesl/index.d.ts b/modesl/index.d.ts new file mode 100644 index 0000000000..2752e07bb0 --- /dev/null +++ b/modesl/index.d.ts @@ -0,0 +1,107 @@ +// Type definitions for modesl 1.1 +// Project: https://github.com/englercj/node-esl +// Definitions by: Nischit Ranganath +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import EventEmitter = NodeJS.EventEmitter; +export class Connection extends EventEmitter { + constructor(...args: any[]); + + api(command: any, args: string[], cb?: () => void): void; + + auth(cb: () => void): void; + + bgapi(command: any, args: string[], jobid?: any, cb?: () => void): void; + + connected(): any; + + disconnect(): void; + + events(type: 'json' | 'plain' | 'xml', events: string, cb?: () => void): void; + + execute(app: any, arg?: string, uuid?: string, cb?: () => void): any; + + executeAsync(app: any, arg?: string, uuid?: string, cb?: () => void): any; + + filter(header: any, value: any, cb?: () => void): void; + + filterDelete(header: any, value: any, cb?: () => void): void; + + getInfo(): any; + + message(options: any, cb?: () => void): void; + + originate(options: any, cb?: () => void): void; + + recvEvent(cb?: () => void): void; + + recvEventTimed(ms: any, cb?: () => void): void; + + send(command: any, args: any): void; + + sendEvent(event: any, cb?: () => void): void; + + sendRecv(command: any, args: any, cb?: () => void): void; + + setAsyncExecute(value: any): void; + + setEventLock(value: any): void; + + show(item: any, format: any, cb?: () => void): void; + + socketDescriptor(): any; + + subscribe(events: any, cb?: () => void): void; +} + +export interface Header { + name: string; + + value: string; +} + +export class Event { + constructor(type: any, subclass: any); + + headers: Header[]; + + addBody(value: any): any; + + addHeader(name: any, value: any): any; + + delHeader(name: any): any; + + firstHeader(): any; + + getBody(): any; + + getHeader(name: any): string; + + getType(): any; + + nextHeader(): any; + + serialize(format: any): any; + + setPriority(priority: any): void; + + static PRIORITY: { + HIGH: string; + LOW: string; + NORMAL: string; + }; +} +export class Parser { + constructor(socket: any); +} +export class Server extends EventEmitter { + constructor(opts: any, readycb?: () => void); + + close(callback: any): void; +} +export function eslSetLogLevel(level: any): void; + +export function setLogLevel(level: any): void; + diff --git a/modesl/modesl-tests.ts b/modesl/modesl-tests.ts new file mode 100644 index 0000000000..89bc5dcedb --- /dev/null +++ b/modesl/modesl-tests.ts @@ -0,0 +1,34 @@ +import * as modesl from 'modesl'; + +const freeswitchListener = new modesl.Server(() => { + // console.log('Server listening on localhost at port 8022'); +}); + + +const freeswitchConnection = new modesl.Connection("freeswitch-host", 8021, 'password', () => { + // console.log('connection initialized'); + + freeswitchConnection.api('conference', ['confname', 'dial', 'user/1006']) + + freeswitchConnection.bgapi('conference', ['confname', 'dial', 'user/1006'], 'job-id', () => { + // console.log('action queued'); + }); + + freeswitchConnection.events('json', 'all'); + + freeswitchConnection.subscribe('all'); + + freeswitchConnection.on('esl::event::*::*', (event: modesl.Event) => { + const headerValue = event.getHeader('header'); + + const body = event.getBody(); + + const headers = event.headers; + + headers.forEach((header: modesl.Header) => { + const headerName = header.name; + const headerValue = header.value; + }); + }); +}); + diff --git a/modesl/tsconfig.json b/modesl/tsconfig.json new file mode 100644 index 0000000000..c3a8497fd1 --- /dev/null +++ b/modesl/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", + "modesl-tests.ts" + ] +} diff --git a/modesl/tslint.json b/modesl/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/modesl/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } From a27ae12da31f3e0a22f199ff6c5106e0e87a5937 Mon Sep 17 00:00:00 2001 From: neeschit Date: Tue, 14 Feb 2017 16:39:18 -0500 Subject: [PATCH 2/4] Make priority def readonly --- modesl/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modesl/index.d.ts b/modesl/index.d.ts index 2752e07bb0..6b1c532bd3 100644 --- a/modesl/index.d.ts +++ b/modesl/index.d.ts @@ -87,7 +87,7 @@ export class Event { setPriority(priority: any): void; - static PRIORITY: { + static readonly PRIORITY: { HIGH: string; LOW: string; NORMAL: string; From c191fbb74d90030b0852f7fdb3e3357993a3a66a Mon Sep 17 00:00:00 2001 From: neeschit Date: Tue, 14 Feb 2017 17:04:47 -0500 Subject: [PATCH 3/4] add explicit lib config to import es6 --- modesl/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/modesl/tsconfig.json b/modesl/tsconfig.json index c3a8497fd1..bf010625e0 100644 --- a/modesl/tsconfig.json +++ b/modesl/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "module": "commonjs", "target": "es6", + "lib": ["es6"], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, From fde627d9e806c47b10595a5abb82fb0b2a1b14d7 Mon Sep 17 00:00:00 2001 From: Andy Date: Wed, 15 Feb 2017 09:32:19 -0800 Subject: [PATCH 4/4] Change "target" to "lib" where necessary (#14648) --- ably/ably-tests.ts | 2 + ably/tsconfig.json | 6 ++- bittorrent-protocol/tsconfig.json | 40 +++++++-------- bittorrent-protocol/tslint.json | 5 +- comment-json/tsconfig.json | 6 ++- dockerode/tsconfig.json | 38 ++++++++------- dookie/tsconfig.json | 5 +- dropkickjs/tsconfig.json | 5 +- env-to-object/tsconfig.json | 6 ++- express-mysql-session/tsconfig.json | 6 ++- forever-monitor/tsconfig.json | 6 ++- globule/index.d.ts | 8 +-- globule/tsconfig.json | 4 +- hapi-auth-jwt2/tsconfig.json | 6 ++- japanese-holidays/tsconfig.json | 6 ++- jsonrpc-serializer/tsconfig.json | 6 ++- jump.js/tsconfig.json | 7 ++- leaflet-imageoverlay-rotated/tsconfig.json | 7 ++- leaflet.gridlayer.googlemutant/tsconfig.json | 7 ++- leaflet.pm/tsconfig.json | 7 ++- lodash-webpack-plugin/tsconfig.json | 4 +- lodash.meanby/tsconfig.json | 4 +- lorem-ipsum/tsconfig.json | 6 ++- mock-raf/tsconfig.json | 39 ++++++++------- moment-round/tsconfig.json | 6 ++- node-waves/tsconfig.json | 7 ++- ns-api/ns-api-tests.ts | 2 + ns-api/tsconfig.json | 6 ++- opener/tsconfig.json | 6 ++- openfin/v15/index.d.ts | 22 ++++----- openfin/v15/tsconfig.json | 51 +++++++++++--------- payment/index.d.ts | 2 +- payment/tsconfig.json | 7 ++- progressbar/tsconfig.json | 6 ++- pump/tsconfig.json | 6 ++- range-parser/range-parser-tests.ts | 2 + range-parser/tsconfig.json | 6 ++- route-parser/tsconfig.json | 6 ++- semantic-ui/tsconfig.json | 41 ++++++++-------- spatialite/tsconfig.json | 6 ++- steed/tsconfig.json | 6 ++- strong-cluster-control/index.d.ts | 2 +- strong-cluster-control/tsconfig.json | 6 ++- swiper/v2/tsconfig.json | 5 +- vkbeautify/tsconfig.json | 4 +- xdg-basedir/tsconfig.json | 6 ++- xdg-basedir/xdg-basedir-tests.ts | 2 +- 47 files changed, 273 insertions(+), 176 deletions(-) diff --git a/ably/ably-tests.ts b/ably/ably-tests.ts index da4714d21a..cdc0db5ef3 100644 --- a/ably/ably-tests.ts +++ b/ably/ably-tests.ts @@ -1,5 +1,7 @@ import * as Ably from 'ably'; +declare var console: { log(message: any): void }; + const ApiKey = 'appId.keyId:secret'; const client = new Ably.Realtime(ApiKey); const restClient = new Ably.Rest(ApiKey); diff --git a/ably/tsconfig.json b/ably/tsconfig.json index 0dce6c6c1d..86c7bc0114 100644 --- a/ably/tsconfig.json +++ b/ably/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", "ably-tests.ts" ] -} +} \ No newline at end of file diff --git a/bittorrent-protocol/tsconfig.json b/bittorrent-protocol/tsconfig.json index 65222bf056..9258205ba7 100644 --- a/bittorrent-protocol/tsconfig.json +++ b/bittorrent-protocol/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", - "bittorrent-protocol-tests.ts" - ] -} + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "bittorrent-protocol-tests.ts" + ] +} \ No newline at end of file diff --git a/bittorrent-protocol/tslint.json b/bittorrent-protocol/tslint.json index ec365f164b..a724814e5f 100644 --- a/bittorrent-protocol/tslint.json +++ b/bittorrent-protocol/tslint.json @@ -1,3 +1,6 @@ { - "extends": "../tslint.json" + "extends": "../tslint.json", + "rules": { + "no-misused-new": false + } } diff --git a/comment-json/tsconfig.json b/comment-json/tsconfig.json index 342694cbb3..314e9c0143 100644 --- a/comment-json/tsconfig.json +++ b/comment-json/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", "comment-json-tests.ts" ] -} +} \ No newline at end of file diff --git a/dockerode/tsconfig.json b/dockerode/tsconfig.json index a077f02e3c..2a83a71968 100644 --- a/dockerode/tsconfig.json +++ b/dockerode/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", - "dockerode-tests.ts" - ] + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "dockerode-tests.ts" + ] } \ No newline at end of file diff --git a/dookie/tsconfig.json b/dookie/tsconfig.json index d795a39145..0c926cf7ff 100644 --- a/dookie/tsconfig.json +++ b/dookie/tsconfig.json @@ -1,6 +1,9 @@ { "compilerOptions": { "module": "commonjs", + "lib": [ + "es6" + ], "target": "es6", "noImplicitAny": true, "noImplicitThis": true, @@ -17,4 +20,4 @@ "index.d.ts", "dookie-tests.ts" ] -} +} \ No newline at end of file diff --git a/dropkickjs/tsconfig.json b/dropkickjs/tsconfig.json index e0699ecf5c..07855ffa97 100644 --- a/dropkickjs/tsconfig.json +++ b/dropkickjs/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/env-to-object/tsconfig.json b/env-to-object/tsconfig.json index 68efe0c7ca..316a2acdf6 100644 --- a/env-to-object/tsconfig.json +++ b/env-to-object/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", "env-to-object-tests.ts" ] -} +} \ No newline at end of file diff --git a/express-mysql-session/tsconfig.json b/express-mysql-session/tsconfig.json index 5af8734c24..f897d59bc8 100644 --- a/express-mysql-session/tsconfig.json +++ b/express-mysql-session/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", "express-mysql-session-tests.ts" ] -} +} \ No newline at end of file diff --git a/forever-monitor/tsconfig.json b/forever-monitor/tsconfig.json index 8c6d4986b5..e0d7d1d5ee 100644 --- a/forever-monitor/tsconfig.json +++ b/forever-monitor/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", "forever-monitor-tests.ts" ] -} +} \ No newline at end of file diff --git a/globule/index.d.ts b/globule/index.d.ts index 595a4d2aec..4add1d4461 100644 --- a/globule/index.d.ts +++ b/globule/index.d.ts @@ -61,22 +61,22 @@ interface GlobuleStatic { */ find(pattern: string, pattern2: string, pattern3: string | string[], options?: FindOptions): string[]; - /** + /** * Given a set of source file paths, returns an array of src-dest file mapping objects */ mapping(filepaths: string[], options?: MappingOptions): OneMapping[]; - /** + /** * Given a set of source file paths, returns an array of src-dest file mapping objects */ mapping(options: MappingOptions): OneMapping[]; - /** + /** * Given a set of source file paths, returns an array of src-dest file mapping objects */ mapping(filepaths: string[], filepaths2: string[], options?: MappingOptions): OneMapping[]; - /** + /** * Given a set of source file paths, returns an array of src-dest file mapping objects */ mapping(filepaths: string[], filepaths2: string[], filepaths3: string[], options?: MappingOptions): OneMapping[]; diff --git a/globule/tsconfig.json b/globule/tsconfig.json index ec155b8b0f..55317b01f8 100644 --- a/globule/tsconfig.json +++ b/globule/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/hapi-auth-jwt2/tsconfig.json b/hapi-auth-jwt2/tsconfig.json index 764570cbac..3bbd249dc8 100644 --- a/hapi-auth-jwt2/tsconfig.json +++ b/hapi-auth-jwt2/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", "hapi-auth-jwt2-tests.ts" ] -} +} \ No newline at end of file diff --git a/japanese-holidays/tsconfig.json b/japanese-holidays/tsconfig.json index 49677d134f..11826ce711 100644 --- a/japanese-holidays/tsconfig.json +++ b/japanese-holidays/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", "japanese-holidays-tests.ts" ] -} +} \ No newline at end of file diff --git a/jsonrpc-serializer/tsconfig.json b/jsonrpc-serializer/tsconfig.json index 60a4d45f42..f17f1b210b 100644 --- a/jsonrpc-serializer/tsconfig.json +++ b/jsonrpc-serializer/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", "jsonrpc-serializer-tests.ts" ] -} +} \ No newline at end of file diff --git a/jump.js/tsconfig.json b/jump.js/tsconfig.json index 0c6ab6d7c8..eb922b4eeb 100644 --- a/jump.js/tsconfig.json +++ b/jump.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", "jump.js-tests.ts" ] -} +} \ No newline at end of file diff --git a/leaflet-imageoverlay-rotated/tsconfig.json b/leaflet-imageoverlay-rotated/tsconfig.json index 4a9d4d5049..c6f8181b86 100644 --- a/leaflet-imageoverlay-rotated/tsconfig.json +++ b/leaflet-imageoverlay-rotated/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", "leaflet-imageoverlay-rotated-tests.ts" ] -} +} \ No newline at end of file diff --git a/leaflet.gridlayer.googlemutant/tsconfig.json b/leaflet.gridlayer.googlemutant/tsconfig.json index 2e8651b58b..7001206f48 100644 --- a/leaflet.gridlayer.googlemutant/tsconfig.json +++ b/leaflet.gridlayer.googlemutant/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", "leaflet.gridlayer.googlemutant-tests.ts" ] -} +} \ No newline at end of file diff --git a/leaflet.pm/tsconfig.json b/leaflet.pm/tsconfig.json index 21ac03fd2a..f106913bbd 100644 --- a/leaflet.pm/tsconfig.json +++ b/leaflet.pm/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", "leaflet.pm-tests.ts" ] -} +} \ No newline at end of file diff --git a/lodash-webpack-plugin/tsconfig.json b/lodash-webpack-plugin/tsconfig.json index 03e491ef78..34ca502764 100644 --- a/lodash-webpack-plugin/tsconfig.json +++ b/lodash-webpack-plugin/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, diff --git a/lodash.meanby/tsconfig.json b/lodash.meanby/tsconfig.json index 5692e5627e..92ebbc6458 100644 --- a/lodash.meanby/tsconfig.json +++ b/lodash.meanby/tsconfig.json @@ -4,7 +4,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/lorem-ipsum/tsconfig.json b/lorem-ipsum/tsconfig.json index 7e756f052b..e337082e32 100644 --- a/lorem-ipsum/tsconfig.json +++ b/lorem-ipsum/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", "lorem-ipsum-tests.ts" ] -} +} \ No newline at end of file diff --git a/mock-raf/tsconfig.json b/mock-raf/tsconfig.json index d035910a65..7d4b6c5a8e 100644 --- a/mock-raf/tsconfig.json +++ b/mock-raf/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", - "mock-raf-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", + "mock-raf-tests.ts" + ] } \ No newline at end of file diff --git a/moment-round/tsconfig.json b/moment-round/tsconfig.json index 7054df992f..f0a73e2ecd 100644 --- a/moment-round/tsconfig.json +++ b/moment-round/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", "moment-round-tests.ts" ] -} +} \ No newline at end of file diff --git a/node-waves/tsconfig.json b/node-waves/tsconfig.json index c069824144..793f2d8de3 100644 --- a/node-waves/tsconfig.json +++ b/node-waves/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-waves-tests.ts" ] -} +} \ No newline at end of file diff --git a/ns-api/ns-api-tests.ts b/ns-api/ns-api-tests.ts index 8a3b8c5bb6..6f56cdd875 100644 --- a/ns-api/ns-api-tests.ts +++ b/ns-api/ns-api-tests.ts @@ -1,5 +1,7 @@ import * as NsApi from "ns-api"; +declare var console: { log(msg: any): string }; + let ns: NsApi = NsApi({ username: "", password: "", diff --git a/ns-api/tsconfig.json b/ns-api/tsconfig.json index fae5845b2d..4c5703ed8c 100644 --- a/ns-api/tsconfig.json +++ b/ns-api/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", "ns-api-tests.ts" ] -} +} \ No newline at end of file diff --git a/opener/tsconfig.json b/opener/tsconfig.json index 963f0f48b5..c607aac672 100644 --- a/opener/tsconfig.json +++ b/opener/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", "opener-tests.ts" ] -} +} \ No newline at end of file diff --git a/openfin/v15/index.d.ts b/openfin/v15/index.d.ts index 4350d1ac27..0abaaf61fe 100644 --- a/openfin/v15/index.d.ts +++ b/openfin/v15/index.d.ts @@ -64,7 +64,7 @@ declare namespace fin { */ close(force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; /** - * Retrieves an array of wrapped fin.desktop.Windows for each of the application’s child windows. + * Retrieves an array of wrapped fin.desktop.Windows for each of the application's child windows. */ getChildWindows(callback?: (children: OpenFinWindow[]) => void, errorCallback?: (reason: string) => void): void; /** @@ -96,7 +96,7 @@ declare namespace fin { */ removeEventListener(type: OpenFinApplicationEventType, previouslyRegisteredListener: (event: ApplicationBaseEvent | TrayIconClickedEvent | WindowEvent | WindowAlertRequestedEvent | WindowAuthRequested | WindowNavigationRejectedEvent | WindowEndLoadEvent) => any, callback?: () => void, errorCallback?: (reason: string) => void): void; /** - * Removes the application’s icon from the tray. + * Removes the application's icon from the tray. */ removeTrayIcon(callback?: () => void, errorCallback?: (reason: string) => void): void; /** @@ -273,8 +273,8 @@ declare namespace fin { size?: number; /** * The size in pixels of an additional - * square resizable region located at the - * bottom right corner of a + * square resizable region located at the + * bottom right corner of a * frameless window. (Default: 4) */ bottomRightCorner?: number; @@ -845,11 +845,11 @@ declare namespace fin { 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 @@ -886,7 +886,7 @@ declare namespace fin { * @returns {OpenFinApplication} Parent application */ getParentApplication(): OpenFinApplication; - /** + /** * Gets the parent window. */ getParentWindow(): OpenFinWindow; @@ -912,7 +912,7 @@ declare namespace fin { 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 application’s main window. + * @param {force} Close will be prevented from closing when force is false and 'close-requested' has been subscribed to for application's main window. */ close(force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; /** @@ -932,7 +932,7 @@ declare namespace fin { */ enableFrame(callback?: () => void, errorCallback?: (reason: string) => void): void; /** - * Flashes the window’s frame and taskbar icon until the window is activated. + * Flashes the window's frame and taskbar icon until the window is activated. */ flash(options?: any, callback?: () => void, errorCallback?: (reason: string) => void): void; /** @@ -1029,7 +1029,7 @@ declare namespace fin { 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 application’s main window. + * @param {force} Show will be prevented from closing when force is false and 'show-requested' has been subscribed to for application's main window. */ show(force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; /** diff --git a/openfin/v15/tsconfig.json b/openfin/v15/tsconfig.json index 894da85738..6aee95c58a 100644 --- a/openfin/v15/tsconfig.json +++ b/openfin/v15/tsconfig.json @@ -1,25 +1,28 @@ { - "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" - ] -} + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "paths": { + "openfin": [ + "openfin/v15" + ] + }, + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "openfin-tests.ts" + ] +} \ No newline at end of file diff --git a/payment/index.d.ts b/payment/index.d.ts index e635a19028..33edc3ebe3 100644 --- a/payment/index.d.ts +++ b/payment/index.d.ts @@ -37,7 +37,7 @@ interface Fns { * * laser * * unionpay * * elo - * + * * The function will return null if the card type can't be determined. */ cardType(cardNumber: string): string; diff --git a/payment/tsconfig.json b/payment/tsconfig.json index 0b2323bef2..c284d0d6a4 100644 --- a/payment/tsconfig.json +++ b/payment/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", "payment-tests.ts" ] -} +} \ No newline at end of file diff --git a/progressbar/tsconfig.json b/progressbar/tsconfig.json index 3ee0810c0f..5f8279d45a 100644 --- a/progressbar/tsconfig.json +++ b/progressbar/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", "progressbar-tests.ts" ] -} +} \ No newline at end of file diff --git a/pump/tsconfig.json b/pump/tsconfig.json index b7d71ceb05..80be4c4034 100644 --- a/pump/tsconfig.json +++ b/pump/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", "pump-tests.ts" ] -} +} \ No newline at end of file diff --git a/range-parser/range-parser-tests.ts b/range-parser/range-parser-tests.ts index 77dab456c1..68581e82cb 100644 --- a/range-parser/range-parser-tests.ts +++ b/range-parser/range-parser-tests.ts @@ -1,5 +1,7 @@ import * as RangeParser from 'range-parser'; +declare var console: { assert(b: boolean): void }; + console.assert(RangeParser(200, `malformed`) === RangeParser.Result.invaild); console.assert(RangeParser(200, `bytes=500-20`) === RangeParser.Result.unsatisifiable); diff --git a/range-parser/tsconfig.json b/range-parser/tsconfig.json index 7c7f4ffd03..9fb0a10c5f 100644 --- a/range-parser/tsconfig.json +++ b/range-parser/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", "range-parser-tests.ts" ] -} +} \ No newline at end of file diff --git a/route-parser/tsconfig.json b/route-parser/tsconfig.json index 6f14fe510c..89555e3656 100644 --- a/route-parser/tsconfig.json +++ b/route-parser/tsconfig.json @@ -5,7 +5,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, @@ -17,4 +19,4 @@ "noEmit": true, "forceConsistentCasingInFileNames": true } -} +} \ No newline at end of file diff --git a/semantic-ui/tsconfig.json b/semantic-ui/tsconfig.json index f57f321023..510c5ecd05 100644 --- a/semantic-ui/tsconfig.json +++ b/semantic-ui/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", - "semantic-ui-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", + "semantic-ui-tests.ts" + ] +} \ No newline at end of file diff --git a/spatialite/tsconfig.json b/spatialite/tsconfig.json index 6ad0b96035..ddcef0c7ac 100644 --- a/spatialite/tsconfig.json +++ b/spatialite/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", "spatialite-tests.ts" ] -} +} \ No newline at end of file diff --git a/steed/tsconfig.json b/steed/tsconfig.json index ec8377c527..54a669803d 100644 --- a/steed/tsconfig.json +++ b/steed/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", "steed-tests.ts" ] -} +} \ No newline at end of file diff --git a/strong-cluster-control/index.d.ts b/strong-cluster-control/index.d.ts index e0bb92b82f..5037aed03b 100644 --- a/strong-cluster-control/index.d.ts +++ b/strong-cluster-control/index.d.ts @@ -43,7 +43,7 @@ declare namespace StrongClusterControl { * @description Start the controller * @param [options] - An options object, no default, and options object is not required. * @param [options.size] - Number of workers that should be running, the default is to not control the number of workers - * @param [options.env=null] - Environment properties object passed to cluster.fork() if the controller has to start a worker to resize the cluster, default is null. + * @param [options.env=null] - Environment properties object passed to cluster.fork() if the controller has to start a worker to resize the cluster, default is null. * @param [options.shutdownTimeout=5000] - Number of milliseconds to wait after shutdown before terminating a worker, the default is 5 seconds * @param [options.terminateTimeout=5000] - Number of milliseconds to wait after terminate before killing a worker, the default is 5 seconds * @param [options.throttoleDelay] - Number of milliseconds to delay restarting workers after they are exiting abnormally. Abnormal is defined as as not suicide. diff --git a/strong-cluster-control/tsconfig.json b/strong-cluster-control/tsconfig.json index 3623adaea2..6d625c44b6 100644 --- a/strong-cluster-control/tsconfig.json +++ b/strong-cluster-control/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", "strong-cluster-control-tests.ts" ] -} +} \ No newline at end of file diff --git a/swiper/v2/tsconfig.json b/swiper/v2/tsconfig.json index 963c1c24f6..6ef8f1f2c8 100644 --- a/swiper/v2/tsconfig.json +++ b/swiper/v2/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, diff --git a/vkbeautify/tsconfig.json b/vkbeautify/tsconfig.json index 91709c37ae..2e38ec1be6 100644 --- a/vkbeautify/tsconfig.json +++ b/vkbeautify/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", + "lib": [ + "es6" + ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": false, diff --git a/xdg-basedir/tsconfig.json b/xdg-basedir/tsconfig.json index 44428e6cc7..60be2ca765 100644 --- a/xdg-basedir/tsconfig.json +++ b/xdg-basedir/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", "xdg-basedir-tests.ts" ] -} +} \ No newline at end of file diff --git a/xdg-basedir/xdg-basedir-tests.ts b/xdg-basedir/xdg-basedir-tests.ts index a6b7073c18..35eaa1551f 100644 --- a/xdg-basedir/xdg-basedir-tests.ts +++ b/xdg-basedir/xdg-basedir-tests.ts @@ -1,3 +1,3 @@ import * as xdg from 'xdg-basedir'; -console.log(JSON.stringify(xdg, undefined, 2)); +JSON.stringify(xdg, undefined, 2);