Secret Productivity Hack On VS Code

Hey Techies,

I was watching some random coding react conf video(If your a react developer you should try once). Guess what I found a hack which I don’t see people usally use this hack which is very cool thing to use and I am sure your going to use thi…


This content originally appeared on DEV Community and was authored by Harish Kumar

Hey Techies,

I was watching some random coding react conf video(If your a react developer you should try once). Guess what I found a hack which I don't see people usally use this hack which is very cool thing to use and I am sure your going to use this hack on daily basis. 

So, Lets assume that you have type ready for a object which is complex.

type Address = {
  street: string;
  city: string;
  state: string;
  country: string;
  zip: string;
};

export type CompanySize =
  | "0-20"
  | "20-50"
  | "50-100"
  | "100-200"
  | "200-500"
  | "500-1000"
  | "1000-2000"
  | "2000+";

export interface OrganizationForm {
  name: string;
  description?: string;
  address: Address;
  contactEmail: string;
  phoneNumber: string;
  website: string;
  industry: string;
  size: CompanySize;
  interests: string[];
  techStack: string[];
}

export interface OrganizationState {
  formData: OrganizationForm;
  currentStep: number;
  isLoading: boolean;
  error: string | null;
  successMessage: string | null;
}

export interface OrganizationActions {
  setField: <K extends keyof OrganizationForm>(
    key: K,
    value: OrganizationForm[K]
  ) => void;
}

export interface OrganizationAsyncActions {
  createOrganization: () => Promise<void>;
}

Then you want to create a default state or something a intial object with the type.
Usually you would go type all the properties and their default values. If your a person who is little smart would use suggestion or intellisense(like the ctrl+space) to fill in the properties.

fill data with help of suggestion

But we have now more smarter way to do it thats all about this blog.
We can use a Ctrl+. shortcut to open the quick fix option and there another option called fill properties. This would instantly fill the object with default properties.
Easy way to fill intial object

Conclusion

Yeah Yeah Yeah… VS Code is full of surprise starting from the emmet to various features like this. Untill I find another hack goodbye.
Linkedin: https://www.linkedin.com/in/harish-kumar-418a47237/
Github: https://github.com/harish-20


This content originally appeared on DEV Community and was authored by Harish Kumar


Print Share Comment Cite Upload Translate Updates
APA

Harish Kumar | Sciencx (2025-10-16T06:13:23+00:00) Secret Productivity Hack On VS Code. Retrieved from https://www.scien.cx/2025/10/16/secret-productivity-hack-on-vs-code/

MLA
" » Secret Productivity Hack On VS Code." Harish Kumar | Sciencx - Thursday October 16, 2025, https://www.scien.cx/2025/10/16/secret-productivity-hack-on-vs-code/
HARVARD
Harish Kumar | Sciencx Thursday October 16, 2025 » Secret Productivity Hack On VS Code., viewed ,<https://www.scien.cx/2025/10/16/secret-productivity-hack-on-vs-code/>
VANCOUVER
Harish Kumar | Sciencx - » Secret Productivity Hack On VS Code. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/10/16/secret-productivity-hack-on-vs-code/
CHICAGO
" » Secret Productivity Hack On VS Code." Harish Kumar | Sciencx - Accessed . https://www.scien.cx/2025/10/16/secret-productivity-hack-on-vs-code/
IEEE
" » Secret Productivity Hack On VS Code." Harish Kumar | Sciencx [Online]. Available: https://www.scien.cx/2025/10/16/secret-productivity-hack-on-vs-code/. [Accessed: ]
rf:citation
» Secret Productivity Hack On VS Code | Harish Kumar | Sciencx | https://www.scien.cx/2025/10/16/secret-productivity-hack-on-vs-code/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.