microsoft / microsoft/TypeScript
Javascript modules should be able to pass the exported value to child modules
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
TypeScript Version: 2.7.0-dev.201xxxxx
Search Terms:
Code
// @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: bluebird.js
var bluebird = require('./promise')()
bluebird.promisify
bluebird.outer
module.exports = bluebird
// @Filename: promise.js
module.exports = function() {
function Promise() {
}
Promise.outer = function () {
}
require('./promisify')(Promise)
Promise.promisify
Promise.outer
return Promise
}
// @Filename: promisify.js
module.exports = function (Promise) {
Promise.promisify = function () {
}
}
Expected behavior:
Bluebird's assignments to Promise in both promise.js and promisify.js should be visible in both promise.js and bluebird.js
Actual behavior:
promisify is not recognised in promise.js or bluebird.js. This seems very difficult to track statically, especially in the binder.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the three-file reproduction in bluebird.js, promise.js, and promisify.js, then inspect the binder behavior involved in tracking assignments across required modules. Done means the promisify assignment is recognized in both promise.js and bluebird.js, alongside the existing Promise and bluebird properties.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100