• Disables all methods on an adapter except for the given list, replacing them with 404 not found. Throws NBError if the handler does not exist. This method is immutable.

    Type Parameters

    Parameters

    • adapter: A
    • enabledMethodNames: {
          [Key in string | number | symbol]-?: A[Key] extends HandlerAndValidators<Record<string, Predicate>>
              ? Key
              : never
      }[keyof A][]

    Returns A

    • modified adapter

Generated using TypeDoc