建议用枚举来描述enum SizeType { L = 'Large', M = 'Medium', S = 'Small' } class Demo { public getSize(size: SizeType): void { console.log(size); } }
建议用枚举来描述