2017
DOI: 10.1145/3133872
|View full text |Cite
|
Sign up to set email alerts
|

Fast and precise type checking for JavaScript

Abstract: In this paper we present the design and implementation of Flow, a fast and precise type checker for JavaScript that is used by thousands of developers on millions of lines of code at Facebook every day. Flow uses sophisticated type inference to understand common JavaScript idioms precisely. This helps it find non-trivial bugs in code and provide code intelligence to editors without requiring significant rewriting or annotations from the developer. We formalize an important fragment of Flow's analysis and prove… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
2
1
1

Citation Types

0
26
0

Year Published

2018
2018
2024
2024

Publication Types

Select...
5
4

Relationship

0
9

Authors

Journals

citations
Cited by 39 publications
(29 citation statements)
references
References 43 publications
0
26
0
Order By: Relevance
“…No unification is needed, and it is therefore much faster and more flexible than soft typing. Several inference systems based on data flow have been proposed for JavaScript [Chaudhuri et al 2017], Scheme [Shivers 1990], and others.…”
Section: Impact On Performancementioning
confidence: 99%
“…No unification is needed, and it is therefore much faster and more flexible than soft typing. Several inference systems based on data flow have been proposed for JavaScript [Chaudhuri et al 2017], Scheme [Shivers 1990], and others.…”
Section: Impact On Performancementioning
confidence: 99%
“…An erasure, or optional, semantics uses types for static analysis and ignores them at runtime. Erasure type soundness, TS(•, 0), is independent of the surface-language type [Bierman et al 2014;Bonnaire-Sergeant et al 2016;Chaudhuri et al 2017;Maidl et al 2015]. A concrete semantics requires a runtime type for every value, and therefore prohibits untyped code from creating new values that flow to typed regions [Muehlboeck and Tate 2017;Rastogi et al 2015;Richards et al 2017Richards et al , 2015Wrigstad et al 2010].…”
Section: Related Workmentioning
confidence: 99%
“…Intersection types have been well studied in theory [Coppo and Dezani-Ciancaglini 1978;Davies and Pfenning 2000;Pierce 1993] and are now starting to appear in mainstream languages such as TypeScript [Bierman et al 2014] and Flow for JavaScript [Chaudhuri et al 2017]. Applications for intersection types include mixins, describing multiple inheritance, and overloaded functions.…”
Section: Intersection Typesmentioning
confidence: 99%
“…Here we consider untagged unions rather than tagged unions, or sum types. Untagged unions are a good fit for dynamically typed languages, and both TypeScript [Bierman et al 2014] and Flow [Chaudhuri et al 2017] support union types.…”
Section: Union Typesmentioning
confidence: 99%