tsgen blobs

This commit is contained in:
Egor Aristov 2025-11-14 18:43:09 +03:00
parent a7f7c4bb29
commit d50fb45547
Signed by: egor3f
GPG Key ID: 40482A264AAEC85F
2 changed files with 6 additions and 0 deletions

View File

@ -12,4 +12,9 @@ export default class GoIpcApi {
const results = await this.ipc.call("GoIpcApi.Div", a, b); const results = await this.ipc.call("GoIpcApi.Div", a, b);
return results[0] as number; return results[0] as number;
} }
async XorData(data1: Uint8Array, data2: Uint8Array): Promise<Uint8Array> {
const results = await this.ipc.call("GoIpcApi.XorData", data1, data2);
return results[0] as Uint8Array;
}
} }

View File

@ -35,6 +35,7 @@ func (g *TypescriptApiGenerator) Generate(apis *api.Api, destFile string) error
api.TInt: "number", api.TInt: "number",
api.TString: "string", api.TString: "string",
api.TBool: "boolean", api.TBool: "boolean",
api.TBlob: "Uint8Array",
}[t] }[t]
if !ok { if !ok {
return "", fmt.Errorf("cannot generate type %v", t) return "", fmt.Errorf("cannot generate type %v", t)