Home
last modified time | relevance | path

Searched refs:ZeroOf (Results 1 – 5 of 5) sorted by relevance

/third_party/typescript/tests/baselines/reference/
DconditionalTypes1.types403 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 …]
DconditionalTypes1.errors.txt57 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 …]
DconditionalTypes1.js141 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;
DconditionalTypes1.symbols535 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/
DconditionalTypes1.ts143 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>) {