Skip to content

Conversation

@ahejlsberg
Copy link
Member

@ahejlsberg ahejlsberg commented Nov 19, 2016

This PR implements the following minor changes:

  • Make a keyof T comparable to type string and type number.
  • Treat a keyof T as string | number when it is used to index a non-generic type.
  • Allow the object in a for-in statement or in operator to be of an indexed access type.

Treat keyof T as string | number for purposes of indexing
Allow indexed access types with for-in and in operator
@ahejlsberg ahejlsberg merged commit 998246a into master Nov 20, 2016
@ahejlsberg ahejlsberg deleted the keyofRelations branch November 20, 2016 23:54
@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.

4 participants