igalshilman commented on a change in pull request #269:
URL: https://github.com/apache/flink-statefun/pull/269#discussion_r710003482



##########
File path: statefun-sdk-js/smoketest/smoke.js
##########
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+require("./commands_pb");
+
+const http = require("http");
+const {egressMessageBuilder, messageBuilder, StateFun, Context} = 
require("../dist/statefun");
+
+// noinspection JSUnresolvedVariable
+const SourceCommandType = 
StateFun.protoType("statefun.smoke.e2e/source-command", 
proto.org.apache.flink.statefun.e2e.smoke.SourceCommand);
+
+// noinspection JSUnresolvedVariable
+const CommandsType = StateFun.protoType("statefun.smoke.e2e/commands", 
proto.org.apache.flink.statefun.e2e.smoke.Commands);
+
+// noinspection JSUnresolvedVariable
+const VerificationResultType = 
StateFun.protoType("statefun.smoke.e2e/verification-result", 
proto.org.apache.flink.statefun.e2e.smoke.VerificationResult);
+
+// noinspection JSValidateJSDoc
+/**
+ * @param {Context} context
+ * @param {?proto.org.apache.flink.statefun.e2e.smoke.Command.Send} send
+ */
+function applySend(context, send) {
+    context.send(messageBuilder({
+        typename: "statefun.smoke.e2e/command-interpreter-fn",
+        id: `${send.getTarget()}`,
+        value: send.getCommands(),
+        valueType: CommandsType
+    }));
+}
+
+// noinspection JSValidateJSDoc

Review comment:
       The smokiest is not a showcase no. But still its a good point to see how 
far can we go without the suppression.
   The problem generally arises everywhere we need to access a Protobuf classes.
   But I'll take an additional look into it, thanks for pointing this out!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to