Bump mobx from 6.3.7 to 6.5.0 (#5038)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
dependabot[bot]andSebastian Malton authored and GitHub committed 2022-03-21 17:11:54 -04:00
1 parent 8ded571e35
commit be0370a7bb
5 files changed
+22 -19

No files matched your search

+3 -5
View File
@@ -169,11 +169,9 @@ export class UserStore extends BaseStore<UserStoreModel> /* implements UserStore
const curVal = this[key];
const newVal = fromStore((preferences)?.[key] as never) as never;
if (
isObservableArray(curVal)
|| isObservableSet(curVal)
|| isObservableMap(curVal)
) {
if (isObservableArray(curVal)) {
curVal.replace(newVal);
} else if (isObservableSet(curVal) || isObservableMap(curVal)) {
curVal.replace(newVal);
} else {
this[key] = newVal;
+7
View File
@@ -42,3 +42,10 @@ export function* zip<T, N extends number>(...sources: Tuple<T[], N>): Iterator<T
export function filled<T, L extends number>(length: L, value: T): Tuple<T, L> {
return array.filled(length, value) as Tuple<T, L>;
}
/**
* A function for converting an explicit array to a tuple but without the `readonly` typing
*/
export function from<T extends any[]>(...args: T): [...T] {
return args;
}