Allow ref blots to be null
This commit is contained in:
parent
5566ee0b5e
commit
37690992c5
@ -1,5 +1,7 @@
|
||||
# [Unreleased]
|
||||
|
||||
- Allow ref blots to be null
|
||||
|
||||
# 3.0.0-rc.0
|
||||
|
||||
- Keep identify names in built code bundle
|
||||
|
||||
@ -96,8 +96,8 @@ export interface Parent extends Blot {
|
||||
index: number,
|
||||
length: number,
|
||||
): T[];
|
||||
insertBefore(child: Blot, refNode?: Blot): void;
|
||||
moveChildren(parent: Parent, refNode?: Blot): void;
|
||||
insertBefore(child: Blot, refNode?: Blot | null): void;
|
||||
moveChildren(parent: Parent, refNode?: Blot | null): void;
|
||||
path(index: number, inclusive?: boolean): [Blot, number][];
|
||||
removeChild(child: Blot): void;
|
||||
unwrap(): void;
|
||||
|
||||
@ -243,7 +243,7 @@ class ParentBlot extends ShadowBlot implements Parent {
|
||||
}, 0);
|
||||
}
|
||||
|
||||
public moveChildren(targetParent: Parent, refNode?: Blot): void {
|
||||
public moveChildren(targetParent: Parent, refNode?: Blot | null): void {
|
||||
this.children.forEach((child) => {
|
||||
targetParent.insertBefore(child, refNode);
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user