智慧水务管理系统 - 精河县供水工程综合管理平台

1234567891011121314151617181920212223242526272829303132333435
  1. export declare const hasOwnProperty: (v: PropertyKey) => boolean;
  2. /**
  3. * Simpler helper method to check for a boolean type simply for the benefit of
  4. * gaining better compression when minified by not needing to have multiple
  5. * `typeof` comparisons in the codebase.
  6. */
  7. export declare function isBoolean(value: unknown): value is boolean;
  8. /**
  9. * Truncates the `str` at `len - ellipsisChars.length`, and adds the `ellipsisChars` to the
  10. * end of the string (by default, two periods: '..'). If the `str` length does not exceed
  11. * `len`, the string will be returned unchanged.
  12. *
  13. * @param {String} str The string to truncate and add an ellipsis to.
  14. * @param {Number} truncateLen The length to truncate the string at.
  15. * @param {String} [ellipsisChars=...] The ellipsis character(s) to add to the end of `str`
  16. * when truncated. Defaults to '...'
  17. */
  18. export declare function ellipsis(str: string, truncateLen: number, ellipsisChars?: string): string;
  19. /**
  20. * Removes array elements based on a filtering function. Mutates the input
  21. * array.
  22. *
  23. * Using this instead of the ES5 Array.prototype.filter() function to prevent
  24. * creating many new arrays in memory for filtering.
  25. *
  26. * @param arr The array to remove elements from. This array is mutated.
  27. * @param fn The predicate function which should return `true` to remove an
  28. * element.
  29. */
  30. export declare function removeWithPredicate<T>(arr: T[], fn: (item: T) => boolean): void;
  31. /**
  32. * Function that should never be called but is used to check that every
  33. * enum value is handled using TypeScript's 'never' type.
  34. */
  35. export declare function assertNever(theValue: never): never;