• Version 3.0.5
  • Published
  • 8.2 kB
  • No dependencies
  • MIT license


npm i @types/minimatch
yarn add @types/minimatch
pnpm add @types/minimatch


TypeScript definitions for Minimatch



variable Minimatch

let Minimatch: IMinimatchStatic;


    function filter

    filter: (
    pattern: string,
    options?: IOptions
    ) => (element: string, indexed: number, array: ReadonlyArray<string>) => boolean;
    • Returns a function that tests its supplied argument, suitable for use with Array.filter

    function M

    M: typeof M;
    • Tests a path against the pattern using the options.

    function makeRe

    makeRe: (pattern: string, options?: IOptions) => RegExp;
    • Make a regular expression object from the pattern.

    function match

    match: (
    list: ReadonlyArray<string>,
    pattern: string,
    options?: IOptions
    ) => string[];
    • Match against the list of files, in the style of fnmatch or glob. If nothing is matched, and options.nonull is set, then return a list containing the pattern itself.


    interface IMinimatch

    interface IMinimatch {}

      property comment

      comment: boolean;
      • True if the pattern is a comment.

      property empty

      empty: boolean;
      • True if the pattern is ""

      property negate

      negate: boolean;
      • True if the pattern is negated.

      property options

      options: IOptions;
      • The options supplied to the constructor.

      property pattern

      pattern: string;
      • The original pattern the minimatch object represents.

      property regexp

      regexp: RegExp;
      • A single regular expression expressing the entire pattern. Created by the makeRe method.

      property set

      set: any[][];
      • A 2-dimensional array of regexp or string expressions.

      method braceExpand

      braceExpand: (pattern: string, options: IOptions) => void;
      • @deprecated. For internal use.

      method debug

      debug: () => void;
      • @deprecated. For internal use.

      method make

      make: () => void;
      • @deprecated. For internal use.

      method makeRe

      makeRe: () => RegExp;
      • Generate the regexp member if necessary, and return it. Will return false if the pattern is invalid.

      method match

      match: (fname: string) => boolean;
      • Return true if the filename matches the pattern, or false otherwise.

      method matchOne

      matchOne: (files: string[], pattern: string[], partial: boolean) => boolean;
      • Take a /-split filename, and match it against a single row in the regExpSet. This method is mainly for internal use, but is exposed so that it can be used by a glob-walker that needs to avoid excessive filesystem calls.

      method parse

      parse: (pattern: string, isSub?: boolean) => void;
      • @deprecated. For internal use.

      method parseNegate

      parseNegate: () => void;
      • @deprecated. For internal use.

      interface IMinimatchStatic

      interface IMinimatchStatic {}

        property prototype

        prototype: IMinimatch;

          construct signature

          new (pattern: string, options?: IOptions): IMinimatch;

            interface IOptions

            interface IOptions {}

              property debug

              debug?: boolean | undefined;
              • Dump a ton of stuff to stderr.


              property dot

              dot?: boolean | undefined;
              • Allow patterns to match filenames starting with a period, even if the pattern does not explicitly have a period in that spot.


              property flipNegate

              flipNegate?: boolean | undefined;
              • Returns from negate expressions the same as if they were not negated. (Ie, true on a hit, false on a miss.)


              property matchBase

              matchBase?: boolean | undefined;
              • If set, then patterns without slashes will be matched against the basename of the path if it contains slashes.


              property nobrace

              nobrace?: boolean | undefined;
              • Do not expand {a,b} and {1..3} brace sets.


              property nocase

              nocase?: boolean | undefined;
              • Perform a case-insensitive match.


              property nocomment

              nocomment?: boolean | undefined;
              • Suppress the behavior of treating # at the start of a pattern as a comment.


              property noext

              noext?: boolean | undefined;
              • Disable "extglob" style patterns like +(a|b).


              property noglobstar

              noglobstar?: boolean | undefined;
              • Disable ** matching against multiple folder names.


              property nonegate

              nonegate?: boolean | undefined;
              • Suppress the behavior of treating a leading ! character as negation.


              property nonull

              nonull?: boolean | undefined;
              • When a match is not found by minimatch.match, return a list containing the pattern itself if this option is set. Otherwise, an empty list is returned if there are no matches.


              Package Files (1)

              Dependencies (0)

              No dependencies.

              Dev Dependencies (0)

              No dev dependencies.

              Peer Dependencies (0)

              No peer dependencies.


              To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

              You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/minimatch.

              • Markdown
              • HTML
                <a href="https://www.jsdocs.io/package/@types/minimatch"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>