Skip to content

Conversation

@osdiab
Copy link

@osdiab osdiab commented Oct 9, 2020

Fixes #29786

@DanielRosenwasser 's suggested change to MapConstructor. I shot myself in the foot because of a sneaky implicit any from this!

@typescript-bot
Copy link
Collaborator

It looks like you've sent a pull request to update our 'lib' files. These files aren't meant to be edited by hand, as they consist of last-known good states of the compiler and are generated from 'src'. Unless this is necessary, consider closing the pull request and sending a separate PR to update 'src'.

@typescript-bot typescript-bot added lib update PR modifies files in the `lib` folder For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Oct 9, 2020
@osdiab
Copy link
Author

osdiab commented Oct 9, 2020

hmm looks like this is actually undoing what #28052 did before. looking into that to understand the context why its this way...

@osdiab
Copy link
Author

osdiab commented Oct 9, 2020

huh. So the goal was to have Map<string> be an error since applying defaults lets you skip the generics, which is also not desirable.

Guess that this is probably a no-go then. Any alternatives @DanielRosenwasser ? for now i guess i'll just deal with it on my project with a lint rule or something.

@andrewbranch
Copy link
Member

Good find @osdiab; yeah, we decided it’s best to leave it as is. Thanks!

@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug lib update PR modifies files in the `lib` folder

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use generic defaults for "empty" constructors of Array, Map, Set

4 participants