declare function that adheres to type

77 views Asked by At

So I've got a non-typescript project that I'm writing a definition file for.

I've got something that looks like this:

type SomeType<S> = <T>(operator: (arg: T) => void) => S

and I want to export a function that adheres to that type in the definition file, but I'm not sure how to do it. I tried this, but of course the syntax isn't correct:

type SomeType<S> = <T>(operator: (arg: T) => void) => S

export function someFunc<S> = SomeType<S>

Possible?

0

There are 0 answers