Concrete Types for TypeScript

Concrete Types for TypeScript
复制标题

TypeScript 的具体类型

DOI:
10.4230/lipics.ecoop.2015.76
复制
发表时间:
2015
影响因子:
--
通讯作者:
J. Vitek
J. Vitek
中科院分区:
--
文献类型:
--
作者:
G. Richards;Francesco Zappa Nardelli;J. Vitek

文献摘要

被引文献

相似文献

TypeScript扩展了JavaScript,其中使用可选类型的注释,这些注释是通过设计不符合的,并且在发出代码时会丢弃Typescript编译器。该设计点保留了编程成语开发人员熟悉的编程成语,并允许他们保持其旧代码不变,同时提供了具有类型注释的部分的静态错误检查。我们为打字稿提供了另一种设计,可以支持相同程度的动态,但是可以加强类型以提供艰苦的保证。我们报告了一个名为strongscript的实现,该实现可改善在V8 JavaScript引擎的修改版本上运行时打字程序的运行时性能。
Typescript extends JavaScript with optional type annotations that are, by design, unsound and, that the Typescript compiler discards as it emits code. This design point preserves programming idioms developers are familiar with, and allows them to leave their legacy code unchanged, while offering a measure of static error checking in parts of the program that have type annotations. We present an alternative design for TypeScript, one where it is possible to support the same degree of dynamism, but where types can be strengthened to provide hard guarantees. We report on an implementation, called StrongScript, that improves runtime performance of typed programs when run on a modified version of the V8 JavaScript engine.