Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1007/978-3-662-44202-9_11guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Understanding TypeScript

Published: 01 August 2014 Publication History

Abstract

TypeScript is an extension of JavaScript intended to enable easier development of large-scale JavaScript applications. While every JavaScript program is a TypeScript program, TypeScript offers a module system, classes, interfaces, and a rich gradual type system. The intention is that TypeScript provides a smooth transition for JavaScript programmers--well-established JavaScript programming idioms are supported without any major rewriting or annotations. One interesting consequence is that the TypeScript type system is not statically sound by design. The goal of this paper is to capture the essence of TypeScript by giving a precise definition of this type system on a core set of constructs of the language. Our main contribution, beyond the familiar advantages of a robust, mathematical formalization, is a refactoring into a safe inner fragment and an additional layer of unsafe rules.

References

[1]
Abadi, M., Cardelli, L.: A theory of objects. Springer 1996
[2]
Anderson, C., Giannini, P., Drossopoulou, S.: Towards type inference for javaScript. In: Gao, X.-X. ed. ECOOP 2005. LNCS, vol. 3586, pp. 428---452. Springer, Heidelberg 2005
[3]
Bierman, G., Parkinson, M., Pitts, A.: MJ: An imperative core calculus for Java and Java with effects. Technical Report 563, University of Cambridge Computer Laboratory 2003
[4]
Chugh, R., Herman, D., Jhala, R.: Dependent types for JavaScript. In: Proceedings of OOSLA 2012
[5]
Crockford, D.: JavaScript: The good parts. O'Reilly 2008
[6]
Gapeyev, V., Levin, M., Pierce, B.: Recursive subtyping revealed. JFP 126, 511---548 2002
[7]
Gardner, P., Maffeis, S., Smith, G.: Towards a program logic for JavaScript. In: Proceedings of POPL 2013
[8]
Google. Dart programming language, http://www.dartlang.org
[9]
Guha, A., Saftoiu, C., Krishnamurthi, S.: Typing local control and state using flow analysis. In: Barthe, G. ed. ESOP 2011. LNCS, vol. 6602, pp. 256---275. Springer, Heidelberg 2011
[10]
Igarashi, A., Pierce, B., Wadler, P.: Featherweight Java: A minimal core calculus for Java and GJ. ACM TOPLAS 233, 396---450 2001
[11]
Microsoft Corporation. TypeScript Language Specification, 0.9.5 edn. 2014, http://typescriptlang.org
[12]
Pierce, B., Turner, D.: Local type inference. In: Proceedings of POPL 1998
[13]
Sénizergues, G.: The equivalence problem for deterministic pushdown automata is decidable. In: Degano, P., Gorrieri, R., Marchetti-Spaccamela, A. eds. ICALP 1997. LNCS, vol. 1256, pp. 671---681. Springer, Heidelberg 1997
[14]
Siek, J.G., Taha, W.: Gradual typing for objects. In: Ernst, E. ed. ECOOP 2007. LNCS, vol. 4609, pp. 2---27. Springer, Heidelberg 2007
[15]
Swamy, N., Fournet, C., Rastogi, A., Bhargavan, K., Chen, J., Strub, P.-Y., Bierman, G.: Gradual typing embedded securely in JavaScript. In: Proceedings of POPL 2014
[16]
Solomon, M.H.: Type definitions with parameters. In: Proceedings of POPL 1978
[17]
Thiemann, P.: Towards a type system for analyzing javaScript programs. In: Sagiv, M. ed. ESOP 2005. LNCS, vol. 3444, pp. 408---422. Springer, Heidelberg 2005
[18]
Tobin-Hochstadt, S., Felleisen, M.: The design and implementation of Typed Scheme. In: Proceedings of POPL 2008
[19]
Wadler, P., Findler, R.B.: Well-typed programs can't be blamed. In: Castagna, G. ed. ESOP 2009. LNCS, vol. 5502, pp. 1---16. Springer, Heidelberg 2009

Cited By

View all
  • (2024)Verifying the Option Type with Rely-Guarantee ReasoningProceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering10.1145/3691620.3695036(367-380)Online publication date: 27-Oct-2024
  • (2024)Nominal Types for ErlangProceedings of the 23rd ACM SIGPLAN International Workshop on Erlang10.1145/3677995.3678191(24-32)Online publication date: 28-Aug-2024
  • (2024)Contextual TypingProceedings of the ACM on Programming Languages10.1145/36746558:ICFP(880-908)Online publication date: 15-Aug-2024
  • Show More Cited By

Index Terms

  1. Understanding TypeScript
    Index terms have been assigned to the content through auto-classification.

    Comments

    Information & Contributors

    Information

    Published In

    cover image Guide Proceedings
    Proceedings of the 28th European Conference on ECOOP 2014 --- Object-Oriented Programming - Volume 8586
    August 2014
    696 pages
    ISBN:9783662442012
    • Editor:
    • Richard Jones

    Publisher

    Springer-Verlag

    Berlin, Heidelberg

    Publication History

    Published: 01 August 2014

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)0
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 16 Oct 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Verifying the Option Type with Rely-Guarantee ReasoningProceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering10.1145/3691620.3695036(367-380)Online publication date: 27-Oct-2024
    • (2024)Nominal Types for ErlangProceedings of the 23rd ACM SIGPLAN International Workshop on Erlang10.1145/3677995.3678191(24-32)Online publication date: 28-Aug-2024
    • (2024)Contextual TypingProceedings of the ACM on Programming Languages10.1145/36746558:ICFP(880-908)Online publication date: 15-Aug-2024
    • (2024)Space-Efficient Polymorphic Gradual Typing, Mostly ParametricProceedings of the ACM on Programming Languages10.1145/36564418:PLDI(1585-1608)Online publication date: 20-Jun-2024
    • (2024)JSON Model: a Lightweight Featureful DSL for JSONAdvances in Databases and Information Systems10.1007/978-3-031-70626-4_1(3-17)Online publication date: 28-Aug-2024
    • (2023)GTP Benchmarks for Gradual Typing PerformanceProceedings of the 2023 ACM Conference on Reproducibility and Replicability10.1145/3589806.3600034(102-114)Online publication date: 27-Jun-2023
    • (2023)User-Customizable Transpilation of Scripting LanguagesProceedings of the ACM on Programming Languages10.1145/35860347:OOPSLA1(201-229)Online publication date: 6-Apr-2023
    • (2023)Typed–Untyped Interactions: A Comparative AnalysisACM Transactions on Programming Languages and Systems10.1145/357983345:1(1-54)Online publication date: 5-Mar-2023
    • (2023)Learning to Predict User-Defined TypesIEEE Transactions on Software Engineering10.1109/TSE.2022.317894549:4(1508-1522)Online publication date: 1-Apr-2023
    • (2023)Enhancing embedded systems development with TSAutomated Software Engineering10.1007/s10515-023-00404-x31:1Online publication date: 6-Dec-2023
    • Show More Cited By

    View Options

    View options

    Get Access

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media