Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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