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 getTypeReferenceSerializationKind(typeName) {
// Resolve the symbol as a value to ensure the type can be reached at runtime during emit.
var valueSymbol = resolveEntityName(typeName, 107455 /* Value */, /*ignoreErrors*/ true);
var constructorType = valueSymbol ? getTypeOfSym... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | getTypeReferenceSerializationKind | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function writeTypeOfDeclaration(declaration, enclosingDeclaration, flags, writer) {
// Get type of the symbol if this is the valid symbol otherwise get type at location
var symbol = getSymbolOfNode(declaration);
var type = symbol && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | writeTypeOfDeclaration | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function writeReturnTypeOfSignatureDeclaration(signatureDeclaration, enclosingDeclaration, flags, writer) {
var signature = getSignatureFromDeclaration(signatureDeclaration);
getSymbolDisplayBuilder().buildTypeDisplay(getReturnTypeOfSignature(signature), writer, enclosingDeclaration, flags);
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | writeReturnTypeOfSignatureDeclaration | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function writeTypeOfExpression(expr, enclosingDeclaration, flags, writer) {
var type = getTypeOfExpression(expr);
getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | writeTypeOfExpression | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function hasGlobalName(name) {
return ts.hasProperty(globals, name);
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | hasGlobalName | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getReferencedValueSymbol(reference) {
return getNodeLinks(reference).resolvedSymbol ||
resolveName(reference, reference.text, 107455 /* Value */ | 1048576 /* ExportValue */ | 8388608 /* Alias */,
/*nodeNotFoundMessage*/ undefined, /*nameArg*/ undefined);
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | getReferencedValueSymbol | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getReferencedValueDeclaration(reference) {
ts.Debug.assert(!ts.nodeIsSynthesized(reference));
var symbol = getReferencedValueSymbol(reference);
return symbol && getExportSymbolOfValueSymbolIfExported(symbol).valueDeclaration;
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | getReferencedValueDeclaration | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function instantiateSingleCallFunctionType(functionType, typeArguments) {
if (functionType === unknownType) {
return unknownType;
}
var signature = getSingleCallSignature(functionType);
if (!signature) {
return unknownType;
}
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | instantiateSingleCallFunctionType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function createResolver() {
return {
getReferencedExportContainer: getReferencedExportContainer,
getReferencedImportDeclaration: getReferencedImportDeclaration,
getReferencedNestedRedeclaration: getReferencedNestedRedeclaration,
isNestedRedecla... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | createResolver | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getExternalModuleFileFromDeclaration(declaration) {
var specifier = ts.getExternalModuleName(declaration);
var moduleSymbol = getSymbolAtLocation(specifier);
if (!moduleSymbol) {
return undefined;
}
return ts.getDeclarationOfKind(modul... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | getExternalModuleFileFromDeclaration | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function initializeTypeChecker() {
// Bind all source files and propagate errors
ts.forEach(host.getSourceFiles(), function (file) {
ts.bindSourceFile(file, compilerOptions);
});
// Initialize global symbol table
ts.forEach(host.getSourceFiles(... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | initializeTypeChecker | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function createInstantiatedPromiseLikeType() {
var promiseLikeType = getGlobalPromiseLikeType();
if (promiseLikeType !== emptyGenericType) {
return createTypeReference(promiseLikeType, [anyType]);
}
return emptyObjectType;
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | createInstantiatedPromiseLikeType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function createThenableType() {
// build the thenable type that is used to verify against a non-promise "thenable" operand to `await`.
var thenPropertySymbol = createSymbol(67108864 /* Transient */ | 4 /* Property */, "then");
getSymbolLinks(thenPropertySymbol).type = globalFunctionT... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | createThenableType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarModifiers(node) {
switch (node.kind) {
case 145 /* GetAccessor */:
case 146 /* SetAccessor */:
case 144 /* Constructor */:
case 141 /* PropertyDeclaration */:
case 140 /* PropertySignature */:
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarModifiers | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarAsyncModifier(node, asyncModifier) {
if (languageVersion < 2 /* ES6 */) {
return grammarErrorOnNode(asyncModifier, ts.Diagnostics.Async_functions_are_only_available_when_targeting_ECMAScript_6_and_higher);
}
switch (node.kind) {
ca... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarAsyncModifier | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarForDisallowedTrailingComma(list) {
if (list && list.hasTrailingComma) {
var start = list.end - ",".length;
var end = list.end;
var sourceFile = ts.getSourceFileOfNode(list[0]);
return grammarErrorAtPos(sourceFile, start, en... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarForDisallowedTrailingComma | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarTypeParameterList(node, typeParameters, file) {
if (checkGrammarForDisallowedTrailingComma(typeParameters)) {
return true;
}
if (typeParameters && typeParameters.length === 0) {
var start = typeParameters.pos - "<".length;
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarTypeParameterList | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarParameterList(parameters) {
if (checkGrammarForDisallowedTrailingComma(parameters)) {
return true;
}
var seenOptionalParameter = false;
var parameterCount = parameters.length;
for (var i = 0; i < parameterCount; i++) {
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarParameterList | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarFunctionLikeDeclaration(node) {
// Prevent cascading error by short-circuit
var file = ts.getSourceFileOfNode(node);
return checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarTypeParameterList(node, node.typeParameters, file) ||
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarFunctionLikeDeclaration | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarArrowFunction(node, file) {
if (node.kind === 174 /* ArrowFunction */) {
var arrowFunction = node;
var startLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.pos).line;
var endLine = ts.getLineAndCharacterO... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarArrowFunction | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarIndexSignatureParameters(node) {
var parameter = node.parameters[0];
if (node.parameters.length !== 1) {
if (parameter) {
return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_must_have_exactly_one_parameter);
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarIndexSignatureParameters | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarForIndexSignatureModifier(node) {
if (node.flags & 1022 /* Modifier */) {
grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_not_permitted_on_index_signature_members);
}
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarForIndexSignatureModifier | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarIndexSignature(node) {
// Prevent cascading error by short-circuit
return checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarIndexSignatureParameters(node) || checkGrammarForIndexSignatureModifier(node);
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarIndexSignature | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarForAtLeastOneTypeArgument(node, typeArguments) {
if (typeArguments && typeArguments.length === 0) {
var sourceFile = ts.getSourceFileOfNode(node);
var start = typeArguments.pos - "<".length;
var end = ts.skipTrivia(sourceFile.text, typeArg... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarForAtLeastOneTypeArgument | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarTypeArguments(node, typeArguments) {
return checkGrammarForDisallowedTrailingComma(typeArguments) ||
checkGrammarForAtLeastOneTypeArgument(node, typeArguments);
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarTypeArguments | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarForOmittedArgument(node, args) {
if (args) {
var sourceFile = ts.getSourceFileOfNode(node);
for (var _i = 0, args_1 = args; _i < args_1.length; _i++) {
var arg = args_1[_i];
if (arg.kind === 187 /* OmittedExpression... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarForOmittedArgument | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarArguments(node, args) {
return checkGrammarForDisallowedTrailingComma(args) ||
checkGrammarForOmittedArgument(node, args);
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarArguments | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarHeritageClause(node) {
var types = node.types;
if (checkGrammarForDisallowedTrailingComma(types)) {
return true;
}
if (types && types.length === 0) {
var listType = ts.tokenToString(node.token);
var sour... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarHeritageClause | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarClassDeclarationHeritageClauses(node) {
var seenExtendsClause = false;
var seenImplementsClause = false;
if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && node.heritageClauses) {
for (var _i = 0, _a = node.heritageClauses; _i < ... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarClassDeclarationHeritageClauses | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarInterfaceDeclaration(node) {
var seenExtendsClause = false;
if (node.heritageClauses) {
for (var _i = 0, _a = node.heritageClauses; _i < _a.length; _i++) {
var heritageClause = _a[_i];
if (heritageClause.token === 83 /*... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarInterfaceDeclaration | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarComputedPropertyName(node) {
// If node is not a computedPropertyName, just skip the grammar checking
if (node.kind !== 136 /* ComputedPropertyName */) {
return false;
}
var computedPropertyName = node;
if (computedProperty... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarComputedPropertyName | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarForGenerator(node) {
if (node.asteriskToken) {
ts.Debug.assert(node.kind === 213 /* FunctionDeclaration */ ||
node.kind === 173 /* FunctionExpression */ ||
node.kind === 143 /* MethodDeclaration */);
if (ts.isInAmbi... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarForGenerator | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarForInvalidQuestionMark(node, questionToken, message) {
if (questionToken) {
return grammarErrorOnNode(questionToken, message);
}
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarForInvalidQuestionMark | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarObjectLiteralExpression(node, inDestructuring) {
var seen = {};
var Property = 1;
var GetAccessor = 2;
var SetAccesor = 4;
var GetOrSetAccessor = GetAccessor | SetAccesor;
for (var _i = 0, _a = node.properties; _i < _a.length; ... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarObjectLiteralExpression | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarJsxElement(node) {
var seen = {};
for (var _i = 0, _a = node.attributes; _i < _a.length; _i++) {
var attr = _a[_i];
if (attr.kind === 239 /* JsxSpreadAttribute */) {
continue;
}
var jsxAttr =... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarJsxElement | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarForInOrForOfStatement(forInOrOfStatement) {
if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) {
return true;
}
if (forInOrOfStatement.initializer.kind === 212 /* VariableDeclarationList */) {
var variableList = forInOr... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarForInOrForOfStatement | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarAccessor(accessor) {
var kind = accessor.kind;
if (languageVersion < 1 /* ES5 */) {
return grammarErrorOnNode(accessor.name, ts.Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher);
}
else if (ts.isInAmbient... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarAccessor | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarForNonSymbolComputedProperty(node, message) {
if (ts.isDynamicName(node)) {
return grammarErrorOnNode(node, message);
}
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarForNonSymbolComputedProperty | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarMethod(node) {
if (checkGrammarDisallowedModifiersOnObjectLiteralExpressionMethod(node) ||
checkGrammarFunctionLikeDeclaration(node) ||
checkGrammarForGenerator(node)) {
return true;
}
if (node.parent.kind === 165 /... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarMethod | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarBreakOrContinueStatement(node) {
var current = node;
while (current) {
if (ts.isFunctionLike(current)) {
return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary);
}
switch (... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarBreakOrContinueStatement | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarBindingElement(node) {
if (node.dotDotDotToken) {
var elements = node.parent.elements;
if (node !== ts.lastOrUndefined(elements)) {
return grammarErrorOnNode(node, ts.Diagnostics.A_rest_element_must_be_last_in_an_array_destructuring_pa... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarBindingElement | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarVariableDeclaration(node) {
if (node.parent.parent.kind !== 200 /* ForInStatement */ && node.parent.parent.kind !== 201 /* ForOfStatement */) {
if (ts.isInAmbientContext(node)) {
if (node.initializer) {
// Error on equals token... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarVariableDeclaration | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarNameInLetOrConstDeclarations(name) {
if (name.kind === 69 /* Identifier */) {
if (name.text === "let") {
return grammarErrorOnNode(name, ts.Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations);
}
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarNameInLetOrConstDeclarations | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarVariableDeclarationList(declarationList) {
var declarations = declarationList.declarations;
if (checkGrammarForDisallowedTrailingComma(declarationList.declarations)) {
return true;
}
if (!declarationList.declarations.length) {
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarVariableDeclarationList | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function allowLetAndConstDeclarations(parent) {
switch (parent.kind) {
case 196 /* IfStatement */:
case 197 /* DoStatement */:
case 198 /* WhileStatement */:
case 205 /* WithStatement */:
case 199 /* ForStatement */:
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | allowLetAndConstDeclarations | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarForDisallowedLetOrConstStatement(node) {
if (!allowLetAndConstDeclarations(node.parent)) {
if (ts.isLet(node.declarationList)) {
return grammarErrorOnNode(node, ts.Diagnostics.let_declarations_can_only_be_declared_inside_a_block);
}
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarForDisallowedLetOrConstStatement | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isIntegerLiteral(expression) {
if (expression.kind === 179 /* PrefixUnaryExpression */) {
var unaryExpression = expression;
if (unaryExpression.operator === 35 /* PlusToken */ || unaryExpression.operator === 36 /* MinusToken */) {
expression = una... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | isIntegerLiteral | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function hasParseDiagnostics(sourceFile) {
return sourceFile.parseDiagnostics.length > 0;
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | hasParseDiagnostics | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function grammarErrorOnFirstToken(node, message, arg0, arg1, arg2) {
var sourceFile = ts.getSourceFileOfNode(node);
if (!hasParseDiagnostics(sourceFile)) {
var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos);
diagnostics.add(ts.createFileDiagnostic(source... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | grammarErrorOnFirstToken | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function grammarErrorAtPos(sourceFile, start, length, message, arg0, arg1, arg2) {
if (!hasParseDiagnostics(sourceFile)) {
diagnostics.add(ts.createFileDiagnostic(sourceFile, start, length, message, arg0, arg1, arg2));
return true;
}
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | grammarErrorAtPos | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function grammarErrorOnNode(node, message, arg0, arg1, arg2) {
var sourceFile = ts.getSourceFileOfNode(node);
if (!hasParseDiagnostics(sourceFile)) {
diagnostics.add(ts.createDiagnosticForNode(node, message, arg0, arg1, arg2));
return true;
}
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | grammarErrorOnNode | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isEvalOrArgumentsIdentifier(node) {
return node.kind === 69 /* Identifier */ &&
(node.text === "eval" || node.text === "arguments");
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | isEvalOrArgumentsIdentifier | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarConstructorTypeParameters(node) {
if (node.typeParameters) {
return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.typeParameters.pos, node.typeParameters.end - node.typeParameters.pos, ts.Diagnostics.Type_parameters_cannot_appear_on_a_constructor_declaration);
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarConstructorTypeParameters | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarConstructorTypeAnnotation(node) {
if (node.type) {
return grammarErrorOnNode(node.type, ts.Diagnostics.Type_annotation_cannot_appear_on_a_constructor_declaration);
}
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarConstructorTypeAnnotation | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarProperty(node) {
if (ts.isClassLike(node.parent)) {
if (checkGrammarForInvalidQuestionMark(node, node.questionToken, ts.Diagnostics.A_class_member_cannot_be_declared_optional) ||
checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_com... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarProperty | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarTopLevelElementForRequiredDeclareModifier(node) {
// A declare modifier is required for any top level .d.ts declaration except export=, export default,
// interfaces and imports categories:
//
// DeclarationElement:
// ExportAssignmen... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarTopLevelElementForRequiredDeclareModifier | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) {
for (var _i = 0, _a = file.statements; _i < _a.length; _i++) {
var decl = _a[_i];
if (ts.isDeclaration(decl) || decl.kind === 193 /* VariableStatement */) {
if (checkGrammarTopLevelEle... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarTopLevelElementsForRequiredDeclareModifier | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarSourceFile(node) {
return ts.isInAmbientContext(node) && checkGrammarTopLevelElementsForRequiredDeclareModifier(node);
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarSourceFile | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarStatementInAmbientContext(node) {
if (ts.isInAmbientContext(node)) {
// An accessors is already reported about the ambient context
if (isAccessor(node.parent.kind)) {
return getNodeLinks(node).hasReportedStatementInAmbientContext = tru... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarStatementInAmbientContext | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkGrammarNumericLiteral(node) {
// Grammar checking
if (node.flags & 32768 /* OctalLiteral */ && languageVersion >= 1 /* ES5 */) {
return grammarErrorOnNode(node, ts.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher);
}
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | checkGrammarNumericLiteral | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function grammarErrorAfterFirstToken(node, message, arg0, arg1, arg2) {
var sourceFile = ts.getSourceFileOfNode(node);
if (!hasParseDiagnostics(sourceFile)) {
var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos);
diagnostics.add(ts.createFileDiagnostic(sou... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | grammarErrorAfterFirstToken | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getDeclarationDiagnostics(host, resolver, targetSourceFile) {
var diagnostics = [];
var jsFilePath = ts.getOwnEmitOutputFilePath(targetSourceFile, host, ".js");
emitDeclarations(host, resolver, diagnostics, jsFilePath, targetSourceFile);
return diagnostics;
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | getDeclarationDiagnostics | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitDeclarations(host, resolver, diagnostics, jsFilePath, root) {
var newLine = host.getNewLine();
var compilerOptions = host.getCompilerOptions();
var write;
var writeLine;
var increaseIndent;
var decreaseIndent;
var writeTextOfNode;
var writer =... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitDeclarations | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function hasInternalAnnotation(range) {
var comment = currentText.substring(range.pos, range.end);
return comment.indexOf("@internal") >= 0;
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | hasInternalAnnotation | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function stripInternal(node) {
if (node) {
var leadingCommentRanges = ts.getLeadingCommentRanges(currentText, node.pos);
if (ts.forEach(leadingCommentRanges, hasInternalAnnotation)) {
return;
}
emitNode(node);
}
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | stripInternal | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function createAndSetNewTextWriterWithSymbolWriter() {
var writer = ts.createTextWriter(newLine);
writer.trackSymbol = trackSymbol;
writer.reportInaccessibleThisError = reportInaccessibleThisError;
writer.writeKeyword = writer.write;
writer.writeOperator = wri... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | createAndSetNewTextWriterWithSymbolWriter | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function setWriter(newWriter) {
writer = newWriter;
write = newWriter.write;
writeTextOfNode = newWriter.writeTextOfNode;
writeLine = newWriter.writeLine;
increaseIndent = newWriter.increaseIndent;
decreaseIndent = newWriter.decreaseIndent;
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | setWriter | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function writeAsynchronousModuleElements(nodes) {
var oldWriter = writer;
ts.forEach(nodes, function (declaration) {
var nodeToCheck;
if (declaration.kind === 211 /* VariableDeclaration */) {
nodeToCheck = declaration.parent.parent;
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | writeAsynchronousModuleElements | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function handleSymbolAccessibilityError(symbolAccesibilityResult) {
if (symbolAccesibilityResult.accessibility === 0 /* Accessible */) {
// write the aliases
if (symbolAccesibilityResult && symbolAccesibilityResult.aliasesToMakeVisible) {
writeAsynchronous... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | handleSymbolAccessibilityError | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function trackSymbol(symbol, enclosingDeclaration, meaning) {
handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning));
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | trackSymbol | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function reportInaccessibleThisError() {
if (errorNameNode) {
diagnostics.push(ts.createDiagnosticForNode(errorNameNode, ts.Diagnostics.The_inferred_type_of_0_references_an_inaccessible_this_type_A_type_annotation_is_necessary, ts.declarationNameToString(errorNameNode)));
}
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | reportInaccessibleThisError | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function writeTypeOfDeclaration(declaration, type, getSymbolAccessibilityDiagnostic) {
writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic;
write(": ");
if (type) {
// Write the type
emitType(type);
}
else... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | writeTypeOfDeclaration | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function writeReturnTypeAtSignature(signature, getSymbolAccessibilityDiagnostic) {
writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic;
write(": ");
if (signature.type) {
// Write the type
emitType(signature.type);
}
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | writeReturnTypeAtSignature | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitLines(nodes) {
for (var _i = 0, nodes_2 = nodes; _i < nodes_2.length; _i++) {
var node = nodes_2[_i];
emit(node);
}
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitLines | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitSeparatedList(nodes, separator, eachNodeEmitFn, canEmitFn) {
var currentWriterPos = writer.getTextPos();
for (var _i = 0, nodes_3 = nodes; _i < nodes_3.length; _i++) {
var node = nodes_3[_i];
if (!canEmitFn || canEmitFn(node)) {
if... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitSeparatedList | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitCommaList(nodes, eachNodeEmitFn, canEmitFn) {
emitSeparatedList(nodes, ", ", eachNodeEmitFn, canEmitFn);
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitCommaList | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function writeJsDocComments(declaration) {
if (declaration) {
var jsDocComments = ts.getJsDocCommentsFromText(declaration, currentText);
ts.emitNewLineBeforeLeadingComments(currentLineMap, writer, declaration, jsDocComments);
// jsDoc comments are emitted at /... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | writeJsDocComments | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitTypeWithNewGetSymbolAccessibilityDiagnostic(type, getSymbolAccessibilityDiagnostic) {
writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic;
emitType(type);
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitTypeWithNewGetSymbolAccessibilityDiagnostic | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitType(type) {
switch (type.kind) {
case 117 /* AnyKeyword */:
case 130 /* StringKeyword */:
case 128 /* NumberKeyword */:
case 120 /* BooleanKeyword */:
case 131 /* SymbolKeyword */:
case 103 /* VoidK... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function writeEntityName(entityName) {
if (entityName.kind === 69 /* Identifier */) {
writeTextOfNode(currentText, entityName);
}
else {
var left = entityName.kind === 135 /* QualifiedName */ ? entityName.left : entityName.expressio... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | writeEntityName | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitEntityName(entityName) {
var visibilityResult = resolver.isEntityNameVisible(entityName,
// Aliases can be written asynchronously so use correct enclosing declaration
entityName.parent.kind === 221 /* ImportEqualsDeclaration */ ? entityName.parent : enclosin... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitEntityName | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitExpressionWithTypeArguments(node) {
if (ts.isSupportedExpressionWithTypeArguments(node)) {
ts.Debug.assert(node.expression.kind === 69 /* Identifier */ || node.expression.kind === 166 /* PropertyAccessExpression */);
emitEntityName(node.expression);
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitExpressionWithTypeArguments | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitTypeReference(type) {
emitEntityName(type.typeName);
if (type.typeArguments) {
write("<");
emitCommaList(type.typeArguments, emitType);
write(">");
}
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitTypeReference | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitTypePredicate(type) {
writeTextOfNode(currentText, type.parameterName);
write(" is ");
emitType(type.type);
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitTypePredicate | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitTypeQuery(type) {
write("typeof ");
emitEntityName(type.exprName);
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitTypeQuery | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitArrayType(type) {
emitType(type.elementType);
write("[]");
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitArrayType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitTupleType(type) {
write("[");
emitCommaList(type.elementTypes, emitType);
write("]");
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitTupleType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitUnionType(type) {
emitSeparatedList(type.types, " | ", emitType);
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitUnionType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitIntersectionType(type) {
emitSeparatedList(type.types, " & ", emitType);
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitIntersectionType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitParenType(type) {
write("(");
emitType(type.type);
write(")");
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitParenType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitTypeLiteral(type) {
write("{");
if (type.members.length) {
writeLine();
increaseIndent();
// write members
emitLines(type.members);
decreaseIndent();
}
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitTypeLiteral | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitSourceFile(node) {
currentText = node.text;
currentLineMap = ts.getLineStarts(node);
currentIdentifiers = node.identifiers;
isCurrentFileExternalModule = ts.isExternalModule(node);
enclosingDeclaration = node;
ts.emitDetachedComments(c... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitSourceFile | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getExportDefaultTempVariableName() {
var baseName = "_default";
if (!ts.hasProperty(currentIdentifiers, baseName)) {
return baseName;
}
var count = 0;
while (true) {
var name_18 = baseName + "_" + (++count);
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | getExportDefaultTempVariableName | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitExportAssignment(node) {
if (node.expression.kind === 69 /* Identifier */) {
write(node.isExportEquals ? "export = " : "export default ");
writeTextOfNode(currentText, node.expression);
}
else {
// Expression
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitExportAssignment | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getDefaultExportAccessibilityDiagnostic(diagnostic) {
return {
diagnosticMessage: ts.Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0,
errorNode: node
};
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | getDefaultExportAccessibilityDiagnostic | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isModuleElementVisible(node) {
return resolver.isDeclarationVisible(node);
} | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | isModuleElementVisible | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitModuleElement(node, isModuleElementVisible) {
if (isModuleElementVisible) {
writeModuleElement(node);
}
else if (node.kind === 221 /* ImportEqualsDeclaration */ ||
(node.parent.kind === 248 /* SourceFile */ && isCurrentFileExternalModule))... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitModuleElement | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function writeModuleElement(node) {
switch (node.kind) {
case 213 /* FunctionDeclaration */:
return writeFunctionDeclaration(node);
case 193 /* VariableStatement */:
return writeVariableStatement(node);
case 215 /* Inter... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | writeModuleElement | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitModuleElementDeclarationFlags(node) {
// If the node is parented in the current source file we need to emit export declare or just export
if (node.parent.kind === 248 /* SourceFile */) {
// If the node is exported
if (node.flags & 2 /* Export */) {
... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitModuleElementDeclarationFlags | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function emitClassMemberDeclarationFlags(node) {
if (node.flags & 16 /* Private */) {
write("private ");
}
else if (node.flags & 32 /* Protected */) {
write("protected ");
}
if (node.flags & 64 /* Static */) {
wr... | Gets either the static or instance type of a class element, based on
whether the element is declared as "static". | emitClassMemberDeclarationFlags | 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.