forked from typescript-eslint/typescript-eslint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
typescript.d.ts
33 lines (30 loc) · 870 Bytes
/
typescript.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import 'typescript';
declare module 'typescript' {
interface TypeChecker {
// internal TS APIs
/**
* @returns `true` if the given type is an array type:
* - `Array<foo>`
* - `ReadonlyArray<foo>`
* - `foo[]`
* - `readonly foo[]`
*/
isArrayType(type: Type): type is TypeReference;
/**
* @returns `true` if the given type is a tuple type:
* - `[foo]`
* - `readonly [foo]`
*/
isTupleType(type: Type): type is TupleTypeReference;
/**
* Return the type of the given property in the given type, or undefined if no such property exists
*/
getTypeOfPropertyOfType(type: Type, propertyName: string): Type | undefined;
}
interface Type {
/**
* If the type is `any`, and this is set to "error", then TS was unable to resolve the type
*/
intrinsicName?: string;
}
}