Skip to content

Commit

Permalink
Add regression test for strictIndexSignatures with patternProperties
Browse files Browse the repository at this point in the history
Signed-off-by: Yoriyasu Yano <[email protected]>
  • Loading branch information
yorinasub17 committed Nov 18, 2023
1 parent 3bb5d2b commit e52c2a4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/__snapshots__/test/test.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -2230,6 +2230,14 @@ Generated by [AVA](https://avajs.dev).
maybe?: string;␊
[k: string]: Leaf | undefined;␊
};␊
pattern?: {␊
maybe?: string;␊
/**␊
* This interface was referenced by \`undefined\`'s JSON-Schema definition␊
* via the \`patternProperty\` "leaf|tree".␊
*/␊
[k: string]: unknown[] | undefined;␊
};␊
[k: string]: string | undefined;␊
}␊
export interface Leaf {␊
Expand Down
Binary file modified test/__snapshots__/test/test.ts.snap
Binary file not shown.
13 changes: 13 additions & 0 deletions test/e2e/options.strictIndexSignatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,19 @@ export const input = {
},
},
},
pattern: {
type: 'object',
properties: {
maybe: {
type: 'string',
},
},
patternProperties: {
'leaf|tree': {
type: 'array',
},
},
},
},
additionalProperties: {
type: 'string',
Expand Down

0 comments on commit e52c2a4

Please sign in to comment.