💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[TOC] # [在 Typescript 2.0 中使用 @types 类型定义](http://www.bubuko.com/infodetail-1876184.html) 2.0 以后不再需要 `typings`或者`tsd`了,所有的 type 都只需要用 npm 来安装: ~~~ npm install -s @types/<library name> ~~~ 如果仍需要亲自写声明文件,可以从[这里](http://www.typescriptlang.org/docs/handbook/writing-declaration-files.html)开始。 无论何时,你安装一个依赖时,都应该试着安装 @types 包,或者你想查看是否有被支持的类型,你可以在 [TypeSearch](https://link.jianshu.com/?t=https://microsoft.github.io/TypeSearch/) 网站上查看。 链接:https://www.zhihu.com/question/50780469/ # 使用typescript写node的一些小技巧 https://segmentfault.com/a/1190000007183406 # 使用Visual Studio Code搭建TypeScript开发环境 http://blog.csdn.net/wlanye/article/details/74566179 # “Use Strict” needed in a TypeScript file? https://stackoverflow.com/questions/31391760/use-strict-needed-in-a-typescript-file [从 JavaScript 到 TypeScript 6 - Vue 引入 TypeScript](https://tasaid.com/Blog/20171011233132.html) # 装饰器的概念 新的 decorator 语法 `@xxx` 的形式非常类似 Java Annotation,不过后者作为静态语言,其 Annotation 的实现机制以及使用场景和 ES decorators 都有区别,这是一个题外话。事实上,ES decorators 完全借鉴自 Python 的 decorators。 [ES Decorators简介](http://web.jobbole.com/82862/)