@codefast/di 0.3.16-canary.3 → 0.4.0-canary.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @codefast/di
2
2
 
3
+ ## 0.4.0-canary.5
4
+
5
+ ## 0.4.0-canary.4
6
+
7
+ ### Patch Changes
8
+
9
+ - [#495](https://github.com/codefastlabs/codefast/pull/495) [`a66946d`](https://github.com/codefastlabs/codefast/commit/a66946d7b4f249927caea567232a9c05cd861020) Thanks [@thevuong](https://github.com/thevuong)! - Drop redundant type assertions in the container, resolver, decorators, and module wiring — behavior is unchanged; the types now flow without casts.
10
+
11
+ - [#495](https://github.com/codefastlabs/codefast/pull/495) [`fa338d6`](https://github.com/codefastlabs/codefast/commit/fa338d61fbfafb94beaa4d05d93d01e2c005cc91) Thanks [@thevuong](https://github.com/thevuong)! - Normalize import statement order and package.json key order repo-wide via the new oxfmt `sortImports`/`sortPackageJson` settings — purely mechanical, no runtime behavior change.
12
+
3
13
  ## 0.3.16-canary.3
4
14
 
5
15
  ### Patch Changes
package/README.md CHANGED
@@ -62,7 +62,7 @@ Type-safe, ESM-only dependency injection for modern TypeScript — built on TC39
62
62
 
63
63
  ## Requirements
64
64
 
65
- - Node.js `>= 22.0.0` (see `package.json` → `engines`)
65
+ - Node.js `>= 24.0.0` (see `package.json` → `engines`)
66
66
  - TypeScript `>= 5.2` with native Stage 3 decorators (TypeScript `5.9+` recommended for best inference, consistent with other Codefast packages)
67
67
 
68
68
  Enable native decorators in `tsconfig.json` — do **not** enable `experimentalDecorators`:
@@ -203,14 +203,9 @@ container.bind(DbToken).toDynamicAsync(async (ctx) => {
203
203
 
204
204
  container
205
205
  .bind(UserServiceToken)
206
- .toResolved((repository, config) => new UserService(repository, config), [
207
- UserRepository,
208
- AppConfigToken,
209
- ] as const);
206
+ .toResolved((repository, config) => new UserService(repository, config), [UserRepository, AppConfigToken] as const);
210
207
 
211
- container
212
- .bind(MetricsToken)
213
- .toResolvedAsync(async (db) => new MetricsCollector(db), [DbToken] as const);
208
+ container.bind(MetricsToken).toResolvedAsync(async (db) => new MetricsCollector(db), [DbToken] as const);
214
209
 
215
210
  container.bind(LegacyServiceToken).toAlias(NewServiceToken);
216
211
  ```
@@ -602,12 +597,7 @@ All errors extend `DiError` and expose a stable `code` property.
602
597
  | `TokenNotBoundError` | `"TOKEN_NOT_BOUND"` | Required token has no binding |
603
598
 
604
599
  ```typescript
605
- import {
606
- AmbiguousBindingError,
607
- DiError,
608
- ScopeViolationError,
609
- TokenNotBoundError,
610
- } from "@codefast/di";
600
+ import { AmbiguousBindingError, DiError, ScopeViolationError, TokenNotBoundError } from "@codefast/di";
611
601
 
612
602
  try {
613
603
  container.resolve(ServiceToken);
@@ -615,9 +605,7 @@ try {
615
605
  if (error instanceof TokenNotBoundError) {
616
606
  console.error(`Not registered: ${error.tokenName}`);
617
607
  } else if (error instanceof ScopeViolationError) {
618
- console.error(
619
- `Scope violation: ${error.details.consumerToken} → ${error.details.dependencyToken}`,
620
- );
608
+ console.error(`Scope violation: ${error.details.consumerToken} → ${error.details.dependencyToken}`);
621
609
  } else if (error instanceof AmbiguousBindingError) {
622
610
  console.error(`Ambiguous: ${error.tokenName}`, error.candidateIds);
623
611
  } else if (error instanceof DiError) {
@@ -2,10 +2,10 @@ import { Constructor } from "./constructor-type.mjs";
2
2
  import { Token } from "./token.mjs";
3
3
  import { ActivationHandler, BindingIdentifier, DeactivationHandler, ResolveOptions } from "./types.mjs";
4
4
  import { BindToBuilder } from "./binding.mjs";
5
- import { AsyncModule, SyncModule } from "./module.mjs";
6
- import { BindingSnapshot, ContainerSnapshot } from "./inspector.mjs";
7
- import { ContainerGraphJson, GraphOptions } from "./dependency-graph.mjs";
8
5
  import { AutoRegisterRegistry } from "./decorators/injectable.mjs";
6
+ import { ContainerGraphJson, GraphOptions } from "./dependency-graph.mjs";
7
+ import { BindingSnapshot, ContainerSnapshot } from "./inspector.mjs";
8
+ import { AsyncModule, SyncModule } from "./module.mjs";
9
9
 
10
10
  //#region src/container.d.ts
11
11
  /**
@@ -2,17 +2,17 @@ import { effectiveBindingScope } from "./binding-scope.mjs";
2
2
  import { AsyncModuleLoadError, CircularDependencyError, DisposedContainerError, InternalError, RebindUnboundTokenError, ScopeViolationError, SyncDisposalNotSupportedError } from "./errors.mjs";
3
3
  import { DEFAULT_BINDING_SLOT, generateBindingId } from "./binding.mjs";
4
4
  import { tokenName } from "./token.mjs";
5
- import { BindingRegistry } from "./registry.mjs";
6
- import { ScopeManager } from "./scope.mjs";
7
- import { LifecycleManager } from "./lifecycle.mjs";
8
5
  import { bindingSlotToResolveOptions, injectionSlotToResolveOptions } from "./resolve-options.mjs";
9
- import { DependencyResolver } from "./resolver.mjs";
10
- import { Inspector } from "./inspector.mjs";
6
+ import { normalizeToDescriptor } from "./decorators/inject.mjs";
11
7
  import { buildDependencyGraph } from "./dependency-graph.mjs";
12
- import { defaultMetadataReader } from "./metadata/symbol-metadata-reader.mjs";
8
+ import { Inspector } from "./inspector.mjs";
9
+ import { LifecycleManager } from "./lifecycle.mjs";
13
10
  import { MetadataReaderToken } from "./metadata/metadata-reader-token.mjs";
14
- import { normalizeToDescriptor } from "./decorators/inject.mjs";
11
+ import { defaultMetadataReader } from "./metadata/symbol-metadata-reader.mjs";
15
12
  import { isSyncModule } from "./module.mjs";
13
+ import { BindingRegistry } from "./registry.mjs";
14
+ import { DependencyResolver } from "./resolver.mjs";
15
+ import { ScopeManager } from "./scope.mjs";
16
16
  //#region src/container.ts
17
17
  var DefaultContainer = class DefaultContainer {
18
18
  _disposed = false;
@@ -1,7 +1,7 @@
1
1
  import { InternalError, MissingContainerContextError } from "../errors.mjs";
2
2
  import { getActiveContainer } from "../environment.mjs";
3
- import { injectionSlotToResolveOptions } from "../resolve-options.mjs";
4
3
  import { INJECT_ACCESSOR_KEY } from "../metadata/metadata-keys.mjs";
4
+ import { injectionSlotToResolveOptions } from "../resolve-options.mjs";
5
5
  //#region src/decorators/inject.ts
6
6
  /**
7
7
  * @since 0.3.16-canary.0
@@ -83,7 +83,7 @@ function buildInjectionDescriptor(token, options) {
83
83
  function inject(token, options) {
84
84
  const descriptor = buildInjectionDescriptor(token, options);
85
85
  const decoratorFn = (_target, context) => {
86
- if (context.static === true) throw new InternalError("@inject() on static accessors is not supported; only instance accessors participate in runWithContainer-based property injection.");
86
+ if (context.static) throw new InternalError("@inject() on static accessors is not supported; only instance accessors participate in runWithContainer-based property injection.");
87
87
  const meta = context.metadata;
88
88
  if (!Array.isArray(meta[INJECT_ACCESSOR_KEY])) meta[INJECT_ACCESSOR_KEY] = [];
89
89
  meta[INJECT_ACCESSOR_KEY].push({
@@ -9,7 +9,7 @@ function appendUniqueMethod(metadata, phase, methodName) {
9
9
  */
10
10
  function postConstruct() {
11
11
  return function(target, context) {
12
- if (context.static === true) throw new InternalError("@postConstruct() applies to instance methods only; static methods are not invoked during instance lifecycle.");
12
+ if (context.static) throw new InternalError("@postConstruct() applies to instance methods only; static methods are not invoked during instance lifecycle.");
13
13
  const methodName = String(context.name);
14
14
  const meta = context.metadata;
15
15
  if (!meta[LIFECYCLE_KEY]) meta[LIFECYCLE_KEY] = {
@@ -24,7 +24,7 @@ function postConstruct() {
24
24
  */
25
25
  function preDestroy() {
26
26
  return function(target, context) {
27
- if (context.static === true) throw new InternalError("@preDestroy() applies to instance methods only; static methods are not invoked during instance teardown.");
27
+ if (context.static) throw new InternalError("@preDestroy() applies to instance methods only; static methods are not invoked during instance teardown.");
28
28
  const methodName = String(context.name);
29
29
  const meta = context.metadata;
30
30
  if (!meta[LIFECYCLE_KEY]) meta[LIFECYCLE_KEY] = {
@@ -1,6 +1,6 @@
1
1
  import { BindingScope } from "./types.mjs";
2
- import { BindingRegistry } from "./registry.mjs";
3
2
  import { MetadataReader } from "./metadata/metadata-types.mjs";
3
+ import { BindingRegistry } from "./registry.mjs";
4
4
 
5
5
  //#region src/dependency-graph.d.ts
6
6
  /**
package/dist/index.d.mts CHANGED
@@ -5,11 +5,11 @@ import { InjectOptions, InjectableDependency, InjectionDescriptor, inject, injec
5
5
  import { AliasBindingBuilder, BindToBuilder, BindingBuilder, ConstantBindingBuilder, ScopedBindingBuilder, SingletonBindingBuilder, SingletonLifecycleBuilder, SlotConstrainedBuilder, TransientBindingBuilder } from "./binding.mjs";
6
6
  import { effectiveBindingScope } from "./binding-scope.mjs";
7
7
  import { whenAnyAncestorIs, whenAnyAncestorNamed, whenAnyAncestorTagged, whenAnyAncestorTaggedAll, whenNoAncestorIs, whenNoParentIs, whenParentIs, whenParentNamed, whenParentTagged, whenParentTaggedAll } from "./constraints.mjs";
8
- import { AsyncModule, AsyncModuleBuilder, Module, ModuleBuilder, SyncModule, isSyncModule } from "./module.mjs";
9
- import { BindingSnapshot, ContainerSnapshot } from "./inspector.mjs";
8
+ import { AutoRegisterRegistry, InjectableOptions, createAutoRegisterRegistry, injectable } from "./decorators/injectable.mjs";
10
9
  import { MetadataReader, MutableLifecycleMetadata } from "./metadata/metadata-types.mjs";
11
10
  import { ContainerGraphJson, GraphEdge, GraphNode, GraphOptions } from "./dependency-graph.mjs";
12
- import { AutoRegisterRegistry, InjectableOptions, createAutoRegisterRegistry, injectable } from "./decorators/injectable.mjs";
11
+ import { BindingSnapshot, ContainerSnapshot } from "./inspector.mjs";
12
+ import { AsyncModule, AsyncModuleBuilder, Module, ModuleBuilder, SyncModule, isSyncModule } from "./module.mjs";
13
13
  import { Container, ContainerStatic } from "./container.mjs";
14
14
  import { postConstruct, preDestroy } from "./decorators/lifecycle-decorators.mjs";
15
15
  import { AmbiguousBindingError, AsyncActivationError, AsyncDeactivationError, AsyncModuleLoadError, AsyncResolutionError, CircularDependencyError, DiError, DisposedContainerError, InternalError, MissingContainerContextError, MissingMetadataError, MissingScopeContextError, NoMatchingBindingError, RebindUnboundTokenError, ScopeViolationDetails, ScopeViolationError, SyncDisposalNotSupportedError, TokenNotBoundError } from "./errors.mjs";
package/dist/index.mjs CHANGED
@@ -3,8 +3,8 @@ import { AmbiguousBindingError, AsyncActivationError, AsyncDeactivationError, As
3
3
  import { isToken, token, tokenName } from "./token.mjs";
4
4
  import { whenAnyAncestorIs, whenAnyAncestorNamed, whenAnyAncestorTagged, whenAnyAncestorTaggedAll, whenNoAncestorIs, whenNoParentIs, whenParentIs, whenParentNamed, whenParentTagged, whenParentTaggedAll } from "./constraints.mjs";
5
5
  import { bindingSlotToResolveOptions, injectionSlotToResolveOptions } from "./resolve-options.mjs";
6
- import { MetadataReaderToken } from "./metadata/metadata-reader-token.mjs";
7
6
  import { inject, injectAll, isInjectionDescriptor, optional } from "./decorators/inject.mjs";
7
+ import { MetadataReaderToken } from "./metadata/metadata-reader-token.mjs";
8
8
  import { AsyncModule, Module, SyncModule, isSyncModule } from "./module.mjs";
9
9
  import { Container } from "./container.mjs";
10
10
  import { createAutoRegisterRegistry, injectable } from "./decorators/injectable.mjs";
package/dist/module.mjs CHANGED
@@ -36,7 +36,7 @@ const Module = {
36
36
  * @since 0.3.16-canary.0
37
37
  */
38
38
  function isSyncModule(module) {
39
- return module[SYNC_MODULE_BRAND] === true;
39
+ return module[SYNC_MODULE_BRAND];
40
40
  }
41
41
  //#endregion
42
42
  export { AsyncModule, Module, SyncModule, isSyncModule };
@@ -2,9 +2,9 @@ import { Constructor } from "./constructor-type.mjs";
2
2
  import { Token } from "./token.mjs";
3
3
  import { ResolutionFrame, ResolveOptions } from "./types.mjs";
4
4
  import { Binding } from "./binding.mjs";
5
+ import { MetadataReader } from "./metadata/metadata-types.mjs";
5
6
  import { BindingRegistry } from "./registry.mjs";
6
7
  import { ScopeManager } from "./scope.mjs";
7
- import { MetadataReader } from "./metadata/metadata-types.mjs";
8
8
  import { Container } from "./container.mjs";
9
9
  import { LifecycleManager } from "./lifecycle.mjs";
10
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codefast/di",
3
- "version": "0.3.16-canary.3",
3
+ "version": "0.4.0-canary.5",
4
4
  "description": "Lightweight dependency injection primitives for Codefast",
5
5
  "keywords": [
6
6
  "codefast",
@@ -198,15 +198,15 @@
198
198
  "devDependencies": {
199
199
  "@babel/plugin-proposal-decorators": "8.0.0-rc.6",
200
200
  "@rolldown/plugin-babel": "^0.2.3",
201
- "@types/node": "^25.9.1",
202
- "@typescript/native-preview": "7.0.0-dev.20260526.1",
203
- "@vitest/coverage-v8": "^4.1.7",
201
+ "@types/node": "^25.9.3",
202
+ "@typescript/native-preview": "7.0.0-dev.20260611.2",
203
+ "@vitest/coverage-v8": "^4.1.8",
204
204
  "expect-type": "^1.3.0",
205
- "tsdown": "^0.22.0",
206
- "tsx": "^4.22.3",
205
+ "tsdown": "^0.22.2",
206
+ "tsx": "^4.22.4",
207
207
  "typescript": "^6.0.3",
208
- "vitest": "^4.1.7",
209
- "@codefast/typescript-config": "0.3.16-canary.3"
208
+ "vitest": "^4.1.8",
209
+ "@codefast/typescript-config": "0.4.0-canary.5"
210
210
  },
211
211
  "engines": {
212
212
  "node": ">=24.0.0"
@@ -1,6 +1,6 @@
1
1
  import type { Binding } from "#/binding";
2
- import type { BindingTag, ConstraintContext, ResolveOptions } from "#/types";
3
2
  import { AmbiguousBindingError } from "#/errors";
3
+ import type { BindingTag, ConstraintContext, ResolveOptions } from "#/types";
4
4
 
5
5
  /**
6
6
  * Select a single candidate from a list of bindings using slot matching + predicates.
@@ -70,10 +70,7 @@ function filterBindings(
70
70
 
71
71
  const result: Array<Binding> = [];
72
72
  for (const binding of bindings) {
73
- const slotMatched =
74
- selectionMode === "all"
75
- ? matchesSlotForResolveAll(binding, hint)
76
- : matchesSlot(binding, hint);
73
+ const slotMatched = selectionMode === "all" ? matchesSlotForResolveAll(binding, hint) : matchesSlot(binding, hint);
77
74
  if (slotMatched && matchesPredicate(binding, ctx)) {
78
75
  result.push(binding);
79
76
  }
@@ -84,9 +81,7 @@ function filterBindings(
84
81
  function matchesSlotForResolveAll(binding: Binding, hint: ResolveOptions | undefined): boolean {
85
82
  const hasExplicitSlotFilter =
86
83
  hint !== undefined &&
87
- (hint.name !== undefined ||
88
- (hint.tags !== undefined && hint.tags.length > 0) ||
89
- hint.tag !== undefined);
84
+ (hint.name !== undefined || (hint.tags !== undefined && hint.tags.length > 0) || hint.tag !== undefined);
90
85
  if (!hasExplicitSlotFilter) {
91
86
  return true;
92
87
  }
@@ -140,11 +135,7 @@ function matchHintTag(
140
135
  hintTags: ReadonlyArray<BindingTag> | undefined,
141
136
  singleHintTag: BindingTag | undefined,
142
137
  ): boolean {
143
- if (
144
- singleHintTag !== undefined &&
145
- singleHintTag[0] === tagKey &&
146
- Object.is(singleHintTag[1], tagValue)
147
- ) {
138
+ if (singleHintTag !== undefined && singleHintTag[0] === tagKey && Object.is(singleHintTag[1], tagValue)) {
148
139
  return true;
149
140
  }
150
141
  if (hintTags === undefined || hintTags.length === 0) {
package/src/binding.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import type { InjectionDescriptor } from "#/decorators/inject";
2
+ import type { Token } from "#/token";
1
3
  import type {
2
4
  ActivationHandler,
3
5
  BindingIdentifier,
@@ -10,8 +12,6 @@ import type {
10
12
  TokenValue,
11
13
  ConstraintContext,
12
14
  } from "#/types";
13
- import type { Token } from "#/token";
14
- import type { InjectionDescriptor } from "#/decorators/inject";
15
15
 
16
16
  // ── BindingSlot ───────────────────────────────────────────────────────────────────
17
17
 
@@ -34,11 +34,7 @@ export function bindingSlotEquals(left: BindingSlot, right: BindingSlot): boolea
34
34
  return false;
35
35
  }
36
36
  for (const [tagKey, tagValue] of left.tags) {
37
- if (
38
- !right.tags.some(
39
- ([otherKey, otherValue]) => otherKey === tagKey && Object.is(otherValue, tagValue),
40
- )
41
- ) {
37
+ if (!right.tags.some(([otherKey, otherValue]) => otherKey === tagKey && Object.is(otherValue, tagValue))) {
42
38
  return false;
43
39
  }
44
40
  }
@@ -1,6 +1,6 @@
1
- import type { BindingTag, ConstraintContext, Constructor } from "#/types";
2
1
  import type { Token } from "#/token";
3
2
  import { tokenName } from "#/token";
3
+ import type { BindingTag, ConstraintContext, Constructor } from "#/types";
4
4
 
5
5
  function tokenNameOf(token: Token<unknown> | Constructor): string {
6
6
  return tokenName(token);
@@ -9,25 +9,19 @@ function tokenNameOf(token: Token<unknown> | Constructor): string {
9
9
  /**
10
10
  * @since 0.3.16-canary.0
11
11
  */
12
- export function whenParentIs(
13
- token: Token<unknown> | Constructor,
14
- ): (constraintContext: ConstraintContext) => boolean {
12
+ export function whenParentIs(token: Token<unknown> | Constructor): (constraintContext: ConstraintContext) => boolean {
15
13
  const tokenDisplayName = tokenNameOf(token);
16
14
  return (constraintContext) =>
17
- constraintContext.parent !== undefined &&
18
- constraintContext.parent.tokenName === tokenDisplayName;
15
+ constraintContext.parent !== undefined && constraintContext.parent.tokenName === tokenDisplayName;
19
16
  }
20
17
 
21
18
  /**
22
19
  * @since 0.3.16-canary.0
23
20
  */
24
- export function whenNoParentIs(
25
- token: Token<unknown> | Constructor,
26
- ): (constraintContext: ConstraintContext) => boolean {
21
+ export function whenNoParentIs(token: Token<unknown> | Constructor): (constraintContext: ConstraintContext) => boolean {
27
22
  const tokenDisplayName = tokenNameOf(token);
28
23
  return (constraintContext) =>
29
- constraintContext.parent === undefined ||
30
- constraintContext.parent.tokenName !== tokenDisplayName;
24
+ constraintContext.parent === undefined || constraintContext.parent.tokenName !== tokenDisplayName;
31
25
  }
32
26
 
33
27
  /**
@@ -38,9 +32,7 @@ export function whenAnyAncestorIs(
38
32
  ): (constraintContext: ConstraintContext) => boolean {
39
33
  const tokenDisplayName = tokenNameOf(token);
40
34
  return (constraintContext) =>
41
- constraintContext.ancestors.some(
42
- (ancestorFrame) => ancestorFrame.tokenName === tokenDisplayName,
43
- );
35
+ constraintContext.ancestors.some((ancestorFrame) => ancestorFrame.tokenName === tokenDisplayName);
44
36
  }
45
37
 
46
38
  /**
@@ -51,55 +43,39 @@ export function whenNoAncestorIs(
51
43
  ): (constraintContext: ConstraintContext) => boolean {
52
44
  const tokenDisplayName = tokenNameOf(token);
53
45
  return (constraintContext) =>
54
- constraintContext.ancestors.every(
55
- (ancestorFrame) => ancestorFrame.tokenName !== tokenDisplayName,
56
- );
46
+ constraintContext.ancestors.every((ancestorFrame) => ancestorFrame.tokenName !== tokenDisplayName);
57
47
  }
58
48
 
59
49
  /**
60
50
  * @since 0.3.16-canary.0
61
51
  */
62
52
  export function whenParentNamed(name: string): (constraintContext: ConstraintContext) => boolean {
63
- return (constraintContext) =>
64
- constraintContext.parent !== undefined && constraintContext.parent.slot.name === name;
53
+ return (constraintContext) => constraintContext.parent !== undefined && constraintContext.parent.slot.name === name;
65
54
  }
66
55
 
67
56
  /**
68
57
  * @since 0.3.16-canary.0
69
58
  */
70
- export function whenAnyAncestorNamed(
71
- name: string,
72
- ): (constraintContext: ConstraintContext) => boolean {
73
- return (constraintContext) =>
74
- constraintContext.ancestors.some((ancestorFrame) => ancestorFrame.slot.name === name);
59
+ export function whenAnyAncestorNamed(name: string): (constraintContext: ConstraintContext) => boolean {
60
+ return (constraintContext) => constraintContext.ancestors.some((ancestorFrame) => ancestorFrame.slot.name === name);
75
61
  }
76
62
 
77
63
  /**
78
64
  * @since 0.3.16-canary.0
79
65
  */
80
- export function whenParentTagged(
81
- tag: string,
82
- value: unknown,
83
- ): (constraintContext: ConstraintContext) => boolean {
66
+ export function whenParentTagged(tag: string, value: unknown): (constraintContext: ConstraintContext) => boolean {
84
67
  return (constraintContext) =>
85
68
  constraintContext.parent !== undefined &&
86
- constraintContext.parent.slot.tags.some(
87
- ([tagKey, tagValue]) => tagKey === tag && Object.is(tagValue, value),
88
- );
69
+ constraintContext.parent.slot.tags.some(([tagKey, tagValue]) => tagKey === tag && Object.is(tagValue, value));
89
70
  }
90
71
 
91
72
  /**
92
73
  * @since 0.3.16-canary.0
93
74
  */
94
- export function whenAnyAncestorTagged(
95
- tag: string,
96
- value: unknown,
97
- ): (constraintContext: ConstraintContext) => boolean {
75
+ export function whenAnyAncestorTagged(tag: string, value: unknown): (constraintContext: ConstraintContext) => boolean {
98
76
  return (constraintContext) =>
99
77
  constraintContext.ancestors.some((ancestorFrame) =>
100
- ancestorFrame.slot.tags.some(
101
- ([tagKey, tagValue]) => tagKey === tag && Object.is(tagValue, value),
102
- ),
78
+ ancestorFrame.slot.tags.some(([tagKey, tagValue]) => tagKey === tag && Object.is(tagValue, value)),
103
79
  );
104
80
  }
105
81
 
@@ -120,9 +96,7 @@ export function whenParentTaggedAll(
120
96
  }
121
97
  const { tags: parentTags } = parent.slot;
122
98
  return tags.every(([tagKey, tagValue]) =>
123
- parentTags.some(
124
- ([otherKey, otherValue]) => otherKey === tagKey && Object.is(otherValue, tagValue),
125
- ),
99
+ parentTags.some(([otherKey, otherValue]) => otherKey === tagKey && Object.is(otherValue, tagValue)),
126
100
  );
127
101
  };
128
102
  }
@@ -141,9 +115,7 @@ export function whenAnyAncestorTaggedAll(
141
115
  constraintContext.ancestors.some((frame) => {
142
116
  const { tags: frameTags } = frame.slot;
143
117
  return tags.every(([tagKey, tagValue]) =>
144
- frameTags.some(
145
- ([otherKey, otherValue]) => otherKey === tagKey && Object.is(otherValue, tagValue),
146
- ),
118
+ frameTags.some(([otherKey, otherValue]) => otherKey === tagKey && Object.is(otherValue, tagValue)),
147
119
  );
148
120
  });
149
121
  }