Closed JJBocanegra closed 1 year ago
import { useNotification } from 'equal-vue'; const notification = useNotification(); notification({ variant: 'success', title: 'Title' }); // Error: Expected 2 arguments, but got 1.
When looking at the declarations file, I find this
(): (options: Partial<INotificationOptions> | undefined, children: VNode) => (onClose?: (() => void) | undefined) => void;
So it's actually expecting two parameters.
I should be able to use notification() with only the options parameter.
notification()
options
<script setup lang="ts">
Is the documentation outdated or is the declaration wrong?
edit: managed to make it working by setting the ts type to any for notification:
import { useNotification } from 'equal-vue' const notification: any = useNotification()
fixed in latest version
Environment
Current Behavior
When looking at the declarations file, I find this
So it's actually expecting two parameters.
Expected Behavior
I should be able to use
notification()
with only theoptions
parameter.Steps To Reproduce
<script setup lang="ts">
in any Vue component.Anything else?
Is the documentation outdated or is the declaration wrong?