Skip to content

Commit 08065c7

Browse files
author
Thomas Leconte
committed
Fix: Optional second argument in install() plugin function & fix types
1 parent 4a587fe commit 08065c7

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

cypress/test-server/package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ export type CreateDialogOptions = {
6060

6161
export type CreateNotifyOptions = {
6262
text: string;
63-
level?: string;
64-
location?: string;
63+
level?: Level;
64+
location?: VSnackbar['$props']['location'];
6565
notifyOptions?: VSnackbar['$props'];
6666
};
6767

@@ -122,7 +122,7 @@ declare module '@vue/runtime-core' {
122122
}
123123

124124
type Vuetify3DialogsPlugin = {
125-
install(app: App, options: PluginOptions): void;
125+
install(app: App, options?: PluginOptions): any;
126126
};
127127

128128
export const Vuetify3Dialog: Vuetify3DialogsPlugin;

src/install.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ import SnackBar from 'Snackbar';
44
import { App, Plugin } from 'vue';
55
import PluginContext from './PluginContext';
66
import { PluginOptions } from './types';
7-
87
export const Vuetify3Dialog: Plugin = {
9-
install(app: App, options: PluginOptions) {
8+
install(app: App, options?: PluginOptions) {
109
try {
1110
new PluginContext(app, options);
1211
Dialogs.initContext();

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export type CreateDialogOptions = {
6161
export type CreateNotifyOptions = {
6262
text: string;
6363
level?: Level;
64-
location?: string;
64+
location?: VSnackbar['$props']['location'];
6565
notifyOptions?: VSnackbar['$props'];
6666
};
6767

0 commit comments

Comments
 (0)