Skip to content

Conflict with @types/react svg types in JSX.IntrinsicElements #172

Closed
@hasparus

Description

Hi! I've encountered a little problem while using react-three-fiber in TypeScript.
@types/react conflicts with three-types.d.ts on global JSX.IntrinsicElements.

Is there a workaround to avoid it?

(property) JSX.IntrinsicElements.line: React.SVGProps<SVGLineElement>
Subsequent property declarations must have the same type. 
Property 'line' must be of type 'SVGProps<SVGLineElement>',
but here has type 'Object3DNode<Line, typeof Line>'.
ts(2717)

image


Repro: https://codesandbox.io/s/react-three-fiber-types-conflict-repro-ydr2t
(CodeSandbox seems to be few TS versions behind so there's another problem there -- Omit type is not defined, and because of it Object3DNode is any. The conflict I mentioned still occurs regardless of it.)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions