[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-125647-en":3,"doc-seo-125647-105":30,"detail-sidebar-cat-0-en-105":90},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":27,"seo_description":14,"update_tm":28,"read_time":29},125647,34359740700684,"Finn","https://ap-avatar.wpscdn.com/avatar/1f400023980c374ae676?_k=1777273430885731487",6,"Technology","Do Machine Learning Models Produce TypeScript Types That Type Check? - Artifact","Type migration adds static types to untyped code so errors surface at compile time. While TypeScript’s gradual type system enables iterative strengthening, large-scale adoption remains costly and manual. This work tests whether machine-learning-based type migration can satisfy the TypeScript type checker, not merely achieve high prediction accuracy. It introduces TypeWeaver, integrates DeepTyper, LambdaNet, and InCoder, automates dependency type imports and module migration, and evaluates on 513 JavaScript packages where only a subset type checks fully.","Do Machine Learning Models Produce TypeScript Types That Type Check? (Artifact)  \nMing-Ho Yee \\#   \nNortheastern University, Boston, MA, USA  \nArjun Guha \\#   \nNortheastern University, Boston, MA, USA Roblox Research, San Mateo, CA, USA  \n~~ Abstract ~~  \nType migration is the process of adding types to untyped code to gain assurance at compile time. TypeScript and other gradual type systems facilitate type migration by allowing programmers to start with imprecise types and gradually strengthen them. However, adding types is a manual effort and several migrations on large, industry codebases have been reported to have taken several years. In the research community, there has been significant interest in using machine learning to automate TypeScript type migration. Existing machine learning models report a high degree of accuracy in predicting individual TypeScript type annotations. However, in this paper we argue that accuracy can be misleading, and we should address a different question: can an automatic type migration tool produce code that passes the TypeScript type checker?  \nWe present TypeWeaver, a TypeScript type migration tool that can be used with an arbitrary  \ntype prediction model. We evaluate TypeWeaver with three models from the literature: DeepTyper, a recurrent neural network; LambdaNet, a graph neural network; and InCoder, a general-purpose, multi-language transformer that supports fill-in-themiddle tasks. Our tool automates several steps that are necessary for using a type prediction model, including (1) importing types for a project’s dependencies; (2) migrating JavaScript modules to TypeScript notation; (3) inserting predicted type annotations into the program to produce TypeScript when needed; and (4) rejecting non-type predictions when needed.  \nWe evaluate TypeWeaver on a dataset of 513 JavaScript packages, including packages that have never been typed before. With the best type prediction model, we find that only 21% of packages type check, but more encouragingly, 69% of files type check successfully.  \n2012 ACM Subject Classification Software and its engineering → Source code generation; General and reference → Evaluation; Theory of computation → Type structures  \nKeywords and phrases Type migration, deep learning Digital Object Identifier 10.4230/DARTS.9.2.5  \nFunding This work is partially supported by the National Science Foundation grant CCF-2102291 . Acknowledgements We thank Northeastern Research Computing and the New England Research Cloud for providing computing resources; and Donald Pinckney and the anonymous reviewers for their feedback.  \nRelated Article Ming-Ho Yee and Arjun Guha,“Do Machine Learning Models Produce TypeScript Types That Type Check?”, in 37th European Conference on Object-Oriented Programming (ECOOP 2023), LIPIcs, Vol. 263, pp. 37:1–37:28, 2023. [https://doi.org/10.4230/LIPIcs.ECOOP.2023.37](https://doi.org/10.4230/LIPIcs.ECOOP.2023.37)[ ](https://doi.org/10.4230/LIPIcs.ECOOP.2023.37)Related Conference 37th European Conference on Object-Oriented Programming (ECOOP 2023), July 17–21, 2023, Seattle, Washington, United States  \nEvaluation Policy The artifact has been evaluated as described in the ECOOP 2023 Call for Artifacts and the ACM Artifact Review and Badging Policy.  \n© Ming-Ho Yee and Arjun Guha;  \nlicensed under Creative Commons License CC-BY 4.0 Dagstuhl Artifacts Series, Vol. 9, Issue 2, Artifact No. 5, pp. 5:1–5:3  \nDagstuhl Artifacts Series  \nSchloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany  \n5:2 Do Machine Learning Models Produce TypeScript Types That Type Check? (Artifact)  \n 1  Scope  \nThis artifact is functional. All figures and tables in the paper (with the exceptions of Figures 1–3 and 13–16, which are examples) are generated from the experiments. They can be regenerated from the CSV data, and should match the paper. It is also possible to run all experiments from scratch: in this case, the figures and tables will not exactly ma","cbCaiaoNte0lyjfU","https://ap.wps.com/l/cbCaiaoNte0lyjfU","pdf",617208,1,3,"English","en",105,"# Scope\n## Artifact functionality and reproducibility\n## Reusability and extension\n# Content\n## Benchmarks\n## Results\n## Code\n# Getting the artifact\n# Tested platforms\n# License\n# MD5 sum of the artifact\n# Size of the artifact","[{\"question\":\"What problem does the artifact address?\",\"answer\":\"The artifact supports TypeScript type migration using machine-learning type prediction models, aiming to produce code that passes the TypeScript type checker.\"},{\"question\":\"How does TypeWeaver work with a type prediction model?\",\"answer\":\"It automates importing dependency types, migrating JavaScript modules to TypeScript syntax, inserting predicted type annotations, and rejecting non-type predictions when required.\"},{\"question\":\"What resources and setup are required to run the experiments?\",\"answer\":\"The artifact is tested on Ubuntu Linux and requires Python 3.6 plus the tqdm package; other dependencies are provided via OCI container images, and GPU experiments need at least 14 GB VRAM.\"}]","Do Machine Learning Models Produce TypeScript Types That Type Check? - Artifact | PDF",1785900403,8,{"code":4,"msg":31,"data":32},"ok",{"site_id":24,"language":23,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":85,"head_meta":87,"extra_data":89,"updated_unix":28},"do-machine-learning-models-produce-typescript-types-that-type-check-artifact","",{"@graph":36,"@context":84},[37,53,67],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,50],{"item":41,"name":42,"@type":43,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":21},"https://docshare.wps.com/document/technology/",{"item":51,"name":13,"@type":43,"position":52},"https://docshare.wps.com/document/do-machine-learning-models-produce-typescript-types-that-type-check-artifact/125647/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":61,"encodingFormat":60,"isAccessibleForFree":62,"interactionStatistic":63},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":41,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-08-05",true,{"@type":64,"interactionType":65,"userInteractionCount":20},"InteractionCounter",{"@type":66},"ViewAction",{"@type":68,"mainEntity":69},"FAQPage",[70,76,80],{"name":71,"@type":72,"acceptedAnswer":73},"What problem does the artifact address?","Question",{"text":74,"@type":75},"The artifact supports TypeScript type migration using machine-learning type prediction models, aiming to produce code that passes the TypeScript type checker.","Answer",{"name":77,"@type":72,"acceptedAnswer":78},"How does TypeWeaver work with a type prediction model?",{"text":79,"@type":75},"It automates importing dependency types, migrating JavaScript modules to TypeScript syntax, inserting predicted type annotations, and rejecting non-type predictions when required.",{"name":81,"@type":72,"acceptedAnswer":82},"What resources and setup are required to run the experiments?",{"text":83,"@type":75},"The artifact is tested on Ubuntu Linux and requires Python 3.6 plus the tqdm package; other dependencies are provided via OCI container images, and GPU experiments need at least 14 GB VRAM.","https://schema.org",{"og:url":51,"og:type":86,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":88,"canonical":51},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":91},[92,96,100,104,109,112,117,121,126,129,133],{"id":20,"doc_module":4,"doc_module_name":46,"category_name":93,"show_sort_weight":94,"slug":95},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":97,"show_sort_weight":98,"slug":99},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":46,"category_name":101,"show_sort_weight":102,"slug":103},"Exam",70,"exam",{"id":105,"doc_module":4,"doc_module_name":46,"category_name":106,"show_sort_weight":107,"slug":108},5,"Comic",60,"comic",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":110,"slug":111},50,"technology",{"id":113,"doc_module":4,"doc_module_name":46,"category_name":114,"show_sort_weight":115,"slug":116},7,"Healthcare",40,"healthcare",{"id":29,"doc_module":4,"doc_module_name":46,"category_name":118,"show_sort_weight":119,"slug":120},"Research & Report",30,"research-report",{"id":122,"doc_module":4,"doc_module_name":46,"category_name":123,"show_sort_weight":124,"slug":125},9,"Religion & Spirituality",20,"religion-spirituality",{"id":124,"doc_module":4,"doc_module_name":46,"category_name":127,"show_sort_weight":124,"slug":128},"World Cup","world-cup",{"id":130,"doc_module":4,"doc_module_name":46,"category_name":131,"show_sort_weight":130,"slug":132},10,"Lifestyle","lifestyle",{"id":134,"doc_module":4,"doc_module_name":46,"category_name":135,"show_sort_weight":105,"slug":136},19,"General","general"]