Options
All
  • Public
  • Public/Protected
  • All
Menu

@thingbound/discovery

Index

Type aliases

Mapper

Mapper<I, O>: (service: I) => Promise<O | null> | O | null

Type parameters

  • I

  • O

Type declaration

    • (service: I): Promise<O | null> | O | null
    • Mapper function, maps from an input to an input either synchronously or asynchronously.

      Parameters

      • service: I

      Returns Promise<O | null> | O | null

ServicePredicate

ServicePredicate<S>: (service: S) => boolean

Type parameters

  • S

Type declaration

    • (service: S): boolean
    • Predicate used to filter a service. Return true to match a service and false to not match.

      Parameters

      • service: S

      Returns boolean

Functions

isAdvancedMapper

  • Function that can be used to check if something can be assumed to be an advanced mapper.

    Type parameters

    • I

    • O

    Parameters

    • o: any
      • object to check

    Returns o is AdvancedMapper<I, O>

    if o is AdvancedMapper

Generated using TypeDoc