Skip to content

Commit

Permalink
AuthTokenSetup.vue: move data property definition *after* methods, fi…
Browse files Browse the repository at this point in the history
…x one error (still fails)

Merely moving the property after another fixes a Typescript error. I'm
baffled.

Still fails with two other errors where Typescript can't infer types on
properties referenced via this.$refs.

This fixes one of three Vue/Typescript errors:

   ERROR in /app/src/components/AuthTokenSetup.vue.ts
   47:9-14
   [tsl] ERROR in /app/src/components/AuthTokenSetup.vue.ts(47,10)
         TS2339: Property 'reset' does not exist on type 'CreateComponentPublicInstance<{}, { authTokenStore: Store<"auth-token", { tokens: IToken[]; }, {}, { updateToken(token: IToken): Promise<any>; addToken(name: string): Promise<ITokenResponse | null>; deleteToken(token: IToken): Promise<...>; wipeToken(token: IToken): Promise<...>; renameToken(token: IToken, newName: ...'.

Related:

* vuejs/vue#12628 (comment)
  • Loading branch information
tholewebgods committed Jul 4, 2024
1 parent baa9d05 commit dec16cd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/AuthTokenSetup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,6 @@ export default defineComponent({
const authTokenStore = useAuthTokenStore()
return { authTokenStore }
},
data() {
return {
deviceName: '',
loading: false,
newToken: null as ITokenResponse|null,
}
},
methods: {
t,
reset() {
Expand All @@ -94,6 +87,13 @@ export default defineComponent({
}
},
},
data() {
return {
deviceName: '',
loading: false,
newToken: null as ITokenResponse|null,
}
},
})
</script>

Expand Down

0 comments on commit dec16cd

Please sign in to comment.