Skip to content

Commit

Permalink
fix typescript example
Browse files Browse the repository at this point in the history
  • Loading branch information
NickBolles committed Feb 4, 2020
1 parent 6a30997 commit c30452c
Show file tree
Hide file tree
Showing 6 changed files with 212 additions and 513 deletions.
5 changes: 5 additions & 0 deletions examples/with-typescript/mixins/auth.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import Vue from 'vue'
import Component from 'nuxt-class-component'

export default interface AuthMixin {
username: string;
password: string;
}

@Component
export default class AuthMixin extends Vue {

Expand Down
2 changes: 0 additions & 2 deletions examples/with-typescript/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const config: Configuration = {
server: {
host: "0.0.0.0"
},
rootDir: resolve(__dirname, "../.."),
srcDir: __dirname,
buildDir: resolve(__dirname, ".nuxt"),
dev: false,
Expand All @@ -28,7 +27,6 @@ const config: Configuration = {
"@nuxtjs/axios",
"@nuxtjs/auth",
"@nuxtjs/toast",
"@@"
],
axios: {
proxy: true
Expand Down
7 changes: 3 additions & 4 deletions examples/with-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "with-typescript",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "nuxt-ts",
"build": "nuxt-ts build",
Expand All @@ -12,9 +11,9 @@
"author": "",
"license": "ISC",
"devDependencies": {
"@nuxt/types": "^0.3.4",
"@nuxt/typescript-build": "^0.3.4",
"@nuxt/typescript-runtime": "^0.2.4",
"@nuxt/types": "^0.6.1",
"@nuxt/typescript-build": "^0.5.6",
"@nuxt/typescript-runtime": "^0.3.8",
"@nuxtjs/auth": "^4.8.4",
"@nuxtjs/axios": "^5.8.0",
"@nuxtjs/toast": "^3.3.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/with-typescript/pages/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ export class Login extends Vue {
get redirect() {
return (
this.$route.query.redirect &&
decodeURIComponent(this.$route.query.redirect)
decodeURIComponent(this.$route.query.redirect as any)
);
}
mounted() {
this.$refs.username.focus();
(this.$refs.username as any).focus();
}
}
Expand Down
Loading

0 comments on commit c30452c

Please sign in to comment.