[api] Add .getNonMissingTypeOfSymbol() getter - #4701
Conversation
Signed-off-by: mrazauskas <tom@mrazauskas.de>
There was a problem hiding this comment.
Pull request overview
Adds getNonMissingTypeOfSymbol to expose symbol types that respect exactOptionalPropertyTypes, addressing #4081.
Changes:
- Exposes the checker operation through the Go API and protocol.
- Adds synchronous and asynchronous TypeScript APIs.
- Tests behavior with exact optional property types enabled and disabled.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
internal/checker/exports.go |
Exposes the checker method. |
internal/api/session.go |
Handles the new API request. |
internal/api/proto.go |
Registers the protocol method and parameters. |
_packages/native-preview/src/api/sync/api.ts |
Adds the synchronous getter. |
_packages/native-preview/src/api/async/api.ts |
Adds the asynchronous getter. |
_packages/native-preview/test/sync/api.test.ts |
Tests synchronous behavior. |
_packages/native-preview/test/async/api.test.ts |
Tests asynchronous behavior. |
|
By the way, currently in typescript-go/internal/api/session.go Lines 1397 to 1410 in 8d29e62 But in typescript-go/internal/ls/api.go Lines 39 to 44 in 8d29e62 Can this be an oversight? Because |
Close #4081
This PR adds the
.getNonMissingTypeOfSymbol()getter.