GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||
GeezerVison is showing github.com — Fix Get/Set being enumerable by pathurs · Pull Request #32264 · microsoft/TypeScript Conversation
|
|
Note: I just followed the normal convention of setting Sheetal Nandi (@sheetalkamat) Let me know what you think, seeing as you have already approved these changes. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Nathan Shively-Sanders (@sandersn) let's bundle this in with the rest of the class field changes when we document what's happening Patrick Stanford (@pathurs) can you fix the merge conflicts please? Sorry for the delay in getting this in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I missed this in 3.7 when I was adding ES-compliant class field emit. However, I think it's better to put it into 3.9 now than to wait any longer. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Nathan Shively-Sanders (@sandersn) Thanks for merging from master, I don't know how I missed the notifications on this |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Travis fails because it still thinks that we're using submodules for the user tests. Not sure why. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for your patience on this Patrick Stanford (@pathurs) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Does this affect the types for keyof T when T has getters? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
No, this affects emit, not the type system. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This is a significant breaking change in our case. The UI library we use (Telerik's Kendo) uses property enumerability to convert "plain" objects to the Observable variant it uses within its UI classes. With this change, property definitions are excluded from the conversion and the associated properties are no longer present on objects retrieved from Kendo's containers. I support standards, of course, but it would be nice if there was an option to keep the old behavior. I'd be surprised if the new behavior is as innocuous as its low profile in the changelog seems to suggest. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I agree with benpetermorris. This has a massive implication for library using TS |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
We have been struggling with this breaking change aswell as we were relying on being able to enumerate over getters. function Enumerable( target: unknown, propertyKey: string, descriptor: PropertyDescriptor ) { descriptor.enumerable = true; }; class Testi { @Enumerable get prop(): string { return 'moin'; } } I guess this is a bit hacky, but the cleanest solution we could come up with. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This CR updates Typescript to version 4.0.3, @types/node to version 14.11.8, ts-node to version 9.0.0 Also, because of changes in Typescript 3.9.0 (microsoft/TypeScript#32264) the testing becoming failing. The testing (sinon) library uses for stubbing dependencies the enumerable properties of objects. We do not able to use that way if we need to stub some dependency in tests with Typescript 3.9+ versions. The right way is about refactoring code (adding dependency injection, for example), but it's a huge task. Fo resolving that problem, we use the 'tslib 1.13.0' helper module and compile for testing the code with included helpers from that lib. It's at least a working solution until a better way is found. Resolves: OLPEDGE-2315 Signed-off-by: Oleksii Zubko <[email protected]>
This CR updates Typescript to version 4.0.3, @types/node to version 14.11.8, ts-node to version 9.0.0 Also, because of changes in Typescript 3.9.0 (microsoft/TypeScript#32264) the testing becoming failing. The testing (sinon) library uses for stubbing dependencies the enumerable properties of objects. We do not able to use that way if we need to stub some dependency in tests with Typescript 3.9+ versions. The right way is about refactoring code (adding dependency injection, for example), but it's a huge task. Fo resolving that problem, we use the 'tslib 1.13.0' helper module and compile for testing the code with included helpers from that lib. It's at least a working solution until a better way is found. Resolves: OLPEDGE-2315 Signed-off-by: Oleksii Zubko <[email protected]>
This CR updates Typescript to version 4.0.3, @types/node to version 14.11.8, ts-node to version 9.0.0 Also, because of changes in Typescript 3.9.0 (microsoft/TypeScript#32264) the testing becoming failing. The testing (sinon) library uses for stubbing dependencies the enumerable properties of objects. We do not able to use that way if we need to stub some dependency in tests with Typescript 3.9+ versions. The right way is about refactoring code (adding dependency injection, for example), but it's a huge task. Fo resolving that problem, we use the 'tslib 1.13.0' helper module and compile for testing the code with included helpers from that lib. It's at least a working solution until a better way is found. Resolves: OLPEDGE-2315 Signed-off-by: Oleksii Zubko <[email protected]>
Ref microsoft/TypeScript#32264 (comment) We need getters for the ActiveLayout classes to be enumerable so that we can copy them across in the polyfill functions.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Why are TS get/set definedProperties in a class transpiled as enumerable/writable?
There was an error while loading. Please reload this page.