• Preparing search index...
  • The search index is not available
lib.reviews
  • lib.reviews
  • dal/lib/create-model
  • createModelProxy

Function createModelProxy

  • createModelProxy<
        Manifest extends
            ModelManifest<
                Record<string, ModelSchemaField<unknown>>,
                boolean,
                EmptyStaticMethods,
                Record<never, InstanceMethod>,
            >,
    >(
        manifest: Manifest,
        options?: CreateModelOptions,
    ): InferConstructor<Manifest>
    Internal

    Create a lazy proxy for a model manifest. This is the internal implementation used by defineModel(). The proxy forwards all property access to the initialized model from the DAL registry.

    Type Parameters

    • Manifest extends ModelManifest<
          Record<string, ModelSchemaField<unknown>>,
          boolean,
          EmptyStaticMethods,
          Record<never, InstanceMethod>,
      >

    Parameters

    • manifest: Manifest

      Model manifest definition

    • options: CreateModelOptions = {}

      Optional static properties to attach

    Returns InferConstructor<Manifest>

    Typed model proxy constructor

    Most code should use defineModel() instead

    • Defined in dal/lib/create-model.ts:166

Settings

Member Visibility
lib.reviews
  • Loading...

Generated using TypeDoc