Skip to content

Commit

Permalink
feat(create): adds schema
Browse files Browse the repository at this point in the history
  • Loading branch information
rafamel committed Sep 14, 2019
1 parent 567a7c4 commit bab385d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/create/schema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Schema } from '~/types';

export default function schema<T extends Schema>(json: T): T {
return { type: json.type || 'object', ...json };
}

0 comments on commit bab385d

Please sign in to comment.