yoavbls / pretty-ts-errors

🔵 Make TypeScript errors prettier and human-readable in VSCode 🎀
https://marketplace.visualstudio.com/items?itemName=yoavbls.pretty-ts-errors
MIT License
13.14k stars 89 forks source link

Missing Object Props Error is not enough pretty. #64

Closed myagizmaktav closed 1 year ago

myagizmaktav commented 1 year ago

Describe the bug When writing code in React, I often need to transfer props to the parent component. However, I sometimes forget which props need to be omitted when passing them to the parent component.

Expected behavior I expect to have a clear and convenient way of determining which props should be omitted when passing them to the parent component.

LanguagePicker.tsx

type languagePickerProps = {
  pickerProps?: DropDownPickerProps<Object>;

  // Omit<
  //   DropDownPickerProps<Object>,
  //   "multiple" | "setValue" | "value" | "items" | "open" | "setOpen"
  // >;
};

export const LanguagePicker = (props: languagePickerProps) => {

Footer.tsx

  <LanguagePicker
          pickerProps={{
            style: {
              backgroundColor: "red",
            },
          }}
        />

Screenshots image

It needs to be written in code format: image

Please provide more context or additional information if necessary to help identify and resolve the issue.