Skip to content

Instantly share code, notes, and snippets.

@wtnabe
Created August 16, 2020 00:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wtnabe/d4978cf6cdb11308a03896dbc1b06fc7 to your computer and use it in GitHub Desktop.
Save wtnabe/d4978cf6cdb11308a03896dbc1b06fc7 to your computer and use it in GitHub Desktop.
export class FooModel extends Function {
private repos: any
/**
* @param {object} repos
* @return {Proxy}
*/
constructor (repos: any = createRepository('foo')) {
super()
this.repos = repos
return new Proxy(this.repos, {
apply (target, thisArg, argumentsList) {
return target[thisArg](argumentsList)
}
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment