Skip to content

Commit

Permalink
remove second reference to NodeJS.Platform type
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Apr 3, 2023
1 parent cb1b690 commit a3e5146
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ import { AST, ExtglobType } from './ast.js'
import { escape } from './escape.js'
import { unescape } from './unescape.js'

type Platform =
| 'aix'
| 'android'
| 'darwin'
| 'freebsd'
| 'haiku'
| 'linux'
| 'openbsd'
| 'sunos'
| 'win32'
| 'cygwin'
| 'netbsd'

export interface MinimatchOptions {
nobrace?: boolean
nocomment?: boolean
Expand All @@ -23,18 +36,7 @@ export interface MinimatchOptions {
flipNegate?: boolean
preserveMultipleSlashes?: boolean
optimizationLevel?: number
platform?:
| 'aix'
| 'android'
| 'darwin'
| 'freebsd'
| 'haiku'
| 'linux'
| 'openbsd'
| 'sunos'
| 'win32'
| 'cygwin'
| 'netbsd'
platform?: Platform
windowsNoMagicRoot?: boolean
}

Expand Down Expand Up @@ -107,7 +109,6 @@ const qmarksTestNoExtDot = ([$0]: RegExpMatchArray) => {
return (f: string) => f.length === len && f !== '.' && f !== '..'
}

type Platform = typeof process.platform
/* c8 ignore start */
const defaultPlatform: Platform = (
typeof process === 'object' && process
Expand Down

0 comments on commit a3e5146

Please sign in to comment.