TypeScript continues to grow in popularity—many projects have been migrating over to it from Vanilla JavaScript, and new projects are starting out as TypeScript projects from the get go. Its type system allows for many classes of mistakes to be found at compile time, and integrations with text editors and IDEs makes navigating large codebases a breeze.
But these beneficial TypeScript features can only be so useful if the dependencies and libraries that your project uses are not also considered; it should be possible to statically type-check your usage of the modules you import so features like code navigation and autocomplete work for these modules too.
The TypeScript community knows this, and there are a number of initiatives that ensure that type definitions are available for as many JavaScript libraries as possible. Sam Lanning explores TypeScript’s motivations and goals. He then covers the two initiatives that have been transforming the JavaScript ecosystem—DefinitelyTyped, an initiative to write type definitions for commonly used libraries (in particular npm packages) and make them easily accessible, and a method for including type definitions in npm packages and how to automate this process if a package is itself written in TypeScript rather than JavaScript—and explains how to leverage them.
Sam Lanning is a developer advocate at Semmle, which he joined after deciding to drop out of his master’s at Oxford University after completing his undergraduate computer science degree there. He was the first full-time developer for Semmle’s LGTM platform, and he worked on it for over three years before becoming a developer advocate. He’s been an active member of the security and privacy community for a while, with a particular interest in vulnerability research, cryptography, and peer-to-peer networks, having previously contributed to Signal’s Android and desktop clients among other open source projects. In his free time, he’s been working on an open source project that ties together music and lighting.
Comments on this page are now closed.
For exhibition and sponsorship opportunities, email oscon@oreilly.com
For information on trade opportunities with O'Reilly conferences, email partners@oreilly.com
View a complete list of OSCON contacts
©2019, O'Reilly Media, Inc. • (800) 889-8969 or (707) 827-7019 • Monday-Friday 7:30am-5pm PT • All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners. • confreg@oreilly.com
Comments
Content that I’ll be using during this talk can be found / will be found over on GitHub here: https://github.com/samlanning/typescript-talks/tree/master/typescript-js-ecosystem