Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Question: interfaces #107

@csrinaldi

Description

@csrinaldi

It is possible to anotate multiple classes with the same interface and then ask to "Injector" all annotated classes with the interface?

By Example:

class Module{}

class AModule{}
di.annotate(Module, new di.Inject(Module));

class BModule{}
di.annotate(Module, new di.Inject(Module));

// More code

var di = require('di');
var Module = require('./core/module');
var injector = new di.Injector();

var modules = injector.get(Module);

// [AModule, BModule]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions