Visitar URL original
Language service CopySourceToTcb generates duplicate i0 imports, causing false signal-input errors in generic components · Issue #71547 · angular/angular · GitHub
The Wayback Machine - https://web.archive.org/web/20261024035351/https://github.com/angular/angular/issues/71547
Skip to content

Language service CopySourceToTcb generates duplicate i0 imports, causing false signal-input errors in generic components #71547

Open

Description

@VictorHumanist

Is this a bug report or a feature request?

  • Bug Report
  • Feature Request

Please provide the steps to reproduce the issue [Bug Report only]

  1. Clone https://github.com/VictorHumanist/CopySourceToTcbBug
  2. Run npm install.
  3. Run npm run build; the Angular CLI build succeeds.
  4. Open this folder by itself in VS Code with Angular Language Service 22.2.0 enabled.
  5. Open src/app/copy-source-to-tcb-repro.component.html.
  6. Observe false ngtsc(2339) and ngtsc(7053) errors on the signal-input bindings. If errors don't show up immediately, edit the file, e.g. add empty line.
  7. Put the cursor in busy() and run Angular: View Template Typecheck Block.
    The generated TCB copies the generic component source and produces colliding namespace imports similar to:
import * as i0 from '@fundamental-ngx/ui5-webcomponents/utils'
// ...
import * as i0 from '@angular/core';

The first import is needed for the GenericControlValueAccessor host directive on MultiComboBox. The second is the preparation import for signal-input checking. As a result, i0.ɵINPUT_SIGNAL_BRAND_WRITE_TYPE can be resolved against the Fundamental NGX utility module instead of @angular/core.

The trigger consists of:

  • a generic component with a non-exported generic constraint, forcing copied-source inline type checking;
  • an external component with a host directive, forcing a generated external import; and
  • transformed signal inputs, forcing the Angular-core signal write-brand import.

There is also a second defect: imports inserted at position zero are concatenated without separators:

import * as i0 from '@fundamental-ngx/ui5-webcomponents/utils'import { Component, input, ɵINPUT_SIGNAL_BRAND_WRITE_TYPE } from "@angular/core";

Please provide the expected behavior vs the actual behavior you encountered [Bug Report only]

Expected behavior: no errors should be visible
Actual behavior: false ngtsc(2339) and ngtsc(7053) errors on the signal-input bindings

Please provide a screenshot if possible [Bug Report only]

Image

Please provide the exception or error you saw [Bug Report only]

Element implicitly has an 'any' type because expression of type 'any' can't be used to index type 'InputSignalWithTransform<boolean, unknown>'.ngtsc(7053)
copy-source-to-tcb-repro.component.ngtypecheck.ts(13, 18): Error occurs in the template of component CopySourceToTcbReproComponent.
Property 'ɵINPUT_SIGNAL_BRAND_WRITE_TYPE' does not exist on type 'typeof import("c:/Users/Admin/source/repos/CopySourceToTcbBug/node_modules/@fundamental-ngx/ui5-webcomponents/types/fundamental-ngx-ui5-webcomponents-utils")'.ngtsc(2339)
copy-source-to-tcb-repro.component.ngtypecheck.ts(13, 18): Error occurs in the template of component CopySourceToTcbReproComponent.
Element implicitly has an 'any' type because expression of type 'any' can't be used to index type 'InputSignalWithTransform<boolean, unknown>'.ngtsc(7053)
copy-source-to-tcb-repro.component.ngtypecheck.ngtypecheck.ts(13, 18): Error occurs in the template of component CopySourceToTcbReproComponent.
Property 'ɵINPUT_SIGNAL_BRAND_WRITE_TYPE' does not exist on type 'typeof import("c:/Users/Admin/source/repos/CopySourceToTcbBug/node_modules/@fundamental-ngx/ui5-webcomponents/types/fundamental-ngx-ui5-webcomponents-utils")'.ngtsc(2339)
copy-source-to-tcb-repro.component.ngtypecheck.ngtypecheck.ts(13, 18): Error occurs in the template of component CopySourceToTcbReproComponent.
Element implicitly has an 'any' type because expression of type 'any' can't be used to index type 'InputSignalWithTransform<boolean, unknown>'.ngtsc(7053)
copy-source-to-tcb-repro.component.ngtypecheck.ngtypecheck.ts(13, 18): Error occurs in the template of component CopySourceToTcbReproComponent.
Property 'ɵINPUT_SIGNAL_BRAND_WRITE_TYPE' does not exist on type 'typeof import("c:/Users/Admin/source/repos/CopySourceToTcbBug/node_modules/@fundamental-ngx/ui5-webcomponents/types/fundamental-ngx-ui5-webcomponents-utils")'.ngtsc(2339)
copy-source-to-tcb-repro.component.ngtypecheck.ngtypecheck.ts(13, 18): Error occurs in the template of component CopySourceToTcbReproComponent.
Element implicitly has an 'any' type because expression of type 'any' can't be used to index type 'InputSignalWithTransform<boolean, unknown>'.ngtsc(7053)
copy-source-to-tcb-repro.component.ngtypecheck.ngtypecheck.ts(13, 18): Error occurs in the template of component CopySourceToTcbReproComponent.
Property 'ɵINPUT_SIGNAL_BRAND_WRITE_TYPE' does not exist on type 'typeof import("c:/Users/Admin/source/repos/CopySourceToTcbBug/node_modules/@fundamental-ngx/ui5-webcomponents/types/fundamental-ngx-ui5-webcomponents-utils")'.ngtsc(2339)
copy-source-to-tcb-repro.component.ngtypecheck.ngtypecheck.ts(13, 18): Error occurs in the template of component CopySourceToTcbReproComponent.

Description [Feature Request only]

No response

Proposed solution [Feature Request only]

No response

Alternatives considered [Feature Request only]

No response

Activity

  1. added this to the needsTriage milestone on Oct 22, 2026
  2. added this to the needsTriage milestone on Oct 22, 2026
  3. added
    P5The team acknowledges the request but does not plan to address it, it remains open for discussion
    on Oct 22, 2026
  4. modified the milestones: needsTriage, Backlog on Oct 22, 2026
  5. added
    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
    P4A relatively minor issue that is not relevant to core functions
    and removed
    P5The team acknowledges the request but does not plan to address it, it remains open for discussion
    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
    on Oct 22, 2026
  6. added
    open for contributionsAn issue that is suitable for a community contributor (based on its complexity/scope).
    on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: language-serviceIssues related to Angular's VS Code language serviceopen for contributionsAn issue that is suitable for a community contributor (based on its complexity/scope).

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions