@samatawy/rules
    Preparing search index...

    Class TypeRegistry

    TypeRegistry is responsible for storing and managing type definitions within the working context. It allows adding, retrieving, and checking for the existence of type definitions. This registry is used during rule evaluation to resolve type references and validate their usage against defined type structures.

    Index

    Constructors

    Properties

    options: Partial<WorkspaceOptions>

    Methods

    • Check whether a root type is identified by the given key.

      Parameters

      • key: string

        the key to look for. If a nested key is given only the first token is considered.

      Returns boolean

      true if a root type exists for the given key, otherwise false.

    • Get the root type identified by the given key.

      Parameters

      • key: string

        the key to look for. If a nested key is given only the first token is considered.

      Returns RootType | undefined

      the root type identified by the given key, or undefined if no type is found.

    • Check if the type checker knows the type of the given key. Nested keys can be checked using dot notation (e.g., "user.name").

      Parameters

      • key: string

        the key to check.

      Returns boolean

      true if the type is known, false otherwise.