From a26abc07b00f7b2cbb1dff603045128f8353d16e Mon Sep 17 00:00:00 2001 From: Andrii Rodionov Date: Wed, 4 Dec 2019 03:01:07 +0200 Subject: [PATCH] [nuxtjs__auth] added missing declarations (#40778) * [nuxtjs__auth] added missing methods declarations * fixed missed semicolons --- types/nuxtjs__auth/index.d.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/types/nuxtjs__auth/index.d.ts b/types/nuxtjs__auth/index.d.ts index bdf88433ad..ade1564e61 100644 --- a/types/nuxtjs__auth/index.d.ts +++ b/types/nuxtjs__auth/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Ruskin Constant // Daniel Leal // Nick Bolles +// Andrii Rodionov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 3.1 @@ -43,6 +44,13 @@ export interface Auth { setUser(user?: Partial): any; reset(): Promise; redirect(name: string): any; + strategy(): string; + registerStrategy(strategyName: string, strategy: object): void; + setStrategy(strategyName: string): void; + setUserToken(): Promise; + getRefreshToken(strategyName: string): string; + setRefreshToken(strategyName: string, token?: string): string; + syncRefreshToken(strategyName: string): string; } declare module 'vue/types/options' { @@ -56,3 +64,15 @@ declare module 'vue/types/vue' { $auth: Auth; } } + +declare module '@nuxt/vue-app' { + interface Context { + $auth: Auth; + } +} + +declare module '@nuxt/types' { + interface Context { + $auth: Auth; + } +}