Comments (2)
上面代码不报错,早就被诟病了,变量声明没有给出类型。
[1] microsoft/TypeScript#30899
from typescript-tutorial.
这种确实有点尴尬,其它语言类型推断都是一定要赋值的
from typescript-tutorial.
Related Issues (20)
- 类型断言 HOT 1
- 关于TypeScript 类型运算符部分的模板字符串的可引用类型问题 HOT 1
- 第八节函数的 readonly参数 HOT 1
- d.ts这一章配置的地址错误 HOT 2
- d.ts 文档生成问题
- 第四章 类型系统-5.值类型
- 关于二十三章TypeScript 类型工具 Awaited<Type>的实现 HOT 1
- HelloGitHub 徽章计划
- 是不是少写了一个“// 报错” HOT 1
- 示例描述有点问题 HOT 1
- "d.ts 类型声明文件" 章节链接错误 HOT 1
- tsc 命令中的tsc src/*.ts报错 HOT 2
- 第19章 关于补充声明Window全局对象属性的问题 HOT 1
- 第25章 compilerOptions 拼写问题 HOT 1
- 第17章「装饰器」第8小节「accessor 装饰器」关于 accessor 描述错误的问题 HOT 1
- 某些章节不显示 HOT 1
- 第 10 章 关于 interface 章节,接口合并小节中,对 document 添加自定义属性代码片段,编译不通过。 HOT 1
- 第 15 章 “import type 语句” 小节,关于报错的描述有疑问,求指教。 HOT 1
- 类型断言章节的句意错误 HOT 2
- 类型系统章节,联合类型小结,书写错误 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typescript-tutorial.