-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Could you please provide a full fluentProvide example?
I have this kind of issue:
import { Container, decorate, inject, injectable, interfaces as inversifyInterfaces, named } from "inversify";
import { fluentProvide, buildProviderModule } from "inversify-binding-decorators";
import "reflect-metadata";
const container = new Container();
const provideFluent = fluentProvide(container);
....
export function ProvideAsSingleton(symbol: inversifyInterfaces.ServiceIdentifier<any>): any {
return provideFluent(symbol).inSingletonScope().done(true);
}
container.load(buildProviderModule());
export { container };
The issue is at:
const provideFluent = fluentProvide(container);
the error is:
[ts]
Argument of type 'Container' is not assignable to parameter of type 'string | symbol | Newable<any> | Abstract<any>'.
Type 'Container' is not assignable to type 'Abstract<any>'.
Property 'prototype' is missing in type 'Container'.
How can I use fluent provider?
thanks
ValorLin, sgarza, thaiwu0107, snoosmoomrik, kferrone and 2 more
Metadata
Metadata
Assignees
Labels
No labels