mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-10 18:04:18 -05:00
Respond to PR comments
This commit is contained in:
@@ -1295,12 +1295,10 @@ namespace ts {
|
||||
flags: watchRecursivePattern.test(spec) ? WatchDirectoryFlags.Recursive : WatchDirectoryFlags.None
|
||||
};
|
||||
}
|
||||
else if (isImplicitGlob(spec)) {
|
||||
if (isImplicitGlob(spec)) {
|
||||
return { key: spec, flags: WatchDirectoryFlags.Recursive };
|
||||
}
|
||||
else {
|
||||
return undefined;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1515,7 +1515,9 @@ namespace ts {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return "^(" + pattern + (usage === "exclude" ? ")($|/)" : ")$");
|
||||
// If excluding, match "foo/bar/baz...", but if including, only allow "foo".
|
||||
const terminator = usage === "exclude" ? "($|/)" : "$";
|
||||
return `^(${pattern})${terminator}`;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1711,9 +1713,7 @@ namespace ts {
|
||||
? absolute
|
||||
: removeTrailingDirectorySeparator(getDirectoryPath(absolute));
|
||||
}
|
||||
else {
|
||||
return absolute.substring(0, absolute.lastIndexOf(directorySeparator, wildcardOffset));
|
||||
}
|
||||
return absolute.substring(0, absolute.lastIndexOf(directorySeparator, wildcardOffset));
|
||||
}
|
||||
|
||||
export function ensureScriptKind(fileName: string, scriptKind?: ScriptKind): ScriptKind {
|
||||
|
||||
Reference in New Issue
Block a user