Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Aug 11, 2017

Fixes #15809

Note: The following will no longer work as a constructor function:

exports.f = function() {
    this.x = 1;
}

because we expect that this will be exports, and we get a "property 'x' does not exist" error.

@ghost ghost requested a review from rbuckton August 11, 2017 17:54
@ghost ghost force-pushed the commonjsAccessExports branch from 42373a8 to 6823eda Compare August 11, 2017 22:07
@rbuckton
Copy link
Contributor

Note: The following will no longer work as a constructor function:

exports.f = function() {
   this.x = 1;
}

Do we think this will be an issue for adoption?

// CC: @DanielRosenwasser, @mhegazy, @bowdenk7

@ghost
Copy link
Author

ghost commented Aug 29, 2017

Bump @DanielRosenwasser, @mhegazy, @bowdenk7

@mhegazy
Copy link
Contributor

mhegazy commented Sep 6, 2017

Note: The following will no longer work as a constructor function:

I am not sure i understand the issue here.

@ghost ghost force-pushed the commonjsAccessExports branch from 48c5890 to 822cc2a Compare September 8, 2017 16:04
@ghost
Copy link
Author

ghost commented Sep 8, 2017

Fixed the issue by changing getContextualThisParameterType to never contextually type this to the source file symbol.

@ghost ghost merged commit d1e2242 into master Sep 14, 2017
@ghost ghost deleted the commonjsAccessExports branch September 14, 2017 19:37
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants