You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export class Config {
public url = "https://google.com";
}
export class SubService {
@inject public configModel: ConfigModel;
}
export class MainService {
public prop = new SubService();
public props = [new SubService(), new SubService()];
}
@provider(
Config,
MainService,
)
export class Html extends React.Component {
@inject private service: MainService;
}
The text was updated successfully, but these errors were encountered:
But with decorators it can't work. Because @inject doesn't immediately write dependency to decorated property, but rather it define a lazy property getter that resolves dependency on demand. And it is conceptual limitation of TypeScript decorators.
Hi. I have a proposal. There is an example:
The text was updated successfully, but these errors were encountered: