utils.d.ts 946 B

123456789101112131415161718192021222324252627
  1. import { StreamEvent } from "../tracers/event_stream.js";
  2. import type { RunnableInterface } from "./types.js";
  3. export declare function isRunnableInterface(thing: any): thing is RunnableInterface;
  4. /**
  5. * Utility to filter the root event in the streamEvents implementation.
  6. * This is simply binding the arguments to the namespace to make save on
  7. * a bit of typing in the streamEvents implementation.
  8. *
  9. * TODO: Refactor and remove.
  10. */
  11. export declare class _RootEventFilter {
  12. includeNames?: string[];
  13. includeTypes?: string[];
  14. includeTags?: string[];
  15. excludeNames?: string[];
  16. excludeTypes?: string[];
  17. excludeTags?: string[];
  18. constructor(fields: {
  19. includeNames?: string[];
  20. includeTypes?: string[];
  21. includeTags?: string[];
  22. excludeNames?: string[];
  23. excludeTypes?: string[];
  24. excludeTags?: string[];
  25. });
  26. includeEvent(event: StreamEvent, rootType: string): boolean;
  27. }