Skip to content

Commit 9f844cb

Browse files
authored
Fix this type (#534)
Signed-off-by: Nik Nasr <[email protected]>
1 parent 1ca10e4 commit 9f844cb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/restate-sdk/src/types/rpc.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ export type ServiceOpts<U> = {
769769
*/
770770
export const service = <P extends string, M>(service: {
771771
name: P;
772-
handlers: ServiceOpts<M>;
772+
handlers: ServiceOpts<M> & ThisType<M>;
773773
description?: string;
774774
metadata?: Record<string, string>;
775775
}): ServiceDefinition<P, M> => {
@@ -865,7 +865,7 @@ export type ObjectOpts<U> = {
865865
*/
866866
export const object = <P extends string, M>(object: {
867867
name: P;
868-
handlers: ObjectOpts<M>;
868+
handlers: ObjectOpts<M> & ThisType<M>;
869869
description?: string;
870870
metadata?: Record<string, string>;
871871
}): VirtualObjectDefinition<P, M> => {
@@ -963,7 +963,7 @@ export type WorkflowOpts<U> = {
963963
*/
964964
export const workflow = <P extends string, M>(workflow: {
965965
name: P;
966-
handlers: WorkflowOpts<M>;
966+
handlers: WorkflowOpts<M> & ThisType<M>;
967967
description?: string;
968968
metadata?: Record<string, string>;
969969
}): WorkflowDefinition<P, M> => {

tsconfig.base.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"skipLibCheck": true,
1515
"forceConsistentCasingInFileNames": true,
1616
"allowSyntheticDefaultImports": true,
17+
"noImplicitThis": true,
1718
"paths": {
1819
"@restatedev/restate-sdk-core": [
1920
"./packages/restate-sdk-core/src/public_api.ts"

0 commit comments

Comments
 (0)