@samatawy/rules
    Preparing search index...

    Function getDefinedType

    • Get the defined type for a given key in a type definition, supporting nested keys using dot notation (e.g., "person.name.first"). TODO: Support arrays in the path (e.g., "person.children.name").

      Parameters

      • type: any

        the type definition to check.

      • Optionalkey: string

        the key to get the type for, which can be a simple key or a nested key using dot notation.

      • Optionalarray_path: boolean

        a flag indicating if the current path is within an array.

      Returns AtomicType | ArrayType | ObjectArrayType | ComplexType | undefined

      the type associated with the key, or undefined if the key is not found.