Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Query<QueryReturnType>

The return type returned by Compare.count and Compare.has.

This interface defines the return type when querying Compare objects for the number or existence of omittedProperties, extraProperties, sharedProperties, and alteredProperties. When querying for the count, this interface's properties are based on numbers, when querying for the has (the existence) this interface's properties are based on boolean values.

interface
author

Snap

Type parameters

  • QueryReturnType: number | boolean

    The type each query returns dependent on whether it's a query for the count or has (existence)

Hierarchy

  • Query

Index

Properties

Readonly alteredProperties

alteredProperties: () => QueryReturnType

Type declaration

    • (): QueryReturnType
    • Returns either a boolean indicating if there are any equivalent property keys in both the source object and target object it's being compared to that are mapped to differing values or the number of equivalent property keys in both the source object and target object that are mapped to differing values.

      Returns QueryReturnType

      Either a boolean indicating if there are any equivalent property keys in both the source and target object that are mapped to differing values or the number of equivalent property keys in both the source and target object that are mapped to differing values.

Readonly extraProperties

extraProperties: () => QueryReturnType

Type declaration

    • (): QueryReturnType
    • Returns either a boolean indicating if there are properties in the target object that aren't in the source object being compared to it or the number of properties the target object contains that the source object does not.

      Returns QueryReturnType

      Either a boolean indicating if there are properties in the target object that aren't in the source object or the number of properties the target object contains that the source object does not.

Readonly omittedProperties

omittedProperties: () => QueryReturnType

Type declaration

    • (): QueryReturnType
    • Returns either a boolean indicating if there are properties in the source object that aren't in the target object it's being compared to or the number of properties the source object contains that the target object does not.

      Returns QueryReturnType

      Either a boolean indicating if there are properties in the source object that aren't in the target object or the number of properties the source object contains that the target object does not.

Readonly sharedProperties

sharedProperties: () => QueryReturnType

Type declaration

    • (): QueryReturnType
    • Returns either a boolean indicating if there are equivalent properties in both the source object and target object it's being compared to or the number of equivalent properties both the source and target object contain.

      Returns QueryReturnType

      Either a boolean indicating if there are equivalent properties in both the source object and target or the number of equivalent properties in both the source and target objects.

Generated using TypeDoc