You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Record with a numeric key is incorrectly outputted as an array instead of an object.
// foo.tsinterfaceRecordValue{baz: 'baz';}exporttypeFoo=Record<number,RecordValue>;// Note, the following output as expected:// export type Foo = Record<string, RecordValue>;// export type Foo = {// [key: number]: RecordValue;// };
Fully appreciate all object keys are strings in Javascript, so declaring a Record with a numeric interface is unusual. However. typescript allows it, so would be useful for ts-json-schema-generator to also support it.
The text was updated successfully, but these errors were encountered:
A
Record
with a numeric key is incorrectly outputted as anarray
instead of anobject
.Command:
Actual Result:
Expected Result:
Fully appreciate all object keys are strings in Javascript, so declaring a Record with a numeric interface is unusual. However. typescript allows it, so would be useful for
ts-json-schema-generator
to also support it.The text was updated successfully, but these errors were encountered: