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

[FEATURE SUGGESTION] Add TypeScript #153

Open
ctrlmaniac opened this issue May 6, 2024 · 1 comment
Open

[FEATURE SUGGESTION] Add TypeScript #153

ctrlmaniac opened this issue May 6, 2024 · 1 comment

Comments

@ctrlmaniac
Copy link

Hello,
i'm trying to use convert2xkt with typescript but im facing some issues. When I try to import the convert2xkt function it says that convert2xkt is not a function... do you know how to use it with typescript?

import convert2xkt from "@xeokit/xeokit-convert/dist/convert2xkt.cjs.js";

convert.convert2xkt({
      source: source,
      outputXKT: (buffer) => {
        writeFileSync(dest, buffer)
      }
    }).then(() => {
      console.log("Converted.");
    }, (errMsg) => {
        console.error("Conversion failed: " + errMsg)
    });
@xeolabs xeolabs changed the title Typescript support? [FEATURE SUGGESTION] Add TypeScript May 6, 2024
@xeolabs
Copy link
Member

xeolabs commented May 6, 2024

Hi, we haven't implemented TypeScript support for convert2xkt, but if it's a requirement we would welcome a PR to add type definitions.

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