mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
[atlaskit__tree] Accept null innerRef argument (#35814)
The current type doesn't match the type Ref for React's ref prop:
TS2322: Type '(element?: HTMLElement | undefined) => void' is not assignable to type 'string | ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined'.
Type '(element?: HTMLElement | undefined) => void' is not assignable to type '(instance: HTMLDivElement | null) => void'.
Types of parameters 'element' and 'instance' are incompatible.
Type 'HTMLDivElement | null' is not assignable to type 'HTMLElement | undefined'.
Type 'null' is not assignable to type 'HTMLElement | undefined'.
This change allows the argument to innerRef to be null, which makes
the types match.
This commit is contained in:
parent
d51cebc037
commit
2be4433c5c
2
types/atlaskit__tree/index.d.ts
vendored
2
types/atlaskit__tree/index.d.ts
vendored
@ -65,7 +65,7 @@ interface TreeDraggableProvided {
|
||||
// will be null if the draggable is disabled
|
||||
dragHandleProps?: DraggableProvidedDragHandleProps;
|
||||
// The following props will be removed once we move to react 16
|
||||
innerRef: (element?: HTMLElement) => void;
|
||||
innerRef: (element?: HTMLElement | null) => void;
|
||||
}
|
||||
|
||||
export interface RenderItemParams {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user