Class UniqueClassValidation

Predefined validation to produce errors, if the same class is declared more than once. This is often relevant for nominally typed classes.

Implements

Constructors

Properties

foundDeclarations: Map<string, unknown[]> = ...
isRelevant: (languageNode: unknown) => boolean
services: TypirServices

Methods

  • Calculates a key for a class which encodes its unique properties, i.e. duplicate classes have the same key. This key is used to identify duplicated classes. Override this method to change the properties which make a class unique.

    Parameters

    Returns string

    a string key