Skip to content

TS2339: Property 'array' does not exist on type 'BufferAttribute | InterleavedBufferAttribute | GLBufferAttribute'. #389

@Sean-Bradley

Description

@Sean-Bradley

Since @types/three@0.149 and @types/three@0.150

Sample code,

const numbers = somemesh.geometry.attributes.position.array

now causes error

TS2339: Property 'array' does not exist on type 'BufferAttribute | InterleavedBufferAttribute | GLBufferAttribute'.
  Property 'array' does not exist on type 'GLBufferAttribute'.

Two temporary fixes,
npm install @types/three@0.148
or
const numbers = (somemesh.geometry.attributes.position as any).array

In plain JavaScript (three@0.150.1), you can still reference a geometries attributes.position.array without issue.

At the time of writing this issue, @types/three@0.150.1 did not yet exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions