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 HostCache(host, getCanonicalFileName) { this.host = host; this.getCanonicalFileName = getCanonicalFileName; // script id => script index this.currentDirectory = host.getCurrentDirectory(); this.fileNameToEntry = ts.createFileMap(); // Init...
The version of the language service API
HostCache
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function SyntaxTreeCache(host) { this.host = host; }
The version of the language service API
SyntaxTreeCache
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function setSourceFileFields(sourceFile, scriptSnapshot, version) { sourceFile.version = version; sourceFile.scriptSnapshot = scriptSnapshot; }
The version of the language service API
setSourceFileFields
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createLanguageServiceSourceFile(fileName, scriptSnapshot, scriptTarget, version, setNodeParents) { var text = scriptSnapshot.getText(0, scriptSnapshot.getLength()); var sourceFile = ts.createSourceFile(fileName, text, scriptTarget, setNodeParents); setSourceFileFields(sourceFile, script...
The version of the language service API
createLanguageServiceSourceFile
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function updateLanguageServiceSourceFile(sourceFile, scriptSnapshot, version, textChangeRange, aggressiveChecks) { // If we were given a text change range, and our version or open-ness changed, then // incrementally parse this file. if (textChangeRange) { if (version !== sourceFile.v...
The version of the language service API
updateLanguageServiceSourceFile
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createGetCanonicalFileName(useCaseSensitivefileNames) { return useCaseSensitivefileNames ? (function (fileName) { return fileName; }) : (function (fileName) { return fileName.toLowerCase(); }); }
The version of the language service API
createGetCanonicalFileName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createDocumentRegistry(useCaseSensitiveFileNames, currentDirectory) { if (currentDirectory === void 0) { currentDirectory = ""; } // Maps from compiler setting target (ES3, ES5, etc.) to all the cached documents we have // for those settings. var buckets = {}; var getCan...
The version of the language service API
createDocumentRegistry
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getKeyFromCompilationSettings(settings) { return "_" + settings.target + "|" + settings.module + "|" + settings.noResolve + "|" + settings.jsx; }
The version of the language service API
getKeyFromCompilationSettings
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getBucketForCompilationSettings(settings, createIfMissing) { var key = getKeyFromCompilationSettings(settings); var bucket = ts.lookUp(buckets, key); if (!bucket && createIfMissing) { buckets[key] = bucket = ts.createFileMap(); } retur...
The version of the language service API
getBucketForCompilationSettings
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function reportStats() { var bucketInfoArray = Object.keys(buckets).filter(function (name) { return name && name.charAt(0) === '_'; }).map(function (name) { var entries = ts.lookUp(buckets, name); var sourceFiles = []; entries.forEachValue(function (key, entry...
The version of the language service API
reportStats
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function acquireDocument(fileName, compilationSettings, scriptSnapshot, version) { return acquireOrUpdateDocument(fileName, compilationSettings, scriptSnapshot, version, /*acquiring:*/ true); }
The version of the language service API
acquireDocument
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function updateDocument(fileName, compilationSettings, scriptSnapshot, version) { return acquireOrUpdateDocument(fileName, compilationSettings, scriptSnapshot, version, /*acquiring:*/ false); }
The version of the language service API
updateDocument
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function acquireOrUpdateDocument(fileName, compilationSettings, scriptSnapshot, version, acquiring) { var bucket = getBucketForCompilationSettings(compilationSettings, /*createIfMissing*/ true); var path = ts.toPath(fileName, currentDirectory, getCanonicalFileName); var entry = bucke...
The version of the language service API
acquireOrUpdateDocument
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function releaseDocument(fileName, compilationSettings) { var bucket = getBucketForCompilationSettings(compilationSettings, false); ts.Debug.assert(bucket !== undefined); var path = ts.toPath(fileName, currentDirectory, getCanonicalFileName); var entry = bucket.get(path);...
The version of the language service API
releaseDocument
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function preProcessFile(sourceText, readImportFiles, detectJavaScriptImports) { if (readImportFiles === void 0) { readImportFiles = true; } if (detectJavaScriptImports === void 0) { detectJavaScriptImports = false; } var referencedFiles = []; var importedFiles = []; var ambientEx...
The version of the language service API
preProcessFile
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function processTripleSlashDirectives() { var commentRanges = ts.getLeadingCommentRanges(sourceText, 0); ts.forEach(commentRanges, function (commentRange) { var comment = sourceText.substring(commentRange.pos, commentRange.end); var referencePathMatchResult = ts.g...
The version of the language service API
processTripleSlashDirectives
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function recordAmbientExternalModule() { if (!ambientExternalModules) { ambientExternalModules = []; } ambientExternalModules.push(scanner.getTokenValue()); }
The version of the language service API
recordAmbientExternalModule
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function recordModuleName() { var importPath = scanner.getTokenValue(); var pos = scanner.getTokenPos(); importedFiles.push({ fileName: importPath, pos: pos, end: pos + importPath.length }); }
The version of the language service API
recordModuleName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function tryConsumeDeclare() { var token = scanner.getToken(); if (token === 122 /* DeclareKeyword */) { // declare module "mod" token = scanner.scan(); if (token === 125 /* ModuleKeyword */) { token = scanner.scan(); ...
Returns true if at least one token was consumed from the stream
tryConsumeDeclare
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function tryConsumeImport() { var token = scanner.getToken(); if (token === 89 /* ImportKeyword */) { token = scanner.scan(); if (token === 9 /* StringLiteral */) { // import "mod"; recordModuleName(); re...
Returns true if at least one token was consumed from the stream
tryConsumeImport
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function tryConsumeExport() { var token = scanner.getToken(); if (token === 82 /* ExportKeyword */) { token = scanner.scan(); if (token === 15 /* OpenBraceToken */) { token = scanner.scan(); // consume "{ a as B, c, d as D}"...
Returns true if at least one token was consumed from the stream
tryConsumeExport
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function tryConsumeRequireCall(skipCurrentToken) { var token = skipCurrentToken ? scanner.scan() : scanner.getToken(); if (token === 127 /* RequireKeyword */) { token = scanner.scan(); if (token === 17 /* OpenParenToken */) { token = scanner.sc...
Returns true if at least one token was consumed from the stream
tryConsumeRequireCall
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function tryConsumeDefine() { var token = scanner.getToken(); if (token === 69 /* Identifier */ && scanner.getTokenValue() === "define") { token = scanner.scan(); if (token !== 17 /* OpenParenToken */) { return true; } ...
Returns true if at least one token was consumed from the stream
tryConsumeDefine
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function processImports() { scanner.setText(sourceText); scanner.scan(); // Look for: // import "mod"; // import d from "mod" // import {a as A } from "mod"; // import * as NS from "mod" // import d, {a, b as...
Returns true if at least one token was consumed from the stream
processImports
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isJumpStatementTarget(node) { return node.kind === 69 /* Identifier */ && (node.parent.kind === 203 /* BreakStatement */ || node.parent.kind === 202 /* ContinueStatement */) && node.parent.label === node; }
Returns true if at least one token was consumed from the stream
isJumpStatementTarget
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isLabelOfLabeledStatement(node) { return node.kind === 69 /* Identifier */ && node.parent.kind === 207 /* LabeledStatement */ && node.parent.label === node; }
Returns true if at least one token was consumed from the stream
isLabelOfLabeledStatement
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isLabeledBy(node, labelName) { for (var owner = node.parent; owner.kind === 207 /* LabeledStatement */; owner = owner.parent) { if (owner.label.text === labelName) { return true; } } return false; }
Whether or not a 'node' is preceded by a label of the given string. Note: 'node' cannot be a SourceFile.
isLabeledBy
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isLabelName(node) { return isLabelOfLabeledStatement(node) || isJumpStatementTarget(node); }
Whether or not a 'node' is preceded by a label of the given string. Note: 'node' cannot be a SourceFile.
isLabelName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isRightSideOfQualifiedName(node) { return node.parent.kind === 135 /* QualifiedName */ && node.parent.right === node; }
Whether or not a 'node' is preceded by a label of the given string. Note: 'node' cannot be a SourceFile.
isRightSideOfQualifiedName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isRightSideOfPropertyAccess(node) { return node && node.parent && node.parent.kind === 166 /* PropertyAccessExpression */ && node.parent.name === node; }
Whether or not a 'node' is preceded by a label of the given string. Note: 'node' cannot be a SourceFile.
isRightSideOfPropertyAccess
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isCallExpressionTarget(node) { if (isRightSideOfPropertyAccess(node)) { node = node.parent; } return node && node.parent && node.parent.kind === 168 /* CallExpression */ && node.parent.expression === node; }
Whether or not a 'node' is preceded by a label of the given string. Note: 'node' cannot be a SourceFile.
isCallExpressionTarget
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isNewExpressionTarget(node) { if (isRightSideOfPropertyAccess(node)) { node = node.parent; } return node && node.parent && node.parent.kind === 169 /* NewExpression */ && node.parent.expression === node; }
Whether or not a 'node' is preceded by a label of the given string. Note: 'node' cannot be a SourceFile.
isNewExpressionTarget
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isNameOfModuleDeclaration(node) { return node.parent.kind === 218 /* ModuleDeclaration */ && node.parent.name === node; }
Whether or not a 'node' is preceded by a label of the given string. Note: 'node' cannot be a SourceFile.
isNameOfModuleDeclaration
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isNameOfFunctionDeclaration(node) { return node.kind === 69 /* Identifier */ && ts.isFunctionLike(node.parent) && node.parent.name === node; }
Whether or not a 'node' is preceded by a label of the given string. Note: 'node' cannot be a SourceFile.
isNameOfFunctionDeclaration
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { if (node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) { switch (node.parent.kind) { case 141 /* PropertyDeclaration */: case 140 /* PropertySignature */: case 2...
Returns true if node is a name of an object literal property, e.g. "a" in x = { "a": 1 }
isLiteralNameOfPropertyDeclarationOrIndexAccess
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isNameOfExternalModuleImportOrDeclaration(node) { if (node.kind === 9 /* StringLiteral */) { return isNameOfModuleDeclaration(node) || (ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent)...
Returns true if node is a name of an object literal property, e.g. "a" in x = { "a": 1 }
isNameOfExternalModuleImportOrDeclaration
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isInsideComment(sourceFile, token, position) { // The position has to be: 1. in the leading trivia (before token.getStart()), and 2. within a comment return position <= token.getStart(sourceFile) && (isInsideCommentRange(ts.getTrailingCommentRanges(sourceFile.text, token.getFullStar...
Returns true if the position is within a comment
isInsideComment
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isInsideCommentRange(comments) { return ts.forEach(comments, function (comment) { // either we are 1. completely inside the comment, or 2. at the end of the comment if (comment.pos < position && position < comment.end) { return true; ...
Returns true if the position is within a comment
isInsideCommentRange
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getContainerNode(node) { while (true) { node = node.parent; if (!node) { return undefined; } switch (node.kind) { case 248 /* SourceFile */: case 143 /* MethodDeclaration */: case 142 /* Meth...
Returns true if the position is within a comment
getContainerNode
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getNodeKind(node) { switch (node.kind) { case 218 /* ModuleDeclaration */: return ScriptElementKind.moduleElement; case 214 /* ClassDeclaration */: return ScriptElementKind.classElement; case 215 /* InterfaceDeclaration */: return ScriptElementKind.interfaceElement; ...
Returns true if the position is within a comment
getNodeKind
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function CancellationTokenObject(cancellationToken) { this.cancellationToken = cancellationToken; }
Returns true if the position is within a comment
CancellationTokenObject
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createLanguageService(host, documentRegistry) { if (documentRegistry === void 0) { documentRegistry = createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory()); } var syntaxTreeCache = new SyntaxTreeCache(host); var ruleProvid...
Returns true if the position is within a comment
createLanguageService
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function log(message) { if (host.log) { host.log(message); } }
Returns true if the position is within a comment
log
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getValidSourceFile(fileName) { var sourceFile = program.getSourceFile(fileName); if (!sourceFile) { throw new Error("Could not find file: '" + fileName + "'."); } return sourceFile; }
Returns true if the position is within a comment
getValidSourceFile
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getRuleProvider(options) { // Ensure rules are initialized and up to date wrt to formatting options if (!ruleProvider) { ruleProvider = new ts.formatting.RulesProvider(); } ruleProvider.ensureUpToDate(options); return ruleProvider; ...
Returns true if the position is within a comment
getRuleProvider
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function synchronizeHostData() { // perform fast check if host supports it if (host.getProjectVersion) { var hostProjectVersion = host.getProjectVersion(); if (hostProjectVersion) { if (lastProjectVersion === hostProjectVersion) { ...
Returns true if the position is within a comment
synchronizeHostData
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getOrCreateSourceFile(fileName) { ts.Debug.assert(hostCache !== undefined); // The program is asking for this file, check first if the host can locate it. // If the host can not locate the file, then it does not exist. return undefined // to the p...
Returns true if the position is within a comment
getOrCreateSourceFile
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function sourceFileUpToDate(sourceFile) { var path = sourceFile.path || ts.toPath(sourceFile.fileName, currentDirectory, getCanonicalFileName); return sourceFile && sourceFile.version === hostCache.getVersion(path); }
Returns true if the position is within a comment
sourceFileUpToDate
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function programUpToDate() { // If we haven't create a program yet, then it is not up-to-date if (!program) { return false; } // If number of files in the program do not match, it is not up-to-date var rootFileNames = ho...
Returns true if the position is within a comment
programUpToDate
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getProgram() { synchronizeHostData(); return program; }
Returns true if the position is within a comment
getProgram
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function cleanupSemanticCache() { // TODO: Should we jettison the program (or it's type checker) here? }
Returns true if the position is within a comment
cleanupSemanticCache
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function dispose() { if (program) { ts.forEach(program.getSourceFiles(), function (f) { return documentRegistry.releaseDocument(f.fileName, program.getCompilerOptions()); }); } }
Returns true if the position is within a comment
dispose
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getSyntacticDiagnostics(fileName) { synchronizeHostData(); return program.getSyntacticDiagnostics(getValidSourceFile(fileName), cancellationToken); }
Returns true if the position is within a comment
getSyntacticDiagnostics
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getCompletionEntryDisplayNameForSymbol(symbol, target, performCharacterChecks, location) { var displayName = ts.getDeclaredName(program.getTypeChecker(), symbol, location); if (displayName) { var firstCharCode = displayName.charCodeAt(0); // First check o...
Get the name to be display in completion from a given symbol. @return undefined if the name is of external module otherwise a name with striped of any quote
getCompletionEntryDisplayNameForSymbol
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getCompletionData(fileName, position) { var typeChecker = program.getTypeChecker(); var syntacticStart = new Date().getTime(); var sourceFile = getValidSourceFile(fileName); var isJavaScriptFile = ts.isSourceFileJavaScript(sourceFile); var isJsDocTagN...
Get a displayName from a given for completion list, performing any necessary quotes stripping and checking whether the name is valid identifier name.
getCompletionData
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isCompletionListBlocker(contextToken) { var start = new Date().getTime(); var result = isInStringOrRegularExpressionOrTemplateLiteral(contextToken) || isSolelyIdentifierDefinitionLocation(contextToken) || isDotOfNumericLiteral(contextToken...
Finds the first node that "embraces" the position, so that one may accurately aggregate locals from the closest containing scope.
isCompletionListBlocker
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isInJsxText(contextToken) { if (contextToken.kind === 236 /* JsxText */) { return true; } if (contextToken.kind === 27 /* GreaterThanToken */ && contextToken.parent) { if (contextToken.parent.kind === 235 /* JsxOpeningEleme...
Finds the first node that "embraces" the position, so that one may accurately aggregate locals from the closest containing scope.
isInJsxText
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isNewIdentifierDefinitionLocation(previousToken) { if (previousToken) { var containingNodeKind = previousToken.parent.kind; switch (previousToken.kind) { case 24 /* CommaToken */: return containingNodeKi...
Finds the first node that "embraces" the position, so that one may accurately aggregate locals from the closest containing scope.
isNewIdentifierDefinitionLocation
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isInStringOrRegularExpressionOrTemplateLiteral(contextToken) { if (contextToken.kind === 9 /* StringLiteral */ || contextToken.kind === 10 /* RegularExpressionLiteral */ || ts.isTemplateLiteralKind(contextToken.kind)) { var start_4 = c...
Finds the first node that "embraces" the position, so that one may accurately aggregate locals from the closest containing scope.
isInStringOrRegularExpressionOrTemplateLiteral
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function tryGetNamedImportsOrExportsForCompletion(contextToken) { if (contextToken) { switch (contextToken.kind) { case 15 /* OpenBraceToken */: // import { | case 24 /* CommaToken */: switch (contextToken.pa...
Returns the containing list of named imports or exports of a context token, on the condition that one exists and that the context implies completion should be given.
tryGetNamedImportsOrExportsForCompletion
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function tryGetContainingJsxElement(contextToken) { if (contextToken) { var parent_11 = contextToken.parent; switch (contextToken.kind) { case 26 /* LessThanSlashToken */: case 39 /* SlashToken */: ...
Returns the containing list of named imports or exports of a context token, on the condition that one exists and that the context implies completion should be given.
tryGetContainingJsxElement
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isFunction(kind) { switch (kind) { case 173 /* FunctionExpression */: case 174 /* ArrowFunction */: case 213 /* FunctionDeclaration */: case 143 /* MethodDeclaration */: case 142 /* MethodSignatu...
Returns the containing list of named imports or exports of a context token, on the condition that one exists and that the context implies completion should be given.
isFunction
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isSolelyIdentifierDefinitionLocation(contextToken) { var containingNodeKind = contextToken.parent.kind; switch (contextToken.kind) { case 24 /* CommaToken */: return containingNodeKind === 211 /* VariableDeclaration */ || ...
@returns true if we are certain that the currently edited location must define a new location; false otherwise.
isSolelyIdentifierDefinitionLocation
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isDotOfNumericLiteral(contextToken) { if (contextToken.kind === 8 /* NumericLiteral */) { var text = contextToken.getFullText(); return text.charAt(text.length - 1) === "."; } return false; }
@returns true if we are certain that the currently edited location must define a new location; false otherwise.
isDotOfNumericLiteral
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function filterNamedImportOrExportCompletionItems(exportsOfModule, namedImportsOrExports) { var exisingImportsOrExports = {}; for (var _i = 0, namedImportsOrExports_1 = namedImportsOrExports; _i < namedImportsOrExports_1.length; _i++) { var element = namedImportsOrExp...
Filters out completion suggestions for named imports or exports. @param exportsOfModule The list of symbols which a module exposes. @param namedImportsOrExports The list of existing import/export specifiers in the import/export clause. @returns Symbols to be suggested at an import/export clause, barring t...
filterNamedImportOrExportCompletionItems
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function filterObjectMembersList(contextualMemberSymbols, existingMembers) { if (!existingMembers || existingMembers.length === 0) { return contextualMemberSymbols; } var existingMemberNames = {}; for (var _i = 0, existingMembers_1 = ex...
Filters out completion suggestions for named imports or exports. @returns Symbols to be suggested in an object binding pattern or object literal expression, barring those whose declarations do not occur at the current position and have not otherwise been typed.
filterObjectMembersList
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function filterJsxAttributes(symbols, attributes) { var seenNames = {}; for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) { var attr = attributes_1[_i]; // If this is the current item we are editing right now, do not filte...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
filterJsxAttributes
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getCompletionsAtPosition(fileName, position) { synchronizeHostData(); var completionData = getCompletionData(fileName, position); if (!completionData) { return undefined; } var symbols = completionData.symbols, isMemberCompletion = com...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
getCompletionsAtPosition
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getJavaScriptCompletionEntries(sourceFile, uniqueNames) { var entries = []; var target = program.getCompilerOptions().target; var nameTable = getNameTable(sourceFile); for (var name_36 in nameTable) { if (!uniqueNames[name_36])...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
getJavaScriptCompletionEntries
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getAllJsDocCompletionEntries() { return jsDocCompletionEntries || (jsDocCompletionEntries = ts.map(jsDocTagNames, function (tagName) { return { name: tagName, kind: ScriptElementKind.keyword, kindModifie...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
getAllJsDocCompletionEntries
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createCompletionEntry(symbol, location) { // Try to get a valid display name for this symbol, if we could not find one, then ignore it. // We would like to only show things that can be added after a dot, so for instance numeric properties can // not be accessed w...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
createCompletionEntry
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getCompletionEntriesFromSymbols(symbols, entries) { var start = new Date().getTime(); var uniqueNames = {}; if (symbols) { for (var _i = 0, symbols_3 = symbols; _i < symbols_3.length; _i++) { var symbol = symbols_3[_i];...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
getCompletionEntriesFromSymbols
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getCompletionEntryDetails(fileName, position, entryName) { synchronizeHostData(); // Compute all the completion symbols again. var completionData = getCompletionData(fileName, position); if (completionData) { var symbols = completionData.symbols, ...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
getCompletionEntryDetails
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(symbol, flags, location) { var typeChecker = program.getTypeChecker(); if (typeChecker.isUndefinedSymbol(symbol)) { return ScriptElementKind.variableElement; } if (typeChecker.isArgumen...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getSymbolModifiers(symbol) { return symbol && symbol.declarations && symbol.declarations.length > 0 ? ts.getNodeModifiers(symbol.declarations[0]) : ScriptElementKindModifier.none; }
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
getSymbolModifiers
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, sourceFile, enclosingDeclaration, location, semanticMeaning) { if (semanticMeaning === void 0) { semanticMeaning = getMeaningFromLocation(location); } var typeChecker = program.getTypeChecker(); var displayParts = []; ...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
getSymbolDisplayPartsDocumentationAndSymbolKind
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function addNewLineIfDisplayPartsExist() { if (displayParts.length) { displayParts.push(ts.lineBreakPart()); } }
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
addNewLineIfDisplayPartsExist
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function addFullSymbolName(symbol, enclosingDeclaration) { var fullSymbolDisplayParts = ts.symbolToDisplayParts(typeChecker, symbol, enclosingDeclaration || sourceFile, /*meaning*/ undefined, 1 /* WriteTypeParametersOrArguments */ | 2 /* UseOnlyExternalAliasing */); ts.addRange(displayPa...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
addFullSymbolName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function addPrefixForAnyFunctionOrVar(symbol, symbolKind) { addNewLineIfDisplayPartsExist(); if (symbolKind) { pushTypePart(symbolKind); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); } ...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
addPrefixForAnyFunctionOrVar
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function pushTypePart(symbolKind) { switch (symbolKind) { case ScriptElementKind.variableElement: case ScriptElementKind.functionElement: case ScriptElementKind.letElement: case ScriptElementKind.constElement: ...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
pushTypePart
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function addSignatureDisplayParts(signature, allSignatures, flags) { ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, enclosingDeclaration, flags | 32 /* WriteTypeArgumentsOfSignature */)); if (allSignatures.length > 1) { displayParts.push(...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
addSignatureDisplayParts
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function writeTypeParametersOfSymbol(symbol, enclosingDeclaration) { var typeParameterParts = ts.mapToDisplayParts(function (writer) { typeChecker.getSymbolDisplayBuilder().buildTypeParameterDisplayFromSymbol(symbol, writer, enclosingDeclaration); }); ...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
writeTypeParametersOfSymbol
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getQuickInfoAtPosition(fileName, position) { synchronizeHostData(); var sourceFile = getValidSourceFile(fileName); var node = ts.getTouchingPropertyName(sourceFile, position); if (!node) { return undefined; } if (isLabelNam...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
getQuickInfoAtPosition
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createDefinitionInfo(node, symbolKind, symbolName, containerName) { return { fileName: node.getSourceFile().fileName, textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()), kind: symbolKind, name: symbolName, ...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
createDefinitionInfo
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getDefinitionFromSymbol(symbol, node) { var typeChecker = program.getTypeChecker(); var result = []; var declarations = symbol.getDeclarations(); var symbolName = typeChecker.symbolToString(symbol); // Do not get scoped name, just the name of the symbol ...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
getDefinitionFromSymbol
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function tryAddConstructSignature(symbol, location, symbolKind, symbolName, containerName, result) { // Applicable only if we are in a new expression, or we are on a constructor declaration // and in either case the symbol has a construct signature definition, i.e. class ...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
tryAddConstructSignature
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function tryAddCallSignature(symbol, location, symbolKind, symbolName, containerName, result) { if (isCallExpressionTarget(location) || isNewExpressionTarget(location) || isNameOfFunctionDeclaration(location)) { return tryAddSignature(symbol.declarations, /*selectConstructors*/ false...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
tryAddCallSignature
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function tryAddSignature(signatureDeclarations, selectConstructors, symbolKind, symbolName, containerName, result) { var declarations = []; var definition; ts.forEach(signatureDeclarations, function (d) { if ((selectConstructors && d.kind === 144 /* Co...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
tryAddSignature
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getDefinitionAtPosition(fileName, position) { synchronizeHostData(); var sourceFile = getValidSourceFile(fileName); var node = ts.getTouchingPropertyName(sourceFile, position); if (!node) { return undefined; } // Labels ...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
getDefinitionAtPosition
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getTypeDefinitionAtPosition(fileName, position) { synchronizeHostData(); var sourceFile = getValidSourceFile(fileName); var node = ts.getTouchingPropertyName(sourceFile, position); if (!node) { return undefined; } var typeC...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
getTypeDefinitionAtPosition
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getOccurrencesAtPosition(fileName, position) { var results = getOccurrencesAtPositionCore(fileName, position); if (results) { var sourceFile = getCanonicalFileName(ts.normalizeSlashes(fileName)); // Get occurrences only supports reporting occurrences for ...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
getOccurrencesAtPosition
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getDocumentHighlights(fileName, position, filesToSearch) { synchronizeHostData(); filesToSearch = ts.map(filesToSearch, ts.normalizeSlashes); var sourceFilesToSearch = ts.filter(program.getSourceFiles(), function (f) { return ts.contains(filesToSearch, f.fileName); }); ...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
getDocumentHighlights
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getHighlightSpanForNode(node) { var start = node.getStart(); var end = node.getEnd(); return { fileName: sourceFile.fileName, textSpan: ts.createTextSpanFromBounds(start, end), kind: HighlightSpanKind.no...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
getHighlightSpanForNode
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getSemanticDocumentHighlights(node) { if (node.kind === 69 /* Identifier */ || node.kind === 97 /* ThisKeyword */ || node.kind === 95 /* SuperKeyword */ || isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || is...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
getSemanticDocumentHighlights
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function convertReferencedSymbols(referencedSymbols) { if (!referencedSymbols) { return undefined; } var fileNameToDocumentHighlights = {}; var result = []; for (var _i = 0, referencedSymbols_1 = ...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
convertReferencedSymbols
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getSyntacticDocumentHighlights(node) { var fileName = sourceFile.fileName; var highlightSpans = getHighlightSpans(node); if (!highlightSpans || highlightSpans.length === 0) { return undefined; } return [{ fileNa...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
getSyntacticDocumentHighlights
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function hasKind(node, kind) { return node !== undefined && node.kind === kind; }
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
hasKind
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function parent(node) { return node && node.parent; }
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
parent
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getHighlightSpans(node) { if (node) { switch (node.kind) { case 88 /* IfKeyword */: case 80 /* ElseKeyword */: if (hasKind(node.parent, 196 /* IfStatement */)) { ...
Filters out completion suggestions from 'symbols' according to existing JSX attributes. @returns Symbols to be suggested in a JSX element, barring those whose attributes do not occur at the current position and have not otherwise been typed.
getHighlightSpans
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function aggregateOwnedThrowStatements(node) { var statementAccumulator = []; aggregate(node); return statementAccumulator; function aggregate(node) { if (node.kind === 208 /* ThrowStatement */) { ...
Aggregates all throw-statements within this node *without* crossing into function boundaries and try-blocks with catch-clauses.
aggregateOwnedThrowStatements
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT