fix: Remove type from ModuleDefaults, combine unions

This commit is contained in:
Gerald Pinder 2024-10-13 21:01:35 -04:00
parent ddd1864c3f
commit 31ae9cf6bf
2 changed files with 7 additions and 15 deletions

View file

@ -21,7 +21,7 @@ for (const module of modules) {
text = text // add `...ModuleDefaults;` after the model type
.split("\n")
.flatMap(line => {
return line.replace(/model ([A-Za-z]+) {/, "model $1 extends Module {");
return line.replace(/model ([A-Za-z]+) {/, "model $1 extends ModuleDefaults {");
// if (line.trimStart().startsWith(`type: "${module.name}"`)) {
// return [
// line,