mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge branch 'master' into report-multiple-overload-errors
This commit is contained in:
@@ -415,6 +415,8 @@ task("runtests").flags = {
|
||||
" --no-lint": "Disables lint",
|
||||
" --timeout=<ms>": "Overrides the default test timeout.",
|
||||
" --built": "Compile using the built version of the compiler.",
|
||||
" --shards": "Total number of shards running tests (default: 1)",
|
||||
" --shardId": "1-based ID of this shard (default: 1)",
|
||||
}
|
||||
|
||||
const runTestsParallel = () => runConsoleTests("built/local/run.js", "min", /*runInParallel*/ true, /*watchMode*/ false);
|
||||
@@ -430,6 +432,8 @@ task("runtests-parallel").flags = {
|
||||
" --timeout=<ms>": "Overrides the default test timeout.",
|
||||
" --built": "Compile using the built version of the compiler.",
|
||||
" --skipPercent=<number>": "Skip expensive tests with <percent> chance to miss an edit. Default 5%.",
|
||||
" --shards": "Total number of shards running tests (default: 1)",
|
||||
" --shardId": "1-based ID of this shard (default: 1)",
|
||||
};
|
||||
|
||||
task("diff", () => exec(getDiffTool(), [refBaseline, localBaseline], { ignoreExitCode: true }));
|
||||
|
||||
@@ -5,7 +5,7 @@ const os = require("os");
|
||||
/** @type {CommandLineOptions} */
|
||||
module.exports = minimist(process.argv.slice(2), {
|
||||
boolean: ["debug", "dirty", "inspect", "light", "colors", "lint", "lkg", "soft", "fix", "failed", "keepFailed", "force", "built"],
|
||||
string: ["browser", "tests", "host", "reporter", "stackTraceLimit", "timeout"],
|
||||
string: ["browser", "tests", "host", "reporter", "stackTraceLimit", "timeout", "shards", "shardId"],
|
||||
alias: {
|
||||
"b": "browser",
|
||||
"d": "debug", "debug-brk": "debug",
|
||||
|
||||
+10
-4
@@ -36,6 +36,8 @@ async function runConsoleTests(runJs, defaultReporter, runInParallel, watchMode,
|
||||
const testConfigFile = "test.config";
|
||||
const failed = cmdLineOptions.failed;
|
||||
const keepFailed = cmdLineOptions.keepFailed;
|
||||
const shards = +cmdLineOptions.shards || undefined;
|
||||
const shardId = +cmdLineOptions.shardId || undefined;
|
||||
if (!cmdLineOptions.dirty) {
|
||||
await cleanTestDirs();
|
||||
cancelToken.throwIfCancellationRequested();
|
||||
@@ -63,8 +65,8 @@ async function runConsoleTests(runJs, defaultReporter, runInParallel, watchMode,
|
||||
testTimeout = 400000;
|
||||
}
|
||||
|
||||
if (tests || runners || light || testTimeout || taskConfigsFolder || keepFailed || skipPercent !== undefined) {
|
||||
writeTestConfigFile(tests, runners, light, skipPercent, taskConfigsFolder, workerCount, stackTraceLimit, testTimeout, keepFailed);
|
||||
if (tests || runners || light || testTimeout || taskConfigsFolder || keepFailed || skipPercent !== undefined || shards || shardId) {
|
||||
writeTestConfigFile(tests, runners, light, skipPercent, taskConfigsFolder, workerCount, stackTraceLimit, testTimeout, keepFailed, shards, shardId);
|
||||
}
|
||||
|
||||
const colors = cmdLineOptions.colors;
|
||||
@@ -165,8 +167,10 @@ exports.cleanTestDirs = cleanTestDirs;
|
||||
* @param {string} [stackTraceLimit]
|
||||
* @param {string | number} [timeout]
|
||||
* @param {boolean} [keepFailed]
|
||||
* @param {number | undefined} [shards]
|
||||
* @param {number | undefined} [shardId]
|
||||
*/
|
||||
function writeTestConfigFile(tests, runners, light, skipPercent, taskConfigsFolder, workerCount, stackTraceLimit, timeout, keepFailed) {
|
||||
function writeTestConfigFile(tests, runners, light, skipPercent, taskConfigsFolder, workerCount, stackTraceLimit, timeout, keepFailed, shards, shardId) {
|
||||
const testConfigContents = JSON.stringify({
|
||||
test: tests ? [tests] : undefined,
|
||||
runners: runners ? runners.split(",") : undefined,
|
||||
@@ -177,7 +181,9 @@ function writeTestConfigFile(tests, runners, light, skipPercent, taskConfigsFold
|
||||
taskConfigsFolder,
|
||||
noColor: !cmdLineOptions.colors,
|
||||
timeout,
|
||||
keepFailed
|
||||
keepFailed,
|
||||
shards,
|
||||
shardId
|
||||
});
|
||||
log.info("Running tests with config: " + testConfigContents);
|
||||
fs.writeFileSync("test.config", testConfigContents);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/// <reference lib="es2015.promise" />
|
||||
// Must reference esnext.asynciterable lib, since octokit uses AsyncIterable internally
|
||||
import Octokit = require("@octokit/rest");
|
||||
import {runSequence} from "./run-sequence";
|
||||
@@ -29,7 +30,7 @@ gh.authenticate({
|
||||
token: process.argv[2]
|
||||
});
|
||||
gh.pulls.create({
|
||||
owner: process.env.TARGET_FORK,
|
||||
owner: process.env.TARGET_FORK!,
|
||||
repo: "TypeScript",
|
||||
maintainer_can_modify: true,
|
||||
title: `🤖 User test baselines have changed` + (process.env.TARGET_BRANCH ? ` for ${process.env.TARGET_BRANCH}` : ""),
|
||||
@@ -45,9 +46,9 @@ cc ${reviewers.map(r => "@" + r).join(" ")}`,
|
||||
console.log(`Pull request ${num} created.`);
|
||||
if (!process.env.SOURCE_ISSUE) {
|
||||
await gh.pulls.createReviewRequest({
|
||||
owner: process.env.TARGET_FORK,
|
||||
owner: process.env.TARGET_FORK!,
|
||||
repo: "TypeScript",
|
||||
number: num,
|
||||
pull_number: num,
|
||||
reviewers,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -274,6 +274,9 @@ namespace ts {
|
||||
if (isStringOrNumericLiteralLike(nameExpression)) {
|
||||
return escapeLeadingUnderscores(nameExpression.text);
|
||||
}
|
||||
if (isSignedNumericLiteral(nameExpression)) {
|
||||
return tokenToString(nameExpression.operator) + nameExpression.operand.text as __String;
|
||||
}
|
||||
|
||||
Debug.assert(isWellKnownSymbolSyntactically(nameExpression));
|
||||
return getPropertyNameForKnownSymbolName(idText((<PropertyAccessExpression>nameExpression).name));
|
||||
|
||||
+84
-65
@@ -65,6 +65,7 @@ namespace ts {
|
||||
let typeCount = 0;
|
||||
let symbolCount = 0;
|
||||
let enumCount = 0;
|
||||
let instantiationCount = 0;
|
||||
let instantiationDepth = 0;
|
||||
let constraintDepth = 0;
|
||||
let currentNode: Node | undefined;
|
||||
@@ -722,6 +723,7 @@ namespace ts {
|
||||
NoIndexSignatures = 1 << 0,
|
||||
Writing = 1 << 1,
|
||||
CacheSymbol = 1 << 2,
|
||||
NoTupleBoundsCheck = 1 << 3,
|
||||
}
|
||||
|
||||
const enum CallbackCheck {
|
||||
@@ -4652,6 +4654,9 @@ namespace ts {
|
||||
if (!isIdentifierText(name, compilerOptions.target) && !isNumericLiteralName(name)) {
|
||||
return `"${escapeString(name, CharacterCodes.doubleQuote)}"`;
|
||||
}
|
||||
if (isNumericLiteralName(name) && startsWith(name, "-")) {
|
||||
return `[${name}]`;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
if (nameType.flags & TypeFlags.UniqueESSymbol) {
|
||||
@@ -5115,21 +5120,25 @@ namespace ts {
|
||||
}
|
||||
else if (isArrayLikeType(parentType)) {
|
||||
const indexType = getLiteralType(index);
|
||||
const declaredType = getConstraintForLocation(getIndexedAccessType(parentType, indexType, declaration.name), declaration.name);
|
||||
const accessFlags = hasDefaultValue(declaration) ? AccessFlags.NoTupleBoundsCheck : 0;
|
||||
const declaredType = getConstraintForLocation(getIndexedAccessTypeOrUndefined(parentType, indexType, declaration.name, accessFlags) || errorType, declaration.name);
|
||||
type = getFlowTypeOfDestructuring(declaration, declaredType);
|
||||
}
|
||||
else {
|
||||
type = elementType;
|
||||
}
|
||||
}
|
||||
// In strict null checking mode, if a default value of a non-undefined type is specified, remove
|
||||
// undefined from the final type.
|
||||
if (strictNullChecks && declaration.initializer && !(getFalsyFlags(checkDeclarationInitializer(declaration)) & TypeFlags.Undefined)) {
|
||||
type = getTypeWithFacts(type, TypeFacts.NEUndefined);
|
||||
if (!declaration.initializer) {
|
||||
return type;
|
||||
}
|
||||
return declaration.initializer && !getEffectiveTypeAnnotationNode(walkUpBindingElementsAndPatterns(declaration)) ?
|
||||
getUnionType([type, checkDeclarationInitializer(declaration)], UnionReduction.Subtype) :
|
||||
type;
|
||||
if (getEffectiveTypeAnnotationNode(walkUpBindingElementsAndPatterns(declaration))) {
|
||||
// In strict null checking mode, if a default value of a non-undefined type is specified, remove
|
||||
// undefined from the final type.
|
||||
return strictNullChecks && !(getFalsyFlags(checkDeclarationInitializer(declaration)) & TypeFlags.Undefined) ?
|
||||
getTypeWithFacts(type, TypeFacts.NEUndefined) :
|
||||
type;
|
||||
}
|
||||
return getUnionType([getTypeWithFacts(type, TypeFacts.NEUndefined), checkDeclarationInitializer(declaration)], UnionReduction.Subtype);
|
||||
}
|
||||
|
||||
function getTypeForDeclarationFromJSDocComment(declaration: Node) {
|
||||
@@ -10140,7 +10149,7 @@ namespace ts {
|
||||
propType;
|
||||
}
|
||||
if (everyType(objectType, isTupleType) && isNumericLiteralName(propName) && +propName >= 0) {
|
||||
if (accessNode && everyType(objectType, t => !(<TupleTypeReference>t).target.hasRestElement)) {
|
||||
if (accessNode && everyType(objectType, t => !(<TupleTypeReference>t).target.hasRestElement) && !(accessFlags & AccessFlags.NoTupleBoundsCheck)) {
|
||||
const indexNode = getIndexNodeForAccessExpression(accessNode);
|
||||
if (isTupleType(objectType)) {
|
||||
error(indexNode, Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2,
|
||||
@@ -11422,13 +11431,14 @@ namespace ts {
|
||||
if (!type || !mapper || mapper === identityMapper) {
|
||||
return type;
|
||||
}
|
||||
if (instantiationDepth === 50) {
|
||||
if (instantiationDepth === 50 || instantiationCount >= 5000000) {
|
||||
// We have reached 50 recursive type instantiations and there is a very high likelyhood we're dealing
|
||||
// with a combination of infinite generic types that perpetually generate new type identities. We stop
|
||||
// the recursion here by yielding the error type.
|
||||
error(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
|
||||
return errorType;
|
||||
}
|
||||
instantiationCount++;
|
||||
instantiationDepth++;
|
||||
const result = instantiateTypeWorker(type, mapper);
|
||||
instantiationDepth--;
|
||||
@@ -13287,14 +13297,14 @@ namespace ts {
|
||||
if (!isGenericMappedType(source)) {
|
||||
const targetConstraint = getConstraintTypeFromMappedType(target);
|
||||
const sourceKeys = getIndexType(source, /*stringsOnly*/ undefined, /*noIndexSignatures*/ true);
|
||||
const hasOptionalUnionKeys = modifiers & MappedTypeModifiers.IncludeOptional && targetConstraint.flags & TypeFlags.Union;
|
||||
const filteredByApplicability = hasOptionalUnionKeys ? filterType(targetConstraint, t => !!isRelatedTo(t, sourceKeys)) : undefined;
|
||||
const includeOptional = modifiers & MappedTypeModifiers.IncludeOptional;
|
||||
const filteredByApplicability = includeOptional ? intersectTypes(targetConstraint, sourceKeys) : undefined;
|
||||
// A source type T is related to a target type { [P in Q]: X } if Q is related to keyof T and T[Q] is related to X.
|
||||
// A source type T is related to a target type { [P in Q]?: X } if some constituent Q' of Q is related to keyof T and T[Q'] is related to X.
|
||||
if (hasOptionalUnionKeys
|
||||
if (includeOptional
|
||||
? !(filteredByApplicability!.flags & TypeFlags.Never)
|
||||
: isRelatedTo(targetConstraint, sourceKeys)) {
|
||||
const indexingType = hasOptionalUnionKeys ? filteredByApplicability! : getTypeParameterFromMappedType(target);
|
||||
const indexingType = filteredByApplicability || getTypeParameterFromMappedType(target);
|
||||
const indexedAccessType = getIndexedAccessType(source, indexingType);
|
||||
const templateType = getTemplateTypeFromMappedType(target);
|
||||
if (result = isRelatedTo(indexedAccessType, templateType, reportErrors)) {
|
||||
@@ -15429,36 +15439,11 @@ namespace ts {
|
||||
inferFromTypes(getFalseTypeFromConditionalType(<ConditionalType>source), getFalseTypeFromConditionalType(<ConditionalType>target));
|
||||
}
|
||||
else if (target.flags & TypeFlags.Conditional && !contravariant) {
|
||||
inferFromTypes(source, getTrueTypeFromConditionalType(<ConditionalType>target));
|
||||
inferFromTypes(source, getFalseTypeFromConditionalType(<ConditionalType>target));
|
||||
const targetTypes = [getTrueTypeFromConditionalType(<ConditionalType>target), getFalseTypeFromConditionalType(<ConditionalType>target)];
|
||||
inferToMultipleTypes(source, targetTypes, /*isIntersection*/ false);
|
||||
}
|
||||
else if (target.flags & TypeFlags.UnionOrIntersection) {
|
||||
// We infer from types that are not naked type variables first so that inferences we
|
||||
// make from nested naked type variables and given slightly higher priority by virtue
|
||||
// of being first in the candidates array.
|
||||
let typeVariableCount = 0;
|
||||
for (const t of (<UnionOrIntersectionType>target).types) {
|
||||
if (getInferenceInfoForType(t)) {
|
||||
typeVariableCount++;
|
||||
}
|
||||
else {
|
||||
inferFromTypes(source, t);
|
||||
}
|
||||
}
|
||||
// Inferences directly to naked type variables are given lower priority as they are
|
||||
// less specific. For example, when inferring from Promise<string> to T | Promise<T>,
|
||||
// we want to infer string for T, not Promise<string> | string. For intersection types
|
||||
// we only infer to single naked type variables.
|
||||
if (target.flags & TypeFlags.Union ? typeVariableCount !== 0 : typeVariableCount === 1) {
|
||||
const savePriority = priority;
|
||||
priority |= InferencePriority.NakedTypeVariable;
|
||||
for (const t of (<UnionOrIntersectionType>target).types) {
|
||||
if (getInferenceInfoForType(t)) {
|
||||
inferFromTypes(source, t);
|
||||
}
|
||||
}
|
||||
priority = savePriority;
|
||||
}
|
||||
inferToMultipleTypes(source, (<UnionOrIntersectionType>target).types, !!(target.flags & TypeFlags.Intersection));
|
||||
}
|
||||
else if (source.flags & TypeFlags.Union) {
|
||||
// Source is a union or intersection type, infer from each constituent type
|
||||
@@ -15556,6 +15541,35 @@ namespace ts {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function inferToMultipleTypes(source: Type, targets: Type[], isIntersection: boolean) {
|
||||
// We infer from types that are not naked type variables first so that inferences we
|
||||
// make from nested naked type variables and given slightly higher priority by virtue
|
||||
// of being first in the candidates array.
|
||||
let typeVariableCount = 0;
|
||||
for (const t of targets) {
|
||||
if (getInferenceInfoForType(t)) {
|
||||
typeVariableCount++;
|
||||
}
|
||||
else {
|
||||
inferFromTypes(source, t);
|
||||
}
|
||||
}
|
||||
// Inferences directly to naked type variables are given lower priority as they are
|
||||
// less specific. For example, when inferring from Promise<string> to T | Promise<T>,
|
||||
// we want to infer string for T, not Promise<string> | string. For intersection types
|
||||
// we only infer to single naked type variables.
|
||||
if (isIntersection ? typeVariableCount === 1 : typeVariableCount !== 0) {
|
||||
const savePriority = priority;
|
||||
priority |= InferencePriority.NakedTypeVariable;
|
||||
for (const t of targets) {
|
||||
if (getInferenceInfoForType(t)) {
|
||||
inferFromTypes(source, t);
|
||||
}
|
||||
}
|
||||
priority = savePriority;
|
||||
}
|
||||
}
|
||||
|
||||
function inferToMappedType(source: Type, target: MappedType, constraintType: Type): boolean {
|
||||
if (constraintType.flags & TypeFlags.Union) {
|
||||
let result = false;
|
||||
@@ -19287,26 +19301,7 @@ namespace ts {
|
||||
function getArrayLiteralTupleTypeIfApplicable(elementTypes: Type[], contextualType: Type | undefined, hasRestElement: boolean, elementCount = elementTypes.length, readonly = false) {
|
||||
// Infer a tuple type when the contextual type is or contains a tuple-like type
|
||||
if (readonly || (contextualType && forEachType(contextualType, isTupleLikeType))) {
|
||||
const minLength = elementCount - (hasRestElement ? 1 : 0);
|
||||
const pattern = contextualType && contextualType.pattern;
|
||||
// If array literal is contextually typed by a binding pattern or an assignment pattern, pad the resulting
|
||||
// tuple type with the corresponding binding or assignment element types to make the lengths equal.
|
||||
if (!hasRestElement && pattern && (pattern.kind === SyntaxKind.ArrayBindingPattern || pattern.kind === SyntaxKind.ArrayLiteralExpression)) {
|
||||
const patternElements = (<BindingPattern | ArrayLiteralExpression>pattern).elements;
|
||||
for (let i = elementCount; i < patternElements.length; i++) {
|
||||
const e = patternElements[i];
|
||||
if (hasDefaultValue(e)) {
|
||||
elementTypes.push((<TypeReference>contextualType).typeArguments![i]);
|
||||
}
|
||||
else if (i < patternElements.length - 1 || !(e.kind === SyntaxKind.BindingElement && (<BindingElement>e).dotDotDotToken || e.kind === SyntaxKind.SpreadElement)) {
|
||||
if (e.kind !== SyntaxKind.OmittedExpression) {
|
||||
error(e, Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);
|
||||
}
|
||||
elementTypes.push(strictNullChecks ? implicitNeverType : undefinedWideningType);
|
||||
}
|
||||
}
|
||||
}
|
||||
return createTupleType(elementTypes, minLength, hasRestElement, readonly);
|
||||
return createTupleType(elementTypes, elementCount - (hasRestElement ? 1 : 0), hasRestElement, readonly);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23906,8 +23901,10 @@ namespace ts {
|
||||
if (isArrayLikeType(sourceType)) {
|
||||
// We create a synthetic expression so that getIndexedAccessType doesn't get confused
|
||||
// when the element is a SyntaxKind.ElementAccessExpression.
|
||||
const elementType = getIndexedAccessType(sourceType, indexType, createSyntheticExpression(element, indexType));
|
||||
const type = getFlowTypeOfDestructuring(element, elementType);
|
||||
const accessFlags = hasDefaultValue(element) ? AccessFlags.NoTupleBoundsCheck : 0;
|
||||
const elementType = getIndexedAccessTypeOrUndefined(sourceType, indexType, createSyntheticExpression(element, indexType), accessFlags) || errorType;
|
||||
const assignedType = hasDefaultValue(element) ? getTypeWithFacts(elementType, TypeFacts.NEUndefined) : elementType;
|
||||
const type = getFlowTypeOfDestructuring(element, assignedType);
|
||||
return checkDestructuringAssignment(element, type, checkMode);
|
||||
}
|
||||
return checkDestructuringAssignment(element, elementType, checkMode);
|
||||
@@ -24496,10 +24493,13 @@ namespace ts {
|
||||
function checkDeclarationInitializer(declaration: HasExpressionInitializer) {
|
||||
const initializer = getEffectiveInitializer(declaration)!;
|
||||
const type = getTypeOfExpression(initializer, /*cache*/ true);
|
||||
const padded = isParameter(declaration) && declaration.name.kind === SyntaxKind.ArrayBindingPattern &&
|
||||
isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ?
|
||||
padTupleType(type, declaration.name) : type;
|
||||
const widened = getCombinedNodeFlags(declaration) & NodeFlags.Const ||
|
||||
isDeclarationReadonly(declaration) ||
|
||||
isTypeAssertion(initializer) ||
|
||||
isLiteralOfContextualType(type, getContextualType(initializer)) ? type : getWidenedLiteralType(type);
|
||||
isLiteralOfContextualType(padded, getContextualType(initializer)) ? padded : getWidenedLiteralType(padded);
|
||||
if (isInJSFile(declaration)) {
|
||||
if (widened.flags & TypeFlags.Nullable) {
|
||||
reportImplicitAny(declaration, anyType);
|
||||
@@ -24513,6 +24513,22 @@ namespace ts {
|
||||
return widened;
|
||||
}
|
||||
|
||||
function padTupleType(type: TupleTypeReference, pattern: ArrayBindingPattern) {
|
||||
const patternElements = pattern.elements;
|
||||
const arity = getTypeReferenceArity(type);
|
||||
const elementTypes = arity ? type.typeArguments!.slice() : [];
|
||||
for (let i = arity; i < patternElements.length; i++) {
|
||||
const e = patternElements[i];
|
||||
if (i < patternElements.length - 1 || !(e.kind === SyntaxKind.BindingElement && e.dotDotDotToken)) {
|
||||
elementTypes.push(!isOmittedExpression(e) && hasDefaultValue(e) ? getTypeFromBindingElement(e, /*includePatternInType*/ false, /*reportErrors*/ false) : anyType);
|
||||
if (!isOmittedExpression(e) && !hasDefaultValue(e)) {
|
||||
reportImplicitAny(e, anyType);
|
||||
}
|
||||
}
|
||||
}
|
||||
return createTupleType(elementTypes, type.target.minLength, /*hasRestElement*/ false, type.target.readonly);
|
||||
}
|
||||
|
||||
function isLiteralOfContextualType(candidateType: Type, contextualType: Type | undefined): boolean {
|
||||
if (contextualType) {
|
||||
if (contextualType.flags & TypeFlags.UnionOrIntersection) {
|
||||
@@ -24761,6 +24777,7 @@ namespace ts {
|
||||
function checkExpression(node: Expression | QualifiedName, checkMode?: CheckMode, forceTuple?: boolean): Type {
|
||||
const saveCurrentNode = currentNode;
|
||||
currentNode = node;
|
||||
instantiationCount = 0;
|
||||
const uninstantiatedType = checkExpressionWorker(node, checkMode, forceTuple);
|
||||
const type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, checkMode);
|
||||
if (isConstEnumObjectType(type)) {
|
||||
@@ -29482,6 +29499,7 @@ namespace ts {
|
||||
if (node) {
|
||||
const saveCurrentNode = currentNode;
|
||||
currentNode = node;
|
||||
instantiationCount = 0;
|
||||
checkSourceElementWorker(node);
|
||||
currentNode = saveCurrentNode;
|
||||
}
|
||||
@@ -29753,6 +29771,7 @@ namespace ts {
|
||||
function checkDeferredNode(node: Node) {
|
||||
const saveCurrentNode = currentNode;
|
||||
currentNode = node;
|
||||
instantiationCount = 0;
|
||||
switch (node.kind) {
|
||||
case SyntaxKind.FunctionExpression:
|
||||
case SyntaxKind.ArrowFunction:
|
||||
|
||||
+15
-9
@@ -1544,8 +1544,8 @@ namespace ts {
|
||||
export function createIf(expression: Expression, thenStatement: Statement, elseStatement?: Statement) {
|
||||
const node = <IfStatement>createSynthesizedNode(SyntaxKind.IfStatement);
|
||||
node.expression = expression;
|
||||
node.thenStatement = thenStatement;
|
||||
node.elseStatement = elseStatement;
|
||||
node.thenStatement = asEmbeddedStatement(thenStatement);
|
||||
node.elseStatement = asEmbeddedStatement(elseStatement);
|
||||
return node;
|
||||
}
|
||||
|
||||
@@ -1559,7 +1559,7 @@ namespace ts {
|
||||
|
||||
export function createDo(statement: Statement, expression: Expression) {
|
||||
const node = <DoStatement>createSynthesizedNode(SyntaxKind.DoStatement);
|
||||
node.statement = statement;
|
||||
node.statement = asEmbeddedStatement(statement);
|
||||
node.expression = expression;
|
||||
return node;
|
||||
}
|
||||
@@ -1574,7 +1574,7 @@ namespace ts {
|
||||
export function createWhile(expression: Expression, statement: Statement) {
|
||||
const node = <WhileStatement>createSynthesizedNode(SyntaxKind.WhileStatement);
|
||||
node.expression = expression;
|
||||
node.statement = statement;
|
||||
node.statement = asEmbeddedStatement(statement);
|
||||
return node;
|
||||
}
|
||||
|
||||
@@ -1590,7 +1590,7 @@ namespace ts {
|
||||
node.initializer = initializer;
|
||||
node.condition = condition;
|
||||
node.incrementor = incrementor;
|
||||
node.statement = statement;
|
||||
node.statement = asEmbeddedStatement(statement);
|
||||
return node;
|
||||
}
|
||||
|
||||
@@ -1607,7 +1607,7 @@ namespace ts {
|
||||
const node = <ForInStatement>createSynthesizedNode(SyntaxKind.ForInStatement);
|
||||
node.initializer = initializer;
|
||||
node.expression = expression;
|
||||
node.statement = statement;
|
||||
node.statement = asEmbeddedStatement(statement);
|
||||
return node;
|
||||
}
|
||||
|
||||
@@ -1624,7 +1624,7 @@ namespace ts {
|
||||
node.awaitModifier = awaitModifier;
|
||||
node.initializer = initializer;
|
||||
node.expression = expression;
|
||||
node.statement = statement;
|
||||
node.statement = asEmbeddedStatement(statement);
|
||||
return node;
|
||||
}
|
||||
|
||||
@@ -1676,7 +1676,7 @@ namespace ts {
|
||||
export function createWith(expression: Expression, statement: Statement) {
|
||||
const node = <WithStatement>createSynthesizedNode(SyntaxKind.WithStatement);
|
||||
node.expression = expression;
|
||||
node.statement = statement;
|
||||
node.statement = asEmbeddedStatement(statement);
|
||||
return node;
|
||||
}
|
||||
|
||||
@@ -1704,7 +1704,7 @@ namespace ts {
|
||||
export function createLabel(label: string | Identifier, statement: Statement) {
|
||||
const node = <LabeledStatement>createSynthesizedNode(SyntaxKind.LabeledStatement);
|
||||
node.label = asName(label);
|
||||
node.statement = statement;
|
||||
node.statement = asEmbeddedStatement(statement);
|
||||
return node;
|
||||
}
|
||||
|
||||
@@ -3080,6 +3080,12 @@ namespace ts {
|
||||
return typeof value === "number" ? createToken(value) : value;
|
||||
}
|
||||
|
||||
function asEmbeddedStatement<T extends Node>(statement: T): T | EmptyStatement;
|
||||
function asEmbeddedStatement<T extends Node>(statement: T | undefined): T | EmptyStatement | undefined;
|
||||
function asEmbeddedStatement<T extends Node>(statement: T | undefined): T | EmptyStatement | undefined {
|
||||
return statement && isNotEmittedStatement(statement) ? setTextRange(setOriginalNode(createEmptyStatement(), statement), statement) : statement;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears any EmitNode entries from parse-tree nodes.
|
||||
* @param sourceFile A source file.
|
||||
|
||||
@@ -1395,7 +1395,7 @@ namespace ts {
|
||||
const filePath = newSourceFile.path;
|
||||
addFileToFilesByName(newSourceFile, filePath, newSourceFile.resolvedPath);
|
||||
// Set the file as found during node modules search if it was found that way in old progra,
|
||||
if (oldProgram.isSourceFileFromExternalLibrary(oldProgram.getSourceFileByPath(filePath)!)) {
|
||||
if (oldProgram.isSourceFileFromExternalLibrary(oldProgram.getSourceFileByPath(newSourceFile.resolvedPath)!)) {
|
||||
sourceFilesFoundSearchingNodeModules.set(filePath, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2705,11 +2705,19 @@ namespace ts {
|
||||
return isStringLiteralLike(node) || isNumericLiteral(node);
|
||||
}
|
||||
|
||||
export function isSignedNumericLiteral(node: Node): node is PrefixUnaryExpression & { operand: NumericLiteral } {
|
||||
return isPrefixUnaryExpression(node) && (node.operator === SyntaxKind.PlusToken || node.operator === SyntaxKind.MinusToken) && isNumericLiteral(node.operand);
|
||||
}
|
||||
|
||||
/**
|
||||
* A declaration has a dynamic name if both of the following are true:
|
||||
* 1. The declaration has a computed property name
|
||||
* 2. The computed name is *not* expressed as Symbol.<name>, where name
|
||||
* is a property of the Symbol constructor that denotes a built in
|
||||
* A declaration has a dynamic name if all of the following are true:
|
||||
* 1. The declaration has a computed property name.
|
||||
* 2. The computed name is *not* expressed as a StringLiteral.
|
||||
* 3. The computed name is *not* expressed as a NumericLiteral.
|
||||
* 4. The computed name is *not* expressed as a PlusToken or MinusToken
|
||||
* immediately followed by a NumericLiteral.
|
||||
* 5. The computed name is *not* expressed as `Symbol.<name>`, where `<name>`
|
||||
* is a property of the Symbol constructor that denotes a built-in
|
||||
* Symbol.
|
||||
*/
|
||||
export function hasDynamicName(declaration: Declaration): declaration is DynamicNamedDeclaration {
|
||||
@@ -2720,6 +2728,7 @@ namespace ts {
|
||||
export function isDynamicName(name: DeclarationName): boolean {
|
||||
return name.kind === SyntaxKind.ComputedPropertyName &&
|
||||
!isStringOrNumericLiteralLike(name.expression) &&
|
||||
!isSignedNumericLiteral(name.expression) &&
|
||||
!isWellKnownSymbolSyntactically(name.expression);
|
||||
}
|
||||
|
||||
|
||||
@@ -501,7 +501,7 @@ namespace Harness {
|
||||
}
|
||||
|
||||
function enumerateTestFiles(runner: RunnerBase) {
|
||||
return runner.enumerateTestFiles();
|
||||
return runner.getTestFiles();
|
||||
}
|
||||
|
||||
function listFiles(path: string, spec: RegExp, options: { recursive?: boolean } = {}) {
|
||||
@@ -1311,6 +1311,13 @@ namespace Harness {
|
||||
if (jsCode.length && jsCode.charCodeAt(jsCode.length - 1) !== ts.CharacterCodes.lineFeed) {
|
||||
jsCode += "\r\n";
|
||||
}
|
||||
if (!result.diagnostics.length && !ts.endsWith(file.file, ts.Extension.Json)) {
|
||||
const fileParseResult = ts.createSourceFile(file.file, file.text, options.target || ts.ScriptTarget.ES3, /*parentNodes*/ false, ts.endsWith(file.file, "x") ? ts.ScriptKind.JSX : ts.ScriptKind.JS);
|
||||
if (ts.length(fileParseResult.parseDiagnostics)) {
|
||||
jsCode += getErrorBaseline([file.asTestFile()], fileParseResult.parseDiagnostics);
|
||||
return;
|
||||
}
|
||||
}
|
||||
jsCode += fileOutput(file, harnessSettings);
|
||||
});
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@ type TestRunnerKind = CompilerTestKind | FourslashTestKind | "project" | "rwc" |
|
||||
type CompilerTestKind = "conformance" | "compiler";
|
||||
type FourslashTestKind = "fourslash" | "fourslash-shims" | "fourslash-shims-pp" | "fourslash-server";
|
||||
|
||||
let shards = 1;
|
||||
let shardId = 1;
|
||||
|
||||
abstract class RunnerBase {
|
||||
// contains the tests to run
|
||||
public tests: (string | Harness.FileBasedTest)[] = [];
|
||||
@@ -19,6 +22,14 @@ abstract class RunnerBase {
|
||||
|
||||
abstract enumerateTestFiles(): (string | Harness.FileBasedTest)[];
|
||||
|
||||
getTestFiles(): ReturnType<this["enumerateTestFiles"]> {
|
||||
const all = this.enumerateTestFiles();
|
||||
if (shards === 1) {
|
||||
return all as ReturnType<this["enumerateTestFiles"]>;
|
||||
}
|
||||
return all.filter((_val, idx) => idx % shards === (shardId - 1)) as ReturnType<this["enumerateTestFiles"]>;
|
||||
}
|
||||
|
||||
/** The working directory where tests are found. Needed for batch testing where the input path will differ from the output path inside baselines */
|
||||
public workingDirectory = "";
|
||||
|
||||
|
||||
@@ -2234,7 +2234,13 @@ namespace ts.server {
|
||||
getDocumentPositionMapper(project: Project, generatedFileName: string, sourceFileName?: string): DocumentPositionMapper | undefined {
|
||||
// Since declaration info and map file watches arent updating project's directory structure host (which can cache file structure) use host
|
||||
const declarationInfo = this.getOrCreateScriptInfoNotOpenedByClient(generatedFileName, project.currentDirectory, this.host);
|
||||
if (!declarationInfo) return undefined;
|
||||
if (!declarationInfo) {
|
||||
if (sourceFileName) {
|
||||
// Project contains source file and it generates the generated file name
|
||||
project.addGeneratedFileWatch(generatedFileName, sourceFileName);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// Try to get from cache
|
||||
declarationInfo.getSnapshot(); // Ensure synchronized
|
||||
|
||||
@@ -109,12 +109,22 @@ namespace ts.server {
|
||||
return value instanceof ScriptInfo;
|
||||
}
|
||||
|
||||
interface GeneratedFileWatcher {
|
||||
generatedFilePath: Path;
|
||||
watcher: FileWatcher;
|
||||
}
|
||||
type GeneratedFileWatcherMap = GeneratedFileWatcher | Map<GeneratedFileWatcher>;
|
||||
function isGeneratedFileWatcher(watch: GeneratedFileWatcherMap): watch is GeneratedFileWatcher {
|
||||
return (watch as GeneratedFileWatcher).generatedFilePath !== undefined;
|
||||
}
|
||||
|
||||
export abstract class Project implements LanguageServiceHost, ModuleResolutionHost {
|
||||
private rootFiles: ScriptInfo[] = [];
|
||||
private rootFilesMap: Map<ProjectRoot> = createMap<ProjectRoot>();
|
||||
private program: Program | undefined;
|
||||
private externalFiles: SortedReadonlyArray<string> | undefined;
|
||||
private missingFilesMap: Map<FileWatcher> | undefined;
|
||||
private generatedFilesMap: GeneratedFileWatcherMap | undefined;
|
||||
private plugins: PluginModuleWithName[] = [];
|
||||
|
||||
/*@internal*/
|
||||
@@ -568,6 +578,7 @@ namespace ts.server {
|
||||
this.lastFileExceededProgramSize = lastFileExceededProgramSize;
|
||||
this.builderState = undefined;
|
||||
this.resolutionCache.closeTypeRootsWatch();
|
||||
this.clearGeneratedFileWatch();
|
||||
this.projectService.onUpdateLanguageServiceStateForProject(this, /*languageServiceEnabled*/ false);
|
||||
}
|
||||
|
||||
@@ -649,6 +660,7 @@ namespace ts.server {
|
||||
clearMap(this.missingFilesMap, closeFileWatcher);
|
||||
this.missingFilesMap = undefined!;
|
||||
}
|
||||
this.clearGeneratedFileWatch();
|
||||
|
||||
// signal language service to release source files acquired from document registry
|
||||
this.languageService.dispose();
|
||||
@@ -942,6 +954,39 @@ namespace ts.server {
|
||||
missingFilePath => this.addMissingFileWatcher(missingFilePath)
|
||||
);
|
||||
|
||||
if (this.generatedFilesMap) {
|
||||
const outPath = this.compilerOptions.outFile && this.compilerOptions.out;
|
||||
if (isGeneratedFileWatcher(this.generatedFilesMap)) {
|
||||
// --out
|
||||
if (!outPath || !this.isValidGeneratedFileWatcher(
|
||||
removeFileExtension(outPath) + Extension.Dts,
|
||||
this.generatedFilesMap,
|
||||
)) {
|
||||
this.clearGeneratedFileWatch();
|
||||
}
|
||||
}
|
||||
else {
|
||||
// MultiFile
|
||||
if (outPath) {
|
||||
this.clearGeneratedFileWatch();
|
||||
}
|
||||
else {
|
||||
this.generatedFilesMap.forEach((watcher, source) => {
|
||||
const sourceFile = this.program!.getSourceFileByPath(source as Path);
|
||||
if (!sourceFile ||
|
||||
sourceFile.resolvedPath !== source ||
|
||||
!this.isValidGeneratedFileWatcher(
|
||||
getDeclarationEmitOutputFilePathWorker(sourceFile.fileName, this.compilerOptions, this.currentDirectory, this.program!.getCommonSourceDirectory(), this.getCanonicalFileName),
|
||||
watcher
|
||||
)) {
|
||||
closeFileWatcherOf(watcher);
|
||||
(this.generatedFilesMap as Map<GeneratedFileWatcher>).delete(source);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Watch the type locations that would be added to program as part of automatic type resolutions
|
||||
if (this.languageServiceEnabled) {
|
||||
this.resolutionCache.updateTypeRootsWatch();
|
||||
@@ -1006,6 +1051,61 @@ namespace ts.server {
|
||||
return !!this.missingFilesMap && this.missingFilesMap.has(path);
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
addGeneratedFileWatch(generatedFile: string, sourceFile: string) {
|
||||
if (this.compilerOptions.outFile || this.compilerOptions.out) {
|
||||
// Single watcher
|
||||
if (!this.generatedFilesMap) {
|
||||
this.generatedFilesMap = this.createGeneratedFileWatcher(generatedFile);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Map
|
||||
const path = this.toPath(sourceFile);
|
||||
if (this.generatedFilesMap) {
|
||||
if (isGeneratedFileWatcher(this.generatedFilesMap)) {
|
||||
Debug.fail(`${this.projectName} Expected to not have --out watcher for generated file with options: ${JSON.stringify(this.compilerOptions)}`);
|
||||
return;
|
||||
}
|
||||
if (this.generatedFilesMap.has(path)) return;
|
||||
}
|
||||
else {
|
||||
this.generatedFilesMap = createMap();
|
||||
}
|
||||
this.generatedFilesMap.set(path, this.createGeneratedFileWatcher(generatedFile));
|
||||
}
|
||||
}
|
||||
|
||||
private createGeneratedFileWatcher(generatedFile: string): GeneratedFileWatcher {
|
||||
return {
|
||||
generatedFilePath: this.toPath(generatedFile),
|
||||
watcher: this.projectService.watchFactory.watchFile(
|
||||
this.projectService.host,
|
||||
generatedFile,
|
||||
() => this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this),
|
||||
PollingInterval.High,
|
||||
WatchType.MissingGeneratedFile,
|
||||
this
|
||||
)
|
||||
};
|
||||
}
|
||||
|
||||
private isValidGeneratedFileWatcher(generateFile: string, watcher: GeneratedFileWatcher) {
|
||||
return this.toPath(generateFile) === watcher.generatedFilePath;
|
||||
}
|
||||
|
||||
private clearGeneratedFileWatch() {
|
||||
if (this.generatedFilesMap) {
|
||||
if (isGeneratedFileWatcher(this.generatedFilesMap)) {
|
||||
closeFileWatcherOf(this.generatedFilesMap);
|
||||
}
|
||||
else {
|
||||
clearMap(this.generatedFilesMap, closeFileWatcherOf);
|
||||
}
|
||||
this.generatedFilesMap = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
getScriptInfoForNormalizedPath(fileName: NormalizedPath): ScriptInfo | undefined {
|
||||
const scriptInfo = this.projectService.getScriptInfoForPath(this.toPath(fileName));
|
||||
if (scriptInfo && !scriptInfo.isAttached(this)) {
|
||||
|
||||
@@ -227,5 +227,6 @@ namespace ts {
|
||||
NodeModulesForClosedScriptInfo = "node_modules for closed script infos in them",
|
||||
MissingSourceMapFile = "Missing source map file",
|
||||
NoopConfigFileForInferredRoot = "Noop Config file for the inferred project root",
|
||||
MissingGeneratedFile = "Missing generated file"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,9 +72,13 @@ namespace ts.SmartSelectionRange {
|
||||
function pushSelectionRange(start: number, end: number): void {
|
||||
// Skip empty ranges
|
||||
if (start !== end) {
|
||||
// Skip ranges that are identical to the parent
|
||||
const textSpan = createTextSpanFromBounds(start, end);
|
||||
if (!selectionRange || !textSpansEqual(textSpan, selectionRange.textSpan)) {
|
||||
if (!selectionRange || (
|
||||
// Skip ranges that are identical to the parent
|
||||
!textSpansEqual(textSpan, selectionRange.textSpan) &&
|
||||
// Skip ranges that don’t contain the original position
|
||||
textSpanIntersectsWithPosition(textSpan, pos)
|
||||
)) {
|
||||
selectionRange = { textSpan, ...selectionRange && { parent: selectionRange } };
|
||||
}
|
||||
}
|
||||
|
||||
+130
-104
@@ -847,9 +847,10 @@ namespace ts.textChanges {
|
||||
|
||||
/** Note: output node may be mutated input node. */
|
||||
export function getNonformattedText(node: Node, sourceFile: SourceFile | undefined, newLineCharacter: string): { text: string, node: Node } {
|
||||
const writer = new Writer(newLineCharacter);
|
||||
const omitTrailingSemicolon = !!sourceFile && !probablyUsesSemicolons(sourceFile);
|
||||
const writer = createWriter(newLineCharacter, omitTrailingSemicolon);
|
||||
const newLine = newLineCharacter === "\n" ? NewLineKind.LineFeed : NewLineKind.CarriageReturnLineFeed;
|
||||
createPrinter({ newLine, neverAsciiEscape: true }, writer).writeNode(EmitHint.Unspecified, node, sourceFile, writer);
|
||||
createPrinter({ newLine, neverAsciiEscape: true, omitTrailingSemicolon }, writer).writeNode(EmitHint.Unspecified, node, sourceFile, writer);
|
||||
return { text: writer.getText(), node: assignPositionsToNode(node) };
|
||||
}
|
||||
}
|
||||
@@ -887,143 +888,168 @@ namespace ts.textChanges {
|
||||
return nodeArray;
|
||||
}
|
||||
|
||||
class Writer implements EmitTextWriter, PrintHandlers {
|
||||
private lastNonTriviaPosition = 0;
|
||||
private readonly writer: EmitTextWriter;
|
||||
interface TextChangesWriter extends EmitTextWriter, PrintHandlers {}
|
||||
|
||||
public readonly onEmitNode: PrintHandlers["onEmitNode"];
|
||||
public readonly onBeforeEmitNodeArray: PrintHandlers["onBeforeEmitNodeArray"];
|
||||
public readonly onAfterEmitNodeArray: PrintHandlers["onAfterEmitNodeArray"];
|
||||
public readonly onBeforeEmitToken: PrintHandlers["onBeforeEmitToken"];
|
||||
public readonly onAfterEmitToken: PrintHandlers["onAfterEmitToken"];
|
||||
function createWriter(newLine: string, omitTrailingSemicolon?: boolean): TextChangesWriter {
|
||||
let lastNonTriviaPosition = 0;
|
||||
|
||||
constructor(newLine: string) {
|
||||
this.writer = createTextWriter(newLine);
|
||||
this.onEmitNode = (hint, node, printCallback) => {
|
||||
if (node) {
|
||||
setPos(node, this.lastNonTriviaPosition);
|
||||
}
|
||||
printCallback(hint, node);
|
||||
if (node) {
|
||||
setEnd(node, this.lastNonTriviaPosition);
|
||||
}
|
||||
};
|
||||
this.onBeforeEmitNodeArray = nodes => {
|
||||
if (nodes) {
|
||||
setPos(nodes, this.lastNonTriviaPosition);
|
||||
}
|
||||
};
|
||||
this.onAfterEmitNodeArray = nodes => {
|
||||
if (nodes) {
|
||||
setEnd(nodes, this.lastNonTriviaPosition);
|
||||
}
|
||||
};
|
||||
this.onBeforeEmitToken = node => {
|
||||
if (node) {
|
||||
setPos(node, this.lastNonTriviaPosition);
|
||||
}
|
||||
};
|
||||
this.onAfterEmitToken = node => {
|
||||
if (node) {
|
||||
setEnd(node, this.lastNonTriviaPosition);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private setLastNonTriviaPosition(s: string, force: boolean) {
|
||||
const writer = omitTrailingSemicolon ? getTrailingSemicolonOmittingWriter(createTextWriter(newLine)) : createTextWriter(newLine);
|
||||
const onEmitNode: PrintHandlers["onEmitNode"] = (hint, node, printCallback) => {
|
||||
if (node) {
|
||||
setPos(node, lastNonTriviaPosition);
|
||||
}
|
||||
printCallback(hint, node);
|
||||
if (node) {
|
||||
setEnd(node, lastNonTriviaPosition);
|
||||
}
|
||||
};
|
||||
const onBeforeEmitNodeArray: PrintHandlers["onBeforeEmitNodeArray"] = nodes => {
|
||||
if (nodes) {
|
||||
setPos(nodes, lastNonTriviaPosition);
|
||||
}
|
||||
};
|
||||
const onAfterEmitNodeArray: PrintHandlers["onAfterEmitNodeArray"] = nodes => {
|
||||
if (nodes) {
|
||||
setEnd(nodes, lastNonTriviaPosition);
|
||||
}
|
||||
};
|
||||
const onBeforeEmitToken: PrintHandlers["onBeforeEmitToken"] = node => {
|
||||
if (node) {
|
||||
setPos(node, lastNonTriviaPosition);
|
||||
}
|
||||
};
|
||||
const onAfterEmitToken: PrintHandlers["onAfterEmitToken"] = node => {
|
||||
if (node) {
|
||||
setEnd(node, lastNonTriviaPosition);
|
||||
}
|
||||
};
|
||||
|
||||
function setLastNonTriviaPosition(s: string, force: boolean) {
|
||||
if (force || !isTrivia(s)) {
|
||||
this.lastNonTriviaPosition = this.writer.getTextPos();
|
||||
lastNonTriviaPosition = writer.getTextPos();
|
||||
let i = 0;
|
||||
while (isWhiteSpaceLike(s.charCodeAt(s.length - i - 1))) {
|
||||
i++;
|
||||
}
|
||||
// trim trailing whitespaces
|
||||
this.lastNonTriviaPosition -= i;
|
||||
lastNonTriviaPosition -= i;
|
||||
}
|
||||
}
|
||||
|
||||
write(s: string): void {
|
||||
this.writer.write(s);
|
||||
this.setLastNonTriviaPosition(s, /*force*/ false);
|
||||
function write(s: string): void {
|
||||
writer.write(s);
|
||||
setLastNonTriviaPosition(s, /*force*/ false);
|
||||
}
|
||||
writeComment(s: string): void {
|
||||
this.writer.writeComment(s);
|
||||
function writeComment(s: string): void {
|
||||
writer.writeComment(s);
|
||||
}
|
||||
writeKeyword(s: string): void {
|
||||
this.writer.writeKeyword(s);
|
||||
this.setLastNonTriviaPosition(s, /*force*/ false);
|
||||
function writeKeyword(s: string): void {
|
||||
writer.writeKeyword(s);
|
||||
setLastNonTriviaPosition(s, /*force*/ false);
|
||||
}
|
||||
writeOperator(s: string): void {
|
||||
this.writer.writeOperator(s);
|
||||
this.setLastNonTriviaPosition(s, /*force*/ false);
|
||||
function writeOperator(s: string): void {
|
||||
writer.writeOperator(s);
|
||||
setLastNonTriviaPosition(s, /*force*/ false);
|
||||
}
|
||||
writePunctuation(s: string): void {
|
||||
this.writer.writePunctuation(s);
|
||||
this.setLastNonTriviaPosition(s, /*force*/ false);
|
||||
function writePunctuation(s: string): void {
|
||||
writer.writePunctuation(s);
|
||||
setLastNonTriviaPosition(s, /*force*/ false);
|
||||
}
|
||||
writeTrailingSemicolon(s: string): void {
|
||||
this.writer.writeTrailingSemicolon(s);
|
||||
this.setLastNonTriviaPosition(s, /*force*/ false);
|
||||
function writeTrailingSemicolon(s: string): void {
|
||||
writer.writeTrailingSemicolon(s);
|
||||
setLastNonTriviaPosition(s, /*force*/ false);
|
||||
}
|
||||
writeParameter(s: string): void {
|
||||
this.writer.writeParameter(s);
|
||||
this.setLastNonTriviaPosition(s, /*force*/ false);
|
||||
function writeParameter(s: string): void {
|
||||
writer.writeParameter(s);
|
||||
setLastNonTriviaPosition(s, /*force*/ false);
|
||||
}
|
||||
writeProperty(s: string): void {
|
||||
this.writer.writeProperty(s);
|
||||
this.setLastNonTriviaPosition(s, /*force*/ false);
|
||||
function writeProperty(s: string): void {
|
||||
writer.writeProperty(s);
|
||||
setLastNonTriviaPosition(s, /*force*/ false);
|
||||
}
|
||||
writeSpace(s: string): void {
|
||||
this.writer.writeSpace(s);
|
||||
this.setLastNonTriviaPosition(s, /*force*/ false);
|
||||
function writeSpace(s: string): void {
|
||||
writer.writeSpace(s);
|
||||
setLastNonTriviaPosition(s, /*force*/ false);
|
||||
}
|
||||
writeStringLiteral(s: string): void {
|
||||
this.writer.writeStringLiteral(s);
|
||||
this.setLastNonTriviaPosition(s, /*force*/ false);
|
||||
function writeStringLiteral(s: string): void {
|
||||
writer.writeStringLiteral(s);
|
||||
setLastNonTriviaPosition(s, /*force*/ false);
|
||||
}
|
||||
writeSymbol(s: string, sym: Symbol): void {
|
||||
this.writer.writeSymbol(s, sym);
|
||||
this.setLastNonTriviaPosition(s, /*force*/ false);
|
||||
function writeSymbol(s: string, sym: Symbol): void {
|
||||
writer.writeSymbol(s, sym);
|
||||
setLastNonTriviaPosition(s, /*force*/ false);
|
||||
}
|
||||
writeLine(): void {
|
||||
this.writer.writeLine();
|
||||
function writeLine(): void {
|
||||
writer.writeLine();
|
||||
}
|
||||
increaseIndent(): void {
|
||||
this.writer.increaseIndent();
|
||||
function increaseIndent(): void {
|
||||
writer.increaseIndent();
|
||||
}
|
||||
decreaseIndent(): void {
|
||||
this.writer.decreaseIndent();
|
||||
function decreaseIndent(): void {
|
||||
writer.decreaseIndent();
|
||||
}
|
||||
getText(): string {
|
||||
return this.writer.getText();
|
||||
function getText(): string {
|
||||
return writer.getText();
|
||||
}
|
||||
rawWrite(s: string): void {
|
||||
this.writer.rawWrite(s);
|
||||
this.setLastNonTriviaPosition(s, /*force*/ false);
|
||||
function rawWrite(s: string): void {
|
||||
writer.rawWrite(s);
|
||||
setLastNonTriviaPosition(s, /*force*/ false);
|
||||
}
|
||||
writeLiteral(s: string): void {
|
||||
this.writer.writeLiteral(s);
|
||||
this.setLastNonTriviaPosition(s, /*force*/ true);
|
||||
function writeLiteral(s: string): void {
|
||||
writer.writeLiteral(s);
|
||||
setLastNonTriviaPosition(s, /*force*/ true);
|
||||
}
|
||||
getTextPos(): number {
|
||||
return this.writer.getTextPos();
|
||||
function getTextPos(): number {
|
||||
return writer.getTextPos();
|
||||
}
|
||||
getLine(): number {
|
||||
return this.writer.getLine();
|
||||
function getLine(): number {
|
||||
return writer.getLine();
|
||||
}
|
||||
getColumn(): number {
|
||||
return this.writer.getColumn();
|
||||
function getColumn(): number {
|
||||
return writer.getColumn();
|
||||
}
|
||||
getIndent(): number {
|
||||
return this.writer.getIndent();
|
||||
function getIndent(): number {
|
||||
return writer.getIndent();
|
||||
}
|
||||
isAtStartOfLine(): boolean {
|
||||
return this.writer.isAtStartOfLine();
|
||||
function isAtStartOfLine(): boolean {
|
||||
return writer.isAtStartOfLine();
|
||||
}
|
||||
clear(): void {
|
||||
this.writer.clear();
|
||||
this.lastNonTriviaPosition = 0;
|
||||
function clear(): void {
|
||||
writer.clear();
|
||||
lastNonTriviaPosition = 0;
|
||||
}
|
||||
|
||||
return {
|
||||
onEmitNode,
|
||||
onBeforeEmitNodeArray,
|
||||
onAfterEmitNodeArray,
|
||||
onBeforeEmitToken,
|
||||
onAfterEmitToken,
|
||||
write,
|
||||
writeComment,
|
||||
writeKeyword,
|
||||
writeOperator,
|
||||
writePunctuation,
|
||||
writeTrailingSemicolon,
|
||||
writeParameter,
|
||||
writeProperty,
|
||||
writeSpace,
|
||||
writeStringLiteral,
|
||||
writeSymbol,
|
||||
writeLine,
|
||||
increaseIndent,
|
||||
decreaseIndent,
|
||||
getText,
|
||||
rawWrite,
|
||||
writeLiteral,
|
||||
getTextPos,
|
||||
getLine,
|
||||
getColumn,
|
||||
getIndent,
|
||||
isAtStartOfLine,
|
||||
clear
|
||||
};
|
||||
}
|
||||
|
||||
function getInsertionPositionAtSourceFileTop(sourceFile: SourceFile): number {
|
||||
|
||||
@@ -1991,4 +1991,51 @@ namespace ts {
|
||||
});
|
||||
return typeIsAccessible ? res : undefined;
|
||||
}
|
||||
|
||||
export function syntaxUsuallyHasTrailingSemicolon(kind: SyntaxKind) {
|
||||
return kind === SyntaxKind.VariableStatement
|
||||
|| kind === SyntaxKind.ExpressionStatement
|
||||
|| kind === SyntaxKind.DoStatement
|
||||
|| kind === SyntaxKind.ContinueStatement
|
||||
|| kind === SyntaxKind.BreakStatement
|
||||
|| kind === SyntaxKind.ReturnStatement
|
||||
|| kind === SyntaxKind.ThrowStatement
|
||||
|| kind === SyntaxKind.DebuggerStatement
|
||||
|| kind === SyntaxKind.PropertyDeclaration
|
||||
|| kind === SyntaxKind.TypeAliasDeclaration
|
||||
|| kind === SyntaxKind.ImportDeclaration
|
||||
|| kind === SyntaxKind.ImportEqualsDeclaration
|
||||
|| kind === SyntaxKind.ExportDeclaration;
|
||||
}
|
||||
|
||||
export function probablyUsesSemicolons(sourceFile: SourceFile): boolean {
|
||||
let withSemicolon = 0;
|
||||
let withoutSemicolon = 0;
|
||||
const nStatementsToObserve = 5;
|
||||
forEachChild(sourceFile, function visit(node): boolean | undefined {
|
||||
if (syntaxUsuallyHasTrailingSemicolon(node.kind)) {
|
||||
const lastToken = node.getLastToken(sourceFile);
|
||||
if (lastToken && lastToken.kind === SyntaxKind.SemicolonToken) {
|
||||
withSemicolon++;
|
||||
}
|
||||
else {
|
||||
withoutSemicolon++;
|
||||
}
|
||||
}
|
||||
if (withSemicolon + withoutSemicolon >= nStatementsToObserve) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return forEachChild(node, visit);
|
||||
});
|
||||
|
||||
// One statement missing a semicolon isn’t sufficient evidence to say the user
|
||||
// doesn’t want semicolons, because they may not even be done writing that statement.
|
||||
if (withSemicolon === 0 && withoutSemicolon <= 1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// If even 2/5 places have a semicolon, the user probably wants semicolons
|
||||
return withSemicolon / withoutSemicolon > 1 / nStatementsToObserve;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ abstract class ExternalCompileRunnerBase extends RunnerBase {
|
||||
*/
|
||||
initializeTests(): void {
|
||||
// Read in and evaluate the test list
|
||||
const testList = this.tests && this.tests.length ? this.tests : this.enumerateTestFiles();
|
||||
const testList = this.tests && this.tests.length ? this.tests : this.getTestFiles();
|
||||
|
||||
// tslint:disable-next-line:no-this-assignment
|
||||
const cls = this;
|
||||
@@ -113,7 +113,7 @@ class DockerfileRunner extends ExternalCompileRunnerBase {
|
||||
}
|
||||
initializeTests(): void {
|
||||
// Read in and evaluate the test list
|
||||
const testList = this.tests && this.tests.length ? this.tests : this.enumerateTestFiles();
|
||||
const testList = this.tests && this.tests.length ? this.tests : this.getTestFiles();
|
||||
|
||||
// tslint:disable-next-line:no-this-assignment
|
||||
const cls = this;
|
||||
@@ -201,7 +201,7 @@ function sanitizeTimestamps(result: string): string {
|
||||
function sanitizeVersionSpecifiers(result: string): string {
|
||||
return result
|
||||
.replace(/\d+.\d+.\d+-insiders.\d\d\d\d\d\d\d\d/g, "X.X.X-insiders.xxxxxxxx")
|
||||
.replace(/([@v])\d+\.\d+\.\d+/g, "$1X.X.X");
|
||||
.replace(/([@v\()])\d+\.\d+\.\d+/g, "$1X.X.X");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -222,7 +222,7 @@ namespace Harness.Parallel.Host {
|
||||
console.log("Discovering runner-based tests...");
|
||||
const discoverStart = +(new Date());
|
||||
for (const runner of runners) {
|
||||
for (const test of runner.enumerateTestFiles()) {
|
||||
for (const test of runner.getTestFiles()) {
|
||||
const file = typeof test === "string" ? test : test.file;
|
||||
let size: number;
|
||||
if (!perfData) {
|
||||
|
||||
@@ -32,7 +32,11 @@ namespace project {
|
||||
|
||||
export class ProjectRunner extends RunnerBase {
|
||||
public enumerateTestFiles() {
|
||||
return this.enumerateFiles("tests/cases/project", /\.json$/, { recursive: true });
|
||||
const all = this.enumerateFiles("tests/cases/project", /\.json$/, { recursive: true });
|
||||
if (shards === 1) {
|
||||
return all;
|
||||
}
|
||||
return all.filter((_val, idx) => idx % shards === (shardId - 1));
|
||||
}
|
||||
|
||||
public kind(): TestRunnerKind {
|
||||
|
||||
@@ -80,6 +80,8 @@ interface TestConfig {
|
||||
timeout?: number;
|
||||
keepFailed?: boolean;
|
||||
skipPercent?: number;
|
||||
shardId?: number;
|
||||
shards?: number;
|
||||
}
|
||||
|
||||
interface TaskSet {
|
||||
@@ -114,6 +116,12 @@ function handleTestConfig() {
|
||||
if (testConfig.skipPercent !== undefined) {
|
||||
skipPercent = testConfig.skipPercent;
|
||||
}
|
||||
if (testConfig.shardId) {
|
||||
shardId = testConfig.shardId;
|
||||
}
|
||||
if (testConfig.shards) {
|
||||
shards = testConfig.shards;
|
||||
}
|
||||
|
||||
if (testConfig.stackTraceLimit === "full") {
|
||||
(<any>Error).stackTraceLimit = Infinity;
|
||||
@@ -129,6 +137,9 @@ function handleTestConfig() {
|
||||
|
||||
const runnerConfig = testConfig.runners || testConfig.test;
|
||||
if (runnerConfig && runnerConfig.length > 0) {
|
||||
if (testConfig.runners) {
|
||||
runUnitTests = runnerConfig.indexOf("unittest") !== -1;
|
||||
}
|
||||
for (const option of runnerConfig) {
|
||||
if (!option) {
|
||||
continue;
|
||||
|
||||
@@ -225,7 +225,7 @@ class RWCRunner extends RunnerBase {
|
||||
*/
|
||||
public initializeTests(): void {
|
||||
// Read in and evaluate the test list
|
||||
for (const test of this.tests && this.tests.length ? this.tests : this.enumerateTestFiles()) {
|
||||
for (const test of this.tests && this.tests.length ? this.tests : this.getTestFiles()) {
|
||||
this.runTest(typeof test === "string" ? test : test.file);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ class Test262BaselineRunner extends RunnerBase {
|
||||
public initializeTests() {
|
||||
// this will set up a series of describe/it blocks to run between the setup and cleanup phases
|
||||
if (this.tests.length === 0) {
|
||||
const testFiles = this.enumerateTestFiles();
|
||||
const testFiles = this.getTestFiles();
|
||||
testFiles.forEach(fn => {
|
||||
this.runTest(fn);
|
||||
});
|
||||
|
||||
@@ -94,6 +94,7 @@ namespace ts.projectSystem {
|
||||
describe("with main and depedency project", () => {
|
||||
const projectLocation = "/user/username/projects/myproject";
|
||||
const dependecyLocation = `${projectLocation}/dependency`;
|
||||
const dependecyDeclsLocation = `${projectLocation}/decls`;
|
||||
const mainLocation = `${projectLocation}/main`;
|
||||
const dependencyTs: File = {
|
||||
path: `${dependecyLocation}/FnS.ts`,
|
||||
@@ -106,7 +107,7 @@ export function fn5() { }
|
||||
};
|
||||
const dependencyConfig: File = {
|
||||
path: `${dependecyLocation}/tsconfig.json`,
|
||||
content: JSON.stringify({ compilerOptions: { composite: true, declarationMap: true } })
|
||||
content: JSON.stringify({ compilerOptions: { composite: true, declarationMap: true, declarationDir: "../decls" } })
|
||||
};
|
||||
|
||||
const mainTs: File = {
|
||||
@@ -117,7 +118,7 @@ export function fn5() { }
|
||||
fn3,
|
||||
fn4,
|
||||
fn5
|
||||
} from '../dependency/fns'
|
||||
} from '../decls/fns'
|
||||
|
||||
fn1();
|
||||
fn2();
|
||||
@@ -142,9 +143,9 @@ fn5();
|
||||
path: `${projectLocation}/random/tsconfig.json`,
|
||||
content: "{}"
|
||||
};
|
||||
const dtsLocation = `${dependecyLocation}/FnS.d.ts`;
|
||||
const dtsLocation = `${dependecyDeclsLocation}/FnS.d.ts`;
|
||||
const dtsPath = dtsLocation.toLowerCase() as Path;
|
||||
const dtsMapLocation = `${dtsLocation}.map`;
|
||||
const dtsMapLocation = `${dependecyDeclsLocation}/FnS.d.ts.map`;
|
||||
const dtsMapPath = dtsMapLocation.toLowerCase() as Path;
|
||||
|
||||
const files = [dependencyTs, dependencyConfig, mainTs, mainConfig, libFile, randomFile, randomConfig];
|
||||
@@ -217,7 +218,7 @@ fn5();
|
||||
start: { line: fn + 1, offset: 5 },
|
||||
end: { line: fn + 1, offset: 8 },
|
||||
contextStart: { line: 1, offset: 1 },
|
||||
contextEnd: { line: 7, offset: 27 }
|
||||
contextEnd: { line: 7, offset: 22 }
|
||||
};
|
||||
}
|
||||
function usageSpan(fn: number): protocol.TextSpan {
|
||||
@@ -287,19 +288,25 @@ fn5();
|
||||
function verifyDocumentPositionMapperUpdates(
|
||||
mainScenario: string,
|
||||
verifier: ReadonlyArray<DocumentPositionMapperVerifier>,
|
||||
closedInfos: ReadonlyArray<string>) {
|
||||
closedInfos: ReadonlyArray<string>,
|
||||
withRefs: boolean) {
|
||||
|
||||
const openFiles = verifier.map(v => v.openFile);
|
||||
const expectedProjectActualFiles = verifier.map(v => v.expectedProjectActualFiles);
|
||||
const actionGetters = verifier.map(v => v.actionGetter);
|
||||
const openFileLastLines = verifier.map(v => v.openFileLastLine);
|
||||
|
||||
const configFiles = openFiles.map(openFile => `${getDirectoryPath(openFile.path)}/tsconfig.json`);
|
||||
const openInfos = openFiles.map(f => f.path);
|
||||
// When usage and dependency are used, dependency config is part of closedInfo so ignore
|
||||
const otherWatchedFiles = verifier.length > 1 ? [configFiles[0]] : configFiles;
|
||||
const otherWatchedFiles = withRefs && verifier.length > 1 ? [configFiles[0]] : configFiles;
|
||||
function openTsFile(onHostCreate?: (host: TestServerHost) => void) {
|
||||
const host = createHost(files, [mainConfig.path]);
|
||||
if (!withRefs) {
|
||||
// Erase project reference
|
||||
host.writeFile(mainConfig.path, JSON.stringify({
|
||||
compilerOptions: { composite: true, declarationMap: true }
|
||||
}));
|
||||
}
|
||||
if (onHostCreate) {
|
||||
onHostCreate(host);
|
||||
}
|
||||
@@ -336,7 +343,7 @@ fn5();
|
||||
);
|
||||
}
|
||||
|
||||
function verifyInfosWhenNoDtsFile(session: TestSession, host: TestServerHost, dependencyTsAndMapOk?: true) {
|
||||
function verifyInfosWhenNoDtsFile(session: TestSession, host: TestServerHost, watchDts: boolean, dependencyTsAndMapOk?: true) {
|
||||
const dtsMapClosedInfo = firstDefined(closedInfos, f => f.toLowerCase() === dtsMapPath ? f : undefined);
|
||||
const dtsClosedInfo = firstDefined(closedInfos, f => f.toLowerCase() === dtsPath ? f : undefined);
|
||||
verifyInfosWithRandom(
|
||||
@@ -344,8 +351,7 @@ fn5();
|
||||
host,
|
||||
openInfos,
|
||||
closedInfos.filter(f => (dependencyTsAndMapOk || f !== dtsMapClosedInfo) && f !== dtsClosedInfo && (dependencyTsAndMapOk || f !== dependencyTs.path)),
|
||||
// When project actual file contains dts, it needs to be watched
|
||||
dtsClosedInfo && expectedProjectActualFiles.some(expectedProjectActualFiles => expectedProjectActualFiles.some(f => f.toLowerCase() === dtsPath)) ?
|
||||
dtsClosedInfo && watchDts ?
|
||||
otherWatchedFiles.concat(dtsClosedInfo) :
|
||||
otherWatchedFiles
|
||||
);
|
||||
@@ -361,22 +367,22 @@ fn5();
|
||||
}
|
||||
}
|
||||
|
||||
function action(actionGetter: SessionActionGetter, fn: number, session: TestSession) {
|
||||
const { reqName, request, expectedResponse, expectedResponseNoMap, expectedResponseNoDts } = actionGetter(fn);
|
||||
function action(verifier: DocumentPositionMapperVerifier, fn: number, session: TestSession) {
|
||||
const { reqName, request, expectedResponse, expectedResponseNoMap, expectedResponseNoDts } = verifier.actionGetter(fn);
|
||||
const { response } = session.executeCommandSeq(request);
|
||||
return { reqName, response, expectedResponse, expectedResponseNoMap, expectedResponseNoDts };
|
||||
return { reqName, response, expectedResponse, expectedResponseNoMap, expectedResponseNoDts, verifier };
|
||||
}
|
||||
|
||||
function firstAction(session: TestSession) {
|
||||
actionGetters.forEach(actionGetter => action(actionGetter, 1, session));
|
||||
verifier.forEach(v => action(v, 1, session));
|
||||
}
|
||||
|
||||
function verifyAllFnActionWorker(session: TestSession, verifyAction: (result: ReturnType<typeof action>, dtsInfo: server.ScriptInfo | undefined, isFirst: boolean) => void, dtsAbsent?: true) {
|
||||
// action
|
||||
let isFirst = true;
|
||||
for (const actionGetter of actionGetters) {
|
||||
for (const v of verifier) {
|
||||
for (let fn = 1; fn <= 5; fn++) {
|
||||
const result = action(actionGetter, fn, session);
|
||||
const result = action(v, fn, session);
|
||||
const dtsInfo = session.getProjectService().filenameToScriptInfo.get(dtsPath);
|
||||
if (dtsAbsent) {
|
||||
assert.isUndefined(dtsInfo);
|
||||
@@ -449,9 +455,17 @@ fn5();
|
||||
dependencyTsAndMapOk?: true
|
||||
) {
|
||||
// action
|
||||
verifyAllFnActionWorker(session, ({ reqName, response, expectedResponse, expectedResponseNoDts }) => {
|
||||
verifyAllFnActionWorker(session, ({ reqName, response, expectedResponse, expectedResponseNoDts, verifier }) => {
|
||||
assert.deepEqual(response, expectedResponseNoDts || expectedResponse, `Failed on ${reqName}`);
|
||||
verifyInfosWhenNoDtsFile(session, host, dependencyTsAndMapOk);
|
||||
verifyInfosWhenNoDtsFile(
|
||||
session,
|
||||
host,
|
||||
// Even when project actual file contains dts, its not watched because the dts is in another folder and module resolution just fails
|
||||
// instead of succeeding to source file and then mapping using project reference (When using usage location)
|
||||
// But watched if sourcemapper is in source project since we need to keep track of dts to update the source mapper for any potential usages
|
||||
verifier.expectedProjectActualFiles.every(f => f.toLowerCase() !== dtsPath),
|
||||
dependencyTsAndMapOk,
|
||||
);
|
||||
}, /*dtsAbsent*/ true);
|
||||
}
|
||||
|
||||
@@ -535,7 +549,11 @@ fn5();
|
||||
// Collecting at this point retains dependency.d.ts and map watcher
|
||||
closeFilesForSession([randomFile], session);
|
||||
openFilesForSession([randomFile], session);
|
||||
verifyInfosWhenNoDtsFile(session, host);
|
||||
verifyInfosWhenNoDtsFile(
|
||||
session,
|
||||
host,
|
||||
!!forEach(verifier, v => v.expectedProjectActualFiles.every(f => f.toLowerCase() !== dtsPath))
|
||||
);
|
||||
|
||||
// Closing open file, removes dependencies too
|
||||
closeFilesForSession([...openFiles, randomFile], session);
|
||||
@@ -616,7 +634,7 @@ fn5();
|
||||
"when dependency file's map changes",
|
||||
host => host.writeFile(
|
||||
dtsMapLocation,
|
||||
`{"version":3,"file":"FnS.d.ts","sourceRoot":"","sources":["FnS.ts"],"names":[],"mappings":"AAAA,wBAAgB,GAAG,SAAM;AACzB,wBAAgB,GAAG,SAAM;AACzB,wBAAgB,GAAG,SAAM;AACzB,wBAAgB,GAAG,SAAM;AACzB,wBAAgB,GAAG,SAAM;AACzB,eAAO,MAAM,CAAC,KAAK,CAAC"}`
|
||||
`{"version":3,"file":"FnS.d.ts","sourceRoot":"","sources":["../dependency/FnS.ts"],"names":[],"mappings":"AAAA,wBAAgB,GAAG,SAAM;AACzB,wBAAgB,GAAG,SAAM;AACzB,wBAAgB,GAAG,SAAM;AACzB,wBAAgB,GAAG,SAAM;AACzB,wBAAgB,GAAG,SAAM;AACzB,eAAO,MAAM,CAAC,KAAK,CAAC"}`
|
||||
),
|
||||
/*afterActionDocumentPositionMapperNotEquals*/ true
|
||||
);
|
||||
@@ -635,44 +653,133 @@ fn5();
|
||||
);
|
||||
}
|
||||
|
||||
const usageVerifier: DocumentPositionMapperVerifier = {
|
||||
openFile: mainTs,
|
||||
expectedProjectActualFiles: [mainTs.path, libFile.path, mainConfig.path, dtsPath],
|
||||
actionGetter: gotoDefintinionFromMainTs,
|
||||
openFileLastLine: 14
|
||||
};
|
||||
describe("from project that uses dependency", () => {
|
||||
const closedInfos = [dependencyTs.path, dependencyConfig.path, libFile.path, dtsPath, dtsMapLocation];
|
||||
verifyDocumentPositionMapperUpdates(
|
||||
"can go to definition correctly",
|
||||
[usageVerifier],
|
||||
closedInfos
|
||||
);
|
||||
});
|
||||
function verifyScenarios(withRefs: boolean) {
|
||||
describe(withRefs ? "when main tsconfig has project reference" : "when main tsconfig doesnt have project reference", () => {
|
||||
const usageVerifier: DocumentPositionMapperVerifier = {
|
||||
openFile: mainTs,
|
||||
expectedProjectActualFiles: [mainTs.path, libFile.path, mainConfig.path, dtsPath],
|
||||
actionGetter: gotoDefintinionFromMainTs,
|
||||
openFileLastLine: 14
|
||||
};
|
||||
describe("from project that uses dependency", () => {
|
||||
const closedInfos = withRefs ?
|
||||
[dependencyTs.path, dependencyConfig.path, libFile.path, dtsPath, dtsMapLocation] :
|
||||
[dependencyTs.path, libFile.path, dtsPath, dtsMapLocation];
|
||||
verifyDocumentPositionMapperUpdates(
|
||||
"can go to definition correctly",
|
||||
[usageVerifier],
|
||||
closedInfos,
|
||||
withRefs
|
||||
);
|
||||
});
|
||||
|
||||
const definingVerifier: DocumentPositionMapperVerifier = {
|
||||
openFile: dependencyTs,
|
||||
expectedProjectActualFiles: [dependencyTs.path, libFile.path, dependencyConfig.path],
|
||||
actionGetter: renameFromDependencyTs,
|
||||
openFileLastLine: 6
|
||||
};
|
||||
describe("from defining project", () => {
|
||||
const closedInfos = [libFile.path, dtsLocation, dtsMapLocation];
|
||||
verifyDocumentPositionMapperUpdates(
|
||||
"rename locations from dependency",
|
||||
[definingVerifier],
|
||||
closedInfos
|
||||
);
|
||||
});
|
||||
const definingVerifier: DocumentPositionMapperVerifier = {
|
||||
openFile: dependencyTs,
|
||||
expectedProjectActualFiles: [dependencyTs.path, libFile.path, dependencyConfig.path],
|
||||
actionGetter: renameFromDependencyTs,
|
||||
openFileLastLine: 6,
|
||||
};
|
||||
describe("from defining project", () => {
|
||||
const closedInfos = [libFile.path, dtsLocation, dtsMapLocation];
|
||||
verifyDocumentPositionMapperUpdates(
|
||||
"rename locations from dependency",
|
||||
[definingVerifier],
|
||||
closedInfos,
|
||||
withRefs
|
||||
);
|
||||
});
|
||||
|
||||
describe("when opening depedency and usage project", () => {
|
||||
const closedInfos = [libFile.path, dtsPath, dtsMapLocation, dependencyConfig.path];
|
||||
verifyDocumentPositionMapperUpdates(
|
||||
"goto Definition in usage and rename locations from defining project",
|
||||
[usageVerifier, { ...definingVerifier, actionGetter: renameFromDependencyTsWithBothProjectsOpen }],
|
||||
closedInfos
|
||||
);
|
||||
});
|
||||
describe("when opening depedency and usage project", () => {
|
||||
const closedInfos = withRefs ?
|
||||
[libFile.path, dtsPath, dtsMapLocation, dependencyConfig.path] :
|
||||
[libFile.path, dtsPath, dtsMapLocation];
|
||||
verifyDocumentPositionMapperUpdates(
|
||||
"goto Definition in usage and rename locations from defining project",
|
||||
[usageVerifier, { ...definingVerifier, actionGetter: renameFromDependencyTsWithBothProjectsOpen }],
|
||||
closedInfos,
|
||||
withRefs
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
verifyScenarios(/*withRefs*/ false);
|
||||
verifyScenarios(/*withRefs*/ true);
|
||||
});
|
||||
|
||||
it("reusing d.ts files from composite and non composite projects", () => {
|
||||
const projectLocation = "/user/username/projects/myproject";
|
||||
const configA: File = {
|
||||
path: `${projectLocation}/compositea/tsconfig.json`,
|
||||
content: JSON.stringify({
|
||||
compilerOptions: {
|
||||
composite: true,
|
||||
outDir: "../dist/",
|
||||
rootDir: "../",
|
||||
baseUrl: "../",
|
||||
paths: { "@ref/*": ["./dist/*"] }
|
||||
}
|
||||
})
|
||||
};
|
||||
const aTs: File = {
|
||||
path: `${projectLocation}/compositea/a.ts`,
|
||||
content: `import { b } from "@ref/compositeb/b";`
|
||||
};
|
||||
const a2Ts: File = {
|
||||
path: `${projectLocation}/compositea/a2.ts`,
|
||||
content: `export const x = 10;`
|
||||
};
|
||||
const configB: File = {
|
||||
path: `${projectLocation}/compositeb/tsconfig.json`,
|
||||
content: configA.content
|
||||
};
|
||||
const bTs: File = {
|
||||
path: `${projectLocation}/compositeb/b.ts`,
|
||||
content: "export function b() {}"
|
||||
};
|
||||
const bDts: File = {
|
||||
path: `${projectLocation}/dist/compositeb/b.d.ts`,
|
||||
content: "export declare function b(): void;"
|
||||
};
|
||||
const configC: File = {
|
||||
path: `${projectLocation}/compositec/tsconfig.json`,
|
||||
content: JSON.stringify({
|
||||
compilerOptions: {
|
||||
composite: true,
|
||||
outDir: "../dist/",
|
||||
rootDir: "../",
|
||||
baseUrl: "../",
|
||||
paths: { "@ref/*": ["./*"] }
|
||||
},
|
||||
references: [{ path: "../compositeb" }]
|
||||
})
|
||||
};
|
||||
const cTs: File = {
|
||||
path: `${projectLocation}/compositec/c.ts`,
|
||||
content: aTs.content
|
||||
};
|
||||
const files = [libFile, aTs, a2Ts, configA, bDts, bTs, configB, cTs, configC];
|
||||
const host = createServerHost(files);
|
||||
const service = createProjectService(host);
|
||||
service.openClientFile(aTs.path);
|
||||
service.checkNumberOfProjects({ configuredProjects: 1 });
|
||||
|
||||
// project A referencing b.d.ts without project reference
|
||||
const projectA = service.configuredProjects.get(configA.path)!;
|
||||
assert.isDefined(projectA);
|
||||
checkProjectActualFiles(projectA, [aTs.path, a2Ts.path, bDts.path, libFile.path, configA.path]);
|
||||
|
||||
// reuses b.d.ts but sets the path and resolved path since projectC has project references
|
||||
// as the real resolution was to b.ts
|
||||
service.openClientFile(cTs.path);
|
||||
service.checkNumberOfProjects({ configuredProjects: 2 });
|
||||
const projectC = service.configuredProjects.get(configC.path)!;
|
||||
checkProjectActualFiles(projectC, [cTs.path, bDts.path, libFile.path, configC.path]);
|
||||
|
||||
// Now new project for project A tries to reuse b but there is no filesByName mapping for b's source location
|
||||
host.writeFile(a2Ts.path, `${a2Ts.content}export const y = 30;`);
|
||||
assert.isTrue(projectA.dirty);
|
||||
projectA.updateGraph();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -8391,6 +8391,7 @@ declare namespace ts.server {
|
||||
private program;
|
||||
private externalFiles;
|
||||
private missingFilesMap;
|
||||
private generatedFilesMap;
|
||||
private plugins;
|
||||
private lastFileExceededProgramSize;
|
||||
protected languageService: LanguageService;
|
||||
@@ -8503,6 +8504,9 @@ declare namespace ts.server {
|
||||
private detachScriptInfoFromProject;
|
||||
private addMissingFileWatcher;
|
||||
private isWatchedMissingFile;
|
||||
private createGeneratedFileWatcher;
|
||||
private isValidGeneratedFileWatcher;
|
||||
private clearGeneratedFileWatch;
|
||||
getScriptInfoForNormalizedPath(fileName: NormalizedPath): ScriptInfo | undefined;
|
||||
getScriptInfo(uncheckedFileName: string): ScriptInfo | undefined;
|
||||
filesToString(writeProjectFileNames: boolean): string;
|
||||
|
||||
+98
-58
@@ -4,35 +4,55 @@ tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfin
|
||||
Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[P] | (TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[P]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] | (TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type '(Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]) | (Extract<number, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : GetProps<C>[Extract<number, keyof GetProps<C>>]) | (Extract<symbol, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : GetProps<C>[Extract<symbol, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type '(TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]) | GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] | GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[keyof GetProps<C> & string] | (TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[string] | (TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] | (TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[Extract<string, keyof GetProps<C>>] | GetProps<C>[Extract<number, keyof GetProps<C>>] | GetProps<C>[Extract<symbol, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'GetProps<C>[Extract<string, keyof GetProps<C>>] | GetProps<C>[Extract<number, keyof GetProps<C>>] | GetProps<C>[Extract<symbol, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type '(Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]) | (Extract<number, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : GetProps<C>[Extract<number, keyof GetProps<C>>]) | (Extract<symbol, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : GetProps<C>[Extract<symbol, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type '(TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]) | GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] | GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type '(TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]) | GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] | GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[string] | (TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts (1 errors) ====
|
||||
@@ -106,33 +126,53 @@ tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfin
|
||||
!!! error TS2344: Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[P] | (TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[P]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] | (TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type '(Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]) | (Extract<number, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : GetProps<C>[Extract<number, keyof GetProps<C>>]) | (Extract<symbol, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : GetProps<C>[Extract<symbol, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type '(TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]) | GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] | GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[keyof GetProps<C> & string] | (TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[string] | (TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] | (TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<string, keyof GetProps<C>>] | GetProps<C>[Extract<number, keyof GetProps<C>>] | GetProps<C>[Extract<symbol, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<string, keyof GetProps<C>>] | GetProps<C>[Extract<number, keyof GetProps<C>>] | GetProps<C>[Extract<symbol, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type '(Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]) | (Extract<number, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : GetProps<C>[Extract<number, keyof GetProps<C>>]) | (Extract<symbol, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : GetProps<C>[Extract<symbol, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type '(TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]) | GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] | GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type '(TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]) | GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] | GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[string] | (TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES5.ts(5,3): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES5.ts (1 errors) ====
|
||||
var v = {
|
||||
[-1]: {},
|
||||
[+1]: {},
|
||||
[~1]: {},
|
||||
[!1]: {}
|
||||
~~~~
|
||||
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
//// [computedPropertyNamesDeclarationEmit6_ES5.ts]
|
||||
var v = {
|
||||
[-1]: {},
|
||||
[+1]: {},
|
||||
[~1]: {},
|
||||
[!1]: {}
|
||||
}
|
||||
|
||||
|
||||
//// [computedPropertyNamesDeclarationEmit6_ES5.js]
|
||||
var _a;
|
||||
var v = (_a = {},
|
||||
_a[-1] = {},
|
||||
_a[+1] = {},
|
||||
_a[~1] = {},
|
||||
_a[!1] = {},
|
||||
_a);
|
||||
|
||||
|
||||
//// [computedPropertyNamesDeclarationEmit6_ES5.d.ts]
|
||||
declare var v: {
|
||||
[x: number]: {};
|
||||
[-1]: {};
|
||||
1: {};
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
=== tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES5.ts ===
|
||||
var v = {
|
||||
>v : Symbol(v, Decl(computedPropertyNamesDeclarationEmit6_ES5.ts, 0, 3))
|
||||
|
||||
[-1]: {},
|
||||
>[-1] : Symbol([-1], Decl(computedPropertyNamesDeclarationEmit6_ES5.ts, 0, 9))
|
||||
|
||||
[+1]: {},
|
||||
>[+1] : Symbol([+1], Decl(computedPropertyNamesDeclarationEmit6_ES5.ts, 1, 11))
|
||||
|
||||
[~1]: {},
|
||||
>[~1] : Symbol([~1], Decl(computedPropertyNamesDeclarationEmit6_ES5.ts, 2, 11))
|
||||
|
||||
[!1]: {}
|
||||
>[!1] : Symbol([!1], Decl(computedPropertyNamesDeclarationEmit6_ES5.ts, 3, 11))
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
=== tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES5.ts ===
|
||||
var v = {
|
||||
>v : { [x: number]: {}; [-1]: {}; 1: {}; }
|
||||
>{ [-1]: {}, [+1]: {}, [~1]: {}, [!1]: {}} : { [x: number]: {}; [-1]: {}; [+1]: {}; }
|
||||
|
||||
[-1]: {},
|
||||
>[-1] : {}
|
||||
>-1 : -1
|
||||
>1 : 1
|
||||
>{} : {}
|
||||
|
||||
[+1]: {},
|
||||
>[+1] : {}
|
||||
>+1 : 1
|
||||
>1 : 1
|
||||
>{} : {}
|
||||
|
||||
[~1]: {},
|
||||
>[~1] : {}
|
||||
>~1 : number
|
||||
>1 : 1
|
||||
>{} : {}
|
||||
|
||||
[!1]: {}
|
||||
>[!1] : {}
|
||||
>!1 : boolean
|
||||
>1 : 1
|
||||
>{} : {}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES6.ts(5,3): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES6.ts (1 errors) ====
|
||||
var v = {
|
||||
[-1]: {},
|
||||
[+1]: {},
|
||||
[~1]: {},
|
||||
[!1]: {}
|
||||
~~~~
|
||||
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
//// [computedPropertyNamesDeclarationEmit6_ES6.ts]
|
||||
var v = {
|
||||
[-1]: {},
|
||||
[+1]: {},
|
||||
[~1]: {},
|
||||
[!1]: {}
|
||||
}
|
||||
|
||||
|
||||
//// [computedPropertyNamesDeclarationEmit6_ES6.js]
|
||||
var v = {
|
||||
[-1]: {},
|
||||
[+1]: {},
|
||||
[~1]: {},
|
||||
[!1]: {}
|
||||
};
|
||||
|
||||
|
||||
//// [computedPropertyNamesDeclarationEmit6_ES6.d.ts]
|
||||
declare var v: {
|
||||
[x: number]: {};
|
||||
[-1]: {};
|
||||
1: {};
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
=== tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES6.ts ===
|
||||
var v = {
|
||||
>v : Symbol(v, Decl(computedPropertyNamesDeclarationEmit6_ES6.ts, 0, 3))
|
||||
|
||||
[-1]: {},
|
||||
>[-1] : Symbol([-1], Decl(computedPropertyNamesDeclarationEmit6_ES6.ts, 0, 9))
|
||||
|
||||
[+1]: {},
|
||||
>[+1] : Symbol([+1], Decl(computedPropertyNamesDeclarationEmit6_ES6.ts, 1, 11))
|
||||
|
||||
[~1]: {},
|
||||
>[~1] : Symbol([~1], Decl(computedPropertyNamesDeclarationEmit6_ES6.ts, 2, 11))
|
||||
|
||||
[!1]: {}
|
||||
>[!1] : Symbol([!1], Decl(computedPropertyNamesDeclarationEmit6_ES6.ts, 3, 11))
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
=== tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES6.ts ===
|
||||
var v = {
|
||||
>v : { [x: number]: {}; [-1]: {}; 1: {}; }
|
||||
>{ [-1]: {}, [+1]: {}, [~1]: {}, [!1]: {}} : { [x: number]: {}; [-1]: {}; [+1]: {}; }
|
||||
|
||||
[-1]: {},
|
||||
>[-1] : {}
|
||||
>-1 : -1
|
||||
>1 : 1
|
||||
>{} : {}
|
||||
|
||||
[+1]: {},
|
||||
>[+1] : {}
|
||||
>+1 : 1
|
||||
>1 : 1
|
||||
>{} : {}
|
||||
|
||||
[~1]: {},
|
||||
>[~1] : {}
|
||||
>~1 : number
|
||||
>1 : 1
|
||||
>{} : {}
|
||||
|
||||
[!1]: {}
|
||||
>[!1] : {}
|
||||
>!1 : boolean
|
||||
>1 : 1
|
||||
>{} : {}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,21 @@ export class Elem<
|
||||
new Elem(undefined as ElChildren.Void);
|
||||
new Elem('' as ElChildren.Text);
|
||||
new Elem('' as ElChildren.Void | ElChildren.Text); // error
|
||||
new Elem('' as ElChildren); // error
|
||||
new Elem('' as ElChildren); // error
|
||||
|
||||
// Repro from #31766
|
||||
|
||||
interface I { a: string }
|
||||
|
||||
type DeepPartial<T> =
|
||||
T extends object ? {[K in keyof T]?: DeepPartial<T[K]>} : T;
|
||||
|
||||
declare function f<T>(t: T, partial: DeepPartial<T>): T;
|
||||
|
||||
function g(p1: I, p2: Partial<I>): I {
|
||||
return f(p1, p2);
|
||||
}
|
||||
|
||||
|
||||
//// [conditionalTypeRelaxingConstraintAssignability.js]
|
||||
"use strict";
|
||||
@@ -37,3 +51,6 @@ new Elem(undefined);
|
||||
new Elem('');
|
||||
new Elem(''); // error
|
||||
new Elem(''); // error
|
||||
function g(p1, p2) {
|
||||
return f(p1, p2);
|
||||
}
|
||||
|
||||
@@ -71,3 +71,47 @@ new Elem('' as ElChildren); // error
|
||||
>Elem : Symbol(Elem, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 8, 83))
|
||||
>ElChildren : Symbol(ElChildren, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 0, 0), Decl(conditionalTypeRelaxingConstraintAssignability.ts, 2, 20))
|
||||
|
||||
// Repro from #31766
|
||||
|
||||
interface I { a: string }
|
||||
>I : Symbol(I, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 22, 27))
|
||||
>a : Symbol(I.a, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 26, 13))
|
||||
|
||||
type DeepPartial<T> =
|
||||
>DeepPartial : Symbol(DeepPartial, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 26, 25))
|
||||
>T : Symbol(T, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 28, 17))
|
||||
|
||||
T extends object ? {[K in keyof T]?: DeepPartial<T[K]>} : T;
|
||||
>T : Symbol(T, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 28, 17))
|
||||
>K : Symbol(K, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 29, 25))
|
||||
>T : Symbol(T, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 28, 17))
|
||||
>DeepPartial : Symbol(DeepPartial, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 26, 25))
|
||||
>T : Symbol(T, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 28, 17))
|
||||
>K : Symbol(K, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 29, 25))
|
||||
>T : Symbol(T, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 28, 17))
|
||||
|
||||
declare function f<T>(t: T, partial: DeepPartial<T>): T;
|
||||
>f : Symbol(f, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 29, 64))
|
||||
>T : Symbol(T, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 31, 19))
|
||||
>t : Symbol(t, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 31, 22))
|
||||
>T : Symbol(T, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 31, 19))
|
||||
>partial : Symbol(partial, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 31, 27))
|
||||
>DeepPartial : Symbol(DeepPartial, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 26, 25))
|
||||
>T : Symbol(T, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 31, 19))
|
||||
>T : Symbol(T, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 31, 19))
|
||||
|
||||
function g(p1: I, p2: Partial<I>): I {
|
||||
>g : Symbol(g, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 31, 56))
|
||||
>p1 : Symbol(p1, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 33, 11))
|
||||
>I : Symbol(I, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 22, 27))
|
||||
>p2 : Symbol(p2, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 33, 17))
|
||||
>Partial : Symbol(Partial, Decl(lib.es5.d.ts, --, --))
|
||||
>I : Symbol(I, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 22, 27))
|
||||
>I : Symbol(I, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 22, 27))
|
||||
|
||||
return f(p1, p2);
|
||||
>f : Symbol(f, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 29, 64))
|
||||
>p1 : Symbol(p1, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 33, 11))
|
||||
>p2 : Symbol(p2, Decl(conditionalTypeRelaxingConstraintAssignability.ts, 33, 17))
|
||||
}
|
||||
|
||||
|
||||
@@ -62,3 +62,30 @@ new Elem('' as ElChildren); // error
|
||||
>'' as ElChildren : ElChildren
|
||||
>'' : ""
|
||||
|
||||
// Repro from #31766
|
||||
|
||||
interface I { a: string }
|
||||
>a : string
|
||||
|
||||
type DeepPartial<T> =
|
||||
>DeepPartial : DeepPartial<T>
|
||||
|
||||
T extends object ? {[K in keyof T]?: DeepPartial<T[K]>} : T;
|
||||
|
||||
declare function f<T>(t: T, partial: DeepPartial<T>): T;
|
||||
>f : <T>(t: T, partial: DeepPartial<T>) => T
|
||||
>t : T
|
||||
>partial : DeepPartial<T>
|
||||
|
||||
function g(p1: I, p2: Partial<I>): I {
|
||||
>g : (p1: I, p2: Partial<I>) => I
|
||||
>p1 : I
|
||||
>p2 : Partial<I>
|
||||
|
||||
return f(p1, p2);
|
||||
>f(p1, p2) : I
|
||||
>f : <T>(t: T, partial: DeepPartial<T>) => T
|
||||
>p1 : I
|
||||
>p2 : Partial<I>
|
||||
}
|
||||
|
||||
|
||||
@@ -9,5 +9,8 @@ else
|
||||
|
||||
//// [constEnum4.js]
|
||||
if (1)
|
||||
;
|
||||
else if (2)
|
||||
;
|
||||
else
|
||||
;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts(4,6): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts(4,11): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts(4,16): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts(4,6): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts(4,11): error TS2493: Tuple type '[]' of length '0' has no element at index '1'.
|
||||
tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts(4,16): error TS2493: Tuple type '[]' of length '0' has no element at index '2'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts (3 errors) ====
|
||||
@@ -9,11 +9,11 @@ tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts(4,16): error T
|
||||
var [x11 = 0, y11 = ""] = [1, "hello"];
|
||||
var [a11, b11, c11] = [];
|
||||
~~~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
~~~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '1'.
|
||||
~~~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '2'.
|
||||
|
||||
var [a2, [b2, { x12, y12: c2 }]=["abc", { x12: 10, y12: false }]] = [1, ["hello", { x12: 5, y12: true }]];
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ var _m = [[x13, y13], { x: x13, y: y13 }], a3 = _m[0], b3 = _m[1];
|
||||
//// [declarationEmitDestructuringArrayPattern2.d.ts]
|
||||
declare var x10: number, y10: string, z10: boolean;
|
||||
declare var x11: number, y11: string;
|
||||
declare var a11: any, b11: any, c11: any;
|
||||
declare var a11: undefined, b11: undefined, c11: undefined;
|
||||
declare var a2: number, b2: string, x12: number, c2: boolean;
|
||||
declare var x13: number, y13: string;
|
||||
declare var a3: (string | number)[], b3: {
|
||||
|
||||
@@ -20,10 +20,10 @@ var [x11 = 0, y11 = ""] = [1, "hello"];
|
||||
>"hello" : "hello"
|
||||
|
||||
var [a11, b11, c11] = [];
|
||||
>a11 : any
|
||||
>b11 : any
|
||||
>c11 : any
|
||||
>[] : [undefined?, undefined?, undefined?]
|
||||
>a11 : undefined
|
||||
>b11 : undefined
|
||||
>c11 : undefined
|
||||
>[] : []
|
||||
|
||||
var [a2, [b2, { x12, y12: c2 }]=["abc", { x12: 10, y12: false }]] = [1, ["hello", { x12: 5, y12: true }]];
|
||||
>a2 : number
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(5,16): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(5,16): error TS2493: Tuple type '[number, string]' of length '2' has no element at index '2'.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(22,17): error TS2353: Object literal may only specify known properties, and 'x' does not exist in type '{}'.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(22,23): error TS2353: Object literal may only specify known properties, and 'y' does not exist in type '{}'.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(23,25): error TS2353: Object literal may only specify known properties, and 'y' does not exist in type '{ x: any; }'.
|
||||
@@ -6,11 +6,11 @@ tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(24,19):
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(28,28): error TS2353: Object literal may only specify known properties, and 'y' does not exist in type '{ x: any; }'.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(29,22): error TS2353: Object literal may only specify known properties, and 'x' does not exist in type '{ y: any; }'.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(58,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string | number', but here has type 'string'.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(62,10): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(62,13): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(62,16): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(63,13): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(63,16): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(62,10): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(62,13): error TS2493: Tuple type '[]' of length '0' has no element at index '1'.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(62,16): error TS2493: Tuple type '[]' of length '0' has no element at index '2'.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(63,13): error TS2493: Tuple type '[number]' of length '1' has no element at index '1'.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(63,16): error TS2493: Tuple type '[number]' of length '1' has no element at index '2'.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(67,9): error TS2461: Type '{}' is not an array type.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(68,9): error TS2461: Type '{ 0: number; 1: number; }' is not an array type.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(73,11): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
@@ -29,7 +29,7 @@ tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(138,9):
|
||||
var [x, y] = [1, "hello"];
|
||||
var [x, y, z] = [1, "hello"];
|
||||
~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[number, string]' of length '2' has no element at index '2'.
|
||||
var [,, x] = [0, 1, 2];
|
||||
var x: number;
|
||||
var y: string;
|
||||
@@ -103,16 +103,16 @@ tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(138,9):
|
||||
function f8() {
|
||||
var [a, b, c] = []; // Error, [] is an empty tuple
|
||||
~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '1'.
|
||||
~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '2'.
|
||||
var [d, e, f] = [1]; // Error, [1] is a tuple
|
||||
~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[number]' of length '1' has no element at index '1'.
|
||||
~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[number]' of length '1' has no element at index '2'.
|
||||
}
|
||||
|
||||
function f9() {
|
||||
|
||||
@@ -23,8 +23,8 @@ function f0() {
|
||||
var [x, y, z] = [1, "hello"];
|
||||
>x : number
|
||||
>y : string
|
||||
>z : any
|
||||
>[1, "hello"] : [number, string, undefined?]
|
||||
>z : undefined
|
||||
>[1, "hello"] : [number, string]
|
||||
>1 : 1
|
||||
>"hello" : "hello"
|
||||
|
||||
@@ -255,16 +255,16 @@ function f8() {
|
||||
>f8 : () => void
|
||||
|
||||
var [a, b, c] = []; // Error, [] is an empty tuple
|
||||
>a : any
|
||||
>b : any
|
||||
>c : any
|
||||
>[] : [undefined?, undefined?, undefined?]
|
||||
>a : undefined
|
||||
>b : undefined
|
||||
>c : undefined
|
||||
>[] : []
|
||||
|
||||
var [d, e, f] = [1]; // Error, [1] is a tuple
|
||||
>d : number
|
||||
>e : any
|
||||
>f : any
|
||||
>[1] : [number, undefined?, undefined?]
|
||||
>e : undefined
|
||||
>f : undefined
|
||||
>[1] : [number]
|
||||
>1 : 1
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5.ts(43,6): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5.ts(44,8): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5.ts(44,18): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5.ts(43,6): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5.ts(44,8): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5.ts(44,18): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5.ts (3 errors) ====
|
||||
@@ -48,12 +48,12 @@ tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAss
|
||||
var [c0, c1] = [...temp];
|
||||
var [c2] = [];
|
||||
~~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
|
||||
~~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
~~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
var [[c5], c6]: [[string|number], boolean] = [[1], true];
|
||||
var [, c7] = [1, 2, 3];
|
||||
var [,,, c8] = [1, 2, 3, 4];
|
||||
|
||||
@@ -92,19 +92,19 @@ var [c0, c1] = [...temp];
|
||||
>temp : number[]
|
||||
|
||||
var [c2] = [];
|
||||
>c2 : any
|
||||
>[] : [undefined?]
|
||||
>c2 : undefined
|
||||
>[] : []
|
||||
|
||||
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
|
||||
>c3 : any
|
||||
>c4 : any
|
||||
>[[[]], [[[[]]]]] : [[[undefined?]], [[[[undefined?]]]]]
|
||||
>[[]] : [[undefined?]]
|
||||
>[] : [undefined?]
|
||||
>[[[[]]]] : [[[[undefined?]]]]
|
||||
>[[[]]] : [[[undefined?]]]
|
||||
>[[]] : [[undefined?]]
|
||||
>[] : [undefined?]
|
||||
>c3 : undefined
|
||||
>c4 : undefined
|
||||
>[[[]], [[[[]]]]] : [[[]], [[[[]]]]]
|
||||
>[[]] : [[]]
|
||||
>[] : []
|
||||
>[[[[]]]] : [[[[]]]]
|
||||
>[[[]]] : [[[]]]
|
||||
>[[]] : [[]]
|
||||
>[] : []
|
||||
|
||||
var [[c5], c6]: [[string|number], boolean] = [[1], true];
|
||||
>c5 : string | number
|
||||
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5iterable.ts(43,6): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5iterable.ts(44,8): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5iterable.ts(44,18): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5iterable.ts(43,6): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5iterable.ts(44,8): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5iterable.ts(44,18): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5iterable.ts (3 errors) ====
|
||||
@@ -48,12 +48,12 @@ tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAss
|
||||
var [c0, c1] = [...temp];
|
||||
var [c2] = [];
|
||||
~~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
|
||||
~~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
~~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
var [[c5], c6]: [[string|number], boolean] = [[1], true];
|
||||
var [, c7] = [1, 2, 3];
|
||||
var [,,, c8] = [1, 2, 3, 4];
|
||||
|
||||
+11
-11
@@ -92,19 +92,19 @@ var [c0, c1] = [...temp];
|
||||
>temp : number[]
|
||||
|
||||
var [c2] = [];
|
||||
>c2 : any
|
||||
>[] : [undefined?]
|
||||
>c2 : undefined
|
||||
>[] : []
|
||||
|
||||
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
|
||||
>c3 : any
|
||||
>c4 : any
|
||||
>[[[]], [[[[]]]]] : [[[undefined?]], [[[[undefined?]]]]]
|
||||
>[[]] : [[undefined?]]
|
||||
>[] : [undefined?]
|
||||
>[[[[]]]] : [[[[undefined?]]]]
|
||||
>[[[]]] : [[[undefined?]]]
|
||||
>[[]] : [[undefined?]]
|
||||
>[] : [undefined?]
|
||||
>c3 : undefined
|
||||
>c4 : undefined
|
||||
>[[[]], [[[[]]]]] : [[[]], [[[[]]]]]
|
||||
>[[]] : [[]]
|
||||
>[] : []
|
||||
>[[[[]]]] : [[[[]]]]
|
||||
>[[[]]] : [[[]]]
|
||||
>[[]] : [[]]
|
||||
>[] : []
|
||||
|
||||
var [[c5], c6]: [[string|number], boolean] = [[1], true];
|
||||
>c5 : string | number
|
||||
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES6.ts(43,6): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES6.ts(44,8): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES6.ts(44,18): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES6.ts(43,6): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES6.ts(44,8): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES6.ts(44,18): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES6.ts (3 errors) ====
|
||||
@@ -48,12 +48,12 @@ tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAss
|
||||
var [c0, c1] = [...temp];
|
||||
var [c2] = [];
|
||||
~~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
|
||||
~~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
~~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
var [[c5], c6]: [[string|number], boolean] = [[1], true];
|
||||
var [, c7] = [1, 2, 3];
|
||||
var [,,, c8] = [1, 2, 3, 4];
|
||||
|
||||
@@ -92,19 +92,19 @@ var [c0, c1] = [...temp];
|
||||
>temp : number[]
|
||||
|
||||
var [c2] = [];
|
||||
>c2 : any
|
||||
>[] : [undefined?]
|
||||
>c2 : undefined
|
||||
>[] : []
|
||||
|
||||
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
|
||||
>c3 : any
|
||||
>c4 : any
|
||||
>[[[]], [[[[]]]]] : [[[undefined?]], [[[[undefined?]]]]]
|
||||
>[[]] : [[undefined?]]
|
||||
>[] : [undefined?]
|
||||
>[[[[]]]] : [[[[undefined?]]]]
|
||||
>[[[]]] : [[[undefined?]]]
|
||||
>[[]] : [[undefined?]]
|
||||
>[] : [undefined?]
|
||||
>c3 : undefined
|
||||
>c4 : undefined
|
||||
>[[[]], [[[[]]]]] : [[[]], [[[[]]]]]
|
||||
>[[]] : [[]]
|
||||
>[] : []
|
||||
>[[[[]]]] : [[[[]]]]
|
||||
>[[[]]] : [[[]]]
|
||||
>[[]] : [[]]
|
||||
>[] : []
|
||||
|
||||
var [[c5], c6]: [[string|number], boolean] = [[1], true];
|
||||
>c5 : string | number
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(3,6): error TS2461: Type 'undefined' is not an array type.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(3,6): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(3,6): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(3,12): error TS2461: Type 'undefined' is not an array type.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(3,12): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(3,12): error TS2493: Tuple type '[]' of length '0' has no element at index '1'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(4,5): error TS2461: Type 'undefined' is not an array type.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(9,51): error TS2322: Type 'number' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(22,5): error TS2739: Type 'number[]' is missing the following properties from type '[number, number]': 0, 1
|
||||
@@ -16,11 +16,11 @@ tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAss
|
||||
~~~~
|
||||
!!! error TS2461: Type 'undefined' is not an array type.
|
||||
~~~~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
~~~~~~
|
||||
!!! error TS2461: Type 'undefined' is not an array type.
|
||||
~~~~~~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '1'.
|
||||
var [[a2], [[a3]]] = undefined // Error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2461: Type 'undefined' is not an array type.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
var [[a0], [[a1]]] = [] // Error
|
||||
>a0 : any
|
||||
>a1 : any
|
||||
>[] : [undefined?, undefined?]
|
||||
>[] : []
|
||||
|
||||
var [[a2], [[a3]]] = undefined // Error
|
||||
>a2 : any
|
||||
|
||||
@@ -3,7 +3,7 @@ const [a, b = a] = [1]; // ok
|
||||
>a : any
|
||||
>b : any
|
||||
>a : any
|
||||
>[1] : [number, any?]
|
||||
>[1] : [number]
|
||||
>1 : 1
|
||||
|
||||
const [c, d = c, e = e] = [1]; // error for e = e
|
||||
@@ -12,7 +12,7 @@ const [c, d = c, e = e] = [1]; // error for e = e
|
||||
>c : any
|
||||
>e : any
|
||||
>e : any
|
||||
>[1] : [number, any?, any?]
|
||||
>[1] : [number]
|
||||
>1 : 1
|
||||
|
||||
const [f, g = f, h = i, i = f] = [1]; // error for h = i
|
||||
@@ -23,7 +23,7 @@ const [f, g = f, h = i, i = f] = [1]; // error for h = i
|
||||
>i : any
|
||||
>i : any
|
||||
>f : any
|
||||
>[1] : [number, any?, any?, any?]
|
||||
>[1] : [number]
|
||||
>1 : 1
|
||||
|
||||
(function ([a, b = a]) { // ok
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
tests/cases/compiler/destructuringTuple.ts(11,8): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
tests/cases/compiler/destructuringTuple.ts(11,60): error TS2345: Argument of type 'number' is not assignable to parameter of type 'ConcatArray<never>'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/destructuringTuple.ts (2 errors) ====
|
||||
declare var tuple: [boolean, number, ...string[]];
|
||||
|
||||
const [a, b, c, ...rest] = tuple;
|
||||
|
||||
declare var receiver: typeof tuple;
|
||||
|
||||
[...receiver] = tuple;
|
||||
|
||||
// Repros from #32140
|
||||
|
||||
const [oops1] = [1, 2, 3].reduce((accu, el) => accu.concat(el), []);
|
||||
~~~~~
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
~~
|
||||
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'ConcatArray<never>'.
|
||||
|
||||
const [oops2] = [1, 2, 3].reduce((acc: number[], e) => acc.concat(e), []);
|
||||
|
||||
@@ -6,9 +6,18 @@ const [a, b, c, ...rest] = tuple;
|
||||
declare var receiver: typeof tuple;
|
||||
|
||||
[...receiver] = tuple;
|
||||
|
||||
// Repros from #32140
|
||||
|
||||
const [oops1] = [1, 2, 3].reduce((accu, el) => accu.concat(el), []);
|
||||
|
||||
const [oops2] = [1, 2, 3].reduce((acc: number[], e) => acc.concat(e), []);
|
||||
|
||||
|
||||
//// [destructuringTuple.js]
|
||||
"use strict";
|
||||
var a = tuple[0], b = tuple[1], c = tuple[2], rest = tuple.slice(3);
|
||||
receiver = tuple.slice(0);
|
||||
// Repros from #32140
|
||||
var oops1 = [1, 2, 3].reduce(function (accu, el) { return accu.concat(el); }, [])[0];
|
||||
var oops2 = [1, 2, 3].reduce(function (acc, e) { return acc.concat(e); }, [])[0];
|
||||
|
||||
@@ -17,3 +17,27 @@ declare var receiver: typeof tuple;
|
||||
>receiver : Symbol(receiver, Decl(destructuringTuple.ts, 4, 11))
|
||||
>tuple : Symbol(tuple, Decl(destructuringTuple.ts, 0, 11))
|
||||
|
||||
// Repros from #32140
|
||||
|
||||
const [oops1] = [1, 2, 3].reduce((accu, el) => accu.concat(el), []);
|
||||
>oops1 : Symbol(oops1, Decl(destructuringTuple.ts, 10, 7))
|
||||
>[1, 2, 3].reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>accu : Symbol(accu, Decl(destructuringTuple.ts, 10, 34))
|
||||
>el : Symbol(el, Decl(destructuringTuple.ts, 10, 39))
|
||||
>accu.concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>accu : Symbol(accu, Decl(destructuringTuple.ts, 10, 34))
|
||||
>concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>el : Symbol(el, Decl(destructuringTuple.ts, 10, 39))
|
||||
|
||||
const [oops2] = [1, 2, 3].reduce((acc: number[], e) => acc.concat(e), []);
|
||||
>oops2 : Symbol(oops2, Decl(destructuringTuple.ts, 12, 7))
|
||||
>[1, 2, 3].reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>acc : Symbol(acc, Decl(destructuringTuple.ts, 12, 34))
|
||||
>e : Symbol(e, Decl(destructuringTuple.ts, 12, 48))
|
||||
>acc.concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>acc : Symbol(acc, Decl(destructuringTuple.ts, 12, 34))
|
||||
>concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>e : Symbol(e, Decl(destructuringTuple.ts, 12, 48))
|
||||
|
||||
|
||||
@@ -20,3 +20,43 @@ declare var receiver: typeof tuple;
|
||||
>receiver : [boolean, number, ...string[]]
|
||||
>tuple : [boolean, number, ...string[]]
|
||||
|
||||
// Repros from #32140
|
||||
|
||||
const [oops1] = [1, 2, 3].reduce((accu, el) => accu.concat(el), []);
|
||||
>oops1 : undefined
|
||||
>[1, 2, 3].reduce((accu, el) => accu.concat(el), []) : []
|
||||
>[1, 2, 3].reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; <U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }
|
||||
>[1, 2, 3] : number[]
|
||||
>1 : 1
|
||||
>2 : 2
|
||||
>3 : 3
|
||||
>reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; <U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }
|
||||
>(accu, el) => accu.concat(el) : (accu: [], el: number) => any
|
||||
>accu : []
|
||||
>el : number
|
||||
>accu.concat(el) : any
|
||||
>accu.concat : { (...items: ConcatArray<never>[]): never[]; (...items: ConcatArray<never>[]): never[]; }
|
||||
>accu : []
|
||||
>concat : { (...items: ConcatArray<never>[]): never[]; (...items: ConcatArray<never>[]): never[]; }
|
||||
>el : number
|
||||
>[] : []
|
||||
|
||||
const [oops2] = [1, 2, 3].reduce((acc: number[], e) => acc.concat(e), []);
|
||||
>oops2 : number
|
||||
>[1, 2, 3].reduce((acc: number[], e) => acc.concat(e), []) : number[]
|
||||
>[1, 2, 3].reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; <U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }
|
||||
>[1, 2, 3] : number[]
|
||||
>1 : 1
|
||||
>2 : 2
|
||||
>3 : 3
|
||||
>reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; <U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }
|
||||
>(acc: number[], e) => acc.concat(e) : (acc: number[], e: number) => number[]
|
||||
>acc : number[]
|
||||
>e : number
|
||||
>acc.concat(e) : number[]
|
||||
>acc.concat : { (...items: ConcatArray<number>[]): number[]; (...items: (number | ConcatArray<number>)[]): number[]; }
|
||||
>acc : number[]
|
||||
>concat : { (...items: ConcatArray<number>[]): number[]; (...items: (number | ConcatArray<number>)[]): number[]; }
|
||||
>e : number
|
||||
>[] : never[]
|
||||
|
||||
|
||||
@@ -151,9 +151,9 @@ var {f: [f1, f2, { f3: f4, f5 }, , ]} = { f: [1, 2, { f3: 4, f5: 0 }] };
|
||||
>f4 : number
|
||||
>f5 : number
|
||||
> : undefined
|
||||
>{ f: [1, 2, { f3: 4, f5: 0 }] } : { f: [number, number, { f3: number; f5: number; }, undefined?]; }
|
||||
>f : [number, number, { f3: number; f5: number; }, undefined?]
|
||||
>[1, 2, { f3: 4, f5: 0 }] : [number, number, { f3: number; f5: number; }, undefined?]
|
||||
>{ f: [1, 2, { f3: 4, f5: 0 }] } : { f: [number, number, { f3: number; f5: number; }]; }
|
||||
>f : [number, number, { f3: number; f5: number; }]
|
||||
>[1, 2, { f3: 4, f5: 0 }] : [number, number, { f3: number; f5: number; }]
|
||||
>1 : 1
|
||||
>2 : 2
|
||||
>{ f3: 4, f5: 0 } : { f3: number; f5: number; }
|
||||
|
||||
@@ -151,9 +151,9 @@ var {f: [f1, f2, { f3: f4, f5 }, , ]} = { f: [1, 2, { f3: 4, f5: 0 }] };
|
||||
>f4 : number
|
||||
>f5 : number
|
||||
> : undefined
|
||||
>{ f: [1, 2, { f3: 4, f5: 0 }] } : { f: [number, number, { f3: number; f5: number; }, undefined?]; }
|
||||
>f : [number, number, { f3: number; f5: number; }, undefined?]
|
||||
>[1, 2, { f3: 4, f5: 0 }] : [number, number, { f3: number; f5: number; }, undefined?]
|
||||
>{ f: [1, 2, { f3: 4, f5: 0 }] } : { f: [number, number, { f3: number; f5: number; }]; }
|
||||
>f : [number, number, { f3: number; f5: number; }]
|
||||
>[1, 2, { f3: 4, f5: 0 }] : [number, number, { f3: number; f5: number; }]
|
||||
>1 : 1
|
||||
>2 : 2
|
||||
>{ f3: 4, f5: 0 } : { f3: number; f5: number; }
|
||||
|
||||
@@ -151,9 +151,9 @@ var {f: [f1, f2, { f3: f4, f5 }, , ]} = { f: [1, 2, { f3: 4, f5: 0 }] };
|
||||
>f4 : number
|
||||
>f5 : number
|
||||
> : undefined
|
||||
>{ f: [1, 2, { f3: 4, f5: 0 }] } : { f: [number, number, { f3: number; f5: number; }, undefined?]; }
|
||||
>f : [number, number, { f3: number; f5: number; }, undefined?]
|
||||
>[1, 2, { f3: 4, f5: 0 }] : [number, number, { f3: number; f5: number; }, undefined?]
|
||||
>{ f: [1, 2, { f3: 4, f5: 0 }] } : { f: [number, number, { f3: number; f5: number; }]; }
|
||||
>f : [number, number, { f3: number; f5: number; }]
|
||||
>[1, 2, { f3: 4, f5: 0 }] : [number, number, { f3: number; f5: number; }]
|
||||
>1 : 1
|
||||
>2 : 2
|
||||
>{ f3: 4, f5: 0 } : { f3: number; f5: number; }
|
||||
|
||||
@@ -60,7 +60,7 @@ var [c1, c2, { c3: c4, c5 }, , ...c6] = [1, 2, { c3: 4, c5: 0 }]; // Error
|
||||
>c5 : number
|
||||
> : undefined
|
||||
>c6 : []
|
||||
>[1, 2, { c3: 4, c5: 0 }] : [number, number, { c3: number; c5: number; }, undefined?]
|
||||
>[1, 2, { c3: 4, c5: 0 }] : [number, number, { c3: number; c5: number; }]
|
||||
>1 : 1
|
||||
>2 : 2
|
||||
>{ c3: 4, c5: 0 } : { c3: number; c5: number; }
|
||||
|
||||
@@ -274,7 +274,7 @@ function g4([x, y = 0] = [0]) { }
|
||||
>x : number
|
||||
>y : number
|
||||
>0 : 0
|
||||
>[0] : [number, number?]
|
||||
>[0] : [number]
|
||||
>0 : 0
|
||||
|
||||
g4();
|
||||
@@ -295,7 +295,7 @@ function g5([x = 0, y = 0] = []) { }
|
||||
>0 : 0
|
||||
>y : number
|
||||
>0 : 0
|
||||
>[] : [number?, number?]
|
||||
>[] : []
|
||||
|
||||
g5();
|
||||
>g5() : void
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
tests/cases/conformance/es6/destructuring/destructuringWithLiteralInitializers2.ts(1,15): error TS7031: Binding element 'x' implicitly has an 'any' type.
|
||||
tests/cases/conformance/es6/destructuring/destructuringWithLiteralInitializers2.ts(1,18): error TS7031: Binding element 'y' implicitly has an 'any' type.
|
||||
tests/cases/conformance/es6/destructuring/destructuringWithLiteralInitializers2.ts(2,15): error TS7031: Binding element 'x' implicitly has an 'any' type.
|
||||
tests/cases/conformance/es6/destructuring/destructuringWithLiteralInitializers2.ts(2,18): error TS7031: Binding element 'y' implicitly has an 'any' type.
|
||||
tests/cases/conformance/es6/destructuring/destructuringWithLiteralInitializers2.ts(3,18): error TS7031: Binding element 'y' implicitly has an 'any' type.
|
||||
tests/cases/conformance/es6/destructuring/destructuringWithLiteralInitializers2.ts(6,22): error TS7031: Binding element 'y' implicitly has an 'any' type.
|
||||
tests/cases/conformance/es6/destructuring/destructuringWithLiteralInitializers2.ts(7,22): error TS7031: Binding element 'y' implicitly has an 'any' type.
|
||||
tests/cases/conformance/es6/destructuring/destructuringWithLiteralInitializers2.ts(8,22): error TS7031: Binding element 'y' implicitly has an 'any' type.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/destructuring/destructuringWithLiteralInitializers2.ts (8 errors) ====
|
||||
function f00([x, y]) {}
|
||||
~
|
||||
!!! error TS7031: Binding element 'x' implicitly has an 'any' type.
|
||||
~
|
||||
!!! error TS7031: Binding element 'y' implicitly has an 'any' type.
|
||||
function f01([x, y] = []) {}
|
||||
~
|
||||
!!! error TS7031: Binding element 'x' implicitly has an 'any' type.
|
||||
~
|
||||
!!! error TS7031: Binding element 'y' implicitly has an 'any' type.
|
||||
function f02([x, y] = [1]) {}
|
||||
~
|
||||
!!! error TS7031: Binding element 'y' implicitly has an 'any' type.
|
||||
function f03([x, y] = [1, 'foo']) {}
|
||||
|
||||
function f10([x = 0, y]) {}
|
||||
~
|
||||
!!! error TS7031: Binding element 'y' implicitly has an 'any' type.
|
||||
function f11([x = 0, y] = []) {}
|
||||
~
|
||||
!!! error TS7031: Binding element 'y' implicitly has an 'any' type.
|
||||
function f12([x = 0, y] = [1]) {}
|
||||
~
|
||||
!!! error TS7031: Binding element 'y' implicitly has an 'any' type.
|
||||
function f13([x = 0, y] = [1, 'foo']) {}
|
||||
|
||||
function f20([x = 0, y = 'bar']) {}
|
||||
function f21([x = 0, y = 'bar'] = []) {}
|
||||
function f22([x = 0, y = 'bar'] = [1]) {}
|
||||
function f23([x = 0, y = 'bar'] = [1, 'foo']) {}
|
||||
|
||||
declare const nx: number | undefined;
|
||||
declare const sx: string | undefined;
|
||||
|
||||
function f30([x = 0, y = 'bar']) {}
|
||||
function f31([x = 0, y = 'bar'] = []) {}
|
||||
function f32([x = 0, y = 'bar'] = [nx]) {}
|
||||
function f33([x = 0, y = 'bar'] = [nx, sx]) {}
|
||||
|
||||
function f40([x = 0, y = 'bar']) {}
|
||||
function f41([x = 0, y = 'bar'] = []) {}
|
||||
function f42([x = 0, y = 'bar'] = [sx]) {}
|
||||
function f43([x = 0, y = 'bar'] = [sx, nx]) {}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
//// [destructuringWithLiteralInitializers2.ts]
|
||||
function f00([x, y]) {}
|
||||
function f01([x, y] = []) {}
|
||||
function f02([x, y] = [1]) {}
|
||||
function f03([x, y] = [1, 'foo']) {}
|
||||
|
||||
function f10([x = 0, y]) {}
|
||||
function f11([x = 0, y] = []) {}
|
||||
function f12([x = 0, y] = [1]) {}
|
||||
function f13([x = 0, y] = [1, 'foo']) {}
|
||||
|
||||
function f20([x = 0, y = 'bar']) {}
|
||||
function f21([x = 0, y = 'bar'] = []) {}
|
||||
function f22([x = 0, y = 'bar'] = [1]) {}
|
||||
function f23([x = 0, y = 'bar'] = [1, 'foo']) {}
|
||||
|
||||
declare const nx: number | undefined;
|
||||
declare const sx: string | undefined;
|
||||
|
||||
function f30([x = 0, y = 'bar']) {}
|
||||
function f31([x = 0, y = 'bar'] = []) {}
|
||||
function f32([x = 0, y = 'bar'] = [nx]) {}
|
||||
function f33([x = 0, y = 'bar'] = [nx, sx]) {}
|
||||
|
||||
function f40([x = 0, y = 'bar']) {}
|
||||
function f41([x = 0, y = 'bar'] = []) {}
|
||||
function f42([x = 0, y = 'bar'] = [sx]) {}
|
||||
function f43([x = 0, y = 'bar'] = [sx, nx]) {}
|
||||
|
||||
|
||||
//// [destructuringWithLiteralInitializers2.js]
|
||||
"use strict";
|
||||
function f00(_a) {
|
||||
var x = _a[0], y = _a[1];
|
||||
}
|
||||
function f01(_a) {
|
||||
var _b = _a === void 0 ? [] : _a, x = _b[0], y = _b[1];
|
||||
}
|
||||
function f02(_a) {
|
||||
var _b = _a === void 0 ? [1] : _a, x = _b[0], y = _b[1];
|
||||
}
|
||||
function f03(_a) {
|
||||
var _b = _a === void 0 ? [1, 'foo'] : _a, x = _b[0], y = _b[1];
|
||||
}
|
||||
function f10(_a) {
|
||||
var _b = _a[0], x = _b === void 0 ? 0 : _b, y = _a[1];
|
||||
}
|
||||
function f11(_a) {
|
||||
var _b = _a === void 0 ? [] : _a, _c = _b[0], x = _c === void 0 ? 0 : _c, y = _b[1];
|
||||
}
|
||||
function f12(_a) {
|
||||
var _b = _a === void 0 ? [1] : _a, _c = _b[0], x = _c === void 0 ? 0 : _c, y = _b[1];
|
||||
}
|
||||
function f13(_a) {
|
||||
var _b = _a === void 0 ? [1, 'foo'] : _a, _c = _b[0], x = _c === void 0 ? 0 : _c, y = _b[1];
|
||||
}
|
||||
function f20(_a) {
|
||||
var _b = _a[0], x = _b === void 0 ? 0 : _b, _c = _a[1], y = _c === void 0 ? 'bar' : _c;
|
||||
}
|
||||
function f21(_a) {
|
||||
var _b = _a === void 0 ? [] : _a, _c = _b[0], x = _c === void 0 ? 0 : _c, _d = _b[1], y = _d === void 0 ? 'bar' : _d;
|
||||
}
|
||||
function f22(_a) {
|
||||
var _b = _a === void 0 ? [1] : _a, _c = _b[0], x = _c === void 0 ? 0 : _c, _d = _b[1], y = _d === void 0 ? 'bar' : _d;
|
||||
}
|
||||
function f23(_a) {
|
||||
var _b = _a === void 0 ? [1, 'foo'] : _a, _c = _b[0], x = _c === void 0 ? 0 : _c, _d = _b[1], y = _d === void 0 ? 'bar' : _d;
|
||||
}
|
||||
function f30(_a) {
|
||||
var _b = _a[0], x = _b === void 0 ? 0 : _b, _c = _a[1], y = _c === void 0 ? 'bar' : _c;
|
||||
}
|
||||
function f31(_a) {
|
||||
var _b = _a === void 0 ? [] : _a, _c = _b[0], x = _c === void 0 ? 0 : _c, _d = _b[1], y = _d === void 0 ? 'bar' : _d;
|
||||
}
|
||||
function f32(_a) {
|
||||
var _b = _a === void 0 ? [nx] : _a, _c = _b[0], x = _c === void 0 ? 0 : _c, _d = _b[1], y = _d === void 0 ? 'bar' : _d;
|
||||
}
|
||||
function f33(_a) {
|
||||
var _b = _a === void 0 ? [nx, sx] : _a, _c = _b[0], x = _c === void 0 ? 0 : _c, _d = _b[1], y = _d === void 0 ? 'bar' : _d;
|
||||
}
|
||||
function f40(_a) {
|
||||
var _b = _a[0], x = _b === void 0 ? 0 : _b, _c = _a[1], y = _c === void 0 ? 'bar' : _c;
|
||||
}
|
||||
function f41(_a) {
|
||||
var _b = _a === void 0 ? [] : _a, _c = _b[0], x = _c === void 0 ? 0 : _c, _d = _b[1], y = _d === void 0 ? 'bar' : _d;
|
||||
}
|
||||
function f42(_a) {
|
||||
var _b = _a === void 0 ? [sx] : _a, _c = _b[0], x = _c === void 0 ? 0 : _c, _d = _b[1], y = _d === void 0 ? 'bar' : _d;
|
||||
}
|
||||
function f43(_a) {
|
||||
var _b = _a === void 0 ? [sx, nx] : _a, _c = _b[0], x = _c === void 0 ? 0 : _c, _d = _b[1], y = _d === void 0 ? 'bar' : _d;
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
=== tests/cases/conformance/es6/destructuring/destructuringWithLiteralInitializers2.ts ===
|
||||
function f00([x, y]) {}
|
||||
>f00 : Symbol(f00, Decl(destructuringWithLiteralInitializers2.ts, 0, 0))
|
||||
>x : Symbol(x, Decl(destructuringWithLiteralInitializers2.ts, 0, 14))
|
||||
>y : Symbol(y, Decl(destructuringWithLiteralInitializers2.ts, 0, 16))
|
||||
|
||||
function f01([x, y] = []) {}
|
||||
>f01 : Symbol(f01, Decl(destructuringWithLiteralInitializers2.ts, 0, 23))
|
||||
>x : Symbol(x, Decl(destructuringWithLiteralInitializers2.ts, 1, 14))
|
||||
>y : Symbol(y, Decl(destructuringWithLiteralInitializers2.ts, 1, 16))
|
||||
|
||||
function f02([x, y] = [1]) {}
|
||||
>f02 : Symbol(f02, Decl(destructuringWithLiteralInitializers2.ts, 1, 28))
|
||||
>x : Symbol(x, Decl(destructuringWithLiteralInitializers2.ts, 2, 14))
|
||||
>y : Symbol(y, Decl(destructuringWithLiteralInitializers2.ts, 2, 16))
|
||||
|
||||
function f03([x, y] = [1, 'foo']) {}
|
||||
>f03 : Symbol(f03, Decl(destructuringWithLiteralInitializers2.ts, 2, 29))
|
||||
>x : Symbol(x, Decl(destructuringWithLiteralInitializers2.ts, 3, 14))
|
||||
>y : Symbol(y, Decl(destructuringWithLiteralInitializers2.ts, 3, 16))
|
||||
|
||||
function f10([x = 0, y]) {}
|
||||
>f10 : Symbol(f10, Decl(destructuringWithLiteralInitializers2.ts, 3, 36))
|
||||
>x : Symbol(x, Decl(destructuringWithLiteralInitializers2.ts, 5, 14))
|
||||
>y : Symbol(y, Decl(destructuringWithLiteralInitializers2.ts, 5, 20))
|
||||
|
||||
function f11([x = 0, y] = []) {}
|
||||
>f11 : Symbol(f11, Decl(destructuringWithLiteralInitializers2.ts, 5, 27))
|
||||
>x : Symbol(x, Decl(destructuringWithLiteralInitializers2.ts, 6, 14))
|
||||
>y : Symbol(y, Decl(destructuringWithLiteralInitializers2.ts, 6, 20))
|
||||
|
||||
function f12([x = 0, y] = [1]) {}
|
||||
>f12 : Symbol(f12, Decl(destructuringWithLiteralInitializers2.ts, 6, 32))
|
||||
>x : Symbol(x, Decl(destructuringWithLiteralInitializers2.ts, 7, 14))
|
||||
>y : Symbol(y, Decl(destructuringWithLiteralInitializers2.ts, 7, 20))
|
||||
|
||||
function f13([x = 0, y] = [1, 'foo']) {}
|
||||
>f13 : Symbol(f13, Decl(destructuringWithLiteralInitializers2.ts, 7, 33))
|
||||
>x : Symbol(x, Decl(destructuringWithLiteralInitializers2.ts, 8, 14))
|
||||
>y : Symbol(y, Decl(destructuringWithLiteralInitializers2.ts, 8, 20))
|
||||
|
||||
function f20([x = 0, y = 'bar']) {}
|
||||
>f20 : Symbol(f20, Decl(destructuringWithLiteralInitializers2.ts, 8, 40))
|
||||
>x : Symbol(x, Decl(destructuringWithLiteralInitializers2.ts, 10, 14))
|
||||
>y : Symbol(y, Decl(destructuringWithLiteralInitializers2.ts, 10, 20))
|
||||
|
||||
function f21([x = 0, y = 'bar'] = []) {}
|
||||
>f21 : Symbol(f21, Decl(destructuringWithLiteralInitializers2.ts, 10, 35))
|
||||
>x : Symbol(x, Decl(destructuringWithLiteralInitializers2.ts, 11, 14))
|
||||
>y : Symbol(y, Decl(destructuringWithLiteralInitializers2.ts, 11, 20))
|
||||
|
||||
function f22([x = 0, y = 'bar'] = [1]) {}
|
||||
>f22 : Symbol(f22, Decl(destructuringWithLiteralInitializers2.ts, 11, 40))
|
||||
>x : Symbol(x, Decl(destructuringWithLiteralInitializers2.ts, 12, 14))
|
||||
>y : Symbol(y, Decl(destructuringWithLiteralInitializers2.ts, 12, 20))
|
||||
|
||||
function f23([x = 0, y = 'bar'] = [1, 'foo']) {}
|
||||
>f23 : Symbol(f23, Decl(destructuringWithLiteralInitializers2.ts, 12, 41))
|
||||
>x : Symbol(x, Decl(destructuringWithLiteralInitializers2.ts, 13, 14))
|
||||
>y : Symbol(y, Decl(destructuringWithLiteralInitializers2.ts, 13, 20))
|
||||
|
||||
declare const nx: number | undefined;
|
||||
>nx : Symbol(nx, Decl(destructuringWithLiteralInitializers2.ts, 15, 13))
|
||||
|
||||
declare const sx: string | undefined;
|
||||
>sx : Symbol(sx, Decl(destructuringWithLiteralInitializers2.ts, 16, 13))
|
||||
|
||||
function f30([x = 0, y = 'bar']) {}
|
||||
>f30 : Symbol(f30, Decl(destructuringWithLiteralInitializers2.ts, 16, 37))
|
||||
>x : Symbol(x, Decl(destructuringWithLiteralInitializers2.ts, 18, 14))
|
||||
>y : Symbol(y, Decl(destructuringWithLiteralInitializers2.ts, 18, 20))
|
||||
|
||||
function f31([x = 0, y = 'bar'] = []) {}
|
||||
>f31 : Symbol(f31, Decl(destructuringWithLiteralInitializers2.ts, 18, 35))
|
||||
>x : Symbol(x, Decl(destructuringWithLiteralInitializers2.ts, 19, 14))
|
||||
>y : Symbol(y, Decl(destructuringWithLiteralInitializers2.ts, 19, 20))
|
||||
|
||||
function f32([x = 0, y = 'bar'] = [nx]) {}
|
||||
>f32 : Symbol(f32, Decl(destructuringWithLiteralInitializers2.ts, 19, 40))
|
||||
>x : Symbol(x, Decl(destructuringWithLiteralInitializers2.ts, 20, 14))
|
||||
>y : Symbol(y, Decl(destructuringWithLiteralInitializers2.ts, 20, 20))
|
||||
>nx : Symbol(nx, Decl(destructuringWithLiteralInitializers2.ts, 15, 13))
|
||||
|
||||
function f33([x = 0, y = 'bar'] = [nx, sx]) {}
|
||||
>f33 : Symbol(f33, Decl(destructuringWithLiteralInitializers2.ts, 20, 42))
|
||||
>x : Symbol(x, Decl(destructuringWithLiteralInitializers2.ts, 21, 14))
|
||||
>y : Symbol(y, Decl(destructuringWithLiteralInitializers2.ts, 21, 20))
|
||||
>nx : Symbol(nx, Decl(destructuringWithLiteralInitializers2.ts, 15, 13))
|
||||
>sx : Symbol(sx, Decl(destructuringWithLiteralInitializers2.ts, 16, 13))
|
||||
|
||||
function f40([x = 0, y = 'bar']) {}
|
||||
>f40 : Symbol(f40, Decl(destructuringWithLiteralInitializers2.ts, 21, 46))
|
||||
>x : Symbol(x, Decl(destructuringWithLiteralInitializers2.ts, 23, 14))
|
||||
>y : Symbol(y, Decl(destructuringWithLiteralInitializers2.ts, 23, 20))
|
||||
|
||||
function f41([x = 0, y = 'bar'] = []) {}
|
||||
>f41 : Symbol(f41, Decl(destructuringWithLiteralInitializers2.ts, 23, 35))
|
||||
>x : Symbol(x, Decl(destructuringWithLiteralInitializers2.ts, 24, 14))
|
||||
>y : Symbol(y, Decl(destructuringWithLiteralInitializers2.ts, 24, 20))
|
||||
|
||||
function f42([x = 0, y = 'bar'] = [sx]) {}
|
||||
>f42 : Symbol(f42, Decl(destructuringWithLiteralInitializers2.ts, 24, 40))
|
||||
>x : Symbol(x, Decl(destructuringWithLiteralInitializers2.ts, 25, 14))
|
||||
>y : Symbol(y, Decl(destructuringWithLiteralInitializers2.ts, 25, 20))
|
||||
>sx : Symbol(sx, Decl(destructuringWithLiteralInitializers2.ts, 16, 13))
|
||||
|
||||
function f43([x = 0, y = 'bar'] = [sx, nx]) {}
|
||||
>f43 : Symbol(f43, Decl(destructuringWithLiteralInitializers2.ts, 25, 42))
|
||||
>x : Symbol(x, Decl(destructuringWithLiteralInitializers2.ts, 26, 14))
|
||||
>y : Symbol(y, Decl(destructuringWithLiteralInitializers2.ts, 26, 20))
|
||||
>sx : Symbol(sx, Decl(destructuringWithLiteralInitializers2.ts, 16, 13))
|
||||
>nx : Symbol(nx, Decl(destructuringWithLiteralInitializers2.ts, 15, 13))
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
=== tests/cases/conformance/es6/destructuring/destructuringWithLiteralInitializers2.ts ===
|
||||
function f00([x, y]) {}
|
||||
>f00 : ([x, y]: [any, any]) => void
|
||||
>x : any
|
||||
>y : any
|
||||
|
||||
function f01([x, y] = []) {}
|
||||
>f01 : ([x, y]?: [any?, any?]) => void
|
||||
>x : any
|
||||
>y : any
|
||||
>[] : []
|
||||
|
||||
function f02([x, y] = [1]) {}
|
||||
>f02 : ([x, y]?: [number, any?]) => void
|
||||
>x : number
|
||||
>y : any
|
||||
>[1] : [number]
|
||||
>1 : 1
|
||||
|
||||
function f03([x, y] = [1, 'foo']) {}
|
||||
>f03 : ([x, y]?: [number, string]) => void
|
||||
>x : number
|
||||
>y : string
|
||||
>[1, 'foo'] : [number, string]
|
||||
>1 : 1
|
||||
>'foo' : "foo"
|
||||
|
||||
function f10([x = 0, y]) {}
|
||||
>f10 : ([x, y]: [number | undefined, any]) => void
|
||||
>x : number
|
||||
>0 : 0
|
||||
>y : any
|
||||
|
||||
function f11([x = 0, y] = []) {}
|
||||
>f11 : ([x, y]?: [(number | undefined)?, any?]) => void
|
||||
>x : number
|
||||
>0 : 0
|
||||
>y : any
|
||||
>[] : []
|
||||
|
||||
function f12([x = 0, y] = [1]) {}
|
||||
>f12 : ([x, y]?: [number, any?]) => void
|
||||
>x : number
|
||||
>0 : 0
|
||||
>y : any
|
||||
>[1] : [number]
|
||||
>1 : 1
|
||||
|
||||
function f13([x = 0, y] = [1, 'foo']) {}
|
||||
>f13 : ([x, y]?: [number, string]) => void
|
||||
>x : number
|
||||
>0 : 0
|
||||
>y : string
|
||||
>[1, 'foo'] : [number, string]
|
||||
>1 : 1
|
||||
>'foo' : "foo"
|
||||
|
||||
function f20([x = 0, y = 'bar']) {}
|
||||
>f20 : ([x, y]: [(number | undefined)?, (string | undefined)?]) => void
|
||||
>x : number
|
||||
>0 : 0
|
||||
>y : string
|
||||
>'bar' : "bar"
|
||||
|
||||
function f21([x = 0, y = 'bar'] = []) {}
|
||||
>f21 : ([x, y]?: [(number | undefined)?, (string | undefined)?]) => void
|
||||
>x : number
|
||||
>0 : 0
|
||||
>y : string
|
||||
>'bar' : "bar"
|
||||
>[] : []
|
||||
|
||||
function f22([x = 0, y = 'bar'] = [1]) {}
|
||||
>f22 : ([x, y]?: [number, (string | undefined)?]) => void
|
||||
>x : number
|
||||
>0 : 0
|
||||
>y : string
|
||||
>'bar' : "bar"
|
||||
>[1] : [number]
|
||||
>1 : 1
|
||||
|
||||
function f23([x = 0, y = 'bar'] = [1, 'foo']) {}
|
||||
>f23 : ([x, y]?: [number, string]) => void
|
||||
>x : number
|
||||
>0 : 0
|
||||
>y : string
|
||||
>'bar' : "bar"
|
||||
>[1, 'foo'] : [number, string]
|
||||
>1 : 1
|
||||
>'foo' : "foo"
|
||||
|
||||
declare const nx: number | undefined;
|
||||
>nx : number | undefined
|
||||
|
||||
declare const sx: string | undefined;
|
||||
>sx : string | undefined
|
||||
|
||||
function f30([x = 0, y = 'bar']) {}
|
||||
>f30 : ([x, y]: [(number | undefined)?, (string | undefined)?]) => void
|
||||
>x : number
|
||||
>0 : 0
|
||||
>y : string
|
||||
>'bar' : "bar"
|
||||
|
||||
function f31([x = 0, y = 'bar'] = []) {}
|
||||
>f31 : ([x, y]?: [(number | undefined)?, (string | undefined)?]) => void
|
||||
>x : number
|
||||
>0 : 0
|
||||
>y : string
|
||||
>'bar' : "bar"
|
||||
>[] : []
|
||||
|
||||
function f32([x = 0, y = 'bar'] = [nx]) {}
|
||||
>f32 : ([x, y]?: [number | undefined, (string | undefined)?]) => void
|
||||
>x : number
|
||||
>0 : 0
|
||||
>y : string
|
||||
>'bar' : "bar"
|
||||
>[nx] : [number | undefined]
|
||||
>nx : number | undefined
|
||||
|
||||
function f33([x = 0, y = 'bar'] = [nx, sx]) {}
|
||||
>f33 : ([x, y]?: [number | undefined, string | undefined]) => void
|
||||
>x : number
|
||||
>0 : 0
|
||||
>y : string
|
||||
>'bar' : "bar"
|
||||
>[nx, sx] : [number | undefined, string | undefined]
|
||||
>nx : number | undefined
|
||||
>sx : string | undefined
|
||||
|
||||
function f40([x = 0, y = 'bar']) {}
|
||||
>f40 : ([x, y]: [(number | undefined)?, (string | undefined)?]) => void
|
||||
>x : number
|
||||
>0 : 0
|
||||
>y : string
|
||||
>'bar' : "bar"
|
||||
|
||||
function f41([x = 0, y = 'bar'] = []) {}
|
||||
>f41 : ([x, y]?: [(number | undefined)?, (string | undefined)?]) => void
|
||||
>x : number
|
||||
>0 : 0
|
||||
>y : string
|
||||
>'bar' : "bar"
|
||||
>[] : []
|
||||
|
||||
function f42([x = 0, y = 'bar'] = [sx]) {}
|
||||
>f42 : ([x, y]?: [string | undefined, (string | undefined)?]) => void
|
||||
>x : string | number
|
||||
>0 : 0
|
||||
>y : string
|
||||
>'bar' : "bar"
|
||||
>[sx] : [string | undefined]
|
||||
>sx : string | undefined
|
||||
|
||||
function f43([x = 0, y = 'bar'] = [sx, nx]) {}
|
||||
>f43 : ([x, y]?: [string | undefined, number | undefined]) => void
|
||||
>x : string | number
|
||||
>0 : 0
|
||||
>y : string | number
|
||||
>'bar' : "bar"
|
||||
>[sx, nx] : [string | undefined, number | undefined]
|
||||
>sx : string | undefined
|
||||
>nx : number | undefined
|
||||
|
||||
@@ -82,7 +82,7 @@ rush rebuild - Errors! ( ? seconds)
|
||||
|
||||
|
||||
Standard error:
|
||||
Your version of Node.js (12.4.0) has not been tested with this release of Rush. The Rush team will not accept issue reports for it. Please consider upgrading Rush or downgrading Node.js.
|
||||
Your version of Node.js (X.X.X) has not been tested with this release of Rush. The Rush team will not accept issue reports for it. Please consider upgrading Rush or downgrading Node.js.
|
||||
XX of XX: [@azure/service-bus] completed with warnings in ? seconds
|
||||
XX of XX: [@azure/core-amqp] failed to build!
|
||||
XX of XX: [@azure/event-hubs] blocked by [@azure/core-amqp]!
|
||||
|
||||
@@ -311,7 +311,7 @@ rush rebuild - Errors! ( ? seconds)
|
||||
|
||||
|
||||
Standard error:
|
||||
Your version of Node.js (12.4.0) has not been tested with this release of Rush. The Rush team will not accept issue reports for it. Please consider upgrading Rush or downgrading Node.js.
|
||||
Your version of Node.js (X.X.X) has not been tested with this release of Rush. The Rush team will not accept issue reports for it. Please consider upgrading Rush or downgrading Node.js.
|
||||
XX of XX: [@uifabric/codepen-loader] completed with warnings in ? seconds
|
||||
XX of XX: [@uifabric/set-version] completed with warnings in ? seconds
|
||||
XX of XX: [@uifabric/merge-styles] completed with warnings in ? seconds
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/downlevelLetConst12.ts(6,6): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/compiler/downlevelLetConst12.ts(9,8): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/compiler/downlevelLetConst12.ts(6,6): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
tests/cases/compiler/downlevelLetConst12.ts(9,8): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/downlevelLetConst12.ts (2 errors) ====
|
||||
@@ -10,10 +10,10 @@ tests/cases/compiler/downlevelLetConst12.ts(9,8): error TS2525: Initializer prov
|
||||
|
||||
let [baz] = [];
|
||||
~~~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
let {a: baz2} = { a: 1 };
|
||||
|
||||
const [baz3] = []
|
||||
~~~~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
const {a: baz4} = { a: 1 };
|
||||
@@ -11,8 +11,8 @@ const bar = 1;
|
||||
>1 : 1
|
||||
|
||||
let [baz] = [];
|
||||
>baz : any
|
||||
>[] : [undefined?]
|
||||
>baz : undefined
|
||||
>[] : []
|
||||
|
||||
let {a: baz2} = { a: 1 };
|
||||
>a : any
|
||||
@@ -22,8 +22,8 @@ let {a: baz2} = { a: 1 };
|
||||
>1 : 1
|
||||
|
||||
const [baz3] = []
|
||||
>baz3 : any
|
||||
>[] : [undefined?]
|
||||
>baz3 : undefined
|
||||
>[] : []
|
||||
|
||||
const {a: baz4} = { a: 1 };
|
||||
>a : any
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/downlevelLetConst16.ts(151,15): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/compiler/downlevelLetConst16.ts(164,17): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/compiler/downlevelLetConst16.ts(151,15): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
tests/cases/compiler/downlevelLetConst16.ts(164,17): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
tests/cases/compiler/downlevelLetConst16.ts(195,14): error TS2461: Type 'undefined' is not an array type.
|
||||
tests/cases/compiler/downlevelLetConst16.ts(202,15): error TS2339: Property 'a' does not exist on type 'undefined'.
|
||||
tests/cases/compiler/downlevelLetConst16.ts(216,16): error TS2461: Type 'undefined' is not an array type.
|
||||
@@ -159,7 +159,7 @@ tests/cases/compiler/downlevelLetConst16.ts(223,17): error TS2339: Property 'a'
|
||||
}
|
||||
for (let [y] = []; ;) {
|
||||
~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
use(y);
|
||||
}
|
||||
for (let {a: z} = {a: 1}; ;) {
|
||||
@@ -174,7 +174,7 @@ tests/cases/compiler/downlevelLetConst16.ts(223,17): error TS2339: Property 'a'
|
||||
}
|
||||
for (const [y] = []; ;) {
|
||||
~
|
||||
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
|
||||
use(y);
|
||||
}
|
||||
for (const {a: z} = { a: 1 }; ;) {
|
||||
|
||||
@@ -515,13 +515,13 @@ function foo3() {
|
||||
>x : any
|
||||
}
|
||||
for (let [y] = []; ;) {
|
||||
>y : any
|
||||
>[] : [undefined?]
|
||||
>y : undefined
|
||||
>[] : []
|
||||
|
||||
use(y);
|
||||
>use(y) : any
|
||||
>use : (a: any) => any
|
||||
>y : any
|
||||
>y : undefined
|
||||
}
|
||||
for (let {a: z} = {a: 1}; ;) {
|
||||
>a : any
|
||||
@@ -554,13 +554,13 @@ function foo4() {
|
||||
>x : 1
|
||||
}
|
||||
for (const [y] = []; ;) {
|
||||
>y : any
|
||||
>[] : [undefined?]
|
||||
>y : undefined
|
||||
>[] : []
|
||||
|
||||
use(y);
|
||||
>use(y) : any
|
||||
>use : (a: any) => any
|
||||
>y : any
|
||||
>y : undefined
|
||||
}
|
||||
for (const {a: z} = { a: 1 }; ;) {
|
||||
>a : any
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
//// [elidedEmbeddedStatementsReplacedWithSemicolon.ts]
|
||||
if (1)
|
||||
const enum A {}
|
||||
else
|
||||
const enum B {}
|
||||
|
||||
do
|
||||
const enum C {}
|
||||
while (0);
|
||||
|
||||
while (0)
|
||||
const enum D {}
|
||||
|
||||
for (;0;)
|
||||
const enum E {}
|
||||
|
||||
for (let _ in [])
|
||||
const enum F {}
|
||||
|
||||
for (let _ of [])
|
||||
const enum G {}
|
||||
|
||||
// @ts-ignore suppress `with` statement error
|
||||
with (window)
|
||||
const enum H {}
|
||||
|
||||
//// [elidedEmbeddedStatementsReplacedWithSemicolon.js]
|
||||
if (1)
|
||||
;
|
||||
else
|
||||
;
|
||||
do
|
||||
;
|
||||
while (0);
|
||||
while (0)
|
||||
;
|
||||
for (; 0;)
|
||||
;
|
||||
for (var _ in [])
|
||||
;
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var _ = _a[_i];
|
||||
;
|
||||
}
|
||||
// @ts-ignore suppress `with` statement error
|
||||
with (window)
|
||||
;
|
||||
@@ -0,0 +1,40 @@
|
||||
=== tests/cases/compiler/elidedEmbeddedStatementsReplacedWithSemicolon.ts ===
|
||||
if (1)
|
||||
const enum A {}
|
||||
>A : Symbol(A, Decl(elidedEmbeddedStatementsReplacedWithSemicolon.ts, 0, 6))
|
||||
|
||||
else
|
||||
const enum B {}
|
||||
>B : Symbol(B, Decl(elidedEmbeddedStatementsReplacedWithSemicolon.ts, 2, 4))
|
||||
|
||||
do
|
||||
const enum C {}
|
||||
>C : Symbol(C, Decl(elidedEmbeddedStatementsReplacedWithSemicolon.ts, 5, 2))
|
||||
|
||||
while (0);
|
||||
|
||||
while (0)
|
||||
const enum D {}
|
||||
>D : Symbol(D, Decl(elidedEmbeddedStatementsReplacedWithSemicolon.ts, 9, 9))
|
||||
|
||||
for (;0;)
|
||||
const enum E {}
|
||||
>E : Symbol(E, Decl(elidedEmbeddedStatementsReplacedWithSemicolon.ts, 12, 9))
|
||||
|
||||
for (let _ in [])
|
||||
>_ : Symbol(_, Decl(elidedEmbeddedStatementsReplacedWithSemicolon.ts, 15, 8))
|
||||
|
||||
const enum F {}
|
||||
>F : Symbol(F, Decl(elidedEmbeddedStatementsReplacedWithSemicolon.ts, 15, 17))
|
||||
|
||||
for (let _ of [])
|
||||
>_ : Symbol(_, Decl(elidedEmbeddedStatementsReplacedWithSemicolon.ts, 18, 8))
|
||||
|
||||
const enum G {}
|
||||
>G : Symbol(G, Decl(elidedEmbeddedStatementsReplacedWithSemicolon.ts, 18, 17))
|
||||
|
||||
// @ts-ignore suppress `with` statement error
|
||||
with (window)
|
||||
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
|
||||
|
||||
const enum H {}
|
||||
@@ -0,0 +1,51 @@
|
||||
=== tests/cases/compiler/elidedEmbeddedStatementsReplacedWithSemicolon.ts ===
|
||||
if (1)
|
||||
>1 : 1
|
||||
|
||||
const enum A {}
|
||||
>A : A
|
||||
|
||||
else
|
||||
const enum B {}
|
||||
>B : B
|
||||
|
||||
do
|
||||
const enum C {}
|
||||
>C : C
|
||||
|
||||
while (0);
|
||||
>0 : 0
|
||||
|
||||
while (0)
|
||||
>0 : 0
|
||||
|
||||
const enum D {}
|
||||
>D : D
|
||||
|
||||
for (;0;)
|
||||
>0 : 0
|
||||
|
||||
const enum E {}
|
||||
>E : E
|
||||
|
||||
for (let _ in [])
|
||||
>_ : string
|
||||
>[] : undefined[]
|
||||
|
||||
const enum F {}
|
||||
>F : F
|
||||
|
||||
for (let _ of [])
|
||||
>_ : any
|
||||
>[] : undefined[]
|
||||
|
||||
const enum G {}
|
||||
>G : G
|
||||
|
||||
// @ts-ignore suppress `with` statement error
|
||||
with (window)
|
||||
>window : Window
|
||||
|
||||
const enum H {}
|
||||
>H : error
|
||||
|
||||
@@ -2,10 +2,18 @@
|
||||
// JS and d.ts output should have a BOM but not the sourcemap
|
||||
var x;
|
||||
|
||||
//// [emitBOM.js]
|
||||
// JS and d.ts output should have a BOM but not the sourcemap
|
||||
var x;
|
||||
//# sourceMappingURL=emitBOM.js.map
|
||||
tests/cases/compiler/emitBOM.js(1,2): error TS1127: Invalid character.
|
||||
tests/cases/compiler/emitBOM.js(1,3): error TS1127: Invalid character.
|
||||
|
||||
|
||||
==== tests/cases/compiler/emitBOM.js (2 errors) ====
|
||||
// JS and d.ts output should have a BOM but not the sourcemap
|
||||
|
||||
!!! error TS1127: Invalid character.
|
||||
|
||||
!!! error TS1127: Invalid character.
|
||||
var x;
|
||||
//# sourceMappingURL=emitBOM.js.map
|
||||
|
||||
//// [emitBOM.d.ts]
|
||||
declare var x: any;
|
||||
|
||||
@@ -2,9 +2,10 @@ tests/cases/compiler/infiniteConstraints.ts(4,37): error TS2536: Type '"val"' ca
|
||||
tests/cases/compiler/infiniteConstraints.ts(31,43): error TS2322: Type 'Record<"val", "dup">' is not assignable to type 'never'.
|
||||
tests/cases/compiler/infiniteConstraints.ts(31,63): error TS2322: Type 'Record<"val", "dup">' is not assignable to type 'never'.
|
||||
tests/cases/compiler/infiniteConstraints.ts(36,71): error TS2536: Type '"foo"' cannot be used to index type 'T[keyof T]'.
|
||||
tests/cases/compiler/infiniteConstraints.ts(48,16): error TS2589: Type instantiation is excessively deep and possibly infinite.
|
||||
|
||||
|
||||
==== tests/cases/compiler/infiniteConstraints.ts (4 errors) ====
|
||||
==== tests/cases/compiler/infiniteConstraints.ts (5 errors) ====
|
||||
// Both of the following types trigger the recursion limiter in getImmediateBaseConstraint
|
||||
|
||||
type T1<B extends { [K in keyof B]: Extract<B[Exclude<keyof B, K>], { val: string }>["val"] }> = B;
|
||||
@@ -51,4 +52,18 @@ tests/cases/compiler/infiniteConstraints.ts(36,71): error TS2536: Type '"foo"' c
|
||||
declare function function1<T extends {[K in keyof T]: Cond<T[K]>}>(): T[keyof T]["foo"];
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2536: Type '"foo"' cannot be used to index type 'T[keyof T]'.
|
||||
|
||||
// Repro from #31823
|
||||
|
||||
export type Prepend<Elm, T extends unknown[]> =
|
||||
T extends unknown ?
|
||||
((arg: Elm, ...rest: T) => void) extends ((...args: infer T2) => void) ? T2 :
|
||||
never :
|
||||
never;
|
||||
export type ExactExtract<T, U> = T extends U ? U extends T ? T : never : never;
|
||||
|
||||
type Conv<T, U = T> =
|
||||
{ 0: [T]; 1: Prepend<T, Conv<ExactExtract<U, T>>>;}[U extends T ? 0 : 1];
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2589: Type instantiation is excessively deep and possibly infinite.
|
||||
|
||||
@@ -35,11 +35,24 @@ const shouldBeError = ensureNoDuplicates({main: value("dup"), alternate: value("
|
||||
|
||||
type Cond<T> = T extends number ? number : never;
|
||||
declare function function1<T extends {[K in keyof T]: Cond<T[K]>}>(): T[keyof T]["foo"];
|
||||
|
||||
// Repro from #31823
|
||||
|
||||
export type Prepend<Elm, T extends unknown[]> =
|
||||
T extends unknown ?
|
||||
((arg: Elm, ...rest: T) => void) extends ((...args: infer T2) => void) ? T2 :
|
||||
never :
|
||||
never;
|
||||
export type ExactExtract<T, U> = T extends U ? U extends T ? T : never : never;
|
||||
|
||||
type Conv<T, U = T> =
|
||||
{ 0: [T]; 1: Prepend<T, Conv<ExactExtract<U, T>>>;}[U extends T ? 0 : 1];
|
||||
|
||||
|
||||
//// [infiniteConstraints.js]
|
||||
"use strict";
|
||||
// Both of the following types trigger the recursion limiter in getImmediateBaseConstraint
|
||||
exports.__esModule = true;
|
||||
var out = myBug({ obj1: { a: "test" } });
|
||||
var noError = ensureNoDuplicates({ main: value("test"), alternate: value("test2") });
|
||||
var shouldBeNoError = ensureNoDuplicates({ main: value("test") });
|
||||
|
||||
@@ -138,3 +138,53 @@ declare function function1<T extends {[K in keyof T]: Cond<T[K]>}>(): T[keyof T]
|
||||
>T : Symbol(T, Decl(infiniteConstraints.ts, 35, 27))
|
||||
>T : Symbol(T, Decl(infiniteConstraints.ts, 35, 27))
|
||||
|
||||
// Repro from #31823
|
||||
|
||||
export type Prepend<Elm, T extends unknown[]> =
|
||||
>Prepend : Symbol(Prepend, Decl(infiniteConstraints.ts, 35, 88))
|
||||
>Elm : Symbol(Elm, Decl(infiniteConstraints.ts, 39, 20))
|
||||
>T : Symbol(T, Decl(infiniteConstraints.ts, 39, 24))
|
||||
|
||||
T extends unknown ?
|
||||
>T : Symbol(T, Decl(infiniteConstraints.ts, 39, 24))
|
||||
|
||||
((arg: Elm, ...rest: T) => void) extends ((...args: infer T2) => void) ? T2 :
|
||||
>arg : Symbol(arg, Decl(infiniteConstraints.ts, 41, 4))
|
||||
>Elm : Symbol(Elm, Decl(infiniteConstraints.ts, 39, 20))
|
||||
>rest : Symbol(rest, Decl(infiniteConstraints.ts, 41, 13))
|
||||
>T : Symbol(T, Decl(infiniteConstraints.ts, 39, 24))
|
||||
>args : Symbol(args, Decl(infiniteConstraints.ts, 41, 45))
|
||||
>T2 : Symbol(T2, Decl(infiniteConstraints.ts, 41, 59))
|
||||
>T2 : Symbol(T2, Decl(infiniteConstraints.ts, 41, 59))
|
||||
|
||||
never :
|
||||
never;
|
||||
export type ExactExtract<T, U> = T extends U ? U extends T ? T : never : never;
|
||||
>ExactExtract : Symbol(ExactExtract, Decl(infiniteConstraints.ts, 43, 8))
|
||||
>T : Symbol(T, Decl(infiniteConstraints.ts, 44, 25))
|
||||
>U : Symbol(U, Decl(infiniteConstraints.ts, 44, 27))
|
||||
>T : Symbol(T, Decl(infiniteConstraints.ts, 44, 25))
|
||||
>U : Symbol(U, Decl(infiniteConstraints.ts, 44, 27))
|
||||
>U : Symbol(U, Decl(infiniteConstraints.ts, 44, 27))
|
||||
>T : Symbol(T, Decl(infiniteConstraints.ts, 44, 25))
|
||||
>T : Symbol(T, Decl(infiniteConstraints.ts, 44, 25))
|
||||
|
||||
type Conv<T, U = T> =
|
||||
>Conv : Symbol(Conv, Decl(infiniteConstraints.ts, 44, 79))
|
||||
>T : Symbol(T, Decl(infiniteConstraints.ts, 46, 10))
|
||||
>U : Symbol(U, Decl(infiniteConstraints.ts, 46, 12))
|
||||
>T : Symbol(T, Decl(infiniteConstraints.ts, 46, 10))
|
||||
|
||||
{ 0: [T]; 1: Prepend<T, Conv<ExactExtract<U, T>>>;}[U extends T ? 0 : 1];
|
||||
>0 : Symbol(0, Decl(infiniteConstraints.ts, 47, 3))
|
||||
>T : Symbol(T, Decl(infiniteConstraints.ts, 46, 10))
|
||||
>1 : Symbol(1, Decl(infiniteConstraints.ts, 47, 11))
|
||||
>Prepend : Symbol(Prepend, Decl(infiniteConstraints.ts, 35, 88))
|
||||
>T : Symbol(T, Decl(infiniteConstraints.ts, 46, 10))
|
||||
>Conv : Symbol(Conv, Decl(infiniteConstraints.ts, 44, 79))
|
||||
>ExactExtract : Symbol(ExactExtract, Decl(infiniteConstraints.ts, 43, 8))
|
||||
>U : Symbol(U, Decl(infiniteConstraints.ts, 46, 12))
|
||||
>T : Symbol(T, Decl(infiniteConstraints.ts, 46, 10))
|
||||
>U : Symbol(U, Decl(infiniteConstraints.ts, 46, 12))
|
||||
>T : Symbol(T, Decl(infiniteConstraints.ts, 46, 10))
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -64,7 +64,7 @@ label: {
|
||||
(function (E) {
|
||||
})(E || (E = {}));
|
||||
}
|
||||
label:
|
||||
label: ;
|
||||
label: {
|
||||
var C = /** @class */ (function () {
|
||||
function C() {
|
||||
@@ -75,6 +75,6 @@ label: {
|
||||
label: var a = 1;
|
||||
label: var b = 1;
|
||||
label: var c = 1;
|
||||
label:
|
||||
label:
|
||||
label: ;
|
||||
label: ;
|
||||
label:
|
||||
|
||||
@@ -33,12 +33,12 @@ label: {
|
||||
(function (E) {
|
||||
})(E || (E = {}));
|
||||
}
|
||||
label:
|
||||
label: ;
|
||||
label: class C {
|
||||
}
|
||||
label: var a = 1;
|
||||
label: let b = 1;
|
||||
label: const c = 1;
|
||||
label:
|
||||
label:
|
||||
label: ;
|
||||
label: ;
|
||||
label:
|
||||
|
||||
@@ -35,12 +35,12 @@ label: {
|
||||
(function (E) {
|
||||
})(E || (E = {}));
|
||||
}
|
||||
label:
|
||||
label: ;
|
||||
label: class C {
|
||||
}
|
||||
label: var a = 1;
|
||||
label: let b = 1;
|
||||
label: const c = 1;
|
||||
label:
|
||||
label:
|
||||
label: ;
|
||||
label: ;
|
||||
label:
|
||||
|
||||
@@ -386,4 +386,10 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(168,5): error TS
|
||||
function f82<T, K1 extends keyof T, K2 extends keyof T[K1]>(t: T, k1: K1, k2: K2): Partial<T[K1][K2]> {
|
||||
return t[k1][k2];
|
||||
}
|
||||
|
||||
// #31070
|
||||
type Numeric<T> = { [K in keyof T]?: number };
|
||||
function f90<T extends { x: number }>() {
|
||||
const n: Numeric<T> = { x: 1 };
|
||||
}
|
||||
|
||||
@@ -180,6 +180,12 @@ function f81<T, K extends keyof T>(t: T, k: K): Partial<T[K]> {
|
||||
function f82<T, K1 extends keyof T, K2 extends keyof T[K1]>(t: T, k1: K1, k2: K2): Partial<T[K1][K2]> {
|
||||
return t[k1][k2];
|
||||
}
|
||||
|
||||
// #31070
|
||||
type Numeric<T> = { [K in keyof T]?: number };
|
||||
function f90<T extends { x: number }>() {
|
||||
const n: Numeric<T> = { x: 1 };
|
||||
}
|
||||
|
||||
|
||||
//// [mappedTypeRelationships.js]
|
||||
@@ -310,6 +316,9 @@ function f81(t, k) {
|
||||
function f82(t, k1, k2) {
|
||||
return t[k1][k2];
|
||||
}
|
||||
function f90() {
|
||||
var n = { x: 1 };
|
||||
}
|
||||
|
||||
|
||||
//// [mappedTypeRelationships.d.ts]
|
||||
@@ -393,3 +402,9 @@ declare function f76<T, U extends T, K extends keyof T>(x: {
|
||||
declare function f80<T>(t: T): Partial<T>;
|
||||
declare function f81<T, K extends keyof T>(t: T, k: K): Partial<T[K]>;
|
||||
declare function f82<T, K1 extends keyof T, K2 extends keyof T[K1]>(t: T, k1: K1, k2: K2): Partial<T[K1][K2]>;
|
||||
declare type Numeric<T> = {
|
||||
[K in keyof T]?: number;
|
||||
};
|
||||
declare function f90<T extends {
|
||||
x: number;
|
||||
}>(): void;
|
||||
|
||||
@@ -805,3 +805,22 @@ function f82<T, K1 extends keyof T, K2 extends keyof T[K1]>(t: T, k1: K1, k2: K2
|
||||
>k2 : Symbol(k2, Decl(mappedTypeRelationships.ts, 178, 73))
|
||||
}
|
||||
|
||||
// #31070
|
||||
type Numeric<T> = { [K in keyof T]?: number };
|
||||
>Numeric : Symbol(Numeric, Decl(mappedTypeRelationships.ts, 180, 1))
|
||||
>T : Symbol(T, Decl(mappedTypeRelationships.ts, 183, 13))
|
||||
>K : Symbol(K, Decl(mappedTypeRelationships.ts, 183, 21))
|
||||
>T : Symbol(T, Decl(mappedTypeRelationships.ts, 183, 13))
|
||||
|
||||
function f90<T extends { x: number }>() {
|
||||
>f90 : Symbol(f90, Decl(mappedTypeRelationships.ts, 183, 46))
|
||||
>T : Symbol(T, Decl(mappedTypeRelationships.ts, 184, 13))
|
||||
>x : Symbol(x, Decl(mappedTypeRelationships.ts, 184, 24))
|
||||
|
||||
const n: Numeric<T> = { x: 1 };
|
||||
>n : Symbol(n, Decl(mappedTypeRelationships.ts, 185, 9))
|
||||
>Numeric : Symbol(Numeric, Decl(mappedTypeRelationships.ts, 180, 1))
|
||||
>T : Symbol(T, Decl(mappedTypeRelationships.ts, 184, 13))
|
||||
>x : Symbol(x, Decl(mappedTypeRelationships.ts, 185, 27))
|
||||
}
|
||||
|
||||
|
||||
@@ -653,3 +653,18 @@ function f82<T, K1 extends keyof T, K2 extends keyof T[K1]>(t: T, k1: K1, k2: K2
|
||||
>k2 : K2
|
||||
}
|
||||
|
||||
// #31070
|
||||
type Numeric<T> = { [K in keyof T]?: number };
|
||||
>Numeric : Numeric<T>
|
||||
|
||||
function f90<T extends { x: number }>() {
|
||||
>f90 : <T extends { x: number; }>() => void
|
||||
>x : number
|
||||
|
||||
const n: Numeric<T> = { x: 1 };
|
||||
>n : Numeric<T>
|
||||
>{ x: 1 } : { x: number; }
|
||||
>x : number
|
||||
>1 : 1
|
||||
}
|
||||
|
||||
|
||||
@@ -44,5 +44,5 @@ var [a4] = [undefined], {b4} = { b4: null }, c4 = undefined, d4 = null; // error
|
||||
var [a5 = undefined] = []; // error
|
||||
>a5 : any
|
||||
>undefined : undefined
|
||||
>[] : [undefined?]
|
||||
>[] : []
|
||||
|
||||
|
||||
+98
-58
@@ -4,35 +4,55 @@ tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts(76,50):
|
||||
Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[P] | (TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[P]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] | (TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type '(Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]) | (Extract<number, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : GetProps<C>[Extract<number, keyof GetProps<C>>]) | (Extract<symbol, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : GetProps<C>[Extract<symbol, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type '(TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]) | GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] | GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[keyof GetProps<C> & string] | (TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[string] | (TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] | (TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[Extract<string, keyof GetProps<C>>] | GetProps<C>[Extract<number, keyof GetProps<C>>] | GetProps<C>[Extract<symbol, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'GetProps<C>[Extract<string, keyof GetProps<C>>] | GetProps<C>[Extract<number, keyof GetProps<C>>] | GetProps<C>[Extract<symbol, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type '(Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]) | (Extract<number, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : GetProps<C>[Extract<number, keyof GetProps<C>>]) | (Extract<symbol, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : GetProps<C>[Extract<symbol, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type '(TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]) | GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] | GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type '(TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]) | GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] | GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[string] | (TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
Type 'GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts (1 errors) ====
|
||||
@@ -119,35 +139,55 @@ tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts(76,50):
|
||||
!!! error TS2344: Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[P] | (TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[P]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] | (TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type '(Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]) | (Extract<number, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : GetProps<C>[Extract<number, keyof GetProps<C>>]) | (Extract<symbol, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : GetProps<C>[Extract<symbol, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type '(TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]) | GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] | GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[keyof GetProps<C> & string] | (TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[string] | (TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] | (TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<string, keyof GetProps<C>>] | GetProps<C>[Extract<number, keyof GetProps<C>>] | GetProps<C>[Extract<symbol, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<string, keyof GetProps<C>>] | GetProps<C>[Extract<number, keyof GetProps<C>>] | GetProps<C>[Extract<symbol, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type '(Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]) | (Extract<number, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : GetProps<C>[Extract<number, keyof GetProps<C>>]) | (Extract<symbol, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : GetProps<C>[Extract<symbol, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type '(TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]) | GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] | GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type '(TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]) | GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] | GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[string] | (TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
|
||||
!!! error TS2344: Type 'GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
!!! error TS2344: Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
|
||||
>;
|
||||
|
||||
declare const connect: {
|
||||
|
||||
@@ -49,7 +49,7 @@ for (let [v] of v) { }
|
||||
let [x2 = x2] = []
|
||||
>x2 : any
|
||||
>x2 : any
|
||||
>[] : [any?]
|
||||
>[] : []
|
||||
|
||||
let z0 = () => z0;
|
||||
>z0 : () => any
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
const a = 'a';
|
||||
const b = /**/'b';
|
||||
|
||||
|
||||
'b'
|
||||
|
||||
const b = 'b';
|
||||
|
||||
const a = 'a';
|
||||
const b = 'b';
|
||||
+9
-9
@@ -234,11 +234,11 @@ let multiRobotAInfo: (string | string[])[];
|
||||
|
||||
[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB;
|
||||
>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB : [string, string[]]
|
||||
>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, [string?, string?]]
|
||||
>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, []]
|
||||
>nameMB = "helloNoName" : "helloNoName"
|
||||
>nameMB : string
|
||||
>"helloNoName" : "helloNoName"
|
||||
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : [string?, string?]
|
||||
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : []
|
||||
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] : [string, string]
|
||||
>primarySkillB = "noSkill" : "noSkill"
|
||||
>primarySkillB : string
|
||||
@@ -246,16 +246,16 @@ let multiRobotAInfo: (string | string[])[];
|
||||
>secondarySkillB = "noSkill" : "noSkill"
|
||||
>secondarySkillB : string
|
||||
>"noSkill" : "noSkill"
|
||||
>[] : [string?, string?]
|
||||
>[] : []
|
||||
>multiRobotB : [string, string[]]
|
||||
|
||||
[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB();
|
||||
>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB() : [string, string[]]
|
||||
>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, [string?, string?]]
|
||||
>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, []]
|
||||
>nameMB = "helloNoName" : "helloNoName"
|
||||
>nameMB : string
|
||||
>"helloNoName" : "helloNoName"
|
||||
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : [string?, string?]
|
||||
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : []
|
||||
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] : [string, string]
|
||||
>primarySkillB = "noSkill" : "noSkill"
|
||||
>primarySkillB : string
|
||||
@@ -263,17 +263,17 @@ let multiRobotAInfo: (string | string[])[];
|
||||
>secondarySkillB = "noSkill" : "noSkill"
|
||||
>secondarySkillB : string
|
||||
>"noSkill" : "noSkill"
|
||||
>[] : [string?, string?]
|
||||
>[] : []
|
||||
>getMultiRobotB() : [string, string[]]
|
||||
>getMultiRobotB : () => [string, string[]]
|
||||
|
||||
[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] =
|
||||
>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = ["trimmer", ["trimming", "edging"]] : [string, [string, string]]
|
||||
>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, [string?, string?]]
|
||||
>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, []]
|
||||
>nameMB = "helloNoName" : "helloNoName"
|
||||
>nameMB : string
|
||||
>"helloNoName" : "helloNoName"
|
||||
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : [string?, string?]
|
||||
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : []
|
||||
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] : [string, string]
|
||||
>primarySkillB = "noSkill" : "noSkill"
|
||||
>primarySkillB : string
|
||||
@@ -281,7 +281,7 @@ let multiRobotAInfo: (string | string[])[];
|
||||
>secondarySkillB = "noSkill" : "noSkill"
|
||||
>secondarySkillB : string
|
||||
>"noSkill" : "noSkill"
|
||||
>[] : [string?, string?]
|
||||
>[] : []
|
||||
|
||||
["trimmer", ["trimming", "edging"]];
|
||||
>["trimmer", ["trimming", "edging"]] : [string, [string, string]]
|
||||
|
||||
@@ -14,7 +14,8 @@ node_modules/assert/test.js(141,10): error TS2339: Property 'b' does not exist o
|
||||
node_modules/assert/test.js(142,10): error TS2339: Property 'b' does not exist on type 'number[]'.
|
||||
node_modules/assert/test.js(143,10): error TS2339: Property 'a' does not exist on type 'number[]'.
|
||||
node_modules/assert/test.js(149,5): error TS2552: Cannot find name 'test'. Did you mean 'tests'?
|
||||
node_modules/assert/test.js(157,51): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'never' has no compatible call signatures.
|
||||
node_modules/assert/test.js(157,51): error TS2349: This expression is not callable.
|
||||
Type 'never' has no call signatures.
|
||||
node_modules/assert/test.js(161,5): error TS2552: Cannot find name 'test'. Did you mean 'tests'?
|
||||
node_modules/assert/test.js(168,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
|
||||
node_modules/assert/test.js(182,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
|
||||
|
||||
@@ -28,7 +28,8 @@ node_modules/chrome-devtools-frontend/front_end/Runtime.js(280,5): error TS2322:
|
||||
node_modules/chrome-devtools-frontend/front_end/Runtime.js(283,12): error TS2554: Expected 2-3 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/Runtime.js(527,49): error TS2352: Conversion of type 'Window' to type 'new () => any' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
|
||||
Type 'Window' provides no match for the signature 'new (): any'.
|
||||
node_modules/chrome-devtools-frontend/front_end/Runtime.js(539,20): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
node_modules/chrome-devtools-frontend/front_end/Runtime.js(539,24): error TS2351: This expression is not constructable.
|
||||
Type 'Function' has no construct signatures.
|
||||
node_modules/chrome-devtools-frontend/front_end/Runtime.js(693,7): error TS2322: Type 'Promise<boolean>' is not assignable to type 'Promise<undefined>'.
|
||||
Type 'boolean' is not assignable to type 'undefined'.
|
||||
node_modules/chrome-devtools-frontend/front_end/Runtime.js(705,5): error TS2322: Type 'Promise<boolean>' is not assignable to type 'Promise<undefined>'.
|
||||
@@ -6104,7 +6105,8 @@ node_modules/chrome-devtools-frontend/front_end/event_listeners/EventListenersUt
|
||||
node_modules/chrome-devtools-frontend/front_end/event_listeners/EventListenersUtils.js(295,16): error TS2339: Property 'devtoolsFrameworkEventListeners' does not exist on type 'Window'.
|
||||
node_modules/chrome-devtools-frontend/front_end/event_listeners/EventListenersUtils.js(295,68): error TS2339: Property 'devtoolsFrameworkEventListeners' does not exist on type 'Window'.
|
||||
node_modules/chrome-devtools-frontend/front_end/event_listeners/EventListenersUtils.js(296,41): error TS2339: Property 'devtoolsFrameworkEventListeners' does not exist on type 'Window'.
|
||||
node_modules/chrome-devtools-frontend/front_end/event_listeners/EventListenersUtils.js(306,37): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '(<U>(callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[]) | (<U>(callbackfn: (value: { handler: any; useCapture: boolean; passive: boolean; once: boolean; type: string; }, index: number, array: { ...; }[]) => U, thisArg?: any) => U[])' has no compatible call signatures.
|
||||
node_modules/chrome-devtools-frontend/front_end/event_listeners/EventListenersUtils.js(306,66): error TS2349: This expression is not callable.
|
||||
Each member of the union type '(<U>(callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[]) | (<U>(callbackfn: (value: { handler: any; useCapture: boolean; passive: boolean; once: boolean; type: string; }, index: number, array: { ...; }[]) => U, thisArg?: any) => U[])' has signatures, but none of those signatures are compatible with each other.
|
||||
node_modules/chrome-devtools-frontend/front_end/event_listeners/EventListenersUtils.js(324,5): error TS2741: Property 'internalHandlers' is missing in type '{ eventListeners: any[]; }' but required in type '{ eventListeners: any[]; internalHandlers: (() => any)[]; }'.
|
||||
node_modules/chrome-devtools-frontend/front_end/event_listeners/EventListenersUtils.js(345,33): error TS2694: Namespace 'EventListeners' has no exported member 'EventListenerObjectInInspectedPage'.
|
||||
node_modules/chrome-devtools-frontend/front_end/event_listeners/EventListenersUtils.js(420,32): error TS2352: Conversion of type '{ fn: any; data: any; _data: any; }' to type '(arg0: Node) => any' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
|
||||
@@ -6839,7 +6841,6 @@ node_modules/chrome-devtools-frontend/front_end/layer_viewer/LayerDetailsView.js
|
||||
node_modules/chrome-devtools-frontend/front_end/layer_viewer/LayerDetailsView.js(198,65): error TS2555: Expected at least 2 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/layer_viewer/LayerDetailsView.js(199,53): error TS2339: Property 'createChild' does not exist on type 'Element'.
|
||||
node_modules/chrome-devtools-frontend/front_end/layer_viewer/LayerDetailsView.js(200,52): error TS2555: Expected at least 2 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/layer_viewer/LayerDetailsView.js(239,3): error TS2322: Type 'symbol' is not assignable to type 'string'.
|
||||
node_modules/chrome-devtools-frontend/front_end/layer_viewer/LayerDetailsView.js(246,25): error TS2555: Expected at least 2 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/layer_viewer/LayerDetailsView.js(247,19): error TS2555: Expected at least 2 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/layer_viewer/LayerDetailsView.js(248,20): error TS2555: Expected at least 2 arguments, but got 1.
|
||||
@@ -6932,8 +6933,6 @@ node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(718
|
||||
node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(726,44): error TS2339: Property 'clientX' does not exist on type 'Event'.
|
||||
node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(727,24): error TS2339: Property 'clientY' does not exist on type 'Event'.
|
||||
node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(762,26): error TS2339: Property 'LayerStyle' does not exist on type 'typeof Layers3DView'.
|
||||
node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(777,3): error TS2322: Type 'symbol' is not assignable to type 'string'.
|
||||
node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(778,3): error TS2322: Type 'symbol' is not assignable to type 'string'.
|
||||
node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(794,28): error TS2555: Expected at least 2 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(795,29): error TS2555: Expected at least 2 arguments, but got 1.
|
||||
node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(796,29): error TS2555: Expected at least 2 arguments, but got 1.
|
||||
@@ -8941,7 +8940,8 @@ node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(131,
|
||||
Property '_populated' does not exist on type 'ProfileDataGridNode'.
|
||||
node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(133,15): error TS2339: Property '_populated' does not exist on type 'ProfileDataGridNode | ProfileDataGridTree'.
|
||||
Property '_populated' does not exist on type 'ProfileDataGridNode'.
|
||||
node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(140,7): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '(<T>(comparator: (arg0: T, arg1: T) => any, force: boolean) => any) | (<T>(comparator: (arg0: T, arg1: T) => any, force: boolean) => void)' has no compatible call signatures.
|
||||
node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(140,17): error TS2349: This expression is not callable.
|
||||
Each member of the union type '(<T>(comparator: (arg0: T, arg1: T) => any, force: boolean) => any) | (<T>(comparator: (arg0: T, arg1: T) => any, force: boolean) => void)' has signatures, but none of those signatures are compatible with each other.
|
||||
node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(153,49): error TS2339: Property '_searchMatchedSelfColumn' does not exist on type 'ProfileDataGridNode'.
|
||||
node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(158,49): error TS2339: Property '_searchMatchedTotalColumn' does not exist on type 'ProfileDataGridNode'.
|
||||
node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(163,49): error TS2339: Property '_searchMatchedFunctionColumn' does not exist on type 'ProfileDataGridNode'.
|
||||
@@ -10085,7 +10085,8 @@ node_modules/chrome-devtools-frontend/front_end/sdk/NetworkManager.js(955,42): e
|
||||
node_modules/chrome-devtools-frontend/front_end/sdk/NetworkManager.js(976,41): error TS2694: Namespace 'SDK.NetworkManager' has no exported member 'BlockedPattern'.
|
||||
node_modules/chrome-devtools-frontend/front_end/sdk/NetworkManager.js(1019,52): error TS2694: Namespace 'SDK.MultitargetNetworkManager' has no exported member 'InterceptionPattern'.
|
||||
node_modules/chrome-devtools-frontend/front_end/sdk/NetworkManager.js(1020,45): error TS2694: Namespace 'SDK.MultitargetNetworkManager' has no exported member 'RequestInterceptor'.
|
||||
node_modules/chrome-devtools-frontend/front_end/sdk/NetworkManager.js(1060,13): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{}' has no compatible call signatures.
|
||||
node_modules/chrome-devtools-frontend/front_end/sdk/NetworkManager.js(1060,13): error TS2349: This expression is not callable.
|
||||
Type '{}' has no call signatures.
|
||||
node_modules/chrome-devtools-frontend/front_end/sdk/NetworkManager.js(1084,19): error TS2339: Property 'networkAgent' does not exist on type 'Target'.
|
||||
node_modules/chrome-devtools-frontend/front_end/sdk/NetworkManager.js(1089,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type.
|
||||
node_modules/chrome-devtools-frontend/front_end/sdk/NetworkManager.js(1101,35): error TS2345: Argument of type '{}' is not assignable to parameter of type '{ [x: string]: string; }'.
|
||||
|
||||
@@ -37,7 +37,8 @@ node_modules/lodash/_baseDifference.js(43,5): error TS2740: Type 'SetCache' is m
|
||||
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.
|
||||
node_modules/lodash/_baseFlatten.js(24,22): error TS2349: This expression is not callable.
|
||||
Type 'Boolean' has no call signatures.
|
||||
node_modules/lodash/_baseFlatten.js(24,22): error TS2532: Object is possibly 'undefined'.
|
||||
node_modules/lodash/_baseFlatten.js(24,22): error TS2722: Cannot invoke an object which is possibly 'undefined'.
|
||||
node_modules/lodash/_baseHas.js(16,56): error TS2345: Argument of type 'string | any[]' is not assignable to parameter of type 'string | number | symbol'.
|
||||
@@ -76,7 +77,8 @@ node_modules/lodash/_baseUniq.js(33,43): error TS2554: Expected 0 arguments, but
|
||||
node_modules/lodash/_baseUniq.js(39,5): error TS2322: Type 'SetCache' is not assignable to type 'any[]'.
|
||||
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/_cloneArrayBuffer.js(11,20): error TS2351: This expression is not constructable.
|
||||
Type 'Function' has no construct signatures.
|
||||
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.
|
||||
@@ -85,14 +87,22 @@ node_modules/lodash/_copySymbols.js(13,40): error TS2554: Expected 0 arguments,
|
||||
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.
|
||||
node_modules/lodash/_createCtor.js(21,22): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
node_modules/lodash/_createCtor.js(22,22): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
node_modules/lodash/_createCtor.js(23,22): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
node_modules/lodash/_createCtor.js(24,22): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
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/_createCtor.js(19,26): error TS2351: This expression is not constructable.
|
||||
Type 'Function' has no construct signatures.
|
||||
node_modules/lodash/_createCtor.js(20,26): error TS2351: This expression is not constructable.
|
||||
Type 'Function' has no construct signatures.
|
||||
node_modules/lodash/_createCtor.js(21,26): error TS2351: This expression is not constructable.
|
||||
Type 'Function' has no construct signatures.
|
||||
node_modules/lodash/_createCtor.js(22,26): error TS2351: This expression is not constructable.
|
||||
Type 'Function' has no construct signatures.
|
||||
node_modules/lodash/_createCtor.js(23,26): error TS2351: This expression is not constructable.
|
||||
Type 'Function' has no construct signatures.
|
||||
node_modules/lodash/_createCtor.js(24,26): error TS2351: This expression is not constructable.
|
||||
Type 'Function' has no construct signatures.
|
||||
node_modules/lodash/_createCtor.js(25,26): error TS2351: This expression is not constructable.
|
||||
Type 'Function' has no construct signatures.
|
||||
node_modules/lodash/_createCtor.js(26,26): error TS2351: This expression is not constructable.
|
||||
Type 'Function' has no construct signatures.
|
||||
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,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.
|
||||
@@ -143,7 +153,8 @@ node_modules/lodash/_getRawTag.js(36,7): error TS2454: Variable 'unmasked' is us
|
||||
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.
|
||||
node_modules/lodash/_initCloneArray.js(16,20): error TS2351: This expression is not constructable.
|
||||
Type 'Function' has no construct signatures.
|
||||
node_modules/lodash/_initCloneArray.js(20,26): error TS2339: Property 'index' does not exist on type 'any[]'.
|
||||
node_modules/lodash/_initCloneArray.js(21,26): error TS2339: Property 'input' does not exist on type 'any[]'.
|
||||
node_modules/lodash/_insertWrapDetails.js(10,5): error TS1223: 'returns' tag already specified.
|
||||
@@ -190,7 +201,8 @@ node_modules/lodash/core.js(68,58): error TS2339: Property 'Object' does not exi
|
||||
node_modules/lodash/core.js(77,82): error TS2339: Property 'nodeType' does not exist on type 'NodeModule'.
|
||||
node_modules/lodash/core.js(540,31): 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/core.js(545,24): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'Boolean' has no compatible call signatures.
|
||||
node_modules/lodash/core.js(545,24): error TS2349: This expression is not callable.
|
||||
Type 'Boolean' has no call signatures.
|
||||
node_modules/lodash/core.js(545,24): error TS2532: Object is possibly 'undefined'.
|
||||
node_modules/lodash/core.js(545,24): error TS2722: Cannot invoke an object which is possibly 'undefined'.
|
||||
node_modules/lodash/core.js(664,42): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'number'.
|
||||
|
||||
@@ -81,7 +81,9 @@ src/language-html/ast.js(90,17): error TS2339: Property 'namespace' does not exi
|
||||
src/language-html/ast.js(90,34): error TS2339: Property 'namespace' does not exist on type 'Node'.
|
||||
src/language-html/ast.js(90,57): error TS2339: Property 'name' does not exist on type 'Node'.
|
||||
src/language-html/ast.js(90,69): error TS2339: Property 'name' does not exist on type 'Node'.
|
||||
src/language-html/conditional-comment.js(23,16): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'RegExp | ((node: any) => { type: string; sourceSpan: any; })' has no compatible call signatures.
|
||||
src/language-html/conditional-comment.js(23,16): error TS2349: This expression is not callable.
|
||||
Not all constituents of type 'RegExp | ((node: any) => { type: string; sourceSpan: any; })' are callable.
|
||||
Type 'RegExp' has no call signatures.
|
||||
src/language-html/index.js(8,26): error TS2307: Cannot find module 'linguist-languages/data/html'.
|
||||
src/language-html/index.js(8,59): error TS2345: Argument of type '{ override: { name: string; since: string; parsers: string[]; vscodeLanguageIds: string[]; extensions: string[]; filenames: never[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; }'.
|
||||
Property 'extend' is missing in type '{ override: { name: string; since: string; parsers: string[]; vscodeLanguageIds: string[]; extensions: string[]; filenames: never[]; }; }' but required in type '{ extend: any; override: any; }'.
|
||||
|
||||
@@ -58,7 +58,8 @@ lib/Page.js(189,15): error TS2503: Cannot find namespace 'Protocol'.
|
||||
lib/Page.js(284,15): error TS2503: Cannot find namespace 'Protocol'.
|
||||
lib/Page.js(369,20): error TS2503: Cannot find namespace 'Protocol'.
|
||||
lib/Page.js(432,7): error TS2740: Type '(...args: any[]) => Promise<any>' is missing the following properties from type 'Window': Blob, TextDecoder, TextEncoder, URL, and 232 more.
|
||||
lib/Page.js(442,9): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'Window' has no compatible call signatures.
|
||||
lib/Page.js(442,9): error TS2349: This expression is not callable.
|
||||
Type 'Window' has no call signatures.
|
||||
lib/Page.js(478,15): error TS2503: Cannot find namespace 'Protocol'.
|
||||
lib/Page.js(488,22): error TS2503: Cannot find namespace 'Protocol'.
|
||||
lib/Page.js(501,15): error TS2503: Cannot find namespace 'Protocol'.
|
||||
|
||||
@@ -11,7 +11,9 @@ node_modules/uglify-js/lib/compress.js(184,42): error TS2554: Expected 0 argumen
|
||||
node_modules/uglify-js/lib/compress.js(535,41): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(861,33): error TS2554: Expected 0 arguments, but got 1.
|
||||
node_modules/uglify-js/lib/compress.js(1121,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
|
||||
node_modules/uglify-js/lib/compress.js(1135,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(1135,51): error TS2349: This expression is not callable.
|
||||
Not all constituents of type 'true | ((node: any) => any)' are callable.
|
||||
Type 'true' has no call signatures.
|
||||
node_modules/uglify-js/lib/compress.js(1199,53): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'.
|
||||
node_modules/uglify-js/lib/compress.js(1240,112): error TS2454: Variable 'args' is used before being assigned.
|
||||
node_modules/uglify-js/lib/compress.js(1241,29): error TS2532: Object is possibly 'undefined'.
|
||||
|
||||
@@ -21,4 +21,17 @@ export class Elem<
|
||||
new Elem(undefined as ElChildren.Void);
|
||||
new Elem('' as ElChildren.Text);
|
||||
new Elem('' as ElChildren.Void | ElChildren.Text); // error
|
||||
new Elem('' as ElChildren); // error
|
||||
new Elem('' as ElChildren); // error
|
||||
|
||||
// Repro from #31766
|
||||
|
||||
interface I { a: string }
|
||||
|
||||
type DeepPartial<T> =
|
||||
T extends object ? {[K in keyof T]?: DeepPartial<T[K]>} : T;
|
||||
|
||||
declare function f<T>(t: T, partial: DeepPartial<T>): T;
|
||||
|
||||
function g(p1: I, p2: Partial<I>): I {
|
||||
return f(p1, p2);
|
||||
}
|
||||
|
||||
@@ -7,3 +7,9 @@ const [a, b, c, ...rest] = tuple;
|
||||
declare var receiver: typeof tuple;
|
||||
|
||||
[...receiver] = tuple;
|
||||
|
||||
// Repros from #32140
|
||||
|
||||
const [oops1] = [1, 2, 3].reduce((accu, el) => accu.concat(el), []);
|
||||
|
||||
const [oops2] = [1, 2, 3].reduce((acc: number[], e) => acc.concat(e), []);
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
if (1)
|
||||
const enum A {}
|
||||
else
|
||||
const enum B {}
|
||||
|
||||
do
|
||||
const enum C {}
|
||||
while (0);
|
||||
|
||||
while (0)
|
||||
const enum D {}
|
||||
|
||||
for (;0;)
|
||||
const enum E {}
|
||||
|
||||
for (let _ in [])
|
||||
const enum F {}
|
||||
|
||||
for (let _ of [])
|
||||
const enum G {}
|
||||
|
||||
// @ts-ignore suppress `with` statement error
|
||||
with (window)
|
||||
const enum H {}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user