Skip to content
This repository has been archived by the owner on Jul 20, 2020. It is now read-only.

Warning about possible conflicts in JSX.IntrinsicElements #10

Open
jugglingcats opened this issue Oct 8, 2017 · 3 comments
Open

Warning about possible conflicts in JSX.IntrinsicElements #10

jugglingcats opened this issue Oct 8, 2017 · 3 comments

Comments

@jugglingcats
Copy link

Hi @toxicFork, I cloned react-three-renderer-fibre, opened the project in IDEA and... it all looks great!

I can see you are adding intrinsic elements to the global JSX.IntrinsicElements. I just want to make you aware that you may run into issues with conflicts with existing elements defined by React. A basic example would be line which is also an SVG element.

It may be that the only option is to make sure the R3R element names don't clash, but then this would not be backwards compatible with existing R3R.

I think this is a basic Typescript limitation right now and I raised this issue for the Typescript team: microsoft/TypeScript#15266.

Something to think about...

@toxicFork
Copy link
Collaborator

Hi @jugglingcats thank you for taking a look and doing some research and creating the issue!

I'll check if I can help by adding comments into the issue you have just linked which may help them to answer some questions they have raised :)

@jugglingcats
Copy link
Author

I'm sure you are much more qualified to move that discussion forward! :)

@aucampia-emrsn
Copy link

aucampia-emrsn commented Aug 20, 2019

This is not a warning for me but an error:

20190820T093944 E1258170@noosl-0r018:~/d/pdgm.com/az.dev/EP-Connect/property-model-update.roxar
$ tsc --outdir /var/tmp/ts-dist/
node_modules/react-three-fiber/types/src/three-types.d.ts:64:7 - error TS2717: Subsequent property declarations must have the same type.  Property 'audio' must be of type 'DetailedHTMLProps<AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>', but here has type 'Object3DNode<Audio, typeof Audio>'.

64       audio: ReactThreeFiber.Object3DNode<THREE.Audio, typeof THREE.Audio>
         ~~~~~

  node_modules/@types/react/index.d.ts:2837:13
    2837             audio: React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>;
                     ~~~~~
    'audio' was also declared here.

node_modules/react-three-fiber/types/src/three-types.d.ts:76:7 - error TS2717: Subsequent property declarations must have the same type.  Property 'line' must be of type 'SVGProps<SVGLineElement>', but here has type 'Object3DNode<Line, typeof Line>'.

76       line: ReactThreeFiber.Object3DNode<THREE.Line, typeof THREE.Line>
         ~~~~

  node_modules/@types/react/index.d.ts:2988:13
    2988             line: React.SVGProps<SVGLineElement>;
                     ~~~~
    'line' was also declared here.


Found 2 errors.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants