/third_party/typescript_eslint/packages/eslint-plugin/tests/util/ |
D | isUnsafeAssignment.test.ts | 13 ): { sender: ts.Type; receiver: ts.Type; checker: ts.TypeChecker } { 19 const checker = services.program.getTypeChecker(); constant 25 receiver: checker.getTypeAtLocation( 28 sender: checker.getTypeAtLocation( 31 checker, 38 checker: ts.TypeChecker, 45 expect(checker.typeToString(sender)).toBe(senderStr); 46 expect(checker.typeToString(receiver)).toBe(receiverStr); 50 const { sender, receiver, checker } = getTypes( constant 55 isUnsafeAssignment(sender, receiver, checker), [all …]
|
/third_party/boost/libs/iostreams/test/ |
D | newline_test.cpp | 241 io::newline_checker* checker = 0; in read_newline_checker() local 248 checker = BOOST_IOSTREAMS_COMPONENT(in, 0, io::newline_checker); in read_newline_checker() 249 BOOST_CHECK(checker->is_posix()); in read_newline_checker() 250 BOOST_CHECK(!checker->is_dos()); in read_newline_checker() 251 BOOST_CHECK(!checker->is_mac()); in read_newline_checker() 252 BOOST_CHECK(!checker->is_mixed()); in read_newline_checker() 253 BOOST_CHECK(checker->has_final_newline()); in read_newline_checker() 267 checker = BOOST_IOSTREAMS_COMPONENT(in, 0, io::newline_checker); in read_newline_checker() 268 BOOST_CHECK(!checker->is_posix()); in read_newline_checker() 269 BOOST_CHECK(checker->is_dos()); in read_newline_checker() [all …]
|
/third_party/typescript/tests/baselines/reference/ |
D | parserRealSource9.js | 9 constructor (public checker: TypeChecker) { } 16 this.checker.resolvingBases = true; 17 this.checker.resolveTypeLink(scope, typeLink, true); 18 this.checker.resolvingBases = false; 37 if (type.extendsList[i] != this.checker.anyType) { 40 this.checker.errorReporter.simpleErrorFromSym(type.symbol, 46 this.checker.errorReporter.simpleErrorFromSym(type.symbol, 60 this.checker.errorReporter.simpleErrorFromSym(type.symbol, 76 this.checker.resolveTypeLink(scope, signature.returnType, supplyVar); 87 this.checker.errorReporter.simpleErrorFromSym(lastParam, [all …]
|
D | parserRealSource9.symbols | 13 constructor (public checker: TypeChecker) { } 14 >checker : Symbol(Binder.checker, Decl(parserRealSource9.ts, 7, 21)) 45 this.checker.resolvingBases = true; 46 >this.checker : Symbol(Binder.checker, Decl(parserRealSource9.ts, 7, 21)) 48 >checker : Symbol(Binder.checker, Decl(parserRealSource9.ts, 7, 21)) 50 this.checker.resolveTypeLink(scope, typeLink, true); 51 >this.checker : Symbol(Binder.checker, Decl(parserRealSource9.ts, 7, 21)) 53 >checker : Symbol(Binder.checker, Decl(parserRealSource9.ts, 7, 21)) 57 this.checker.resolvingBases = false; 58 >this.checker : Symbol(Binder.checker, Decl(parserRealSource9.ts, 7, 21)) [all …]
|
D | parserRealSource9.types | 13 constructor (public checker: TypeChecker) { } 14 >checker : any 55 this.checker.resolvingBases = true; 56 >this.checker.resolvingBases = true : true 57 >this.checker.resolvingBases : any 58 >this.checker : any 60 >checker : any 64 this.checker.resolveTypeLink(scope, typeLink, true); 65 >this.checker.resolveTypeLink(scope, typeLink, true) : any 66 >this.checker.resolveTypeLink : any [all …]
|
/third_party/grpc/src/ruby/spec/pb/health/ |
D | checker_spec.rb | 85 checker = Grpc::Health::Checker.new 86 expect(checker).to_not be(nil) 93 checker = Grpc::Health::Checker.new 94 checker.add_status(t[:service], ServingStatus::NOT_SERVING) 95 got = checker.check(HCReq.new(service: t[:service]), nil) 104 checker = Grpc::Health::Checker.new 105 checker.add_statuses( 109 service1_health = checker.check(HCReq.new(service: 'service1'), nil) 110 service2_health = checker.check(HCReq.new(service: 'service2'), nil) 118 checker = Grpc::Health::Checker.new [all …]
|
/third_party/typescript/tests/cases/conformance/parser/ecmascript5/ |
D | parserRealSource9.ts | 8 constructor (public checker: TypeChecker) { } property in Binder 15 this.checker.resolvingBases = true; 16 this.checker.resolveTypeLink(scope, typeLink, true); 17 this.checker.resolvingBases = false; 36 if (type.extendsList[i] != this.checker.anyType) { 39 this.checker.errorReporter.simpleErrorFromSym(type.symbol, 45 this.checker.errorReporter.simpleErrorFromSym(type.symbol, 59 this.checker.errorReporter.simpleErrorFromSym(type.symbol, 75 this.checker.resolveTypeLink(scope, signature.returnType, supplyVar); 86 this.checker.errorReporter.simpleErrorFromSym(lastParam, [all …]
|
/third_party/typescript_eslint/packages/eslint-plugin/src/rules/ |
D | no-misused-promises.ts | 56 const checker = parserServices.program.getTypeChecker(); constant 113 if (isAlwaysThenable(checker, tsNode)) { 125 const voidParams = voidFunctionParams(checker, tsNode); 136 if (returnsThenable(checker, tsNode as ts.Expression)) { 156 function isAlwaysThenable(checker: ts.TypeChecker, node: ts.Node): boolean { 157 const type = checker.getTypeAtLocation(node); 159 for (const subType of tsutils.unionTypeParts(checker.getApparentType(type))) { 171 const thenType = checker.getTypeOfSymbolAtLocation(thenProp, node); 177 isFunctionParam(checker, signature.parameters[0], node) 204 checker: ts.TypeChecker, [all …]
|
D | no-floating-promises.ts | 58 const checker = parserServices.program.getTypeChecker(); constant 69 if (isUnhandledPromise(checker, expression)) { 109 checker: ts.TypeChecker, 121 isUnhandledPromise(checker, node.left) || 122 isUnhandledPromise(checker, node.right) 129 return isUnhandledPromise(checker, node.expression); 133 if (!isPromiseLike(checker, node)) { 149 isUnhandledPromise(checker, node.whenFalse) || 150 isUnhandledPromise(checker, node.whenTrue) 175 function isPromiseLike(checker: ts.TypeChecker, node: ts.Node): boolean { [all …]
|
D | no-unnecessary-type-arguments.ts | 40 const checker = parserServices.program.getTypeChecker(); constant 76 const typeParameters = getTypeParametersFromNode(expression, checker); 87 checker: ts.TypeChecker, 90 return getTypeParametersFromType(node.expression, checker); 94 return getTypeParametersFromType(node.typeName, checker); 98 return getTypeParametersFromCall(node, checker); 106 checker: ts.TypeChecker, 108 const symAtLocation = checker.getSymbolAtLocation(type); 113 const sym = getAliasedSymbol(symAtLocation, checker); 131 checker: ts.TypeChecker, [all …]
|
D | require-array-sort-compare.ts | 45 const checker = service.program.getTypeChecker(); constant 52 const type = checker.getTypeAtLocation( 55 if (checker.isArrayType(type) || checker.isTupleType(type)) { 56 const typeArgs = checker.getTypeArguments(type); 58 arg => util.getTypeName(checker, arg) === 'string', 70 checker, 78 if (util.isTypeArrayTypeOrUnionOfArrayTypes(calleeObjType, checker)) {
|
D | no-unsafe-return.ts | 28 const checker = program.getTypeChecker(); constant 60 const anyType = util.isAnyOrAnyArrayTypeDiscriminated(tsNode, checker); 68 checker, 78 ? util.getContextualType(checker, functionTSNode) 79 : checker.getTypeAtLocation(functionTSNode); 81 functionType = checker.getTypeAtLocation(functionTSNode); 97 util.isTypeUnknownArrayType(functionReturnType, checker) 125 checker, 136 sender: checker.typeToString(sender), 137 receiver: checker.typeToString(receiver),
|
/third_party/pixman/test/ |
D | utils.c | 2017 pixel_checker_init (pixel_checker_t *checker, pixman_format_code_t format) in pixel_checker_init() argument 2021 checker->format = format; in pixel_checker_init() 2030 checker->bs = 0; in pixel_checker_init() 2031 checker->gs = 0; in pixel_checker_init() 2032 checker->rs = 0; in pixel_checker_init() 2033 checker->as = 0; in pixel_checker_init() 2038 checker->bs = 0; in pixel_checker_init() 2039 checker->gs = checker->bs + PIXMAN_FORMAT_B (format); in pixel_checker_init() 2040 checker->rs = checker->gs + PIXMAN_FORMAT_G (format); in pixel_checker_init() 2041 checker->as = checker->rs + PIXMAN_FORMAT_R (format); in pixel_checker_init() [all …]
|
/third_party/typescript_eslint/packages/eslint-plugin/src/util/ |
D | isTypeReadonly.ts | 21 checker: ts.TypeChecker, 26 const typeArguments = checker.getTypeArguments(arrayType); 38 isTypeReadonlyRecurser(checker, typeArg, seenTypes) === 47 if (checker.isArrayType(type)) { 60 if (checker.isTupleType(type)) { 72 checker: ts.TypeChecker, 77 const indexInfo = checker.getIndexInfoOfType(type, kind); 91 if (!isPropertyReadonlyInType(type, property.getEscapedName(), checker)) { 104 getTypeOfPropertyOfType(checker, type, property), 115 isTypeReadonlyRecurser(checker, propertyType, seenTypes) === [all …]
|
D | types.ts | 25 checker: ts.TypeChecker, 28 if (!checker.isArrayType(t)) { 139 checker: ts.TypeChecker, 142 const nodeType = checker.getTypeAtLocation(node); 143 const constrained = checker.getBaseConstraintOfType(nodeType); 176 checker: ts.TypeChecker, 179 const symbol = checker.getSymbolAtLocation(node); 322 checker: ts.TypeChecker, 325 if (checker.getTypeArguments) { 326 return checker.getTypeArguments(type); [all …]
|
/third_party/typescript/src/services/ |
D | suggestionDiagnostics.ts | 8 const checker = program.getTypeChecker(); constant 40 if (canBeConvertedToClass(node, checker)) { 61 addConvertToAsyncFunctionDiagnostics(node, checker, diags); 104 …function addConvertToAsyncFunctionDiagnostics(node: FunctionLikeDeclaration, checker: TypeChecker,… 106 …if (isConvertibleFunction(node, checker) && !visitedNestedConvertibleFunctions.has(getKeyFromNode(… 113 function isConvertibleFunction(node: FunctionLikeDeclaration, checker: TypeChecker) { 117 hasReturnStatementWithPromiseHandler(node.body, checker) && 118 returnsPromise(node, checker); 121 function returnsPromise(node: FunctionLikeDeclaration, checker: TypeChecker): boolean { 122 const functionType = checker.getTypeAtLocation(node); [all …]
|
D | importTracker.ts | 15 …sourceFiles: readonly SourceFile[], sourceFilesSet: ReadonlySet<string>, checker: TypeChecker, can… 16 const allDirectImports = getDirectImportsMap(sourceFiles, checker, cancellationToken); 18 …tersForExport(sourceFiles, sourceFilesSet, allDirectImports, exportInfo, checker, cancellationToke… 19 …rchesFromDirectImports(directImports, exportSymbol, exportInfo.exportKind, checker, isForRename) }; 45 checker: TypeChecker, 286 const defaultImportAlias = checker.getSymbolAtLocation(name)!; 299 addSearch(importName, checker.getSymbolAtLocation(importName)!); 321 addSearch(name, checker.getSymbolAtLocation(name)!); 326 …? checker.getExportSpecifierLocalTargetSymbol(element)! // For re-exporting under a different name… 327 : checker.getSymbolAtLocation(name)!; [all …]
|
D | signatureHelp.ts | 74 …function getCandidateOrTypeInfo({ invocation, argumentCount }: ArgumentListInfo, checker: TypeChec… 81 …const resolvedSignature = checker.getResolvedSignatureForSignatureHelp(invocation.node, candidates… 89 const candidates = getPossibleGenericSignatures(called, argumentCount, checker); 92 const symbol = checker.getSymbolAtLocation(called); 290 …xtualParameterInfo(node: Node, position: number, sourceFile: SourceFile, checker: TypeChecker): Ar… 291 …return tryGetParameterInfo(node, position, sourceFile, checker) || getImmediatelyContainingArgumen… 302 …eterInfo(startingToken: Node, _position: number, sourceFile: SourceFile, checker: TypeChecker): Ar… 303 const info = getContextualSignatureLocationInfo(startingToken, sourceFile, checker); 318 …extualSignatureLocationInfo(startingToken: Node, sourceFile: SourceFile, checker: TypeChecker): Co… 329 …extualType = isMethodDeclaration(parent) ? checker.getContextualTypeForObjectLiteralElement(parent… [all …]
|
/third_party/typescript/src/services/codefixes/ |
D | addMissingAwait.ts | 39 const checker = context.program.getTypeChecker(); constant 42 getDeclarationSiteFix(context, expression, errorCode, checker, trackChanges), 43 getUseSiteFix(context, expression, errorCode, checker, trackChanges)]); 47 const checker = context.program.getTypeChecker(); constant 55 …return getDeclarationSiteFix(context, expression, diagnostic.code, checker, trackChanges, fixedDec… 56 … || getUseSiteFix(context, expression, diagnostic.code, checker, trackChanges, fixedDeclarations); 61 …xContext | CodeFixAllContext, expression: Expression, errorCode: number, checker: TypeChecker, tra… 63 …tializers = findAwaitableInitializers(expression, sourceFile, cancellationToken, program, checker); 66 …s.initializers, ({ expression }) => makeChange(t, errorCode, sourceFile, checker, expression, fixe… 68 makeChange(t, errorCode, sourceFile, checker, expression, fixedDeclarations); [all …]
|
D | fixJSDocTypes.ts | 10 const checker = context.program.getTypeChecker(); constant 11 const info = getInfo(sourceFile, context.span.start, checker); 19 …actions.push(fix(checker.getNullableType(type, TypeFlags.Undefined), fixIdNullable, Diagnostics.Ch… 24 …s = textChanges.ChangeTracker.with(context, t => doChange(t, sourceFile, typeNode, type, checker)); 25 …odeFixAction("jdocTypes", changes, [Diagnostics.Change_0_to_1, original, checker.typeToString(type… 31 const checker = program.getTypeChecker(); constant 33 const info = getInfo(err.file, err.start, checker); 36 …eNode.kind === SyntaxKind.JSDocNullableType && fixId === fixIdNullable ? checker.getNullableType(t… constant 37 doChange(changes, sourceFile, typeNode, fixedType, checker); 42 …geTracker, sourceFile: SourceFile, oldTypeNode: TypeNode, newType: Type, checker: TypeChecker): vo… [all …]
|
D | returnValueCorrect.ts | 75 …function createObjectTypeFromLabeledExpression(checker: TypeChecker, label: Identifier, expression… 76 const member = checker.createSymbol(SymbolFlags.Property, label.escapedText); 77 member.type = checker.getTypeAtLocation(expression); 79 …return checker.createAnonymousType(/*symbol*/ undefined, members, [], [], /*stringIndexInfo*/ unde… 82 …function getFixInfo(checker: TypeChecker, declaration: FunctionLikeDeclaration, expectType: Type, … 86 …ExpressionStatement(firstStatement) && checkFixedAssignableTo(checker, declaration, checker.getTyp… 97 …const nodeType = createObjectTypeFromLabeledExpression(checker, firstStatement.label, firstStateme… 98 … if (checkFixedAssignableTo(checker, declaration, nodeType, expectType, isFunctionType)) { 118 …const nodeType = createObjectTypeFromLabeledExpression(checker, firstBlockStatement.label, firstBl… 119 … if (checkFixedAssignableTo(checker, declaration, nodeType, expectType, isFunctionType)) { [all …]
|
D | inferFromUsage.ts | 475 const checker = program.getTypeChecker(); constant 477 string: () => checker.getStringType(), 478 number: () => checker.getNumberType(), 479 Array: t => checker.createArrayType(t), 480 Promise: t => checker.createPromiseType(t), 483 checker.getStringType(), 484 checker.getNumberType(), 485 checker.createArrayType(checker.getAnyType()), 486 checker.createPromiseType(checker.getAnyType()), 585 types.push(checker.getUndefinedType()); [all …]
|
D | convertToAsyncFunction.ts | 40 readonly checker: TypeChecker; property 46 …es: textChanges.ChangeTracker, sourceFile: SourceFile, position: number, checker: TypeChecker): vo… 66 … const setOfExpressionsToReturn = getAllPromiseExpressionsToReturn(functionToConvert, checker); 67 …const functionToConvertRenamed = renameCollidingVarNames(functionToConvert, checker, synthNamesMap… 68 …ody) ? getReturnStatementsWithPromiseHandlers(functionToConvertRenamed.body, checker) : emptyArray; 69 …const transformer: Transformer = { checker, synthNamesMap, setOfExpressionsToReturn, isInJSFile: i… 93 …function getReturnStatementsWithPromiseHandlers(body: Block, checker: TypeChecker): readonly Retur… 96 if (isReturnStatementWithFixablePromiseHandler(ret, checker)) res.push(ret); 104 …function getAllPromiseExpressionsToReturn(func: FunctionLikeDeclaration, checker: TypeChecker): Se… 111 if (isPromiseReturningCallExpression(node, checker, "then")) { [all …]
|
/third_party/gn/src/gn/ |
D | header_checker_unittest.cc | 83 auto checker = CreateChecker(); in TEST_F() local 101 EXPECT_FALSE(checker->IsDependencyOf(&a_, &a_, &chain, &is_permitted)); in TEST_F() 106 EXPECT_TRUE(checker->IsDependencyOf(&b_, &a_, &chain, &is_permitted)); in TEST_F() 116 EXPECT_TRUE(checker->IsDependencyOf(&c_, &a_, &chain, &is_permitted)); in TEST_F() 126 EXPECT_FALSE(checker->IsDependencyOf(&a_, &c_, &chain, &is_permitted)); in TEST_F() 135 EXPECT_TRUE(checker->IsDependencyOf(&c_, &a_, &chain, &is_permitted)); in TEST_F() 146 EXPECT_TRUE(checker->IsDependencyOf(&c_, &p, &chain, &is_permitted)); in TEST_F() 198 auto checker = CreateChecker(); in TEST_F() local 204 checker->CheckInclude(&a_, input_file, d_header, range, &no_dependency_cache, in TEST_F() 211 checker->CheckInclude(&a_, input_file, b_public, range, &no_dependency_cache, in TEST_F() [all …]
|
/third_party/typescript/src/testRunner/unittests/tsserver/ |
D | importSuggestionsCache.ts | 29 const { importSuggestionsCache, checker } = setup(); constant 30 assert.ok(importSuggestionsCache.get(bTs.path, checker)); 34 const { host, importSuggestionsCache, checker } = setup(); constant 37 assert.isUndefined(importSuggestionsCache.get(bTs.path, checker)); 41 const { host, projectService, importSuggestionsCache, checker } = setup(); constant 45 assert.isUndefined(importSuggestionsCache.get(bTs.path, checker)); 49 const { host, importSuggestionsCache, checker } = setup(); constant 52 assert.isUndefined(importSuggestionsCache.get(bTs.path, checker)); 72 const checker = project.getLanguageService().getProgram()!.getTypeChecker(); constant 73 …t, project, projectService, importSuggestionsCache: project.getImportSuggestionsCache(), checker };
|