code
stringlengths
24
2.07M
docstring
stringlengths
25
85.3k
func_name
stringlengths
1
92
language
stringclasses
1 value
repo
stringlengths
5
64
path
stringlengths
4
172
url
stringlengths
44
218
license
stringclasses
7 values
function loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocation, host) { var packageJsonPath = ts.combinePaths(candidate, "package.json"); if (host.fileExists(packageJsonPath)) { var jsonContent; try { var jsonText = host.readFile(packageJsonPath)...
The version of the TypeScript compiler release
loadNodeModuleFromDirectory
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function loadModuleFromNodeModules(moduleName, directory, host) { var failedLookupLocations = []; directory = ts.normalizeSlashes(directory); while (true) { var baseName = ts.getBaseFileName(directory); if (baseName !== "node_modules") { var nodeModulesFol...
The version of the TypeScript compiler release
loadModuleFromNodeModules
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function nameStartsWithDotSlashOrDotDotSlash(name) { var i = name.lastIndexOf("./", 1); return i === 0 || (i === 1 && name.charCodeAt(0) === 46 /* dot */); }
The version of the TypeScript compiler release
nameStartsWithDotSlashOrDotDotSlash
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function classicNameResolver(moduleName, containingFile, compilerOptions, host) { // module names that contain '!' are used to reference resources and are not resolved to actual files on disk if (moduleName.indexOf("!") != -1) { return { resolvedModule: undefined, failedLookupLocations: [] }...
The version of the TypeScript compiler release
classicNameResolver
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createCompilerHost(options, setParentNodes) { var existingDirectories = {}; function getCanonicalFileName(fileName) { // if underlying system can distinguish between two files whose names differs only in cases then file name already in canonical form. // otherwise use to...
The version of the TypeScript compiler release
createCompilerHost
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getCanonicalFileName(fileName) { // if underlying system can distinguish between two files whose names differs only in cases then file name already in canonical form. // otherwise use toLowerCase as a canonical form. return ts.sys.useCaseSensitiveFileNames ? fileName : fileN...
The version of the TypeScript compiler release
getCanonicalFileName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getSourceFile(fileName, languageVersion, onError) { var text; try { var start = new Date().getTime(); text = ts.sys.readFile(fileName, options.charset); ts.ioReadTime += new Date().getTime() - start; } catch (e) { ...
The version of the TypeScript compiler release
getSourceFile
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function directoryExists(directoryPath) { if (ts.hasProperty(existingDirectories, directoryPath)) { return true; } if (ts.sys.directoryExists(directoryPath)) { existingDirectories[directoryPath] = true; return true; } ...
The version of the TypeScript compiler release
directoryExists
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function ensureDirectoriesExist(directoryPath) { if (directoryPath.length > ts.getRootLength(directoryPath) && !directoryExists(directoryPath)) { var parentDirectory = ts.getDirectoryPath(directoryPath); ensureDirectoriesExist(parentDirectory); ts.sys.createDi...
The version of the TypeScript compiler release
ensureDirectoriesExist
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function writeFile(fileName, data, writeByteOrderMark, onError) { try { var start = new Date().getTime(); ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(fileName))); ts.sys.writeFile(fileName, data, writeByteOrderMark); ts.ioWriteT...
The version of the TypeScript compiler release
writeFile
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getPreEmitDiagnostics(program, sourceFile, cancellationToken) { var diagnostics = program.getOptionsDiagnostics(cancellationToken).concat(program.getSyntacticDiagnostics(sourceFile, cancellationToken), program.getGlobalDiagnostics(cancellationToken), program.getSemanticDiagnostics(sourceFile, cancellat...
The version of the TypeScript compiler release
getPreEmitDiagnostics
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function flattenDiagnosticMessageText(messageText, newLine) { if (typeof messageText === "string") { return messageText; } else { var diagnosticChain = messageText; var result = ""; var indent = 0; while (diagnosticChain) { ...
The version of the TypeScript compiler release
flattenDiagnosticMessageText
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createProgram(rootNames, options, host, oldProgram) { var program; var files = []; var fileProcessingDiagnostics = ts.createDiagnosticCollection(); var programDiagnostics = ts.createDiagnosticCollection(); var commonSourceDirectory; var diagnosticsProducingTypeCh...
The version of the TypeScript compiler release
createProgram
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getClassifiableNames() { if (!classifiableNames) { // Initialize a checker so that all our files are bound. getTypeChecker(); classifiableNames = {}; for (var _i = 0, files_3 = files; _i < files_3.length; _i++) { va...
The version of the TypeScript compiler release
getClassifiableNames
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function tryReuseStructureFromOldProgram() { if (!oldProgram) { return false; } ts.Debug.assert(!oldProgram.structureIsReused); // there is an old program, check if we can reuse its structure var oldRootNames = oldProgram.getRootFileNames(); ...
The version of the TypeScript compiler release
tryReuseStructureFromOldProgram
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getEmitHost(writeFileCallback) { return { getCanonicalFileName: getCanonicalFileName, getCommonSourceDirectory: program.getCommonSourceDirectory, getCompilerOptions: program.getCompilerOptions, getCurrentDirectory: function () { return...
The version of the TypeScript compiler release
getEmitHost
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getDiagnosticsProducingTypeChecker() { return diagnosticsProducingTypeChecker || (diagnosticsProducingTypeChecker = ts.createTypeChecker(program, /*produceDiagnostics:*/ true)); }
The version of the TypeScript compiler release
getDiagnosticsProducingTypeChecker
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getTypeChecker() { return noDiagnosticsTypeChecker || (noDiagnosticsTypeChecker = ts.createTypeChecker(program, /*produceDiagnostics:*/ false)); }
The version of the TypeScript compiler release
getTypeChecker
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function emit(sourceFile, writeFileCallback, cancellationToken) { var _this = this; return runWithCancellationToken(function () { return emitWorker(_this, sourceFile, writeFileCallback, cancellationToken); }); }
The version of the TypeScript compiler release
emit
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function emitWorker(program, sourceFile, writeFileCallback, cancellationToken) { // If the noEmitOnError flag is set, then check if we have any errors so far. If so, // immediately bail out. Note that we pass 'undefined' for 'sourceFile' so that we // get any preEmit diagnostics, n...
The version of the TypeScript compiler release
emitWorker
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getSourceFile(fileName) { return filesByName.get(ts.toPath(fileName, currentDirectory, getCanonicalFileName)); }
The version of the TypeScript compiler release
getSourceFile
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getDiagnosticsHelper(sourceFile, getDiagnostics, cancellationToken) { if (sourceFile) { return getDiagnostics(sourceFile, cancellationToken); } var allDiagnostics = []; ts.forEach(program.getSourceFiles(), function (sourceFile) { i...
The version of the TypeScript compiler release
getDiagnosticsHelper
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getSyntacticDiagnostics(sourceFile, cancellationToken) { return getDiagnosticsHelper(sourceFile, getSyntacticDiagnosticsForFile, cancellationToken); }
The version of the TypeScript compiler release
getSyntacticDiagnostics
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getSemanticDiagnostics(sourceFile, cancellationToken) { return getDiagnosticsHelper(sourceFile, getSemanticDiagnosticsForFile, cancellationToken); }
The version of the TypeScript compiler release
getSemanticDiagnostics
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getDeclarationDiagnostics(sourceFile, cancellationToken) { return getDiagnosticsHelper(sourceFile, getDeclarationDiagnosticsForFile, cancellationToken); }
The version of the TypeScript compiler release
getDeclarationDiagnostics
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getSyntacticDiagnosticsForFile(sourceFile, cancellationToken) { return sourceFile.parseDiagnostics; }
The version of the TypeScript compiler release
getSyntacticDiagnosticsForFile
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function runWithCancellationToken(func) { try { return func(); } catch (e) { if (e instanceof ts.OperationCanceledException) { // We were canceled while performing the operation. Because our type checker // migh...
The version of the TypeScript compiler release
runWithCancellationToken
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getSemanticDiagnosticsForFile(sourceFile, cancellationToken) { return runWithCancellationToken(function () { var typeChecker = getDiagnosticsProducingTypeChecker(); ts.Debug.assert(!!sourceFile.bindDiagnostics); var bindDiagnostics = sourceFile.bindDi...
The version of the TypeScript compiler release
getSemanticDiagnosticsForFile
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) { return runWithCancellationToken(function () { if (!ts.isDeclarationFile(sourceFile)) { var resolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile, cancellationToken); ...
The version of the TypeScript compiler release
getDeclarationDiagnosticsForFile
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getOptionsDiagnostics() { var allDiagnostics = []; ts.addRange(allDiagnostics, fileProcessingDiagnostics.getGlobalDiagnostics()); ts.addRange(allDiagnostics, programDiagnostics.getGlobalDiagnostics()); return ts.sortAndDeduplicateDiagnostics(allDiagnostics); ...
The version of the TypeScript compiler release
getOptionsDiagnostics
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getGlobalDiagnostics() { var allDiagnostics = []; ts.addRange(allDiagnostics, getDiagnosticsProducingTypeChecker().getGlobalDiagnostics()); return ts.sortAndDeduplicateDiagnostics(allDiagnostics); }
The version of the TypeScript compiler release
getGlobalDiagnostics
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function hasExtension(fileName) { return ts.getBaseFileName(fileName).indexOf(".") >= 0; }
The version of the TypeScript compiler release
hasExtension
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function processRootFile(fileName, isDefaultLib) { processSourceFile(ts.normalizePath(fileName), isDefaultLib); }
The version of the TypeScript compiler release
processRootFile
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function fileReferenceIsEqualTo(a, b) { return a.fileName === b.fileName; }
The version of the TypeScript compiler release
fileReferenceIsEqualTo
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function moduleNameIsEqualTo(a, b) { return a.text === b.text; }
The version of the TypeScript compiler release
moduleNameIsEqualTo
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function collectExternalModuleReferences(file) { if (file.imports) { return; } var isJavaScriptFile = ts.isSourceFileJavaScript(file); var imports; for (var _i = 0, _a = file.statements; _i < _a.length; _i++) { var node = _a[_i]...
The version of the TypeScript compiler release
collectExternalModuleReferences
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function collect(node, allowRelativeModuleNames, collectOnlyRequireCalls) { if (!collectOnlyRequireCalls) { switch (node.kind) { case 222 /* ImportDeclaration */: case 221 /* ImportEqualsDeclaration */: case 228 ...
The version of the TypeScript compiler release
collect
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function processSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd) { var diagnosticArgument; var diagnostic; if (hasExtension(fileName)) { if (!options.allowNonTsExtensions && !ts.forEach(ts.supportedExtensions, function (extension) { return ts.fileExtensionI...
The version of the TypeScript compiler release
processSourceFile
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function reportFileNamesDifferOnlyInCasingError(fileName, existingFileName, refFile, refPos, refEnd) { if (refFile !== undefined && refPos !== undefined && refEnd !== undefined) { fileProcessingDiagnostics.add(ts.createFileDiagnostic(refFile, refPos, refEnd - refPos, ts.Diagnostics.File_name...
The version of the TypeScript compiler release
reportFileNamesDifferOnlyInCasingError
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function findSourceFile(fileName, normalizedAbsolutePath, isDefaultLib, refFile, refPos, refEnd) { if (filesByName.contains(normalizedAbsolutePath)) { var file_1 = filesByName.get(normalizedAbsolutePath); // try to check if we've already seen this file but with a different ca...
The version of the TypeScript compiler release
findSourceFile
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function processReferencedFiles(file, basePath) { ts.forEach(file.referencedFiles, function (ref) { var referencedFileName = resolveTripleslashReference(ref.fileName, file.fileName); processSourceFile(referencedFileName, /* isDefaultLib */ false, file, ref.pos, ref.end); ...
The version of the TypeScript compiler release
processReferencedFiles
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getCanonicalFileName(fileName) { return host.getCanonicalFileName(fileName); }
The version of the TypeScript compiler release
getCanonicalFileName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function processImportedModules(file, basePath) { collectExternalModuleReferences(file); if (file.imports.length) { file.resolvedModules = {}; var moduleNames = ts.map(file.imports, function (name) { return name.text; }); var resolutions = resolveM...
The version of the TypeScript compiler release
processImportedModules
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function computeCommonSourceDirectory(sourceFiles) { var commonPathComponents; ts.forEach(files, function (sourceFile) { // Each file contributes into common source file path if (ts.isDeclarationFile(sourceFile)) { return; } ...
The version of the TypeScript compiler release
computeCommonSourceDirectory
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function checkSourceFilesBelongToPath(sourceFiles, rootDirectory) { var allFilesBelongToPath = true; if (sourceFiles) { var absoluteRootDirectoryPath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(rootDirectory, currentDirectory)); for (var _i = 0, sourc...
The version of the TypeScript compiler release
checkSourceFilesBelongToPath
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function verifyCompilerOptions() { if (options.isolatedModules) { if (options.declaration) { programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "declaration", "isolatedModules")); } ...
The version of the TypeScript compiler release
verifyCompilerOptions
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseCommandLine(commandLine, readFile) { var options = {}; var fileNames = []; var errors = []; var _a = getOptionNameMap(), optionNameMap = _a.optionNameMap, shortOptionNames = _a.shortOptionNames; parseStrings(commandLine); return { options: option...
The version of the TypeScript compiler release
parseCommandLine
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseStrings(args) { var i = 0; while (i < args.length) { var s = args[i++]; if (s.charCodeAt(0) === 64 /* at */) { parseResponseFile(s.slice(1)); } else if (s.charCodeAt(0) === 45 /* minus */) { ...
The version of the TypeScript compiler release
parseStrings
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseResponseFile(fileName) { var text = readFile ? readFile(fileName) : ts.sys.readFile(fileName); if (!text) { errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_not_found, fileName)); return; } var args = []; ...
The version of the TypeScript compiler release
parseResponseFile
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseConfigFileTextToJson(fileName, jsonText) { try { var jsonTextWithoutComments = removeComments(jsonText); return { config: /\S/.test(jsonTextWithoutComments) ? JSON.parse(jsonTextWithoutComments) : {} }; } catch (e) { return { error: ts.createComp...
Parse the text of the tsconfig.json file @param fileName The path to the config file @param jsonText The text of the config file
parseConfigFileTextToJson
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function removeComments(jsonText) { var output = ""; var scanner = ts.createScanner(1 /* ES5 */, /* skipTrivia */ false, 0 /* Standard */, jsonText); var token; while ((token = scanner.scan()) !== 1 /* EndOfFileToken */) { switch (token) { case 2 /* SingleLine...
Remove the comments from a json like text. Comments can be single line comments (starting with # or //) or multiline comments using / * * / This method replace comment content by whitespace rather than completely remove them to keep positions in json parsing error reporting accurate.
removeComments
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parseJsonConfigFileContent(json, host, basePath) { var _a = convertCompilerOptionsFromJson(json["compilerOptions"], basePath), options = _a.options, errors = _a.errors; return { options: options, fileNames: getFileNames(), errors: errors }; fu...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
parseJsonConfigFileContent
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getFileNames() { var fileNames = []; if (ts.hasProperty(json, "files")) { if (json["files"] instanceof Array) { fileNames = ts.map(json["files"], function (s) { return ts.combinePaths(basePath, s); }); } else { ...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
getFileNames
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function convertCompilerOptionsFromJson(jsonOptions, basePath) { var options = {}; var errors = []; if (!jsonOptions) { return { options: options, errors: errors }; } var optionNameMap = ts.arrayToMap(ts.optionDeclarations, function (opt) { return opt.name; }); ...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
convertCompilerOptionsFromJson
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function collectElements(sourceFile) { var elements = []; var collapseText = "..."; function addOutliningSpan(hintSpanNode, startElement, endElement, autoCollapse) { if (hintSpanNode && startElement && endElement) { var span = { ...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
collectElements
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function addOutliningSpan(hintSpanNode, startElement, endElement, autoCollapse) { if (hintSpanNode && startElement && endElement) { var span = { textSpan: ts.createTextSpanFromBounds(startElement.pos, endElement.end), hintSpan: ts.creat...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
addOutliningSpan
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function addOutliningSpanComments(commentSpan, autoCollapse) { if (commentSpan) { var span = { textSpan: ts.createTextSpanFromBounds(commentSpan.pos, commentSpan.end), hintSpan: ts.createTextSpanFromBounds(commentSpan.pos, commentSpan.e...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
addOutliningSpanComments
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function addOutliningForLeadingCommentsForNode(n) { var comments = ts.getLeadingCommentRangesOfNode(n, sourceFile); if (comments) { var firstSingleLineCommentStart = -1; var lastSingleLineCommentEnd = -1; var isFirstSingleLineCo...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
addOutliningForLeadingCommentsForNode
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function combineAndAddMultipleSingleLineComments(count, start, end) { // Only outline spans of two or more consecutive single line comments if (count > 1) { var multipleSingleLineComments = { pos: start, end: end, ...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
combineAndAddMultipleSingleLineComments
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function autoCollapse(node) { return ts.isFunctionBlock(node) && node.parent.kind !== 174 /* ArrowFunction */; }
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
autoCollapse
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function walk(n) { if (depth > maxDepth) { return; } if (ts.isDeclaration(n)) { addOutliningForLeadingCommentsForNode(n); } switch (n.kind) { case 192 /* Block */: ...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
walk
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getNavigateToItems(program, cancellationToken, searchValue, maxResultCount) { var patternMatcher = ts.createPatternMatcher(searchValue); var rawItems = []; // This means "compare in a case insensitive manner." var baseSensitivity = { sensitivity: "base" }; ...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
getNavigateToItems
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function allMatchesAreCaseSensitive(matches) { ts.Debug.assert(matches.length > 0); // This is a case sensitive match, only if all the submatches were case sensitive. for (var _i = 0, matches_1 = matches; _i < matches_1.length; _i++) { var match = matc...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
allMatchesAreCaseSensitive
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getTextOfIdentifierOrLiteral(node) { if (node) { if (node.kind === 69 /* Identifier */ || node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) { return node.text; ...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
getTextOfIdentifierOrLiteral
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function tryAddSingleDeclarationName(declaration, containers) { if (declaration && declaration.name) { var text = getTextOfIdentifierOrLiteral(declaration.name); if (text !== undefined) { containers.unshift(text); } ...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
tryAddSingleDeclarationName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function tryAddComputedPropertyName(expression, containers, includeLastPortion) { var text = getTextOfIdentifierOrLiteral(expression); if (text !== undefined) { if (includeLastPortion) { containers.unshift(text); } ...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
tryAddComputedPropertyName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getContainers(declaration) { var containers = []; // First, if we started with a computed property name, then add all but the last // portion into the container array. if (declaration.name.kind === 136 /* ComputedPropertyName */) { ...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
getContainers
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function bestMatchKind(matches) { ts.Debug.assert(matches.length > 0); var bestMatchKind = ts.PatternMatchKind.camelCase; for (var _i = 0, matches_2 = matches; _i < matches_2.length; _i++) { var match = matches_2[_i]; var kind = mat...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
bestMatchKind
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function compareNavigateToItems(i1, i2) { // TODO(cyrusn): get the gamut of comparisons that VS already uses here. // Right now we just sort by kind first, and then by name of the item. // We first sort case insensitively. So "Aaa" will come before "bar". ...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
compareNavigateToItems
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createNavigateToItem(rawItem) { var declaration = rawItem.declaration; var container = ts.getContainerNode(declaration); return { name: rawItem.name, kind: ts.getNodeKind(declaration), kindModifiers: ts....
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
createNavigateToItem
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getNavigationBarItems(sourceFile) { // If the source file has any child items, then it included in the tree // and takes lexical ownership of all other top-level items. var hasGlobalNode = false; return getItemsWorker(getTopLevelNodes(sourceFile), createTopLevelI...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
getNavigationBarItems
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getIndent(node) { // If we have a global node in the tree, // then it adds an extra layer of depth to all subnodes. var indent = hasGlobalNode ? 1 : 0; var current = node.parent; while (current) { switch (curren...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
getIndent
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getChildNodes(nodes) { var childNodes = []; function visit(node) { switch (node.kind) { case 193 /* VariableStatement */: ts.forEach(node.declarationList.declarations, visit); bre...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
getChildNodes
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function visit(node) { switch (node.kind) { case 193 /* VariableStatement */: ts.forEach(node.declarationList.declarations, visit); break; case 161 /* ObjectBindingPattern */: ...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
visit
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getTopLevelNodes(node) { var topLevelNodes = []; topLevelNodes.push(node); addTopLevelNodes(node.statements, topLevelNodes); return topLevelNodes; }
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
getTopLevelNodes
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function sortNodes(nodes) { return nodes.slice(0).sort(function (n1, n2) { if (n1.name && n2.name) { return ts.getPropertyNameForPropertyNameNode(n1.name).localeCompare(ts.getPropertyNameForPropertyNameNode(n2.name)); } ...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
sortNodes
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function addTopLevelNodes(nodes, topLevelNodes) { nodes = sortNodes(nodes); for (var _i = 0, nodes_4 = nodes; _i < nodes_4.length; _i++) { var node = nodes_4[_i]; switch (node.kind) { case 214 /* ClassDeclaration */: ...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
addTopLevelNodes
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isTopLevelFunctionDeclaration(functionDeclaration) { if (functionDeclaration.kind === 213 /* FunctionDeclaration */) { // A function declaration is 'top level' if it contains any function declarations // within it. if (functionDeclar...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
isTopLevelFunctionDeclaration
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getItemsWorker(nodes, createItem) { var items = []; var keyToItem = {}; for (var _i = 0, nodes_5 = nodes; _i < nodes_5.length; _i++) { var child = nodes_5[_i]; var item = createItem(child); if (item !== ...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
getItemsWorker
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function merge(target, source) { // First, add any spans in the source to the target. ts.addRange(target.spans, source.spans); if (source.childItems) { if (!target.childItems) { target.childItems = []; } ...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
merge
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createChildItem(node) { switch (node.kind) { case 138 /* Parameter */: if (ts.isBindingPattern(node.name)) { break; } if ((node.flags & 1022 /* Modifier */) === 0) { ...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
createChildItem
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createItem(node, name, scriptElementKind) { return getNavigationBarItem(name, scriptElementKind, ts.getNodeModifiers(node), [getNodeSpan(node)]); }
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
createItem
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isEmpty(text) { return !text || text.trim() === ""; }
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
isEmpty
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getNavigationBarItem(text, kind, kindModifiers, spans, childItems, indent) { if (childItems === void 0) { childItems = []; } if (indent === void 0) { indent = 0; } if (isEmpty(text)) { return undefined; } return...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
getNavigationBarItem
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createTopLevelItem(node) { switch (node.kind) { case 248 /* SourceFile */: return createSourceFileItem(node); case 214 /* ClassDeclaration */: return createClassItem(node); case 217 /* En...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
createTopLevelItem
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getModuleName(moduleDeclaration) { // We want to maintain quotation marks. if (moduleDeclaration.name.kind === 9 /* StringLiteral */) { return getTextOfNode(moduleDeclaration.name); } // Otherwise, we need t...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
getModuleName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createModuleItem(node) { var moduleName = getModuleName(node); var childItems = getItemsWorker(getChildNodes(getInnermostModule(node).body.statements), createChildItem); return getNavigationBarItem(moduleName, ts.ScriptElementKind.moduleElement, ts.ge...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
createModuleItem
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createFunctionItem(node) { if (node.body && node.body.kind === 192 /* Block */) { var childItems = getItemsWorker(sortNodes(node.body.statements), createChildItem); return getNavigationBarItem(!node.name ? "default" : node.name.text, ts.Script...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
createFunctionItem
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createSourceFileItem(node) { var childItems = getItemsWorker(getChildNodes(node.statements), createChildItem); if (childItems === undefined || childItems.length === 0) { return undefined; } hasGlobalNode = t...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
createSourceFileItem
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createClassItem(node) { var childItems; if (node.members) { var constructor = ts.forEach(node.members, function (member) { return member.kind === 144 /* Constructor */ && member; }); ...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
createClassItem
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createEnumItem(node) { var childItems = getItemsWorker(sortNodes(removeComputedProperties(node)), createChildItem); return getNavigationBarItem(node.name.text, ts.ScriptElementKind.enumElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node));...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
createEnumItem
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createIterfaceItem(node) { var childItems = getItemsWorker(sortNodes(removeDynamicallyNamedProperties(node)), createChildItem); return getNavigationBarItem(node.name.text, ts.ScriptElementKind.interfaceElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, ...
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
createIterfaceItem
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function removeComputedProperties(node) { return ts.filter(node.members, function (member) { return member.name === undefined || member.name.kind !== 136 /* ComputedPropertyName */; }); }
Parse the contents of a config file (tsconfig.json). @param json The contents of the config file to parse @param host Instance of ParseConfigHost used to enumerate files in folder. @param basePath A root directory to resolve relative path entries in the config file to. e.g. outDir
removeComputedProperties
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getInnermostModule(node) { while (node.body.kind === 218 /* ModuleDeclaration */) { node = node.body; } return node; }
Like removeComputedProperties, but retains the properties with well known symbol names
getInnermostModule
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getNodeSpan(node) { return node.kind === 248 /* SourceFile */ ? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd()) : ts.createTextSpanFromBounds(node.getStart(), node.getEnd()); }
Like removeComputedProperties, but retains the properties with well known symbol names
getNodeSpan
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getTextOfNode(node) { return ts.getTextOfNodeFromSourceText(sourceFile.text, node); }
Like removeComputedProperties, but retains the properties with well known symbol names
getTextOfNode
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createPatternMatch(kind, punctuationStripped, isCaseSensitive, camelCaseWeight) { return { kind: kind, punctuationStripped: punctuationStripped, isCaseSensitive: isCaseSensitive, camelCaseWeight: camelCaseWeight }; }
Like removeComputedProperties, but retains the properties with well known symbol names
createPatternMatch
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createPatternMatcher(pattern) { // We'll often see the same candidate string many times when searching (For example, when // we see the name of a module that is used everywhere, or the name of an overload). As // such, we cache the information we compute about the candidate for the li...
Like removeComputedProperties, but retains the properties with well known symbol names
createPatternMatcher
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function skipMatch(candidate) { return invalidPattern || !candidate; }
Like removeComputedProperties, but retains the properties with well known symbol names
skipMatch
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getMatchesForLastSegmentOfPattern(candidate) { if (skipMatch(candidate)) { return undefined; } return matchSegment(candidate, ts.lastOrUndefined(dotSeparatedSegments)); }
Like removeComputedProperties, but retains the properties with well known symbol names
getMatchesForLastSegmentOfPattern
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT