Skip to content

fix(types): compatibility with @types/three@0.185.0#433

Merged
CodyJasonBennett merged 1 commit into
pmndrs:mainfrom
Methuselah96:update-types-r185
Jun 26, 2026
Merged

fix(types): compatibility with @types/three@0.185.0#433
CodyJasonBennett merged 1 commit into
pmndrs:mainfrom
Methuselah96:update-types-r185

Conversation

@Methuselah96

@Methuselah96 Methuselah96 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Why

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

What

  • Update SVGLoader.parse to return normal ShapePaths. ShapePath already has a userData property, so the SVGResultPaths interface was unnecessary
  • Correct the TGALoader.parse return type. It never returned a DataTexture.

Checklist

  • Documentation updated - N/A
  • Storybook entry added - N/A
  • Ready to be merged

@codesandbox-ci

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@CodyJasonBennett
CodyJasonBennett merged commit e0e835a into pmndrs:main Jun 26, 2026
3 checks passed
@CodyJasonBennett

Copy link
Copy Markdown
Member

Thanks.

@Methuselah96
Methuselah96 deleted the update-types-r185 branch June 26, 2026 20:12
@Shane-oo

Shane-oo commented Jul 3, 2026

Copy link
Copy Markdown

It looks like the release failed

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

Successfully merging this pull request may close these issues.

3 participants