Home
last modified time | relevance | path

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

12

/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.ts101 …let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithR…
103 … const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget);
105 typeNode = importableReference.typeNode;
113 typeNode,
119 …let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, /*flags*/ undefined, getNoopSymb…
125 … const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget);
127 typeNode = importableReference.typeNode;
137 createTypeNode(typeNode),
147 … createDummyParameters(1, [parameterName], [createTypeNode(typeNode)], 1, /*inJs*/ false),
207 function createTypeNode(typeNode: TypeNode | undefined) {
[all …]
DconvertLiteralTypeToMappedType.ts29 typeNode: TypeNode | undefined; property
41 typeNode: propertySignature.type,
49 …hanges: textChanges.ChangeTracker, sourceFile: SourceFile, { container, typeNode, constraint, name…
55 typeNode,
DinferFromUsage.ts130 const typeNode = getTypeNodeIfAccessible(type, parent, program, host); constant
131 if (typeNode) {
133 …teJSDocTypeTag(/*tagName*/ undefined, factory.createJSDocTypeExpression(typeNode), /*comment*/ und…
260 const typeNode = getTypeNodeIfAccessible(thisInference, containingFunction, program, host); constant
261 if (!typeNode) {
266 annotateJSDocThis(changes, sourceFile, containingFunction, typeNode);
269 changes.tryInsertThisTypeAnnotation(sourceFile, containingFunction, typeNode);
273 …ngeTracker, sourceFile: SourceFile, containingFunction: SignatureDeclaration, typeNode: TypeNode) {
275 … factory.createJSDocThisTag(/*tagName*/ undefined, factory.createJSDocTypeExpression(typeNode)),
305 const typeNode = getTypeNodeIfAccessible(type, declaration, program, host); constant
[all …]
DgenerateAccessors.ts241 const typeNode = getTypeAnnotationNode(declaration); constant
242 if (isPropertyDeclaration(declaration) && typeNode && declaration.questionToken) {
244 const type = typeChecker.getTypeFromTypeNode(typeNode);
246 const types = isUnionTypeNode(typeNode) ? typeNode.types : [typeNode];
250 return typeNode;
DaddNameToNamelessParameter.ts26 …const typeNode = factory.createTypeReferenceNode(param.name as Identifier, /*typeArguments*/ undef… constant
32 param.dotDotDotToken ? factory.createArrayTypeNode(typeNode) : typeNode,
DfixAddMissingMember.ts108 const typeNode = getTypeNode(checker, parentDeclaration, token); constant
109 …ertyDeclaration(changes, declSourceFile, parentDeclaration, token.text, typeNode, modifierFlags & …
331 const typeNode = getTypeNode(context.program.getTypeChecker(), parentDeclaration, token); constant
332 …addPropertyDeclaration(t, declSourceFile, parentDeclaration, memberName, typeNode, modifierFlags));
343 …h(createAddIndexSignatureAction(context, declSourceFile, parentDeclaration, token.text, typeNode));
348 let typeNode: TypeNode | undefined;
353 typeNode = checker.typeToTypeNode(widenedType, node, NodeBuilderFlags.NoTruncation);
357typeNode = contextualType ? checker.typeToTypeNode(contextualType, /*enclosingDeclaration*/ undefi…
359 return typeNode || factory.createKeywordTypeNode(SyntaxKind.AnyKeyword);
362 …eclaration | InterfaceDeclaration | TypeLiteralNode, tokenName: string, typeNode: TypeNode, modifi…
[all …]
DfixAddMissingConstraint.ts89 …const typeNode = typeToAutoImportableTypeNode(checker, importAdder, constraint, /*contextNode*/ un… constant
90 if (typeNode) {
91 …eterDeclaration(declaration, /*modifiers*/ undefined, declaration.name, typeNode, declaration.defa…
/third_party/typescript/src/linter/ArkTSLinter_1_1/
DUtils.ts1173 export function isSupportedType(typeNode: TypeNode): boolean {
1174 if (isParenthesizedTypeNode(typeNode)) return isSupportedType(typeNode.type);
1176 if (isArrayTypeNode(typeNode)) return isSupportedType(typeNode.elementType);
1178 if (isTypeReferenceNode(typeNode) && typeNode.typeArguments) {
1179 for (const typeArg of typeNode.typeArguments) {
1185 if (isUnionTypeNode(typeNode)) {
1186 for (const unionTypeElem of typeNode.types) {
1192 if (isTupleTypeNode(typeNode)) {
1193 for (const elem of typeNode.elements) {
1200 return !isTypeLiteralNode(typeNode) && !isTypeQueryNode(typeNode) &&
[all …]
DAutofixer.ts124 export function fixReturnType(funcLikeDecl: FunctionLikeDeclaration, typeNode: TypeNode): Autofix {
125 …const text = ": " + printer.printNode(EmitHint.Unspecified, typeNode, funcLikeDecl.getSourceFile()…
DTypeScriptLinter.ts735 const typeNode = node.type; constant
736 if (!typeNode) {
746 if (!Utils.isSendableTypeNode(typeNode)) {
787 const typeNode = node.type; constant
788 if (!typeNode) {
796 if (!Utils.isSendableTypeNode(typeNode)) {
1139 const typeNode = Utils.getVariableDeclarationTypeNode(tsLhsExpr); constant
1140 this.handleEsObjectAssignment(tsBinaryExpr, typeNode, tsRhsExpr);
1669 …const typeNode = TypeScriptLinter.tsTypeChecker.typeToTypeNode(type, undefined, ts.NodeBuilderFlag… constant
1686 Utils.isEsObjectType(typeNode)
[all …]
/third_party/typescript/src/linter/ArkTSLinter_1_0/
DUtils.ts992 export function isSupportedType(typeNode: TypeNode): boolean {
993 if (isParenthesizedTypeNode(typeNode)) return isSupportedType(typeNode.type);
995 if (isArrayTypeNode(typeNode)) return isSupportedType(typeNode.elementType);
997 if (isTypeReferenceNode(typeNode) && typeNode.typeArguments) {
998 for (const typeArg of typeNode.typeArguments) {
1004 if (isUnionTypeNode(typeNode)) {
1005 for (const unionTypeElem of typeNode.types) {
1011 if (isTupleTypeNode(typeNode)) {
1012 for (const elem of typeNode.elements) {
1019 return !isTypeLiteralNode(typeNode) && !isTypeQueryNode(typeNode) &&
[all …]
DAutofixer.ts124 export function fixReturnType(funcLikeDecl: FunctionLikeDeclaration, typeNode: TypeNode): Autofix {
125 …const text = ": " + printer.printNode(EmitHint.Unspecified, typeNode, funcLikeDecl.getSourceFile()…
DTypeScriptLinter.ts1045 const typeNode = Utils.getVariableDeclarationTypeNode(tsLhsExpr); constant
1046 this.handleEsObjectAssignment(tsBinaryExpr, typeNode, tsRhsExpr);
1557 const typeNode = resolvedTypeArgs[i]; constant
1563 if (typeNode.kind == ts.SyntaxKind.UnknownKeyword) {
/third_party/typescript/src/compiler/transformers/
DtypeSerializer.ts331 for (let typeNode of types) {
332 typeNode = skipTypeParentheses(typeNode);
333 if (typeNode.kind === SyntaxKind.NeverKeyword) {
338 if (typeNode.kind === SyntaxKind.UnknownKeyword) {
343 if (typeNode.kind === SyntaxKind.AnyKeyword) {
347 …trictNullChecks && ((isLiteralTypeNode(typeNode) && typeNode.literal.kind === SyntaxKind.NullKeywo…
351 const serializedConstituent = serializeTypeNode(typeNode);
/third_party/vk-gl-cts/external/vulkancts/scripts/
Dohos_gen_framework.py442 typeNode = paramNode.find("type")
443 starCount = typeNode.tail.count('*')
449 'const' in typeNode.tail,
569 def readType (self, typeNode): argument
570 name = typeNode.get("name")
571 alias = typeNode.get("alias")
572 category = typeNode.get("category")
584 name = typeNode.find("name").text
585 type = typeNode.find("type").text
590 typeNode.get("parent"),
[all …]
Dgen_framework.py438 typeNode = paramNode.find("type")
439 starCount = typeNode.tail.count('*')
445 'const' in typeNode.tail,
565 def readType (self, typeNode): argument
566 name = typeNode.get("name")
567 alias = typeNode.get("alias")
568 category = typeNode.get("category")
580 name = typeNode.find("name").text
581 type = typeNode.find("type").text
586 typeNode.get("parent"),
[all …]
/third_party/typescript/src/services/refactors/
DinferFunctionReturnType.ts57 …ile, changes: textChanges.ChangeTracker, declaration: ConvertibleDeclaration, typeNode: TypeNode) {
66 changes.insertNodeAt(sourceFile, endNode.end, typeNode, { prefix: ": " });
DextractSymbol.ts873 let typeNode: TypeNode | undefined;
878typeNode = codefix.typeToAutoImportableTypeNode(checker, importAdder, type, scope, scriptTarget, N…
886 typeNode
1145 … function getTypeDeepCloneUnionUndefined(typeNode: TypeNode | undefined): TypeNode | undefined {
1146 if (typeNode === undefined) {
1150 const clone = getSynthesizedDeepClone(typeNode);
DconvertParamsToDestructuredObject.ts520 … const typeNode = addEmitFlags(factory.createTypeLiteralNode(members), EmitFlags.SingleLine); constant
521 return typeNode;
/third_party/typescript/src/services/
DinlayHints.ts320 … const typeNode = checker.typeToTypeNode(type, /*enclosingDeclaration*/ undefined, flags, writer); constant
321 Debug.assertIsDefined(typeNode, "should always get typenode");
322 printer.writeNode(EmitHint.Unspecified, typeNode, /*sourceFile*/ file, writer);
DfindAllReferences.ts1882 …const typeNode = findAncestor(refNode, a => !isQualifiedName(a.parent) && !isTypeNode(a.parent) &&… constant
1883 const typeHavingNode = typeNode.parent;
1884 …if (hasType(typeHavingNode) && typeHavingNode.type === typeNode && state.markSeenContainingTypeRef…
Dcompletions.ts1155 …const typeNode = checker.typeToTypeNode(effectiveType, enclosingDeclaration, builderFlags, codefix… constant
1156 if (!typeNode || !isFunctionTypeNode(typeNode)) {
1170 const parameters = typeNode.parameters.map(typedParam =>
/third_party/typescript/src/compiler/factory/
DemitNode.ts286 emitNode.typeNode = type;
292 return node.emitNode?.typeNode;
/third_party/typescript/src/compiler/
Dchecker.ts5048 …const typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) …
5049 if (typeNode === undefined) return Debug.fail("should always get typenode");
5055 printer.writeNode(EmitHint.Unspecified, typeNode, /*sourceFile*/ sourceFile, writer);
5202 const typeNode = typeToTypeNodeWorker(type, context);
5204 return typeNode;
5440 … const typeNode = typeToTypeNodeHelper((type as StringMappingType).type, context);
5441 …return symbolToTypeNode((type as StringMappingType).symbol, context, SymbolFlags.Type, [typeNode]);
6084 const typeNode = typeToTypeNodeHelper(types[types.length - 1], context);
6085 if (typeNode) {
6086 result.push(typeNode);
[all …]

12