Skip to content

Commit ab87bbd

Browse files
tree: update reference to TypeScript bug (#21299)
## Description microsoft/TypeScript#56718 was fixed, but does not fix our issue so microsoft/TypeScript#58688 was filed and is now referenced. Also a few minor cleanups in the file I saw while working on it.
1 parent 925a477 commit ab87bbd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/dds/tree/src/simple-tree/schemaCreationUtilities.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export function singletonSchema<TScope extends string, TName extends string | nu
4141

4242
// Returning SingletonSchema without a type conversion results in TypeScript generating something like `readonly "__#124291@#brand": unknown;`
4343
// for the private brand field of TreeNode.
44-
// This numeric id doesn't seem to be stable over incremental builds, and thus causes diffs if the API extractor reports.
44+
// This numeric id doesn't seem to be stable over incremental builds, and thus causes diffs in the API extractor reports.
4545
// This is avoided by doing this type conversion.
4646
// The conversion is done via assignment instead of `as` to get stronger type safety.
4747
const toReturn: TreeNodeSchemaClass<
@@ -154,7 +154,7 @@ export function typedObjectValues<TKey extends string, TValues>(
154154
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
155155
export function enumFromStrings<TScope extends string, const Members extends string>(
156156
factory: SchemaFactory<TScope>,
157-
members: Members[],
157+
members: readonly Members[],
158158
) {
159159
const names = new Set(members);
160160
if (names.size !== members.length) {
@@ -182,7 +182,7 @@ export function enumFromStrings<TScope extends string, const Members extends str
182182
}
183183

184184
// TODO: Why does this one generate an invalid d.ts file if exported?
185-
// Tracked by https://github.com/microsoft/TypeScript/issues/56718
185+
// Tracked by https://github.com/microsoft/TypeScript/issues/58688
186186
// TODO: replace enumFromStrings above with this simpler implementation when the TypeScript bug is resolved.
187187
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
188188
function _enumFromStrings2<TScope extends string, const Members extends readonly string[]>(

0 commit comments

Comments
 (0)