Skip to content

Commit 55d30d7

Browse files
iiio2danielroe
authored andcommitted
refactor(nuxt): improve type safety within callOnce function (#33825)
1 parent fe7e3ce commit 55d30d7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/nuxt/src/app/composables

packages/nuxt/src/app/composables/once.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let _isHmrUpdating = false
1717
*/
1818
export function callOnce (key?: string, fn?: (() => any | Promise<any>), options?: CallOnceOptions): Promise<void>
1919
export function callOnce (fn?: (() => any | Promise<any>), options?: CallOnceOptions): Promise<void>
20-
export async function callOnce (...args: any): Promise<void> {
20+
export async function callOnce (...args: any[]): Promise<void> {
2121
const autoKey = typeof args[args.length - 1] === 'string' ? args.pop() : undefined
2222
if (typeof args[0] !== 'string') { args.unshift(autoKey) }
2323
const [_key, fn, options] = args as [string, (() => any | Promise<any>), CallOnceOptions | undefined]

0 commit comments

Comments
 (0)