Properly type Lazy.js Sequence.chunk method#46699
Conversation
Improve `flatten` return type
|
@fan-tom Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PRCode ReviewsBecause you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it. Status
Once every item on this list is checked, I'll ask you for permission to merge and publish the changes. InactiveThis PR has been inactive for 14 days — waiting for a DT maintainer! Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 46699,
"author": "fan-tom",
"owners": [
"Bartvds",
"miso440",
"gablorquet",
"fan-tom"
],
"dangerLevel": "ScopedAndTested",
"headCommitAbbrOid": "ceaae4c",
"headCommitOid": "ceaae4c0f6cf04d66104c2eb7b37762013d5585e",
"mergeIsRequested": false,
"stalenessInDays": 14,
"lastPushDate": "2020-08-12T15:09:09.000Z",
"lastCommentDate": "2020-08-12T15:23:48.000Z",
"maintainerBlessed": false,
"reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46699/files",
"hasMergeConflict": false,
"authorIsOwner": true,
"isFirstContribution": false,
"popularityLevel": "Well-liked by everyone",
"newPackages": [],
"packages": [
"lazy.js"
],
"files": [
{
"path": "types/lazy.js/index.d.ts",
"kind": "definition",
"package": "lazy.js"
},
{
"path": "types/lazy.js/lazy.js-tests.ts",
"kind": "test",
"package": "lazy.js"
}
],
"hasDismissedReview": false,
"ciResult": "pass",
"reviewersWithStaleReviews": [],
"approvalFlags": 0,
"isChangesRequested": false
} |
|
🔔 @Bartvds @miso440 @gablorquet — please review this PR in the next few days. Be sure to explicitly select |
|
Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files. lazy.js (unpkg)was missing the following properties:
as well as these 15 other properties...Sequence, ArrayLikeSequence, ObjectLikeSequence, StringLikeSequence, StreamLikeSequence, GeneratedSequence, AsyncSequence, AsyncHandle, clone, deprecate, curry, curryRight, createCallback, createComparator, extensions |
|
👋 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 📊
It looks like nothing changed too much. I won’t post performance data again unless it gets worse. |
|
Merging it, but note that the issue you referred to was closed just a few days after this PR -- see this. |
Improve `flatten` return type
Improve `flatten` return type
Assigns proper type to
Sequence.chunkand improvesSequence.flattenreturn typePlease fill in this template.
npm test.)npm run lint package-name(ortscif notslint.jsonis present).Select one of these and delete the others:
If changing an existing definition:
tslint.jsoncontaining{ "extends": "dtslint/dt.json" }. If for reason the any 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.