Searched refs:ZeroOf (Results 1 – 5 of 5) sorted by relevance
/third_party/typescript/tests/baselines/reference/ |
D | conditionalTypes1.types | 403 type ZeroOf<T extends number | string | boolean> = T extends number ? 0 : T extends string ? "" : f… 404 >ZeroOf : ZeroOf<T> 408 >zeroOf : <T extends string | number | boolean>(value: T) => ZeroOf<T> 411 return <ZeroOf<T>>(typeof value === "number" ? 0 : typeof value === "string" ? "" : false); 412 ><ZeroOf<T>>(typeof value === "number" ? 0 : typeof value === "string" ? "" : false) : ZeroOf<T> 438 >zeroOf : <T extends string | number | boolean>(value: T) => ZeroOf<T> 443 >zeroOf : <T extends string | number | boolean>(value: T) => ZeroOf<T> 448 >zeroOf : <T extends string | number | boolean>(value: T) => ZeroOf<T> 453 >zeroOf : <T extends string | number | boolean>(value: T) => ZeroOf<T> 458 >zeroOf : <T extends string | number | boolean>(value: T) => ZeroOf<T> [all …]
|
D | conditionalTypes1.errors.txt | 57 tests/cases/conformance/types/conditional/conditionalTypes1.ts(159,5): error TS2322: Type 'ZeroOf<T… 58 …'ZeroOf<T>' is assignable to the constraint of type 'T', but 'T' could be instantiated with a diff… 61 …ditional/conditionalTypes1.ts(160,5): error TS2322: Type 'T' is not assignable to type 'ZeroOf<T>'. 62 Type 'string | number' is not assignable to type 'ZeroOf<T>'. 63 Type 'string' is not assignable to type 'ZeroOf<T>'. 284 …type ZeroOf<T extends number | string | boolean> = T extends number ? 0 : T extends string ? "" : … 287 return <ZeroOf<T>>(typeof value === "number" ? 0 : typeof value === "string" ? "" : false); 297 zeroOf(y); // ZeroOf<T> 300 function f21<T extends number | string>(x: T, y: ZeroOf<T>) { 305 !!! error TS2322: Type 'ZeroOf<T>' is not assignable to type 'T'. [all …]
|
D | conditionalTypes1.js | 141 type ZeroOf<T extends number | string | boolean> = T extends number ? 0 : T extends string ? "" : f… 144 return <ZeroOf<T>>(typeof value === "number" ? 0 : typeof value === "string" ? "" : false); 157 function f21<T extends number | string>(x: T, y: ZeroOf<T>) { 568 type ZeroOf<T extends number | string | boolean> = T extends number ? 0 : T extends string ? "" : f… 569 declare function zeroOf<T extends number | string | boolean>(value: T): ZeroOf<T>; 571 declare function f21<T extends number | string>(x: T, y: ZeroOf<T>): void;
|
D | conditionalTypes1.symbols | 535 type ZeroOf<T extends number | string | boolean> = T extends number ? 0 : T extends string ? "" : f… 536 >ZeroOf : Symbol(ZeroOf, Decl(conditionalTypes1.ts, 137, 1)) 547 return <ZeroOf<T>>(typeof value === "number" ? 0 : typeof value === "string" ? "" : false); 548 >ZeroOf : Symbol(ZeroOf, Decl(conditionalTypes1.ts, 137, 1)) 584 zeroOf(y); // ZeroOf<T> 589 function f21<T extends number | string>(x: T, y: ZeroOf<T>) { 595 >ZeroOf : Symbol(ZeroOf, Decl(conditionalTypes1.ts, 137, 1))
|
/third_party/typescript/tests/cases/conformance/types/conditional/ |
D | conditionalTypes1.ts | 143 type ZeroOf<T extends number | string | boolean> = T extends number ? 0 : T extends string ? "" : f… alias 146 return <ZeroOf<T>>(typeof value === "number" ? 0 : typeof value === "string" ? "" : false); 159 function f21<T extends number | string>(x: T, y: ZeroOf<T>) {
|