TypeScript学习

1. <>一种为泛型,作为类型模板

另一种如下表示类型转换( Type Assertion or casting)

let square = <Square>{};
let square = {} as Square;

2. 函数完整形式:参数列表 => 返回类型 = 函数体,...args: 数组表示任意个数的参数

const Inject: (...args: any[]) => any = ioc.Inject;

3. 依赖注入typescript-ioc

github:IoC Container for Typescript 

中文博客

原文地址:https://www.cnblogs.com/demian/p/10392180.html