Type alias Entity<T>

Entity<T>: {
    __meta?: ["entity", T];
}

Type to decorate an interface/object literal with entity information.

interface User extends Entity<{name: 'user'}> {
id: number & PrimaryKey & AutoIncrement;
username: string & Unique;
}

Type Parameters

Type declaration

  • Optional __meta?: ["entity", T]

Generated using TypeDoc