diff --git a/.changeset/nine-kings-mix.md b/.changeset/nine-kings-mix.md index 52967c53..2a126e55 100644 --- a/.changeset/nine-kings-mix.md +++ b/.changeset/nine-kings-mix.md @@ -16,9 +16,9 @@ Container.set({ id: NAME, value: 'Joanna' }); // Ensure we can access the identifier via Container.get(A). if (Container.has(NAME, false, IdentifierScope.Singular)) { - console.log(Container.get(NAME)); + console.log(Container.get(NAME)); } // This will throw: Container.getMany(NAME); -``` \ No newline at end of file +``` diff --git a/src/container-instance.class.mts b/src/container-instance.class.mts index 6d7b02c8..2846c2a8 100644 --- a/src/container-instance.class.mts +++ b/src/container-instance.class.mts @@ -1506,7 +1506,11 @@ export class ContainerInstance implements Disposable { /** If Self() is used, do not use recursion. */ const recursive = !isSelf; - const identifierIsPresent = targetContainer.has(identifier, recursive, isMany ? IdentifierScope.Many : IdentifierScope.Singular); + const identifierIsPresent = targetContainer.has( + identifier, + recursive, + isMany ? IdentifierScope.Many : IdentifierScope.Singular + ); /** * Straight away, check if optional was declared. diff --git a/src/types/identifier-scope.type.mts b/src/types/identifier-scope.type.mts index 520f421c..38a3fde7 100644 --- a/src/types/identifier-scope.type.mts +++ b/src/types/identifier-scope.type.mts @@ -2,15 +2,15 @@ * A specification of how an identifier is implemented inside a container. */ export const enum IdentifierScope { - /** The identifier is implemented as a group of values. */ - Many = 0b10, + /** The identifier is implemented as a group of values. */ + Many = 0b10, - /** The identifier is implemented as a singular item. */ - Singular = 0b01, + /** The identifier is implemented as a singular item. */ + Singular = 0b01, - /** - * The identifier is either implemented as {@link IdentifierScope.Many | a group of values}, - * or {@link IdentifierScope.Singular | a singular value}. - */ - Any = 0b11 + /** + * The identifier is either implemented as {@link IdentifierScope.Many | a group of values}, + * or {@link IdentifierScope.Singular | a singular value}. + */ + Any = 0b11, }