Skip to content

Commit

Permalink
fix(types): ensure instanceprops override nodeprops
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyJasonBennett committed Aug 31, 2022
1 parent 903392e commit 1104c5b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/fiber/src/three-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ interface ReactProps<P> {
key?: React.Key
}

type NodeProps<T extends Function, P = T['prototype']> = Omit<InstanceProps<T>, 'object'> &
Partial<ReactProps<P> & MathProps<P> & EventProps<P>>
type NodeProps<T extends Function, P = T['prototype']> = Partial<ReactProps<P> & MathProps<P> & EventProps<P>>

export type Node<T extends Function> = Mutable<Overwrite<Partial<WithoutFunctions<T['prototype']>>, NodeProps<T>>>
export type Node<T extends Function> = Mutable<
Overwrite<Partial<WithoutFunctions<T['prototype']>>, Overwrite<NodeProps<T>, Omit<InstanceProps<T>, 'object'>>>
>

type ThreeExports = typeof THREE
type ThreeElementsImpl = {
Expand Down

0 comments on commit 1104c5b

Please sign in to comment.