mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-16 12:09:24 +08:00
31 lines
584 B
TypeScript
31 lines
584 B
TypeScript
import glob = require("glob");
|
|
const Glob = glob.Glob;
|
|
|
|
(() => {
|
|
const pattern = "test/a/**/[cg]/../[cg]";
|
|
console.log(pattern);
|
|
|
|
const mg = new Glob(pattern, {mark: true, sync: true}, (er, matches) => {
|
|
if (er) {
|
|
console.error(er);
|
|
return;
|
|
}
|
|
console.log("matches", matches);
|
|
});
|
|
console.log("after");
|
|
})();
|
|
|
|
(() => {
|
|
const pattern = "{./*/*,/*,/usr/local/*}";
|
|
console.log(pattern);
|
|
|
|
const mg = new Glob(pattern, {mark: true}, (er, matches) => {
|
|
if (er) {
|
|
console.error(er);
|
|
return;
|
|
}
|
|
console.log("matches", matches);
|
|
});
|
|
console.log("after");
|
|
})();
|