#TypeScript – use case for testing types (*):
import type { Assert, Includes } from 'asserttt';
type Config = {url: string};
const prop_url = 'url';
// Compile-time check: Is `prop_url` really a prop key?
type _ = Assert>;
(*) https://exploringjs.com/ts/book/ch_testing-types.html
import type { Assert, Includes } from 'asserttt';
type Config = {url: string};
const prop_url = 'url';
// Compile-time check: Is `prop_url` really a prop key?
type _ = Assert
(*) https://exploringjs.com/ts/book/ch_testing-types.html
Comments