1export interface Input {
2 name: string;
3 items: Array<{ id: number; label: string }>;
4}
5
6static const message = "Hello {world} with {braces}";
7static const template = `
8 This is a template literal {
9 with nested braces
10 } and expressions ${1 + 1}
11`;
12
13static function evil() {
14 const obj = { a: "{", b: "}" };
15 const regex = /\{.*\}/;
16 return `{${obj.a}${obj.b}}`;
17}
18
19static {
20 console.log("Block with {braces} in string");
21 const data = { key: "value {nested}" };
22}
23
24# Evil Braces Test
25
26This tests that string literals with braces don't confuse the parser.
27
28The message is: **${message}**