[Vuejs]-I want to make my imagemap responsive in a Vue project

0👍

Since neither the image-map package itself nor the DefinitelyTyped project (@types/*) has provided a TypeScript declaration file for this package, you’ll need to include one in your own project so that your TypeScript code can use it.

Fortunately, the package’s API seems relatively simple. You can put the following into a new src/image-map.d.ts file:

declare module "image-map" {
    export default function ImageMap(selector: string, debounce?: number): void;
}

(Technically that function returns a class instance that implements the functionality, but I don’t think its members are intended to be public, and you probably won’t need them for your purpose anyway.)

Leave a comment