-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LF-4718: fix web deploy tsc error #3679
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<MeatballsMenu />
looks good -- isn't erroring for me anymore -- but I still see an IDE error and pnpm build
crash on <FileSizeExceedModal />
-- do you see that one?
src/components/Modals/FileSizeExceedModal/index.tsx:21:7 - error TS2322: Type 'string | number | boolean | object | TFunctionDetailedResult<string> | (string | object)[] | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<...> | ReactPortal | null | undefined' is not assignable to type 'NonNullable<ReactNodeLike>'.
Type 'undefined' is not assignable to type 'NonNullable<ReactNodeLike>'.
21 title={t(`FILE_SIZE_MODAL.TITLE`)}
~~~~~
src/components/Modals/ModalComponent/v2/index.jsx:75:3
75 title: PropTypes.node.isRequired || PropTypes.string.isRequired,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The expected type comes from property 'title' which is declared here on type 'IntrinsicAttributes & Pick<{ title: any; titleClassName: any; icon: any; contents: any; dismissModal: any; buttonGroup: any; children: any; warning: any; error: any; tooltipContent: any; className?: string | undefined; }, "className"> & Pick<...> & Pick<...>'
In order to see any errors at all I had to do a fresh node_modules
install though on integration. Probably it was a version bump in some @types
package or other (@types/react
or maybe a MUI thing?) that introduced this error, right?
@@ -13,7 +13,7 @@ import { BsX } from 'react-icons/bs'; | |||
import { Close } from '@mui/icons-material'; | |||
|
|||
export default function ModalComponent({ | |||
title, | |||
title = '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This solves the issue for me in that file, but I get a different tsc error in components/Drawer
on build 😂
src/components/Drawer/index.tsx:69:7 - error TS2322: Type 'NonNullable<ReactNode>' is not assignable to type 'string | undefined'.
Type 'number' is not assignable to type 'string'.
69 title={title}
~~~~~
Found 1 error in src/components/Drawer/index.tsx:69
I appreciate that you are actually solving the errors, though, I would have so totally used // @ts-ignore
😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worked for me too, thank you!
Description
Fixes tsc error that causes web deploy fail after merging TS PR.
Jira link:
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: