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

环境:macOS Catalina 10.15.7 IDE 环境:VSCode node v12.18.0 typescript 4.0.3 ![image](https://user-images.githubusercontent.com/12461699/103740320-f9d46d00-5031-11eb-8766-291b9fc994f8.png)

https://ts.xcatliu.com/advanced/declaration-merging.html

Gitalk
advanced/declaration-merging.html

https://ts.xcatliu.com/advanced/tuple.html

Gitalk
advanced/tuple.html

> 106 | let num: number = undefined; | ^^^ 经过测试已经开始报错了,可能版本升级原因 https://ts.xcatliu.com/basics/primitive-data-types.html

我看一些文章说namespace中的成员要加上`export`关键字才能被外界访问到,好像这个教程中没有加,也没有提到这一点。是否是错误呢? ```javascript export namespace foo { const name: string; namespace bar { function baz(): string; } } ```

https://ts.xcatliu.com/advanced/enum.html

Gitalk
advanced/enum.html

https://ts.xcatliu.com/introduction/index.html

Gitalk
introduction/index.html

在範例 examples/declaration-files 的第三個範例 03-jquery-d-ts 中,在 tsconfig.json 內的 files option 無法讓 TypeScript compiler 知道全域的 jQuery 方法的宣告。 ``` // tsconfig.json { "files": ["src/index.ts", "src/jQuery.d.ts"] } ``` 錯誤訊息: ``` index.ts:1:1 - error TS2304:...

我在[這頁](https://github.com/xcatliu/typescript-tutorial/blob/master/advanced/declaration-merging.md)發現以下描述,覺得應該是錯誤的,因為类無法重複宣告,也無法像 interface 那樣自動合併。 ![image](https://user-images.githubusercontent.com/88981/86101062-4885d500-baec-11ea-86e4-de307a4a6515.png)

Fixes #177 任意属性报错更新 文字说明更新 完善联合类型解决报错代码