mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
change any to union types
This commit is contained in:
6
bootbox/bootbox.d.ts
vendored
6
bootbox/bootbox.d.ts
vendored
@@ -26,8 +26,8 @@ interface BootboxButton {
|
||||
}
|
||||
|
||||
interface BootboxDialogOptions {
|
||||
message: any; // String | Element
|
||||
title?: any; // String | Element
|
||||
message: string | Element
|
||||
title?: string | Element
|
||||
callback?: (result: boolean) => any;
|
||||
show?: boolean;
|
||||
onEscape?: () => any;
|
||||
@@ -60,4 +60,4 @@ interface BootboxStatic {
|
||||
hideAll(): void;
|
||||
}
|
||||
|
||||
declare var bootbox: BootboxStatic;
|
||||
declare var bootbox: BootboxStatic;
|
||||
|
||||
10
bunyan/bunyan.d.ts
vendored
10
bunyan/bunyan.d.ts
vendored
@@ -18,8 +18,8 @@ declare module "bunyan" {
|
||||
child(obj:Object, simple?:boolean):Logger;
|
||||
reopenFileStreams():void;
|
||||
|
||||
level(value:any /* number | string */):void;
|
||||
levels(name:any /* number | string */, value:any /* number | string */):void;
|
||||
level(value: number | string):void;
|
||||
levels(name: number | string, value: number | string):void;
|
||||
|
||||
trace(error:Error, format?:any, ...params:any[]):void;
|
||||
trace(buffer:Buffer, format?:any, ...params:any[]):void;
|
||||
@@ -62,9 +62,9 @@ declare module "bunyan" {
|
||||
|
||||
interface Stream {
|
||||
type?: string;
|
||||
level?: any; // number | string
|
||||
level?: number | string;
|
||||
path?: string;
|
||||
stream?: any; // WritableStream | Stream;
|
||||
stream?: WritableStream | Stream;
|
||||
closeOnExit?: boolean;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ declare module "bunyan" {
|
||||
export var ERROR:number;
|
||||
export var FATAL:number;
|
||||
|
||||
export function resolveLevel(value:any /* number | string */):number;
|
||||
export function resolveLevel(value: number | string):number;
|
||||
|
||||
export function createLogger(options:LoggerOptions):Logger;
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ declare module spiderMonkeyParserAPI {
|
||||
params: Pattern[];
|
||||
defaults: Expression[];
|
||||
rest?: Identifier;
|
||||
body?: any; // BlockStatement | Expression;
|
||||
body?: BlockStatement | Expression;
|
||||
generator: boolean;
|
||||
expression: boolean;
|
||||
}
|
||||
@@ -74,7 +74,7 @@ declare module spiderMonkeyParserAPI {
|
||||
* An empty statement, i.e., a solitary semicolon.
|
||||
*/
|
||||
interface EmptyStatement extends Statement {
|
||||
type: string; //"EmptyStatement";
|
||||
type: string; // "EmptyStatement";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -190,7 +190,7 @@ declare module spiderMonkeyParserAPI {
|
||||
*/
|
||||
interface ForStatement extends Statement {
|
||||
type: string; // "ForStatement";
|
||||
init?: any; // VariableDeclaration | Expression;
|
||||
init?: VariableDeclaration | Expression;
|
||||
test?: Expression;
|
||||
update?: Expression;
|
||||
body: Statement;
|
||||
@@ -201,7 +201,7 @@ declare module spiderMonkeyParserAPI {
|
||||
*/
|
||||
interface ForInStatement extends Statement {
|
||||
type: string; // "ForInStatement";
|
||||
left: any; // VariableDeclaration | Expression;
|
||||
left: VariableDeclaration | Expression;
|
||||
right: Expression;
|
||||
body: Statement;
|
||||
each: boolean;
|
||||
@@ -212,7 +212,7 @@ declare module spiderMonkeyParserAPI {
|
||||
*/
|
||||
interface ForOfStatement extends Statement {
|
||||
type: string; // "ForOfStatement";
|
||||
left: any; // VariableDeclaration | Expression;
|
||||
left: VariableDeclaration | Expression;
|
||||
right: Expression;
|
||||
body: Statement;
|
||||
}
|
||||
@@ -248,7 +248,7 @@ declare module spiderMonkeyParserAPI {
|
||||
params: Pattern[];
|
||||
defaults: Expression[];
|
||||
rest?: Identifier;
|
||||
body: any; // BlockStatement | Expression;
|
||||
body: BlockStatement | Expression;
|
||||
generator: boolean;
|
||||
expression: boolean;
|
||||
}
|
||||
@@ -307,7 +307,7 @@ declare module spiderMonkeyParserAPI {
|
||||
*/
|
||||
interface Property extends Node {
|
||||
type: string; // "Property";
|
||||
key: any; // Literal | Identifier;
|
||||
key: Literal | Identifier;
|
||||
value: Expression;
|
||||
kind: string; // "init" | "get" | "set";
|
||||
}
|
||||
@@ -321,7 +321,7 @@ declare module spiderMonkeyParserAPI {
|
||||
params: Pattern[];
|
||||
defaults: Expression[];
|
||||
rest?: Identifier;
|
||||
body: any; // BlockStatement | Expression;
|
||||
body: BlockStatement | Expression;
|
||||
generator: boolean;
|
||||
expression: boolean;
|
||||
}
|
||||
@@ -334,7 +334,7 @@ declare module spiderMonkeyParserAPI {
|
||||
params: Pattern[];
|
||||
defaults: Expression[];
|
||||
rest?: Identifier;
|
||||
body: any; // BlockStatement | Expression;
|
||||
body: BlockStatement | Expression;
|
||||
generator: boolean;
|
||||
expression: boolean;
|
||||
}
|
||||
@@ -433,7 +433,7 @@ declare module spiderMonkeyParserAPI {
|
||||
interface MemberExpression extends Expression {
|
||||
type: string; // "MemberExpression";
|
||||
object: Expression;
|
||||
property: any; // Identifier | Expression;
|
||||
property: Identifier | Expression;
|
||||
computed: boolean;
|
||||
}
|
||||
|
||||
@@ -510,7 +510,7 @@ declare module spiderMonkeyParserAPI {
|
||||
*/
|
||||
interface ObjectPattern extends Pattern {
|
||||
type: string; // "ObjectPattern";
|
||||
properties: {key: any /* Literal | Identifier */; value: Pattern;}[]; // [ { key: Literal | Identifier, value: Pattern } ];
|
||||
properties: {key: Literal | Identifier; value: Pattern;}[]; // [ { key: Literal | Identifier, value: Pattern } ];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -565,8 +565,7 @@ declare module spiderMonkeyParserAPI {
|
||||
*/
|
||||
interface Literal extends Node, Expression {
|
||||
type: string; // "Literal";
|
||||
// TODO union types
|
||||
value: any; // string | boolean | null | number | RegExp;
|
||||
value?: string | boolean | number | RegExp;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
2
nexpect/nexpect.d.ts
vendored
2
nexpect/nexpect.d.ts
vendored
@@ -21,7 +21,7 @@ declare module "nexpect" {
|
||||
wait(expectation:RegExp):IChain;
|
||||
sendline(line:string):IChain;
|
||||
sendEof():IChain;
|
||||
run(callback:(err:Error, output:string[], exit:any /* string | number */)=>void):child_process.ChildProcess;
|
||||
run(callback:(err:Error, output:string[], exit: string | number)=>void):child_process.ChildProcess;
|
||||
}
|
||||
|
||||
interface ISpawnOptions {
|
||||
|
||||
Reference in New Issue
Block a user