feat: Add call‑bind#50541
Conversation
|
@ExE-Boss Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PRCode ReviewsThis PR adds a new definition, so it needs to be reviewed by a DT maintainer before it can be merged. Status
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": 50541,
"author": "ExE-Boss",
"headCommitOid": "5cd88fff8ea291eaa6f6b9f552e454b3001bc53c",
"lastPushDate": "2021-01-12T13:20:04.000Z",
"lastActivityDate": "2021-01-12T17:48:35.000Z",
"maintainerBlessed": false,
"hasMergeConflict": false,
"isFirstContribution": false,
"popularityLevel": "Well-liked by everyone",
"pkgInfo": [
{
"name": "call-bind",
"kind": "add",
"files": [
{
"path": "types/call-bind/call-bind-tests.ts",
"kind": "test"
},
{
"path": "types/call-bind/callBound.d.ts",
"kind": "definition"
},
{
"path": "types/call-bind/index.d.ts",
"kind": "definition"
},
{
"path": "types/call-bind/package.json",
"kind": "package-meta-ok"
},
{
"path": "types/call-bind/test/callBind.test.ts",
"kind": "test"
},
{
"path": "types/call-bind/test/callBound.test.ts",
"kind": "test"
},
{
"path": "types/call-bind/ts3.9/call-bind-tests.ts",
"kind": "test"
},
{
"path": "types/call-bind/ts3.9/index.d.ts",
"kind": "definition"
},
{
"path": "types/call-bind/ts3.9/test/callBind.test.ts",
"kind": "test"
},
{
"path": "types/call-bind/ts3.9/test/callBound.test.ts",
"kind": "test"
},
{
"path": "types/call-bind/ts3.9/tsconfig.json",
"kind": "package-meta",
"suspect": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-tsconfigjson)"
},
{
"path": "types/call-bind/ts3.9/tslint.json",
"kind": "package-meta-ok"
},
{
"path": "types/call-bind/tsconfig.json",
"kind": "package-meta",
"suspect": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-tsconfigjson)"
},
{
"path": "types/call-bind/tslint.json",
"kind": "package-meta-ok"
}
],
"owners": [],
"addedOwners": [
"ljharb",
"ExE-Boss"
],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "ljharb",
"date": "2021-01-12T17:48:35.000Z",
"isMaintainer": false
}
],
"ciResult": "pass"
} |
|
🔔 @ExE-Boss — you're the only owner, but it would still be good if you find someone to review this PR in the next few days, otherwise a maintainer will look at it. (And if you do find someone, maybe even recruit them to be a second owner to make future changes easier...) |
|
@ExE-Boss The CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
| // These are invalid because of `package.json#exports`: | ||
| import callBindIllegal1 = require('call-bind/index'); // $ExpectError | ||
| import callBindIllegal2 = require('call-bind/index.js'); // $ExpectError |
There was a problem hiding this comment.
Why do these lines cause @types/call‑bind/index.d.ts to be incorrectly included in the TypeScript 3.9 test?
|
@ExE-Boss The CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
| import callBind = require('call-bind'); | ||
| import { apply as applyBind } from 'call-bind'; | ||
|
|
||
| declare const any: unknown; |
There was a problem hiding this comment.
why this instead of just using unknown directly?
There was a problem hiding this comment.
Because unknown only refers to a type.
There was a problem hiding this comment.
gotcha, so it could be named anything then. i was just confused by the name any
There was a problem hiding this comment.
Agree, any is a super confusing name for a value of type unknown. Maybe try unknown ?
|
@ExE-Boss The CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
|
@ExE-Boss it's probably because the dependency tracking code expects people to write |
|
@ExE-Boss The CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
9827526 to
5cd88ff
Compare
|
@ljharb Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review? |
|
I just published |
Please fill in this template.
npm test <package to test>.If adding a new definition:
.d.tsfiles generated via--declarationdts-gen --dt, not by basing it on an existing project.tslint.jsonshould contain{ "extends": "dtslint/dt.json" }, and no additional rules.tsconfig.jsonshould havenoImplicitAny,noImplicitThis,strictNullChecks, andstrictFunctionTypesset totrue.