Skip to content

Compile error using strictNullChecks: true on branch v2.0 #17

Closed
@mkoyamaRS

Description

@mkoyamaRS

Tried to use the alpha version in a project with the following tsconfig compile option
"strictNullChecks": true gives the following error

/node_modules/react-diff-viewer/lib/styles.d.ts
(3,5): Property 'diffContainer' of type 'string | undefined' is not assignable to string index type 'string'.

I did have a solution by changing the index signature of ReactDiffViewerStyles to [key: string]: string | undefined; - after changing this it compiles fine with the option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions