FlexType: A Plug-and-Play Framework for Type Inference Models

1Citations
Citations of this article
5Readers
Mendeley users who have this article in their library.
Get full text

Abstract

Types in TypeScript play an important role in the correct usage of variables and APIs. Type errors such as variable or function misuse can be avoided with explicit type annotations. In this work, we introduce FlexType, an IDE extension that can be used on both JavaScript and TypeScript to infer types in an interactive or automatic fashion. We perform experiments with FlexType in JavaScript to determine how many types FlexType could resolve if it were to be used to migrate top JavaScript projects to TypeScript. FlexType is able to annotate 56.69% of all types with high precision and confidence including native and imported types from modules. In addition to the automatic inference, we believe the interactive Visual Studio Code extension is inherently useful in both TypeScript and JavaScript especially when resolving types is taxing for the developer. The source code is available at GitHub1 and a video demonstration at https://youtu.be/4dPV05BWA8A.

Cite

CITATION STYLE

APA

Voruganti, S., Jesse, K., & Devanbu, P. (2022). FlexType: A Plug-and-Play Framework for Type Inference Models. In ACM International Conference Proceeding Series. Association for Computing Machinery. https://doi.org/10.1145/3551349.3559527

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free