Skip to content

Commit

Permalink
types: minimatch is a function, close #1902
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Jun 7, 2018
1 parent 531a950 commit 68a6fc5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli/package.json
Expand Up @@ -41,7 +41,7 @@
"@types/chai-jquery": "1.1.35",
"@types/jquery": "3.2.16",
"@types/lodash": "4.14.87",
"@types/minimatch": "3.0.1",
"@types/minimatch": "3.0.3",
"@types/mocha": "2.2.44",
"@types/sinon": "4.0.0",
"@types/sinon-chai": "2.7.29",
Expand Down
3 changes: 1 addition & 2 deletions cli/types/minimatch.d.ts
Expand Up @@ -3,10 +3,9 @@
// so that Cypress can get and use the Blob type
// tslint:disable-next-line:no-implicit-dependencies
import * as mimimatch from 'minimatch'

export = Mimimatch
export as namespace Mimimatch

declare namespace Mimimatch {
type MimimatchStatic = mimimatch.IMinimatchStatic
type MimimatchStatic = mimimatch.IMinimatchStatic & typeof mimimatch
}
4 changes: 4 additions & 0 deletions cli/types/tests/kitchen-sink.ts
Expand Up @@ -1533,3 +1533,7 @@ cy.wrap('foo').then(subject => {
}).then(subject => {
subject // $ExpectType string
})

Cypress.minimatch('/users/1/comments', '/users/*/comments', {
matchBase: true,
})

0 comments on commit 68a6fc5

Please sign in to comment.