Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

fix(react-router): pin react-router type def files - #586

Closed
MarkPieszak wants to merge 3 commits into
aspnet:devfrom
MarkPieszak:dev
Closed

MarkPieszak wants to merge 3 commits into
aspnet:devfrom
MarkPieszak:dev

Conversation

@MarkPieszak

Copy link
Copy Markdown
Contributor

closes #582 #583

Issue stems from react-router-redux types updating (DefinitelyTyped/DefinitelyTyped#13642) as well as History updating (DefinitelyTyped/DefinitelyTyped@a1abf4f) and having duplicating Types

@SteveSandersonMS

SteveSandersonMS commented Jan 16, 2017 •

Copy link
Copy Markdown
Member

Thanks for this! It helped a lot in showing what the problem was.

Rather than pinning to a specific version of dependencies, I'd made a slightly different fix: f8714e9. This uses tsconfig.json's paths field to tell TypeScript which @types package is the official one for react/redux/history, rather than letting it use its default behaviour of combining all matching type definitions (which causes the "duplicate identifier" issue).

I prefer not to pin dependencies exactly to minor versions, because at some point, somebody will have some reason why they need to update to a newer version, but then they'd run into the original issue again and we wouldn't necessarily have any solution. Sometimes we might be forced to pin dependencies that precisely but on this occasion it seems we have an alternative :) Hope that's OK.

@MarkPieszak

Copy link
Copy Markdown
Contributor Author

Good idea! 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants