joshwcomeau / use-sound

A React Hook for playing sound effects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not find a declaration file for module 'use-sound'.

gabriel-logan opened this issue · comments

image m having same issue in next js 14

in your tsconfig.json,
change module resolution from bundler to node

"moduleResolution": "node",

create global.d.ts file in your root directory and write this

declare module 'use-sound' {
export default function useSound(sound: any, options?: any): any;
}

create global.d.ts file in your root directory and write this

declare module 'use-sound' { export default function useSound(sound: any, options?: any): any; }

My friend, if I wanted to use any I wouldn't use typescript.

The solution is: Either the devs come here and say what the correct typing is or they correct the declaration files in the library