TSError: ⨯ Unable to compile TypeScript:
foo.ts:1:15 - error TS2614: Module '"../../../../Users/philip/Desktop/tsgottest/node_modules/got/dist/source"' has no exported member 'GotRequestMethod'. Did you mean to use 'import GotRequestMethod from "../../../../Users/philip/Desktop/tsgottest/node_modules/got/dist/source"' instead?
1 import got, { GotRequestMethod, Agents } from 'got';
~~~~~~~~~~~~~~~~
foo.ts:1:33 - error TS2614: Module '"../../../../Users/philip/Desktop/tsgottest/node_modules/got/dist/source"' has no exported member 'Agents'. Did you mean to use 'import Agents from "../../../../Users/philip/Desktop/tsgottest/node_modules/got/dist/source"' instead?
1 import got, { GotRequestMethod, Agents } from 'got';
~~~~~~
Expected behavior
I expect these types to be available.
Code to reproduce
import got, { GotRequestMethod, Agents } from 'got';
function req(method: GotRequestMethod, agent: Agents) {
got({ method, agent });
}
Checklist
[x] I have read the documentation.
[x] I have tried my code with the latest version of Node.js and Got.
Describe the bug
According to the documentation,
got
should export a type calledGotRequestMethod
. However I am unable to import that type in v11.Furthermore, I am unable to import the
Agents
type for the updatedagent
option in v11: https://github.com/sindresorhus/got/releases/tag/v11.0.0Actual behavior
Expected behavior
I expect these types to be available.
Code to reproduce
Checklist