Unable to build when using `Input` transform + `static ngAcceptInputType_x`
JounQin opened this issue · comments
Type of Issue
[x] Bug Report
[ ] Feature Request
Description
import { booleanAttribute, Component, Input } from '@angular/core';
@Component({
template: ``
})
export class TestComponent {
@Input({ transform: booleanAttribute })
disabled: boolean;
static ngAcceptInputType_disabled: boolean | '';
}
src/module.ts:6:18 - error NG6001: The class 'TestComponent' is listed in the declarations of the NgModule 'TestModule', but is not a directive, a component, or a pipe. Either remove it from the NgModule's declarations, or add an appropriate Angular decorator.
How To Reproduce
main...JounQin:ng-packagr:chore/reproduction
Expected Behaviour
No error
Version Information
$ node_modules/.bin/ng-packagr --version
ng-packagr: 16.1.0
@angular/compiler: 16.1.7
rollup: 3.26.3
typescript: 5.1.6
Seems a Angular limitation:
Class cannot have both a transform function on Input disabled and a static member called ngAcceptInputType_disabled
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
This action has been performed automatically by a bot.