Skip to content

Commit e52c2a4

Browse files
committed
Add regression test for strictIndexSignatures with patternProperties
Signed-off-by: Yoriyasu Yano <[email protected]>
1 parent 3bb5d2b commit e52c2a4

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

test/__snapshots__/test/test.ts.md

+8
Original file line numberDiff line numberDiff line change
@@ -2230,6 +2230,14 @@ Generated by [AVA](https://avajs.dev).
22302230
maybe?: string;␊
22312231
[k: string]: Leaf | undefined;␊
22322232
};␊
2233+
pattern?: {␊
2234+
maybe?: string;␊
2235+
/**␊
2236+
* This interface was referenced by \`undefined\`'s JSON-Schema definition␊
2237+
* via the \`patternProperty\` "leaf|tree".␊
2238+
*/␊
2239+
[k: string]: unknown[] | undefined;␊
2240+
};␊
22332241
[k: string]: string | undefined;␊
22342242
}␊
22352243
export interface Leaf {␊

test/__snapshots__/test/test.ts.snap

-1.13 KB
Binary file not shown.

test/e2e/options.strictIndexSignatures.ts

+13
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,19 @@ export const input = {
2222
},
2323
},
2424
},
25+
pattern: {
26+
type: 'object',
27+
properties: {
28+
maybe: {
29+
type: 'string',
30+
},
31+
},
32+
patternProperties: {
33+
'leaf|tree': {
34+
type: 'array',
35+
},
36+
},
37+
},
2538
},
2639
additionalProperties: {
2740
type: 'string',

0 commit comments

Comments
 (0)