Respecting setups with "noImplicitAny" set to "true" in tsconfig.json (#123)

This commit is contained in:
Pavel 2021-05-17 20:06:33 +03:00 committed by GitHub
parent a8fd7f5c13
commit 3d6cc02382
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -26,6 +26,7 @@ object TypescriptFile {
| */
|import { FluenceClient, PeerIdB58 } from '@fluencelabs/fluence';
|import { RequestFlowBuilder } from '@fluencelabs/fluence/dist/api.unstable';
|import { RequestFlow } from '@fluencelabs/fluence/dist/internal/RequestFlow';
|""".stripMargin
}

View File

@ -48,7 +48,7 @@ case class TypescriptFunc(func: FuncCallable) {
s"""
|export async function ${func.funcName}(client: FluenceClient${if (func.args.isEmpty) ""
else ", "}${argsTypescript}): Promise<$retType> {
| let request;
| let request: RequestFlow;
| const promise = new Promise<$retType>((resolve, reject) => {
| request = new RequestFlowBuilder()
| .disableInjections()
@ -77,7 +77,7 @@ case class TypescriptFunc(func: FuncCallable) {
| })
| .build();
| });
| await client.initiateFlow(request);
| await client.initiateFlow(request!);
| return ${returnVal};
|}
""".stripMargin