typescript-tutorial icon indicating copy to clipboard operation
typescript-tutorial copied to clipboard

TypeScript 入门教程

Results 79 typescript-tutorial issues
Sort by recently updated
recently updated
newest added
trafficstars

![image](https://user-images.githubusercontent.com/5680712/126904621-137f3979-4d1e-4667-9335-5b622f4a7ce8.png) 该页”类型断言的限制“里相同的代码已经说了两者相互兼容,为何下面就不兼容了?

https://ts.xcatliu.com/basics/declaration-files.html

Gitalk
basics/declaration-files.html

## 用接口定义函数的形状 我们也可以使用接口的方式来定义一个函数需要符合的形状: ```ts interface SearchFunc { (source: string, subString: string): boolean; } let mySearch: SearchFunc; mySearch = function (source: string, subString: string) { return source.search(subString) !== -1; }; ```...

ts-node 报错 ![图片](https://user-images.githubusercontent.com/8848263/142583451-76fe0d6b-c989-4b2e-9638-6cb37ca6b8e8.png)

https://ts.xcatliu.com/basics/type-of-array.html

Gitalk
basics/type-of-array.html

[章节地址](https://github.com/xcatliu/typescript-tutorial/blob/master/basics/type-of-object-interfaces.md) ```ts interface Person { name: string; age?: number; [propName: string]: string; } let tom: Person = { name: 'Tom', age: 25, gender: 'male' }; // index.ts(3,5): error TS2411: Property...

目录中漏了一页文章,为什么选择 TypeScript https://github.com/xcatliu/typescript-tutorial/blob/aac1467ac2dd7d49add3a693e53f84e43731eaf4/pagic.config.tsx https://github.com/xcatliu/typescript-tutorial/blob/master/introduction/why-typescript.md https://github.com/xcatliu/typescript-tutorial/blob/master/introduction/README.md

https://ts.xcatliu.com/basics/type-assertion.html

Gitalk
basics/type-assertion.html