prorm API Reference
    Preparing search index...

    Type Alias InferCreationAttributes<T>

    InferCreationAttributes: {
        [K in keyof T]: T[K] extends NonAttribute<any>
            ? never
            : T[K] extends CreationOptional<infer U> ? U | undefined : T[K]
    }

    InferCreationAttributes - Extracts creation attribute types from a Model

    Use this type to extract the attribute types that can be used when creating a model instance. By default, all attributes are optional since creation may only require a subset.

    Type Parameters

    • T
    export class User extends Model<InferAttributes<User>, InferCreationAttributes<User>> {
    declare id: CreationOptional<number>;
    declare name: string;
    }