Skip to content

types: fix ApplyBasicCreateCasting and DeepPartial to better support VSCode intellisense#16047

Closed
vkarpov15 wants to merge 2 commits intomasterfrom
vkarpov15/create-typings
Closed

types: fix ApplyBasicCreateCasting and DeepPartial to better support VSCode intellisense#16047
vkarpov15 wants to merge 2 commits intomasterfrom
vkarpov15/create-typings

Conversation

@vkarpov15
Copy link
Copy Markdown
Collaborator

Summary

While working on #16012 I spotted that intellisense for create() wasn't working at all

image image image

With this change, seems to work much better:

image image image image image

I borrowed heavily from the Vercel AI SDK's DeepPartial type for this implementation - their DeepPartial seems to work better with intellisense.

For some reason Boolean is still showing up as any in intellisense, I'm looking into that, but this change should still improve intellisense across the board.

@AbdelrahmanHafez @hasezoey can you check whether this helps intellisense on your IDE?

Examples

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Copy link
Copy Markdown
Collaborator

@AbdelrahmanHafez AbdelrahmanHafez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, we should be able to write tests that prevent regression for this in the future though.

Copy link
Copy Markdown
Collaborator

@hasezoey hasezoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AbdelrahmanHafez @hasezoey can you check whether this helps intellisense on your IDE?

From what i can tell, it was working fine before this PR (using vscode and typescript 5.9.3) and it also works after this pr.
(though note that my test case is "simpler" than the one shown in the screenshot, as i only did quick testing)

@hasezoey hasezoey added the typescript Types or Types-test related issue / Pull Request label Feb 26, 2026
@vkarpov15
Copy link
Copy Markdown
Collaborator Author

Checking what @hasezoey , it looks like intellisense works fine without this PR too 😭 Likely some strange flake with my local dev environment. Next time I'll have to make sure to restart Zed and reboot TypeScript server a few times just in case.

@vkarpov15 vkarpov15 closed this Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

typescript Types or Types-test related issue / Pull Request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants