Explore how to leverage TypeScript for creating robust and user-friendly APIs in this JSworld 2021 conference talk. Dive into the benefits of formalizing APIs with TypeScript, including improved clarity and reduced uncertainty for both JavaScript and TypeScript projects. Learn about TypeScript definition files and their role in describing npm packages, even when the package author or consumer isn't using TypeScript. Discover auto-generation tools like OpenAPI (Swagger) for maintaining shared API entity definitions across projects. Examine the relationship between Swagger and GraphQL, exploring options for generating comprehensive type definitions and clients from schemas in your code. Gain insights into creating a "pit of success" for integrating external code into your projects, enhancing developer experience and code reliability.
Overview
Syllabus
Introduction
What is TypeScript
Why TypeScript
Definition Files
Intellisense
DefinitelyTyped
TypeDoc
OpenAPI
Swagger
REST
GraphQL
GraphQL vs TypeScript
GraphQL Cons
Recap
Taught by
JSWORLD Conference