mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
Cache parsed path mapping patterns (#44078)
* Cache parsed path mapping patterns If a project has many of them (e.g. 1800), parsing the patterns repeatedly can take up a lot of time. * Move cache to ConfigFileSpecs * Inline constants * Simplify cache access
This commit is contained in:
@@ -553,8 +553,8 @@ namespace ts.Completions.StringCompletions {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const parsed = hasZeroOrOneAsteriskCharacter(pattern) ? tryParsePattern(pattern) : undefined;
|
||||
if (!parsed) {
|
||||
const parsed = tryParsePattern(pattern);
|
||||
if (parsed === undefined || isString(parsed)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user