Skip to content
大纲

一些列子

文本字符串提示

提示字符串联合类型中的值但又不限制:

ts
type ColorType = "red" | "green" | "blue" | (string & {});

const color1: ColorType = 'blue';
const color2: ColorType = '#fff';