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
I'm using rehearsal fix in a piecemeal manner on some components and sometimes it causes large number of ArrayLike imports to be added to the top of the file (even though the ArrayLike import is not even referenced in the final code).
Input file:
importtypeChartControlsfrom"@futureproofretail/analytics/services/chart-controls";importComponentfrom"@ember/component";import{readOnly}from"@ember/object/computed";import{injectasservice}from"@ember/service";importclassicfrom"ember-classic-decorator";
@classicexportdefaultclassAddMetricextendsComponent{
@servicedeclarechartControls: ChartControls;// @ts-expect-error @rehearsal TODO TS7008: Member 'metrics' implicitly has an 'any' type.
@readOnly("chartControls.metrics")metrics;}
Output:
importtypeChartControlsfrom"@futureproofretail/analytics/services/chart-controls";importComponentfrom"@ember/component";import{readOnly}from"@ember/object/computed";import{injectasservice}from"@ember/service";importclassicfrom"ember-classic-decorator";// @ts-expect-error @rehearsal TODO TS6133: The declaration 'ArrayLike' is never read or used. Remove the declaration or use it.import{ArrayLike}from"node_modules/@glint/environment-ember-loose/-private/intrinsics/each";// @ts-expect-error @rehearsal TODO TS2300: Duplicate identifier 'ArrayLike'.import{ArrayLike}from"node_modules/@glint/environment-ember-loose/-private/intrinsics/each";// @ts-expect-error @rehearsal TODO TS2300: Duplicate identifier 'ArrayLike'.import{ArrayLike}from"node_modules/@glint/environment-ember-loose/-private/intrinsics/each";// @ts-expect-error @rehearsal TODO TS2300: Duplicate identifier 'ArrayLike'.import{ArrayLike}from"node_modules/@glint/environment-ember-loose/-private/intrinsics/each";// @ts-expect-error @rehearsal TODO TS2300: Duplicate identifier 'ArrayLike'.import{ArrayLike}from"node_modules/@glint/environment-ember-loose/-private/intrinsics/each";// @ts-expect-error @rehearsal TODO TS2300: Duplicate identifier 'ArrayLike'.import{ArrayLike}from"node_modules/@glint/environment-ember-loose/-private/intrinsics/each";// @ts-expect-error @rehearsal TODO TS2300: Duplicate identifier 'ArrayLike'.import{ArrayLike}from"node_modules/@glint/environment-ember-loose/-private/intrinsics/each";// @ts-expect-error @rehearsal TODO TS2300: Duplicate identifier 'ArrayLike'.import{ArrayLike}from"node_modules/@glint/environment-ember-loose/-private/intrinsics/each";// @ts-expect-error @rehearsal TODO TS2300: Duplicate identifier 'ArrayLike'.import{ArrayLike}from"node_modules/@glint/environment-ember-loose/-private/intrinsics/each";// @ts-expect-error @rehearsal TODO TS2300: Duplicate identifier 'ArrayLike'.import{ArrayLike}from"node_modules/@glint/environment-ember-loose/-private/intrinsics/each";
@classicexportdefaultclassAddMetricextendsComponent{
@servicedeclarechartControls: ChartControls;// @ts-expect-error @rehearsal TODO TS7008: Member 'metrics' implicitly has an 'any' type.
@readOnly("chartControls.metrics")metrics;}
I found that if I comment out the @readOnly() (FYI I'm also trying to get rid of all the readOnly's in our app), the ArrayLike's don't get created.
It's not a big deal, it doesn't happen on every file, but it typically means when running rehearsal fix that I have to manually remove all these imports.
The text was updated successfully, but these errors were encountered:
I'm using
rehearsal fix
in a piecemeal manner on some components and sometimes it causes large number ofArrayLike
imports to be added to the top of the file (even though the ArrayLike import is not even referenced in the final code).Input file:
Output:
I found that if I comment out the
@readOnly()
(FYI I'm also trying to get rid of all the readOnly's in our app), the ArrayLike's don't get created.It's not a big deal, it doesn't happen on every file, but it typically means when running
rehearsal fix
that I have to manually remove all these imports.The text was updated successfully, but these errors were encountered: