How to refresh or regenerate files in .sfdx/typings?

After I added and renamed some objects in my scratch org and pushed the code, I found that those changes were not reflected in the lwc files under .sfdx/typings.
So I thought deleting this folder would force sfdx to regenerate them. I was wrong, and I cannot find a way to regenerate the files in this folder, which means autocompletion is VS code no longer works properly.
Is there a sfdx CLI command that would regenerate those files in .sfdx/typings?


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

There is an Command for it and can be found in the Command Pallete (CMD + Shift+ P) and select “SFDX:Refresh SObject Definitions“

enter image description here

Click on this should regenerate the typings for you .

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x