diff --git "a/level-00/0.1-\354\236\220\353\243\214\355\230\225-\355\203\200\354\236\205\355\214\220\353\263\204/solution.ts" "b/level-00/0.1-\354\236\220\353\243\214\355\230\225-\355\203\200\354\236\205\355\214\220\353\263\204/solution.ts" index 2764343..62f5816 100644 --- "a/level-00/0.1-\354\236\220\353\243\214\355\230\225-\355\203\200\354\236\205\355\214\220\353\263\204/solution.ts" +++ "b/level-00/0.1-\354\236\220\353\243\214\355\230\225-\355\203\200\354\236\205\355\214\220\353\263\204/solution.ts" @@ -8,16 +8,12 @@ * @example * solution(42) // => "number" */ -export type TypeName = - | "number" - | "string" - | "boolean" - | "array" - | "object" - | "null" - | "undefined"; +export type TypeName = "number" | "string" | "boolean" | "array" | "object" | "null" | "undefined"; export function solution(value: unknown): TypeName { - // TODO: 구현하세요 - throw new Error("아직 구현되지 않았습니다"); + if (value === null) return "null"; + + if (Array.isArray(value)) return "array"; + + return typeof value as TypeName; }