• Preparing search index...
  • The search index is not available
lib.reviews
  • lib.reviews
  • dal/lib/model-handle
  • referenceModel

Function referenceModel

  • referenceModel<
        Manifest extends
            ModelManifest<
                Record<string, ModelSchemaField<unknown>>,
                boolean,
                EmptyStaticMethods,
                Record<never, InstanceMethod>,
            >,
        Methods extends StaticMethodsMap = {},
        Properties extends StaticPropertiesMap = {},
    >(
        manifest: Manifest,
        staticMethods?: Methods,
        staticProperties?: Properties,
    ): InferConstructor<Manifest> & Methods & Properties

    Create a typed reference to another model using its manifest. This allows models to reference each other without importing their full runtime code, avoiding circular dependency issues.

    Type Parameters

    • Manifest extends ModelManifest<
          Record<string, ModelSchemaField<unknown>>,
          boolean,
          EmptyStaticMethods,
          Record<never, InstanceMethod>,
      >
    • Methods extends StaticMethodsMap = {}
    • Properties extends StaticPropertiesMap = {}

    Parameters

    • manifest: Manifest

      The model manifest to reference

    • OptionalstaticMethods: Methods

      Optional static method overrides

    • OptionalstaticProperties: Properties

      Optional static property overrides

    Returns InferConstructor<Manifest> & Methods & Properties

    Typed model reference that resolves at runtime via bootstrap

    • Defined in dal/lib/model-handle.ts:197

Settings

Member Visibility
lib.reviews
  • Loading...

Generated using TypeDoc