Repository navigation
Commit 2b04ec5
fix(directive): reject
`@Input() value = input(0)` compiled as a plain input with no error; ngtsc
reports "Using @input with a signal input is not allowed." oxc only looked at
the initializer of a member also listed in `inputs:` (for a different error),
and had no such check. The same went for `@Input` on `model()`, and `@Output`
on `output()`, `outputFromObservable()` or `model()`.
Each is now reported on the decorator with ngtsc's message, in its order: an
input's check comes before its `@Input` arguments are read, an output's after
its `@Output` arguments. The call counts only when it's Angular's API by its
import (any alias, a namespace, `.required`), so a local or foreign `input()`
is left alone. The compiled output is unchanged, as for other errors.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>@Input / @Output on signal inputs, models and outputs like ngtsc1 parent 71769d8 commit 2b04ec5
3 files changed
Lines changed: 560 additions & 5 deletions
File tree
- crates/oxc_angular_compiler
- src/directive
- tests
- fixtures
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1055 | 1055 | | |
1056 | 1056 | | |
1057 | 1057 | | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
1058 | 1072 | | |
1059 | 1073 | | |
1060 | 1074 | | |
| |||
1075 | 1089 | | |
1076 | 1090 | | |
1077 | 1091 | | |
1078 | | - | |
1079 | | - | |
1080 | | - | |
1081 | | - | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
1082 | 1096 | | |
1083 | 1097 | | |
1084 | 1098 | | |
1085 | 1099 | | |
1086 | 1100 | | |
1087 | 1101 | | |
1088 | 1102 | | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
1089 | 1118 | | |
1090 | 1119 | | |
1091 | 1120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| |||
0 commit comments