Skip to content

Fix 8407: Allow (weak)map & (weak)set constructor when targeting ES5 using ES6 library#8451

Merged
yuit merged 6 commits into
masterfrom
fixlib
May 5, 2016
Merged

Fix 8407: Allow (weak)map & (weak)set constructor when targeting ES5 using ES6 library#8451
yuit merged 6 commits into
masterfrom
fixlib

Conversation

@yuit
Copy link
Copy Markdown
Contributor

@yuit yuit commented May 3, 2016

Fix #8407 and move iterable and symbol into correct file

Comment thread src/lib/es2015.symbol.wellknown.d.ts Outdated
}

interface Set<T> {
[Symbol.iterator]():IterableIterator<T>;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should not this be in iterable.d.ts?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put it here as it uses Symbol.iterator. Though same argument can go with the return type

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think iterator is different, and should be in iterables and not in the wellknwon symbols.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious why they are different?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iterable definition depends on Symbol.Iterator. it is rather meaningless to have iterables and not the definition of Symbol.Iterator.

the other ones are self contained, you can chose to use them or not.

@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented May 4, 2016

one comment about empty interface declaration, other than that, looks good.

@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented May 5, 2016

👍

@yuit yuit merged commit 673fa41 into master May 5, 2016
@yuit yuit deleted the fixlib branch May 7, 2016 16:13
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
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