-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
TS2339: Property 'array' does not exist on type 'BufferAttribute | InterleavedBufferAttribute | GLBufferAttribute'. #389
Comments
An attribute can be a |
Something like #241 could be a potential solution to resolving this friction. |
Ok, so it works if you do something like this
There was much less friction when the type was auto inferred and you could just write
Is it really necessary to now also enforce the |
Yes, that is generally how I've worked around the issue so far. I agree that the friction is undesirable since the vast majority of three.js code does not use I'm looking into ways to reduce the friction as much as possible while still retaining support for |
Yes, we need to allow the use of |
Reopening this to track this issue. I started working on this last month but hit some issues. Digging back into it now. |
Since
@types/[email protected]
and@types/[email protected]
Sample code,
now causes error
Two temporary fixes,
npm install @types/[email protected]
or
const numbers = (somemesh.geometry.attributes.position as any).array
In plain JavaScript (
[email protected]
), you can still reference a geometriesattributes.position.array
without issue.At the time of writing this issue,
@types/[email protected]
did not yet exist.The text was updated successfully, but these errors were encountered: