Skip to content

Types are incompatible with @types/three@0.185.0 #434

Description

@Methuselah96
  • three version: 0.185.0
  • @types/three version: 0.185.0
  • three-stdlib version: 2.36.1

Problem description:

The current type definitions are incompatible with @types/three@0.185.0 and produce the following errors:

./../node_modules/.pnpm/three-stdlib@2.36.1_three@0.185.0/node_modules/three-stdlib/loaders/SVGLoader.d.ts:3:18 - error TS2430: Interface 'SVGResultPaths' incorrectly extends interface 'ShapePath'.
  Types of property 'userData' are incompatible.
    Type '{ [key: string]: any; } | undefined' is not assignable to type 'Record<string, unknown>'.
      Type 'undefined' is not assignable to type 'Record<string, unknown>'.

3 export interface SVGResultPaths extends ShapePath {
                   ~~~~~~~~~~~~~~

../../node_modules/.pnpm/three-stdlib@2.36.1_three@0.185.0/node_modules/three-stdlib/loaders/TGALoader.d.ts:13:3 - error TS2416: Property 'parse' in type 'TGALoader' is not assignable to the same property in base type 'DataTextureLoader'.
  Type '(data: ArrayBuffer) => DataTexture' is not assignable to type '(buffer: ArrayBuffer) => DataTextureLoaderTexData'.
    Call signature return types 'DataTexture' and 'DataTextureLoaderTexData' are incompatible.
      The types of 'format' are incompatible between these types.
        Type 'AnyPixelFormat' is not assignable to type 'PixelFormat | undefined'.
          Type '33776' is not assignable to type 'PixelFormat | undefined'.

13   parse(data: ArrayBuffer): DataTexture
     ~~~~~


Found 2 errors in 2 files.

Errors  Files
     1  ../../node_modules/.pnpm/three-stdlib@2.36.1_three@0.185.0/node_modules/three-stdlib/loaders/SVGLoader.d.ts:3
     1  ../../node_modules/.pnpm/three-stdlib@2.36.1_three@0.185.0/node_modules/three-stdlib/loaders/TGALoader.d.ts:13

Relevant code:

N/A

Suggested solution:

#433

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