Skip to content

Create shortcut for registering Service bindings #24

@squirly

Description

@squirly

When registering services, it is sometimes the case that the passed binding and constructor are an identical reference:

import {Binding, Container} from '@squirly/di';

class MyService {
  static Tag = Binding.Tag<MyService>('MyService');
}

Container.create().bindService(MyService, MyService);

It would be ideal to simplify this registration to

Container.create().bindService(MyService);

This will require creating overloads for the bindService method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions