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

[meteor]: Added OptionalId<T> to insert() method. Inspired by @types/mongo #39933

Merged
merged 4 commits into from
Oct 30, 2019

Conversation

nicu-chiciuc
Copy link
Contributor

  • 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).

If changing an existing definition:

When trying to insert into a collection which is defined to have an _id, Typescript will err. This is change is based on the type definition for mongodb.

@nicu-chiciuc
Copy link
Contributor Author

There seem to be some problems with union types when using Omit. The pull-request ought not to be approved until those are solved.

@typescript-bot typescript-bot added Awaiting reviewer feedback Author is Owner The author of this PR is a listed owner of the package. labels Oct 28, 2019
@typescript-bot
Copy link
Contributor

typescript-bot commented Oct 28, 2019

@nicu-chiciuc Thank you for submitting this PR!

🔔 @barbatus @fullflavedave @orefalo @dagatsoin @birkskyum @ardatan @stefanholzapfel @andrei-markeev @lmachens @gunn @alesn @perbergland - 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.

If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead.

@typescript-bot
Copy link
Contributor

Since you're a listed owner and the build passed, this PR is fast-tracked. A maintainer will merge shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution to DefinitelyTyped!

@nicu-chiciuc
Copy link
Contributor Author

nicu-chiciuc commented Oct 28, 2019

I've changed the definition of UnionOmit to :

type UnionOmit<T, K extends keyof any> = T extends T ? Pick<T, Exclude<keyof T, K>> : never;

Based on microsoft/TypeScript#28791 (comment)
so that union types are supported better.

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

Comparison details 📊
master #39933 diff
Batch compilation
Memory usage (MiB) 170.3 168.9 -0.8%
Type count 33968 33977 0%
Assignability cache size 54331 54328 0%
Language service
Samples taken 1096 1123 +2%
Identifiers in tests 2233 2287 +2%
getCompletionsAtPosition
    Mean duration (ms) 1032.4 1034.9 +0.2%
    Mean CV 7.9% 8.0%
    Worst duration (ms) 1338.1 1318.1 -1.5%
    Worst identifier Meteor absoluteUrl
getQuickInfoAtPosition
    Mean duration (ms) 1028.9 1032.8 +0.4%
    Mean CV 7.9% 7.6% -4.1%
    Worst duration (ms) 1232.5 1339.8 +8.7%
    Worst identifier tags url

It looks like nothing changed too much. I won’t post performance data again unless it gets worse.

@typescript-bot typescript-bot added the Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. label Oct 28, 2019
@typescript-bot
Copy link
Contributor

@nicu-chiciuc - It appears Travis did not correctly run on this PR! /cc @RyanCavanaugh to investigate and advise.

@nicu-chiciuc
Copy link
Contributor Author

Hi @RyanCavanaugh . The bot suggested that I /cc you and ask you to investigate and advise.

@jessetrinity jessetrinity merged commit cd09bfd into DefinitelyTyped:master Oct 30, 2019
@typescript-bot
Copy link
Contributor

I just published @types/meteor@1.4.35 to npm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author is Owner The author of this PR is a listed owner of the package. Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants