더북(TheBook)
let a: any;
let unk: unknown;
let obj: {} = {};
let vo: void = undefined;
let und: undefined = undefined;
let nl: null = null;
let nev: never;

unk = a;
obj = a;
vo = a;
und = a;
nl = a;
nev = a; 
// Type 'any' is not assignable to type 'never'.

a = unk;
obj = unk; 
// Type 'unknown' is not assignable to type ‘{}’.
vo = unk;  
// Type 'unknown' is not assignable to type 'void'.
und = unk; 
// Type 'unknown' is not assignable to type 'undefined'.
nl = unk;  
// Type 'unknown' is not assignable to type 'null'.
nev = unk; 
// Type 'unknown' is not assignable to type 'never'.
신간 소식 구독하기
뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.