-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG][REGRESSION] TS4114
error introduced in v0.23.0
#273
Comments
TS4114
error introduced in v0.23.0
Hi Tomas, thanks for reporting this problem! As you have correctly deduced, this problem is directly related to the So for now, I recommend removing the Best, |
Ok, for now I can disable Anyway, another reason why I don't like the new Here is how it looked like before in And here is how it looks like now in Really ugly. |
The latter issue probably stems from me removing the names of the classes generated by the class aspects. Your IDE looks a bit different from mine, but could you please open the generated types and give the class in question a name? export function _UserAspect_<TBase extends new (...args: any[]) => object>(Base: TBase) {
return class /* add "User" in here */ extends Base { ... };
}
export class User extends _UserAspect(__.Entity) {} and let me know if adding the name back in prettifies the tooltip. |
Yes, it does fix the IDE tooltip. |
alright, that is good to know. I wanted to make the generated types a bit leaner and wasn't aware of the effect this would have. I will thus revert that particular change. Thanks for pointing it out. |
hi @daogrady error TS2416: Property 'ID' in type '(Anonymous class)' is not assignable to the same property in base type '_managedAspect<{ new (...args: any[]): _cuidAspect<TBase>.(Anonymous class); prototype: _cuidAspect<any>.(Anonymous class); readonly actions: Record<...>; } & TBase>.(Anonymous class) & _cuidAspect<...>.(Anonymous class) & object'.
Type 'number | undefined' is not assignable to type 'string | undefined'.
226 ID?: number;
~~ version |
@dragolea entity Entities: cuid, managed {
key ID: Integer;
}
|
@hakimio |
Is it a good tip? 🙂 |
yep, fixed the issue |
Hi @hakimio , I have prepared a fix that was originally meant to address a related problem. But when toying around with it, it looked like it could also be a fix for your issue. Would you mind trying it out to see if all your cases are addressed or it it needs additional work? Best, |
Hi @daogrady The issue is almost fixed. Now I'm only getting the errors for
|
🤔 that is actually bad news, as we don't want to override in this case, but add to the type. I will have to investigate a bit more on this. Thanks for the feedback! |
Hi @hakimio, I have extended the approach in the PR to handle the Best, |
Hi @daogrady While you have resolved the |
Hi Tomas, thanks for checking! I am a bit unclear on the situation. The current state in the PR I linked should generate the Best, |
Ah, I see the problem. That's what you get from code duplication. Should be fixed. 🙂 |
Seems to be working well now 🙂 |
@daogrady the issue has been reintroduced in
|
Hi Tomas, thanks for pointing this out. This will actually be a bit more complicated to fix as this introduces two diametral requirements. I will look into it, but it could take a while. Best, |
Is there an existing issue for this?
Nature of Your Project
TypeScript
Current Behavior
Transpiling code produced by
v0.23.0
ofcds-typer
produces error:Expected Behavior
No errors.
Steps To Reproduce
Environment
Repository Containing a Minimal Reproducible Example
No response
Anything else?
noImplicitOverride
tsconfig
config is set totrue
.The text was updated successfully, but these errors were encountered: