Home
last modified time | relevance | path

Searched refs:typeNode (Results 1 – 24 of 24) sorted by relevance

/third_party/typescript/src/services/codefixes/
DfixJSDocTypes.ts13 const { typeNode, type } = info; constant
14 const original = typeNode.getText(sourceFile);
16 if (typeNode.kind === SyntaxKind.JSDocNullableType) {
24 …s = textChanges.ChangeTracker.with(context, t => doChange(t, sourceFile, typeNode, type, checker));
35 const { typeNode, type } = info; constant
36 …const fixedType = typeNode.kind === SyntaxKind.JSDocNullableType && fixId === fixIdNullable ? chec…
37 doChange(changes, sourceFile, typeNode, fixedType, checker);
46 …(sourceFile: SourceFile, pos: number, checker: TypeChecker): { readonly typeNode: TypeNode, readon…
48 const typeNode = decl && decl.type; constant
49 return typeNode && { typeNode, type: checker.getTypeFromTypeNode(typeNode) };
Dhelpers.ts54 …let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithR…
56 … const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget);
58 typeNode = importableReference.typeNode;
67 typeNode,
72 …let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, /*flags*/ undefined, getNoopSymb…
78 … const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget);
80 typeNode = importableReference.typeNode;
91 typeNode,
102 … createDummyParameters(1, [parameterName], [typeNode], 1, /*inJs*/ false),
184 constraint = importableReference.typeNode;
[all …]
DconvertLiteralTypeToMappedType.ts29 typeNode: TypeNode | undefined; property
41 typeNode: propertySignature.type,
49 …hanges: textChanges.ChangeTracker, sourceFile: SourceFile, { container, typeNode, constraint, name…
51 …ateTypeReferenceNode(constraint)), /*nameType*/ undefined, /*questionToken*/ undefined, typeNode));
DfixAddMissingMember.ts85 … const typeNode = getTypeNode(program.getTypeChecker(), parentDeclaration, token); constant
86 …ertyDeclaration(changes, declSourceFile, parentDeclaration, token.text, typeNode, modifierFlags & …
257 const typeNode = getTypeNode(context.program.getTypeChecker(), parentDeclaration, token); constant
258 …addPropertyDeclaration(t, declSourceFile, parentDeclaration, memberName, typeNode, modifierFlags));
269 …h(createAddIndexSignatureAction(context, declSourceFile, parentDeclaration, token.text, typeNode));
274 let typeNode: TypeNode | undefined;
279 typeNode = checker.typeToTypeNode(widenedType, classDeclaration, /*flags*/ undefined);
283typeNode = contextualType ? checker.typeToTypeNode(contextualType, /*enclosingDeclaration*/ undefi…
285 return typeNode || factory.createKeywordTypeNode(SyntaxKind.AnyKeyword);
288 …ile: SourceFile, classDeclaration: ClassOrInterface, tokenName: string, typeNode: TypeNode, modifi…
[all …]
DinferFromUsage.ts128 const typeNode = getTypeNodeIfAccessible(type, parent, program, host); constant
129 if (typeNode) {
131 …teJSDocTypeTag(/*tagName*/ undefined, factory.createJSDocTypeExpression(typeNode), /*comment*/ "");
258 const typeNode = getTypeNodeIfAccessible(thisInference, containingFunction, program, host); constant
259 if (!typeNode) {
264 annotateJSDocThis(changes, sourceFile, containingFunction, typeNode);
267 changes.tryInsertThisTypeAnnotation(sourceFile, containingFunction, typeNode);
271 …ngeTracker, sourceFile: SourceFile, containingFunction: SignatureDeclaration, typeNode: TypeNode) {
273 … factory.createJSDocThisTag(/*tagName*/ undefined, factory.createJSDocTypeExpression(typeNode)),
302 const typeNode = getTypeNodeIfAccessible(type, declaration, program, host); constant
[all …]
DgenerateAccessors.ts246 const typeNode = getTypeAnnotationNode(declaration); constant
247 if (isPropertyDeclaration(declaration) && typeNode && declaration.questionToken) {
249 const type = typeChecker.getTypeFromTypeNode(typeNode);
251 const types = isUnionTypeNode(typeNode) ? typeNode.types : [typeNode];
255 return typeNode;
/third_party/typescript_eslint/packages/eslint-plugin/src/rules/
Dprefer-as-const.ts32 typeNode: TSESTree.TypeNode,
37 typeNode.type === AST_NODE_TYPES.TSLiteralType &&
38 'raw' in typeNode.literal &&
39 valueNode.raw === typeNode.literal.raw
43 node: typeNode,
45 fix: fixer => fixer.replaceText(typeNode, 'const'),
49 node: typeNode,
55 fixer.remove(typeNode.parent!),
Dno-inferrable-types.ts200 typeNode: TSESTree.TSTypeAnnotation | undefined,
203 if (!typeNode || !initNode || !typeNode.typeAnnotation) {
207 if (!isInferrable(typeNode.typeAnnotation, initNode)) {
212 typeNode.typeAnnotation.type === AST_NODE_TYPES.TSTypeReference
215 : keywordMap[typeNode.typeAnnotation.type];
223 fix: fixer => fixer.remove(typeNode),
Dconsistent-type-definitions.ts59 const typeNode = node.typeParameters ?? node.id; constant
67 [typeNode.range[1], node.typeAnnotation.range[0]],
99 const typeNode = node.typeParameters ?? node.id; constant
107 [typeNode.range[1], node.body.range[0]],
Dban-types.ts177 typeNode: TSESTree.Node,
178 name = stringifyNode(typeNode, context.getSourceCode()),
191 node: typeNode,
198 ? (fixer): TSESLint.RuleFix => fixer.replaceText(typeNode, fixWith)
Dmethod-signature-style.ts210 const typeNode = propertyNode.typeAnnotation?.typeAnnotation; constant
211 if (typeNode?.type !== AST_NODE_TYPES.TSFunctionType) {
224 const params = getMethodParams(typeNode);
225 const returnType = getMethodReturnType(typeNode);
Darray-type.ts175 const typeNode = constant
184 [errorNode.range[0], typeNode.range[0]],
188 [typeNode.range[1], errorNode.range[1]],
/third_party/wayland-ivi-extension/ivi-layermanagement-examples/LayerManagerControl/src/
Dsceneio.cpp336 StringMapTree* typeNode = *(waitingNodes.begin()); in exportXtext() local
338 string type = typeNode->mNodeLabel; in exportXtext()
348 for (map<string, pair<string, string> >::iterator it = typeNode->mNodeValues.begin(); in exportXtext()
349 it != typeNode->mNodeValues.end(); ++it) in exportXtext()
355 for (list<StringMapTree*>::iterator it = typeNode->mChildren.begin(); in exportXtext()
356 it != typeNode->mChildren.end(); ++it) in exportXtext()
/third_party/typescript/src/compiler/transformers/
Dts.ts1615 for (let typeNode of types) {
1616 while (typeNode.kind === SyntaxKind.ParenthesizedType) {
1617 typeNode = (typeNode as ParenthesizedTypeNode).type; // Skip parens if need be
1619 if (typeNode.kind === SyntaxKind.NeverKeyword) {
1622 …ullChecks && (typeNode.kind === SyntaxKind.LiteralType && (typeNode as LiteralTypeNode).literal.ki…
1625 const serializedIndividual = serializeTypeNode(typeNode);
/third_party/typescript/src/services/refactors/
DextractSymbol.ts839 let typeNode: TypeNode | undefined;
844typeNode = codefix.typeToAutoImportableTypeNode(checker, importAdder, type, scope, scriptTarget, N…
853 typeNode
1089 … function getTypeDeepCloneUnionUndefined(typeNode: TypeNode | undefined): TypeNode | undefined {
1090 if (typeNode === undefined) {
1094 const clone = getSynthesizedDeepClone(typeNode);
DconvertParamsToDestructuredObject.ts522 … const typeNode = addEmitFlags(factory.createTypeLiteralNode(members), EmitFlags.SingleLine); constant
523 return typeNode;
/third_party/typescript/src/compiler/
Dchecker.ts4407 …const typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) …
4408 if (typeNode === undefined) return Debug.fail("should always get typenode");
4412 printer.writeNode(EmitHint.Unspecified, typeNode, /*sourceFile*/ sourceFile, writer);
4714 const typeNode = typeToTypeNodeHelper((<StringMappingType>type).type, context);
4715 … return symbolToTypeNode((<StringMappingType>type).symbol, context, SymbolFlags.Type, [typeNode]);
5236 const typeNode = typeToTypeNodeHelper(types[types.length - 1], context);
5237 if (typeNode) {
5238 result.push(typeNode);
5243 const typeNode = typeToTypeNodeHelper(type, context);
5244 if (typeNode) {
[all …]
/third_party/typescript/src/services/
DfindAllReferences.ts1780 …const typeNode = findAncestor(refNode, a => !isQualifiedName(a.parent) && !isTypeNode(a.parent) &&… constant
1781 const typeHavingNode = typeNode.parent;
1782 …if (hasType(typeHavingNode) && typeHavingNode.type === typeNode && state.markSeenContainingTypeRef…
/third_party/typescript/lib/
Dtsserver.js47832 …var typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | …
47833 if (typeNode === undefined)
47838 printer.writeNode(4 /* Unspecified */, typeNode, /*sourceFile*/ sourceFile, writer);
48131 var typeNode = typeToTypeNodeHelper(type.type, context);
48132 return symbolToTypeNode(type.symbol, context, 788968 /* Type */, [typeNode]);
48617 var typeNode = typeToTypeNodeHelper(type, context);
48618 if (typeNode) {
48619 result_4.push(typeNode);
48620 if (seenNames && ts.isIdentifierTypeReference(typeNode)) {
48621 … seenNames.add(typeNode.typeName.escapedText, [type, result_4.length - 1]);
[all …]
DtypescriptServices.js48026 …var typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | …
48027 if (typeNode === undefined)
48032 printer.writeNode(4 /* Unspecified */, typeNode, /*sourceFile*/ sourceFile, writer);
48325 var typeNode = typeToTypeNodeHelper(type.type, context);
48326 return symbolToTypeNode(type.symbol, context, 788968 /* Type */, [typeNode]);
48811 var typeNode = typeToTypeNodeHelper(type, context);
48812 if (typeNode) {
48813 result_4.push(typeNode);
48814 if (seenNames && ts.isIdentifierTypeReference(typeNode)) {
48815 … seenNames.add(typeNode.typeName.escapedText, [type, result_4.length - 1]);
[all …]
Dtsserverlibrary.js48026 …var typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | …
48027 if (typeNode === undefined)
48032 printer.writeNode(4 /* Unspecified */, typeNode, /*sourceFile*/ sourceFile, writer);
48325 var typeNode = typeToTypeNodeHelper(type.type, context);
48326 return symbolToTypeNode(type.symbol, context, 788968 /* Type */, [typeNode]);
48811 var typeNode = typeToTypeNodeHelper(type, context);
48812 if (typeNode) {
48813 result_4.push(typeNode);
48814 if (seenNames && ts.isIdentifierTypeReference(typeNode)) {
48815 … seenNames.add(typeNode.typeName.escapedText, [type, result_4.length - 1]);
[all …]
Dtypescript.js48026 …var typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | …
48027 if (typeNode === undefined)
48032 printer.writeNode(4 /* Unspecified */, typeNode, /*sourceFile*/ sourceFile, writer);
48325 var typeNode = typeToTypeNodeHelper(type.type, context);
48326 return symbolToTypeNode(type.symbol, context, 788968 /* Type */, [typeNode]);
48811 var typeNode = typeToTypeNodeHelper(type, context);
48812 if (typeNode) {
48813 result_4.push(typeNode);
48814 if (seenNames && ts.isIdentifierTypeReference(typeNode)) {
48815 … seenNames.add(typeNode.typeName.escapedText, [type, result_4.length - 1]);
[all …]
DtypingsInstaller.js47821 …var typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | …
47822 if (typeNode === undefined)
47827 printer.writeNode(4 /* Unspecified */, typeNode, /*sourceFile*/ sourceFile, writer);
48120 var typeNode = typeToTypeNodeHelper(type.type, context);
48121 return symbolToTypeNode(type.symbol, context, 788968 /* Type */, [typeNode]);
48606 var typeNode = typeToTypeNodeHelper(type, context);
48607 if (typeNode) {
48608 result_4.push(typeNode);
48609 if (seenNames && ts.isIdentifierTypeReference(typeNode)) {
48610 … seenNames.add(typeNode.typeName.escapedText, [type, result_4.length - 1]);
[all …]
Dtsc.js39219 …var typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | …
39220 if (typeNode === undefined)
39225 printer.writeNode(4, typeNode, sourceFile, writer);
39515 var typeNode = typeToTypeNodeHelper(type.type, context);
39516 return symbolToTypeNode(type.symbol, context, 788968, [typeNode]);
39975 var typeNode = typeToTypeNodeHelper(type, context);
39976 if (typeNode) {
39977 result_4.push(typeNode);
39978 if (seenNames && ts.isIdentifierTypeReference(typeNode)) {
39979 … seenNames.add(typeNode.typeName.escapedText, [type, result_4.length - 1]);
[all …]