mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge branch 'master' into tsconfigChangeDetection
This commit is contained in:
+45
-47
@@ -15,8 +15,8 @@ type Command = {
|
||||
description?: string;
|
||||
};
|
||||
|
||||
const mailMapPath = path.resolve("../.mailmap");
|
||||
const authorsPath = path.resolve("../AUTHORS.md");
|
||||
const mailMapPath = path.resolve(__dirname, "../.mailmap");
|
||||
const authorsPath = path.resolve(__dirname, "../AUTHORS.md");
|
||||
|
||||
function getKnownAuthors(): Author[] {
|
||||
const segmentRegExp = /\s?([^<]+)\s+<([^>]+)>/g;
|
||||
@@ -113,56 +113,54 @@ namespace Commands {
|
||||
const cmd = "git shortlog -se " + specs.join(" ");
|
||||
console.log(cmd);
|
||||
const outputRegExp = /\d+\s+([^<]+)<([^>]+)>/;
|
||||
const tty = process.platform === 'win32' ? 'CON' : '/dev/tty';
|
||||
const authors: { name: string, email: string, knownAuthor?: Author }[] = [];
|
||||
child_process.exec(`${cmd} < ${tty}`, { cwd: path.resolve("../") }, function (error, stdout, stderr) {
|
||||
if (error) {
|
||||
console.log(stderr.toString());
|
||||
}
|
||||
else {
|
||||
const output = stdout.toString();
|
||||
const lines = output.split("\n");
|
||||
lines.forEach(line => {
|
||||
if (line) {
|
||||
let match: RegExpExecArray | null;
|
||||
if (match = outputRegExp.exec(line)) {
|
||||
authors.push({ name: match[1], email: match[2] });
|
||||
}
|
||||
else {
|
||||
throw new Error("Could not parse output: " + line);
|
||||
}
|
||||
const {output: [error, stdout, stderr]} = child_process.spawnSync(`git`, ["shortlog", "-se", ...specs], { cwd: path.resolve(__dirname, "../") });
|
||||
if (error) {
|
||||
console.log(stderr.toString());
|
||||
}
|
||||
else {
|
||||
const output = stdout.toString();
|
||||
const lines = output.split("\n");
|
||||
lines.forEach(line => {
|
||||
if (line) {
|
||||
let match: RegExpExecArray | null;
|
||||
if (match = outputRegExp.exec(line)) {
|
||||
authors.push({ name: match[1], email: match[2] });
|
||||
}
|
||||
else {
|
||||
throw new Error("Could not parse output: " + line);
|
||||
}
|
||||
});
|
||||
|
||||
const maps = getKnownAuthorMaps();
|
||||
|
||||
const lookupAuthor = function ({name, email}: { name: string, email: string }) {
|
||||
return maps.authorsByEmail[email.toLocaleLowerCase()] || maps.authorsByName[name];
|
||||
};
|
||||
|
||||
const knownAuthors = authors
|
||||
.map(lookupAuthor)
|
||||
.filter(a => !!a)
|
||||
.map(getAuthorName);
|
||||
const unknownAuthors = authors
|
||||
.filter(a => !lookupAuthor(a))
|
||||
.map(a => `${a.name} <${a.email}>`);
|
||||
|
||||
if (knownAuthors.length) {
|
||||
console.log("\r\n");
|
||||
console.log("Found known authors: ");
|
||||
console.log("=====================");
|
||||
deduplicate(knownAuthors).sort(sortAuthors).forEach(log);
|
||||
}
|
||||
});
|
||||
|
||||
if (unknownAuthors.length) {
|
||||
console.log("\r\n");
|
||||
console.log("Found unknown authors: ");
|
||||
console.log("=====================");
|
||||
deduplicate(unknownAuthors).sort(sortAuthors).forEach(log);
|
||||
}
|
||||
const maps = getKnownAuthorMaps();
|
||||
|
||||
const lookupAuthor = function ({name, email}: { name: string, email: string }) {
|
||||
return maps.authorsByEmail[email.toLocaleLowerCase()] || maps.authorsByName[name];
|
||||
};
|
||||
|
||||
const knownAuthors = authors
|
||||
.map(lookupAuthor)
|
||||
.filter(a => !!a)
|
||||
.map(getAuthorName);
|
||||
const unknownAuthors = authors
|
||||
.filter(a => !lookupAuthor(a))
|
||||
.map(a => `${a.name} <${a.email}>`);
|
||||
|
||||
if (knownAuthors.length) {
|
||||
console.log("\r\n");
|
||||
console.log("Found known authors: ");
|
||||
console.log("=====================");
|
||||
deduplicate(knownAuthors).sort(sortAuthors).forEach(log);
|
||||
}
|
||||
});
|
||||
|
||||
if (unknownAuthors.length) {
|
||||
console.log("\r\n");
|
||||
console.log("Found unknown authors: ");
|
||||
console.log("=====================");
|
||||
deduplicate(unknownAuthors).sort(sortAuthors).forEach(log);
|
||||
}
|
||||
}
|
||||
};
|
||||
listAuthors.description = "List known and unknown authors for a given spec, e.g. 'node authors.js listAuthors origin/release-2.6..origin/release-2.7'";
|
||||
}
|
||||
|
||||
+75
-84
@@ -232,6 +232,7 @@ namespace ts {
|
||||
getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, agumentCount) =>
|
||||
getResolvedSignatureWorker(node, candidatesOutArray, agumentCount, CheckMode.IsForSignatureHelp),
|
||||
getExpandedParameters,
|
||||
hasEffectiveRestParameter,
|
||||
getConstantValue: nodeIn => {
|
||||
const node = getParseTreeNode(nodeIn, canHaveConstantValue);
|
||||
return node ? getConstantValue(node) : undefined;
|
||||
@@ -304,6 +305,8 @@ namespace ts {
|
||||
getNeverType: () => neverType,
|
||||
isSymbolAccessible,
|
||||
getObjectFlags,
|
||||
isArrayType,
|
||||
isTupleType,
|
||||
isArrayLikeType,
|
||||
isTypeInvalidDueToUnionDiscriminant,
|
||||
getAllPossiblePropertiesOfTypes,
|
||||
@@ -388,7 +391,7 @@ namespace ts {
|
||||
const intersectionTypes = createMap<IntersectionType>();
|
||||
const literalTypes = createMap<LiteralType>();
|
||||
const indexedAccessTypes = createMap<IndexedAccessType>();
|
||||
const conditionalTypes = createMap<Type | undefined>();
|
||||
const conditionalTypes = createMap<Type>();
|
||||
const evolvingArrayTypes: EvolvingArrayType[] = [];
|
||||
const undefinedProperties = createMap<Symbol>() as UnderscoreEscapedMap<Symbol>;
|
||||
|
||||
@@ -1471,7 +1474,14 @@ namespace ts {
|
||||
// @y method(x, y) {} // <-- decorator y should be resolved at the class declaration, not the method.
|
||||
// }
|
||||
//
|
||||
if (location.parent && isClassElement(location.parent)) {
|
||||
|
||||
// class Decorators are resolved outside of the class to avoid referencing type parameters of that class.
|
||||
//
|
||||
// type T = number;
|
||||
// declare function y(x: T): any;
|
||||
// @param(1 as T) // <-- T should resolve to the type alias outside of class C
|
||||
// class C<T> {}
|
||||
if (location.parent && (isClassElement(location.parent) || location.parent.kind === SyntaxKind.ClassDeclaration)) {
|
||||
location = location.parent;
|
||||
}
|
||||
break;
|
||||
@@ -8298,7 +8308,7 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
signature.resolvedTypePredicate = type && isTypePredicateNode(type) ?
|
||||
createTypePredicateFromTypePredicateNode(type, signature.declaration!) :
|
||||
createTypePredicateFromTypePredicateNode(type, signature) :
|
||||
jsdocPredicate || noTypePredicate;
|
||||
}
|
||||
Debug.assert(!!signature.resolvedTypePredicate);
|
||||
@@ -8306,13 +8316,13 @@ namespace ts {
|
||||
return signature.resolvedTypePredicate === noTypePredicate ? undefined : signature.resolvedTypePredicate;
|
||||
}
|
||||
|
||||
function createTypePredicateFromTypePredicateNode(node: TypePredicateNode, func: SignatureDeclaration | JSDocSignature): IdentifierTypePredicate | ThisTypePredicate {
|
||||
function createTypePredicateFromTypePredicateNode(node: TypePredicateNode, signature: Signature): IdentifierTypePredicate | ThisTypePredicate {
|
||||
const { parameterName } = node;
|
||||
const type = getTypeFromTypeNode(node.type);
|
||||
if (parameterName.kind === SyntaxKind.Identifier) {
|
||||
return createIdentifierTypePredicate(
|
||||
parameterName.escapedText as string,
|
||||
getTypePredicateParameterIndex(func.parameters, parameterName),
|
||||
findIndex(signature.parameters, p => p.escapedName === parameterName.escapedText),
|
||||
type);
|
||||
}
|
||||
else {
|
||||
@@ -8320,16 +8330,6 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
function getTypePredicateParameterIndex(parameterList: ReadonlyArray<ParameterDeclaration | JSDocParameterTag>, parameter: Identifier): number {
|
||||
for (let i = 0; i < parameterList.length; i++) {
|
||||
const param = parameterList[i];
|
||||
if (param.name.kind === SyntaxKind.Identifier && param.name.escapedText === parameter.escapedText) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
function getReturnTypeOfSignature(signature: Signature): Type {
|
||||
if (!signature.resolvedReturnType) {
|
||||
if (!pushTypeResolution(signature, TypeSystemPropertyName.ResolvedReturnType)) {
|
||||
@@ -10138,24 +10138,11 @@ namespace ts {
|
||||
const trueType = instantiateType(root.trueType, mapper);
|
||||
const falseType = instantiateType(root.falseType, mapper);
|
||||
const instantiationId = `${root.isDistributive ? "d" : ""}${getTypeId(checkType)}>${getTypeId(extendsType)}?${getTypeId(trueType)}:${getTypeId(falseType)}`;
|
||||
if (conditionalTypes.has(instantiationId)) {
|
||||
const result = conditionalTypes.get(instantiationId);
|
||||
if (result !== undefined) {
|
||||
return result;
|
||||
}
|
||||
// Somehow the conditional type depends on itself - usually via `infer` types in the `extends` clause
|
||||
// paired with a (potentially deferred) circularly constrained type.
|
||||
// The conditional _must_ be deferred.
|
||||
const deferred = getDeferredConditionalType(root, mapper, /*combinedMapper*/ undefined, checkType, extendsType, trueType, falseType);
|
||||
conditionalTypes.set(instantiationId, deferred);
|
||||
return deferred;
|
||||
const result = conditionalTypes.get(instantiationId);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
conditionalTypes.set(instantiationId, undefined);
|
||||
const newResult = getConditionalTypeWorker(root, mapper, checkType, extendsType, trueType, falseType);
|
||||
const cachedRecursiveResult = conditionalTypes.get(instantiationId);
|
||||
if (cachedRecursiveResult) {
|
||||
return cachedRecursiveResult;
|
||||
}
|
||||
conditionalTypes.set(instantiationId, newResult);
|
||||
return newResult;
|
||||
}
|
||||
@@ -11832,7 +11819,7 @@ namespace ts {
|
||||
if (targetTypePredicate) {
|
||||
const sourceTypePredicate = getTypePredicateOfSignature(source);
|
||||
if (sourceTypePredicate) {
|
||||
result &= compareTypePredicateRelatedTo(sourceTypePredicate, targetTypePredicate, source.declaration!, target.declaration!, reportErrors, errorReporter, compareTypes); // TODO: GH#18217
|
||||
result &= compareTypePredicateRelatedTo(sourceTypePredicate, targetTypePredicate, reportErrors, errorReporter, compareTypes);
|
||||
}
|
||||
else if (isIdentifierTypePredicate(targetTypePredicate)) {
|
||||
if (reportErrors) {
|
||||
@@ -11857,8 +11844,6 @@ namespace ts {
|
||||
function compareTypePredicateRelatedTo(
|
||||
source: TypePredicate,
|
||||
target: TypePredicate,
|
||||
sourceDeclaration: SignatureDeclaration | JSDocSignature,
|
||||
targetDeclaration: SignatureDeclaration | JSDocSignature,
|
||||
reportErrors: boolean,
|
||||
errorReporter: ErrorReporter | undefined,
|
||||
compareTypes: (s: Type, t: Type, reportErrors?: boolean) => Ternary): Ternary {
|
||||
@@ -11871,12 +11856,9 @@ namespace ts {
|
||||
}
|
||||
|
||||
if (source.kind === TypePredicateKind.Identifier) {
|
||||
const targetPredicate = target as IdentifierTypePredicate;
|
||||
const sourceIndex = source.parameterIndex - (getThisParameter(sourceDeclaration) ? 1 : 0);
|
||||
const targetIndex = targetPredicate.parameterIndex - (getThisParameter(targetDeclaration) ? 1 : 0);
|
||||
if (sourceIndex !== targetIndex) {
|
||||
if (source.parameterIndex !== (target as IdentifierTypePredicate).parameterIndex) {
|
||||
if (reportErrors) {
|
||||
errorReporter!(Diagnostics.Parameter_0_is_not_in_the_same_position_as_parameter_1, source.parameterName, targetPredicate.parameterName);
|
||||
errorReporter!(Diagnostics.Parameter_0_is_not_in_the_same_position_as_parameter_1, source.parameterName, (target as IdentifierTypePredicate).parameterName);
|
||||
errorReporter!(Diagnostics.Type_predicate_0_is_not_assignable_to_1, typePredicateToString(source), typePredicateToString(target));
|
||||
}
|
||||
return Ternary.False;
|
||||
@@ -14283,7 +14265,7 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
function forEachMatchingParameterType(source: Signature, target: Signature, callback: (s: Type, t: Type) => void) {
|
||||
function applyToParameterTypes(source: Signature, target: Signature, callback: (s: Type, t: Type) => void) {
|
||||
const sourceCount = getParameterCount(source);
|
||||
const targetCount = getParameterCount(target);
|
||||
const sourceRestType = getEffectiveRestType(source);
|
||||
@@ -14305,6 +14287,18 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
function applyToReturnTypes(source: Signature, target: Signature, callback: (s: Type, t: Type) => void) {
|
||||
const sourceTypePredicate = getTypePredicateOfSignature(source);
|
||||
const targetTypePredicate = getTypePredicateOfSignature(target);
|
||||
if (sourceTypePredicate && targetTypePredicate && sourceTypePredicate.kind === targetTypePredicate.kind &&
|
||||
(sourceTypePredicate.kind === TypePredicateKind.This || sourceTypePredicate.parameterIndex === (<IdentifierTypePredicate>targetTypePredicate).parameterIndex)) {
|
||||
callback(sourceTypePredicate.type, targetTypePredicate.type);
|
||||
}
|
||||
else {
|
||||
callback(getReturnTypeOfSignature(source), getReturnTypeOfSignature(target));
|
||||
}
|
||||
}
|
||||
|
||||
function createInferenceContext(typeParameters: ReadonlyArray<TypeParameter>, signature: Signature | undefined, flags: InferenceFlags, compareTypes?: TypeComparer): InferenceContext {
|
||||
return createInferenceContextWorker(typeParameters.map(createInferenceInfo), signature, flags, compareTypes || compareTypesAssignable);
|
||||
}
|
||||
@@ -14523,10 +14517,9 @@ namespace ts {
|
||||
emptyObjectType;
|
||||
}
|
||||
|
||||
function inferTypes(inferences: InferenceInfo[], originalSource: Type, originalTarget: Type, priority: InferencePriority = 0) {
|
||||
function inferTypes(inferences: InferenceInfo[], originalSource: Type, originalTarget: Type, priority: InferencePriority = 0, contravariant = false) {
|
||||
let symbolStack: Symbol[];
|
||||
let visited: Map<boolean>;
|
||||
let contravariant = false;
|
||||
let bivariant = false;
|
||||
let propagationType: Type;
|
||||
let allowComplexConstraintInference = true;
|
||||
@@ -14617,9 +14610,11 @@ namespace ts {
|
||||
const candidate = propagationType || source;
|
||||
// We make contravariant inferences only if we are in a pure contravariant position,
|
||||
// i.e. only if we have not descended into a bivariant position.
|
||||
if (contravariant && !bivariant && !contains(inference.contraCandidates, candidate)) {
|
||||
inference.contraCandidates = append(inference.contraCandidates, candidate);
|
||||
inference.inferredType = undefined;
|
||||
if (contravariant && !bivariant) {
|
||||
if (!contains(inference.contraCandidates, candidate)) {
|
||||
inference.contraCandidates = append(inference.contraCandidates, candidate);
|
||||
inference.inferredType = undefined;
|
||||
}
|
||||
}
|
||||
else if (!contains(inference.candidates, candidate)) {
|
||||
inference.candidates = append(inference.candidates, candidate);
|
||||
@@ -14924,17 +14919,10 @@ namespace ts {
|
||||
const kind = target.declaration ? target.declaration.kind : SyntaxKind.Unknown;
|
||||
// Once we descend into a bivariant signature we remain bivariant for all nested inferences
|
||||
bivariant = bivariant || kind === SyntaxKind.MethodDeclaration || kind === SyntaxKind.MethodSignature || kind === SyntaxKind.Constructor;
|
||||
forEachMatchingParameterType(source, target, inferFromContravariantTypes);
|
||||
applyToParameterTypes(source, target, inferFromContravariantTypes);
|
||||
bivariant = saveBivariant;
|
||||
}
|
||||
const sourceTypePredicate = getTypePredicateOfSignature(source);
|
||||
const targetTypePredicate = getTypePredicateOfSignature(target);
|
||||
if (sourceTypePredicate && targetTypePredicate && sourceTypePredicate.kind === targetTypePredicate.kind) {
|
||||
inferFromTypes(sourceTypePredicate.type, targetTypePredicate.type);
|
||||
}
|
||||
else {
|
||||
inferFromTypes(getReturnTypeOfSignature(source), getReturnTypeOfSignature(target));
|
||||
}
|
||||
applyToReturnTypes(source, target, inferFromTypes);
|
||||
}
|
||||
|
||||
function inferFromIndexTypes(source: Type, target: Type) {
|
||||
@@ -16600,7 +16588,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
if (isIdentifierTypePredicate(predicate)) {
|
||||
const predicateArgument = callExpression.arguments[predicate.parameterIndex - (signature.thisParameter ? 1 : 0)];
|
||||
const predicateArgument = callExpression.arguments[predicate.parameterIndex];
|
||||
if (predicateArgument) {
|
||||
if (isMatchingReference(reference, predicateArgument)) {
|
||||
return getNarrowedType(type, predicate.type, assumeTrue, isTypeSubtypeOf);
|
||||
@@ -20170,18 +20158,14 @@ namespace ts {
|
||||
const restType = getEffectiveRestType(contextualSignature);
|
||||
const mapper = inferenceContext && (restType && restType.flags & TypeFlags.TypeParameter ? inferenceContext.nonFixingMapper : inferenceContext.mapper);
|
||||
const sourceSignature = mapper ? instantiateSignature(contextualSignature, mapper) : contextualSignature;
|
||||
forEachMatchingParameterType(sourceSignature, signature, (source, target) => {
|
||||
applyToParameterTypes(sourceSignature, signature, (source, target) => {
|
||||
// Type parameters from outer context referenced by source type are fixed by instantiation of the source type
|
||||
inferTypes(context.inferences, source, target);
|
||||
});
|
||||
if (!inferenceContext) {
|
||||
inferTypes(context.inferences, getReturnTypeOfSignature(contextualSignature), getReturnTypeOfSignature(signature), InferencePriority.ReturnType);
|
||||
const signaturePredicate = getTypePredicateOfSignature(signature);
|
||||
const contextualPredicate = getTypePredicateOfSignature(sourceSignature);
|
||||
if (signaturePredicate && contextualPredicate && signaturePredicate.kind === contextualPredicate.kind &&
|
||||
(signaturePredicate.kind === TypePredicateKind.This || signaturePredicate.parameterIndex === (contextualPredicate as IdentifierTypePredicate).parameterIndex)) {
|
||||
inferTypes(context.inferences, contextualPredicate.type, signaturePredicate.type, InferencePriority.ReturnType);
|
||||
}
|
||||
applyToReturnTypes(contextualSignature, signature, (source, target) => {
|
||||
inferTypes(context.inferences, source, target, InferencePriority.ReturnType);
|
||||
});
|
||||
}
|
||||
return getSignatureInstantiation(signature, getInferredTypes(context), isInJSFile(contextualSignature.declaration));
|
||||
}
|
||||
@@ -23520,23 +23504,30 @@ namespace ts {
|
||||
// potentially add inferred type parameters to the outer function return type.
|
||||
const returnSignature = context.signature && getSingleCallSignature(getReturnTypeOfSignature(context.signature));
|
||||
if (returnSignature && !returnSignature.typeParameters && !every(context.inferences, hasInferenceCandidates)) {
|
||||
// Instantiate the expression type with its own type parameters as type arguments. This
|
||||
// ensures that the type parameters are not erased to type any during type inference such
|
||||
// that they can be inferred as actual types.
|
||||
// Instantiate the signature with its own type parameters as type arguments, possibly
|
||||
// renaming the type parameters to ensure they have unique names.
|
||||
const uniqueTypeParameters = getUniqueTypeParameters(context, signature.typeParameters);
|
||||
const strippedType = getOrCreateTypeFromSignature(getSignatureInstantiationWithoutFillingInTypeArguments(signature, uniqueTypeParameters));
|
||||
// Infer from the stripped expression type to the contextual type starting with an empty
|
||||
// set of inference candidates.
|
||||
const instantiatedSignature = getSignatureInstantiationWithoutFillingInTypeArguments(signature, uniqueTypeParameters);
|
||||
// Infer from the parameters of the instantiated signature to the parameters of the
|
||||
// contextual signature starting with an empty set of inference candidates.
|
||||
const inferences = map(context.inferences, info => createInferenceInfo(info.typeParameter));
|
||||
inferTypes(inferences, strippedType, contextualType);
|
||||
// If we produced some inference candidates and if the type parameters for which we produced
|
||||
// candidates do not already have existing inferences, we adopt the new inference candidates and
|
||||
// add the type parameters of the expression type to the set of inferred type parameters for
|
||||
// the outer function return type.
|
||||
if (some(inferences, hasInferenceCandidates) && !hasOverlappingInferences(context.inferences, inferences)) {
|
||||
mergeInferences(context.inferences, inferences);
|
||||
context.inferredTypeParameters = concatenate(context.inferredTypeParameters, uniqueTypeParameters);
|
||||
return strippedType;
|
||||
applyToParameterTypes(instantiatedSignature, contextualSignature, (source, target) => {
|
||||
inferTypes(inferences, source, target, /*priority*/ 0, /*contravariant*/ true);
|
||||
});
|
||||
if (some(inferences, hasInferenceCandidates)) {
|
||||
// We have inference candidates, indicating that one or more type parameters are referenced
|
||||
// in the parameter types of the contextual signature. Now also infer from the return type.
|
||||
applyToReturnTypes(instantiatedSignature, contextualSignature, (source, target) => {
|
||||
inferTypes(inferences, source, target);
|
||||
});
|
||||
// If the type parameters for which we produced candidates do not have any inferences yet,
|
||||
// we adopt the new inference candidates and add the type parameters of the expression type
|
||||
// to the set of inferred type parameters for the outer function return type.
|
||||
if (!hasOverlappingInferences(context.inferences, inferences)) {
|
||||
mergeInferences(context.inferences, inferences);
|
||||
context.inferredTypeParameters = concatenate(context.inferredTypeParameters, uniqueTypeParameters);
|
||||
return getOrCreateTypeFromSignature(instantiatedSignature);
|
||||
}
|
||||
}
|
||||
}
|
||||
return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, context));
|
||||
@@ -23880,7 +23871,8 @@ namespace ts {
|
||||
return;
|
||||
}
|
||||
|
||||
const typePredicate = getTypePredicateOfSignature(getSignatureFromDeclaration(parent));
|
||||
const signature = getSignatureFromDeclaration(parent);
|
||||
const typePredicate = getTypePredicateOfSignature(signature);
|
||||
if (!typePredicate) {
|
||||
return;
|
||||
}
|
||||
@@ -23893,14 +23885,13 @@ namespace ts {
|
||||
}
|
||||
else {
|
||||
if (typePredicate.parameterIndex >= 0) {
|
||||
if (parent.parameters[typePredicate.parameterIndex].dotDotDotToken) {
|
||||
error(parameterName,
|
||||
Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter);
|
||||
if (signature.hasRestParameter && typePredicate.parameterIndex === signature.parameters.length - 1) {
|
||||
error(parameterName, Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter);
|
||||
}
|
||||
else {
|
||||
const leadingError = () => chainDiagnosticMessages(/*details*/ undefined, Diagnostics.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type);
|
||||
checkTypeAssignableTo(typePredicate.type,
|
||||
getTypeOfNode(parent.parameters[typePredicate.parameterIndex]),
|
||||
getTypeOfSymbol(signature.parameters[typePredicate.parameterIndex]),
|
||||
node.type,
|
||||
/*headMessage*/ undefined,
|
||||
leadingError);
|
||||
@@ -27985,8 +27976,8 @@ namespace ts {
|
||||
|
||||
// The following checks only apply on a non-ambient instantiated module declaration.
|
||||
if (symbol.flags & SymbolFlags.ValueModule
|
||||
&& symbol.declarations.length > 1
|
||||
&& !inAmbientContext
|
||||
&& symbol.declarations.length > 1
|
||||
&& isInstantiatedModule(node, !!compilerOptions.preserveConstEnums || !!compilerOptions.isolatedModules)) {
|
||||
const firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol);
|
||||
if (firstNonAmbientClassOrFunc) {
|
||||
|
||||
@@ -420,8 +420,10 @@ namespace ts {
|
||||
|
||||
const savedCapturedSuperProperties = capturedSuperProperties;
|
||||
const savedHasSuperElementAccess = hasSuperElementAccess;
|
||||
capturedSuperProperties = createUnderscoreEscapedMap<true>();
|
||||
hasSuperElementAccess = false;
|
||||
if (!isArrowFunction) {
|
||||
capturedSuperProperties = createUnderscoreEscapedMap<true>();
|
||||
hasSuperElementAccess = false;
|
||||
}
|
||||
|
||||
let result: ConciseBody;
|
||||
if (!isArrowFunction) {
|
||||
@@ -446,9 +448,11 @@ namespace ts {
|
||||
|
||||
if (emitSuperHelpers) {
|
||||
enableSubstitutionForAsyncMethodsWithSuper();
|
||||
const variableStatement = createSuperAccessVariableStatement(resolver, node, capturedSuperProperties);
|
||||
substitutedSuperAccessors[getNodeId(variableStatement)] = true;
|
||||
insertStatementsAfterStandardPrologue(statements, [variableStatement]);
|
||||
if (hasEntries(capturedSuperProperties)) {
|
||||
const variableStatement = createSuperAccessVariableStatement(resolver, node, capturedSuperProperties);
|
||||
substitutedSuperAccessors[getNodeId(variableStatement)] = true;
|
||||
insertStatementsAfterStandardPrologue(statements, [variableStatement]);
|
||||
}
|
||||
}
|
||||
|
||||
const block = createBlock(statements, /*multiLine*/ true);
|
||||
@@ -485,8 +489,10 @@ namespace ts {
|
||||
}
|
||||
|
||||
enclosingFunctionParameterNames = savedEnclosingFunctionParameterNames;
|
||||
capturedSuperProperties = savedCapturedSuperProperties;
|
||||
hasSuperElementAccess = savedHasSuperElementAccess;
|
||||
if (!isArrowFunction) {
|
||||
capturedSuperProperties = savedCapturedSuperProperties;
|
||||
hasSuperElementAccess = savedHasSuperElementAccess;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -684,9 +690,15 @@ namespace ts {
|
||||
/* parameters */ [],
|
||||
/* type */ undefined,
|
||||
/* equalsGreaterThanToken */ undefined,
|
||||
createPropertyAccess(
|
||||
createSuper(),
|
||||
name
|
||||
setEmitFlags(
|
||||
createPropertyAccess(
|
||||
setEmitFlags(
|
||||
createSuper(),
|
||||
EmitFlags.NoSubstitution
|
||||
),
|
||||
name
|
||||
),
|
||||
EmitFlags.NoSubstitution
|
||||
)
|
||||
)
|
||||
));
|
||||
@@ -711,9 +723,16 @@ namespace ts {
|
||||
/* type */ undefined,
|
||||
/* equalsGreaterThanToken */ undefined,
|
||||
createAssignment(
|
||||
createPropertyAccess(
|
||||
createSuper(),
|
||||
name),
|
||||
setEmitFlags(
|
||||
createPropertyAccess(
|
||||
setEmitFlags(
|
||||
createSuper(),
|
||||
EmitFlags.NoSubstitution
|
||||
),
|
||||
name
|
||||
),
|
||||
EmitFlags.NoSubstitution
|
||||
),
|
||||
createIdentifier("v")
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1189,6 +1189,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
function getOldProgram(proj: ResolvedConfigFileName, parsed: ParsedCommandLine) {
|
||||
if (options.force) return undefined;
|
||||
const value = builderPrograms.getValue(proj);
|
||||
if (value) return value;
|
||||
return readBuilderProgram(parsed.options, readFileWithCache) as any as T;
|
||||
|
||||
@@ -3171,6 +3171,7 @@ namespace ts {
|
||||
getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined;
|
||||
/* @internal */ getResolvedSignatureForSignatureHelp(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined;
|
||||
/* @internal */ getExpandedParameters(sig: Signature): ReadonlyArray<Symbol>;
|
||||
/* @internal */ hasEffectiveRestParameter(sig: Signature): boolean;
|
||||
getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature | undefined;
|
||||
isImplementationOfOverload(node: SignatureDeclaration): boolean | undefined;
|
||||
isUndefinedSymbol(symbol: Symbol): boolean;
|
||||
@@ -3251,6 +3252,8 @@ namespace ts {
|
||||
/* @internal */ getSymbolCount(): number;
|
||||
/* @internal */ getTypeCount(): number;
|
||||
|
||||
/* @internal */ isArrayType(type: Type): boolean;
|
||||
/* @internal */ isTupleType(type: Type): boolean;
|
||||
/* @internal */ isArrayLikeType(type: Type): boolean;
|
||||
/* @internal */ getObjectFlags(type: Type): ObjectFlags;
|
||||
|
||||
|
||||
+24
-8
@@ -659,16 +659,32 @@ namespace ts.server {
|
||||
}
|
||||
}
|
||||
|
||||
if (fileRequest && this.logger.hasLevel(LogLevel.verbose)) {
|
||||
try {
|
||||
const { file, project } = this.getFileAndProject(fileRequest);
|
||||
const scriptInfo = project.getScriptInfoForNormalizedPath(file);
|
||||
if (scriptInfo) {
|
||||
const text = getSnapshotText(scriptInfo.getSnapshot());
|
||||
msg += `\n\nFile text of ${fileRequest.file}:${indent(text)}\n`;
|
||||
if (this.logger.hasLevel(LogLevel.verbose)) {
|
||||
if (fileRequest) {
|
||||
try {
|
||||
const { file, project } = this.getFileAndProject(fileRequest);
|
||||
const scriptInfo = project.getScriptInfoForNormalizedPath(file);
|
||||
if (scriptInfo) {
|
||||
const text = getSnapshotText(scriptInfo.getSnapshot());
|
||||
msg += `\n\nFile text of ${fileRequest.file}:${indent(text)}\n`;
|
||||
}
|
||||
}
|
||||
catch { } // tslint:disable-line no-empty
|
||||
}
|
||||
|
||||
if (err.message && err.message.indexOf(`Could not find sourceFile:`) !== -1) {
|
||||
msg += `\n\nProjects::\n`;
|
||||
let counter = 0;
|
||||
const addProjectInfo = (project: Project) => {
|
||||
msg += `\nProject '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter}\n`;
|
||||
msg += project.filesToString(/*writeProjectFileNames*/ true);
|
||||
msg += "\n-----------------------------------------------\n";
|
||||
counter++;
|
||||
};
|
||||
this.projectService.externalProjects.forEach(addProjectInfo);
|
||||
this.projectService.configuredProjects.forEach(addProjectInfo);
|
||||
this.projectService.inferredProjects.forEach(addProjectInfo);
|
||||
}
|
||||
catch {} // tslint:disable-line no-empty
|
||||
}
|
||||
|
||||
this.logger.msg(msg, Msg.Err);
|
||||
|
||||
@@ -890,7 +890,9 @@ namespace ts.Completions {
|
||||
}
|
||||
|
||||
// If the module is merged with a value, we must get the type of the class and add its propertes (for inherited static methods).
|
||||
if (!isTypeLocation && symbol.declarations.some(d => d.kind !== SyntaxKind.SourceFile && d.kind !== SyntaxKind.ModuleDeclaration && d.kind !== SyntaxKind.EnumDeclaration)) {
|
||||
if (!isTypeLocation &&
|
||||
symbol.declarations &&
|
||||
symbol.declarations.some(d => d.kind !== SyntaxKind.SourceFile && d.kind !== SyntaxKind.ModuleDeclaration && d.kind !== SyntaxKind.EnumDeclaration)) {
|
||||
addTypeProperties(typeChecker.getTypeOfSymbolAtLocation(symbol, node));
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace ts.refactor.convertParamsToDestructuredObject {
|
||||
const references = flatMap(names, /*mapfn*/ name => FindAllReferences.getReferenceEntriesForNode(-1, name, program, program.getSourceFiles(), cancellationToken));
|
||||
const groupedReferences = groupReferences(references);
|
||||
|
||||
if (!every(groupedReferences.declarations, decl => contains(names, decl))) {
|
||||
if (!every(groupedReferences.declarations, /*callback*/ decl => contains(names, decl))) {
|
||||
groupedReferences.valid = false;
|
||||
}
|
||||
|
||||
@@ -233,6 +233,10 @@ namespace ts.refactor.convertParamsToDestructuredObject {
|
||||
function getFunctionDeclarationAtPosition(file: SourceFile, startPosition: number, checker: TypeChecker): ValidFunctionDeclaration | undefined {
|
||||
const node = getTouchingToken(file, startPosition);
|
||||
const functionDeclaration = getContainingFunction(node);
|
||||
|
||||
// don't offer refactor on top-level JSDoc
|
||||
if (isTopLevelJSDoc(node)) return undefined;
|
||||
|
||||
if (functionDeclaration
|
||||
&& isValidFunctionDeclaration(functionDeclaration, checker)
|
||||
&& rangeContainsRange(functionDeclaration, node)
|
||||
@@ -241,18 +245,35 @@ namespace ts.refactor.convertParamsToDestructuredObject {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function isValidFunctionDeclaration(functionDeclaration: SignatureDeclaration, checker: TypeChecker): functionDeclaration is ValidFunctionDeclaration {
|
||||
if (!isValidParameterNodeArray(functionDeclaration.parameters)) return false;
|
||||
function isTopLevelJSDoc(node: Node): boolean {
|
||||
const containingJSDoc = findAncestor(node, isJSDocNode);
|
||||
if (containingJSDoc) {
|
||||
const containingNonJSDoc = findAncestor(containingJSDoc, n => !isJSDocNode(n));
|
||||
return !!containingNonJSDoc && isFunctionLikeDeclaration(containingNonJSDoc);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function isValidFunctionDeclaration(
|
||||
functionDeclaration: SignatureDeclaration,
|
||||
checker: TypeChecker): functionDeclaration is ValidFunctionDeclaration {
|
||||
if (!isValidParameterNodeArray(functionDeclaration.parameters, checker)) return false;
|
||||
switch (functionDeclaration.kind) {
|
||||
case SyntaxKind.FunctionDeclaration:
|
||||
case SyntaxKind.MethodDeclaration:
|
||||
return !!functionDeclaration.name && !!functionDeclaration.body && !checker.isImplementationOfOverload(functionDeclaration);
|
||||
return !!functionDeclaration.name
|
||||
&& !!functionDeclaration.body
|
||||
&& !checker.isImplementationOfOverload(functionDeclaration);
|
||||
case SyntaxKind.Constructor:
|
||||
if (isClassDeclaration(functionDeclaration.parent)) {
|
||||
return !!functionDeclaration.body && !!functionDeclaration.parent.name && !checker.isImplementationOfOverload(functionDeclaration);
|
||||
return !!functionDeclaration.body
|
||||
&& !!functionDeclaration.parent.name
|
||||
&& !checker.isImplementationOfOverload(functionDeclaration);
|
||||
}
|
||||
else {
|
||||
return isValidVariableDeclaration(functionDeclaration.parent.parent) && !!functionDeclaration.body && !checker.isImplementationOfOverload(functionDeclaration);
|
||||
return isValidVariableDeclaration(functionDeclaration.parent.parent)
|
||||
&& !!functionDeclaration.body
|
||||
&& !checker.isImplementationOfOverload(functionDeclaration);
|
||||
}
|
||||
case SyntaxKind.FunctionExpression:
|
||||
case SyntaxKind.ArrowFunction:
|
||||
@@ -261,12 +282,21 @@ namespace ts.refactor.convertParamsToDestructuredObject {
|
||||
return false;
|
||||
}
|
||||
|
||||
function isValidParameterNodeArray(parameters: NodeArray<ParameterDeclaration>): parameters is ValidParameterNodeArray {
|
||||
return getRefactorableParametersLength(parameters) >= minimumParameterLength && every(parameters, isValidParameterDeclaration);
|
||||
function isValidParameterNodeArray(
|
||||
parameters: NodeArray<ParameterDeclaration>,
|
||||
checker: TypeChecker): parameters is ValidParameterNodeArray {
|
||||
return getRefactorableParametersLength(parameters) >= minimumParameterLength
|
||||
&& every(parameters, /*callback*/ paramDecl => isValidParameterDeclaration(paramDecl, checker));
|
||||
}
|
||||
|
||||
function isValidParameterDeclaration(paramDeclaration: ParameterDeclaration): paramDeclaration is ValidParameterDeclaration {
|
||||
return !paramDeclaration.modifiers && !paramDeclaration.decorators && isIdentifier(paramDeclaration.name);
|
||||
function isValidParameterDeclaration(
|
||||
parameterDeclaration: ParameterDeclaration,
|
||||
checker: TypeChecker): parameterDeclaration is ValidParameterDeclaration {
|
||||
if (isRestParameter(parameterDeclaration)) {
|
||||
const type = checker.getTypeAtLocation(parameterDeclaration);
|
||||
if (!checker.isArrayType(type) && !checker.isTupleType(type)) return false;
|
||||
}
|
||||
return !parameterDeclaration.modifiers && !parameterDeclaration.decorators && isIdentifier(parameterDeclaration.name);
|
||||
}
|
||||
|
||||
function isValidVariableDeclaration(node: Node): node is ValidVariableDeclaration {
|
||||
@@ -291,13 +321,23 @@ namespace ts.refactor.convertParamsToDestructuredObject {
|
||||
return parameters;
|
||||
}
|
||||
|
||||
function createPropertyOrShorthandAssignment(name: string, initializer: Expression): PropertyAssignment | ShorthandPropertyAssignment {
|
||||
if (isIdentifier(initializer) && getTextOfIdentifierOrLiteral(initializer) === name) {
|
||||
return createShorthandPropertyAssignment(name);
|
||||
}
|
||||
return createPropertyAssignment(name, initializer);
|
||||
}
|
||||
|
||||
function createNewArgument(functionDeclaration: ValidFunctionDeclaration, functionArguments: NodeArray<Expression>): ObjectLiteralExpression {
|
||||
const parameters = getRefactorableParameters(functionDeclaration.parameters);
|
||||
const hasRestParameter = isRestParameter(last(parameters));
|
||||
const nonRestArguments = hasRestParameter ? functionArguments.slice(0, parameters.length - 1) : functionArguments;
|
||||
const properties = map(nonRestArguments, (arg, i) => {
|
||||
const property = createPropertyAssignment(getParameterName(parameters[i]), arg);
|
||||
suppressLeadingAndTrailingTrivia(property.initializer);
|
||||
const parameterName = getParameterName(parameters[i]);
|
||||
const property = createPropertyOrShorthandAssignment(parameterName, arg);
|
||||
|
||||
suppressLeadingAndTrailingTrivia(property.name);
|
||||
if (isPropertyAssignment(property)) suppressLeadingAndTrailingTrivia(property.initializer);
|
||||
copyComments(arg, property);
|
||||
return property;
|
||||
});
|
||||
@@ -313,15 +353,15 @@ namespace ts.refactor.convertParamsToDestructuredObject {
|
||||
}
|
||||
|
||||
function createNewParameters(functionDeclaration: ValidFunctionDeclaration, program: Program, host: LanguageServiceHost): NodeArray<ParameterDeclaration> {
|
||||
const checker = program.getTypeChecker();
|
||||
const refactorableParameters = getRefactorableParameters(functionDeclaration.parameters);
|
||||
const bindingElements = map(refactorableParameters, createBindingElementFromParameterDeclaration);
|
||||
const objectParameterName = createObjectBindingPattern(bindingElements);
|
||||
const objectParameterType = createParameterTypeNode(refactorableParameters);
|
||||
const checker = program.getTypeChecker();
|
||||
|
||||
let objectInitializer: Expression | undefined;
|
||||
// If every parameter in the original function was optional, add an empty object initializer to the new object parameter
|
||||
if (every(refactorableParameters, checker.isOptionalParameter)) {
|
||||
if (every(refactorableParameters, isOptionalParameter)) {
|
||||
objectInitializer = createObjectLiteral();
|
||||
}
|
||||
|
||||
@@ -355,6 +395,20 @@ namespace ts.refactor.convertParamsToDestructuredObject {
|
||||
}
|
||||
return createNodeArray([objectParameter]);
|
||||
|
||||
function createBindingElementFromParameterDeclaration(parameterDeclaration: ValidParameterDeclaration): BindingElement {
|
||||
const element = createBindingElement(
|
||||
/*dotDotDotToken*/ undefined,
|
||||
/*propertyName*/ undefined,
|
||||
getParameterName(parameterDeclaration),
|
||||
isRestParameter(parameterDeclaration) && isOptionalParameter(parameterDeclaration) ? createArrayLiteral() : parameterDeclaration.initializer);
|
||||
|
||||
suppressLeadingAndTrailingTrivia(element);
|
||||
if (parameterDeclaration.initializer && element.initializer) {
|
||||
copyComments(parameterDeclaration.initializer, element.initializer);
|
||||
}
|
||||
return element;
|
||||
}
|
||||
|
||||
function createParameterTypeNode(parameters: NodeArray<ValidParameterDeclaration>): TypeLiteralNode {
|
||||
const members = map(parameters, createPropertySignatureFromParameterDeclaration);
|
||||
const typeNode = addEmitFlags(createTypeLiteralNode(members), EmitFlags.SingleLine);
|
||||
@@ -370,7 +424,7 @@ namespace ts.refactor.convertParamsToDestructuredObject {
|
||||
const propertySignature = createPropertySignature(
|
||||
/*modifiers*/ undefined,
|
||||
getParameterName(parameterDeclaration),
|
||||
parameterDeclaration.initializer || isRestParameter(parameterDeclaration) ? createToken(SyntaxKind.QuestionToken) : parameterDeclaration.questionToken,
|
||||
isOptionalParameter(parameterDeclaration) ? createToken(SyntaxKind.QuestionToken) : parameterDeclaration.questionToken,
|
||||
parameterType,
|
||||
/*initializer*/ undefined);
|
||||
|
||||
@@ -384,24 +438,17 @@ namespace ts.refactor.convertParamsToDestructuredObject {
|
||||
}
|
||||
|
||||
function getTypeNode(node: Node): TypeNode | undefined {
|
||||
const checker = program.getTypeChecker();
|
||||
const type = checker.getTypeAtLocation(node);
|
||||
return getTypeNodeIfAccessible(type, node, program, host);
|
||||
}
|
||||
}
|
||||
|
||||
function createBindingElementFromParameterDeclaration(parameterDeclaration: ValidParameterDeclaration): BindingElement {
|
||||
const element = createBindingElement(
|
||||
/*dotDotDotToken*/ undefined,
|
||||
/*propertyName*/ undefined,
|
||||
getParameterName(parameterDeclaration),
|
||||
isRestParameter(parameterDeclaration) ? createArrayLiteral() : parameterDeclaration.initializer);
|
||||
|
||||
suppressLeadingAndTrailingTrivia(element);
|
||||
if (parameterDeclaration.initializer && element.initializer) {
|
||||
copyComments(parameterDeclaration.initializer, element.initializer);
|
||||
function isOptionalParameter(parameterDeclaration: ValidParameterDeclaration): boolean {
|
||||
if (isRestParameter(parameterDeclaration)) {
|
||||
const type = checker.getTypeAtLocation(parameterDeclaration);
|
||||
return !checker.isTupleType(type);
|
||||
}
|
||||
return checker.isOptionalParameter(parameterDeclaration);
|
||||
}
|
||||
return element;
|
||||
}
|
||||
|
||||
function copyComments(sourceNode: Node, targetNode: Node) {
|
||||
|
||||
@@ -1158,7 +1158,7 @@ namespace ts {
|
||||
function getValidSourceFile(fileName: string): SourceFile {
|
||||
const sourceFile = program.getSourceFile(fileName);
|
||||
if (!sourceFile) {
|
||||
throw new Error("Could not find file: '" + fileName + "'.");
|
||||
throw new Error(`Could not find sourceFile: '${fileName}' in ${program && JSON.stringify(program.getSourceFiles().map(f => f.fileName))}.`);
|
||||
}
|
||||
return sourceFile;
|
||||
}
|
||||
|
||||
@@ -566,7 +566,7 @@ namespace ts.SignatureHelp {
|
||||
}
|
||||
|
||||
function itemInfoForParameters(candidateSignature: Signature, checker: TypeChecker, enclosingDeclaration: Node, sourceFile: SourceFile): SignatureHelpItemInfo {
|
||||
const isVariadic = candidateSignature.hasRestParameter;
|
||||
const isVariadic = checker.hasEffectiveRestParameter(candidateSignature);
|
||||
const printer = createPrinter({ removeComments: true });
|
||||
const typeParameterParts = mapToDisplayParts(writer => {
|
||||
if (candidateSignature.typeParameters && candidateSignature.typeParameters.length) {
|
||||
|
||||
@@ -168,14 +168,14 @@ namespace ts {
|
||||
});
|
||||
|
||||
describe("can detect when and what to rebuild", () => {
|
||||
function initializeWithBuild() {
|
||||
function initializeWithBuild(opts?: BuildOptions) {
|
||||
const fs = projFs.shadow();
|
||||
const host = new fakes.SolutionBuilderHost(fs);
|
||||
const builder = createSolutionBuilder(host, ["/src/tests"], { verbose: true });
|
||||
builder.buildAllProjects();
|
||||
host.clearDiagnostics();
|
||||
tick();
|
||||
builder.resetBuildContext();
|
||||
builder.resetBuildContext(opts ? { ...opts, verbose: true } : undefined);
|
||||
return { fs, host, builder };
|
||||
}
|
||||
|
||||
@@ -255,6 +255,20 @@ namespace ts {
|
||||
);
|
||||
});
|
||||
|
||||
it("rebuilds from start if --f is passed", () => {
|
||||
const { host, builder } = initializeWithBuild({ force: true });
|
||||
builder.buildAllProjects();
|
||||
host.assertDiagnosticMessages(
|
||||
getExpectedDiagnosticForProjectsInBuild("src/core/tsconfig.json", "src/logic/tsconfig.json", "src/tests/tsconfig.json"),
|
||||
[Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2, "src/core/tsconfig.json", "src/core/anotherModule.ts", "src/core/anotherModule.js"],
|
||||
[Diagnostics.Building_project_0, "/src/core/tsconfig.json"],
|
||||
[Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, "src/logic/tsconfig.json"],
|
||||
[Diagnostics.Building_project_0, "/src/logic/tsconfig.json"],
|
||||
[Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, "src/tests/tsconfig.json"],
|
||||
[Diagnostics.Building_project_0, "/src/tests/tsconfig.json"]
|
||||
);
|
||||
});
|
||||
|
||||
it("rebuilds when tsconfig changes", () => {
|
||||
const { fs, host, builder } = initializeWithBuild();
|
||||
replaceText(fs, "/src/tests/tsconfig.json", `"composite": true`, `"composite": true, "target": "es3"`);
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace ts.projectSystem {
|
||||
assert.isTrue(false, `should not find file '${imported.path}'`);
|
||||
}
|
||||
catch (e) {
|
||||
assert.isTrue(e.message.indexOf(`Could not find file: '${imported.path}'.`) === 0);
|
||||
assert.isTrue(e.message.indexOf(`Could not find sourceFile: '${imported.path}' in ["${root.path}"].`) === 0, `Actual: ${e.message}`);
|
||||
}
|
||||
const f2Lookups = getLocationsForModuleLookup("f2");
|
||||
callsTrackingHost.verifyCalledOnEachEntryNTimes(CalledMapsWithSingleArg.fileExists, f2Lookups, 1);
|
||||
|
||||
+6
-6
@@ -13,7 +13,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
let reportDiagnostic = createDiagnosticReporter(sys);
|
||||
function updateReportDiagnostic(options?: CompilerOptions) {
|
||||
function updateReportDiagnostic(options: CompilerOptions | BuildOptions) {
|
||||
if (shouldBePretty(options)) {
|
||||
reportDiagnostic = createDiagnosticReporter(sys, /*pretty*/ true);
|
||||
}
|
||||
@@ -23,7 +23,7 @@ namespace ts {
|
||||
return !!sys.writeOutputIsTTY && sys.writeOutputIsTTY();
|
||||
}
|
||||
|
||||
function shouldBePretty(options?: CompilerOptions) {
|
||||
function shouldBePretty(options: CompilerOptions | BuildOptions) {
|
||||
if (!options || typeof options.pretty === "undefined") {
|
||||
return defaultIsPretty();
|
||||
}
|
||||
@@ -192,7 +192,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
// Update to pretty if host supports it
|
||||
updateReportDiagnostic();
|
||||
updateReportDiagnostic(buildOptions);
|
||||
if (projects.length === 0) {
|
||||
printVersion();
|
||||
printHelp(buildOpts, "--build ");
|
||||
@@ -209,8 +209,8 @@ namespace ts {
|
||||
|
||||
// Use default createProgram
|
||||
const buildHost = buildOptions.watch ?
|
||||
createSolutionBuilderWithWatchHost(sys, /*createProgram*/ undefined, reportDiagnostic, createBuilderStatusReporter(sys, shouldBePretty()), createWatchStatusReporter()) :
|
||||
createSolutionBuilderHost(sys, /*createProgram*/ undefined, reportDiagnostic, createBuilderStatusReporter(sys, shouldBePretty()), createReportErrorSummary(buildOptions));
|
||||
createSolutionBuilderWithWatchHost(sys, /*createProgram*/ undefined, reportDiagnostic, createBuilderStatusReporter(sys, shouldBePretty(buildOptions)), createWatchStatusReporter(buildOptions)) :
|
||||
createSolutionBuilderHost(sys, /*createProgram*/ undefined, reportDiagnostic, createBuilderStatusReporter(sys, shouldBePretty(buildOptions)), createReportErrorSummary(buildOptions));
|
||||
updateCreateProgram(buildHost);
|
||||
buildHost.afterProgramEmitAndDiagnostics = (program: BuilderProgram) => reportStatistics(program.getProgram());
|
||||
|
||||
@@ -316,7 +316,7 @@ namespace ts {
|
||||
};
|
||||
}
|
||||
|
||||
function createWatchStatusReporter(options?: CompilerOptions) {
|
||||
function createWatchStatusReporter(options: CompilerOptions | BuildOptions) {
|
||||
return ts.createWatchStatusReporter(sys, shouldBePretty(options));
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,138 @@ class B extends A {
|
||||
|
||||
// destructuring assign with element access
|
||||
({ f: super["x"] } = { f });
|
||||
|
||||
// property access in arrow
|
||||
(() => super.x());
|
||||
|
||||
// element access in arrow
|
||||
(() => super["x"]());
|
||||
|
||||
// property access in async arrow
|
||||
(async () => super.x());
|
||||
|
||||
// element access in async arrow
|
||||
(async () => super["x"]());
|
||||
}
|
||||
|
||||
async property_access_only_read_only() {
|
||||
// call with property access
|
||||
super.x();
|
||||
|
||||
// property access (read)
|
||||
const a = super.x;
|
||||
|
||||
// property access in arrow
|
||||
(() => super.x());
|
||||
|
||||
// property access in async arrow
|
||||
(async () => super.x());
|
||||
}
|
||||
|
||||
async property_access_only_write_only() {
|
||||
const f = () => {};
|
||||
|
||||
// property access (assign)
|
||||
super.x = f;
|
||||
|
||||
// destructuring assign with property access
|
||||
({ f: super.x } = { f });
|
||||
|
||||
// property access (assign) in arrow
|
||||
(() => super.x = f);
|
||||
|
||||
// property access (assign) in async arrow
|
||||
(async () => super.x = f);
|
||||
}
|
||||
|
||||
async element_access_only_read_only() {
|
||||
// call with element access
|
||||
super["x"]();
|
||||
|
||||
// element access (read)
|
||||
const a = super["x"];
|
||||
|
||||
// element access in arrow
|
||||
(() => super["x"]());
|
||||
|
||||
// element access in async arrow
|
||||
(async () => super["x"]());
|
||||
}
|
||||
|
||||
async element_access_only_write_only() {
|
||||
const f = () => {};
|
||||
|
||||
// element access (assign)
|
||||
super["x"] = f;
|
||||
|
||||
// destructuring assign with element access
|
||||
({ f: super["x"] } = { f });
|
||||
|
||||
// element access (assign) in arrow
|
||||
(() => super["x"] = f);
|
||||
|
||||
// element access (assign) in async arrow
|
||||
(async () => super["x"] = f);
|
||||
}
|
||||
|
||||
async * property_access_only_read_only_in_generator() {
|
||||
// call with property access
|
||||
super.x();
|
||||
|
||||
// property access (read)
|
||||
const a = super.x;
|
||||
|
||||
// property access in arrow
|
||||
(() => super.x());
|
||||
|
||||
// property access in async arrow
|
||||
(async () => super.x());
|
||||
}
|
||||
|
||||
async * property_access_only_write_only_in_generator() {
|
||||
const f = () => {};
|
||||
|
||||
// property access (assign)
|
||||
super.x = f;
|
||||
|
||||
// destructuring assign with property access
|
||||
({ f: super.x } = { f });
|
||||
|
||||
// property access (assign) in arrow
|
||||
(() => super.x = f);
|
||||
|
||||
// property access (assign) in async arrow
|
||||
(async () => super.x = f);
|
||||
}
|
||||
|
||||
async * element_access_only_read_only_in_generator() {
|
||||
// call with element access
|
||||
super["x"]();
|
||||
|
||||
// element access (read)
|
||||
const a = super["x"];
|
||||
|
||||
// element access in arrow
|
||||
(() => super["x"]());
|
||||
|
||||
// element access in async arrow
|
||||
(async () => super["x"]());
|
||||
}
|
||||
|
||||
async * element_access_only_write_only_in_generator() {
|
||||
const f = () => {};
|
||||
|
||||
// element access (assign)
|
||||
super["x"] = f;
|
||||
|
||||
// destructuring assign with element access
|
||||
({ f: super["x"] } = { f });
|
||||
|
||||
// element access (assign) in arrow
|
||||
(() => super["x"] = f);
|
||||
|
||||
// element access (assign) in async arrow
|
||||
(async () => super["x"] = f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,6 +242,138 @@ class B extends A {
|
||||
({ f: _super.x } = { f });
|
||||
// destructuring assign with element access
|
||||
({ f: _superIndex("x").value } = { f });
|
||||
// property access in arrow
|
||||
(() => _super.x.call(this));
|
||||
// element access in arrow
|
||||
(() => _superIndex("x").value.call(this));
|
||||
// property access in async arrow
|
||||
(() => __awaiter(this, void 0, void 0, function* () { return _super.x.call(this); }));
|
||||
// element access in async arrow
|
||||
(() => __awaiter(this, void 0, void 0, function* () { return _superIndex("x").value.call(this); }));
|
||||
});
|
||||
}
|
||||
property_access_only_read_only() {
|
||||
const _super = Object.create(null, {
|
||||
x: { get: () => super.x }
|
||||
});
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// call with property access
|
||||
_super.x.call(this);
|
||||
// property access (read)
|
||||
const a = _super.x;
|
||||
// property access in arrow
|
||||
(() => _super.x.call(this));
|
||||
// property access in async arrow
|
||||
(() => __awaiter(this, void 0, void 0, function* () { return _super.x.call(this); }));
|
||||
});
|
||||
}
|
||||
property_access_only_write_only() {
|
||||
const _super = Object.create(null, {
|
||||
x: { get: () => super.x, set: v => super.x = v }
|
||||
});
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const f = () => { };
|
||||
// property access (assign)
|
||||
_super.x = f;
|
||||
// destructuring assign with property access
|
||||
({ f: _super.x } = { f });
|
||||
// property access (assign) in arrow
|
||||
(() => _super.x = f);
|
||||
// property access (assign) in async arrow
|
||||
(() => __awaiter(this, void 0, void 0, function* () { return _super.x = f; }));
|
||||
});
|
||||
}
|
||||
element_access_only_read_only() {
|
||||
const _superIndex = name => super[name];
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// call with element access
|
||||
_superIndex("x").call(this);
|
||||
// element access (read)
|
||||
const a = _superIndex("x");
|
||||
// element access in arrow
|
||||
(() => _superIndex("x").call(this));
|
||||
// element access in async arrow
|
||||
(() => __awaiter(this, void 0, void 0, function* () { return _superIndex("x").call(this); }));
|
||||
});
|
||||
}
|
||||
element_access_only_write_only() {
|
||||
const _superIndex = (function (geti, seti) {
|
||||
const cache = Object.create(null);
|
||||
return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });
|
||||
})(name => super[name], (name, value) => super[name] = value);
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const f = () => { };
|
||||
// element access (assign)
|
||||
_superIndex("x").value = f;
|
||||
// destructuring assign with element access
|
||||
({ f: _superIndex("x").value } = { f });
|
||||
// element access (assign) in arrow
|
||||
(() => _superIndex("x").value = f);
|
||||
// element access (assign) in async arrow
|
||||
(() => __awaiter(this, void 0, void 0, function* () { return _superIndex("x").value = f; }));
|
||||
});
|
||||
}
|
||||
property_access_only_read_only_in_generator() {
|
||||
const _super = Object.create(null, {
|
||||
x: { get: () => super.x }
|
||||
});
|
||||
return __asyncGenerator(this, arguments, function* property_access_only_read_only_in_generator_1() {
|
||||
// call with property access
|
||||
_super.x.call(this);
|
||||
// property access (read)
|
||||
const a = _super.x;
|
||||
// property access in arrow
|
||||
(() => _super.x.call(this));
|
||||
// property access in async arrow
|
||||
(() => __awaiter(this, void 0, void 0, function* () { return _super.x.call(this); }));
|
||||
});
|
||||
}
|
||||
property_access_only_write_only_in_generator() {
|
||||
const _super = Object.create(null, {
|
||||
x: { get: () => super.x, set: v => super.x = v }
|
||||
});
|
||||
return __asyncGenerator(this, arguments, function* property_access_only_write_only_in_generator_1() {
|
||||
const f = () => { };
|
||||
// property access (assign)
|
||||
_super.x = f;
|
||||
// destructuring assign with property access
|
||||
({ f: _super.x } = { f });
|
||||
// property access (assign) in arrow
|
||||
(() => _super.x = f);
|
||||
// property access (assign) in async arrow
|
||||
(() => __awaiter(this, void 0, void 0, function* () { return _super.x = f; }));
|
||||
});
|
||||
}
|
||||
element_access_only_read_only_in_generator() {
|
||||
const _superIndex = name => super[name];
|
||||
const _super = Object.create(null, {});
|
||||
return __asyncGenerator(this, arguments, function* element_access_only_read_only_in_generator_1() {
|
||||
// call with element access
|
||||
_superIndex("x").call(this);
|
||||
// element access (read)
|
||||
const a = _superIndex("x");
|
||||
// element access in arrow
|
||||
(() => _superIndex("x").call(this));
|
||||
// element access in async arrow
|
||||
(() => __awaiter(this, void 0, void 0, function* () { return _superIndex("x").call(this); }));
|
||||
});
|
||||
}
|
||||
element_access_only_write_only_in_generator() {
|
||||
const _superIndex = (function (geti, seti) {
|
||||
const cache = Object.create(null);
|
||||
return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });
|
||||
})(name => super[name], (name, value) => super[name] = value);
|
||||
const _super = Object.create(null, {});
|
||||
return __asyncGenerator(this, arguments, function* element_access_only_write_only_in_generator_1() {
|
||||
const f = () => { };
|
||||
// element access (assign)
|
||||
_superIndex("x").value = f;
|
||||
// destructuring assign with element access
|
||||
({ f: _superIndex("x").value } = { f });
|
||||
// element access (assign) in arrow
|
||||
(() => _superIndex("x").value = f);
|
||||
// element access (assign) in async arrow
|
||||
(() => __awaiter(this, void 0, void 0, function* () { return _superIndex("x").value = f; }));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,6 +107,272 @@ class B extends A {
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 51, 30))
|
||||
|
||||
// property access in arrow
|
||||
(() => super.x());
|
||||
>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
|
||||
// element access in arrow
|
||||
(() => super["x"]());
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
|
||||
// property access in async arrow
|
||||
(async () => super.x());
|
||||
>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
|
||||
// element access in async arrow
|
||||
(async () => super["x"]());
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
}
|
||||
|
||||
async property_access_only_read_only() {
|
||||
>property_access_only_read_only : Symbol(B.property_access_only_read_only, Decl(asyncMethodWithSuper_es6.ts, 64, 5))
|
||||
|
||||
// call with property access
|
||||
super.x();
|
||||
>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
|
||||
// property access (read)
|
||||
const a = super.x;
|
||||
>a : Symbol(a, Decl(asyncMethodWithSuper_es6.ts, 71, 13))
|
||||
>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
|
||||
// property access in arrow
|
||||
(() => super.x());
|
||||
>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
|
||||
// property access in async arrow
|
||||
(async () => super.x());
|
||||
>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
}
|
||||
|
||||
async property_access_only_write_only() {
|
||||
>property_access_only_write_only : Symbol(B.property_access_only_write_only, Decl(asyncMethodWithSuper_es6.ts, 78, 5))
|
||||
|
||||
const f = () => {};
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 81, 13))
|
||||
|
||||
// property access (assign)
|
||||
super.x = f;
|
||||
>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 81, 13))
|
||||
|
||||
// destructuring assign with property access
|
||||
({ f: super.x } = { f });
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 87, 10))
|
||||
>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 87, 27))
|
||||
|
||||
// property access (assign) in arrow
|
||||
(() => super.x = f);
|
||||
>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 81, 13))
|
||||
|
||||
// property access (assign) in async arrow
|
||||
(async () => super.x = f);
|
||||
>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 81, 13))
|
||||
}
|
||||
|
||||
async element_access_only_read_only() {
|
||||
>element_access_only_read_only : Symbol(B.element_access_only_read_only, Decl(asyncMethodWithSuper_es6.ts, 94, 5))
|
||||
|
||||
// call with element access
|
||||
super["x"]();
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
|
||||
// element access (read)
|
||||
const a = super["x"];
|
||||
>a : Symbol(a, Decl(asyncMethodWithSuper_es6.ts, 101, 13))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
|
||||
// element access in arrow
|
||||
(() => super["x"]());
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
|
||||
// element access in async arrow
|
||||
(async () => super["x"]());
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
}
|
||||
|
||||
async element_access_only_write_only() {
|
||||
>element_access_only_write_only : Symbol(B.element_access_only_write_only, Decl(asyncMethodWithSuper_es6.ts, 108, 5))
|
||||
|
||||
const f = () => {};
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 111, 13))
|
||||
|
||||
// element access (assign)
|
||||
super["x"] = f;
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 111, 13))
|
||||
|
||||
// destructuring assign with element access
|
||||
({ f: super["x"] } = { f });
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 117, 10))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 117, 30))
|
||||
|
||||
// element access (assign) in arrow
|
||||
(() => super["x"] = f);
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 111, 13))
|
||||
|
||||
// element access (assign) in async arrow
|
||||
(async () => super["x"] = f);
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 111, 13))
|
||||
}
|
||||
|
||||
async * property_access_only_read_only_in_generator() {
|
||||
>property_access_only_read_only_in_generator : Symbol(B.property_access_only_read_only_in_generator, Decl(asyncMethodWithSuper_es6.ts, 124, 5))
|
||||
|
||||
// call with property access
|
||||
super.x();
|
||||
>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
|
||||
// property access (read)
|
||||
const a = super.x;
|
||||
>a : Symbol(a, Decl(asyncMethodWithSuper_es6.ts, 131, 13))
|
||||
>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
|
||||
// property access in arrow
|
||||
(() => super.x());
|
||||
>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
|
||||
// property access in async arrow
|
||||
(async () => super.x());
|
||||
>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
}
|
||||
|
||||
async * property_access_only_write_only_in_generator() {
|
||||
>property_access_only_write_only_in_generator : Symbol(B.property_access_only_write_only_in_generator, Decl(asyncMethodWithSuper_es6.ts, 138, 5))
|
||||
|
||||
const f = () => {};
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 141, 13))
|
||||
|
||||
// property access (assign)
|
||||
super.x = f;
|
||||
>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 141, 13))
|
||||
|
||||
// destructuring assign with property access
|
||||
({ f: super.x } = { f });
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 147, 10))
|
||||
>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 147, 27))
|
||||
|
||||
// property access (assign) in arrow
|
||||
(() => super.x = f);
|
||||
>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 141, 13))
|
||||
|
||||
// property access (assign) in async arrow
|
||||
(async () => super.x = f);
|
||||
>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 141, 13))
|
||||
}
|
||||
|
||||
async * element_access_only_read_only_in_generator() {
|
||||
>element_access_only_read_only_in_generator : Symbol(B.element_access_only_read_only_in_generator, Decl(asyncMethodWithSuper_es6.ts, 154, 5))
|
||||
|
||||
// call with element access
|
||||
super["x"]();
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
|
||||
// element access (read)
|
||||
const a = super["x"];
|
||||
>a : Symbol(a, Decl(asyncMethodWithSuper_es6.ts, 161, 13))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
|
||||
// element access in arrow
|
||||
(() => super["x"]());
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
|
||||
// element access in async arrow
|
||||
(async () => super["x"]());
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
}
|
||||
|
||||
async * element_access_only_write_only_in_generator() {
|
||||
>element_access_only_write_only_in_generator : Symbol(B.element_access_only_write_only_in_generator, Decl(asyncMethodWithSuper_es6.ts, 168, 5))
|
||||
|
||||
const f = () => {};
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 171, 13))
|
||||
|
||||
// element access (assign)
|
||||
super["x"] = f;
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 171, 13))
|
||||
|
||||
// destructuring assign with element access
|
||||
({ f: super["x"] } = { f });
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 177, 10))
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 177, 30))
|
||||
|
||||
// element access (assign) in arrow
|
||||
(() => super["x"] = f);
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 171, 13))
|
||||
|
||||
// element access (assign) in async arrow
|
||||
(async () => super["x"] = f);
|
||||
>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
|
||||
>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
|
||||
>f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 171, 13))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -128,6 +128,378 @@ class B extends A {
|
||||
>super : A
|
||||
>"x" : "x"
|
||||
>{ f } : { f: () => void; }
|
||||
>f : () => void
|
||||
|
||||
// property access in arrow
|
||||
(() => super.x());
|
||||
>(() => super.x()) : () => void
|
||||
>() => super.x() : () => void
|
||||
>super.x() : void
|
||||
>super.x : () => void
|
||||
>super : A
|
||||
>x : () => void
|
||||
|
||||
// element access in arrow
|
||||
(() => super["x"]());
|
||||
>(() => super["x"]()) : () => void
|
||||
>() => super["x"]() : () => void
|
||||
>super["x"]() : void
|
||||
>super["x"] : () => void
|
||||
>super : A
|
||||
>"x" : "x"
|
||||
|
||||
// property access in async arrow
|
||||
(async () => super.x());
|
||||
>(async () => super.x()) : () => Promise<void>
|
||||
>async () => super.x() : () => Promise<void>
|
||||
>super.x() : void
|
||||
>super.x : () => void
|
||||
>super : A
|
||||
>x : () => void
|
||||
|
||||
// element access in async arrow
|
||||
(async () => super["x"]());
|
||||
>(async () => super["x"]()) : () => Promise<void>
|
||||
>async () => super["x"]() : () => Promise<void>
|
||||
>super["x"]() : void
|
||||
>super["x"] : () => void
|
||||
>super : A
|
||||
>"x" : "x"
|
||||
}
|
||||
|
||||
async property_access_only_read_only() {
|
||||
>property_access_only_read_only : () => Promise<void>
|
||||
|
||||
// call with property access
|
||||
super.x();
|
||||
>super.x() : void
|
||||
>super.x : () => void
|
||||
>super : A
|
||||
>x : () => void
|
||||
|
||||
// property access (read)
|
||||
const a = super.x;
|
||||
>a : () => void
|
||||
>super.x : () => void
|
||||
>super : A
|
||||
>x : () => void
|
||||
|
||||
// property access in arrow
|
||||
(() => super.x());
|
||||
>(() => super.x()) : () => void
|
||||
>() => super.x() : () => void
|
||||
>super.x() : void
|
||||
>super.x : () => void
|
||||
>super : A
|
||||
>x : () => void
|
||||
|
||||
// property access in async arrow
|
||||
(async () => super.x());
|
||||
>(async () => super.x()) : () => Promise<void>
|
||||
>async () => super.x() : () => Promise<void>
|
||||
>super.x() : void
|
||||
>super.x : () => void
|
||||
>super : A
|
||||
>x : () => void
|
||||
}
|
||||
|
||||
async property_access_only_write_only() {
|
||||
>property_access_only_write_only : () => Promise<void>
|
||||
|
||||
const f = () => {};
|
||||
>f : () => void
|
||||
>() => {} : () => void
|
||||
|
||||
// property access (assign)
|
||||
super.x = f;
|
||||
>super.x = f : () => void
|
||||
>super.x : () => void
|
||||
>super : A
|
||||
>x : () => void
|
||||
>f : () => void
|
||||
|
||||
// destructuring assign with property access
|
||||
({ f: super.x } = { f });
|
||||
>({ f: super.x } = { f }) : { f: () => void; }
|
||||
>{ f: super.x } = { f } : { f: () => void; }
|
||||
>{ f: super.x } : { f: () => void; }
|
||||
>f : () => void
|
||||
>super.x : () => void
|
||||
>super : A
|
||||
>x : () => void
|
||||
>{ f } : { f: () => void; }
|
||||
>f : () => void
|
||||
|
||||
// property access (assign) in arrow
|
||||
(() => super.x = f);
|
||||
>(() => super.x = f) : () => () => void
|
||||
>() => super.x = f : () => () => void
|
||||
>super.x = f : () => void
|
||||
>super.x : () => void
|
||||
>super : A
|
||||
>x : () => void
|
||||
>f : () => void
|
||||
|
||||
// property access (assign) in async arrow
|
||||
(async () => super.x = f);
|
||||
>(async () => super.x = f) : () => Promise<() => void>
|
||||
>async () => super.x = f : () => Promise<() => void>
|
||||
>super.x = f : () => void
|
||||
>super.x : () => void
|
||||
>super : A
|
||||
>x : () => void
|
||||
>f : () => void
|
||||
}
|
||||
|
||||
async element_access_only_read_only() {
|
||||
>element_access_only_read_only : () => Promise<void>
|
||||
|
||||
// call with element access
|
||||
super["x"]();
|
||||
>super["x"]() : void
|
||||
>super["x"] : () => void
|
||||
>super : A
|
||||
>"x" : "x"
|
||||
|
||||
// element access (read)
|
||||
const a = super["x"];
|
||||
>a : () => void
|
||||
>super["x"] : () => void
|
||||
>super : A
|
||||
>"x" : "x"
|
||||
|
||||
// element access in arrow
|
||||
(() => super["x"]());
|
||||
>(() => super["x"]()) : () => void
|
||||
>() => super["x"]() : () => void
|
||||
>super["x"]() : void
|
||||
>super["x"] : () => void
|
||||
>super : A
|
||||
>"x" : "x"
|
||||
|
||||
// element access in async arrow
|
||||
(async () => super["x"]());
|
||||
>(async () => super["x"]()) : () => Promise<void>
|
||||
>async () => super["x"]() : () => Promise<void>
|
||||
>super["x"]() : void
|
||||
>super["x"] : () => void
|
||||
>super : A
|
||||
>"x" : "x"
|
||||
}
|
||||
|
||||
async element_access_only_write_only() {
|
||||
>element_access_only_write_only : () => Promise<void>
|
||||
|
||||
const f = () => {};
|
||||
>f : () => void
|
||||
>() => {} : () => void
|
||||
|
||||
// element access (assign)
|
||||
super["x"] = f;
|
||||
>super["x"] = f : () => void
|
||||
>super["x"] : () => void
|
||||
>super : A
|
||||
>"x" : "x"
|
||||
>f : () => void
|
||||
|
||||
// destructuring assign with element access
|
||||
({ f: super["x"] } = { f });
|
||||
>({ f: super["x"] } = { f }) : { f: () => void; }
|
||||
>{ f: super["x"] } = { f } : { f: () => void; }
|
||||
>{ f: super["x"] } : { f: () => void; }
|
||||
>f : () => void
|
||||
>super["x"] : () => void
|
||||
>super : A
|
||||
>"x" : "x"
|
||||
>{ f } : { f: () => void; }
|
||||
>f : () => void
|
||||
|
||||
// element access (assign) in arrow
|
||||
(() => super["x"] = f);
|
||||
>(() => super["x"] = f) : () => () => void
|
||||
>() => super["x"] = f : () => () => void
|
||||
>super["x"] = f : () => void
|
||||
>super["x"] : () => void
|
||||
>super : A
|
||||
>"x" : "x"
|
||||
>f : () => void
|
||||
|
||||
// element access (assign) in async arrow
|
||||
(async () => super["x"] = f);
|
||||
>(async () => super["x"] = f) : () => Promise<() => void>
|
||||
>async () => super["x"] = f : () => Promise<() => void>
|
||||
>super["x"] = f : () => void
|
||||
>super["x"] : () => void
|
||||
>super : A
|
||||
>"x" : "x"
|
||||
>f : () => void
|
||||
}
|
||||
|
||||
async * property_access_only_read_only_in_generator() {
|
||||
>property_access_only_read_only_in_generator : () => AsyncIterableIterator<any>
|
||||
|
||||
// call with property access
|
||||
super.x();
|
||||
>super.x() : void
|
||||
>super.x : () => void
|
||||
>super : A
|
||||
>x : () => void
|
||||
|
||||
// property access (read)
|
||||
const a = super.x;
|
||||
>a : () => void
|
||||
>super.x : () => void
|
||||
>super : A
|
||||
>x : () => void
|
||||
|
||||
// property access in arrow
|
||||
(() => super.x());
|
||||
>(() => super.x()) : () => void
|
||||
>() => super.x() : () => void
|
||||
>super.x() : void
|
||||
>super.x : () => void
|
||||
>super : A
|
||||
>x : () => void
|
||||
|
||||
// property access in async arrow
|
||||
(async () => super.x());
|
||||
>(async () => super.x()) : () => Promise<void>
|
||||
>async () => super.x() : () => Promise<void>
|
||||
>super.x() : void
|
||||
>super.x : () => void
|
||||
>super : A
|
||||
>x : () => void
|
||||
}
|
||||
|
||||
async * property_access_only_write_only_in_generator() {
|
||||
>property_access_only_write_only_in_generator : () => AsyncIterableIterator<any>
|
||||
|
||||
const f = () => {};
|
||||
>f : () => void
|
||||
>() => {} : () => void
|
||||
|
||||
// property access (assign)
|
||||
super.x = f;
|
||||
>super.x = f : () => void
|
||||
>super.x : () => void
|
||||
>super : A
|
||||
>x : () => void
|
||||
>f : () => void
|
||||
|
||||
// destructuring assign with property access
|
||||
({ f: super.x } = { f });
|
||||
>({ f: super.x } = { f }) : { f: () => void; }
|
||||
>{ f: super.x } = { f } : { f: () => void; }
|
||||
>{ f: super.x } : { f: () => void; }
|
||||
>f : () => void
|
||||
>super.x : () => void
|
||||
>super : A
|
||||
>x : () => void
|
||||
>{ f } : { f: () => void; }
|
||||
>f : () => void
|
||||
|
||||
// property access (assign) in arrow
|
||||
(() => super.x = f);
|
||||
>(() => super.x = f) : () => () => void
|
||||
>() => super.x = f : () => () => void
|
||||
>super.x = f : () => void
|
||||
>super.x : () => void
|
||||
>super : A
|
||||
>x : () => void
|
||||
>f : () => void
|
||||
|
||||
// property access (assign) in async arrow
|
||||
(async () => super.x = f);
|
||||
>(async () => super.x = f) : () => Promise<() => void>
|
||||
>async () => super.x = f : () => Promise<() => void>
|
||||
>super.x = f : () => void
|
||||
>super.x : () => void
|
||||
>super : A
|
||||
>x : () => void
|
||||
>f : () => void
|
||||
}
|
||||
|
||||
async * element_access_only_read_only_in_generator() {
|
||||
>element_access_only_read_only_in_generator : () => AsyncIterableIterator<any>
|
||||
|
||||
// call with element access
|
||||
super["x"]();
|
||||
>super["x"]() : void
|
||||
>super["x"] : () => void
|
||||
>super : A
|
||||
>"x" : "x"
|
||||
|
||||
// element access (read)
|
||||
const a = super["x"];
|
||||
>a : () => void
|
||||
>super["x"] : () => void
|
||||
>super : A
|
||||
>"x" : "x"
|
||||
|
||||
// element access in arrow
|
||||
(() => super["x"]());
|
||||
>(() => super["x"]()) : () => void
|
||||
>() => super["x"]() : () => void
|
||||
>super["x"]() : void
|
||||
>super["x"] : () => void
|
||||
>super : A
|
||||
>"x" : "x"
|
||||
|
||||
// element access in async arrow
|
||||
(async () => super["x"]());
|
||||
>(async () => super["x"]()) : () => Promise<void>
|
||||
>async () => super["x"]() : () => Promise<void>
|
||||
>super["x"]() : void
|
||||
>super["x"] : () => void
|
||||
>super : A
|
||||
>"x" : "x"
|
||||
}
|
||||
|
||||
async * element_access_only_write_only_in_generator() {
|
||||
>element_access_only_write_only_in_generator : () => AsyncIterableIterator<any>
|
||||
|
||||
const f = () => {};
|
||||
>f : () => void
|
||||
>() => {} : () => void
|
||||
|
||||
// element access (assign)
|
||||
super["x"] = f;
|
||||
>super["x"] = f : () => void
|
||||
>super["x"] : () => void
|
||||
>super : A
|
||||
>"x" : "x"
|
||||
>f : () => void
|
||||
|
||||
// destructuring assign with element access
|
||||
({ f: super["x"] } = { f });
|
||||
>({ f: super["x"] } = { f }) : { f: () => void; }
|
||||
>{ f: super["x"] } = { f } : { f: () => void; }
|
||||
>{ f: super["x"] } : { f: () => void; }
|
||||
>f : () => void
|
||||
>super["x"] : () => void
|
||||
>super : A
|
||||
>"x" : "x"
|
||||
>{ f } : { f: () => void; }
|
||||
>f : () => void
|
||||
|
||||
// element access (assign) in arrow
|
||||
(() => super["x"] = f);
|
||||
>(() => super["x"] = f) : () => () => void
|
||||
>() => super["x"] = f : () => () => void
|
||||
>super["x"] = f : () => void
|
||||
>super["x"] : () => void
|
||||
>super : A
|
||||
>"x" : "x"
|
||||
>f : () => void
|
||||
|
||||
// element access (assign) in async arrow
|
||||
(async () => super["x"] = f);
|
||||
>(async () => super["x"] = f) : () => Promise<() => void>
|
||||
>async () => super["x"] = f : () => Promise<() => void>
|
||||
>super["x"] = f : () => void
|
||||
>super["x"] : () => void
|
||||
>super : A
|
||||
>"x" : "x"
|
||||
>f : () => void
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,13 @@ tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarO
|
||||
tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.ts(5,6): error TS2456: Type alias 'typeAlias2' circularly references itself.
|
||||
tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.ts(7,18): error TS2577: Return type annotation circularly references itself.
|
||||
tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.ts(9,6): error TS2456: Type alias 'typeAlias3' circularly references itself.
|
||||
tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.ts(20,3): error TS2322: Type 'number' is not assignable to type 'ReturnType<(input: Input) => ReturnType<typeof mul>>'.
|
||||
tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.ts(26,20): error TS2322: Type '0' is not assignable to type 'ReturnType<() => ReturnType<typeof f>>'.
|
||||
tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.ts(18,6): error TS2456: Type alias 'R' circularly references itself.
|
||||
tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.ts(19,29): error TS2577: Return type annotation circularly references itself.
|
||||
tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.ts(25,6): error TS2456: Type alias 'R2' circularly references itself.
|
||||
tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.ts(26,15): error TS2577: Return type annotation circularly references itself.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.ts (8 errors) ====
|
||||
==== tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.ts (10 errors) ====
|
||||
type typeAlias1 = typeof varOfAliasedType1;
|
||||
~~~~~~~~~~
|
||||
!!! error TS2456: Type alias 'typeAlias1' circularly references itself.
|
||||
@@ -39,16 +41,20 @@ tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarO
|
||||
}
|
||||
|
||||
type R = ReturnType<typeof mul>;
|
||||
~
|
||||
!!! error TS2456: Type alias 'R' circularly references itself.
|
||||
function mul(input: Input): R {
|
||||
~
|
||||
!!! error TS2577: Return type annotation circularly references itself.
|
||||
return input.a * input.b;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'ReturnType<(input: Input) => ReturnType<typeof mul>>'.
|
||||
}
|
||||
|
||||
// Repro from #26104
|
||||
|
||||
type R2 = ReturnType<typeof f>;
|
||||
~~
|
||||
!!! error TS2456: Type alias 'R2' circularly references itself.
|
||||
function f(): R2 { return 0; }
|
||||
~~~~~~~~~
|
||||
!!! error TS2322: Type '0' is not assignable to type 'ReturnType<() => ReturnType<typeof f>>'.
|
||||
~~
|
||||
!!! error TS2577: Return type annotation circularly references itself.
|
||||
|
||||
@@ -37,11 +37,11 @@ interface Input {
|
||||
}
|
||||
|
||||
type R = ReturnType<typeof mul>;
|
||||
>R : ReturnType<(input: Input) => ReturnType<typeof mul>>
|
||||
>mul : (input: Input) => ReturnType<typeof mul>
|
||||
>R : any
|
||||
>mul : (input: Input) => any
|
||||
|
||||
function mul(input: Input): R {
|
||||
>mul : (input: Input) => ReturnType<typeof mul>
|
||||
>mul : (input: Input) => any
|
||||
>input : Input
|
||||
|
||||
return input.a * input.b;
|
||||
@@ -57,10 +57,10 @@ function mul(input: Input): R {
|
||||
// Repro from #26104
|
||||
|
||||
type R2 = ReturnType<typeof f>;
|
||||
>R2 : ReturnType<() => ReturnType<typeof f>>
|
||||
>f : () => ReturnType<typeof f>
|
||||
>R2 : any
|
||||
>f : () => any
|
||||
|
||||
function f(): R2 { return 0; }
|
||||
>f : () => ReturnType<typeof f>
|
||||
>f : () => any
|
||||
>0 : 0
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
//// [contravariantInferenceAndTypeGuard.ts]
|
||||
interface ListItem<TData> {
|
||||
prev: ListItem<TData> | null;
|
||||
next: ListItem<TData> | null;
|
||||
data: TData;
|
||||
}
|
||||
type IteratorFn<TData, TResult, TContext = List<TData>> = (this: TContext, item: TData, node: ListItem<TData>, list: List<TData>) => TResult;
|
||||
type FilterFn<TData, TResult extends TData, TContext = List<TData>> = (this: TContext, item: TData, node: ListItem<TData>, list: List<TData>) => item is TResult;
|
||||
|
||||
declare class List<TData> {
|
||||
filter<TContext, TResult extends TData>(fn: FilterFn<TData, TResult, TContext>, context: TContext): List<TResult>;
|
||||
filter<TResult extends TData>(fn: FilterFn<TData, TResult>): List<TResult>;
|
||||
filter<TContext>(fn: IteratorFn<TData, boolean, TContext>, context: TContext): List<TData>;
|
||||
filter(fn: IteratorFn<TData, boolean>): List<TData>;
|
||||
}
|
||||
interface Test {
|
||||
a: string;
|
||||
}
|
||||
const list2 = new List<Test | null>();
|
||||
const filter1 = list2.filter(function(item, node, list): item is Test {
|
||||
this.b; // $ExpectType string
|
||||
item; // $ExpectType Test | null
|
||||
node; // $ExpectType ListItem<Test | null>
|
||||
list; // $ExpectType List<Test | null>
|
||||
return !!item;
|
||||
}, {b: 'c'});
|
||||
const x: List<Test> = filter1; // $ExpectType List<Test>
|
||||
|
||||
|
||||
//// [contravariantInferenceAndTypeGuard.js]
|
||||
"use strict";
|
||||
var list2 = new List();
|
||||
var filter1 = list2.filter(function (item, node, list) {
|
||||
this.b; // $ExpectType string
|
||||
item; // $ExpectType Test | null
|
||||
node; // $ExpectType ListItem<Test | null>
|
||||
list; // $ExpectType List<Test | null>
|
||||
return !!item;
|
||||
}, { b: 'c' });
|
||||
var x = filter1; // $ExpectType List<Test>
|
||||
@@ -0,0 +1,157 @@
|
||||
=== tests/cases/compiler/contravariantInferenceAndTypeGuard.ts ===
|
||||
interface ListItem<TData> {
|
||||
>ListItem : Symbol(ListItem, Decl(contravariantInferenceAndTypeGuard.ts, 0, 0))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 0, 19))
|
||||
|
||||
prev: ListItem<TData> | null;
|
||||
>prev : Symbol(ListItem.prev, Decl(contravariantInferenceAndTypeGuard.ts, 0, 27))
|
||||
>ListItem : Symbol(ListItem, Decl(contravariantInferenceAndTypeGuard.ts, 0, 0))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 0, 19))
|
||||
|
||||
next: ListItem<TData> | null;
|
||||
>next : Symbol(ListItem.next, Decl(contravariantInferenceAndTypeGuard.ts, 1, 33))
|
||||
>ListItem : Symbol(ListItem, Decl(contravariantInferenceAndTypeGuard.ts, 0, 0))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 0, 19))
|
||||
|
||||
data: TData;
|
||||
>data : Symbol(ListItem.data, Decl(contravariantInferenceAndTypeGuard.ts, 2, 33))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 0, 19))
|
||||
}
|
||||
type IteratorFn<TData, TResult, TContext = List<TData>> = (this: TContext, item: TData, node: ListItem<TData>, list: List<TData>) => TResult;
|
||||
>IteratorFn : Symbol(IteratorFn, Decl(contravariantInferenceAndTypeGuard.ts, 4, 1))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 5, 16))
|
||||
>TResult : Symbol(TResult, Decl(contravariantInferenceAndTypeGuard.ts, 5, 22))
|
||||
>TContext : Symbol(TContext, Decl(contravariantInferenceAndTypeGuard.ts, 5, 31))
|
||||
>List : Symbol(List, Decl(contravariantInferenceAndTypeGuard.ts, 6, 161))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 5, 16))
|
||||
>this : Symbol(this, Decl(contravariantInferenceAndTypeGuard.ts, 5, 59))
|
||||
>TContext : Symbol(TContext, Decl(contravariantInferenceAndTypeGuard.ts, 5, 31))
|
||||
>item : Symbol(item, Decl(contravariantInferenceAndTypeGuard.ts, 5, 74))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 5, 16))
|
||||
>node : Symbol(node, Decl(contravariantInferenceAndTypeGuard.ts, 5, 87))
|
||||
>ListItem : Symbol(ListItem, Decl(contravariantInferenceAndTypeGuard.ts, 0, 0))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 5, 16))
|
||||
>list : Symbol(list, Decl(contravariantInferenceAndTypeGuard.ts, 5, 110))
|
||||
>List : Symbol(List, Decl(contravariantInferenceAndTypeGuard.ts, 6, 161))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 5, 16))
|
||||
>TResult : Symbol(TResult, Decl(contravariantInferenceAndTypeGuard.ts, 5, 22))
|
||||
|
||||
type FilterFn<TData, TResult extends TData, TContext = List<TData>> = (this: TContext, item: TData, node: ListItem<TData>, list: List<TData>) => item is TResult;
|
||||
>FilterFn : Symbol(FilterFn, Decl(contravariantInferenceAndTypeGuard.ts, 5, 141))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 6, 14))
|
||||
>TResult : Symbol(TResult, Decl(contravariantInferenceAndTypeGuard.ts, 6, 20))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 6, 14))
|
||||
>TContext : Symbol(TContext, Decl(contravariantInferenceAndTypeGuard.ts, 6, 43))
|
||||
>List : Symbol(List, Decl(contravariantInferenceAndTypeGuard.ts, 6, 161))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 6, 14))
|
||||
>this : Symbol(this, Decl(contravariantInferenceAndTypeGuard.ts, 6, 71))
|
||||
>TContext : Symbol(TContext, Decl(contravariantInferenceAndTypeGuard.ts, 6, 43))
|
||||
>item : Symbol(item, Decl(contravariantInferenceAndTypeGuard.ts, 6, 86))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 6, 14))
|
||||
>node : Symbol(node, Decl(contravariantInferenceAndTypeGuard.ts, 6, 99))
|
||||
>ListItem : Symbol(ListItem, Decl(contravariantInferenceAndTypeGuard.ts, 0, 0))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 6, 14))
|
||||
>list : Symbol(list, Decl(contravariantInferenceAndTypeGuard.ts, 6, 122))
|
||||
>List : Symbol(List, Decl(contravariantInferenceAndTypeGuard.ts, 6, 161))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 6, 14))
|
||||
>item : Symbol(item, Decl(contravariantInferenceAndTypeGuard.ts, 6, 86))
|
||||
>TResult : Symbol(TResult, Decl(contravariantInferenceAndTypeGuard.ts, 6, 20))
|
||||
|
||||
declare class List<TData> {
|
||||
>List : Symbol(List, Decl(contravariantInferenceAndTypeGuard.ts, 6, 161))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 8, 19))
|
||||
|
||||
filter<TContext, TResult extends TData>(fn: FilterFn<TData, TResult, TContext>, context: TContext): List<TResult>;
|
||||
>filter : Symbol(List.filter, Decl(contravariantInferenceAndTypeGuard.ts, 8, 27), Decl(contravariantInferenceAndTypeGuard.ts, 9, 118), Decl(contravariantInferenceAndTypeGuard.ts, 10, 79), Decl(contravariantInferenceAndTypeGuard.ts, 11, 95))
|
||||
>TContext : Symbol(TContext, Decl(contravariantInferenceAndTypeGuard.ts, 9, 11))
|
||||
>TResult : Symbol(TResult, Decl(contravariantInferenceAndTypeGuard.ts, 9, 20))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 8, 19))
|
||||
>fn : Symbol(fn, Decl(contravariantInferenceAndTypeGuard.ts, 9, 44))
|
||||
>FilterFn : Symbol(FilterFn, Decl(contravariantInferenceAndTypeGuard.ts, 5, 141))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 8, 19))
|
||||
>TResult : Symbol(TResult, Decl(contravariantInferenceAndTypeGuard.ts, 9, 20))
|
||||
>TContext : Symbol(TContext, Decl(contravariantInferenceAndTypeGuard.ts, 9, 11))
|
||||
>context : Symbol(context, Decl(contravariantInferenceAndTypeGuard.ts, 9, 83))
|
||||
>TContext : Symbol(TContext, Decl(contravariantInferenceAndTypeGuard.ts, 9, 11))
|
||||
>List : Symbol(List, Decl(contravariantInferenceAndTypeGuard.ts, 6, 161))
|
||||
>TResult : Symbol(TResult, Decl(contravariantInferenceAndTypeGuard.ts, 9, 20))
|
||||
|
||||
filter<TResult extends TData>(fn: FilterFn<TData, TResult>): List<TResult>;
|
||||
>filter : Symbol(List.filter, Decl(contravariantInferenceAndTypeGuard.ts, 8, 27), Decl(contravariantInferenceAndTypeGuard.ts, 9, 118), Decl(contravariantInferenceAndTypeGuard.ts, 10, 79), Decl(contravariantInferenceAndTypeGuard.ts, 11, 95))
|
||||
>TResult : Symbol(TResult, Decl(contravariantInferenceAndTypeGuard.ts, 10, 11))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 8, 19))
|
||||
>fn : Symbol(fn, Decl(contravariantInferenceAndTypeGuard.ts, 10, 34))
|
||||
>FilterFn : Symbol(FilterFn, Decl(contravariantInferenceAndTypeGuard.ts, 5, 141))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 8, 19))
|
||||
>TResult : Symbol(TResult, Decl(contravariantInferenceAndTypeGuard.ts, 10, 11))
|
||||
>List : Symbol(List, Decl(contravariantInferenceAndTypeGuard.ts, 6, 161))
|
||||
>TResult : Symbol(TResult, Decl(contravariantInferenceAndTypeGuard.ts, 10, 11))
|
||||
|
||||
filter<TContext>(fn: IteratorFn<TData, boolean, TContext>, context: TContext): List<TData>;
|
||||
>filter : Symbol(List.filter, Decl(contravariantInferenceAndTypeGuard.ts, 8, 27), Decl(contravariantInferenceAndTypeGuard.ts, 9, 118), Decl(contravariantInferenceAndTypeGuard.ts, 10, 79), Decl(contravariantInferenceAndTypeGuard.ts, 11, 95))
|
||||
>TContext : Symbol(TContext, Decl(contravariantInferenceAndTypeGuard.ts, 11, 11))
|
||||
>fn : Symbol(fn, Decl(contravariantInferenceAndTypeGuard.ts, 11, 21))
|
||||
>IteratorFn : Symbol(IteratorFn, Decl(contravariantInferenceAndTypeGuard.ts, 4, 1))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 8, 19))
|
||||
>TContext : Symbol(TContext, Decl(contravariantInferenceAndTypeGuard.ts, 11, 11))
|
||||
>context : Symbol(context, Decl(contravariantInferenceAndTypeGuard.ts, 11, 62))
|
||||
>TContext : Symbol(TContext, Decl(contravariantInferenceAndTypeGuard.ts, 11, 11))
|
||||
>List : Symbol(List, Decl(contravariantInferenceAndTypeGuard.ts, 6, 161))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 8, 19))
|
||||
|
||||
filter(fn: IteratorFn<TData, boolean>): List<TData>;
|
||||
>filter : Symbol(List.filter, Decl(contravariantInferenceAndTypeGuard.ts, 8, 27), Decl(contravariantInferenceAndTypeGuard.ts, 9, 118), Decl(contravariantInferenceAndTypeGuard.ts, 10, 79), Decl(contravariantInferenceAndTypeGuard.ts, 11, 95))
|
||||
>fn : Symbol(fn, Decl(contravariantInferenceAndTypeGuard.ts, 12, 11))
|
||||
>IteratorFn : Symbol(IteratorFn, Decl(contravariantInferenceAndTypeGuard.ts, 4, 1))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 8, 19))
|
||||
>List : Symbol(List, Decl(contravariantInferenceAndTypeGuard.ts, 6, 161))
|
||||
>TData : Symbol(TData, Decl(contravariantInferenceAndTypeGuard.ts, 8, 19))
|
||||
}
|
||||
interface Test {
|
||||
>Test : Symbol(Test, Decl(contravariantInferenceAndTypeGuard.ts, 13, 1))
|
||||
|
||||
a: string;
|
||||
>a : Symbol(Test.a, Decl(contravariantInferenceAndTypeGuard.ts, 14, 16))
|
||||
}
|
||||
const list2 = new List<Test | null>();
|
||||
>list2 : Symbol(list2, Decl(contravariantInferenceAndTypeGuard.ts, 17, 5))
|
||||
>List : Symbol(List, Decl(contravariantInferenceAndTypeGuard.ts, 6, 161))
|
||||
>Test : Symbol(Test, Decl(contravariantInferenceAndTypeGuard.ts, 13, 1))
|
||||
|
||||
const filter1 = list2.filter(function(item, node, list): item is Test {
|
||||
>filter1 : Symbol(filter1, Decl(contravariantInferenceAndTypeGuard.ts, 18, 5))
|
||||
>list2.filter : Symbol(List.filter, Decl(contravariantInferenceAndTypeGuard.ts, 8, 27), Decl(contravariantInferenceAndTypeGuard.ts, 9, 118), Decl(contravariantInferenceAndTypeGuard.ts, 10, 79), Decl(contravariantInferenceAndTypeGuard.ts, 11, 95))
|
||||
>list2 : Symbol(list2, Decl(contravariantInferenceAndTypeGuard.ts, 17, 5))
|
||||
>filter : Symbol(List.filter, Decl(contravariantInferenceAndTypeGuard.ts, 8, 27), Decl(contravariantInferenceAndTypeGuard.ts, 9, 118), Decl(contravariantInferenceAndTypeGuard.ts, 10, 79), Decl(contravariantInferenceAndTypeGuard.ts, 11, 95))
|
||||
>item : Symbol(item, Decl(contravariantInferenceAndTypeGuard.ts, 18, 38))
|
||||
>node : Symbol(node, Decl(contravariantInferenceAndTypeGuard.ts, 18, 43))
|
||||
>list : Symbol(list, Decl(contravariantInferenceAndTypeGuard.ts, 18, 49))
|
||||
>item : Symbol(item, Decl(contravariantInferenceAndTypeGuard.ts, 18, 38))
|
||||
>Test : Symbol(Test, Decl(contravariantInferenceAndTypeGuard.ts, 13, 1))
|
||||
|
||||
this.b; // $ExpectType string
|
||||
>this.b : Symbol(b, Decl(contravariantInferenceAndTypeGuard.ts, 24, 4))
|
||||
>this : Symbol(this, Decl(contravariantInferenceAndTypeGuard.ts, 6, 71))
|
||||
>b : Symbol(b, Decl(contravariantInferenceAndTypeGuard.ts, 24, 4))
|
||||
|
||||
item; // $ExpectType Test | null
|
||||
>item : Symbol(item, Decl(contravariantInferenceAndTypeGuard.ts, 18, 38))
|
||||
|
||||
node; // $ExpectType ListItem<Test | null>
|
||||
>node : Symbol(node, Decl(contravariantInferenceAndTypeGuard.ts, 18, 43))
|
||||
|
||||
list; // $ExpectType List<Test | null>
|
||||
>list : Symbol(list, Decl(contravariantInferenceAndTypeGuard.ts, 18, 49))
|
||||
|
||||
return !!item;
|
||||
>item : Symbol(item, Decl(contravariantInferenceAndTypeGuard.ts, 18, 38))
|
||||
|
||||
}, {b: 'c'});
|
||||
>b : Symbol(b, Decl(contravariantInferenceAndTypeGuard.ts, 24, 4))
|
||||
|
||||
const x: List<Test> = filter1; // $ExpectType List<Test>
|
||||
>x : Symbol(x, Decl(contravariantInferenceAndTypeGuard.ts, 25, 5))
|
||||
>List : Symbol(List, Decl(contravariantInferenceAndTypeGuard.ts, 6, 161))
|
||||
>Test : Symbol(Test, Decl(contravariantInferenceAndTypeGuard.ts, 13, 1))
|
||||
>filter1 : Symbol(filter1, Decl(contravariantInferenceAndTypeGuard.ts, 18, 5))
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
=== tests/cases/compiler/contravariantInferenceAndTypeGuard.ts ===
|
||||
interface ListItem<TData> {
|
||||
prev: ListItem<TData> | null;
|
||||
>prev : ListItem<TData> | null
|
||||
>null : null
|
||||
|
||||
next: ListItem<TData> | null;
|
||||
>next : ListItem<TData> | null
|
||||
>null : null
|
||||
|
||||
data: TData;
|
||||
>data : TData
|
||||
}
|
||||
type IteratorFn<TData, TResult, TContext = List<TData>> = (this: TContext, item: TData, node: ListItem<TData>, list: List<TData>) => TResult;
|
||||
>IteratorFn : IteratorFn<TData, TResult, TContext>
|
||||
>this : TContext
|
||||
>item : TData
|
||||
>node : ListItem<TData>
|
||||
>list : List<TData>
|
||||
|
||||
type FilterFn<TData, TResult extends TData, TContext = List<TData>> = (this: TContext, item: TData, node: ListItem<TData>, list: List<TData>) => item is TResult;
|
||||
>FilterFn : FilterFn<TData, TResult, TContext>
|
||||
>this : TContext
|
||||
>item : TData
|
||||
>node : ListItem<TData>
|
||||
>list : List<TData>
|
||||
|
||||
declare class List<TData> {
|
||||
>List : List<TData>
|
||||
|
||||
filter<TContext, TResult extends TData>(fn: FilterFn<TData, TResult, TContext>, context: TContext): List<TResult>;
|
||||
>filter : { <TContext, TResult extends TData>(fn: FilterFn<TData, TResult, TContext>, context: TContext): List<TResult>; <TResult extends TData>(fn: FilterFn<TData, TResult, List<TData>>): List<TResult>; <TContext>(fn: IteratorFn<TData, boolean, TContext>, context: TContext): List<TData>; (fn: IteratorFn<TData, boolean, List<TData>>): List<TData>; }
|
||||
>fn : FilterFn<TData, TResult, TContext>
|
||||
>context : TContext
|
||||
|
||||
filter<TResult extends TData>(fn: FilterFn<TData, TResult>): List<TResult>;
|
||||
>filter : { <TContext, TResult extends TData>(fn: FilterFn<TData, TResult, TContext>, context: TContext): List<TResult>; <TResult extends TData>(fn: FilterFn<TData, TResult, List<TData>>): List<TResult>; <TContext>(fn: IteratorFn<TData, boolean, TContext>, context: TContext): List<TData>; (fn: IteratorFn<TData, boolean, List<TData>>): List<TData>; }
|
||||
>fn : FilterFn<TData, TResult, List<TData>>
|
||||
|
||||
filter<TContext>(fn: IteratorFn<TData, boolean, TContext>, context: TContext): List<TData>;
|
||||
>filter : { <TContext, TResult extends TData>(fn: FilterFn<TData, TResult, TContext>, context: TContext): List<TResult>; <TResult extends TData>(fn: FilterFn<TData, TResult, List<TData>>): List<TResult>; <TContext>(fn: IteratorFn<TData, boolean, TContext>, context: TContext): List<TData>; (fn: IteratorFn<TData, boolean, List<TData>>): List<TData>; }
|
||||
>fn : IteratorFn<TData, boolean, TContext>
|
||||
>context : TContext
|
||||
|
||||
filter(fn: IteratorFn<TData, boolean>): List<TData>;
|
||||
>filter : { <TContext, TResult extends TData>(fn: FilterFn<TData, TResult, TContext>, context: TContext): List<TResult>; <TResult extends TData>(fn: FilterFn<TData, TResult, List<TData>>): List<TResult>; <TContext>(fn: IteratorFn<TData, boolean, TContext>, context: TContext): List<TData>; (fn: IteratorFn<TData, boolean, List<TData>>): List<TData>; }
|
||||
>fn : IteratorFn<TData, boolean, List<TData>>
|
||||
}
|
||||
interface Test {
|
||||
a: string;
|
||||
>a : string
|
||||
}
|
||||
const list2 = new List<Test | null>();
|
||||
>list2 : List<Test | null>
|
||||
>new List<Test | null>() : List<Test | null>
|
||||
>List : typeof List
|
||||
>null : null
|
||||
|
||||
const filter1 = list2.filter(function(item, node, list): item is Test {
|
||||
>filter1 : List<Test>
|
||||
>list2.filter(function(item, node, list): item is Test { this.b; // $ExpectType string item; // $ExpectType Test | null node; // $ExpectType ListItem<Test | null> list; // $ExpectType List<Test | null> return !!item;}, {b: 'c'}) : List<Test>
|
||||
>list2.filter : { <TContext, TResult extends Test | null>(fn: FilterFn<Test | null, TResult, TContext>, context: TContext): List<TResult>; <TResult extends Test | null>(fn: FilterFn<Test | null, TResult, List<Test | null>>): List<TResult>; <TContext>(fn: IteratorFn<Test | null, boolean, TContext>, context: TContext): List<Test | null>; (fn: IteratorFn<Test | null, boolean, List<Test | null>>): List<Test | null>; }
|
||||
>list2 : List<Test | null>
|
||||
>filter : { <TContext, TResult extends Test | null>(fn: FilterFn<Test | null, TResult, TContext>, context: TContext): List<TResult>; <TResult extends Test | null>(fn: FilterFn<Test | null, TResult, List<Test | null>>): List<TResult>; <TContext>(fn: IteratorFn<Test | null, boolean, TContext>, context: TContext): List<Test | null>; (fn: IteratorFn<Test | null, boolean, List<Test | null>>): List<Test | null>; }
|
||||
>function(item, node, list): item is Test { this.b; // $ExpectType string item; // $ExpectType Test | null node; // $ExpectType ListItem<Test | null> list; // $ExpectType List<Test | null> return !!item;} : (this: { b: string; }, item: Test | null, node: ListItem<Test | null>, list: List<Test | null>) => item is Test
|
||||
>item : Test | null
|
||||
>node : ListItem<Test | null>
|
||||
>list : List<Test | null>
|
||||
|
||||
this.b; // $ExpectType string
|
||||
>this.b : string
|
||||
>this : { b: string; }
|
||||
>b : string
|
||||
|
||||
item; // $ExpectType Test | null
|
||||
>item : Test | null
|
||||
|
||||
node; // $ExpectType ListItem<Test | null>
|
||||
>node : ListItem<Test | null>
|
||||
|
||||
list; // $ExpectType List<Test | null>
|
||||
>list : List<Test | null>
|
||||
|
||||
return !!item;
|
||||
>!!item : boolean
|
||||
>!item : boolean
|
||||
>item : Test | null
|
||||
|
||||
}, {b: 'c'});
|
||||
>{b: 'c'} : { b: string; }
|
||||
>b : string
|
||||
>'c' : "c"
|
||||
|
||||
const x: List<Test> = filter1; // $ExpectType List<Test>
|
||||
>x : List<Test>
|
||||
>filter1 : List<Test>
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
//// [decoratorReferences.ts]
|
||||
declare function y(...args: any[]): any;
|
||||
type T = number;
|
||||
@y(1 as T, C) // <-- T should be resolved to the type alias, not the type parameter of the class; C should resolve to the class
|
||||
class C<T> {
|
||||
@y(null as T) // <-- y should resolve to the function declaration, not the parameter; T should resolve to the type parameter of the class
|
||||
method(@y x, y) {} // <-- decorator y should be resolved at the class declaration, not the parameter.
|
||||
}
|
||||
|
||||
//// [decoratorReferences.js]
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
};
|
||||
var C = /** @class */ (function () {
|
||||
function C() {
|
||||
}
|
||||
C_1 = C;
|
||||
C.prototype.method = function (x, y) { }; // <-- decorator y should be resolved at the class declaration, not the parameter.
|
||||
var C_1;
|
||||
__decorate([
|
||||
y(null) // <-- y should resolve to the function declaration, not the parameter; T should resolve to the type parameter of the class
|
||||
,
|
||||
__param(0, y)
|
||||
], C.prototype, "method");
|
||||
C = C_1 = __decorate([
|
||||
y(1, C_1) // <-- T should be resolved to the type alias, not the type parameter of the class; C should resolve to the class
|
||||
], C);
|
||||
return C;
|
||||
}());
|
||||
@@ -0,0 +1,27 @@
|
||||
=== tests/cases/compiler/decoratorReferences.ts ===
|
||||
declare function y(...args: any[]): any;
|
||||
>y : Symbol(y, Decl(decoratorReferences.ts, 0, 0))
|
||||
>args : Symbol(args, Decl(decoratorReferences.ts, 0, 19))
|
||||
|
||||
type T = number;
|
||||
>T : Symbol(T, Decl(decoratorReferences.ts, 0, 40))
|
||||
|
||||
@y(1 as T, C) // <-- T should be resolved to the type alias, not the type parameter of the class; C should resolve to the class
|
||||
>y : Symbol(y, Decl(decoratorReferences.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(decoratorReferences.ts, 0, 40))
|
||||
>C : Symbol(C, Decl(decoratorReferences.ts, 1, 16))
|
||||
|
||||
class C<T> {
|
||||
>C : Symbol(C, Decl(decoratorReferences.ts, 1, 16))
|
||||
>T : Symbol(T, Decl(decoratorReferences.ts, 3, 8))
|
||||
|
||||
@y(null as T) // <-- y should resolve to the function declaration, not the parameter; T should resolve to the type parameter of the class
|
||||
>y : Symbol(y, Decl(decoratorReferences.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(decoratorReferences.ts, 3, 8))
|
||||
|
||||
method(@y x, y) {} // <-- decorator y should be resolved at the class declaration, not the parameter.
|
||||
>method : Symbol(C.method, Decl(decoratorReferences.ts, 3, 12))
|
||||
>y : Symbol(y, Decl(decoratorReferences.ts, 0, 0))
|
||||
>x : Symbol(x, Decl(decoratorReferences.ts, 5, 11))
|
||||
>y : Symbol(y, Decl(decoratorReferences.ts, 5, 16))
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
=== tests/cases/compiler/decoratorReferences.ts ===
|
||||
declare function y(...args: any[]): any;
|
||||
>y : (...args: any[]) => any
|
||||
>args : any[]
|
||||
|
||||
type T = number;
|
||||
>T : number
|
||||
|
||||
@y(1 as T, C) // <-- T should be resolved to the type alias, not the type parameter of the class; C should resolve to the class
|
||||
>y(1 as T, C) : any
|
||||
>y : (...args: any[]) => any
|
||||
>1 as T : number
|
||||
>1 : 1
|
||||
>C : typeof C
|
||||
|
||||
class C<T> {
|
||||
>C : C<T>
|
||||
|
||||
@y(null as T) // <-- y should resolve to the function declaration, not the parameter; T should resolve to the type parameter of the class
|
||||
>y(null as T) : any
|
||||
>y : (...args: any[]) => any
|
||||
>null as T : T
|
||||
>null : null
|
||||
|
||||
method(@y x, y) {} // <-- decorator y should be resolved at the class declaration, not the parameter.
|
||||
>method : (x: any, y: any) => void
|
||||
>y : (...args: any[]) => any
|
||||
>x : any
|
||||
>y : any
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
//// [tests/cases/compiler/extendGlobalThis.ts] ////
|
||||
|
||||
//// [extension.d.ts]
|
||||
declare global {
|
||||
namespace globalThis {
|
||||
var test: string;
|
||||
}
|
||||
}
|
||||
|
||||
export {}
|
||||
|
||||
//// [index.ts]
|
||||
import "./extention";
|
||||
|
||||
globalThis.tests = "a-b";
|
||||
console.log(globalThis.test.split("-"));
|
||||
|
||||
|
||||
//// [index.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
require("./extention");
|
||||
globalThis.tests = "a-b";
|
||||
console.log(globalThis.test.split("-"));
|
||||
@@ -0,0 +1,30 @@
|
||||
=== tests/cases/compiler/extension.d.ts ===
|
||||
declare global {
|
||||
>global : Symbol(global, Decl(extension.d.ts, 0, 0))
|
||||
|
||||
namespace globalThis {
|
||||
>globalThis : Symbol(globalThis)
|
||||
|
||||
var test: string;
|
||||
>test : Symbol(test, Decl(extension.d.ts, 2, 11))
|
||||
}
|
||||
}
|
||||
|
||||
export {}
|
||||
|
||||
=== tests/cases/compiler/index.ts ===
|
||||
import "./extention";
|
||||
|
||||
globalThis.tests = "a-b";
|
||||
>globalThis : Symbol(globalThis)
|
||||
|
||||
console.log(globalThis.test.split("-"));
|
||||
>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
|
||||
>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
|
||||
>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
|
||||
>globalThis.test.split : Symbol(String.split, Decl(lib.es5.d.ts, --, --))
|
||||
>globalThis.test : Symbol(test, Decl(extension.d.ts, 2, 11))
|
||||
>globalThis : Symbol(globalThis)
|
||||
>test : Symbol(test, Decl(extension.d.ts, 2, 11))
|
||||
>split : Symbol(String.split, Decl(lib.es5.d.ts, --, --))
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
=== tests/cases/compiler/extension.d.ts ===
|
||||
declare global {
|
||||
>global : typeof global
|
||||
|
||||
namespace globalThis {
|
||||
>globalThis : typeof globalThis
|
||||
|
||||
var test: string;
|
||||
>test : string
|
||||
}
|
||||
}
|
||||
|
||||
export {}
|
||||
|
||||
=== tests/cases/compiler/index.ts ===
|
||||
import "./extention";
|
||||
|
||||
globalThis.tests = "a-b";
|
||||
>globalThis.tests = "a-b" : "a-b"
|
||||
>globalThis.tests : any
|
||||
>globalThis : typeof globalThis
|
||||
>tests : any
|
||||
>"a-b" : "a-b"
|
||||
|
||||
console.log(globalThis.test.split("-"));
|
||||
>console.log(globalThis.test.split("-")) : void
|
||||
>console.log : (message?: any, ...optionalParams: any[]) => void
|
||||
>console : Console
|
||||
>log : (message?: any, ...optionalParams: any[]) => void
|
||||
>globalThis.test.split("-") : string[]
|
||||
>globalThis.test.split : (separator: string | RegExp, limit?: number) => string[]
|
||||
>globalThis.test : string
|
||||
>globalThis : typeof globalThis
|
||||
>test : string
|
||||
>split : (separator: string | RegExp, limit?: number) => string[]
|
||||
>"-" : "-"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/genericFunctionInference1.ts(83,14): error TS2345: Argument of type '<a>(value: { key: a; }) => a' is not assignable to parameter of type '(value: Data) => string'.
|
||||
tests/cases/compiler/genericFunctionInference1.ts(88,14): error TS2345: Argument of type '<a>(value: { key: a; }) => a' is not assignable to parameter of type '(value: Data) => string'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -62,6 +62,11 @@ tests/cases/compiler/genericFunctionInference1.ts(83,14): error TS2345: Argument
|
||||
|
||||
const f50 = pipe5(list); // No higher order inference
|
||||
|
||||
declare function wrap3<A, B, C>(f: (a: A, b1: B, b2: B) => C): (a: A, b1: B, b2: B) => C;
|
||||
declare function baz<T, U extends T>(t1: T, t2: T, u: U): [T, U];
|
||||
|
||||
let f60 = wrap3(baz);
|
||||
|
||||
// #417
|
||||
|
||||
function mirror<A, B>(f: (a: A) => B): (a: A) => B { return f; }
|
||||
@@ -198,4 +203,9 @@ tests/cases/compiler/genericFunctionInference1.ts(83,14): error TS2345: Argument
|
||||
foo2(() => {});
|
||||
foo2(identity);
|
||||
foo2(identity, 1);
|
||||
|
||||
// Repro from #30324
|
||||
|
||||
declare function times<T>(fn: (i: number) => T): (n: number) => T[];
|
||||
const a2 = times(identity)(5); // => [0, 1, 2, 3, 4]
|
||||
|
||||
@@ -58,6 +58,11 @@ declare function pipe5<A, B>(f: (a: A) => B): { f: (a: A) => B };
|
||||
|
||||
const f50 = pipe5(list); // No higher order inference
|
||||
|
||||
declare function wrap3<A, B, C>(f: (a: A, b1: B, b2: B) => C): (a: A, b1: B, b2: B) => C;
|
||||
declare function baz<T, U extends T>(t1: T, t2: T, u: U): [T, U];
|
||||
|
||||
let f60 = wrap3(baz);
|
||||
|
||||
// #417
|
||||
|
||||
function mirror<A, B>(f: (a: A) => B): (a: A) => B { return f; }
|
||||
@@ -191,6 +196,11 @@ declare function foo2<T, U = T>(fn: T, a?: U, b?: U): [T, U];
|
||||
foo2(() => {});
|
||||
foo2(identity);
|
||||
foo2(identity, 1);
|
||||
|
||||
// Repro from #30324
|
||||
|
||||
declare function times<T>(fn: (i: number) => T): (n: number) => T[];
|
||||
const a2 = times(identity)(5); // => [0, 1, 2, 3, 4]
|
||||
|
||||
|
||||
//// [genericFunctionInference1.js]
|
||||
@@ -231,6 +241,7 @@ const f32 = pipe3(list, list);
|
||||
const f40 = pipe4([list, box]);
|
||||
const f41 = pipe4([box, list]);
|
||||
const f50 = pipe5(list); // No higher order inference
|
||||
let f60 = wrap3(baz);
|
||||
// #417
|
||||
function mirror(f) { return f; }
|
||||
var identityM = mirror(identity);
|
||||
@@ -276,3 +287,4 @@ const fn62 = pipe(getArray, x => x, x => first(x));
|
||||
foo2(() => { });
|
||||
foo2(identity);
|
||||
foo2(identity, 1);
|
||||
const a2 = times(identity)(5); // => [0, 1, 2, 3, 4]
|
||||
|
||||
@@ -457,299 +457,339 @@ const f50 = pipe5(list); // No higher order inference
|
||||
>pipe5 : Symbol(pipe5, Decl(genericFunctionInference1.ts, 53, 31))
|
||||
>list : Symbol(list, Decl(genericFunctionInference1.ts, 2, 124))
|
||||
|
||||
declare function wrap3<A, B, C>(f: (a: A, b1: B, b2: B) => C): (a: A, b1: B, b2: B) => C;
|
||||
>wrap3 : Symbol(wrap3, Decl(genericFunctionInference1.ts, 57, 24))
|
||||
>A : Symbol(A, Decl(genericFunctionInference1.ts, 59, 23))
|
||||
>B : Symbol(B, Decl(genericFunctionInference1.ts, 59, 25))
|
||||
>C : Symbol(C, Decl(genericFunctionInference1.ts, 59, 28))
|
||||
>f : Symbol(f, Decl(genericFunctionInference1.ts, 59, 32))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 59, 36))
|
||||
>A : Symbol(A, Decl(genericFunctionInference1.ts, 59, 23))
|
||||
>b1 : Symbol(b1, Decl(genericFunctionInference1.ts, 59, 41))
|
||||
>B : Symbol(B, Decl(genericFunctionInference1.ts, 59, 25))
|
||||
>b2 : Symbol(b2, Decl(genericFunctionInference1.ts, 59, 48))
|
||||
>B : Symbol(B, Decl(genericFunctionInference1.ts, 59, 25))
|
||||
>C : Symbol(C, Decl(genericFunctionInference1.ts, 59, 28))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 59, 64))
|
||||
>A : Symbol(A, Decl(genericFunctionInference1.ts, 59, 23))
|
||||
>b1 : Symbol(b1, Decl(genericFunctionInference1.ts, 59, 69))
|
||||
>B : Symbol(B, Decl(genericFunctionInference1.ts, 59, 25))
|
||||
>b2 : Symbol(b2, Decl(genericFunctionInference1.ts, 59, 76))
|
||||
>B : Symbol(B, Decl(genericFunctionInference1.ts, 59, 25))
|
||||
>C : Symbol(C, Decl(genericFunctionInference1.ts, 59, 28))
|
||||
|
||||
declare function baz<T, U extends T>(t1: T, t2: T, u: U): [T, U];
|
||||
>baz : Symbol(baz, Decl(genericFunctionInference1.ts, 59, 89))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 60, 21))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 60, 23))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 60, 21))
|
||||
>t1 : Symbol(t1, Decl(genericFunctionInference1.ts, 60, 37))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 60, 21))
|
||||
>t2 : Symbol(t2, Decl(genericFunctionInference1.ts, 60, 43))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 60, 21))
|
||||
>u : Symbol(u, Decl(genericFunctionInference1.ts, 60, 50))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 60, 23))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 60, 21))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 60, 23))
|
||||
|
||||
let f60 = wrap3(baz);
|
||||
>f60 : Symbol(f60, Decl(genericFunctionInference1.ts, 62, 3))
|
||||
>wrap3 : Symbol(wrap3, Decl(genericFunctionInference1.ts, 57, 24))
|
||||
>baz : Symbol(baz, Decl(genericFunctionInference1.ts, 59, 89))
|
||||
|
||||
// #417
|
||||
|
||||
function mirror<A, B>(f: (a: A) => B): (a: A) => B { return f; }
|
||||
>mirror : Symbol(mirror, Decl(genericFunctionInference1.ts, 57, 24))
|
||||
>A : Symbol(A, Decl(genericFunctionInference1.ts, 61, 16))
|
||||
>B : Symbol(B, Decl(genericFunctionInference1.ts, 61, 18))
|
||||
>f : Symbol(f, Decl(genericFunctionInference1.ts, 61, 22))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 61, 26))
|
||||
>A : Symbol(A, Decl(genericFunctionInference1.ts, 61, 16))
|
||||
>B : Symbol(B, Decl(genericFunctionInference1.ts, 61, 18))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 61, 40))
|
||||
>A : Symbol(A, Decl(genericFunctionInference1.ts, 61, 16))
|
||||
>B : Symbol(B, Decl(genericFunctionInference1.ts, 61, 18))
|
||||
>f : Symbol(f, Decl(genericFunctionInference1.ts, 61, 22))
|
||||
>mirror : Symbol(mirror, Decl(genericFunctionInference1.ts, 62, 21))
|
||||
>A : Symbol(A, Decl(genericFunctionInference1.ts, 66, 16))
|
||||
>B : Symbol(B, Decl(genericFunctionInference1.ts, 66, 18))
|
||||
>f : Symbol(f, Decl(genericFunctionInference1.ts, 66, 22))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 66, 26))
|
||||
>A : Symbol(A, Decl(genericFunctionInference1.ts, 66, 16))
|
||||
>B : Symbol(B, Decl(genericFunctionInference1.ts, 66, 18))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 66, 40))
|
||||
>A : Symbol(A, Decl(genericFunctionInference1.ts, 66, 16))
|
||||
>B : Symbol(B, Decl(genericFunctionInference1.ts, 66, 18))
|
||||
>f : Symbol(f, Decl(genericFunctionInference1.ts, 66, 22))
|
||||
|
||||
var identityM = mirror(identity);
|
||||
>identityM : Symbol(identityM, Decl(genericFunctionInference1.ts, 62, 3))
|
||||
>mirror : Symbol(mirror, Decl(genericFunctionInference1.ts, 57, 24))
|
||||
>identity : Symbol(identity, Decl(genericFunctionInference1.ts, 154, 13))
|
||||
>identityM : Symbol(identityM, Decl(genericFunctionInference1.ts, 67, 3))
|
||||
>mirror : Symbol(mirror, Decl(genericFunctionInference1.ts, 62, 21))
|
||||
>identity : Symbol(identity, Decl(genericFunctionInference1.ts, 159, 13))
|
||||
|
||||
var x = 1;
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 64, 3))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 69, 3))
|
||||
|
||||
var y = identity(x);
|
||||
>y : Symbol(y, Decl(genericFunctionInference1.ts, 65, 3))
|
||||
>identity : Symbol(identity, Decl(genericFunctionInference1.ts, 154, 13))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 64, 3))
|
||||
>y : Symbol(y, Decl(genericFunctionInference1.ts, 70, 3))
|
||||
>identity : Symbol(identity, Decl(genericFunctionInference1.ts, 159, 13))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 69, 3))
|
||||
|
||||
var z = identityM(x);
|
||||
>z : Symbol(z, Decl(genericFunctionInference1.ts, 66, 3))
|
||||
>identityM : Symbol(identityM, Decl(genericFunctionInference1.ts, 62, 3))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 64, 3))
|
||||
>z : Symbol(z, Decl(genericFunctionInference1.ts, 71, 3))
|
||||
>identityM : Symbol(identityM, Decl(genericFunctionInference1.ts, 67, 3))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 69, 3))
|
||||
|
||||
// #3038
|
||||
|
||||
export function keyOf<a>(value: { key: a; }): a {
|
||||
>keyOf : Symbol(keyOf, Decl(genericFunctionInference1.ts, 66, 21))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 70, 22))
|
||||
>value : Symbol(value, Decl(genericFunctionInference1.ts, 70, 25))
|
||||
>key : Symbol(key, Decl(genericFunctionInference1.ts, 70, 33))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 70, 22))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 70, 22))
|
||||
>keyOf : Symbol(keyOf, Decl(genericFunctionInference1.ts, 71, 21))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 75, 22))
|
||||
>value : Symbol(value, Decl(genericFunctionInference1.ts, 75, 25))
|
||||
>key : Symbol(key, Decl(genericFunctionInference1.ts, 75, 33))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 75, 22))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 75, 22))
|
||||
|
||||
return value.key;
|
||||
>value.key : Symbol(key, Decl(genericFunctionInference1.ts, 70, 33))
|
||||
>value : Symbol(value, Decl(genericFunctionInference1.ts, 70, 25))
|
||||
>key : Symbol(key, Decl(genericFunctionInference1.ts, 70, 33))
|
||||
>value.key : Symbol(key, Decl(genericFunctionInference1.ts, 75, 33))
|
||||
>value : Symbol(value, Decl(genericFunctionInference1.ts, 75, 25))
|
||||
>key : Symbol(key, Decl(genericFunctionInference1.ts, 75, 33))
|
||||
}
|
||||
export interface Data {
|
||||
>Data : Symbol(Data, Decl(genericFunctionInference1.ts, 72, 1))
|
||||
>Data : Symbol(Data, Decl(genericFunctionInference1.ts, 77, 1))
|
||||
|
||||
key: number;
|
||||
>key : Symbol(Data.key, Decl(genericFunctionInference1.ts, 73, 23))
|
||||
>key : Symbol(Data.key, Decl(genericFunctionInference1.ts, 78, 23))
|
||||
|
||||
value: Date;
|
||||
>value : Symbol(Data.value, Decl(genericFunctionInference1.ts, 74, 16))
|
||||
>value : Symbol(Data.value, Decl(genericFunctionInference1.ts, 79, 16))
|
||||
>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
|
||||
}
|
||||
|
||||
var data: Data[] = [];
|
||||
>data : Symbol(data, Decl(genericFunctionInference1.ts, 78, 3))
|
||||
>Data : Symbol(Data, Decl(genericFunctionInference1.ts, 72, 1))
|
||||
>data : Symbol(data, Decl(genericFunctionInference1.ts, 83, 3))
|
||||
>Data : Symbol(Data, Decl(genericFunctionInference1.ts, 77, 1))
|
||||
|
||||
declare function toKeys<a>(values: a[], toKey: (value: a) => string): string[];
|
||||
>toKeys : Symbol(toKeys, Decl(genericFunctionInference1.ts, 78, 22))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 80, 24))
|
||||
>values : Symbol(values, Decl(genericFunctionInference1.ts, 80, 27))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 80, 24))
|
||||
>toKey : Symbol(toKey, Decl(genericFunctionInference1.ts, 80, 39))
|
||||
>value : Symbol(value, Decl(genericFunctionInference1.ts, 80, 48))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 80, 24))
|
||||
>toKeys : Symbol(toKeys, Decl(genericFunctionInference1.ts, 83, 22))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 85, 24))
|
||||
>values : Symbol(values, Decl(genericFunctionInference1.ts, 85, 27))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 85, 24))
|
||||
>toKey : Symbol(toKey, Decl(genericFunctionInference1.ts, 85, 39))
|
||||
>value : Symbol(value, Decl(genericFunctionInference1.ts, 85, 48))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 85, 24))
|
||||
|
||||
toKeys(data, keyOf); // Error
|
||||
>toKeys : Symbol(toKeys, Decl(genericFunctionInference1.ts, 78, 22))
|
||||
>data : Symbol(data, Decl(genericFunctionInference1.ts, 78, 3))
|
||||
>keyOf : Symbol(keyOf, Decl(genericFunctionInference1.ts, 66, 21))
|
||||
>toKeys : Symbol(toKeys, Decl(genericFunctionInference1.ts, 83, 22))
|
||||
>data : Symbol(data, Decl(genericFunctionInference1.ts, 83, 3))
|
||||
>keyOf : Symbol(keyOf, Decl(genericFunctionInference1.ts, 71, 21))
|
||||
|
||||
// #9366
|
||||
|
||||
function flip<a, b, c>(f: (a: a, b: b) => c): (b: b, a: a) => c {
|
||||
>flip : Symbol(flip, Decl(genericFunctionInference1.ts, 82, 20))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 86, 14))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 86, 16))
|
||||
>c : Symbol(c, Decl(genericFunctionInference1.ts, 86, 19))
|
||||
>f : Symbol(f, Decl(genericFunctionInference1.ts, 86, 23))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 86, 27))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 86, 14))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 86, 32))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 86, 16))
|
||||
>c : Symbol(c, Decl(genericFunctionInference1.ts, 86, 19))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 86, 47))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 86, 16))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 86, 52))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 86, 14))
|
||||
>c : Symbol(c, Decl(genericFunctionInference1.ts, 86, 19))
|
||||
>flip : Symbol(flip, Decl(genericFunctionInference1.ts, 87, 20))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 91, 14))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 91, 16))
|
||||
>c : Symbol(c, Decl(genericFunctionInference1.ts, 91, 19))
|
||||
>f : Symbol(f, Decl(genericFunctionInference1.ts, 91, 23))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 91, 27))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 91, 14))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 91, 32))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 91, 16))
|
||||
>c : Symbol(c, Decl(genericFunctionInference1.ts, 91, 19))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 91, 47))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 91, 16))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 91, 52))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 91, 14))
|
||||
>c : Symbol(c, Decl(genericFunctionInference1.ts, 91, 19))
|
||||
|
||||
return (b: b, a: a) => f(a, b);
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 87, 10))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 86, 16))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 87, 15))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 86, 14))
|
||||
>f : Symbol(f, Decl(genericFunctionInference1.ts, 86, 23))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 87, 15))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 87, 10))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 92, 10))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 91, 16))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 92, 15))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 91, 14))
|
||||
>f : Symbol(f, Decl(genericFunctionInference1.ts, 91, 23))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 92, 15))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 92, 10))
|
||||
}
|
||||
function zip<T, U>(x: T, y: U): [T, U] {
|
||||
>zip : Symbol(zip, Decl(genericFunctionInference1.ts, 88, 1))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 89, 13))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 89, 15))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 89, 19))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 89, 13))
|
||||
>y : Symbol(y, Decl(genericFunctionInference1.ts, 89, 24))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 89, 15))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 89, 13))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 89, 15))
|
||||
>zip : Symbol(zip, Decl(genericFunctionInference1.ts, 93, 1))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 94, 13))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 94, 15))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 94, 19))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 94, 13))
|
||||
>y : Symbol(y, Decl(genericFunctionInference1.ts, 94, 24))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 94, 15))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 94, 13))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 94, 15))
|
||||
|
||||
return [x, y];
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 89, 19))
|
||||
>y : Symbol(y, Decl(genericFunctionInference1.ts, 89, 24))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 94, 19))
|
||||
>y : Symbol(y, Decl(genericFunctionInference1.ts, 94, 24))
|
||||
}
|
||||
|
||||
var expected: <T, U>(y: U, x: T) => [T, U] = flip(zip);
|
||||
>expected : Symbol(expected, Decl(genericFunctionInference1.ts, 93, 3))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 93, 15))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 93, 17))
|
||||
>y : Symbol(y, Decl(genericFunctionInference1.ts, 93, 21))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 93, 17))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 93, 26))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 93, 15))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 93, 15))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 93, 17))
|
||||
>flip : Symbol(flip, Decl(genericFunctionInference1.ts, 82, 20))
|
||||
>zip : Symbol(zip, Decl(genericFunctionInference1.ts, 88, 1))
|
||||
>expected : Symbol(expected, Decl(genericFunctionInference1.ts, 98, 3))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 98, 15))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 98, 17))
|
||||
>y : Symbol(y, Decl(genericFunctionInference1.ts, 98, 21))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 98, 17))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 98, 26))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 98, 15))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 98, 15))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 98, 17))
|
||||
>flip : Symbol(flip, Decl(genericFunctionInference1.ts, 87, 20))
|
||||
>zip : Symbol(zip, Decl(genericFunctionInference1.ts, 93, 1))
|
||||
|
||||
var actual = flip(zip);
|
||||
>actual : Symbol(actual, Decl(genericFunctionInference1.ts, 94, 3))
|
||||
>flip : Symbol(flip, Decl(genericFunctionInference1.ts, 82, 20))
|
||||
>zip : Symbol(zip, Decl(genericFunctionInference1.ts, 88, 1))
|
||||
>actual : Symbol(actual, Decl(genericFunctionInference1.ts, 99, 3))
|
||||
>flip : Symbol(flip, Decl(genericFunctionInference1.ts, 87, 20))
|
||||
>zip : Symbol(zip, Decl(genericFunctionInference1.ts, 93, 1))
|
||||
|
||||
// #9366
|
||||
|
||||
const map = <T, U>(transform: (t: T) => U) =>
|
||||
>map : Symbol(map, Decl(genericFunctionInference1.ts, 98, 5))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 98, 13))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 98, 15))
|
||||
>transform : Symbol(transform, Decl(genericFunctionInference1.ts, 98, 19))
|
||||
>t : Symbol(t, Decl(genericFunctionInference1.ts, 98, 31))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 98, 13))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 98, 15))
|
||||
>map : Symbol(map, Decl(genericFunctionInference1.ts, 103, 5))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 103, 13))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 103, 15))
|
||||
>transform : Symbol(transform, Decl(genericFunctionInference1.ts, 103, 19))
|
||||
>t : Symbol(t, Decl(genericFunctionInference1.ts, 103, 31))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 103, 13))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 103, 15))
|
||||
|
||||
(arr: T[]) => arr.map(transform)
|
||||
>arr : Symbol(arr, Decl(genericFunctionInference1.ts, 99, 5))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 98, 13))
|
||||
>arr : Symbol(arr, Decl(genericFunctionInference1.ts, 104, 5))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 103, 13))
|
||||
>arr.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --))
|
||||
>arr : Symbol(arr, Decl(genericFunctionInference1.ts, 99, 5))
|
||||
>arr : Symbol(arr, Decl(genericFunctionInference1.ts, 104, 5))
|
||||
>map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --))
|
||||
>transform : Symbol(transform, Decl(genericFunctionInference1.ts, 98, 19))
|
||||
>transform : Symbol(transform, Decl(genericFunctionInference1.ts, 103, 19))
|
||||
|
||||
const identityStr = (t: string) => t;
|
||||
>identityStr : Symbol(identityStr, Decl(genericFunctionInference1.ts, 101, 5))
|
||||
>t : Symbol(t, Decl(genericFunctionInference1.ts, 101, 21))
|
||||
>t : Symbol(t, Decl(genericFunctionInference1.ts, 101, 21))
|
||||
>identityStr : Symbol(identityStr, Decl(genericFunctionInference1.ts, 106, 5))
|
||||
>t : Symbol(t, Decl(genericFunctionInference1.ts, 106, 21))
|
||||
>t : Symbol(t, Decl(genericFunctionInference1.ts, 106, 21))
|
||||
|
||||
const arr: string[] = map(identityStr)(['a']);
|
||||
>arr : Symbol(arr, Decl(genericFunctionInference1.ts, 103, 5))
|
||||
>map : Symbol(map, Decl(genericFunctionInference1.ts, 98, 5))
|
||||
>identityStr : Symbol(identityStr, Decl(genericFunctionInference1.ts, 101, 5))
|
||||
>arr : Symbol(arr, Decl(genericFunctionInference1.ts, 108, 5))
|
||||
>map : Symbol(map, Decl(genericFunctionInference1.ts, 103, 5))
|
||||
>identityStr : Symbol(identityStr, Decl(genericFunctionInference1.ts, 106, 5))
|
||||
|
||||
const arr1: string[] = map(identity)(['a']);
|
||||
>arr1 : Symbol(arr1, Decl(genericFunctionInference1.ts, 104, 5))
|
||||
>map : Symbol(map, Decl(genericFunctionInference1.ts, 98, 5))
|
||||
>identity : Symbol(identity, Decl(genericFunctionInference1.ts, 154, 13))
|
||||
>arr1 : Symbol(arr1, Decl(genericFunctionInference1.ts, 109, 5))
|
||||
>map : Symbol(map, Decl(genericFunctionInference1.ts, 103, 5))
|
||||
>identity : Symbol(identity, Decl(genericFunctionInference1.ts, 159, 13))
|
||||
|
||||
// #9949
|
||||
|
||||
function of2<a, b>(one: a, two: b): [a, b] {
|
||||
>of2 : Symbol(of2, Decl(genericFunctionInference1.ts, 104, 44))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 108, 13))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 108, 15))
|
||||
>one : Symbol(one, Decl(genericFunctionInference1.ts, 108, 19))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 108, 13))
|
||||
>two : Symbol(two, Decl(genericFunctionInference1.ts, 108, 26))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 108, 15))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 108, 13))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 108, 15))
|
||||
>of2 : Symbol(of2, Decl(genericFunctionInference1.ts, 109, 44))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 113, 13))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 113, 15))
|
||||
>one : Symbol(one, Decl(genericFunctionInference1.ts, 113, 19))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 113, 13))
|
||||
>two : Symbol(two, Decl(genericFunctionInference1.ts, 113, 26))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 113, 15))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 113, 13))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 113, 15))
|
||||
|
||||
return [one, two];
|
||||
>one : Symbol(one, Decl(genericFunctionInference1.ts, 108, 19))
|
||||
>two : Symbol(two, Decl(genericFunctionInference1.ts, 108, 26))
|
||||
>one : Symbol(one, Decl(genericFunctionInference1.ts, 113, 19))
|
||||
>two : Symbol(two, Decl(genericFunctionInference1.ts, 113, 26))
|
||||
}
|
||||
|
||||
const flipped = flip(of2);
|
||||
>flipped : Symbol(flipped, Decl(genericFunctionInference1.ts, 112, 5))
|
||||
>flip : Symbol(flip, Decl(genericFunctionInference1.ts, 82, 20))
|
||||
>of2 : Symbol(of2, Decl(genericFunctionInference1.ts, 104, 44))
|
||||
>flipped : Symbol(flipped, Decl(genericFunctionInference1.ts, 117, 5))
|
||||
>flip : Symbol(flip, Decl(genericFunctionInference1.ts, 87, 20))
|
||||
>of2 : Symbol(of2, Decl(genericFunctionInference1.ts, 109, 44))
|
||||
|
||||
// #29904.1
|
||||
|
||||
type Component<P> = (props: P) => {};
|
||||
>Component : Symbol(Component, Decl(genericFunctionInference1.ts, 112, 26))
|
||||
>P : Symbol(P, Decl(genericFunctionInference1.ts, 116, 15))
|
||||
>props : Symbol(props, Decl(genericFunctionInference1.ts, 116, 21))
|
||||
>P : Symbol(P, Decl(genericFunctionInference1.ts, 116, 15))
|
||||
>Component : Symbol(Component, Decl(genericFunctionInference1.ts, 117, 26))
|
||||
>P : Symbol(P, Decl(genericFunctionInference1.ts, 121, 15))
|
||||
>props : Symbol(props, Decl(genericFunctionInference1.ts, 121, 21))
|
||||
>P : Symbol(P, Decl(genericFunctionInference1.ts, 121, 15))
|
||||
|
||||
declare const myHoc1: <P>(C: Component<P>) => Component<P>;
|
||||
>myHoc1 : Symbol(myHoc1, Decl(genericFunctionInference1.ts, 118, 13))
|
||||
>P : Symbol(P, Decl(genericFunctionInference1.ts, 118, 23))
|
||||
>C : Symbol(C, Decl(genericFunctionInference1.ts, 118, 26))
|
||||
>Component : Symbol(Component, Decl(genericFunctionInference1.ts, 112, 26))
|
||||
>P : Symbol(P, Decl(genericFunctionInference1.ts, 118, 23))
|
||||
>Component : Symbol(Component, Decl(genericFunctionInference1.ts, 112, 26))
|
||||
>P : Symbol(P, Decl(genericFunctionInference1.ts, 118, 23))
|
||||
>myHoc1 : Symbol(myHoc1, Decl(genericFunctionInference1.ts, 123, 13))
|
||||
>P : Symbol(P, Decl(genericFunctionInference1.ts, 123, 23))
|
||||
>C : Symbol(C, Decl(genericFunctionInference1.ts, 123, 26))
|
||||
>Component : Symbol(Component, Decl(genericFunctionInference1.ts, 117, 26))
|
||||
>P : Symbol(P, Decl(genericFunctionInference1.ts, 123, 23))
|
||||
>Component : Symbol(Component, Decl(genericFunctionInference1.ts, 117, 26))
|
||||
>P : Symbol(P, Decl(genericFunctionInference1.ts, 123, 23))
|
||||
|
||||
declare const myHoc2: <P>(C: Component<P>) => Component<P>;
|
||||
>myHoc2 : Symbol(myHoc2, Decl(genericFunctionInference1.ts, 119, 13))
|
||||
>P : Symbol(P, Decl(genericFunctionInference1.ts, 119, 23))
|
||||
>C : Symbol(C, Decl(genericFunctionInference1.ts, 119, 26))
|
||||
>Component : Symbol(Component, Decl(genericFunctionInference1.ts, 112, 26))
|
||||
>P : Symbol(P, Decl(genericFunctionInference1.ts, 119, 23))
|
||||
>Component : Symbol(Component, Decl(genericFunctionInference1.ts, 112, 26))
|
||||
>P : Symbol(P, Decl(genericFunctionInference1.ts, 119, 23))
|
||||
>myHoc2 : Symbol(myHoc2, Decl(genericFunctionInference1.ts, 124, 13))
|
||||
>P : Symbol(P, Decl(genericFunctionInference1.ts, 124, 23))
|
||||
>C : Symbol(C, Decl(genericFunctionInference1.ts, 124, 26))
|
||||
>Component : Symbol(Component, Decl(genericFunctionInference1.ts, 117, 26))
|
||||
>P : Symbol(P, Decl(genericFunctionInference1.ts, 124, 23))
|
||||
>Component : Symbol(Component, Decl(genericFunctionInference1.ts, 117, 26))
|
||||
>P : Symbol(P, Decl(genericFunctionInference1.ts, 124, 23))
|
||||
|
||||
declare const MyComponent1: Component<{ foo: 1 }>;
|
||||
>MyComponent1 : Symbol(MyComponent1, Decl(genericFunctionInference1.ts, 121, 13))
|
||||
>Component : Symbol(Component, Decl(genericFunctionInference1.ts, 112, 26))
|
||||
>foo : Symbol(foo, Decl(genericFunctionInference1.ts, 121, 39))
|
||||
>MyComponent1 : Symbol(MyComponent1, Decl(genericFunctionInference1.ts, 126, 13))
|
||||
>Component : Symbol(Component, Decl(genericFunctionInference1.ts, 117, 26))
|
||||
>foo : Symbol(foo, Decl(genericFunctionInference1.ts, 126, 39))
|
||||
|
||||
const enhance = pipe(
|
||||
>enhance : Symbol(enhance, Decl(genericFunctionInference1.ts, 123, 5))
|
||||
>enhance : Symbol(enhance, Decl(genericFunctionInference1.ts, 128, 5))
|
||||
>pipe : Symbol(pipe, Decl(genericFunctionInference1.ts, 0, 0), Decl(genericFunctionInference1.ts, 0, 84), Decl(genericFunctionInference1.ts, 1, 104))
|
||||
|
||||
myHoc1,
|
||||
>myHoc1 : Symbol(myHoc1, Decl(genericFunctionInference1.ts, 118, 13))
|
||||
>myHoc1 : Symbol(myHoc1, Decl(genericFunctionInference1.ts, 123, 13))
|
||||
|
||||
myHoc2,
|
||||
>myHoc2 : Symbol(myHoc2, Decl(genericFunctionInference1.ts, 119, 13))
|
||||
>myHoc2 : Symbol(myHoc2, Decl(genericFunctionInference1.ts, 124, 13))
|
||||
|
||||
);
|
||||
|
||||
const MyComponent2 = enhance(MyComponent1);
|
||||
>MyComponent2 : Symbol(MyComponent2, Decl(genericFunctionInference1.ts, 128, 5))
|
||||
>enhance : Symbol(enhance, Decl(genericFunctionInference1.ts, 123, 5))
|
||||
>MyComponent1 : Symbol(MyComponent1, Decl(genericFunctionInference1.ts, 121, 13))
|
||||
>MyComponent2 : Symbol(MyComponent2, Decl(genericFunctionInference1.ts, 133, 5))
|
||||
>enhance : Symbol(enhance, Decl(genericFunctionInference1.ts, 128, 5))
|
||||
>MyComponent1 : Symbol(MyComponent1, Decl(genericFunctionInference1.ts, 126, 13))
|
||||
|
||||
// #29904.2
|
||||
|
||||
const fn20 = pipe((_a?: {}) => 1);
|
||||
>fn20 : Symbol(fn20, Decl(genericFunctionInference1.ts, 132, 5))
|
||||
>fn20 : Symbol(fn20, Decl(genericFunctionInference1.ts, 137, 5))
|
||||
>pipe : Symbol(pipe, Decl(genericFunctionInference1.ts, 0, 0), Decl(genericFunctionInference1.ts, 0, 84), Decl(genericFunctionInference1.ts, 1, 104))
|
||||
>_a : Symbol(_a, Decl(genericFunctionInference1.ts, 132, 19))
|
||||
>_a : Symbol(_a, Decl(genericFunctionInference1.ts, 137, 19))
|
||||
|
||||
// #29904.3
|
||||
|
||||
type Fn = (n: number) => number;
|
||||
>Fn : Symbol(Fn, Decl(genericFunctionInference1.ts, 132, 34))
|
||||
>n : Symbol(n, Decl(genericFunctionInference1.ts, 136, 11))
|
||||
>Fn : Symbol(Fn, Decl(genericFunctionInference1.ts, 137, 34))
|
||||
>n : Symbol(n, Decl(genericFunctionInference1.ts, 141, 11))
|
||||
|
||||
const fn30: Fn = pipe(
|
||||
>fn30 : Symbol(fn30, Decl(genericFunctionInference1.ts, 137, 5))
|
||||
>Fn : Symbol(Fn, Decl(genericFunctionInference1.ts, 132, 34))
|
||||
>fn30 : Symbol(fn30, Decl(genericFunctionInference1.ts, 142, 5))
|
||||
>Fn : Symbol(Fn, Decl(genericFunctionInference1.ts, 137, 34))
|
||||
>pipe : Symbol(pipe, Decl(genericFunctionInference1.ts, 0, 0), Decl(genericFunctionInference1.ts, 0, 84), Decl(genericFunctionInference1.ts, 1, 104))
|
||||
|
||||
x => x + 1,
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 137, 22))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 137, 22))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 142, 22))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 142, 22))
|
||||
|
||||
x => x * 2,
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 138, 15))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 138, 15))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 143, 15))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 143, 15))
|
||||
|
||||
);
|
||||
|
||||
const promise = Promise.resolve(1);
|
||||
>promise : Symbol(promise, Decl(genericFunctionInference1.ts, 142, 5))
|
||||
>promise : Symbol(promise, Decl(genericFunctionInference1.ts, 147, 5))
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
|
||||
promise.then(
|
||||
>promise.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --))
|
||||
>promise : Symbol(promise, Decl(genericFunctionInference1.ts, 142, 5))
|
||||
>promise : Symbol(promise, Decl(genericFunctionInference1.ts, 147, 5))
|
||||
>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --))
|
||||
|
||||
pipe(
|
||||
>pipe : Symbol(pipe, Decl(genericFunctionInference1.ts, 0, 0), Decl(genericFunctionInference1.ts, 0, 84), Decl(genericFunctionInference1.ts, 1, 104))
|
||||
|
||||
x => x + 1,
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 144, 9))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 144, 9))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 149, 9))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 149, 9))
|
||||
|
||||
x => x * 2,
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 145, 19))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 145, 19))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 150, 19))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 150, 19))
|
||||
|
||||
),
|
||||
);
|
||||
@@ -757,121 +797,137 @@ promise.then(
|
||||
// #29904.4
|
||||
|
||||
declare const getString: () => string;
|
||||
>getString : Symbol(getString, Decl(genericFunctionInference1.ts, 152, 13))
|
||||
>getString : Symbol(getString, Decl(genericFunctionInference1.ts, 157, 13))
|
||||
|
||||
declare const orUndefined: (name: string) => string | undefined;
|
||||
>orUndefined : Symbol(orUndefined, Decl(genericFunctionInference1.ts, 153, 13))
|
||||
>name : Symbol(name, Decl(genericFunctionInference1.ts, 153, 28))
|
||||
>orUndefined : Symbol(orUndefined, Decl(genericFunctionInference1.ts, 158, 13))
|
||||
>name : Symbol(name, Decl(genericFunctionInference1.ts, 158, 28))
|
||||
|
||||
declare const identity: <T>(value: T) => T;
|
||||
>identity : Symbol(identity, Decl(genericFunctionInference1.ts, 154, 13))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 154, 25))
|
||||
>value : Symbol(value, Decl(genericFunctionInference1.ts, 154, 28))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 154, 25))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 154, 25))
|
||||
>identity : Symbol(identity, Decl(genericFunctionInference1.ts, 159, 13))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 159, 25))
|
||||
>value : Symbol(value, Decl(genericFunctionInference1.ts, 159, 28))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 159, 25))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 159, 25))
|
||||
|
||||
const fn40 = pipe(
|
||||
>fn40 : Symbol(fn40, Decl(genericFunctionInference1.ts, 156, 5))
|
||||
>fn40 : Symbol(fn40, Decl(genericFunctionInference1.ts, 161, 5))
|
||||
>pipe : Symbol(pipe, Decl(genericFunctionInference1.ts, 0, 0), Decl(genericFunctionInference1.ts, 0, 84), Decl(genericFunctionInference1.ts, 1, 104))
|
||||
|
||||
getString,
|
||||
>getString : Symbol(getString, Decl(genericFunctionInference1.ts, 152, 13))
|
||||
>getString : Symbol(getString, Decl(genericFunctionInference1.ts, 157, 13))
|
||||
|
||||
string => orUndefined(string),
|
||||
>string : Symbol(string, Decl(genericFunctionInference1.ts, 157, 14))
|
||||
>orUndefined : Symbol(orUndefined, Decl(genericFunctionInference1.ts, 153, 13))
|
||||
>string : Symbol(string, Decl(genericFunctionInference1.ts, 157, 14))
|
||||
>string : Symbol(string, Decl(genericFunctionInference1.ts, 162, 14))
|
||||
>orUndefined : Symbol(orUndefined, Decl(genericFunctionInference1.ts, 158, 13))
|
||||
>string : Symbol(string, Decl(genericFunctionInference1.ts, 162, 14))
|
||||
|
||||
identity,
|
||||
>identity : Symbol(identity, Decl(genericFunctionInference1.ts, 154, 13))
|
||||
>identity : Symbol(identity, Decl(genericFunctionInference1.ts, 159, 13))
|
||||
|
||||
);
|
||||
|
||||
// #29904.6
|
||||
|
||||
declare const getArray: () => string[];
|
||||
>getArray : Symbol(getArray, Decl(genericFunctionInference1.ts, 164, 13))
|
||||
>getArray : Symbol(getArray, Decl(genericFunctionInference1.ts, 169, 13))
|
||||
|
||||
declare const first: <T>(ts: T[]) => T;
|
||||
>first : Symbol(first, Decl(genericFunctionInference1.ts, 165, 13))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 165, 22))
|
||||
>ts : Symbol(ts, Decl(genericFunctionInference1.ts, 165, 25))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 165, 22))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 165, 22))
|
||||
>first : Symbol(first, Decl(genericFunctionInference1.ts, 170, 13))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 170, 22))
|
||||
>ts : Symbol(ts, Decl(genericFunctionInference1.ts, 170, 25))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 170, 22))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 170, 22))
|
||||
|
||||
const fn60 = pipe(
|
||||
>fn60 : Symbol(fn60, Decl(genericFunctionInference1.ts, 167, 5))
|
||||
>fn60 : Symbol(fn60, Decl(genericFunctionInference1.ts, 172, 5))
|
||||
>pipe : Symbol(pipe, Decl(genericFunctionInference1.ts, 0, 0), Decl(genericFunctionInference1.ts, 0, 84), Decl(genericFunctionInference1.ts, 1, 104))
|
||||
|
||||
getArray,
|
||||
>getArray : Symbol(getArray, Decl(genericFunctionInference1.ts, 164, 13))
|
||||
>getArray : Symbol(getArray, Decl(genericFunctionInference1.ts, 169, 13))
|
||||
|
||||
x => x,
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 168, 13))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 168, 13))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 173, 13))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 173, 13))
|
||||
|
||||
first,
|
||||
>first : Symbol(first, Decl(genericFunctionInference1.ts, 165, 13))
|
||||
>first : Symbol(first, Decl(genericFunctionInference1.ts, 170, 13))
|
||||
|
||||
);
|
||||
|
||||
const fn61 = pipe(
|
||||
>fn61 : Symbol(fn61, Decl(genericFunctionInference1.ts, 173, 5))
|
||||
>fn61 : Symbol(fn61, Decl(genericFunctionInference1.ts, 178, 5))
|
||||
>pipe : Symbol(pipe, Decl(genericFunctionInference1.ts, 0, 0), Decl(genericFunctionInference1.ts, 0, 84), Decl(genericFunctionInference1.ts, 1, 104))
|
||||
|
||||
getArray,
|
||||
>getArray : Symbol(getArray, Decl(genericFunctionInference1.ts, 164, 13))
|
||||
>getArray : Symbol(getArray, Decl(genericFunctionInference1.ts, 169, 13))
|
||||
|
||||
identity,
|
||||
>identity : Symbol(identity, Decl(genericFunctionInference1.ts, 154, 13))
|
||||
>identity : Symbol(identity, Decl(genericFunctionInference1.ts, 159, 13))
|
||||
|
||||
first,
|
||||
>first : Symbol(first, Decl(genericFunctionInference1.ts, 165, 13))
|
||||
>first : Symbol(first, Decl(genericFunctionInference1.ts, 170, 13))
|
||||
|
||||
);
|
||||
|
||||
const fn62 = pipe(
|
||||
>fn62 : Symbol(fn62, Decl(genericFunctionInference1.ts, 179, 5))
|
||||
>fn62 : Symbol(fn62, Decl(genericFunctionInference1.ts, 184, 5))
|
||||
>pipe : Symbol(pipe, Decl(genericFunctionInference1.ts, 0, 0), Decl(genericFunctionInference1.ts, 0, 84), Decl(genericFunctionInference1.ts, 1, 104))
|
||||
|
||||
getArray,
|
||||
>getArray : Symbol(getArray, Decl(genericFunctionInference1.ts, 164, 13))
|
||||
>getArray : Symbol(getArray, Decl(genericFunctionInference1.ts, 169, 13))
|
||||
|
||||
x => x,
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 180, 13))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 180, 13))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 185, 13))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 185, 13))
|
||||
|
||||
x => first(x),
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 181, 11))
|
||||
>first : Symbol(first, Decl(genericFunctionInference1.ts, 165, 13))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 181, 11))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 186, 11))
|
||||
>first : Symbol(first, Decl(genericFunctionInference1.ts, 170, 13))
|
||||
>x : Symbol(x, Decl(genericFunctionInference1.ts, 186, 11))
|
||||
|
||||
);
|
||||
|
||||
// Repro from #30297
|
||||
|
||||
declare function foo2<T, U = T>(fn: T, a?: U, b?: U): [T, U];
|
||||
>foo2 : Symbol(foo2, Decl(genericFunctionInference1.ts, 183, 2))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 187, 22))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 187, 24))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 187, 22))
|
||||
>fn : Symbol(fn, Decl(genericFunctionInference1.ts, 187, 32))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 187, 22))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 187, 38))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 187, 24))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 187, 45))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 187, 24))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 187, 22))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 187, 24))
|
||||
>foo2 : Symbol(foo2, Decl(genericFunctionInference1.ts, 188, 2))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 192, 22))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 192, 24))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 192, 22))
|
||||
>fn : Symbol(fn, Decl(genericFunctionInference1.ts, 192, 32))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 192, 22))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 192, 38))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 192, 24))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 192, 45))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 192, 24))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 192, 22))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 192, 24))
|
||||
|
||||
foo2(() => {});
|
||||
>foo2 : Symbol(foo2, Decl(genericFunctionInference1.ts, 183, 2))
|
||||
>foo2 : Symbol(foo2, Decl(genericFunctionInference1.ts, 188, 2))
|
||||
|
||||
foo2(identity);
|
||||
>foo2 : Symbol(foo2, Decl(genericFunctionInference1.ts, 183, 2))
|
||||
>identity : Symbol(identity, Decl(genericFunctionInference1.ts, 154, 13))
|
||||
>foo2 : Symbol(foo2, Decl(genericFunctionInference1.ts, 188, 2))
|
||||
>identity : Symbol(identity, Decl(genericFunctionInference1.ts, 159, 13))
|
||||
|
||||
foo2(identity, 1);
|
||||
>foo2 : Symbol(foo2, Decl(genericFunctionInference1.ts, 183, 2))
|
||||
>identity : Symbol(identity, Decl(genericFunctionInference1.ts, 154, 13))
|
||||
>foo2 : Symbol(foo2, Decl(genericFunctionInference1.ts, 188, 2))
|
||||
>identity : Symbol(identity, Decl(genericFunctionInference1.ts, 159, 13))
|
||||
|
||||
// Repro from #30324
|
||||
|
||||
declare function times<T>(fn: (i: number) => T): (n: number) => T[];
|
||||
>times : Symbol(times, Decl(genericFunctionInference1.ts, 196, 18))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 200, 23))
|
||||
>fn : Symbol(fn, Decl(genericFunctionInference1.ts, 200, 26))
|
||||
>i : Symbol(i, Decl(genericFunctionInference1.ts, 200, 31))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 200, 23))
|
||||
>n : Symbol(n, Decl(genericFunctionInference1.ts, 200, 50))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 200, 23))
|
||||
|
||||
const a2 = times(identity)(5); // => [0, 1, 2, 3, 4]
|
||||
>a2 : Symbol(a2, Decl(genericFunctionInference1.ts, 201, 5))
|
||||
>times : Symbol(times, Decl(genericFunctionInference1.ts, 196, 18))
|
||||
>identity : Symbol(identity, Decl(genericFunctionInference1.ts, 159, 13))
|
||||
|
||||
|
||||
@@ -421,6 +421,28 @@ const f50 = pipe5(list); // No higher order inference
|
||||
>pipe5 : <A, B>(f: (a: A) => B) => { f: (a: A) => B; }
|
||||
>list : <T>(a: T) => T[]
|
||||
|
||||
declare function wrap3<A, B, C>(f: (a: A, b1: B, b2: B) => C): (a: A, b1: B, b2: B) => C;
|
||||
>wrap3 : <A, B, C>(f: (a: A, b1: B, b2: B) => C) => (a: A, b1: B, b2: B) => C
|
||||
>f : (a: A, b1: B, b2: B) => C
|
||||
>a : A
|
||||
>b1 : B
|
||||
>b2 : B
|
||||
>a : A
|
||||
>b1 : B
|
||||
>b2 : B
|
||||
|
||||
declare function baz<T, U extends T>(t1: T, t2: T, u: U): [T, U];
|
||||
>baz : <T, U extends T>(t1: T, t2: T, u: U) => [T, U]
|
||||
>t1 : T
|
||||
>t2 : T
|
||||
>u : U
|
||||
|
||||
let f60 = wrap3(baz);
|
||||
>f60 : <T, U extends T>(a: T, b1: U, b2: U) => [T, U]
|
||||
>wrap3(baz) : <T, U extends T>(a: T, b1: U, b2: U) => [T, U]
|
||||
>wrap3 : <A, B, C>(f: (a: A, b1: B, b2: B) => C) => (a: A, b1: B, b2: B) => C
|
||||
>baz : <T, U extends T>(t1: T, t2: T, u: U) => [T, U]
|
||||
|
||||
// #417
|
||||
|
||||
function mirror<A, B>(f: (a: A) => B): (a: A) => B { return f; }
|
||||
@@ -823,3 +845,19 @@ foo2(identity, 1);
|
||||
>identity : <T>(value: T) => T
|
||||
>1 : 1
|
||||
|
||||
// Repro from #30324
|
||||
|
||||
declare function times<T>(fn: (i: number) => T): (n: number) => T[];
|
||||
>times : <T>(fn: (i: number) => T) => (n: number) => T[]
|
||||
>fn : (i: number) => T
|
||||
>i : number
|
||||
>n : number
|
||||
|
||||
const a2 = times(identity)(5); // => [0, 1, 2, 3, 4]
|
||||
>a2 : number[]
|
||||
>times(identity)(5) : number[]
|
||||
>times(identity) : (n: number) => number[]
|
||||
>times : <T>(fn: (i: number) => T) => (n: number) => T[]
|
||||
>identity : <T>(value: T) => T
|
||||
>5 : 5
|
||||
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
tests/cases/compiler/recursiveResolveTypeMembers.ts(4,49): error TS2577: Return type annotation circularly references itself.
|
||||
tests/cases/compiler/recursiveResolveTypeMembers.ts(4,58): error TS2304: Cannot find name 'H'.
|
||||
tests/cases/compiler/recursiveResolveTypeMembers.ts(4,62): error TS2574: A rest element type must be an array type.
|
||||
tests/cases/compiler/recursiveResolveTypeMembers.ts(4,79): error TS2304: Cannot find name 'R'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/recursiveResolveTypeMembers.ts (3 errors) ====
|
||||
==== tests/cases/compiler/recursiveResolveTypeMembers.ts (4 errors) ====
|
||||
// Repro from #25291
|
||||
|
||||
type PromisedTuple<L extends any[], U = (...args: L) => void> =
|
||||
U extends (h: infer H, ...args: infer R) => [Promise<H>, ...PromisedTuple<R>] ? [] : []
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2577: Return type annotation circularly references itself.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'H'.
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
Exit Code: 1
|
||||
Standard output:
|
||||
node_modules/@types/passport-facebook/index.d.ts(50,31): error TS2689: Cannot extend an interface 'passport.Strategy'. Did you mean 'implements'?
|
||||
src/controllers/user.ts(95,5): error TS2345: Argument of type '{ email: any; password: any; }' is not assignable to parameter of type 'Partial<Document>'.
|
||||
Object literal may only specify known properties, and 'email' does not exist in type 'Partial<Document>'.
|
||||
src/controllers/user.ts(105,16): error TS7006: Parameter 'err' implicitly has an 'any' type.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ node_modules/adonis-framework/src/Config/index.js(37,15): error TS2304: Cannot f
|
||||
node_modules/adonis-framework/src/Config/index.js(39,15): error TS2304: Cannot find name 'Mixed'.
|
||||
node_modules/adonis-framework/src/Config/index.js(58,15): error TS2304: Cannot find name 'Mixed'.
|
||||
node_modules/adonis-framework/src/Encryption/index.js(53,15): error TS2304: Cannot find name 'Mixed'.
|
||||
node_modules/adonis-framework/src/Encryption/index.js(71,34): error TS2345: Argument of type 'string' is not assignable to parameter of type '"utf8" | "ascii" | "binary" | undefined'.
|
||||
node_modules/adonis-framework/src/Encryption/index.js(77,50): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'.
|
||||
node_modules/adonis-framework/src/Encryption/index.js(85,23): error TS8024: JSDoc '@param' tag has name 'value', but there is no parameter with that name.
|
||||
node_modules/adonis-framework/src/Encryption/index.js(87,15): error TS2304: Cannot find name 'Mixed'.
|
||||
@@ -49,21 +50,21 @@ node_modules/adonis-framework/src/Event/index.js(271,25): error TS2345: Argument
|
||||
node_modules/adonis-framework/src/Event/index.js(278,25): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[string, any, TimerHandler]'.
|
||||
node_modules/adonis-framework/src/Event/index.js(294,30): error TS2345: Argument of type 'Function' is not assignable to parameter of type 'Listener'.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(13,14): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(27,12): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(40,12): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(52,12): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(63,12): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(75,12): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(87,12): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(99,12): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(112,12): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(125,12): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(138,12): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(151,12): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(27,21): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(40,21): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(52,21): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(63,21): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(75,21): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(87,21): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(99,21): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(112,21): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(125,21): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(138,21): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(151,21): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(164,14): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(178,12): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(191,12): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(205,12): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(178,21): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(191,21): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Exceptions/index.js(205,21): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/File/index.js(175,5): error TS2322: Type 'Promise<any>' is not assignable to type 'boolean'.
|
||||
node_modules/adonis-framework/src/File/index.js(273,5): error TS2322: Type 'boolean | ""' is not assignable to type 'boolean'.
|
||||
Type '""' is not assignable to type 'boolean'.
|
||||
@@ -135,7 +136,7 @@ node_modules/adonis-framework/src/Route/index.js(333,29): error TS2345: Argument
|
||||
node_modules/adonis-framework/src/Route/index.js(343,33): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
|
||||
node_modules/adonis-framework/src/Route/index.js(354,20): error TS2694: Namespace 'Route' has no exported member 'Group'.
|
||||
node_modules/adonis-framework/src/Route/index.js(368,3): error TS2322: Type 'null' is not assignable to type 'string'.
|
||||
node_modules/adonis-framework/src/Route/index.js(396,10): error TS2554: Expected 2 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Route/index.js(396,63): error TS2554: Expected 2 arguments, but got 3.
|
||||
node_modules/adonis-framework/src/Route/index.js(407,20): error TS2694: Namespace 'Route' has no exported member 'resources'.
|
||||
node_modules/adonis-framework/src/Route/index.js(501,42): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'.
|
||||
Type 'undefined' is not assignable to type 'boolean'.
|
||||
|
||||
@@ -123,7 +123,7 @@ node_modules/async/dist/async.js(1951,10): error TS8024: JSDoc '@param' tag has
|
||||
node_modules/async/dist/async.js(1990,16): error TS2554: Expected 3 arguments, but got 1.
|
||||
node_modules/async/dist/async.js(2116,20): error TS2345: Argument of type 'Function | undefined' is not assignable to parameter of type 'number | undefined'.
|
||||
Type 'Function' is not assignable to type 'number'.
|
||||
node_modules/async/dist/async.js(2274,21): error TS2554: Expected 0 arguments, but got 2.
|
||||
node_modules/async/dist/async.js(2274,29): error TS2554: Expected 0 arguments, but got 2.
|
||||
node_modules/async/dist/async.js(2425,20): error TS1005: '}' expected.
|
||||
node_modules/async/dist/async.js(2450,5): error TS2740: Type '{ _tasks: DLL; concurrency: any; payload: any; saturated: () => void; unsaturated: () => void; buffer: number; empty: () => void; drain: () => void; error: () => void; started: boolean; paused: boolean; push: (data: any, callback: any) => void; ... 9 more ...; resume: () => void; }' is missing the following properties from type 'NodeModule': exports, require, id, filename, and 4 more.
|
||||
node_modules/async/dist/async.js(2521,9): error TS2722: Cannot invoke an object which is possibly 'undefined'.
|
||||
|
||||
@@ -14,7 +14,7 @@ node_modules/bluebird/js/release/bluebird.js(10,10): error TS2339: Property 'noC
|
||||
node_modules/bluebird/js/release/call_get.js(11,24): error TS2339: Property 'canEvaluate' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/call_get.js(12,25): error TS2339: Property 'isIdentifier' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/call_get.js(73,40): error TS2339: Property 'classString' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/call_get.js(74,13): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/bluebird/js/release/call_get.js(74,27): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/bluebird/js/release/cancel.js(4,21): error TS2339: Property 'tryCatch' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/cancel.js(5,21): error TS2339: Property 'errorObj' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/cancel.js(93,14): error TS2339: Property 'isArray' does not exist on type 'typeof ret'.
|
||||
@@ -50,14 +50,14 @@ node_modules/bluebird/js/release/debuggability.js(211,31): error TS2339: Propert
|
||||
node_modules/bluebird/js/release/debuggability.js(242,56): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
|
||||
Type 'IArguments' is missing the following properties from type 'any[]': pop, push, concat, join, and 26 more.
|
||||
node_modules/bluebird/js/release/debuggability.js(274,18): error TS2339: Property 'isObject' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/debuggability.js(338,37): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/bluebird/js/release/debuggability.js(338,51): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/bluebird/js/release/debuggability.js(352,18): error TS2339: Property 'isArray' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/debuggability.js(424,18): error TS2339: Property 'notEnumerableProp' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/debuggability.js(426,18): error TS2339: Property 'notEnumerableProp' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/debuggability.js(491,19): error TS2350: Only a void function can be called with the 'new' keyword.
|
||||
node_modules/bluebird/js/release/debuggability.js(562,46): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/bluebird/js/release/debuggability.js(562,59): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/bluebird/js/release/debuggability.js(601,18): error TS2339: Property 'isObject' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/debuggability.js(648,32): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/bluebird/js/release/debuggability.js(648,46): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/bluebird/js/release/debuggability.js(736,5): error TS2721: Cannot invoke an object which is possibly 'null'.
|
||||
node_modules/bluebird/js/release/debuggability.js(739,6): error TS2339: Property 'inherits' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/debuggability.js(754,30): error TS2339: Property 'stack' does not exist on type 'CapturedTrace'.
|
||||
@@ -65,7 +65,7 @@ node_modules/bluebird/js/release/debuggability.js(760,37): error TS2339: Propert
|
||||
node_modules/bluebird/js/release/debuggability.js(799,38): error TS2339: Property 'stack' does not exist on type 'CapturedTrace'.
|
||||
node_modules/bluebird/js/release/debuggability.js(804,10): error TS2339: Property 'notEnumerableProp' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/debuggability.js(805,10): error TS2339: Property 'notEnumerableProp' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/debuggability.js(808,25): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/bluebird/js/release/debuggability.js(879,4): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/bluebird/js/release/debuggability.js(885,14): error TS2339: Property 'isNode' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/debuggability.js(890,22): error TS2339: Property 'isNode' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/errors.js(5,21): error TS2339: Property 'inherits' does not exist on type 'typeof ret'.
|
||||
@@ -81,7 +81,7 @@ node_modules/bluebird/js/release/generators.js(159,21): error TS2350: Only a voi
|
||||
node_modules/bluebird/js/release/generators.js(190,15): error TS2350: Only a void function can be called with the 'new' keyword.
|
||||
node_modules/bluebird/js/release/generators.js(208,15): error TS2350: Only a void function can be called with the 'new' keyword.
|
||||
node_modules/bluebird/js/release/generators.js(208,68): error TS2339: Property 'classString' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/generators.js(220,5): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/bluebird/js/release/generators.js(220,16): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/bluebird/js/release/join.js(6,24): error TS2339: Property 'canEvaluate' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/join.js(7,21): error TS2339: Property 'tryCatch' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/join.js(8,21): error TS2339: Property 'errorObj' does not exist on type 'typeof ret'.
|
||||
@@ -191,8 +191,8 @@ node_modules/bluebird/js/release/promise_array.js(26,6): error TS2339: Property
|
||||
node_modules/bluebird/js/release/promise_array.js(61,19): error TS2339: Property 'asArray' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/promise_array.js(64,72): error TS2339: Property 'classString' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/promise_array.js(71,18): error TS2339: Property '_resolveEmptyArray' does not exist on type 'PromiseArray'.
|
||||
node_modules/bluebird/js/release/promise_array.js(109,30): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/bluebird/js/release/promise_array.js(111,30): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/bluebird/js/release/promise_array.js(109,76): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/bluebird/js/release/promise_array.js(111,53): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/bluebird/js/release/promisify.js(6,25): error TS2339: Property 'withAppended' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/promisify.js(7,29): error TS2339: Property 'maybeWrapAsError' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/promisify.js(8,24): error TS2339: Property 'canEvaluate' does not exist on type 'typeof ret'.
|
||||
@@ -200,7 +200,7 @@ node_modules/bluebird/js/release/promisify.js(24,17): error TS2339: Property 'is
|
||||
node_modules/bluebird/js/release/promisify.js(43,20): error TS2339: Property 'getDataPropertyOrDefault' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/promisify.js(54,27): error TS2350: Only a void function can be called with the 'new' keyword.
|
||||
node_modules/bluebird/js/release/promisify.js(63,21): error TS2339: Property 'inheritedDataKeys' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/promisify.js(69,22): error TS2554: Expected 0-1 arguments, but got 3.
|
||||
node_modules/bluebird/js/release/promisify.js(69,41): error TS2554: Expected 0-1 arguments, but got 3.
|
||||
node_modules/bluebird/js/release/promisify.js(93,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'number', but here has type 'any'.
|
||||
node_modules/bluebird/js/release/promisify.js(100,17): error TS2339: Property 'filledRange' does not exist on type 'typeof ret'.
|
||||
node_modules/bluebird/js/release/promisify.js(104,17): error TS2339: Property 'filledRange' does not exist on type 'typeof ret'.
|
||||
|
||||
@@ -47,7 +47,7 @@ node_modules/chrome-devtools-frontend/front_end/Tests.js(416,5): error TS2554: E
|
||||
node_modules/chrome-devtools-frontend/front_end/Tests.js(440,5): error TS2554: Expected 4 arguments, but got 3.
|
||||
node_modules/chrome-devtools-frontend/front_end/Tests.js(475,5): error TS2554: Expected 4 arguments, but got 3.
|
||||
node_modules/chrome-devtools-frontend/front_end/Tests.js(571,33): error TS2339: Property 'deprecatedRunAfterPendingDispatches' does not exist on type 'typeof InspectorBackend'.
|
||||
node_modules/chrome-devtools-frontend/front_end/Tests.js(590,27): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/Tests.js(590,57): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/Tests.js(619,44): error TS2339: Property 'emulationAgent' does not exist on type 'Target'.
|
||||
node_modules/chrome-devtools-frontend/front_end/Tests.js(666,38): error TS2339: Property 'inputAgent' does not exist on type 'Target'.
|
||||
node_modules/chrome-devtools-frontend/front_end/Tests.js(668,38): error TS2339: Property 'inputAgent' does not exist on type 'Target'.
|
||||
@@ -452,7 +452,7 @@ node_modules/chrome-devtools-frontend/front_end/application_test_runner/CacheSto
|
||||
node_modules/chrome-devtools-frontend/front_end/application_test_runner/CacheStorageTestRunner.js(135,10): error TS2554: Expected 2 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/application_test_runner/IndexedDBTestRunner.js(12,40): error TS2339: Property 'resources' does not exist on type 'any[]'.
|
||||
node_modules/chrome-devtools-frontend/front_end/application_test_runner/IndexedDBTestRunner.js(47,42): error TS2339: Property 'resources' does not exist on type 'any[]'.
|
||||
node_modules/chrome-devtools-frontend/front_end/application_test_runner/IndexedDBTestRunner.js(140,24): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/chrome-devtools-frontend/front_end/application_test_runner/IndexedDBTestRunner.js(140,85): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/chrome-devtools-frontend/front_end/application_test_runner/ResourceTreeTestRunner.js(69,18): error TS2339: Property 'resources' does not exist on type 'any[]'.
|
||||
node_modules/chrome-devtools-frontend/front_end/application_test_runner/ResourcesTestRunner.js(76,15): error TS2339: Property 'resources' does not exist on type 'any[]'.
|
||||
node_modules/chrome-devtools-frontend/front_end/application_test_runner/ResourcesTestRunner.js(77,33): error TS2339: Property 'resources' does not exist on type 'any[]'.
|
||||
@@ -533,7 +533,7 @@ node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(944,23):
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(950,47): error TS2339: Property 'createChild' does not exist on type 'Element'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(952,19): error TS2304: Cannot find name 'DOM'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(954,32): error TS2304: Cannot find name 'CategoryRenderer'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(955,20): error TS2554: Expected 0 arguments, but got 2.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(955,60): error TS2554: Expected 0 arguments, but got 2.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(967,41): error TS2304: Cannot find name 'DetailsRenderer'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(969,15): error TS2304: Cannot find name 'DOM'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(978,15): error TS2503: Cannot find namespace 'DetailsRenderer'.
|
||||
@@ -682,22 +682,22 @@ node_modules/chrome-devtools-frontend/front_end/audits2_worker/Audits2Service.js
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/Audits2Service.js(131,8): error TS2339: Property 'document' does not exist on type 'Global'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/Audits2Service.js(132,8): error TS2339: Property 'document' does not exist on type 'Global'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(2,1): error TS2739: Type '(o: any, u: any) => any' is missing the following properties from type 'NodeRequire': resolve, cache, extensions, main
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(2,121): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(2,141): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(2,125): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(2,145): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(2,203): error TS2339: Property 'code' does not exist on type 'Error'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(5494,9): error TS2339: Property 'stableSort' does not exist on type '{ category: any; group: any; duration: any; }[]'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(5878,16): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(5879,17): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(5878,60): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(5879,62): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(6400,21): error TS2339: Property 'valuesArray' does not exist on type 'Map<any, any>'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(8112,74): error TS2339: Property 'name' does not exist on type 'ComputedArtifact'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(9093,1): error TS2554: Expected 0-2 arguments, but got 3.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(9117,1): error TS2554: Expected 0-2 arguments, but got 3.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(9093,57): error TS2554: Expected 0-2 arguments, but got 3.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(9117,73): error TS2554: Expected 0-2 arguments, but got 3.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(9467,15): error TS2339: Property 'axe' does not exist on type 'Window'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(10092,16): error TS2304: Cannot find name 'd41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(10513,19): error TS2488: Type 'NodeListOf<Element>' must have a '[Symbol.iterator]()' method that returns an iterator.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(10811,19): error TS2304: Cannot find name 'getElementsInDocument'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(12197,22): error TS2554: Expected 0 arguments, but got 2.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(12327,24): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(12197,34): error TS2554: Expected 0 arguments, but got 2.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(12327,36): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(13607,7): error TS2339: Property 'protocolMethod' does not exist on type 'Error'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(13608,7): error TS2339: Property 'protocolError' does not exist on type 'Error'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(14352,1): error TS2722: Cannot invoke an object which is possibly 'undefined'.
|
||||
@@ -731,13 +731,13 @@ node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighth
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(15882,16): error TS2339: Property '_logs' does not exist on type 'typeof ConsoleQuieter'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(15891,16): error TS2339: Property '_logs' does not exist on type 'typeof ConsoleQuieter'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(15894,16): error TS2339: Property '_logs' does not exist on type 'typeof ConsoleQuieter'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(16213,5): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(16219,5): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(16213,23): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(16219,23): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(16733,11): error TS2339: Property 'NodeTimingData' does not exist on type 'typeof Simulator'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(17089,26): error TS2339: Property '__proto__' does not exist on type 'Window'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(17089,45): error TS2339: Property '__proto__' does not exist on type 'Document'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(17501,1): error TS2322: Type 'any[]' is not assignable to type 'string'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(18010,1): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(18010,29): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(19499,6): error TS2339: Property 'Util' does not exist on type 'Window'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(19585,1): error TS2322: Type 'Promise<void | { artifacts: any; auditResults: any[]; }>' is not assignable to type 'Promise<void>'.
|
||||
Type 'void | { artifacts: any; auditResults: any[]; }' is not assignable to type 'void'.
|
||||
@@ -886,7 +886,7 @@ node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighth
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(28589,5): error TS2339: Property 'removeListener' does not exist on type 'Readable'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(28590,5): error TS2339: Property 'removeListener' does not exist on type 'Readable'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(28591,5): error TS2339: Property 'removeListener' does not exist on type 'Readable'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(28746,1): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(28746,19): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(28797,6): error TS2339: Property 'emit' does not exist on type 'Readable'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(28855,19): error TS2339: Property 'emit' does not exist on type 'Readable'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(29117,47): error TS2300: Duplicate identifier '_transform'.
|
||||
@@ -2823,7 +2823,7 @@ node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighth
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(60141,1): error TS2304: Cannot find name 'WebInspector'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(60144,1): error TS2304: Cannot find name 'WebInspector'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(60162,11): error TS2304: Cannot find name 'WebInspector'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(60222,1): error TS2554: Expected 0-2 arguments, but got 3.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(60222,51): error TS2554: Expected 0-2 arguments, but got 3.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(60267,11): error TS2304: Cannot find name 'define'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(60267,32): error TS2304: Cannot find name 'define'.
|
||||
node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(60268,1): error TS2304: Cannot find name 'define'.
|
||||
@@ -3517,8 +3517,8 @@ node_modules/chrome-devtools-frontend/front_end/cm_modes/coffeescript.js(11,43):
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_modes/coffeescript.js(12,5): error TS2304: Cannot find name 'define'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_modes/coffeescript.js(41,3): error TS2740: Type 'RegExp' is missing the following properties from type 'string[]': length, pop, push, concat, and 28 more.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_modes/coffeescript.js(282,24): error TS2339: Property 'exec' does not exist on type 'string[]'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_modes/jsx.js(6,5): error TS2554: Expected 0-1 arguments, but got 3.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_modes/jsx.js(6,17): error TS2307: Cannot find module '../../lib/codemirror'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_modes/jsx.js(6,42): error TS2554: Expected 0-1 arguments, but got 3.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_modes/jsx.js(6,50): error TS2307: Cannot find module '../xml/xml'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_modes/jsx.js(6,73): error TS2307: Cannot find module '../javascript/javascript'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_modes/jsx.js(7,19): error TS2304: Cannot find name 'define'.
|
||||
@@ -3528,8 +3528,8 @@ node_modules/chrome-devtools-frontend/front_end/cm_modes/livescript.js(11,17): e
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_modes/livescript.js(12,19): error TS2304: Cannot find name 'define'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_modes/livescript.js(12,43): error TS2304: Cannot find name 'define'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_modes/livescript.js(13,5): error TS2304: Cannot find name 'define'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_modes/php.js(6,5): error TS2554: Expected 0-1 arguments, but got 3.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_modes/php.js(6,17): error TS2307: Cannot find module '../../lib/codemirror'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_modes/php.js(6,42): error TS2554: Expected 0-1 arguments, but got 3.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_modes/php.js(6,50): error TS2307: Cannot find module '../htmlmixed/htmlmixed'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_modes/php.js(6,85): error TS2307: Cannot find module '../clike/clike'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_modes/php.js(7,19): error TS2304: Cannot find name 'define'.
|
||||
@@ -3553,15 +3553,15 @@ node_modules/chrome-devtools-frontend/front_end/cm_web_modes/css.js(6,17): error
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_web_modes/css.js(7,19): error TS2304: Cannot find name 'define'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_web_modes/css.js(7,43): error TS2304: Cannot find name 'define'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_web_modes/css.js(8,5): error TS2304: Cannot find name 'define'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlembedded.js(6,5): error TS2554: Expected 0-1 arguments, but got 3.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlembedded.js(6,17): error TS2307: Cannot find module '../../lib/codemirror'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlembedded.js(6,42): error TS2554: Expected 0-1 arguments, but got 3.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlembedded.js(6,50): error TS2307: Cannot find module '../htmlmixed/htmlmixed'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlembedded.js(7,17): error TS2307: Cannot find module '../../addon/mode/multiplex'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlembedded.js(8,19): error TS2304: Cannot find name 'define'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlembedded.js(8,43): error TS2304: Cannot find name 'define'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlembedded.js(9,5): error TS2304: Cannot find name 'define'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlmixed.js(6,5): error TS2554: Expected 0-1 arguments, but got 4.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlmixed.js(6,17): error TS2307: Cannot find module '../../lib/codemirror'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlmixed.js(6,42): error TS2554: Expected 0-1 arguments, but got 4.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlmixed.js(6,50): error TS2307: Cannot find module '../xml/xml'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlmixed.js(6,73): error TS2307: Cannot find module '../javascript/javascript'.
|
||||
node_modules/chrome-devtools-frontend/front_end/cm_web_modes/htmlmixed.js(6,110): error TS2307: Cannot find module '../css/css'.
|
||||
@@ -3748,7 +3748,7 @@ node_modules/chrome-devtools-frontend/front_end/common/ParsedURL.js(152,25): err
|
||||
node_modules/chrome-devtools-frontend/front_end/common/ParsedURL.js(161,25): error TS2339: Property 'asParsedURL' does not exist on type 'string'.
|
||||
node_modules/chrome-devtools-frontend/front_end/common/ParsedURL.js(211,34): error TS2339: Property 'asParsedURL' does not exist on type 'string'.
|
||||
node_modules/chrome-devtools-frontend/front_end/common/ParsedURL.js(215,29): error TS2339: Property 'asParsedURL' does not exist on type 'string'.
|
||||
node_modules/chrome-devtools-frontend/front_end/common/ParsedURL.js(318,32): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/common/ParsedURL.js(318,49): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/common/ParsedURL.js(375,18): error TS2339: Property 'asParsedURL' does not exist on type 'String'.
|
||||
node_modules/chrome-devtools-frontend/front_end/common/SegmentedRange.js(48,37): error TS2339: Property 'lowerBound' does not exist on type 'Segment[]'.
|
||||
node_modules/chrome-devtools-frontend/front_end/common/Settings.js(49,10): error TS2339: Property 'runtime' does not exist on type 'Window'.
|
||||
@@ -3900,7 +3900,7 @@ node_modules/chrome-devtools-frontend/front_end/console/ConsoleContextSelector.j
|
||||
node_modules/chrome-devtools-frontend/front_end/console/ConsoleContextSelector.js(192,22): error TS2694: Namespace 'Common' has no exported member 'Event'.
|
||||
node_modules/chrome-devtools-frontend/front_end/console/ConsoleContextSelector.js(200,22): error TS2694: Namespace 'Common' has no exported member 'Event'.
|
||||
node_modules/chrome-devtools-frontend/front_end/console/ConsoleContextSelector.js(255,28): error TS2339: Property 'createChild' does not exist on type 'DocumentFragment'.
|
||||
node_modules/chrome-devtools-frontend/front_end/console/ConsoleContextSelector.js(256,27): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/console/ConsoleContextSelector.js(256,55): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/console/ConsoleContextSelector.js(257,31): error TS2339: Property 'createChild' does not exist on type 'DocumentFragment'.
|
||||
node_modules/chrome-devtools-frontend/front_end/console/ConsoleContextSelector.js(264,13): error TS2339: Property 'style' does not exist on type 'Element'.
|
||||
node_modules/chrome-devtools-frontend/front_end/console/ConsoleContextSelector.js(279,14): error TS2555: Expected at least 2 arguments, but got 1.
|
||||
@@ -4179,7 +4179,7 @@ node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(70
|
||||
node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(733,19): error TS2339: Property 'removeChildren' does not exist on type 'Element'.
|
||||
node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(735,35): error TS2339: Property 'createChild' does not exist on type 'Element'.
|
||||
node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(736,31): error TS2555: Expected at least 2 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(750,27): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(750,54): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(803,34): error TS2339: Property 'style' does not exist on type 'Element'.
|
||||
node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(804,31): error TS2339: Property 'style' does not exist on type 'Element'.
|
||||
node_modules/chrome-devtools-frontend/front_end/console/ConsoleViewMessage.js(806,43): error TS2339: Property 'style' does not exist on type 'Element'.
|
||||
@@ -4517,7 +4517,7 @@ node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(98,48): er
|
||||
node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(109,26): error TS2352: Conversion of type 'DataGridNode<any>' to type 'NODE_TYPE' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
|
||||
node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(121,17): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type.
|
||||
node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(123,17): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type.
|
||||
node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(134,29): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(134,45): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(135,15): error TS2339: Property 'title' does not exist on type 'Element'.
|
||||
node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(139,15): error TS2339: Property 'title' does not exist on type 'Element'.
|
||||
node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(159,33): error TS2694: Namespace 'DataGrid.DataGrid' has no exported member 'ColumnDescriptor'.
|
||||
@@ -6341,11 +6341,11 @@ node_modules/chrome-devtools-frontend/front_end/formatter_worker/FormatterWorker
|
||||
node_modules/chrome-devtools-frontend/front_end/formatter_worker/FormatterWorker.js(274,3): error TS2554: Expected 2-3 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/formatter_worker/FormatterWorker.js(287,26): error TS2339: Property 'computeLineEndings' does not exist on type 'string'.
|
||||
node_modules/chrome-devtools-frontend/front_end/formatter_worker/FormatterWorker.js(295,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'formatter' must be of type 'HTMLFormatter', but here has type 'CSSFormatter'.
|
||||
node_modules/chrome-devtools-frontend/front_end/formatter_worker/FormatterWorker.js(296,9): error TS2554: Expected 2 arguments, but got 4.
|
||||
node_modules/chrome-devtools-frontend/front_end/formatter_worker/FormatterWorker.js(296,45): error TS2554: Expected 2 arguments, but got 4.
|
||||
node_modules/chrome-devtools-frontend/front_end/formatter_worker/FormatterWorker.js(299,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'formatter' must be of type 'HTMLFormatter', but here has type 'JavaScriptFormatter'.
|
||||
node_modules/chrome-devtools-frontend/front_end/formatter_worker/FormatterWorker.js(300,9): error TS2554: Expected 2 arguments, but got 4.
|
||||
node_modules/chrome-devtools-frontend/front_end/formatter_worker/FormatterWorker.js(300,45): error TS2554: Expected 2 arguments, but got 4.
|
||||
node_modules/chrome-devtools-frontend/front_end/formatter_worker/FormatterWorker.js(303,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'formatter' must be of type 'HTMLFormatter', but here has type 'IdentityFormatter'.
|
||||
node_modules/chrome-devtools-frontend/front_end/formatter_worker/FormatterWorker.js(304,9): error TS2554: Expected 2 arguments, but got 4.
|
||||
node_modules/chrome-devtools-frontend/front_end/formatter_worker/FormatterWorker.js(304,45): error TS2554: Expected 2 arguments, but got 4.
|
||||
node_modules/chrome-devtools-frontend/front_end/formatter_worker/FormatterWorker.js(313,3): error TS2554: Expected 2-3 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/formatter_worker/FormatterWorker.js(334,24): error TS2339: Property 'runtime' does not exist on type 'Window'.
|
||||
node_modules/chrome-devtools-frontend/front_end/formatter_worker/HTMLFormatter.js(98,21): error TS2339: Property 'isWhitespace' does not exist on type 'string'.
|
||||
@@ -7755,7 +7755,7 @@ node_modules/chrome-devtools-frontend/front_end/object_ui/JavaScriptAutocomplete
|
||||
node_modules/chrome-devtools-frontend/front_end/object_ui/JavaScriptAutocomplete.js(471,33): error TS2339: Property 'CompletionGroup' does not exist on type 'typeof JavaScriptAutocomplete'.
|
||||
node_modules/chrome-devtools-frontend/front_end/object_ui/ObjectPopoverHelper.js(82,35): error TS2694: Namespace 'SDK.DebuggerModel' has no exported member 'FunctionDetails'.
|
||||
node_modules/chrome-devtools-frontend/front_end/object_ui/ObjectPopoverHelper.js(91,29): error TS2339: Property 'createChild' does not exist on type 'Element'.
|
||||
node_modules/chrome-devtools-frontend/front_end/object_ui/ObjectPopoverHelper.js(108,23): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/object_ui/ObjectPopoverHelper.js(108,50): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/object_ui/ObjectPopoverHelper.js(114,48): error TS2339: Property 'createChild' does not exist on type 'Element'.
|
||||
node_modules/chrome-devtools-frontend/front_end/object_ui/ObjectPopoverHelper.js(129,7): error TS2722: Cannot invoke an object which is possibly 'undefined'.
|
||||
node_modules/chrome-devtools-frontend/front_end/object_ui/ObjectPopoverHelper.js(145,50): error TS2339: Property 'createChild' does not exist on type 'Element'.
|
||||
@@ -7768,7 +7768,7 @@ node_modules/chrome-devtools-frontend/front_end/object_ui/ObjectPropertiesSectio
|
||||
node_modules/chrome-devtools-frontend/front_end/object_ui/ObjectPropertiesSection.js(181,18): error TS2339: Property 'title' does not exist on type 'Element'.
|
||||
node_modules/chrome-devtools-frontend/front_end/object_ui/ObjectPropertiesSection.js(207,22): error TS2339: Property 'createChild' does not exist on type 'Element'.
|
||||
node_modules/chrome-devtools-frontend/front_end/object_ui/ObjectPropertiesSection.js(209,22): error TS2339: Property 'createTextChild' does not exist on type 'Element'.
|
||||
node_modules/chrome-devtools-frontend/front_end/object_ui/ObjectPropertiesSection.js(209,38): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/object_ui/ObjectPropertiesSection.js(209,58): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/object_ui/ObjectPropertiesSection.js(211,22): error TS2339: Property 'createTextChild' does not exist on type 'Element'.
|
||||
node_modules/chrome-devtools-frontend/front_end/object_ui/ObjectPropertiesSection.js(263,20): error TS2339: Property 'title' does not exist on type 'Element'.
|
||||
node_modules/chrome-devtools-frontend/front_end/object_ui/ObjectPropertiesSection.js(268,22): error TS2339: Property 'setTextContentTruncatedIfNeeded' does not exist on type 'Element'.
|
||||
@@ -8079,12 +8079,12 @@ node_modules/chrome-devtools-frontend/front_end/perf_ui/TimelineOverviewPane.js(
|
||||
node_modules/chrome-devtools-frontend/front_end/perf_ui/TimelineOverviewPane.js(490,39): error TS2345: Argument of type 'symbol' is not assignable to parameter of type 'boolean'.
|
||||
node_modules/chrome-devtools-frontend/front_end/perf_ui/TimelineOverviewPane.js(495,14): error TS2339: Property 'createChild' does not exist on type 'DocumentFragment'.
|
||||
node_modules/chrome-devtools-frontend/front_end/perf_ui/TimelineOverviewPane.js(508,61): error TS2339: Property 'boxInWindow' does not exist on type 'Element'.
|
||||
node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(74,36): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(74,72): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(81,20): error TS2339: Property 'timeline' does not exist on type 'any[]'.
|
||||
node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(91,33): error TS2339: Property 'timeline' does not exist on type 'any[]'.
|
||||
node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(98,5): error TS2554: Expected 2 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(108,20): error TS2339: Property 'timeline' does not exist on type 'any[]'.
|
||||
node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(120,43): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(120,79): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(130,13): error TS2339: Property 'timeline' does not exist on type 'any[]'.
|
||||
node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(131,97): error TS2339: Property 'timeline' does not exist on type 'any[]'.
|
||||
node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(135,35): error TS2339: Property 'timeline' does not exist on type 'any[]'.
|
||||
@@ -8093,7 +8093,7 @@ node_modules/chrome-devtools-frontend/front_end/performance_test_runner/Timeline
|
||||
node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(159,9): error TS2554: Expected 2 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(189,60): error TS2339: Property 'timeline' does not exist on type 'any[]'.
|
||||
node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(220,44): error TS2339: Property 'peekLast' does not exist on type 'any[]'.
|
||||
node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(254,19): error TS2554: Expected 2 arguments, but got 3.
|
||||
node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(255,46): error TS2554: Expected 2 arguments, but got 3.
|
||||
node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(321,53): error TS2345: Argument of type 'number' is not assignable to parameter of type 'V'.
|
||||
node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(347,30): error TS2339: Property 'timeline' does not exist on type 'any[]'.
|
||||
node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(355,13): error TS2339: Property 'timeline' does not exist on type 'any[]'.
|
||||
@@ -8309,7 +8309,7 @@ node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1277,40):
|
||||
node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1299,35): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.
|
||||
node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1321,12): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type.
|
||||
node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1324,6): error TS2339: Property 'setImmediate' does not exist on type 'Window'.
|
||||
node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1326,32): error TS2556: Expected 0 arguments, but got 1 or more.
|
||||
node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1326,41): error TS2556: Expected 0 arguments, but got 1 or more.
|
||||
node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1331,12): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type.
|
||||
node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1335,19): error TS2339: Property 'spread' does not exist on type 'Promise<any>'.
|
||||
node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1348,19): error TS2339: Property 'catchException' does not exist on type 'Promise<any>'.
|
||||
@@ -10421,7 +10421,7 @@ node_modules/chrome-devtools-frontend/front_end/sdk/ServerTiming.js(134,32): err
|
||||
node_modules/chrome-devtools-frontend/front_end/sdk/ServerTiming.js(139,30): error TS2345: Argument of type 'TemplateStringsArray' is not assignable to parameter of type 'string | string[]'.
|
||||
Type 'TemplateStringsArray' is not assignable to type 'string[]'.
|
||||
node_modules/chrome-devtools-frontend/front_end/sdk/ServerTiming.js(149,24): error TS2554: Expected 2 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/sdk/ServerTiming.js(165,32): error TS2554: Expected 2 arguments, but got 3.
|
||||
node_modules/chrome-devtools-frontend/front_end/sdk/ServerTiming.js(165,78): error TS2554: Expected 2 arguments, but got 3.
|
||||
node_modules/chrome-devtools-frontend/front_end/sdk/ServerTiming.js(186,25): error TS2555: Expected at least 2 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/sdk/ServiceWorkerCacheModel.js(15,12): error TS2339: Property 'registerStorageDispatcher' does not exist on type 'Target'.
|
||||
node_modules/chrome-devtools-frontend/front_end/sdk/ServiceWorkerCacheModel.js(20,31): error TS2339: Property 'cacheStorageAgent' does not exist on type 'Target'.
|
||||
@@ -11055,7 +11055,7 @@ node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSid
|
||||
node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(80,71): error TS2339: Property 'uiLocation' does not exist on type 'V'.
|
||||
node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(81,60): error TS2339: Property 'breakpoint' does not exist on type 'V'.
|
||||
node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(82,62): error TS2339: Property 'breakpoint' does not exist on type 'V'.
|
||||
node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(131,38): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(131,55): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(141,29): error TS2339: Property 'enclosingNodeOrSelfWithClass' does not exist on type 'EventTarget'.
|
||||
node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(156,33): error TS2339: Property 'checkboxElement' does not exist on type 'EventTarget'.
|
||||
node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(159,11): error TS2339: Property 'consume' does not exist on type 'Event'.
|
||||
@@ -11544,8 +11544,8 @@ node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/addons/fit/fit
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(1,107): error TS2304: Cannot find name 'define'.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(1,128): error TS2304: Cannot find name 'define'.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(1,140): error TS2304: Cannot find name 'define'.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(1,482): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(1,502): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(1,486): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(1,506): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(1,564): error TS2339: Property 'code' does not exist on type 'Error'.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3,1): error TS2323: Cannot redeclare exported variable '__esModule'.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(166,1): error TS2323: Cannot redeclare exported variable '__esModule'.
|
||||
@@ -11617,12 +11617,12 @@ node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3498,10): error TS2339: Property 'emit' does not exist on type 'Terminal'.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3515,14): error TS2339: Property 'emit' does not exist on type 'Terminal'.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3528,20): error TS2300: Duplicate identifier 'write'.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3569,5): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3569,16): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3623,21): error TS2339: Property 'cancel' does not exist on type 'Terminal'.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3629,14): error TS2339: Property 'cancel' does not exist on type 'Terminal'.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3634,10): error TS2339: Property 'emit' does not exist on type 'Terminal'.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3635,10): error TS2339: Property 'emit' does not exist on type 'Terminal'.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3637,5): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3637,18): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3638,17): error TS2339: Property 'cancel' does not exist on type 'Terminal'.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3675,40): error TS2339: Property 'browser' does not exist on type 'Terminal'.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3689,40): error TS2339: Property 'browser' does not exist on type 'Terminal'.
|
||||
@@ -11630,8 +11630,8 @@ node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3919,10): error TS2339: Property 'cancel' does not exist on type 'Terminal'.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3936,10): error TS2339: Property 'emit' does not exist on type 'Terminal'.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3937,10): error TS2339: Property 'emit' does not exist on type 'Terminal'.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3939,5): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3946,13): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3939,18): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3946,26): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3953,15): error TS2339: Property 'visualBell' does not exist on type 'Terminal'.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3960,14): error TS2339: Property 'popOnBell' does not exist on type 'Terminal'.
|
||||
node_modules/chrome-devtools-frontend/front_end/terminal/xterm.js/build/xterm.js(3964,15): error TS2339: Property 'debug' does not exist on type 'Terminal'.
|
||||
@@ -13401,7 +13401,7 @@ node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(1561,11): error TS
|
||||
node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(1562,17): error TS2339: Property 'value' does not exist on type 'Element'.
|
||||
node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(1570,25): error TS2339: Property 'value' does not exist on type 'Element'.
|
||||
node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(1574,11): error TS2339: Property 'value' does not exist on type 'Element'.
|
||||
node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(1633,64): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(1633,77): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(1646,40): error TS2339: Property '_textWidthCache' does not exist on type '(context: CanvasRenderingContext2D, text: string) => number'.
|
||||
node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(1649,25): error TS2339: Property '_textWidthCache' does not exist on type '(context: CanvasRenderingContext2D, text: string) => number'.
|
||||
node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(1715,20): error TS2339: Property 'type' does not exist on type 'Element'.
|
||||
|
||||
@@ -5,8 +5,8 @@ node_modules/debug/dist/debug.js(3,165): error TS2539: Cannot assign to '_typeof
|
||||
node_modules/debug/dist/debug.js(8,21): error TS2304: Cannot find name 'define'.
|
||||
node_modules/debug/dist/debug.js(8,46): error TS2304: Cannot find name 'define'.
|
||||
node_modules/debug/dist/debug.js(9,5): error TS2304: Cannot find name 'define'.
|
||||
node_modules/debug/dist/debug.js(33,33): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/debug/dist/debug.js(34,27): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/debug/dist/debug.js(33,38): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/debug/dist/debug.js(34,32): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/debug/dist/debug.js(36,21): error TS2339: Property 'code' does not exist on type 'Error'.
|
||||
node_modules/debug/dist/debug.js(89,38): error TS2339: Property 'length' does not exist on type 'string | number'.
|
||||
Property 'length' does not exist on type 'number'.
|
||||
|
||||
@@ -7,7 +7,7 @@ node_modules/graceful-fs/clone.js(15,38): error TS2345: Argument of type 'Proper
|
||||
node_modules/graceful-fs/graceful-fs.js(14,3): error TS2322: Type '(msg: string, ...param: any[]) => void' is not assignable to type '() => void'.
|
||||
node_modules/graceful-fs/graceful-fs.js(17,37): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any, ...any[]]'.
|
||||
Type 'IArguments' is missing the following properties from type '[any, ...any[]]': 0, pop, push, concat, and 27 more.
|
||||
node_modules/graceful-fs/graceful-fs.js(24,5): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/graceful-fs/graceful-fs.js(24,11): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/graceful-fs/graceful-fs.js(30,54): error TS2339: Property '__patched' does not exist on type 'typeof import("fs")'.
|
||||
node_modules/graceful-fs/graceful-fs.js(32,8): error TS2339: Property '__patched' does not exist on type 'typeof import("fs")'.
|
||||
node_modules/graceful-fs/graceful-fs.js(52,37): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[number]'.
|
||||
@@ -17,8 +17,8 @@ node_modules/graceful-fs/graceful-fs.js(175,5): error TS2539: Cannot assign to '
|
||||
node_modules/graceful-fs/graceful-fs.js(197,68): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, any?, ...any[]]'.
|
||||
Type 'IArguments' is missing the following properties from type '[any?, any?, ...any[]]': pop, push, concat, join, and 26 more.
|
||||
node_modules/graceful-fs/graceful-fs.js(220,70): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, any?, ...any[]]'.
|
||||
node_modules/graceful-fs/graceful-fs.js(269,3): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/graceful-fs/graceful-fs.js(276,5): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/graceful-fs/graceful-fs.js(269,9): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/graceful-fs/graceful-fs.js(276,11): error TS2554: Expected 0 arguments, but got 3.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ node_modules/lodash/_baseClone.js(128,43): error TS2345: Argument of type 'numbe
|
||||
node_modules/lodash/_baseClone.js(157,17): error TS2552: Cannot find name 'keysIn'. Did you mean 'keys'?
|
||||
node_modules/lodash/_baseDifference.js(37,5): error TS2322: Type '(array?: any[] | undefined, value: any, comparator: Function) => boolean' is not assignable to type '(array?: any[] | undefined, value: any) => boolean'.
|
||||
node_modules/lodash/_baseDifference.js(43,5): error TS2740: Type 'SetCache' is missing the following properties from type 'any[]': length, pop, concat, join, and 27 more.
|
||||
node_modules/lodash/_baseDifference.js(60,15): error TS2554: Expected 2 arguments, but got 3.
|
||||
node_modules/lodash/_baseDifference.js(60,42): error TS2554: Expected 2 arguments, but got 3.
|
||||
node_modules/lodash/_baseFlatten.js(19,29): error TS2322: Type '(value: any) => boolean' is not assignable to type 'boolean | undefined'.
|
||||
Type '(value: any) => boolean' is not assignable to type 'true'.
|
||||
node_modules/lodash/_baseFlatten.js(24,22): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'Boolean' has no compatible call signatures.
|
||||
@@ -72,18 +72,18 @@ node_modules/lodash/_baseSlice.js(26,35): error TS2532: Object is possibly 'unde
|
||||
node_modules/lodash/_baseSortBy.js(14,14): error TS2345: Argument of type 'Function' is not assignable to parameter of type '(a: any, b: any) => number'.
|
||||
Type 'Function' provides no match for the signature '(a: any, b: any): number'.
|
||||
node_modules/lodash/_baseUniq.js(30,5): error TS2322: Type '(array?: any[] | undefined, value: any, comparator: Function) => boolean' is not assignable to type '(array?: any[] | undefined, value: any) => boolean'.
|
||||
node_modules/lodash/_baseUniq.js(33,33): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/_baseUniq.js(33,43): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/_baseUniq.js(39,5): error TS2322: Type 'SetCache' is not assignable to type 'any[]'.
|
||||
node_modules/lodash/_baseUniq.js(62,15): error TS2554: Expected 2 arguments, but got 3.
|
||||
node_modules/lodash/_baseUniq.js(62,40): error TS2554: Expected 2 arguments, but got 3.
|
||||
node_modules/lodash/_baseWrapperValue.js(18,21): error TS2339: Property 'value' does not exist on type 'LazyWrapper'.
|
||||
node_modules/lodash/_cloneArrayBuffer.js(11,16): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
node_modules/lodash/_cloneBuffer.js(4,69): error TS2339: Property 'nodeType' does not exist on type '(buffer: any, isDeep?: boolean | undefined) => any'.
|
||||
node_modules/lodash/_cloneBuffer.js(7,80): error TS2339: Property 'nodeType' does not exist on type '{ "../../../tests/cases/user/lodash/node_modules/lodash/_cloneBuffer": (buffer: any, isDeep?: boolean | undefined) => any; }'.
|
||||
node_modules/lodash/_cloneBuffer.js(22,14): error TS2577: Return type annotation circularly references itself.
|
||||
node_modules/lodash/_cloneBuffer.js(24,22): error TS2502: 'buffer' is referenced directly or indirectly in its own type annotation.
|
||||
node_modules/lodash/_copySymbols.js(13,29): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/_copySymbolsIn.js(13,29): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/_createAggregator.js(19,37): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/_copySymbols.js(13,40): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/_copySymbolsIn.js(13,42): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/_createAggregator.js(19,60): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/_createCompounder.js(20,24): error TS2554: Expected 3 arguments, but got 1.
|
||||
node_modules/lodash/_createCtor.js(19,22): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
node_modules/lodash/_createCtor.js(20,22): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
@@ -94,11 +94,11 @@ node_modules/lodash/_createCtor.js(24,22): error TS2351: Cannot use 'new' with a
|
||||
node_modules/lodash/_createCtor.js(25,22): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
node_modules/lodash/_createCtor.js(26,22): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
node_modules/lodash/_createCurry.js(37,46): error TS2339: Property 'placeholder' does not exist on type '(...args: any[]) => any'.
|
||||
node_modules/lodash/_createFind.js(16,22): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/_createFind.js(16,46): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/_createFind.js(21,34): error TS2454: Variable 'iteratee' is used before being assigned.
|
||||
node_modules/lodash/_createFlow.js(38,22): error TS2454: Variable 'wrapper' is used before being assigned.
|
||||
node_modules/lodash/_createFlow.js(42,13): error TS2454: Variable 'wrapper' is used before being assigned.
|
||||
node_modules/lodash/_createFlow.js(47,42): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/_createFlow.js(47,50): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/_createFlow.js(53,19): error TS2454: Variable 'wrapper' is used before being assigned.
|
||||
node_modules/lodash/_createFlow.js(53,55): error TS2454: Variable 'wrapper' is used before being assigned.
|
||||
node_modules/lodash/_createFlow.js(56,13): error TS2454: Variable 'wrapper' is used before being assigned.
|
||||
@@ -121,7 +121,7 @@ node_modules/lodash/_createHybrid.js(73,38): error TS2538: Type 'Function' canno
|
||||
node_modules/lodash/_createHybrid.js(81,18): error TS2532: Object is possibly 'undefined'.
|
||||
node_modules/lodash/_createHybrid.js(82,7): error TS2322: Type 'number | undefined' is not assignable to type 'number'.
|
||||
Type 'undefined' is not assignable to type 'number'.
|
||||
node_modules/lodash/_createWrap.js(71,38): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/_createWrap.js(71,46): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/_createWrap.js(94,29): error TS2345: Argument of type 'TimerHandler' is not assignable to parameter of type 'Function'.
|
||||
Type 'string' is not assignable to type 'Function'.
|
||||
node_modules/lodash/_createWrap.js(96,26): error TS2345: Argument of type 'TimerHandler' is not assignable to parameter of type 'Function'.
|
||||
@@ -140,7 +140,7 @@ node_modules/lodash/_equalByTag.js(86,7): error TS2454: Variable 'convert' is us
|
||||
node_modules/lodash/_equalObjects.js(70,18): error TS2322: Type 'boolean' is not assignable to type 'number'.
|
||||
node_modules/lodash/_getHolder.js(10,17): error TS2339: Property 'placeholder' does not exist on type 'Function'.
|
||||
node_modules/lodash/_getRawTag.js(36,7): error TS2454: Variable 'unmasked' is used before being assigned.
|
||||
node_modules/lodash/_getSymbolsIn.js(19,23): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/_getSymbolsIn.js(19,34): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/_hasPath.js(35,50): error TS2454: Variable 'key' is used before being assigned.
|
||||
node_modules/lodash/_hashDelete.js(7,20): error TS8024: JSDoc '@param' tag has name 'hash', but there is no parameter with that name.
|
||||
node_modules/lodash/_initCloneArray.js(16,16): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
@@ -149,7 +149,7 @@ node_modules/lodash/_initCloneArray.js(21,26): error TS2339: Property 'input' do
|
||||
node_modules/lodash/_insertWrapDetails.js(10,5): error TS1223: 'returns' tag already specified.
|
||||
node_modules/lodash/_insertWrapDetails.js(15,5): error TS2322: Type 'string' is not assignable to type 'any[]'.
|
||||
node_modules/lodash/_insertWrapDetails.js(20,3): error TS2322: Type 'string' is not assignable to type 'any[]'.
|
||||
node_modules/lodash/_isLaziable.js(24,14): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/_isLaziable.js(24,22): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/_isLaziable.js(25,12): error TS1345: An expression of type 'void' cannot be tested for truthiness
|
||||
node_modules/lodash/_memoizeCapped.js(22,22): error TS2339: Property 'cache' does not exist on type 'Function'.
|
||||
node_modules/lodash/_mergeData.js(60,26): error TS2554: Expected 4 arguments, but got 3.
|
||||
@@ -198,7 +198,7 @@ node_modules/lodash/core.js(721,13): error TS2403: Subsequent variable declarati
|
||||
node_modules/lodash/core.js(749,18): error TS8024: JSDoc '@param' tag has name 'value', but there is no parameter with that name.
|
||||
node_modules/lodash/core.js(811,53): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
|
||||
node_modules/lodash/core.js(826,24): error TS8024: JSDoc '@param' tag has name 'paths', but there is no parameter with that name.
|
||||
node_modules/lodash/core.js(848,12): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/lodash/core.js(848,57): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/lodash/core.js(864,9): error TS2532: Object is possibly 'undefined'.
|
||||
node_modules/lodash/core.js(865,16): error TS2532: Object is possibly 'undefined'.
|
||||
node_modules/lodash/core.js(865,47): error TS2532: Object is possibly 'undefined'.
|
||||
@@ -212,11 +212,11 @@ node_modules/lodash/core.js(871,40): error TS2532: Object is possibly 'undefined
|
||||
node_modules/lodash/core.js(872,5): error TS2532: Object is possibly 'undefined'.
|
||||
node_modules/lodash/core.js(876,37): error TS2532: Object is possibly 'undefined'.
|
||||
node_modules/lodash/core.js(886,22): error TS8024: JSDoc '@param' tag has name 'array', but there is no parameter with that name.
|
||||
node_modules/lodash/core.js(1118,24): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/lodash/core.js(1118,48): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/lodash/core.js(1123,36): error TS2454: Variable 'iteratee' is used before being assigned.
|
||||
node_modules/lodash/core.js(1313,20): error TS2322: Type 'boolean' is not assignable to type 'number'.
|
||||
node_modules/lodash/core.js(1338,12): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/lodash/core.js(1349,30): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/core.js(1338,60): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/lodash/core.js(1349,42): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/core.js(1434,23): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'.
|
||||
Type 'undefined' is not assignable to type 'number'.
|
||||
node_modules/lodash/core.js(1438,44): error TS2532: Object is possibly 'undefined'.
|
||||
@@ -224,7 +224,7 @@ node_modules/lodash/core.js(1442,29): error TS2532: Object is possibly 'undefine
|
||||
node_modules/lodash/core.js(1445,29): error TS2532: Object is possibly 'undefined'.
|
||||
node_modules/lodash/core.js(1446,24): error TS2532: Object is possibly 'undefined'.
|
||||
node_modules/lodash/core.js(1449,17): error TS2538: Type 'undefined' cannot be used as an index type.
|
||||
node_modules/lodash/core.js(1566,33): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/lodash/core.js(1566,57): error TS2554: Expected 1 arguments, but got 2.
|
||||
node_modules/lodash/core.js(1709,41): error TS2532: Object is possibly 'undefined'.
|
||||
node_modules/lodash/core.js(1745,18): error TS2348: Value of type 'typeof lodash' is not callable. Did you mean to include 'new'?
|
||||
node_modules/lodash/core.js(1872,12): error TS1003: Identifier expected.
|
||||
@@ -232,8 +232,8 @@ node_modules/lodash/core.js(1872,12): error TS8024: JSDoc '@param' tag has name
|
||||
node_modules/lodash/core.js(2142,12): error TS1003: Identifier expected.
|
||||
node_modules/lodash/core.js(2142,12): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
|
||||
node_modules/lodash/core.js(2183,41): error TS8024: JSDoc '@param' tag has name 'iteratees', but there is no parameter with that name.
|
||||
node_modules/lodash/core.js(2473,21): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/core.js(2609,39): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/core.js(2473,37): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/core.js(2609,51): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/lodash/core.js(2644,12): error TS2554: Expected 3-5 arguments, but got 2.
|
||||
node_modules/lodash/core.js(3245,58): error TS2345: Argument of type 'string | any[]' is not assignable to parameter of type 'string | number | symbol'.
|
||||
Type 'any[]' is not assignable to type 'string | number | symbol'.
|
||||
@@ -266,24 +266,24 @@ node_modules/lodash/difference.js(29,52): error TS2345: Argument of type '(value
|
||||
Type '(value: any) => boolean' is not assignable to type 'true'.
|
||||
node_modules/lodash/differenceBy.js(40,52): error TS2345: Argument of type '(value: any) => boolean' is not assignable to parameter of type 'boolean | undefined'.
|
||||
Type '(value: any) => boolean' is not assignable to type 'true'.
|
||||
node_modules/lodash/differenceBy.js(40,78): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/differenceBy.js(40,101): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/differenceWith.js(36,52): error TS2345: Argument of type '(value: any) => boolean' is not assignable to parameter of type 'boolean | undefined'.
|
||||
Type '(value: any) => boolean' is not assignable to type 'true'.
|
||||
node_modules/lodash/drop.js(13,10): error TS1003: Identifier expected.
|
||||
node_modules/lodash/drop.js(13,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
|
||||
node_modules/lodash/dropRight.js(13,10): error TS1003: Identifier expected.
|
||||
node_modules/lodash/dropRight.js(13,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
|
||||
node_modules/lodash/dropRightWhile.js(41,24): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/dropWhile.js(41,24): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/dropRightWhile.js(41,48): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/dropWhile.js(41,48): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/escape.js(39,39): error TS2345: Argument of type 'Function' is not assignable to parameter of type '(substring: string, ...args: any[]) => string'.
|
||||
node_modules/lodash/every.js(23,10): error TS1003: Identifier expected.
|
||||
node_modules/lodash/every.js(23,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
|
||||
node_modules/lodash/every.js(53,27): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/filter.js(45,27): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/findIndex.js(52,31): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/findKey.js(41,30): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/findLastIndex.js(56,31): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/findLastKey.js(41,30): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/every.js(53,51): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/filter.js(45,51): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/findIndex.js(52,55): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/findKey.js(41,54): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/findLastIndex.js(56,55): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/findLastKey.js(41,54): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/fp.js(2,18): error TS2554: Expected 3-4 arguments, but got 2.
|
||||
node_modules/lodash/fp/_baseConvert.js(143,5): error TS2559: Type 'Function' has no properties in common with type '{ cap?: boolean; curry?: boolean; fixed?: boolean; immutable?: boolean; rearg?: boolean; }'.
|
||||
node_modules/lodash/fp/_baseConvert.js(144,5): error TS2322: Type 'string' is not assignable to type 'Function'.
|
||||
@@ -341,24 +341,24 @@ node_modules/lodash/fp/string.js(2,26): error TS2345: Argument of type '{ 'camel
|
||||
node_modules/lodash/fp/util.js(2,26): error TS2345: Argument of type '{ 'attempt': Function; 'bindAll': Function; 'cond': (pairs: any[]) => Function; 'conforms': (source: any) => Function; 'constant': (value: any) => Function; 'defaultTo': (value: any, defaultValue: any) => any; ... 25 more ...; 'uniqueId': (prefix?: string | undefined) => string; }' is not assignable to parameter of type 'string'.
|
||||
node_modules/lodash/includes.js(24,10): error TS1003: Identifier expected.
|
||||
node_modules/lodash/includes.js(24,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
|
||||
node_modules/lodash/intersectionBy.js(41,32): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/intersectionBy.js(41,55): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/isBuffer.js(8,80): error TS2339: Property 'nodeType' does not exist on type '{ "../../../tests/cases/user/lodash/node_modules/lodash/isBuffer": any; }'.
|
||||
node_modules/lodash/isEqual.js(32,10): error TS2554: Expected 3-5 arguments, but got 2.
|
||||
node_modules/lodash/isEqualWith.js(38,59): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'boolean'.
|
||||
node_modules/lodash/iteratee.js(50,74): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
|
||||
node_modules/lodash/keys.js(34,32): error TS2554: Expected 2 arguments, but got 1.
|
||||
node_modules/lodash/map.js(50,27): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/mapKeys.js(28,14): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/map.js(50,50): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/mapKeys.js(28,37): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/mapKeys.js(31,29): error TS2722: Cannot invoke an object which is possibly 'undefined'.
|
||||
node_modules/lodash/mapValues.js(35,14): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/mapValues.js(35,37): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/mapValues.js(38,34): error TS2722: Cannot invoke an object which is possibly 'undefined'.
|
||||
node_modules/lodash/matches.js(36,40): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
|
||||
node_modules/lodash/matchesProperty.js(34,30): error TS2345: Argument of type 'string | any[]' is not assignable to parameter of type 'string'.
|
||||
Type 'any[]' is not assignable to type 'string'.
|
||||
node_modules/lodash/matchesProperty.js(34,56): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
|
||||
node_modules/lodash/maxBy.js(30,27): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/meanBy.js(28,26): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/minBy.js(30,27): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/maxBy.js(30,50): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/meanBy.js(28,49): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/minBy.js(30,50): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/mixin.js(49,49): error TS2532: Object is possibly 'undefined'.
|
||||
node_modules/lodash/mixin.js(66,61): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
|
||||
node_modules/lodash/nthArg.js(28,26): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'.
|
||||
@@ -374,11 +374,11 @@ node_modules/lodash/pickBy.js(33,12): error TS2722: Cannot invoke an object whic
|
||||
node_modules/lodash/plant.js(42,21): error TS2339: Property '__wrapped__' does not exist on type '{}'.
|
||||
node_modules/lodash/property.js(29,37): error TS2345: Argument of type 'string | symbol' is not assignable to parameter of type 'string'.
|
||||
Type 'symbol' is not assignable to type 'string'.
|
||||
node_modules/lodash/pullAllBy.js(29,34): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/reduce.js(48,27): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/reduceRight.js(33,27): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/reject.js(43,34): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/remove.js(41,15): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/pullAllBy.js(29,57): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/reduce.js(48,50): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/reduceRight.js(33,50): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/reject.js(43,58): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/remove.js(41,39): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/repeat.js(15,10): error TS1003: Identifier expected.
|
||||
node_modules/lodash/repeat.js(15,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
|
||||
node_modules/lodash/replace.js(15,29): error TS8029: JSDoc '@param' tag has name 'replacement', but there is no parameter with that name. It would match 'arguments' if it had an array type.
|
||||
@@ -386,19 +386,19 @@ node_modules/lodash/sampleSize.js(17,10): error TS1003: Identifier expected.
|
||||
node_modules/lodash/sampleSize.js(17,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
|
||||
node_modules/lodash/some.js(18,10): error TS1003: Identifier expected.
|
||||
node_modules/lodash/some.js(18,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
|
||||
node_modules/lodash/some.js(48,27): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/sortedIndexBy.js(30,42): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/sortedLastIndexBy.js(30,42): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/sortedUniqBy.js(22,29): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/some.js(48,51): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/sortedIndexBy.js(30,65): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/sortedLastIndexBy.js(30,65): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/sortedUniqBy.js(22,52): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/split.js(33,5): error TS2322: Type 'undefined' is not assignable to type 'string | RegExp'.
|
||||
node_modules/lodash/spread.js(53,22): error TS2538: Type 'undefined' cannot be used as an index type.
|
||||
node_modules/lodash/sumBy.js(29,22): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/sumBy.js(29,45): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/take.js(13,10): error TS1003: Identifier expected.
|
||||
node_modules/lodash/take.js(13,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
|
||||
node_modules/lodash/takeRight.js(13,10): error TS1003: Identifier expected.
|
||||
node_modules/lodash/takeRight.js(13,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
|
||||
node_modules/lodash/takeRightWhile.js(41,24): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/takeWhile.js(41,24): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/takeRightWhile.js(41,48): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/takeWhile.js(41,48): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/template.js(65,10): error TS1003: Identifier expected.
|
||||
node_modules/lodash/template.js(65,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
|
||||
node_modules/lodash/template.js(146,34): error TS2532: Object is possibly 'undefined'.
|
||||
@@ -419,7 +419,7 @@ node_modules/lodash/throttle.js(62,31): error TS2345: Argument of type '{ 'leadi
|
||||
Type 'undefined' is not assignable to type 'number'.
|
||||
node_modules/lodash/toLower.js(11,21): error TS8024: JSDoc '@param' tag has name 'string', but there is no parameter with that name.
|
||||
node_modules/lodash/toUpper.js(11,21): error TS8024: JSDoc '@param' tag has name 'string', but there is no parameter with that name.
|
||||
node_modules/lodash/transform.js(46,14): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/transform.js(46,37): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/transform.js(60,12): error TS2722: Cannot invoke an object which is possibly 'undefined'.
|
||||
node_modules/lodash/trim.js(20,10): error TS1003: Identifier expected.
|
||||
node_modules/lodash/trim.js(20,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
|
||||
@@ -438,16 +438,16 @@ node_modules/lodash/union.js(23,42): error TS2345: Argument of type '(value: any
|
||||
Type '(value: any) => boolean' is not assignable to type 'true'.
|
||||
node_modules/lodash/unionBy.js(36,42): error TS2345: Argument of type '(value: any) => boolean' is not assignable to parameter of type 'boolean | undefined'.
|
||||
Type '(value: any) => boolean' is not assignable to type 'true'.
|
||||
node_modules/lodash/unionBy.js(36,68): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/unionBy.js(36,91): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/unionWith.js(31,42): error TS2345: Argument of type '(value: any) => boolean' is not assignable to parameter of type 'boolean | undefined'.
|
||||
Type '(value: any) => boolean' is not assignable to type 'true'.
|
||||
node_modules/lodash/uniqBy.js(28,52): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/uniqBy.js(28,75): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/words.js(15,10): error TS1003: Identifier expected.
|
||||
node_modules/lodash/words.js(15,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name.
|
||||
node_modules/lodash/wrapperAt.js(34,17): error TS2339: Property 'slice' does not exist on type 'LazyWrapper'.
|
||||
node_modules/lodash/wrapperAt.js(40,51): error TS2339: Property 'thru' does not exist on type 'LodashWrapper'.
|
||||
node_modules/lodash/wrapperReverse.js(33,23): error TS2339: Property 'reverse' does not exist on type 'LazyWrapper'.
|
||||
node_modules/lodash/xorBy.js(36,58): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/lodash/xorBy.js(36,81): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -17,19 +17,19 @@ node_modules/minimatch/minimatch.js(575,28): error TS2532: Object is possibly 'u
|
||||
node_modules/minimatch/minimatch.js(575,31): error TS2339: Property 'reEnd' does not exist on type '{ type: any; start: number; reStart: number; open: any; close: any; }'.
|
||||
node_modules/minimatch/minimatch.js(631,10): error TS2339: Property '_glob' does not exist on type 'RegExp'.
|
||||
node_modules/minimatch/minimatch.js(632,10): error TS2339: Property '_src' does not exist on type 'RegExp'.
|
||||
node_modules/minimatch/minimatch.js(763,3): error TS2554: Expected 0 arguments, but got 2.
|
||||
node_modules/minimatch/minimatch.js(766,3): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/minimatch/minimatch.js(774,5): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/minimatch/minimatch.js(778,5): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/minimatch/minimatch.js(785,7): error TS2554: Expected 0 arguments, but got 2.
|
||||
node_modules/minimatch/minimatch.js(812,9): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/minimatch/minimatch.js(830,9): error TS2554: Expected 0 arguments, but got 6.
|
||||
node_modules/minimatch/minimatch.js(834,11): error TS2554: Expected 0 arguments, but got 4.
|
||||
node_modules/minimatch/minimatch.js(842,13): error TS2554: Expected 0 arguments, but got 5.
|
||||
node_modules/minimatch/minimatch.js(847,11): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/minimatch/minimatch.js(857,9): error TS2554: Expected 0 arguments, but got 5.
|
||||
node_modules/minimatch/minimatch.js(873,7): error TS2554: Expected 0 arguments, but got 4.
|
||||
node_modules/minimatch/minimatch.js(876,7): error TS2554: Expected 0 arguments, but got 4.
|
||||
node_modules/minimatch/minimatch.js(763,14): error TS2554: Expected 0 arguments, but got 2.
|
||||
node_modules/minimatch/minimatch.js(766,14): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/minimatch/minimatch.js(774,16): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/minimatch/minimatch.js(778,16): error TS2554: Expected 0 arguments, but got 3.
|
||||
node_modules/minimatch/minimatch.js(785,18): error TS2554: Expected 0 arguments, but got 2.
|
||||
node_modules/minimatch/minimatch.js(812,20): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/minimatch/minimatch.js(830,20): error TS2554: Expected 0 arguments, but got 6.
|
||||
node_modules/minimatch/minimatch.js(834,22): error TS2554: Expected 0 arguments, but got 4.
|
||||
node_modules/minimatch/minimatch.js(842,24): error TS2554: Expected 0 arguments, but got 5.
|
||||
node_modules/minimatch/minimatch.js(847,22): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/minimatch/minimatch.js(857,20): error TS2554: Expected 0 arguments, but got 5.
|
||||
node_modules/minimatch/minimatch.js(873,18): error TS2554: Expected 0 arguments, but got 4.
|
||||
node_modules/minimatch/minimatch.js(876,18): error TS2554: Expected 0 arguments, but got 4.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -368,7 +368,7 @@ node_modules/npm/lib/install.js(745,32): error TS2339: Property 'config' does no
|
||||
node_modules/npm/lib/install.js(751,12): error TS2339: Property 'failing' does not exist on type 'Installer'.
|
||||
node_modules/npm/lib/install.js(768,13): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/install.js(770,20): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/install.js(771,14): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/npm/lib/install.js(771,53): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/npm/lib/install.js(890,26): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'.
|
||||
node_modules/npm/lib/install.js(897,26): error TS2345: Argument of type '{ action: any; name: any; version: any; path: any; }' is not assignable to parameter of type 'never'.
|
||||
node_modules/npm/lib/install.js(899,25): error TS2345: Argument of type '{ action: any; name: any; version: any; path: any; }' is not assignable to parameter of type 'never'.
|
||||
@@ -378,7 +378,7 @@ node_modules/npm/lib/install.js(905,27): error TS2345: Argument of type '{ actio
|
||||
node_modules/npm/lib/install.js(948,8): error TS2454: Variable 'previousPath' is used before being assigned.
|
||||
node_modules/npm/lib/install.js(985,53): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/install.js(1007,53): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/install/access-error.js(4,18): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/npm/lib/install/access-error.js(4,60): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
node_modules/npm/lib/install/action/build.js(10,50): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/install/action/extract.js(39,40): error TS2339: Property 'limit' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/install/action/extract.js(81,9): error TS2322: Type 'string' is not assignable to type 'any[]'.
|
||||
@@ -483,7 +483,7 @@ node_modules/npm/lib/logout.js(16,7): error TS2339: Property 'config' does not e
|
||||
node_modules/npm/lib/logout.js(17,7): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/logout.js(23,26): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/logout.js(28,11): error TS2339: Property 'registry' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/logout.js(38,10): error TS2554: Expected 0-1 arguments, but got 3.
|
||||
node_modules/npm/lib/logout.js(39,29): error TS2554: Expected 0-1 arguments, but got 3.
|
||||
node_modules/npm/lib/ls.js(37,30): error TS2339: Property 'dir' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/ls.js(88,18): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
node_modules/npm/lib/ls.js(89,18): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'.
|
||||
@@ -1490,7 +1490,7 @@ node_modules/npm/test/tap/prepublish-only.js(5,20): error TS2307: Cannot find mo
|
||||
node_modules/npm/test/tap/prepublish-only.js(6,21): error TS2307: Cannot find module 'tacks'.
|
||||
node_modules/npm/test/tap/prepublish.js(3,20): error TS2307: Cannot find module 'tap'.
|
||||
node_modules/npm/test/tap/process-logger.js(2,22): error TS2307: Cannot find module 'tap'.
|
||||
node_modules/npm/test/tap/process-logger.js(7,24): error TS2554: Expected 1-3 arguments, but got 4.
|
||||
node_modules/npm/test/tap/process-logger.js(7,61): error TS2554: Expected 1-3 arguments, but got 4.
|
||||
node_modules/npm/test/tap/process-logger.js(8,37): error TS2345: Argument of type '"log"' is not assignable to parameter of type 'Signals'.
|
||||
node_modules/npm/test/tap/process-logger.js(9,37): error TS2345: Argument of type '"log"' is not assignable to parameter of type 'Signals'.
|
||||
node_modules/npm/test/tap/process-logger.js(10,37): error TS2345: Argument of type '"log"' is not assignable to parameter of type 'Signals'.
|
||||
|
||||
@@ -10,6 +10,12 @@ src/cli/util.js(454,16): error TS2339: Property 'type' does not exist on type 'n
|
||||
src/cli/util.js(455,16): error TS2339: Property 'oppositeDescription' does not exist on type 'never'.
|
||||
src/cli/util.js(456,17): error TS2339: Property 'name' does not exist on type 'never'.
|
||||
src/common/parser-create-error.js(8,9): error TS2339: Property 'loc' does not exist on type 'SyntaxError'.
|
||||
src/config/resolve-config-editorconfig.js(20,36): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'typeof import("../../../node_modules/mem/index")' has no compatible call signatures.
|
||||
src/config/resolve-config-editorconfig.js(27,35): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'typeof import("../../../node_modules/mem/index")' has no compatible call signatures.
|
||||
src/config/resolve-config-editorconfig.js(42,7): error TS2339: Property 'clear' does not exist on type 'typeof import("../../../node_modules/mem/index")'.
|
||||
src/config/resolve-config-editorconfig.js(43,7): error TS2339: Property 'clear' does not exist on type 'typeof import("../../../node_modules/mem/index")'.
|
||||
src/config/resolve-config.js(10,29): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'typeof import("../../../node_modules/mem/index")' has no compatible call signatures.
|
||||
src/config/resolve-config.js(70,7): error TS2339: Property 'clear' does not exist on type 'typeof import("../../../node_modules/mem/index")'.
|
||||
src/config/resolve-config.js(75,32): error TS2345: Argument of type '{ sync: false; }' is not assignable to parameter of type '{ cache: boolean; sync: boolean; }'.
|
||||
Property 'cache' is missing in type '{ sync: false; }' but required in type '{ cache: boolean; sync: boolean; }'.
|
||||
src/config/resolve-config.js(82,32): error TS2345: Argument of type '{ sync: true; }' is not assignable to parameter of type '{ cache: boolean; sync: boolean; }'.
|
||||
@@ -34,7 +40,7 @@ src/language-handlebars/parser-glimmer.js(27,26): error TS2345: Argument of type
|
||||
Type '(() => { visitor: { Program(node: any): void; ElementNode(node: any): void; }; })[]' is not assignable to type 'ASTPluginBuilder[]'.
|
||||
Type '() => { visitor: { Program(node: any): void; ElementNode(node: any): void; }; }' is not assignable to type 'ASTPluginBuilder'.
|
||||
Property 'name' is missing in type '{ visitor: { Program(node: any): void; ElementNode(node: any): void; }; }' but required in type 'ASTPlugin'.
|
||||
src/language-handlebars/printer-glimmer.js(270,7): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
src/language-handlebars/printer-glimmer.js(270,30): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
src/language-js/printer-estree.js(99,9): error TS2741: Property 'parts' is missing in type '{ type: string; }' but required in type '{ type: string; parts: any; }'.
|
||||
src/language-js/printer-estree.js(302,9): error TS2345: Argument of type '{ type: string; parts: any; } | { type: string; contents: any; }' is not assignable to parameter of type 'ConcatArray<never>'.
|
||||
Type '{ type: string; parts: any; }' is missing the following properties from type 'ConcatArray<never>': length, join, slice
|
||||
@@ -51,8 +57,8 @@ src/language-js/printer-estree.js(3647,5): error TS2345: Argument of type '"" |
|
||||
Type '{ type: string; parts: any; }' is not assignable to type 'string'.
|
||||
src/language-js/printer-estree.js(3651,16): error TS2345: Argument of type '{ type: string; parts: any; }' is not assignable to parameter of type 'string'.
|
||||
src/language-js/printer-estree.js(3693,9): error TS2345: Argument of type '{ type: string; parts: any; }' is not assignable to parameter of type 'string'.
|
||||
src/language-js/printer-estree.js(3995,14): error TS2554: Expected 0-2 arguments, but got 3.
|
||||
src/language-js/printer-estree.js(5034,9): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
src/language-js/printer-estree.js(3998,9): error TS2554: Expected 0-2 arguments, but got 3.
|
||||
src/language-js/printer-estree.js(5034,55): error TS2554: Expected 0-1 arguments, but got 2.
|
||||
src/language-js/printer-estree.js(5070,7): error TS2345: Argument of type '(string | number)[]' is not assignable to parameter of type '((childPath: any) => any) | ConcatArray<(childPath: any) => any>'.
|
||||
Type '(string | number)[]' is not assignable to type 'ConcatArray<(childPath: any) => any>'.
|
||||
Types of property 'slice' are incompatible.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Exit Code: 1
|
||||
Standard output:
|
||||
node_modules/uglify-js/lib/ast.js(207,23): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/ast.js(207,38): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/ast.js(328,33): error TS2339: Property 'transform' does not exist on type 'string'.
|
||||
node_modules/uglify-js/lib/ast.js(869,5): error TS2322: Type '{ _visit: (node: any, descend: any) => any; parent: (n: any) => any; push: typeof push; pop: typeof pop; self: () => any; find_parent: (type: any) => any; has_directive: (type: any) => any; loopcontrol_target: (node: any) => any; in_boolean_context: () => boolean | undefined; }' is not assignable to type 'TreeWalker'.
|
||||
Object literal may only specify known properties, but '_visit' does not exist in type 'TreeWalker'. Did you mean to write 'visit'?
|
||||
@@ -8,64 +8,64 @@ node_modules/uglify-js/lib/ast.js(870,14): error TS2339: Property 'push' does no
|
||||
node_modules/uglify-js/lib/ast.js(877,14): error TS2339: Property 'pop' does not exist on type 'TreeWalker'.
|
||||
node_modules/uglify-js/lib/ast.js(932,25): error TS2339: Property 'self' does not exist on type 'TreeWalker'.
|
||||
node_modules/uglify-js/lib/ast.js(933,37): error TS2339: Property 'parent' does not exist on type 'TreeWalker'.
|
||||
node_modules/uglify-js/lib/compress.js(167,27): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(500,26): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(817,18): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(1072,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
|
||||
node_modules/uglify-js/lib/compress.js(1086,51): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'true | ((node: any) => any)' has no compatible call signatures.
|
||||
node_modules/uglify-js/lib/compress.js(1150,53): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
|
||||
node_modules/uglify-js/lib/compress.js(1192,112): error TS2454: Variable 'args' is used before being assigned.
|
||||
node_modules/uglify-js/lib/compress.js(1193,29): error TS2532: Object is possibly 'undefined'.
|
||||
node_modules/uglify-js/lib/compress.js(1202,87): error TS2322: Type 'false' is not assignable to type 'number'.
|
||||
node_modules/uglify-js/lib/compress.js(1210,29): error TS2322: Type 'false' is not assignable to type 'never'.
|
||||
node_modules/uglify-js/lib/compress.js(1316,38): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(1411,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
|
||||
node_modules/uglify-js/lib/compress.js(1519,27): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(1551,26): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(1652,49): error TS2345: Argument of type 'number[]' is not assignable to parameter of type '[number, number, ...never[]]'.
|
||||
node_modules/uglify-js/lib/compress.js(173,42): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(515,41): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(838,33): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(1093,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
|
||||
node_modules/uglify-js/lib/compress.js(1107,51): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'true | ((node: any) => any)' has no compatible call signatures.
|
||||
node_modules/uglify-js/lib/compress.js(1171,53): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
|
||||
node_modules/uglify-js/lib/compress.js(1213,112): error TS2454: Variable 'args' is used before being assigned.
|
||||
node_modules/uglify-js/lib/compress.js(1214,29): error TS2532: Object is possibly 'undefined'.
|
||||
node_modules/uglify-js/lib/compress.js(1223,87): error TS2322: Type 'false' is not assignable to type 'number'.
|
||||
node_modules/uglify-js/lib/compress.js(1231,29): error TS2322: Type 'false' is not assignable to type 'never'.
|
||||
node_modules/uglify-js/lib/compress.js(1337,53): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(1432,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
|
||||
node_modules/uglify-js/lib/compress.js(1540,42): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(1572,41): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(1679,49): error TS2345: Argument of type 'number[]' is not assignable to parameter of type '[number, number, ...never[]]'.
|
||||
Type 'number[]' is missing the following properties from type '[number, number, ...never[]]': 0, 1
|
||||
node_modules/uglify-js/lib/compress.js(1975,44): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(2013,53): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[number, number, ...never[]]'.
|
||||
node_modules/uglify-js/lib/compress.js(2002,59): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(2040,53): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[number, number, ...never[]]'.
|
||||
Type 'any[]' is missing the following properties from type '[number, number, ...never[]]': 0, 1
|
||||
node_modules/uglify-js/lib/compress.js(2161,19): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(3214,23): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(3227,33): error TS2322: Type '"f"' is not assignable to type 'boolean'.
|
||||
node_modules/uglify-js/lib/compress.js(3367,18): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(3422,14): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(3439,29): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
|
||||
node_modules/uglify-js/lib/compress.js(3464,62): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(3690,23): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(3711,24): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
|
||||
node_modules/uglify-js/lib/compress.js(3721,28): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
|
||||
node_modules/uglify-js/lib/compress.js(3880,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'defs' must be of type 'Dictionary & { set: (key: any, val: any) => Dictionary & { set: ...; add: (key: any, val: any) => Dictionary & { set: ...; add: ...; get: (key: any) => any; del: (key: any) => Dictionary & { set: ...; ... 8 more ...; toObject: () => any; }; ... 5 more ...; toObject: () => any; }; ... 7 more ...; toObject: () => any;...', but here has type 'any'.
|
||||
node_modules/uglify-js/lib/compress.js(3932,17): error TS2447: The '|=' operator is not allowed for boolean types. Consider using '||' instead.
|
||||
node_modules/uglify-js/lib/compress.js(3988,30): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(4097,18): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(4396,17): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'.
|
||||
node_modules/uglify-js/lib/compress.js(4480,22): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(4672,57): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[RegExp, (string | undefined)?]'.
|
||||
node_modules/uglify-js/lib/compress.js(2188,34): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(3247,38): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(3260,33): error TS2322: Type '"f"' is not assignable to type 'boolean'.
|
||||
node_modules/uglify-js/lib/compress.js(3400,33): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(3455,29): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(3472,29): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
|
||||
node_modules/uglify-js/lib/compress.js(3497,75): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(3723,38): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(3744,24): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
|
||||
node_modules/uglify-js/lib/compress.js(3754,28): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
|
||||
node_modules/uglify-js/lib/compress.js(3913,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'defs' must be of type 'Dictionary & { set: (key: any, val: any) => Dictionary & { set: ...; add: (key: any, val: any) => Dictionary & { set: ...; add: ...; get: (key: any) => any; del: (key: any) => Dictionary & { set: ...; ... 8 more ...; toObject: () => any; }; ... 5 more ...; toObject: () => any; }; ... 7 more ...; toObject: () => any;...', but here has type 'any'.
|
||||
node_modules/uglify-js/lib/compress.js(3965,17): error TS2447: The '|=' operator is not allowed for boolean types. Consider using '||' instead.
|
||||
node_modules/uglify-js/lib/compress.js(4021,45): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(4130,33): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(4429,17): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'.
|
||||
node_modules/uglify-js/lib/compress.js(4513,37): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(4705,57): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[RegExp, (string | undefined)?]'.
|
||||
Property '0' is missing in type 'any[]' but required in type '[RegExp, (string | undefined)?]'.
|
||||
node_modules/uglify-js/lib/compress.js(4830,30): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(4837,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'code' must be of type 'string', but here has type '{ get: () => string; toString: () => string; indent: () => void; indentation: () => number; current_width: () => number; should_break: () => boolean; has_parens: () => boolean; newline: () => void; print: (str: any) => void; ... 24 more ...; parent: (n: any) => any; }'.
|
||||
node_modules/uglify-js/lib/compress.js(4841,36): error TS2532: Object is possibly 'undefined'.
|
||||
node_modules/uglify-js/lib/compress.js(4846,41): error TS2339: Property 'get' does not exist on type 'string'.
|
||||
node_modules/uglify-js/lib/compress.js(5333,18): error TS2454: Variable 'is_strict_comparison' is used before being assigned.
|
||||
node_modules/uglify-js/lib/compress.js(5765,25): error TS2367: This condition will always return 'false' since the types 'boolean' and '"f"' have no overlap.
|
||||
node_modules/uglify-js/lib/compress.js(5792,32): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(5855,24): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(5927,24): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(5933,26): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(6337,43): error TS2454: Variable 'property' is used before being assigned.
|
||||
node_modules/uglify-js/lib/compress.js(6352,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'.
|
||||
node_modules/uglify-js/lib/compress.js(6355,46): error TS2339: Property 'has_side_effects' does not exist on type 'number'.
|
||||
node_modules/uglify-js/lib/compress.js(6361,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'.
|
||||
node_modules/uglify-js/lib/compress.js(6389,19): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(4863,45): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(4870,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'code' must be of type 'string', but here has type '{ get: () => string; toString: () => string; indent: () => void; indentation: () => number; current_width: () => number; should_break: () => boolean; has_parens: () => boolean; newline: () => void; print: (str: any) => void; ... 24 more ...; parent: (n: any) => any; }'.
|
||||
node_modules/uglify-js/lib/compress.js(4874,36): error TS2532: Object is possibly 'undefined'.
|
||||
node_modules/uglify-js/lib/compress.js(4879,41): error TS2339: Property 'get' does not exist on type 'string'.
|
||||
node_modules/uglify-js/lib/compress.js(5366,18): error TS2454: Variable 'is_strict_comparison' is used before being assigned.
|
||||
node_modules/uglify-js/lib/compress.js(5798,25): error TS2367: This condition will always return 'false' since the types 'boolean' and '"f"' have no overlap.
|
||||
node_modules/uglify-js/lib/compress.js(5825,47): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(5896,39): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(5968,39): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(5974,41): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(6396,43): error TS2454: Variable 'property' is used before being assigned.
|
||||
node_modules/uglify-js/lib/compress.js(6411,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'.
|
||||
node_modules/uglify-js/lib/compress.js(6414,46): error TS2339: Property 'has_side_effects' does not exist on type 'number'.
|
||||
node_modules/uglify-js/lib/compress.js(6420,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'.
|
||||
node_modules/uglify-js/lib/compress.js(6448,34): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/minify.js(170,75): error TS2339: Property 'compress' does not exist on type 'Compressor'.
|
||||
node_modules/uglify-js/lib/mozilla-ast.js(566,18): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/output.js(246,9): error TS2554: Expected 0 arguments, but got 2.
|
||||
node_modules/uglify-js/lib/output.js(475,22): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/output.js(767,23): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/output.js(1163,29): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/mozilla-ast.js(566,33): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/output.js(246,25): error TS2554: Expected 0 arguments, but got 2.
|
||||
node_modules/uglify-js/lib/output.js(475,37): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/output.js(767,38): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/output.js(1163,44): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/output.js(1445,58): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
node_modules/uglify-js/lib/parse.js(367,20): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'.
|
||||
Type 'undefined' is not assignable to type 'number'.
|
||||
@@ -76,36 +76,37 @@ node_modules/uglify-js/lib/parse.js(622,57): error TS2339: Property 'push' does
|
||||
node_modules/uglify-js/lib/parse.js(632,32): error TS2345: Argument of type 'never[]' is not assignable to parameter of type 'never'.
|
||||
node_modules/uglify-js/lib/parse.js(638,40): error TS2339: Property 'length' does not exist on type 'never'.
|
||||
node_modules/uglify-js/lib/parse.js(739,13): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(771,52): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(771,74): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(815,31): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(821,17): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(825,21): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(830,43): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(849,21): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(868,21): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(983,23): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'.
|
||||
node_modules/uglify-js/lib/parse.js(1097,9): error TS2322: Type 'any[]' is not assignable to type 'never[]'.
|
||||
node_modules/uglify-js/lib/parse.js(775,69): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(775,83): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(819,31): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(825,17): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(829,21): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(834,43): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(853,21): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(872,21): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(987,23): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'.
|
||||
node_modules/uglify-js/lib/parse.js(1101,9): error TS2322: Type 'any[]' is not assignable to type 'never[]'.
|
||||
Type 'any' is not assignable to type 'never'.
|
||||
node_modules/uglify-js/lib/parse.js(1156,17): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(1324,32): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(1430,20): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(1516,48): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(1542,35): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(1587,52): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(1158,17): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(1326,32): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(1426,20): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(1432,20): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(1518,48): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(1544,35): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/parse.js(1589,52): error TS2531: Object is possibly 'null'.
|
||||
node_modules/uglify-js/lib/propmangle.js(69,18): error TS2339: Property 'prototype' does not exist on type 'ObjectConstructor | FunctionConstructor | StringConstructor | BooleanConstructor | NumberConstructor | Math | DateConstructor | RegExpConstructor | ErrorConstructor | ArrayConstructor'.
|
||||
Property 'prototype' does not exist on type 'Math'.
|
||||
node_modules/uglify-js/lib/propmangle.js(70,45): error TS2339: Property 'prototype' does not exist on type 'ObjectConstructor | FunctionConstructor | StringConstructor | BooleanConstructor | NumberConstructor | Math | DateConstructor | RegExpConstructor | ErrorConstructor | ArrayConstructor'.
|
||||
Property 'prototype' does not exist on type 'Math'.
|
||||
node_modules/uglify-js/lib/propmangle.js(80,14): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/propmangle.js(94,15): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/propmangle.js(146,14): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/scope.js(104,14): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/scope.js(159,14): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/scope.js(194,32): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/scope.js(405,14): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/scope.js(462,15): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/scope.js(487,15): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/propmangle.js(80,29): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/propmangle.js(94,30): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/propmangle.js(146,29): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/scope.js(104,29): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/scope.js(159,29): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/scope.js(194,47): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/scope.js(409,29): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/scope.js(466,30): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/scope.js(491,30): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/sourcemap.js(55,25): error TS2304: Cannot find name 'MOZ_SourceMap'.
|
||||
node_modules/uglify-js/lib/sourcemap.js(61,23): error TS2304: Cannot find name 'MOZ_SourceMap'.
|
||||
node_modules/uglify-js/tools/exit.js(7,32): error TS2339: Property 'bufferSize' does not exist on type 'WriteStream'.
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
// @strict: true
|
||||
interface ListItem<TData> {
|
||||
prev: ListItem<TData> | null;
|
||||
next: ListItem<TData> | null;
|
||||
data: TData;
|
||||
}
|
||||
type IteratorFn<TData, TResult, TContext = List<TData>> = (this: TContext, item: TData, node: ListItem<TData>, list: List<TData>) => TResult;
|
||||
type FilterFn<TData, TResult extends TData, TContext = List<TData>> = (this: TContext, item: TData, node: ListItem<TData>, list: List<TData>) => item is TResult;
|
||||
|
||||
declare class List<TData> {
|
||||
filter<TContext, TResult extends TData>(fn: FilterFn<TData, TResult, TContext>, context: TContext): List<TResult>;
|
||||
filter<TResult extends TData>(fn: FilterFn<TData, TResult>): List<TResult>;
|
||||
filter<TContext>(fn: IteratorFn<TData, boolean, TContext>, context: TContext): List<TData>;
|
||||
filter(fn: IteratorFn<TData, boolean>): List<TData>;
|
||||
}
|
||||
interface Test {
|
||||
a: string;
|
||||
}
|
||||
const list2 = new List<Test | null>();
|
||||
const filter1 = list2.filter(function(item, node, list): item is Test {
|
||||
this.b; // $ExpectType string
|
||||
item; // $ExpectType Test | null
|
||||
node; // $ExpectType ListItem<Test | null>
|
||||
list; // $ExpectType List<Test | null>
|
||||
return !!item;
|
||||
}, {b: 'c'});
|
||||
const x: List<Test> = filter1; // $ExpectType List<Test>
|
||||
@@ -0,0 +1,9 @@
|
||||
// @experimentalDecorators: true
|
||||
|
||||
declare function y(...args: any[]): any;
|
||||
type T = number;
|
||||
@y(1 as T, C) // <-- T should be resolved to the type alias, not the type parameter of the class; C should resolve to the class
|
||||
class C<T> {
|
||||
@y(null as T) // <-- y should resolve to the function declaration, not the parameter; T should resolve to the type parameter of the class
|
||||
method(@y x, y) {} // <-- decorator y should be resolved at the class declaration, not the parameter.
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// @filename: extension.d.ts
|
||||
declare global {
|
||||
namespace globalThis {
|
||||
var test: string;
|
||||
}
|
||||
}
|
||||
|
||||
export {}
|
||||
|
||||
// @filename: index.ts
|
||||
import "./extention";
|
||||
|
||||
globalThis.tests = "a-b";
|
||||
console.log(globalThis.test.split("-"));
|
||||
@@ -60,6 +60,11 @@ declare function pipe5<A, B>(f: (a: A) => B): { f: (a: A) => B };
|
||||
|
||||
const f50 = pipe5(list); // No higher order inference
|
||||
|
||||
declare function wrap3<A, B, C>(f: (a: A, b1: B, b2: B) => C): (a: A, b1: B, b2: B) => C;
|
||||
declare function baz<T, U extends T>(t1: T, t2: T, u: U): [T, U];
|
||||
|
||||
let f60 = wrap3(baz);
|
||||
|
||||
// #417
|
||||
|
||||
function mirror<A, B>(f: (a: A) => B): (a: A) => B { return f; }
|
||||
@@ -193,3 +198,8 @@ declare function foo2<T, U = T>(fn: T, a?: U, b?: U): [T, U];
|
||||
foo2(() => {});
|
||||
foo2(identity);
|
||||
foo2(identity, 1);
|
||||
|
||||
// Repro from #30324
|
||||
|
||||
declare function times<T>(fn: (i: number) => T): (n: number) => T[];
|
||||
const a2 = times(identity)(5); // => [0, 1, 2, 3, 4]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// @target: ES6
|
||||
// @lib: esnext
|
||||
// @noEmitHelpers: true
|
||||
class A {
|
||||
x() {
|
||||
@@ -52,5 +53,137 @@ class B extends A {
|
||||
|
||||
// destructuring assign with element access
|
||||
({ f: super["x"] } = { f });
|
||||
|
||||
// property access in arrow
|
||||
(() => super.x());
|
||||
|
||||
// element access in arrow
|
||||
(() => super["x"]());
|
||||
|
||||
// property access in async arrow
|
||||
(async () => super.x());
|
||||
|
||||
// element access in async arrow
|
||||
(async () => super["x"]());
|
||||
}
|
||||
|
||||
async property_access_only_read_only() {
|
||||
// call with property access
|
||||
super.x();
|
||||
|
||||
// property access (read)
|
||||
const a = super.x;
|
||||
|
||||
// property access in arrow
|
||||
(() => super.x());
|
||||
|
||||
// property access in async arrow
|
||||
(async () => super.x());
|
||||
}
|
||||
|
||||
async property_access_only_write_only() {
|
||||
const f = () => {};
|
||||
|
||||
// property access (assign)
|
||||
super.x = f;
|
||||
|
||||
// destructuring assign with property access
|
||||
({ f: super.x } = { f });
|
||||
|
||||
// property access (assign) in arrow
|
||||
(() => super.x = f);
|
||||
|
||||
// property access (assign) in async arrow
|
||||
(async () => super.x = f);
|
||||
}
|
||||
|
||||
async element_access_only_read_only() {
|
||||
// call with element access
|
||||
super["x"]();
|
||||
|
||||
// element access (read)
|
||||
const a = super["x"];
|
||||
|
||||
// element access in arrow
|
||||
(() => super["x"]());
|
||||
|
||||
// element access in async arrow
|
||||
(async () => super["x"]());
|
||||
}
|
||||
|
||||
async element_access_only_write_only() {
|
||||
const f = () => {};
|
||||
|
||||
// element access (assign)
|
||||
super["x"] = f;
|
||||
|
||||
// destructuring assign with element access
|
||||
({ f: super["x"] } = { f });
|
||||
|
||||
// element access (assign) in arrow
|
||||
(() => super["x"] = f);
|
||||
|
||||
// element access (assign) in async arrow
|
||||
(async () => super["x"] = f);
|
||||
}
|
||||
|
||||
async * property_access_only_read_only_in_generator() {
|
||||
// call with property access
|
||||
super.x();
|
||||
|
||||
// property access (read)
|
||||
const a = super.x;
|
||||
|
||||
// property access in arrow
|
||||
(() => super.x());
|
||||
|
||||
// property access in async arrow
|
||||
(async () => super.x());
|
||||
}
|
||||
|
||||
async * property_access_only_write_only_in_generator() {
|
||||
const f = () => {};
|
||||
|
||||
// property access (assign)
|
||||
super.x = f;
|
||||
|
||||
// destructuring assign with property access
|
||||
({ f: super.x } = { f });
|
||||
|
||||
// property access (assign) in arrow
|
||||
(() => super.x = f);
|
||||
|
||||
// property access (assign) in async arrow
|
||||
(async () => super.x = f);
|
||||
}
|
||||
|
||||
async * element_access_only_read_only_in_generator() {
|
||||
// call with element access
|
||||
super["x"]();
|
||||
|
||||
// element access (read)
|
||||
const a = super["x"];
|
||||
|
||||
// element access in arrow
|
||||
(() => super["x"]());
|
||||
|
||||
// element access in async arrow
|
||||
(async () => super["x"]());
|
||||
}
|
||||
|
||||
async * element_access_only_write_only_in_generator() {
|
||||
const f = () => {};
|
||||
|
||||
// element access (assign)
|
||||
super["x"] = f;
|
||||
|
||||
// destructuring assign with element access
|
||||
({ f: super["x"] } = { f });
|
||||
|
||||
// element access (assign) in arrow
|
||||
(() => super["x"] = f);
|
||||
|
||||
// element access (assign) in async arrow
|
||||
(async () => super["x"] = f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////globalThis./**/
|
||||
|
||||
verify.completions({
|
||||
marker: "",
|
||||
exact: [
|
||||
{ name: "globalThis", kind: "module" },
|
||||
...completion.globalsVars,
|
||||
{ name: "undefined", kind: "var" }
|
||||
]
|
||||
});
|
||||
@@ -0,0 +1,20 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @Filename: a.ts
|
||||
////function /*a*/gen<T extends any[]>/*b*/(a: boolean, ...b: T): T {
|
||||
//// return b;
|
||||
////}
|
||||
////gen(false);
|
||||
////gen(false, 1);
|
||||
////gen(true, 1, "two");
|
||||
|
||||
// @Filename: b.ts
|
||||
////function /*c*/un/*d*/(a: boolean, ...b: number[] | [string, string]) {
|
||||
//// return b;
|
||||
////}
|
||||
|
||||
goTo.select("a", "b");
|
||||
verify.not.refactorAvailable("Convert to named parameters");
|
||||
|
||||
goTo.select("c", "d");
|
||||
verify.not.refactorAvailable("Convert to named parameters");
|
||||
@@ -0,0 +1,18 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////**
|
||||
//// * Return the boolean state of attribute from an element
|
||||
//// * /*a*/@param/*b*/ el The source of the attributes.
|
||||
//// * @param atty Name of the attribute or a string of candidate attribute names.
|
||||
//// * @param def Default boolean value when attribute is undefined.
|
||||
//// */
|
||||
////export function /*c*/getBoolFromAttribute/*d*/(
|
||||
//// /*e*//** inline JSDoc *//*f*/ attr: string | string[],
|
||||
//// def: boolean = false): boolean { }
|
||||
|
||||
goTo.select("a", "b");
|
||||
verify.not.refactorAvailable("Convert parameters to destructured object");
|
||||
goTo.select("c", "d");
|
||||
verify.refactorAvailable("Convert parameters to destructured object");
|
||||
goTo.select("e", "f");
|
||||
verify.refactorAvailable("Convert parameters to destructured object");
|
||||
@@ -0,0 +1,25 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @Filename: f.ts
|
||||
////function /*a*/f/*b*/(a: number, b: number, ...rest: string[]) { }
|
||||
////const a = 4;
|
||||
////const b = 5;
|
||||
////f(a, b);
|
||||
////const rest = ["a", "b", "c"];
|
||||
////f(a, b, ...rest);
|
||||
////f(/** a */ a /** aa */, /** b */ b /** bb */);
|
||||
|
||||
|
||||
goTo.select("a", "b");
|
||||
edit.applyRefactor({
|
||||
refactorName: "Convert parameters to destructured object",
|
||||
actionName: "Convert parameters to destructured object",
|
||||
actionDescription: "Convert parameters to destructured object",
|
||||
newContent: `function f({ a, b, rest = [] }: { a: number; b: number; rest?: string[]; }) { }
|
||||
const a = 4;
|
||||
const b = 5;
|
||||
f({ a, b });
|
||||
const rest = ["a", "b", "c"];
|
||||
f({ a, b, rest: [...rest] });
|
||||
f({ /** a */ a /** aa */, /** b */ b /** bb */ });`
|
||||
});
|
||||
@@ -19,7 +19,7 @@ edit.applyRefactor({
|
||||
}
|
||||
class B extends A {
|
||||
constructor(a: string, b: string, c: string) {
|
||||
super({ a: a, b: b });
|
||||
super({ a, b });
|
||||
}
|
||||
}`
|
||||
});
|
||||
@@ -0,0 +1,57 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @Filename: a.ts
|
||||
////function /*a*/fn1/*b*/(a: number, b: number, ...args: [number, number]) { }
|
||||
////fn1(1, 2, 3, 4);
|
||||
|
||||
// @Filename: b.ts
|
||||
////function /*c*/fn2/*d*/(a: number, b: number, ...args: [number, number, ...string[]]) { }
|
||||
////fn2(1, 2, 3, 4);
|
||||
////fn2(1, 2, 3, 4, "a");
|
||||
|
||||
// @Filename: c.ts
|
||||
////function /*e*/fn3/*f*/(b: boolean, c: []) { }
|
||||
////fn3(true, []);
|
||||
|
||||
// @Filename: d.ts
|
||||
////function /*g*/fn4/*h*/(a: number, ...args: [...string[]] ) { }
|
||||
////fn4(2);
|
||||
////fn4(1, "two", "three");
|
||||
|
||||
goTo.select("a", "b");
|
||||
edit.applyRefactor({
|
||||
refactorName: "Convert parameters to destructured object",
|
||||
actionName: "Convert parameters to destructured object",
|
||||
actionDescription: "Convert parameters to destructured object",
|
||||
newContent: `function fn1({ a, b, args }: { a: number; b: number; args: [number, number]; }) { }
|
||||
fn1({ a: 1, b: 2, args: [3, 4] });`
|
||||
});
|
||||
|
||||
goTo.select("c", "d");
|
||||
edit.applyRefactor({
|
||||
refactorName: "Convert parameters to destructured object",
|
||||
actionName: "Convert parameters to destructured object",
|
||||
actionDescription: "Convert parameters to destructured object",
|
||||
newContent: `function fn2({ a, b, args }: { a: number; b: number; args: [number, number, ...string[]]; }) { }
|
||||
fn2({ a: 1, b: 2, args: [3, 4] });
|
||||
fn2({ a: 1, b: 2, args: [3, 4, "a"] });`
|
||||
});
|
||||
|
||||
goTo.select("e", "f");
|
||||
edit.applyRefactor({
|
||||
refactorName: "Convert parameters to destructured object",
|
||||
actionName: "Convert parameters to destructured object",
|
||||
actionDescription: "Convert parameters to destructured object",
|
||||
newContent: `function fn3({ b, c }: { b: boolean; c: []; }) { }
|
||||
fn3({ b: true, c: [] });`
|
||||
});
|
||||
|
||||
goTo.select("g", "h");
|
||||
edit.applyRefactor({
|
||||
refactorName: "Convert parameters to destructured object",
|
||||
actionName: "Convert parameters to destructured object",
|
||||
actionDescription: "Convert parameters to destructured object",
|
||||
newContent: `function fn4({ a, args = [] }: { a: number; args?: [...string[]]; }) { }
|
||||
fn4({ a: 2 });
|
||||
fn4({ a: 1, args: ["two", "three"] });`
|
||||
});
|
||||
@@ -0,0 +1,56 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
|
||||
//// function fnTest(str: string, num: number) { }
|
||||
//// declare function wrap<A extends any[], R>(fn: (...a: A) => R) : (...a: A) => R;
|
||||
//// var fnWrapped = wrap(fnTest);
|
||||
//// fnWrapped/*3*/(/*1*/'', /*2*/5);
|
||||
//// function fnTestVariadic (str: string, ...num: number[]) { }
|
||||
//// var fnVariadicWrapped = wrap(fnTestVariadic);
|
||||
//// fnVariadicWrapped/*4*/(/*5*/'', /*6*/5);
|
||||
//// function fnNoParams () { }
|
||||
//// var fnNoParamsWrapped = wrap(fnNoParams);
|
||||
//// fnNoParamsWrapped/*7*/(/*8*/);
|
||||
|
||||
verify.quickInfoAt("3", "var fnWrapped: (str: string, num: number) => void");
|
||||
verify.signatureHelp(
|
||||
{
|
||||
marker: "1",
|
||||
text: "fnWrapped(str: string, num: number): void",
|
||||
parameterCount: 2,
|
||||
parameterName: "str",
|
||||
parameterSpan: "str: string",
|
||||
},
|
||||
{
|
||||
marker: "2",
|
||||
parameterName: "num",
|
||||
parameterSpan: "num: number",
|
||||
},
|
||||
);
|
||||
|
||||
verify.quickInfoAt("4", "var fnVariadicWrapped: (str: string, ...num: number[]) => void");
|
||||
verify.signatureHelp(
|
||||
{
|
||||
marker: "5",
|
||||
text: "fnVariadicWrapped(str: string, ...num: number[]): void",
|
||||
parameterCount: 2,
|
||||
parameterName: "str",
|
||||
parameterSpan: "str: string",
|
||||
isVariadic: true,
|
||||
},
|
||||
{
|
||||
marker: "6",
|
||||
parameterName: "num",
|
||||
parameterSpan: "...num: number[]",
|
||||
isVariadic: true,
|
||||
},
|
||||
);
|
||||
|
||||
verify.quickInfoAt("7", "var fnNoParamsWrapped: () => void");
|
||||
verify.signatureHelp(
|
||||
{
|
||||
marker: "8",
|
||||
text: "fnNoParamsWrapped(): void",
|
||||
parameterCount: 0,
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user