@react-types/shared 3.0.0-nightly.2060 → 3.0.0-nightly.2064
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 +2 -2
- package/src/collections.d.ts +6 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/shared",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.2064+68044ea43",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
"publishConfig": {
|
|
15
15
|
"access": "public"
|
|
16
16
|
},
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "68044ea4334e64e6d19525cd24e9b24821a7f861"
|
|
18
18
|
}
|
package/src/collections.d.ts
CHANGED
|
@@ -133,10 +133,10 @@ export interface Collection<T> extends Iterable<T> {
|
|
|
133
133
|
getKeys(): Iterable<Key>,
|
|
134
134
|
|
|
135
135
|
/** Get an item by its key. */
|
|
136
|
-
getItem(key: Key): T,
|
|
136
|
+
getItem(key: Key): T | null,
|
|
137
137
|
|
|
138
138
|
/** Get an item by the index of its key. */
|
|
139
|
-
at(idx: number): T,
|
|
139
|
+
at(idx: number): T | null,
|
|
140
140
|
|
|
141
141
|
/** Get the key that comes before the given key in the collection. */
|
|
142
142
|
getKeyBefore(key: Key): Key | null,
|
|
@@ -160,7 +160,7 @@ export interface Node<T> {
|
|
|
160
160
|
/** A unique key for the node. */
|
|
161
161
|
key: Key,
|
|
162
162
|
/** The object value the node was created from. */
|
|
163
|
-
value: T,
|
|
163
|
+
value: T | null,
|
|
164
164
|
/** The level of depth this node is at in the heirarchy. */
|
|
165
165
|
level: number,
|
|
166
166
|
/** Whether this item has children, even if not loaded yet. */
|
|
@@ -181,11 +181,11 @@ export interface Node<T> {
|
|
|
181
181
|
/** A function that should be called to wrap the rendered node. */
|
|
182
182
|
wrapper?: (element: ReactElement) => ReactElement,
|
|
183
183
|
/** The key of the parent node. */
|
|
184
|
-
parentKey?: Key,
|
|
184
|
+
parentKey?: Key | null,
|
|
185
185
|
/** The key of the node before this node. */
|
|
186
|
-
prevKey?: Key,
|
|
186
|
+
prevKey?: Key | null,
|
|
187
187
|
/** The key of the node after this node. */
|
|
188
|
-
nextKey?: Key,
|
|
188
|
+
nextKey?: Key | null,
|
|
189
189
|
/** Additional properties specific to a particular node type. */
|
|
190
190
|
props?: any,
|
|
191
191
|
/** @private */
|