Skip to content

Conversation

@DetachHead
Copy link
Contributor

@DetachHead DetachHead commented May 31, 2021

follow-up from #51262

  • params ending in ? are now properly identified and their type is string | undefined
  • params delimited by . or - now work properly
  • paths that contain regex (eg. /:foo(\d+)) currently fall back to the ParamsDictionary type
    • i could take a crack at making it properly ignore the contents of the parentheses, but would need to be able to do so reliably (ie. account for escaped parentheses), which is probably doable but difficult.

Please fill in this template.

If changing an existing definition:

@DetachHead DetachHead marked this pull request as ready for review May 31, 2021 10:36
@DetachHead DetachHead requested a review from borisyankov as a code owner May 31, 2021 10:36
@typescript-bot
Copy link
Contributor

typescript-bot commented May 31, 2021

@DetachHead Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because this is a widely-used package, a DT maintainer will need to review it before it can be merged.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Most recent commit is approved by a DT maintainer

All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes.

Inactive

This PR has been inactive for 10 days — please merge or say something if there's a problem, otherwise it will be closed!


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 53513,
  "author": "DetachHead",
  "headCommitOid": "b9a464f994255be107b466612d556c9b7701e900",
  "lastPushDate": "2021-06-17T10:45:54.000Z",
  "lastActivityDate": "2021-06-28T01:52:52.000Z",
  "mergeOfferDate": "2021-06-17T23:24:23.000Z",
  "mergeRequestDate": "2021-06-28T01:52:52.000Z",
  "mergeRequestUser": "DetachHead",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "express-serve-static-core",
      "kind": "edit",
      "files": [
        {
          "path": "types/express-serve-static-core/express-serve-static-core-tests.ts",
          "kind": "test"
        },
        {
          "path": "types/express-serve-static-core/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/express-serve-static-core/ts4.0/express-serve-static-core-tests.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "borisyankov",
        "19majkel94",
        "kacepe",
        "micksatana",
        "samijaber",
        "JoseLion",
        "dwrss",
        "andoshin11"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "rbuckton",
      "date": "2021-06-17T23:23:45.000Z",
      "isMaintainer": true
    },
    {
      "type": "stale",
      "reviewer": "JoseLion",
      "date": "2021-06-11T23:41:46.000Z",
      "abbrOid": "e9bc2f0"
    }
  ],
  "mainBotCommentID": 851396986,
  "ciResult": "pass"
}

@typescript-bot
Copy link
Contributor

🔔 @borisyankov @19majkel94 @kacepe @micksatana @samijaber @JoseLion @dwrss @andoshin11 — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@typescript-bot
Copy link
Contributor

Re-ping @borisyankov, @19majkel94, @kacepe, @micksatana, @samijaber, @JoseLion, @dwrss, @andoshin11:

This PR has been out for over a week, yet I haven't seen any reviews.

Could someone please give it some attention? Thanks!

@typescript-bot typescript-bot added the Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer. label Jun 11, 2021
@typescript-bot typescript-bot removed the Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer. label Jun 11, 2021
@typescript-bot
Copy link
Contributor

@JoseLion Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

Copy link
Contributor

@JoseLion JoseLion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! This is great @DetachHead, awesome work 🎉

@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label Jun 11, 2021
Copy link
Collaborator

@rbuckton rbuckton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only required change here is the never->unknown suggestion. Once that's been updated I can approve.

@typescript-bot typescript-bot added Revision needed This PR needs code changes before it can be merged. and removed Owner Approved A listed owner of this package signed off on the pull request. labels Jun 16, 2021
@typescript-bot
Copy link
Contributor

@DetachHead One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you!

@typescript-bot typescript-bot removed the Revision needed This PR needs code changes before it can be merged. label Jun 17, 2021
@typescript-bot
Copy link
Contributor

@rbuckton, @JoseLion Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels Jun 17, 2021
@typescript-bot
Copy link
Contributor

@JoseLion Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@typescript-bot
Copy link
Contributor

Re-ping @DetachHead / @borisyankov, @19majkel94, @kacepe, @micksatana, @samijaber, @JoseLion, @dwrss, @andoshin11:

This PR has been ready to merge for over a week, and I haven't seen any requests to merge it. I will close it on Jul 17th (in three weeks) if this doesn't happen.

(If there's no reason to avoid merging it, please do so. Otherwise, if it shouldn't be merged or if it needs more time, please close it or turn it into a draft.)

@typescript-bot typescript-bot added the Unmerged The author did not merge the PR when it was ready. label Jun 28, 2021
@DetachHead
Copy link
Contributor Author

Ready to merge

@typescript-bot typescript-bot merged commit 6973d2c into DefinitelyTyped:master Jun 28, 2021
@typescript-bot
Copy link
Contributor

I just published @types/[email protected] to npm.

@simllll
Copy link
Contributor

simllll commented Jun 29, 2021

the latest release, breaks one code line in my code... it seems it has troubles with routes like
/static-part/:param1/:param2/anotherstaticpart

src/routes/routes.ts:2616:9 - error TS2589: Type instantiation is excessively deep and possibly infinite.

2616         app.get('/website-api/jobalarm/:jobalarmId/:subscriptionId/search',
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2617             function JobalarmController_getJobAlarmSearchResultList(request: any, response: any, next: any) {
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ... 
2637             promiseHandler(controller, promise, response, undefined, next);
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2638         });
     ~~~~~~~~~~

any known solution to this?

I tried adding <string,stirng> manually..this solves it, also the + "" hack, but the problem with this is: the file is auto generated, and it's not so easy to modify it. Therefore I would need a proper type solution I guess.

works with "@types/express-serve-static-core": "4.17.21", but not with 4.17.22.

@DetachHead
Copy link
Contributor Author

@simllll sorry about that. #54151 will fix it

@simllll
Copy link
Contributor

simllll commented Jun 29, 2021

Wow nice for this quick follow up ! :-)

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

Labels

Critical package Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner Unmerged The author did not merge the PR when it was ready.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants