typings-checker:关于TypeScript类型和错误的肯定和否定断言

时间:2021-05-02 16:25:21
【文件属性】:
文件名称:typings-checker:关于TypeScript类型和错误的肯定和否定断言
文件大小:30KB
文件格式:ZIP
更新时间:2021-05-02 16:25:21
TypeScript 这不维护! 出和 。 打字检查器 的验证了正确的代码类型检查。 但这很容易满足:为模块提供any类型都足以对其测试类型进行检查。 不正确的代码不进行类型检查也同样重要。 目前,尚无任何方法可以在DT中对此进行测试。 此仓库提供了有关如何添加的概念证明。 它以处理事物的方式。 _.find的测试如下所示: _ . find ( [ 1 , 2 , 3 ] , x => x * 1 == 3 ) ; // (this is just expected to type check) // $ExpectError Operator '==' cannot be applied to types 'number' and 'string'. _ . find ( [ 1 , 2 , 3 ] , x => x == 'a' ) ; // $ExpectType number _ . fin
【文件预览】:
typings-checker-master
----circle.yml(591B)
----yarn.lock(34KB)
----src()
--------types.ts(1KB)
--------index.ts(3KB)
--------checker.ts(6KB)
----.npmignore(597B)
----sample.ts(554B)
----tsconfig.json(342B)
----LICENSE(11KB)
----tslint.json(884B)
----README.md(2KB)
----update-tests.sh(708B)
----.editorconfig(177B)
----tests()
--------ramda.ts(211B)
--------doesnt-exist.ts.out(42B)
--------basics()
--------underscore-any.ts(610B)
--------underscore-any.ts.out(459B)
--------multiple.out(1KB)
--------underscore.ts.out(42B)
--------tsconfig.json(220B)
--------underscore.ts(464B)
--------ramda.ts.out(37B)
----.gitignore(642B)
----package.json(1KB)

网友评论