TIL is my collection of short, technical daily learnings. 254 and counting.
TypeScript Type-Only Imports and Exports
If you’ve been writing TypeScript for a while, you might have written code like this: // utils.ts export type Color = 'red' | 'blue' | 'green'; // app.tsx import {Color} from './utils'; As of TypeScript 3.8, there’s a better way to import! // app.tsx import type {Color} from './utils'; ...