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

Add types for polka #44943

Merged
merged 1 commit into from
May 21, 2020
Merged

Add types for polka #44943

merged 1 commit into from
May 21, 2020

Conversation

pkuczynski
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.
  • Represents shape of module/library correctly
  • tslint.json should be present and it shouldn't have any additional or disabling of rules. Just content as { "extends": "dtslint/dt.json" }. If for reason the some rule need to be disabled, disable it for that line using // tslint:disable-next-line [ruleName] and not for whole package so that the need for disabling can be reviewed.
  • tsconfig.json should have noImplicitAny, noImplicitThis, strictNullChecks, and strictFunctionTypes set to true.

@typescript-bot typescript-bot added New Definition This PR creates a new definition package. Where is Travis? labels May 21, 2020
@typescript-bot
Copy link
Contributor

typescript-bot commented May 21, 2020

@pkuczynski Thank you for submitting this PR!

Code Reviews

This PR adds a new definition, so it needs to be reviewed by a DT maintainer before it can be merged.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ❌ Only a DT maintainer can merge changes when there are new packages added

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": 44943,
  "author": "pkuczynski",
  "owners": [],
  "dangerLevel": "ScopedAndConfiguration",
  "headCommitAbbrOid": "bba6708",
  "headCommitOid": "bba6708db6a4a6c83ef935a81ff6c39662189501",
  "mergeIsRequested": false,
  "stalenessInDays": 0,
  "lastCommitDate": "2020-05-21T00:21:00.000Z",
  "lastCommentDate": "2020-05-21T00:24:35.000Z",
  "reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44943/files",
  "hasMergeConflict": false,
  "authorIsOwner": false,
  "isFirstContribution": false,
  "popularityLevel": "Well-liked by everyone",
  "anyPackageIsNew": true,
  "packages": [
    "polka"
  ],
  "files": [
    {
      "filePath": "types/polka/index.d.ts",
      "kind": "definition",
      "package": "polka"
    },
    {
      "filePath": "types/polka/polka-tests.ts",
      "kind": "test",
      "package": "polka"
    },
    {
      "filePath": "types/polka/tsconfig.json",
      "kind": "package-meta",
      "package": "polka"
    },
    {
      "filePath": "types/polka/tslint.json",
      "kind": "package-meta",
      "package": "polka"
    }
  ],
  "hasDismissedReview": false,
  "travisResult": "pass",
  "reviewersWithStaleReviews": [],
  "approvalFlags": 0,
  "isChangesRequested": false
}

@pkuczynski
Copy link
Contributor Author

FYI @JamesMessinger

@typescript-bot
Copy link
Contributor

👋 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?

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 polka with its source on master.

Comparison details 📊
Batch compilation
Type count 9370
Assignability cache size 3257
Language service measurements
Samples taken 36
Identifiers in tests 36
getCompletionsAtPosition
    Mean duration (ms) 316.2
    Mean CV 14.5%
    Worst duration (ms) 392.2
    Worst identifier routesB
getQuickInfoAtPosition
    Mean duration (ms) 316.1
    Mean CV 13.6%
    Worst duration (ms) 384.9
    Worst identifier middleware
System information
Node version v12.16.3
CPU count 2
CPU speed 2.394 GHz
CPU model Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
CPU Architecture x64
Memory 6.8 GiB
Platform linux
Release 4.15.0-1082-azure

@sheetalkamat sheetalkamat merged commit fd4e42a into DefinitelyTyped:master May 21, 2020
@typescript-bot typescript-bot removed this from Waiting for Code Reviews in New Pull Request Status Board May 21, 2020
@pkuczynski
Copy link
Contributor Author

pkuczynski commented May 21, 2020

Thanks @sheetalkamat

@pkuczynski pkuczynski deleted the polka branch May 21, 2020 20:07
jjballano-qatium pushed a commit to jjballano-qatium/DefinitelyTyped that referenced this pull request Jun 16, 2020
ngbrown pushed a commit to ngbrown-forks/DefinitelyTyped that referenced this pull request Jul 11, 2020
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.

None yet

3 participants