fix: Cannot set property attributeName of #<MutationRecord> which has only a getter (#1173)

* fix: Cannot set property attributeName of #<MutationRecord> which has only a getter

* fix: attributeName readonly
This commit is contained in:
fukang wang
2023-03-15 18:11:02 +08:00
committed by GitHub
parent 4cb4d0e95a
commit 5982c8972a
3 changed files with 12 additions and 11 deletions

View File

@@ -265,14 +265,14 @@ export type hooksParam = {
};
// https://dom.spec.whatwg.org/#interface-mutationrecord
export type mutationRecord = {
export type mutationRecord = Readonly<{
type: string;
target: Node;
oldValue: string | null;
addedNodes: NodeList;
removedNodes: NodeList;
attributeName: string | null;
};
}>;
export type textCursor = {
node: Node;