From ca19dedd583dac9a5820de6e211f8149f6bce50a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=86=B7=E1=84=83=E1=85=A9=E1=86=BC?= =?UTF-8?q?=E1=84=8B=E1=85=A7=E1=86=BC?= Date: Wed, 8 Jul 2026 12:12:23 +0900 Subject: [PATCH] =?UTF-8?q?11=EA=B8=B0=20=EC=9E=84=EB=8F=99=EC=98=81=200.1?= =?UTF-8?q?=20=EC=9E=90=EB=A3=8C=ED=98=95=20=ED=83=80=EC=9E=85=20=ED=8C=90?= =?UTF-8?q?=EB=B3=84=20=EB=AC=B8=EC=A0=9C=20=ED=92=80=EC=9D=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../solution.ts" | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) 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; }