utils.d.ts 1.3 KB

1234567891011121314151617181920212223242526
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
  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. */
  8. declare type GetPath = {
  9. hasEndProp?: boolean;
  10. lastTraversedObject: unknown;
  11. traversedPath: Array<string>;
  12. value?: unknown;
  13. };
  14. export declare const hasOwnProperty: (object: object, key: string) => boolean;
  15. export declare const getPath: (object: Record<string, any>, propertyPath: string | string[]) => GetPath;
  16. export declare const getObjectSubset: (object: any, subset: any, seenReferences?: WeakMap<object, boolean>) => any;
  17. export declare const iterableEquality: (a: any, b: any, aStack?: any[], bStack?: any[]) => boolean | undefined;
  18. export declare const subsetEquality: (object: any, subset: any) => boolean | undefined;
  19. export declare const typeEquality: (a: any, b: any) => false | undefined;
  20. export declare const sparseArrayEquality: (a: unknown, b: unknown) => boolean | undefined;
  21. export declare const partition: <T>(items: T[], predicate: (arg: T) => boolean) => [T[], T[]];
  22. export declare const isError: (value: unknown) => boolean;
  23. export declare function emptyObject(obj: any): boolean;
  24. export declare const isOneline: (expected: any, received: any) => boolean;
  25. export {};
  26. //# sourceMappingURL=utils.d.ts.map