Fix editable TS (#235)
Fix primitive not being supported by the typings
This commit is contained in:
parent
006121da91
commit
b98c5d86b6
1 changed files with 17 additions and 0 deletions
|
@ -168,6 +168,23 @@ const createEditable = <Keys extends keyof JSX.IntrinsicElements>(
|
|||
} & React.RefAttributes<JSX.IntrinsicElements[Property]>
|
||||
>
|
||||
>
|
||||
} & {
|
||||
primitive: React.ForwardRefExoticComponent<
|
||||
React.PropsWithoutRef<
|
||||
{
|
||||
object: any
|
||||
uniqueName: string
|
||||
visible?: boolean | 'editor'
|
||||
additionalProps?: $FixMe
|
||||
objRef?: $FixMe
|
||||
editableType: keyof JSX.IntrinsicElements
|
||||
} & React.RefAttributes<JSX.IntrinsicElements['primitive']>
|
||||
> & {
|
||||
// Have to reproduce the primitive component's props here because we need to
|
||||
// lift this index type here to the outside to make auto-complete work
|
||||
[props: string]: any
|
||||
}
|
||||
>
|
||||
}
|
||||
|
||||
return Object.assign(editable, extensions)
|
||||
|
|
Loading…
Reference in a new issue