Home
last modified time | relevance | path

Searched refs:inferred (Results 1 – 25 of 201) sorted by relevance

123456789

/third_party/typescript/tests/baselines/reference/
DpropagationOfPromiseInitialization.types15 >foo.then((x) => { // x is inferred to be a number return "asdf";}).then((x) => { // x is
16 >foo.then((x) => { // x is inferred to be a number return "asdf";}).then : <TResult>(successC…
17 >foo.then((x) => { // x is inferred to be a number return "asdf";}) : IPromise<string>
21 >(x) => { // x is inferred to be a number return "asdf";} : (x: number) => string
24 // x is inferred to be a number
30 >(x) => { // x is inferred to be string x.length; return 123;} : (x: string) => number
33 // x is inferred to be string
DswitchCaseNarrowsMatchingClausesEvenWhenNonMatchingClausesExist.types4 >(str: string) => { switch (str) { case 'abc': { // inferred type as `abc` re…
13 // inferred type as `abc`
25 >(str: string, someOtherStr: string) => { switch (str) { case 'abc': { // inferred t…
35 // inferred type should be `abc`
54 … case 'abc': { // inferred type should be `abc` return str; } case someN…
64 // inferred type should be `abc`
71 // inferred type should be `number`
DdeclarationFiles.errors.txt2 tests/cases/conformance/types/thisType/declarationFiles.ts(30,5): error TS2527: The inferred type o…
3 tests/cases/conformance/types/thisType/declarationFiles.ts(32,5): error TS2527: The inferred type o…
4 tests/cases/conformance/types/thisType/declarationFiles.ts(34,5): error TS2527: The inferred type o…
5 tests/cases/conformance/types/thisType/declarationFiles.ts(40,5): error TS2527: The inferred type o…
42 !!! error TS2527: The inferred type of 'x1' references an inaccessible 'this' type. A type annotati…
46 !!! error TS2527: The inferred type of 'x3' references an inaccessible 'this' type. A type annotati…
50 !!! error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotati…
58 !!! error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotati…
DtargetTypeTest1.errors.txt16 // Because Point is a constructor function, this is inferred
17 // to be Point and return type is inferred to be void
35 // this inferred as Point because of obj.prop assignment
36 // dx, dy, and return type inferred using target typing
43 // Object literal type inferred using target typing
44 // this in function add inferred to be type of object literal (i.e. Point)
45 // dx, dy, and return type of add inferred using target typing
DswitchCaseNarrowsMatchingClausesEvenWhenNonMatchingClausesExist.symbols10 // inferred type as `abc`
28 // inferred type should be `abc`
53 // inferred type should be `abc`
60 // inferred type should be `number`
DdeclarationEmitExportAssignedNamespaceNoTripleSlashTypesReference.symbols55 === tests/cases/compiler/src/inferred-comp-export.ts ===
57 >getComp : Symbol(getComp, Decl(inferred-comp-export.ts, 0, 8))
62 >obj : Symbol(obj, Decl(inferred-comp-export.ts, 4, 12))
65 >comp : Symbol(comp, Decl(inferred-comp-export.ts, 4, 20))
66 >getComp : Symbol(getComp, Decl(inferred-comp-export.ts, 0, 8))
DtargetTypeTest1.types26 // Because Point is a constructor function, this is inferred
27 // to be Point and return type is inferred to be void
80 // this inferred as Point because of obj.prop assignment
81 // dx, dy, and return type inferred using target typing
113 // Object literal type inferred using target typing
114 // this in function add inferred to be type of object literal (i.e. Point)
115 // dx, dy, and return type of add inferred using target typing
DtargetTypeTest1.symbols28 // Because Point is a constructor function, this is inferred
29 // to be Point and return type is inferred to be void
66 // this inferred as Point because of obj.prop assignment
67 // dx, dy, and return type inferred using target typing
87 // Object literal type inferred using target typing
88 // this in function add inferred to be type of object literal (i.e. Point)
89 // dx, dy, and return type of add inferred using target typing
DpropagationOfPromiseInitialization.symbols25 >foo.then((x) => { // x is inferred to be a number return "asdf";}).then : Symbol(IPromise.th…
31 // x is inferred to be a number
37 // x is inferred to be string
DdeclarationEmitExpressionWithNonlocalPrivateUniqueSymbol.errors.txt1 tests/cases/compiler/b.ts(2,14): error TS2527: The inferred type of 'A1' references an inaccessible…
11 !!! error TS2527: The inferred type of 'A1' references an inaccessible 'unique symbol' type. A type…
DinferenceShouldFailOnEvolvingArrays.errors.txt19 z = logLength(42); // no error; T is inferred as `any`
31 zz.push(logLength(42)); // no error; T is inferred as `any`
34 zz = logFirstLength([42]); // no error; T is inferred as `any[]`
DhugeDeclarationOutputGetsTruncatedWithError.errors.txt1 …hugeDeclarationOutputGetsTruncatedWithError.ts(5,14): error TS7056: The inferred type of this node…
11 !!! error TS7056: The inferred type of this node exceeds the maximum length the compiler will seria…
DconstructorOverloads7.errors.txt17 // Because Point is a constructor function, this is inferred
18 // to be Point and return type is inferred to be void
DarrayFakeFlatNoCrashInferenceDeclarations.errors.txt1 …/arrayFakeFlatNoCrashInferenceDeclarations.ts(13,10): error TS5088: The inferred type of 'foo' ref…
19 !!! error TS5088: The inferred type of 'foo' references a type with a cyclic structure which cannot…
DbigintWithoutLib.symbols18 bigintVal = bigintVal.valueOf(); // should error - bigintVal inferred as {}
24 let stringVal: string = bigintVal.toString(); // should not error - bigintVal inferred as {}
30 stringVal = bigintVal.toString(2); // should error - bigintVal inferred as {}
36 stringVal = bigintVal.toLocaleString(); // should not error - bigintVal inferred as {}
42 stringVal = bigintVal.toLocaleString('de-DE'); // should not error - bigintVal inferred as {}
48 …tVal.toLocaleString('de-DE', { style: 'currency' }); // should not error - bigintVal inferred as {}
55 …ing('de-DE', { style: 'currency', currency: 'EUR' }) // should not error - bigintVal inferred as {}
DbigintWithoutLib.types43 bigintVal = bigintVal.valueOf(); // should error - bigintVal inferred as {}
51 let stringVal: string = bigintVal.toString(); // should not error - bigintVal inferred as {}
58 stringVal = bigintVal.toString(2); // should error - bigintVal inferred as {}
67 stringVal = bigintVal.toLocaleString(); // should not error - bigintVal inferred as {}
75 stringVal = bigintVal.toLocaleString('de-DE'); // should not error - bigintVal inferred as {}
84 …tVal.toLocaleString('de-DE', { style: 'currency' }); // should not error - bigintVal inferred as {}
96 …ing('de-DE', { style: 'currency', currency: 'EUR' }) // should not error - bigintVal inferred as {}
DinferenceShouldFailOnEvolvingArrays.types28 z = logLength(42); // no error; T is inferred as `any`
63 zz.push(logLength(42)); // no error; T is inferred as `any`
72 zz = logFirstLength([42]); // no error; T is inferred as `any[]`
DconstructorOverloads7.types26 // Because Point is a constructor function, this is inferred
27 // to be Point and return type is inferred to be void
DdeclarationEmitCommonJsModuleReferencedType.errors.txt1 tests/cases/compiler/r/entry.ts(3,14): error TS2742: The inferred type of 'x' cannot be named witho…
26 !!! error TS2742: The inferred type of 'x' cannot be named without a reference to 'foo/node_modules…
DinferenceShouldFailOnEvolvingArrays.symbols32 z = logLength(42); // no error; T is inferred as `any`
64 zz.push(logLength(42)); // no error; T is inferred as `any`
70 zz = logFirstLength([42]); // no error; T is inferred as `any[]`
DconstructorOverloads7.symbols28 // Because Point is a constructor function, this is inferred
29 // to be Point and return type is inferred to be void
/third_party/mindspore/tests/ut/cpp/pipeline/static_analysis/
Dprim_test.cc142 AbstractBasePtr res = engine_->Run(func_graph, args_spec_list).inferred->abstract(); in TEST_F()
167 AbstractBasePtr res = engine_->Run(func_graph, args_spec_list).inferred->abstract(); in TEST_F()
192 AbstractBasePtr res = engine_->Run(func_graph, args_spec_list).inferred->abstract(); in TEST_F()
209 AbstractBasePtr res = engine_->Run(func_graph, args_spec_list).inferred->abstract(); in TEST_F()
227 AbstractBasePtr res = engine_->Run(func_graph, args_spec_list).inferred->abstract(); in TEST_F()
243 AbstractBasePtr res = engine_->Run(func_graph, args_spec_list).inferred->abstract(); in TEST_F()
283 AbstractBasePtr res = engine_->Run(func_graph, args_spec_list).inferred->abstract(); in TEST_F()
304 AbstractBasePtr res = engine_->Run(func_graph, args_spec_list).inferred->abstract(); in TEST_F()
317 AbstractBasePtr res = engine_->Run(func_graph, args_spec_list).inferred->abstract(); in TEST_F()
330 AbstractBasePtr res = engine_->Run(func_graph, args_spec_list).inferred->abstract(); in TEST_F()
[all …]
Dstatic_analysis_test.cc167 AbstractBasePtr abs_base_got = engine_->Run(func_graph, args_spec_list).inferred->abstract(); in TEST_F()
265 AbstractBasePtr abs_base_got = engine_->Run(graph_f_, args_spec_list).inferred->abstract(); in TEST_F()
276 abs_base_got = engine_->Run(graph_alpha_, args_spec_list).inferred->abstract(); in TEST_F()
362 AbstractBasePtr abs_base_got = engine_->Run(func_graph_, args_spec_list).inferred->abstract(); in TEST_F()
394 AbstractBasePtr abs_base_got = engine_->Run(func_graph, args_spec).inferred->abstract(); in TEST_F()
/third_party/mindspore/tests/ut/cpp/operator/
Dcomposite_test.cc162 …t = dyn_cast<AbstractTuple>(engine_->Run(tupleSliceGraphPtr, args_spec_list).inferred->abstract()); in TEST_F()
188 …t = dyn_cast<AbstractTuple>(engine_->Run(tupleSliceGraphPtr, args_spec_list).inferred->abstract()); in TEST_F()
214 …t = dyn_cast<AbstractTuple>(engine_->Run(tupleSliceGraphPtr, args_spec_list).inferred->abstract()); in TEST_F()
240 …t = dyn_cast<AbstractTuple>(engine_->Run(tupleSliceGraphPtr, args_spec_list).inferred->abstract()); in TEST_F()
267 …t = dyn_cast<AbstractTuple>(engine_->Run(unPackCallGraphPtr, args_spec_list).inferred->abstract()); in TEST_F()
294 …t = dyn_cast<AbstractTuple>(engine_->Run(unPackCallGraphPtr, args_spec_list).inferred->abstract()); in TEST_F()
316 …Ptr ret = dyn_cast<AbstractTuple>(engine_->Run(zip_op_graph, args_spec_list).inferred->abstract()); in TEST_F()
/third_party/typescript_eslint/packages/eslint-plugin/docs/rules/
Dno-inferrable-types.md3 Explicit types where they can be easily inferred may add unnecessary verbosity.
8 and properties where the type can be easily inferred from its value.
138 If you do not want to enforce inferred types.

123456789