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 getBaseTypeNodeOfClass(type) {
return ts.getClassExtendsHeritageClauseElement(type.symbol.valueDeclaration);
} | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | getBaseTypeNodeOfClass | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getConstructorsForTypeArguments(type, typeArgumentNodes) {
var typeArgCount = typeArgumentNodes ? typeArgumentNodes.length : 0;
return ts.filter(getSignaturesOfType(type, 1 /* Construct */), function (sig) { return (sig.typeParameters ? sig.typeParameters.length : 0) === typeArgCount; }... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | getConstructorsForTypeArguments | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getInstantiatedConstructorsForTypeArguments(type, typeArgumentNodes) {
var signatures = getConstructorsForTypeArguments(type, typeArgumentNodes);
if (typeArgumentNodes) {
var typeArguments = ts.map(typeArgumentNodes, getTypeFromTypeNode);
signatures = ts.... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | getInstantiatedConstructorsForTypeArguments | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function hasClassBaseType(type) {
return !!ts.forEach(getBaseTypes(type), function (t) { return !!(t.symbol.flags & 32 /* Class */); });
} | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | hasClassBaseType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getBaseTypes(type) {
var isClass = type.symbol.flags & 32 /* Class */;
var isInterface = type.symbol.flags & 64 /* Interface */;
if (!type.resolvedBaseTypes) {
if (!isClass && !isInterface) {
ts.Debug.fail("type must be class or interface"... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | getBaseTypes | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function resolveBaseTypesOfClass(type) {
type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray;
var baseConstructorType = getBaseConstructorTypeOfClass(type);
if (!(baseConstructorType.flags & 80896 /* ObjectType */)) {
return;
}
var ba... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | resolveBaseTypesOfClass | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function areAllOuterTypeParametersApplied(type) {
// An unapplied type parameter has its symbol still the same as the matching argument symbol.
// Since parameters are applied outer-to-inner, only the last outer parameter needs to be checked.
var outerTypeParameters = type.outerTypeP... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | areAllOuterTypeParametersApplied | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function resolveBaseTypesOfInterface(type) {
type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray;
for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
if (declaration.kind === 215 /* InterfaceDeclaration */ &&... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | resolveBaseTypesOfInterface | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isIndependentInterface(symbol) {
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
if (declaration.kind === 215 /* InterfaceDeclaration */) {
if (declaration.flags & 262144 /* ContainsThis */) {
... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | isIndependentInterface | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getDeclaredTypeOfClassOrInterface(symbol) {
var links = getSymbolLinks(symbol);
if (!links.declaredType) {
var kind = symbol.flags & 32 /* Class */ ? 1024 /* Class */ : 2048 /* Interface */;
var type = links.declaredType = createObjectType(kind, symbol);
... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | getDeclaredTypeOfClassOrInterface | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getDeclaredTypeOfTypeAlias(symbol) {
var links = getSymbolLinks(symbol);
if (!links.declaredType) {
// Note that we use the links object as the target here because the symbol object is used as the unique
// identity for resolution of the 'type' property i... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | getDeclaredTypeOfTypeAlias | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getDeclaredTypeOfEnum(symbol) {
var links = getSymbolLinks(symbol);
if (!links.declaredType) {
var type = createType(128 /* Enum */);
type.symbol = symbol;
links.declaredType = type;
}
return links.declaredType;
... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | getDeclaredTypeOfEnum | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getDeclaredTypeOfTypeParameter(symbol) {
var links = getSymbolLinks(symbol);
if (!links.declaredType) {
var type = createType(512 /* TypeParameter */);
type.symbol = symbol;
if (!ts.getDeclarationOfKind(symbol, 137 /* TypeParameter */).con... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | getDeclaredTypeOfTypeParameter | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getDeclaredTypeOfAlias(symbol) {
var links = getSymbolLinks(symbol);
if (!links.declaredType) {
links.declaredType = getDeclaredTypeOfSymbol(resolveAlias(symbol));
}
return links.declaredType;
} | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | getDeclaredTypeOfAlias | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getDeclaredTypeOfSymbol(symbol) {
ts.Debug.assert((symbol.flags & 16777216 /* Instantiated */) === 0);
if (symbol.flags & (32 /* Class */ | 64 /* Interface */)) {
return getDeclaredTypeOfClassOrInterface(symbol);
}
if (symbol.flags & 524288 /* Typ... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | getDeclaredTypeOfSymbol | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isIndependentType(node) {
switch (node.kind) {
case 117 /* AnyKeyword */:
case 130 /* StringKeyword */:
case 128 /* NumberKeyword */:
case 120 /* BooleanKeyword */:
case 131 /* SymbolKeyword */:
case 103... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | isIndependentType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isIndependentMember(symbol) {
if (symbol.declarations && symbol.declarations.length === 1) {
var declaration = symbol.declarations[0];
if (declaration) {
switch (declaration.kind) {
case 141 /* PropertyDeclaration */:
... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | isIndependentMember | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function createSymbolTable(symbols) {
var result = {};
for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) {
var symbol = symbols_1[_i];
result[symbol.name] = symbol;
}
return result;
} | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | createSymbolTable | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function createInstantiatedSymbolTable(symbols, mapper, mappingThisOnly) {
var result = {};
for (var _i = 0, symbols_2 = symbols; _i < symbols_2.length; _i++) {
var symbol = symbols_2[_i];
result[symbol.name] = mappingThisOnly && isIndependentMember(symbol) ? symb... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | createInstantiatedSymbolTable | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function addInheritedMembers(symbols, baseSymbols) {
for (var _i = 0, baseSymbols_1 = baseSymbols; _i < baseSymbols_1.length; _i++) {
var s = baseSymbols_1[_i];
if (!ts.hasProperty(symbols, s.name)) {
symbols[s.name] = s;
}
}
... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | addInheritedMembers | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function addInheritedSignatures(signatures, baseSignatures) {
if (baseSignatures) {
for (var _i = 0, baseSignatures_1 = baseSignatures; _i < baseSignatures_1.length; _i++) {
var signature = baseSignatures_1[_i];
signatures.push(signature);
... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | addInheritedSignatures | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function resolveDeclaredMembers(type) {
if (!type.declaredProperties) {
var symbol = type.symbol;
type.declaredProperties = getNamedMembers(symbol.members);
type.declaredCallSignatures = getSignaturesOfSymbol(symbol.members["__call"]);
type.dec... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | resolveDeclaredMembers | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getTypeWithThisArgument(type, thisArgument) {
if (type.flags & 4096 /* Reference */) {
return createTypeReference(type.target, ts.concatenate(type.typeArguments, [thisArgument || type.target.thisType]));
}
return type;
} | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | getTypeWithThisArgument | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function resolveObjectTypeMembers(type, source, typeParameters, typeArguments) {
var mapper = identityMapper;
var members = source.symbol.members;
var callSignatures = source.declaredCallSignatures;
var constructSignatures = source.declaredConstructSignatures;
... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | resolveObjectTypeMembers | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function resolveClassOrInterfaceMembers(type) {
resolveObjectTypeMembers(type, resolveDeclaredMembers(type), emptyArray, emptyArray);
} | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | resolveClassOrInterfaceMembers | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function resolveTypeReferenceMembers(type) {
var source = resolveDeclaredMembers(type.target);
var typeParameters = ts.concatenate(source.typeParameters, [source.thisType]);
var typeArguments = type.typeArguments && type.typeArguments.length === typeParameters.length ?
... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | resolveTypeReferenceMembers | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function createSignature(declaration, typeParameters, parameters, resolvedReturnType, typePredicate, minArgumentCount, hasRestParameter, hasStringLiterals) {
var sig = new Signature(checker);
sig.declaration = declaration;
sig.typeParameters = typeParameters;
sig.paramete... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | createSignature | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function cloneSignature(sig) {
return createSignature(sig.declaration, sig.typeParameters, sig.parameters, sig.resolvedReturnType, sig.typePredicate, sig.minArgumentCount, sig.hasRestParameter, sig.hasStringLiterals);
} | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | cloneSignature | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getDefaultConstructSignatures(classType) {
if (!hasClassBaseType(classType)) {
return [createSignature(undefined, classType.localTypeParameters, emptyArray, classType, undefined, 0, false, false)];
}
var baseConstructorType = getBaseConstructorTypeOfClass(cla... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | getDefaultConstructSignatures | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function createTupleTypeMemberSymbols(memberTypes) {
var members = {};
for (var i = 0; i < memberTypes.length; i++) {
var symbol = createSymbol(4 /* Property */ | 67108864 /* Transient */, "" + i);
symbol.type = memberTypes[i];
members[i] = symbol;... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | createTupleTypeMemberSymbols | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function resolveTupleTypeMembers(type) {
var arrayElementType = getUnionType(type.elementTypes, /*noSubtypeReduction*/ true);
// Make the tuple type itself the 'this' type by including an extra type argument
var arrayType = resolveStructuredTypeMembers(createTypeFromGenericGlobalType... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | resolveTupleTypeMembers | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function findMatchingSignature(signatureList, signature, partialMatch, ignoreReturnTypes) {
for (var _i = 0, signatureList_1 = signatureList; _i < signatureList_1.length; _i++) {
var s = signatureList_1[_i];
if (compareSignatures(s, signature, partialMatch, ignoreReturnTypes,... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | findMatchingSignature | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function findMatchingSignatures(signatureLists, signature, listIndex) {
if (signature.typeParameters) {
// We require an exact match for generic signatures, so we only return signatures from the first
// signature list and only if they have exact matches in the other signatur... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | findMatchingSignatures | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getUnionIndexType(types, kind) {
var indexTypes = [];
for (var _i = 0, types_1 = types; _i < types_1.length; _i++) {
var type = types_1[_i];
var indexType = getIndexTypeOfType(type, kind);
if (!indexType) {
return undef... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | getUnionIndexType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function resolveUnionTypeMembers(type) {
// The members and properties collections are empty for union types. To get all properties of a union
// type use getPropertiesOfType (only the language service uses this).
var callSignatures = getUnionSignatures(type.types, 0 /* Call */);
... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | resolveUnionTypeMembers | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function intersectTypes(type1, type2) {
return !type1 ? type2 : !type2 ? type1 : getIntersectionType([type1, type2]);
} | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | intersectTypes | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function resolveIntersectionTypeMembers(type) {
// The members and properties collections are empty for intersection types. To get all properties of an
// intersection type use getPropertiesOfType (only the language service uses this).
var callSignatures = emptyArray;
var... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | resolveIntersectionTypeMembers | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function resolveAnonymousTypeMembers(type) {
var symbol = type.symbol;
var members;
var callSignatures;
var constructSignatures;
var stringIndexType;
var numberIndexType;
if (type.target) {
members = createInstantiatedSy... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | resolveAnonymousTypeMembers | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function resolveStructuredTypeMembers(type) {
if (!type.members) {
if (type.flags & 4096 /* Reference */) {
resolveTypeReferenceMembers(type);
}
else if (type.flags & (1024 /* Class */ | 2048 /* Interface */)) {
resolveC... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | resolveStructuredTypeMembers | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getPropertiesOfObjectType(type) {
if (type.flags & 80896 /* ObjectType */) {
return resolveStructuredTypeMembers(type).properties;
}
return emptyArray;
} | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | getPropertiesOfObjectType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getPropertiesOfUnionOrIntersectionType(type) {
for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
var current = _a[_i];
for (var _b = 0, _c = getPropertiesOfType(current); _b < _c.length; _b++) {
var prop = _c[_b];
getPr... | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | getPropertiesOfUnionOrIntersectionType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getPropertiesOfType(type) {
type = getApparentType(type);
return type.flags & 49152 /* UnionOrIntersection */ ? getPropertiesOfUnionOrIntersectionType(type) : getPropertiesOfObjectType(type);
} | Push an entry on the type resolution stack. If an entry with the given target and the given property name
is already on the stack, and no entries in between already have a type, then a circularity has occurred.
In this case, the result values of the existing entry and all entries pushed after it are changed to false,
a... | getPropertiesOfType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getApparentTypeOfTypeParameter(type) {
if (!type.resolvedApparentType) {
var constraintType = getConstraintOfTypeParameter(type);
while (constraintType && constraintType.flags & 512 /* TypeParameter */) {
constraintType = getConstraintOfTypeParame... | The apparent type of a type parameter is the base constraint instantiated with the type parameter
as the type argument for the 'this' type. | getApparentTypeOfTypeParameter | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getGlobalESSymbolConstructorSymbol() {
return globalESSymbolConstructorSymbol || (globalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol"));
} | Returns a type that is inside a namespace at the global scope, e.g.
getExportedTypeFromNamespace('JSX', 'Element') returns the JSX.Element type | getGlobalESSymbolConstructorSymbol | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function createTypeFromGenericGlobalType(genericGlobalType, typeArguments) {
return genericGlobalType !== emptyGenericType ? createTypeReference(genericGlobalType, typeArguments) : emptyObjectType;
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | createTypeFromGenericGlobalType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function createIterableType(elementType) {
return createTypeFromGenericGlobalType(globalIterableType, [elementType]);
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | createIterableType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function createIterableIteratorType(elementType) {
return createTypeFromGenericGlobalType(globalIterableIteratorType, [elementType]);
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | createIterableIteratorType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function createArrayType(elementType) {
return createTypeFromGenericGlobalType(globalArrayType, [elementType]);
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | createArrayType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getTypeFromArrayTypeNode(node) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
links.resolvedType = createArrayType(getTypeFromTypeNode(node.elementType));
}
return links.resolvedType;
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | getTypeFromArrayTypeNode | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function createTupleType(elementTypes) {
var id = getTypeListId(elementTypes);
return tupleTypes[id] || (tupleTypes[id] = createNewTupleType(elementTypes));
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | createTupleType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function createNewTupleType(elementTypes) {
var type = createObjectType(8192 /* Tuple */ | getPropagatingFlagsOfTypes(elementTypes));
type.elementTypes = elementTypes;
return type;
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | createNewTupleType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getTypeFromTupleTypeNode(node) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
links.resolvedType = createTupleType(ts.map(node.elementTypes, getTypeFromTypeNode));
}
return links.resolvedType;
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | getTypeFromTupleTypeNode | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function addTypeToSet(typeSet, type, typeSetKind) {
if (type.flags & typeSetKind) {
addTypesToSet(typeSet, type.types, typeSetKind);
}
else if (!ts.contains(typeSet, type)) {
typeSet.push(type);
}
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | addTypeToSet | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function addTypesToSet(typeSet, types, typeSetKind) {
for (var _i = 0, types_4 = types; _i < types_4.length; _i++) {
var type = types_4[_i];
addTypeToSet(typeSet, type, typeSetKind);
}
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | addTypesToSet | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isSubtypeOfAny(candidate, types) {
for (var i = 0, len = types.length; i < len; i++) {
if (candidate !== types[i] && isTypeSubtypeOf(candidate, types[i])) {
return true;
}
}
return false;
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | isSubtypeOfAny | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function removeSubtypes(types) {
var i = types.length;
while (i > 0) {
i--;
if (isSubtypeOfAny(types[i], types)) {
types.splice(i, 1);
}
}
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | removeSubtypes | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function containsTypeAny(types) {
for (var _i = 0, types_5 = types; _i < types_5.length; _i++) {
var type = types_5[_i];
if (isTypeAny(type)) {
return true;
}
}
return false;
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | containsTypeAny | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function removeAllButLast(types, typeToRemove) {
var i = types.length;
while (i > 0 && types.length > 1) {
i--;
if (types[i] === typeToRemove) {
types.splice(i, 1);
}
}
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | removeAllButLast | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getTypeFromUnionTypeNode(node) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
links.resolvedType = getUnionType(ts.map(node.types, getTypeFromTypeNode), /*noSubtypeReduction*/ true);
}
return links.resolvedType;
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | getTypeFromUnionTypeNode | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getTypeFromIntersectionTypeNode(node) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
links.resolvedType = getIntersectionType(ts.map(node.types, getTypeFromTypeNode));
}
return links.resolvedType;
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | getTypeFromIntersectionTypeNode | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
// Deferred resolution of members is handled by resolveObjectTypeMembers
links.resolvedType = createObjectType(65536 /* Anonymous */, ... | Instantiates a global type that is generic with some element type, and returns that instantiation. | getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getStringLiteralType(node) {
var text = node.text;
if (ts.hasProperty(stringLiteralTypes, text)) {
return stringLiteralTypes[text];
}
var type = stringLiteralTypes[text] = createType(256 /* StringLiteral */);
type.text = text;
... | Instantiates a global type that is generic with some element type, and returns that instantiation. | getStringLiteralType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getTypeFromStringLiteral(node) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
links.resolvedType = getStringLiteralType(node);
}
return links.resolvedType;
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | getTypeFromStringLiteral | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getThisType(node) {
var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false);
var parent = container && container.parent;
if (parent && (ts.isClassLike(parent) || parent.kind === 215 /* InterfaceDeclaration */)) {
if (!(container.flags & 64 ... | Instantiates a global type that is generic with some element type, and returns that instantiation. | getThisType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getTypeFromThisTypeNode(node) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
links.resolvedType = getThisType(node);
}
return links.resolvedType;
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | getTypeFromThisTypeNode | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getTypeFromTypeNode(node) {
switch (node.kind) {
case 117 /* AnyKeyword */:
return anyType;
case 130 /* StringKeyword */:
return stringType;
case 128 /* NumberKeyword */:
return numberType;
... | Instantiates a global type that is generic with some element type, and returns that instantiation. | getTypeFromTypeNode | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function instantiateList(items, mapper, instantiator) {
if (items && items.length) {
var result = [];
for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {
var v = items_1[_i];
result.push(instantiator(v, mapper));
... | Instantiates a global type that is generic with some element type, and returns that instantiation. | instantiateList | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function createUnaryTypeMapper(source, target) {
return function (t) { return t === source ? target : t; };
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | createUnaryTypeMapper | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function createBinaryTypeMapper(source1, target1, source2, target2) {
return function (t) { return t === source1 ? target1 : t === source2 ? target2 : t; };
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | createBinaryTypeMapper | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function createTypeMapper(sources, targets) {
switch (sources.length) {
case 1: return createUnaryTypeMapper(sources[0], targets[0]);
case 2: return createBinaryTypeMapper(sources[0], targets[0], sources[1], targets[1]);
}
return function (t) {
... | Instantiates a global type that is generic with some element type, and returns that instantiation. | createTypeMapper | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function createUnaryTypeEraser(source) {
return function (t) { return t === source ? anyType : t; };
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | createUnaryTypeEraser | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function createBinaryTypeEraser(source1, source2) {
return function (t) { return t === source1 || t === source2 ? anyType : t; };
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | createBinaryTypeEraser | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function createTypeEraser(sources) {
switch (sources.length) {
case 1: return createUnaryTypeEraser(sources[0]);
case 2: return createBinaryTypeEraser(sources[0], sources[1]);
}
return function (t) {
for (var _i = 0, sources_1 = sources... | Instantiates a global type that is generic with some element type, and returns that instantiation. | createTypeEraser | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function createInferenceMapper(context) {
var mapper = function (t) {
for (var i = 0; i < context.typeParameters.length; i++) {
if (t === context.typeParameters[i]) {
context.inferences[i].isFixed = true;
return getInferredT... | Instantiates a global type that is generic with some element type, and returns that instantiation. | createInferenceMapper | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
mapper = function (t) {
for (var i = 0; i < context.typeParameters.length; i++) {
if (t === context.typeParameters[i]) {
context.inferences[i].isFixed = true;
return getInferredType(context, i);
}
}
... | Instantiates a global type that is generic with some element type, and returns that instantiation. | mapper | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function identityMapper(type) {
return type;
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | identityMapper | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function combineTypeMappers(mapper1, mapper2) {
return function (t) { return instantiateType(mapper1(t), mapper2); };
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | combineTypeMappers | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function instantiateTypeParameter(typeParameter, mapper) {
var result = createType(512 /* TypeParameter */);
result.symbol = typeParameter.symbol;
if (typeParameter.constraint) {
result.constraint = instantiateType(typeParameter.constraint, mapper);
}
... | Instantiates a global type that is generic with some element type, and returns that instantiation. | instantiateTypeParameter | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function instantiateSignature(signature, mapper, eraseTypeParameters) {
var freshTypeParameters;
var freshTypePredicate;
if (signature.typeParameters && !eraseTypeParameters) {
freshTypeParameters = instantiateList(signature.typeParameters, mapper, instantiateTypePara... | Instantiates a global type that is generic with some element type, and returns that instantiation. | instantiateSignature | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function instantiateSymbol(symbol, mapper) {
if (symbol.flags & 16777216 /* Instantiated */) {
var links = getSymbolLinks(symbol);
// If symbol being instantiated is itself a instantiation, fetch the original target and combine the
// type mappers. This ensure... | Instantiates a global type that is generic with some element type, and returns that instantiation. | instantiateSymbol | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function instantiateAnonymousType(type, mapper) {
if (mapper.instantiations) {
var cachedType = mapper.instantiations[type.id];
if (cachedType) {
return cachedType;
}
}
else {
mapper.instantiations = ... | Instantiates a global type that is generic with some element type, and returns that instantiation. | instantiateAnonymousType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function instantiateType(type, mapper) {
if (type && mapper !== identityMapper) {
if (type.flags & 512 /* TypeParameter */) {
return mapper(type);
}
if (type.flags & 65536 /* Anonymous */) {
return type.symbol && type.sy... | Instantiates a global type that is generic with some element type, and returns that instantiation. | instantiateType | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isContextSensitive(node) {
ts.Debug.assert(node.kind !== 143 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node));
switch (node.kind) {
case 173 /* FunctionExpression */:
case 174 /* ArrowFunction */:
return isContextSensitiveFun... | Instantiates a global type that is generic with some element type, and returns that instantiation. | isContextSensitive | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isContextSensitiveFunctionLikeDeclaration(node) {
return !node.typeParameters && node.parameters.length && !ts.forEach(node.parameters, function (p) { return p.type; });
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | isContextSensitiveFunctionLikeDeclaration | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function getTypeWithoutSignatures(type) {
if (type.flags & 80896 /* ObjectType */) {
var resolved = resolveStructuredTypeMembers(type);
if (resolved.constructSignatures.length) {
var result = createObjectType(65536 /* Anonymous */, type.symbol);
... | Instantiates a global type that is generic with some element type, and returns that instantiation. | getTypeWithoutSignatures | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isTypeIdenticalTo(source, target) {
return checkTypeRelatedTo(source, target, identityRelation, /*errorNode*/ undefined);
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | isTypeIdenticalTo | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function compareTypes(source, target) {
return checkTypeRelatedTo(source, target, identityRelation, /*errorNode*/ undefined) ? -1 /* True */ : 0 /* False */;
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | compareTypes | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isTypeSubtypeOf(source, target) {
return checkTypeSubtypeOf(source, target, /*errorNode*/ undefined);
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | isTypeSubtypeOf | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isTypeAssignableTo(source, target) {
return checkTypeAssignableTo(source, target, /*errorNode*/ undefined);
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | isTypeAssignableTo | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkTypeSubtypeOf(source, target, errorNode, headMessage, containingMessageChain) {
return checkTypeRelatedTo(source, target, subtypeRelation, errorNode, headMessage, containingMessageChain);
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | checkTypeSubtypeOf | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkTypeAssignableTo(source, target, errorNode, headMessage, containingMessageChain) {
return checkTypeRelatedTo(source, target, assignableRelation, errorNode, headMessage, containingMessageChain);
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | checkTypeAssignableTo | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isSignatureAssignableTo(source, target) {
var sourceType = getOrCreateTypeFromSignature(source);
var targetType = getOrCreateTypeFromSignature(target);
return checkTypeRelatedTo(sourceType, targetType, assignableRelation, /*errorNode*/ undefined);
} | Instantiates a global type that is generic with some element type, and returns that instantiation. | isSignatureAssignableTo | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function checkTypeRelatedTo(source, target, relation, errorNode, headMessage, containingMessageChain) {
var errorInfo;
var sourceStack;
var targetStack;
var maybeStack;
var expandingFlags;
var depth = 0;
var overflow = false;
... | Checks if 'source' is related to 'target' (e.g.: is a assignable to).
@param source The left-hand-side of the relation.
@param target The right-hand-side of the relation.
@param relation The relation considered. One of 'identityRelation', 'assignableRelation', or 'subTypeRelation'.
Used as both to determine which check... | checkTypeRelatedTo | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function reportError(message, arg0, arg1, arg2) {
errorInfo = ts.chainDiagnosticMessages(errorInfo, message, arg0, arg1, arg2);
} | Checks if 'source' is related to 'target' (e.g.: is a assignable to).
@param source The left-hand-side of the relation.
@param target The right-hand-side of the relation.
@param relation The relation considered. One of 'identityRelation', 'assignableRelation', or 'subTypeRelation'.
Used as both to determine which check... | reportError | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function reportRelationError(message, source, target) {
var sourceType = typeToString(source);
var targetType = typeToString(target);
if (sourceType === targetType) {
sourceType = typeToString(source, /*enclosingDeclaration*/ undefined, 128 /* UseFully... | Checks if 'source' is related to 'target' (e.g.: is a assignable to).
@param source The left-hand-side of the relation.
@param target The right-hand-side of the relation.
@param relation The relation considered. One of 'identityRelation', 'assignableRelation', or 'subTypeRelation'.
Used as both to determine which check... | reportRelationError | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isRelatedTo(source, target, reportErrors, headMessage) {
var result;
// both types are the same - covers 'they are the same primitive type or both are Any' or the same type parameter cases
if (source === target)
return -1 /* True */;
... | Checks if 'source' is related to 'target' (e.g.: is a assignable to).
@param source The left-hand-side of the relation.
@param target The right-hand-side of the relation.
@param relation The relation considered. One of 'identityRelation', 'assignableRelation', or 'subTypeRelation'.
Used as both to determine which check... | isRelatedTo | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isIdenticalTo(source, target) {
var result;
if (source.flags & 80896 /* ObjectType */ && target.flags & 80896 /* ObjectType */) {
if (source.flags & 4096 /* Reference */ && target.flags & 4096 /* Reference */ && source.target === target.target) {
... | Checks if 'source' is related to 'target' (e.g.: is a assignable to).
@param source The left-hand-side of the relation.
@param target The right-hand-side of the relation.
@param relation The relation considered. One of 'identityRelation', 'assignableRelation', or 'subTypeRelation'.
Used as both to determine which check... | isIdenticalTo | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function isKnownProperty(type, name) {
if (type.flags & 80896 /* ObjectType */) {
var resolved = resolveStructuredTypeMembers(type);
if (relation === assignableRelation && (type === globalObjectType || resolved.properties.length === 0) ||
r... | Checks if 'source' is related to 'target' (e.g.: is a assignable to).
@param source The left-hand-side of the relation.
@param target The right-hand-side of the relation.
@param relation The relation considered. One of 'identityRelation', 'assignableRelation', or 'subTypeRelation'.
Used as both to determine which check... | isKnownProperty | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function hasExcessProperties(source, target, reportErrors) {
if (!(target.flags & 67108864 /* ObjectLiteralPatternWithComputedProperties */) && someConstituentTypeHasKind(target, 80896 /* ObjectType */)) {
for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++)... | Checks if 'source' is related to 'target' (e.g.: is a assignable to).
@param source The left-hand-side of the relation.
@param target The right-hand-side of the relation.
@param relation The relation considered. One of 'identityRelation', 'assignableRelation', or 'subTypeRelation'.
Used as both to determine which check... | hasExcessProperties | javascript | amol-/dukpy | dukpy/jsmodules/typescriptServices.js | https://github.com/amol-/dukpy/blob/master/dukpy/jsmodules/typescriptServices.js | MIT |
function eachTypeRelatedToSomeType(source, target) {
var result = -1 /* True */;
var sourceTypes = source.types;
for (var _i = 0, sourceTypes_1 = sourceTypes; _i < sourceTypes_1.length; _i++) {
var sourceType = sourceTypes_1[_i];
va... | Checks if 'source' is related to 'target' (e.g.: is a assignable to).
@param source The left-hand-side of the relation.
@param target The right-hand-side of the relation.
@param relation The relation considered. One of 'identityRelation', 'assignableRelation', or 'subTypeRelation'.
Used as both to determine which check... | eachTypeRelatedToSomeType | 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.