You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I build my TypeScript project which uses this library, I get several typing errors in the styles.d.ts file. This appears to be due to the properties of ReactDiffViewerStyles being optional properties, but the type of [key: string] being string, not string | undefined.
The text was updated successfully, but these errors were encountered:
I'm experiencing the same problem. I have the strictNullChecks flag set to true.
I see there was an issue regarding this problem - #17 and @praneshr recommended turning off the strict null checks. But there are cases where doing so is very time consuming, i.e. when big chunks of your code depend on that compiler flag.
@praneshr would you please consider @jamiewinder solution to the problem? Then your component will compile fine in projects where strictNullChecks is set to true or false.
When I build my TypeScript project which uses this library, I get several typing errors in the styles.d.ts file. This appears to be due to the properties of
ReactDiffViewerStyles
being optional properties, but the type of[key: string]
beingstring
, notstring | undefined
.The text was updated successfully, but these errors were encountered: