Display typescript error in html in Intellij/Webstorm

戏子无情 提交于 2021-01-29 05:08:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!