From 94cf7bbe658b28d982103e5ef1d710db0641db5d Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Thu, 9 Mar 2023 18:17:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=B8=80=E4=B8=8Brecord?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/ts-practice/src/type.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 code/ts-practice/src/type.ts diff --git a/code/ts-practice/src/type.ts b/code/ts-practice/src/type.ts new file mode 100644 index 0000000..20bf716 --- /dev/null +++ b/code/ts-practice/src/type.ts @@ -0,0 +1,20 @@ +/* + * @Author: Kane + * @Date: 2023-03-09 17:04:12 + * @LastEditors: Kane + * @FilePath: /ts-practice/src/type.ts + * @Description: + * + * Copyright (c) ${2022} by Kane, All Rights Reserved. + */ + +type K = (number | string); +type T = string | number | boolean; +type R = Record; + +const test: R = { + x: 2, + a: 1, + b: true, + 1: 2, +};