Last active
January 16, 2022 19:32
-
-
Save daffl/7728140456ffdfa96ec858616a99a9c2 to your computer and use it in GitHub Desktop.
Revisions
-
daffl revised this gist
Jan 14, 2022 . 1 changed file with 9 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,4 @@ import { schema, Infer } from '@feathersjs/schema' export const userSchema = schema({ $id: 'User', @@ -11,6 +10,12 @@ export const userSchema = schema({ email: { type: 'string' }, password: { type: 'string' } } } as const) export type User = Infer<typeof userSchema> // type User = { // id?: number; // email: string; // password: string; // } -
daffl created this gist
Jan 14, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ import { HookContext } from './definitions'; import { schema, Infer } from '@feathersjs/schema'; export const userSchema = schema({ $id: 'User', type: 'object', additionalProperties: false, required: ['email', 'password'], properties: { id: { type: 'number' }, email: { type: 'string' }, password: { type: 'string' } } } as const); export type User = Infer<typeof userSchema>;