Improving strict typescript checking
This commit is contained in:
@ -10353,6 +10353,7 @@ var TypescriptTarget = class extends CompileTarget {
|
||||
}
|
||||
a(2, ``);
|
||||
a(2, `p.push(ctx);`);
|
||||
a(2, `//@ts-ignore This will cause a typescript error when strict checking, since p is not a tuple`);
|
||||
a(2, `return this.${fnc.name}.call(this, ...p)` + (fnc.return ? `.then(${((_a = fnc.return) == null ? void 0 : _a.array) ? `res => res.map(e => apply_${fnc.return.type}(e))` : `res => apply_${fnc.return.type}(res)`});` : ""));
|
||||
a(1, `}`);
|
||||
a(0, ``);
|
||||
@ -10517,10 +10518,12 @@ var CSharpTarget = class extends CompileTarget {
|
||||
}
|
||||
t.forEach((l) => lines.push(" ".repeat(i) + l.trim()));
|
||||
};
|
||||
a(0, `using System;`);
|
||||
a(0, `using System.Text.Json;`);
|
||||
a(0, `using System.Text.Json.Serialization;`);
|
||||
a(0, `using System.Text.Json.Nodes;`);
|
||||
a(0, `using System.Threading.Tasks;`);
|
||||
a(0, `using System.Collections.Generic;`);
|
||||
a(0, ``);
|
||||
a(0, `namespace ${this.namespace};`);
|
||||
a(0, ``);
|
||||
@ -10573,10 +10576,12 @@ var CSharpTarget = class extends CompileTarget {
|
||||
}
|
||||
t.forEach((l) => lines.push(" ".repeat(i) + l.trim()));
|
||||
};
|
||||
a(0, `using System;`);
|
||||
a(0, `using System.Text.Json;`);
|
||||
a(0, `using System.Text.Json.Serialization;`);
|
||||
a(0, `using System.Text.Json.Nodes;`);
|
||||
a(0, `using System.Threading.Tasks;`);
|
||||
a(0, `using System.Collections.Generic;`);
|
||||
a(0, ``);
|
||||
a(0, `namespace ${this.namespace};`);
|
||||
a(0, ``);
|
||||
|
Reference in New Issue
Block a user