inversify#named TypeScript Examples

The following examples show how to use inversify#named. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: value.ts    From malagu with MIT License 6 votes vote down vote up
export function applyValueDecorator(option: ValueOption, target: any, targetKey: string, index?: number) {
    if (option.detached) {
        if (index !== undefined) {
            throw new Error(`The ${target.constructor.name} itself is not injected into the container, so the parameter injection of the constructor is not supported.`);
        }
        createValueProperty(option, target, targetKey);
        return;
    }

    const el = option.el!;
    inject(VALUE)(target, targetKey, index);
    named(el)(target, targetKey, index);
    return option;
}
Example #2
Source File: System.ts    From GWebGPUEngine with MIT License 5 votes vote down vote up
@inject(IDENTIFIER.Systems)
  @named(IDENTIFIER.FrameGraphSystem)
  private readonly frameGraphSystem: FrameGraphSystem;
Example #3
Source File: RenderPass.ts    From GWebGPUEngine with MIT License 5 votes vote down vote up
@inject(IDENTIFIER.Systems)
  @named(IDENTIFIER.FrameGraphSystem)
  private readonly frameGraphSystem: FrameGraphSystem;
Example #4
Source File: View.ts    From GWebGPUEngine with MIT License 5 votes vote down vote up
@inject(IDENTIFIER.Systems)
  @named(IDENTIFIER.RendererSystem)
  private readonly rendererSystem: RendererSystem;
Example #5
Source File: Renderable.ts    From GWebGPUEngine with MIT License 5 votes vote down vote up
@inject(IDENTIFIER.Systems)
  @named(IDENTIFIER.SceneGraphSystem)
  private readonly sceneGraphSystem: SceneGraphSystem;
Example #6
Source File: index.ts    From GWebGPUEngine with MIT License 5 votes vote down vote up
@inject(IDENTIFIER.Systems)
  @named(IDENTIFIER.MaterialSystem)
  private readonly materialSystem: MaterialSystem;
Example #7
Source File: index.ts    From GWebGPUEngine with MIT License 5 votes vote down vote up
@inject(IDENTIFIER.Systems)
  @named(IDENTIFIER.GeometrySystem)
  private readonly geometrySystem: GeometrySystem;
Example #8
Source File: index.ts    From GWebGPUEngine with MIT License 5 votes vote down vote up
@inject(IDENTIFIER.Systems)
  @named(IDENTIFIER.MaterialSystem)
  private readonly materialSystem: MaterialSystem;
Example #9
Source File: index.ts    From GWebGPUEngine with MIT License 5 votes vote down vote up
@inject(IDENTIFIER.Systems)
  @named(IDENTIFIER.GeometrySystem)
  private readonly geometrySystem: GeometrySystem;
Example #10
Source File: index.ts    From GWebGPUEngine with MIT License 5 votes vote down vote up
@inject(IDENTIFIER.Systems)
  @named(IDENTIFIER.MaterialSystem)
  private readonly materialSystem: MaterialSystem;
Example #11
Source File: index.ts    From GWebGPUEngine with MIT License 5 votes vote down vote up
@inject(IDENTIFIER.Systems)
  @named(IDENTIFIER.GeometrySystem)
  private readonly geometrySystem: GeometrySystem;