Generation of TypeScript declaration files from JavaScript code

@article{Cristiani2021GenerationOT,
  title={Generation of TypeScript declaration files from JavaScript code},
  author={Fernando Cristiani and Peter Thiemann},
  journal={Proceedings of the 18th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes},
  year={2021}
}
  • Fernando Cristiani, Peter Thiemann
  • Published 18 August 2021
  • Computer Science
  • Proceedings of the 18th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes
Developers are starting to write large and complex applications in TypeScript, a typed dialect of JavaScript. TypeScript applications integrate JavaScript libraries via typed descriptions of their APIs called declaration files. DefinitelyTyped is the standard public repository for these files. The repository is populated and maintained manually by volunteers, which is error-prone and time consuming. Discrepancies between a declaration file and the JavaScript implementation lead to incorrect… 

References

SHOWING 1-10 OF 12 REFERENCES
Inference and Evolution of TypeScript Declaration Files
TLDR
This work presents the tools tsinfer and tsevolve that are designed to assist the construction of new TypeScript declaration files and support the co-evolution of the declaration files as the underlying JavaScript libraries evolve.
Type test scripts for TypeScript testing
TLDR
This paper shows how feedback-directed random testing, which is an automated testing technique that has been used for testing Java libraries, can be adapted to effectively detect type mismatches in real-world JavaScript libraries with TypeScript declaration files.
Checking correctness of TypeScript interfaces for JavaScript libraries
TLDR
This work presents a pragmatic approach to check correctness of TypeScript declaration files with respect to JavaScript library implementations, finding 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.
Jalangi: a selective record-replay and dynamic analysis framework for JavaScript
TLDR
This paper presents a simple yet powerful framework, called Jalangi, for writing heavy-weight dynamic analyses, which incorporates two key techniques: selective record-replay, a technique which enables to record and to faithfully replay a user-selected part of the program, and shadow values and shadow execution, which enables easy implementation of heavy- Weight dynamic analyses.
To Type or Not to Type: Quantifying Detectable Bugs in JavaScript
TLDR
Evaluating static type systems against public bugs is conservative: it understates their effectiveness at detecting bugs during private development, not to mention their other benefits such as facilitating code search/completion and serving as documentation.
Dynamic inference of static types for ruby
TLDR
Constrained-based dynamic type inference is introduced, a technique that infers static types based on dynamic program executions and takes advantage of Ruby's dynamic features to implement wrappers as a language library.
Just-in-time static type checking for dynamic languages
TLDR
Hummmingbird is a new system that uses a novel technique, just-in-time static type checking, to type check Ruby code even in the presence of metaprogramming, and its performance overhead is reasonable.
Trace Typing: An Approach for Evaluating Retrofitted Type Systems
TLDR
This work presents trace typing: a framework for automatically and quantitatively evaluating variations of a retrofitted type system on large code bases, and leveraged the types computed by trace typing to automatically identify tag tests --- dynamic checks that refine a type --- and examined the variety of tests identified.
Types from data: making structured data first-class citizens in F#
TLDR
This work develops a shape inference algorithm that infers a shape from representative sample documents and integrates the inferred shape into the F# type system using type providers, and proves a relative type soundness theorem.
Dynamic Flow Analysis for JavaScript
TLDR
This paper presents a method for computing a safe approximation of a program’s dataflow without executing it by running the program on test data such that it achieves sufficient coverage.
...
...