TypeScript

· TypeScript
📌 Exclude유니언 타입에서 특정 타입을 제거할 때 사용하는 유틸리티 타입.유니언 타입은 여러 타입 중 하나가 될 수 있는 값을 의미한다.type Fruit = 'apple' | 'banana' | 'orange'type MyFruit = Exclude // 'apple' | 'banana'MyFruit는 orange를 제외한 apple과 banana를 타입으로 가집니다. 📌 Omit객체 타입에서 특정 속성을 제거한 새로운 타입을 생성하는 유틸리티 타입.type Person = { name: string; age: number; email: string;};type PersonName = Omit; // { name: string }PersonName은 age, email 속성이 제거된 { ..
· TypeScript
// theme.tsexport const theme = { colors: { blueGrey: colors.blueGrey, red: colors.red, },};// colors.tsexport const colors = { blueGrey: { 50: '#F9FAFB', 100: '#EBEEF2', 200: '#CED5DF', 300: '#B2BECC', 400: '#95A7BA', 500: '#788DA3', 600: '#627384', 700: '#53616F', 800: '#434D58', 900: '#323941', }, red: { 300: '#FFA59B', 600: '#D62D36', 700: '#..
presentKey
'TypeScript' 카테고리의 글 목록