Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular usage #30

Open
ishwara-bhat opened this issue Jul 20, 2023 · 1 comment
Open

Angular usage #30

ishwara-bhat opened this issue Jul 20, 2023 · 1 comment

Comments

@ishwara-bhat
Copy link

I am trying to use this from angular application.
Tried
npm install marchingsquares
This worked fine and updated package.json.

But in the .ts the following does not work
import {MarchingSquaresJS} from "marchingsquares.min.js";

import { MarchingSquaresJS } from "@node_modules/marchingsquares/dist/marchingsquares.min.js";

Also tried import * as MarchingSquaresJS from '.....'

Tried importing marchingsquares.js, marchingsquares.min.js.

It does not seem to import MarchingSquaresJS and failes with error ' MarchingSquaresJS is not a constructor'

Please let me know any working stackblitz example on angular.

Thanks
Ishwar

@michalusio
Copy link

michalusio commented Aug 8, 2023

Hi!
Seems like you need type definitions for this library.
Unfortunately it doesn't have them, so you will have to write them yourself.
E: I might make a PR with the typings if I have enough time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants