mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Rename StringOrRegExp to DiscardPattern
This commit is contained in:
4
tools/index.d.ts
vendored
4
tools/index.d.ts
vendored
@@ -18,9 +18,9 @@ declare global {
|
||||
displayName?: string;
|
||||
}
|
||||
|
||||
type StringOrRegExp = string | RegExp;
|
||||
type DiscardPattern = string | RegExp;
|
||||
|
||||
interface Discards {
|
||||
[packageName: string]: StringOrRegExp[];
|
||||
[packageName: string]: DiscardPattern[];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ function merge(into: Discards, from: Discards): void {
|
||||
|
||||
// TODO Improve this. For example we don't currently support wildcard
|
||||
// string patterns (just use a RegExp if you need that flexibility).
|
||||
function matches(pattern: StringOrRegExp, relPath: string): boolean {
|
||||
function matches(pattern: DiscardPattern, relPath: string): boolean {
|
||||
if (pattern instanceof RegExp) {
|
||||
return pattern.test(relPath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user