diff options
author | Kirill Rogovoy <[email protected]> | 2021-07-20 21:24:52 +0300 |
---|---|---|
committer | Kirill Rogovoy <[email protected]> | 2021-07-20 21:24:52 +0300 |
commit | 5f4611d65e40eae3ca6191a15f68d69ea5a1c4cb (patch) | |
tree | 273dfc086444533d86d580961c92ba8d14781a67 /ignite/templates/model | |
parent | f0bf4e7afdcd8b02a62be45ab3e7d047ed865a79 (diff) |
WIP
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, {}) |