로딩
요청 처리 중입니다...

readonly, as const

 readonly, as const

class Layer { id!: string; name!

: string; x: number = 0; y: number = 0; width: number = 0; height: number = 0; } const LAYER_DATA_INITIALIZE_INCLUDE_KEYS: ReadonlyArray = [ 'x', 'y', 'width', 'height' ]; const x = LAYER_DATA_INITIALIZE_INCLUDE_KEYS[0]; // "id" | "name" | "x" | "y" | "width" | "height"; const LAYER_DATA_INITIALIZE_EXCLUDE_KEYS = ["id", "name"] as const; const id = LAYER_DATA_INITIALIZE_EXCLUDE_KEYS[0]; // "id" ReadonlyArray const weekdays: ReadonlyArray = ...

# as # asconst # const # MappedTypes # ReadonlyArray # TypeScript # 타입스크립트

원문 링크 : readonly, as const