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
Strongly typed generatePath from react-router #50295
Conversation
@apieceofbart Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through. This is a live comment which I will keep updated. 1 package in this PRCode ReviewsBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged. Status
Once every item on this list is checked, I'll ask you for permission to merge and publish the changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 50295,
"author": "apieceofbart",
"headCommitAbbrOid": "f10e624",
"headCommitOid": "f10e6243343b87d6f21cde9a90e057f2e1f93b42",
"lastPushDate": "2020-12-27T21:38:11.000Z",
"lastActivityDate": "2020-12-28T09:19:24.000Z",
"maintainerBlessed": false,
"hasMergeConflict": false,
"isFirstContribution": true,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "react-router",
"kind": "edit",
"files": [
{
"path": "types/react-router/index.d.ts",
"kind": "definition"
},
{
"path": "types/react-router/package.json",
"kind": "package-meta-ok"
},
{
"path": "types/react-router/test/generatePath.ts",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/index.d.ts",
"kind": "definition"
},
{
"path": "types/react-router/ts4.0/test/Children.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/InheritingRoute.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/MemoryRouter.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/NavigateWithContext.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/Prompt.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/RouterContext.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/Switch.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/WithRouter.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/examples-from-react-router-website/Ambiguous.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/examples-from-react-router-website/Animation.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/examples-from-react-router-website/Auth.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/examples-from-react-router-website/Basic.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/examples-from-react-router-website/CustomLink.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/examples-from-react-router-website/ModalGallery.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/examples-from-react-router-website/NoMatch.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/examples-from-react-router-website/Params.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/examples-from-react-router-website/PreventingTransitions.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/examples-from-react-router-website/README.md",
"kind": "markdown"
},
{
"path": "types/react-router/ts4.0/test/examples-from-react-router-website/Recursive.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/examples-from-react-router-website/RouteConfig.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/examples-from-react-router-website/Sidebar.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/examples-from-react-router-website/StaticRouter.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/test/hooks.tsx",
"kind": "test"
},
{
"path": "types/react-router/ts4.0/tsconfig.json",
"kind": "package-meta",
"suspect": "not [the required form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-tsconfigjson)"
},
{
"path": "types/react-router/ts4.0/tslint.json",
"kind": "package-meta",
"suspect": "not [the required form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-linter-tslintjson)"
},
{
"path": "types/react-router/tsconfig.json",
"kind": "package-meta-ok"
}
],
"owners": [
"sergey-buturlakin",
"mrk21",
"vasek17",
"ngbrown",
"awendland",
"KostyaEsmukov",
"johnnyreilly",
"LKay",
"DovydasNavickas",
"huy-nguyen",
"grmiade",
"DaIgeb",
"egorshulga",
"rraina",
"t49tran",
"8enSmith",
"wezleytsai",
"eps1lon",
"HipsterBrown",
"pawfa"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "eps1lon",
"date": "2020-12-28T09:19:24.000Z",
"isMaintainer": false
}
],
"ciResult": "pass"
} |
🔔 @sergey-buturlakin @mrk21 @vasek17 @ngbrown @awendland @KostyaEsmukov @johnnyreilly @LKay @DovydasNavickas @huy-nguyen @Grmiade @DaIgeb @egorshulga @rraina @t49tran @8enSmith @wezleytsai @eps1lon @HipsterBrown @pawfa — please review this PR in the next few days. Be sure to explicitly select |
There's an issue with older version of typescript. Please check this comment |
👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings. Let’s review the numbers, shall we? Comparison details 📊
It looks like nothing changed too much. I won’t post performance data again unless it gets worse. |
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.
testing from 4.1 to 4.2 in /home/runner/work/DefinitelyTyped/DefinitelyTyped/types/react-router
Looks good 👍
This a really exciting addition BTW - well done! |
I just published |
* react-router-issue-50142: add folder for typescript 4.0 and below and copy existing types there * react-router-issue-50142: add tests for generatePath * react-router-issue-50142: rever removing typescript version in root index.d.ts Co-authored-by: Bartek Kozera <bartek.kozera@du.co>
Please fill in this template.
npm test <package to test>
.Select one of these and delete the others:
If adding a new definition:
.d.ts
files generated via--declaration
dts-gen --dt
, not by basing it on an existing project.tslint.json
should contain{ "extends": "dtslint/dt.json" }
, and no additional rules.tsconfig.json
should havenoImplicitAny
,noImplicitThis
,strictNullChecks
, andstrictFunctionTypes
set totrue
.If changing an existing definition:
If removing a declaration:
notNeededPackages.json
.