Skip to content
Myr

fetch-options.ts

This file

Path

test-d/fetch-options.ts

6 lines · 195 bytes · TypeScript

Last changed by

Support readonly inputs and explicit undefined in TypeScript optionsSindre Sorhusbefore adoption51b3177

History of this file

Take it

Support readonly inputs and explicit undefined in TypeScript optionsSindre Sorhusbefore adoption51b3177

lines 1–6why, one step back
1import {expectTypeOf} from 'expect-type';
2import type {Options} from 'ky';34const defaultFetch: Options = {fetch: undefined};56expectTypeOf(defaultFetch.fetch).toMatchTypeOf<Options['fetch']>();