-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
Types for existing npm package subleveldown
with tests
#40754
Types for existing npm package subleveldown
with tests
#40754
Conversation
Signed-off-by: Carson Farmer <carson.farmer@gmail.com>
Signed-off-by: Carson Farmer <carson.farmer@gmail.com>
Signed-off-by: Carson Farmer <carson.farmer@gmail.com>
👋 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 subleveldown with its source on master. Comparison details 📊
|
@carsonfarmer 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! |
Signed-off-by: Carson Farmer <carson.farmer@gmail.com>
@carsonfarmer 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 or comments. Thank you! |
Signed-off-by: Carson Farmer <carson.farmer@gmail.com>
Thank you @demensky for your thorough and helpful review! I've addressed most of your comments, and have one open question left for some clarification. |
🔔 @demensky - Thanks for your review of this PR! Can you please look at the new code and update your review status if appropriate? |
Signed-off-by: Carson Farmer <carson.farmer@gmail.com>
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.
I hope these updates are 'ok' (they are a departure from the original submission). Additional changes are also expected upon answering one remaining question.
Signed-off-by: Carson Farmer <carson.farmer@gmail.com>
Signed-off-by: Carson Farmer <carson.farmer@gmail.com>
Signed-off-by: Carson Farmer <carson.farmer@gmail.com>
More updates, I'm still new to some aspects of Typescript defs, so I hope this is now pretty clear. The most recent updates allow the types to reflect arbitrary key/value types in each sublevel, which is an explicit requirement of the package: https://github.com/Level/subleveldown#background. The tests have been updated to explicitly check for this. |
Thanks again to @demensky! I look forward to your (hopefully final) review, and am happy to make any additional changes as needed. I suspect we can actually simplify things a great deal here. |
Signed-off-by: Carson Farmer <carson.farmer@gmail.com>
98f2143
to
3ba1bbe
Compare
Apologies to anyone following this work, I accidentally pushed a ton of commits to this branch. I've now force-pushed the the branch from 98f2143 to 3ba1bbe... hopefully this doesn't cause you any issues! |
Improvements
Signed-off-by: Carson Farmer <carson.farmer@gmail.com>
Ok, I'm happy with the final product here @demensky! I've made one last commit to add your name to the header, I hope this is ok? Otherwise, I think we're good to go here? |
We've gotten sign-off from a reviewer 👏. A maintainer will soon review this PR and merge it if there are no issues. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for contributing to DefinitelyTyped! |
I think this one is ready to go. It seems like the Revision needed label got left on for some reason? |
npm test
.)npm run lint package-name
(ortsc
if notslint.json
is present).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 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 havenoImplicitAny
,noImplicitThis
,strictNullChecks
, andstrictFunctionTypes
set totrue
.