ts-class
Ce que cela signifie#
A class of a module (the program extension) that is not the class of its body file (class Name … { … } in code "x.body.ts"): abstract on one and not the other, another extends or implements, a member of another kind (a field, a method, a getter, the constructor) or with other words (private, protected, readonly, abstract, ?), a field the model gives a type that has none written in the body's class (made: number = 0; an arrow field, the types of its parameters and result), a member of the body's class the model does not declare and that is not private, or a value or a ```ts body in the model when the body's class has the member too. The model owns the class's shape: write the member as the message gives it, or declare it.
Comment le corriger#
Le message dit ce qui ne va pas et où, et souvent ce qui était voulu (Did you mean …?). Modifiez le modèle pour que ce que décrit cette page ne soit plus vrai, puis vérifiez à nouveau : archec check main.arche.
Une erreur : archec ne construit rien tant qu’elle n’est pas corrigée.
archec check --beginner reformule les messages les plus courants en mots simples, avec les noms qui existent.
La correction automatique#
archec n’a pas de correction propre à ce code. Quand le message dit Did you mean …?, VS Code propose ce changement (Quick Fix).
Dans le terminal#
archec explain ts-class affiche cette explication ; archec explain program liste les codes de son domaine.