-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Description
Versions
Angular CLI: 6.0.0
Node: 9.11.1
OS: darwin x64
Angular: 6.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.6.0
@angular-devkit/build-angular 0.6.0
@angular-devkit/build-optimizer 0.6.0
@angular-devkit/core 0.6.0
@angular-devkit/schematics 0.6.0
@ngtools/webpack 6.0.0
@schematics/angular 0.6.0
@schematics/update 0.6.0
rxjs 6.1.0
typescript 2.7.2
webpack 4.6.0
Repro steps
- Step 1
ng new myproject using the latest angular-cli
- Step 2
Make a type error in app.component.ts like
export class AppComponent {
title: NotAType = 'app';
}Observed behavior
The type error appears in an IDE with Typescript support.
ng lintdoes not show the type errorng lint --type-checkas mentioned in other issues I found results in an error:Architect commands with multiple targets cannot specify overrides. [...]ng lint myproject --type-checkto appease the Architect error still does not show the type errortslint --type-check --project .shows the type error but mentions a deprecation warning. More info.tsc --noEmitshows the type error
Desired behavior
I expected ng lint to show type errors. As a new user to Angular it seems to be the one and only interface from the command line intended to answer "is there anything syntactically wrong with my project?". Not including type errors was surprising, and with no clear way to show type errors, led to frustration.
Mention any other details that might be useful (optional)
The Architect error wasn't particularly helpful when I ran ng lint --type-check. For one, I didn't know what Architect was, and the error could have offered an alternative command, e.g. ng lint myproject [args].
Metadata
Metadata
Assignees
Labels
No labels
