<aside> 📌 타입을 값으로 쓸 수는 없고, 값을 타입으로는 쓸 수 있거나/ 없거나

</aside>

리터럴 값은 타입으로 쓸 수 있다.

const title: 'Lee' = 'Lee';

변수의 이름은 타입으로 쓸 수 없다.

const title: 'Lee' = 'Lee';
const myName: title = 'Lee'; // 'title' refers to a value, but is being used as a type here.

내장 객체 (Date, Math, Error)는 타입으로 쓸 수 있다.

const date: Date = new Date();
const math: Math = Math;

클래스는 타입으로 쓸 수 있다.

class Person {
	name: string;
	constructor(name: string) {
		this.name = name;
	}
}
const person: Person = new Person('Lee');