createRecordType

Public Function

Create a record type.

Example
const Book = createRecordType<Book>('book')
Parameters
NameDescription

typeName

R['typeName']

The name of the type to create.

config

{
  migrations?: Migrations
  validator: StoreValidator<R>
  scope: Scope
}
Returns
RecordType<R, keyof Omit<R, 'id' | 'typeName'>>
References

BaseRecord, Migrations, StoreValidator, Scope, RecordType, Omit

Edit this page
Last edited on 22 May 2023
ComputedCachedefineMigrations