From 5f4611d65e40eae3ca6191a15f68d69ea5a1c4cb Mon Sep 17 00:00:00 2001 From: Kirill Rogovoy Date: Tue, 20 Jul 2021 21:24:52 +0300 Subject: WIP --- ignite/templates/model/NAME.test.ts.ejs | 7 ------- ignite/templates/model/NAME.ts.ejs | 16 ---------------- 2 files changed, 23 deletions(-) delete mode 100644 ignite/templates/model/NAME.test.ts.ejs delete mode 100644 ignite/templates/model/NAME.ts.ejs (limited to 'ignite/templates/model') 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 = InstanceModel> -export interface <%= props.pascalCaseName %> extends <%= props.pascalCaseName %>Type {} -type <%= props.pascalCaseName %>SnapshotType = SnapshotOutModel> -export interface <%= props.pascalCaseName %>Snapshot extends <%= props.pascalCaseName %>SnapshotType {} -export const create<%= props.pascalCaseName %>DefaultModel = () => types.optional(<%= props.pascalCaseName %>Model, {}) -- cgit v1.2.3