Skip to content

Commit

Permalink
fix: make abstract service methods public
Browse files Browse the repository at this point in the history
  • Loading branch information
castarco committed Apr 28, 2021
1 parent a701485 commit cb96918
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion internal/generator/runer_generate_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (r *Runner) generateTypescriptServiceAbstractClass(generatedFileStream *pro
returnType = "Promise<void>"
}

r.P(generatedFileStream, "protected abstract "+methodName+"(call: "+callType+"): "+returnType)
r.P(generatedFileStream, "public abstract "+methodName+"(call: "+callType+"): "+returnType)
}

r.indentLevel -= 2
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/generated/Flavors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export namespace Flavors {
)
}

protected abstract Find(
public abstract Find(
call: grpc.ServerUnaryCall<IUserRequest, IUserProfile>
): Promise<IUserProfile>
}
Expand Down
8 changes: 4 additions & 4 deletions tests/__tests__/generated/Test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,16 +541,16 @@ export namespace Foo {
)
}

protected abstract Find(
public abstract Find(
call: grpc.ServerUnaryCall<IRequest, Common_Common.IOtherPkgMessage>
): Promise<Common_Common.IOtherPkgMessage>
protected abstract FindClientStream(
public abstract FindClientStream(
call: grpc.ServerReadableStream<IRequest, Common_Common.IOtherPkgMessage>
): Promise<Common_Common.IOtherPkgMessage>
protected abstract FindServerStream(
public abstract FindServerStream(
call: grpc.ServerWritableStream<IRequest, Common_Common.IOtherPkgMessage>
): Promise<void>
protected abstract FindBidiStream(
public abstract FindBidiStream(
call: grpc.ServerDuplexStream<IRequest, Common_Common.IOtherPkgMessage>
): Promise<void>
}
Expand Down

0 comments on commit cb96918

Please sign in to comment.