We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e52c2a4 commit 6ca3749Copy full SHA for 6ca3749
src/parser.ts
@@ -416,12 +416,13 @@ function parseSchema(
416
const comment = `This interface was referenced by \`${parentSchemaName}\`'s JSON-Schema definition
417
via the \`patternProperty\` "${key}".`
418
ast.comment = ast.comment ? `${ast.comment}\n\n${comment}` : comment
419
+ ast.keyName = singlePatternProperty ? '[k: string]' : key
420
return {
421
ast,
422
isPatternProperty: !singlePatternProperty,
423
isRequired: singlePatternProperty || includes(schema.required || [], key),
424
isUnreachableDefinition: false,
- keyName: singlePatternProperty ? '[k: string]' : key,
425
+ keyName: ast.keyName,
426
}
427
}),
428
)
0 commit comments