问题
Is it possible to setup Intellij to display TypeScript errors in Angular template? I have the following dummy app shared on stackblitz. If I create a @Input
with optional object parameters and use it in the template, I've got an error in console, but Intellij is ok with that. No error whatsoever. Note, I have strict mode on:
tsconfig.json
"angularCompilerOptions": {
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
data.ts
export interface Data {
id?: number;
title?: string;
}
data.component.ts
@Component({
selector: 'app-data',
templateUrl: './data.component.html',
})
export class DataComponent {
@Input()
public data?: Data;
}
data.component.html
<p>{{data.title}}</p>
terminal output
template open in Intellij
回答1:
No way to do this currently, please vote for WEB-49062 to be notified on any progress with this feature
来源:https://stackoverflow.com/questions/65615321/display-typescript-error-in-html-in-intellij-webstorm