Typescript
Error: Constructor implementation is missing.ts(2390)
Fehlermeldung
(alias) class Article
import Article
Constructor
implementation is missing.ts(2390)
A
parameter property is only allowed in a constructor implementation.ts(2369)
|
In Fehlerhafter
Code
export class ArticlesService {
constructor(
@Inject('xx')
private articleRepository:
Repository<Article>
)
|
Lösung:
Man muss die geschweiften {} Klammern ergänzen
export class ArticlesService {
constructor(
@Inject('xx')
private articleRepository: Repository<Article>
){}
|