Commit d987aee
Fix modular template to always generate class property syntax (#1398)
* Add test that generates content for modular (based on 13.2.7)
* format
* Fix modular template to always generate class property syntax
The modular template was incorrectly using object method syntax (`:` and
`,`) when route.namespace was present, introduced by PR #1326. This
caused TypeScript syntax errors in generated code.
The modular template should always generate class properties with arrow
functions (`=` and `;`), regardless of namespace presence.
This resolves the issue reported in #1366 where version 13.2.8 generated
invalid TypeScript code with modular templates.
Signed-off-by: Sora Morimoto <[email protected]>
---------
Signed-off-by: Sora Morimoto <[email protected]>
Co-authored-by: Sora Morimoto <[email protected]>1 parent 4d3193d commit d987aee
File tree
5 files changed
+1740
-2
lines changed- .changeset
- templates/modular
- tests/spec/modular
- __snapshots__
5 files changed
+1740
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
0 commit comments