Skip to content

Instantly share code, notes, and snippets.

@loderunner
Created December 13, 2022 10:49
Show Gist options
  • Save loderunner/503986cf3e68364bcc9197670b0e3348 to your computer and use it in GitHub Desktop.
Save loderunner/503986cf3e68364bcc9197670b0e3348 to your computer and use it in GitHub Desktop.
export class Client {
doTheThing(message: string, count: number): boolean { /* ... */ }
}
declare function doTheThing(message: string, count: number): boolean
export function doTheThing(...args Parameters<Client['doTheThing']>): ReturnType<Client['doTheThing']> {
const client = new Client(defaultClientOptions)
return client.doTheThing(...args)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment