MCPcopy Index your code
hub / github.com/nodejs/node / parseResolutionMode

Function parseResolutionMode

test/fixtures/snapshot/typescript.js:38863–38875  ·  view source on GitHub ↗
(mode, pos, end, reportDiagnostic)

Source from the content-addressed store, hash-verified

38861 }
38862 ts.isDeclarationFileName = isDeclarationFileName;
38863 function parseResolutionMode(mode, pos, end, reportDiagnostic) {
38864 if (!mode) {
38865 return undefined;
38866 }
38867 if (mode === "import") {
38868 return ts.ModuleKind.ESNext;
38869 }
38870 if (mode === "require") {
38871 return ts.ModuleKind.CommonJS;
38872 }
38873 reportDiagnostic(pos, end - pos, ts.Diagnostics.resolution_mode_should_be_either_require_or_import);
38874 return undefined;
38875 }
38876 /*@internal*/
38877 function processCommentPragmas(context, sourceText) {
38878 var pragmas = [];

Callers 1

processPragmasIntoFieldsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected