feat(ivy): throw compilation error when providing undecorated classes (#34460)

Adds a compilation error if the consumer tries to pass in an undecorated class into the `providers` of an `NgModule`, or the `providers`/`viewProviders` arrays of a `Directive`/`Component`.

PR Close #34460
This commit is contained in:
crisbeto
2019-12-11 17:59:05 +01:00
committed by Kara Erickson
parent 6057c7a373
commit dcc8ff4ce7
20 changed files with 613 additions and 60 deletions

View File

@ -363,7 +363,7 @@ export class TraitCompiler {
}
}
if (result.diagnostics !== undefined) {
if (result.diagnostics !== undefined && result.diagnostics.length > 0) {
trait = trait.toErrored(result.diagnostics);
} else {
if (result.data !== undefined) {