Describe the problem
Based off of #7553
When removing "strictNullChecks": false from the tsconfig.base.json file, roughly 1662 errors occur when trying to build (not all from react-core). For now this issue is meant to just keep this on the radar and to eventually decide how best to go about resolving errors (if they need to be).
Some of errors that I noticed are (some are more common than others in what I've seen thus far):
- A default prop being given a value of
null and throwing Type 'null' is not assignable to type...
Argument of type X is not assignable to parameter of type...
- the OUIA methods (getOUIAProps, useOUIAId, etc) throw the above when trying to pass in
component.displayName
No overload matches this call
Cannot invoke an object which is possibly 'undefined' (this.props.onChange when onChange is optional) or Object is possibly undefined
Conversion of type X is not assignable to type Y (AboutModal's appendTo: null as HTMLElement for example)
JSX Element type X does not have any construct or call signatures
- Instances where aria attributes are being passed values using
|| or ternary with null as an option cause type X is not assignable to type Y errors to get thrown. For example in AlertGroupInline: aria-live={isLiveRegion ? 'polite' : null}
Type 'undefined' cannot be used as an index type e.g. Avatar has styles.modifiers[size]
Property X does not exist on type 'never'
Describe the problem
Based off of #7553
When removing
"strictNullChecks": falsefrom thetsconfig.base.jsonfile, roughly 1662 errors occur when trying to build (not all from react-core). For now this issue is meant to just keep this on the radar and to eventually decide how best to go about resolving errors (if they need to be).Some of errors that I noticed are (some are more common than others in what I've seen thus far):
nulland throwingType 'null' is not assignable to type...Argument of type X is not assignable to parameter of type...component.displayNameNo overload matches this callCannot invoke an object which is possibly 'undefined'(this.props.onChangewhenonChangeis optional) orObject is possibly undefinedConversion of type X is not assignable to type Y(AboutModal'sappendTo: null as HTMLElementfor example)JSX Element type X does not have any construct or call signatures||or ternary with null as an option causetype X is not assignable to type Yerrors to get thrown. For example in AlertGroupInline:aria-live={isLiveRegion ? 'polite' : null}Type 'undefined' cannot be used as an index typee.g. Avatar hasstyles.modifiers[size]Property X does not exist on type 'never'