Skip to content

Commit 477f11c

Browse files
ca-dstee-re
authored andcommitted
fix: expose missing module members
Resolves #33 . Resolves #31 .
1 parent 5404d79 commit 477f11c

File tree

4 files changed

+40
-14
lines changed

4 files changed

+40
-14
lines changed

convertEdit.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
import { Edit, isComplex, isNamespaced, isUpdate, Update } from './editv1.js';
1+
import {
2+
Edit,
3+
isComplexEdit,
4+
isNamespaced,
5+
isUpdate,
6+
Update,
7+
} from './editv1.js';
28

39
import {
410
Attributes,
@@ -41,7 +47,7 @@ export function convertEdit(edit: Edit): EditV2 {
4147
if (isUpdate(edit)) {
4248
return convertUpdate(edit);
4349
}
44-
if (isComplex(edit)) {
50+
if (isComplexEdit(edit)) {
4551
return edit.map(convertEdit);
4652
}
4753

editv1.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function isAttributesV1(
4545
);
4646
}
4747

48-
export function isComplex(edit: unknown): edit is Edit[] {
48+
export function isComplexEdit(edit: unknown): edit is Edit[] {
4949
return edit instanceof Array && edit.every(isEdit);
5050
}
5151

@@ -56,10 +56,8 @@ export function isUpdate(edit: unknown): edit is Update {
5656
);
5757
}
5858

59-
export type EditEvent<E extends Edit = Edit> = CustomEvent<E>;
60-
6159
export function isEdit(edit: unknown): edit is Edit {
62-
if (isComplex(edit)) {
60+
if (isComplexEdit(edit)) {
6361
return true;
6462
}
6563

editv2.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export function isAttributesNS(
5858
);
5959
}
6060

61-
export function isComplex(edit: unknown): edit is EditV2[] {
61+
export function isComplexEditV2(edit: unknown): edit is EditV2[] {
6262
return edit instanceof Array && edit.every(e => isEditV2(e));
6363
}
6464

@@ -96,7 +96,7 @@ export function isInsert(edit: unknown): edit is Insert {
9696
}
9797

9898
export function isEditV2(edit: unknown): edit is EditV2 {
99-
if (isComplex(edit)) {
99+
if (isComplexEditV2(edit)) {
100100
return true;
101101
}
102102

oscd-api.ts

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,35 @@
11
export {
2+
Attributes,
3+
AttributesNS,
24
EditV2,
35
Insert,
4-
Remove,
5-
SetAttributes,
6-
SetTextContent,
7-
isComplex,
6+
isAttributes,
7+
isAttributesNS,
8+
isComplexEditV2,
89
isEditV2,
910
isInsert,
1011
isRemove,
1112
isSetAttributes,
1213
isSetTextContent,
14+
Remove,
15+
SetAttributes,
16+
SetTextContent,
1317
} from './editv2.js';
1418

15-
export { Edit, Update, isEdit } from './editv1.js';
19+
export {
20+
AttributesV1,
21+
AttributeValue,
22+
Edit,
23+
isAttributesV1,
24+
isComplexEdit,
25+
isEdit,
26+
isNamespaced,
27+
isUpdate,
28+
NamespacedAttributeValue,
29+
Update,
30+
} from './editv1.js';
31+
32+
export { convertEdit } from './convertEdit.js';
1633

1734
export type {
1835
Commit,
@@ -21,4 +38,9 @@ export type {
2138
TransactedCallback,
2239
} from './Transactor.js';
2340

24-
export { newEditEventV2 } from './edit-event.js';
41+
export {
42+
EditDetailV2,
43+
EditEventOptions,
44+
EditEventV2,
45+
newEditEventV2,
46+
} from './edit-event.js';

0 commit comments

Comments
 (0)