method-options.ts
This file
Path
test-d/method-options.ts
12 lines · 297 bytes · TypeScript
Last changed by
Support readonly inputs and explicit undefined in TypeScript optionsSindre Sorhusbefore adoption51b3177
History of this fileTake it
12345678910111213import ky, {type Options} from 'ky';
const options: Options = {method: undefined};void ky('https://example.com', options);void ky.create({method: 'POST'}).extend({method: undefined});void ky('https://example.com', { hooks: { init: [options => { options.method = undefined; }], },});