angular/packages/compiler-cli
Kristiyan Kostadinov 527bd778a7 fix(compiler-cli): infer type of event target for void elements (#62648)
Currently we infer the target of DOM events to be `EventTarget | null` which is consistent with the built-in types for `addEventListener`. This is due to the fact that users can dispatch custom events, or the event might've bubbled. However, this typing is also inconvenient for some other common use cases like `<input (input)="query($event.target.value)">`, because we don't have the ability to type cast in a template.

These changes aim to make some of the cases simpler by inferring the type of `$event.target` if the event is bound on a void element which guarantees that it couldn't have bubbled.

PR Close #62648
2025-07-16 12:40:25 +02:00
..
linker build: migrate esbuild usages to aspect_rules_esbuild esbuild rule (#62529) 2025-07-09 12:41:27 -07:00
private build: migrate esbuild usages to aspect_rules_esbuild esbuild rule (#62529) 2025-07-09 12:41:27 -07:00
src fix(compiler-cli): infer type of event target for void elements (#62648) 2025-07-16 12:40:25 +02:00
test fix(compiler-cli): infer type of event target for void elements (#62648) 2025-07-16 12:40:25 +02:00
BUILD.bazel build: migrate esbuild usages to aspect_rules_esbuild esbuild rule (#62529) 2025-07-09 12:41:27 -07:00
esbuild.config.js build: use esbuild from aspect rules (#62568) 2025-07-10 13:45:15 -07:00
index.ts refactor(compiler-cli): export type used by migrations (#61697) 2025-05-30 09:50:58 -04:00
package.json feat(core): support TypeScript 5.9 (#62541) 2025-07-14 14:04:58 -07:00
tsconfig-test.json build: prepare for compiler-cli to be using ts_project (#61181) 2025-05-09 15:59:46 +00:00
tsconfig.json build: prepare for compiler-cli to be using ts_project (#61181) 2025-05-09 15:59:46 +00:00