core&ui: support pasting image in editor

This commit is contained in:
undefined committed 2022-03-01 21:40:09 +08:00
1 parent 6a289f788d
commit 8223b45d23
13 files changed
+131 -39

No files matched your search

+2 -2
View File
@@ -28,7 +28,7 @@ declare global {
interface SetConstructor {
isSuperset: (set: Set<any>, subset: Set<any>) => boolean;
intersection: <T>(setA: Set<T> | Array<T>, setB: Set<T> | Array<T>) => Set<T>;
union: <T>(setA: Set<T>, setB: Set<T>) => Set<T>;
union: <T>(setA: Set<T> | Array<T>, setB: Set<T> | Array<T>) => Set<T>;
}
}
@@ -124,7 +124,7 @@ Set.isSuperset = function isSuperset(set, subset) {
return true;
};
Set.union = function Union<T>(setA: Set<T>, setB: Set<T>) {
Set.union = function Union<T>(setA: Set<T> | Array<T>, setB: Set<T> | Array<T>) {
const union = new Set(setA);
for (const elem of setB) union.add(elem);
return union;