Closed raypatterson closed 1 year ago
@raypatterson Hello, not quite sure it is an issue. The used TypeScript version is greater than < 3.6 versions. Could you elaborate a testcase on stackblitz or other ?
If I am not mistaken, target version is ES2018 and downlevelIteration
is not used.
I hesitate to report this as an issue since it was found while using swizzled source code against the latest Docusaurus beta, so maybe it's not a concern, but I found that the downstream parsing of the return value from this line doesn't work because it is a
Set[]
instead of anstring[]
(or whatever is in the original array).https://github.com/jy95/docusaurus-json-schema-plugin/blob/604908b597014db45841a23715f218e09852552e/src/theme/JSONSchemaViewer/utils/detectTypes.ts#L138-L140
I believe the TypeScript issue is reported, but I've had no luck with configuring TypeScript compile this to be an array, and had to patch with: