Projects per year
Abstract / Description of output
TypeScript participates in the recent trend among programming languages to support gradual typing. The DefinitelyTyped Repository for TypeScript supplies type definitions for over 2000 popular JavaScript libraries. However, there is no guarantee that implementations conform to their corresponding declarations.
We present a practical evaluation of gradual typing for TypeScript. We have developed a tool for use with TypeScript, based on the polymorphic blame calculus, for monitoring JavaScript libraries and TypeScript clients against the TypeScript definition. We apply our tool, TypeScript TPD, to those libraries in the DefinitelyTyped Repository which had adequate test code to use. Of the 122 libraries we checked, 62 had cases where either the library or its tests failed to conform to the declaration.
Gradual typing should satisfy non-interference. Monitoring a program should never change its behaviour, except to raise a type error should a value not conform to its declared type. However, our experience also suggests serious technical concerns with the use of the JavaScript proxy mechanism for enforcing contracts. Of the 122 libraries we checked, 22 had cases where the library or its tests violated non-interference.
We present a practical evaluation of gradual typing for TypeScript. We have developed a tool for use with TypeScript, based on the polymorphic blame calculus, for monitoring JavaScript libraries and TypeScript clients against the TypeScript definition. We apply our tool, TypeScript TPD, to those libraries in the DefinitelyTyped Repository which had adequate test code to use. Of the 122 libraries we checked, 62 had cases where either the library or its tests failed to conform to the declaration.
Gradual typing should satisfy non-interference. Monitoring a program should never change its behaviour, except to raise a type error should a value not conform to its declared type. However, our experience also suggests serious technical concerns with the use of the JavaScript proxy mechanism for enforcing contracts. Of the 122 libraries we checked, 22 had cases where the library or its tests violated non-interference.
Original language | English |
---|---|
Title of host publication | The European Conference on Object-Oriented Programming (ECOOP 2017) |
Publisher | Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, Germany |
Pages | 1-28 |
Number of pages | 28 |
ISBN (Print) | 978-3-95977-035-4 |
DOIs | |
Publication status | Published - 23 Jun 2017 |
Event | 31st European Conference on Object-Oriented Programming - Barcelona, Spain Duration: 18 Jun 2017 → 23 Jun 2017 https://2017.ecoop.org/track/ecoop-2017-papers |
Publication series
Name | Leibniz International Proceedings in Informatics (LIPIcs) |
---|---|
Publisher | Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik |
Volume | 74 |
ISSN (Print) | 1868-8969 |
Conference
Conference | 31st European Conference on Object-Oriented Programming |
---|---|
Abbreviated title | ECOOP 2017 |
Country/Territory | Spain |
City | Barcelona |
Period | 18/06/17 → 23/06/17 |
Internet address |
Fingerprint
Dive into the research topics of 'Mixed Messages: Measuring Conformance and Non-Interference in TypeScript'. Together they form a unique fingerprint.Projects
- 1 Finished
-
From Data Types to Session Types - A Basis for Concurrency and Distribution
20/05/13 → 19/11/20
Project: Research