Checking Correctness of TypeScript Interfaces for JavaScript Libraries
The TypeScript programming language adds optional types to JavaScript, with support for interaction with existing JavaScript libraries via interface declarations. Such declarations have been written for hundreds of libraries, but they can be difficult to write and often contain errors, which may affect the type checking and misguide code completion for the application code in IDEs.
We present a pragmatic approach to check correctness of TypeScript declaration files with respect to JavaScript library implementations. The key idea in our algorithm is that many declaration errors can be detected by an analysis of the library initialization state combined with a light-weight static analysis of library function code.
Our experimental results demonstrate the effectiveness of the approach: it has found 142 errors in the declaration files of 10 libraries, with an analysis time of a few minutes per library and with a low number of false positives. Our analysis of how programmers use library interface declarations furthermore reveals some practical limitations of the TypeScript type system.
Wed 22 OctDisplayed time zone: Tijuana, Baja California change
10:30 - 12:00 | |||
10:30 22mTalk | Checking Correctness of TypeScript Interfaces for JavaScript Libraries OOPSLA Link to publication | ||
10:52 22mTalk | Determinacy in Static Analysis for jQuery OOPSLA Link to publication | ||
11:15 22mTalk | EventBreak: Analyzing the Responsiveness of User Interfaces through Performance-Guided Test Generation OOPSLA Michael Pradel University of California, Berkeley, USA, Parker Schuh University of California, Berkeley, George Necula University of California, Berkeley, Koushik Sen University of California, Berkeley Link to publication | ||
11:37 22mTalk | Using Web Corpus Statistics for Program Analysis OOPSLA Chun-Hung Hsiao University of Michigan, Michael Cafarella University of Michigan, Satish Narayanasamy University of Michigan Link to publication |