add type define for callsite(https://github.com/tj/callsite)

This commit is contained in:
Ke Peng
2016-02-01 12:02:20 +08:00
parent 6d3c9f422f
commit 8791743f8e
+27
View File
@@ -0,0 +1,27 @@
// Type definitions for callsite 1.0.0
// Project: https://github.com/tj/callsite
// Definitions by: newclear <https://github.com/newclear>
// Definitions: https://github.com/newclear/DefinitelyTyped
declare module "callsite" {
interface CallSite {
getFileName(): string;
getFunctionName(): string;
getScriptNameOrSourceUrl(): string;
getMethodName(): string;
getEvalOrigin(): string;
getTypeName(): string;
getLineNumber(): number;
getColumnNumber(): number;
getFunction(): Function;
getThis(): any;
isNative(): boolean;
isToplevel(): boolean;
isEval(): boolean;
isConstructor(): boolean;
}
function callsiteFunc(): CallSite[];
export = callsiteFunc;
}