From dbe0d04a7f5db72cb8768042dd3b6079bae1bf4f Mon Sep 17 00:00:00 2001 From: Daiki Maekawa Date: Sun, 17 Dec 2023 17:41:39 +0900 Subject: [PATCH] =?UTF-8?q?=E5=9E=8B=E3=82=92=E5=88=87=E3=82=8A=E5=87=BA?= =?UTF-8?q?=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sample.ts | 5 +---- type.ts | 4 ++++ 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 type.ts diff --git a/sample.ts b/sample.ts index d042d8b..77d4b6d 100644 --- a/sample.ts +++ b/sample.ts @@ -1,7 +1,4 @@ -type SampleType = { - id: number; - name: string; -} +import { SampleType } from "./type"; const Sample = ({ id, name }: SampleType) => { console.log(id, name); diff --git a/type.ts b/type.ts new file mode 100644 index 0000000..f85eae5 --- /dev/null +++ b/type.ts @@ -0,0 +1,4 @@ +export type SampleType = { + id: number; + name: string; +} \ No newline at end of file