We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
callOnce
1 parent fe7e3ce commit 55d30d7Copy full SHA for 55d30d7
1 file changed
packages/nuxt/src/app/composables/once.ts
@@ -17,7 +17,7 @@ let _isHmrUpdating = false
17
*/
18
export function callOnce (key?: string, fn?: (() => any | Promise<any>), options?: CallOnceOptions): Promise<void>
19
export function callOnce (fn?: (() => any | Promise<any>), options?: CallOnceOptions): Promise<void>
20
-export async function callOnce (...args: any): Promise<void> {
+export async function callOnce (...args: any[]): Promise<void> {
21
const autoKey = typeof args[args.length - 1] === 'string' ? args.pop() : undefined
22
if (typeof args[0] !== 'string') { args.unshift(autoKey) }
23
const [_key, fn, options] = args as [string, (() => any | Promise<any>), CallOnceOptions | undefined]
0 commit comments