Complete the code to define a nested conditional type that returns 'string' if T is 'number', otherwise 'boolean'.
type NestedType<T> = T extends number ? [1] : boolean;The nested conditional type returns string when T extends number, otherwise boolean.
Complete the nested conditional type to return 'true' if T is 'string', else check if T is 'boolean' and return 'false', otherwise 'never'.
type CheckType<T> = T extends string ? true : T extends boolean ? [1] : never;The nested conditional checks if T is string returning true, else if T is boolean returning false, otherwise never.
Fix the error in the nested conditional type to correctly return 'number' if T is 'string', else 'string' if T is 'number', otherwise 'boolean'.
type FixType<T> = T extends string ? [1] : T extends number ? string : boolean;The type should return number when T is string, so the first true branch is number.
Fill both blanks to create a nested conditional type that returns 'true' if T is 'string', 'false' if T is 'number', otherwise 'never'.
type BooleanCheck<T> = T extends string ? [1] : T extends number ? [2] : never;
The type returns true for string, false for number, and never otherwise.
Fill all three blanks to define a nested conditional type that returns the uppercase string of T if T is 'string', returns T if T is 'number', otherwise returns 'unknown'.
type Transform<T> = T extends string ? [1] : T extends number ? [2] : [3];
Uppercase for strings.The type uses Uppercase<T> for strings, returns T for numbers, and unknown otherwise.