Skip to content

Commit 25f20da

Browse files
author
Armando Aguirre
committed
Added Ace and PDFKit to typesMap
1 parent e99fe78 commit 25f20da

2 files changed

Lines changed: 8 additions & 14 deletions

File tree

src/harness/unittests/tsserverProjectSystem.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,27 +1541,15 @@ namespace ts.projectSystem {
15411541
path: "/scripts/Office/1/powerpoint.js",
15421542
content: "unspecified"
15431543
};
1544-
const datatablesFile1 = {
1545-
path: "/js/jquery.datatables.js",
1546-
content: "unspecified"
1547-
};
1548-
const datatablesFile2 = {
1549-
path: "/js/datatables.js",
1550-
content: "unspecified"
1551-
};
1552-
const datatablesFile3 = {
1553-
path: "/js/datatables.all.min.js",
1554-
content: "unspecified"
1555-
};
15561544

1557-
const files = [file1, minFile, kendoFile1, kendoFile2, kendoFile3, officeFile1, officeFile2, datatablesFile1, datatablesFile2, datatablesFile3];
1545+
const files = [file1, minFile, kendoFile1, kendoFile2, kendoFile3, officeFile1, officeFile2];
15581546
const host = createServerHost(files);
15591547
const projectService = createProjectService(host);
15601548
try {
15611549
projectService.openExternalProject({ projectFileName: "project", options: {}, rootFiles: toExternalFiles(files.map(f => f.path)) });
15621550
const proj = projectService.externalProjects[0];
15631551
assert.deepEqual(proj.getFileNames(/*excludeFilesFromExternalLibraries*/ true), [file1.path]);
1564-
assert.deepEqual(proj.getTypeAcquisition().include, ["kendo-ui", "office", "datatables.net"]);
1552+
assert.deepEqual(proj.getTypeAcquisition().include, ["kendo-ui", "office"]);
15651553
} finally {
15661554
projectService.resetSafeList();
15671555
}

src/server/typesMap.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
"Datatables.net": {
2727
"match": "^.*\\/(jquery\\.)?dataTables(\\.all)?(\\.min)?\\.js$",
2828
"types": ["datatables.net"]
29+
},
30+
"Ace": {
31+
"match": "^(.*)\\/ace.js",
32+
"exclude": [["^", 1, "/.*"]],
33+
"types": ["ace"]
2934
}
3035
},
3136
"simpleMap": {
@@ -356,6 +361,7 @@
356361
"passport": "passport",
357362
"passport-local": "passport-local",
358363
"path": "pathjs",
364+
"pdfkit":"pdfkit",
359365
"peer": "peerjs",
360366
"peg": "pegjs",
361367
"photoswipe": "photoswipe",

0 commit comments

Comments
 (0)