Skip to content

Commit

Permalink
refactor: Removed the deprecated code
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Removed the deprecated code:
- `exportedProps` property of the module declaration
- utilities:
  - getValues()
  - getProps()
  - resolveProps()
  - injectableProps()
Use v2.1 version to migrate to the unified API.
  • Loading branch information
mnasyrov committed Jan 29, 2022
1 parent 8e8e4d7 commit a821171
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 390 deletions.
7 changes: 0 additions & 7 deletions packages/ditox/src/index.ts
Expand Up @@ -19,13 +19,6 @@ export {
injectableClass,
} from './utils';

export {
getValues,
getProps,
resolveProps,
injectableProps,
} from './utils-deprecated';

export {
bindModule,
bindModules,
Expand Down
9 changes: 1 addition & 8 deletions packages/ditox/src/modules.ts
Expand Up @@ -59,13 +59,6 @@ export type ModuleDeclaration<T extends Module<AnyObject>> = {
[K in keyof GetModuleProps<T>]?: Token<GetModuleProps<T>[K]>;
};

/**
* Dictionary of module properties which are bound to tokens.
*
* @deprecated Use `exports` property.
*/
exportedProps?: ModuleDeclaration<T>['exports'];

/** Callback could be used to prepare an environment. It is called before binding the module. */
beforeBinding?: (container: Container) => void;

Expand Down Expand Up @@ -109,7 +102,7 @@ export function bindModule<T extends Module<AnyObject>>(
): void {
const {token, imports, factory, beforeBinding, afterBinding} =
moduleDeclaration;
const exports = moduleDeclaration.exports ?? moduleDeclaration.exportedProps;
const exports = moduleDeclaration.exports;

const scope = options?.scope;

Expand Down
286 changes: 0 additions & 286 deletions packages/ditox/src/utils-deprecated.test.ts

This file was deleted.

0 comments on commit a821171

Please sign in to comment.