mirror of https://github.com/golang/go.git
internal/lsp/protocol/typescript: clean up type gen documentation
Updates wording in lsp protocol type generation documentation regarding anonymous struct types for formal parameters. Change-Id: Icd78545c0f8b3d78d41ab6eb95dac2bc381dcc1c Reviewed-on: https://go-review.googlesource.com/c/tools/+/247520 Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This commit is contained in:
parent
19738be007
commit
b8f4a4e40d
|
|
@ -27,7 +27,7 @@ containing type definitions, and `tsserver.go`, `tsclient.go` containing API stu
|
|||
the generated files and stored in the variable `gitHash` in `go.ts`. It is checked (see `git()` in `util.ts`) on every execution.
|
||||
3. Generating the `ts*.go` files is only semi-automated. Please file an issue if the released version is too far behind.
|
||||
4. For the impatient, first change `gitHash` by hand (`git()` shows how to find the hash).
|
||||
1. Then try to run `code.ts`. This will likely fail because the heuristics don't cover some new case. For instance, some simple type like `string` might have changed to a union type `string | [number,number]`. Another example is that some formal parameter generated by will have anonymous structure type, which is essentially unusable.
|
||||
1. Then try to run `code.ts`. This will likely fail because the heuristics don't cover some new case. For instance, some simple type like `string` might have changed to a union type `string | [number,number]`. Another example is that some generated formal parameter may have anonymous structure type, which is essentially unusable.
|
||||
2. Next step is to move the generated code to `internal/lsp/protocol` and try to build `gopls` and its tests. This will likely fail because types have changed. Generally the fixes are fairly easy. Then run all the tests.
|
||||
3. Since there are not adequate integration tests, the next step is to run `gopls`.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue