Repository navigation
What would you like to discuss?I have the following code in typescript: const client = got.extend({
...,
handlers: [someHandler],
});and handler function: async function someHandler (options: ???, next: ???): Promise<???> {}How can i access types of Checklist
|
Answered by
Giotino
Dec 9, 2020
Replies: 3 comments
|
import { HandlerFunction } from 'got'; |
0 replies
Answer selected by
sindresorhus
|
If you were referring to the handler parameters types you can take a look at the definition of export declare type HandlerFunction = <T extends GotReturn>(options: NormalizedOptions, next: (options: NormalizedOptions) => T) => T | Promise<T>; |
0 replies
|
Thanks @Giotino. It seems that my typescript knowledge should be improved. I tried to access it like this: import got from 'got';
got.SomeType |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
HandlerFunctiontype is exported by Got, you can use it like follows: