Closed marcj closed 4 years ago
No need for a repro, I see what's going on here! It's indeed a bug introduced in #34021.
To workaround the issue you could change the SimpleTableComponent
as follows:
export type IdInterface_Ng34837 = IdInterface;
export class SimpleTableComponent<T extends IdInterface_Ng34837 >
Introducing the local type alias prevents the type emitter from kicking in, avoiding the issue.
@JoostK wonderful, thanks!
To workaround the issue you could change the
SimpleTableComponent
as follows:export type IdInterface_Ng34837 = IdInterface; export class SimpleTableComponent<T extends IdInterface_Ng34837 >
Introducing the local type alias prevents the type emitter from kicking in, avoiding the issue.
This error happened for me for 9.0.0-rc.14 and adding local type alias fixed the issue
@surenrao The fix will be part of the next release, it just missed rc.14
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
π bug report
Is this a regression?
Yes, worked in non-ivy.
Description
When importing and using a third party file that contains only interfaces/types I get an error when building in production mode. In development mode everything works fine.
Debug assert: importing a Reference to non-declaration?
https://github.com/angular/angular/blob/0b1e34de405891229dab85a0606f3d6bc5efab83/packages/compiler-cli/src/ngtsc/imports/src/emitter.ts#L131
π¬ Minimal Reproduction
I still work on that. I have it in a rather big code base, so this might take some time.
π₯ Exception or Error
When I print all the arguments via
in that method I get:
As we can see the
IdInterface
is a interface only. This is used in following component like so:π Your Environment
Anything else relevant?