code stringlengths 24 2.07M | docstring stringlengths 25 85.3k | func_name stringlengths 1 92 | language stringclasses 1
value | repo stringlengths 5 64 | path stringlengths 4 172 | url stringlengths 44 218 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
function isNamespaceExportReference(node) {
var container = resolver.getReferencedExportContainer(node);
return container && container.kind !== 248 /* SourceFile */;
} | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | isNamespaceExportReference | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitShorthandPropertyAssignment(node) {
// The name property of a short-hand property assignment is considered an expression position, so here
// we manually emit the identifier to avoid rewriting.
writeTextOfNode(currentText, node.name);
// If em... | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | emitShorthandPropertyAssignment | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function tryEmitConstantValue(node) {
var constantValue = tryGetConstEnumValue(node);
if (constantValue !== undefined) {
write(constantValue.toString());
if (!compilerOptions.removeComments) {
var propertyName = node.kind ==... | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | tryEmitConstantValue | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function tryGetConstEnumValue(node) {
if (compilerOptions.isolatedModules) {
return undefined;
}
return node.kind === 166 /* PropertyAccessExpression */ || node.kind === 167 /* ElementAccessExpression */
? resolver.getConstantValue(... | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | tryGetConstEnumValue | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitPropertyAccess(node) {
if (tryEmitConstantValue(node)) {
return;
}
emit(node.expression);
var indentedBeforeDot = indentIfOnDifferentLines(node, node.expression, node.dotToken);
// 1 .toString is a valid pro... | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | emitPropertyAccess | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitQualifiedName(node) {
emit(node.left);
write(".");
emit(node.right);
} | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | emitQualifiedName | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitQualifiedNameAsExpression(node, useFallback) {
if (node.left.kind === 69 /* Identifier */) {
emitEntityNameAsExpression(node.left, useFallback);
}
else if (useFallback) {
var temp = createAndRecordTempVariable(0 /* Auto... | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | emitQualifiedNameAsExpression | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitEntityNameAsExpression(node, useFallback) {
switch (node.kind) {
case 69 /* Identifier */:
if (useFallback) {
write("typeof ");
emitExpressionIdentifier(node);
wri... | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | emitEntityNameAsExpression | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitIndexedAccess(node) {
if (tryEmitConstantValue(node)) {
return;
}
emit(node.expression);
write("[");
emit(node.argumentExpression);
write("]");
} | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | emitIndexedAccess | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function hasSpreadElement(elements) {
return ts.forEach(elements, function (e) { return e.kind === 185 /* SpreadElementExpression */; });
} | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | hasSpreadElement | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function skipParentheses(node) {
while (node.kind === 172 /* ParenthesizedExpression */ || node.kind === 171 /* TypeAssertionExpression */ || node.kind === 189 /* AsExpression */) {
node = node.expression;
}
return node;
} | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | skipParentheses | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitCallTarget(node) {
if (node.kind === 69 /* Identifier */ || node.kind === 97 /* ThisKeyword */ || node.kind === 95 /* SuperKeyword */) {
emit(node);
return node;
}
var temp = createAndRecordTempVariable(0 /* Auto */);
... | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | emitCallTarget | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitCallWithSpread(node) {
var target;
var expr = skipParentheses(node.expression);
if (expr.kind === 166 /* PropertyAccessExpression */) {
// Target will be emitted as "this" argument
target = emitCallTarget(expr.expressio... | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | emitCallWithSpread | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitCallExpression(node) {
if (languageVersion < 2 /* ES6 */ && hasSpreadElement(node.arguments)) {
emitCallWithSpread(node);
return;
}
var superCall = false;
if (node.expression.kind === 95 /* SuperKeyword ... | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | emitCallExpression | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitNewExpression(node) {
write("new ");
// Spread operator logic is supported in new expressions in ES5 using a combination
// of Function.prototype.bind() and Function.prototype.apply().
//
// Example:
//
... | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | emitNewExpression | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitTaggedTemplateExpression(node) {
if (languageVersion >= 2 /* ES6 */) {
emit(node.tag);
write(" ");
emit(node.template);
}
else {
emitDownlevelTaggedTemplate(node);
... | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | emitTaggedTemplateExpression | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitParenExpression(node) {
// If the node is synthesized, it means the emitter put the parentheses there,
// not the user. If we didn't want them, the emitter would not have put them
// there.
if (!ts.nodeIsSynthesized(node) && node.parent.kind !... | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | emitParenExpression | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitDeleteExpression(node) {
write(ts.tokenToString(78 /* DeleteKeyword */));
write(" ");
emit(node.expression);
} | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | emitDeleteExpression | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitVoidExpression(node) {
write(ts.tokenToString(103 /* VoidKeyword */));
write(" ");
emit(node.expression);
} | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | emitVoidExpression | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitTypeOfExpression(node) {
write(ts.tokenToString(101 /* TypeOfKeyword */));
write(" ");
emit(node.expression);
} | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | emitTypeOfExpression | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node) {
if (!isCurrentFileSystemExternalModule() || node.kind !== 69 /* Identifier */ || ts.nodeIsSynthesized(node)) {
return false;
}
var isVariableDeclarationOrBindingElement = nod... | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | isNameOfExportedSourceLevelDeclarationInSystemExternalModule | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitPrefixUnaryExpression(node) {
var exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node.operand);
if (exportChanged) {
// emit
// ++x
// as
// exports('x', ++x)
... | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | emitPrefixUnaryExpression | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitPostfixUnaryExpression(node) {
var exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node.operand);
if (exportChanged) {
// export function returns the value that was passes as the second argument
// however ... | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | emitPostfixUnaryExpression | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function shouldHoistDeclarationInSystemJsModule(node) {
return isSourceFileLevelDeclarationInSystemJsModule(node, /*isExported*/ false);
} | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | shouldHoistDeclarationInSystemJsModule | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isSourceFileLevelDeclarationInSystemJsModule(node, isExported) {
if (!node || !isCurrentFileSystemExternalModule()) {
return false;
}
var current = node;
while (current) {
if (current.kind === 248 /* SourceF... | Returns whether the expression has lesser, greater,
or equal precedence to the binary '+' operator | isSourceFileLevelDeclarationInSystemJsModule | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitSerializedTypeNode(node) {
if (node) {
switch (node.kind) {
case 103 /* VoidKeyword */:
write("void 0");
return;
case 160 /* ParenthesizedType */:
... | Serializes the type of a declaration to an appropriate JS constructor value. Used by the __metadata decorator for a class member. | emitSerializedTypeNode | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitSerializedTypeReferenceNode(node) {
var location = node.parent;
while (ts.isDeclaration(location) || ts.isTypeNode(location)) {
location = location.parent;
}
// Clone the type name and parent it to a location outside of the... | Serializes a TypeReferenceNode to an appropriate JS constructor value. Used by the __metadata decorator. | emitSerializedTypeReferenceNode | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitSerializedParameterTypesOfNode(node) {
// serialization of parameter types uses the following rules:
//
// * If the declaration is a class, the parameters of the first constructor with a body are used.
// * If the declaration is function-like ... | Serializes the parameter types of a function or the constructor of a class. Used by the __metadata decorator for a method or set accessor. | emitSerializedParameterTypesOfNode | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitSerializedTypeMetadata(node, writeComma) {
// This method emits the serialized type metadata for a decorator target.
// The caller should have already tested whether the node has decorators.
var argumentsWritten = 0;
if (compilerOptions.emitDe... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitSerializedTypeMetadata | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function shouldEmitEnumDeclaration(node) {
var isConstEnum = ts.isConst(node);
return !isConstEnum || compilerOptions.preserveConstEnums || compilerOptions.isolatedModules;
} | Serializes the return type of function. Used by the __metadata decorator for a method. | shouldEmitEnumDeclaration | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitEnumDeclaration(node) {
// const enums are completely erased during compilation.
if (!shouldEmitEnumDeclaration(node)) {
return;
}
if (!shouldHoistDeclarationInSystemJsModule(node)) {
// do not emit var ... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitEnumDeclaration | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitEnumMember(node) {
var enumParent = node.parent;
emitStart(node);
write(getGeneratedNameForNode(enumParent));
write("[");
write(getGeneratedNameForNode(enumParent));
write("[");
emitExpressionFor... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitEnumMember | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function writeEnumMemberDeclarationValue(member) {
var value = resolver.getConstantValue(member);
if (value !== undefined) {
write(value.toString());
return;
}
else if (member.initializer) {
emit(... | Serializes the return type of function. Used by the __metadata decorator for a method. | writeEnumMemberDeclarationValue | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) {
if (moduleDeclaration.body.kind === 218 /* ModuleDeclaration */) {
var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body);
return recursiveInnerMo... | Serializes the return type of function. Used by the __metadata decorator for a method. | getInnerMostModuleDeclarationFromDottedModule | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function shouldEmitModuleDeclaration(node) {
return ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums || compilerOptions.isolatedModules);
} | Serializes the return type of function. Used by the __metadata decorator for a method. | shouldEmitModuleDeclaration | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isModuleMergedWithES6Class(node) {
return languageVersion === 2 /* ES6 */ && !!(resolver.getNodeCheckFlags(node) & 32768 /* LexicalModuleMergesWithClass */);
} | Serializes the return type of function. Used by the __metadata decorator for a method. | isModuleMergedWithES6Class | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitModuleDeclaration(node) {
// Emit only if this module is non-ambient.
var shouldEmit = shouldEmitModuleDeclaration(node);
if (!shouldEmit) {
return emitCommentsOnNotEmittedNode(node);
}
var hoistedInDeclarat... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitModuleDeclaration | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function tryRenameExternalModule(moduleName) {
if (renamedDependencies && ts.hasProperty(renamedDependencies, moduleName.text)) {
return "\"" + renamedDependencies[moduleName.text] + "\"";
}
return undefined;
} | Serializes the return type of function. Used by the __metadata decorator for a method. | tryRenameExternalModule | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitRequire(moduleName) {
if (moduleName.kind === 9 /* StringLiteral */) {
write("require(");
var text = tryRenameExternalModule(moduleName);
if (text) {
write(text);
}
el... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitRequire | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getNamespaceDeclarationNode(node) {
if (node.kind === 221 /* ImportEqualsDeclaration */) {
return node;
}
var importClause = node.importClause;
if (importClause && importClause.namedBindings && importClause.namedBindings.kind =... | Serializes the return type of function. Used by the __metadata decorator for a method. | getNamespaceDeclarationNode | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isDefaultImport(node) {
return node.kind === 222 /* ImportDeclaration */ && node.importClause && !!node.importClause.name;
} | Serializes the return type of function. Used by the __metadata decorator for a method. | isDefaultImport | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitExportImportAssignments(node) {
if (ts.isAliasSymbolDeclaration(node) && resolver.isValueAliasDeclaration(node)) {
emitExportMemberAssignments(node.name);
}
ts.forEachChild(node, emitExportImportAssignments);
} | Serializes the return type of function. Used by the __metadata decorator for a method. | emitExportImportAssignments | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitImportDeclaration(node) {
if (modulekind !== 5 /* ES6 */) {
return emitExternalImportDeclaration(node);
}
// ES6 import
if (node.importClause) {
var shouldEmitDefaultBindings = resolver.isReferencedAlias... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitImportDeclaration | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitExternalImportDeclaration(node) {
if (ts.contains(externalImports, node)) {
var isExportedImport = node.kind === 221 /* ImportEqualsDeclaration */ && (node.flags & 2 /* Export */) !== 0;
var namespaceDeclaration = getNamespaceDeclarationNode(node);
... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitExternalImportDeclaration | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitImportEqualsDeclaration(node) {
if (ts.isExternalModuleImportEqualsDeclaration(node)) {
emitExternalImportDeclaration(node);
return;
}
// preserve old compiler's behavior: emit 'var' for import declaration (even if we d... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitImportEqualsDeclaration | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitExportDeclaration(node) {
ts.Debug.assert(modulekind !== 4 /* System */);
if (modulekind !== 5 /* ES6 */) {
if (node.moduleSpecifier && (!node.exportClause || resolver.isValueAliasDeclaration(node))) {
emitStart(node);
... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitExportDeclaration | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitExportOrImportSpecifierList(specifiers, shouldEmit) {
ts.Debug.assert(modulekind === 5 /* ES6 */);
var needsComma = false;
for (var _a = 0, specifiers_1 = specifiers; _a < specifiers_1.length; _a++) {
var specifier = specifiers_1[_a];
... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitExportOrImportSpecifierList | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitExportAssignment(node) {
if (!node.isExportEquals && resolver.isValueAliasDeclaration(node)) {
if (modulekind === 5 /* ES6 */) {
writeLine();
emitStart(node);
write("export default ");
... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitExportAssignment | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function collectExternalModuleInfo(sourceFile) {
externalImports = [];
exportSpecifiers = {};
exportEquals = undefined;
hasExportStars = false;
for (var _a = 0, _b = sourceFile.statements; _a < _b.length; _a++) {
var nod... | Serializes the return type of function. Used by the __metadata decorator for a method. | collectExternalModuleInfo | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitExportStarHelper() {
if (hasExportStars) {
writeLine();
write("function __export(m) {");
increaseIndent();
writeLine();
write("for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitExportStarHelper | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getLocalNameForExternalImport(node) {
var namespaceDeclaration = getNamespaceDeclarationNode(node);
if (namespaceDeclaration && !isDefaultImport(node)) {
return ts.getTextOfNodeFromSourceText(currentText, namespaceDeclaration.name);
}
... | Serializes the return type of function. Used by the __metadata decorator for a method. | getLocalNameForExternalImport | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getExternalModuleNameText(importNode) {
var moduleName = ts.getExternalModuleName(importNode);
if (moduleName.kind === 9 /* StringLiteral */) {
return tryRenameExternalModule(moduleName) || getLiteralText(moduleName);
}
return ... | Serializes the return type of function. Used by the __metadata decorator for a method. | getExternalModuleNameText | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitVariableDeclarationsForImports() {
if (externalImports.length === 0) {
return;
}
writeLine();
var started = false;
for (var _a = 0, externalImports_1 = externalImports; _a < externalImports_1.length; _a++) {... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitVariableDeclarationsForImports | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitLocalStorageForExportedNamesIfNecessary(exportedDeclarations) {
// when resolving exports local exported entries/indirect exported entries in the module
// should always win over entries with similar names that were added via star exports
// to support this w... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitLocalStorageForExportedNamesIfNecessary | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitExportStarFunction(localNames) {
var exportStarFunction = makeUniqueName("exportStar");
writeLine();
// define an export star helper function
write("function " + exportStarFunction + "(m) {");
increaseIndent... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitExportStarFunction | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function writeExportedName(node) {
// do not record default exports
// they are local to module and never overwritten (explicitly skipped) by star export
if (node.kind !== 69 /* Identifier */ && node.flags & 512 /* Default */) {
return;... | Serializes the return type of function. Used by the __metadata decorator for a method. | writeExportedName | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function processTopLevelVariableAndFunctionDeclarations(node) {
// per ES6 spec:
// 15.2.1.16.4 ModuleDeclarationInstantiation() Concrete Method
// - var declarations are initialized to undefined - 14.a.ii
// - function/generator declarations are instantia... | Serializes the return type of function. Used by the __metadata decorator for a method. | processTopLevelVariableAndFunctionDeclarations | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function visit(node) {
if (node.flags & 4 /* Ambient */) {
return;
}
if (node.kind === 213 /* FunctionDeclaration */) {
if (!hoistedFunctionDeclarations) {
hoistedFunctionDeclarations ... | Serializes the return type of function. Used by the __metadata decorator for a method. | visit | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function shouldHoistVariable(node, checkIfSourceFileLevelDecl) {
if (checkIfSourceFileLevelDecl && !shouldHoistDeclarationInSystemJsModule(node)) {
return false;
}
// hoist variable if
// - it is not block scoped
// - it... | Serializes the return type of function. Used by the __metadata decorator for a method. | shouldHoistVariable | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isCurrentFileSystemExternalModule() {
return modulekind === 4 /* System */ && isCurrentFileExternalModule;
} | Serializes the return type of function. Used by the __metadata decorator for a method. | isCurrentFileSystemExternalModule | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitSystemModuleBody(node, dependencyGroups, startIndex) {
// shape of the body in system modules:
// function (exports) {
// <list of local aliases for imports>
// <hoisted function declarations>
// <hoisted variable d... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitSystemModuleBody | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitSetters(exportStarFunction, dependencyGroups) {
write("setters:[");
for (var i = 0; i < dependencyGroups.length; ++i) {
if (i !== 0) {
write(",");
}
writeLine();
increaseI... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitSetters | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitExecute(node, startIndex) {
write("execute: function() {");
increaseIndent();
writeLine();
for (var i = startIndex; i < node.statements.length; ++i) {
var statement = node.statements[i];
switch (statemen... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitExecute | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function writeModuleName(node, emitRelativePathAsModuleName) {
var moduleName = node.moduleName;
if (moduleName || (emitRelativePathAsModuleName && (moduleName = getResolvedExternalModuleName(host, node)))) {
write("\"" + moduleName + "\", ");
}
... | Serializes the return type of function. Used by the __metadata decorator for a method. | writeModuleName | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitSystemModule(node, emitRelativePathAsModuleName) {
collectExternalModuleInfo(node);
// System modules has the following shape
// System.register(['dep-1', ... 'dep-n'], function(exports) {/* module body function */})
// 'exports' here is a fun... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitSystemModule | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getAMDDependencyNames(node, includeNonAmdDependencies, emitRelativePathAsModuleName) {
// names of modules with corresponding parameter in the factory function
var aliasedModuleNames = [];
// names of modules with no corresponding parameters in factory function
... | Serializes the return type of function. Used by the __metadata decorator for a method. | getAMDDependencyNames | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitAMDDependencies(node, includeNonAmdDependencies, emitRelativePathAsModuleName) {
// An AMD define function has the following shape:
// define(id?, dependencies?, factory);
//
// This has the shape of
// define(name, ["m... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitAMDDependencies | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitAMDDependencyList(_a) {
var aliasedModuleNames = _a.aliasedModuleNames, unaliasedModuleNames = _a.unaliasedModuleNames;
write("[\"require\", \"exports\"");
if (aliasedModuleNames.length) {
write(", ");
write(aliasedModu... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitAMDDependencyList | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitAMDFactoryHeader(_a) {
var importAliasNames = _a.importAliasNames;
write("function (require, exports");
if (importAliasNames.length) {
write(", ");
write(importAliasNames.join(", "));
}
w... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitAMDFactoryHeader | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitAMDModule(node, emitRelativePathAsModuleName) {
emitEmitHelpers(node);
collectExternalModuleInfo(node);
writeLine();
write("define(");
writeModuleName(node, emitRelativePathAsModuleName);
emitAMDDependencies(nod... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitAMDModule | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitCommonJSModule(node) {
var startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ false);
emitEmitHelpers(node);
collectExternalModuleInfo(node);
emitExportStarHelper();
emitCaptureThisForNodeIfNecessary(node... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitCommonJSModule | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitUMDModule(node) {
emitEmitHelpers(node);
collectExternalModuleInfo(node);
var dependencyNames = getAMDDependencyNames(node, /*includeNonAmdDependencies*/ false);
// Module is detected first to support Browserify users that load into a browser ... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitUMDModule | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitES6Module(node) {
externalImports = undefined;
exportSpecifiers = undefined;
exportEquals = undefined;
hasExportStars = false;
var startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ false);
... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitES6Module | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitExportEquals(emitAsReturn) {
if (exportEquals && resolver.isValueAliasDeclaration(exportEquals)) {
writeLine();
emitStart(exportEquals);
write(emitAsReturn ? "return " : "module.exports = ");
emit(exportEquals.e... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitExportEquals | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitJsxElement(node) {
switch (compilerOptions.jsx) {
case 2 /* React */:
jsxEmitReact(node);
break;
case 1 /* Preserve */:
// Fall back to preserve if None was specified (we'll error ear... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitJsxElement | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function trimReactWhitespaceAndApplyEntities(node) {
var result = undefined;
var text = ts.getTextOfNode(node, /*includeTrivia*/ true);
var firstNonWhitespace = 0;
var lastNonWhitespace = -1;
// JSX trims whitespace at the end and beginning... | Serializes the return type of function. Used by the __metadata decorator for a method. | trimReactWhitespaceAndApplyEntities | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getTextToEmit(node) {
switch (compilerOptions.jsx) {
case 2 /* React */:
var text = trimReactWhitespaceAndApplyEntities(node);
if (text === undefined || text.length === 0) {
return undefined;
... | Serializes the return type of function. Used by the __metadata decorator for a method. | getTextToEmit | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitJsxText(node) {
switch (compilerOptions.jsx) {
case 2 /* React */:
write("\"");
write(trimReactWhitespaceAndApplyEntities(node));
write("\"");
break;
case ... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitJsxText | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitJsxExpression(node) {
if (node.expression) {
switch (compilerOptions.jsx) {
case 1 /* Preserve */:
default:
write("{");
emit(node.expression);
... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitJsxExpression | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitDirectivePrologues(statements, startWithNewLine) {
for (var i = 0; i < statements.length; ++i) {
if (ts.isPrologueDirective(statements[i])) {
if (startWithNewLine || i > 0) {
writeLine();
}
... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitDirectivePrologues | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function writeLines(text) {
var lines = text.split(/\r\n|\r|\n/g);
for (var i = 0; i < lines.length; ++i) {
var line = lines[i];
if (line.length) {
writeLine();
write(line);
}
... | Serializes the return type of function. Used by the __metadata decorator for a method. | writeLines | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitEmitHelpers(node) {
// Only emit helpers if the user did not say otherwise.
if (!compilerOptions.noEmitHelpers) {
// Only Emit __extends function when target ES5.
// For target ES6 and above, we can emit classDeclaration as is.
... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitEmitHelpers | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitSourceFileNode(node) {
// Start new file on new line
writeLine();
emitShebang();
emitDetachedCommentsAndUpdateCommentsInfo(node);
if (ts.isExternalModule(node) || compilerOptions.isolatedModules) {
if (root ... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitSourceFileNode | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitNodeWithCommentsAndWithoutSourcemap(node) {
emitNodeConsideringCommentsOption(node, emitNodeWithoutSourceMap);
} | Serializes the return type of function. Used by the __metadata decorator for a method. | emitNodeWithCommentsAndWithoutSourcemap | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitNodeConsideringCommentsOption(node, emitNodeConsideringSourcemap) {
if (node) {
if (node.flags & 4 /* Ambient */) {
return emitCommentsOnNotEmittedNode(node);
}
if (isSpecializedCommentHandling(node)) {
... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitNodeConsideringCommentsOption | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitNodeWithoutSourceMap(node) {
if (node) {
emitJavaScriptWorker(node);
}
} | Serializes the return type of function. Used by the __metadata decorator for a method. | emitNodeWithoutSourceMap | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isSpecializedCommentHandling(node) {
switch (node.kind) {
// All of these entities are emitted in a specialized fashion. As such, we allow
// the specialized methods for each to handle the comments on the nodes.
case 215 /* InterfaceD... | Serializes the return type of function. Used by the __metadata decorator for a method. | isSpecializedCommentHandling | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function shouldEmitLeadingAndTrailingComments(node) {
switch (node.kind) {
case 193 /* VariableStatement */:
return shouldEmitLeadingAndTrailingCommentsForVariableStatement(node);
case 218 /* ModuleDeclaration */:
//... | Serializes the return type of function. Used by the __metadata decorator for a method. | shouldEmitLeadingAndTrailingComments | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitJavaScriptWorker(node) {
// Check if the node can be emitted regardless of the ScriptTarget
switch (node.kind) {
case 69 /* Identifier */:
return emitIdentifier(node);
case 138 /* Parameter */:
... | Serializes the return type of function. Used by the __metadata decorator for a method. | emitJavaScriptWorker | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function hasDetachedComments(pos) {
return detachedCommentsInfo !== undefined && ts.lastOrUndefined(detachedCommentsInfo).nodePos === pos;
} | Serializes the return type of function. Used by the __metadata decorator for a method. | hasDetachedComments | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getLeadingCommentsWithoutDetachedComments() {
// get the leading comments from detachedPos
var leadingComments = ts.getLeadingCommentRanges(currentText, ts.lastOrUndefined(detachedCommentsInfo).detachedCommentEndPos);
if (detachedCommentsInfo.length - 1) {
... | Serializes the return type of function. Used by the __metadata decorator for a method. | getLeadingCommentsWithoutDetachedComments | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
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... | Determine if the given comment is a triple-slash
@return true if the comment is a triple-slash comment else false | isTripleSlashComment | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getLeadingCommentsToEmit(node) {
// Emit the leading comments only if the parent's pos doesn't match because parent should take care of emitting these comments
if (node.parent) {
if (node.parent.kind === 248 /* SourceFile */ || node.pos !== node.parent.pos) {... | Determine if the given comment is a triple-slash
@return true if the comment is a triple-slash comment else false | getLeadingCommentsToEmit | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getTrailingCommentsToEmit(node) {
// Emit the trailing comments only if the parent's pos doesn't match because parent should take care of emitting these comments
if (node.parent) {
if (node.parent.kind === 248 /* SourceFile */ || node.end !== node.parent.end)... | Determine if the given comment is a triple-slash
@return true if the comment is a triple-slash comment else false | getTrailingCommentsToEmit | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function findConfigFile(searchPath) {
var fileName = "tsconfig.json";
while (true) {
if (ts.sys.fileExists(fileName)) {
return fileName;
}
var parentPath = ts.getDirectoryPath(searchPath);
if (parentPath === searchPath) {
br... | The version of the TypeScript compiler release | findConfigFile | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function resolveTripleslashReference(moduleName, containingFile) {
var basePath = ts.getDirectoryPath(containingFile);
var referencedFileName = ts.isRootedDiskPath(moduleName) ? moduleName : ts.combinePaths(basePath, moduleName);
return ts.normalizePath(referencedFileName);
} | The version of the TypeScript compiler release | resolveTripleslashReference | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function resolveModuleName(moduleName, containingFile, compilerOptions, host) {
var moduleResolution = compilerOptions.moduleResolution !== undefined
? compilerOptions.moduleResolution
: compilerOptions.module === 1 /* CommonJS */ ? 2 /* NodeJs */ : 1 /* Classic */;
switch (modul... | The version of the TypeScript compiler release | resolveModuleName | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function nodeModuleNameResolver(moduleName, containingFile, host) {
var containingDirectory = ts.getDirectoryPath(containingFile);
if (ts.getRootLength(moduleName) !== 0 || nameStartsWithDotSlashOrDotDotSlash(moduleName)) {
var failedLookupLocations = [];
var candidate = ts.norma... | The version of the TypeScript compiler release | nodeModuleNameResolver | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function loadNodeModuleFromFile(extensions, candidate, failedLookupLocation, host) {
return ts.forEach(extensions, tryLoad);
function tryLoad(ext) {
var fileName = ts.fileExtensionIs(candidate, ext) ? candidate : candidate + ext;
if (host.fileExists(fileName)) {
r... | The version of the TypeScript compiler release | loadNodeModuleFromFile | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function tryLoad(ext) {
var fileName = ts.fileExtensionIs(candidate, ext) ? candidate : candidate + ext;
if (host.fileExists(fileName)) {
return fileName;
}
else {
failedLookupLocation.push(fileName);
return undefined;
... | The version of the TypeScript compiler release | tryLoad | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.