Concrete Types for TypeScript

Authors Gregor Richards, Francesco Zappa Nardelli, Jan Vitek

Thumbnail PDF


  • Filesize: 0.68 MB
  • 25 pages

Document Identifiers

Author Details

Gregor Richards
Francesco Zappa Nardelli
Jan Vitek

Cite AsGet BibTex

Gregor Richards, Francesco Zappa Nardelli, and Jan Vitek. Concrete Types for TypeScript. In 29th European Conference on Object-Oriented Programming (ECOOP 2015). Leibniz International Proceedings in Informatics (LIPIcs), Volume 37, pp. 76-100, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2015)


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.
  • Gradual typing
  • dynamic languages


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Gavin Bierman, Martin Abadi, and Mads Torgersen. Understanding TypeScript. In ECOOP, 2014. doi:\doi10.1007/978-3-662-44202-9_11. Google Scholar
  2. Bard Bloom, John Field, Nathaniel Nystrom, Johan Östlund, Gregor Richards, Rok Strnisa, Jan Vitek, and Tobias Wrigstad. Thorn: Robust, concurrent, extensible scripting on the JVM. In OOPSLA, 2009. doi:\doi10.1145/1639949.1640098. Google Scholar
  3. Alan H. Borning and Daniel H. H. Ingalls. A type declaration and inference system for Smalltalk. In POPL, 1982. doi:\doi10.1145/582153.582168. Google Scholar
  4. Gilad Bracha. The Strongtalk type system for Smalltalk. In OOPSLA Workshop on Extending the Smalltalk Language, 1996. Google Scholar
  5. Gilad Bracha. Pluggable type systems. OOPSLA Workshop on Revival of Dynamic Languages, 2004. Google Scholar
  6. Gilad Bracha and David Griswold. Strongtalk: Typechecking Smalltalk in a production environment. In OOPSLA, 1993. doi:\doi10.1145/165854.165893. Google Scholar
  7. Robert Cartwright and Mike Fagan. Soft Typing. In PLDI, 1991. doi:\doi10.1145/113446.113469. Google Scholar
  8. Douglas Crockford. Classical inheritance in JavaScript. URL:
  9. Robert Bruce Findler and Matthias Felleisen. Contract soundness for object-oriented languages. In OOPSLA, 2001. doi:\doi10.1145/504282.504283. Google Scholar
  10. Robert Bruce Findler and Matthias Felleisen. Contracts for higher-order functions. In ICFP, 2002. doi:\doi10.1145/581478.581484. Google Scholar
  11. Robert Bruce Findler, Matthew Flatt, and Matthias Felleisen. Semantic casts: Contracts and structural subtyping in a nominal world. In ECOOP, 2004. doi:\doi10.1007/978-3-540-24851-4_17. Google Scholar
  12. Vladimir Gapeyev, Michael Levin, and Benjamin Pierce. Recursive subtyping revealed. Journal of Functional Programming, 12(6):511-548, 2002. doi:\doi10.1017/S0956796802004318. Google Scholar
  13. Arjun Guha, Claudiu Saftoiu, and Shriram Krishnamurthi. The essence of JavaScript. In ECOOP, 2010. doi:\doi10.1007/978-3-642-14107-2_7. Google Scholar
  14. Atsushi Igarashi, Benjamin C. Pierce, and Philip Wadler. Featherweight Java: a minimal core calculus for Java and GJ. ACM Trans. Program. Lang. Syst., 23(3), 2001. doi:\doi10.1145/503502.503505. Google Scholar
  15. Microsoft. TypeScript - language specification version 0.9.1. Technical report, Microsoft, August 2013. Google Scholar
  16. Aseem Rastogi, Nikhil Swamy, Cedric Fournet, Gavin Bierman, and Panagiotis Vekris. Safe and efficient gradual typing for TypeScript. In POPL, 2015. doi:\doi10.1145/2676726.2676971. Google Scholar
  17. Gregor Richards, Christian Hammer, Brian Burg, and Jan Vitek. The eval that men do: A large-scale study of the use of eval in JavaScript applications. In ECOOP, 2011. doi:\doi10.1007/978-3-642-22655-7_4. Google Scholar
  18. Jeremy Siek. Gradual typing for functional languages. In Scheme and Functional Programming Workshop, 2006. Google Scholar
  19. Jeremy Siek and Walid Taha. Gradual typing for objects. In ECOOP, 2007. doi:\doi10.1007/978-3-540-73589-2_2. Google Scholar
  20. Norihisa Suzuki. Inferring types in Smalltalk. In POPL, 1981. doi:\doi10.1145/567532.567553. Google Scholar
  21. Sam Tobin-Hochstadt and Matthias Felleisen. Interlanguage migration: from scripts to programs. In DLS, 2006. doi:\doi10.1145/1176617.1176755. Google Scholar
  22. Sam Tobin-Hochstadt and Matthias Felleisen. The design and implementation of typed Scheme. In POPL, 2008. doi:\doi10.1145/1328438.1328486. Google Scholar
  23. Michael M. Vitousek, Andrew M. Kent, Jeremy G. Siek, and Jim Baker. Design and evaluation of gradual typing for Python. In DLS, 2014. doi:\doi10.1145/2661088.2661101. Google Scholar
  24. Tobias Wrigstad, Francesco Zappa Nardelli, Sylvain Lebresne, Johan Östlund, and Jan Vitek. Integrating typed and untyped code in a scripting language. In POPL, 2010. doi:\doi10.1145/1706299.1706343. Google Scholar
  25. Thomas Würthinger, Christian Wimmer, Andreas Wöss, Lukas Stadler, Gilles Duboscq, Christian Humer, Gregor Richards, Doug Simon, and Mario Wolczko. One VM to rule them all. In Onwards!, 2013. doi:\doi10.1145/2509578.2509581. Google Scholar