Skip to content

Commit dea25f0

Browse files
committed
fix this type
Signed-off-by: Nik Nasr <[email protected]>
1 parent 4ae428b commit dea25f0

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
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> => {

packages/restate-sdk/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"compilerOptions": {
44
"outDir": "./dist/esm"
55
},
6-
"include": ["src/**/*.ts", "src/**/*.js"],
6+
"include": ["test/**/*.ts","src/**/*.ts", "src/**/*.js"],
77
"references": [{ "path": "../restate-sdk-core" }]
88
}

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)