1 | import ts from 'typescript';
|
2 | declare type TypedNode = ts.Node & {
|
3 | readonly type?: ts.TypeNode;
|
4 | };
|
5 | declare type MaybeTypedNode = ts.Node & {
|
6 | readonly type?: ts.TypeNode;
|
7 | };
|
8 | export declare function getTypeNode(node: TypedNode): ts.TypeNode;
|
9 | export declare function getTypeNode(node: MaybeTypedNode): ts.TypeNode | undefined;
|
10 | export declare function getTypeNodeOrThrow(node: MaybeTypedNode): ts.TypeNode;
|
11 | export declare function getContextualType(typeChecker: ts.TypeChecker, node: ts.Expression): ts.Type | undefined;
|
12 | export declare function getTypeFromTypeNode(typeChecker: ts.TypeChecker, typeNode: ts.TypeNode): ts.Type;
|
13 | export declare function getType(typeChecker: ts.TypeChecker, node: ts.Node): ts.Type;
|
14 | export declare function getConstraint(type: ts.Type): ts.Type | undefined;
|
15 | export declare function getTypeAtLocation(typeChecker: ts.TypeChecker, symbol: ts.Symbol, node: ts.Node): ts.Type;
|
16 | export declare function typeToTypeNode(typeChecker: ts.TypeChecker, type: ts.Type, node?: ts.Declaration): ts.TypeNode | undefined;
|
17 | export declare function typeToTypeNodeOrThrow(typeChecker: ts.TypeChecker, type: ts.Type, node?: ts.Declaration): ts.TypeNode;
|
18 | export declare function getSymbol(type: ts.Type): ts.Symbol | undefined;
|
19 | export declare function getAliasSymbol(type: ts.Type): ts.Symbol | undefined;
|
20 | export declare function getAliasTypeArguments(type: ts.Type): readonly ts.Type[] | undefined;
|
21 | export declare function getAliasTypeArgumentsArray(type: ts.Type): readonly ts.Type[];
|
22 | export declare function getSymbolOrThrow(type: ts.Type): ts.Symbol;
|
23 | export declare function getProperties(type: ts.Type): readonly ts.Symbol[];
|
24 | export declare function getConstructSignatures(type: ts.Type): readonly ts.Signature[];
|
25 | export declare function getProperty(type: ts.Type, name: string): ts.Symbol | undefined;
|
26 | export declare function getText(typeChecker: ts.TypeChecker, type: ts.Type, node?: ts.Node, flags?: ts.TypeFormatFlags): string;
|
27 | export declare function getBaseTypes(type: ts.Type): readonly ts.Type[] | undefined;
|
28 | export declare function getBaseTypesArray(type: ts.Type): readonly ts.Type[];
|
29 | export declare function getAllTypes(type: ts.Type): readonly ts.Type[];
|
30 | export declare function getTypes(type: ts.Type, isType: (type: ts.Type) => boolean): readonly ts.Type[];
|
31 | export declare function isSymbolic(type: ts.Type): boolean;
|
32 | export declare function isObjectType(type: ts.Type): type is ts.ObjectType;
|
33 | export declare function isTypeReference(type: ts.Type): type is ts.TypeReference;
|
34 | export declare function isTupleType(type: ts.Type): type is ts.TupleType;
|
35 | export declare function isTuple(type: ts.Type): type is ts.TupleTypeReference;
|
36 | export declare function hasTuple(type: ts.Type): boolean;
|
37 | export declare function getTupleTypes(type: ts.Type): readonly ts.Type[];
|
38 | export declare function getTupleElements(type: ts.Type): readonly ts.Type[] | undefined;
|
39 | export declare function getTypeArguments(type: ts.Type): readonly ts.Type[] | undefined;
|
40 | export declare function getTypeArgumentsArray(type: ts.Type): readonly ts.Type[];
|
41 | export declare function getTypeArgumentsOrThrow(type: ts.Type): readonly ts.Type[];
|
42 | export declare function isAny(type: ts.Type): boolean;
|
43 | export declare function isErrorType(type: ts.Type): boolean;
|
44 | export declare function isUnion(type: ts.Type): type is ts.UnionType;
|
45 | export declare function getUnionTypes(type: ts.Type): readonly ts.Type[] | undefined;
|
46 | export declare function getUnionTypesArray(type: ts.Type): readonly ts.Type[];
|
47 | export declare function isIntersection(type: ts.Type): type is ts.IntersectionType;
|
48 | export declare function getIntersectionTypes(type: ts.Type): readonly ts.Type[] | undefined;
|
49 | export declare function getIntersectionTypesArray(type: ts.Type): readonly ts.Type[];
|
50 | export declare function hasUnionType(type: ts.Type, isType: (type: ts.Type) => boolean): boolean;
|
51 | export declare function hasIntersectionType(type: ts.Type, isType: (type: ts.Type) => boolean): boolean;
|
52 | export declare function hasType(type: ts.Type, isType: (type: ts.Type) => boolean): boolean;
|
53 | export declare function isOnlyType(type: ts.Type, isType: (type: ts.Type) => boolean): boolean;
|
54 | export declare function isSame(a: ts.Type | undefined, b: ts.Type | undefined): boolean;
|
55 | export declare function isOnly(type: ts.Type): boolean;
|
56 | export declare function isNull(type: ts.Type): boolean;
|
57 | export declare function isOnlyNull(type: ts.Type): boolean;
|
58 | export declare function hasNull(type: ts.Type): boolean;
|
59 | export declare function isUndefined(type: ts.Type): boolean;
|
60 | export declare function isOnlyUndefined(type: ts.Type): boolean;
|
61 | export declare function hasUndefined(type: ts.Type): boolean;
|
62 | export declare function isUndefinedish(type: ts.Type): boolean;
|
63 | export declare function isOnlyUndefinedish(type: ts.Type): boolean;
|
64 | export declare function hasUndefinedish(type: ts.Type): boolean;
|
65 | export declare function isNullable(type: ts.Type): boolean;
|
66 | export declare function isNumber(type: ts.Type): boolean;
|
67 | export declare function isOnlyNumber(type: ts.Type): boolean;
|
68 | export declare function hasNumber(type: ts.Type): boolean;
|
69 | export declare function isNumberLike(type: ts.Type): boolean;
|
70 | export declare function isOnlyNumberLike(type: ts.Type): boolean;
|
71 | export declare function hasNumberLike(type: ts.Type): boolean;
|
72 | export declare function isNumberLiteral(type: ts.Type): boolean;
|
73 | export declare function isOnlyNumberLiteral(type: ts.Type): boolean;
|
74 | export declare function hasNumberLiteral(type: ts.Type): boolean;
|
75 | export declare function isNumberish(type: ts.Type): boolean;
|
76 | export declare function isOnlyNumberish(type: ts.Type): boolean;
|
77 | export declare function hasNumberish(type: ts.Type): boolean;
|
78 | export declare function isString(type: ts.Type): boolean;
|
79 | export declare function isOnlyString(type: ts.Type): boolean;
|
80 | export declare function hasString(type: ts.Type): boolean;
|
81 | export declare function isStringLike(type: ts.Type): boolean;
|
82 | export declare function isOnlyStringLike(type: ts.Type): boolean;
|
83 | export declare function hasStringLike(type: ts.Type): boolean;
|
84 | export declare function isStringLiteral(type: ts.Type): boolean;
|
85 | export declare function isOnlyStringLiteral(type: ts.Type): boolean;
|
86 | export declare function hasStringLiteral(type: ts.Type): boolean;
|
87 | export declare function isStringish(type: ts.Type): boolean;
|
88 | export declare function isOnlyStringish(type: ts.Type): boolean;
|
89 | export declare function hasStringish(type: ts.Type): boolean;
|
90 | export declare function isBoolean(type: ts.Type): boolean;
|
91 | export declare function isOnlyBoolean(type: ts.Type): boolean;
|
92 | export declare function hasBoolean(type: ts.Type): boolean;
|
93 | export declare function isBooleanLike(type: ts.Type): boolean;
|
94 | export declare function isOnlyBooleanLike(type: ts.Type): boolean;
|
95 | export declare function hasBooleanLike(type: ts.Type): boolean;
|
96 | export declare function isBooleanLiteral(type: ts.Type): boolean;
|
97 | export declare function isOnlyBooleanLiteral(type: ts.Type): boolean;
|
98 | export declare function hasBooleanLiteral(type: ts.Type): boolean;
|
99 | export declare function isBooleanFalse(type: ts.Type): boolean;
|
100 | export declare function isOnlyBooleanFalse(type: ts.Type): boolean;
|
101 | export declare function hasBooleanFalse(type: ts.Type): boolean;
|
102 | export declare function isBooleanish(type: ts.Type): boolean;
|
103 | export declare function isOnlyBooleanish(type: ts.Type): boolean;
|
104 | export declare function hasBooleanish(type: ts.Type): boolean;
|
105 | export declare function isSymbol(type: ts.Type): boolean;
|
106 | export declare function isOnlySymbol(type: ts.Type): boolean;
|
107 | export declare function hasSymbol(type: ts.Type): boolean;
|
108 | export declare function isSymbolLike(type: ts.Type): boolean;
|
109 | export declare function isOnlySymbolLike(type: ts.Type): boolean;
|
110 | export declare function hasSymbolLike(type: ts.Type): boolean;
|
111 | export declare function isSymbolish(type: ts.Type): boolean;
|
112 | export declare function isOnlySymbolish(type: ts.Type): boolean;
|
113 | export declare function hasSymbolish(type: ts.Type): boolean;
|
114 | export declare function isPrimitive(type: ts.Type): boolean;
|
115 | export declare function isOnlyPrimitive(type: ts.Type): boolean;
|
116 | export declare function hasPrimitive(type: ts.Type): boolean;
|
117 | export declare function isPrimitiveLike(type: ts.Type): boolean;
|
118 | export declare function isOnlyPrimitiveLike(type: ts.Type): boolean;
|
119 | export declare function hasPrimitiveLike(type: ts.Type): boolean;
|
120 | export declare function isPrimitiveish(type: ts.Type): boolean;
|
121 | export declare function isOnlyPrimitiveish(type: ts.Type): boolean;
|
122 | export declare function hasPrimitiveish(type: ts.Type): boolean;
|
123 | export declare function isOnlyObject(type: ts.Type): boolean;
|
124 | export declare function isArray(type: ts.Type): boolean;
|
125 | export declare function isOnlyArray(type: ts.Type): boolean;
|
126 | export declare function hasArray(type: ts.Type): boolean;
|
127 | export declare function isArrayish(type: ts.Type): boolean;
|
128 | export declare function isOnlyArrayish(type: ts.Type): boolean;
|
129 | export declare function hasArrayish(type: ts.Type): boolean;
|
130 | export declare function getArrayType(type: ts.Type): ts.Type | undefined;
|
131 | export declare function getArrayTypeOrThrow(type: ts.Type): ts.Type;
|
132 | export declare function getArrayTypes(type: ts.Type): readonly ts.Type[];
|
133 | export declare function isVoid(type: ts.Type): boolean;
|
134 | export declare function isOnlyVoid(type: ts.Type): boolean;
|
135 | export declare function hasVoid(type: ts.Type): boolean;
|
136 | export declare function isVoidish(type: ts.Type): boolean;
|
137 | export declare function isOnlyVoidish(type: ts.Type): boolean;
|
138 | export declare function hasVoidish(type: ts.Type): boolean;
|
139 | export declare function getCallSignatures(type: ts.Type): readonly ts.Signature[];
|
140 | export declare function getNonNullableType(type: ts.Type): ts.Type;
|
141 | export declare function filterUnion(checker: ts.TypeChecker, type: ts.Type, filter: (type: ts.Type) => boolean): ts.Type;
|
142 | export {};
|