-
Notifications
You must be signed in to change notification settings - Fork 132
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
No type declarations for loadAsync. #159
Comments
Hi, how are you instantiating the ifcLoader? |
Hello, I'm instantiating it like this: const ifcLoader = new IFCLoader(); This code works, I'm just getting some type errors. const ifcLoader = new IFCLoader();
const handleUpload = async (event: ChangeEvent<HTMLInputElement>) => {
const IfcFileFromEvent = event.target.files as FileList;
const url = URL.createObjectURL(IfcFileFromEvent[0]);
await ifcLoader
.loadAsync(url)
.then((model: SetStateAction<IFCModel | null>) => scene.add(model));
}; |
Hmm, looks strange, but it works for me 🤔 Maybe you need to import the types of Three.js? |
Does your version of three match the version of three that the library depends on? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using the loadAsync method throws an error in the IDE.
The text was updated successfully, but these errors were encountered: