Fix: Prettify when instantiated with classes containing private/protected members#450
Conversation
|
|
||
| function testAssignability() { | ||
| let assignabilityCheck1: <Type>(arg: Type) => arg is Prettify<Type>; | ||
| // let assignabilityCheck2: <Type>(arg: Prettify<Type>) => arg is Type; // This fails currently, but shouldn't ideally |
There was a problem hiding this comment.
This is something that doesn't work as expected, and it wasn't working even with our existing Extract hack, so it's not something introduced with this change. This needs fixing, but I guess for now we can move ahead without this.
There was a problem hiding this comment.
Is it worth uncommenting and adding ts-expect-error just to track the progress? in case it's fixed intentionally or by accident, we can remove ts-expect-error then? wdyt?
There was a problem hiding this comment.
Yup, that makes sense. Updated in 5541604.
|
Thanks @som-sm, I'll review it later today |
Beraliv
left a comment
There was a problem hiding this comment.
Thanks for raising this PR! Agreed that it is better than previous solution! Once agreed on https://github.com/ts-essentials/ts-essentials/pull/450/files#r2404546847, happy to get it merged
Prettify when instantiated with classes containing private/protected membersPrettify when instantiated with classes containing private/protected members
PR Checklist
Overview
This PR implements the changes mentioned in #439 (comment).