Merge branch 'master' into node_urlUrl

This commit is contained in:
Flarna 2017-02-15 21:12:06 +01:00
commit 5d3d2487b8
49 changed files with 424 additions and 174 deletions

View File

@ -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);

View File

@ -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"
]
}
}

View File

@ -1,21 +1,22 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"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"
]
}

View File

@ -1,3 +1,6 @@
{
"extends": "../tslint.json"
"extends": "../tslint.json",
"rules": {
"no-misused-new": false
}
}

View File

@ -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"
]
}
}

View File

@ -1,21 +1,22 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": ["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"
]
}

View File

@ -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"
]
}
}

View File

@ -1,7 +1,10 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,

View File

@ -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"
]
}
}

View File

@ -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"
]
}
}

View File

@ -1,8 +1,9 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": ["es6"],
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,

View File

@ -1,8 +1,9 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": ["es6"],
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,

View File

@ -1,8 +1,9 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": ["es6"],
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,

View File

@ -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"
]
}
}

View File

@ -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"
]
}
}

View File

@ -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"
]
}
}

View File

@ -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"
]
}
}

View File

@ -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"
]
}
}

View File

@ -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"
]
}
}

View File

@ -1,8 +1,9 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": ["es6"],
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,

View File

@ -4,7 +4,9 @@
],
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,

View File

@ -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"
]
}
}

View File

@ -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"
]
}

107
modesl/index.d.ts vendored Normal file
View File

@ -0,0 +1,107 @@
// Type definitions for modesl 1.1
// Project: https://github.com/englercj/node-esl
// Definitions by: Nischit Ranganath <https://github.com/neeschit>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
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 readonly 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;

34
modesl/modesl-tests.ts Normal file
View File

@ -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;
});
});
});

21
modesl/tsconfig.json Normal file
View File

@ -0,0 +1,21 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"modesl-tests.ts"
]
}

1
modesl/tslint.json Normal file
View File

@ -0,0 +1 @@
{ "extends": "../tslint.json" }

View File

@ -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"
]
}
}

View File

@ -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"
]
}
}

View File

@ -1,5 +1,7 @@
import * as NsApi from "ns-api";
declare var console: { log(msg: any): string };
let ns: NsApi = NsApi({
username: "",
password: "",

View File

@ -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"
]
}
}

View File

@ -1,8 +1,9 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": ["es6"],
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,

View File

@ -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 applications 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 applications 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 applications 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 windows 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 applications 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;
/**

View File

@ -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"
]
}

2
payment/index.d.ts vendored
View File

@ -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;

View File

@ -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"
]
}
}

View File

@ -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"
]
}
}

View File

@ -1,8 +1,9 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": ["es6"],
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,

View File

@ -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);

View File

@ -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"
]
}
}

View File

@ -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
}
}
}

View File

@ -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"
]
}

View File

@ -1,8 +1,9 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": ["es6"],
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,

View File

@ -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"
]
}
}

View File

@ -1,8 +1,9 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": ["es6"],
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,

View File

@ -1,7 +1,10 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": false,
"strictNullChecks": false,

View File

@ -1,7 +1,9 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,

View File

@ -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"
]
}
}

View File

@ -1,3 +1,3 @@
import * as xdg from 'xdg-basedir';
console.log(JSON.stringify(xdg, undefined, 2));
JSON.stringify(xdg, undefined, 2);