We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import { Context, Service } from 'cordis'; declare module 'cordis' { interface Context { foo: FooService; } } const app = new Context(); class FooService extends Service { constructor(ctx) { super(ctx, 'foo', true); } funcA(arg) { console.log(arg, arg.toString()); this.funcB(arg); } funcB(arg) { console.log(arg, arg.toString()); } } app.plugin(FooService); app.plugin({ inject: ['foo'], apply(ctx) { ctx.foo.funcA(class Foo { }); }, });
node -r @hydrooj/register foo.ts
outputs:
[class Foo] function () { [native code] } [Function: Foo] function () { [native code] }
The text was updated successfully, but these errors were encountered:
f58c078
No branches or pull requests
outputs:
The text was updated successfully, but these errors were encountered: