diff options
Diffstat (limited to 'ignite/templates/model')
-rw-r--r-- | ignite/templates/model/NAME.test.ts.ejs | 7 | ||||
-rw-r--r-- | ignite/templates/model/NAME.ts.ejs | 16 |
2 files changed, 0 insertions, 23 deletions
diff --git a/ignite/templates/model/NAME.test.ts.ejs b/ignite/templates/model/NAME.test.ts.ejs deleted file mode 100644 index 97c853a..0000000 --- a/ignite/templates/model/NAME.test.ts.ejs +++ /dev/null @@ -1,7 +0,0 @@ -import { <%= props.pascalCaseName %>Model } from "./<%= props.kebabCaseName %>" - -test("can be created", () => { - const instance = <%= props.pascalCaseName %>Model.create({}) - - expect(instance).toBeTruthy() -}) diff --git a/ignite/templates/model/NAME.ts.ejs b/ignite/templates/model/NAME.ts.ejs deleted file mode 100644 index 2c9c9c8..0000000 --- a/ignite/templates/model/NAME.ts.ejs +++ /dev/null @@ -1,16 +0,0 @@ -import { Instance, SnapshotOut, types } from "mobx-state-tree" - -/** - * Model description here for TypeScript hints. - */ -export const <%= props.pascalCaseName %>Model = types - .model("<%= props.pascalCaseName %>") - .props({}) - .views((self) => ({})) // eslint-disable-line @typescript-eslint/no-unused-vars - .actions((self) => ({})) // eslint-disable-line @typescript-eslint/no-unused-vars - -type <%= props.pascalCaseName %>Type = Instance<typeof <%= props.pascalCaseName %>Model> -export interface <%= props.pascalCaseName %> extends <%= props.pascalCaseName %>Type {} -type <%= props.pascalCaseName %>SnapshotType = SnapshotOut<typeof <%= props.pascalCaseName %>Model> -export interface <%= props.pascalCaseName %>Snapshot extends <%= props.pascalCaseName %>SnapshotType {} -export const create<%= props.pascalCaseName %>DefaultModel = () => types.optional(<%= props.pascalCaseName %>Model, {}) |