codedocu.de

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>

    )

 

Type&#115;cript Error: Constructor implementation is missing.ts(2390)

 

Lösung:

Man muss die geschweiften {} Klammern ergänzen

export class ArticlesService {

    constructor(

      @Inject('xx')

      private articleRepository: Repository<Article>

    ){}

 


Software Entwicklung Stuttgart Nürtingen
Suche Projekte C#, WPF, Windows App,ASP.Net, vb.Net, WinForms, SQL Server, Access, Excel