what are the differences to normal TypeScript
Microsoft Research offers a new TypeScript compiler variant called Safer TypeScript :
http://research.microsoft.com/en-us/downloads/b250c887-2b79-4413-9d7a-5a5a0c38cc57/
I could not find any documentation on it, and I was unable to install it into my TypeScript 1.0 system, since it requires TypeScript 0.9.5.
What are the differences between TypeScript and Safer TypeScript?
The main difference is that TS* features runtime type checking as well as static type checking, whereas standard TypeScript is only a design and compile time feature.
This means plain JavaScript code that calls your TS* code will receive type errors when passing invalid types from untrusted code. The general idea is to prevent security problems which are often caused by attacks based on unchecked types.
More information can be found here:
http://research.microsoft.com/en-us/um/people/nswamy/papers/gradual-typing-embedded-securely-in-javascript-draft.pdf
I have also written a slightly less detailed summery of TS*.
链接地址: http://www.djcxy.com/p/80322.html上一篇: 无法修改包的注释
下一篇: 与普通的TypeScript有什么不同