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

refactor(types): dynamically map OGLElements #68

Merged
merged 1 commit into from
Sep 4, 2022

Conversation

CodyJasonBennett
Copy link
Member

@CodyJasonBennett CodyJasonBennett commented Sep 4, 2022

Mirrors type enhancements from pmndrs/react-three-fiber#2465.

Dynamically mapped OGLElements

Additionally, OGL types for JSX.IntrinsicElements are no longer hard-coded and dynamically mapped to OGLElements. This lets us properly follow semver once @types/ogl is upstreamed.

Node => OGLElement

The Node interface has been simplified and renamed to OGLElement to prevent clashing with DOM types:

declare module 'react-ogl' {
  interface OGLElements {
    customElement: OGLElement<typeof CustomElement>
  }
}

extend({ CustomElement })
@CodyJasonBennett CodyJasonBennett merged commit 49da98b into main Sep 4, 2022
@CodyJasonBennett CodyJasonBennett deleted the refactor/types branch September 4, 2022 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant