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 isJSDocConstructSignature(node) { return node.kind === 261 /* JSDocFunctionType */ && node.parameters.length > 0 && node.parameters[0].type.kind === 263 /* JSDocConstructorType */; }
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
isJSDocConstructSignature
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getJSDocTag(node, kind) { if (node && node.jsDocComment) { for (var _i = 0, _a = node.jsDocComment.tags; _i < _a.length; _i++) { var tag = _a[_i]; if (tag.kind === kind) { return tag; } } } }
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
getJSDocTag
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getJSDocTypeTag(node) { return getJSDocTag(node, 269 /* JSDocTypeTag */); }
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
getJSDocTypeTag
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getJSDocReturnTag(node) { return getJSDocTag(node, 268 /* JSDocReturnTag */); }
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
getJSDocReturnTag
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getJSDocTemplateTag(node) { return getJSDocTag(node, 270 /* JSDocTemplateTag */); }
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
getJSDocTemplateTag
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getCorrespondingJSDocParameterTag(parameter) { if (parameter.name && parameter.name.kind === 69 /* Identifier */) { // If it's a parameter, see if the parent has a jsdoc comment with an @param // annotation. var parameterName = parameter.name.text; var do...
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
getCorrespondingJSDocParameterTag
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function hasRestParameter(s) { return isRestParameter(ts.lastOrUndefined(s.parameters)); }
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
hasRestParameter
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isRestParameter(node) { if (node) { if (node.parserContextFlags & 32 /* JavaScriptFile */) { if (node.type && node.type.kind === 262 /* JSDocVariadicType */) { return true; } var paramTag = getCorrespondingJSDocParameterTag...
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
isRestParameter
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isLiteralKind(kind) { return 8 /* FirstLiteralToken */ <= kind && kind <= 11 /* LastLiteralToken */; }
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
isLiteralKind
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isTextualLiteralKind(kind) { return kind === 9 /* StringLiteral */ || kind === 11 /* NoSubstitutionTemplateLiteral */; }
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
isTextualLiteralKind
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isTemplateLiteralKind(kind) { return 11 /* FirstTemplateToken */ <= kind && kind <= 14 /* LastTemplateToken */; }
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
isTemplateLiteralKind
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isBindingPattern(node) { return !!node && (node.kind === 162 /* ArrayBindingPattern */ || node.kind === 161 /* ObjectBindingPattern */); }
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
isBindingPattern
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isNodeDescendentOf(node, ancestor) { while (node) { if (node === ancestor) return true; node = node.parent; } return false; }
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
isNodeDescendentOf
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isInAmbientContext(node) { while (node) { if (node.flags & (4 /* Ambient */ | 4096 /* DeclarationFile */)) { return true; } node = node.parent; } return false; }
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
isInAmbientContext
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isDeclaration(node) { switch (node.kind) { case 174 /* ArrowFunction */: case 163 /* BindingElement */: case 214 /* ClassDeclaration */: case 186 /* ClassExpression */: case 144 /* Constructor */: case 217 /* EnumDeclaration */: ...
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
isDeclaration
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isStatement(n) { switch (n.kind) { case 203 /* BreakStatement */: case 202 /* ContinueStatement */: case 210 /* DebuggerStatement */: case 197 /* DoStatement */: case 195 /* ExpressionStatement */: case 194 /* EmptyStatement */: ...
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
isStatement
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isClassElement(n) { switch (n.kind) { case 144 /* Constructor */: case 141 /* PropertyDeclaration */: case 143 /* MethodDeclaration */: case 145 /* GetAccessor */: case 146 /* SetAccessor */: case 142 /* MethodSignature */: ...
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
isClassElement
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getClassExtendsHeritageClauseElement(node) { var heritageClause = getHeritageClause(node.heritageClauses, 83 /* ExtendsKeyword */); return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; }
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
getClassExtendsHeritageClauseElement
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getClassImplementsHeritageClauseElements(node) { var heritageClause = getHeritageClause(node.heritageClauses, 106 /* ImplementsKeyword */); return heritageClause ? heritageClause.types : undefined; }
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
getClassImplementsHeritageClauseElements
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getInterfaceBaseTypeNodes(node) { var heritageClause = getHeritageClause(node.heritageClauses, 83 /* ExtendsKeyword */); return heritageClause ? heritageClause.types : undefined; }
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
getInterfaceBaseTypeNodes
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getHeritageClause(clauses, kind) { if (clauses) { for (var _i = 0, clauses_1 = clauses; _i < clauses_1.length; _i++) { var clause = clauses_1[_i]; if (clause.token === kind) { return clause; } } } ...
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
getHeritageClause
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function tryResolveScriptReference(host, sourceFile, reference) { if (!host.getCompilerOptions().noResolve) { var referenceFileName = ts.isRootedDiskPath(reference.fileName) ? reference.fileName : ts.combinePaths(ts.getDirectoryPath(sourceFile.fileName), reference.fileName); return host....
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
tryResolveScriptReference
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getAncestor(node, kind) { while (node) { if (node.kind === kind) { return node; } node = node.parent; } return undefined; }
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
getAncestor
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getFileReferenceFromReferencePath(comment, commentRange) { var simpleReferenceRegEx = /^\/\/\/\s*<reference\s+/gim; var isNoDefaultLibRegEx = /^(\/\/\/\s*<reference\s+no-default-lib\s*=\s*)('|")(.+?)\2\s*\/>/gim; if (simpleReferenceRegEx.test(comment)) { if (isNoDefaultLibRe...
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
getFileReferenceFromReferencePath
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isKeyword(token) { return 70 /* FirstKeyword */ <= token && token <= 134 /* LastKeyword */; }
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
isKeyword
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isTrivia(token) { return 2 /* FirstTriviaToken */ <= token && token <= 7 /* LastTriviaToken */; }
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
isTrivia
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isAsyncFunctionLike(node) { return isFunctionLike(node) && (node.flags & 256 /* Async */) !== 0 && !isAccessor(node); }
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
isAsyncFunctionLike
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isStringOrNumericLiteral(kind) { return kind === 9 /* StringLiteral */ || kind === 8 /* NumericLiteral */; }
Returns true if the node is an assignment to the property access expression 'module.exports'. This function does not test if the node is in a JavaScript file or not.
isStringOrNumericLiteral
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function hasDynamicName(declaration) { return declaration.name && isDynamicName(declaration.name); }
A declaration has a dynamic name if both of the following are true: 1. The declaration has a computed property name 2. The computed name is *not* expressed as Symbol.<name>, where name is a property of the Symbol constructor that denotes a built in Symbol.
hasDynamicName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isDynamicName(name) { return name.kind === 136 /* ComputedPropertyName */ && !isStringOrNumericLiteral(name.expression.kind) && !isWellKnownSymbolSyntactically(name.expression); }
A declaration has a dynamic name if both of the following are true: 1. The declaration has a computed property name 2. The computed name is *not* expressed as Symbol.<name>, where name is a property of the Symbol constructor that denotes a built in Symbol.
isDynamicName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isWellKnownSymbolSyntactically(node) { return isPropertyAccessExpression(node) && isESSymbolIdentifier(node.expression); }
Checks if the expression is of the form: Symbol.name where Symbol is literally the word "Symbol", and name is any identifierName
isWellKnownSymbolSyntactically
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getPropertyNameForPropertyNameNode(name) { if (name.kind === 69 /* Identifier */ || name.kind === 9 /* StringLiteral */ || name.kind === 8 /* NumericLiteral */) { return name.text; } if (name.kind === 136 /* ComputedPropertyName */) { var nameExpression = name.ex...
Checks if the expression is of the form: Symbol.name where Symbol is literally the word "Symbol", and name is any identifierName
getPropertyNameForPropertyNameNode
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getPropertyNameForKnownSymbolName(symbolName) { return "__@" + symbolName; }
Checks if the expression is of the form: Symbol.name where Symbol is literally the word "Symbol", and name is any identifierName
getPropertyNameForKnownSymbolName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isESSymbolIdentifier(node) { return node.kind === 69 /* Identifier */ && node.text === "Symbol"; }
Includes the word "Symbol" with unicode escapes
isESSymbolIdentifier
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isModifier(token) { switch (token) { case 115 /* AbstractKeyword */: case 118 /* AsyncKeyword */: case 74 /* ConstKeyword */: case 122 /* DeclareKeyword */: case 77 /* DefaultKeyword */: case 82 /* ExportKeyword */: cas...
Includes the word "Symbol" with unicode escapes
isModifier
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isParameterDeclaration(node) { var root = getRootDeclaration(node); return root.kind === 138 /* Parameter */; }
Includes the word "Symbol" with unicode escapes
isParameterDeclaration
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getRootDeclaration(node) { while (node.kind === 163 /* BindingElement */) { node = node.parent.parent; } return node; }
Includes the word "Symbol" with unicode escapes
getRootDeclaration
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function nodeStartsNewLexicalEnvironment(n) { return isFunctionLike(n) || n.kind === 218 /* ModuleDeclaration */ || n.kind === 248 /* SourceFile */; }
Includes the word "Symbol" with unicode escapes
nodeStartsNewLexicalEnvironment
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function cloneEntityName(node) { if (node.kind === 69 /* Identifier */) { var clone_1 = createSynthesizedNode(69 /* Identifier */); clone_1.text = node.text; return clone_1; } else { var clone_2 = createSynthesizedNode(135 /* QualifiedName */); ...
Includes the word "Symbol" with unicode escapes
cloneEntityName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function nodeIsSynthesized(node) { return node.pos === -1; }
Includes the word "Symbol" with unicode escapes
nodeIsSynthesized
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createSynthesizedNode(kind, startsOnNewLine) { var node = ts.createNode(kind, /* pos */ -1, /* end */ -1); node.startsOnNewLine = startsOnNewLine; return node; }
Includes the word "Symbol" with unicode escapes
createSynthesizedNode
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createSynthesizedNodeArray() { var array = []; array.pos = -1; array.end = -1; return array; }
Includes the word "Symbol" with unicode escapes
createSynthesizedNodeArray
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createDiagnosticCollection() { var nonFileDiagnostics = []; var fileDiagnostics = {}; var diagnosticsModified = false; var modificationCount = 0; return { add: add, getGlobalDiagnostics: getGlobalDiagnostics, getDiagnostics: getDiagnos...
Includes the word "Symbol" with unicode escapes
createDiagnosticCollection
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getModificationCount() { return modificationCount; }
Includes the word "Symbol" with unicode escapes
getModificationCount
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function reattachFileDiagnostics(newFile) { if (!ts.hasProperty(fileDiagnostics, newFile.fileName)) { return; } for (var _i = 0, _a = fileDiagnostics[newFile.fileName]; _i < _a.length; _i++) { var diagnostic = _a[_i]; diagnostic.file = ...
Includes the word "Symbol" with unicode escapes
reattachFileDiagnostics
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function add(diagnostic) { var diagnostics; if (diagnostic.file) { diagnostics = fileDiagnostics[diagnostic.file.fileName]; if (!diagnostics) { diagnostics = []; fileDiagnostics[diagnostic.file.fileName] = diagnostics; ...
Includes the word "Symbol" with unicode escapes
add
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getGlobalDiagnostics() { sortAndDeduplicate(); return nonFileDiagnostics; }
Includes the word "Symbol" with unicode escapes
getGlobalDiagnostics
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getDiagnostics(fileName) { sortAndDeduplicate(); if (fileName) { return fileDiagnostics[fileName] || []; } var allDiagnostics = []; function pushDiagnostic(d) { allDiagnostics.push(d); } ts.forEa...
Includes the word "Symbol" with unicode escapes
getDiagnostics
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function sortAndDeduplicate() { if (!diagnosticsModified) { return; } diagnosticsModified = false; nonFileDiagnostics = ts.sortAndDeduplicateDiagnostics(nonFileDiagnostics); for (var key in fileDiagnostics) { if (ts.hasProperty(...
Includes the word "Symbol" with unicode escapes
sortAndDeduplicate
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getReplacement(c) { return escapedCharsMap[c] || get16BitUnicodeEscapeSequence(c.charCodeAt(0)); }
Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) Note that this doesn't actually wrap the input in double quotes.
getReplacement
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isIntrinsicJsxName(name) { var ch = name.substr(0, 1); return ch.toLowerCase() === ch; }
Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) Note that this doesn't actually wrap the input in double quotes.
isIntrinsicJsxName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function get16BitUnicodeEscapeSequence(charCode) { var hexCharCode = charCode.toString(16).toUpperCase(); var paddedHexCode = ("0000" + hexCharCode).slice(-4); return "\\u" + paddedHexCode; }
Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) Note that this doesn't actually wrap the input in double quotes.
get16BitUnicodeEscapeSequence
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function escapeNonAsciiCharacters(s) { // Replace non-ASCII characters with '\uNNNN' escapes if any exist. // Otherwise just return the original string. return nonAsciiCharacters.test(s) ? s.replace(nonAsciiCharacters, function (c) { return get16BitUnicodeEscapeSequence(c.charCodeAt(...
Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) Note that this doesn't actually wrap the input in double quotes.
escapeNonAsciiCharacters
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getIndentString(level) { if (indentStrings[level] === undefined) { indentStrings[level] = getIndentString(level - 1) + indentStrings[1]; } return indentStrings[level]; }
Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) Note that this doesn't actually wrap the input in double quotes.
getIndentString
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getIndentSize() { return indentStrings[1].length; }
Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) Note that this doesn't actually wrap the input in double quotes.
getIndentSize
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createTextWriter(newLine) { var output; var indent; var lineStart; var lineCount; var linePos; function write(s) { if (s && s.length) { if (lineStart) { output += getIndentString(indent); lineSta...
Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) Note that this doesn't actually wrap the input in double quotes.
createTextWriter
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function write(s) { if (s && s.length) { if (lineStart) { output += getIndentString(indent); lineStart = false; } output += s; } }
Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) Note that this doesn't actually wrap the input in double quotes.
write
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function reset() { output = ""; indent = 0; lineStart = true; lineCount = 0; linePos = 0; }
Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) Note that this doesn't actually wrap the input in double quotes.
reset
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function rawWrite(s) { if (s !== undefined) { if (lineStart) { lineStart = false; } output += s; } }
Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) Note that this doesn't actually wrap the input in double quotes.
rawWrite
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function writeLiteral(s) { if (s && s.length) { write(s); var lineStartsOfS = ts.computeLineStarts(s); if (lineStartsOfS.length > 1) { lineCount = lineCount + lineStartsOfS.length - 1; linePos = output.length - s.length ...
Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) Note that this doesn't actually wrap the input in double quotes.
writeLiteral
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function writeLine() { if (!lineStart) { output += newLine; lineCount++; linePos = output.length; lineStart = true; } }
Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) Note that this doesn't actually wrap the input in double quotes.
writeLine
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function writeTextOfNode(text, node) { write(getTextOfNodeFromSourceText(text, node)); }
Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) Note that this doesn't actually wrap the input in double quotes.
writeTextOfNode
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function emitDetachedComments(text, lineMap, writer, writeComment, node, newLine, removeComments) { var leadingComments; var currentDetachedCommentInfo; if (removeComments) { // removeComments is true, only reserve pinned comment at the top of file // For example: ...
Detached comment is a comment at the top of file or function body that is separated from the next statement by space.
emitDetachedComments
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isPinnedComment(comment) { return text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 2) === 33 /* exclamation */; }
Detached comment is a comment at the top of file or function body that is separated from the next statement by space.
isPinnedComment
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function writeCommentRange(text, lineMap, writer, comment, newLine) { if (text.charCodeAt(comment.pos + 1) === 42 /* asterisk */) { var firstCommentLineAndCharacter = ts.computeLineAndCharacterOfPosition(lineMap, comment.pos); var lineCount = lineMap.length; var firstCommentL...
Detached comment is a comment at the top of file or function body that is separated from the next statement by space.
writeCommentRange
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function writeTrimmedCurrentLine(text, comment, writer, newLine, pos, nextLineStart) { var end = Math.min(comment.end, nextLineStart - 1); var currentLineText = text.substring(pos, end).replace(/^\s+|\s+$/g, ""); if (currentLineText) { // trimmed forward and ending spaces text ...
Detached comment is a comment at the top of file or function body that is separated from the next statement by space.
writeTrimmedCurrentLine
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function calculateIndent(text, pos, end) { var currentLineIndent = 0; for (; pos < end && ts.isWhiteSpace(text.charCodeAt(pos)); pos++) { if (text.charCodeAt(pos) === 9 /* tab */) { // Tabs = TabSize = indent size and go to next tabStop currentLineIndent += ge...
Detached comment is a comment at the top of file or function body that is separated from the next statement by space.
calculateIndent
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function modifierToFlag(token) { switch (token) { case 113 /* StaticKeyword */: return 64 /* Static */; case 112 /* PublicKeyword */: return 8 /* Public */; case 111 /* ProtectedKeyword */: return 32 /* Protected */; case 110 /* PrivateKeyword */: return 16 /* Pri...
Detached comment is a comment at the top of file or function body that is separated from the next statement by space.
modifierToFlag
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isLeftHandSideExpression(expr) { if (expr) { switch (expr.kind) { case 166 /* PropertyAccessExpression */: case 167 /* ElementAccessExpression */: case 169 /* NewExpression */: case 168 /* CallExpression */: cas...
Detached comment is a comment at the top of file or function body that is separated from the next statement by space.
isLeftHandSideExpression
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isAssignmentOperator(token) { return token >= 56 /* FirstAssignment */ && token <= 68 /* LastAssignment */; }
Detached comment is a comment at the top of file or function body that is separated from the next statement by space.
isAssignmentOperator
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isExpressionWithTypeArgumentsInClassExtendsClause(node) { return node.kind === 188 /* ExpressionWithTypeArguments */ && node.parent.token === 83 /* ExtendsKeyword */ && isClassLike(node.parent.parent); }
Detached comment is a comment at the top of file or function body that is separated from the next statement by space.
isExpressionWithTypeArgumentsInClassExtendsClause
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isSupportedExpressionWithTypeArguments(node) { return isSupportedExpressionWithTypeArgumentsRest(node.expression); }
Detached comment is a comment at the top of file or function body that is separated from the next statement by space.
isSupportedExpressionWithTypeArguments
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isSupportedExpressionWithTypeArgumentsRest(node) { if (node.kind === 69 /* Identifier */) { return true; } else if (isPropertyAccessExpression(node)) { return isSupportedExpressionWithTypeArgumentsRest(node.expression); } else { return...
Detached comment is a comment at the top of file or function body that is separated from the next statement by space.
isSupportedExpressionWithTypeArgumentsRest
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isRightSideOfQualifiedNameOrPropertyAccess(node) { return (node.parent.kind === 135 /* QualifiedName */ && node.parent.right === node) || (node.parent.kind === 166 /* PropertyAccessExpression */ && node.parent.name === node); }
Detached comment is a comment at the top of file or function body that is separated from the next statement by space.
isRightSideOfQualifiedNameOrPropertyAccess
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function isEmptyObjectLiteralOrArrayLiteral(expression) { var kind = expression.kind; if (kind === 165 /* ObjectLiteralExpression */) { return expression.properties.length === 0; } if (kind === 164 /* ArrayLiteralExpression */) { return expression.elements.length ...
Detached comment is a comment at the top of file or function body that is separated from the next statement by space.
isEmptyObjectLiteralOrArrayLiteral
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getLocalSymbolForExportDefault(symbol) { return symbol && symbol.valueDeclaration && (symbol.valueDeclaration.flags & 512 /* Default */) ? symbol.valueDeclaration.localSymbol : undefined; }
Detached comment is a comment at the top of file or function body that is separated from the next statement by space.
getLocalSymbolForExportDefault
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function hasJavaScriptFileExtension(fileName) { return ts.fileExtensionIs(fileName, ".js") || ts.fileExtensionIs(fileName, ".jsx"); }
Detached comment is a comment at the top of file or function body that is separated from the next statement by space.
hasJavaScriptFileExtension
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function allowsJsxExpressions(fileName) { return ts.fileExtensionIs(fileName, ".tsx") || ts.fileExtensionIs(fileName, ".jsx"); }
Detached comment is a comment at the top of file or function body that is separated from the next statement by space.
allowsJsxExpressions
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function convertToBase64(input) { var result = ""; var charCodes = getExpandedCharCodes(input); var i = 0; var length = charCodes.length; var byte1, byte2, byte3, byte4; while (i < length) { // Convert every 6-bits in the input 3 character points /...
Converts a string to a base-64 encoded ASCII string.
convertToBase64
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function convertToRelativePath(absoluteOrRelativePath, basePath, getCanonicalFileName) { return !ts.isRootedDiskPath(absoluteOrRelativePath) ? absoluteOrRelativePath : ts.getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, /* isAbsolutePathAn...
Converts a string to a base-64 encoded ASCII string.
convertToRelativePath
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getNewLineCharacter(options) { if (options.newLine === 0 /* CarriageReturnLineFeed */) { return carriageReturnLineFeed; } else if (options.newLine === 1 /* LineFeed */) { return lineFeed; } else if (ts.sys) { return ts.sys.newLine; ...
Converts a string to a base-64 encoded ASCII string.
getNewLineCharacter
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getDefaultLibFileName(options) { return options.target === 2 /* ES6 */ ? "lib.es6.d.ts" : "lib.d.ts"; }
Converts a string to a base-64 encoded ASCII string.
getDefaultLibFileName
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function textSpanEnd(span) { return span.start + span.length; }
Converts a string to a base-64 encoded ASCII string.
textSpanEnd
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function textSpanIsEmpty(span) { return span.length === 0; }
Converts a string to a base-64 encoded ASCII string.
textSpanIsEmpty
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function textSpanContainsPosition(span, position) { return position >= span.start && position < textSpanEnd(span); }
Converts a string to a base-64 encoded ASCII string.
textSpanContainsPosition
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function textSpanOverlapsWith(span, other) { var overlapStart = Math.max(span.start, other.start); var overlapEnd = Math.min(textSpanEnd(span), textSpanEnd(other)); return overlapStart < overlapEnd; }
Converts a string to a base-64 encoded ASCII string.
textSpanOverlapsWith
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function textSpanOverlap(span1, span2) { var overlapStart = Math.max(span1.start, span2.start); var overlapEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2)); if (overlapStart < overlapEnd) { return createTextSpanFromBounds(overlapStart, overlapEnd); } return unde...
Converts a string to a base-64 encoded ASCII string.
textSpanOverlap
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function textSpanIntersectsWithTextSpan(span, other) { return other.start <= textSpanEnd(span) && textSpanEnd(other) >= span.start; }
Converts a string to a base-64 encoded ASCII string.
textSpanIntersectsWithTextSpan
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function textSpanIntersectsWith(span, start, length) { var end = start + length; return start <= textSpanEnd(span) && end >= span.start; }
Converts a string to a base-64 encoded ASCII string.
textSpanIntersectsWith
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function decodedTextSpanIntersectsWith(start1, length1, start2, length2) { var end1 = start1 + length1; var end2 = start2 + length2; return start2 <= end1 && end2 >= start1; }
Converts a string to a base-64 encoded ASCII string.
decodedTextSpanIntersectsWith
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function textSpanIntersectsWithPosition(span, position) { return position <= textSpanEnd(span) && position >= span.start; }
Converts a string to a base-64 encoded ASCII string.
textSpanIntersectsWithPosition
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function textSpanIntersection(span1, span2) { var intersectStart = Math.max(span1.start, span2.start); var intersectEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2)); if (intersectStart <= intersectEnd) { return createTextSpanFromBounds(intersectStart, intersectEnd); } ...
Converts a string to a base-64 encoded ASCII string.
textSpanIntersection
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createTextSpan(start, length) { if (start < 0) { throw new Error("start < 0"); } if (length < 0) { throw new Error("length < 0"); } return { start: start, length: length }; }
Converts a string to a base-64 encoded ASCII string.
createTextSpan
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createTextSpanFromBounds(start, end) { return createTextSpan(start, end - start); }
Converts a string to a base-64 encoded ASCII string.
createTextSpanFromBounds
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function textChangeRangeNewSpan(range) { return createTextSpan(range.span.start, range.newLength); }
Converts a string to a base-64 encoded ASCII string.
textChangeRangeNewSpan
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function textChangeRangeIsUnchanged(range) { return textSpanIsEmpty(range.span) && range.newLength === 0; }
Converts a string to a base-64 encoded ASCII string.
textChangeRangeIsUnchanged
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createTextChangeRange(span, newLength) { if (newLength < 0) { throw new Error("newLength < 0"); } return { span: span, newLength: newLength }; }
Converts a string to a base-64 encoded ASCII string.
createTextChangeRange
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function collapseTextChangeRangesAcrossMultipleVersions(changes) { if (changes.length === 0) { return ts.unchangedTextChangeRange; } if (changes.length === 1) { return changes[0]; } // We change from talking about { { oldStart, oldLength }, newLength } to ...
Called to merge all the changes that occurred across several versions of a script snapshot into a single change. i.e. if a user keeps making successive edits to a script we will have a text change from V1 to V2, V2 to V3, ..., Vn. This function will then merge those changes into a single change range valid between V1...
collapseTextChangeRangesAcrossMultipleVersions
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function getTypeParameterOwner(d) { if (d && d.kind === 137 /* TypeParameter */) { for (var current = d; current; current = current.parent) { if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 215 /* InterfaceDeclaration */) { return cur...
Called to merge all the changes that occurred across several versions of a script snapshot into a single change. i.e. if a user keeps making successive edits to a script we will have a text change from V1 to V2, V2 to V3, ..., Vn. This function will then merge those changes into a single change range valid between V1...
getTypeParameterOwner
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT
function createNode(kind, pos, end) { if (kind === 248 /* SourceFile */) { return new (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))(kind, pos, end); } else { return new (NodeConstructor || (NodeConstructor = ts.objectAl...
Called to merge all the changes that occurred across several versions of a script snapshot into a single change. i.e. if a user keeps making successive edits to a script we will have a text change from V1 to V2, V2 to V3, ..., Vn. This function will then merge those changes into a single change range valid between V1...
createNode
javascript
amol-/dukpy
dukpy/jsmodules/typescriptServices.js
https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js
MIT