@jbrowse/mobx-state-tree 5.10.5 → 5.10.7
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/dist/index.d.ts
CHANGED
|
@@ -1460,8 +1460,13 @@ interface ISnapshotProcessor<IT extends IAnyType, CustomC, CustomS> extends ITyp
|
|
|
1460
1460
|
interface ISnapshotProcessors<IT extends IAnyType, CustomC, CustomS> {
|
|
1461
1461
|
/**
|
|
1462
1462
|
* Function that transforms an input snapshot.
|
|
1463
|
+
*
|
|
1464
|
+
* The processor may return the loose input (`CustomC`) as well as the strict
|
|
1465
|
+
* creation type: migrations commonly massage an untyped legacy record and
|
|
1466
|
+
* rely on MST's runtime revalidation/defaults to fill the rest. This mirrors
|
|
1467
|
+
* the lenient return type of `IModelType.preProcessSnapshot`.
|
|
1463
1468
|
*/
|
|
1464
|
-
preProcessor?(snapshot: CustomC): IT["CreationType"];
|
|
1469
|
+
preProcessor?(snapshot: CustomC): IT["CreationType"] | CustomC;
|
|
1465
1470
|
/**
|
|
1466
1471
|
* Function that transforms an output snapshot.
|
|
1467
1472
|
* @param snapshot
|
|
@@ -1513,7 +1518,7 @@ interface IMapType<IT extends IAnyType> extends IType<IKeyValueMap<IT["CreationT
|
|
|
1513
1518
|
interface IMSTMap<IT extends IAnyType> {
|
|
1514
1519
|
clear(): void;
|
|
1515
1520
|
delete(key: string): boolean;
|
|
1516
|
-
forEach(callbackfn: (value: IT["Type"], key: string
|
|
1521
|
+
forEach(callbackfn: (value: IT["Type"], key: string, map: this) => void, thisArg?: any): void;
|
|
1517
1522
|
get(key: string | number): IT["Type"] | undefined;
|
|
1518
1523
|
has(key: string | number): boolean;
|
|
1519
1524
|
set(key: string | number, value: ExtractCSTWithSTN<IT>): this;
|