-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathindex.test-d.ts
21 lines (19 loc) · 901 Bytes
/
index.test-d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import {expectType} from 'tsd';
import callsites, {CallSite} from './index.js';
const callsite = callsites()[0];
expectType<CallSite[]>(callsites());
expectType<unknown | undefined>(callsite.getThis());
expectType<string | null>(callsite.getTypeName());
expectType<string | null>(callsite.getFunctionName());
expectType<string | undefined>(callsite.getMethodName());
expectType<string | null>(callsite.getFileName());
expectType<number | null>(callsite.getLineNumber());
expectType<number | null>(callsite.getColumnNumber());
expectType<string | undefined>(callsite.getEvalOrigin());
expectType<boolean>(callsite.isToplevel());
expectType<boolean>(callsite.isEval());
expectType<boolean>(callsite.isNative());
expectType<boolean>(callsite.isConstructor());
expectType<boolean>(callsite.isAsync());
expectType<boolean>(callsite.isPromiseAll());
expectType<number | null>(callsite.getPromiseIndex());