id
int32
0
58k
repo
stringlengths
5
67
path
stringlengths
4
116
func_name
stringlengths
0
58
original_string
stringlengths
52
373k
language
stringclasses
1 value
code
stringlengths
52
373k
code_tokens
list
docstring
stringlengths
4
11.8k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
86
226
30,000
opendigitaleducation/sijil.js
docs/libs/typescript.js
isInSomeParsingContext
function isInSomeParsingContext() { for (var kind = 0; kind < 26 /* Count */; kind++) { if (parsingContext & (1 << kind)) { if (isListElement(kind, /*inErrorRecovery*/ true) || isListTerminator(kind)) { return true; } ...
javascript
function isInSomeParsingContext() { for (var kind = 0; kind < 26 /* Count */; kind++) { if (parsingContext & (1 << kind)) { if (isListElement(kind, /*inErrorRecovery*/ true) || isListTerminator(kind)) { return true; } ...
[ "function", "isInSomeParsingContext", "(", ")", "{", "for", "(", "var", "kind", "=", "0", ";", "kind", "<", "26", "/* Count */", ";", "kind", "++", ")", "{", "if", "(", "parsingContext", "&", "(", "1", "<<", "kind", ")", ")", "{", "if", "(", "isLis...
True if positioned at element or terminator of the current list or any enclosing list
[ "True", "if", "positioned", "at", "element", "or", "terminator", "of", "the", "current", "list", "or", "any", "enclosing", "list" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L9585-L9594
30,001
opendigitaleducation/sijil.js
docs/libs/typescript.js
parseList
function parseList(kind, parseElement) { var saveParsingContext = parsingContext; parsingContext |= 1 << kind; var result = []; result.pos = getNodePos(); while (!isListTerminator(kind)) { if (isListElement(kind, /*inErrorRecovery*/ false)) { ...
javascript
function parseList(kind, parseElement) { var saveParsingContext = parsingContext; parsingContext |= 1 << kind; var result = []; result.pos = getNodePos(); while (!isListTerminator(kind)) { if (isListElement(kind, /*inErrorRecovery*/ false)) { ...
[ "function", "parseList", "(", "kind", ",", "parseElement", ")", "{", "var", "saveParsingContext", "=", "parsingContext", ";", "parsingContext", "|=", "1", "<<", "kind", ";", "var", "result", "=", "[", "]", ";", "result", ".", "pos", "=", "getNodePos", "(",...
Parses a list of elements
[ "Parses", "a", "list", "of", "elements" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L9596-L9614
30,002
opendigitaleducation/sijil.js
docs/libs/typescript.js
parseDelimitedList
function parseDelimitedList(kind, parseElement, considerSemicolonAsDelimiter) { var saveParsingContext = parsingContext; parsingContext |= 1 << kind; var result = []; result.pos = getNodePos(); var commaStart = -1; // Meaning the previous token was not a comma...
javascript
function parseDelimitedList(kind, parseElement, considerSemicolonAsDelimiter) { var saveParsingContext = parsingContext; parsingContext |= 1 << kind; var result = []; result.pos = getNodePos(); var commaStart = -1; // Meaning the previous token was not a comma...
[ "function", "parseDelimitedList", "(", "kind", ",", "parseElement", ",", "considerSemicolonAsDelimiter", ")", "{", "var", "saveParsingContext", "=", "parsingContext", ";", "parsingContext", "|=", "1", "<<", "kind", ";", "var", "result", "=", "[", "]", ";", "resu...
Parses a comma-delimited list of elements
[ "Parses", "a", "comma", "-", "delimited", "list", "of", "elements" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L9894-L9943
30,003
opendigitaleducation/sijil.js
docs/libs/typescript.js
parseUnaryExpressionOrHigher
function parseUnaryExpressionOrHigher() { /** * ES7 UpdateExpression: * 1) LeftHandSideExpression[?Yield] * 2) LeftHandSideExpression[?Yield][no LineTerminator here]++ * 3) LeftHandSideExpression[?Yield][no LineTerminator here]-- ...
javascript
function parseUnaryExpressionOrHigher() { /** * ES7 UpdateExpression: * 1) LeftHandSideExpression[?Yield] * 2) LeftHandSideExpression[?Yield][no LineTerminator here]++ * 3) LeftHandSideExpression[?Yield][no LineTerminator here]-- ...
[ "function", "parseUnaryExpressionOrHigher", "(", ")", "{", "/**\n * ES7 UpdateExpression:\n * 1) LeftHandSideExpression[?Yield]\n * 2) LeftHandSideExpression[?Yield][no LineTerminator here]++\n * 3) LeftHandSideExpression[?Yield][no LineTermin...
Parse ES7 exponential expression and await expression ES7 ExponentiationExpression: 1) UnaryExpression[?Yield] 2) UpdateExpression[?Yield] ** ExponentiationExpression[?Yield]
[ "Parse", "ES7", "exponential", "expression", "and", "await", "expression" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L11284-L11322
30,004
opendigitaleducation/sijil.js
docs/libs/typescript.js
parseIncrementExpression
function parseIncrementExpression() { if (token() === 41 /* PlusPlusToken */ || token() === 42 /* MinusMinusToken */) { var node = createNode(185 /* PrefixUnaryExpression */); node.operator = token(); nextToken(); node.operand = parseLeftHandSi...
javascript
function parseIncrementExpression() { if (token() === 41 /* PlusPlusToken */ || token() === 42 /* MinusMinusToken */) { var node = createNode(185 /* PrefixUnaryExpression */); node.operator = token(); nextToken(); node.operand = parseLeftHandSi...
[ "function", "parseIncrementExpression", "(", ")", "{", "if", "(", "token", "(", ")", "===", "41", "/* PlusPlusToken */", "||", "token", "(", ")", "===", "42", "/* MinusMinusToken */", ")", "{", "var", "node", "=", "createNode", "(", "185", "/* PrefixUnaryExpre...
Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. ES7 IncrementExpression[yield]: 1) LeftHandSideExpression[?yield] 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- 4) ++LeftHandSideExpression[?yie...
[ "Parse", "ES7", "IncrementExpression", ".", "IncrementExpression", "is", "used", "instead", "of", "ES6", "s", "PostFixExpression", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L11408-L11430
30,005
opendigitaleducation/sijil.js
docs/libs/typescript.js
parseEnumMember
function parseEnumMember() { var node = createNode(255 /* EnumMember */, scanner.getStartPos()); node.name = parsePropertyName(); node.initializer = allowInAnd(parseNonParameterInitializer); return finishNode(node); }
javascript
function parseEnumMember() { var node = createNode(255 /* EnumMember */, scanner.getStartPos()); node.name = parsePropertyName(); node.initializer = allowInAnd(parseNonParameterInitializer); return finishNode(node); }
[ "function", "parseEnumMember", "(", ")", "{", "var", "node", "=", "createNode", "(", "255", "/* EnumMember */", ",", "scanner", ".", "getStartPos", "(", ")", ")", ";", "node", ".", "name", "=", "parsePropertyName", "(", ")", ";", "node", ".", "initializer"...
In an ambient declaration, the grammar only allows integer literals as initializers. In a non-ambient declaration, the grammar allows uninitialized members only in a ConstantEnumMemberSection, which starts at the beginning of an enum declaration or any time an integer literal initializer is encountered.
[ "In", "an", "ambient", "declaration", "the", "grammar", "only", "allows", "integer", "literals", "as", "initializers", ".", "In", "a", "non", "-", "ambient", "declaration", "the", "grammar", "allows", "uninitialized", "members", "only", "in", "a", "ConstantEnumM...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L13028-L13033
30,006
opendigitaleducation/sijil.js
docs/libs/typescript.js
tryFile
function tryFile(fileName, failedLookupLocation, onlyRecordFailures, state) { if (!onlyRecordFailures && state.host.fileExists(fileName)) { if (state.traceEnabled) { ts.trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName); } ...
javascript
function tryFile(fileName, failedLookupLocation, onlyRecordFailures, state) { if (!onlyRecordFailures && state.host.fileExists(fileName)) { if (state.traceEnabled) { ts.trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName); } ...
[ "function", "tryFile", "(", "fileName", ",", "failedLookupLocation", ",", "onlyRecordFailures", ",", "state", ")", "{", "if", "(", "!", "onlyRecordFailures", "&&", "state", ".", "host", ".", "fileExists", "(", "fileName", ")", ")", "{", "if", "(", "state", ...
Return the file if it exists.
[ "Return", "the", "file", "if", "it", "exists", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L14602-L14616
30,007
opendigitaleducation/sijil.js
docs/libs/typescript.js
tryAddingExtensions
function tryAddingExtensions(candidate, extensions, failedLookupLocation, onlyRecordFailures, state) { if (!onlyRecordFailures) { // check if containing folder exists - if it doesn't then just record failures for all supported extensions without disk probing var directory = ts.getDirecto...
javascript
function tryAddingExtensions(candidate, extensions, failedLookupLocation, onlyRecordFailures, state) { if (!onlyRecordFailures) { // check if containing folder exists - if it doesn't then just record failures for all supported extensions without disk probing var directory = ts.getDirecto...
[ "function", "tryAddingExtensions", "(", "candidate", ",", "extensions", ",", "failedLookupLocation", ",", "onlyRecordFailures", ",", "state", ")", "{", "if", "(", "!", "onlyRecordFailures", ")", "{", "// check if containing folder exists - if it doesn't then just record failu...
Try to return an existing file that adds one of the `extensions` to `candidate`.
[ "Try", "to", "return", "an", "existing", "file", "that", "adds", "one", "of", "the", "extensions", "to", "candidate", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L14618-L14629
30,008
opendigitaleducation/sijil.js
docs/libs/typescript.js
getDeclarationName
function getDeclarationName(node) { if (node.name) { if (ts.isAmbientModule(node)) { return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\""; } if (node.name.kind === 140 /* ComputedPropertyName */) { ...
javascript
function getDeclarationName(node) { if (node.name) { if (ts.isAmbientModule(node)) { return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\""; } if (node.name.kind === 140 /* ComputedPropertyName */) { ...
[ "function", "getDeclarationName", "(", "node", ")", "{", "if", "(", "node", ".", "name", ")", "{", "if", "(", "ts", ".", "isAmbientModule", "(", "node", ")", ")", "{", "return", "ts", ".", "isGlobalScopeAugmentation", "(", "node", ")", "?", "\"__global\"...
Should not be called on a declaration with a computed property name, unless it is a well known Symbol.
[ "Should", "not", "be", "called", "on", "a", "declaration", "with", "a", "computed", "property", "name", "unless", "it", "is", "a", "well", "known", "Symbol", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L15270-L15341
30,009
opendigitaleducation/sijil.js
docs/libs/typescript.js
declareSymbol
function declareSymbol(symbolTable, parent, node, includes, excludes) { ts.Debug.assert(!ts.hasDynamicName(node)); var isDefaultExport = node.flags & 512 /* Default */; // The exported symbol for an export default function/class node is always named "default" var name = i...
javascript
function declareSymbol(symbolTable, parent, node, includes, excludes) { ts.Debug.assert(!ts.hasDynamicName(node)); var isDefaultExport = node.flags & 512 /* Default */; // The exported symbol for an export default function/class node is always named "default" var name = i...
[ "function", "declareSymbol", "(", "symbolTable", ",", "parent", ",", "node", ",", "includes", ",", "excludes", ")", "{", "ts", ".", "Debug", ".", "assert", "(", "!", "ts", ".", "hasDynamicName", "(", "node", ")", ")", ";", "var", "isDefaultExport", "=", ...
Declares a Symbol for the node and adds it to symbols. Reports errors for conflicting identifier names. @param symbolTable - The symbol table which node will be added to. @param parent - node's parent declaration. @param node - The declaration to be added to the symbol table @param includes - The SymbolFlags that node ...
[ "Declares", "a", "Symbol", "for", "the", "node", "and", "adds", "it", "to", "symbols", ".", "Reports", "errors", "for", "conflicting", "identifier", "names", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L15353-L15421
30,010
opendigitaleducation/sijil.js
docs/libs/typescript.js
bindContainer
function bindContainer(node, containerFlags) { // Before we recurse into a node's children, we first save the existing parent, container // and block-container. Then after we pop out of processing the children, we restore // these saved values. var saveContainer = contai...
javascript
function bindContainer(node, containerFlags) { // Before we recurse into a node's children, we first save the existing parent, container // and block-container. Then after we pop out of processing the children, we restore // these saved values. var saveContainer = contai...
[ "function", "bindContainer", "(", "node", ",", "containerFlags", ")", "{", "// Before we recurse into a node's children, we first save the existing parent, container", "// and block-container. Then after we pop out of processing the children, we restore", "// these saved values.", "var", "s...
All container nodes are kept on a linked list in declaration order. This list is used by the getLocalNameOfContainer function in the type checker to validate that the local name used for a container is unique.
[ "All", "container", "nodes", "are", "kept", "on", "a", "linked", "list", "in", "declaration", "order", ".", "This", "list", "is", "used", "by", "the", "getLocalNameOfContainer", "function", "in", "the", "type", "checker", "to", "validate", "that", "the", "lo...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L15465-L15558
30,011
opendigitaleducation/sijil.js
docs/libs/typescript.js
checkStrictModeIdentifier
function checkStrictModeIdentifier(node) { if (inStrictMode && node.originalKeywordKind >= 106 /* FirstFutureReservedWord */ && node.originalKeywordKind <= 114 /* LastFutureReservedWord */ && !ts.isIdentifierName(node) && !ts.isInAmbientContext...
javascript
function checkStrictModeIdentifier(node) { if (inStrictMode && node.originalKeywordKind >= 106 /* FirstFutureReservedWord */ && node.originalKeywordKind <= 114 /* LastFutureReservedWord */ && !ts.isIdentifierName(node) && !ts.isInAmbientContext...
[ "function", "checkStrictModeIdentifier", "(", "node", ")", "{", "if", "(", "inStrictMode", "&&", "node", ".", "originalKeywordKind", ">=", "106", "/* FirstFutureReservedWord */", "&&", "node", ".", "originalKeywordKind", "<=", "114", "/* LastFutureReservedWord */", "&&"...
The binder visits every node in the syntax tree so it is a convenient place to perform a single localized check for reserved words used as identifiers in strict mode code.
[ "The", "binder", "visits", "every", "node", "in", "the", "syntax", "tree", "so", "it", "is", "a", "convenient", "place", "to", "perform", "a", "single", "localized", "check", "for", "reserved", "words", "used", "as", "identifiers", "in", "strict", "mode", ...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L16458-L16469
30,012
opendigitaleducation/sijil.js
docs/libs/typescript.js
getSymbolsOfParameterPropertyDeclaration
function getSymbolsOfParameterPropertyDeclaration(parameter, parameterName) { var constructorDeclaration = parameter.parent; var classDeclaration = parameter.parent.parent; var parameterSymbol = getSymbol(constructorDeclaration.locals, parameterName, 107455 /* Value */); ...
javascript
function getSymbolsOfParameterPropertyDeclaration(parameter, parameterName) { var constructorDeclaration = parameter.parent; var classDeclaration = parameter.parent.parent; var parameterSymbol = getSymbol(constructorDeclaration.locals, parameterName, 107455 /* Value */); ...
[ "function", "getSymbolsOfParameterPropertyDeclaration", "(", "parameter", ",", "parameterName", ")", "{", "var", "constructorDeclaration", "=", "parameter", ".", "parent", ";", "var", "classDeclaration", "=", "parameter", ".", "parent", ".", "parent", ";", "var", "p...
Get symbols that represent parameter-property-declaration as parameter and as property declaration @param parameter a parameterDeclaration node @param parameterName a name of the parameter to get the symbols for. @return a tuple of two symbols
[ "Get", "symbols", "that", "represent", "parameter", "-", "property", "-", "declaration", "as", "parameter", "and", "as", "property", "declaration" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L17648-L17657
30,013
opendigitaleducation/sijil.js
docs/libs/typescript.js
getEntityNameForExtendingInterface
function getEntityNameForExtendingInterface(node) { switch (node.kind) { case 69 /* Identifier */: case 172 /* PropertyAccessExpression */: return node.parent ? getEntityNameForExtendingInterface(node.parent) : undefined; case 194 /* Expres...
javascript
function getEntityNameForExtendingInterface(node) { switch (node.kind) { case 69 /* Identifier */: case 172 /* PropertyAccessExpression */: return node.parent ? getEntityNameForExtendingInterface(node.parent) : undefined; case 194 /* Expres...
[ "function", "getEntityNameForExtendingInterface", "(", "node", ")", "{", "switch", "(", "node", ".", "kind", ")", "{", "case", "69", "/* Identifier */", ":", "case", "172", "/* PropertyAccessExpression */", ":", "return", "node", ".", "parent", "?", "getEntityName...
Climbs up parents to an ExpressionWithTypeArguments, and returns its expression, but returns undefined if that expression is not an EntityNameExpression.
[ "Climbs", "up", "parents", "to", "an", "ExpressionWithTypeArguments", "and", "returns", "its", "expression", "but", "returns", "undefined", "if", "that", "expression", "is", "not", "an", "EntityNameExpression", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L18019-L18030
30,014
opendigitaleducation/sijil.js
docs/libs/typescript.js
getSymbolOfPartOfRightHandSideOfImportEquals
function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, importDeclaration, dontResolveAlias) { // There are three things we might try to look for. In the following examples, // the search term is enclosed in |...|: // // import a = |b|; // Namespace ...
javascript
function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, importDeclaration, dontResolveAlias) { // There are three things we might try to look for. In the following examples, // the search term is enclosed in |...|: // // import a = |b|; // Namespace ...
[ "function", "getSymbolOfPartOfRightHandSideOfImportEquals", "(", "entityName", ",", "importDeclaration", ",", "dontResolveAlias", ")", "{", "// There are three things we might try to look for. In the following examples,", "// the search term is enclosed in |...|:", "//", "// import a =...
This function is only for imports with entity names
[ "This", "function", "is", "only", "for", "imports", "with", "entity", "names" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L18269-L18289
30,015
opendigitaleducation/sijil.js
docs/libs/typescript.js
extendExportSymbols
function extendExportSymbols(target, source, lookupTable, exportNode) { for (var id in source) { if (id !== "default" && !target[id]) { target[id] = source[id]; if (lookupTable && exportNode) { lookupTable[id] = { ...
javascript
function extendExportSymbols(target, source, lookupTable, exportNode) { for (var id in source) { if (id !== "default" && !target[id]) { target[id] = source[id]; if (lookupTable && exportNode) { lookupTable[id] = { ...
[ "function", "extendExportSymbols", "(", "target", ",", "source", ",", "lookupTable", ",", "exportNode", ")", "{", "for", "(", "var", "id", "in", "source", ")", "{", "if", "(", "id", "!==", "\"default\"", "&&", "!", "target", "[", "id", "]", ")", "{", ...
Extends one symbol table with another while collecting information on name collisions for error message generation into the `lookupTable` argument Not passing `lookupTable` and `exportNode` disables this collection, and just extends the tables
[ "Extends", "one", "symbol", "table", "with", "another", "while", "collecting", "information", "on", "name", "collisions", "for", "error", "message", "generation", "into", "the", "lookupTable", "argument", "Not", "passing", "lookupTable", "and", "exportNode", "disabl...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L18417-L18436
30,016
opendigitaleducation/sijil.js
docs/libs/typescript.js
isSymbolAccessible
function isSymbolAccessible(symbol, enclosingDeclaration, meaning, shouldComputeAliasesToMakeVisible) { if (symbol && enclosingDeclaration && !(symbol.flags & 262144 /* TypeParameter */)) { var initialSymbol = symbol; var meaningToLook = meaning; while (symbol...
javascript
function isSymbolAccessible(symbol, enclosingDeclaration, meaning, shouldComputeAliasesToMakeVisible) { if (symbol && enclosingDeclaration && !(symbol.flags & 262144 /* TypeParameter */)) { var initialSymbol = symbol; var meaningToLook = meaning; while (symbol...
[ "function", "isSymbolAccessible", "(", "symbol", ",", "enclosingDeclaration", ",", "meaning", ",", "shouldComputeAliasesToMakeVisible", ")", "{", "if", "(", "symbol", "&&", "enclosingDeclaration", "&&", "!", "(", "symbol", ".", "flags", "&", "262144", "/* TypeParame...
Check if the given symbol in given enclosing declaration is accessible and mark all associated alias to be visible if requested @param symbol a Symbol to check if accessible @param enclosingDeclaration a Node containing reference to the symbol @param meaning a SymbolFlags to check if such meaning of the symbol is acce...
[ "Check", "if", "the", "given", "symbol", "in", "given", "enclosing", "declaration", "is", "accessible", "and", "mark", "all", "associated", "alias", "to", "be", "visible", "if", "requested" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L18705-L18766
30,017
opendigitaleducation/sijil.js
docs/libs/typescript.js
appendPropertyOrElementAccessForSymbol
function appendPropertyOrElementAccessForSymbol(symbol, writer) { var symbolName = getNameOfSymbol(symbol); var firstChar = symbolName.charCodeAt(0); var needsElementAccess = !ts.isIdentifierStart(firstChar, languageVersion); if (needsElementAccess) { ...
javascript
function appendPropertyOrElementAccessForSymbol(symbol, writer) { var symbolName = getNameOfSymbol(symbol); var firstChar = symbolName.charCodeAt(0); var needsElementAccess = !ts.isIdentifierStart(firstChar, languageVersion); if (needsElementAccess) { ...
[ "function", "appendPropertyOrElementAccessForSymbol", "(", "symbol", ",", "writer", ")", "{", "var", "symbolName", "=", "getNameOfSymbol", "(", "symbol", ")", ";", "var", "firstChar", "=", "symbolName", ".", "charCodeAt", "(", "0", ")", ";", "var", "needsElement...
Writes a property access or element access with the name of the symbol out to the writer. Uses the original source text for the name of the symbol if it is available to match how the user wrote the name, ensuring that any names written with literals use element accesses.
[ "Writes", "a", "property", "access", "or", "element", "access", "with", "the", "name", "of", "the", "symbol", "out", "to", "the", "writer", ".", "Uses", "the", "original", "source", "text", "for", "the", "name", "of", "the", "symbol", "if", "it", "is", ...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L18953-L18971
30,018
opendigitaleducation/sijil.js
docs/libs/typescript.js
buildSymbolDisplay
function buildSymbolDisplay(symbol, writer, enclosingDeclaration, meaning, flags, typeFlags) { var parentSymbol; function appendParentTypeArgumentsAndSymbolName(symbol) { if (parentSymbol) { // Write type arguments of instantiated class/interfa...
javascript
function buildSymbolDisplay(symbol, writer, enclosingDeclaration, meaning, flags, typeFlags) { var parentSymbol; function appendParentTypeArgumentsAndSymbolName(symbol) { if (parentSymbol) { // Write type arguments of instantiated class/interfa...
[ "function", "buildSymbolDisplay", "(", "symbol", ",", "writer", ",", "enclosingDeclaration", ",", "meaning", ",", "flags", ",", "typeFlags", ")", "{", "var", "parentSymbol", ";", "function", "appendParentTypeArgumentsAndSymbolName", "(", "symbol", ")", "{", "if", ...
Enclosing declaration is optional when we don't want to get qualified name in the enclosing declaration scope Meaning needs to be specified if the enclosing declaration is given
[ "Enclosing", "declaration", "is", "optional", "when", "we", "don", "t", "want", "to", "get", "qualified", "name", "in", "the", "enclosing", "declaration", "scope", "Meaning", "needs", "to", "be", "specified", "if", "the", "enclosing", "declaration", "is", "giv...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L18976-L19041
30,019
opendigitaleducation/sijil.js
docs/libs/typescript.js
pushTypeResolution
function pushTypeResolution(target, propertyName) { var resolutionCycleStartIndex = findResolutionCycleStartIndex(target, propertyName); if (resolutionCycleStartIndex >= 0) { // A cycle was found var length_2 = resolutionTargets.length; for (var i ...
javascript
function pushTypeResolution(target, propertyName) { var resolutionCycleStartIndex = findResolutionCycleStartIndex(target, propertyName); if (resolutionCycleStartIndex >= 0) { // A cycle was found var length_2 = resolutionTargets.length; for (var i ...
[ "function", "pushTypeResolution", "(", "target", ",", "propertyName", ")", "{", "var", "resolutionCycleStartIndex", "=", "findResolutionCycleStartIndex", "(", "target", ",", "propertyName", ")", ";", "if", "(", "resolutionCycleStartIndex", ">=", "0", ")", "{", "// A...
Push an entry on the type resolution stack. If an entry with the given target and the given property name is already on the stack, and no entries in between already have a type, then a circularity has occurred. In this case, the result values of the existing entry and all entries pushed after it are changed to false, a...
[ "Push", "an", "entry", "on", "the", "type", "resolution", "stack", ".", "If", "an", "entry", "with", "the", "given", "target", "and", "the", "given", "property", "name", "is", "already", "on", "the", "stack", "and", "no", "entries", "in", "between", "alr...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L19670-L19684
30,020
opendigitaleducation/sijil.js
docs/libs/typescript.js
getTypeForBindingElement
function getTypeForBindingElement(declaration) { var pattern = declaration.parent; var parentType = getTypeForBindingElementParent(pattern.parent); // If parent has the unknown (error) type, then so does this binding element if (parentType === unknownType) { ...
javascript
function getTypeForBindingElement(declaration) { var pattern = declaration.parent; var parentType = getTypeForBindingElementParent(pattern.parent); // If parent has the unknown (error) type, then so does this binding element if (parentType === unknownType) { ...
[ "function", "getTypeForBindingElement", "(", "declaration", ")", "{", "var", "pattern", "=", "declaration", ".", "parent", ";", "var", "parentType", "=", "getTypeForBindingElementParent", "(", "pattern", ".", "parent", ")", ";", "// If parent has the unknown (error) typ...
Return the inferred type for a binding element
[ "Return", "the", "inferred", "type", "for", "a", "binding", "element" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L19779-L19851
30,021
opendigitaleducation/sijil.js
docs/libs/typescript.js
getTypeForVariableLikeDeclaration
function getTypeForVariableLikeDeclaration(declaration, includeOptionality) { if (declaration.flags & 134217728 /* JavaScriptFile */) { // If this is a variable in a JavaScript file, then use the JSDoc type (if it has // one as its type), otherwise fallback to the below stand...
javascript
function getTypeForVariableLikeDeclaration(declaration, includeOptionality) { if (declaration.flags & 134217728 /* JavaScriptFile */) { // If this is a variable in a JavaScript file, then use the JSDoc type (if it has // one as its type), otherwise fallback to the below stand...
[ "function", "getTypeForVariableLikeDeclaration", "(", "declaration", ",", "includeOptionality", ")", "{", "if", "(", "declaration", ".", "flags", "&", "134217728", "/* JavaScriptFile */", ")", "{", "// If this is a variable in a JavaScript file, then use the JSDoc type (if it has...
Return the inferred type for a variable, parameter, or property declaration
[ "Return", "the", "inferred", "type", "for", "a", "variable", "parameter", "or", "property", "declaration" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L19887-L19958
30,022
opendigitaleducation/sijil.js
docs/libs/typescript.js
getTypeFromBindingElement
function getTypeFromBindingElement(element, includePatternInType, reportErrors) { if (element.initializer) { return checkExpressionCached(element.initializer); } if (ts.isBindingPattern(element.name)) { return getTypeFromBindingPattern(element.name, in...
javascript
function getTypeFromBindingElement(element, includePatternInType, reportErrors) { if (element.initializer) { return checkExpressionCached(element.initializer); } if (ts.isBindingPattern(element.name)) { return getTypeFromBindingPattern(element.name, in...
[ "function", "getTypeFromBindingElement", "(", "element", ",", "includePatternInType", ",", "reportErrors", ")", "{", "if", "(", "element", ".", "initializer", ")", "{", "return", "checkExpressionCached", "(", "element", ".", "initializer", ")", ";", "}", "if", "...
Return the type implied by a binding pattern element. This is the type of the initializer of the element if one is present. Otherwise, if the element is itself a binding pattern, it is the type implied by the binding pattern. Otherwise, it is the type any.
[ "Return", "the", "type", "implied", "by", "a", "binding", "pattern", "element", ".", "This", "is", "the", "type", "of", "the", "initializer", "of", "the", "element", "if", "one", "is", "present", ".", "Otherwise", "if", "the", "element", "is", "itself", ...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L19962-L19973
30,023
opendigitaleducation/sijil.js
docs/libs/typescript.js
getTypeFromObjectBindingPattern
function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) { var members = ts.createMap(); var hasComputedProperties = false; ts.forEach(pattern.elements, function (e) { var name = e.propertyName || e.name; if (isComputedNonL...
javascript
function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) { var members = ts.createMap(); var hasComputedProperties = false; ts.forEach(pattern.elements, function (e) { var name = e.propertyName || e.name; if (isComputedNonL...
[ "function", "getTypeFromObjectBindingPattern", "(", "pattern", ",", "includePatternInType", ",", "reportErrors", ")", "{", "var", "members", "=", "ts", ".", "createMap", "(", ")", ";", "var", "hasComputedProperties", "=", "false", ";", "ts", ".", "forEach", "(",...
Return the type implied by an object binding pattern
[ "Return", "the", "type", "implied", "by", "an", "object", "binding", "pattern" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L19975-L20000
30,024
opendigitaleducation/sijil.js
docs/libs/typescript.js
getTypeFromArrayBindingPattern
function getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors) { var elements = pattern.elements; if (elements.length === 0 || elements[elements.length - 1].dotDotDotToken) { return languageVersion >= 2 /* ES6 */ ? createIterableType(anyType) : anyArrayType;...
javascript
function getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors) { var elements = pattern.elements; if (elements.length === 0 || elements[elements.length - 1].dotDotDotToken) { return languageVersion >= 2 /* ES6 */ ? createIterableType(anyType) : anyArrayType;...
[ "function", "getTypeFromArrayBindingPattern", "(", "pattern", ",", "includePatternInType", ",", "reportErrors", ")", "{", "var", "elements", "=", "pattern", ".", "elements", ";", "if", "(", "elements", ".", "length", "===", "0", "||", "elements", "[", "elements"...
Return the type implied by an array binding pattern
[ "Return", "the", "type", "implied", "by", "an", "array", "binding", "pattern" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L20002-L20015
30,025
opendigitaleducation/sijil.js
docs/libs/typescript.js
appendTypeParameters
function appendTypeParameters(typeParameters, declarations) { for (var _i = 0, declarations_2 = declarations; _i < declarations_2.length; _i++) { var declaration = declarations_2[_i]; var tp = getDeclaredTypeOfTypeParameter(getSymbolOfNode(declaration)); if (!...
javascript
function appendTypeParameters(typeParameters, declarations) { for (var _i = 0, declarations_2 = declarations; _i < declarations_2.length; _i++) { var declaration = declarations_2[_i]; var tp = getDeclaredTypeOfTypeParameter(getSymbolOfNode(declaration)); if (!...
[ "function", "appendTypeParameters", "(", "typeParameters", ",", "declarations", ")", "{", "for", "(", "var", "_i", "=", "0", ",", "declarations_2", "=", "declarations", ";", "_i", "<", "declarations_2", ".", "length", ";", "_i", "++", ")", "{", "var", "dec...
Appends the type parameters given by a list of declarations to a set of type parameters and returns the resulting set. The function allocates a new array if the input type parameter set is undefined, but otherwise it modifies the set in-place and returns the same array.
[ "Appends", "the", "type", "parameters", "given", "by", "a", "list", "of", "declarations", "to", "a", "set", "of", "type", "parameters", "and", "returns", "the", "resulting", "set", ".", "The", "function", "allocates", "a", "new", "array", "if", "the", "inp...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L20282-L20294
30,026
opendigitaleducation/sijil.js
docs/libs/typescript.js
appendOuterTypeParameters
function appendOuterTypeParameters(typeParameters, node) { while (true) { node = node.parent; if (!node) { return typeParameters; } if (node.kind === 221 /* ClassDeclaration */ || node.kind === 192 /* ClassExpression */ || ...
javascript
function appendOuterTypeParameters(typeParameters, node) { while (true) { node = node.parent; if (!node) { return typeParameters; } if (node.kind === 221 /* ClassDeclaration */ || node.kind === 192 /* ClassExpression */ || ...
[ "function", "appendOuterTypeParameters", "(", "typeParameters", ",", "node", ")", "{", "while", "(", "true", ")", "{", "node", "=", "node", ".", "parent", ";", "if", "(", "!", "node", ")", "{", "return", "typeParameters", ";", "}", "if", "(", "node", "...
Appends the outer type parameters of a node to a set of type parameters and returns the resulting set. The function allocates a new array if the input type parameter set is undefined, but otherwise it modifies the set in-place and returns the same array.
[ "Appends", "the", "outer", "type", "parameters", "of", "a", "node", "to", "a", "set", "of", "type", "parameters", "and", "returns", "the", "resulting", "set", ".", "The", "function", "allocates", "a", "new", "array", "if", "the", "input", "type", "paramete...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L20298-L20313
30,027
opendigitaleducation/sijil.js
docs/libs/typescript.js
getOuterTypeParametersOfClassOrInterface
function getOuterTypeParametersOfClassOrInterface(symbol) { var declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 222 /* InterfaceDeclaration */); return appendOuterTypeParameters(undefined, declaration); }
javascript
function getOuterTypeParametersOfClassOrInterface(symbol) { var declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 222 /* InterfaceDeclaration */); return appendOuterTypeParameters(undefined, declaration); }
[ "function", "getOuterTypeParametersOfClassOrInterface", "(", "symbol", ")", "{", "var", "declaration", "=", "symbol", ".", "flags", "&", "32", "/* Class */", "?", "symbol", ".", "valueDeclaration", ":", "ts", ".", "getDeclarationOfKind", "(", "symbol", ",", "222",...
The outer type parameters are those defined by enclosing generic classes, methods, or functions.
[ "The", "outer", "type", "parameters", "are", "those", "defined", "by", "enclosing", "generic", "classes", "methods", "or", "functions", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L20315-L20318
30,028
opendigitaleducation/sijil.js
docs/libs/typescript.js
isIndependentInterface
function isIndependentInterface(symbol) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; if (declaration.kind === 222 /* InterfaceDeclaration */) { if (declaration.flags & 16384 /* ContainsThis */) { ...
javascript
function isIndependentInterface(symbol) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; if (declaration.kind === 222 /* InterfaceDeclaration */) { if (declaration.flags & 16384 /* ContainsThis */) { ...
[ "function", "isIndependentInterface", "(", "symbol", ")", "{", "for", "(", "var", "_i", "=", "0", ",", "_a", "=", "symbol", ".", "declarations", ";", "_i", "<", "_a", ".", "length", ";", "_i", "++", ")", "{", "var", "declaration", "=", "_a", "[", "...
Returns true if the interface given by the symbol is free of "this" references. Specifically, the result is true if the interface itself contains no references to "this" in its body, if all base types are interfaces, and if none of the base interfaces have a "this" type.
[ "Returns", "true", "if", "the", "interface", "given", "by", "the", "symbol", "is", "free", "of", "this", "references", ".", "Specifically", "the", "result", "is", "true", "if", "the", "interface", "itself", "contains", "no", "references", "to", "this", "in",...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L20498-L20520
30,029
opendigitaleducation/sijil.js
docs/libs/typescript.js
isIndependentType
function isIndependentType(node) { switch (node.kind) { case 117 /* AnyKeyword */: case 132 /* StringKeyword */: case 130 /* NumberKeyword */: case 120 /* BooleanKeyword */: case 133 /* SymbolKeyword */: case 103...
javascript
function isIndependentType(node) { switch (node.kind) { case 117 /* AnyKeyword */: case 132 /* StringKeyword */: case 130 /* NumberKeyword */: case 120 /* BooleanKeyword */: case 133 /* SymbolKeyword */: case 103...
[ "function", "isIndependentType", "(", "node", ")", "{", "switch", "(", "node", ".", "kind", ")", "{", "case", "117", "/* AnyKeyword */", ":", "case", "132", "/* StringKeyword */", ":", "case", "130", "/* NumberKeyword */", ":", "case", "120", "/* BooleanKeyword ...
A type is considered independent if it the any, string, number, boolean, symbol, or void keyword, a string literal type, an array with an element type that is considered independent, or a type reference that is considered independent.
[ "A", "type", "is", "considered", "independent", "if", "it", "the", "any", "string", "number", "boolean", "symbol", "or", "void", "keyword", "a", "string", "literal", "type", "an", "array", "with", "an", "element", "type", "that", "is", "considered", "indepen...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L20715-L20734
30,030
opendigitaleducation/sijil.js
docs/libs/typescript.js
isIndependentMember
function isIndependentMember(symbol) { if (symbol.declarations && symbol.declarations.length === 1) { var declaration = symbol.declarations[0]; if (declaration) { switch (declaration.kind) { case 145 /* PropertyDeclaration */: ...
javascript
function isIndependentMember(symbol) { if (symbol.declarations && symbol.declarations.length === 1) { var declaration = symbol.declarations[0]; if (declaration) { switch (declaration.kind) { case 145 /* PropertyDeclaration */: ...
[ "function", "isIndependentMember", "(", "symbol", ")", "{", "if", "(", "symbol", ".", "declarations", "&&", "symbol", ".", "declarations", ".", "length", "===", "1", ")", "{", "var", "declaration", "=", "symbol", ".", "declarations", "[", "0", "]", ";", ...
Returns true if the class or interface member given by the symbol is free of "this" references. The function may return false for symbols that are actually free of "this" references because it is not feasible to perform a complete analysis in all cases. In particular, property members with types inferred from their ini...
[ "Returns", "true", "if", "the", "class", "or", "interface", "member", "given", "by", "the", "symbol", "is", "free", "of", "this", "references", ".", "The", "function", "may", "return", "false", "for", "symbols", "that", "are", "actually", "free", "of", "th...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L20759-L20775
30,031
opendigitaleducation/sijil.js
docs/libs/typescript.js
createInstantiatedSymbolTable
function createInstantiatedSymbolTable(symbols, mapper, mappingThisOnly) { var result = ts.createMap(); for (var _i = 0, symbols_2 = symbols; _i < symbols_2.length; _i++) { var symbol = symbols_2[_i]; result[symbol.name] = mappingThisOnly && isIndependentMember(sy...
javascript
function createInstantiatedSymbolTable(symbols, mapper, mappingThisOnly) { var result = ts.createMap(); for (var _i = 0, symbols_2 = symbols; _i < symbols_2.length; _i++) { var symbol = symbols_2[_i]; result[symbol.name] = mappingThisOnly && isIndependentMember(sy...
[ "function", "createInstantiatedSymbolTable", "(", "symbols", ",", "mapper", ",", "mappingThisOnly", ")", "{", "var", "result", "=", "ts", ".", "createMap", "(", ")", ";", "for", "(", "var", "_i", "=", "0", ",", "symbols_2", "=", "symbols", ";", "_i", "<"...
The mappingThisOnly flag indicates that the only type parameter being mapped is "this". When the flag is true, we check symbols to see if we can quickly conclude they are free of "this" references, thus needing no instantiation.
[ "The", "mappingThisOnly", "flag", "indicates", "that", "the", "only", "type", "parameter", "being", "mapped", "is", "this", ".", "When", "the", "flag", "is", "true", "we", "check", "symbols", "to", "see", "if", "we", "can", "quickly", "conclude", "they", "...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L20786-L20793
30,032
opendigitaleducation/sijil.js
docs/libs/typescript.js
getUnionSignatures
function getUnionSignatures(types, kind) { var signatureLists = ts.map(types, function (t) { return getSignaturesOfType(t, kind); }); var result = undefined; for (var i = 0; i < signatureLists.length; i++) { for (var _i = 0, _a = signatureLists[i]; _i < _a.length; _i+...
javascript
function getUnionSignatures(types, kind) { var signatureLists = ts.map(types, function (t) { return getSignaturesOfType(t, kind); }); var result = undefined; for (var i = 0; i < signatureLists.length; i++) { for (var _i = 0, _a = signatureLists[i]; _i < _a.length; _i+...
[ "function", "getUnionSignatures", "(", "types", ",", "kind", ")", "{", "var", "signatureLists", "=", "ts", ".", "map", "(", "types", ",", "function", "(", "t", ")", "{", "return", "getSignaturesOfType", "(", "t", ",", "kind", ")", ";", "}", ")", ";", ...
The signatures of a union type are those signatures that are present in each of the constituent types. Generic signatures must match exactly, but non-generic signatures are allowed to have extra optional parameters and may differ in return types. When signatures differ in return types, the resulting return type is the ...
[ "The", "signatures", "of", "a", "union", "type", "are", "those", "signatures", "that", "are", "present", "in", "each", "of", "the", "constituent", "types", ".", "Generic", "signatures", "must", "match", "exactly", "but", "non", "-", "generic", "signatures", ...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L20947-L20975
30,033
opendigitaleducation/sijil.js
docs/libs/typescript.js
getApparentTypeOfTypeParameter
function getApparentTypeOfTypeParameter(type) { if (!type.resolvedApparentType) { var constraintType = getConstraintOfTypeParameter(type); while (constraintType && constraintType.flags & 16384 /* TypeParameter */) { constraintType = getConstraintOfTypePara...
javascript
function getApparentTypeOfTypeParameter(type) { if (!type.resolvedApparentType) { var constraintType = getConstraintOfTypeParameter(type); while (constraintType && constraintType.flags & 16384 /* TypeParameter */) { constraintType = getConstraintOfTypePara...
[ "function", "getApparentTypeOfTypeParameter", "(", "type", ")", "{", "if", "(", "!", "type", ".", "resolvedApparentType", ")", "{", "var", "constraintType", "=", "getConstraintOfTypeParameter", "(", "type", ")", ";", "while", "(", "constraintType", "&&", "constrai...
The apparent type of a type parameter is the base constraint instantiated with the type parameter as the type argument for the 'this' type.
[ "The", "apparent", "type", "of", "a", "type", "parameter", "is", "the", "base", "constraint", "instantiated", "with", "the", "type", "parameter", "as", "the", "type", "argument", "for", "the", "this", "type", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L21130-L21139
30,034
opendigitaleducation/sijil.js
docs/libs/typescript.js
getApparentType
function getApparentType(type) { if (type.flags & 16384 /* TypeParameter */) { type = getApparentTypeOfTypeParameter(type); } if (type.flags & 34 /* StringLike */) { type = globalStringType; } else if (type.flags & 340 /* Number...
javascript
function getApparentType(type) { if (type.flags & 16384 /* TypeParameter */) { type = getApparentTypeOfTypeParameter(type); } if (type.flags & 34 /* StringLike */) { type = globalStringType; } else if (type.flags & 340 /* Number...
[ "function", "getApparentType", "(", "type", ")", "{", "if", "(", "type", ".", "flags", "&", "16384", "/* TypeParameter */", ")", "{", "type", "=", "getApparentTypeOfTypeParameter", "(", "type", ")", ";", "}", "if", "(", "type", ".", "flags", "&", "34", "...
For a type parameter, return the base constraint of the type parameter. For the string, number, boolean, and symbol primitive types, return the corresponding object types. Otherwise return the type itself. Note that the apparent type of a union type is the union type itself.
[ "For", "a", "type", "parameter", "return", "the", "base", "constraint", "of", "the", "type", "parameter", ".", "For", "the", "string", "number", "boolean", "and", "symbol", "primitive", "types", "return", "the", "corresponding", "object", "types", ".", "Otherw...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L21145-L21162
30,035
opendigitaleducation/sijil.js
docs/libs/typescript.js
getPropagatingFlagsOfTypes
function getPropagatingFlagsOfTypes(types, excludeKinds) { var result = 0; for (var _i = 0, types_3 = types; _i < types_3.length; _i++) { var type = types_3[_i]; if (!(type.flags & excludeKinds)) { result |= type.flags; } ...
javascript
function getPropagatingFlagsOfTypes(types, excludeKinds) { var result = 0; for (var _i = 0, types_3 = types; _i < types_3.length; _i++) { var type = types_3[_i]; if (!(type.flags & excludeKinds)) { result |= type.flags; } ...
[ "function", "getPropagatingFlagsOfTypes", "(", "types", ",", "excludeKinds", ")", "{", "var", "result", "=", "0", ";", "for", "(", "var", "_i", "=", "0", ",", "types_3", "=", "types", ";", "_i", "<", "types_3", ".", "length", ";", "_i", "++", ")", "{...
This function is used to propagate certain flags when creating new object type references and union types. It is only necessary to do so if a constituent type might be the undefined type, the null type, the type of an object literal or the anyFunctionType. This is because there are operations in the type checker that c...
[ "This", "function", "is", "used", "to", "propagate", "certain", "flags", "when", "creating", "new", "object", "type", "references", "and", "union", "types", ".", "It", "is", "only", "necessary", "to", "do", "so", "if", "a", "constituent", "type", "might", ...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L21701-L21710
30,036
opendigitaleducation/sijil.js
docs/libs/typescript.js
getUnionTypeFromSortedList
function getUnionTypeFromSortedList(types, aliasSymbol, aliasTypeArguments) { if (types.length === 0) { return neverType; } if (types.length === 1) { return types[0]; } var id = getTypeListId(types); var type = union...
javascript
function getUnionTypeFromSortedList(types, aliasSymbol, aliasTypeArguments) { if (types.length === 0) { return neverType; } if (types.length === 1) { return types[0]; } var id = getTypeListId(types); var type = union...
[ "function", "getUnionTypeFromSortedList", "(", "types", ",", "aliasSymbol", ",", "aliasTypeArguments", ")", "{", "if", "(", "types", ".", "length", "===", "0", ")", "{", "return", "neverType", ";", "}", "if", "(", "types", ".", "length", "===", "1", ")", ...
This function assumes the constituent type list is sorted and deduplicated.
[ "This", "function", "assumes", "the", "constituent", "type", "list", "is", "sorted", "and", "deduplicated", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L22118-L22135
30,037
opendigitaleducation/sijil.js
docs/libs/typescript.js
isKnownProperty
function isKnownProperty(type, name) { if (type.flags & 2588672 /* ObjectType */) { var resolved = resolveStructuredTypeMembers(type); if ((relation === assignableRelation || relation === comparableRelation) && (type === globalObjectType || isEmptyObjectType(resol...
javascript
function isKnownProperty(type, name) { if (type.flags & 2588672 /* ObjectType */) { var resolved = resolveStructuredTypeMembers(type); if ((relation === assignableRelation || relation === comparableRelation) && (type === globalObjectType || isEmptyObjectType(resol...
[ "function", "isKnownProperty", "(", "type", ",", "name", ")", "{", "if", "(", "type", ".", "flags", "&", "2588672", "/* ObjectType */", ")", "{", "var", "resolved", "=", "resolveStructuredTypeMembers", "(", "type", ")", ";", "if", "(", "(", "relation", "==...
Check if a property with the given name is known anywhere in the given type. In an object type, a property is considered known if the object type is empty and the check is for assignability, if the object type has index signatures, or if the property is actually declared in the object type. In a union or intersection t...
[ "Check", "if", "a", "property", "with", "the", "given", "name", "is", "known", "anywhere", "in", "the", "given", "type", ".", "In", "an", "object", "type", "a", "property", "is", "considered", "known", "if", "the", "object", "type", "is", "empty", "and",...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L23089-L23108
30,038
opendigitaleducation/sijil.js
docs/libs/typescript.js
objectTypeRelatedTo
function objectTypeRelatedTo(source, originalSource, target, reportErrors) { if (overflow) { return 0 /* False */; } var id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id; ...
javascript
function objectTypeRelatedTo(source, originalSource, target, reportErrors) { if (overflow) { return 0 /* False */; } var id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id; ...
[ "function", "objectTypeRelatedTo", "(", "source", ",", "originalSource", ",", "target", ",", "reportErrors", ")", "{", "if", "(", "overflow", ")", "{", "return", "0", "/* False */", ";", "}", "var", "id", "=", "relation", "!==", "identityRelation", "||", "so...
Determine if two object types are related by structure. First, check if the result is already available in the global cache. Second, check if we have already started a comparison of the given two types in which case we assume the result to be true. Third, check if both types are part of deeply nested chains of generic ...
[ "Determine", "if", "two", "object", "types", "are", "related", "by", "structure", ".", "First", "check", "if", "the", "result", "is", "already", "available", "in", "the", "global", "cache", ".", "Second", "check", "if", "we", "have", "already", "started", ...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L23224-L23301
30,039
opendigitaleducation/sijil.js
docs/libs/typescript.js
signatureRelatedTo
function signatureRelatedTo(source, target, reportErrors) { return compareSignaturesRelated(source, target, /*ignoreReturnTypes*/ false, reportErrors, reportError, isRelatedTo); }
javascript
function signatureRelatedTo(source, target, reportErrors) { return compareSignaturesRelated(source, target, /*ignoreReturnTypes*/ false, reportErrors, reportError, isRelatedTo); }
[ "function", "signatureRelatedTo", "(", "source", ",", "target", ",", "reportErrors", ")", "{", "return", "compareSignaturesRelated", "(", "source", ",", "target", ",", "/*ignoreReturnTypes*/", "false", ",", "reportErrors", ",", "reportError", ",", "isRelatedTo", ")"...
See signatureAssignableTo, compareSignaturesIdentical
[ "See", "signatureAssignableTo", "compareSignaturesIdentical" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L23454-L23456
30,040
opendigitaleducation/sijil.js
docs/libs/typescript.js
isAbstractConstructorType
function isAbstractConstructorType(type) { if (type.flags & 2097152 /* Anonymous */) { var symbol = type.symbol; if (symbol && symbol.flags & 32 /* Class */) { var declaration = getClassLikeDeclarationOfSymbol(symbol); if (declaration &...
javascript
function isAbstractConstructorType(type) { if (type.flags & 2097152 /* Anonymous */) { var symbol = type.symbol; if (symbol && symbol.flags & 32 /* Class */) { var declaration = getClassLikeDeclarationOfSymbol(symbol); if (declaration &...
[ "function", "isAbstractConstructorType", "(", "type", ")", "{", "if", "(", "type", ".", "flags", "&", "2097152", "/* Anonymous */", ")", "{", "var", "symbol", "=", "type", ".", "symbol", ";", "if", "(", "symbol", "&&", "symbol", ".", "flags", "&", "32", ...
Return true if the given type is the constructor type for an abstract class
[ "Return", "true", "if", "the", "given", "type", "is", "the", "constructor", "type", "for", "an", "abstract", "class" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L23565-L23576
30,041
opendigitaleducation/sijil.js
docs/libs/typescript.js
isObjectLiteralType
function isObjectLiteralType(type) { return type.symbol && (type.symbol.flags & (4096 /* ObjectLiteral */ | 2048 /* TypeLiteral */)) !== 0 && getSignaturesOfType(type, 0 /* Call */).length === 0 && getSignaturesOfType(type, 1 /* Construct */).length === 0; }
javascript
function isObjectLiteralType(type) { return type.symbol && (type.symbol.flags & (4096 /* ObjectLiteral */ | 2048 /* TypeLiteral */)) !== 0 && getSignaturesOfType(type, 0 /* Call */).length === 0 && getSignaturesOfType(type, 1 /* Construct */).length === 0; }
[ "function", "isObjectLiteralType", "(", "type", ")", "{", "return", "type", ".", "symbol", "&&", "(", "type", ".", "symbol", ".", "flags", "&", "(", "4096", "/* ObjectLiteral */", "|", "2048", "/* TypeLiteral */", ")", ")", "!==", "0", "&&", "getSignaturesOf...
Return true if type was inferred from an object literal or written as an object type literal with no call or construct signatures.
[ "Return", "true", "if", "type", "was", "inferred", "from", "an", "object", "literal", "or", "written", "as", "an", "object", "type", "literal", "with", "no", "call", "or", "construct", "signatures", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L23838-L23842
30,042
opendigitaleducation/sijil.js
docs/libs/typescript.js
getRegularTypeOfObjectLiteral
function getRegularTypeOfObjectLiteral(type) { if (!(type.flags & 16777216 /* FreshObjectLiteral */)) { return type; } var regularType = type.regularType; if (regularType) { return regularType; } var resolved = type;...
javascript
function getRegularTypeOfObjectLiteral(type) { if (!(type.flags & 16777216 /* FreshObjectLiteral */)) { return type; } var regularType = type.regularType; if (regularType) { return regularType; } var resolved = type;...
[ "function", "getRegularTypeOfObjectLiteral", "(", "type", ")", "{", "if", "(", "!", "(", "type", ".", "flags", "&", "16777216", "/* FreshObjectLiteral */", ")", ")", "{", "return", "type", ";", "}", "var", "regularType", "=", "type", ".", "regularType", ";",...
If the the provided object literal is subject to the excess properties check, create a new that is exempt. Recursively mark object literal members as exempt. Leave signatures alone since they are not subject to the check.
[ "If", "the", "the", "provided", "object", "literal", "is", "subject", "to", "the", "excess", "properties", "check", "create", "a", "new", "that", "is", "exempt", ".", "Recursively", "mark", "object", "literal", "members", "as", "exempt", ".", "Leave", "signa...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L23870-L23884
30,043
opendigitaleducation/sijil.js
docs/libs/typescript.js
removeTypesFromUnionOrIntersection
function removeTypesFromUnionOrIntersection(type, typesToRemove) { var reducedTypes = []; for (var _i = 0, _a = type.types; _i < _a.length; _i++) { var t = _a[_i]; if (!typeIdenticalToSomeType(t, typesToRemove)) { reducedTypes.push(t); ...
javascript
function removeTypesFromUnionOrIntersection(type, typesToRemove) { var reducedTypes = []; for (var _i = 0, _a = type.types; _i < _a.length; _i++) { var t = _a[_i]; if (!typeIdenticalToSomeType(t, typesToRemove)) { reducedTypes.push(t); ...
[ "function", "removeTypesFromUnionOrIntersection", "(", "type", ",", "typesToRemove", ")", "{", "var", "reducedTypes", "=", "[", "]", ";", "for", "(", "var", "_i", "=", "0", ",", "_a", "=", "type", ".", "types", ";", "_i", "<", "_a", ".", "length", ";",...
Return a new union or intersection type computed by removing a given set of types from a given union or intersection type.
[ "Return", "a", "new", "union", "or", "intersection", "type", "computed", "by", "removing", "a", "given", "set", "of", "types", "from", "a", "given", "union", "or", "intersection", "type", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L24264-L24273
30,044
opendigitaleducation/sijil.js
docs/libs/typescript.js
getResolvedSymbol
function getResolvedSymbol(node) { var links = getNodeLinks(node); if (!links.resolvedSymbol) { links.resolvedSymbol = !ts.nodeIsMissing(node) && resolveName(node, node.text, 107455 /* Value */ | 1048576 /* ExportValue */, ts.Diagnostics.Cannot_find_name_0, node) || unknownSymbol...
javascript
function getResolvedSymbol(node) { var links = getNodeLinks(node); if (!links.resolvedSymbol) { links.resolvedSymbol = !ts.nodeIsMissing(node) && resolveName(node, node.text, 107455 /* Value */ | 1048576 /* ExportValue */, ts.Diagnostics.Cannot_find_name_0, node) || unknownSymbol...
[ "function", "getResolvedSymbol", "(", "node", ")", "{", "var", "links", "=", "getNodeLinks", "(", "node", ")", ";", "if", "(", "!", "links", ".", "resolvedSymbol", ")", "{", "links", ".", "resolvedSymbol", "=", "!", "ts", ".", "nodeIsMissing", "(", "node...
EXPRESSION TYPE CHECKING
[ "EXPRESSION", "TYPE", "CHECKING" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L24324-L24330
30,045
opendigitaleducation/sijil.js
docs/libs/typescript.js
containsMatchingReferenceDiscriminant
function containsMatchingReferenceDiscriminant(source, target) { return target.kind === 172 /* PropertyAccessExpression */ && containsMatchingReference(source, target.expression) && isDiscriminantProperty(getDeclaredTypeOfReference(target.expression), target.name.text); ...
javascript
function containsMatchingReferenceDiscriminant(source, target) { return target.kind === 172 /* PropertyAccessExpression */ && containsMatchingReference(source, target.expression) && isDiscriminantProperty(getDeclaredTypeOfReference(target.expression), target.name.text); ...
[ "function", "containsMatchingReferenceDiscriminant", "(", "source", ",", "target", ")", "{", "return", "target", ".", "kind", "===", "172", "/* PropertyAccessExpression */", "&&", "containsMatchingReference", "(", "source", ",", "target", ".", "expression", ")", "&&",...
Return true if target is a property access xxx.yyy, source is a property access xxx.zzz, the declared type of xxx is a union type, and yyy is a property that is possibly a discriminant. We consider a property a possible discriminant if its type differs in the constituents of containing union type, and if every choice i...
[ "Return", "true", "if", "target", "is", "a", "property", "access", "xxx", ".", "yyy", "source", "is", "a", "property", "access", "xxx", ".", "zzz", "the", "declared", "type", "of", "xxx", "is", "a", "union", "type", "and", "yyy", "is", "a", "property",...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L24405-L24409
30,046
opendigitaleducation/sijil.js
docs/libs/typescript.js
getAssignmentReducedType
function getAssignmentReducedType(declaredType, assignedType) { if (declaredType !== assignedType) { var reducedType = filterType(declaredType, function (t) { return typeMaybeAssignableTo(assignedType, t); }); if (reducedType !== neverType) { return reduce...
javascript
function getAssignmentReducedType(declaredType, assignedType) { if (declaredType !== assignedType) { var reducedType = filterType(declaredType, function (t) { return typeMaybeAssignableTo(assignedType, t); }); if (reducedType !== neverType) { return reduce...
[ "function", "getAssignmentReducedType", "(", "declaredType", ",", "assignedType", ")", "{", "if", "(", "declaredType", "!==", "assignedType", ")", "{", "var", "reducedType", "=", "filterType", "(", "declaredType", ",", "function", "(", "t", ")", "{", "return", ...
Remove those constituent types of declaredType to which no constituent type of assignedType is assignable. For example, when a variable of type number | string | boolean is assigned a value of type number | boolean, we remove type string.
[ "Remove", "those", "constituent", "types", "of", "declaredType", "to", "which", "no", "constituent", "type", "of", "assignedType", "is", "assignable", ".", "For", "example", "when", "a", "variable", "of", "type", "number", "|", "string", "|", "boolean", "is", ...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L24483-L24491
30,047
opendigitaleducation/sijil.js
docs/libs/typescript.js
narrowType
function narrowType(type, expr, assumeTrue) { switch (expr.kind) { case 69 /* Identifier */: case 97 /* ThisKeyword */: case 172 /* PropertyAccessExpression */: return narrowTypeByTruthiness(type, expr, assumeTrue); ...
javascript
function narrowType(type, expr, assumeTrue) { switch (expr.kind) { case 69 /* Identifier */: case 97 /* ThisKeyword */: case 172 /* PropertyAccessExpression */: return narrowTypeByTruthiness(type, expr, assumeTrue); ...
[ "function", "narrowType", "(", "type", ",", "expr", ",", "assumeTrue", ")", "{", "switch", "(", "expr", ".", "kind", ")", "{", "case", "69", "/* Identifier */", ":", "case", "97", "/* ThisKeyword */", ":", "case", "172", "/* PropertyAccessExpression */", ":", ...
Narrow the given type based on the given expression having the assumed boolean value. The returned type will be a subtype or the same type as the argument.
[ "Narrow", "the", "given", "type", "based", "on", "the", "given", "expression", "having", "the", "assumed", "boolean", "value", ".", "The", "returned", "type", "will", "be", "a", "subtype", "or", "the", "same", "type", "as", "the", "argument", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L25194-L25213
30,048
opendigitaleducation/sijil.js
docs/libs/typescript.js
isParameterAssigned
function isParameterAssigned(symbol) { var func = ts.getRootDeclaration(symbol.valueDeclaration).parent; var links = getNodeLinks(func); if (!(links.flags & 4194304 /* AssignmentsMarked */)) { links.flags |= 4194304 /* AssignmentsMarked */; if (!hasPar...
javascript
function isParameterAssigned(symbol) { var func = ts.getRootDeclaration(symbol.valueDeclaration).parent; var links = getNodeLinks(func); if (!(links.flags & 4194304 /* AssignmentsMarked */)) { links.flags |= 4194304 /* AssignmentsMarked */; if (!hasPar...
[ "function", "isParameterAssigned", "(", "symbol", ")", "{", "var", "func", "=", "ts", ".", "getRootDeclaration", "(", "symbol", ".", "valueDeclaration", ")", ".", "parent", ";", "var", "links", "=", "getNodeLinks", "(", "func", ")", ";", "if", "(", "!", ...
Check if a parameter is assigned anywhere within its declaring function.
[ "Check", "if", "a", "parameter", "is", "assigned", "anywhere", "within", "its", "declaring", "function", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L25256-L25266
30,049
opendigitaleducation/sijil.js
docs/libs/typescript.js
getSuperCallInConstructor
function getSuperCallInConstructor(constructor) { var links = getNodeLinks(constructor); // Only trying to find super-call if we haven't yet tried to find one. Once we try, we will record the result if (links.hasSuperCall === undefined) { links.superCall = findFirstS...
javascript
function getSuperCallInConstructor(constructor) { var links = getNodeLinks(constructor); // Only trying to find super-call if we haven't yet tried to find one. Once we try, we will record the result if (links.hasSuperCall === undefined) { links.superCall = findFirstS...
[ "function", "getSuperCallInConstructor", "(", "constructor", ")", "{", "var", "links", "=", "getNodeLinks", "(", "constructor", ")", ";", "// Only trying to find super-call if we haven't yet tried to find one. Once we try, we will record the result", "if", "(", "links", ".", "...
Return a cached result if super-statement is already found. Otherwise, find a super statement in a given constructor function and cache the result in the node-links of the constructor @param constructor constructor-function to look for super statement
[ "Return", "a", "cached", "result", "if", "super", "-", "statement", "is", "already", "found", ".", "Otherwise", "find", "a", "super", "statement", "in", "a", "given", "constructor", "function", "and", "cache", "the", "result", "in", "the", "node", "-", "li...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L25477-L25485
30,050
opendigitaleducation/sijil.js
docs/libs/typescript.js
classDeclarationExtendsNull
function classDeclarationExtendsNull(classDecl) { var classSymbol = getSymbolOfNode(classDecl); var classInstanceType = getDeclaredTypeOfSymbol(classSymbol); var baseConstructorType = getBaseConstructorTypeOfClass(classInstanceType); return baseConstructorType === nullWid...
javascript
function classDeclarationExtendsNull(classDecl) { var classSymbol = getSymbolOfNode(classDecl); var classInstanceType = getDeclaredTypeOfSymbol(classSymbol); var baseConstructorType = getBaseConstructorTypeOfClass(classInstanceType); return baseConstructorType === nullWid...
[ "function", "classDeclarationExtendsNull", "(", "classDecl", ")", "{", "var", "classSymbol", "=", "getSymbolOfNode", "(", "classDecl", ")", ";", "var", "classInstanceType", "=", "getDeclaredTypeOfSymbol", "(", "classSymbol", ")", ";", "var", "baseConstructorType", "="...
Check if the given class-declaration extends null then return true. Otherwise, return false @param classDecl a class declaration to check if it extends null
[ "Check", "if", "the", "given", "class", "-", "declaration", "extends", "null", "then", "return", "true", ".", "Otherwise", "return", "false" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L25491-L25496
30,051
opendigitaleducation/sijil.js
docs/libs/typescript.js
getContextuallyTypedParameterType
function getContextuallyTypedParameterType(parameter) { var func = parameter.parent; if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { var iife = ts.getImmediatelyInvokedFunctionExpression(func); if (iife) { var indexOfParameter = ts...
javascript
function getContextuallyTypedParameterType(parameter) { var func = parameter.parent; if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { var iife = ts.getImmediatelyInvokedFunctionExpression(func); if (iife) { var indexOfParameter = ts...
[ "function", "getContextuallyTypedParameterType", "(", "parameter", ")", "{", "var", "func", "=", "parameter", ".", "parent", ";", "if", "(", "isContextSensitiveFunctionOrObjectLiteralMethod", "(", "func", ")", ")", "{", "var", "iife", "=", "ts", ".", "getImmediate...
Return contextual type of parameter or undefined if no contextual type is available
[ "Return", "contextual", "type", "of", "parameter", "or", "undefined", "if", "no", "contextual", "type", "is", "available" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L25800-L25839
30,052
opendigitaleducation/sijil.js
docs/libs/typescript.js
getContextualTypeForInitializerExpression
function getContextualTypeForInitializerExpression(node) { var declaration = node.parent; if (node === declaration.initializer) { if (declaration.type) { return getTypeFromTypeNode(declaration.type); } if (declaration.kind === 1...
javascript
function getContextualTypeForInitializerExpression(node) { var declaration = node.parent; if (node === declaration.initializer) { if (declaration.type) { return getTypeFromTypeNode(declaration.type); } if (declaration.kind === 1...
[ "function", "getContextualTypeForInitializerExpression", "(", "node", ")", "{", "var", "declaration", "=", "node", ".", "parent", ";", "if", "(", "node", "===", "declaration", ".", "initializer", ")", "{", "if", "(", "declaration", ".", "type", ")", "{", "re...
In a variable, parameter or property declaration with a type annotation, the contextual type of an initializer expression is the type of the variable, parameter or property. Otherwise, in a parameter declaration of a contextually typed function expression, the contextual type of an initializer expression is the context...
[ "In", "a", "variable", "parameter", "or", "property", "declaration", "with", "a", "type", "annotation", "the", "contextual", "type", "of", "an", "initializer", "expression", "is", "the", "type", "of", "the", "variable", "parameter", "or", "property", ".", "Oth...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L25848-L25877
30,053
opendigitaleducation/sijil.js
docs/libs/typescript.js
getContextualTypeForArgument
function getContextualTypeForArgument(callTarget, arg) { var args = getEffectiveCallArguments(callTarget); var argIndex = ts.indexOf(args, arg); if (argIndex >= 0) { var signature = getResolvedOrAnySignature(callTarget); return getTypeAtPosition(signat...
javascript
function getContextualTypeForArgument(callTarget, arg) { var args = getEffectiveCallArguments(callTarget); var argIndex = ts.indexOf(args, arg); if (argIndex >= 0) { var signature = getResolvedOrAnySignature(callTarget); return getTypeAtPosition(signat...
[ "function", "getContextualTypeForArgument", "(", "callTarget", ",", "arg", ")", "{", "var", "args", "=", "getEffectiveCallArguments", "(", "callTarget", ")", ";", "var", "argIndex", "=", "ts", ".", "indexOf", "(", "args", ",", "arg", ")", ";", "if", "(", "...
In a typed function call, an argument or substitution expression is contextually typed by the type of the corresponding parameter.
[ "In", "a", "typed", "function", "call", "an", "argument", "or", "substitution", "expression", "is", "contextually", "typed", "by", "the", "type", "of", "the", "corresponding", "parameter", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L25930-L25938
30,054
opendigitaleducation/sijil.js
docs/libs/typescript.js
contextualTypeIsTupleLikeType
function contextualTypeIsTupleLikeType(type) { return !!(type.flags & 524288 /* Union */ ? ts.forEach(type.types, isTupleLikeType) : isTupleLikeType(type)); }
javascript
function contextualTypeIsTupleLikeType(type) { return !!(type.flags & 524288 /* Union */ ? ts.forEach(type.types, isTupleLikeType) : isTupleLikeType(type)); }
[ "function", "contextualTypeIsTupleLikeType", "(", "type", ")", "{", "return", "!", "!", "(", "type", ".", "flags", "&", "524288", "/* Union */", "?", "ts", ".", "forEach", "(", "type", ".", "types", ",", "isTupleLikeType", ")", ":", "isTupleLikeType", "(", ...
Return true if the given contextual type is a tuple-like type
[ "Return", "true", "if", "the", "given", "contextual", "type", "is", "a", "tuple", "-", "like", "type" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L26011-L26013
30,055
opendigitaleducation/sijil.js
docs/libs/typescript.js
getContextualSignature
function getContextualSignature(node) { ts.Debug.assert(node.kind !== 147 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); var type = getContextualTypeForFunctionLikeDeclaration(node); if (!type) { return undefined; } if (!(type.flag...
javascript
function getContextualSignature(node) { ts.Debug.assert(node.kind !== 147 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); var type = getContextualTypeForFunctionLikeDeclaration(node); if (!type) { return undefined; } if (!(type.flag...
[ "function", "getContextualSignature", "(", "node", ")", "{", "ts", ".", "Debug", ".", "assert", "(", "node", ".", "kind", "!==", "147", "/* MethodDeclaration */", "||", "ts", ".", "isObjectLiteralMethod", "(", "node", ")", ")", ";", "var", "type", "=", "ge...
Return the contextual signature for a given expression node. A contextual type provides a contextual signature if it has a single call signature and if that call signature is non-generic. If the contextual type is a union type, get the signature from each type possible and if they are all identical ignoring their retur...
[ "Return", "the", "contextual", "signature", "for", "a", "given", "expression", "node", ".", "A", "contextual", "type", "provides", "a", "contextual", "signature", "if", "it", "has", "a", "single", "call", "signature", "and", "if", "that", "call", "signature", ...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L26204-L26242
30,056
opendigitaleducation/sijil.js
docs/libs/typescript.js
isJsxIntrinsicIdentifier
function isJsxIntrinsicIdentifier(tagName) { // TODO (yuisu): comment if (tagName.kind === 172 /* PropertyAccessExpression */ || tagName.kind === 97 /* ThisKeyword */) { return false; } else { return ts.isIntrinsicJsxName(tagName.text); ...
javascript
function isJsxIntrinsicIdentifier(tagName) { // TODO (yuisu): comment if (tagName.kind === 172 /* PropertyAccessExpression */ || tagName.kind === 97 /* ThisKeyword */) { return false; } else { return ts.isIntrinsicJsxName(tagName.text); ...
[ "function", "isJsxIntrinsicIdentifier", "(", "tagName", ")", "{", "// TODO (yuisu): comment", "if", "(", "tagName", ".", "kind", "===", "172", "/* PropertyAccessExpression */", "||", "tagName", ".", "kind", "===", "97", "/* ThisKeyword */", ")", "{", "return", "fals...
Returns true iff React would emit this tag name as a string rather than an identifier or qualified name
[ "Returns", "true", "iff", "React", "would", "emit", "this", "tag", "name", "as", "a", "string", "rather", "than", "an", "identifier", "or", "qualified", "name" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L26556-L26564
30,057
opendigitaleducation/sijil.js
docs/libs/typescript.js
checkClassPropertyAccess
function checkClassPropertyAccess(node, left, type, prop) { var flags = getDeclarationFlagsFromSymbol(prop); var declaringClass = getDeclaredTypeOfSymbol(getParentOfSymbol(prop)); var errorNode = node.kind === 172 /* PropertyAccessExpression */ || node.kind === 218 /* VariableDeclara...
javascript
function checkClassPropertyAccess(node, left, type, prop) { var flags = getDeclarationFlagsFromSymbol(prop); var declaringClass = getDeclaredTypeOfSymbol(getParentOfSymbol(prop)); var errorNode = node.kind === 172 /* PropertyAccessExpression */ || node.kind === 218 /* VariableDeclara...
[ "function", "checkClassPropertyAccess", "(", "node", ",", "left", ",", "type", ",", "prop", ")", "{", "var", "flags", "=", "getDeclarationFlagsFromSymbol", "(", "prop", ")", ";", "var", "declaringClass", "=", "getDeclaredTypeOfSymbol", "(", "getParentOfSymbol", "(...
Check whether the requested property access is valid. Returns true if node is a valid property access, and false otherwise. @param node The node to be checked. @param left The left hand side of the property access (e.g.: the super in `super.foo`). @param type The type of left. @param prop The symbol for the right hand ...
[ "Check", "whether", "the", "requested", "property", "access", "is", "valid", ".", "Returns", "true", "if", "node", "is", "a", "valid", "property", "access", "and", "false", "otherwise", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L26952-L27025
30,058
opendigitaleducation/sijil.js
docs/libs/typescript.js
getForInVariableSymbol
function getForInVariableSymbol(node) { var initializer = node.initializer; if (initializer.kind === 219 /* VariableDeclarationList */) { var variable = initializer.declarations[0]; if (variable && !ts.isBindingPattern(variable.name)) { return ...
javascript
function getForInVariableSymbol(node) { var initializer = node.initializer; if (initializer.kind === 219 /* VariableDeclarationList */) { var variable = initializer.declarations[0]; if (variable && !ts.isBindingPattern(variable.name)) { return ...
[ "function", "getForInVariableSymbol", "(", "node", ")", "{", "var", "initializer", "=", "node", ".", "initializer", ";", "if", "(", "initializer", ".", "kind", "===", "219", "/* VariableDeclarationList */", ")", "{", "var", "variable", "=", "initializer", ".", ...
Return the symbol of the for-in variable declared or referenced by the given for-in statement.
[ "Return", "the", "symbol", "of", "the", "for", "-", "in", "variable", "declared", "or", "referenced", "by", "the", "given", "for", "-", "in", "statement", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L27107-L27119
30,059
opendigitaleducation/sijil.js
docs/libs/typescript.js
getSingleCallSignature
function getSingleCallSignature(type) { if (type.flags & 2588672 /* ObjectType */) { var resolved = resolveStructuredTypeMembers(type); if (resolved.callSignatures.length === 1 && resolved.constructSignatures.length === 0 && resolved.properties.length === ...
javascript
function getSingleCallSignature(type) { if (type.flags & 2588672 /* ObjectType */) { var resolved = resolveStructuredTypeMembers(type); if (resolved.callSignatures.length === 1 && resolved.constructSignatures.length === 0 && resolved.properties.length === ...
[ "function", "getSingleCallSignature", "(", "type", ")", "{", "if", "(", "type", ".", "flags", "&", "2588672", "/* ObjectType */", ")", "{", "var", "resolved", "=", "resolveStructuredTypeMembers", "(", "type", ")", ";", "if", "(", "resolved", ".", "callSignatur...
If type has a single call signature and no other members, return that signature. Otherwise, return undefined.
[ "If", "type", "has", "a", "single", "call", "signature", "and", "no", "other", "members", "return", "that", "signature", ".", "Otherwise", "return", "undefined", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L27440-L27449
30,060
opendigitaleducation/sijil.js
docs/libs/typescript.js
getEffectiveDecoratorFirstArgumentType
function getEffectiveDecoratorFirstArgumentType(node) { // The first argument to a decorator is its `target`. if (node.kind === 221 /* ClassDeclaration */) { // For a class decorator, the `target` is the type of the class (e.g. the // "static" or "constructor" sid...
javascript
function getEffectiveDecoratorFirstArgumentType(node) { // The first argument to a decorator is its `target`. if (node.kind === 221 /* ClassDeclaration */) { // For a class decorator, the `target` is the type of the class (e.g. the // "static" or "constructor" sid...
[ "function", "getEffectiveDecoratorFirstArgumentType", "(", "node", ")", "{", "// The first argument to a decorator is its `target`.", "if", "(", "node", ".", "kind", "===", "221", "/* ClassDeclaration */", ")", "{", "// For a class decorator, the `target` is the type of the class (...
Returns the effective type of the first argument to a decorator. If 'node' is a class declaration or class expression, the effective argument type is the type of the static side of the class. If 'node' is a parameter declaration, the effective argument type is either the type of the static or instance side of the class...
[ "Returns", "the", "effective", "type", "of", "the", "first", "argument", "to", "a", "decorator", ".", "If", "node", "is", "a", "class", "declaration", "or", "class", "expression", "the", "effective", "argument", "type", "is", "the", "type", "of", "the", "s...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L27689-L27718
30,061
opendigitaleducation/sijil.js
docs/libs/typescript.js
getEffectiveArgumentType
function getEffectiveArgumentType(node, argIndex, arg) { // Decorators provide special arguments, a tagged template expression provides // a special first argument, and string literals get string literal types // unless we're reporting errors if (node.kind === 143 /* Deco...
javascript
function getEffectiveArgumentType(node, argIndex, arg) { // Decorators provide special arguments, a tagged template expression provides // a special first argument, and string literals get string literal types // unless we're reporting errors if (node.kind === 143 /* Deco...
[ "function", "getEffectiveArgumentType", "(", "node", ",", "argIndex", ",", "arg", ")", "{", "// Decorators provide special arguments, a tagged template expression provides", "// a special first argument, and string literals get string literal types", "// unless we're reporting errors", "if...
Gets the effective argument type for an argument in a call expression.
[ "Gets", "the", "effective", "argument", "type", "for", "an", "argument", "in", "a", "call", "expression", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L27829-L27842
30,062
opendigitaleducation/sijil.js
docs/libs/typescript.js
getResolvedSignature
function getResolvedSignature(node, candidatesOutArray) { var links = getNodeLinks(node); // If getResolvedSignature has already been called, we will have cached the resolvedSignature. // However, it is possible that either candidatesOutArray was not passed in the first time, ...
javascript
function getResolvedSignature(node, candidatesOutArray) { var links = getNodeLinks(node); // If getResolvedSignature has already been called, we will have cached the resolvedSignature. // However, it is possible that either candidatesOutArray was not passed in the first time, ...
[ "function", "getResolvedSignature", "(", "node", ",", "candidatesOutArray", ")", "{", "var", "links", "=", "getNodeLinks", "(", "node", ")", ";", "// If getResolvedSignature has already been called, we will have cached the resolvedSignature.", "// However, it is possible that eithe...
candidatesOutArray is passed by signature help in the language service, and collectCandidates must fill it up with the appropriate candidate signatures
[ "candidatesOutArray", "is", "passed", "by", "signature", "help", "in", "the", "language", "service", "and", "collectCandidates", "must", "fill", "it", "up", "with", "the", "appropriate", "candidate", "signatures" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L28337-L28354
30,063
opendigitaleducation/sijil.js
docs/libs/typescript.js
checkCallExpression
function checkCallExpression(node) { // Grammar checking; stop grammar-checking if checkGrammarTypeArguments return true checkGrammarTypeArguments(node, node.typeArguments) || checkGrammarArguments(node, node.arguments); var signature = getResolvedSignature(node); if (nod...
javascript
function checkCallExpression(node) { // Grammar checking; stop grammar-checking if checkGrammarTypeArguments return true checkGrammarTypeArguments(node, node.typeArguments) || checkGrammarArguments(node, node.arguments); var signature = getResolvedSignature(node); if (nod...
[ "function", "checkCallExpression", "(", "node", ")", "{", "// Grammar checking; stop grammar-checking if checkGrammarTypeArguments return true", "checkGrammarTypeArguments", "(", "node", ",", "node", ".", "typeArguments", ")", "||", "checkGrammarArguments", "(", "node", ",", ...
Syntactically and semantically checks a call or new expression. @param node The call/new expression to be checked. @returns On success, the expression's signature's return type. On failure, anyType.
[ "Syntactically", "and", "semantically", "checks", "a", "call", "or", "new", "expression", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L28372-L28408
30,064
opendigitaleducation/sijil.js
docs/libs/typescript.js
maybeTypeOfKind
function maybeTypeOfKind(type, kind) { if (type.flags & kind) { return true; } if (type.flags & 1572864 /* UnionOrIntersection */) { var types = type.types; for (var _i = 0, types_13 = types; _i < types_13.length; _i++) { ...
javascript
function maybeTypeOfKind(type, kind) { if (type.flags & kind) { return true; } if (type.flags & 1572864 /* UnionOrIntersection */) { var types = type.types; for (var _i = 0, types_13 = types; _i < types_13.length; _i++) { ...
[ "function", "maybeTypeOfKind", "(", "type", ",", "kind", ")", "{", "if", "(", "type", ".", "flags", "&", "kind", ")", "{", "return", "true", ";", "}", "if", "(", "type", ".", "flags", "&", "1572864", "/* UnionOrIntersection */", ")", "{", "var", "types...
Return true if type might be of the given kind. A union or intersection type might be of a given kind if at least one constituent type is of the given kind.
[ "Return", "true", "if", "type", "might", "be", "of", "the", "given", "kind", ".", "A", "union", "or", "intersection", "type", "might", "be", "of", "a", "given", "kind", "if", "at", "least", "one", "constituent", "type", "is", "of", "the", "given", "kin...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L28986-L29000
30,065
opendigitaleducation/sijil.js
docs/libs/typescript.js
isTypeOfKind
function isTypeOfKind(type, kind) { if (type.flags & kind) { return true; } if (type.flags & 524288 /* Union */) { var types = type.types; for (var _i = 0, types_14 = types; _i < types_14.length; _i++) { var t = type...
javascript
function isTypeOfKind(type, kind) { if (type.flags & kind) { return true; } if (type.flags & 524288 /* Union */) { var types = type.types; for (var _i = 0, types_14 = types; _i < types_14.length; _i++) { var t = type...
[ "function", "isTypeOfKind", "(", "type", ",", "kind", ")", "{", "if", "(", "type", ".", "flags", "&", "kind", ")", "{", "return", "true", ";", "}", "if", "(", "type", ".", "flags", "&", "524288", "/* Union */", ")", "{", "var", "types", "=", "type"...
Return true if type is of the given kind. A union type is of a given kind if all constituent types are of the given kind. An intersection type is of a given kind if at least one constituent type is of the given kind.
[ "Return", "true", "if", "type", "is", "of", "the", "given", "kind", ".", "A", "union", "type", "is", "of", "a", "given", "kind", "if", "all", "constituent", "types", "are", "of", "the", "given", "kind", ".", "An", "intersection", "type", "is", "of", ...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L29004-L29028
30,066
opendigitaleducation/sijil.js
docs/libs/typescript.js
checkForDisallowedESSymbolOperand
function checkForDisallowedESSymbolOperand(operator) { var offendingSymbolOperand = maybeTypeOfKind(leftType, 512 /* ESSymbol */) ? left : maybeTypeOfKind(rightType, 512 /* ESSymbol */) ? right : undefined; if (offendingSymbolOperand) { ...
javascript
function checkForDisallowedESSymbolOperand(operator) { var offendingSymbolOperand = maybeTypeOfKind(leftType, 512 /* ESSymbol */) ? left : maybeTypeOfKind(rightType, 512 /* ESSymbol */) ? right : undefined; if (offendingSymbolOperand) { ...
[ "function", "checkForDisallowedESSymbolOperand", "(", "operator", ")", "{", "var", "offendingSymbolOperand", "=", "maybeTypeOfKind", "(", "leftType", ",", "512", "/* ESSymbol */", ")", "?", "left", ":", "maybeTypeOfKind", "(", "rightType", ",", "512", "/* ESSymbol */"...
Return true if there was no error, false if there was an error.
[ "Return", "true", "if", "there", "was", "no", "error", "false", "if", "there", "was", "an", "error", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L29350-L29359
30,067
opendigitaleducation/sijil.js
docs/libs/typescript.js
checkTypeParameter
function checkTypeParameter(node) { // Grammar Checking if (node.expression) { grammarErrorOnFirstToken(node.expression, ts.Diagnostics.Type_expected); } checkSourceElement(node.constraint); getConstraintOfTypeParameter(getDeclaredTypeOfTypePar...
javascript
function checkTypeParameter(node) { // Grammar Checking if (node.expression) { grammarErrorOnFirstToken(node.expression, ts.Diagnostics.Type_expected); } checkSourceElement(node.constraint); getConstraintOfTypeParameter(getDeclaredTypeOfTypePar...
[ "function", "checkTypeParameter", "(", "node", ")", "{", "// Grammar Checking", "if", "(", "node", ".", "expression", ")", "{", "grammarErrorOnFirstToken", "(", "node", ".", "expression", ",", "ts", ".", "Diagnostics", ".", "Type_expected", ")", ";", "}", "che...
DECLARATION AND STATEMENT TYPE CHECKING
[ "DECLARATION", "AND", "STATEMENT", "TYPE", "CHECKING" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L29690-L29700
30,068
opendigitaleducation/sijil.js
docs/libs/typescript.js
getPromisedType
function getPromisedType(promise) { // // { // promise // then( // thenFunction // onfulfilled: ( // onfulfilledParameterType // value: T // valueParameterType // ) => any // ): any; ...
javascript
function getPromisedType(promise) { // // { // promise // then( // thenFunction // onfulfilled: ( // onfulfilledParameterType // value: T // valueParameterType // ) => any // ): any; ...
[ "function", "getPromisedType", "(", "promise", ")", "{", "//", "// { // promise", "// then( // thenFunction", "// onfulfilled: ( // onfulfilledParameterType", "// value: T // valueParameterType", "// ) => any", "// ): any;", "// }", "//", "if"...
Gets the "promised type" of a promise. @param type The type of the promise. @remarks The "promised type" of a type is the type of the "value" parameter of the "onfulfilled" callback.
[ "Gets", "the", "promised", "type", "of", "a", "promise", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L30538-L30578
30,069
opendigitaleducation/sijil.js
docs/libs/typescript.js
checkAsyncFunctionReturnType
function checkAsyncFunctionReturnType(node) { if (languageVersion >= 2 /* ES6 */) { var returnType = getTypeFromTypeNode(node.type); return checkCorrectPromiseType(returnType, node.type); } var globalPromiseConstructorLikeType = getGlobalPromiseConstru...
javascript
function checkAsyncFunctionReturnType(node) { if (languageVersion >= 2 /* ES6 */) { var returnType = getTypeFromTypeNode(node.type); return checkCorrectPromiseType(returnType, node.type); } var globalPromiseConstructorLikeType = getGlobalPromiseConstru...
[ "function", "checkAsyncFunctionReturnType", "(", "node", ")", "{", "if", "(", "languageVersion", ">=", "2", "/* ES6 */", ")", "{", "var", "returnType", "=", "getTypeFromTypeNode", "(", "node", ".", "type", ")", ";", "return", "checkCorrectPromiseType", "(", "ret...
Checks the return type of an async function to ensure it is a compatible Promise implementation. @param node The signature to check @param returnType The return type for the function @remarks This checks that an async function has a valid Promise-compatible return type, and returns the *awaited type* of the promise. An...
[ "Checks", "the", "return", "type", "of", "an", "async", "function", "to", "ensure", "it", "is", "a", "compatible", "Promise", "implementation", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L30713-L30781
30,070
opendigitaleducation/sijil.js
docs/libs/typescript.js
checkDecorators
function checkDecorators(node) { if (!node.decorators) { return; } // skip this check for nodes that cannot have decorators. These should have already had an error reported by // checkGrammarDecorators. if (!ts.nodeCanBeDecorated(node)) { ...
javascript
function checkDecorators(node) { if (!node.decorators) { return; } // skip this check for nodes that cannot have decorators. These should have already had an error reported by // checkGrammarDecorators. if (!ts.nodeCanBeDecorated(node)) { ...
[ "function", "checkDecorators", "(", "node", ")", "{", "if", "(", "!", "node", ".", "decorators", ")", "{", "return", ";", "}", "// skip this check for nodes that cannot have decorators. These should have already had an error reported by", "// checkGrammarDecorators.", "if", "...
Check the decorators of a node
[ "Check", "the", "decorators", "of", "a", "node" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L30855-L30889
30,071
opendigitaleducation/sijil.js
docs/libs/typescript.js
checkParameterInitializer
function checkParameterInitializer(node) { if (ts.getRootDeclaration(node).kind !== 142 /* Parameter */) { return; } var func = ts.getContainingFunction(node); visit(node.initializer); function visit(n) { if (ts.isTypeNode(n) ||...
javascript
function checkParameterInitializer(node) { if (ts.getRootDeclaration(node).kind !== 142 /* Parameter */) { return; } var func = ts.getContainingFunction(node); visit(node.initializer); function visit(n) { if (ts.isTypeNode(n) ||...
[ "function", "checkParameterInitializer", "(", "node", ")", "{", "if", "(", "ts", ".", "getRootDeclaration", "(", "node", ")", ".", "kind", "!==", "142", "/* Parameter */", ")", "{", "return", ";", "}", "var", "func", "=", "ts", ".", "getContainingFunction", ...
Check that a parameter initializer contains no references to parameters declared to the right of itself
[ "Check", "that", "a", "parameter", "initializer", "contains", "no", "references", "to", "parameters", "declared", "to", "the", "right", "of", "itself" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L31277-L31337
30,072
opendigitaleducation/sijil.js
docs/libs/typescript.js
checkTypeParameterListsIdentical
function checkTypeParameterListsIdentical(node, symbol) { if (symbol.declarations.length === 1) { return; } var firstDecl; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; if (decl...
javascript
function checkTypeParameterListsIdentical(node, symbol) { if (symbol.declarations.length === 1) { return; } var firstDecl; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; if (decl...
[ "function", "checkTypeParameterListsIdentical", "(", "node", ",", "symbol", ")", "{", "if", "(", "symbol", ".", "declarations", ".", "length", "===", "1", ")", "{", "return", ";", "}", "var", "firstDecl", ";", "for", "(", "var", "_i", "=", "0", ",", "_...
Check that type parameter lists are identical across multiple declarations
[ "Check", "that", "type", "parameter", "lists", "are", "identical", "across", "multiple", "declarations" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L32095-L32111
30,073
opendigitaleducation/sijil.js
docs/libs/typescript.js
checkSourceFileWorker
function checkSourceFileWorker(node) { var links = getNodeLinks(node); if (!(links.flags & 1 /* TypeChecked */)) { // If skipLibCheck is enabled, skip type checking if file is a declaration file. // If skipDefaultLibCheck is enabled, skip type checking if file con...
javascript
function checkSourceFileWorker(node) { var links = getNodeLinks(node); if (!(links.flags & 1 /* TypeChecked */)) { // If skipLibCheck is enabled, skip type checking if file is a declaration file. // If skipDefaultLibCheck is enabled, skip type checking if file con...
[ "function", "checkSourceFileWorker", "(", "node", ")", "{", "var", "links", "=", "getNodeLinks", "(", "node", ")", ";", "if", "(", "!", "(", "links", ".", "flags", "&", "1", "/* TypeChecked */", ")", ")", "{", "// If skipLibCheck is enabled, skip type checking i...
Fully type check a source file and collect the relevant diagnostics.
[ "Fully", "type", "check", "a", "source", "file", "and", "collect", "the", "relevant", "diagnostics", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L33250-L33283
30,074
opendigitaleducation/sijil.js
docs/libs/typescript.js
isInsideWithStatementBody
function isInsideWithStatementBody(node) { if (node) { while (node.parent) { if (node.parent.kind === 212 /* WithStatement */ && node.parent.statement === node) { return true; } node = node.parent; ...
javascript
function isInsideWithStatementBody(node) { if (node) { while (node.parent) { if (node.parent.kind === 212 /* WithStatement */ && node.parent.statement === node) { return true; } node = node.parent; ...
[ "function", "isInsideWithStatementBody", "(", "node", ")", "{", "if", "(", "node", ")", "{", "while", "(", "node", ".", "parent", ")", "{", "if", "(", "node", ".", "parent", ".", "kind", "===", "212", "/* WithStatement */", "&&", "node", ".", "parent", ...
Language service support
[ "Language", "service", "support" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L33315-L33325
30,075
opendigitaleducation/sijil.js
docs/libs/typescript.js
copySymbol
function copySymbol(symbol, meaning) { if (symbol.flags & meaning) { var id = symbol.name; // We will copy all symbol regardless of its reserved name because // symbolsToArray will check whether the key is a reserved name and ...
javascript
function copySymbol(symbol, meaning) { if (symbol.flags & meaning) { var id = symbol.name; // We will copy all symbol regardless of its reserved name because // symbolsToArray will check whether the key is a reserved name and ...
[ "function", "copySymbol", "(", "symbol", ",", "meaning", ")", "{", "if", "(", "symbol", ".", "flags", "&", "meaning", ")", "{", "var", "id", "=", "symbol", ".", "name", ";", "// We will copy all symbol regardless of its reserved name because", "// symbolsToArray wil...
Copy the given symbol into symbol tables if the symbol has the given meaning and it doesn't already existed in the symbol table @param key a key for storing in symbol table; if undefined, use symbol.name @param symbol the symbol to be added into symbol table @param meaning meaning of symbol to filter by before adding t...
[ "Copy", "the", "given", "symbol", "into", "symbol", "tables", "if", "the", "symbol", "has", "the", "given", "meaning", "and", "it", "doesn", "t", "already", "existed", "in", "the", "symbol", "table" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L33390-L33400
30,076
opendigitaleducation/sijil.js
docs/libs/typescript.js
isTypeReferenceIdentifier
function isTypeReferenceIdentifier(entityName) { var node = entityName; while (node.parent && node.parent.kind === 139 /* QualifiedName */) { node = node.parent; } return node.parent && (node.parent.kind === 155 /* TypeReference */ || node.parent.kind === ...
javascript
function isTypeReferenceIdentifier(entityName) { var node = entityName; while (node.parent && node.parent.kind === 139 /* QualifiedName */) { node = node.parent; } return node.parent && (node.parent.kind === 155 /* TypeReference */ || node.parent.kind === ...
[ "function", "isTypeReferenceIdentifier", "(", "entityName", ")", "{", "var", "node", "=", "entityName", ";", "while", "(", "node", ".", "parent", "&&", "node", ".", "parent", ".", "kind", "===", "139", "/* QualifiedName */", ")", "{", "node", "=", "node", ...
True if the given identifier is part of a type reference
[ "True", "if", "the", "given", "identifier", "is", "part", "of", "a", "type", "reference" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L33426-L33432
30,077
opendigitaleducation/sijil.js
docs/libs/typescript.js
getExportSpecifierLocalTargetSymbol
function getExportSpecifierLocalTargetSymbol(node) { return node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node) : resolveEntityName(node.propertyName || node.name, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Al...
javascript
function getExportSpecifierLocalTargetSymbol(node) { return node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node) : resolveEntityName(node.propertyName || node.name, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Al...
[ "function", "getExportSpecifierLocalTargetSymbol", "(", "node", ")", "{", "return", "node", ".", "parent", ".", "parent", ".", "moduleSpecifier", "?", "getExternalModuleMember", "(", "node", ".", "parent", ".", "parent", ",", "node", ")", ":", "resolveEntityName",...
Returns the target of an export specifier without following aliases
[ "Returns", "the", "target", "of", "an", "export", "specifier", "without", "following", "aliases" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L33645-L33649
30,078
opendigitaleducation/sijil.js
docs/libs/typescript.js
getReferencedDeclarationWithCollidingName
function getReferencedDeclarationWithCollidingName(node) { var symbol = getReferencedValueSymbol(node); return symbol && isSymbolOfDeclarationWithCollidingName(symbol) ? symbol.valueDeclaration : undefined; }
javascript
function getReferencedDeclarationWithCollidingName(node) { var symbol = getReferencedValueSymbol(node); return symbol && isSymbolOfDeclarationWithCollidingName(symbol) ? symbol.valueDeclaration : undefined; }
[ "function", "getReferencedDeclarationWithCollidingName", "(", "node", ")", "{", "var", "symbol", "=", "getReferencedValueSymbol", "(", "node", ")", ";", "return", "symbol", "&&", "isSymbolOfDeclarationWithCollidingName", "(", "symbol", ")", "?", "symbol", ".", "valueD...
When resolved as an expression identifier, if the given node references a nested block scoped entity with a name that either hides an existing name or might hide it when compiled downlevel, return the declaration of that entity. Otherwise, return undefined.
[ "When", "resolved", "as", "an", "expression", "identifier", "if", "the", "given", "node", "references", "a", "nested", "block", "scoped", "entity", "with", "a", "name", "that", "either", "hides", "an", "existing", "name", "or", "might", "hide", "it", "when",...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L33902-L33905
30,079
opendigitaleducation/sijil.js
docs/libs/typescript.js
encodeLastRecordedSourceMapSpan
function encodeLastRecordedSourceMapSpan() { if (!lastRecordedSourceMapSpan || lastRecordedSourceMapSpan === lastEncodedSourceMapSpan) { return; } var prevEncodedEmittedColumn = lastEncodedSourceMapSpan.emittedColumn; // Line/Comma delimiters i...
javascript
function encodeLastRecordedSourceMapSpan() { if (!lastRecordedSourceMapSpan || lastRecordedSourceMapSpan === lastEncodedSourceMapSpan) { return; } var prevEncodedEmittedColumn = lastEncodedSourceMapSpan.emittedColumn; // Line/Comma delimiters i...
[ "function", "encodeLastRecordedSourceMapSpan", "(", ")", "{", "if", "(", "!", "lastRecordedSourceMapSpan", "||", "lastRecordedSourceMapSpan", "===", "lastEncodedSourceMapSpan", ")", "{", "return", ";", "}", "var", "prevEncodedEmittedColumn", "=", "lastEncodedSourceMapSpan",...
Encoding for sourcemap span
[ "Encoding", "for", "sourcemap", "span" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L35513-L35548
30,080
opendigitaleducation/sijil.js
docs/libs/typescript.js
getExportDefaultTempVariableName
function getExportDefaultTempVariableName() { var baseName = "_default"; if (!(baseName in currentIdentifiers)) { return baseName; } var count = 0; while (true) { count++; var name_23 = baseName + "_" + count; ...
javascript
function getExportDefaultTempVariableName() { var baseName = "_default"; if (!(baseName in currentIdentifiers)) { return baseName; } var count = 0; while (true) { count++; var name_23 = baseName + "_" + count; ...
[ "function", "getExportDefaultTempVariableName", "(", ")", "{", "var", "baseName", "=", "\"_default\"", ";", "if", "(", "!", "(", "baseName", "in", "currentIdentifiers", ")", ")", "{", "return", "baseName", ";", "}", "var", "count", "=", "0", ";", "while", ...
Return a temp variable name to be used in `export default` statements. The temp name will be of the form _default_counter. Note that export default is only allowed at most once in a module, so we do not need to keep track of created temp names.
[ "Return", "a", "temp", "variable", "name", "to", "be", "used", "in", "export", "default", "statements", ".", "The", "temp", "name", "will", "be", "of", "the", "form", "_default_counter", ".", "Note", "that", "export", "default", "is", "only", "allowed", "a...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L36132-L36145
30,081
opendigitaleducation/sijil.js
docs/libs/typescript.js
writeReferencePath
function writeReferencePath(referencedFile, addBundledFileReference, emitOnlyDtsFiles) { var declFileName; var addedBundledEmitReference = false; if (ts.isDeclarationFile(referencedFile)) { // Declaration file, use declaration file name declFileName = ...
javascript
function writeReferencePath(referencedFile, addBundledFileReference, emitOnlyDtsFiles) { var declFileName; var addedBundledEmitReference = false; if (ts.isDeclarationFile(referencedFile)) { // Declaration file, use declaration file name declFileName = ...
[ "function", "writeReferencePath", "(", "referencedFile", ",", "addBundledFileReference", ",", "emitOnlyDtsFiles", ")", "{", "var", "declFileName", ";", "var", "addedBundledEmitReference", "=", "false", ";", "if", "(", "ts", ".", "isDeclarationFile", "(", "referencedFi...
Adds the reference to referenced file, returns true if global file reference was emitted @param referencedFile @param addBundledFileReference Determines if global file reference corresponding to bundled file should be emitted or not
[ "Adds", "the", "reference", "to", "referenced", "file", "returns", "true", "if", "global", "file", "reference", "was", "emitted" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L37219-L37245
30,082
opendigitaleducation/sijil.js
docs/libs/typescript.js
emitFiles
function emitFiles(resolver, host, targetSourceFile, emitOnlyDtsFiles) { // emit output for the __extends helper function var extendsHelper = "\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor...
javascript
function emitFiles(resolver, host, targetSourceFile, emitOnlyDtsFiles) { // emit output for the __extends helper function var extendsHelper = "\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor...
[ "function", "emitFiles", "(", "resolver", ",", "host", ",", "targetSourceFile", ",", "emitOnlyDtsFiles", ")", "{", "// emit output for the __extends helper function", "var", "extendsHelper", "=", "\"\\nvar __extends = (this && this.__extends) || function (d, b) {\\n for (var p in ...
targetSourceFile is when users only want one file in entire project to be emitted. This is used in compileOnSave feature
[ "targetSourceFile", "is", "when", "users", "only", "want", "one", "file", "in", "entire", "project", "to", "be", "emitted", ".", "This", "is", "used", "in", "compileOnSave", "feature" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L37566-L44681
30,083
opendigitaleducation/sijil.js
docs/libs/typescript.js
makeTempVariableName
function makeTempVariableName(flags) { if (flags && !(tempFlags & flags)) { var name_24 = flags === 268435456 /* _i */ ? "_i" : "_n"; if (isUniqueName(name_24)) { tempFlags |= flags; return name_24; ...
javascript
function makeTempVariableName(flags) { if (flags && !(tempFlags & flags)) { var name_24 = flags === 268435456 /* _i */ ? "_i" : "_n"; if (isUniqueName(name_24)) { tempFlags |= flags; return name_24; ...
[ "function", "makeTempVariableName", "(", "flags", ")", "{", "if", "(", "flags", "&&", "!", "(", "tempFlags", "&", "flags", ")", ")", "{", "var", "name_24", "=", "flags", "===", "268435456", "/* _i */", "?", "\"_i\"", ":", "\"_n\"", ";", "if", "(", "isU...
Return the next available name in the pattern _a ... _z, _0, _1, ... TempFlags._i or TempFlags._n may be used to express a preference for that dedicated name. Note that names generated by makeTempVariableName and makeUniqueName will never conflict.
[ "Return", "the", "next", "available", "name", "in", "the", "pattern", "_a", "...", "_z", "_0", "_1", "...", "TempFlags", ".", "_i", "or", "TempFlags", ".", "_n", "may", "be", "used", "to", "express", "a", "preference", "for", "that", "dedicated", "name",...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L37767-L37786
30,084
opendigitaleducation/sijil.js
docs/libs/typescript.js
writeEmittedFiles
function writeEmittedFiles(emitOutput, jsFilePath, sourceMapFilePath, writeByteOrderMark, sourceFiles) { if (compilerOptions.sourceMap && !compilerOptions.inlineSourceMap) { ts.writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap.getText(), /*writeByteOrderMark*/ false, s...
javascript
function writeEmittedFiles(emitOutput, jsFilePath, sourceMapFilePath, writeByteOrderMark, sourceFiles) { if (compilerOptions.sourceMap && !compilerOptions.inlineSourceMap) { ts.writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap.getText(), /*writeByteOrderMark*/ false, s...
[ "function", "writeEmittedFiles", "(", "emitOutput", ",", "jsFilePath", ",", "sourceMapFilePath", ",", "writeByteOrderMark", ",", "sourceFiles", ")", "{", "if", "(", "compilerOptions", ".", "sourceMap", "&&", "!", "compilerOptions", ".", "inlineSourceMap", ")", "{", ...
Write emitted output to disk
[ "Write", "emitted", "output", "to", "disk" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L37847-L37855
30,085
opendigitaleducation/sijil.js
docs/libs/typescript.js
emitToken
function emitToken(tokenKind, startPos, emitFn) { var tokenStartPos = ts.skipTrivia(currentText, startPos); emitPos(tokenStartPos); var tokenString = ts.tokenToString(tokenKind); if (emitFn) { emitFn(); } ...
javascript
function emitToken(tokenKind, startPos, emitFn) { var tokenStartPos = ts.skipTrivia(currentText, startPos); emitPos(tokenStartPos); var tokenString = ts.tokenToString(tokenKind); if (emitFn) { emitFn(); } ...
[ "function", "emitToken", "(", "tokenKind", ",", "startPos", ",", "emitFn", ")", "{", "var", "tokenStartPos", "=", "ts", ".", "skipTrivia", "(", "currentText", ",", "startPos", ")", ";", "emitPos", "(", "tokenStartPos", ")", ";", "var", "tokenString", "=", ...
Emit the text for the given token that comes after startPos This by default writes the text provided with the given tokenKind but if optional emitFn callback is provided the text is emitted using the callback instead of default text @param tokenKind the kind of the token to search and emit @param startPos the position ...
[ "Emit", "the", "text", "for", "the", "given", "token", "that", "comes", "after", "startPos", "This", "by", "default", "writes", "the", "text", "provided", "with", "the", "given", "tokenKind", "but", "if", "optional", "emitFn", "callback", "is", "provided", "...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L37892-L37905
30,086
opendigitaleducation/sijil.js
docs/libs/typescript.js
isImportedReference
function isImportedReference(node) { var declaration = resolver.getReferencedImportDeclaration(node); return declaration && (declaration.kind === 231 /* ImportClause */ || declaration.kind === 234 /* ImportSpecifier */); }
javascript
function isImportedReference(node) { var declaration = resolver.getReferencedImportDeclaration(node); return declaration && (declaration.kind === 231 /* ImportClause */ || declaration.kind === 234 /* ImportSpecifier */); }
[ "function", "isImportedReference", "(", "node", ")", "{", "var", "declaration", "=", "resolver", ".", "getReferencedImportDeclaration", "(", "node", ")", ";", "return", "declaration", "&&", "(", "declaration", ".", "kind", "===", "231", "/* ImportClause */", "||",...
Return true if identifier resolves to an imported identifier
[ "Return", "true", "if", "identifier", "resolves", "to", "an", "imported", "identifier" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L39111-L39114
30,087
opendigitaleducation/sijil.js
docs/libs/typescript.js
tryEmitStartOfVariableDeclarationList
function tryEmitStartOfVariableDeclarationList(decl) { if (shouldHoistVariable(decl, /*checkIfSourceFileLevelDecl*/ true)) { // variables in variable declaration list were already hoisted return false; } if (convertedLoopState && (t...
javascript
function tryEmitStartOfVariableDeclarationList(decl) { if (shouldHoistVariable(decl, /*checkIfSourceFileLevelDecl*/ true)) { // variables in variable declaration list were already hoisted return false; } if (convertedLoopState && (t...
[ "function", "tryEmitStartOfVariableDeclarationList", "(", "decl", ")", "{", "if", "(", "shouldHoistVariable", "(", "decl", ",", "/*checkIfSourceFileLevelDecl*/", "true", ")", ")", "{", "// variables in variable declaration list were already hoisted", "return", "false", ";", ...
Returns true if start of variable declaration list was emitted. Returns false if nothing was written - this can happen for source file level variable declarations in system modules where such variable declarations are hoisted.
[ "Returns", "true", "if", "start", "of", "variable", "declaration", "list", "was", "emitted", ".", "Returns", "false", "if", "nothing", "was", "written", "-", "this", "can", "happen", "for", "source", "file", "level", "variable", "declarations", "in", "system",...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L39887-L39919
30,088
opendigitaleducation/sijil.js
docs/libs/typescript.js
emitAssignment
function emitAssignment(name, value, shouldEmitCommaBeforeAssignment, nodeForSourceMap) { if (shouldEmitCommaBeforeAssignment) { write(", "); } var exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(name); if (...
javascript
function emitAssignment(name, value, shouldEmitCommaBeforeAssignment, nodeForSourceMap) { if (shouldEmitCommaBeforeAssignment) { write(", "); } var exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(name); if (...
[ "function", "emitAssignment", "(", "name", ",", "value", ",", "shouldEmitCommaBeforeAssignment", ",", "nodeForSourceMap", ")", "{", "if", "(", "shouldEmitCommaBeforeAssignment", ")", "{", "write", "(", "\", \"", ")", ";", "}", "var", "exportChanged", "=", "isNameO...
Emit an assignment to a given identifier, 'name', with a given expression, 'value'. @param name an identifier as a left-hand-side operand of the assignment @param value an expression as a right-hand-side operand of the assignment @param shouldEmitCommaBeforeAssignment a boolean indicating whether to prefix an assignmen...
[ "Emit", "an", "assignment", "to", "a", "given", "identifier", "name", "with", "a", "given", "expression", "value", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L40741-L40769
30,089
opendigitaleducation/sijil.js
docs/libs/typescript.js
getSuperCallAtGivenIndex
function getSuperCallAtGivenIndex(ctor, index) { if (!ctor.body) { return undefined; } var statements = ctor.body.statements; if (!statements || index >= statements.length) { return undefined; } ...
javascript
function getSuperCallAtGivenIndex(ctor, index) { if (!ctor.body) { return undefined; } var statements = ctor.body.statements; if (!statements || index >= statements.length) { return undefined; } ...
[ "function", "getSuperCallAtGivenIndex", "(", "ctor", ",", "index", ")", "{", "if", "(", "!", "ctor", ".", "body", ")", "{", "return", "undefined", ";", "}", "var", "statements", "=", "ctor", ".", "body", ".", "statements", ";", "if", "(", "!", "stateme...
Return the statement at a given index if it is a super-call statement @param ctor a constructor declaration @param index an index to constructor's body to check
[ "Return", "the", "statement", "at", "a", "given", "index", "if", "it", "is", "a", "super", "-", "call", "statement" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L41661-L41673
30,090
opendigitaleducation/sijil.js
docs/libs/typescript.js
isTripleSlashComment
function isTripleSlashComment(comment) { // Verify this is /// comment, but do the regexp match only when we first can find /// in the comment text // so that we don't end up computing comment string and doing match for all // comments if (currentText.charCodeAt(comment.p...
javascript
function isTripleSlashComment(comment) { // Verify this is /// comment, but do the regexp match only when we first can find /// in the comment text // so that we don't end up computing comment string and doing match for all // comments if (currentText.charCodeAt(comment.p...
[ "function", "isTripleSlashComment", "(", "comment", ")", "{", "// Verify this is /// comment, but do the regexp match only when we first can find /// in the comment text", "// so that we don't end up computing comment string and doing match for all // comments", "if", "(", "currentText", ".", ...
Determine if the given comment is a triple-slash @return true if the comment is a triple-slash comment else false
[ "Determine", "if", "the", "given", "comment", "is", "a", "triple", "-", "slash" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L44521-L44533
30,091
opendigitaleducation/sijil.js
docs/libs/typescript.js
getAutomaticTypeDirectiveNames
function getAutomaticTypeDirectiveNames(options, host) { // Use explicit type list from tsconfig.json if (options.types) { return options.types; } // Walk the primary type lookup locations var result = []; if (host.directoryExists && host.getDirectories) { ...
javascript
function getAutomaticTypeDirectiveNames(options, host) { // Use explicit type list from tsconfig.json if (options.types) { return options.types; } // Walk the primary type lookup locations var result = []; if (host.directoryExists && host.getDirectories) { ...
[ "function", "getAutomaticTypeDirectiveNames", "(", "options", ",", "host", ")", "{", "// Use explicit type list from tsconfig.json", "if", "(", "options", ".", "types", ")", "{", "return", "options", ".", "types", ";", "}", "// Walk the primary type lookup locations", "...
Given a set of options, returns the set of type directive names that should be included for this program automatically. This list could either come from the config file, or from enumerating the types root + initial secondary types lookup location. More type directives might appear in the program later as a result of lo...
[ "Given", "a", "set", "of", "options", "returns", "the", "set", "of", "type", "directive", "names", "that", "should", "be", "included", "for", "this", "program", "automatically", ".", "This", "list", "could", "either", "come", "from", "the", "config", "file",...
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L45064-L45093
30,092
opendigitaleducation/sijil.js
docs/libs/typescript.js
findSourceFile
function findSourceFile(fileName, path, isDefaultLib, isReference, refFile, refPos, refEnd) { if (filesByName.contains(path)) { var file_1 = filesByName.get(path); // try to check if we've already seen this file but with a different casing in path // NOTE: thi...
javascript
function findSourceFile(fileName, path, isDefaultLib, isReference, refFile, refPos, refEnd) { if (filesByName.contains(path)) { var file_1 = filesByName.get(path); // try to check if we've already seen this file but with a different casing in path // NOTE: thi...
[ "function", "findSourceFile", "(", "fileName", ",", "path", ",", "isDefaultLib", ",", "isReference", ",", "refFile", ",", "refPos", ",", "refEnd", ")", "{", "if", "(", "filesByName", ".", "contains", "(", "path", ")", ")", "{", "var", "file_1", "=", "fil...
Get source file from normalized fileName
[ "Get", "source", "file", "from", "normalized", "fileName" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L45823-L45889
30,093
opendigitaleducation/sijil.js
docs/libs/typescript.js
verifyEmitFilePath
function verifyEmitFilePath(emitFileName, emitFilesSeen) { if (emitFileName) { var emitFilePath = ts.toPath(emitFileName, currentDirectory, getCanonicalFileName); // Report error if the output overwrites input file if (filesByName.contains(emit...
javascript
function verifyEmitFilePath(emitFileName, emitFilesSeen) { if (emitFileName) { var emitFilePath = ts.toPath(emitFileName, currentDirectory, getCanonicalFileName); // Report error if the output overwrites input file if (filesByName.contains(emit...
[ "function", "verifyEmitFilePath", "(", "emitFileName", ",", "emitFilesSeen", ")", "{", "if", "(", "emitFileName", ")", "{", "var", "emitFilePath", "=", "ts", ".", "toPath", "(", "emitFileName", ",", "currentDirectory", ",", "getCanonicalFileName", ")", ";", "// ...
Verify that all the emit files are unique and don't overwrite input files
[ "Verify", "that", "all", "the", "emit", "files", "are", "unique", "and", "don", "t", "overwrite", "input", "files" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L46169-L46185
30,094
opendigitaleducation/sijil.js
docs/libs/typescript.js
parseConfigFileTextToJson
function parseConfigFileTextToJson(fileName, jsonText, stripComments) { if (stripComments === void 0) { stripComments = true; } try { var jsonTextToParse = stripComments ? removeComments(jsonText) : jsonText; return { config: /\S/.test(jsonTextToParse) ? JSON.parse(jsonTextToPars...
javascript
function parseConfigFileTextToJson(fileName, jsonText, stripComments) { if (stripComments === void 0) { stripComments = true; } try { var jsonTextToParse = stripComments ? removeComments(jsonText) : jsonText; return { config: /\S/.test(jsonTextToParse) ? JSON.parse(jsonTextToPars...
[ "function", "parseConfigFileTextToJson", "(", "fileName", ",", "jsonText", ",", "stripComments", ")", "{", "if", "(", "stripComments", "===", "void", "0", ")", "{", "stripComments", "=", "true", ";", "}", "try", "{", "var", "jsonTextToParse", "=", "stripCommen...
Parse the text of the tsconfig.json file @param fileName The path to the config file @param jsonText The text of the config file
[ "Parse", "the", "text", "of", "the", "tsconfig", ".", "json", "file" ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L46852-L46861
30,095
opendigitaleducation/sijil.js
docs/libs/typescript.js
matchFileNames
function matchFileNames(fileNames, include, exclude, basePath, options, host, errors) { basePath = ts.normalizePath(basePath); // The exclude spec list is converted into a regular expression, which allows us to quickly // test whether a file or directory should be excluded before recursively tra...
javascript
function matchFileNames(fileNames, include, exclude, basePath, options, host, errors) { basePath = ts.normalizePath(basePath); // The exclude spec list is converted into a regular expression, which allows us to quickly // test whether a file or directory should be excluded before recursively tra...
[ "function", "matchFileNames", "(", "fileNames", ",", "include", ",", "exclude", ",", "basePath", ",", "options", ",", "host", ",", "errors", ")", "{", "basePath", "=", "ts", ".", "normalizePath", "(", "basePath", ")", ";", "// The exclude spec list is converted ...
Expands an array of file specifications. @param fileNames The literal file names to include. @param include The wildcard file specifications to include. @param exclude The wildcard file specifications to exclude. @param basePath The base path for any relative file specifications. @param options Compiler options. @para...
[ "Expands", "an", "array", "of", "file", "specifications", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L47212-L47279
30,096
opendigitaleducation/sijil.js
docs/libs/typescript.js
getWildcardDirectories
function getWildcardDirectories(include, exclude, path, useCaseSensitiveFileNames) { // We watch a directory recursively if it contains a wildcard anywhere in a directory segment // of the pattern: // // /a/b/**/d - Watch /a/b recursively to catch changes to any d in any subfolder rec...
javascript
function getWildcardDirectories(include, exclude, path, useCaseSensitiveFileNames) { // We watch a directory recursively if it contains a wildcard anywhere in a directory segment // of the pattern: // // /a/b/**/d - Watch /a/b recursively to catch changes to any d in any subfolder rec...
[ "function", "getWildcardDirectories", "(", "include", ",", "exclude", ",", "path", ",", "useCaseSensitiveFileNames", ")", "{", "// We watch a directory recursively if it contains a wildcard anywhere in a directory segment", "// of the pattern:", "//", "// /a/b/**/d - Watch /a/b recu...
Gets directories in a set of include patterns that should be watched for changes.
[ "Gets", "directories", "in", "a", "set", "of", "include", "patterns", "that", "should", "be", "watched", "for", "changes", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L47302-L47349
30,097
opendigitaleducation/sijil.js
docs/libs/typescript.js
hasFileWithHigherPriorityExtension
function hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, extensions, keyMapper) { var extensionPriority = ts.getExtensionPriority(file, extensions); var adjustedExtensionPriority = ts.adjustExtensionPriority(extensionPriority); for (var i = 0 /* Highest */; i < adjustedExte...
javascript
function hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, extensions, keyMapper) { var extensionPriority = ts.getExtensionPriority(file, extensions); var adjustedExtensionPriority = ts.adjustExtensionPriority(extensionPriority); for (var i = 0 /* Highest */; i < adjustedExte...
[ "function", "hasFileWithHigherPriorityExtension", "(", "file", ",", "literalFiles", ",", "wildcardFiles", ",", "extensions", ",", "keyMapper", ")", "{", "var", "extensionPriority", "=", "ts", ".", "getExtensionPriority", "(", "file", ",", "extensions", ")", ";", "...
Determines whether a literal or wildcard file has already been included that has a higher extension priority. @param file The path to the file. @param extensionPriority The priority of the extension. @param context The expansion context.
[ "Determines", "whether", "a", "literal", "or", "wildcard", "file", "has", "already", "been", "included", "that", "has", "a", "higher", "extension", "priority", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L47358-L47369
30,098
opendigitaleducation/sijil.js
docs/libs/typescript.js
removeWildcardFilesWithLowerPriorityExtension
function removeWildcardFilesWithLowerPriorityExtension(file, wildcardFiles, extensions, keyMapper) { var extensionPriority = ts.getExtensionPriority(file, extensions); var nextExtensionPriority = ts.getNextLowestExtensionPriority(extensionPriority); for (var i = nextExtensionPriority; i < extens...
javascript
function removeWildcardFilesWithLowerPriorityExtension(file, wildcardFiles, extensions, keyMapper) { var extensionPriority = ts.getExtensionPriority(file, extensions); var nextExtensionPriority = ts.getNextLowestExtensionPriority(extensionPriority); for (var i = nextExtensionPriority; i < extens...
[ "function", "removeWildcardFilesWithLowerPriorityExtension", "(", "file", ",", "wildcardFiles", ",", "extensions", ",", "keyMapper", ")", "{", "var", "extensionPriority", "=", "ts", ".", "getExtensionPriority", "(", "file", ",", "extensions", ")", ";", "var", "nextE...
Removes files included via wildcard expansion with a lower extension priority that have already been included. @param file The path to the file. @param extensionPriority The priority of the extension. @param context The expansion context.
[ "Removes", "files", "included", "via", "wildcard", "expansion", "with", "a", "lower", "extension", "priority", "that", "have", "already", "been", "included", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L47378-L47386
30,099
opendigitaleducation/sijil.js
docs/libs/typescript.js
startNode
function startNode(node) { var navNode = emptyNavigationBarNode(node); pushChild(parent, navNode); // Save the old parent parentsStack.push(parent); parent = navNode; }
javascript
function startNode(node) { var navNode = emptyNavigationBarNode(node); pushChild(parent, navNode); // Save the old parent parentsStack.push(parent); parent = navNode; }
[ "function", "startNode", "(", "node", ")", "{", "var", "navNode", "=", "emptyNavigationBarNode", "(", "node", ")", ";", "pushChild", "(", "parent", ",", "navNode", ")", ";", "// Save the old parent", "parentsStack", ".", "push", "(", "parent", ")", ";", "par...
Add a new level of NavigationBarNodes. This pushes to the stack, so you must call `endNode` when you are done adding to this node.
[ "Add", "a", "new", "level", "of", "NavigationBarNodes", ".", "This", "pushes", "to", "the", "stack", "so", "you", "must", "call", "endNode", "when", "you", "are", "done", "adding", "to", "this", "node", "." ]
c0cd5250a573689a8bcd9733b958d4215b0ecfa4
https://github.com/opendigitaleducation/sijil.js/blob/c0cd5250a573689a8bcd9733b958d4215b0ecfa4/docs/libs/typescript.js#L47827-L47833