Skip to content
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

[@koa/router] Add definitions #36970

Merged
merged 2 commits into from Jul 17, 2019

Conversation

jdforsythe
Copy link
Contributor

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

Select one of these and delete the others:

If adding a new definition:

  • The package does not already provide its own types, or cannot have its .d.ts files generated via --declaration
  • If this is for an NPM package, match the name. If not, do not conflict with the name of an NPM package.
  • Create it with dts-gen --dt, not by basing it on an existing project.
  • tslint.json should be present, and tsconfig.json should have noImplicitAny, noImplicitThis, strictNullChecks, and strictFunctionTypes set to true.

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: <>
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }.

If removing a declaration:

  • If a package was never on DefinitelyTyped, you don't need to do anything. (If you wrote a package and provided types, you don't need to register it with us.)
  • Delete the package's directory.
  • Add it to notNeededPackages.json.

This is to add types for @koa/router, recently forked by koajs at @koa/router and available on npm as @koa/router

Fixes #36465

@typescript-bot typescript-bot added the New Definition This PR creates a new definition package. label Jul 17, 2019
@typescript-bot
Copy link
Contributor

typescript-bot commented Jul 17, 2019

@jdforsythe Thank you for submitting this PR!

Because this is a new definition, a DefinitelyTyped maintainer will be reviewing this PR in the next few days once the Travis CI build passes.

In the meantime, if the build fails or a merge conflict occurs, I'll let you know. Have a nice day!

@typescript-bot
Copy link
Contributor

👋 Hi there! I’ve run some quick performance metrics against master and your PR. This is still an experiment, so don’t panic if I say something crazy! I’m still learning how to interpret these metrics.

Let’s review the numbers, shall we?

These typings are for a package that doesn’t yet exist on master, so I don’t have anything to compare against yet! In the future, I’ll be able to compare PRs to koa__router with its source on master.

Comparison details 📊
Batch compilation
Type count 10079
Assignability cache size 997
Subtype cache size 93
Identity cache size 8
Language service measurements
Samples taken 395
Identifiers in tests 395
getCompletionsAtPosition
    Mean duration (ms) 381.5
    Median duration (ms) 376.5
    Mean CV 11.5%
    Worst duration (ms) 488.7
    Worst identifier state
getQuickInfoAtPosition
    Mean duration (ms) 413.9
    Median duration (ms) 409.2
    Mean CV 14.0%
    Worst duration (ms) 542.1
    Worst identifier routeHandler4
System information
Node version v10.16.0
CPU count 2
CPU speed 2.294 GHz
CPU model Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
CPU Architecture x64
Memory 6.8 GiB
Platform linux
Release 4.15.0-1047-azure

If you have any questions or comments about me, you can ping @andrewbranch. Have a nice day!

Copy link
Member

@andrewbranch andrewbranch left a comment

Choose a reason for hiding this comment

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

👍 works for me

@andrewbranch andrewbranch merged commit 7172b31 into DefinitelyTyped:master Jul 17, 2019
Pull Request Status Board automation moved this from Review to Done Jul 17, 2019
@typescript-bot
Copy link
Contributor

I just published @types/koa__router@8.0.0 to npm.

iRON5 pushed a commit to iRON5/DefinitelyTyped that referenced this pull request Aug 13, 2019
* [@koa/router] Add types

* Fix lint errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Definition This PR creates a new definition package.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Definition request for @koa/router
3 participants