@marko/type-check
Advanced tools
+26
-12
@@ -326,3 +326,27 @@ #!/usr/bin/env node | ||
| const [sourceFile] = sourceFiles; | ||
| const processorExt = (0, import_language_tools.getExt)(sourceFile.fileName); | ||
| const processorExt = import_language_tools.Processors.getProcessorExtension( | ||
| sourceFile.fileName | ||
| ); | ||
| const extracted = extractCache.get( | ||
| getCanonicalFileName(sourceFile.fileName) | ||
| ); | ||
| const printContext = { | ||
| extracted, | ||
| printer, | ||
| typeChecker, | ||
| sourceFile, | ||
| formatSettings: report.formatSettings | ||
| }; | ||
| if (processorExt.indexOf(".", 1) !== -1) { | ||
| if (!fileName.endsWith(import_tsserverlibrary.default.Extension.Dts)) return; | ||
| _writeFile( | ||
| fileName, | ||
| processor.printTypes(printContext).code, | ||
| writeByteOrderMark, | ||
| onError, | ||
| sourceFiles, | ||
| data | ||
| ); | ||
| return; | ||
| } | ||
| const inDtsExt = processorExt + import_tsserverlibrary.default.Extension.Dts; | ||
@@ -355,12 +379,2 @@ const inJsExt = processorExt + import_tsserverlibrary.default.Extension.Js; | ||
| } | ||
| const extracted = extractCache.get( | ||
| getCanonicalFileName(sourceFile.fileName) | ||
| ); | ||
| const printContext = { | ||
| extracted, | ||
| printer, | ||
| typeChecker, | ||
| sourceFile, | ||
| formatSettings: report.formatSettings | ||
| }; | ||
| _writeFile( | ||
@@ -404,3 +418,3 @@ outFileName, | ||
| const getProcessor = (fileName) => { | ||
| const ext = (0, import_language_tools.getExt)(fileName); | ||
| const ext = import_language_tools.Processors.getProcessorExtension(fileName); | ||
| return ext ? processors[ext] : void 0; | ||
@@ -407,0 +421,0 @@ }; |
+2
-2
| { | ||
| "name": "@marko/type-check", | ||
| "version": "3.0.5", | ||
| "version": "3.1.0", | ||
| "description": "A CLI to type check Marko projects", | ||
@@ -34,3 +34,3 @@ "keywords": [ | ||
| "@marko/compiler": "^5.39.66", | ||
| "@marko/language-tools": "^2.5.64", | ||
| "@marko/language-tools": "^2.6.0", | ||
| "arg": "^5.0.2", | ||
@@ -37,0 +37,0 @@ "kleur": "^4.1.5", |
29584
1.78%659
2.17%Updated