Skip to content
1 min read · 81 words

Type Alias: EngineResolver<T>

ts
type EngineResolver<T> =
  | T
  | (() =>
      | T
      | {
          default: T;
        }
      | Promise<
          | T
          | {
              default: T;
            }
        >);

Defined in: src/batteries/media/contracts.ts:52

A value-or-resolver: the canonical way to supply an engine. Resolvers may be sync or async (dynamic import) and may resolve to the value directly or a { default: value } module namespace. Engine resolvers run eagerly at pipeline construction — the engine module itself is cheap; heavy peer dependencies load lazily inside capability methods.

Type Parameters

Type ParameterDefault type
TMediaEngine