{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,10]],"date-time":"2026-09-10T10:08:21Z","timestamp":1789034901373,"version":"build-2803163510"},"reference-count":44,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA2","license":[{"start":{"date-parts":[[2022,10,31]],"date-time":"2022-10-31T00:00:00Z","timestamp":1667174400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2022,10,31]]},"abstract":"<jats:p>\n            The DefinitelyTyped repository hosts type declarations for thousands of JavaScript libraries. Given the lack of formal connection between the types and the corresponding code, a natural question is\n            <jats:italic>are the types right?<\/jats:italic>\n            An equally important question, as DefinitelyTyped and the libraries it supports change over time, is\n            <jats:italic>how can we keep the types from becoming wrong?<\/jats:italic>\n            In this paper we offer Scotty, a tool that detects mismatches between the types and code in the Definitely-Typed repository. More specifically, Scotty checks each package by converting its types into contracts and installing the contracts on the boundary between the library and its test suite. Running the test suite in this environment can reveal mismatches between the types and the JavaScript code. As automation and generality are both essential if such a tool is going to remain useful in the long term, we focus on techniques that sacrifice completeness, instead preferring to avoid false positives. Scotty currently handles about 26% of the 8006 packages on DefinitelyTyped (61% of the packages whose code is available and whose test suite passes).  \n  \nPerhaps unsurprisingly, running the tests with these contracts in place revealed many errors in Definitely-Typed. More surprisingly, despite the inherent limitations of the techniques we use, this exercise led to one hundred accepted pull requests that fix errors in DefinitelyTyped, demonstrating the value of this approach for the long-term maintenance of DefinitelyTyped. It also revealed a number of lessons about working in the JavaScript ecosystem and how details beyond the semantics of the language can be surprisingly important. Best of all, it also revealed a few places where programmers preferred incorrect types, suggesting some avenues of research to improve TypeScript.\n          <\/jats:p>","DOI":"10.1145\/3563305","type":"journal-article","created":{"date-parts":[[2022,10,31]],"date-time":"2022-10-31T20:23:35Z","timestamp":1667247815000},"page":"479-504","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":4,"title":["Highly illogical, Kirk: spotting type mismatches in the large despite broken contracts, unsound types, and too many linters"],"prefix":"10.1145","volume":"6","author":[{"ORCID":"https:\/\/orcid.org\/0000-0001-7867-6113","authenticated-orcid":false,"given":"Joshua","family":"Hoeflich","sequence":"first","affiliation":[{"name":"Northwestern University, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-4245-2000","authenticated-orcid":false,"given":"Robert Bruce","family":"Findler","sequence":"additional","affiliation":[{"name":"Northwestern University, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-5240-1610","authenticated-orcid":false,"given":"Manuel","family":"Serrano","sequence":"additional","affiliation":[{"name":"Inria, France \/ University of C\u00f4te d'Azur, France"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2022,10,31]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.1145\/1570506.1570507"},{"key":"e_1_2_1_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/3110283"},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/3133878"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.1109\/SANER.2016.105"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-662-44202-9_11"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.1145\/3110285"},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/2993600.2996280"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.1145\/3475738.3480941"},{"key":"e_1_2_1_9_1","volume-title":"Standard ECMA-262-ECMAScript Language Specification","author":"International Ecma","year":"2015","unstructured":"Ecma International . Standard ECMA-262-ECMAScript Language Specification . 2015 . http:\/\/www.ecmainternational. org\/ecma-262\/6.0\/ Ecma International. Standard ECMA-262-ECMAScript Language Specification. 2015. http:\/\/www.ecmainternational. org\/ecma-262\/6.0\/"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1145\/2660193.2660215"},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/3276503"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/2502508.2502521"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.1109\/ISSRE.2011.28"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2017.75"},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796818000217"},{"key":"e_1_2_1_16_1","first-page":"93","volume-title":"Cormac Flanagan. Sage: Hybrid Checking for Flexible Specifications. In Proc. Workshop on Scheme and Functional Programming","author":"Gronski Jessica","year":"2006","unstructured":"Jessica Gronski , Kenneth Knowles , Aaron Tomb , Stephen N. Freund , and Cormac Flanagan. Sage: Hybrid Checking for Flexible Specifications. In Proc. Workshop on Scheme and Functional Programming , pp. 93 - 104 , 2006 . http:\/\/www.schemeworkshop.org\/ 2006 \/06-freund.pdf Jessica Gronski, Kenneth Knowles, Aaron Tomb, Stephen N. Freund, and Cormac Flanagan. Sage: Hybrid Checking for Flexible Specifications. In Proc. Workshop on Scheme and Functional Programming, pp. 93-104, 2006. http:\/\/www.schemeworkshop.org\/ 2006 \/06-freund.pdf"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1145\/1297081"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-03237-0_17"},{"key":"e_1_2_1_19_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.ECOOP.2015.149"},{"key":"e_1_2_1_20_1","volume-title":"On the Proxy Identity Crisis","author":"Keil Matthias","year":"2013","unstructured":"Matthias Keil and Peter Thiemann . On the Proxy Identity Crisis . 2013 . https:\/\/arxiv.org\/abs\/1312.5429 Matthias Keil and Peter Thiemann. On the Proxy Identity Crisis. 2013. https:\/\/arxiv.org\/abs\/1312.5429"},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/2858949.2784737"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-662-54494-5_6"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1145\/3133914"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2019.00026"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2019.00045"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-78739-6_2"},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/3338906"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/3434334"},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/3133880"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1145\/3428255"},{"key":"e_1_2_1_31_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE43902.2021.00020"},{"key":"e_1_2_1_32_1","doi-asserted-by":"publisher","DOI":"10.1145\/2676726.2676971"},{"key":"e_1_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-71316-6_16"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/2491411.2491447"},{"key":"e_1_2_1_35_1","volume-title":"Proc. Workshop on Scheme and Functional Programming, 2006","author":"Jeremy","year":"2006","unstructured":"Jeremy G. Siek and Walid Taha. Gradual typing for functional languages . In Proc. Workshop on Scheme and Functional Programming, 2006 . http:\/\/scheme 2006 .cs.uchicago.edu\/13-siek.pdf Jeremy G. Siek and Walid Taha. Gradual typing for functional languages. In Proc. Workshop on Scheme and Functional Programming, 2006. http:\/\/scheme2006.cs.uchicago.edu\/13-siek.pdf"},{"key":"e_1_2_1_36_1","doi-asserted-by":"publisher","DOI":"10.1145\/2837614.2837630"},{"key":"e_1_2_1_37_1","unstructured":"The TypeScript Handbook. 2019. https:\/\/www.typescriptlang.org\/docs\/handbook\/type-compatibility. html# comparing-two-functions  \t\t\t\t  The TypeScript Handbook. 2019. https:\/\/www.typescriptlang.org\/docs\/handbook\/type-compatibility. html# comparing-two-functions"},{"key":"e_1_2_1_38_1","doi-asserted-by":"publisher","DOI":"10.1145\/1176617.1176755"},{"key":"e_1_2_1_39_1","first-page":"578","volume-title":"Arie Van Deursen. Why and How JavaScript Developers Use Linters. In Proc. ACM\/IEEE International Conference on Automated Software Engineering","author":"T\u00f3masd\u00f3ttir Krist\u00edn Fj\u00f3la","year":"2017","unstructured":"Krist\u00edn Fj\u00f3la T\u00f3masd\u00f3ttir , Maur\u00edcio Aniche , and Arie Van Deursen. Why and How JavaScript Developers Use Linters. In Proc. ACM\/IEEE International Conference on Automated Software Engineering , pp. 578 - 589 , 2017 . https:\/\/dl.acm.org\/doi\/10.5555\/3155562.3155634 Krist\u00edn Fj\u00f3la T\u00f3masd\u00f3ttir, Maur\u00edcio Aniche, and Arie Van Deursen. Why and How JavaScript Developers Use Linters. In Proc. ACM\/IEEE International Conference on Automated Software Engineering, pp. 578-589, 2017. https:\/\/dl.acm.org\/doi\/10.5555\/3155562.3155634"},{"key":"e_1_2_1_40_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2018.2871058"},{"key":"e_1_2_1_41_1","volume-title":"Tom Van Cutsem and Mark Miller. Trustworthy Proxies-Virtualizing Objects with Invariants. In Proc. European Conference on Object-Oriented Programming","year":"2013","unstructured":"Tom Van Cutsem and Mark Miller. Trustworthy Proxies-Virtualizing Objects with Invariants. In Proc. European Conference on Object-Oriented Programming , 2013 . https:\/\/research.google\/pubs\/pub40736\/ Tom Van Cutsem and Mark Miller. Trustworthy Proxies-Virtualizing Objects with Invariants. In Proc. European Conference on Object-Oriented Programming, 2013. https:\/\/research.google\/pubs\/pub40736\/"},{"key":"e_1_2_1_42_1","doi-asserted-by":"publisher","DOI":"10.1145\/2661088.2661101"},{"key":"e_1_2_1_43_1","doi-asserted-by":"publisher","DOI":"10.1145\/3276504"},{"key":"e_1_2_1_44_1","volume-title":"Jakub Zalewski. Mixed Messages: Measuring Conformance and Non-Interference in TypeScript. In Proc. European Conference on Object-Oriented Programming","author":"Williams Jack","year":"2017","unstructured":"Jack Williams , J. Garrett Morris , Philip Wadler , and Jakub Zalewski. Mixed Messages: Measuring Conformance and Non-Interference in TypeScript. In Proc. European Conference on Object-Oriented Programming , 2017 . https:\/\/www.pure.ed.ac.uk\/ws\/portalfiles\/portal\/38670500\/ecoop17_mixed_messages_2.pdf Jack Williams, J. Garrett Morris, Philip Wadler, and Jakub Zalewski. Mixed Messages: Measuring Conformance and Non-Interference in TypeScript. In Proc. European Conference on Object-Oriented Programming, 2017. https:\/\/www.pure.ed.ac.uk\/ws\/portalfiles\/portal\/38670500\/ecoop17_mixed_messages_2.pdf"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3563305","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3563305","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T16:38:10Z","timestamp":1750178290000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3563305"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2022,10,31]]},"references-count":44,"journal-issue":{"issue":"OOPSLA2","published-print":{"date-parts":[[2022,10,31]]}},"alternative-id":["10.1145\/3563305"],"URL":"https:\/\/doi.org\/10.1145\/3563305","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2022,10,31]]},"assertion":[{"value":"2022-10-31","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}