Closed Zahma closed 7 years ago
This repo does not provide TypeScript definitions. You should report this to the author on a corresponding repo, not here. @DenisCarriere perhaps?
@Zahma I've pushed an update to the Typescript definition file (https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19869), if there are any updates on the TypeScript definitions, post them on DefinitelyTyped or submit a PR with a fix.
If you define your own typings, you can use the following:
declare function polylabel(polygon: number[][][], precision?: number, debug?: boolean): number[];
declare namespace polylabel {}
export default polylabel;
@Zahma Another thing to note, how are you importing the polylabel module, the current Type Definition does work using the following:
import * as polylabel from 'polylabel';
console.log(polylabel);
//={ [Function: polylabel] default: [Circular] }
I have tried to work with the typings you provided but its not working.
So I tried to put some modificationsand I ended up with the following code:
Still I'm getting the following error: