From 3ad4422a94b6c12120b033c4bcc7dd87fa3aabe2 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 16 Dec 2018 15:29:44 -0800 Subject: [PATCH] Begin transfering things to TS --- package.json | 3 +- resources/assets/scripts/app.js | 2 +- .../server/components/PowerButtons.vue | 2 +- .../helpers/{statuses.js => statuses.ts} | 0 resources/assets/scripts/models/server.js | 21 ----- resources/assets/scripts/models/server.ts | 88 +++++++++++++++++++ resources/assets/scripts/models/user.js | 28 ------ resources/assets/scripts/models/user.ts | 53 +++++++++++ .../assets/scripts/{router.js => router.ts} | 31 +++---- .../scripts/store/{index.js => index.ts} | 15 +++- .../store/modules/{auth.js => auth.ts} | 57 +++++++----- .../modules/{dashboard.js => dashboard.ts} | 34 ++++--- .../store/modules/{server.js => server.ts} | 37 +++++--- .../store/modules/{socket.js => socket.ts} | 20 +++-- resources/assets/scripts/vue-shims.d.ts | 4 + tsconfig.json | 4 + yarn.lock | 19 ++-- 17 files changed, 280 insertions(+), 138 deletions(-) rename resources/assets/scripts/helpers/{statuses.js => statuses.ts} (100%) delete mode 100644 resources/assets/scripts/models/server.js create mode 100644 resources/assets/scripts/models/server.ts delete mode 100644 resources/assets/scripts/models/user.js create mode 100644 resources/assets/scripts/models/user.ts rename resources/assets/scripts/{router.js => router.ts} (71%) rename resources/assets/scripts/store/{index.js => index.ts} (68%) rename resources/assets/scripts/store/modules/{auth.js => auth.ts} (70%) rename resources/assets/scripts/store/modules/{dashboard.js => dashboard.ts} (63%) rename resources/assets/scripts/store/modules/{server.js => server.ts} (71%) rename resources/assets/scripts/store/modules/{socket.js => socket.ts} (52%) create mode 100644 resources/assets/scripts/vue-shims.d.ts diff --git a/package.json b/package.json index 796885e2b..687ffef62 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,8 @@ "@babel/plugin-transform-async-to-generator": "^7.0.0-beta.49", "@babel/plugin-transform-runtime": "^7.0.0-beta.49", "@babel/preset-env": "^7.0.0-beta.49", + "@types/node": "^10.12.15", + "@types/webpack-env": "^1.13.6", "autoprefixer": "^8.2.0", "axios": "^0.18.0", "babel-cli": "6.18.0", @@ -36,7 +38,6 @@ "css-loader": "^0.28.11", "eslint": "^5.6.0", "eslint-config-vue": "^2.0.2", - "eslint-plugin-flowtype-errors": "^3.6.0", "eslint-plugin-html": "^4.0.6", "eslint-plugin-vue": "^4.7.1", "extract-text-webpack-plugin": "^4.0.0-beta.0", diff --git a/resources/assets/scripts/app.js b/resources/assets/scripts/app.js index 20417907f..86f55e9dc 100644 --- a/resources/assets/scripts/app.js +++ b/resources/assets/scripts/app.js @@ -11,7 +11,7 @@ require('./bootstrap'); import { Ziggy } from './helpers/ziggy'; import Locales from './../../../resources/lang/locales'; import { flash } from './mixins/flash'; -import store from './store/index.js'; +import store from './store/index'; import router from './router'; window.events = new Vue(); diff --git a/resources/assets/scripts/components/server/components/PowerButtons.vue b/resources/assets/scripts/components/server/components/PowerButtons.vue index 1bc71817b..00cb7251e 100644 --- a/resources/assets/scripts/components/server/components/PowerButtons.vue +++ b/resources/assets/scripts/components/server/components/PowerButtons.vue @@ -23,7 +23,7 @@