index.d.ts 986 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * Copyright (c) Meta Platforms, Inc. and affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. export declare type Callbacks = {
  8. foundSubsequence: FoundSubsequence;
  9. isCommon: IsCommon;
  10. };
  11. declare function diffSequence(
  12. aLength: number,
  13. bLength: number,
  14. isCommon: IsCommon,
  15. foundSubsequence: FoundSubsequence,
  16. ): void;
  17. export default diffSequence;
  18. declare type FoundSubsequence = (
  19. nCommon: number, // caller can assume: 0 < nCommon
  20. aCommon: number, // caller can assume: 0 <= aCommon && aCommon < aLength
  21. bCommon: number,
  22. ) => void;
  23. /**
  24. * Copyright (c) Meta Platforms, Inc. and affiliates.
  25. *
  26. * This source code is licensed under the MIT license found in the
  27. * LICENSE file in the root directory of this source tree.
  28. *
  29. */
  30. declare type IsCommon = (
  31. aIndex: number, // caller can assume: 0 <= aIndex && aIndex < aLength
  32. bIndex: number,
  33. ) => boolean;
  34. export {};