Skip to content

Conversation

@ahejlsberg
Copy link
Member

@ahejlsbergahejlsberg 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
@ahejlsbergahejlsberg merged commit 998246a into masterNov 20, 2016
@ahejlsbergahejlsberg deleted the keyofRelations branch November 20, 2016 23:54
@microsoftmicrosoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for freeto 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

@ahejlsberg@mhegazy@msftclas