Type Alias: AssertScenePlaceableDriver<Ctor>
AssertScenePlaceableDriver<
Ctor> =Ctor
Defined in: packages/core/src/partTypes.ts:140
Compile-time lock for the composite-driver authoring rule. Resolves to Ctor
when it satisfies ScenePlaceableDriverCtor and errors at the type
argument otherwise, so a package turns the rule into a build error in one line:
// MyCompositeDriver must stay scene-placeable
type _Lock = AssertScenePlaceableDriver<typeof MyCompositeDriver>;
Because constructor parameters are checked contravariantly, a driver whose
option parameter is typed the "natural" Partial<IComponentDriverOption<typeof parts>> way fails this assertion — exactly the trap the rule guards against
(see ComponentDriver). This is the reusable form of the type-test that
@atomic-testing/component-driver-html ships as precedent.
Type Parameters​
Ctor​
Ctor extends ScenePlaceableDriverCtor