virtual-scroller 1.16.0 → 1.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/react/as.d.ts +4 -2
- package/react/index.d.ts +2 -2
package/package.json
CHANGED
package/react/as.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
1
3
|
// The following is an `as` property implementation
|
|
2
4
|
// that was copy-pasted from https://www.benmvp.com/blog/polymorphic-react-components-typescript/
|
|
3
5
|
//
|
|
@@ -7,8 +9,8 @@
|
|
|
7
9
|
// "A more precise version of `React.ComponentPropsWithoutRef`".
|
|
8
10
|
// It's not clear what exactly they meant by that.
|
|
9
11
|
type PropsOf<
|
|
10
|
-
Component extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>
|
|
11
|
-
> = JSX.LibraryManagedAttributes<Component, React.ComponentPropsWithoutRef<Component>>
|
|
12
|
+
Component extends keyof React.JSX.IntrinsicElements | React.JSXElementConstructor<any>
|
|
13
|
+
> = React.JSX.LibraryManagedAttributes<Component, React.ComponentPropsWithoutRef<Component>>
|
|
12
14
|
//
|
|
13
15
|
// Combines props with any additional props.
|
|
14
16
|
type CombineProps<
|
package/react/index.d.ts
CHANGED
|
@@ -25,9 +25,9 @@ export interface VirtualScrollerRefValue {
|
|
|
25
25
|
// There seems to be no requirement for such "more sophisticated" type declaration.
|
|
26
26
|
// Hence, it is commented out and a simpler type of just `HTMLElement` is used.
|
|
27
27
|
//
|
|
28
|
-
// getElement(): ItemsContainerComponent extends keyof JSX.IntrinsicElements
|
|
28
|
+
// getElement(): ItemsContainerComponent extends keyof React.JSX.IntrinsicElements
|
|
29
29
|
// ? (
|
|
30
|
-
// JSX.IntrinsicElements[ItemsContainerComponent] extends React.DetailedHTMLProps<React.AnchorHTMLAttributes<infer T>, T>
|
|
30
|
+
// React.JSX.IntrinsicElements[ItemsContainerComponent] extends React.DetailedHTMLProps<React.AnchorHTMLAttributes<infer T>, T>
|
|
31
31
|
// ? T
|
|
32
32
|
// : HTMLElement
|
|
33
33
|
// ) : HTMLElement;
|