Home
last modified time | relevance | path

Searched refs:typeAnnotation (Results 1 – 25 of 238) sorted by relevance

12345678910

/third_party/typescript_eslint/packages/typescript-estree/tests/ast-alignment/
Dutils.ts69 if (node.typeAnnotation) {
70 node.returnType = node.typeAnnotation;
71 delete node.typeAnnotation;
82 if (node.typeAnnotation) {
83 node.returnType = node.typeAnnotation;
84 delete node.typeAnnotation;
95 if (node.typeAnnotation) {
96 node.returnType = node.typeAnnotation;
97 delete node.typeAnnotation;
108 if (node.typeAnnotation) {
[all …]
/third_party/typescript_eslint/packages/eslint-plugin/src/rules/
Dunified-signatures.ts100 ? p0.parameter.typeAnnotation
101 : p0.typeAnnotation;
103 ? p1.parameter.typeAnnotation
104 : p1.typeAnnotation;
111 type1: sourceCode.getText(typeAnnotation0?.typeAnnotation),
112 type2: sourceCode.getText(typeAnnotation1?.typeAnnotation),
280 ? sig1i.parameter.typeAnnotation
281 : sig1i.typeAnnotation;
283 ? sig2i.parameter.typeAnnotation
284 : sig2i.typeAnnotation;
[all …]
Dprefer-as-const.ts67 compareTypes(node.expression, node.typeAnnotation, true);
70 compareTypes(node.expression, node.typeAnnotation, true);
73 if (node.init && node.id.typeAnnotation) {
74 compareTypes(node.init, node.id.typeAnnotation.typeAnnotation, false);
Dtypedef.ts128 if (annotationNode !== undefined && !annotationNode.typeAnnotation) {
146 node.parent.typeAnnotation
152 !node.typeAnnotation &&
170 !node.typeAnnotation
190 !node.typeAnnotation &&
199 if (options[OptionKeys.PropertyDeclaration] && !node.typeAnnotation) {
211 node.id.typeAnnotation ||
Dno-implicit-any-catch.ts58 if (!node.param.typeAnnotation) {
73 node.param.typeAnnotation.typeAnnotation.type ===
84 node.param!.typeAnnotation!,
Dno-inferrable-types.ts203 if (!typeNode || !initNode || !typeNode.typeAnnotation) {
207 if (!isInferrable(typeNode.typeAnnotation, initNode)) {
212 typeNode.typeAnnotation.type === AST_NODE_TYPES.TSTypeReference
215 : keywordMap[typeNode.typeAnnotation.type];
233 reportInferrableType(node, node.id.typeAnnotation, node.init);
251 reportInferrableType(param, param.left.typeAnnotation, param.right);
263 reportInferrableType(node, node.typeAnnotation, node.value);
Dno-type-alias.ts196 type.node.typeAnnotation &&
197 type.node.typeAnnotation.type === AST_NODE_TYPES.TSTupleType
268 type.node.typeAnnotation &&
269 aliasTypes.has(type.node.typeAnnotation.type))
296 return getTypes(node.typeAnnotation, compositionType);
303 const types = getTypes(node.typeAnnotation);
Dtype-annotation-spacing.ts165 typeAnnotation: TSESTree.TypeNode,
167 const nextToken = typeAnnotation;
177 const { before, after } = getRules(ruleSet, typeAnnotation);
254 if (node.typeAnnotation) {
255 checkTypeAnnotationSpacing(node.typeAnnotation);
259 checkTypeAnnotationSpacing(node.typeAnnotation);
Dconsistent-indexed-object-style.ts88 const keyType = parameter.typeAnnotation;
93 const valueType = member.typeAnnotation;
102 const key = sourceCode.getText(keyType.typeAnnotation);
103 const value = sourceCode.getText(valueType.typeAnnotation);
Dconsistent-type-assertions.ts92 if (isConst(node.typeAnnotation)) {
103 ? { cast: sourceCode.getText(node.typeAnnotation) }
150 checkType(node.typeAnnotation) &&
/third_party/typescript_eslint/packages/scope-manager/src/referencer/
DTypeVisitor.ts47 if (pattern.typeAnnotation) {
48 this.visit(pattern.typeAnnotation);
55 this.visit(param.typeAnnotation);
122 this.visit(param.typeAnnotation);
125 this.visit(node.typeAnnotation);
207 this.visit(node.typeAnnotation);
228 this.visit(node.typeAnnotation);
248 this.visit(node.typeAnnotation);
/third_party/typescript_eslint/packages/typescript-estree/tests/snapshots/typescript/types/
Dconstructor.src.ts.shot26 "typeAnnotation": Object {
42 "typeAnnotation": Object {
71 "typeAnnotation": Object {
87 "typeAnnotation": Object {
124 "typeAnnotation": Object {
140 "typeAnnotation": Object {
180 "typeAnnotation": Object {
Dfunction.src.ts.shot26 "typeAnnotation": Object {
42 "typeAnnotation": Object {
71 "typeAnnotation": Object {
87 "typeAnnotation": Object {
124 "typeAnnotation": Object {
140 "typeAnnotation": Object {
180 "typeAnnotation": Object {
Dtype-operator.src.ts.shot26 "typeAnnotation": Object {
42 "typeAnnotation": Object {
59 "typeAnnotation": Object {
153 "typeAnnotation": Object {
169 "typeAnnotation": Object {
186 "typeAnnotation": Object {
Dfunction-with-this.src.ts.shot26 "typeAnnotation": Object {
42 "typeAnnotation": Object {
71 "typeAnnotation": Object {
87 "typeAnnotation": Object {
127 "typeAnnotation": Object {
Dindex-signature.src.ts.shot40 "typeAnnotation": Object {
81 "typeAnnotation": Object {
97 "typeAnnotation": Object {
122 "typeAnnotation": Object {
138 "typeAnnotation": Object {
Dindex-signature-readonly.src.ts.shot40 "typeAnnotation": Object {
81 "typeAnnotation": Object {
97 "typeAnnotation": Object {
123 "typeAnnotation": Object {
139 "typeAnnotation": Object {
/third_party/typescript_eslint/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/
Dindex-signature-parameters.src.ts.shot40 "typeAnnotation": Object {
81 "typeAnnotation": Object {
97 "typeAnnotation": Object {
133 "typeAnnotation": Object {
149 "typeAnnotation": Object {
174 "typeAnnotation": Object {
190 "typeAnnotation": Object {
/third_party/typescript_eslint/packages/eslint-plugin/src/util/
DexplicitReturnTypeUtils.ts84 node.type === AST_NODE_TYPES.VariableDeclarator && !!node.id.typeAnnotation
97 return node.type === AST_NODE_TYPES.ClassProperty && !!node.typeAnnotation;
216 const { typeAnnotation } = body; constant
217 if (typeAnnotation.type === AST_NODE_TYPES.TSTypeReference) {
218 const { typeName } = typeAnnotation;
/third_party/typescript_eslint/packages/types/src/
Dts-estree.ts608 typeAnnotation?: TSTypeAnnotation; property
738 typeAnnotation?: TSTypeAnnotation; property
765 typeAnnotation?: TSTypeAnnotation; property
807 typeAnnotation?: TSTypeAnnotation; property
980 typeAnnotation?: TSTypeAnnotation; property
1158 typeAnnotation?: TSTypeAnnotation; property
1189 typeAnnotation?: TSTypeAnnotation; property
1305 typeAnnotation: TypeNode; property
1429 typeAnnotation?: TSTypeAnnotation; property
1476 typeAnnotation?: TypeNode; property
[all …]
/third_party/typescript_eslint/packages/typescript-estree/tests/snapshots/typescript/basics/
Dclass-with-declare-properties.src.ts.shot47 "typeAnnotation": Object {
63 "typeAnnotation": Object {
122 "typeAnnotation": Object {
138 "typeAnnotation": Object {
196 "typeAnnotation": Object {
212 "typeAnnotation": Object {
270 "typeAnnotation": Object {
286 "typeAnnotation": Object {
345 "typeAnnotation": Object {
361 "typeAnnotation": Object {
[all …]
Dcall-signatures.src.ts.shot40 "typeAnnotation": Object {
81 "typeAnnotation": Object {
97 "typeAnnotation": Object {
137 "typeAnnotation": Object {
186 "typeAnnotation": Object {
202 "typeAnnotation": Object {
242 "typeAnnotation": Object {
Dtyped-this.src.ts.shot57 "typeAnnotation": Object {
73 "typeAnnotation": Object {
102 "typeAnnotation": Object {
118 "typeAnnotation": Object {
154 "typeAnnotation": Object {
170 "typeAnnotation": Object {
229 "typeAnnotation": Object {
272 "typeAnnotation": Object {
Dabstract-class-with-declare-properties.src.ts.shot48 "typeAnnotation": Object {
64 "typeAnnotation": Object {
122 "typeAnnotation": Object {
138 "typeAnnotation": Object {
197 "typeAnnotation": Object {
213 "typeAnnotation": Object {
271 "typeAnnotation": Object {
287 "typeAnnotation": Object {
346 "typeAnnotation": Object {
362 "typeAnnotation": Object {
Dvar-with-definite-assignment.src.ts.shot27 "typeAnnotation": Object {
43 "typeAnnotation": Object {
118 "typeAnnotation": Object {
134 "typeAnnotation": Object {
209 "typeAnnotation": Object {
225 "typeAnnotation": Object {

12345678910