You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The credentialsComponent should be valid and have all properties of the stepComponent, instead it fails with
[ts]
Argument of type '{ __proto__: { bindings: { hasNextStep: string; hasPreviousStep: string; onNextStep: string; onPr...' is not assignable to parameter of type 'IComponentOptions'.
Object literal may only specify known properties, and '__proto__' does not exist in type 'IComponentOptions'.
Also ran into this tonight while making custom error subclasses for Node. Was expecting TypeScript to ignore anything relating to .__proto__ or at least have a mechanism for avoiding it.
Same here. I just ran into this using the following loop structure:
for (let i in qList) { qList[i].prop1.trim(); qList[i].prop2.trim(); }
It is a simple array of objects. The job of the loop is to iterate over all the objects and trim two of it's string properties. The documentation for typescript talks about iterating over the indexes of the array. The problem is after it's done doing that, the value of i changes from an index to 'contains' which is method on
__proto__
This is completely broke our application when we upgraded typescript to 2.9.2. It worked great on 1.8.
Activity
felixfbecker commentedon Feb 10, 2017
This is extremely annoying. Consider this
The credentialsComponent should be valid and have all properties of the stepComponent, instead it fails with
jolexxa commentedon Mar 6, 2019
Also ran into this tonight while making custom error subclasses for Node. Was expecting TypeScript to ignore anything relating to
.__proto__or at least have a mechanism for avoiding it.Credits:
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#support-for-newtarget
https://stackoverflow.com/a/48342359
exedor commentedon May 31, 2020
Same here. I just ran into this using the following loop structure:
for (let i in qList) { qList[i].prop1.trim(); qList[i].prop2.trim(); }It is a simple array of objects. The job of the loop is to iterate over all the objects and trim two of it's string properties. The documentation for typescript talks about iterating over the indexes of the array. The problem is after it's done doing that, the value of i changes from an index to 'contains' which is method on
__proto__This is completely broke our application when we upgraded typescript to 2.9.2. It worked great on 1.8.
mike-marcacci commentedon Oct 20, 2021
Just as a note, a full solution for this is described in this RFC: #38385.