/third_party/typescript/tests/baselines/reference/ |
H A D | inDoesNotOperateOnPrimitiveTypes.js | 3 thing: T, 6 return key in thing; // Ok 10 thing: T, 13 return key in thing; // Ok (as T may be instantiated with a valid type) 17 thing: T, 20 return key in thing; // Error (because all possible instantiations are errors) 23 function union1<T extends string | number, U extends boolean>(thing: T | U) { 24 "key" in thing; // Error (because all possible instantiations are errors) 27 function union2<T extends object, U extends string | number>(thing: T | U) { 28 "key" in thing; // Erro [all...] |
H A D | privateNameAndAny.js | 6 method(thing: any) { 7 thing.#foo; // OK 8 thing.#m(); 9 thing.#baz; 10 thing.#bar; // Error 11 thing.#foo(); 13 methodU(thing: unknown) { 14 thing.#foo; 15 thing.#m(); 16 thing [all...] |
H A D | logicalAssignment4(target=es2015).js | 25 function doSomethingWithAlias(thing: ThingWithOriginal | undefined, defaultValue: ThingWithOriginal | undefined) { 27 if (thing &&= thing.original) { 28 thing.name; 32 if (thing &&= defaultValue) { 33 thing.name; 38 if (thing ||= defaultValue) { 39 thing.name; 44 if (thing ??= defaultValue) { 45 thing [all...] |
H A D | logicalAssignment4(target=es2020).js | 25 function doSomethingWithAlias(thing: ThingWithOriginal | undefined, defaultValue: ThingWithOriginal | undefined) { 27 if (thing &&= thing.original) { 28 thing.name; 32 if (thing &&= defaultValue) { 33 thing.name; 38 if (thing ||= defaultValue) { 39 thing.name; 44 if (thing ??= defaultValue) { 45 thing [all...] |
H A D | logicalAssignment4(target=es2021).js | 25 function doSomethingWithAlias(thing: ThingWithOriginal | undefined, defaultValue: ThingWithOriginal | undefined) { 27 if (thing &&= thing.original) { 28 thing.name; 32 if (thing &&= defaultValue) { 33 thing.name; 38 if (thing ||= defaultValue) { 39 thing.name; 44 if (thing ??= defaultValue) { 45 thing [all...] |
H A D | logicalAssignment4(target=esnext).js | 25 function doSomethingWithAlias(thing: ThingWithOriginal | undefined, defaultValue: ThingWithOriginal | undefined) { 27 if (thing &&= thing.original) { 28 thing.name; 32 if (thing &&= defaultValue) { 33 thing.name; 38 if (thing ||= defaultValue) { 39 thing.name; 44 if (thing ??= defaultValue) { 45 thing [all...] |
H A D | lambdaParamTypes.js | 9 var thing = create([{ name: "bob", id: 24 }, { name: "doug", id: 32 }]); variable 12 thing.doSomething((x, y) => x.name.charAt(0)); // x.name should be string, so should be OK 13 thing.doSomething((x, y) => x.id.toExponential(0)); // x.id should be string, so should be OK 14 thing.doSomething((x, y) => y.name.charAt(0)); // x.name should be string, so should be OK 15 thing.doSomething((x, y) => y.id.toExponential(0)); // x.id should be string, so should be OK 18 thing.doSomething((x, y) => x.foo); // no such property on x 19 thing.doSomething((x, y) => y.foo); // no such property on y 20 thing.doSomething((x, y) => x.id.charAt(0)); // x.id should be number, no charAt member 21 thing.doSomething((x, y) => x.name.toExponential(0)); // x.name should be string, no toExponential member 22 thing 27 var thing = create([{ name: "bob", id: 24 }, { name: "doug", id: 32 }]); global() variable [all...] |
H A D | controlFlowInstanceOfGuardPrimitives.js | 2 function distinguish(thing: string | number | Date) { 3 if (thing instanceof Object) { 4 console.log("Aha!! It's a Date in " + thing.getFullYear()); 5 } else if (typeof thing === 'string') { 6 console.log("Aha!! It's a string of length " + thing.length); 8 console.log("Aha!! It's the number " + thing.toPrecision(3)); 17 function distinguish(thing) {
18 if (thing instanceof Object) {
19 console.log("Aha!! It's a Date in " + thing.getFullYear());
21 else if (typeof thing [all...] |
H A D | spreadExpressionContextualTypeWithNamespace.js | 23 const thing = { ...stuff }; 24 thing.func; 25 thing.klass; 26 thing.obj; 27 thing.exportedDirectly; 28 return thing; 74 var thing = __assign({}, stuff);
75 thing.func;
76 thing.klass;
77 thing [all...] |
H A D | mixinClassesAnonymous.js | 37 const thing = new Thing1(1, 2, 3); 38 thing.x; 39 thing._tag; 43 const thing = new Thing2(1, 2, 3); 44 thing.x; 45 thing._tag; 46 thing.print(); 132 var thing = new Thing1(1, 2, 3);
133 thing.x;
134 thing [all...] |
H A D | controlFlowDestructuringLoop.js | 13 for (const thing of things) { 14 if (isNumVal(thing)) { 15 const { val } = thing; 19 const { val } = thing; 33 var thing = things_1[_i];
34 if (isNumVal(thing)) {
35 var val = thing.val;
39 var val = thing.val;
|
H A D | genericCapturingFunctionNarrowing.js | 2 function needsToNarrowTheType<First extends { foo: string }, Second extends { bar: string }, SubFirst extends First, SubFirstMore extends First & {other: string}>(thing: First | SubFirst | SubFirstMore | Second) { 3 if (hasAFoo(thing)) { 4 console.log(thing.foo); 8 console.log(thing.bar); // Error: Property 'bar' does not exist on type 'First | Second'. 17 function needsToNarrowTheType(thing) {
18 if (hasAFoo(thing)) {
19 console.log(thing.foo);
23 console.log(thing.bar); // Error: Property 'bar' does not exist on type 'First | Second'.
|
H A D | mixinClassesAnnotated.js | 46 const thing = new Thing1(1, 2, 3); 47 thing.x; 48 thing._tag; 52 const thing = new Thing2(1, 2, 3); 53 thing.x; 54 thing._tag; 55 thing.print(); 133 var thing = new Thing1(1, 2, 3);
134 thing.x;
135 thing [all...] |
H A D | referenceTypesPreferedToPathIfPossible.js | 10 export const thing = () => parse(); 16 exports.thing = void 0;
18 var thing = function () { return (0, url_1.parse)(); };
function 19 exports.thing = thing;
24 export declare const thing: () => import("url").Url;
|
H A D | jsDeclarationsTypeReferences.js | 12 const thing = new Something(); 15 thing 22 var thing = new Something();
24 thing: thing
30 export const thing: Something;
|
H A D | declarationEmitUnnessesaryTypeReferenceNotAdded.js | 4 declare namespace thing { 7 declare function thing(x: any): thing.ParsedArgs; 8 export = thing;
16 declare const thing: any; 17 export = thing;
|
H A D | jsDeclarationsTypeReferences2.js | 12 const thing = a + m 15 thing 29 var thing = a + m;
variable 31 thing: thing
41 export const thing: number;
|
H A D | classExtendingClass.js | 4 thing() { } 15 var r3 = d.thing(); 20 thing(x: T) { } 31 var r7 = d2.thing(''); 53 C.prototype.thing = function () { };
67 var r3 = d.thing();
72 C2.prototype.thing = function (x) { };
86 var r7 = d2.thing('');
|
H A D | jsDeclarationsTypeReferences4.js | 15 const thing = new Something(); 17 export { thing }; 35 var thing = new Something();
45 export { thing };
46 export const thing: import("fs").Something;
|
H A D | nonInferrableTypePropagation1.js | 2 type Op<I, O> = (thing: Thing<I>) => Thing<O>; 12 declare const thing: Thing<number>; 20 const result1 = createAndUnbox(() => thing.pipe( 25 const result2 = createAndUnbox(() => thing.pipe( 33 var result1 = createAndUnbox(function () { return thing.pipe(map(function (data) { return box(data); }), tap(function (v) { return log(v); })); });
34 var result2 = createAndUnbox(function () { return thing.pipe(tap(function (v) { return log(v); }), map(function (data) { return box(data); })); });
|
/third_party/curl/tests/ |
H A D | testutil.pm | 107 my ($thing) = @_; 110 while($$thing =~ s/%b64\[(.*?)\]b64%/%%B64%%/i) { 116 $$thing =~ s/%%B64%%/$enc/; 119 while($$thing =~ s/%hex\[(.*?)\]hex%/%%HEX%%/i) { 123 $$thing =~ s/%%HEX%%/$d/; 126 while($$thing =~ s/%repeat\[(\d+) x (.*?)\]%/%%REPEAT%%/i) { 131 $$thing =~ s/%%REPEAT%%/$all/; 135 $$thing =~ s/%include ([^%]*)%[\n\r]+/includefile($1)/ge; 140 my ($force, $thing) = @_; 144 $$thing [all...] |
/third_party/protobuf/src/google/protobuf/stubs/ |
H A D | statusor_test.cc | 72 StatusOr<int> thing; in TEST() local 73 EXPECT_FALSE(thing.ok()); in TEST() 74 EXPECT_EQ(Status::UNKNOWN, thing.status()); in TEST() 78 StatusOr<int> thing(Status::CANCELLED); in TEST() 79 EXPECT_FALSE(thing.ok()); in TEST() 80 EXPECT_EQ(Status::CANCELLED, thing.status()); in TEST() 85 StatusOr<int> thing(kI); in TEST() 86 EXPECT_TRUE(thing.ok()); in TEST() 87 EXPECT_EQ(kI, thing.ValueOrDie()); in TEST() 160 StatusOr<int> thing(k in TEST() 171 StatusOr<int*> thing; TEST() local [all...] |
/third_party/protobuf/js/ |
H A D | debug.js | 72 * @param {?} thing A jspb.Message, Array or primitive type to dump. 76 jspb.debug.dump_ = function(thing) { 77 var type = goog.typeOf(thing); 78 var message = thing; // Copy because we don't want type inference on thing. 81 return thing; 86 return thing; 91 goog.asserts.assertArray(thing); 92 return goog.array.map(thing, jspb.debug.dump_); 105 'Only messages expected: ' + thing); [all...] |
/third_party/rust/crates/io-lifetimes/examples/ |
H A D | owning-wrapper.rs | 130 let thing = Thing::from_into_fd(file); in main() 131 let _ = thing.as_fd(); in main() 132 let _: OwnedFd = thing.into(); in main() 139 let thing = Thing::from_into_handle(file); in main() 140 let _ = thing.as_handle(); in main() 141 let _: OwnedHandle = thing.into(); in main() 148 let thing = Thing::from_into_filelike(file); in main() 149 let _ = thing.as_filelike(); in main() 150 let _ = thing.into_filelike(); in main()
|
/third_party/skia/third_party/externals/abseil-cpp/absl/status/ |
H A D | statusor_test.cc | 234 absl::StatusOr<std::unique_ptr<int>> thing(ReturnUniquePtr()); in TEST() 235 ASSERT_TRUE(thing.ok()); in TEST() 236 EXPECT_EQ(0, **thing); in TEST() 237 int* previous = thing->get(); in TEST() 239 thing = ReturnUniquePtr(); in TEST() 240 EXPECT_TRUE(thing.ok()); in TEST() 241 EXPECT_EQ(0, **thing); in TEST() 242 EXPECT_NE(previous, thing->get()); in TEST() 246 absl::StatusOr<std::unique_ptr<int>> thing(ReturnUniquePtr()); in TEST() 247 ASSERT_TRUE(thing in TEST() 293 absl::StatusOr<int> thing; TEST() local 367 absl::StatusOr<int> thing; TEST() local 384 absl::StatusOr<int*> thing; TEST() local 1336 absl::StatusOr<int*> thing; TEST() local [all...] |