Skip to content

Commit e40c8c5

Browse files
ca-dstee-re
authored andcommitted
docs(EditV2): document attribute types
1 parent af1ed58 commit e40c8c5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

editv2.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@ export type SetTextContent = {
1616
textContent: string;
1717
};
1818

19+
/** Record from attribute names to attribute values */
1920
export type Attributes = Partial<Record<string, string | null>>;
2021

22+
/** Record from namespace URIs to `Attributes` records */
2123
export type AttributesNS = Partial<Record<string, Attributes>>;
2224

2325
/** Intent to set or remove (if `null`) `attributes`(-`NS`) on `element` */
2426
export type SetAttributes = {
2527
element: Element;
26-
attributes: Partial<Record<string, string | null>>;
27-
attributesNS: Partial<Record<string, Partial<Record<string, string | null>>>>;
28+
attributes: Attributes;
29+
attributesNS: AttributesNS;
2830
};
2931

3032
/** Intent to change some XMLDocuments */

0 commit comments

Comments
 (0)