; //type T1 = "string" type T2 = TypeName<() => void>; // function //type T2 = "function""> ; //type T1 = "string" type T2 = TypeName<() => void>; // function //type T2 = "function""> ; //type T1 = "string" type T2 = TypeName<() => void>; // function //type T2 = "function"">
*// #1*
type Check<T> = T extends string ? boolean : number;
type Type = Check<string>; *// boolean*

*// #2*
type TypeName<T> = T extends string
  ? 'string'
  : T extends number
  ? 'number'
  : T extends boolean
  ? 'boolean'
  : T extends undefined
  ? 'undefined'
  : T extends Function
  ? 'function'
  : 'object';

type T0 = TypeName<string>;
*//type T0 = "string"*
type T1 = TypeName<'a'>;
*//type T1 = "string"*
type T2 = TypeName<() => void>; // function
*//type T2 = "function"*