TypeScript之定义类型 ( type )

键值对结构的对象

export type ValidationErrors = {
[key: string]: any
};

联合类型(union type)

export type HttpEvent<T> =
HttpSentEvent | HttpHeaderResponse | HttpResponse<T>| HttpProgressEvent | HttpUserEvent<T>;
上一篇:python趣味 ——奇葩的全局形参


下一篇:1、Netty 实战入门详解