Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export OrbitControlsImpl #937

Open
j-m opened this issue Jun 7, 2022 · 1 comment · May be fixed by #1075
Open

Export OrbitControlsImpl #937

j-m opened this issue Jun 7, 2022 · 1 comment · May be fixed by #1075

Comments

@j-m
Copy link

j-m commented Jun 7, 2022

import { OrbitControls as OrbitControlsImpl } from 'three-stdlib'

OrbitControls component requires a ref prop of type OrbitControls from three-stdlib.
As three-stdlib isn't listed as a peer dependency, consumers may not have three-stdlib as a direct dependency, which means doing something similar as a consumer will cause linting errors, like so

import { OrbitControls as OrbitControlsImpl } from 'three-stdlib';
...
const orbitControlsRef = useRef<OrbitControlsImpl>(null);
...
<OrbitControls
  ref={orbitControlsRef}
   ...
/>

ESLint complains on the import:

'three-stdlib' should be listed in the project's dependencies. Run 'npm i -S three-stdlib' to add it
eslint import/no-extraneous-dependencies

Can we forward export this type, please?

@CodyJasonBennett CodyJasonBennett linked a pull request Oct 4, 2022 that will close this issue
@timoisalive
Copy link

Any progress on this...? How should one get hold of the OrbitControls type?

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 a pull request may close this issue.

2 participants