Skip to content

Commit

Permalink
Merge pull request #5 from vasia123/main
Browse files Browse the repository at this point in the history
Fix types
  • Loading branch information
DidoMarchet authored Apr 20, 2023
2 parents 8c58909 + 99ffd43 commit bf07eea
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/@types/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { App } from "vue";
import type { SupabaseClientOptions } from "@supabase/supabase-js";

export interface Params {
supabaseUrl: string;
supabaseKey: string;
options?: never;
options?: SupabaseClientOptions<'public'>;
}

export interface IVueSupabase {
Expand Down
6 changes: 6 additions & 0 deletions lib/main.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import type { IVueSupabase } from "./@types";
import type { SupabaseClient } from "@supabase/supabase-js";

declare module "@vue/runtime-core" {
interface ComponentCustomProperties {
$supabase: IVueSupabase;
}
}

export function useSupabase(): SupabaseClient;

declare const supabasePlugin: IVueSupabase;
export default supabasePlugin;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"lint": "eslint --ext .ts,.js,.vue --ignore-path .gitignore .",
"lint:fix": "eslint --fix --ext .ts,.js,.vue --ignore-path .gitignore ."
},
"typings": "./dist/lib/main.d.ts",
"peerDependencies": {
"vue": "^3.0.5"
},
Expand Down

0 comments on commit bf07eea

Please sign in to comment.