CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
index.d.ts62 linesDownload Raw Back to ignore
1type Pathname = string2 3interface TestResult {4  ignored: boolean5  unignored: boolean6}7 8export interface Ignore {9  /**10   * Adds one or several rules to the current manager.11   * @param  {string[]} patterns12   * @returns IgnoreBase13   */14  add(patterns: string | Ignore | readonly (string | Ignore)[]): this15 16  /**17   * Filters the given array of pathnames, and returns the filtered array.18   * NOTICE that each path here should be a relative path to the root of your repository.19   * @param paths the array of paths to be filtered.20   * @returns The filtered array of paths21   */22  filter(pathnames: readonly Pathname[]): Pathname[]23 24  /**25   * Creates a filter function which could filter26   * an array of paths with Array.prototype.filter.27   */28  createFilter(): (pathname: Pathname) => boolean29 30  /**31   * Returns Boolean whether pathname should be ignored.32   * @param  {string} pathname a path to check33   * @returns boolean34   */35  ignores(pathname: Pathname): boolean36 37  /**38   * Returns whether pathname should be ignored or unignored39   * @param  {string} pathname a path to check40   * @returns TestResult41   */42  test(pathname: Pathname): TestResult43}44 45export interface Options {46  ignorecase?: boolean47  // For compatibility48  ignoreCase?: boolean49  allowRelativePaths?: boolean50}51 52/**53 * Creates new ignore manager.54 */55declare function ignore(options?: Options): Ignore56 57declare namespace ignore {58  export function isPathValid (pathname: string): boolean59}60 61export default ignore62 
basant307/AI_Governance_Project · CoolFace