Skip to content

Commit 0966ebc

Browse files
committed
Removing startsWith reference and fixing linter error
1 parent 8325565 commit 0966ebc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/compiler/core.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ namespace ts {
941941
* Regex for the ** wildcard. Matches any number of subdirectories. When used for including
942942
* files or directories, does not match subdirectories that start with a . character
943943
*/
944-
const doubleAsteriskRegexFragment = usage === "exclude" ? "(/.+?)?" : "(/[^/.][^/]*)*?"
944+
const doubleAsteriskRegexFragment = usage === "exclude" ? "(/.+?)?" : "(/[^/.][^/]*)*?";
945945

946946
let pattern = "";
947947
let hasWrittenSubpattern = false;
@@ -987,11 +987,11 @@ namespace ts {
987987
// The * and ? wildcards should not match directories or files that start with . if they
988988
// appear first in a component. Dotted directories and files can be included explicitly
989989
// like so: **/.*/.*
990-
if (startsWith(component, "*")) {
990+
if (component.indexOf("*") === 0) {
991991
subpattern += "([^./]" + singleAsteriskRegexFragment + ")?";
992992
component = component.substr(1);
993993
}
994-
else if (startsWith(component, "?")) {
994+
else if (component.indexOf("?") === 0) {
995995
subpattern += "[^./]";
996996
component = component.substr(1);
997997
}

0 commit comments

Comments
 (0)