Skip to content

Commit 51cc8be

Browse files
committed
showing explicit casting
This is required as TypeScript currently doesn't support implicit casting of yield return values: microsoft/TypeScript#36967
1 parent 51c20a0 commit 51cc8be

File tree

1 file changed

+1
-1
lines changed
  • samples/CounterOrchestrationTypeScript

1 file changed

+1
-1
lines changed

samples/CounterOrchestrationTypeScript/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as df from "durable-functions";
33
module.exports = df.orchestrator(function* (context) {
44
const entityId = new df.EntityId("CounterEntityTypeScript", "myCounterTS");
55

6-
const currentValue = yield context.df.callEntity<number>(entityId, "get");
6+
const currentValue: number = yield context.df.callEntity<number>(entityId, "get");
77
if (currentValue < 10) {
88
yield context.df.callEntity(entityId, "add", 1);
99
}

0 commit comments

Comments
 (0)