【文件属性】:
文件名称:typeomatica:JavaScript〜Typescript的简单运行时类型检查器
文件大小:71KB
文件格式:ZIP
更新时间:2021-04-06 13:20:58
TypeScript
Typeomatica
该软件包是项目的一部分
基于基于记忆的类型的简单强类型限制
怎么运行的
参见test/index.ts
class SimpleBase extends BasePrototype {
stringProp = '123' ;
} ;
// next code line will throw TypeError('Type Mismatch')
// @ts -ignore
simpleInstance . stringProp = 123 ;
就是这样,在运行时将不可能为stringProp分配除string以外的其他任何内容。
【文件预览】:
typeomatica-main
----package.json(983B)
----.github()
--------workflows()
----test()
--------index.ts(4KB)
----jest.config.js(171B)
----tsconfig.spec.json(644B)
----LICENSE(1KB)
----package-lock.json(230KB)
----src()
--------index.ts(4KB)
----.eslintrc.js(1KB)
----tsconfig.json(685B)
----.gitignore(76B)
----lib()
--------index.js(4KB)
--------index.d.ts(240B)
----README.md(978B)
----.eslintignore(0B)
----.editorconfig(176B)
----.gitattributes(656B)