9 lines
No EOL
271 B
TypeScript
9 lines
No EOL
271 B
TypeScript
interface RawAction {
|
|
(...args: any[]): Promise<any> | void;
|
|
}
|
|
interface ActionFactory {
|
|
<T extends RawAction>(target: T): T;
|
|
}
|
|
declare function foo<U extends any[] = any[]>(): ActionFactory;
|
|
export default foo()(function foobar(param: string): void {
|
|
}); |