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, +};