Here are my compiler options:
"angularCompilerOptions": {
"enableIvy": true,
"strictTemplates": true,
"strictInputTypes": true,
"strictOutputEventTypes": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
The output looks like:
//I made sure to check EventEmitter was imported from '@angular/core'
@Output()
filterSubmitted = new EventEmitter<DashboardViewModel>();
When I hover in VS Code I see
Although I realize this is the VS Code service rather than the compiler. However, when I build make sure that the EventEmitter submits a different type than the function "filterSubmitted" accepts, I also do not get any compiler warnings/errors.
How can I fix this?
I'm using Typescript 4.1.5 and "@angular/compiler-cli": "^11.0.0", "@angular/compiler": "^11.0.0"
Edit: My question is not answered by How to use Custom Event (not Event Emitter) without `strictTemplates` to complain about `$event` not being a Custom Event type? because unless I'm missing something that answer is recommending casting the event to "any." My event seems to already be types as "any" and I want it to be typed correctly as the generic type of the "EventEmitter<>"