egon-orm-workspace / egon-orm / fieldNames
Function: fieldNames() ​
ts
function fieldNames<S>(schema): readonly FieldNames<S>[];Defined in: core/src/schema/schema.ts:733
The field names of a schema class, in declaration order. The array is shared and frozen.
Type Parameters ​
S ​
S extends AnySchema
Parameters ​
schema ​
S
Returns ​
readonly FieldNames<S>[]
Example ​
ts
fieldNames(User); // ["id", "email", "name", "createdAt", "updatedAt"]Throws ​
SchemaDefinitionError when schema is not a schema class.

