Skip to content

output-migration Removes types from output #59248

Closed

Description

@blogcraft

Which @angular/* package(s) are the source of the bug?

core

Is this a regression?

No

Description

When running a migration ng generate @angular/core:output-migration

My @outputs when migrating to output lose the type causing errors everywhere.

Image

Instead of turning this
@Output() EventMoveMovimientos: EventEmitter<resupuesta> = new EventEmitter();
into
readonly EventMoveMovimientos = output();

It should be into this
readonly EventMoveMovimientos = output<resupuesta>();

By the way the event emit is this:

this.EventMoveMovimientos.emit({
  idInstrumento: nemo.idNemotecnico,
  idCuenta: nemo.idCuenta,
});

And the interface is this:

export interface resupuesta {
  idInstrumento: number;
  idCuenta: number;
}

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

X [ERROR] TS2345: Argument of type '{ idInstrumento: any; idCuenta: any; }' is not assignable to parameter of type 'void'. [plugin angular-compiler]

    src/app/modules/shared-module/tabla-instrumento/forward/forward.component.ts:97:35:
      97 │     this.EventMoveMovimientos.emit({
         ╵                                    ^

Please provide the environment you discovered this bug in (run ng version)

_                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 19.0.6
Node: 20.13.1
Package Manager: npm 10.5.2
OS: win32 x64

Angular: 19.0.5
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1900.6
@angular-devkit/build-angular   19.0.6
@angular-devkit/core            19.0.6 (cli-only)
@angular-devkit/schematics      19.0.6
@angular/cdk                    19.0.4
@angular/cli                    19.0.6
@angular/flex-layout            15.0.0-beta.42
@angular/material               19.0.4
@schematics/angular             19.0.6
rxjs                            7.8.1
typescript                      5.5.3
zone.js                         0.15.0

Anything else?

No response

Activity

  1. added
    area: migrations
    on Dec 19, 2024
  2. added this to the needsTriage milestone on Dec 19, 2024
  3. aparzi commented on Mar 29, 2025

    @aparzi
    Contributor

    Hi @pkozlowski-opensource @JeanMeche,
    I opened a PR solve this bug.

  4. pkozlowski-opensource commented on Apr 2, 2025

    @pkozlowski-opensource
    Member

    This one just got fixed in #60626 - thnx @aparzi

  5. angular-automatic-lock-bot commented on May 3, 2025

    @angular-automatic-lock-bot

    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.

  6. locked and limited conversation to collaborators on May 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area: migrationscore: inputs / outputs

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions