Refine the type script definition files

This commit is contained in:
HaiBo Song 2016-09-21 14:44:02 +08:00
Родитель 2f58ea03b4
Коммит 80d5930e6c
11 изменённых файлов: 8630 добавлений и 28022 удалений

14
tsconfig.json Normal file
Просмотреть файл

@ -0,0 +1,14 @@
{
"compilerOptions": {
"target": "es6",
"sourceMap": true,
"outDir": "built",
"noEmitOnError": true,
"module": "commonjs"
},
"exclude": [
"node_modules",
"built",
"docs"
]
}

6
typings.json Normal file
Просмотреть файл

@ -0,0 +1,6 @@
{
"globalDependencies": {
"node": "registry:env/node#0.10.0+20160918225031",
"node-uuid": "registry:dt/node-uuid#0.0.0+20160316155526"
}
}

16541
typings/azure-storage/azure-storage.d.ts поставляемый

Разница между файлами не показана из-за своего большого размера Загрузить разницу

24
typings/globals/node-uuid/index.d.ts поставляемый Normal file
Просмотреть файл

@ -0,0 +1,24 @@
// Generated by typings
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/56295f5058cac7ae458540423c50ac2dcf9fc711/node-uuid/node-uuid.d.ts
declare module __NodeUUID {
/**
* Overloads for node environment
* We need to duplicate some declarations because
* interface merging doesn't work with overloads
*/
interface UUID {
v1(options?: UUIDOptions): string;
v1(options?: UUIDOptions, buffer?: number[], offset?: number): number[];
v1(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer;
v4(options?: UUIDOptions): string;
v4(options?: UUIDOptions, buffer?: number[], offset?: number): number[];
v4(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer;
parse(id: string, buffer?: number[], offset?: number): number[];
parse(id: string, buffer?: Buffer, offset?: number): Buffer;
unparse(buffer: number[], offset?: number): string;
unparse(buffer: Buffer, offset?: number): string;
}
}

Просмотреть файл

@ -0,0 +1,8 @@
{
"resolution": "main",
"tree": {
"src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/56295f5058cac7ae458540423c50ac2dcf9fc711/node-uuid/node-uuid.d.ts",
"raw": "registry:dt/node-uuid#0.0.0+20160316155526",
"typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/56295f5058cac7ae458540423c50ac2dcf9fc711/node-uuid/node-uuid.d.ts"
}
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,13 @@
{
"resolution": "main",
"tree": {
"src": "https://raw.githubusercontent.com/types/env-node/959285e4da295481cf634f7d11f6ccccc863e430/0.10/typings.json",
"raw": "registry:env/node#0.10.0+20160918225031",
"version": "0.10",
"files": [
"node.d.ts"
],
"name": "node",
"type": "typings"
}
}

2
typings/index.d.ts поставляемый Normal file
Просмотреть файл

@ -0,0 +1,2 @@
/// <reference path="globals/node-uuid/index.d.ts" />
/// <reference path="globals/node/index.d.ts" />

18601
typings/lib.es6/lib.es6.d.ts поставляемый

Разница между файлами не показана из-за своего большого размера Загрузить разницу

147
typings/mocha/mocha.d.ts поставляемый
Просмотреть файл

@ -1,147 +0,0 @@
// Type definitions for mocha 2.0.1
// Project: http://mochajs.org/
// Definitions by: Kazi Manzur Rashid <https://github.com/kazimanzurrashid/>, otiai10 <https://github.com/otiai10>, jt000 <https://github.com/jt000>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface Mocha {
// Setup mocha with the given setting options.
setup(options: MochaSetupOptions): Mocha;
//Run tests and invoke `fn()` when complete.
run(callback?: () => void): void;
// Set reporter as function
reporter(reporter: () => void): Mocha;
// Set reporter, defaults to "dot"
reporter(reporter: string): Mocha;
// Enable growl support.
growl(): Mocha
}
interface MochaSetupOptions {
//milliseconds to wait before considering a test slow
slow?: number;
// timeout in milliseconds
timeout?: number;
// ui name "bdd", "tdd", "exports" etc
ui?: string;
//array of accepted globals
globals?: any[];
// reporter instance (function or string), defaults to `mocha.reporters.Dot`
reporter?: any;
// bail on the first test failure
bail?: Boolean;
// ignore global leaks
ignoreLeaks?: Boolean;
// grep string or regexp to filter tests with
grep?: any;
}
interface MochaDone {
(error?: Error): void;
}
declare var mocha: Mocha;
declare var describe : {
(description: string, spec: () => void): void;
only(description: string, spec: () => void): void;
skip(description: string, spec: () => void): void;
timeout(ms: number): void;
}
// alias for `describe`
declare var context : {
(contextTitle: string, spec: () => void): void;
only(contextTitle: string, spec: () => void): void;
skip(contextTitle: string, spec: () => void): void;
timeout(ms: number): void;
}
declare var it: {
(expectation: string, assertion?: () => void): void;
(expectation: string, assertion?: (done: MochaDone) => void): void;
only(expectation: string, assertion?: () => void): void;
only(expectation: string, assertion?: (done: MochaDone) => void): void;
skip(expectation: string, assertion?: () => void): void;
skip(expectation: string, assertion?: (done: MochaDone) => void): void;
timeout(ms: number): void;
};
declare function before(action: () => void): void;
declare function before(action: (done: MochaDone) => void): void;
declare function setup(action: () => void): void;
declare function setup(action: (done: MochaDone) => void): void;
declare function after(action: () => void): void;
declare function after(action: (done: MochaDone) => void): void;
declare function teardown(action: () => void): void;
declare function teardown(action: (done: MochaDone) => void): void;
declare function beforeEach(action: () => void): void;
declare function beforeEach(action: (done: MochaDone) => void): void;
declare function suiteSetup(action: () => void): void;
declare function suiteSetup(action: (done: MochaDone) => void): void;
declare function afterEach(action: () => void): void;
declare function afterEach(action: (done: MochaDone) => void): void;
declare function suiteTeardown(action: () => void): void;
declare function suiteTeardown(action: (done: MochaDone) => void): void;
declare module "mocha" {
class Mocha {
constructor(options?: {
grep?: RegExp;
ui?: string;
reporter?: string;
timeout?: number;
bail?: boolean;
});
bail(value?: boolean): Mocha;
addFile(file: string): Mocha;
reporter(value: string): Mocha;
ui(value: string): Mocha;
grep(value: string): Mocha;
grep(value: RegExp): Mocha;
invert(): Mocha;
ignoreLeaks(value: boolean): Mocha;
checkLeaks(): Mocha;
growl(): Mocha;
globals(value: string): Mocha;
globals(values: string[]): Mocha;
useColors(value: boolean): Mocha;
useInlineDiffs(value: boolean): Mocha;
timeout(value: number): Mocha;
slow(value: number): Mocha;
enableTimeouts(value: boolean): Mocha;
asyncOnly(value: boolean): Mocha;
noHighlighting(value: boolean): Mocha;
run(onComplete?: (failures: number) => void): void;
}
export = Mocha;
}

58
typings/node-uuid/node-uuid.d.ts поставляемый
Просмотреть файл

@ -1,58 +0,0 @@
// Type definitions for node-uuid.js
// Project: https://github.com/broofa/node-uuid
// Definitions by: Jeff May <https://github.com/jeffmay>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
interface UUIDOptions {
/**
* Node id as Array of 6 bytes (per 4.1.6).
* Default: Randomly generated ID. See note 1.
*/
node: any[];
/**
* (Number between 0 - 0x3fff) RFC clock sequence.
* Default: An internally maintained clockseq is used.
*/
clockseq: number;
/**
* (Number | Date) Time in milliseconds since unix Epoch.
* Default: The current time is used.
*/
msecs: any;
/**
* (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if msecs is unspecified.
* Default: internal uuid counter is used, as per 4.2.1.2.
*/
nsecs: number;
}
interface UUID {
v1(options?: UUIDOptions, buffer?: number[], offset?: number): string;
v1(options?: UUIDOptions, buffer?: NodeBuffer, offset?: number): string;
v2(options?: UUIDOptions, buffer?: number[], offset?: number): string;
v2(options?: UUIDOptions, buffer?: NodeBuffer, offset?: number): string;
v3(options?: UUIDOptions, buffer?: number[], offset?: number): string;
v3(options?: UUIDOptions, buffer?: NodeBuffer, offset?: number): string;
v4(options?: UUIDOptions, buffer?: number[], offset?: number): string;
v4(options?: UUIDOptions, buffer?: NodeBuffer, offset?: number): string;
parse(id: string, buffer?: number[], offset?: number): void;
parse(id: string, buffer?: Buffer, offset?: number): void;
unparse(buffer: number[], offset?: number);
unparse(buffer: Buffer, offset?: number);
}
declare module "node-uuid" {
var uuid: UUID;
export = uuid;
}