-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug
Description
TypeScript Version: 2.9.0-dev.20180421 and 2.8.1
Search Terms: Object.defineProperty Symbol
Code
Object.defineProperty(
Array.prototype,
Symbol.iterator,
Object.getOwnPropertyDescriptor(Array.prototype, "values"),
)
Expected behavior:
No compile errors.
Actual behavior:
error TS2345: Argument of type 'symbol' is not assignable to parameter of type 'string'.
Symbol.iterator,
~~~~~~~~~~~~~~~
I'm not sure why it is. PropertyKey
looks to include symbol
type.
Playground Link:
Related Issues:
Metadata
Metadata
Assignees
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug