mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Add type parameter for ref objects
All HTML elements are descendants of HTMLElement, but they also may have additional methods. For this to work right, we need the option to specify what exactly the element is expected to be.
This commit is contained in:
parent
d9f74cb42c
commit
f70c679f72
2
types/airbnb-prop-types/index.d.ts
vendored
2
types/airbnb-prop-types/index.d.ts
vendored
@ -162,7 +162,7 @@ export function range<T extends number>(min?: number, max?: number): PropTypes.R
|
||||
|
||||
export function range(min?: number, max?: number): PropTypes.Requireable<number>;
|
||||
|
||||
export function ref(): PropTypes.Requireable<ReactLegacyRefLike<HTMLElement>>;
|
||||
export function ref<T = HTMLElement>(): PropTypes.Requireable<ReactLegacyRefLike<T>>;
|
||||
|
||||
export function requiredBy<P>(
|
||||
requiredByPropName: string,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user