alongubkin / alongubkin/spider
Type inference
- 主要语言
- JavaScript
- 星标
- 1.3k
- 派生
- 46
- PR 合并指标
- 30 天内没有已合并 PR
描述
Spider is not statically typed language but I believe it's a good option to have. But as I understand you (@alongubkin) don't desire to put it into Spider. But there's alternative which could help a little and wouldn't need to put static typing, I'm talking about **type inferencing** which has been done for JS already:
http://flowtype.org/
First example from the site:
```
/* @flow */
function foo(x) {
return x * 10;
}
foo('Hello, world!');
```
should show error in "compile" time.
```
hello.js:5:5,19: string
This type is incompatible with
hello.js:3:10,15: number
```
I know there are many situations when this could not used anyway but that's just a proposition to have.
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。