Remove some C# warnings and making the client API safer by declaring nullables

This commit is contained in:
K35
2022-01-11 08:51:35 +00:00
parent d85ed22ea7
commit 5bde88e90b
3 changed files with 3 additions and 3 deletions

View File

@ -10549,7 +10549,7 @@ var CSharpTarget = class extends CompileTarget {
a(1, `}`);
} else {
let ret = fnc.return ? fnc.return.array ? `IList<${toCSharpType(fnc.return.type)}>` : toCSharpType(fnc.return.type) : void 0;
a(1, `public async Task<${ret}> ${fnc.name}(${params}) {`);
a(1, `public async Task<${ret}?> ${fnc.name}(${params}) {`);
genParam();
a(2, `return await this.Client.SendRequest<${ret}>("${definition.name}.${fnc.name}", param);`);
a(1, `}`);