mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Merge pull request #16277 from minestarks/safelistpackagenames
discoverTypings should look at typingSafelist.json values
This commit is contained in:
commit
52e867c86e
3 files changed
+28
-7
No files matched your search
@@ -143,7 +143,7 @@ namespace ts.JsTyping {
|
||||
/**
|
||||
* Merge a given list of typingNames to the inferredTypings map
|
||||
*/
|
||||
function mergeTypings(typingNames: string[]) {
|
||||
function mergeTypings(typingNames: ReadonlyArray<string>) {
|
||||
if (!typingNames) {
|
||||
return;
|
||||
}
|
||||
@@ -192,7 +192,7 @@ namespace ts.JsTyping {
|
||||
const cleanedTypingNames = map(inferredTypingNames, f => f.replace(/((?:\.|-)min(?=\.|$))|((?:-|\.)\d+)/g, ""));
|
||||
|
||||
if (safeList !== EmptySafeList) {
|
||||
mergeTypings(filter(cleanedTypingNames, f => safeList.has(f)));
|
||||
mergeTypings(ts.mapDefined(cleanedTypingNames, f => safeList.get(f)));
|
||||
}
|
||||
|
||||
const hasJsxFile = forEach(fileNames, f => ensureScriptKind(f, getScriptKindFromFileName(f)) === ScriptKind.JSX);
|
||||
|
||||
Reference in new issue
Block a user