Skip to content

Commit b4d03a8

Browse files
Solve TypeScript build error. This was related to the union type of elements having a length greater than 24. I've taken one deprecated
element out so that we come under the limit. We should prune this list anyway, having a set of elements that demonstrate features of the library (e.g. field types), rather than specific elements used in Composer. Related issue: microsoft/TypeScript#40803 Co-authored-by: Jonathon Herbert <[email protected]>
1 parent e883143 commit b4d03a8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

demo/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ const documentElementName = "document";
9999
const tableElementName = "table";
100100
const interactiveElementName = "interactive";
101101
const membershipElementName = "membership";
102-
const witnessElementName = "witness";
103102
const instagramElementName = "instagram";
104103
const vineElementName = "vine";
105104
const tweetElementName = "tweet";
@@ -192,7 +191,6 @@ export const elements = {
192191
useLargePreview: true,
193192
}),
194193
[membershipElementName]: membershipElement,
195-
[witnessElementName]: deprecatedElement,
196194
[vineElementName]: deprecatedElement,
197195
[instagramElementName]: deprecatedElement,
198196
[commentElementName]: commentElement,
@@ -222,6 +220,9 @@ export const elements = {
222220
[altStyleElementName]: keyTakeawaysElement,
223221
[repeaterElementName]: repeaterElement,
224222
[nestedElementName]: nestedElement,
223+
// NOTE: TypeScript may be unhappy if you add another name to the union
224+
// type of elements here because there's a limit of 24 on union types
225+
// Related issue: https://github.com/microsoft/TypeScript/issues/40803
225226
};
226227

227228
const {

0 commit comments

Comments
 (0)