This commit is contained in:
syneff
2025-06-11 15:56:52 +09:00
parent 7759fd246e
commit 40cec0dae1
8 changed files with 104 additions and 1 deletions

10
ts_playground/08-record.ts Executable file
View File

@@ -0,0 +1,10 @@
type statusCode = "OK" | "ERROR" | "NOT_FOUND";
// 매핑
const statMessage: Record<statusCode, string> = {
OK: "정상 처리",
ERROR: "에러 발생",
NOT_FOUND: "찾을 수 없음"
};
console.log(statMessage.NOT_FOUND);