Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface methods referencing imported types #4

Open
robfordww opened this issue Aug 31, 2023 · 1 comment
Open

Interface methods referencing imported types #4

robfordww opened this issue Aug 31, 2023 · 1 comment

Comments

@robfordww
Copy link

//go:webrpc typescript -client -out=./demo_gospeak.gen.ts
//go:webrpc golang -server -pkg=rpc -out=../rpc/server_gospeak.gen.go
type DemoWebAPI interface {
	QueryDB(ctx context.Context, source string, q string) (res []models.DemoRow, err error)
}

This produces a
type models.DemoRow struct {
in the generated file. This is not valid Go, and fails on compile.

@VojtechVitek
Copy link
Contributor

Thanks for the bug report @robfordww. I'll have a look at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants