Skip to content

4.1.0

Latest
Compare
Choose a tag to compare
@tomas-light tomas-light released this 11 Feb 11:51
· 2 commits to master since this release

cheap-di 4.1.0

馃殌 added enrich method to container to be able to wrap resolved instance with Proxy or something else that you need;

import { container } from 'cheap-di';

class Api {
  async load() {
    // ...
  }
}

container
  .registerImplementation(Api)
  .enrich((api) => {
    return new Proxy(api, {
      get(instance, propertyName) {
        console.log('Request to', propertyName.toString());
        return instance[propertyName as keyof typeof instance];
      },
    });
  });

cheap-di-react 4.1.2

馃敤 updated cheap-di to from 4.0.1 to 4.1.0

cheap-di-ts-transform 1.1.1

馃敤 updated cheap-di to from 4.0.1 to 4.1.0